47 ultimix.get_string =
function( StringAlias , Default , Value )
58 if( Value ==
'default' )
60 return(
ultimix.lang.Strings[
ultimix.lang.Locale ][ StringAlias ][
'default' ] );
64 for( Condition in
ultimix.lang.Strings[
ultimix.lang.Locale ][ StringAlias ] )
66 if( (
new RegExp( Condition ) ).test( String( Value ) ) )
68 return(
ultimix.lang.Strings[
ultimix.lang.Locale ][ StringAlias ][ Condition ] );
78 return( StringAlias );
81 ultimix.lang.Strings[
ultimix.lang.Locale ][
'name_ru' ][
'default' ] =
'рус';
83 ultimix.lang.Strings[
ultimix.lang.Locale ][
'name_en' ][
'default' ] =
'eng';
85 ultimix.lang.Strings[
ultimix.lang.Locale ][
'name_jp' ][
'default' ] =
'jap';
88 ultimix.lang.Strings[
ultimix.lang.Locale ][
'main_page' ][
'default' ] =
'Главная[nbsp]страница';
89 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'menu_main_admin_page' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'menu_main_admin_page' ] = {};
90 ultimix.lang.Strings[
ultimix.lang.Locale ][
'menu_main_admin_page' ][
'default' ] =
'Главная[nbsp]страница';
91 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'menu_user_management' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'menu_user_management' ] = {};
92 ultimix.lang.Strings[
ultimix.lang.Locale ][
'menu_user_management' ][
'default' ] =
'Управление[nbsp]пользователями';
93 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'menu_page_manager' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'menu_page_manager' ] = {};
94 ultimix.lang.Strings[
ultimix.lang.Locale ][
'menu_page_manager' ][
'default' ] =
'Управление[nbsp]страницами';
95 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'menu_package_manager' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'menu_package_manager' ] = {};
96 ultimix.lang.Strings[
ultimix.lang.Locale ][
'menu_package_manager' ][
'default' ] =
'Управление[nbsp]пакетами';
97 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'admin_console' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'admin_console' ] = {};
98 ultimix.lang.Strings[
ultimix.lang.Locale ][
'admin_console' ][
'default' ] =
'Консоль администратора';
100 ultimix.lang.Strings[
ultimix.lang.Locale ][
'no_permits' ][
'default' ] =
'Нет доступа';
101 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'an_error_occured' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'an_error_occured' ] = {};
102 ultimix.lang.Strings[
ultimix.lang.Locale ][
'an_error_occured' ][
'default' ] =
'Произошла ошибка';
104 ultimix.lang.Strings[
ultimix.lang.Locale ][
'profile' ][
'default' ] =
'Профиль';
106 ultimix.lang.Strings[
ultimix.lang.Locale ][
'today_is' ][
'default' ] =
'Системная дата';
107 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'page_was_not_found' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'page_was_not_found' ] = {};
108 ultimix.lang.Strings[
ultimix.lang.Locale ][
'page_was_not_found' ][
'default' ] =
'Страница не найдена';
109 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'page_was_generated_in' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'page_was_generated_in' ] = {};
110 ultimix.lang.Strings[
ultimix.lang.Locale ][
'page_was_generated_in' ][
'default' ] =
'Страница была сгенерирована за[nbsp]:[nbsp]';
111 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'passes_count' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'passes_count' ] = {};
112 ultimix.lang.Strings[
ultimix.lang.Locale ][
'passes_count' ][
'default' ] =
'Количество[nbsp]проходов[nbsp]:[nbsp]';
114 ultimix.lang.Strings[
ultimix.lang.Locale ][
'nbsp' ][
'default' ] =
'[nbsp]';
116 ultimix.lang.Strings[
ultimix.lang.Locale ][
'no_text' ][
'default' ] =
'';
118 ultimix.lang.Strings[
ultimix.lang.Locale ][
'save' ][
'default' ] =
'сохранить';
119 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'shure_to_delete_all_selected_records' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'shure_to_delete_all_selected_records' ] = {};
120 ultimix.lang.Strings[
ultimix.lang.Locale ][
'shure_to_delete_all_selected_records' ][
'default' ] =
'Вы уверены, что хотите удалить все выбранные записи?';
122 ultimix.lang.Strings[
ultimix.lang.Locale ][
'edit' ][
'default' ] =
'редактировать';
124 ultimix.lang.Strings[
ultimix.lang.Locale ][
'cancel' ][
'default' ] =
'отмена';
126 ultimix.lang.Strings[
ultimix.lang.Locale ][
'create' ][
'default' ] =
'создать';
127 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'shure_that_you_want_to_do_it' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'shure_that_you_want_to_do_it' ] = {};
128 ultimix.lang.Strings[
ultimix.lang.Locale ][
'shure_that_you_want_to_do_it' ][
'default' ] =
'Вы уверены, что хотите сделать это?';
130 ultimix.lang.Strings[
ultimix.lang.Locale ][
'Next' ][
'default' ] =
'Далее';
132 ultimix.lang.Strings[
ultimix.lang.Locale ][
'Back' ][
'default' ] =
'Назад';
134 ultimix.lang.Strings[
ultimix.lang.Locale ][
'Finish' ][
'default' ] =
'Завершить';
136 ultimix.lang.Strings[
ultimix.lang.Locale ][
'Cancel' ][
'default' ] =
'Отмена';
138 ultimix.lang.Strings[
ultimix.lang.Locale ][
'step' ][
'default' ] =
'шаг';
140 ultimix.lang.Strings[
ultimix.lang.Locale ][
'of' ][
'default' ] =
'из';
142 ultimix.lang.Strings[
ultimix.lang.Locale ][
'delete' ][
'default' ] =
'удалить';
144 ultimix.lang.Strings[
ultimix.lang.Locale ][
'Delete' ][
'default' ] =
'Удалить';
146 ultimix.lang.Strings[
ultimix.lang.Locale ][
'Help' ][
'default' ] =
'Помощь';
148 ultimix.lang.Strings[
ultimix.lang.Locale ][
'Ignore' ][
'default' ] =
'Игнорировать';
150 ultimix.lang.Strings[
ultimix.lang.Locale ][
'Retry' ][
'default' ] =
'Повторить';
152 ultimix.lang.Strings[
ultimix.lang.Locale ][
'Abort' ][
'default' ] =
'Прервать';
154 ultimix.lang.Strings[
ultimix.lang.Locale ][
'Cancel' ][
'default' ] =
'Отмена';
156 ultimix.lang.Strings[
ultimix.lang.Locale ][
'OK' ][
'default' ] =
'ОК';
158 ultimix.lang.Strings[
ultimix.lang.Locale ][
'No' ][
'default' ] =
'Нет';
160 ultimix.lang.Strings[
ultimix.lang.Locale ][
'Yes' ][
'default' ] =
'Да';
162 ultimix.lang.Strings[
ultimix.lang.Locale ][
'Question' ][
'default' ] =
'Вопрос';
164 ultimix.lang.Strings[
ultimix.lang.Locale ][
'Error' ][
'default' ] =
'Ошибка';
166 ultimix.lang.Strings[
ultimix.lang.Locale ][
'Info' ][
'default' ] =
'Информация';
168 ultimix.lang.Strings[
ultimix.lang.Locale ][
'wait_please' ][
'default' ] =
'Операция выполняется. Пожалуйста подождите...';
170 ultimix.lang.Strings[
ultimix.lang.Locale ][
'print' ][
'default' ] =
'печать';
172 ultimix.lang.Strings[
ultimix.lang.Locale ][
'Print' ][
'default' ] =
'Печать';
174 ultimix.lang.Strings[
ultimix.lang.Locale ][
'not_set' ][
'default' ] =
'не установлено';
175 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'admin_console_short' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'admin_console_short' ] = {};
176 ultimix.lang.Strings[
ultimix.lang.Locale ][
'admin_console_short' ][
'default' ] =
'Админка';
178 ultimix.lang.Strings[
ultimix.lang.Locale ][
'main' ][
'default' ] =
'Главная<br>страница';
180 ultimix.lang.Strings[
ultimix.lang.Locale ][
'not_defined' ][
'default' ] =
'не определено';
182 ultimix.lang.Strings[
ultimix.lang.Locale ][
'details' ][
'default' ] =
'подробнее';
183 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'grid_waiting_message' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'grid_waiting_message' ] = {};
184 ultimix.lang.Strings[
ultimix.lang.Locale ][
'grid_waiting_message' ][
'default' ] =
'Операция выполняется. Подождите пожалуйста...';
186 ultimix.lang.Strings[
ultimix.lang.Locale ][
'view' ][
'default' ] =
'просмотр';
188 ultimix.lang.Strings[
ultimix.lang.Locale ][
'about_us' ][
'default' ] =
'О нас';
190 ultimix.lang.Strings[
ultimix.lang.Locale ][
'contacts' ][
'default' ] =
'Контакты';
192 ultimix.lang.Strings[
ultimix.lang.Locale ][
'info' ][
'default' ] =
'Информация';
194 ultimix.lang.Strings[
ultimix.lang.Locale ][
'forum' ][
'default' ] =
'Форум';
195 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'photogallery' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'photogallery' ] = {};
196 ultimix.lang.Strings[
ultimix.lang.Locale ][
'photogallery' ][
'default' ] =
'Фотогалерея';
198 ultimix.lang.Strings[
ultimix.lang.Locale ][
'video' ][
'default' ] =
'Видео';
200 ultimix.lang.Strings[
ultimix.lang.Locale ][
'month_1' ][
'default' ] =
'Январь';
202 ultimix.lang.Strings[
ultimix.lang.Locale ][
'month_2' ][
'default' ] =
'Февраль';
204 ultimix.lang.Strings[
ultimix.lang.Locale ][
'month_3' ][
'default' ] =
'Март';
206 ultimix.lang.Strings[
ultimix.lang.Locale ][
'month_4' ][
'default' ] =
'Апрель';
208 ultimix.lang.Strings[
ultimix.lang.Locale ][
'month_5' ][
'default' ] =
'Май';
210 ultimix.lang.Strings[
ultimix.lang.Locale ][
'month_6' ][
'default' ] =
'Июнь';
212 ultimix.lang.Strings[
ultimix.lang.Locale ][
'month_7' ][
'default' ] =
'Июль';
214 ultimix.lang.Strings[
ultimix.lang.Locale ][
'month_8' ][
'default' ] =
'Август';
216 ultimix.lang.Strings[
ultimix.lang.Locale ][
'month_9' ][
'default' ] =
'Сентябрь';
218 ultimix.lang.Strings[
ultimix.lang.Locale ][
'month_10' ][
'default' ] =
'Октябрь';
220 ultimix.lang.Strings[
ultimix.lang.Locale ][
'month_11' ][
'default' ] =
'Ноябрь';
222 ultimix.lang.Strings[
ultimix.lang.Locale ][
'month_12' ][
'default' ] =
'Декабрь';
223 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'auto_submit_protection' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'auto_submit_protection' ] = {};
224 ultimix.lang.Strings[
ultimix.lang.Locale ][
'auto_submit_protection' ][
'default' ] =
'Защита от ботов';
225 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'numbers_on_the_image' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'numbers_on_the_image' ] = {};
226 ultimix.lang.Strings[
ultimix.lang.Locale ][
'numbers_on_the_image' ][
'default' ] =
'Цифры на картинке';
228 ultimix.lang.Strings[
ultimix.lang.Locale ][
'send' ][
'default' ] =
'отправить';
229 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'captcha_error' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'captcha_error' ] = {};
230 ultimix.lang.Strings[
ultimix.lang.Locale ][
'captcha_error' ][
'default' ] =
'Неправильно введён код с картинки';
232 ultimix.lang.Strings[
ultimix.lang.Locale ][
'navigation' ][
'default' ] =
'Навигация';
233 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'advertisement' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'advertisement' ] = {};
234 ultimix.lang.Strings[
ultimix.lang.Locale ][
'advertisement' ][
'default' ] =
'Реклама';
236 ultimix.lang.Strings[
ultimix.lang.Locale ][
'update' ][
'default' ] =
'обновить';
238 ultimix.lang.Strings[
ultimix.lang.Locale ][
'download' ][
'default' ] =
'скачать';
240 ultimix.lang.Strings[
ultimix.lang.Locale ][
'report' ][
'default' ] =
'отчёт';
242 ultimix.lang.Strings[
ultimix.lang.Locale ][
'generate' ][
'default' ] =
'сгенерировать';
244 ultimix.lang.Strings[
ultimix.lang.Locale ][
'copy' ][
'default' ] =
'копировать';
245 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'report_is_generating' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'report_is_generating' ] = {};
246 ultimix.lang.Strings[
ultimix.lang.Locale ][
'report_is_generating' ][
'default' ] =
'Осуществляется генерация отчета. Пожалуйста подождите...';
247 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'at_least_one_record_must_be_selected' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'at_least_one_record_must_be_selected' ] = {};
248 ultimix.lang.Strings[
ultimix.lang.Locale ][
'at_least_one_record_must_be_selected' ][
'default' ] =
'Ни одной записи не выборано. Должна быть выбрана хотя бы одна запись.';
249 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'total_records_count' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'total_records_count' ] = {};
250 ultimix.lang.Strings[
ultimix.lang.Locale ][
'total_records_count' ][
'default' ] =
'Общее число записей';
252 ultimix.lang.Strings[
ultimix.lang.Locale ][
'more_info' ][
'default' ] =
'Подробнее';
253 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'number_to_words' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'number_to_words' ] = {};
254 ultimix.lang.Strings[
ultimix.lang.Locale ][
'number_to_words' ][
'/^[0-9]{1,9}$/' ] =
'{lang:digit10;value={value};default=}{lang:digit9;value={value};default=}{lang:digit8;value={value};default=}{lang:digit78;value={value};default=}{lang:digit7;value={value};default=}{lang:digit6;value={value};default=}{lang:digit5;value={value};default=}{lang:digit45;value={value};default=}{lang:digit4;value={value};default=}{lang:digit3;value={value};default=}{lang:digit2;value={value};default=}{lang:digit12;value={value};default=}';
256 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit10' ][
'/[0-9]{10}$/' ] =
'Откуда такие деньги? ';
258 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit9' ][
'/9[0-9]{8}$/' ] =
'девятьсот ';
260 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit9' ][
'/8[0-9]{8}$/' ] =
'восемьсот ';
262 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit9' ][
'/7[0-9]{8}$/' ] =
'семьсот ';
264 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit9' ][
'/6[0-9]{8}$/' ] =
'шестьсот ';
266 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit9' ][
'/5[0-9]{8}$/' ] =
'пятьсот ';
268 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit9' ][
'/4[0-9]{8}$/' ] =
'четыреста ';
270 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit9' ][
'/3[0-9]{8}$/' ] =
'триста ';
272 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit9' ][
'/2[0-9]{8}$/' ] =
'двести ';
274 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit9' ][
'/1[0-9]{8}$/' ] =
'сто ';
276 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit8' ][
'/9[0-9]{7}$/' ] =
'девяносто ';
278 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit8' ][
'/8[0-9]{7}$/' ] =
'восемьдесят ';
280 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit8' ][
'/7[0-9]{7}$/' ] =
'семьдесят ';
282 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit8' ][
'/6[0-9]{7}$/' ] =
'шестьдесят ';
284 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit8' ][
'/5[0-9]{7}$/' ] =
'пятьдесят ';
286 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit8' ][
'/4[0-9]{7}$/' ] =
'сорок ';
288 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit8' ][
'/3[0-9]{7}$/' ] =
'тридцать ';
290 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit8' ][
'/2[0-9]{7}$/' ] =
'двадцать ';
292 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/10[0-9]{6}$/' ] =
'десять ';
294 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/11[0-9]{6}$/' ] =
'одинадцать ';
296 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/12[0-9]{6}$/' ] =
'двенадцать ';
298 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/13[0-9]{6}$/' ] =
'тринадцать ';
300 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/14[0-9]{6}$/' ] =
'четырнадцать ';
302 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/15[0-9]{6}$/' ] =
'пятнадцать ';
304 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/16[0-9]{6}$/' ] =
'шестнадцать ';
306 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/17[0-9]{6}$/' ] =
'семнадцать ';
308 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/18[0-9]{6}$/' ] =
'восемнадцать ';
310 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/19[0-9]{6}$/' ] =
'девятнадцать ';
312 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/0[0-9]{6}$/' ] =
'';
314 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/1[0-9]{6}$/' ] =
'один ';
316 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/2[0-9]{6}$/' ] =
'два ';
318 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/3[0-9]{6}$/' ] =
'три ';
320 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/4[0-9]{6}$/' ] =
'четыре ';
322 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/5[0-9]{6}$/' ] =
'пять ';
324 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/6[0-9]{6}$/' ] =
'шесть ';
326 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/7[0-9]{6}$/' ] =
'семь ';
328 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/8[0-9]{6}$/' ] =
'восемь ';
330 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit78' ][
'/9[0-9]{6}$/' ] =
'девять ';
332 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit7' ][
'/[2-9]0[0-9]{6}$/' ] =
'миллионов ';
334 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit7' ][
'/1[0-9][0-9]{6}$/' ] =
'миллионов ';
336 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit7' ][
'/[5-9][0-9]{6}$/' ] =
'миллионов ';
338 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit7' ][
'/[2-4][0-9]{6}$/' ] =
'миллиона ';
340 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit7' ][
'/1[0-9]{6}$/' ] =
'миллион ';
342 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit6' ][
'/9[0-9]{5}$/' ] =
'девятьсот ';
344 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit6' ][
'/8[0-9]{5}$/' ] =
'восемьсот ';
346 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit6' ][
'/7[0-9]{5}$/' ] =
'семьсот ';
348 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit6' ][
'/6[0-9]{5}$/' ] =
'шестьсот ';
350 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit6' ][
'/5[0-9]{5}$/' ] =
'пятьсот ';
352 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit6' ][
'/4[0-9]{5}$/' ] =
'четыреста ';
354 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit6' ][
'/3[0-9]{5}$/' ] =
'триста ';
356 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit6' ][
'/2[0-9]{5}$/' ] =
'двести ';
358 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit6' ][
'/1[0-9]{5}$/' ] =
'сто ';
360 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit5' ][
'/9[0-9]{4}$/' ] =
'девяносто ';
362 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit5' ][
'/8[0-9]{4}$/' ] =
'восемьдесят ';
364 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit5' ][
'/7[0-9]{4}$/' ] =
'семьдесят ';
366 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit5' ][
'/6[0-9]{4}$/' ] =
'шестьдесят ';
368 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit5' ][
'/5[0-9]{4}$/' ] =
'пятьдесят ';
370 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit5' ][
'/4[0-9]{4}$/' ] =
'сорок ';
372 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit5' ][
'/3[0-9]{4}$/' ] =
'тридцать ';
374 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit5' ][
'/2[0-9]{4}$/' ] =
'двадцать ';
376 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/19[0-9]{3}$/' ] =
'девятнадцать ';
378 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/18[0-9]{3}$/' ] =
'восемнадцать ';
380 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/17[0-9]{3}$/' ] =
'семнадцать ';
382 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/16[0-9]{3}$/' ] =
'шестнадцать ';
384 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/15[0-9]{3}$/' ] =
'пятнадцать ';
386 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/14[0-9]{3}$/' ] =
'четырнадцать ';
388 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/13[0-9]{3}$/' ] =
'тридцать ';
390 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/12[0-9]{3}$/' ] =
'двенадцать ';
392 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/11[0-9]{3}$/' ] =
'одинадцать ';
394 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/10[0-9]{3}$/' ] =
'десять ';
396 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/9[0-9]{3}$/' ] =
'девять ';
398 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/8[0-9]{3}$/' ] =
'восемь ';
400 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/7[0-9]{3}$/' ] =
'семь ';
402 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/6[0-9]{3}$/' ] =
'шесть ';
404 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/5[0-9]{3}$/' ] =
'пять ';
406 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/4[0-9]{3}$/' ] =
'четыре ';
408 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/3[0-9]{3}$/' ] =
'три ';
410 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/2[0-9]{3}$/' ] =
'две ';
412 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit45' ][
'/1[0-9]{3}$/' ] =
'одна ';
414 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit4' ][
'/[2-9]0[0-9]{3}$/' ] =
'тысяч ';
416 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit4' ][
'/1[0-9][0-9]{3}$/' ] =
'тысяч ';
418 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit4' ][
'/[5-9][0-9]{3}$/' ] =
'тысяч ';
420 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit4' ][
'/[2-4][0-9]{3}$/' ] =
'тысячи ';
422 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit4' ][
'/1[0-9]{3}$/' ] =
'тысяча ';
424 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit3' ][
'/9[0-9]{2}$/' ] =
'девятьсот ';
426 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit3' ][
'/8[0-9]{2}$/' ] =
'восемьсот ';
428 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit3' ][
'/7[0-9]{2}$/' ] =
'семьсот ';
430 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit3' ][
'/6[0-9]{2}$/' ] =
'шестьсот ';
432 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit3' ][
'/5[0-9]{2}$/' ] =
'пятьсот ';
434 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit3' ][
'/4[0-9]{2}$/' ] =
'четыреста ';
436 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit3' ][
'/3[0-9]{2}$/' ] =
'триста ';
438 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit3' ][
'/2[0-9]{2}$/' ] =
'двести ';
440 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit3' ][
'/1[0-9]{2}$/' ] =
'сто ';
442 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit2' ][
'/9[0-9]$/' ] =
'девяносто ';
444 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit2' ][
'/8[0-9]$/' ] =
'восемьдесят ';
446 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit2' ][
'/7[0-9]$/' ] =
'семьдесят ';
448 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit2' ][
'/6[0-9]$/' ] =
'шестьдесят ';
450 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit2' ][
'/5[0-9]$/' ] =
'пятьдесят ';
452 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit2' ][
'/4[0-9]$/' ] =
'сорок ';
454 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit2' ][
'/3[0-9]$/' ] =
'тридцать ';
456 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit2' ][
'/2[0-9]$/' ] =
'двадцать ';
458 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/10$/' ] =
'десять ';
460 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/11$/' ] =
'одинадцать ';
462 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/12$/' ] =
'двенадцать ';
464 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/13$/' ] =
'тринадцать ';
466 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/14$/' ] =
'четырнадцать ';
468 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/15$/' ] =
'пятнадцать ';
470 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/16$/' ] =
'шестнадцать ';
472 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/17$/' ] =
'семнадцать ';
474 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/18$/' ] =
'восемнадцать ';
476 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/19$/' ] =
'девятнадцать ';
478 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/^0$/' ] =
'ноль ';
480 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/^f[0-9]{0,9}1$/' ] =
'одна ';
482 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/1$/' ] =
'один ';
484 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/^f[0-9]{0,9}1$/' ] =
'две ';
486 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/2$/' ] =
'два ';
488 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/3$/' ] =
'три ';
490 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/4$/' ] =
'четыре ';
492 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/5$/' ] =
'пять ';
494 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/6$/' ] =
'шесть ';
496 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/7$/' ] =
'семь ';
498 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/8$/' ] =
'восемь ';
500 ultimix.lang.Strings[
ultimix.lang.Locale ][
'digit12' ][
'/9$/' ] =
'девять ';
501 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'are_you_shure' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'are_you_shure' ] = {};
502 ultimix.lang.Strings[
ultimix.lang.Locale ][
'are_you_shure' ][
'default' ] =
'Вы уверены, что хотите выполнить это действие?';
503 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'user_does_not_exist' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'user_does_not_exist' ] = {};
504 ultimix.lang.Strings[
ultimix.lang.Locale ][
'user_does_not_exist' ][
'default' ] =
'Пользователь с указанным логином не существует';
505 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'all_rights_reserved' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'all_rights_reserved' ] = {};
506 ultimix.lang.Strings[
ultimix.lang.Locale ][
'all_rights_reserved' ][
'default' ] =
'Все права защищены';
508 ultimix.lang.Strings[
ultimix.lang.Locale ][
'slide_panel' ][
'default' ] =
'Выдвинуть панель';
510 ultimix.lang.Strings[
ultimix.lang.Locale ][
'close_panel' ][
'default' ] =
'Закрыть панель';
512 ultimix.lang.Strings[
ultimix.lang.Locale ][
'open_panel' ][
'default' ] =
'Открыть панель';
513 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'resize_panel' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'resize_panel' ] = {};
514 ultimix.lang.Strings[
ultimix.lang.Locale ][
'resize_panel' ][
'default' ] =
'Иземнить ширину панели';
515 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'create_button' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'create_button' ] = {};
516 ultimix.lang.Strings[
ultimix.lang.Locale ][
'create_button' ][
'default' ] =
'Создать';
517 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'delete_button' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'delete_button' ] = {};
518 ultimix.lang.Strings[
ultimix.lang.Locale ][
'delete_button' ][
'default' ] =
'Удалить';
519 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'update_button' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'update_button' ] = {};
520 ultimix.lang.Strings[
ultimix.lang.Locale ][
'update_button' ][
'default' ] =
'Редактировать';
522 ultimix.lang.Strings[
ultimix.lang.Locale ][
'copy_button' ][
'default' ] =
'Копировать';
523 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'search_button' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'search_button' ] = {};
524 ultimix.lang.Strings[
ultimix.lang.Locale ][
'search_button' ][
'default' ] =
'Искать';
526 ultimix.lang.Strings[
ultimix.lang.Locale ][
'contact_us' ][
'default' ] =
'Свяжитесь с нами';
528 ultimix.lang.Strings[
ultimix.lang.Locale ][
'from' ][
'default' ] =
'с';
530 ultimix.lang.Strings[
ultimix.lang.Locale ][
'to' ][
'default' ] =
'по';
532 ultimix.lang.Strings[
ultimix.lang.Locale ][
'week' ][
'default' ] =
'неделя';
534 ultimix.lang.Strings[
ultimix.lang.Locale ][
'2weeks' ][
'default' ] =
'2 недели';
536 ultimix.lang.Strings[
ultimix.lang.Locale ][
'month' ][
'default' ] =
'месяц';
538 ultimix.lang.Strings[
ultimix.lang.Locale ][
'3months' ][
'default' ] =
'3 месяца';
540 ultimix.lang.Strings[
ultimix.lang.Locale ][
'half_year' ][
'default' ] =
'полгода';
542 ultimix.lang.Strings[
ultimix.lang.Locale ][
'year' ][
'default' ] =
'год';
545 (
function(
a,
b){
function cy(
a){
return f.isWindow(
a)?
a:
a.nodeType===9?
a.defaultView||
a.parentWindow:!1}
function cv(
a){
if(!ck[
a]){var
b=c.body,d=f(
"<"+a+
">").appendTo(b),e=d.css(
"display");d.remove();
if(e===
"none"||e===
""){cl||(cl=c.createElement(
"iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);
if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode===
"CSS1Compat"?
"<!doctype html>":
"")+
"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,
"display"),b.removeChild(cl)}ck[
a]=e}
return ck[
a]}
function cu(
a,
b){var c={};f.each(cq.concat.apply([],cq.slice(0,
b)),
function(){c[
this]=
a});
return c}
function ct(){cr=
b}
function cs(){setTimeout(ct,0);
return cr=f.now()}
function cj(){
try{
return new a.ActiveXObject(
"Microsoft.XMLHTTP")}
catch(
b){}}
function ci(){
try{
return new a.XMLHttpRequest}
catch(
b){}}
function cc(
a,c){
a.dataFilter&&(c=
a.dataFilter(c,
a.dataType));var d=
a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;
for(g=1;g<i;g++){
if(g===1)
for(h in
a.converters)typeof h==
"string"&&(e[h.toLowerCase()]=
a.converters[h]);l=k,k=d[g];
if(k===
"*")k=l;
else if(l!==
"*"&&l!==k){m=l+
" "+k,n=e[m]||e[
"* "+k];
if(!n){p=
b;
for(o in e){j=o.split(
" ");
if(j[0]===l||j[0]===
"*"){p=e[j[1]+
" "+k];
if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);
break}}}}!n&&!p&&f.error(
"No conversion from "+m.replace(
" ",
" to ")),n!==!0&&(c=n?n(c):p(o(c)))}}
return c}
function cb(
a,c,d){var e=
a.contents,f=
a.dataTypes,g=
a.responseFields,h,i,j,k;
for(i in g)i in d&&(c[g[i]]=d[i]);
while(f[0]===
"*")f.shift(),h===
b&&(h=
a.mimeType||c.getResponseHeader(
"content-type"));
if(h)
for(i in e)
if(e[i]&&e[i].test(h)){f.unshift(i);
break}
if(f[0]in d)j=f[0];
else{
for(i in d){
if(!f[0]||
a.converters[i+
" "+f[0]]){j=i;
break}k||(k=i)}j=j||k}
if(j){j!==f[0]&&f.unshift(j);
return d[j]}}
function ca(
a,
b,c,d){
if(f.isArray(
b))f.each(
b,
function(
b,e){c||bE.test(
a)?d(
a,e):ca(
a+
"["+(typeof e==
"object"||f.isArray(e)?
b:
"")+
"]",e,c,d)});
else if(!c&&
b!=null&&typeof
b==
"object")
for(var e in
b)ca(
a+
"["+e+
"]",b[e],c,d);
else d(
a,b)}
function b_(
a,c){var d,e,g=f.ajaxSettings.flatOptions||{};
for(d in c)c[d]!==
b&&((g[d]?
a:e||(e={}))[d]=c[d]);e&&f.extend(!0,
a,e)}
function b$(
a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;
for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l==
"string"&&(!k||g[l]?l=
b:(c.dataTypes.unshift(l),l=
b$(
a,c,d,e,l,g)));(k||!l)&&!g[
"*"]&&(l=
b$(a,c,d,e,
"*",g));
return l}
function bZ(a){
return function(
b,c){typeof
b!=
"string"&&(c=
b,
b=
"*");
if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;
for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||
"*"),i=a[h]=a[h]||[],i[j?
"unshift":
"push"](c)}}}
function bC(a,
b,c){var d=
b===
"width"?a.offsetWidth:a.offsetHeight,e=
b===
"width"?bx:by,g=0,h=e.length;
if(d>0){
if(c!==
"border")
for(;g<h;g++)c||(d-=parseFloat(f.css(a,
"padding"+e[g]))||0),c===
"margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,
"border"+e[g]+
"Width"))||0;
return d+
"px"}d=bz(a,
b,
b);
if(d<0||d==null)d=a.style[
b]||0;d=parseFloat(d)||0;
if(c)
for(;g<h;g++)d+=parseFloat(f.css(a,
"padding"+e[g]))||0,c!==
"padding"&&(d+=parseFloat(f.css(a,
"border"+e[g]+
"Width"))||0),c===
"margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);
return d+
"px"}
function bp(a,
b){
b.src?f.ajax({url:
b.src,async:!1,dataType:
"script"}):f.globalEval((
b.text||
b.textContent||
b.innerHTML||
"").replace(bf,
"/*$0*/")),
b.parentNode&&
b.parentNode.removeChild(
b)}
function bo(a){var
b=c.createElement(
"div");bh.appendChild(b),b.innerHTML=a.outerHTML;
return b.firstChild}
function bn(a){var
b=(a.nodeName||
"").toLowerCase();b===
"input"?bm(a):b!==
"script"&&typeof a.getElementsByTagName!=
"undefined"&&f.grep(a.getElementsByTagName(
"input"),bm)}
function bm(a){
if(a.type===
"checkbox"||a.type===
"radio")a.defaultChecked=a.checked}
function bl(a){
return typeof a.getElementsByTagName!=
"undefined"?a.getElementsByTagName(
"*"):typeof a.querySelectorAll!=
"undefined"?a.querySelectorAll(
"*"):[]}
function bk(a,b){var c;
if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();
if(c===
"object")b.outerHTML=a.outerHTML;
else if(c!==
"input"||a.type!==
"checkbox"&&a.type!==
"radio"){
if(c===
"option")b.selected=a.defaultSelected;
else if(c===
"input"||c===
"textarea")b.defaultValue=a.defaultValue}
else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}
function bj(a,b){
if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;
if(i){
delete h.handle,h.events={};
for(c in i)
for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?
".":
"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}
function bi(a,b){
return f.nodeName(a,
"table")?a.getElementsByTagName(
"tbody")[0]||a.appendChild(a.ownerDocument.createElement(
"tbody")):a}
function U(a){var b=V.split(
"|"),c=a.createDocumentFragment();
if(c.createElement)
while(b.length)c.createElement(b.pop());
return c}
function T(a,b,c){b=b||0;
if(f.isFunction(b))
return f.grep(a,
function(a,d){var e=!!b.call(a,d,a);
return e===c});
if(b.nodeType)
return f.grep(a,
function(a,d){
return a===b===c});
if(typeof b==
"string"){var d=f.grep(a,
function(a){
return a.nodeType===1});
if(O.test(b))
return f.filter(b,d,!c);b=f.filter(b,d)}
return f.grep(a,
function(a,d){
return f.inArray(a,b)>=0===c})}
function S(a){
return!a||!a.parentNode||a.parentNode.nodeType===11}
function K(){
return!0}
function J(){
return!1}
function n(a,b,c){var d=b+
"defer",e=b+
"queue",g=b+
"mark",h=f._data(a,d);h&&(c===
"queue"||!f._data(a,e))&&(c===
"mark"||!f._data(a,g))&&setTimeout(
function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}
function m(a){
for(var b in a){
if(b===
"data"&&f.isEmptyObject(a[b]))
continue;
if(b!==
"toJSON")
return!1}
return!0}
function l(a,c,d){
if(d===b&&a.nodeType===1){var e=
"data-"+c.replace(k,
"-$1").toLowerCase();d=a.getAttribute(e);
if(typeof d==
"string"){
try{d=d===
"true"?!0:d===
"false"?!1:d===
"null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}
catch(g){}f.data(a,c,d)}
else d=b}
return d}
function h(a){var b=g[
a]={},c,d;a=a.split(/\s+/);
for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;
return b}var c=a.document,d=a.navigator,e=a.location,f=
function(){
function J(){
if(!e.isReady){
try{c.documentElement.doScroll(
"left")}
catch(a){setTimeout(J,1);
return}e.ready()}}var e=
function(
a,
b){
return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:[
"\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^
"\\\n\r]*"|
true|
false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*
version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=
function(a,b){
return(b+
"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:
function(
a,d,f){var g,h,j,k;
if(!a)
return this;
if(a.nodeType){this.context=
this[0]=
a,this.length=1;
return this}
if(a===
"body"&&!d&&c.body){this.context=c,
this[0]=c.body,this.selector=
a,this.length=1;
return this}
if(typeof a==
"string"){a.charAt(0)!==
"<"||a.charAt(a.length-1)!==
">"||a.length<3?g=i.exec(a):g=[null,
a,null];
if(g&&(g[1]||!d)){
if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);
return e.merge(
this,a)}h=c.getElementById(g[2]);
if(h&&h.parentNode){
if(h.id!==g[2])
return f.find(a);this.length=1,
this[0]=h}this.context=c,this.selector=
a;
return this}
return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}
if(e.isFunction(a))
return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);
return e.makeArray(a,
this)},selector:
"",jquery:
"1.7.1",length:0,size:
function(){
return this.length},toArray:
function(){
return F.call(
this,0)},
get:
function(
a){
return a==null?this.toArray():a<0?
this[this.length+
a]:
this[
a]},pushStack:
function(
a,
b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=
this,d.context=this.context,b===
"find"?d.selector=this.selector+(this.selector?
" ":
"")+c:b&&(d.selector=
this.selector+
"."+b+
"("+c+
")");
return d},each:
function(
a,
b){
return e.each(
this,a,b)},ready:
function(
a){e.bindReady(),A.add(a);
return this},eq:
function(
a){a=+
a;
return a===-1?this.slice(a):this.slice(a,a+1)},first:
function(){
return this.eq(0)},last:
function(){
return this.eq(-1)},slice:
function(){
return this.pushStack(F.apply(
this,arguments),
"slice",F.call(arguments).join(
","))},map:
function(a){
return this.pushStack(e.map(
this,
function(b,c){
return a.call(b,c,b)}))},end:
function(){
return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=
function(){var
a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==
"boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=
"object"&&!e.isFunction(i)&&(i={}),k===j&&(i=
this,--j);
for(;j<k;j++)
if((a=arguments[j])!=null)
for(c in a){d=i[c],f=a[c];
if(i===f)
continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}
return i},e.extend({noConflict:
function(
b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);
return e},isReady:!1,readyWait:1,holdReady:
function(
a){a?e.readyWait++:e.ready(!0)},ready:
function(
a){
if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){
if(!c.body)
return setTimeout(e.ready,1);e.isReady=!0;
if(a!==!0&&--e.readyWait>0)
return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger(
"ready").off(
"ready")}},bindReady:
function(){
if(!A){A=e.Callbacks(
"once memory");
if(c.readyState===
"complete")
return setTimeout(e.ready,1);
if(c.addEventListener)c.addEventListener(
"DOMContentLoaded",B,!1),a.addEventListener(
"load",e.ready,!1);
else if(c.attachEvent){c.attachEvent(
"onreadystatechange",B),a.attachEvent(
"onload",e.ready);var b=!1;
try{b=a.frameElement==null}
catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:
function(
a){
return e.type(a)===
"function"},isArray:Array.isArray||
function(
a){
return e.type(a)===
"array"},isWindow:
function(
a){
return a&&typeof a==
"object"&&
"setInterval"in a},isNumeric:
function(
a){
return!isNaN(parseFloat(a))&&isFinite(a)},type:
function(
a){
return a==null?String(a):I[C.call(a)]||
"object"},isPlainObject:
function(
a){
if(!a||e.type(a)!==
"object"||a.nodeType||e.isWindow(a))
return!1;
try{
if(a.constructor&&!D.call(a,
"constructor")&&!D.call(a.constructor.prototype,
"isPrototypeOf"))
return!1}
catch(c){
return!1}var d;
for(d in a);
return d===b||D.call(a,d)},isEmptyObject:
function(
a){
for(var b in a)
return!1;
return!0},error:
function(
a){
throw new Error(a)},parseJSON:
function(
b){
if(typeof b!=
"string"||!b)
return null;b=e.trim(b);
if(a.JSON&&a.JSON.parse)
return a.JSON.parse(b);
if(n.test(b.replace(o,
"@").replace(p,
"]").replace(q,
"")))
return(
new Function(
"return "+b))();e.error(
"Invalid JSON: "+b)},parseXML:
function(c){var d,f;
try{a.DOMParser?(f=
new DOMParser,d=f.parseFromString(c,
"text/xml")):(d=
new ActiveXObject(
"Microsoft.XMLDOM"),d.async=
"false",d.loadXML(c))}
catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName(
"parsererror").length)&&e.error(
"Invalid XML: "+c);
return d},noop:
function(){},globalEval:
function(
b){b&&j.test(b)&&(a.execScript||
function(
b){a.eval.call(a,b)})(b)},camelCase:
function(
a){
return a.replace(w,
"ms-").replace(v,x)},nodeName:
function(
a,
b){
return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:
function(
a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);
if(d){
if(i){
for(f in a)
if(c.apply(a[f],d)===!1)
break}
else for(;g<h;)
if(c.apply(a[g++],d)===!1)
break}
else if(i){
for(f in a)
if(c.call(a[f],f,a[f])===!1)
break}
else for(;g<h;)
if(c.call(a[g],g,a[g++])===!1)
break;
return a},trim:G?
function(
a){
return a==null?
"":G.call(a)}:
function(
a){
return a==null?
"":(a+
"").replace(k,
"").replace(l,
"")},makeArray:
function(
a,
b){var c=b||[];
if(a!=null){var d=e.type(a);a.length==null||d===
"string"||d===
"function"||d===
"regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}
return c},inArray:
function(
a,
b,c){var d;
if(b){
if(H)
return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;
for(;c<d;c++)
if(c in b&&b[c]===a)
return c}
return-1},merge:
function(
a,c){var d=a.length,e=0;
if(typeof c.length==
"number")
for(var f=c.length;e<f;e++)a[d++]=c[e];
else while(c[e]!==b)a[d++]=c[e++];a.length=d;
return a},grep:
function(
a,
b,c){var d=[],e;c=!!c;
for(var f=0,g=a.length;f<g;f++)e=!!
b(a[f],f),c!==e&&d.push(a[f]);
return d},map:
function(
a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j==
"number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));
if(k)
for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);
else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);
return h.concat.apply([],h)},guid:1,proxy:
function(
a,c){
if(typeof c==
"string"){var d=a[c];c=
a,a=d}
if(!e.isFunction(a))
return b;var f=F.call(arguments,2),g=
function(){
return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;
return g},access:
function(
a,c,d,f,g,h){var i=a.length;
if(typeof c==
"object"){
for(var j in c)e.access(a,j,c[j],f,g,d);
return a}
if(d!==b){f=!h&&f&&e.isFunction(d);
for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);
return a}
return i?g(a[0],c):b},now:
function(){
return(
new Date).getTime()},uaMatch:
function(
a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf(
"compatible")<0&&u.exec(a)||[];
return{browser:b[1]||
"",
version:b[2]||
"0"}},sub:
function(){
function a(b,c){
return new a.fn.init(b,c)}e.extend(!0,a,
this),a.superclass=
this,a.fn=a.prototype=
this(),a.fn.constructor=a,a.sub=
this.sub,a.fn.init=
function(d,f){f&&f instanceof e&&!(f instanceof
a)&&(f=
a(f));
return e.fn.init.call(
this,d,f,b)},a.fn.init.prototype=a.fn;var b=
a(c);
return a},browser:{}}),e.each(
"Boolean Number String Function Array Date RegExp Object".split(
" "),
function(
a,
b){I[
"[object "+b+
"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(
" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=
function(){c.removeEventListener(
"DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=
function(){c.readyState===
"complete"&&(c.detachEvent(
"onreadystatechange",B),e.ready())});
return e}(),g={};f.Callbacks=
function(
a){a=a?g[
a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=
function(
b){var d,e,g,h,i;
for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h===
"array"?m(g):h===
"function"&&(!a.unique||!o.has(g))&&c.push(g)},n=
function(
b,f){f=f||[],e=!a.memory||[
b,f],i=!0,l=j||0,j=0,k=c.length;
for(;c&&l<k;l++)
if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;
break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:
function(){
if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=
a,n(e[0],e[1]))}
return this},
remove:
function(){
if(c){var b=arguments,d=0,e=b.length;
for(;d<e;d++)
for(var f=0;f<c.length;f++)
if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);
if(a.unique)
break}}
return this},has:
function(
a){
if(c){var b=0,d=c.length;
for(;b<d;b++)
if(a===c[b])
return!0}
return!1},empty:
function(){c=[];
return this},disable:
function(){c=d=e=
b;
return this},disabled:
function(){
return!c},lock:
function(){d=
b,(!e||e===!0)&&o.disable();
return this},locked:
function(){
return!d},fireWith:
function(
b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));
return this},fire:
function(){o.fireWith(
this,arguments);
return this},fired:
function(){
return!!e}};
return o};var i=[].slice;f.extend({Deferred:
function(
a){var b=f.Callbacks(
"once memory"),c=f.Callbacks(
"once memory"),d=f.Callbacks(
"memory"),e=
"pending",g={resolve:
b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:
function(){
return e},isResolved:b.fired,isRejected:c.fired,then:
function(
a,
b,c){i.done(a).fail(b).progress(c);
return this},always:
function(){i.done.apply(i,arguments).fail.apply(i,arguments);
return this},pipe:
function(
a,
b,c){
return f.Deferred(
function(d){f.each({done:[
a,
"resolve"],fail:[
b,
"reject"],progress:[c,
"notify"]},
function(
a,
b){var c=b[0],e=b[1],g;f.isFunction(c)?i[
a](
function(){g=c.apply(
this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+
"With"](
this===i?d:
this,[g])}):i[
a](d[e])})}).promise()},promise:
function(
a){
if(a==null)a=h;
else for(var b in h)a[
b]=h[
b];
return a}},i=h.promise({}),j;
for(j in g)i[j]=g[j].fire,i[j+
"With"]=g[j].fireWith;i.done(
function(){e=
"resolved"},c.disable,d.lock).fail(
function(){e=
"rejected"},b.disable,d.lock),a&&a.call(i,i);
return i},when:
function(
a){
function m(a){
return function(
b){e[
a]=arguments.length>1?i.call(arguments,0):
b,j.notifyWith(k,e)}}
function l(a){
return function(c){b[
a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();
if(d>1){
for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}
else j!==a&&j.resolveWith(j,d?[a]:[]);
return k}}),f.support=
function(){var
b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement(
"div"),r=c.documentElement;q.setAttribute(
"className",
"t"),q.innerHTML=
" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName(
"*"),e=q.getElementsByTagName(
"a")[0];
if(!d||!d.length||!e)
return{};g=c.createElement(
"select"),h=g.appendChild(c.createElement(
"option")),i=q.getElementsByTagName(
"input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName(
"tbody").length,htmlSerialize:!!q.getElementsByTagName(
"link").length,style:/top/.test(e.getAttribute(
"style")),hrefNormalized:e.getAttribute(
"href")===
"/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value===
"on",optSelected:h.selected,getSetAttribute:q.className!==
"t",enctype:!!c.createElement(
"form").enctype,html5Clone:c.createElement(
"nav").cloneNode(!0).outerHTML!==
"<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;
try{
delete q.test}
catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent(
"onclick",
function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent(
"onclick")),i=c.createElement(
"input"),i.value=
"t",i.setAttribute(
"type",
"radio"),b.radioValue=i.value===
"t",i.setAttribute(
"checked",
"checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML=
"",a.getComputedStyle&&(j=c.createElement(
"div"),j.style.width=
"0",j.style.marginRight=
"0",q.style.width=
"2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);
if(q.attachEvent)
for(o in{submit:1,change:1,focusin:1})n=
"on"+o,p=n in q,p||(q.setAttribute(n,
"return;"),p=typeof q[n]==
"function"),b[o+
"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(
function(){var
a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName(
"body")[0];!r||(j=1,k=
"position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m=
"visibility:hidden;border:0;",n=
"style='"+k+
"border:5px solid #000;padding:0;'",o=
"<div "+n+
"><div></div></div>"+
"<table "+n+
" cellpadding='0' cellspacing='0'>"+
"<tr><td></td></tr></table>",a=c.createElement(
"div"),a.style.cssText=m+
"width:0;height:0;position:static;top:0;margin-top:"+j+
"px",r.insertBefore(a,r.firstChild),q=c.createElement(
"div"),a.appendChild(q),q.innerHTML=
"<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName(
"td"),p=l[0].offsetHeight===0,l[0].style.display=
"",l[1].style.display=
"none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML=
"",q.style.width=q.style.paddingLeft=
"1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!=
"undefined"&&(q.style.display=
"inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display=
"",q.innerHTML=
"<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position=
"fixed",e.style.top=
"20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top=
"",d.style.overflow=
"hidden",d.style.position=
"relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});
return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:
"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,
""),noData:{embed:!0,
object:
"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:
function(
a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];
return!!a&&!m(a)},data:
function(
a,c,d,e){
if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c==
"string",l=a.nodeType,m=l?f.cache:
a,n=l?a[j]:a[j]&&j,o=c===
"events";
if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===
b)
return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));
if(typeof c==
"object"||typeof c==
"function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);
if(o&&!h[c])
return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;
return i}},removeData:
function(
a,
b,c){
if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:
a,k=i?a[h]:h;
if(!j[k])
return;
if(b){d=c?j[k]:j[k].data;
if(d){f.isArray(b)||(b in d?b=[
b]:(b=f.camelCase(b),b in d?b=[
b]:b=b.split(
" ")));
for(e=0,g=b.length;e<g;e++)
delete d[b[e]];
if(!(c?m:f.isEmptyObject)(d))
return}}
if(!c){
delete j[k].data;
if(!m(j[k]))
return}f.support.deleteExpando||!j.setInterval?
delete j[k]:j[k]=null,i&&(f.support.deleteExpando?
delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:
function(a,b,c){
return f.data(a,b,c,!0)},acceptData:
function(
a){
if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];
if(b)
return b!==!0&&a.getAttribute(
"classid")===b}
return!0}}),f.fn.extend({data:
function(a,c){var d,e,g,h=null;
if(typeof a==
"undefined"){
if(
this.length){h=f.data(
this[0]);
if(
this[0].nodeType===1&&!f._data(
this[0],
"parsedAttrs")){e=
this[0].attributes;
for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf(
"data-")===0&&(g=f.camelCase(g.substring(5)),l(
this[0],g,h[g]));f._data(
this[0],
"parsedAttrs",!0)}}
return h}
if(typeof a==
"object")
return this.each(
function(){f.data(
this,a)});d=a.split(
"."),d[1]=d[1]?
"."+d[1]:
"";
if(c===b){h=this.triggerHandler(
"getData"+d[1]+
"!",[d[0]]),h===b&&this.length&&(h=f.data(
this[0],a),h=l(
this[0],a,h));
return h===b&&d[1]?this.data(d[0]):h}
return this.each(
function(){var b=f(
this),e=[d[0],c];b.triggerHandler(
"setData"+d[1]+
"!",e),f.data(
this,a,c),b.triggerHandler(
"changeData"+d[1]+
"!",e)})},removeData:
function(a){
return this.each(
function(){f.removeData(
this,a)})}}),f.extend({_mark:
function(
a,
b){a&&(b=(b||
"fx")+
"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:
function(a,b,c){a!==!0&&(c=
b,b=
a,a=!1);
if(b){c=c||
"fx";var d=c+
"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,
"mark"))}},queue:
function(a,b,c){var d;
if(a){b=(b||
"fx")+
"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));
return d||[]}},dequeue:
function(
a,
b){b=b||
"fx";var c=f.queue(a,b),d=c.shift(),e={};d===
"inprogress"&&(d=c.shift()),d&&(b===
"fx"&&c.unshift(
"inprogress"),f._data(a,b+
".run",e),d.call(a,
function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+
"queue "+b+
".run",!0),n(a,b,
"queue"))}}),f.fn.extend({queue:
function(
a,c){typeof a!=
"string"&&(c=
a,a=
"fx");
if(c===b)
return f.queue(
this[0],a);
return this.each(
function(){var b=f.queue(
this,a,c);a===
"fx"&&b[0]!==
"inprogress"&&f.dequeue(
this,a)})},dequeue:
function(a){
return this.each(
function(){f.dequeue(
this,a)})},delay:
function(a,b){a=f.fx?f.fx.speeds[
a]||a:
a,b=b||
"fx";
return this.queue(b,
function(b,c){var d=setTimeout(b,a);c.stop=
function(){clearTimeout(d)}})},clearQueue:
function(a){
return this.queue(a||
"fx",[])},promise:
function(
a,c){
function m(){--h||d.resolveWith(e,[e])}typeof a!=
"string"&&(c=
a,a=
b),a=a||
"fx";var d=f.Deferred(),e=
this,g=e.length,h=1,i=a+
"defer",j=a+
"queue",k=a+
"mark",l;
while(g--)
if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks(
"once memory"),!0))h++,l.add(m);m();
return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|
object|select|textarea)$/i,t=/^
a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:
function(a,b){
return f.access(
this,a,b,!0,f.attr)},removeAttr:
function(
a){
return this.each(
function(){f.removeAttr(
this,a)})},prop:
function(a,b){
return f.access(
this,a,b,!0,f.prop)},removeProp:
function(
a){a=f.propFix[
a]||
a;
return this.each(
function(){
try{
this[
a]=
b,
delete this[
a]}
catch(c){}})},addClass:
function(a){var
b,c,d,e,g,h,i;
if(f.isFunction(a))
return this.each(
function(b){f(
this).addClass(a.call(
this,b,
this.className))});
if(a&&typeof a==
"string"){b=a.split(p);
for(c=0,d=this.length;c<d;c++){e=
this[c];
if(e.nodeType===1)
if(!e.className&&b.length===1)e.className=
a;
else{g=
" "+e.className+
" ";
for(h=0,i=b.length;h<i;h++)~g.indexOf(
" "+b[h]+
" ")||(g+=b[h]+
" ");e.className=f.trim(g)}}}
return this},removeClass:
function(
a){var c,d,e,g,h,i,j;
if(f.isFunction(a))
return this.each(
function(b){f(
this).removeClass(a.call(
this,b,
this.className))});
if(a&&typeof a==
"string"||a===b){c=(a||
"").split(p);
for(d=0,e=this.length;d<e;d++){g=
this[d];
if(g.nodeType===1&&g.className)
if(a){h=(
" "+g.className+
" ").replace(o,
" ");
for(i=0,j=c.length;i<j;i++)h=h.replace(
" "+c[i]+
" ",
" ");g.className=f.trim(h)}
else g.className=
""}}
return this},toggleClass:
function(
a,
b){var c=typeof
a,d=typeof b==
"boolean";
if(f.isFunction(a))
return this.each(
function(c){f(
this).toggleClass(a.call(
this,c,
this.className,b),
b)});
return this.each(
function(){
if(c===
"string"){var e,g=0,h=f(
this),i=
b,j=a.split(p);
while(e=j[g++])i=d?i:!h.hasClass(e),h[i?
"addClass":
"removeClass"](e)}
else if(c===
"undefined"||c===
"boolean")this.className&&f._data(
this,
"__className__",this.className),this.className=this.className||a===!1?
"":f._data(
this,
"__className__")||
""})},hasClass:
function(a){var b=
" "+a+
" ",c=0,d=this.length;
for(;c<d;c++)
if(
this[c].nodeType===1&&(
" "+
this[c].className+
" ").replace(o,
" ").indexOf(b)>-1)
return!0;
return!1},val:
function(
a){var c,d,e,g=
this[0];{
if(!!arguments.length){e=f.isFunction(a);
return this.each(
function(d){var g=f(
this),h;
if(this.nodeType===1){e?h=a.call(
this,d,g.val()):h=a,h==null?h=
"":typeof h==
"number"?h+=
"":f.isArray(h)&&(h=f.map(h,
function(a){
return a==null?
"":a+
""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];
if(!c||!(
"set"in c)||c.set(
this,h,
"value")===
b)this.value=h}})}
if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];
if(c&&
"get"in c&&(d=c.get(g,
"value"))!==b)
return d;d=g.value;
return typeof d==
"string"?d.replace(q,
""):d==null?
"":d}}}}),f.extend({valHooks:{option:{
get:
function(a){var b=a.attributes.value;
return!b||b.specified?a.value:a.text}},select:{
get:
function(
a){var
b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type===
"select-one";
if(g<0)
return null;c=j?g:0,d=j?g+1:i.length;
for(;c<d;c++){e=i[c];
if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute(
"disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,
"optgroup"))){b=f(e).val();
if(j)
return b;h.push(b)}}
if(j&&!h.length&&i.length)
return f(i[g]).val();
return h},
set:
function(
a,
b){var c=f.makeArray(b);f(a).find(
"option").each(
function(){this.selected=f.inArray(f(
this).val(),c)>=0}),c.length||(a.selectedIndex=-1);
return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:
function(
a,c,d,e){var g,h,i,j=a.nodeType;
if(!!a&&j!==3&&j!==8&&j!==2){
if(e&&c in f.attrFn)
return f(a)[c](d);
if(typeof a.getAttribute==
"undefined")
return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));
if(d!==b){
if(d===null){f.removeAttr(a,c);
return}
if(h&&
"set"in h&&i&&(g=h.set(a,d,c))!==b)
return g;a.setAttribute(c,
""+d);
return d}
if(h&&
"get"in h&&i&&(g=h.get(a,c))!==null)
return g;g=a.getAttribute(c);
return g===null?b:g}},removeAttr:
function(
a,
b){var c,d,e,g,h=0;
if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;
for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,
""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{
set:
function(
a,
b){
if(r.test(a.nodeName)&&a.parentNode)f.error(
"type property can't be changed");
else if(!f.support.radioValue&&b===
"radio"&&f.nodeName(a,
"input")){var c=a.value;a.setAttribute(
"type",b),c&&(a.value=c);
return b}}},value:{
get:
function(
a,
b){
if(w&&f.nodeName(a,
"button"))
return w.get(a,b);
return b in a?a.value:null},
set:
function(
a,
b,c){
if(w&&f.nodeName(a,
"button"))
return w.set(a,b,c);a.value=b}}},propFix:{tabindex:
"tabIndex",readonly:
"readOnly",
"for":
"htmlFor",
"class":
"className",maxlength:
"maxLength",cellspacing:
"cellSpacing",cellpadding:
"cellPadding",rowspan:
"rowSpan",colspan:
"colSpan",usemap:
"useMap",frameborder:
"frameBorder",contenteditable:
"contentEditable"},prop:
function(
a,c,d){var e,g,h,i=a.nodeType;
if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);
return d!==b?g&&
"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&
"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{
get:
function(
a){var c=a.getAttributeNode(
"tabindex");
return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={
get:
function(a,c){var d,e=f.prop(a,c);
return e===!0||typeof e!=
"boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},
set:
function(
a,
b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));
return c}},v||(y={name:!0,
id:!0},w=f.valHooks.button={
get:
function(
a,c){var d;d=a.getAttributeNode(c);
return d&&(y[c]?d.nodeValue!==
"":d.specified)?d.nodeValue:b},
set:
function(
a,
b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));
return e.nodeValue=b+
""}},f.attrHooks.tabindex.set=w.set,f.each([
"width",
"height"],
function(a,b){f.attrHooks[
b]=f.extend(f.attrHooks[b],{
set:
function(a,c){
if(c===
""){a.setAttribute(b,
"auto");
return c}}})}),f.attrHooks.contenteditable={
get:w.get,
set:
function(
a,
b,c){b===
""&&(b=
"false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each([
"href",
"src",
"width",
"height"],
function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{
get:
function(a){var d=a.getAttribute(c,2);
return d===null?b:d}})}),f.support.style||(f.attrHooks.style={
get:
function(
a){
return a.style.cssText.toLowerCase()||b},
set:
function(
a,
b){
return a.style.cssText=
""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{
get:
function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);
return null}})),f.support.enctype||(f.propFix.enctype=
"encoding"),f.support.checkOn||f.each([
"radio",
"checkbox"],
function(){f.valHooks[
this]={
get:
function(a){
return a.getAttribute(
"value")===null?
"on":a.value}}}),f.each([
"radio",
"checkbox"],
function(){f.valHooks[
this]=f.extend(f.valHooks[
this],{
set:
function(a,b){
if(f.isArray(b))
return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=
function(a){var b=F.exec(a);b&&(b[1]=(b[1]||
"").toLowerCase(),b[3]=b[3]&&
new RegExp(
"(?:^|\\s)"+b[3]+
"(?:\\s|$)"));
return b},H=
function(
a,
b){var c=a.attributes||{};
return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c[
"class"]||{}).value))},I=
function(a){
return f.event.special.hover?a:a.replace(B,
"mouseenter$1 mouseleave$1")};
546 f.event={add:
function(
a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;
if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=
function(a){
return typeof f!=
"undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=
a),c=f.trim(I(c)).split(
" ");
for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||
"").split(
".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),
namespace:n.join(
".")},p),r=j[m];
if(!r){r=j[m]=[],r.delegateCount=0;
if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent(
"on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},
remove:
function(
a,
b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;
if(!!g&&!!(o=g.events)){b=f.trim(I(b||
"")).split(
" ");
for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];
if(!j){
for(j in o)f.event.remove(a,j+b[h],c,d,!0);
continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?
new RegExp(
"(^|\\.)"+l.split(
".").sort().join(
"\\.(?:.*\\.)?")+
"(\\.|$)"):null;
for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d===
"**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),
delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,[
"events",
"handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:
function(c,d,e,g){
if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;
if(E.test(h+f.event.triggered))
return;h.indexOf(
"!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(
".")>=0&&(i=h.split(
"."),h=i.shift(),i.sort());
if((!e||f.event.customEvent[h])&&!f.event.global[h])
return;c=typeof c==
"object"?c[f.expando]?c:
new f.Event(h,c):
new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join(
"."),c.namespace_re=c.namespace?
new RegExp(
"(^|\\.)"+i.join(
"\\.(?:.*\\.)?")+
"(\\.|$)"):null,o=h.indexOf(
":")<0?
"on"+h:
"";
if(!e){j=f.cache;
for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);
return}c.result=
b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};
if(p.trigger&&p.trigger.apply(e,d)===!1)
return;r=[[e,p.bindType||h]];
if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;
for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}
for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,
"events")||{})[c.type]&&f._data(m,
"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!==
"click"||!f.nodeName(e,
"a"))&&f.acceptData(e)&&o&&e[h]&&(h!==
"focus"&&h!==
"blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=
b,n&&(e[o]=n));
return c.result}},dispatch:
function(c){c=f.event.fix(c||a.event);var d=(f._data(
this,
"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=
this;
if(e&&!c.target.disabled&&(!c.button||c.type!==
"click")){m=f(
this),m.context=this.ownerDocument||
this;
for(l=c.target;l!=
this;l=l.parentNode||
this){o={},q=[],m[0]=l;
for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:
this,matches:d.slice(e)});
for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;
for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];
if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}
return c.result},props:
"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(
" "),fixHooks:{},keyHooks:{props:
"char charCode key keyCode".split(
" "),filter:
function(
a,
b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);
return a}},mouseHooks:{props:
"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(
" "),filter:
function(
a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);
return a}},fix:
function(
a){
if(a[f.expando])
return a;var d,e,g=
a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);
for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);
return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:
"focusin"},blur:{delegateType:
"focusout"},beforeunload:{setup:
function(
a,
b,c){f.isWindow(
this)&&(this.onbeforeunload=c)},teardown:
function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:
function(a,b,c,d){var e=f.extend(
new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?
function(
a,
b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:
function(
a,
b,c){a.detachEvent&&a.detachEvent(
"on"+b,c)},f.Event=
function(
a,
b){
if(!(
this instanceof f.Event))
return new f.Event(a,b);a&&a.type?(this.originalEvent=
a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(
this,b),this.timeStamp=a&&a.timeStamp||f.now(),
this[f.expando]=!0},f.Event.prototype={preventDefault:
function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:
function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:
function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:
"mouseover",mouseleave:
"mouseout"},
function(
a,
b){f.event.special[
a]={delegateType:
b,bindType:
b,handle:
function(
a){var c=
this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;
if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(
this,arguments),a.type=
b;
return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:
function(){
if(f.nodeName(
this,
"form"))
return!1;f.event.add(
this,
"click._submit keypress._submit",
function(a){var c=a.target,d=f.nodeName(c,
"input")||f.nodeName(c,
"button")?c.form:
b;d&&!d._submit_attached&&(f.event.add(d,
"submit._submit",
function(a){this.parentNode&&!a.isTrigger&&f.event.simulate(
"submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:
function(){
if(f.nodeName(
this,
"form"))
return!1;f.event.remove(
this,
"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:
function(){
if(z.test(
this.nodeName)){
if(this.type===
"checkbox"||this.type===
"radio")f.event.add(
this,
"propertychange._change",
function(a){a.originalEvent.propertyName===
"checked"&&(this._just_changed=!0)}),f.event.add(
this,
"click._change",
function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate(
"change",
this,a,!0))});
return!1}f.event.add(
this,
"beforeactivate._change",
function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,
"change._change",
function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate(
"change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:
function(a){var b=a.target;
if(
this!==b||a.isSimulated||a.isTrigger||b.type!==
"radio"&&b.type!==
"checkbox")
return a.handleObj.handler.apply(
this,arguments)},teardown:
function(){f.event.remove(
this,
"._change");
return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:
"focusin",blur:
"focusout"},
function(
a,
b){var d=0,e=
function(
a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[
b]={setup:
function(){d++===0&&c.addEventListener(a,e,!0)},teardown:
function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:
function(a,c,d,e,g){var h,i;
if(typeof a==
"object"){typeof c!=
"string"&&(d=c,c=b);
for(i in a)
this.on(i,c,d,a[i],g);
return this}d==null&&e==null?(e=c,d=c=
b):e==null&&(typeof c==
"string"?(e=d,d=b):(e=d,d=c,c=
b));
if(e===!1)e=J;
else if(!e)
return this;g===1&&(h=e,e=
function(
a){f().off(a);
return h.apply(
this,arguments)},e.guid=h.guid||(h.guid=f.guid++));
return this.each(
function(){f.event.add(
this,a,e,d,c)})},one:
function(a,b,c,d){
return this.on.call(
this,a,b,c,d,1)},off:
function(
a,c,d){
if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+
"."+e.namespace:e.type,e.selector,e.handler);
return this}
if(typeof a==
"object"){
for(var g in a)this.off(g,c,a[g]);
return this}
if(c===!1||typeof c==
"function")d=c,c=
b;d===!1&&(d=J);
return this.each(
function(){f.event.remove(
this,a,d,c)})},bind:
function(a,b,c){
return this.on(a,null,b,c)},unbind:
function(
a,
b){
return this.off(a,null,b)},live:
function(
a,
b,c){f(this.context).on(a,this.selector,b,c);
return this},die:
function(
a,
b){f(this.context).off(a,this.selector||
"**",b);
return this},delegate:
function(
a,
b,c,d){
return this.on(b,a,c,d)},undelegate:
function(
a,
b,c){
return arguments.length==1?this.off(a,
"**"):this.off(b,a,c)},trigger:
function(
a,
b){
return this.each(
function(){f.event.trigger(a,b,
this)})},triggerHandler:
function(a,b){
if(
this[0])
return f.event.trigger(a,b,
this[0],!0)},toggle:
function(
a){var b=arguments,c=a.guid||f.guid++,d=0,e=
function(c){var e=(f._data(
this,
"lastToggle"+a.guid)||0)%d;f._data(
this,
"lastToggle"+a.guid,e+1),c.preventDefault();
return b[e].apply(
this,arguments)||!1};e.guid=c;
while(d<b.length)b[d++].guid=c;
return this.click(e)},hover:
function(
a,
b){
return this.mouseenter(a).mouseleave(b||a)}}),f.each(
"blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(
" "),
function(
a,
b){f.fn[
b]=
function(
a,c){c==null&&(c=
a,a=null);
return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[
b]=!0),C.test(b)&&(f.event.fixHooks[
b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[
b]=f.event.mouseHooks)}),
function(){
function x(a,b,c,e,f,g){
for(var h=0,i=e.length;h<i;h++){var j=e[h];
if(j){var k=!1;j=j[
a];
while(j){
if(j[d]===c){k=e[j.sizset];
break}
if(j.nodeType===1){g||(j[d]=c,j.sizset=h);
if(typeof b!=
"string"){
if(j===b){k=!0;
break}}
else if(m.filter(b,[j]).length>0){k=j;
break}}j=j[
a]}e[h]=k}}}
function w(a,b,c,e,f,g){
for(var h=0,i=e.length;h<i;h++){var j=e[h];
if(j){var k=!1;j=j[
a];
while(j){
if(j[d]===c){k=e[j.sizset];
break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);
if(j.nodeName.toLowerCase()===
b){k=j;
break}j=j[
a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|[
'"][^'"]*['"]|[^\[\]
'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:([
'"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className
","for":"htmlFor
"},attrHandle:{href:function(a){return a.getAttribute("href
")},type:function(a){return a.getAttribute("type
")}},relative:{"+
":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">
":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode
",b,f,a,d,c)},"~
":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling
",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined
"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined
"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name
")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined
")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth
"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even
"&&"2n
"||a[2]==="odd
"&&"2n+1
"||!/\D/.test(a[2])&&"0n+
"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~=
"&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not
")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden
"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type
"),c=a.type;return a.nodeName.toLowerCase()==="input
"&&"text
"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input
"&&"radio
"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input
"&&"checkbox
"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input
"&&"file
"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input
"&&"password
"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input
"||b==="button
")&&"submit
"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input
"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input
"||b==="button
")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input
"&&"button
"===a.type||b==="button
"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains
")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not
"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only
":case"first
":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first
")return!0;l=a;case"last
":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth
":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*
"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=
":!f&&m.attr?d!=null:f==="=
"?e===g:f==="*=
"?e.indexOf(g)>=0:f==="~=
"?(" "+e+" ").indexOf(g)>=0:g?f==="!=
"?e!==g:f==="^=
"?e.indexOf(g)===0:f==="$=
"?e.substr(e.length-g.length)===g:f==="|=
"?e===g||e.substr(0,g.length+1)===g+"-
":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\
"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[
object Array]
")Array.prototype.push.apply(d,a);else if(typeof a.length=="number
")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div
"),d="script
"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name=
'"+d+"'/>
",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined
"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined
"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined
"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div
");a.appendChild(c.createComment("")),a.getElementsByTagName("*
").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*
"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href=
'#'></a>
",a.firstChild&&typeof a.firstChild.getAttribute!="undefined
"&&a.firstChild.getAttribute("href
")!=="#
"&&(o.attrHandle.href=function(a){return a.getAttribute("href
",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div
"),d="__sizzle__
";b.innerHTML="<p
class=
'TEST'></p>
";if(!b.querySelectorAll||b.querySelectorAll(".TEST
").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body
"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&
"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[
id=
'"+n+"']
"+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div
"),"div
"),e=!1;try{b.call(c.documentElement,"[test!=
'']:sizzle
")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,
"='$1']");
if(!m.isXML(a))
try{
if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);
if(f||!d||a.document&&a.document.nodeType!==11)
return f}}
catch(g){}
return m(c,null,null,[a]).length>0}}}(),
function(){var a=c.createElement(
"div");a.innerHTML=
"<div class='test e'></div><div class='test'></div>";
if(!!a.getElementsByClassName&&a.getElementsByClassName(
"e").length!==0){a.lastChild.className=
"e";
if(a.getElementsByClassName(
"e").length===1)
return;o.order.splice(1,0,
"CLASS"),o.find.CLASS=
function(
a,
b,c){
if(typeof b.getElementsByClassName!=
"undefined"&&!c)
return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=
function(a,b){
return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=
function(a,b){
return!!(a.compareDocumentPosition(b)&16)}:m.contains=
function(){
return!1},m.isXML=
function(
a){var b=(a?a.ownerDocument||a:0).documentElement;
return b?b.nodeName!==
"HTML":!1};var y=
function(
a,
b,c){var d,e=[],f=
"",g=b.nodeType?[
b]:
b;
while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,
"");a=o.relative[
a]?a+
"*":
a;
for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);
return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[
":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:
function(
a){var b=
this,c,d;
if(typeof a!=
"string")
return f(a).filter(
function(){
for(c=0,d=b.length;c<d;c++)
if(f.contains(b[c],
this))
return!0});var e=this.pushStack(
"",
"find",a),g,h,i;
for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,
this[c],e);
if(c>0)
for(h=g;h<e.length;h++)
for(i=0;i<g;i++)
if(e[i]===e[h]){e.splice(h--,1);
break}}
return e},has:
function(
a){var b=f(a);
return this.filter(
function(){
for(var a=0,c=b.length;a<c;a++)
if(f.contains(
this,b[a]))
return!0})},not:
function(
a){
return this.pushStack(T(
this,a,!1),
"not",a)},filter:
function(
a){
return this.pushStack(T(
this,a,!0),
"filter",a)},is:
function(
a){
return!!a&&(typeof a==
"string"?Q.test(a)?f(a,this.context).index(
this[0])>=0:f.filter(a,
this).length>0:this.filter(a).length>0)},closest:
function(a,b){var c=[],d,e,g=
this[0];
if(f.isArray(a)){var h=1;
while(g&&g.ownerDocument&&g!==b){
for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}
return c}var i=Q.test(a)||typeof a!=
"string"?f(a,b||this.context):0;
for(d=0,e=this.length;d<e;d++){g=
this[d];
while(g){
if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);
break}g=g.parentNode;
if(!g||!g.ownerDocument||g===b||g.nodeType===11)
break}}c=c.length>1?f.unique(c):c;
return this.pushStack(c,
"closest",a)},index:
function(
a){
if(!a)
return this[0]&&
this[0].parentNode?this.prevAll().length:-1;
if(typeof a==
"string")
return f.inArray(
this[0],f(a));
return f.inArray(a.jquery?a[0]:a,
this)},add:
function(
a,
b){var c=typeof a==
"string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.
get(),c);
return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:
function(){
return this.add(this.prevObject)}}),f.each({parent:
function(a){var b=a.parentNode;
return b&&b.nodeType!==11?b:null},parents:
function(
a){
return f.dir(a,
"parentNode")},parentsUntil:
function(
a,
b,c){
return f.dir(a,
"parentNode",c)},next:
function(
a){
return f.nth(a,2,
"nextSibling")},prev:
function(
a){
return f.nth(a,2,
"previousSibling")},nextAll:
function(
a){
return f.dir(a,
"nextSibling")},prevAll:
function(
a){
return f.dir(a,
"previousSibling")},nextUntil:
function(
a,
b,c){
return f.dir(a,
"nextSibling",c)},prevUntil:
function(
a,
b,c){
return f.dir(a,
"previousSibling",c)},siblings:
function(
a){
return f.sibling(a.parentNode.firstChild,a)},children:
function(
a){
return f.sibling(a.firstChild)},contents:
function(
a){
return f.nodeName(a,
"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},
function(
a,
b){f.fn[
a]=
function(c,d){var e=f.map(
this,b,c);L.test(a)||(d=c),d&&typeof d==
"string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());
return this.pushStack(e,a,P.call(arguments).join(
","))}}),f.extend({filter:
function(
a,
b,c){c&&(a=
":not("+a+
")");
return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:
function(
a,c,d){var e=[],g=a[c];
while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];
return e},nth:
function(
a,
b,c,d){b=b||1;var e=0;
for(;
a;a=a[c])
if(a.nodeType===1&&++e===b)
break;
return a},sibling:
function(
a,
b){var c=[];
for(;
a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);
return c}});var V=
"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+=
"(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|
object|embed|option|style)/i,bc=
new RegExp(
"<(?:"+V+
")",
"i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,
"<select multiple='multiple'>",
"</select>"],legend:[1,
"<fieldset>",
"</fieldset>"],thead:[1,
"<table>",
"</table>"],tr:[2,
"<table><tbody>",
"</tbody></table>"],td:[3,
"<table><tbody><tr>",
"</tr></tbody></table>"],col:[2,
"<table><tbody></tbody><colgroup>",
"</colgroup></table>"],area:[1,
"<map>",
"</map>"],_default:[0,
"",
""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,
"div<div>",
"</div>"]),f.fn.extend({text:
function(a){
if(f.isFunction(a))
return this.each(
function(b){var c=f(
this);c.text(a.call(
this,b,c.text()))});
if(typeof a!=
"object"&&a!==b)
return this.empty().append((
this[0]&&
this[0].ownerDocument||c).createTextNode(a));
return f.text(
this)},wrapAll:
function(
a){
if(f.isFunction(a))
return this.each(
function(b){f(
this).wrapAll(a.call(
this,b))});
if(
this[0]){var b=f(a,
this[0].ownerDocument).eq(0).clone(!0);
this[0].parentNode&&b.insertBefore(
this[0]),b.map(
function(){var a=
this;
while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;
return a}).append(
this)}
return this},wrapInner:
function(
a){
if(f.isFunction(a))
return this.each(
function(b){f(
this).wrapInner(a.call(
this,b))});
return this.each(
function(){var b=f(
this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:
function(a){var b=f.isFunction(a);
return this.each(
function(c){f(
this).wrapAll(b?a.call(
this,c):
a)})},unwrap:
function(){
return this.parent().each(
function(){f.nodeName(
this,
"body")||f(
this).replaceWith(this.childNodes)}).end()},append:
function(){
return this.domManip(arguments,!0,
function(a){this.nodeType===1&&this.appendChild(a)})},prepend:
function(){
return this.domManip(arguments,!0,
function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:
function(){
if(
this[0]&&
this[0].parentNode)
return this.domManip(arguments,!1,
function(a){this.parentNode.insertBefore(a,
this)});
if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());
return this.pushStack(a,
"before",arguments)}},after:
function(){
if(
this[0]&&
this[0].parentNode)
return this.domManip(arguments,!1,
function(a){this.parentNode.insertBefore(a,this.nextSibling)});
if(arguments.length){var a=this.pushStack(
this,
"after",arguments);a.push.apply(a,f.clean(arguments));
return a}},
remove:
function(
a,
b){
for(var c=0,d;(d=
this[c])!=null;c++)
if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName(
"*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);
return this},empty:
function()
547 {
for(var a=0,b;(b=
this[
a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName(
"*"));
while(b.firstChild)b.removeChild(b.firstChild)}
return this},clone:
function(
a,
b){a=a==null?!1:
a,b=b==null?a:
b;
return this.map(
function(){
return f.clone(
this,a,b)})},html:
function(a){
if(a===b)
return this[0]&&
this[0].nodeType===1?
this[0].innerHTML.replace(W,
""):null;
if(typeof a==
"string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||[
"",
""])[1].toLowerCase()]){a=a.replace(Y,
"<$1></$2>");
try{
for(var c=0,d=this.length;c<d;c++)
this[c].nodeType===1&&(f.cleanData(
this[c].getElementsByTagName(
"*")),
this[c].innerHTML=a)}
catch(e){this.empty().append(a)}}
else f.isFunction(a)?this.each(
function(b){var c=f(
this);c.html(a.call(
this,b,c.html()))}):this.empty().append(a);
return this},replaceWith:
function(
a){
if(
this[0]&&
this[0].parentNode){
if(f.isFunction(a))
return this.each(
function(b){var c=f(
this),d=c.html();c.replaceWith(a.call(
this,b,d))});typeof a!=
"string"&&(a=f(a).detach());
return this.each(
function(){var b=this.nextSibling,c=this.parentNode;f(
this).remove(),b?f(b).before(a):f(c).append(a)})}
return this.length?this.pushStack(f(f.isFunction(a)?
a():
a),
"replaceWith",a):
this},detach:
function(
a){
return this.
remove(
a,!0)},domManip:
function(a,c,d){var e,g,h,i,j=a[0],k=[];
if(!f.support.checkClone&&arguments.length===3&&typeof j==
"string"&&bd.test(j))
return this.each(
function(){f(
this).domManip(a,c,d,!0)});
if(f.isFunction(j))
return this.each(
function(e){var g=f(
this);a[0]=j.call(
this,e,c?g.html():
b),g.domManip(a,c,d)});
if(
this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,
this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;
if(g){c=c&&f.nodeName(g,
"tr");
for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(
this[l],g):
this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}
return this}}),f.buildFragment=
function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j==
"string"&&j.length<512&&i===c&&j.charAt(0)===
"<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);
return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:
"append",prependTo:
"prepend",insertBefore:
"before",insertAfter:
"after",replaceAll:
"replaceWith"},
function(
a,
b){f.fn[
a]=
function(c){var d=[],e=f(c),g=this.length===1&&
this[0].parentNode;
if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[
b](
this[0]);
return this}
for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):
this).
get();f(e[h])[
b](j),d=d.concat(j)}
return this.pushStack(d,a,e.selector)}}),f.extend({clone:
function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test(
"<"+a.nodeName)?a.cloneNode(!0):bo(a);
if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);
for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}
if(b){bj(a,h);
if(c){d=bl(a),e=bl(h);
for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;
return h},clean:
function(
a,
b,d,e){var g;b=b||c,typeof b.createElement==
"undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;
for(var j=0,k;(k=a[j])!=null;j++){typeof k==
"number"&&(k+=
"");
if(!k)
continue;
if(typeof k==
"string")
if(!_.test(k))k=b.createTextNode(k);
else{k=k.replace(Y,
"<$1></$2>");var l=(Z.exec(k)||[
"",
""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement(
"div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];
while(n--)o=o.lastChild;
if(!f.support.tbody){var p=$.test(k),q=l===
"table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===
"<table>"&&!p?o.childNodes:[];
for(i=q.length-1;i>=0;--i)f.nodeName(q[i],
"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;
if(!f.support.appendChecked)
if(k[0]&&typeof (r=k.length)==
"number")
for(i=0;i<r;i++)bn(k[i]);
else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}
if(d){g=
function(
a){
return!a.type||be.test(a.type)};
for(j=0;h[j];j++)
if(e&&f.nodeName(h[j],
"script")&&(!h[j].type||h[j].type.toLowerCase()===
"text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);
else{
if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName(
"script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}
return h},cleanData:
function(
a){var
b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;
for(var h=0,i;(i=a[h])!=null;h++){
if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])
continue;c=i[f.expando];
if(c){b=d[c];
if(b&&b.events){
for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?
delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),
delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:
"absolute",visibility:
"hidden",display:
"block"},bx=[
"Left",
"Right"],by=[
"Top",
"Bottom"],bz,bA,bB;f.fn.css=
function(
a,c){
if(arguments.length===2&&c===b)
return this;
return f.access(
this,a,c,!0,
function(a,c,d){
return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{
get:
function(a,b){
if(b){var c=bz(a,
"opacity",
"opacity");
return c===
""?
"1":c}
return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{
"float":f.support.cssFloat?
"cssFloat":
"styleFloat"},style:
function(
a,c,d,e){
if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;
if(d===b){
if(k&&
"get"in k&&(g=k.get(a,!1,e))!==b)
return g;
return j[c]}h=typeof d,h===
"string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h=
"number");
if(d==null||h===
"number"&&isNaN(d))
return;h===
"number"&&!f.cssNumber[i]&&(d+=
"px");
if(!k||!(
"set"in k)||(d=k.set(a,d))!==b)
try{j[c]=d}
catch(l){}}},css:
function(
a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c===
"cssFloat"&&(c=
"float");
if(g&&
"get"in g&&(e=g.get(a,!0,d))!==b)
return e;
if(bz)
return bz(a,c)},swap:
function(
a,
b,c){var d={};
for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);
for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each([
"height",
"width"],
function(a,b){f.cssHooks[b]={
get:
function(a,c,d){var e;
if(c){
if(a.offsetWidth!==0)
return bC(a,b,d);f.swap(a,bw,
function(){e=bC(a,b,d)});
return e}},
set:
function(
a,
b){
if(!bt.test(b))
return b;b=parseFloat(b);
if(b>=0)
return b+
"px"}}}),f.support.opacity||(f.cssHooks.opacity={
get:
function(a,b){
return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||
"")?parseFloat(RegExp.$1)/100+
"":b?
"1":
""},
set:
function(
a,
b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?
"alpha(opacity="+b*100+
")":
"",g=d&&d.filter||c.filter||
"";c.zoom=1;
if(b>=1&&f.trim(g.replace(bq,
""))===
""){c.removeAttribute(
"filter");
if(d&&!d.filter)
return}c.filter=bq.test(g)?g.replace(bq,e):g+
" "+e}}),f(
function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={
get:
function(
a,
b){var c;f.swap(a,{display:
"inline-block"},
function(){b?c=bz(a,
"margin-right",
"marginRight"):c=a.style.marginRight});
return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=
function(
a,
b){var c,d,e;b=b.replace(bs,
"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===
""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));
return c}),c.documentElement.currentStyle&&(bB=
function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[
b],g=a.style;f===null&&g&&(e=g[
b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b===
"fontSize"?
"1em":f||0,f=g.pixelLeft+
"px",g.left=c,d&&(a.runtimeStyle.left=d));
return f===
""?
"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=
function(a){var b=a.offsetWidth,c=a.offsetHeight;
return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,
"display"))===
"none"},f.expr.filters.visible=
function(a){
return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:
GET|HEAD)$/,bL=/^\/\
557 (
function(c,j){
function k(a,b){var d=a.nodeName.toLowerCase();
if(
"area"===d){b=a.parentNode;d=b.name;
if(!a.href||!d||b.nodeName.toLowerCase()!==
"map")
return false;a=c(
"img[usemap=#"+d+
"]")[0];
return!!a&&l(a)}
return(/input|select|textarea|button|
object/.test(d)?!a.disabled:
"a"==d?a.href||b:b)&&l(a)}
function l(a){
return!c(a).parents().andSelf().filter(
function(){
return c.curCSS(
this,
"visibility")===
"hidden"||c.expr.filters.hidden(
this)}).length}c.ui=c.ui||{};
if(!c.ui.version){c.extend(c.ui,{
version:
"1.8.16",
558 keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:
function(
a,
b){
return typeof a===
"number"?this.each(
function(){var d=
559 this;setTimeout(
function(){c(d).focus();b&&b.call(d)},
a)}):this._focus.apply(
this,arguments)},scrollParent:
function(){var
a;a=c.browser.msie&&/(
static|relative)/.test(this.css(
"position"))||/absolute/.test(this.css(
"position"))?this.parents().filter(
function(){
return/(relative|absolute|fixed)/.test(c.curCSS(
this,
"position",1))&&/(
auto|scroll)/.test(c.curCSS(
this,
"overflow",1)+c.curCSS(
this,
"overflow-y",1)+c.curCSS(
this,
"overflow-x",1))}).eq(0):this.parents().filter(
function(){
return/(
auto|scroll)/.test(c.curCSS(
this,
560 "overflow",1)+c.curCSS(
this,
"overflow-y",1)+c.curCSS(
this,
"overflow-x",1))}).eq(0);
return/fixed/.test(this.css(
"position"))||!a.length?c(document):a},zIndex:
function(
a){
if(a!==j)
return this.css(
"zIndex",a);
if(this.length){a=c(
this[0]);
for(var b;a.length&&a[0]!==document;){b=a.css(
"position");
if(b===
"absolute"||b===
"relative"||b===
"fixed"){b=parseInt(a.css(
"zIndex"),10);
if(!isNaN(b)&&b!==0)
return b}a=a.parent()}}
return 0},disableSelection:
function(){
return this.bind((c.support.selectstart?
"selectstart":
561 "mousedown")+
".ui-disableSelection",
function(a){a.preventDefault()})},enableSelection:
function(){
return this.unbind(
".ui-disableSelection")}});c.each([
"Width",
"Height"],
function(a,b){
function d(f,g,m,n){c.each(e,
function(){g-=parseFloat(c.curCSS(f,
"padding"+
this,
true))||0;
if(m)g-=parseFloat(c.curCSS(f,
"border"+
this+
"Width",
true))||0;
if(n)g-=parseFloat(c.curCSS(f,
"margin"+
this,
true))||0});
return g}var e=b===
"Width"?[
"Left",
"Right"]:[
"Top",
"Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,
562 outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn[
"inner"+
b]=
function(f){
if(f===j)
return i[
"inner"+
b].call(
this);
return this.each(
function(){c(
this).css(h,d(
this,f)+
"px")})};c.fn[
"outer"+
b]=
function(f,g){
if(typeof f!==
"number")
return i[
"outer"+
b].call(
this,f);
return this.each(
function(){c(
this).css(h,d(
this,f,
true,g)+
"px")})}});c.extend(c.expr[
":"],{data:
function(a,b,d){
return!!c.data(a,d[3])},focusable:
function(
a){
return k(a,!isNaN(c.attr(a,
"tabindex")))},tabbable:
function(
a){var b=c.attr(a,
563 "tabindex"),d=isNaN(b);
return(d||b>=0)&&k(a,!d)}});c(
function(){var a=document.body,b=a.appendChild(b=document.createElement(
"div"));c.extend(b.style,{minHeight:
"100px",height:
"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart=
"onselectstart"in
b;a.removeChild(b).style.display=
"none"});c.extend(c.ui,{plugin:{add:
function(a,b,d){a=c.ui[a].prototype;
for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:
function(
a,
b,d){
if((b=a.plugins[b])&&
564 a.element[0].parentNode)
for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:
function(
a,
b){
return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:
function(
a,
b){
if(c(a).css(
"overflow")===
"hidden")
return false;b=b&&b===
"left"?
"scrollLeft":
"scrollTop";var d=
false;
if(a[b]>0)
return true;a[
b]=1;d=a[
b]>0;a[
b]=0;
return d},isOverAxis:
function(
a,
b,d){
return a>b&&a<b+d},isOver:
function(
a,
b,d,e,h,i){
return c.ui.isOverAxis(a,d,h)&&
565 c.ui.isOverAxis(b,e,i)}})}})(
jQuery);
575 (
function(
b,j){
if(b.cleanData){var k=b.cleanData;b.cleanData=
function(
a){
for(var c=0,d;(d=a[c])!=null;c++)
try{
b(d).triggerHandler(
"remove")}
catch(e){}k(a)}}
else{var l=b.fn.remove;b.fn.remove=
function(
a,c){
return this.each(
function(){
if(!c)
if(!a||b.filter(a,[
this]).length)
b(
"*",
this).add([
this]).each(
function(){
try{
b(
this).triggerHandler(
"remove")}
catch(d){}});
return l.call(
b(
this),a,c)})}}b.widget=
function(a,c,d){var e=a.split(
".")[0],f;a=a.split(
".")[1];f=e+
"-"+
a;
if(!d){d=c;c=b.Widget}b.expr[
":"][f]=
576 function(h){
return!!b.data(h,a)};b[e]=b[e]||{};b[e][
a]=
function(h,g){arguments.length&&this._createWidget(h,g)};c=
new c;c.options=b.extend(
true,{},c.options);b[e][
a].prototype=b.extend(
true,c,{
namespace:e,widgetName:
a,widgetEventPrefix:b[e][
a].prototype.widgetEventPrefix||
a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=
function(
a,c){b.fn[
a]=
function(d){var e=typeof d===
"string",f=Array.prototype.slice.call(arguments,1),h=
this;d=!e&&f.length?b.extend.apply(null,[
true,d].concat(f)):
577 d;
if(e&&d.charAt(0)===
"_")
return h;e?this.each(
function(){var g=b.data(
this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;
if(i!==g&&i!==j){h=i;
return false}}):this.each(
function(){var g=b.data(
this,a);g?g.option(d||{})._init():b.data(
this,a,
new c(d,
this))});
return h}};b.Widget=
function(
a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:
"widget",widgetEventPrefix:
"",options:{disabled:
false},_createWidget:
function(
a,c){b.data(c,this.widgetName,
this);this.element=
b(c);this.options=
578 b.extend(
true,{},this.options,this._getCreateOptions(),
a);var d=
this;this.element.bind(
"remove."+this.widgetName,
function(){d.destroy()});this._create();this._trigger(
"create");this._init()},_getCreateOptions:
function(){
return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:
function(){},_init:
function(){},
destroy:
function(){this.element.unbind(
"."+this.widgetName).removeData(this.widgetName);this.widget().unbind(
"."+this.widgetName).removeAttr(
"aria-disabled").removeClass(this.widgetBaseClass+
579 "-disabled ui-state-disabled")},widget:
function(){
return this.element},option:
function(
a,c){var d=
a;
if(arguments.length===0)
return b.extend({},this.options);
if(typeof a===
"string"){
if(c===j)
return this.options[
a];d={};d[
a]=c}this._setOptions(d);
return this},_setOptions:
function(
a){var c=
this;b.each(a,
function(d,e){c._setOption(d,e)});
return this},_setOption:
function(
a,c){this.options[
a]=c;
if(a===
"disabled")this.widget()[c?
"addClass":
"removeClass"](this.widgetBaseClass+
"-disabled ui-state-disabled").attr(
"aria-disabled",
580 c);
return this},enable:
function(){
return this._setOption(
"disabled",
false)},disable:
function(){
return this._setOption(
"disabled",
true)},_trigger:
function(
a,c,d){var e=this.options[
a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+
a).toLowerCase();d=d||{};
if(c.originalEvent){a=b.event.props.length;
for(var f;
a;){f=b.event.props[--
a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);
return!(b.isFunction(e)&&e.call(this.element[0],c,d)===
false||c.isDefaultPrevented())}}})(
jQuery);
593 (
function(
b){var d=
false;
b(document).mouseup(
function(){d=
false});b.widget(
"ui.mouse",{options:{cancel:
":input,option",distance:1,delay:0},_mouseInit:
function(){var a=
this;this.element.bind(
"mousedown."+this.widgetName,
function(c){
return a._mouseDown(c)}).bind(
"click."+this.widgetName,
function(c){
if(
true===b.data(c.target,a.widgetName+
".preventClickEvent")){b.removeData(c.target,a.widgetName+
".preventClickEvent");c.stopImmediatePropagation();
return false}});this.started=
false},_mouseDestroy:
function(){this.element.unbind(
"."+
594 this.widgetName)},_mouseDown:
function(
a){
if(!d){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=
a;var c=
this,f=a.which==1,g=typeof this.options.cancel==
"string"&&a.target.nodeName?
b(a.target).closest(this.options.cancel).length:
false;
if(!f||g||!this._mouseCapture(a))
return true;this.mouseDelayMet=!this.options.delay;
if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(
function(){c.mouseDelayMet=
true},this.options.delay);
if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=
595 this._mouseStart(a)!==
false;
if(!this._mouseStarted){a.preventDefault();
return true}}
true===b.data(a.target,
this.widgetName+
".preventClickEvent")&&b.removeData(a.target,
this.widgetName+
".preventClickEvent");this._mouseMoveDelegate=
function(e){
return c._mouseMove(e)};this._mouseUpDelegate=
function(e){
return c._mouseUp(e)};
b(document).bind(
"mousemove."+this.widgetName,this._mouseMoveDelegate).bind(
"mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();
return d=
true}},_mouseMove:
function(
a){
if(b.browser.msie&&
596 !(document.documentMode>=9)&&!a.button)
return this._mouseUp(a);
if(this._mouseStarted){this._mouseDrag(a);
return a.preventDefault()}
if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==
false)?this._mouseDrag(a):this._mouseUp(a);
return!this._mouseStarted},_mouseUp:
function(
a){
b(document).unbind(
"mousemove."+this.widgetName,this._mouseMoveDelegate).unbind(
"mouseup."+this.widgetName,this._mouseUpDelegate);
if(this._mouseStarted){this._mouseStarted=
597 false;a.target==this._mouseDownEvent.target&&b.data(a.target,
this.widgetName+
".preventClickEvent",
true);this._mouseStop(a)}
return false},_mouseDistanceMet:
function(
a){
return Math.max(Math.abs(
this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:
function(){
return this.mouseDelayMet},_mouseStart:
function(){},_mouseDrag:
function(){},_mouseStop:
function(){},_mouseCapture:
function(){
return true}})})(
jQuery);
607 (
function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=
function(
b){
if(!b||!b.of)
return t.apply(
this,arguments);b=c.extend({},
b);var a=c(b.of),d=a[0],g=(b.collision||
"flip").split(
" "),e=b.offset?b.offset.split(
" "):[0,0],h,k,j;
if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}
else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}
else if(d.preventDefault){b.at=
"left top";h=k=0;j={top:b.of.pageY,
608 left:b.of.pageX}}
else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each([
"my",
"at"],
function(){var f=(b[
this]||
"").split(
" ");
if(f.length===1)f=n.test(f[0])?f.concat([
"center"]):o.test(f[0])?[
"center"].concat(f):[
"center",
"center"];f[0]=n.test(f[0])?f[0]:
"center";f[1]=o.test(f[1])?f[1]:
"center";b[
this]=f});
if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;
if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;
if(b.at[0]===
"right")j.left+=h;
else if(b.at[0]===
"center")j.left+=h/2;
if(b.at[1]===
"bottom")j.top+=
609 k;
else if(b.at[1]===
"center")j.top+=k/2;j.left+=e[0];j.top+=e[1];
return this.each(
function(){var f=c(
this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(
this,
"marginLeft",
true))||0,q=parseInt(c.curCSS(
this,
"marginTop",
true))||0,v=l+p+(parseInt(c.curCSS(
this,
"marginRight",
true))||0),w=m+q+(parseInt(c.curCSS(
this,
"marginBottom",
true))||0),i=c.extend({},j),r;
if(b.my[0]===
"right")i.left-=l;
else if(b.my[0]===
"center")i.left-=l/2;
if(b.my[1]===
"bottom")i.top-=m;
else if(b.my[1]===
"center")i.top-=
610 m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each([
"left",
"top"],
function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{
using:b.using}))})};c.ui.position={fit:{left:
function(
b,
a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left=
611 d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:
function(
b,
a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:
function(
b,
a){
if(a.at[0]!==
"center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]===
"left"?-a.elemWidth:a.my[0]===
"right"?a.elemWidth:0,e=a.at[0]===
"left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+=
612 a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:
function(
b,
a){
if(a.at[1]!==
"center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]===
"top"?-a.elemHeight:a.my[1]===
"bottom"?a.elemHeight:0,e=a.at[1]===
"top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};
if(!c.offset.setOffset){c.offset.setOffset=
function(
b,
a){
if(/
static/.test(c.curCSS(b,
"position")))b.style.position=
"relative";var d=c(b),
613 g=d.offset(),e=parseInt(c.curCSS(b,
"top",
true),10)||0,h=parseInt(c.curCSS(b,
"left",
true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};
"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=
function(
b){var a=
this[0];
if(!a||!a.ownerDocument)
return null;
if(b)
return this.each(
function(){c.offset.setOffset(
this,b)});
return u.call(
this)}}})(
jQuery);
628 (
function(d){d.widget(
"ui.draggable",d.ui.mouse,{widgetEventPrefix:
"drag",options:{addClasses:
true,appendTo:
"parent",axis:
false,connectToSortable:
false,containment:
false,cursor:
"auto",cursorAt:
false,grid:
false,handle:
false,helper:
"original",iframeFix:
false,opacity:
false,refreshPositions:
false,revert:
false,revertDuration:500,scope:
"default",scroll:
true,scrollSensitivity:20,scrollSpeed:20,snap:
false,snapMode:
"both",snapTolerance:20,stack:
false,zIndex:
false},_create:
function(){
if(this.options.helper==
629 "original"&&!/^(?:r|a|f)/.test(
this.element.css(
"position")))this.element[0].style.position=
"relative";this.options.addClasses&&this.element.addClass(
"ui-draggable");this.options.disabled&&this.element.addClass(
"ui-draggable-disabled");this._mouseInit()},
destroy:
function(){
if(this.element.data(
"draggable")){this.element.removeData(
"draggable").unbind(
".draggable").removeClass(
"ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();
return this}},_mouseCapture:
function(
a){var b=
630 this.options;
if(this.helper||b.disabled||d(a.target).is(
".ui-resizable-handle"))
return false;this.handle=this._getHandle(a);
if(!this.handle)
return false;
if(b.iframeFix)d(b.iframeFix===
true?
"iframe":b.iframeFix).each(
function(){d(
'<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+
"px",height:this.offsetHeight+
"px",position:
"absolute",opacity:
"0.001",zIndex:1E3}).css(d(
this).offset()).appendTo(
"body")});
return true},_mouseStart:
function(
a){var b=this.options;
631 this.helper=this._createHelper(a);this._cacheHelperProportions();
if(d.ui.ddmanager)d.ui.ddmanager.current=
this;this._cacheMargins();this.cssPosition=this.helper.css(
"position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});
632 this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();
if(this._trigger(
"start",a)===
false){this._clear();
return false}this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(
this,a);this.helper.addClass(
"ui-draggable-dragging");this._mouseDrag(a,
true);d.ui.ddmanager&&d.ui.ddmanager.dragStart(
this,a);
return true},
633 _mouseDrag:
function(
a,
b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo(
"absolute");
if(!b){b=this._uiHash();
if(this._trigger(
"drag",a,b)===
false){this._mouseUp({});
return false}this.position=b.position}
if(!this.options.axis||
this.options.axis!=
"y")this.helper[0].style.left=this.position.left+
"px";
if(!this.options.axis||
this.options.axis!=
"x")this.helper[0].style.top=this.position.top+
"px";d.ui.ddmanager&&d.ui.ddmanager.drag(
this,a);
return false},_mouseStop:
function(
a){var b=
634 false;
if(d.ui.ddmanager&&!
this.options.dropBehaviour)b=d.ui.ddmanager.drop(
this,a);
if(this.dropped){b=this.dropped;this.dropped=
false}
if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper==
"original")
return false;
if(this.options.revert==
"invalid"&&!b||
this.options.revert==
"valid"&&b||
this.options.revert===
true||d.isFunction(
this.options.revert)&&this.options.revert.call(this.element,b)){var c=
this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,
635 10),
function(){c._trigger(
"stop",a)!==
false&&c._clear()})}
else this._trigger(
"stop",a)!==
false&&this._clear();
return false},_mouseUp:
function(
a){this.options.iframeFix===
true&&d(
"div.ui-draggable-iframeFix").each(
function(){this.parentNode.removeChild(
this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(
this,a);
return d.ui.mouse.prototype._mouseUp.call(
this,a)},cancel:
function(){this.helper.is(
".ui-draggable-dragging")?this._mouseUp({}):this._clear();
return this},_getHandle:
function(
a){var b=!this.options.handle||
636 !d(this.options.handle,
this.element).length?
true:
false;d(this.options.handle,
this.element).find(
"*").andSelf().each(
function(){
if(
this==a.target)b=
true});
return b},_createHelper:
function(
a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(
this.element[0],[a])):b.helper==
"clone"?
this.element.clone().removeAttr(
"id"):this.element;a.parents(
"body").length||a.appendTo(b.appendTo==
"parent"?
this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css(
"position"))&&
637 a.css(
"position",
"absolute");
return a},_adjustOffsetFromHelper:
function(
a){
if(typeof a==
"string")a=a.split(
" ");
if(d.isArray(a))a={left:+a[0],top:+a[1]||0};
if(
"left"in a)this.offset.click.left=a.left+this.margins.left;
if(
"right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;
if(
"top"in a)this.offset.click.top=a.top+this.margins.top;
if(
"bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:
function(){this.offsetParent=
638 this.helper.offsetParent();var a=this.offsetParent.offset();
if(this.cssPosition==
"absolute"&&this.scrollParent[0]!=document&&d.ui.contains(
this.scrollParent[0],
this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}
if(this.offsetParent[0]==document.body||
this.offsetParent[0].tagName&&
this.offsetParent[0].tagName.toLowerCase()==
"html"&&d.browser.msie)a={top:0,left:0};
return{top:a.top+(parseInt(this.offsetParent.css(
"borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css(
"borderLeftWidth"),
639 10)||0)}},_getRelativeOffset:
function(){
if(this.cssPosition==
"relative"){var a=this.element.position();
return{top:a.top-(parseInt(this.helper.css(
"top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css(
"left"),10)||0)+this.scrollParent.scrollLeft()}}
else return{top:0,left:0}},_cacheMargins:
function(){this.margins={left:parseInt(this.element.css(
"marginLeft"),10)||0,top:parseInt(this.element.css(
"marginTop"),10)||0,right:parseInt(this.element.css(
"marginRight"),10)||0,bottom:parseInt(this.element.css(
"marginBottom"),
640 10)||0}},_cacheHelperProportions:
function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:
function(){var a=this.options;
if(a.containment==
"parent")a.containment=this.helper[0].parentNode;
if(a.containment==
"document"||a.containment==
"window")this.containment=[a.containment==
"document"?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a.containment==
"document"?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,
641 (a.containment==
"document"?0:d(window).scrollLeft())+d(a.containment==
"document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment==
"document"?0:d(window).scrollTop())+(d(a.containment==
"document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-
this.margins.top];
if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){a=d(a.containment);var b=a[0];
if(b){a.offset();var c=d(b).css(
"overflow")!=
642 "hidden";this.containment=[(parseInt(d(b).css(
"borderLeftWidth"),10)||0)+(parseInt(d(b).css(
"paddingLeft"),10)||0),(parseInt(d(b).css(
"borderTopWidth"),10)||0)+(parseInt(d(b).css(
"paddingTop"),10)||0),(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css(
"borderLeftWidth"),10)||0)-(parseInt(d(b).css(
"paddingRight"),10)||0)-this.helperProportions.width-
this.margins.left-
this.margins.right,(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css(
"borderTopWidth"),
643 10)||0)-(parseInt(d(b).css(
"paddingBottom"),10)||0)-this.helperProportions.height-
this.margins.top-
this.margins.bottom];
this.relative_container=a}}
else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:
function(
a,
b){
if(!b)b=this.position;a=a==
"absolute"?1:-1;var c=this.cssPosition==
"absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);
return{top:b.top+
644 this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition==
"fixed"?0:(this.cssPosition==
"fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition==
"fixed"?0:(this.cssPosition==
"fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:
function(
a){var b=this.options,c=this.cssPosition==
"absolute"&&
645 !(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,h=a.pageY;
if(this.originalPosition){var g;
if(this.containment){
if(this.relative_container){g=this.relative_container.offset();g=[this.containment[0]+g.left,this.containment[1]+g.top,this.containment[2]+g.left,this.containment[3]+g.top]}
else g=this.containment;
if(a.pageX-
this.offset.click.left<g[0])e=g[0]+this.offset.click.left;
646 if(a.pageY-
this.offset.click.top<g[1])h=g[1]+this.offset.click.top;
if(a.pageX-
this.offset.click.left>g[2])e=g[2]+this.offset.click.left;
if(a.pageY-
this.offset.click.top>g[3])h=g[3]+this.offset.click.top}
if(b.grid){h=b.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY;h=g?!(h-this.offset.click.top<g[1]||h-this.offset.click.top>g[3])?h:!(h-this.offset.click.top<g[1])?h-b.grid[1]:h+b.grid[1]:h;e=b.grid[0]?this.originalPageX+Math.round((e-this.originalPageX)/
647 b.grid[0])*b.grid[0]:this.originalPageX;e=g?!(e-this.offset.click.left<g[0]||e-this.offset.click.left>g[2])?e:!(e-this.offset.click.left<g[0])?e-b.grid[0]:e+b.grid[0]:e}}
return{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition==
"fixed"?0:this.cssPosition==
"fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-
this.offset.relative.left-
this.offset.parent.left+(d.browser.safari&&d.browser.version<
648 526&&
this.cssPosition==
"fixed"?0:
this.cssPosition==
"fixed"?-
this.scrollParent.scrollLeft():f?0:c.scrollLeft())}},_clear:
function(){this.helper.removeClass(
"ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=
false},_trigger:
function(
a,
b,c){c=c||this._uiHash();d.ui.plugin.call(
this,a,[b,c]);
if(a==
"drag")this.positionAbs=this._convertPositionTo(
"absolute");
return d.Widget.prototype._trigger.call(
this,a,b,
649 c)},plugins:{},_uiHash:
function(){
return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.extend(d.ui.draggable,{
version:
"1.8.16"});d.ui.plugin.add(
"draggable",
"connectToSortable",{start:
function(
a,
b){var c=d(
this).data(
"draggable"),f=c.options,e=d.extend({},
b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(
function(){var h=d.data(
this,
"sortable");
if(h&&!h.options.disabled){c.sortables.push({instance:h,shouldRevert:h.options.revert});
650 h.refreshPositions();h._trigger(
"activate",a,e)}})},stop:
function(a,b){var c=d(
this).data(
"draggable"),f=d.extend({},
b,{item:c.element});d.each(c.sortables,
function(){
if(
this.instance.isOver){
this.instance.isOver=0;c.cancelHelperRemoval=
true;
this.instance.cancelHelperRemoval=
false;
if(
this.shouldRevert)
this.instance.options.revert=
true;
this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;c.options.helper==
"original"&&this.instance.currentItem.css({top:
"auto",left:
"auto"})}
else{this.instance.cancelHelperRemoval=
651 false;this.instance._trigger(
"deactivate",a,f)}})},drag:
function(a,b){var c=d(
this).data(
"draggable"),f=
this;d.each(c.sortables,
function(){
this.instance.positionAbs=c.positionAbs;
this.instance.helperProportions=c.helperProportions;
this.instance.offset.click=c.offset.click;
if(
this.instance._intersectsWith(
this.instance.containerCache)){
if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=d(f).clone().removeAttr(
"id").appendTo(this.instance.element).data(
"sortable-item",
true);
652 this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=
function(){
return b.helper[0]};a.target=this.instance.currentItem[0];this.instance._mouseCapture(a,
true);this.instance._mouseStart(a,
true,
true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;
653 c._trigger(
"toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&this.instance._mouseDrag(a)}
else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=
true;this.instance.options.revert=
false;this.instance._trigger(
"out",a,this.instance._uiHash(
this.instance));this.instance._mouseStop(a,
true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&
654 this.instance.placeholder.remove();c._trigger(
"fromSortable",a);c.dropped=
false}})}});d.ui.plugin.add(
"draggable",
"cursor",{start:
function(){var a=d(
"body"),b=d(
this).data(
"draggable").options;
if(a.css(
"cursor"))b._cursor=a.css(
"cursor");a.css(
"cursor",b.cursor)},stop:
function(){var a=d(
this).data(
"draggable").options;a._cursor&&d(
"body").css(
"cursor",a._cursor)}});d.ui.plugin.add(
"draggable",
"opacity",{start:
function(
a,
b){a=d(b.helper);b=d(
this).data(
"draggable").options;
if(a.css(
"opacity"))b._opacity=
655 a.css(
"opacity");a.css(
"opacity",b.opacity)},stop:
function(
a,
b){a=d(
this).data(
"draggable").options;a._opacity&&d(b.helper).css(
"opacity",a._opacity)}});d.ui.plugin.add(
"draggable",
"scroll",{start:
function(){var a=d(
this).data(
"draggable");
if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!=
"HTML")a.overflowOffset=a.scrollParent.offset()},drag:
function(
a){var b=d(
this).data(
"draggable"),c=b.options,f=
false;
if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!=
"HTML"){
if(!c.axis||c.axis!=
656 "x")
if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+c.scrollSpeed;
else if(a.pageY-b.overflowOffset.top<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-c.scrollSpeed;
if(!c.axis||c.axis!=
"y")
if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+c.scrollSpeed;
else if(a.pageX-b.overflowOffset.left<
657 c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-c.scrollSpeed}
else{
if(!c.axis||c.axis!=
"x")
if(a.pageY-d(document).scrollTop()<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed);
else if(d(window).height()-(a.pageY-d(document).scrollTop())<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed);
if(!c.axis||c.axis!=
"y")
if(a.pageX-d(document).scrollLeft()<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()-
658 c.scrollSpeed);
else if(d(window).width()-(a.pageX-d(document).scrollLeft())<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()+c.scrollSpeed)}f!==
false&&d.ui.ddmanager&&!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});d.ui.plugin.add(
"draggable",
"snap",{start:
function(){var a=d(
this).data(
"draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||
":data(draggable)":b.snap).each(
function(){var c=d(
this),f=c.offset();
this!=a.element[0]&&a.snapElements.push({item:
this,
659 width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:
function(
a,
b){
for(var c=d(
this).data(
"draggable"),f=c.options,e=f.snapTolerance,h=b.offset.left,g=h+c.helperProportions.width,n=b.offset.top,o=n+c.helperProportions.height,i=c.snapElements.length-1;i>=0;i--){var j=c.snapElements[i].left,l=j+c.snapElements[i].width,k=c.snapElements[i].top,m=k+c.snapElements[i].height;
if(j-e<h&&h<l+e&&k-e<n&&n<m+e||j-e<h&&h<l+e&&k-e<o&&o<m+e||j-e<g&&g<l+e&&k-e<n&&n<m+e||j-e<g&&g<l+e&&k-e<o&&
660 o<m+e){
if(f.snapMode!=
"inner"){var p=Math.abs(k-o)<=e,q=Math.abs(m-n)<=e,r=Math.abs(j-g)<=e,s=Math.abs(l-h)<=e;
if(p)b.position.top=c._convertPositionTo(
"relative",{top:k-c.helperProportions.height,left:0}).top-c.margins.top;
if(q)b.position.top=c._convertPositionTo(
"relative",{top:m,left:0}).top-c.margins.top;
if(r)b.position.left=c._convertPositionTo(
"relative",{top:0,left:j-c.helperProportions.width}).left-c.margins.left;
if(s)b.position.left=c._convertPositionTo(
"relative",{top:0,left:l}).left-c.margins.left}var t=
661 p||q||r||s;
if(f.snapMode!=
"outer"){p=Math.abs(k-n)<=e;q=Math.abs(m-o)<=e;r=Math.abs(j-h)<=e;s=Math.abs(l-g)<=e;
if(p)b.position.top=c._convertPositionTo(
"relative",{top:k,left:0}).top-c.margins.top;
if(q)b.position.top=c._convertPositionTo(
"relative",{top:m-c.helperProportions.height,left:0}).top-c.margins.top;
if(r)b.position.left=c._convertPositionTo(
"relative",{top:0,left:j}).left-c.margins.left;
if(s)b.position.left=c._convertPositionTo(
"relative",{top:0,left:l-c.helperProportions.width}).left-c.margins.left}
if(!c.snapElements[i].snapping&&
662 (p||q||r||s||t))c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[i].item}));c.snapElements[i].snapping=p||q||r||s||t}
else{c.snapElements[i].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[i].item}));c.snapElements[i].snapping=
false}}}});d.ui.plugin.add(
"draggable",
"stack",{start:
function(){var a=d(
this).data(
"draggable").options;a=d.makeArray(d(a.stack)).sort(
function(c,f){
return(parseInt(d(c).css(
"zIndex"),
663 10)||0)-(parseInt(d(f).css(
"zIndex"),10)||0)});
if(a.length){var b=parseInt(a[0].style.zIndex)||0;d(a).each(
function(c){this.style.zIndex=b+c});
this[0].style.zIndex=b+a.length}}});d.ui.plugin.add(
"draggable",
"zIndex",{start:
function(
a,
b){a=d(b.helper);b=d(
this).data(
"draggable").options;
if(a.css(
"zIndex"))b._zIndex=a.css(
"zIndex");a.css(
"zIndex",b.zIndex)},stop:
function(
a,
b){a=d(
this).data(
"draggable").options;a._zIndex&&d(b.helper).css(
"zIndex",a._zIndex)}})})(
jQuery);
679 (
function(d){d.widget(
"ui.droppable",{widgetEventPrefix:
"drop",options:{accept:
"*",activeClass:
false,addClasses:
true,greedy:
false,hoverClass:
false,scope:
"default",tolerance:
"intersect"},_create:
function(){var a=this.options,b=a.accept;this.isover=0;this.isout=1;this.accept=d.isFunction(b)?b:
function(c){
return c.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};d.ui.ddmanager.droppables[a.scope]=d.ui.ddmanager.droppables[a.scope]||[];d.ui.ddmanager.droppables[a.scope].push(
this);
680 a.addClasses&&this.element.addClass(
"ui-droppable")},
destroy:
function(){
for(var a=d.ui.ddmanager.droppables[
this.options.scope],b=0;b<a.length;b++)a[
b]==
this&&a.splice(b,1);this.element.removeClass(
"ui-droppable ui-droppable-disabled").removeData(
"droppable").unbind(
".droppable");
return this},_setOption:
function(
a,
b){
if(a==
"accept")this.accept=d.isFunction(b)?b:
function(c){
return c.is(b)};d.Widget.prototype._setOption.apply(
this,arguments)},_activate:
function(
a){var b=d.ui.ddmanager.current;this.options.activeClass&&
681 this.element.addClass(this.options.activeClass);b&&this._trigger(
"activate",a,this.ui(b))},_deactivate:
function(
a){var b=d.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);b&&this._trigger(
"deactivate",a,this.ui(b))},_over:
function(
a){var b=d.ui.ddmanager.current;
if(!(!b||(b.currentItem||b.element)[0]==
this.element[0]))
if(this.accept.call(
this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
682 this._trigger(
"over",a,this.ui(b))}},_out:
function(
a){var b=d.ui.ddmanager.current;
if(!(!b||(b.currentItem||b.element)[0]==
this.element[0]))
if(this.accept.call(
this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger(
"out",a,this.ui(b))}},_drop:
function(
a,
b){var c=b||d.ui.ddmanager.current;
if(!c||(c.currentItem||c.element)[0]==this.element[0])
return false;var e=
false;this.element.find(
":data(droppable)").not(
".ui-draggable-dragging").each(
function(){var g=
683 d.data(
this,
"droppable");
if(g.options.greedy&&!g.options.disabled&&g.options.scope==c.options.scope&&g.accept.call(g.element[0],c.currentItem||c.element)&&d.ui.intersect(c,d.extend(g,{offset:g.element.offset()}),g.options.tolerance)){e=
true;
return false}});
if(e)
return false;
if(this.accept.call(
this.element[0],c.currentItem||c.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger(
"drop",
684 a,this.ui(c));
return this.element}
return false},ui:
function(
a){
return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{
version:
"1.8.16"});d.ui.intersect=
function(
a,
b,c){
if(!b.offset)
return false;var e=(a.positionAbs||a.position.absolute).left,g=e+a.helperProportions.width,f=(a.positionAbs||a.position.absolute).top,h=f+a.helperProportions.height,i=b.offset.left,k=i+b.proportions.width,j=b.offset.top,l=j+b.proportions.height;
685 switch(c){
case "fit":
return i<=e&&g<=k&&j<=f&&h<=l;
case "intersect":
return i<e+a.helperProportions.width/2&&g-a.helperProportions.width/2<k&&j<f+a.helperProportions.height/2&&h-a.helperProportions.height/2<l;
case "pointer":
return d.ui.isOver((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,j,i,b.proportions.height,b.proportions.width);
case "touch":
return(f>=j&&f<=l||h>=j&&h<=l||f<j&&h>l)&&(e>=
686 i&&e<=k||g>=i&&g<=k||e<i&&g>k);
default:
return false}};d.ui.ddmanager={current:null,droppables:{
"default":[]},prepareOffsets:
function(
a,
b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(
":data(droppable)").andSelf(),f=0;a:
for(;f<c.length;f++)
if(!(c[f].options.disabled||a&&!c[f].accept.call(c[f].element[0],a.currentItem||a.element))){
for(var h=0;h<g.length;h++)
if(g[h]==c[f].element[0]){c[f].proportions.height=0;
continue a}c[f].visible=c[f].element.css(
"display")!=
687 "none";
if(c[f].visible){e==
"mousedown"&&c[f]._activate.call(c[f],b);c[f].offset=c[f].element.offset();c[f].proportions={width:c[f].element[0].offsetWidth,height:c[f].element[0].offsetHeight}}}},drop:
function(
a,
b){var c=
false;d.each(d.ui.ddmanager.droppables[a.options.scope]||[],
function(){
if(
this.options){
if(!
this.options.disabled&&
this.visible&&d.ui.intersect(a,
this,
this.options.tolerance))c=c||this._drop.call(
this,b);
if(!this.options.disabled&&
this.visible&&
this.accept.call(
this.element[0],a.currentItem||
688 a.element)){this.isout=1;this.isover=0;this._deactivate.call(
this,b)}}});
return c},dragStart:
function(
a,
b){a.element.parents(
":not(body,html)").bind(
"scroll.droppable",
function(){a.options.refreshPositions||d.ui.ddmanager.prepareOffsets(a,b)})},drag:
function(a,b){a.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],
function(){
if(!(
this.options.disabled||
this.greedyChild||!
this.visible)){var c=d.ui.intersect(a,
this,
this.options.tolerance);
689 if(c=!c&&this.isover==1?
"isout":c&&this.isover==0?
"isover":null){var e;
if(this.options.greedy){var g=this.element.parents(
":data(droppable):eq(0)");
if(g.length){e=d.data(g[0],
"droppable");e.greedyChild=c==
"isover"?1:0}}
if(e&&c==
"isover"){e.isover=0;e.isout=1;e._out.call(e,b)}
this[c]=1;
this[c==
"isout"?
"isover":
"isout"]=0;
this[c==
"isover"?
"_over":
"_out"].call(
this,b);
if(e&&c==
"isout"){e.isout=0;e.isover=1;e._over.call(e,b)}}}})},dragStop:
function(a,b){a.element.parents(
":not(body,html)").unbind(
"scroll.droppable");
690 a.options.refreshPositions||d.ui.ddmanager.prepareOffsets(a,b)}}})(
jQuery);
705 (
function(e){e.widget(
"ui.resizable",e.ui.mouse,{widgetEventPrefix:
"resize",options:{alsoResize:
false,animate:
false,animateDuration:
"slow",animateEasing:
"swing",aspectRatio:
false,autoHide:
false,containment:
false,ghost:
false,grid:
false,handles:
"e,s,se",helper:
false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:
function(){var b=
this,a=this.options;this.element.addClass(
"ui-resizable");e.extend(
this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,
706 _proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||
"ui-resizable-helper":null});
if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css(
"position"))&&e.browser.opera&&
this.element.css({position:
"relative",top:
"auto",left:
"auto"});this.element.wrap(e(
'<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css(
"position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
707 top:this.element.css(
"top"),left:this.element.css(
"left")}));this.element=this.element.parent().data(
"resizable",this.element.data(
"resizable"));this.elementIsWrapper=
true;this.element.css({marginLeft:this.originalElement.css(
"marginLeft"),marginTop:this.originalElement.css(
"marginTop"),marginRight:this.originalElement.css(
"marginRight"),marginBottom:this.originalElement.css(
"marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=
708 this.originalElement.css(
"resize");this.originalElement.css(
"resize",
"none");this._proportionallyResizeElements.push(this.originalElement.css({position:
"static",zoom:1,display:
"block"}));this.originalElement.css({margin:this.originalElement.css(
"margin")});this._proportionallyResize()}this.handles=a.handles||(!e(
".ui-resizable-handle",this.element).length?
"e,s,se":{n:
".ui-resizable-n",e:
".ui-resizable-e",s:
".ui-resizable-s",w:
".ui-resizable-w",se:
".ui-resizable-se",sw:
".ui-resizable-sw",ne:
".ui-resizable-ne",
709 nw:
".ui-resizable-nw"});
if(this.handles.constructor==String){
if(this.handles==
"all")this.handles=
"n,e,s,w,se,sw,ne,nw";var c=this.handles.split(
",");this.handles={};
for(var d=0;d<c.length;d++){var f=e.trim(c[d]),g=e(
'<div class="ui-resizable-handle '+(
"ui-resizable-"+f)+
'"></div>');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});
"se"==f&&g.addClass(
"ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=
".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=
function(h){h=h||this.element;
for(var i in this.handles){
if(this.handles[i].constructor==
710 String)this.handles[i]=e(this.handles[i],this.element).show();
if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),l=0;l=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=[
"padding",/ne|nw|n/.test(i)?
"Top":/se|sw|s/.test(i)?
"Bottom":/^e$/.test(i)?
"Right":
"Left"].join(
"");h.css(j,l);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(
".ui-resizable-handle",this.element).disableSelection();
711 this._handles.mouseover(
function(){
if(!b.resizing){
if(
this.className)var h=
this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:
"se"}});
if(a.autoHide){this._handles.hide();e(this.element).addClass(
"ui-resizable-autohide").hover(
function(){
if(!a.disabled){e(
this).removeClass(
"ui-resizable-autohide");b._handles.show()}},
function(){
if(!a.disabled)
if(!b.resizing){e(
this).addClass(
"ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},
destroy:
function(){this._mouseDestroy();
712 var b=
function(c){e(c).removeClass(
"ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData(
"resizable").unbind(
".resizable").find(
".ui-resizable-handle").remove()};
if(this.elementIsWrapper){
b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css(
"position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css(
"top"),left:a.css(
"left")})).remove()}this.originalElement.css(
"resize",this.originalResizeStyle);
b(this.originalElement);
return this},_mouseCapture:
function(
b){var a=
713 false;
for(var c in this.handles)
if(e(this.handles[c])[0]==b.target)a=
true;
return!this.options.disabled&&a},_mouseStart:
function(
b){var a=this.options,c=this.element.position(),d=this.element;this.resizing=
true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};
if(d.is(
".ui-draggable")||/absolute/.test(d.css(
"position")))d.css({position:
"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css(
"position"))&&d.css({position:
"relative",top:
"auto",left:
"auto"});
714 this._renderProxy();c=m(this.helper.css(
"left"));var f=m(this.helper.css(
"top"));
if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff=
715 {width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio==
"number"?a.aspectRatio:this.originalSize.width/this.originalSize.height||1;a=e(
".ui-resizable-"+this.axis).css(
"cursor");e(
"body").css(
"cursor",a==
"auto"?this.axis+
"-resize":a);d.addClass(
"ui-resizable-resizing");this._propagate(
"start",b);
return true},_mouseDrag:
function(
b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];
716 if(!d)
return false;c=d.apply(
this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);this._updateVirtualBoundaries(b.shiftKey);
if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate(
"resize",b);a.css({top:this.position.top+
"px",left:this.position.left+
"px",width:this.size.width+
"px",height:this.size.height+
"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger(
"resize",b,this.ui());
return false},
717 _mouseStop:
function(
b){this.resizing=
false;var a=this.options,c=
this;
if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],
"left")?0:c.sizeDiff.height;f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css(
"left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css(
"top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,
718 {top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e(
"body").css(
"cursor",
"auto");this.element.removeClass(
"ui-resizable-resizing");this._propagate(
"stop",b);this._helper&&this.helper.remove();
return false},_updateVirtualBoundaries:
function(
b){var a=this.options,c,d,f;a={minWidth:k(a.minWidth)?a.minWidth:0,maxWidth:k(a.maxWidth)?a.maxWidth:Infinity,minHeight:k(a.minHeight)?a.minHeight:0,maxHeight:k(a.maxHeight)?a.maxHeight:
719 Infinity};
if(this._aspectRatio||b){b=a.minHeight*this.aspectRatio;d=a.minWidth/this.aspectRatio;c=a.maxHeight*this.aspectRatio;f=a.maxWidth/this.aspectRatio;
if(b>a.minWidth)a.minWidth=
b;
if(d>a.minHeight)a.minHeight=d;
if(c<a.maxWidth)a.maxWidth=c;
if(f<a.maxHeight)a.maxHeight=f}this._vBoundaries=a},_updateCache:
function(
b){this.offset=this.helper.offset();
if(k(b.left))this.position.left=b.left;
if(k(b.top))this.position.top=b.top;
if(k(b.height))this.size.height=b.height;
if(k(b.width))this.size.width=
720 b.width},_updateRatio:
function(
b){var a=this.position,c=this.size,d=this.axis;
if(k(b.height))b.width=b.height*
this.aspectRatio;
else if(k(b.width))b.height=b.width/
this.aspectRatio;
if(d==
"sw"){b.left=a.left+(c.width-b.width);b.top=null}
if(d==
"nw"){b.top=a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}
return b},_respectSize:
function(b){var a=this._vBoundaries,c=this.axis,d=k(b.width)&&a.maxWidth&&a.maxWidth<b.width,f=k(b.height)&&a.maxHeight&&a.maxHeight<b.height,g=k(b.width)&&a.minWidth&&
721 a.minWidth>b.width,h=k(b.height)&&a.minHeight&&a.minHeight>b.height;
if(g)b.width=a.minWidth;
if(h)b.height=a.minHeight;
if(d)b.width=a.maxWidth;
if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,l=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);
if(g&&l)b.left=i-a.minWidth;
if(d&&l)b.left=i-a.maxWidth;
if(h&&c)b.top=j-a.minHeight;
if(f&&c)b.top=j-a.maxHeight;
if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;
else if(a&&!b.top&&b.left)b.left=
722 null;
return b},_proportionallyResize:
function(){
if(this._proportionallyResizeElements.length)
for(var b=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var c=this._proportionallyResizeElements[
a];
if(!this.borderDif){var d=[c.css(
"borderTopWidth"),c.css(
"borderRightWidth"),c.css(
"borderBottomWidth"),c.css(
"borderLeftWidth")],f=[c.css(
"paddingTop"),c.css(
"paddingRight"),c.css(
"paddingBottom"),c.css(
"paddingLeft")];this.borderDif=e.map(d,
function(g,h){g=parseInt(g,10)||
723 0;h=parseInt(f[h],10)||0;
return g+h})}e.browser.msie&&(e(b).is(
":hidden")||e(b).parents(
":hidden").length)||c.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:
function(){var b=this.options;this.elementOffset=this.element.offset();
if(this._helper){this.helper=this.helper||e(
'<div style="overflow:hidden;"></div>');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+
724 a,height:this.element.outerHeight()+
a,position:
"absolute",left:this.elementOffset.left-c+
"px",top:this.elementOffset.top-c+
"px",zIndex:++b.zIndex});this.helper.appendTo(
"body").disableSelection()}
else this.helper=this.element},_change:{e:
function(
b,
a){
return{width:this.originalSize.width+a}},w:
function(
b,
a){
return{left:this.originalPosition.left+
a,width:this.originalSize.width-a}},n:
function(
b,
a,c){
return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:
function(
b,
a,c){
return{height:this.originalSize.height+
725 c}},se:
function(
b,
a,c){
return e.extend(this._change.s.apply(
this,arguments),this._change.e.apply(
this,[b,a,c]))},sw:
function(b,a,c){
return e.extend(this._change.s.apply(
this,arguments),this._change.w.apply(
this,[b,a,c]))},ne:
function(b,a,c){
return e.extend(this._change.n.apply(
this,arguments),this._change.e.apply(
this,[b,a,c]))},nw:
function(b,a,c){
return e.extend(this._change.n.apply(
this,arguments),this._change.w.apply(
this,[b,a,c]))}},_propagate:
function(b,a){e.ui.plugin.call(
this,b,[a,this.ui()]);
726 b!=
"resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:
function(){
return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{
version:
"1.8.16"});e.ui.plugin.add(
"resizable",
"alsoResize",{start:
function(){var b=e(
this).data(
"resizable").options,a=
function(c){e(c).each(
function(){var d=e(
this);d.data(
"resizable-alsoresize",{width:parseInt(d.width(),
727 10),height:parseInt(d.height(),10),left:parseInt(d.css(
"left"),10),top:parseInt(d.css(
"top"),10),position:d.css(
"position")})})};
if(typeof b.alsoResize==
"object"&&!b.alsoResize.parentNode)
if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];
a(b.alsoResize)}
else e.each(b.alsoResize,
function(c){a(c)});
else a(b.alsoResize)},resize:
function(
b,
a){var c=e(
this).data(
"resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-
728 f.top||0,left:c.position.left-f.left||0},h=
function(i,j){e(i).each(
function(){var l=e(
this),q=e(
this).data(
"resizable-alsoresize"),p={},r=j&&j.length?j:l.parents(a.originalElement[0]).length?[
"width",
"height"]:[
"width",
"height",
"top",
"left"];e.each(r,
function(n,o){
if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});
if(e.browser.opera&&/relative/.test(l.css(
"position"))){c._revertToRelativePosition=
true;l.css({position:
"absolute",top:
"auto",left:
"auto"})}l.css(p)})};typeof b.alsoResize==
"object"&&!b.alsoResize.nodeType?
729 e.each(b.alsoResize,
function(i,j){h(i,j)}):h(b.alsoResize)},stop:
function(){var b=e(
this).data(
"resizable"),a=b.options,c=
function(d){e(d).each(
function(){var f=e(
this);f.css({position:f.data(
"resizable-alsoresize").position})})};
if(b._revertToRelativePosition){b._revertToRelativePosition=
false;typeof a.alsoResize==
"object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,
function(d){c(d)}):c(a.alsoResize)}e(
this).removeData(
"resizable-alsoresize")}});e.ui.plugin.add(
"resizable",
"animate",{stop:
function(
b){var a=
730 e(
this).data(
"resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],
"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css(
"left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css(
"top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,
731 step:
function(){var i={width:parseInt(a.element.css(
"width"),10),height:parseInt(a.element.css(
"height"),10),top:parseInt(a.element.css(
"top"),10),left:parseInt(a.element.css(
"left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate(
"resize",b)}})}});e.ui.plugin.add(
"resizable",
"containment",{start:
function(){var b=e(
this).data(
"resizable"),a=b.element,c=b.options.containment;
if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=
732 e(a);
if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}
else{var d=e(a),f=[];e([
"Top",
"Right",
"Left",
"Bottom"]).each(
function(i,j){f[i]=m(d.css(
"padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;
733 var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,
"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:
a,left:c.left,top:c.top,width:h,height:g}}}},resize:
function(
b){var a=e(
this).data(
"resizable"),c=a.options,d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;
if(h[0]!=document&&/
static/.test(h.css(
"position")))g=d;
if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:
734 a.position.left-g.left;
if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}
if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;
if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-
735 d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css(
"position"));
if(f&&g)c-=a.parentData.left;
if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;
if(b)a.size.height=a.size.width/a.aspectRatio}
if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;
if(b)a.size.width=a.size.height*a.aspectRatio}},stop:
function(){var b=e(
this).data(
"resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,
736 f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css(
"position"))&&e(
this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/
static/.test(f.css(
"position"))&&e(
this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add(
"resizable",
"ghost",{start:
function(){var b=e(
this).data(
"resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,
737 display:
"block",position:
"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass(
"ui-resizable-ghost").addClass(typeof a.ghost==
"string"?a.ghost:
"");b.ghost.appendTo(b.helper)},resize:
function(){var b=e(
this).data(
"resizable");b.ghost&&b.ghost.css({position:
"relative",height:b.size.height,width:b.size.width})},stop:
function(){var b=e(
this).data(
"resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add(
"resizable",
"grid",{resize:
function(){var b=
738 e(
this).data(
"resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid==
"number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);
if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}
else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+
a;b.position.top=f.top-a}
else{
if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=
739 d.height+a}
else{b.size.width=d.width+h;b.size.height=d.height+
a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=
function(
b){
return parseInt(b,10)||0},k=
function(
b){
return!isNaN(parseInt(b,10))}})(
jQuery);
754 (
function(e){e.widget(
"ui.selectable",e.ui.mouse,{options:{appendTo:
"body",autoRefresh:
true,distance:0,filter:
"*",tolerance:
"touch"},_create:
function(){var c=
this;this.element.addClass(
"ui-selectable");this.dragged=
false;var f;this.refresh=
function(){f=e(c.options.filter,c.element[0]);f.each(
function(){var d=e(
this),b=d.offset();e.data(
this,
"selectable-item",{element:
this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:
false,selected:d.hasClass(
"ui-selected"),
755 selecting:d.hasClass(
"ui-selecting"),unselecting:d.hasClass(
"ui-unselecting")})})};this.refresh();this.selectees=f.addClass(
"ui-selectee");this._mouseInit();this.helper=e(
"<div class='ui-selectable-helper'></div>")},
destroy:
function(){this.selectees.removeClass(
"ui-selectee").removeData(
"selectable-item");this.element.removeClass(
"ui-selectable ui-selectable-disabled").removeData(
"selectable").unbind(
".selectable");this._mouseDestroy();
return this},_mouseStart:
function(c){var f=
this;this.opos=[c.pageX,
756 c.pageY];
if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,
this.element[0]);this._trigger(
"start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(
".ui-selected").each(
function(){var b=e.data(
this,
"selectable-item");b.startselected=
true;
if(!c.metaKey){b.$element.removeClass(
"ui-selected");b.selected=
false;b.$element.addClass(
"ui-unselecting");b.unselecting=
true;f._trigger(
"unselecting",
757 c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(
function(){var b=e.data(
this,
"selectable-item");
if(b){var g=!c.metaKey||!b.$element.hasClass(
"ui-selected");b.$element.removeClass(g?
"ui-unselecting":
"ui-selected").addClass(g?
"ui-selecting":
"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger(
"selecting",c,{selecting:b.element}):f._trigger(
"unselecting",c,{unselecting:b.element});
return false}})}},_mouseDrag:
function(c){var f=
this;this.dragged=
true;
if(!this.options.disabled){var d=
758 this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;
if(b>h){var j=h;h=
b;b=j}
if(g>i){j=i;i=g;g=j}this.helper.css({left:
b,top:g,width:h-
b,height:i-g});this.selectees.each(
function(){var a=e.data(
this,
"selectable-item");
if(!(!a||a.element==f.element[0])){var k=
false;
if(d.tolerance==
"touch")k=!(a.left>h||a.right<b||a.top>i||a.bottom<g);
else if(d.tolerance==
"fit")k=a.left>b&&a.right<h&&a.top>g&&a.bottom<i;
if(k){
if(a.selected){a.$element.removeClass(
"ui-selected");a.selected=
false}
if(a.unselecting){a.$element.removeClass(
"ui-unselecting");
759 a.unselecting=
false}
if(!a.selecting){a.$element.addClass(
"ui-selecting");a.selecting=
true;f._trigger(
"selecting",c,{selecting:a.element})}}
else{
if(a.selecting)
if(c.metaKey&&a.startselected){a.$element.removeClass(
"ui-selecting");a.selecting=
false;a.$element.addClass(
"ui-selected");a.selected=
true}
else{a.$element.removeClass(
"ui-selecting");a.selecting=
false;
if(a.startselected){a.$element.addClass(
"ui-unselecting");a.unselecting=
true}f._trigger(
"unselecting",c,{unselecting:a.element})}
if(a.selected)
if(!c.metaKey&&
760 !a.startselected){a.$element.removeClass(
"ui-selected");a.selected=
false;a.$element.addClass(
"ui-unselecting");a.unselecting=
true;f._trigger(
"unselecting",c,{unselecting:a.element})}}}});
return false}},_mouseStop:
function(c){var f=
this;this.dragged=
false;e(
".ui-unselecting",this.element[0]).each(
function(){var d=e.data(
this,
"selectable-item");d.$element.removeClass(
"ui-unselecting");d.unselecting=
false;d.startselected=
false;f._trigger(
"unselected",c,{unselected:d.element})});e(
".ui-selecting",this.element[0]).each(
function(){var d=
761 e.data(
this,
"selectable-item");d.$element.removeClass(
"ui-selecting").addClass(
"ui-selected");d.selecting=
false;d.selected=
true;d.startselected=
true;f._trigger(
"selected",c,{selected:d.element})});this._trigger(
"stop",c);this.helper.remove();
return false}});e.extend(e.ui.selectable,{
version:
"1.8.16"})})(
jQuery);
776 (
function(d){d.widget(
"ui.sortable",d.ui.mouse,{widgetEventPrefix:
"sort",options:{appendTo:
"parent",axis:
false,connectWith:
false,containment:
false,cursor:
"auto",cursorAt:
false,dropOnEmpty:
true,forcePlaceholderSize:
false,forceHelperSize:
false,grid:
false,handle:
false,helper:
"original",items:
"> *",opacity:
false,placeholder:
false,revert:
false,scroll:
true,scrollSensitivity:20,scrollSpeed:20,scope:
"default",tolerance:
"intersect",zIndex:1E3},_create:
function(){var a=this.options;this.containerCache={};this.element.addClass(
"ui-sortable");
777 this.refresh();this.floating=this.items.length?a.axis===
"x"||/left|right/.test(this.items[0].item.css(
"float"))||/
inline|table-cell/.test(this.items[0].item.css(
"display")):
false;this.offset=this.element.offset();this._mouseInit()},
destroy:
function(){this.element.removeClass(
"ui-sortable ui-sortable-disabled").removeData(
"sortable").unbind(
".sortable");this._mouseDestroy();
for(var a=this.items.length-1;a>=0;a--)this.items[
a].item.removeData(
"sortable-item");
return this},_setOption:
function(
a,
b){
if(a===
778 "disabled"){this.options[
a]=
b;this.widget()[b?
"addClass":
"removeClass"](
"ui-sortable-disabled")}
else d.Widget.prototype._setOption.apply(
this,arguments)},_mouseCapture:
function(
a,
b){
if(this.reverting)
return false;
if(this.options.disabled||
this.options.type==
"static")
return false;this._refreshItems(a);var c=null,e=
this;d(a.target).parents().each(
function(){
if(d.data(
this,
"sortable-item")==e){c=d(
this);
return false}});
if(d.data(a.target,
"sortable-item")==e)c=d(a.target);
if(!c)
return false;
if(this.options.handle&&
779 !b){var f=
false;d(this.options.handle,c).find(
"*").andSelf().each(
function(){
if(
this==a.target)f=
true});
if(!f)
return false}this.currentItem=c;this._removeCurrentsFromItems();
return true},_mouseStart:
function(
a,
b,c){b=this.options;var e=
this;this.currentContainer=
this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,
780 left:this.offset.left-this.margins.left};this.helper.css(
"position",
"absolute");this.cssPosition=this.helper.css(
"position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};
781 this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();
if(b.cursor){
if(d(
"body").css(
"cursor"))this._storedCursor=d(
"body").css(
"cursor");d(
"body").css(
"cursor",b.cursor)}
if(b.opacity){
if(this.helper.css(
"opacity"))this._storedOpacity=this.helper.css(
"opacity");this.helper.css(
"opacity",b.opacity)}
if(b.zIndex){
if(this.helper.css(
"zIndex"))this._storedZIndex=this.helper.css(
"zIndex");this.helper.css(
"zIndex",b.zIndex)}
if(this.scrollParent[0]!=
782 document&&this.scrollParent[0].tagName!=
"HTML")this.overflowOffset=this.scrollParent.offset();this._trigger(
"start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();
if(!c)
for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger(
"activate",a,e._uiHash(
this));
if(d.ui.ddmanager)d.ui.ddmanager.current=
this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(
this,a);this.dragging=
true;this.helper.addClass(
"ui-sortable-helper");this._mouseDrag(a);
783 return true},_mouseDrag:
function(
a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo(
"absolute");
if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;
if(this.options.scroll){var b=this.options,c=
false;
if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!=
"HTML"){
if(this.overflowOffset.top+
this.scrollParent[0].offsetHeight-a.pageY<b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+b.scrollSpeed;
else if(a.pageY-
this.overflowOffset.top<
784 b.scrollSensitivity)this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-b.scrollSpeed;
if(this.overflowOffset.left+
this.scrollParent[0].offsetWidth-a.pageX<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+b.scrollSpeed;
else if(a.pageX-
this.overflowOffset.left<b.scrollSensitivity)this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-b.scrollSpeed}
else{
if(a.pageY-d(document).scrollTop()<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()-
785 b.scrollSpeed);
else if(d(window).height()-(a.pageY-d(document).scrollTop())<b.scrollSensitivity)c=d(document).scrollTop(d(document).scrollTop()+b.scrollSpeed);
if(a.pageX-d(document).scrollLeft()<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()-b.scrollSpeed);
else if(d(window).width()-(a.pageX-d(document).scrollLeft())<b.scrollSensitivity)c=d(document).scrollLeft(d(document).scrollLeft()+b.scrollSpeed)}c!==
false&&d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(
this,
786 a)}this.positionAbs=this._convertPositionTo(
"absolute");
if(!this.options.axis||
this.options.axis!=
"y")this.helper[0].style.left=this.position.left+
"px";
if(!this.options.axis||
this.options.axis!=
"x")this.helper[0].style.top=this.position.top+
"px";
for(b=this.items.length-1;b>=0;b--){c=this.items[
b];var e=c.item[0],f=this._intersectsWithPointer(c);
if(f)
if(e!=this.currentItem[0]&&this.placeholder[f==1?
"next":
"prev"]()[0]!=e&&!d.ui.contains(
this.placeholder[0],e)&&(this.options.type==
"semi-dynamic"?!d.ui.contains(this.element[0],
787 e):
true)){this.direction=f==1?
"down":
"up";
if(this.options.tolerance==
"pointer"||
this._intersectsWithSides(c))this._rearrange(a,c);
else break;this._trigger(
"change",a,this._uiHash());
break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(
this,a);this._trigger(
"sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;
return false},_mouseStop:
function(
a,
b){
if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(
this,a);
if(this.options.revert){var c=
this;b=c.placeholder.offset();
788 c.reverting=
true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:b.top-
this.offset.parent.top-c.margins.top+(
this.offsetParent[0]==document.body?0:
this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,
function(){c._clear(a)})}
else this._clear(a,b);
return false}},cancel:
function(){var a=
this;
if(this.dragging){this._mouseUp({target:null});this.options.helper==
"original"?this.currentItem.css(this._storedCSS).removeClass(
"ui-sortable-helper"):
789 this.currentItem.show();
for(var b=this.containers.length-1;b>=0;b--){this.containers[
b]._trigger(
"deactivate",null,a._uiHash(
this));
if(this.containers[b].containerCache.over){this.containers[
b]._trigger(
"out",null,a._uiHash(
this));this.containers[
b].containerCache.over=0}}}
if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!=
"original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(
this,{helper:null,
790 dragging:
false,reverting:
false,_noFinalSort:null});this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem)}
return this},serialize:
function(
a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(
function(){var e=(d(a.item||
this).attr(a.attribute||
"id")||
"").match(a.expression||/(.+)[-=_](.+)/);
if(e)c.push((a.key||e[1]+
"[]")+
"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+
"=");
return c.join(
"&")},
791 toArray:
function(
a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(
function(){c.push(d(a.item||
this).attr(a.attribute||
"id")||
"")});
return c},_intersectsWith:
function(
a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+j<k&&b+l>g&&b+l<h;
return this.options.tolerance==
"pointer"||this.options.forcePointerForContainers||
792 this.options.tolerance!=
"pointer"&&this.helperProportions[this.floating?
"width":
"height"]>a[this.floating?
"width":
"height"]?j:g<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<h&&i<e+this.helperProportions.height/2&&f-this.helperProportions.height/2<k},_intersectsWithPointer:
function(
a){var b=d.ui.isOverAxis(this.positionAbs.top+
this.offset.click.top,a.top,a.height);a=d.ui.isOverAxis(this.positionAbs.left+
this.offset.click.left,a.left,a.width);b=b&&
a;a=this._getDragVerticalDirection();
793 var c=this._getDragHorizontalDirection();
if(!b)
return false;
return this.floating?c&&c==
"right"||a==
"down"?2:1:a&&(a==
"down"?2:1)},_intersectsWithSides:
function(a){var b=d.ui.isOverAxis(this.positionAbs.top+
this.offset.click.top,a.top+a.height/2,a.height);a=d.ui.isOverAxis(this.positionAbs.left+
this.offset.click.left,a.left+a.width/2,a.width);var c=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();
return this.floating&&e?e==
"right"&&a||e==
"left"&&!a:c&&(c==
"down"&&b||c==
"up"&&!
b)},
794 _getDragVerticalDirection:
function(){var a=this.positionAbs.top-this.lastPositionAbs.top;
return a!=0&&(a>0?
"down":
"up")},_getDragHorizontalDirection:
function(){var a=this.positionAbs.left-this.lastPositionAbs.left;
return a!=0&&(a>0?
"right":
"left")},refresh:
function(a){this._refreshItems(a);this.refreshPositions();
return this},_connectWith:
function(){var a=this.options;
return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:
function(
a){var b=[],c=[],e=this._connectWith();
795 if(e&&a)
for(a=e.length-1;a>=0;a--)
for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=d.data(f[g],
"sortable");
if(h&&h!=
this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(
".ui-sortable-helper").not(
".ui-sortable-placeholder"),h])}c.push([d.isFunction(
this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,
this.element).not(
".ui-sortable-helper").not(
".ui-sortable-placeholder"),
796 this]);
for(a=c.length-1;a>=0;a--)c[
a][0].each(
function(){b.push(
this)});
return d(b)},_removeCurrentsFromItems:
function(){
for(var a=this.currentItem.find(
":data(sortable-item)"),b=0;b<this.items.length;b++)
for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:
function(
a){this.items=[];this.containers=[
this];var b=this.items,c=[[d.isFunction(this.options.items)?this.options.items.call(this.element[0],a,{item:this.currentItem}):d(this.options.items,
this.element),
797 this]],e=this._connectWith();
if(e)
for(var f=e.length-1;f>=0;f--)
for(var g=d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],
"sortable");
if(i&&i!=
this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:
this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}
for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;
for(g=e.length;h<g;h++){i=d(e[h]);i.data(
"sortable-item",a);b.push({item:i,instance:
a,width:0,height:0,left:0,top:0})}}},refreshPositions:
function(a){
if(this.offsetParent&&
798 this.helper)this.offset.parent=this._getParentOffset();
for(var b=this.items.length-1;b>=0;b--){var c=this.items[
b];
if(!(c.instance!=
this.currentContainer&&
this.currentContainer&&c.item[0]!=
this.currentItem[0])){var e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;
if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}}
if(this.options.custom&&
this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(
this);
else for(b=
799 this.containers.length-1;b>=0;b--){e=this.containers[
b].element.offset();this.containers[
b].containerCache.left=e.left;this.containers[
b].containerCache.top=e.top;this.containers[
b].containerCache.width=this.containers[
b].element.outerWidth();this.containers[
b].containerCache.height=this.containers[
b].element.outerHeight()}
return this},_createPlaceholder:
function(
a){var b=a||
this,c=b.options;
if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:
function(){var f=
800 d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+
" ui-sortable-placeholder").removeClass(
"ui-sortable-helper")[0];
if(!e)f.style.visibility=
"hidden";
return f},update:
function(f,g){
if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css(
"paddingTop")||0,10)-parseInt(b.currentItem.css(
"paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css(
"paddingLeft")||0,10)-parseInt(b.currentItem.css(
"paddingRight")||
801 0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);c.placeholder.update(b,b.placeholder)},_contactContainers:
function(
a){
for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)
if(!d.ui.contains(
this.currentItem[0],
this.containers[e].element[0]))
if(this._intersectsWith(this.containers[e].containerCache)){
if(!(b&&d.ui.contains(
this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}
else if(this.containers[e].containerCache.over){this.containers[e]._trigger(
"out",
802 a,this._uiHash(
this));this.containers[e].containerCache.over=0}
if(b)
if(this.containers.length===1){this.containers[c]._trigger(
"over",a,this._uiHash(
this));this.containers[c].containerCache.over=1}
else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;
for(var f=this.positionAbs[this.containers[c].floating?
"left":
"top"],g=this.items.length-1;g>=0;g--)
if(d.ui.contains(
this.containers[c].element[0],
this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?
"left":
"top"];
if(Math.abs(h-
803 f)<
b){b=Math.abs(h-f);e=this.items[g]}}
if(e||this.options.dropOnEmpty){this.currentContainer=this.containers[c];e?this._rearrange(a,e,null,
true):this._rearrange(a,null,this.containers[c].element,
true);this._trigger(
"change",a,this._uiHash());this.containers[c]._trigger(
"change",a,this._uiHash(
this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[c]._trigger(
"over",a,this._uiHash(
this));this.containers[c].containerCache.over=1}}},_createHelper:
function(
a){var b=
804 this.options;a=d.isFunction(b.helper)?d(b.helper.apply(
this.element[0],[a,
this.currentItem])):b.helper==
"clone"?
this.currentItem.clone():this.currentItem;a.parents(
"body").length||d(b.appendTo!=
"parent"?b.appendTo:
this.currentItem[0].parentNode)[0].appendChild(a[0]);
if(a[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css(
"position"),top:this.currentItem.css(
"top"),left:this.currentItem.css(
"left")};
if(a[0].style.width==
805 ""||b.forceHelperSize)a.width(this.currentItem.width());
if(a[0].style.height==
""||b.forceHelperSize)a.height(this.currentItem.height());
return a},_adjustOffsetFromHelper:
function(
a){
if(typeof a==
"string")a=a.split(
" ");
if(d.isArray(a))a={left:+a[0],top:+a[1]||0};
if(
"left"in a)this.offset.click.left=a.left+this.margins.left;
if(
"right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;
if(
"top"in a)this.offset.click.top=a.top+this.margins.top;
if(
"bottom"in a)this.offset.click.top=
806 this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:
function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();
if(this.cssPosition==
"absolute"&&this.scrollParent[0]!=document&&d.ui.contains(
this.scrollParent[0],
this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}
if(this.offsetParent[0]==document.body||
this.offsetParent[0].tagName&&
this.offsetParent[0].tagName.toLowerCase()==
"html"&&d.browser.msie)a=
807 {top:0,left:0};
return{top:a.top+(parseInt(this.offsetParent.css(
"borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css(
"borderLeftWidth"),10)||0)}},_getRelativeOffset:
function(){
if(this.cssPosition==
"relative"){var a=this.currentItem.position();
return{top:a.top-(parseInt(this.helper.css(
"top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css(
"left"),10)||0)+this.scrollParent.scrollLeft()}}
else return{top:0,left:0}},_cacheMargins:
function(){this.margins={left:parseInt(this.currentItem.css(
"marginLeft"),
808 10)||0,top:parseInt(this.currentItem.css(
"marginTop"),10)||0}},_cacheHelperProportions:
function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:
function(){var a=this.options;
if(a.containment==
"parent")a.containment=this.helper[0].parentNode;
if(a.containment==
"document"||a.containment==
"window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,d(a.containment==
"document"?
809 document:window).width()-this.helperProportions.width-this.margins.left,(d(a.containment==
"document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-
this.margins.top];
if(!/^(document|window|parent)$/.test(a.containment)){var b=d(a.containment)[0];a=d(a.containment).offset();var c=d(b).css(
"overflow")!=
"hidden";this.containment=[a.left+(parseInt(d(b).css(
"borderLeftWidth"),10)||0)+(parseInt(d(b).css(
"paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css(
"borderTopWidth"),
810 10)||0)+(parseInt(d(b).css(
"paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css(
"borderLeftWidth"),10)||0)-(parseInt(d(b).css(
"paddingRight"),10)||0)-this.helperProportions.width-
this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css(
"borderTopWidth"),10)||0)-(parseInt(d(b).css(
"paddingBottom"),10)||0)-this.helperProportions.height-
this.margins.top]}},_convertPositionTo:
function(
a,
b){
if(!b)b=
811 this.position;a=a==
"absolute"?1:-1;var c=this.cssPosition==
"absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);
return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&this.cssPosition==
"fixed"?0:(this.cssPosition==
"fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&
812 this.cssPosition==
"fixed"?0:(this.cssPosition==
"fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())*a)}},_generatePosition:
function(
a){var b=this.options,c=this.cssPosition==
"absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);
if(this.cssPosition==
"relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();
813 var f=a.pageX,g=a.pageY;
if(this.originalPosition){
if(this.containment){
if(a.pageX-
this.offset.click.left<
this.containment[0])f=this.containment[0]+this.offset.click.left;
if(a.pageY-
this.offset.click.top<
this.containment[1])g=this.containment[1]+this.offset.click.top;
if(a.pageX-
this.offset.click.left>
this.containment[2])f=this.containment[2]+this.offset.click.left;
if(a.pageY-
this.offset.click.top>
this.containment[3])g=this.containment[3]+this.offset.click.top}
if(b.grid){g=this.originalPageY+Math.round((g-
814 this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:!(g-this.offset.click.top<
this.containment[1])?g-b.grid[1]:g+b.grid[1]:g;f=this.originalPageX+Math.round((f-this.originalPageX)/b.grid[0])*b.grid[0];f=this.containment?!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:!(f-this.offset.click.left<
this.containment[0])?f-b.grid[0]:f+b.grid[0]:f}}
return{top:g-
815 this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&this.cssPosition==
"fixed"?0:this.cssPosition==
"fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop()),left:f-this.offset.click.left-
this.offset.relative.left-
this.offset.parent.left+(d.browser.safari&&
this.cssPosition==
"fixed"?0:
this.cssPosition==
"fixed"?-
this.scrollParent.scrollLeft():e?0:c.scrollLeft())}},_rearrange:
function(a,b,c,e){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],
816 this.direction==
"down"?b.item[0]:b.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var f=
this,g=this.counter;window.setTimeout(
function(){g==f.counter&&f.refreshPositions(!e)},0)},_clear:
function(a,b){this.reverting=
false;var c=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;
if(this.helper[0]==this.currentItem[0]){
for(var e in this._storedCSS)
if(this._storedCSS[e]==
"auto"||this._storedCSS[e]==
"static")this._storedCSS[e]=
817 "";this.currentItem.css(this._storedCSS).removeClass(
"ui-sortable-helper")}
else this.currentItem.show();this.fromOutside&&!b&&c.push(
function(f){this._trigger(
"receive",f,this._uiHash(this.fromOutside))});
if((this.fromOutside||this.domPosition.prev!=
this.currentItem.prev().not(
".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!b)c.push(
function(f){this._trigger(
"update",f,this._uiHash())});
if(!d.ui.contains(
this.element[0],
this.currentItem[0])){b||c.push(
function(f){this._trigger(
"remove",
818 f,this._uiHash())});
for(e=this.containers.length-1;e>=0;e--)
if(d.ui.contains(
this.containers[e].element[0],
this.currentItem[0])&&!
b){c.push(
function(f){
return function(g){f._trigger(
"receive",g,this._uiHash(
this))}}.call(
this,this.containers[e]));c.push(
function(f){
return function(g){f._trigger(
"update",g,this._uiHash(
this))}}.call(
this,this.containers[e]))}}
for(e=this.containers.length-1;e>=0;e--){b||c.push(
function(f){
return function(g){f._trigger(
"deactivate",g,this._uiHash(
this))}}.call(
this,
819 this.containers[e]));
if(this.containers[e].containerCache.over){c.push(
function(f){
return function(g){f._trigger(
"out",g,this._uiHash(
this))}}.call(
this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d(
"body").css(
"cursor",this._storedCursor);this._storedOpacity&&this.helper.css(
"opacity",this._storedOpacity);
if(this._storedZIndex)this.helper.css(
"zIndex",this._storedZIndex==
"auto"?
"":this._storedZIndex);this.dragging=
false;
if(this.cancelHelperRemoval){
if(!b){this._trigger(
"beforeStop",
820 a,this._uiHash());
for(e=0;e<c.length;e++)c[e].call(
this,a);this._trigger(
"stop",a,this._uiHash())}
return false}b||this._trigger(
"beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;
if(!b){
for(e=0;e<c.length;e++)c[e].call(
this,a);this._trigger(
"stop",a,this._uiHash())}this.fromOutside=
false;
return true},_trigger:
function(){d.Widget.prototype._trigger.apply(
this,arguments)===
false&&this.cancel()},
821 _uiHash:
function(
a){var b=a||
this;
return{helper:b.helper,placeholder:b.placeholder||d([]),position:b.position,originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?a.element:null}}});d.extend(d.ui.sortable,{
version:
"1.8.16"})})(
jQuery);
835 (
function(c){c.widget(
"ui.accordion",{options:{active:0,animated:
"slide",autoHeight:
true,clearStyle:
false,collapsible:
false,
event:
"click",fillSpace:
false,header:
"> li > :first-child,> :not(li):even",icons:{header:
"ui-icon-triangle-1-e",headerSelected:
"ui-icon-triangle-1-s"},navigation:
false,navigationFilter:
function(){
return this.href.toLowerCase()===location.href.toLowerCase()}},_create:
function(){var a=
this,b=a.options;a.running=0;a.element.addClass(
"ui-accordion ui-widget ui-helper-reset").children(
"li").addClass(
"ui-accordion-li-fix");
836 a.headers=a.element.find(b.header).addClass(
"ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind(
"mouseenter.accordion",
function(){b.disabled||c(
this).addClass(
"ui-state-hover")}).bind(
"mouseleave.accordion",
function(){b.disabled||c(
this).removeClass(
"ui-state-hover")}).bind(
"focus.accordion",
function(){b.disabled||c(
this).addClass(
"ui-state-focus")}).bind(
"blur.accordion",
function(){b.disabled||c(
this).removeClass(
"ui-state-focus")});a.headers.next().addClass(
"ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
837 if(b.navigation){var d=a.element.find(
"a").filter(b.navigationFilter).eq(0);
if(d.length){var h=d.closest(
".ui-accordion-header");a.active=h.length?h:d.closest(
".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass(
"ui-state-default ui-state-active").toggleClass(
"ui-corner-all").toggleClass(
"ui-corner-top");a.active.next().addClass(
"ui-accordion-content-active");a._createIcons();a.resize();a.element.attr(
"role",
"tablist");a.headers.attr(
"role",
"tab").bind(
"keydown.accordion",
838 function(f){
return a._keydown(f)}).next().attr(
"role",
"tabpanel");a.headers.not(a.active||
"").attr({
"aria-expanded":
"false",
"aria-selected":
"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({
"aria-expanded":
"true",
"aria-selected":
"true",tabIndex:0}):a.headers.eq(0).attr(
"tabIndex",0);c.browser.safari||a.headers.find(
"a").attr(
"tabIndex",-1);b.event&&a.headers.bind(b.event.split(
" ").join(
".accordion ")+
".accordion",
function(f){a._clickHandler.call(a,f,
this);f.preventDefault()})},_createIcons:
function(){var a=
839 this.options;
if(a.icons){c(
"<span></span>").addClass(
"ui-icon "+a.icons.header).prependTo(this.headers);this.active.children(
".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass(
"ui-accordion-icons")}},_destroyIcons:
function(){this.headers.children(
".ui-icon").remove();this.element.removeClass(
"ui-accordion-icons")},
destroy:
function(){var a=this.options;this.element.removeClass(
"ui-accordion ui-widget ui-helper-reset").removeAttr(
"role");this.headers.unbind(
".accordion").removeClass(
"ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr(
"role").removeAttr(
"aria-expanded").removeAttr(
"aria-selected").removeAttr(
"tabIndex");
840 this.headers.find(
"a").removeAttr(
"tabIndex");this._destroyIcons();var b=this.headers.next().css(
"display",
"").removeAttr(
"role").removeClass(
"ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");
if(a.autoHeight||a.fillHeight)b.css(
"height",
"");
return c.Widget.prototype.destroy.call(
this)},_setOption:
function(
a,
b){c.Widget.prototype._setOption.apply(
this,arguments);a==
"active"&&this.activate(b);
if(a==
"icons"){this._destroyIcons();
841 b&&this._createIcons()}
if(a==
"disabled")this.headers.add(this.headers.next())[b?
"addClass":
"removeClass"](
"ui-accordion-disabled ui-state-disabled")},_keydown:
function(
a){
if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=
false;
switch(a.keyCode){
case b.RIGHT:
case b.DOWN:f=this.headers[(h+1)%d];
break;
case b.LEFT:
case b.UP:f=this.headers[(h-1+d)%d];
break;
case b.SPACE:
case b.ENTER:this._clickHandler({target:a.target},a.target);
842 a.preventDefault()}
if(f){c(a.target).attr(
"tabIndex",-1);c(f).attr(
"tabIndex",0);f.focus();
return false}
return true}},resize:
function(){var a=this.options,
b;
if(a.fillSpace){
if(c.browser.msie){var d=this.element.parent().css(
"overflow");this.element.parent().css(
"overflow",
"hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css(
"overflow",d);this.headers.each(
function(){b-=c(
this).outerHeight(
true)});this.headers.next().each(
function(){c(
this).height(Math.max(0,b-c(
this).innerHeight()+
843 c(
this).height()))}).css(
"overflow",
"auto")}
else if(a.autoHeight){b=0;this.headers.next().each(
function(){b=Math.max(b,c(
this).height(
"").height())}).height(b)}
return this},activate:
function(
a){this.options.active=
a;a=this._findActive(a)[0];this._clickHandler({target:a},
a);
return this},_findActive:
function(
a){
return a?typeof a===
"number"?this.headers.filter(
":eq("+a+
")"):this.headers.not(this.headers.not(a)):a===
false?c([]):this.headers.filter(
":eq(0)")},_clickHandler:
function(
a,
b){var d=this.options;
844 if(!d.disabled)
if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?
false:this.headers.index(a);
if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):
a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):
a;this._toggle(j,g,e,b,f);h.removeClass(
"ui-state-active ui-corner-top").addClass(
"ui-state-default ui-corner-all").children(
".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);
845 if(!b){a.removeClass(
"ui-state-default ui-corner-all").addClass(
"ui-state-active ui-corner-top").children(
".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass(
"ui-accordion-content-active")}}}
else if(d.collapsible){this.active.removeClass(
"ui-state-active ui-corner-top").addClass(
"ui-state-default ui-corner-all").children(
".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass(
"ui-accordion-content-active");var g=this.active.next(),
846 e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:
function(
a,
b,d,h,f){var g=
this,e=g.options;g.toShow=
a;g.toHide=
b;g.data=d;var j=
function(){
if(g)
return g._completed.apply(g,arguments)};g._trigger(
"changestart",null,g.data);g.running=b.size()===0?a.size():b.size();
if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:
b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:
a,toHide:
b,complete:j,down:f,autoHeight:e.autoHeight||
847 e.fillSpace};
if(!e.proxied)e.proxied=e.animated;
if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;
if(k&&!h[k]&&!c.easing[k])k=
"slide";h[k]||(h[k]=
function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}
else{
if(e.collapsible&&h)a.toggle();
else{b.hide();a.show()}j(
true)}b.prev().attr({
"aria-expanded":
"false",
848 "aria-selected":
"false",tabIndex:-1}).blur();a.prev().attr({
"aria-expanded":
"true",
"aria-selected":
"true",tabIndex:0}).focus()},_completed:
function(
a){this.running=a?0:--this.running;
if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:
"",overflow:
""});this.toHide.removeClass(
"ui-accordion-content-active");
if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger(
"change",null,this.data)}}});c.extend(c.ui.accordion,{
version:
"1.8.16",
849 animations:{slide:
function(a,b){a=c.extend({easing:
"swing",duration:300},
a,
b);
if(a.toHide.size())
if(a.toShow.size()){var d=a.toShow.css(
"overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css(
"paddingLeft"),10)-parseInt(b.css(
"paddingRight"),10)-(parseInt(b.css(
"borderLeftWidth"),10)||0)-(parseInt(b.css(
"borderRightWidth"),10)||0));c.each([
"height",
"paddingTop",
"paddingBottom"],
function(j,i){g[i]=
"hide";j=(
""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/);
850 f[i]={value:j[1],unit:j[2]||
"px"}});a.toShow.css({height:0,overflow:
"hidden"}).show();a.toHide.filter(
":hidden").each(a.complete).end().filter(
":visible").animate(g,{step:
function(j,i){
if(i.prop==
"height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:
function(){a.autoHeight||a.toShow.css(
"height",
"");a.toShow.css({width:e,overflow:d});a.complete()}})}
else a.toHide.animate({height:
"hide",
851 paddingTop:
"hide",paddingBottom:
"hide"},
a);
else a.toShow.animate({height:
"show",paddingTop:
"show",paddingBottom:
"show"},
a)},bounceslide:
function(a){this.slide(a,{easing:a.down?
"easeOutBounce":
"swing",duration:a.down?1E3:200})}}})})(
jQuery);
866 (
function(d){var e=0;d.widget(
"ui.autocomplete",{options:{appendTo:
"body",autoFocus:
false,delay:300,minLength:1,position:{my:
"left top",at:
"left bottom",collision:
"none"},source:null},pending:0,_create:
function(){var a=
this,b=this.element[0].ownerDocument,g;this.element.addClass(
"ui-autocomplete-input").attr(
"autocomplete",
"off").attr({role:
"textbox",
"aria-autocomplete":
"list",
"aria-haspopup":
"true"}).bind(
"keydown.autocomplete",
function(c){
if(!(a.options.disabled||a.element.propAttr(
"readOnly"))){g=
867 false;var f=d.ui.keyCode;
switch(c.keyCode){
case f.PAGE_UP:a._move(
"previousPage",c);
break;
case f.PAGE_DOWN:a._move(
"nextPage",c);
break;
case f.UP:a._move(
"previous",c);c.preventDefault();
break;
case f.DOWN:a._move(
"next",c);c.preventDefault();
break;
case f.ENTER:
case f.NUMPAD_ENTER:
if(a.menu.active){g=
true;c.preventDefault()}
case f.TAB:
if(!a.menu.active)
return;a.menu.select(c);
break;
case f.ESCAPE:a.element.val(a.term);a.close(c);
break;
default:clearTimeout(a.searching);a.searching=setTimeout(
function(){
if(a.term!=
868 a.element.val()){a.selectedItem=null;a.search(null,c)}},a.options.delay);
break}}}).bind(
"keypress.autocomplete",
function(c){
if(g){g=
false;c.preventDefault()}}).bind(
"focus.autocomplete",
function(){
if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind(
"blur.autocomplete",
function(c){
if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(
function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=
function(){
return a._response.apply(a,arguments)};
869 this.menu=d(
"<ul></ul>").addClass(
"ui-autocomplete").appendTo(d(this.options.appendTo||
"body",b)[0]).mousedown(
function(c){var f=a.menu.element[0];d(c.target).closest(
".ui-menu-item").length||setTimeout(
function(){d(document).one(
"mousedown",
function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(
function(){clearTimeout(a.closing)},13)}).menu({focus:
function(c,f){f=f.item.data(
"item.autocomplete");
false!==a._trigger(
"focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&&
870 a.element.val(f.value)},selected:
function(c,f){var h=f.item.data(
"item.autocomplete"),i=a.previous;
if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(
function(){a.previous=i;a.selectedItem=h},1)}
false!==a._trigger(
"select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:
function(){a.menu.element.is(
":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data(
"menu");
871 d.fn.bgiframe&&this.menu.element.bgiframe()},
destroy:
function(){this.element.removeClass(
"ui-autocomplete-input").removeAttr(
"autocomplete").removeAttr(
"role").removeAttr(
"aria-autocomplete").removeAttr(
"aria-haspopup");this.menu.element.remove();d.Widget.prototype.destroy.call(
this)},_setOption:
function(
a,
b){d.Widget.prototype._setOption.apply(
this,arguments);a===
"source"&&this._initSource();
if(a===
"appendTo")this.menu.element.appendTo(d(b||
"body",this.element[0].ownerDocument)[0]);a===
"disabled"&&
872 b&&this.xhr&&this.xhr.abort()},_initSource:
function(){var a=
this,
b,g;
if(d.isArray(
this.options.source)){b=this.options.source;this.source=
function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}
else if(typeof this.options.source===
"string"){g=this.options.source;this.source=
function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:
"json",autocompleteRequest:++e,success:
function(h){this.autocompleteRequest===e&&f(h)},error:
function(){this.autocompleteRequest===e&&f([])}})}}
else this.source=
873 this.options.source},search:
function(
a,
b){a=a!=null?a:this.element.val();this.term=this.element.val();
if(a.length<
this.options.minLength)
return this.close(b);clearTimeout(this.closing);
if(this._trigger(
"search",b)!==
false)
return this._search(a)},_search:
function(
a){this.pending++;this.element.addClass(
"ui-autocomplete-loading");this.source({term:a},this.response)},_response:
function(a){
if(!this.options.disabled&&a&&a.length){a=this._normalize(a);this._suggest(a);this._trigger(
"open")}
else this.close();
874 this.pending--;this.pending||this.element.removeClass(
"ui-autocomplete-loading")},close:
function(
a){clearTimeout(this.closing);
if(this.menu.element.is(
":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger(
"close",a)}},_change:
function(
a){this.previous!==this.element.val()&&this._trigger(
"change",a,{item:this.selectedItem})},_normalize:
function(a){
if(a.length&&a[0].label&&a[0].value)
return a;
return d.map(a,
function(b){
if(typeof b===
"string")
return{label:
b,value:b};
return d.extend({label:b.label||
875 b.value,value:b.value||b.label},
b)})},_suggest:
function(
a){var b=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(b,a);this.menu.deactivate();this.menu.refresh();b.show();this._resizeMenu();b.position(d.extend({of:
this.element},this.options.position));this.options.autoFocus&&this.menu.next(
new d.Event(
"mouseover"))},_resizeMenu:
function(){var a=this.menu.element;a.outerWidth(Math.max(a.width(
"").outerWidth(),this.element.outerWidth()))},_renderMenu:
function(
a,
b){var g=
this;
876 d.each(b,
function(c,f){g._renderItem(a,f)})},_renderItem:
function(a,b){
return d(
"<li></li>").data(
"item.autocomplete",b).append(d(
"<a></a>").text(b.label)).appendTo(a)},_move:
function(
a,
b){
if(this.menu.element.is(
":visible"))
if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}
else this.menu[
a](
b);
else this.search(null,b)},widget:
function(){
return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:
function(a){
return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,
877 "\\$&")},filter:
function(
a,
b){var g=
new RegExp(d.ui.autocomplete.escapeRegex(b),
"i");
return d.grep(a,
function(c){
return g.test(c.label||c.value||c)})}})})(
jQuery);
878 (
function(d){d.widget(
"ui.menu",{_create:
function(){var e=
this;this.element.addClass(
"ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:
"listbox",
"aria-activedescendant":
"ui-active-menuitem"}).click(
function(a){
if(d(a.target).closest(
".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:
function(){var e=
this;this.element.children(
"li:not(.ui-menu-item):has(a)").addClass(
"ui-menu-item").attr(
"role",
"menuitem").children(
"a").addClass(
"ui-corner-all").attr(
"tabindex",
879 -1).mouseenter(
function(a){e.activate(a,d(
this).parent())}).mouseleave(
function(){e.deactivate()})},activate:
function(e,a){this.deactivate();
if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.scrollTop(),c=this.element.height();
if(b<0)this.element.scrollTop(g+b);
else b>=c&&this.element.scrollTop(g+b-c+a.height())}this.active=a.eq(0).children(
"a").addClass(
"ui-state-hover").attr(
"id",
"ui-active-menuitem").end();this._trigger(
"focus",e,{item:a})},deactivate:
function(){
if(this.active){this.active.children(
"a").removeClass(
"ui-state-hover").removeAttr(
"id");
880 this._trigger(
"blur");this.active=null}},next:
function(e){this.move(
"next",
".ui-menu-item:first",e)},previous:
function(e){this.move(
"prev",
".ui-menu-item:last",e)},first:
function(){
return this.active&&!this.active.prevAll(
".ui-menu-item").length},last:
function(){
return this.active&&!this.active.nextAll(
".ui-menu-item").length},move:
function(e,
a,
b){
if(this.active){e=this.active[e+
"All"](
".ui-menu-item").eq(0);e.length?this.activate(b,e):this.activate(b,this.element.children(a))}
else this.activate(b,
881 this.element.children(a))},nextPage:
function(e){
if(this.hasScroll())
if(!this.active||this.last())this.activate(e,this.element.children(
".ui-menu-item:first"));
else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(
".ui-menu-item").filter(
function(){var c=d(
this).offset().top-a-b+d(
this).height();
return c<10&&c>-10});g.length||(g=this.element.children(
".ui-menu-item:last"));this.activate(e,g)}
else this.activate(e,this.element.children(
".ui-menu-item").filter(!this.active||
882 this.last()?
":first":
":last"))},previousPage:
function(e){
if(this.hasScroll())
if(!this.active||this.first())this.activate(e,this.element.children(
".ui-menu-item:last"));
else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(
".ui-menu-item").filter(
function(){var g=d(
this).offset().top-a+b-d(
this).height();
return g<10&&g>-10});result.length||(result=this.element.children(
".ui-menu-item:first"));this.activate(e,result)}
else this.activate(e,this.element.children(
".ui-menu-item").filter(!this.active||
883 this.first()?
":last":
":first"))},hasScroll:
function(){
return this.element.height()<this.element[d.fn.prop?
"prop":
"attr"](
"scrollHeight")},select:
function(e){this._trigger(
"selected",e,{item:this.active})}})})(
jQuery);
897 (
function(
b){var h,i,j,g,l=
function(){var a=
b(
this).find(
":ui-button");setTimeout(
function(){a.button(
"refresh")},1)},k=
function(a){var c=a.name,e=a.form,f=
b([]);
if(c)f=e?
b(e).find(
"[name='"+c+
"']"):
b(
"[name='"+c+
"']",a.ownerDocument).filter(
function(){
return!this.form});
return f};b.widget(
"ui.button",{options:{disabled:null,text:
true,label:null,icons:{primary:null,secondary:null}},_create:
function(){this.element.closest(
"form").unbind(
"reset.button").bind(
"reset.button",l);
if(typeof this.options.disabled!==
898 "boolean")this.options.disabled=this.element.propAttr(
"disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr(
"title");var a=
this,c=this.options,e=this.type===
"checkbox"||this.type===
"radio",f=
"ui-state-hover"+(!e?
" ui-state-active":
"");
if(c.label===null)c.label=this.buttonElement.html();
if(this.element.is(
":disabled"))c.disabled=
true;
this.buttonElement.addClass(
"ui-button ui-widget ui-state-default ui-corner-all").attr(
"role",
"button").bind(
"mouseenter.button",
function(){
if(!c.disabled){b(
this).addClass(
"ui-state-hover");
899 this===h&&
b(
this).addClass(
"ui-state-active")}}).bind(
"mouseleave.button",
function(){c.disabled||
b(
this).removeClass(f)}).bind(
"click.button",
function(d){
if(c.disabled){d.preventDefault();d.stopImmediatePropagation()}});this.element.bind(
"focus.button",
function(){a.buttonElement.addClass(
"ui-state-focus")}).bind(
"blur.button",
function(){a.buttonElement.removeClass(
"ui-state-focus")});
if(e){this.element.bind(
"change.button",
function(){g||a.refresh()});this.buttonElement.bind(
"mousedown.button",
function(d){
if(!c.disabled){g=
900 false;i=d.pageX;j=d.pageY}}).bind(
"mouseup.button",
function(d){
if(!c.disabled)
if(i!==d.pageX||j!==d.pageY)g=
true})}
if(this.type===
"checkbox")this.buttonElement.bind(
"click.button",
function(){
if(c.disabled||g)
return false;b(
this).toggleClass(
"ui-state-active");a.buttonElement.attr(
"aria-pressed",a.element[0].checked)});
else if(this.type===
"radio")this.buttonElement.bind(
"click.button",
function(){
if(c.disabled||g)
return false;b(
this).addClass(
"ui-state-active");a.buttonElement.attr(
"aria-pressed",
"true");
901 var d=a.element[0];k(d).not(d).map(
function(){
return b(
this).button(
"widget")[0]}).removeClass(
"ui-state-active").attr(
"aria-pressed",
"false")});
else{this.buttonElement.bind(
"mousedown.button",
function(){
if(c.disabled)
return false;b(
this).addClass(
"ui-state-active");h=
this;
b(document).one(
"mouseup",
function(){h=null})}).bind(
"mouseup.button",
function(){
if(c.disabled)
return false;b(
this).removeClass(
"ui-state-active")}).bind(
"keydown.button",
function(d){
if(c.disabled)
return false;
if(d.keyCode==b.ui.keyCode.SPACE||
902 d.keyCode==b.ui.keyCode.ENTER)b(
this).addClass(
"ui-state-active")}).bind(
"keyup.button",
function(){
b(
this).removeClass(
"ui-state-active")});this.buttonElement.is(
"a")&&this.buttonElement.keyup(
function(d){d.keyCode===b.ui.keyCode.SPACE&&
b(
this).click()})}this._setOption(
"disabled",c.disabled);this._resetButton()},_determineButtonType:
function(){this.type=this.element.is(
":checkbox")?
"checkbox":this.element.is(
":radio")?
"radio":this.element.is(
"input")?
"input":
"button";
if(this.type===
"checkbox"||this.type===
903 "radio"){var a=this.element.parents().filter(
":last"),c=
"label[for='"+this.element.attr(
"id")+
"']";this.buttonElement=a.find(c);
if(!this.buttonElement.length){a=a.length?a.siblings():this.element.siblings();this.buttonElement=a.filter(c);
if(!this.buttonElement.length)this.buttonElement=a.find(c)}this.element.addClass(
"ui-helper-hidden-accessible");(a=this.element.is(
":checked"))&&this.buttonElement.addClass(
"ui-state-active");this.buttonElement.attr(
"aria-pressed",a)}
else this.buttonElement=this.element},
904 widget:
function(){
return this.buttonElement},
destroy:
function(){this.element.removeClass(
"ui-helper-hidden-accessible");this.buttonElement.removeClass(
"ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr(
"role").removeAttr(
"aria-pressed").html(this.buttonElement.find(
".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr(
"title");
905 b.Widget.prototype.destroy.call(
this)},_setOption:
function(
a,c){b.Widget.prototype._setOption.apply(
this,arguments);
if(a===
"disabled")c?this.element.propAttr(
"disabled",
true):this.element.propAttr(
"disabled",
false);
else this._resetButton()},refresh:
function(){var a=this.element.is(
":disabled");a!==this.options.disabled&&this._setOption(
"disabled",a);
if(this.type===
"radio")k(this.element[0]).each(
function(){
b(
this).is(
":checked")?
b(
this).button(
"widget").addClass(
"ui-state-active").attr(
"aria-pressed",
906 "true"):
b(
this).button(
"widget").removeClass(
"ui-state-active").attr(
"aria-pressed",
"false")});
else if(this.type===
"checkbox")this.element.is(
":checked")?this.buttonElement.addClass(
"ui-state-active").attr(
"aria-pressed",
"true"):this.buttonElement.removeClass(
"ui-state-active").attr(
"aria-pressed",
"false")},_resetButton:
function(){
if(this.type===
"input")this.options.label&&this.element.val(this.options.label);
else{var a=this.buttonElement.removeClass(
"ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
907 c=
b(
"<span></span>").addClass(
"ui-button-text").html(this.options.label).appendTo(a.empty()).text(),e=this.options.icons,f=e.primary&&e.secondary,d=[];
if(e.primary||e.secondary){
if(this.options.text)d.push(
"ui-button-text-icon"+(f?
"s":e.primary?
"-primary":
"-secondary"));e.primary&&a.prepend(
"<span class='ui-button-icon-primary ui-icon "+e.primary+
"'></span>");e.secondary&&a.append(
"<span class='ui-button-icon-secondary ui-icon "+e.secondary+
"'></span>");
if(!this.options.text){d.push(f?
"ui-button-icons-only":
908 "ui-button-icon-only");this.hasTitle||a.attr(
"title",c)}}
else d.push(
"ui-button-text-only");a.addClass(d.join(
" "))}}});b.widget(
"ui.buttonset",{options:{items:
":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:
function(){this.element.addClass(
"ui-buttonset")},_init:
function(){this.refresh()},_setOption:
function(
a,c){a===
"disabled"&&this.buttons.button(
"option",a,c);b.Widget.prototype._setOption.apply(
this,arguments)},refresh:
function(){var a=this.element.css(
"direction")===
909 "ltr";this.buttons=this.element.find(this.options.items).filter(
":ui-button").button(
"refresh").end().not(
":ui-button").button().end().map(
function(){
return b(
this).button(
"widget")[0]}).removeClass(
"ui-corner-all ui-corner-left ui-corner-right").filter(
":first").addClass(a?
"ui-corner-left":
"ui-corner-right").end().filter(
":last").addClass(a?
"ui-corner-right":
"ui-corner-left").end().end()},
destroy:
function(){this.element.removeClass(
"ui-buttonset");this.buttons.map(
function(){
return b(
this).button(
"widget")[0]}).removeClass(
"ui-corner-left ui-corner-right").end().button(
"destroy");
910 b.Widget.prototype.destroy.call(
this)}})})(
jQuery);
929 (
function(c,l){var m={buttons:
true,height:
true,maxHeight:
true,maxWidth:
true,minHeight:
true,minWidth:
true,width:
true},n={maxHeight:
true,maxWidth:
true,minHeight:
true,minWidth:
true},o=c.attrFn||{val:
true,css:
true,html:
true,text:
true,data:
true,width:
true,height:
true,offset:
true,click:
true};c.widget(
"ui.dialog",{options:{autoOpen:
true,buttons:{},closeOnEscape:
true,closeText:
"close",dialogClass:
"",draggable:
true,hide:null,height:
"auto",maxHeight:
false,maxWidth:
false,minHeight:150,minWidth:150,modal:
false,
930 position:{my:
"center",at:
"center",collision:
"fit",
using:
function(
a){var b=c(
this).css(a).offset().top;b<0&&c(
this).css(
"top",a.top-b)}},resizable:
true,show:null,stack:
true,title:
"",width:300,zIndex:1E3},_create:
function(){this.originalTitle=this.element.attr(
"title");
if(typeof this.originalTitle!==
"string")this.originalTitle=
"";this.options.title=this.options.title||this.originalTitle;var a=
this,b=a.options,d=b.title||
" ",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c(
"<div></div>")).appendTo(document.body).hide().addClass(
"ui-dialog ui-widget ui-widget-content ui-corner-all "+
931 b.dialogClass).css({zIndex:b.zIndex}).attr(
"tabIndex",-1).css(
"outline",0).keydown(
function(i){
if(b.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:
"dialog",
"aria-labelledby":e}).mousedown(
function(i){a.moveToTop(
false,i)});a.element.show().removeAttr(
"title").addClass(
"ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c(
"<div></div>")).addClass(
"ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),
932 h=c(
'<a href="#"></a>').addClass(
"ui-dialog-titlebar-close ui-corner-all").attr(
"role",
"button").hover(
function(){h.addClass(
"ui-state-hover")},
function(){h.removeClass(
"ui-state-hover")}).focus(
function(){h.addClass(
"ui-state-focus")}).blur(
function(){h.removeClass(
"ui-state-focus")}).click(
function(i){a.close(i);
return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c(
"<span></span>")).addClass(
"ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c(
"<span></span>").addClass(
"ui-dialog-title").attr(
"id",
933 e).html(d).prependTo(f);
if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;f.find(
"*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=
false;c.fn.bgiframe&&g.bgiframe()},_init:
function(){this.options.autoOpen&&this.open()},
destroy:
function(){var a=
this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(
".dialog").removeData(
"dialog").removeClass(
"ui-dialog-content ui-widget-content").hide().appendTo(
"body");
934 a.uiDialog.remove();a.originalTitle&&a.element.attr(
"title",a.originalTitle);
return a},widget:
function(){
return this.uiDialog},close:
function(
a){var b=
this,d,e;
if(
false!==b._trigger(
"beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind(
"keypress.ui-dialog");b._isOpen=
false;
if(b.options.hide)b.uiDialog.hide(b.options.hide,
function(){b._trigger(
"close",a)});
else{b.uiDialog.hide();b._trigger(
"close",a)}c.ui.dialog.overlay.resize();
if(b.options.modal){d=0;c(
".ui-dialog").each(
function(){
if(
this!==
935 b.uiDialog[0]){e=c(
this).css(
"z-index");isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}
return b}},isOpen:
function(){
return this._isOpen},moveToTop:
function(
a,
b){var d=
this,e=d.options;
if(e.modal&&!a||!e.stack&&!e.modal)
return d._trigger(
"focus",b);
if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;
if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css(
"z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()};c.ui.dialog.maxZ+=1;
936 d.uiDialog.css(
"z-index",c.ui.dialog.maxZ);d.element.attr(a);d._trigger(
"focus",b);
return d},open:
function(){
if(!this._isOpen){var a=
this,b=a.options,d=a.uiDialog;a.overlay=b.modal?
new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(
true);b.modal&&d.bind(
"keypress.ui-dialog",
function(e){
if(e.keyCode===c.ui.keyCode.TAB){var g=c(
":tabbable",
this),f=g.filter(
":first");g=g.filter(
":last");
if(e.target===g[0]&&!e.shiftKey){f.focus(1);
return false}
else if(e.target===
937 f[0]&&e.shiftKey){g.focus(1);
return false}}});c(a.element.find(
":tabbable").get().concat(d.find(
".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=
true;a._trigger(
"open");
return a}},_createButtons:
function(
a){var b=
this,d=
false,e=c(
"<div></div>").addClass(
"ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c(
"<div></div>").addClass(
"ui-dialog-buttonset").appendTo(e);b.uiDialog.find(
".ui-dialog-buttonpane").remove();typeof a===
"object"&&a!==null&&c.each(a,
938 function(){
return!(d=
true)});
if(d){c.each(a,
function(f,h){h=c.isFunction(h)?{click:h,text:f}:h;var i=c(
'<button type="button"></button>').click(
function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.each(h,
function(j,k){
if(j!==
"click")j in o?i[j](k):i.attr(j,k)});c.fn.button&&i.button()});e.appendTo(b.uiDialog)}},_makeDraggable:
function(){
function a(f){
return{position:f.position,offset:f.offset}}var b=
this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:
".ui-dialog-content, .ui-dialog-titlebar-close",
939 handle:
".ui-dialog-titlebar",containment:
"document",start:
function(f,h){g=d.height===
"auto"?
"auto":c(
this).height();c(
this).height(c(
this).height()).addClass(
"ui-dialog-dragging");b._trigger(
"dragStart",f,
a(h))},drag:
function(f,h){b._trigger(
"drag",f,
a(h))},stop:
function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(
this).removeClass(
"ui-dialog-dragging").height(g);b._trigger(
"dragStop",f,
a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:
function(a){
function b(f){
return{originalPosition:f.originalPosition,
940 originalSize:f.originalSize,position:f.position,size:f.size}}a=a===l?this.options.resizable:
a;var d=
this,e=d.options,g=d.uiDialog.css(
"position");a=typeof a===
"string"?a:
"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:
".ui-dialog-content",containment:
"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:
a,start:
function(f,h){c(
this).addClass(
"ui-dialog-resizing");d._trigger(
"resizeStart",f,
b(h))},resize:
function(f,h){d._trigger(
"resize",
941 f,
b(h))},stop:
function(f,h){c(
this).removeClass(
"ui-dialog-resizing");e.height=c(
this).height();e.width=c(
this).width();d._trigger(
"resizeStop",f,
b(h));c.ui.dialog.overlay.resize()}}).css(
"position",g).find(
".ui-resizable-se").addClass(
"ui-icon ui-icon-grip-diagonal-se")},_minHeight:
function(){var a=this.options;
return a.height===
"auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:
function(
a){var b=[],d=[0,0],e;
if(a){
if(typeof a===
"string"||typeof a===
"object"&&
"0"in a){b=a.split?a.split(
" "):
942 [a[0],a[1]];
if(b.length===1)b[1]=b[0];c.each([
"left",
"top"],
function(g,f){
if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(
" "),at:b.join(
" "),offset:d.join(
" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,
a)}
else a=c.ui.dialog.prototype.options.position;(e=
this.uiDialog.is(
":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},
a));e||this.uiDialog.hide()},_setOptions:
function(
a){var b=
this,d={},e=
false;c.each(a,
function(g,f){b._setOption(g,f);
943 if(g in m)e=
true;
if(g in n)d[g]=f});e&&this._size();this.uiDialog.is(
":data(resizable)")&&this.uiDialog.resizable(
"option",d)},_setOption:
function(
a,
b){var d=
this,e=d.uiDialog;
switch(a){
case "beforeclose":a=
"beforeClose";
break;
case "buttons":d._createButtons(b);
break;
case "closeText":d.uiDialogTitlebarCloseText.text(
""+b);
break;
case "dialogClass":e.removeClass(d.options.dialogClass).addClass(
"ui-dialog ui-widget ui-widget-content ui-corner-all "+b);
break;
case "disabled":b?e.addClass(
"ui-dialog-disabled"):
944 e.removeClass(
"ui-dialog-disabled");
break;
case "draggable":var g=e.is(
":data(draggable)");g&&!b&&e.draggable(
"destroy");!g&&b&&d._makeDraggable();
break;
case "position":d._position(b);
break;
case "resizable":(g=e.is(
":data(resizable)"))&&!b&&e.resizable(
"destroy");g&&typeof b===
"string"&&e.resizable(
"option",
"handles",b);!g&&b!==
false&&d._makeResizable(b);
break;
case "title":c(
".ui-dialog-title",d.uiDialogTitlebar).html(
""+(b||
" "));
break}c.Widget.prototype._setOption.apply(d,arguments)},_size:
function(){var a=
945 this.options,
b,d,e=this.uiDialog.is(
":visible");this.element.show().css({width:
"auto",minHeight:0,height:0});
if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:
"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);
if(a.height===
"auto")
if(c.support.minHeight)this.element.css({minHeight:d,height:
"auto"});
else{this.uiDialog.show();a=this.element.css(
"height",
"auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}
else this.element.height(Math.max(a.height-
946 b,0));this.uiDialog.is(
":data(resizable)")&&this.uiDialog.resizable(
"option",
"minHeight",this._minHeight())}});c.extend(c.ui.dialog,{
version:
"1.8.16",uuid:0,maxZ:0,getTitleId:
function(a){a=a.attr(
"id");
if(!a){this.uuid+=1;a=this.uuid}
return"ui-dialog-title-"+a},overlay:
function(
a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{
instances:[],oldInstances:[],maxZ:0,events:c.map(
"focus,mousedown,mouseup,keydown,keypress,click".split(
","),
function(
a){
return a+
".dialog-overlay"}).join(
" "),
947 create:
function(
a){
if(this.
instances.length===0){setTimeout(
function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,
function(d){
if(c(d.target).zIndex()<c.ui.dialog.overlay.maxZ)
return false})},1);c(document).bind(
"keydown.dialog-overlay",
function(d){
if(a.options.closeOnEscape&&!d.isDefaultPrevented()&&d.keyCode&&d.keyCode===c.ui.keyCode.ESCAPE){a.close(d);d.preventDefault()}});c(window).bind(
"resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b=(this.oldInstances.pop()||
948 c(
"<div></div>").addClass(
"ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});c.fn.bgiframe&&b.bgiframe();this.
instances.push(b);
return b},
destroy:
function(
a){var b=c.inArray(a,this.
instances);b!=-1&&this.oldInstances.push(this.
instances.splice(b,1)[0]);this.
instances.length===0&&c([document,window]).unbind(
".dialog-overlay");a.remove();var d=0;c.each(this.
instances,
function(){d=Math.max(d,this.css(
"z-index"))});this.maxZ=d},height:
function(){var
a,
b;
if(c.browser.msie&&
949 c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);
return a<b?c(window).height()+
"px":a+
"px"}
else return c(document).height()+
"px"},width:
function(){var
a,
b;
if(c.browser.msie){a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);b=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);
return a<b?c(window).width()+
"px":a+
"px"}
else return c(document).width()+
950 "px"},resize:
function(){var a=c([]);c.each(c.ui.dialog.overlay.instances,
function(){a=a.add(
this)});a.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{
destroy:
function(){c.ui.dialog.overlay.destroy(
this.$el)}})})(
jQuery);
965 (
function(d){d.widget(
"ui.slider",d.ui.mouse,{widgetEventPrefix:
"slide",options:{animate:
false,distance:0,max:100,min:0,orientation:
"horizontal",range:
false,step:1,value:0,values:null},_create:
function(){var a=
this,b=this.options,c=this.element.find(
".ui-slider-handle").addClass(
"ui-state-default ui-corner-all"),f=b.values&&b.values.length||1,e=[];this._mouseSliding=this._keySliding=
false;this._animateOff=
true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass(
"ui-slider ui-slider-"+
966 this.orientation+
" ui-widget ui-widget-content ui-corner-all"+(b.disabled?
" ui-slider-disabled ui-disabled":
""));this.range=d([]);
if(b.range){
if(b.range===
true){
if(!b.values)b.values=[this._valueMin(),this._valueMin()];
if(b.values.length&&b.values.length!==2)b.values=[b.values[0],b.values[0]]}this.range=d(
"<div></div>").appendTo(this.element).addClass(
"ui-slider-range ui-widget-header"+(b.range===
"min"||b.range===
"max"?
" ui-slider-range-"+b.range:
""))}
for(var j=c.length;j<f;j+=1)e.push(
"<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");
967 this.handles=c.add(d(e.join(
"")).appendTo(a.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter(
"a").click(
function(g){g.preventDefault()}).hover(
function(){b.disabled||d(
this).addClass(
"ui-state-hover")},
function(){d(
this).removeClass(
"ui-state-hover")}).focus(
function(){
if(b.disabled)d(
this).blur();
else{d(
".ui-slider .ui-state-focus").removeClass(
"ui-state-focus");d(
this).addClass(
"ui-state-focus")}}).blur(
function(){d(
this).removeClass(
"ui-state-focus")});this.handles.each(
function(g){d(
this).data(
"index.ui-slider-handle",
968 g)});this.handles.keydown(
function(g){var k=
true,l=d(
this).data(
"index.ui-slider-handle"),i,h,m;
if(!a.options.disabled){
switch(g.keyCode){
case d.ui.keyCode.HOME:
case d.ui.keyCode.END:
case d.ui.keyCode.PAGE_UP:
case d.ui.keyCode.PAGE_DOWN:
case d.ui.keyCode.UP:
case d.ui.keyCode.RIGHT:
case d.ui.keyCode.DOWN:
case d.ui.keyCode.LEFT:k=
false;
if(!a._keySliding){a._keySliding=
true;d(
this).addClass(
"ui-state-active");i=a._start(g,l);
if(i===
false)
return}
break}m=a.options.step;i=a.options.values&&a.options.values.length?
969 (h=a.values(l)):(h=a.value());
switch(g.keyCode){
case d.ui.keyCode.HOME:h=a._valueMin();
break;
case d.ui.keyCode.END:h=a._valueMax();
break;
case d.ui.keyCode.PAGE_UP:h=a._trimAlignValue(i+(a._valueMax()-a._valueMin())/5);
break;
case d.ui.keyCode.PAGE_DOWN:h=a._trimAlignValue(i-(a._valueMax()-a._valueMin())/5);
break;
case d.ui.keyCode.UP:
case d.ui.keyCode.RIGHT:
if(i===a._valueMax())
return;h=a._trimAlignValue(i+m);
break;
case d.ui.keyCode.DOWN:
case d.ui.keyCode.LEFT:
if(i===a._valueMin())
return;h=a._trimAlignValue(i-
970 m);
break}a._slide(g,l,h);
return k}}).keyup(
function(g){var k=d(
this).data(
"index.ui-slider-handle");
if(a._keySliding){a._keySliding=
false;a._stop(g,k);a._change(g,k);d(
this).removeClass(
"ui-state-active")}});this._refreshValue();this._animateOff=
false},
destroy:
function(){this.handles.remove();this.range.remove();this.element.removeClass(
"ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData(
"slider").unbind(
".slider");this._mouseDestroy();
971 return this},_mouseCapture:
function(
a){var b=this.options,c,f,e,j,g;
if(b.disabled)
return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:a.pageX,y:a.pageY});f=this._valueMax()-this._valueMin()+1;j=
this;this.handles.each(
function(k){var l=Math.abs(c-j.values(k));
if(f>l){f=l;e=d(
this);g=k}});
if(b.range===
true&&
this.values(1)===b.min){g+=1;e=d(this.handles[g])}
if(this._start(a,g)===
false)
return false;
972 this._mouseSliding=
true;j._handleIndex=g;e.addClass(
"ui-state-active").focus();b=e.offset();this._clickOffset=!d(a.target).parents().andSelf().is(
".ui-slider-handle")?{left:0,top:0}:{left:a.pageX-b.left-e.width()/2,top:a.pageY-b.top-e.height()/2-(parseInt(e.css(
"borderTopWidth"),10)||0)-(parseInt(e.css(
"borderBottomWidth"),10)||0)+(parseInt(e.css(
"marginTop"),10)||0)};this.handles.hasClass(
"ui-state-hover")||this._slide(a,g,c);
return this._animateOff=
true},_mouseStart:
function(){
return true},_mouseDrag:
function(
a){var b=
973 this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,b);
return false},_mouseStop:
function(
a){this.handles.removeClass(
"ui-state-active");this._mouseSliding=
false;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;
return this._animateOff=
false},_detectOrientation:
function(){this.orientation=this.options.orientation===
"vertical"?
"vertical":
"horizontal"},_normValueFromMouse:
function(
a){var
b;
if(this.orientation===
"horizontal"){b=
974 this.elementSize.width;a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}
else{b=this.elementSize.height;a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}b=a/b;
if(b>1)b=1;
if(b<0)b=0;
if(this.orientation===
"vertical")b=1-
b;a=this._valueMax()-this._valueMin();
return this._trimAlignValue(this._valueMin()+b*a)},_start:
function(
a,
b){var c={handle:this.handles[
b],value:this.value()};
if(this.options.values&&
this.options.values.length){c.value=this.values(b);
975 c.values=this.values()}
return this._trigger(
"start",a,c)},_slide:
function(
a,
b,c){var f;
if(this.options.values&&
this.options.values.length){f=this.values(b?0:1);
if(this.options.values.length===2&&
this.options.range===
true&&(b===0&&c>f||b===1&&c<f))c=f;
if(c!==this.values(b)){f=this.values();f[
b]=c;a=this._trigger(
"slide",a,{handle:this.handles[
b],value:c,values:f});this.values(b?0:1);a!==
false&&this.values(b,c,
true)}}
else if(c!==this.value()){a=this._trigger(
"slide",a,{handle:this.handles[
b],value:c});
976 a!==
false&&this.value(c)}},_stop:
function(
a,
b){var c={handle:this.handles[
b],value:this.value()};
if(this.options.values&&
this.options.values.length){c.value=this.values(b);c.values=this.values()}this._trigger(
"stop",a,c)},_change:
function(
a,
b){
if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[
b],value:this.value()};
if(this.options.values&&
this.options.values.length){c.value=this.values(b);c.values=this.values()}this._trigger(
"change",a,c)}},value:
function(
a){
if(arguments.length){this.options.value=
977 this._trimAlignValue(a);this._refreshValue();this._change(null,0)}
else return this._value()},values:
function(
a,
b){var c,f,e;
if(arguments.length>1){this.options.values[
a]=this._trimAlignValue(b);this._refreshValue();this._change(null,a)}
else if(arguments.length)
if(d.isArray(arguments[0])){c=this.options.values;f=arguments[0];
for(e=0;e<c.length;e+=1){c[e]=this._trimAlignValue(f[e]);this._change(null,e)}this._refreshValue()}
else return this.options.values&&this.options.values.length?this._values(a):
978 this.value();
else return this._values()},_setOption:
function(
a,
b){var c,f=0;
if(d.isArray(
this.options.values))f=this.options.values.length;d.Widget.prototype._setOption.apply(
this,arguments);
switch(a){
case "disabled":
if(b){this.handles.filter(
".ui-state-focus").blur();this.handles.removeClass(
"ui-state-hover");this.handles.propAttr(
"disabled",
true);this.element.addClass(
"ui-disabled")}
else{this.handles.propAttr(
"disabled",
false);this.element.removeClass(
"ui-disabled")}
break;
case "orientation":this._detectOrientation();
979 this.element.removeClass(
"ui-slider-horizontal ui-slider-vertical").addClass(
"ui-slider-"+this.orientation);this._refreshValue();
break;
case "value":this._animateOff=
true;this._refreshValue();this._change(null,0);this._animateOff=
false;
break;
case "values":this._animateOff=
true;this._refreshValue();
for(c=0;c<f;c+=1)this._change(null,c);this._animateOff=
false;
break}},_value:
function(){var a=this.options.value;
return a=this._trimAlignValue(a)},_values:
function(
a){var
b,c;
if(arguments.length){b=this.options.values[
a];
980 return b=this._trimAlignValue(b)}
else{b=this.options.values.slice();
for(c=0;c<b.length;c+=1)b[c]=this._trimAlignValue(b[c]);
return b}},_trimAlignValue:
function(
a){
if(a<=this._valueMin())
return this._valueMin();
if(a>=this._valueMax())
return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b;a=a-c;
if(Math.abs(c)*2>=
b)a+=c>0?b:-b;
return parseFloat(a.toFixed(5))},_valueMin:
function(){
return this.options.min},_valueMax:
function(){
return this.options.max},_refreshValue:
function(){var a=
981 this.options.range,b=this.options,c=
this,f=!this._animateOff?b.animate:
false,e,j={},g,k,l,i;
if(this.options.values&&
this.options.values.length)this.handles.each(
function(h){e=(c.values(h)-c._valueMin())/(c._valueMax()-c._valueMin())*100;j[c.orientation===
"horizontal"?
"left":
"bottom"]=e+
"%";d(
this).stop(1,1)[f?
"animate":
"css"](j,b.animate);
if(c.options.range===
true)
if(c.orientation===
"horizontal"){
if(h===0)c.range.stop(1,1)[f?
"animate":
"css"]({left:e+
"%"},b.animate);
if(h===1)c.range[f?
"animate":
"css"]({width:e-
982 g+
"%"},{queue:
false,duration:b.animate})}
else{
if(h===0)c.range.stop(1,1)[f?
"animate":
"css"]({bottom:e+
"%"},b.animate);
if(h===1)c.range[f?
"animate":
"css"]({height:e-g+
"%"},{queue:
false,duration:b.animate})}g=e});
else{k=this.value();l=this._valueMin();i=this._valueMax();e=i!==l?(k-l)/(i-l)*100:0;j[c.orientation===
"horizontal"?
"left":
"bottom"]=e+
"%";this.handle.stop(1,1)[f?
"animate":
"css"](j,b.animate);
if(a===
"min"&&this.orientation===
"horizontal")this.range.stop(1,1)[f?
"animate":
"css"]({width:e+
"%"},
983 b.animate);
if(a===
"max"&&this.orientation===
"horizontal")this.range[f?
"animate":
"css"]({width:100-e+
"%"},{queue:
false,duration:b.animate});
if(a===
"min"&&this.orientation===
"vertical")this.range.stop(1,1)[f?
"animate":
"css"]({height:e+
"%"},b.animate);
if(a===
"max"&&this.orientation===
"vertical")this.range[f?
"animate":
"css"]({height:100-e+
"%"},{queue:
false,duration:b.animate})}}});d.extend(d.ui.slider,{
version:
"1.8.16"})})(
jQuery);
997 (
function(d,p){
function u(){
return++v}
function w(){
return++x}var v=0,x=0;d.widget(
"ui.tabs",{options:{add:null,ajaxOptions:null,cache:
false,
cookie:null,collapsible:
false,disable:null,disabled:[],enable:null,
event:
"click",fx:null,idPrefix:
"ui-tabs-",load:null,panelTemplate:
"<div></div>",
remove:null,select:null,show:null,spinner:
"<em>Loading…</em>",tabTemplate:
"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:
function(){this._tabify(
true)},_setOption:
function(
b,e){
if(b==
"selected")this.options.collapsible&&
998 e==this.options.selected||this.select(e);
else{this.options[
b]=e;this._tabify()}},_tabId:
function(
b){
return b.title&&b.title.replace(/\s/g,
"_").replace(/[^\w\u00c0-\uFFFF-]/g,
"")||this.options.idPrefix+u()},_sanitizeSelector:
function(
b){
return b.replace(/:/g,
"\\:")},_cookie:
function(){var b=this.
cookie||(this.
cookie=this.options.cookie.name||
"ui-tabs-"+w());
return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:
function(
b,e){
return{tab:
b,panel:e,index:this.anchors.index(b)}},_cleanup:
function(){this.lis.filter(
".ui-state-processing").removeClass(
"ui-state-processing").find(
"span:data(label.tabs)").each(
function(){var b=
999 d(
this);b.html(b.data(
"label.tabs")).removeData(
"label.tabs")})},_tabify:
function(b){
function e(g,f){g.css(
"display",
"");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute(
"filter")}var a=
this,c=this.options,h=/^#.+/;this.list=this.element.find(
"ol,ul").eq(0);this.lis=d(
" > li:has(a[href])",this.list);this.anchors=this.lis.map(
function(){
return d(
"a",
this)[0]});this.panels=d([]);this.anchors.each(
function(g,f){var i=d(f).attr(
"href"),l=i.split(
"#")[0],q;
if(l&&(l===location.toString().split(
"#")[0]||
1000 (q=d(
"base")[0])&&l===q.href)){i=f.hash;f.href=i}
if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));
else if(i&&i!==
"#"){d.data(f,
"href.tabs",i);d.data(f,
"load.tabs",i.replace(/#.*$/,
""));i=a._tabId(f);f.href=
"#"+i;f=a.element.find(
"#"+i);
if(!f.length){f=d(c.panelTemplate).attr(
"id",i).addClass(
"ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data(
"destroy.tabs",
true)}a.panels=a.panels.add(f)}
else c.disabled.push(g)});
if(b){this.element.addClass(
"ui-tabs ui-widget ui-widget-content ui-corner-all");
1001 this.list.addClass(
"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass(
"ui-state-default ui-corner-top");this.panels.addClass(
"ui-tabs-panel ui-widget-content ui-corner-bottom");
if(c.selected===p){location.hash&&this.anchors.each(
function(g,f){
if(f.hash==location.hash){c.selected=g;
return false}});
if(typeof c.selected!==
"number"&&c.cookie)c.selected=parseInt(a._cookie(),10);
if(typeof c.selected!==
"number"&&
this.lis.filter(
".ui-tabs-selected").length)c.selected=
1002 this.lis.index(
this.lis.filter(
".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}
else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(
this.lis.filter(
".ui-state-disabled"),
function(g){
return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass(
"ui-tabs-hide");this.lis.removeClass(
"ui-tabs-selected ui-state-active");
1003 if(c.selected>=0&&
this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass(
"ui-tabs-hide");this.lis.eq(c.selected).addClass(
"ui-tabs-selected ui-state-active");a.element.queue(
"tabs",
function(){a._trigger(
"show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind(
"unload",
function(){a.lis.add(a.anchors).unbind(
".tabs");a.lis=a.anchors=a.panels=null})}
else c.selected=
this.lis.index(
this.lis.filter(
".ui-tabs-selected"));
1004 this.element[c.collapsible?
"addClass":
"removeClass"](
"ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;
for(var j;j=this.lis[
b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass(
"ui-tabs-selected")?
"addClass":
"removeClass"](
"ui-state-disabled");c.cache===
false&&this.anchors.removeData(
"cache.tabs");this.lis.add(this.anchors).unbind(
".tabs");
if(c.event!==
"mouseover"){var k=
function(g,f){f.is(
":not(.ui-state-disabled)")&&f.addClass(
"ui-state-"+g)},n=
function(g,f){f.removeClass(
"ui-state-"+
1005 g)};this.lis.bind(
"mouseover.tabs",
function(){k(
"hover",d(
this))});this.lis.bind(
"mouseout.tabs",
function(){n(
"hover",d(
this))});this.anchors.bind(
"focus.tabs",
function(){k(
"focus",d(
this).closest(
"li"))});this.anchors.bind(
"blur.tabs",
function(){n(
"focus",d(
this).closest(
"li"))})}var m,o;
if(c.fx)
if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}
else m=o=c.fx;var r=o?
function(g,f){d(g).closest(
"li").addClass(
"ui-tabs-selected ui-state-active");f.hide().removeClass(
"ui-tabs-hide").animate(o,o.duration||
"normal",
1006 function(){e(f,o);a._trigger(
"show",null,a._ui(g,f[0]))})}:
function(g,f){d(g).closest(
"li").addClass(
"ui-tabs-selected ui-state-active");f.removeClass(
"ui-tabs-hide");a._trigger(
"show",null,a._ui(g,f[0]))},s=m?
function(g,f){f.animate(m,m.duration||
"normal",
function(){a.lis.removeClass(
"ui-tabs-selected ui-state-active");f.addClass(
"ui-tabs-hide");e(f,m);a.element.dequeue(
"tabs")})}:
function(g,f){a.lis.removeClass(
"ui-tabs-selected ui-state-active");f.addClass(
"ui-tabs-hide");a.element.dequeue(
"tabs")};
1007 this.anchors.bind(c.event+
".tabs",
function(){var g=
this,f=d(g).closest(
"li"),i=a.panels.filter(
":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));
if(f.hasClass(
"ui-tabs-selected")&&!c.collapsible||f.hasClass(
"ui-state-disabled")||f.hasClass(
"ui-state-processing")||a.panels.filter(
":animated").length||a._trigger(
"select",null,a._ui(
this,l[0]))===
false){this.blur();
return false}c.selected=a.anchors.index(
this);a.abort();
if(c.collapsible)
if(f.hasClass(
"ui-tabs-selected")){c.selected=
1008 -1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue(
"tabs",
function(){s(g,i)}).dequeue(
"tabs");this.blur();
return false}
else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue(
"tabs",
function(){r(g,l)});a.load(a.anchors.index(
this));this.blur();
return false}c.cookie&&a._cookie(c.selected,c.cookie);
if(l.length){i.length&&a.element.queue(
"tabs",
function(){s(g,i)});a.element.queue(
"tabs",
function(){r(g,l)});a.load(a.anchors.index(
this))}
else throw"jQuery UI Tabs: Mismatching fragment identifier.";
1009 d.browser.msie&&this.blur()});this.anchors.bind(
"click.tabs",
function(){
return false})},_getIndex:
function(b){
if(typeof b==
"string")b=this.anchors.index(this.anchors.filter(
"[href$="+b+
"]"));
return b},
destroy:
function(){var b=this.options;this.abort();this.element.unbind(
".tabs").removeClass(
"ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData(
"tabs");this.list.removeClass(
"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(
function(){var e=
1010 d.data(
this,
"href.tabs");
if(e)this.href=e;var a=d(
this).unbind(
".tabs");d.each([
"href",
"load",
"cache"],
function(c,h){a.removeData(h+
".tabs")})});this.lis.unbind(
".tabs").add(this.panels).each(
function(){d.data(
this,
"destroy.tabs")?d(
this).remove():d(
this).removeClass(
"ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);
return this},add:
function(
b,
1011 e,
a){
if(a===p)a=this.anchors.length;var c=
this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,
b).replace(/#\{label\}/g,e));b=!b.indexOf(
"#")?b.replace(
"#",
""):this._tabId(d(
"a",e)[0]);e.addClass(
"ui-state-default ui-corner-top").data(
"destroy.tabs",
true);var j=c.element.find(
"#"+b);j.length||(j=d(h.panelTemplate).attr(
"id",b).data(
"destroy.tabs",
true));j.addClass(
"ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");
if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}
else{e.insertBefore(this.lis[a]);
1012 j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,
function(k){
return k>=a?++k:k});this._tabify();
if(this.anchors.length==1){h.selected=0;e.addClass(
"ui-tabs-selected ui-state-active");j.removeClass(
"ui-tabs-hide");this.element.queue(
"tabs",
function(){c._trigger(
"show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger(
"add",null,this._ui(this.anchors[a],this.panels[a]));
return this},
remove:
function(
b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();
1013 if(a.hasClass(
"ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1<this.anchors.length?1:-1));e.disabled=d.map(d.grep(e.disabled,
function(h){
return h!=b}),
function(h){
return h>=b?--h:h});this._tabify();this._trigger(
"remove",null,this._ui(a.find(
"a")[0],c[0]));
return this},enable:
function(
b){b=this._getIndex(b);var e=this.options;
if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass(
"ui-state-disabled");e.disabled=d.grep(e.disabled,
function(a){
return a!=b});this._trigger(
"enable",null,
1014 this._ui(this.anchors[b],this.panels[b]));
return this}},disable:
function(
b){b=this._getIndex(b);var e=this.options;
if(b!=e.selected){this.lis.eq(b).addClass(
"ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger(
"disable",null,this._ui(this.anchors[b],this.panels[b]))}
return this},select:
function(
b){b=this._getIndex(b);
if(b==-1)
if(this.options.collapsible&&
this.options.selected!=-1)b=this.options.selected;
else return this;this.anchors.eq(b).trigger(this.options.event+
".tabs");
return this},
1015 load:
function(
b){b=this._getIndex(b);var e=
this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,
"load.tabs");this.abort();
if(!h||this.element.queue(
"tabs").length!==0&&d.data(c,
"cache.tabs"))this.element.dequeue(
"tabs");
else{this.lis.eq(b).addClass(
"ui-state-processing");
if(a.spinner){var j=d(
"span",c);j.data(
"label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:
function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c,
1016 "cache.tabs",
true);e._trigger(
"load",null,e._ui(e.anchors[b],e.panels[b]));
try{a.ajaxOptions.success(k,n)}
catch(m){}},error:
function(k,n){e._cleanup();e._trigger(
"load",null,e._ui(e.anchors[b],e.panels[b]));
try{a.ajaxOptions.error(k,n,b,c)}
catch(m){}}}));e.element.dequeue(
"tabs");
return this}},abort:
function(){this.element.queue([]);this.panels.stop(
false,
true);this.element.queue(
"tabs",this.element.queue(
"tabs").splice(-2,2));
if(this.xhr){this.xhr.abort();
delete this.xhr}this._cleanup();
return this},
1017 url:
function(
b,e){this.anchors.eq(b).removeData(
"cache.tabs").data(
"load.tabs",e);
return this},length:
function(){
return this.anchors.length}});d.extend(d.ui.tabs,{
version:
"1.8.16"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:
function(b,e){var a=
this,c=
this.options,h=a._rotate||(a._rotate=
function(j){clearTimeout(a.rotation);a.rotation=setTimeout(
function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},
b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?
function(j){j.clientX&&
1018 a.rotate(null)}:
function(){t=c.selected;h()});
if(b){this.element.bind(
"tabsshow",h);this.anchors.bind(c.event+
".tabs",e);h()}
else{clearTimeout(a.rotation);this.element.unbind(
"tabsshow",h);this.anchors.unbind(c.event+
".tabs",e);
delete this._rotate;
delete this._unrotate}
return this}})})(
jQuery);
1031 (
function(d,C){
function M(){this.
debug=
false;this._curInst=null;this._keyEvent=
false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=
false;this._mainDivId=
"ui-datepicker-div";this._inlineClass=
"ui-datepicker-inline";this._appendClass=
"ui-datepicker-append";this._triggerClass=
"ui-datepicker-trigger";this._dialogClass=
"ui-datepicker-dialog";this._disableClass=
"ui-datepicker-disabled";this._unselectableClass=
"ui-datepicker-unselectable";this._currentClass=
"ui-datepicker-current-day";this._dayOverClass=
1032 "ui-datepicker-days-cell-over";this.regional=[];this.regional[
""]={closeText:
"Done",prevText:
"Prev",nextText:
"Next",currentText:
"Today",monthNames:[
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"],monthNamesShort:[
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"],dayNames:[
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"],dayNamesShort:[
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat"],dayNamesMin:[
"Su",
1033 "Mo",
"Tu",
"We",
"Th",
"Fr",
"Sa"],weekHeader:
"Wk",dateFormat:
"mm/dd/yy",firstDay:0,isRTL:
false,showMonthAfterYear:
false,yearSuffix:
""};this._defaults={showOn:
"focus",showAnim:
"fadeIn",showOptions:{},defaultDate:null,appendText:
"",buttonText:
"...",buttonImage:
"",buttonImageOnly:
false,hideIfNoPrevNext:
false,navigationAsDateFormat:
false,gotoCurrent:
false,changeMonth:
false,changeYear:
false,yearRange:
"c-10:c+10",showOtherMonths:
false,selectOtherMonths:
false,showWeek:
false,calculateWeek:this.iso8601Week,shortYearCutoff:
"+10",
1034 minDate:null,maxDate:null,duration:
"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:
"",altFormat:
"",constrainInput:
true,showButtonPanel:
false,autoSize:
false,disabled:
false};d.extend(this._defaults,this.regional[
""]);this.dpDiv=N(d(
'<div id="'+this._mainDivId+
'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}
function N(a){
return a.bind(
"mouseout",
1035 function(b){b=d(b.target).closest(
"button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");b.length&&b.removeClass(
"ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind(
"mouseover",
function(b){b=d(b.target).closest(
"button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");
if(!(d.datepicker._isDisabledDatepicker(J.inline?a.parent()[0]:J.input[0])||!b.length)){b.parents(
".ui-datepicker-calendar").find(
"a").removeClass(
"ui-state-hover");
1036 b.addClass(
"ui-state-hover");b.hasClass(
"ui-datepicker-prev")&&b.addClass(
"ui-datepicker-prev-hover");b.hasClass(
"ui-datepicker-next")&&b.addClass(
"ui-datepicker-next-hover")}})}
function H(a,b){d.extend(a,b);
for(var c in b)
if(b[c]==null||b[c]==C)a[c]=b[c];
return a}d.extend(d.ui,{datepicker:{
version:
"1.8.16"}});var B=(
new Date).getTime(),J;d.extend(M.prototype,{markerClassName:
"hasDatepicker",maxRows:4,log:
function(){
this.debug&&console.log.apply(
"",arguments)},_widgetDatepicker:
function(){
return this.dpDiv},
1037 setDefaults:
function(
a){H(this._defaults,a||{});
return this},_attachDatepicker:
function(
a,
b){var c=null;
for(var e in this._defaults){var f=a.getAttribute(
"date:"+e);
if(f){c=c||{};
try{c[e]=eval(f)}
catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e==
"div"||e==
"span";
if(!a.id){this.uuid+=1;a.id=
"dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});
if(e==
"input")this._connectDatepicker(a,i);
else f&&this._inlineDatepicker(a,i)},_newInst:
function(
a,
b){
return{
id:a[0].id.replace(/([^A-Za-z0-9_-])/g,
1038 "\\\\$1"),input:
a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,
inline:
b,dpDiv:!b?this.dpDiv:N(d(
'<div class="'+this._inlineClass+
' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:
function(
a,
b){var c=d(a);b.append=d([]);b.trigger=d([]);
if(!c.hasClass(
this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind(
"setData.datepicker",
1039 function(e,f,h){b.settings[f]=h}).bind(
"getData.datepicker",
function(e,f){
return this._get(b,f)});this._autoSize(b);d.data(a,
"datepicker",b);b.settings.disabled&&this._disableDatepicker(a)}},_attachments:
function(
a,
b){var c=this._get(b,
"appendText"),e=this._get(b,
"isRTL");b.append&&b.append.remove();
if(c){b.append=d(
'<span class="'+this._appendClass+
'">'+c+
"</span>");a[e?
"before":
"after"](b.append)}a.unbind(
"focus",
this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,
"showOn");
if(c==
1040 "focus"||c==
"both")a.focus(this._showDatepicker);
if(c==
"button"||c==
"both"){c=this._get(b,
"buttonText");var f=this._get(b,
"buttonImage");b.trigger=d(this._get(b,
"buttonImageOnly")?d(
"<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d(
'<button type="button"></button>').addClass(this._triggerClass).html(f==
""?c:d(
"<img/>").attr({src:f,alt:c,title:c})));a[e?
"before":
"after"](b.trigger);b.trigger.click(
function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():
1041 d.datepicker._showDatepicker(a[0]);
return false})}},_autoSize:
function(a){
if(this._get(a,
"autoSize")&&!a.inline){var b=
new Date(2009,11,20),c=this._get(a,
"dateFormat");
if(c.match(/[DM]/)){var e=
function(f){
for(var h=0,i=0,g=0;g<f.length;g++)
if(f[g].length>h){h=f[g].length;i=g}
return i};b.setMonth(e(this._get(a,c.match(/MM/)?
"monthNames":
"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?
"dayNames":
"dayNamesShort"))+20-b.getDay())}a.input.attr(
"size",
this._formatDate(a,b).length)}},_inlineDatepicker:
function(a,
1042 b){var c=d(a);
if(!c.hasClass(
this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind(
"setData.datepicker",
function(e,f,h){b.settings[f]=h}).bind(
"getData.datepicker",
function(e,f){
return this._get(b,f)});d.data(a,
"datepicker",b);this._setDate(b,this._getDefaultDate(b),
true);this._updateDatepicker(b);this._updateAlternate(b);b.settings.disabled&&this._disableDatepicker(a);b.dpDiv.css(
"display",
"block")}},_dialogDatepicker:
function(
a,
b,c,e,f){a=this._dialogInst;
if(!a){this.uuid+=
1043 1;this._dialogInput=d(
'<input type="text" id="'+(
"dp"+this.uuid)+
'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d(
"body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,
false);a.settings={};d.data(this._dialogInput[0],
"datepicker",a)}H(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):
b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;
if(!this._pos)this._pos=[document.documentElement.clientWidth/
1044 2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css(
"left",this._pos[0]+20+
"px").css(
"top",this._pos[1]+
"px");a.settings.onSelect=c;this._inDialog=
true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],
"datepicker",a);
return this},_destroyDatepicker:
function(
a){var b=
1045 d(a),c=d.data(a,
"datepicker");
if(b.hasClass(
this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,
"datepicker");
if(e==
"input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind(
"focus",this._showDatepicker).unbind(
"keydown",this._doKeyDown).unbind(
"keypress",this._doKeyPress).unbind(
"keyup",this._doKeyUp)}
else if(e==
"div"||e==
"span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:
function(
a){var b=d(a),c=d.data(a,
"datepicker");
if(b.hasClass(
this.markerClassName)){var e=
1046 a.nodeName.toLowerCase();
if(e==
"input"){a.disabled=
false;c.trigger.filter(
"button").each(
function(){this.disabled=
false}).end().filter(
"img").css({opacity:
"1.0",cursor:
""})}
else if(e==
"div"||e==
"span"){b=b.children(
"."+this._inlineClass);b.children().removeClass(
"ui-state-disabled");b.find(
"select.ui-datepicker-month, select.ui-datepicker-year").removeAttr(
"disabled")}this._disabledInputs=d.map(this._disabledInputs,
function(f){
return f==a?null:f})}},_disableDatepicker:
function(a){var b=d(a),c=d.data(a,
1047 "datepicker");
if(b.hasClass(
this.markerClassName)){var e=a.nodeName.toLowerCase();
if(e==
"input"){a.disabled=
true;c.trigger.filter(
"button").each(
function(){this.disabled=
true}).end().filter(
"img").css({opacity:
"0.5",cursor:
"default"})}
else if(e==
"div"||e==
"span"){b=b.children(
"."+this._inlineClass);b.children().addClass(
"ui-state-disabled");b.find(
"select.ui-datepicker-month, select.ui-datepicker-year").attr(
"disabled",
"disabled")}this._disabledInputs=d.map(this._disabledInputs,
function(f){
return f==
1048 a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:
function(
a){
if(!a)
return false;
for(var b=0;b<this._disabledInputs.length;b++)
if(this._disabledInputs[b]==a)
return true;
return false},_getInst:
function(
a){
try{
return d.data(a,
"datepicker")}
catch(b){
throw"Missing instance data for this datepicker";}},_optionDatepicker:
function(
a,
b,c){var e=this._getInst(a);
if(arguments.length==2&&typeof b==
"string")
return b==
"defaults"?d.extend({},d.datepicker._defaults):e?b==
"all"?
1049 d.extend({},e.settings):this._get(e,b):null;var f=b||{};
if(typeof b==
"string"){f={};f[
b]=c}
if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,
true),i=this._getMinMaxDate(e,
"min"),g=this._getMinMaxDate(e,
"max");H(e.settings,f);
if(i!==null&&f.dateFormat!==C&&f.minDate===C)e.settings.minDate=this._formatDate(e,i);
if(g!==null&&f.dateFormat!==C&&f.maxDate===C)e.settings.maxDate=this._formatDate(e,g);this._attachments(d(a),e);this._autoSize(e);this._setDate(e,h);this._updateAlternate(e);
1050 this._updateDatepicker(e)}},_changeDatepicker:
function(
a,
b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:
function(
a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:
function(
a,
b){
if(a=this._getInst(a)){this._setDate(a,b);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:
function(
a,
b){(a=this._getInst(a))&&!a.inline&&
this._setDateFromField(a,b);
return a?this._getDate(a):null},_doKeyDown:
function(
a){var b=d.datepicker._getInst(a.target),c=
true,e=b.dpDiv.is(
".ui-datepicker-rtl");
1051 b._keyEvent=
true;
if(d.datepicker._datepickerShowing)
switch(a.keyCode){
case 9:d.datepicker._hideDatepicker();c=
false;
break;
case 13:c=d(
"td."+d.datepicker._dayOverClass+
":not(."+d.datepicker._currentClass+
")",b.dpDiv);c[0]&&d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]);
if(a=d.datepicker._get(b,
"onSelect")){c=d.datepicker._formatDate(b);a.apply(b.input?b.input[0]:null,[c,b])}
else d.datepicker._hideDatepicker();
return false;
case 27:d.datepicker._hideDatepicker();
break;
case 33:d.datepicker._adjustDate(a.target,
1052 a.ctrlKey?-d.datepicker._get(b,
"stepBigMonths"):-d.datepicker._get(b,
"stepMonths"),
"M");
break;
case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,
"stepBigMonths"):+d.datepicker._get(b,
"stepMonths"),
"M");
break;
case 35:
if(a.ctrlKey||a.metaKey)d.datepicker._clearDate(a.target);c=a.ctrlKey||a.metaKey;
break;
case 36:
if(a.ctrlKey||a.metaKey)d.datepicker._gotoToday(a.target);c=a.ctrlKey||a.metaKey;
break;
case 37:
if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?+1:-1,
"D");c=
1053 a.ctrlKey||a.metaKey;
if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,
"stepBigMonths"):-d.datepicker._get(b,
"stepMonths"),
"M");
break;
case 38:
if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,-7,
"D");c=a.ctrlKey||a.metaKey;
break;
case 39:
if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?-1:+1,
"D");c=a.ctrlKey||a.metaKey;
if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,
"stepBigMonths"):+d.datepicker._get(b,
1054 "stepMonths"),
"M");
break;
case 40:
if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,+7,
"D");c=a.ctrlKey||a.metaKey;
break;
default:c=
false}
else if(a.keyCode==36&&a.ctrlKey)d.datepicker._showDatepicker(
this);
else c=
false;
if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:
function(
a){var b=d.datepicker._getInst(a.target);
if(d.datepicker._get(b,
"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,
"dateFormat"));var c=String.fromCharCode(a.charCode==C?a.keyCode:a.charCode);
1055 return a.ctrlKey||a.metaKey||c<
" "||!b||b.indexOf(c)>-1}},_doKeyUp:
function(
a){a=d.datepicker._getInst(a.target);
if(a.input.val()!=a.lastVal)
try{
if(d.datepicker.parseDate(d.datepicker._get(a,
"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}
catch(b){d.datepicker.log(b)}
return true},_showDatepicker:
function(
a){a=a.target||
a;
if(a.nodeName.toLowerCase()!=
"input")a=d(
"input",
1056 a.parentNode)[0];
if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==
a)){var b=d.datepicker._getInst(a);
if(d.datepicker._curInst&&d.datepicker._curInst!=b){d.datepicker._datepickerShowing&&d.datepicker._triggerOnClose(d.datepicker._curInst);d.datepicker._curInst.dpDiv.stop(
true,
true)}var c=d.datepicker._get(b,
"beforeShow");c=c?c.apply(a,[a,b]):{};
if(c!==
false){H(b.settings,c);b.lastVal=null;d.datepicker._lastInput=
a;d.datepicker._setDateFromField(b);
if(d.datepicker._inDialog)a.value=
1057 "";
if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=
false;d(a).parents().each(
function(){e|=d(
this).css(
"position")==
"fixed";
return!e});
if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:
"absolute",display:
"block",top:
"-1000px"});d.datepicker._updateDatepicker(b);
1058 c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?
"static":e?
"fixed":
"absolute",display:
"none",left:c.left+
"px",top:c.top+
"px"});
if(!b.inline){c=d.datepicker._get(b,
"showAnim");var f=d.datepicker._get(b,
"duration"),h=
function(){var i=b.dpDiv.find(
"iframe.ui-datepicker-cover");
if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.datepicker._datepickerShowing=
1059 true;d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,
"showOptions"),f,h):b.dpDiv[c||
"show"](c?f:null,h);
if(!c||!f)h();b.input.is(
":visible")&&!b.input.is(
":disabled")&&b.input.focus();d.datepicker._curInst=b}}}},_updateDatepicker:
function(
a){this.maxRows=4;var b=d.datepicker._getBorders(a.dpDiv);J=
a;a.dpDiv.empty().append(this._generateHTML(a));var c=a.dpDiv.find(
"iframe.ui-datepicker-cover");c.length&&c.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});
1060 a.dpDiv.find(
"."+this._dayOverClass+
" a").mouseover();b=this._getNumberOfMonths(a);c=b[1];a.dpDiv.removeClass(
"ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(
"");c>1&&a.dpDiv.addClass(
"ui-datepicker-multi-"+c).css(
"width",17*c+
"em");a.dpDiv[(b[0]!=1||b[1]!=1?
"add":
"remove")+
"Class"](
"ui-datepicker-multi");a.dpDiv[(this._get(a,
"isRTL")?
"add":
"remove")+
"Class"](
"ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(
":visible")&&
1061 !a.input.is(
":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();
if(a.yearshtml){var e=a.yearshtml;setTimeout(
function(){e===a.yearshtml&&a.yearshtml&&a.dpDiv.find(
"select.ui-datepicker-year:first").replaceWith(a.yearshtml);e=a.yearshtml=null},0)}},_getBorders:
function(a){var b=
function(c){
return{thin:1,medium:2,thick:3}[c]||c};
return[parseFloat(
b(a.css(
"border-left-width"))),parseFloat(
b(a.css(
"border-top-width")))]},_checkOffset:
function(
a,
b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),
1062 h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,
"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);
return b},_findPos:
function(
a){
for(var b=
1063 this._get(this._getInst(a),
"isRTL");a&&(a.type==
"hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?
"previousSibling":
"nextSibling"];a=d(a).offset();
return[a.left,a.top]},_triggerOnClose:
function(
a){var b=this._get(a,
"onClose");
if(b)b.apply(a.input?a.input[0]:null,[a.input?a.input.val():
"",
a])},_hideDatepicker:
function(a){var b=this._curInst;
if(!(!b||a&&b!=d.data(a,
"datepicker")))
if(this._datepickerShowing){a=this._get(b,
"showAnim");var c=this._get(b,
"duration"),e=
function(){d.datepicker._tidyDialog(b);
1064 this._curInst=null};d.effects&&d.effects[
a]?b.dpDiv.hide(a,d.datepicker._get(b,
"showOptions"),c,e):b.dpDiv[a==
"slideDown"?
"slideUp":a==
"fadeIn"?
"fadeOut":
"hide"](a?c:null,e);a||e();d.datepicker._triggerOnClose(b);this._datepickerShowing=
false;this._lastInput=null;
if(this._inDialog){this._dialogInput.css({position:
"absolute",left:
"0",top:
"-100px"});
if(d.blockUI){d.unblockUI();d(
"body").append(this.dpDiv)}}this._inDialog=
false}},_tidyDialog:
function(
a){a.dpDiv.removeClass(this._dialogClass).unbind(
".ui-datepicker-calendar")},
1065 _checkExternalClick:
function(
a){
if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents(
"#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:
function(
a,
b,c){a=d(a);var e=this._getInst(a[0]);
if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c==
"M"?this._get(e,
"showCurrentAtPos"):
1066 0),c);this._updateDatepicker(e)}},_gotoToday:
function(
a){a=d(a);var b=this._getInst(a[0]);
if(this._get(b,
"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}
else{var c=
new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:
function(
a,
b,c){a=d(a);var e=this._getInst(a[0]);e[
"selected"+(c==
"M"?
1067 "Month":
"Year")]=e[
"draw"+(c==
"M"?
"Month":
"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_selectDay:
function(
a,
b,c,e){var f=d(a);
if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d(
"a",e).html();f.selectedMonth=f.currentMonth=
b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:
function(
a){a=d(a);
1068 this._getInst(a[0]);this._selectDate(a,
"")},_selectDate:
function(
a,
b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,
"onSelect");
if(c)c.apply(a.input?a.input[0]:null,[b,a]);
else a.input&&a.input.trigger(
"change");
if(a.inline)this._updateDatepicker(a);
else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!=
"object"&&a.input.focus();this._lastInput=null}},_updateAlternate:
function(
a){var b=this._get(a,
"altField");
1069 if(b){var c=this._get(a,
"altFormat")||this._get(a,
"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(
function(){d(
this).val(f)})}},noWeekends:
function(a){a=a.getDay();
return[a>0&&a<6,
""]},iso8601Week:
function(
a){a=
new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);
return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:
function(a,b,c){
if(a==null||b==null)
throw"Invalid arguments";b=typeof b==
"object"?
1070 b.toString():b+
"";
if(b==
"")
return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!=
"string"?e:(
new Date).getFullYear()%100+parseInt(e,10);
for(var f=(c?c.dayNamesShort:null)||
this._defaults.dayNamesShort,h=(c?c.dayNames:null)||
this._defaults.dayNames,i=(c?c.monthNamesShort:null)||
this._defaults.monthNamesShort,g=(c?c.monthNames:null)||
this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=
false,o=
function(p){(p=A+1<a.length&&a.charAt(A+1)==p)&&A++;
return p},m=
function(p){var D=
1071 o(p);p=
new RegExp(
"^\\d{1,"+(p==
"@"?14:p==
"!"?20:p==
"y"&&D?4:p==
"o"?3:2)+
"}");p=b.substring(q).match(p);
if(!p)
throw"Missing number at position "+q;q+=p[0].length;
return parseInt(p[0],10)},n=
function(p,D,K){p=d.map(o(p)?K:D,
function(w,x){
return[[x,w]]}).sort(
function(w,x){
return-(w[1].length-x[1].length)});var E=-1;d.each(p,
function(w,x){w=x[1];
if(b.substr(q,w.length).toLowerCase()==w.toLowerCase()){E=x[0];q+=w.length;
return false}});
if(E!=-1)
return E+1;
else throw"Unknown name at position "+q;},s=
1072 function(){
if(b.charAt(q)!=a.charAt(A))
throw"Unexpected literal at position "+q;q++},q=0,A=0;A<a.length;A++)
if(k)
if(a.charAt(A)==
"'"&&!o(
"'"))k=
false;
else s();
else switch(a.charAt(A)){
case "d":l=m(
"d");
break;
case "D":n(
"D",f,h);
break;
case "o":u=m(
"o");
break;
case "m":j=m(
"m");
break;
case "M":j=n(
"M",i,g);
break;
case "y":c=m(
"y");
break;
case "@":var v=
new Date(m(
"@"));c=v.getFullYear();j=v.getMonth()+1;l=v.getDate();
break;
case "!":v=
new Date((m(
"!")-this._ticksTo1970)/1E4);c=v.getFullYear();j=v.getMonth()+
1073 1;l=v.getDate();
break;
case "'":
if(o(
"'"))s();
else k=
true;
break;
default:s()}
if(q<b.length)
throw"Extra/unparsed characters found in date: "+b.substring(q);
if(c==-1)c=(
new Date).getFullYear();
else if(c<100)c+=(
new Date).getFullYear()-(
new Date).getFullYear()%100+(c<=e?0:-100);
if(u>-1){j=1;l=u;
do{e=this._getDaysInMonth(c,j-1);
if(l<=e)
break;j++;l-=e}
while(1)}v=this._daylightSavingAdjust(
new Date(c,j-1,l));
if(v.getFullYear()!=c||v.getMonth()+1!=j||v.getDate()!=l)
throw"Invalid date";
return v},ATOM:
"yy-mm-dd",
1074 COOKIE:
"D, dd M yy",ISO_8601:
"yy-mm-dd",RFC_822:
"D, d M y",RFC_850:
"DD, dd-M-y",RFC_1036:
"D, d M y",RFC_1123:
"D, d M yy",RFC_2822:
"D, d M yy",RSS:
"D, d M y",TICKS:
"!",TIMESTAMP:
"@",W3C:
"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:
function(a,b,c){
if(!b)
return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:
1075 null)||this._defaults.monthNames;var i=
function(o){(o=k+1<a.length&&a.charAt(k+1)==o)&&k++;
return o},g=
function(o,m,n){m=
""+m;
if(i(o))
for(;m.length<n;)m=
"0"+m;
return m},j=
function(o,m,n,s){
return i(o)?s[m]:n[m]},l=
"",u=
false;
if(b)
for(var k=0;k<a.length;k++)
if(u)
if(a.charAt(k)==
"'"&&!i(
"'"))u=
false;
else l+=a.charAt(k);
else switch(a.charAt(k)){
case "d":l+=g(
"d",b.getDate(),2);
break;
case "D":l+=j(
"D",b.getDay(),e,f);
break;
case "o":l+=g(
"o",Math.round(((
new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-
1076 (
new Date(b.getFullYear(),0,0)).getTime())/864E5),3);
break;
case "m":l+=g(
"m",b.getMonth()+1,2);
break;
case "M":l+=j(
"M",b.getMonth(),h,c);
break;
case "y":l+=i(
"y")?b.getFullYear():(b.getYear()%100<10?
"0":
"")+b.getYear()%100;
break;
case "@":l+=b.getTime();
break;
case "!":l+=b.getTime()*1E4+this._ticksTo1970;
break;
case "'":
if(i(
"'"))l+=
"'";
else u=
true;
break;
default:l+=a.charAt(k)}
return l},_possibleChars:
function(
a){
for(var b=
"",c=
false,e=
function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;
return h},f=
1077 0;f<a.length;f++)
if(c)
if(a.charAt(f)==
"'"&&!e(
"'"))c=
false;
else b+=a.charAt(f);
else switch(a.charAt(f)){
case "d":
case "m":
case "y":
case "@":b+=
"0123456789";
break;
case "D":
case "M":
return null;
case "'":
if(e(
"'"))b+=
"'";
else c=
true;
break;
default:b+=a.charAt(f)}
return b},_get:
function(
a,
b){
return a.settings[
b]!==C?a.settings[
b]:this._defaults[
b]},_setDateFromField:
function(
a,
b){
if(a.input.val()!=a.lastVal){var c=this._get(a,
"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);
1078 var i=this._getFormatConfig(a);
try{f=this.parseDate(c,e,i)||h}
catch(g){this.log(g);e=b?
"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:
function(
a){
return this._restrictMinMax(a,this._determineDate(a,this._get(a,
"defaultDate"),
new Date))},_determineDate:
function(
a,
b,c){var e=
function(h){var i=
new Date;
1079 i.setDate(i.getDate()+h);
return i},f=
function(h){
try{
return d.datepicker.parseDate(d.datepicker._get(a,
"dateFormat"),h,d.datepicker._getFormatConfig(a))}
catch(i){}var g=(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||
new Date,j=g.getFullYear(),l=g.getMonth();g=g.getDate();
for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=u.exec(h);k;){
switch(k[2]||
"d"){
case "d":
case "D":g+=parseInt(k[1],10);
break;
case "w":
case "W":g+=parseInt(k[1],10)*7;
break;
case "m":
case "M":l+=parseInt(k[1],10);g=
1080 Math.min(g,d.datepicker._getDaysInMonth(j,l));
break;
case "y":
case "Y":j+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));
break}k=u.exec(h)}
return new Date(j,l,g)};
if(b=(b=b==null||b===
""?c:typeof b==
"string"?f(b):typeof b==
"number"?isNaN(b)?c:e(b):
new Date(b.getTime()))&&b.toString()==
"Invalid Date"?c:
b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}
return this._daylightSavingAdjust(b)},_daylightSavingAdjust:
function(
a){
if(!a)
return null;a.setHours(a.getHours()>
1081 12?a.getHours()+2:0);
return a},_setDate:
function(
a,
b,c){var e=!
b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,
new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();
if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);
if(a.input)a.input.val(e?
"":this._formatDate(a))},_getDate:
function(
a){
return!a.currentYear||a.input&&
1082 a.input.val()==
""?null:this._daylightSavingAdjust(
new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:
function(
a){var b=
new Date;b=this._daylightSavingAdjust(
new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,
"isRTL"),e=this._get(a,
"showButtonPanel"),f=this._get(a,
"hideIfNoPrevNext"),h=this._get(a,
"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,
"showCurrentAtPos"),j=this._get(a,
"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?
1083 new Date(9999,9,9):
new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,
"min"),o=this._getMinMaxDate(a,
"max");g=a.drawMonth-g;var m=a.drawYear;
if(g<0){g+=12;m--}
if(o){var n=this._daylightSavingAdjust(
new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));
for(n=k&&n<k?k:n;this._daylightSavingAdjust(
new Date(m,g,1))>n;){g--;
if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,
"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(
new Date(m,g-j,1)),this._getFormatConfig(a));
1084 n=this._canAdjustMonth(a,-1,m,g)?
'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+B+
".datepicker._adjustDate('#"+a.id+
"', -"+j+
", 'M');\" title=\""+n+
'"><span class="ui-icon ui-icon-circle-triangle-'+(c?
"e":
"w")+
'">'+n+
"</span></a>":f?
"":
'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+
'"><span class="ui-icon ui-icon-circle-triangle-'+(c?
"e":
"w")+
'">'+n+
"</span></a>";var s=this._get(a,
"nextText");s=!h?s:this.formatDate(s,this._daylightSavingAdjust(
new Date(m,
1085 g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?
'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+B+
".datepicker._adjustDate('#"+a.id+
"', +"+j+
", 'M');\" title=\""+s+
'"><span class="ui-icon ui-icon-circle-triangle-'+(c?
"w":
"e")+
'">'+s+
"</span></a>":f?
"":
'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+
'"><span class="ui-icon ui-icon-circle-triangle-'+(c?
"w":
"e")+
'">'+s+
"</span></a>";j=this._get(a,
"currentText");s=this._get(a,
"gotoCurrent")&&
1086 a.currentDay?u:
b;j=!h?j:this.formatDate(j,s,this._getFormatConfig(a));h=!a.inline?
'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+B+
'.datepicker._hideDatepicker();">'+this._get(a,
"closeText")+
"</button>":
"";e=e?
'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:
"")+(this._isInRange(a,s)?
'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+
1087 B+
".datepicker._gotoToday('#"+a.id+
"');\">"+j+
"</button>":
"")+(c?
"":h)+
"</div>":
"";h=parseInt(this._get(a,
"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,
"showWeek");s=this._get(a,
"dayNames");this._get(a,
"dayNamesShort");var q=this._get(a,
"dayNamesMin"),A=this._get(a,
"monthNames"),v=this._get(a,
"monthNamesShort"),p=this._get(a,
"beforeShowDay"),D=this._get(a,
"showOtherMonths"),K=this._get(a,
"selectOtherMonths");this._get(a,
"calculateWeek");
for(var E=this._getDefaultDate(a),w=
"",x=0;x<i[0];x++){var O=
1088 "";this.maxRows=4;
for(var G=0;G<i[1];G++){var P=this._daylightSavingAdjust(
new Date(m,g,a.selectedDay)),t=
" ui-corner-all",y=
"";
if(l){y+=
'<div class="ui-datepicker-group';
if(i[1]>1)
switch(G){
case 0:y+=
" ui-datepicker-group-first";t=
" ui-corner-"+(c?
"right":
"left");
break;
case i[1]-1:y+=
" ui-datepicker-group-last";t=
" ui-corner-"+(c?
"left":
"right");
break;
default:y+=
" ui-datepicker-group-middle";t=
"";
break}y+=
'">'}y+=
'<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+
'">'+(/all|left/.test(t)&&
1089 x==0?c?f:n:
"")+(/all|right/.test(t)&&x==0?c?n:f:
"")+this._generateMonthYearHeader(a,g,m,k,o,x>0||G>0,A,v)+
'</div><table class="ui-datepicker-calendar"><thead><tr>';var z=j?
'<th class="ui-datepicker-week-col">'+this._get(a,
"weekHeader")+
"</th>":
"";
for(t=0;t<7;t++){var r=(t+h)%7;z+=
"<th"+((t+h+6)%7>=5?
' class="ui-datepicker-week-end"':
"")+
'><span title="'+s[r]+
'">'+q[r]+
"</span></th>"}y+=z+
"</tr></thead><tbody>";z=this._getDaysInMonth(m,g);
if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,
1090 z);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;z=Math.ceil((t+z)/7);this.maxRows=z=l?this.maxRows>z?this.maxRows:z:z;r=this._daylightSavingAdjust(
new Date(m,g,1-t));
for(var Q=0;Q<z;Q++){y+=
"<tr>";var R=!j?
"":
'<td class="ui-datepicker-week-col">'+this._get(a,
"calculateWeek")(r)+
"</td>";
for(t=0;t<7;t++){var I=p?p.apply(a.input?a.input[0]:null,[r]):[
true,
""],F=r.getMonth()!=g,L=F&&!K||!I[0]||k&&r<k||o&&r>o;R+=
'<td class="'+((t+h+6)%7>=5?
" ui-datepicker-week-end":
"")+(F?
" ui-datepicker-other-month":
"")+(r.getTime()==
1091 P.getTime()&&g==a.selectedMonth&&a._keyEvent||E.getTime()==r.getTime()&&E.getTime()==P.getTime()?
" "+this._dayOverClass:
"")+(L?
" "+this._unselectableClass+
" ui-state-disabled":
"")+(F&&!D?
"":
" "+I[1]+(r.getTime()==u.getTime()?
" "+this._currentClass:
"")+(r.getTime()==b.getTime()?
" ui-datepicker-today":
""))+
'"'+((!F||D)&&I[2]?
' title="'+I[2]+
'"':
"")+(L?
"":
' onclick="DP_jQuery_'+B+
".datepicker._selectDay('#"+a.id+
"',"+r.getMonth()+
","+r.getFullYear()+
', this);return false;"')+
">"+(F&&!D?
" ":L?
'<span class="ui-state-default">'+
1092 r.getDate()+
"</span>":
'<a class="ui-state-default'+(r.getTime()==b.getTime()?
" ui-state-highlight":
"")+(r.getTime()==u.getTime()?
" ui-state-active":
"")+(F?
" ui-priority-secondary":
"")+
'" href="#">'+r.getDate()+
"</a>")+
"</td>";r.setDate(r.getDate()+1);r=this._daylightSavingAdjust(r)}y+=R+
"</tr>"}g++;
if(g>11){g=0;m++}y+=
"</tbody></table>"+(l?
"</div>"+(i[0]>0&&G==i[1]-1?
'<div class="ui-datepicker-row-break"></div>':
""):
"");O+=y}w+=O}w+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?
'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':
1093 "");a._keyEvent=
false;
return w},_generateMonthYearHeader:
function(
a,
b,c,e,f,h,i,g){var j=this._get(a,
"changeMonth"),l=this._get(a,
"changeYear"),u=this._get(a,
"showMonthAfterYear"),k=
'<div class="ui-datepicker-title">',o=
"";
if(h||!j)o+=
'<span class="ui-datepicker-month">'+i[
b]+
"</span>";
else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+=
'<select class="ui-datepicker-month" onchange="DP_jQuery_'+B+
".datepicker._selectMonthYear('#"+a.id+
"', this, 'M');\" >";
for(var n=0;n<12;n++)if((!i||n>=e.getMonth())&&
1094 (!m||n<=f.getMonth()))o+=
'<option value="'+n+
'"'+(n==b?
' selected="selected"':
"")+
">"+g[n]+
"</option>";o+=
"</select>"}u||(k+=o+(h||!(j&&l)?
" ":
""));
if(!a.yearshtml){a.yearshtml=
"";
if(h||!l)k+=
'<span class="ui-datepicker-year">'+c+
"</span>";
else{g=this._get(a,
"yearRange").split(
":");var s=(
new Date).getFullYear();i=
function(q){q=q.match(/c[+-].*/)?c+parseInt(q.substring(1),10):q.match(/[+-].*/)?s+parseInt(q,10):parseInt(q,10);
return isNaN(q)?s:q};b=i(g[0]);g=Math.max(b,i(g[1]||
""));b=e?Math.max(b,
1095 e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;
for(a.yearshtml+=
'<select class="ui-datepicker-year" onchange="DP_jQuery_'+B+
".datepicker._selectMonthYear('#"+a.id+
"', this, 'Y');\" >";b<=g;b++)a.yearshtml+=
'<option value="'+b+
'"'+(b==c?
' selected="selected"':
"")+
">"+b+
"</option>";a.yearshtml+=
"</select>";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,
"yearSuffix");
if(u)k+=(h||!(j&&l)?
" ":
"")+o;k+=
"</div>";
return k},_adjustInstDate:
function(
a,
b,c){var e=a.drawYear+(c==
"Y"?b:0),f=a.drawMonth+
1096 (c==
"M"?b:0);b=Math.min(a.selectedDay,
this._getDaysInMonth(e,f))+(c==
"D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(
new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();
if(c==
"M"||c==
"Y")this._notifyChange(a)},_restrictMinMax:
function(
a,
b){var c=this._getMinMaxDate(a,
"min");a=this._getMinMaxDate(a,
"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:
function(
a){var b=this._get(a,
"onChangeMonthYear");
if(b)b.apply(a.input?
1097 a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:
function(
a){a=this._get(a,
"numberOfMonths");
return a==null?[1,1]:typeof a==
"number"?[1,
a]:a},_getMinMaxDate:
function(
a,
b){
return this._determineDate(a,this._get(a,b+
"Date"),null)},_getDaysInMonth:
function(
a,
b){
return 32-this._daylightSavingAdjust(
new Date(a,b,32)).getDate()},_getFirstDayOfMonth:
function(
a,
b){
return(
new Date(a,b,1)).getDay()},_canAdjustMonth:
function(
a,
b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(
new Date(c,
1098 e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));
return this._isInRange(a,c)},_isInRange:
function(
a,
b){var c=this._getMinMaxDate(a,
"min");a=this._getMinMaxDate(a,
"max");
return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:
function(a){var b=this._get(a,
"shortYearCutoff");b=typeof b!=
"string"?b:(
new Date).getFullYear()%100+parseInt(b,10);
return{shortYearCutoff:
b,dayNamesShort:this._get(a,
"dayNamesShort"),dayNames:this._get(a,
1099 "dayNames"),monthNamesShort:this._get(a,
"monthNamesShort"),monthNames:this._get(a,
"monthNames")}},_formatDate:
function(
a,
b,c,e){
if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b==
"object"?b:this._daylightSavingAdjust(
new Date(e,c,b)):this._daylightSavingAdjust(
new Date(a.currentYear,a.currentMonth,a.currentDay));
return this.formatDate(this._get(a,
"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=
function(
a){
if(!this.length)
return this;
1100 if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find(
"body").append(d.datepicker.dpDiv);d.datepicker.initialized=
true}var b=Array.prototype.slice.call(arguments,1);
if(typeof a==
"string"&&(a==
"isDisabled"||a==
"getDate"||a==
"widget"))
return d.datepicker[
"_"+a+
"Datepicker"].apply(d.datepicker,[
this[0]].concat(b));
if(a==
"option"&&arguments.length==2&&typeof arguments[1]==
"string")
return d.datepicker[
"_"+a+
"Datepicker"].apply(d.datepicker,[
this[0]].concat(b));
return this.each(
function(){typeof a==
1101 "string"?d.datepicker[
"_"+a+
"Datepicker"].apply(d.datepicker,[
this].concat(b)):d.datepicker._attachDatepicker(
this,a)})};d.datepicker=
new M;d.datepicker.initialized=
false;d.datepicker.uuid=(
new Date).getTime();d.datepicker.version=
"1.8.16";window[
"DP_jQuery_"+B]=d})(
jQuery);
1115 (
function(
b,d){b.widget(
"ui.progressbar",{options:{value:0,max:100},min:0,_create:
function(){this.element.addClass(
"ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:
"progressbar",
"aria-valuemin":this.min,
"aria-valuemax":this.options.max,
"aria-valuenow":this._value()});this.valueDiv=
b(
"<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},
destroy:
function(){this.element.removeClass(
"ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr(
"role").removeAttr(
"aria-valuemin").removeAttr(
"aria-valuemax").removeAttr(
"aria-valuenow");
1116 this.valueDiv.remove();b.Widget.prototype.destroy.apply(
this,arguments)},value:
function(
a){
if(a===d)
return this._value();this._setOption(
"value",a);
return this},_setOption:
function(
a,c){
if(a===
"value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger(
"complete")}b.Widget.prototype._setOption.apply(
this,arguments)},_value:
function(){var a=this.options.value;
if(typeof a!==
"number")a=0;
return Math.min(this.options.max,Math.max(
this.min,a))},_percentage:
function(){
return 100*
1117 this._value()/this.options.max},_refreshValue:
function(){var a=this.value(),c=this._percentage();
if(this.oldValue!==a){this.oldValue=
a;this._trigger(
"change")}this.valueDiv.toggle(a>this.min).toggleClass(
"ui-corner-right",a===this.options.max).width(c.toFixed(0)+
"%");this.element.attr(
"aria-valuenow",a)}});b.extend(b.ui.progressbar,{
version:
"1.8.16"})})(
jQuery);
1127 jQuery.effects||
function(f,j){
function m(c){var
a;
if(c&&c.constructor==Array&&c.length==3)
return c;
if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))
return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];
if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))
return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];
if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))
return[parseInt(a[1],
1128 16),parseInt(a[2],16),parseInt(a[3],16)];
if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))
return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];
if(/rgba\(0, 0, 0, 0\)/.exec(c))
return n.transparent;
return n[f.trim(c).toLowerCase()]}
function s(c,a){var
b;
do{b=f.curCSS(c,a);
if(b!=
""&&b!=
"transparent"||f.nodeName(c,
"body"))
break;a=
"backgroundColor"}
while(c=c.parentNode);
return m(b)}
function o(){var c=document.defaultView?document.defaultView.getComputedStyle(
this,null):this.currentStyle,
1129 a={},
b,d;
if(c&&c.length&&c[0]&&c[c[0]])
for(var e=c.length;e--;){b=c[e];
if(typeof c[b]==
"string"){d=b.replace(/\-(\w)/g,
function(g,h){
return h.toUpperCase()});a[d]=c[
b]}}
else for(b in c)
if(typeof c[b]===
"string")a[
b]=c[
b];
return a}
function p(c){var
a,
b;
for(a in c){b=c[
a];
if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))
delete c[a]}
return c}
function u(c,a){var b={_:0},d;
for(d in a)
if(c[d]!=a[d])b[d]=a[d];
return b}
function k(c,a,b,d){
if(typeof c==
"object"){d=
1130 a;b=null;a=c;c=a.effect}
if(f.isFunction(a)){d=
a;b=null;a={}}
if(typeof a==
"number"||f.fx.speeds[a]){d=
b;b=
a;a={}}
if(f.isFunction(b)){d=
b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b==
"number"?b:b in f.fx.speeds?f.fx.speeds[
b]:f.fx.speeds._default;d=d||a.complete;
return[c,
a,
b,d]}
function l(c){
if(!c||typeof c===
"number"||f.fx.speeds[c])
return true;
if(typeof c===
"string"&&!f.effects[c])
return true;
return false}f.effects={};f.each([
"backgroundColor",
"borderBottomColor",
"borderLeftColor",
"borderRightColor",
1131 "borderTopColor",
"borderColor",
"color",
"outlineColor"],
function(c,a){f.fx.step[
a]=
function(
b){
if(!b.colorInit){b.start=s(b.elem,a);b.end=m(b.end);b.colorInit=
true}b.elem.style[
a]=
"rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+
","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+
","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+
")"}});var n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
1132 0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,
1133 211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},q=[
"add",
"remove",
"toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=
function(c,
a,
b,
1134 d){
if(f.isFunction(b)){d=
b;b=null}
return this.queue(
function(){var e=f(
this),g=e.attr(
"style")||
" ",h=p(o.call(
this)),r,v=e.attr(
"class");f.each(q,
function(w,i){c[i]&&e[i+
"Class"](c[i])});r=p(o.call(
this));e.attr(
"class",v);e.animate(u(h,r),{queue:
false,duration:
a,easing:
b,complete:
function(){f.each(q,
function(w,i){c[i]&&e[i+
"Class"](c[i])});
if(typeof e.attr(
"style")==
"object"){e.attr(
"style").cssText=
"";e.attr(
"style").cssText=g}
else e.attr(
"style",g);d&&d.apply(
this,arguments);f.dequeue(
this)}})})};
1135 f.fn.extend({_addClass:f.fn.addClass,addClass:
function(c,
a,
b,d){
return a?f.effects.animateClass.apply(
this,[{add:c},
a,
b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:
function(c,
a,
b,d){
return a?f.effects.animateClass.apply(
this,[{
remove:c},
a,
b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:
function(c,
a,
b,d,e){
return typeof a==
"boolean"||a===j?b?f.effects.animateClass.apply(
this,[a?{add:c}:{
remove:c},
b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(
this,
1136 [{toggle:c},
a,
b,d])},switchClass:
function(c,a,b,d,e){
return f.effects.animateClass.apply(
this,[{add:
a,
remove:c},
b,d,e])}});f.extend(f.effects,{
version:
"1.8.16",save:
function(c,a){
for(var b=0;b<a.length;b++)a[b]!==null&&c.data(
"ec.storage."+a[b],c[0].style[a[b]])},restore:
function(c,
a){
for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data(
"ec.storage."+a[b]))},setMode:
function(c,a){
if(a==
"toggle")a=c.is(
":hidden")?
"show":
"hide";
return a},getBaseline:
function(c,
a){var
b;
switch(c[0]){
case "top":b=
1137 0;
break;
case "middle":b=0.5;
break;
case "bottom":b=1;
break;
default:b=c[0]/a.height}
switch(c[1]){
case "left":c=0;
break;
case "center":c=0.5;
break;
case "right":c=1;
break;
default:c=c[1]/a.width}
return{x:c,y:b}},createWrapper:
function(c){
if(c.parent().is(
".ui-effects-wrapper"))
return c.parent();var a={width:c.outerWidth(
true),height:c.outerHeight(
true),
"float":c.css(
"float")},b=f(
"<div></div>").addClass(
"ui-effects-wrapper").css({fontSize:
"100%",background:
"transparent",border:
"none",margin:0,padding:0}),
1138 d=document.activeElement;c.wrap(b);
if(c[0]===d||f.contains(c[0],d))f(d).focus();b=c.parent();
if(c.css(
"position")==
"static"){b.css({position:
"relative"});c.css({position:
"relative"})}
else{f.extend(a,{position:c.css(
"position"),zIndex:c.css(
"z-index")});f.each([
"top",
"left",
"bottom",
"right"],
function(e,g){a[g]=c.css(g);
if(isNaN(parseInt(a[g],10)))a[g]=
"auto"});c.css({position:
"relative",top:0,left:0,right:
"auto",bottom:
"auto"})}
return b.css(a).show()},removeWrapper:
function(c){var
a,b=document.activeElement;
1139 if(c.parent().is(
".ui-effects-wrapper")){a=c.parent().replaceWith(c);
if(c[0]===b||f.contains(c[0],b))f(b).focus();
return a}
return c},setTransition:
function(c,
a,
b,d){d=d||{};f.each(a,
function(e,g){unit=c.cssUnit(g);
if(unit[0]>0)d[g]=unit[0]*b+unit[1]});
return d}});f.fn.extend({effect:
function(c){var a=k.apply(
this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];
if(f.fx.off||!d)
return a?
this[
a](b.duration,b.callback):this.each(
function(){b.callback&&b.callback.call(
this)});
1140 return d.call(
this,b)},_show:f.fn.show,show:
function(c){
if(l(c))
return this._show.apply(
this,arguments);
else{var a=k.apply(
this,arguments);a[1].mode=
"show";
return this.effect.apply(
this,a)}},_hide:f.fn.hide,hide:
function(c){
if(l(c))
return this._hide.apply(
this,arguments);
else{var a=k.apply(
this,arguments);a[1].mode=
"hide";
return this.effect.apply(
this,a)}},__toggle:f.fn.toggle,toggle:
function(c){
if(l(c)||typeof c===
"boolean"||f.isFunction(c))
return this.__toggle.apply(
this,arguments);
else{var a=k.apply(
this,
1141 arguments);a[1].mode=
"toggle";
return this.effect.apply(
this,a)}},cssUnit:
function(c){var a=this.css(c),b=[];f.each([
"em",
"px",
"%",
"pt"],
function(d,e){
if(a.indexOf(e)>0)b=[parseFloat(a),e]});
return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:
"easeOutQuad",swing:
function(c,a,b,d,e){
return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:
function(c,
a,
b,d,e){
return d*(a/=e)*a+b},easeOutQuad:
function(c,a,b,d,e){
return-d*(a/=e)*(a-2)+b},easeInOutQuad:
function(c,
a,
b,d,e){
if((a/=e/2)<1)
return d/
1142 2*a*a+b;
return-d/2*(--a*(a-2)-1)+b},easeInCubic:
function(c,
a,
b,d,e){
return d*(a/=e)*a*a+b},easeOutCubic:
function(c,a,b,d,e){
return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:
function(c,
a,
b,d,e){
if((a/=e/2)<1)
return d/2*a*a*a+b;
return d/2*((a-=2)*a*a+2)+b},easeInQuart:
function(c,
a,
b,d,e){
return d*(a/=e)*a*a*a+b},easeOutQuart:
function(c,a,b,d,e){
return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:
function(c,
a,
b,d,e){
if((a/=e/2)<1)
return d/2*a*a*a*a+b;
return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:
function(c,
a,
b,
1143 d,e){
return d*(a/=e)*a*a*a*a+b},easeOutQuint:
function(c,a,b,d,e){
return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:
function(c,
a,
b,d,e){
if((a/=e/2)<1)
return d/2*a*a*a*a*a+b;
return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:
function(c,
a,
b,d,e){
return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:
function(c,
a,
b,d,e){
return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:
function(c,
a,
b,d,e){
return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:
function(c,a,b,d,e){
return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:
function(c,
1144 a,
b,d,e){
return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:
function(c,a,b,d,e){
if(a==0)
return b;
if(a==e)
return b+d;
if((a/=e/2)<1)
return d/2*Math.pow(2,10*(a-1))+
b;
return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:
function(c,a,b,d,e){
return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:
function(c,a,b,d,e){
return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:
function(c,
a,
b,d,e){
if((a/=e/2)<1)
return-d/2*(Math.sqrt(1-a*a)-1)+b;
return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:
function(c,a,b,
1145 d,e){c=1.70158;var g=0,h=d;
if(a==0)
return b;
if((a/=e)==1)
return b+d;g||(g=e*0.3);
if(h<Math.abs(d)){h=d;c=g/4}
else c=g/(2*Math.PI)*Math.asin(d/h);
return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:
function(c,a,b,d,e){c=1.70158;var g=0,h=d;
if(a==0)
return b;
if((a/=e)==1)
return b+d;g||(g=e*0.3);
if(h<Math.abs(d)){h=d;c=g/4}
else c=g/(2*Math.PI)*Math.asin(d/h);
return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:
function(c,
a,
b,d,e){c=1.70158;var g=
1146 0,h=d;
if(a==0)
return b;
if((a/=e/2)==2)
return b+d;g||(g=e*0.3*1.5);
if(h<Math.abs(d)){h=d;c=g/4}
else c=g/(2*Math.PI)*Math.asin(d/h);
if(a<1)
return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+
b;
return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:
function(c,
a,
b,d,e,g){
if(g==j)g=1.70158;
return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:
function(c,a,b,d,e,g){
if(g==j)g=1.70158;
return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:
function(c,
a,
b,d,e,g){
if(g==j)g=1.70158;
1147 if((a/=e/2)<1)
return d/2*a*a*(((g*=1.525)+1)*a-g)+
b;
return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:
function(c,a,b,d,e){
return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:
function(c,
a,
b,d,e){
return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:
function(c,
a,
b,d,e){
if(a<e/2)
return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+
b;
return f.easing.easeOutBounce(c,
1148 a*2-e,0,d,e)*0.5+d*0.5+b}})}(
jQuery);
1161 (
function(
b){b.effects.blind=
function(c){
return this.queue(
function(){var a=
b(
this),g=[
"position",
"top",
"bottom",
"left",
"right"],f=b.effects.setMode(a,c.options.mode||
"hide"),d=c.options.direction||
"vertical";b.effects.save(a,g);a.show();var e=b.effects.createWrapper(a).css({overflow:
"hidden"}),h=d==
"vertical"?
"height":
"width";d=d==
"vertical"?e.height():e.width();f==
"show"&&e.css(h,0);var i={};i[h]=f==
"show"?d:0;e.animate(i,c.duration,c.options.easing,
function(){f==
"hide"&&a.hide();b.effects.restore(a,
1162 g);b.effects.removeWrapper(a);c.callback&&c.callback.apply(a[0],arguments);a.dequeue()})})}})(
jQuery);
1175 (
function(e){e.effects.bounce=
function(
b){
return this.queue(
function(){var a=e(
this),l=[
"position",
"top",
"bottom",
"left",
"right"],h=e.effects.setMode(a,b.options.mode||
"effect"),d=b.options.direction||
"up",c=b.options.distance||20,m=b.options.times||5,i=b.duration||250;/show|hide/.test(h)&&l.push(
"opacity");e.effects.save(a,l);a.show();e.effects.createWrapper(a);var f=d==
"up"||d==
"down"?
"top":
"left";d=d==
"up"||d==
"left"?
"pos":
"neg";c=b.options.distance||(f==
"top"?a.outerHeight({margin:
true})/3:a.outerWidth({margin:
true})/
1176 3);
if(h==
"show")a.css(
"opacity",0).css(f,d==
"pos"?-c:c);
if(h==
"hide")c/=m*2;h!=
"hide"&&m--;
if(h==
"show"){var g={opacity:1};g[f]=(d==
"pos"?
"+=":
"-=")+c;a.animate(g,i/2,b.options.easing);c/=2;m--}
for(g=0;g<m;g++){var j={},k={};j[f]=(d==
"pos"?
"-=":
"+=")+c;k[f]=(d==
"pos"?
"+=":
"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing);c=h==
"hide"?c*2:c/2}
if(h==
"hide"){g={opacity:0};g[f]=(d==
"pos"?
"-=":
"+=")+c;a.animate(g,i/2,b.options.easing,
function(){a.hide();e.effects.restore(a,l);e.effects.removeWrapper(a);
1177 b.callback&&b.callback.apply(
this,arguments)})}
else{j={};k={};j[f]=(d==
"pos"?
"-=":
"+=")+c;k[f]=(d==
"pos"?
"+=":
"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing,
function(){e.effects.restore(a,l);e.effects.removeWrapper(a);b.callback&&b.callback.apply(
this,arguments)})}a.queue(
"fx",
function(){a.dequeue()});a.dequeue()})}})(
jQuery);
1190 (
function(
b){b.effects.clip=
function(e){
return this.queue(
function(){var a=
b(
this),i=[
"position",
"top",
"bottom",
"left",
"right",
"height",
"width"],f=b.effects.setMode(a,e.options.mode||
"hide"),c=e.options.direction||
"vertical";b.effects.save(a,i);a.show();var d=b.effects.createWrapper(a).css({overflow:
"hidden"});d=a[0].tagName==
"IMG"?d:
a;var g={size:c==
"vertical"?
"height":
"width",position:c==
"vertical"?
"top":
"left"};c=c==
"vertical"?d.height():d.width();
if(f==
"show"){d.css(g.size,0);d.css(g.position,
1191 c/2)}var h={};h[g.size]=f==
"show"?c:0;h[g.position]=f==
"show"?0:c/2;d.animate(h,{queue:
false,duration:e.duration,easing:e.options.easing,complete:
function(){f==
"hide"&&a.hide();b.effects.restore(a,i);b.effects.removeWrapper(a);e.callback&&e.callback.apply(a[0],arguments);a.dequeue()}})})}})(
jQuery);
1204 (
function(c){c.effects.drop=
function(d){
return this.queue(
function(){var a=c(
this),h=[
"position",
"top",
"bottom",
"left",
"right",
"opacity"],e=c.effects.setMode(a,d.options.mode||
"hide"),b=d.options.direction||
"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a);var f=b==
"up"||b==
"down"?
"top":
"left";b=b==
"up"||b==
"left"?
"pos":
"neg";var g=d.options.distance||(f==
"top"?a.outerHeight({margin:
true})/2:a.outerWidth({margin:
true})/2);
if(e==
"show")a.css(
"opacity",0).css(f,b==
"pos"?-g:g);var i={opacity:e==
1205 "show"?1:0};i[f]=(e==
"show"?b==
"pos"?
"+=":
"-=":b==
"pos"?
"-=":
"+=")+g;a.animate(i,{queue:
false,duration:d.duration,easing:d.options.easing,complete:
function(){e==
"hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(
this,arguments);a.dequeue()}})})}})(
jQuery);
1218 (
function(j){j.effects.explode=
function(
a){
return this.queue(
function(){var c=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3,d=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3;a.options.mode=a.options.mode==
"toggle"?j(
this).is(
":visible")?
"hide":
"show":a.options.mode;var b=j(
this).show().css(
"visibility",
"hidden"),g=b.offset();g.top-=parseInt(b.css(
"marginTop"),10)||0;g.left-=parseInt(b.css(
"marginLeft"),10)||0;
for(var h=b.outerWidth(
true),i=b.outerHeight(
true),e=0;e<c;e++)
for(var f=
1219 0;f<d;f++)b.clone().appendTo(
"body").wrap(
"<div></div>").css({position:
"absolute",visibility:
"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass(
"ui-effects-explode").css({position:
"absolute",overflow:
"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode==
"show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode==
"show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode==
"show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode==
"show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+
1220 e*(i/c)+(a.options.mode==
"show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode==
"show"?1:0},a.duration||500);setTimeout(
function(){a.options.mode==
"show"?b.css({visibility:
"visible"}):b.css({visibility:
"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j(
"div.ui-effects-explode").remove()},a.duration||500)})}})(
jQuery);
1233 (
function(
b){b.effects.fade=
function(
a){
return this.queue(
function(){var c=
b(
this),d=b.effects.setMode(c,a.options.mode||
"hide");c.animate({opacity:d},{queue:
false,duration:a.duration,easing:a.options.easing,complete:
function(){a.callback&&a.callback.apply(
this,arguments);c.dequeue()}})})}})(
jQuery);
1246 (
function(c){c.effects.fold=
function(
a){
return this.queue(
function(){var b=c(
this),j=[
"position",
"top",
"bottom",
"left",
"right"],d=c.effects.setMode(b,a.options.mode||
"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:
"hidden"}),f=d==
"show"!=h,l=f?[
"width",
"height"]:[
"height",
"width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);
if(i)g=parseInt(i[1],
1247 10)/100*f[d==
"hide"?0:1];
if(d==
"show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d==
"show"?f[0]:g;i[l[1]]=d==
"show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,
function(){d==
"hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(
jQuery);
1260 (
function(
b){b.effects.highlight=
function(c){
return this.queue(
function(){var a=
b(
this),e=[
"backgroundImage",
"backgroundColor",
"opacity"],d=b.effects.setMode(a,c.options.mode||
"show"),f={backgroundColor:a.css(
"backgroundColor")};
if(d==
"hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:
"none",backgroundColor:c.options.color||
"#ffff99"}).animate(f,{queue:
false,duration:c.duration,easing:c.options.easing,complete:
function(){d==
"hide"&&a.hide();b.effects.restore(a,e);d==
"show"&&!b.support.opacity&&
1261 this.style.removeAttribute(
"filter");c.callback&&c.callback.apply(
this,arguments);a.dequeue()}})})}})(
jQuery);
1274 (
function(d){d.effects.pulsate=
function(
a){
return this.queue(
function(){var b=d(
this),c=d.effects.setMode(b,a.options.mode||
"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(
":visible");animateTo=0;
if(!isVisible){b.css(
"opacity",0).show();animateTo=1}
if(c==
"hide"&&isVisible||c==
"show"&&!isVisible)times--;
for(c=0;c<times;c++){b.animate({opacity:animateTo},duration,a.options.easing);animateTo=(animateTo+1)%2}b.animate({opacity:animateTo},duration,
1275 a.options.easing,
function(){animateTo==0&&b.hide();a.callback&&a.callback.apply(
this,arguments)});b.queue(
"fx",
function(){b.dequeue()}).dequeue()})}})(
jQuery);
1288 (
function(c){c.effects.puff=
function(
b){
return this.queue(
function(){var a=c(
this),e=c.effects.setMode(a,b.options.mode||
"hide"),g=parseInt(b.options.percent,10)||150,h=g/100,i={height:a.height(),width:a.width()};c.extend(b.options,{fade:
true,mode:e,percent:e==
"hide"?g:100,from:e==
"hide"?i:{height:i.height*h,width:i.width*h}});a.effect(
"scale",b.options,b.duration,b.callback);a.dequeue()})};c.effects.scale=
function(
b){
return this.queue(
function(){var a=c(
this),e=c.extend(
true,{},b.options),g=c.effects.setMode(a,
1289 b.options.mode||
"effect"),h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:g==
"hide"?0:100),i=b.options.direction||
"both",f=b.options.origin;
if(g!=
"effect"){e.origin=f||[
"middle",
"center"];e.restore=
true}f={height:a.height(),width:a.width()};a.from=b.options.from||(g==
"show"?{height:0,width:0}:f);h={y:i!=
"horizontal"?h/100:1,x:i!=
"vertical"?h/100:1};a.to={height:f.height*h.y,width:f.width*h.x};
if(b.options.fade){
if(g==
"show"){a.from.opacity=0;a.to.opacity=1}
if(g==
"hide"){a.from.opacity=
1290 1;a.to.opacity=0}}e.from=a.from;e.to=a.to;e.mode=g;a.effect(
"size",e,b.duration,b.callback);a.dequeue()})};c.effects.size=
function(
b){
return this.queue(
function(){var a=c(
this),e=[
"position",
"top",
"bottom",
"left",
"right",
"width",
"height",
"overflow",
"opacity"],g=[
"position",
"top",
"bottom",
"left",
"right",
"overflow",
"opacity"],h=[
"width",
"height",
"overflow"],i=[
"fontSize"],f=[
"borderTopWidth",
"borderBottomWidth",
"paddingTop",
"paddingBottom"],k=[
"borderLeftWidth",
"borderRightWidth",
"paddingLeft",
"paddingRight"],
1291 p=c.effects.setMode(a,b.options.mode||
"effect"),n=b.options.restore||
false,m=b.options.scale||
"both",l=b.options.origin,j={height:a.height(),width:a.width()};a.from=b.options.from||j;a.to=b.options.to||j;
if(l){l=c.effects.getBaseline(l,j);a.from.top=(j.height-a.from.height)*l.y;a.from.left=(j.width-a.from.width)*l.x;a.to.top=(j.height-a.to.height)*l.y;a.to.left=(j.width-a.to.width)*l.x}var d={from:{y:a.from.height/j.height,x:a.from.width/j.width},to:{y:a.to.height/j.height,x:a.to.width/j.width}};
1292 if(m==
"box"||m==
"both"){
if(d.from.y!=d.to.y){e=e.concat(f);a.from=c.effects.setTransition(a,f,d.from.y,a.from);a.to=c.effects.setTransition(a,f,d.to.y,a.to)}
if(d.from.x!=d.to.x){e=e.concat(k);a.from=c.effects.setTransition(a,k,d.from.x,a.from);a.to=c.effects.setTransition(a,k,d.to.x,a.to)}}
if(m==
"content"||m==
"both")
if(d.from.y!=d.to.y){e=e.concat(i);a.from=c.effects.setTransition(a,i,d.from.y,a.from);a.to=c.effects.setTransition(a,i,d.to.y,a.to)}c.effects.save(a,n?e:g);a.show();c.effects.createWrapper(a);
1293 a.css(
"overflow",
"hidden").css(a.from);
if(m==
"content"||m==
"both"){f=f.concat([
"marginTop",
"marginBottom"]).concat(i);k=k.concat([
"marginLeft",
"marginRight"]);h=e.concat(f).concat(k);a.find(
"*[width]").each(
function(){child=c(
this);n&&c.effects.save(child,h);var o={height:child.height(),width:child.width()};child.from={height:o.height*d.from.y,width:o.width*d.from.x};child.to={height:o.height*d.to.y,width:o.width*d.to.x};
if(d.from.y!=d.to.y){child.from=c.effects.setTransition(child,f,d.from.y,child.from);
1294 child.to=c.effects.setTransition(child,f,d.to.y,child.to)}
if(d.from.x!=d.to.x){child.from=c.effects.setTransition(child,k,d.from.x,child.from);child.to=c.effects.setTransition(child,k,d.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,
function(){n&&c.effects.restore(child,h)})})}a.animate(a.to,{queue:
false,duration:b.duration,easing:b.options.easing,complete:
function(){a.to.opacity===0&&a.css(
"opacity",a.from.opacity);p==
"hide"&&a.hide();c.effects.restore(a,
1295 n?e:g);c.effects.removeWrapper(a);b.callback&&b.callback.apply(
this,arguments);a.dequeue()}})})}})(
jQuery);
1308 (
function(d){d.effects.shake=
function(
a){
return this.queue(
function(){var b=d(
this),j=[
"position",
"top",
"bottom",
"left",
"right"];d.effects.setMode(b,a.options.mode||
"effect");var c=a.options.direction||
"left",e=a.options.distance||20,l=a.options.times||3,f=a.duration||a.options.duration||140;d.effects.save(b,j);b.show();d.effects.createWrapper(b);var g=c==
"up"||c==
"down"?
"top":
"left",h=c==
"up"||c==
"left"?
"pos":
"neg";c={};var i={},k={};c[g]=(h==
"pos"?
"-=":
"+=")+e;i[g]=(h==
"pos"?
"+=":
"-=")+e*2;k[g]=
1309 (h==
"pos"?
"-=":
"+=")+e*2;b.animate(c,f,a.options.easing);
for(e=1;e<l;e++)b.animate(i,f,a.options.easing).animate(k,f,a.options.easing);b.animate(i,f,a.options.easing).animate(c,f/2,a.options.easing,
function(){d.effects.restore(b,j);d.effects.removeWrapper(b);a.callback&&a.callback.apply(
this,arguments)});b.queue(
"fx",
function(){b.dequeue()});b.dequeue()})}})(
jQuery);
1322 (
function(c){c.effects.slide=
function(d){
return this.queue(
function(){var a=c(
this),h=[
"position",
"top",
"bottom",
"left",
"right"],f=c.effects.setMode(a,d.options.mode||
"show"),b=d.options.direction||
"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a).css({overflow:
"hidden"});var g=b==
"up"||b==
"down"?
"top":
"left";b=b==
"up"||b==
"left"?
"pos":
"neg";var e=d.options.distance||(g==
"top"?a.outerHeight({margin:
true}):a.outerWidth({margin:
true}));
if(f==
"show")a.css(g,b==
"pos"?isNaN(e)?
"-"+e:-e:e);
1323 var i={};i[g]=(f==
"show"?b==
"pos"?
"+=":
"-=":b==
"pos"?
"-=":
"+=")+e;a.animate(i,{queue:
false,duration:d.duration,easing:d.options.easing,complete:
function(){f==
"hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(
this,arguments);a.dequeue()}})})}})(
jQuery);
1336 (
function(e){e.effects.transfer=
function(
a){
return this.queue(
function(){var b=e(
this),c=e(a.options.to),d=c.offset();c={top:d.top,left:d.left,height:c.innerHeight(),width:c.innerWidth()};d=b.offset();var f=e(
'<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:
"absolute"}).animate(c,a.duration,a.options.easing,
function(){f.remove();a.callback&&a.callback.apply(b[0],arguments);
1337 b.dequeue()})})}})(
jQuery);
1358 if ($.browser.mozilla) {
1359 $.fn.disableTextSelect =
function() {
1360 return this.each(
function() {
1362 'MozUserSelect' :
'none'
1366 $.fn.enableTextSelect =
function() {
1367 return this.each(
function() {
1369 'MozUserSelect' :
''
1373 }
else if ($.browser.msie) {
1374 $.fn.disableTextSelect =
function() {
1375 return this.each(
function() {
1376 $(
this).bind(
'selectstart.disableTextSelect',
function() {
1381 $.fn.enableTextSelect =
function() {
1382 return this.each(
function() {
1383 $(
this).unbind(
'selectstart.disableTextSelect');
1387 $.fn.disableTextSelect =
function() {
1388 return this.each(
function() {
1389 $(
this).bind(
'mousedown.disableTextSelect',
function() {
1394 $.fn.enableTextSelect =
function() {
1395 return this.each(
function() {
1396 $(
this).unbind(
'mousedown.disableTextSelect');
1403 this._element =
jQuery( element );
1404 this._block_name =
'block-' + ( ++dropdown_block_class.blockId );
1405 this.init( options );
1408 dropdown_block_class.blockId = 0;
1410 dropdown_block_class.prototype.init =
function( options )
1415 if( options.ext_class )
1417 ExtClass =
' ' + options.ext_class;
1420 jQuery( this._element ).after(
'<div class="popup_block_panel' + ExtClass +
'" style="position:absolute; display:none;" id="' + this._block_name +
'">' + options.content +
'</div>' );
1422 jQuery( this._element ).mouseover(
1425 var position =
jQuery( obj._element ).position();
1426 var height =
jQuery( obj._element ).outerHeight(
true );
1428 jQuery(
'#' + obj._block_name ).css(
'left' , position.left );
1429 jQuery(
'#' + obj._block_name ).css(
'top' , position.top + height - 1 );
1430 jQuery(
'#' + obj._block_name ).css(
'display' ,
'block' );
1434 jQuery( document ).mousemove(
1437 var offset =
jQuery( obj._element ).offset();
1438 var height =
jQuery( obj._element ).outerHeight(
true );
1439 var width =
jQuery( obj._element ).outerWidth(
true );
1441 if( offset.left <= evt.pageX && evt.pageX <= offset.left + width && offset.top <= evt.pageY && evt.pageY <= offset.top + height )
1446 offset =
jQuery( obj._element ).next().offset();
1447 height =
jQuery( obj._element ).next().outerHeight(
true );
1448 width =
jQuery( obj._element ).next().outerWidth(
true );
1450 if( offset.left <= evt.pageX && evt.pageX <= offset.left + width && offset.top <= evt.pageY && evt.pageY <= offset.top + height )
1455 jQuery( obj._element ).next().css(
'display' ,
'none' );
1460 jQuery.fn.dropdown_block =
function( options )
1469 if( this.length == 0 )
1473 else if( this.length == 1 )
1481 for( i = 0 ; i < this.length ; i++ )
1502 timer_widget :
function( element , options )
1504 this._element = element;
1505 this.timeout = options.timeout;
1506 this.timeout_callback = options.timeout_callback;
1513 ultimix.timer_widget.prototype._prepending_zero =
function( Value )
1517 return(
'0' + Value );
1521 return(
'' + Value );
1525 ultimix.timer_widget.prototype.init =
function()
1528 this.set_timer( this.timeout );
1529 this.timeout_callback_was_launched =
false;
1531 this.start_time = Math.floor( (
new Date() ).getTime() / 1000 );
1532 window.setInterval(
function(){ obj.on_tick( obj ) } , 1000 );
1535 ultimix.timer_widget.prototype.set_timer =
function( Time )
1537 Hours = Math.floor( Time / ( 60 * 60 ) );
1538 Minutes = Math.floor( Time / 60 - Hours * 60 );
1539 Seconds = Math.floor( Time - Hours * 60 * 60 - Minutes * 60 );
1540 jQuery( this._element ).empty();
1541 jQuery( this._element ).append(
'<span class="hours">' + this._prepending_zero( Hours ) +
'</span>:<span class="minutes">' + this._prepending_zero( Minutes ) +
'</span>:<span class="seconds">' + this._prepending_zero( Seconds ) +
'</span>' );
1544 ultimix.timer_widget.prototype.on_tick =
function( obj )
1546 Diff = Math.floor( (
new Date() ).getTime() / 1000 ) - obj.start_time;
1547 if( obj.timeout - Diff > 0 )
1549 obj.set_timer( obj.timeout - Diff );
1554 if( obj.timeout_callback_was_launched ==
false )
1556 if( obj.timeout_callback )
1558 obj.timeout_callback();
1560 obj.timeout_callback_was_launched =
true;
1565 jQuery.fn.timer_widget =
function( options )
1570 timeout_callback :
false
1583 function create_timer( element , options )
1585 jQuery( document ).ready(
1611 ultimix.ToggleElement =
function( ElementId , Speed )
1613 jQuery(
'#' + ElementId ).toggle( Speed );
1620 if( !
ultimix.select_extractor )
1622 ultimix.select_extractor = {};
1636 ultimix.select_extractor.SetData =
function( Items , Value )
1638 for( var i = 0 ; i < Items.length ; i++ )
1640 if(
jQuery( Items[ i ] ).prop(
'tagName' ) ==
'INPUT' ||
1641 jQuery( Items[ i ] ).prop(
'tagName' ) ==
'TEXTAREA' )
1643 jQuery( Items[ i ] ).val( Value );
1646 if(
jQuery( Items[ i ] ).prop(
'tagName' ) ==
'SPAN' ||
1647 jQuery( Items[ i ] ).prop(
'tagName' ) ==
'DIV' ||
1648 jQuery( Items[ i ] ).prop(
'tagName' ) ==
'A' )
1650 jQuery( Items[ i ] ).html( Value );
1667 ultimix.select_extractor.ExtractSimpleSelectResult =
function( AcceptorSelector , StatusSelector , DataSource )
1669 var Radios =
jQuery(
'input[name=' + DataSource +
']:radio' );
1671 for( var i = 0 ; i < Radios.length ; i++ )
1673 if(
jQuery( Radios[ i ] ).attr(
'checked' ) )
1675 Value =
jQuery( Radios[ i ] ).attr(
'value' );
1676 var Items =
jQuery( AcceptorSelector );
1677 ultimix.SetData( Items , Value );
1679 Status =
jQuery(
'[for=' +
jQuery( Radios[ i ] ).attr(
'id' ) +
']' ).html();
1680 Items =
jQuery( StatusSelector );
1681 ultimix.SetData( Items , Status );
1693 jQuery(
".accordion" ).accordion(
1703 $.datepicker.regional[
'ru'] = {
1704 closeText:
'Закрыть',
1705 prevText:
'<Пред',
1706 nextText:
'След>',
1707 currentText:
'Сегодня',
1708 monthNames: [
'Январь',
'Февраль',
'Март',
'Апрель',
'Май',
'Июнь',
1709 'Июль',
'Август',
'Сентябрь',
'Октябрь',
'Ноябрь',
'Декабрь'],
1710 monthNamesShort: [
'Янв',
'Фев',
'Мар',
'Апр',
'Май',
'Июн',
1711 'Июл',
'Авг',
'Сен',
'Окт',
'Ноя',
'Дек'],
1712 dayNames: [
'воскресенье',
'понедельник',
'вторник',
'среда',
'четверг',
'пятница',
'суббота'],
1713 dayNamesShort: [
'вск',
'пнд',
'втр',
'срд',
'чтв',
'птн',
'сбт'],
1714 dayNamesMin: [
'Вс',
'Пн',
'Вт',
'Ср',
'Чт',
'Пт',
'Сб'],
1715 dateFormat:
'dd.mm.yy', firstDay: 1,
1717 $.datepicker.setDefaults($.datepicker.regional[
'ru']);
1744 ultimix.wizard.Steps =
new Array();
1751 ultimix.wizard.CurrentStep = -1;
1764 ultimix.wizard._CreateWizardDialogs =
function( RawSteps , SuccessFunction , DialogOptions )
1766 ultimix.wizard.Steps = RawSteps;
1768 DialogOptions =
jQuery.extend(
1775 closeOnEscape : false ,
1780 DialogOptions.autoOpen =
false;
1781 if( DialogOptions.title )
1783 DialogOptions.title =
ultimix.get_string( DialogOptions.title );
1786 for( var i = 0 ; i <
ultimix.wizard.Steps.length ; i++ )
1788 var Buttons =
new Array();
1789 var CurrentSelector =
ultimix.wizard.Steps[ i ].selector;
1791 if( i + 1 <
ultimix.wizard.Steps.length )
1793 var CreateNextButton =
function( i , CurrentSelector )
1798 jQuery( CurrentSelector ).dialog(
'close' );
1799 jQuery(
ultimix.wizard.Steps[ i + 1 ].selector ).dialog(
'open' );
1800 jQuery(
ultimix.wizard.Steps[ i + 1 ].selector ).dialog(
'option' ,
'title' , DialogOptions.title +
' ' +
ultimix.get_string(
'step' ) +
' ' + ( i + 2 ) +
' ' +
ultimix.get_string(
'of' ) +
' ' +
ultimix.wizard.Steps.length );
1804 Buttons[
ultimix.get_string(
'Next' ) ] = CreateNextButton( i , CurrentSelector );
1807 if( i + 1 ==
ultimix.wizard.Steps.length )
1809 var CreateFinishButton =
function( i , CurrentSelector )
1815 jQuery( CurrentSelector ).dialog(
'close' );
1819 Buttons[
ultimix.get_string(
'Finish' ) ] = CreateFinishButton( i , CurrentSelector );
1824 var CreateBackButton =
function( i , CurrentSelector )
1829 jQuery( CurrentSelector ).dialog(
'close' );
1830 jQuery(
ultimix.wizard.Steps[ i - 1 ].selector ).dialog(
'open' );
1831 jQuery(
ultimix.wizard.Steps[ i - 1 ].selector ).dialog(
'option' ,
'title' , DialogOptions.title +
' ' +
ultimix.get_string(
'step' ) +
' ' + i +
' ' +
ultimix.get_string(
'of' ) +
' ' +
ultimix.wizard.Steps.length );
1835 Buttons[
ultimix.get_string(
'Back' ) ] = CreateBackButton( i , CurrentSelector );
1838 var CreateCancelButton =
function( CurrentSelector )
1843 jQuery( CurrentSelector ).dialog(
'close' );
1847 Buttons[
ultimix.get_string(
'Cancel' ) ] = CreateCancelButton( CurrentSelector );
1849 DialogOptions.buttons = Buttons;
1851 jQuery(
ultimix.wizard.Steps[ i ].selector ).dialog( DialogOptions );
1866 ultimix.wizard.Wizard =
function( RawSteps , SuccessFunction , DialogOptions )
1868 ultimix.wizard.CurrentStep = -1;
1870 ultimix.wizard._CreateWizardDialogs( RawSteps , SuccessFunction , DialogOptions );
1872 jQuery(
ultimix.wizard.Steps[ 0 ].selector ).dialog(
'open' );
1874 jQuery(
ultimix.wizard.Steps[ 0 ].selector ).dialog(
'option' ,
'title' , DialogOptions.title +
' ' +
ultimix.get_string(
'step' ) +
' ' + 1 +
' ' +
ultimix.get_string(
'of' ) +
' ' +
ultimix.wizard.Steps.length );
1896 ultimix.IframeDialogInit =
function( DivSelector , Url )
1898 jQuery(
'#' + DivSelector ).html(
'<iframe style="border:0px; width: 100%; height: 100%;" src="' + Url +
'"></iframe>' );
1910 ultimix.IframeDialogOnOpen =
function( DivSelector )
1912 jQuery(
'#' + DivSelector ).attr(
'style' ,
'padding: 0px; ' +
jQuery(
'#' + DivSelector ).attr(
'style' ) );
1951 ultimix.dialog.AddOpener =
function( Opener , Selector , DataAcceptor , StatusAcceptor , DataSource , BeforeOpenValidation )
1955 if(
jQuery( Opener ).length )
1957 var Items =
jQuery( Opener );
1959 for( var i = 0 ; i < Items.length ; i++ )
1961 var OpenDialogFunction =
function()
1963 ultimix.dialog.OpenDialog( Selector , DataAcceptor , StatusAcceptor , DataSource , BeforeOpenValidation );
1966 jQuery( Items[ i ] ).unbind(
'click' );
1967 jQuery( Items[ i ] ).click( OpenDialogFunction );
1969 if(
jQuery( Items[ i ] ).attr(
'tagName' ) ==
'A' )
1971 jQuery( Items[ i ] ).attr(
'href' ,
'#' );
1974 if(
jQuery( Items[ i ] ).attr(
'tagName' ) ==
'INPUT' ||
jQuery( Items[ i ] ).attr(
'tagName' ) ==
'TEXTAREA' )
1976 jQuery( Items[ i ] ).unbind(
'focus' );
1977 jQuery( Items[ i ] ).focus( OpenDialogFunction );
1999 ultimix.dialog.OpenDialog =
function( Selector , DataAcceptor , StatusAcceptor , DataSource , BeforeOpenValidation )
2001 jQuery( Selector ).attr(
'data_acceptor' , DataAcceptor );
2002 jQuery( Selector ).attr(
'status_acceptor' , StatusAcceptor );
2003 jQuery( Selector ).attr(
'data_source' , DataSource );
2005 if( BeforeOpenValidation && BeforeOpenValidation() ==
false )
2011 jQuery( Selector ).dialog(
'open' );
2012 jQuery( Selector ).dialog( { position: [
'center' ,
'center' ] } );
2024 ultimix.dialog.ShowDomInDialog =
function( Selector , Title )
2026 jQuery( Selector ).dialog(
2030 'maxWidth' :
'960' ,
2038 jQuery(
this ).dialog(
'close' );
2063 ultimix.tab_control.TabCounter = 1;
2064 ultimix.tab_control.AddTabFlag = 0;
2065 ultimix.tab_control.AddContentId =
'_unexisting_id';
2066 ultimix.tab_control.InitialTabWasDeleted =
new Array();
2076 ultimix.tab_control.TabControlCreateSetup =
function( ControlId )
2078 jQuery(
'#' + ControlId ).tabs(
2080 select :
function( event , ui )
2082 if(
ultimix.tab_control.AddTabFlag == 0 )
2084 SetCookie( ControlId +
'-active-tab-id' , ui.tab.hash.replace(
'#' ,
'' ) , 365 );
2087 ultimix.tab_control.AddTabFlag = 0;
2092 ultimix.tab_control.SetAddTabHandler( ControlId );
2102 ultimix.tab_control.CreateTab =
function( ControlId )
2104 var TabId =
'tabs' +
ultimix.tab_control.TabCounter++;
2105 jQuery(
'#' + ControlId ).html(
'<ul><li><a href="#' + TabId +
'"></a></li></ul><div id="' + TabId +
'"></div>' );
2107 jQuery(
'#' + ControlId ).tabs();
2109 ultimix.tab_control.TabControlCreateSetup( ControlId );
2111 ultimix.tab_control.InitialTabWasDeleted[ ControlId ] =
false;
2121 ultimix.tab_control.OnCloseTab =
function( ControlId )
2123 var index =
jQuery(
'li' ,
jQuery(
'#' + ControlId ) ).index(
jQuery(
this ).parent() );
2124 jQuery(
'#' + ControlId ).tabs(
'remove' , index );
2136 ultimix.tab_control.SetClosable =
function( ControlId , TabCursor )
2140 var Item =
jQuery(
'#' + ControlId +
'>.ui-tabs-nav>li>a' ).eq( TabCursor );
2144 var Item =
jQuery(
'#' + ControlId +
'>.ui-tabs-nav>li>a' ).last();
2147 if(
jQuery( Item ).next().length )
2149 jQuery( Item ).next().remove();
2152 jQuery( Item ).after(
'<span class="ui-icon ui-icon-close" onclick="ultimix.tab_control.OnCloseTab( \''+ControlId+
'\' );
">Remove Tab</span>' );
2162 ultimix.tab_control.TryAutoSelectTab = function( ControlId )
2164 var ActiveTabId = GetCookie( ControlId + '-active-tab-id' , 'tabs1' );
2166 if( jQuery( '#' + ControlId ).find( '#' + ActiveTabId ).length )
2168 var Items = jQuery( '#' + ControlId + '>.ui-tabs-nav>li>a' );
2169 for( var i = 0 ; i < Items.length ; i++ )
2171 if( jQuery( Items[ i ] ).attr( 'href' ) == '#' + ActiveTabId )
2173 jQuery( '#' + ControlId ).tabs( "select
" , i );
2174 ultimix.tab_control.AddTabFlag = 0;
2187 ultimix.tab_control.SetAddTabHandler = function( ControlId )
2189 jQuery( '#' + ControlId ).tabs(
2191 function( event , ui )
2193 jQuery( ui.panel ).append( jQuery( '#' + ultimix.tab_control.AddContentId ) );
2195 ultimix.tab_control.TryAutoSelectTab( ControlId );
2213 ultimix.tab_control.AddSimpleTab = function( ControlId , Title , Index , ContentId )
2215 /* Informing the script that we are additing tabs and there is no need to update cookie */
2216 ultimix.tab_control.AddTabFlag = 1;
2217 ultimix.tab_control.AddContentId = ContentId;
2219 var TabSelector = '#tabs' + ( ultimix.tab_control.TabCounter++ );
2223 jQuery( '#' + ControlId ).tabs( 'add' , TabSelector , ultimix.get_string( Title ) , Index );
2227 jQuery( '#' + ControlId ).tabs( 'add' , TabSelector , ultimix.get_string( Title ) );
2244 ultimix.tab_control.AddSimpleTabFromContent = function( ControlId , Title , Index , Content )
2246 var ContentId = "content_
" + ultimix.core.GetCurrentMilliseconds();
2248 jQuery( 'body' ).append( '<div id="' + ContentId + '">' + Content + '</div>' );
2250 ultimix.tab_control.AddSimpleTab( ControlId , Title , Index , ContentId );
2268 ultimix.tab_control.AddTab = function( ControlId , Title , Index , ContentId , Closable )
2270 ultimix.tab_control.AddSimpleTab( ControlId , Title , Index , ContentId );
2272 if( ultimix.tab_control.InitialTabWasDeleted[ ControlId ] == false )
2274 jQuery( '#' + ControlId ).tabs( 'remove' , 0 );
2275 ultimix.tab_control.InitialTabWasDeleted[ ControlId ] = true;
2280 ultimix.tab_control.SetClosable( ControlId );
2299 ultimix.tab_control.AddTabFromContent = function( ControlId , Title , Index , Content , Closable )
2301 var ContentId = "content_
" + ultimix.core.GetCurrentMilliseconds();
2303 jQuery( 'body' ).append( '<div id="' + ContentId + '">' + Content + '</div>' );
2305 ultimix.tab_control.AddTab( ControlId , Title , Index , ContentId , Closable );
2325 ultimix.tab_control.AddIFrameTab = function( ControlId , Title , Index , URL , Closable , Height )
2327 var TabFrameId = ultimix.tab_control.TabCounter++;
2329 jQuery( 'body' ).append( '<iframe style="width: 100%; border: 0px; height:
' + Height + ';
" id="tab_frame_
' +
2330 TabFrameId + '" src="' + URL + '"></iframe>' );
2332 ultimix.tab_control.AddTab( ControlId , Title , Index , "tab_frame_
" + TabFrameId , Closable )
2342 ultimix.tab_control.CreateTabControlFromMarkup = function( ControlId )
2344 jQuery( '#' + ControlId ).tabs();
2346 ultimix.tab_control.TabControlCreateSetup( ControlId );
2364 ultimix.tab_control.CreateTabControlWithTab = function( ParentSelector , ControlId , Title , Content , Closable )
2366 /* preparing markup */
2367 jQuery( ParentSelector ).append(
2368 '<div id="' + ControlId +
2369 '"><ul><li><a href="#tabs-1
">' + Title + '</a></li></ul><div id="tabs-1
">' + Content + '</div></div>'
2373 ultimix.tab_control.CreateTabControlFromMarkup( ControlId );
2377 ultimix.tab_control.SetClosable( ControlId );
2398 ultimix.tab_control.AddTabForExistingControl = function( ParentSelector , ControlId , Title , Index , Content , Closable )
2400 if( jQuery( '#' + ControlId ).length )
2402 /* control exists */
2403 ultimix.tab_control.AddTabFromContent( ControlId , Title , Index , Content , Closable );
2407 /* control does not exist */
2408 ultimix.tab_control.CreateTabControlWithTab( ParentSelector , ControlId , Title , Content , Closable );
2431 ultimix.tab_control.AddIFrameTabForExistingControl = function( ParentSelector , ControlId , Title , Index , URL , Closable , Height )
2433 if( jQuery( '#' + ControlId ).length )
2435 /* control exists */
2436 ultimix.tab_control.AddIFrameTab( ControlId , Title , Index , URL , Closable , Height );
2440 var ContentId = "content_
" + ultimix.core.GetCurrentMilliseconds();
2442 /* control does not exist */
2443 var Content = '<iframe style="width: 100%; border: 0px; height:
' + Height + ';
" id="tab_frame_
' +
2444 TabFrameId + '" src="' + URL + '"></iframe>';
2446 ultimix.tab_control.CreateTabControlWithTab( ParentSelector , ControlId , Title , Content , Closable );
2464 if( !ultimix.print )
2474 ultimix.print.PrintPage = function()
2482 if( jQuery( '.auto_print' ).length > 0 )
2484 ultimix.print.PrintPage();
2543 jQuery.cookie = function(name, value, options) {
2544 if (typeof value != 'undefined') { // name and value given, set cookie
2545 options = options || {};
2546 if (value === null) {
2548 options.expires = -1;
2551 if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
2553 if (typeof options.expires == 'number') {
2555 date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
2557 date = options.expires;
2559 expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
2561 // CAUTION: Needed to parenthesize options.path and options.domain
2562 // in the following expressions, otherwise they evaluate to undefined
2563 // in the packed version for some reason...
2564 var path = options.path ? '; path=' + (options.path) : '';
2565 var domain = options.domain ? '; domain=' + (options.domain) : '';
2566 var secure = options.secure ? '; secure' : '';
2567 document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
2568 } else { // only name given, get cookie
2569 var cookieValue = null;
2570 if (document.cookie && document.cookie != '') {
2571 var cookies = document.cookie.split(';');
2572 for (var i = 0; i < cookies.length; i++) {
2573 var cookie = jQuery.trim(cookies[i]);
2574 // Does this cookie string begin with the name we want?
2575 if (cookie.substring(0, name.length + 1) == (name + '=')) {
2576 cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
2584 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'system_settings' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'system_settings' ] = {};
2585 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'system_settings' ][ 'default' ] = 'Настройки системы';
2586 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'system_settings_label' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'system_settings_label' ] = {};
2587 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'system_settings_label' ][ 'default' ] = 'Настройки<br>системы';
2588 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'settings_were_saved' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'settings_were_saved' ] = {};
2589 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'settings_were_saved' ][ 'default' ] = 'Настройки были сохранены';
2590 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'form_manifest_was_not_found' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'form_manifest_was_not_found' ] = {};
2591 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'form_manifest_was_not_found' ][ 'default' ] = 'Манифест не был найден';
2592 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'illegal_setting_type' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'illegal_setting_type' ] = {};
2593 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'illegal_setting_type' ][ 'default' ] = 'Некорректный тип настройки';
2594 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'settings_site_title' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'settings_site_title' ] = {};
2595 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'settings_site_title' ][ 'default' ] = 'Название сайта';
2596 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'welcome_text_title' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'welcome_text_title' ] = {};
2597 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'welcome_text_title' ][ 'default' ] = 'Заголовок приветствия';
2598 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'welcome_text_demo' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'welcome_text_demo' ] = {};
2599 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'welcome_text_demo' ][ 'default' ] = 'Демо приветствия';
2600 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'company_name' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'company_name' ] = {};
2601 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'company_name' ][ 'default' ] = 'Название компании';
2602 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'front_page_welcome_title' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'front_page_welcome_title' ] = {};
2603 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'front_page_welcome_title' ][ 'default' ] = 'Заголовок приветствия на главной';
2604 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'front_page_welcome_text' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'front_page_welcome_text' ] = {};
2605 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'front_page_welcome_text' ][ 'default' ] = 'Приветствие на главной';
2606 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'user_settings' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'user_settings' ] = {};
2607 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'user_settings' ][ 'default' ] = 'Регистрация';
2608 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'site_settings' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'site_settings' ] = {};
2609 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'site_settings' ][ 'default' ] = 'Сайт';
2610 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'template_settings' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'template_settings' ] = {};
2611 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'template_settings' ][ 'default' ] = 'Шаблоны';
2612 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'default_template_name' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'default_template_name' ] = {};
2613 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'default_template_name' ][ 'default' ] = 'Пакет шаблона сайта';
2614 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'default_template_version' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'default_template_version' ] = {};
2615 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'default_template_version' ][ 'default' ] = 'Версия шаблона сайта';
2616 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'default_admin_template_name' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'default_admin_template_name' ] = {};
2617 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'default_admin_template_name' ][ 'default' ] = 'Пакет шаблона админки';
2618 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'default_admin_template_version' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'default_admin_template_version' ] = {};
2619 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'default_admin_template_version' ][ 'default' ] = 'Версия шаблона админки';
2620 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'email_sender' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'email_sender' ] = {};
2621 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'email_sender' ][ 'default' ] = 'Отправитель';
2622 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'system_email' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'system_email' ] = {};
2623 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'system_email' ][ 'default' ] = 'Системный email';
2626 * jQuery Media Plugin for converting elements into rich media content.
2628 * Examples and documentation at: http://malsup.com/jquery/media/
2629 * Copyright (c) 2007-2010 M. Alsup
2630 * Dual licensed under the MIT and GPL licenses:
2631 * http://www.opensource.org/licenses/mit-license.php
2632 * http://www.gnu.org/licenses/gpl.html
2635 * @version: 0.97 (20-MAY-2011)
2636 * @requires jQuery v1.1.2 or later
2637 * $Id: jquery.media.js 2460 2007-07-23 02:53:15Z malsup $
2639 * Supported Media Players:
2644 * - Windows Media Player
2647 * Supported Media Formats:
2648 * Any types supported by the above players, such as:
2649 * Video: asf, avi, flv, mov, mpg, mpeg, mp4, qt, smil, swf, wmv, 3g2, 3gp
2650 * Audio: aif, aac, au, gsm, mid, midi, mov, mp3, m4a, snd, rm, wav, wma
2651 * Other: bmp, html, pdf, psd, qif, qtif, qti, tif, tiff, xaml
2653 * Thanks to Mark Hicken and Brent Pedersen for helping me debug this on the Mac!
2654 * Thanks to Dan Rossi for numerous bug reports and code bits!
2655 * Thanks to Skye Giordano for several great suggestions!
2656 * Thanks to Richard Connamacher for excellent improvements to the non-IE behavior!
2660 var lameIE = $.browser.msie && $.browser.version < 9;
2669 $.fn.media = function(options, f1, f2) {
2670 if (options == 'undo') {
2671 return this.each(function() {
2672 var $this = $(this);
2673 var html = $this.data('media.origHTML');
2675 $this.replaceWith(html);
2679 return this.each(function() {
2680 if (typeof options == 'function') {
2685 var o = getSettings(this, options);
2686 // pre-conversion callback, passes original element and fully populated options
2687 if (typeof f1 == 'function') f1(this, o);
2689 var r = getTypesRegExp();
2690 var m = r.exec(o.src.toLowerCase()) || [''];
2692 o.type ? m[0] = o.type : m.shift();
2693 for (var i=0; i < m.length; i++) {
2694 fn = m[i].toLowerCase();
2695 if (isDigit(fn[0])) fn = 'fn' + fn; // fns can't begin with numbers
2696 if (!$.fn.media[fn])
2697 continue; // unrecognized media type
2698 // normalize autoplay settings
2699 var player = $.fn.media[fn+'_player'];
2700 if (!o.params) o.params = {};
2702 var num = player.autoplayAttr == 'autostart';
2703 o.params[player.autoplayAttr || 'autoplay'] = num ? (o.autoplay ? 1 : 0) : o.autoplay ? true : false;
2705 var $div = $.fn.media[fn](this, o);
2707 $div.css('backgroundColor', o.bgColor).width(o.width);
2710 var $temp = $('<div></div>').append(this);
2711 $div.data('media.origHTML', $temp.html()); // store original markup
2714 // post-conversion callback, passes original element, new div element and fully populated options
2715 if (typeof f2 == 'function') f2(this, $div[0], o, player.name);
2727 $.fn.media.mapFormat = function(format, player) {
2728 if (!format || !player || !$.fn.media.defaults.players[player]) return; // invalid
2729 format = format.toLowerCase();
2730 if (isDigit(format[0])) format = 'fn' + format;
2731 $.fn.media[format] = $.fn.media[player];
2732 $.fn.media[format+'_player'] = $.fn.media.defaults.players[player];
2735 // global defautls; override as needed
2736 $.fn.media.defaults = {
2737 standards: true, // use object tags only (no embeds for non-IE browsers)
2738 canUndo: true, // tells plugin to store the original markup so it can be reverted via: $(sel).mediaUndo()
2741 autoplay: 0, // normalized cross-player setting
2742 bgColor: '#ffffff', // background color
2743 params: { wmode: 'transparent'}, // added to object element as param elements; added to embed element as attrs
2744 attrs: {}, // added to object and embed elements as attrs
2745 flvKeyName: 'file', // key used for object src param (thanks to Andrea Ercolino)
2746 flashvars: {}, // added to flash content as flashvars param/attr
2747 flashVersion: '7', // required flash version
2748 expressInstaller: null, // src for express installer
2750 // default flash video and mp3 player (@see: http://jeroenwijering.com/?item=Flash_Media_Player)
2751 flvPlayer: 'mediaplayer.swf',
2752 mp3Player: 'mediaplayer.swf',
2754 // @see http://msdn2.microsoft.com/en-us/library/bb412401.aspx
2756 inplaceInstallPrompt: 'true', // display in-place install prompt?
2757 isWindowless: 'true', // windowless mode (false for wrapping markup)
2758 framerate: '24', // maximum framerate
2759 version: '0.9', // Silverlight version
2760 onError: null, // onError callback
2761 onLoad: null, // onLoad callback
2762 initParams: null, // object init params
2763 userContext: null // callback arg passed to the load callback
2767 // Media Players; think twice before overriding
2768 $.fn.media.defaults.players = {
2772 types: 'flv,mp3,swf',
2773 mimetype: 'application/x-shockwave-flash',
2774 pluginspage: 'http://www.adobe.com/go/getflashplayer',
2776 classid: 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',
2777 type: 'application/x-oleobject',
2778 codebase: 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + $.fn.media.defaults.flashVersion
2784 mimetype: 'video/quicktime',
2785 pluginspage: 'http://www.apple.com/quicktime/download/',
2786 types: 'aif,aiff,aac,au,bmp,gsm,mov,mid,midi,mpg,mpeg,mp4,m4a,psd,qt,qtif,qif,qti,snd,tif,tiff,wav,3g2,3gp',
2788 classid: 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
2789 codebase: 'http://www.apple.com/qtactivex/qtplugin.cab'
2794 title: 'RealPlayer',
2795 types: 'ra,ram,rm,rpm,rv,smi,smil',
2796 mimetype: 'audio/x-pn-realaudio-plugin',
2797 pluginspage: 'http://www.real.com/player/',
2798 autoplayAttr: 'autostart',
2800 classid: 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'
2805 title: 'Windows Media',
2806 types: 'asx,asf,avi,wma,wmv',
2807 mimetype: $.browser.mozilla && isFirefoxWMPPluginInstalled() ? 'application/x-ms-wmp' : 'application/x-mplayer2',
2808 pluginspage: 'http://www.microsoft.com/Windows/MediaPlayer/',
2809 autoplayAttr: 'autostart',
2812 classid: 'clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6',
2813 type: 'application/x-oleobject'
2820 types: 'gif,png,jpg'
2827 name: 'silverlight',
2833 // everything below here is private
2837 // detection script for FF WMP plugin (http://www.therossman.org/experiments/wmp_play.html)
2838 // (hat tip to Mark Ross for this script)
2839 function isFirefoxWMPPluginInstalled() {
2840 var plugs = navigator.plugins;
2841 for (var i = 0; i < plugs.length; i++) {
2842 var plugin = plugs[i];
2843 if (plugin['filename'] == 'np-mswmp.dll')
2851 for (var player in $.fn.media.defaults.players) {
2852 var types = $.fn.media.defaults.players[player].types;
2853 $.each(types.split(','), function(i,o) {
2854 if (isDigit(o[0])) o = 'fn' + o;
2855 $.fn.media[o] = $.fn.media[player] = getGenerator(player);
2856 $.fn.media[o+'_player'] = $.fn.media.defaults.players[player];
2860 function getTypesRegExp() {
2862 for (var player in $.fn.media.defaults.players) {
2863 if (types.length) types += ',';
2864 types += $.fn.media.defaults.players[player].types;
2866 return new RegExp('\\.(' + types.replace(/,/ig,'|') + ')\\b');
2869 function getGenerator(player) {
2870 return function(el, options) {
2871 return generate(el, options, player);
2875 function isDigit(c) {
2876 return '0123456789'.indexOf(c) > -1;
2879 // flatten all possible options: global defaults, meta, option obj
2880 function getSettings(el, options) {
2881 options = options || {};
2883 var cls = el.className || '';
2884 // support metadata plugin (v1.0 and v2.0)
2885 var meta = $.metadata ? $el.metadata() : $.meta ? $el.data() : {};
2887 var w = meta.width || parseInt(((cls.match(/\bw:(\d+)/)||[])[1]||0)) || parseInt(((cls.match(/\bwidth:(\d+)/)||[])[1]||0));
2888 var h = meta.height || parseInt(((cls.match(/\bh:(\d+)/)||[])[1]||0)) || parseInt(((cls.match(/\bheight:(\d+)/)||[])[1]||0))
2890 if (w) meta.width = w;
2891 if (h) meta.height = h;
2892 if (cls) meta.cls = cls;
2894 // crank html5 style data attributes
2895 var dataName = 'data-';
2896 for (var i=0; i < el.attributes.length; i++) {
2897 var a = el.attributes[i], n = $.trim(a.name);
2898 var index = n.indexOf(dataName);
2900 n = n.substring(dataName.length);
2905 var a = $.fn.media.defaults;
2909 var p = { params: { bgColor: options.bgColor || $.fn.media.defaults.bgColor } };
2910 var opts = $.extend({}, a, b, c);
2911 $.each(['attrs','params','flashvars','silverlight'], function(i,o) {
2912 opts[o] = $.extend({}, p[o] || {}, a[o] || {}, b[o] || {}, c[o] || {});
2915 if (typeof opts.caption == 'undefined') opts.caption = $el.text();
2917 // make sure we have a source!
2918 opts.src = opts.src || $el.attr('href') || $el.attr('src') || 'unknown';
2926 // generate flash using SWFObject library if possible
2927 $.fn.media.swf = function(el, opts) {
2928 if (!window.SWFObject && !window.swfobject) {
2930 if (opts.flashvars) {
2932 for (var f in opts.flashvars)
2933 a.push(f + '=' + opts.flashvars[f]);
2934 if (!opts.params) opts.params = {};
2935 opts.params.flashvars = a.join('&');
2937 return generate(el, opts, 'flash');
2940 var id = el.id ? (' id="'+el.id+'"') : '';
2941 var cls = opts.cls ? (' class="' + opts.cls + '"') : '';
2942 var $div = $('<div' + id + cls + '>');
2945 if (window.swfobject) {
2946 $(el).after($div).appendTo($div);
2947 if (!el.id) el.id = 'movie_player_' + counter++;
2949 // replace el with swfobject content
2950 swfobject.embedSWF(opts.src, el.id, opts.width, opts.height, opts.flashVersion,
2951 opts.expressInstaller, opts.flashvars, opts.params, opts.attrs);
2955 $(el).after($div).remove();
2956 var so = new SWFObject(opts.src, 'movie_player_' + counter++, opts.width, opts.height, opts.flashVersion, opts.bgColor);
2957 if (opts.expressInstaller) so.useExpressInstall(opts.expressInstaller);
2959 for (var p in opts.params)
2960 if (p != 'bgColor') so.addParam(p, opts.params[p]);
2961 for (var f in opts.flashvars)
2962 so.addVariable(f, opts.flashvars[f]);
2966 if (opts.caption) $('<div>').appendTo($div).html(opts.caption);
2970 // map flv and mp3 files to the swf player by default
2971 $.fn.media.flv = $.fn.media.mp3 = function(el, opts) {
2973 var player = /\.mp3\b/i.test(src) ? opts.mp3Player : opts.flvPlayer;
2974 var key = opts.flvKeyName;
2975 src = encodeURIComponent(src);
2977 opts.src = opts.src + '?'+key+'=' + (src);
2980 opts.flashvars = $.extend({}, srcObj, opts.flashvars );
2981 return $.fn.media.swf(el, opts);
2987 $.fn.media.xaml = function(el, opts) {
2988 if (!window.Sys || !window.Sys.Silverlight) {
2989 if ($.fn.media.xaml.warning) return;
2990 $.fn.media.xaml.warning = 1;
2991 alert('You must include the Silverlight.js script.');
2997 height: opts.height,
2998 background: opts.bgColor,
2999 inplaceInstallPrompt: opts.silverlight.inplaceInstallPrompt,
3000 isWindowless: opts.silverlight.isWindowless,
3001 framerate: opts.silverlight.framerate,
3002 version: opts.silverlight.version
3005 onError: opts.silverlight.onError,
3006 onLoad: opts.silverlight.onLoad
3009 var id1 = el.id ? (' id="'+el.id+'"') : '';
3010 var id2 = opts.id || 'AG' + counter++;
3011 // convert element to div
3012 var cls = opts.cls ? (' class="' + opts.cls + '"') : '';
3013 var $div = $('<div' + id1 + cls + '>');
3014 $(el).after($div).remove();
3016 Sys.Silverlight.createObjectEx({
3018 initParams: opts.silverlight.initParams,
3019 userContext: opts.silverlight.userContext,
3021 parentElement: $div[0],
3026 if (opts.caption) $('<div>').appendTo($div).html(opts.caption);
3031 // generate object/embed markup
3033 function generate(el, opts, player) {
3035 var o = $.fn.media.defaults.players[player];
3037 if (player == 'iframe') {
3038 o = $('<iframe' + ' width="' + opts.width + '" height="' + opts.height + '" >');
3039 o.attr('src', opts.src);
3040 o.css('backgroundColor', o.bgColor);
3042 else if (player == 'img') {
3044 o.attr('src', opts.src);
3045 opts.width && o.attr('width', opts.width);
3046 opts.height && o.attr('height', opts.height);
3047 o.css('backgroundColor', o.bgColor);
3050 var a = ['<object width="' + opts.width + '" height="' + opts.height + '" '];
3051 for (var key in opts.attrs)
3052 a.push(key + '="'+opts.attrs[key]+'" ');
3053 for (var key in o.ieAttrs || {}) {
3054 var v = o.ieAttrs[key];
3055 if (key == 'codebase' && window.location.protocol == 'https:')
3056 v = v.replace('http','https');
3057 a.push(key + '="'+v+'" ');
3059 a.push('></ob'+'ject'+'>');
3060 var p = ['<param name="' + (o.oUrl || 'src
') +'" value="' + opts.src + '">'];
3061 for (var key in opts.params)
3062 p.push('<param name="'+ key +'" value="' + opts.params[key] + '">');
3063 var o = document.createElement(a.join(''));
3064 for (var i=0; i < p.length; i++)
3065 o.appendChild(document.createElement(p[i]));
3067 else if (opts.standards) {
3068 // Rewritten to be standards compliant by Richard Connamacher
3069 var a = ['<object type="' + o.mimetype +'" width="' + opts.width + '" height="' + opts.height +'"'];
3070 if (opts.src) a.push(' data="' + opts.src + '" ');
3071 if ($.browser.msie) {
3072 for (var key in o.ieAttrs || {}) {
3073 var v = o.ieAttrs[key];
3074 if (key == 'codebase' && window.location.protocol == 'https:')
3075 v = v.replace('http','https');
3076 a.push(key + '="'+v+'" ');
3080 a.push('<param name="' + (o.oUrl || 'src
') +'" value="' + opts.src + '">');
3081 for (var key in opts.params) {
3082 if (key == 'wmode' && player != 'flash') // FF3/Quicktime borks on wmode
3084 a.push('<param name="'+ key +'" value="' + opts.params[key] + '">');
3087 a.push('<div><p><strong>'+o.title+' Required</strong></p><p>'+o.title+' is required to view this media. <a href="'+o.pluginspage+'">Download Here</a>.</p></div>');
3088 a.push('</ob'+'ject'+'>');
3091 var a = ['<embed width="' + opts.width + '" height="' + opts.height + '" style="display:block
"'];
3092 if (opts.src) a.push(' src="' + opts.src + '" ');
3093 for (var key in opts.attrs)
3094 a.push(key + '="'+opts.attrs[key]+'" ');
3095 for (var key in o.eAttrs || {})
3096 a.push(key + '="'+o.eAttrs[key]+'" ');
3097 for (var key in opts.params) {
3098 if (key == 'wmode' && player != 'flash') // FF3/Quicktime borks on wmode
3100 a.push(key + '="'+opts.params[key]+'" ');
3102 a.push('></em'+'bed'+'>');
3104 // convert element to div
3105 var id = el.id ? (' id="'+el.id+'"') : '';
3106 var cls = opts.cls ? (' class="' + opts.cls + '"') : '';
3107 var $div = $('<div' + id + cls + '>');
3108 $el.after($div).remove();
3109 (lameIE || player == 'iframe' || player == 'img') ? $div.append(o) : $div.html(a.join(''));
3110 if (opts.caption) $('<div>').appendTo($div).html(opts.caption);
3118 jQuery( '.media' ).each(
3119 function( i , Object )
3121 jQuery( Object ).media(
3123 width : jQuery( Object ).attr( 'width' ) ,
3124 height : jQuery( Object ).attr( 'height' ) ,
3125 mp3Player : './packages/jquery/packages/jquery_media/include/swf/mediaplayer.swf' ,
3126 flvPlayer : './packages/jquery/packages/jquery_media/include/swf/mediaplayer.swf'
3134 * SimpleModal 1.2.2 - jQuery Plugin
3135 * http://www.ericmmartin.com/projects/simplemodal/
3136 * Copyright (c) 2008 Eric Martin
3137 * Dual licensed under the MIT and GPL licenses
3138 * Revision: $Id: jquery.simplemodal.js 181 2008-12-16 16:51:44Z emartin24 $
3140 (function($){var ie6=$.browser.msie&&parseInt($.browser.version)==6&&!window['XMLHttpRequest'],ieQuirks=$.browser.msie&&!$.boxModel,w=[];$.modal=function(data,options){return $.modal.impl.init(data,options);};$.modal.close=function(){$.modal.impl.close();};$.fn.modal=function(options){return $.modal.impl.init(this,options);};$.modal.defaults={opacity:50,overlayId:'simplemodal-overlay',overlayCss:{},containerId:'simplemodal-container',containerCss:{},dataCss:{},zIndex:1000,close:true,closeHTML:'<a class="modalCloseImg
" title="Close
"></a>',closeClass:'simplemodal-close',position:null,persist:false,onOpen:null,onShow:null,onClose:null};$.modal.impl={opts:null,dialog:{},init:function(data,options){if(this.dialog.data){return false;}this.opts=$.extend({},$.modal.defaults,options);this.zIndex=this.opts.zIndex;this.occb=false;if(typeof data=='object'){data=data instanceof jQuery?data:$(data);if(data.parent().parent().size()>0){this.dialog.parentNode=data.parent();if(!this.opts.persist){this.dialog.orig=data.clone(true);}}}else if(typeof data=='string'||typeof data=='number'){data=$('<div/>').html(data);}else{alert('SimpleModal Error: Unsupported data type: '+typeof data);return false;}this.dialog.data=data.addClass('simplemodal-data').css(this.opts.dataCss);data=null;this.create();this.open();if($.isFunction(this.opts.onShow)){this.opts.onShow.apply(this,[this.dialog]);}return this;},create:function(){w=this.getDimensions();if(ie6){this.dialog.iframe=$('<iframe src="javascript:
false;
"/>').css($.extend(this.opts.iframeCss,{display:'none',opacity:0,position:'fixed',height:w[0],width:w[1],zIndex:this.opts.zIndex,top:0,left:0})).appendTo('body');}this.dialog.overlay=$('<div/>').attr('id',this.opts.overlayId).addClass('simplemodal-overlay').css($.extend(this.opts.overlayCss,{display:'none',opacity:this.opts.opacity/100,height:w[0],width:w[1],position:'fixed',left:0,top:0,zIndex:this.opts.zIndex+1})).appendTo('body');this.dialog.container=$('<div/>').attr('id',this.opts.containerId).addClass('simplemodal-container').css($.extend(this.opts.containerCss,{display:'none',position:'fixed',zIndex:this.opts.zIndex+2})).append(this.opts.close?$(this.opts.closeHTML).addClass(this.opts.closeClass):'').appendTo('body');this.setPosition();if(ie6||ieQuirks){this.fixIE();}this.dialog.container.append(this.dialog.data.hide());},bindEvents:function(){var self=this;$('.'+this.opts.closeClass).bind('click.simplemodal',function(e){e.preventDefault();self.close();});$(window).bind('resize.simplemodal',function(){w=self.getDimensions();self.setPosition();if(ie6||ieQuirks){self.fixIE();}else{self.dialog.iframe&&self.dialog.iframe.css({height:w[0],width:w[1]});self.dialog.overlay.css({height:w[0],width:w[1]});}});},unbindEvents:function(){$('.'+this.opts.closeClass).unbind('click.simplemodal');$(window).unbind('resize.simplemodal');},fixIE:function(){var p=this.opts.position;$.each([this.dialog.iframe||null,this.dialog.overlay,this.dialog.container],function(i,el){if(el){var bch='document.body.clientHeight',bcw='document.body.clientWidth',bsh='document.body.scrollHeight',bsl='document.body.scrollLeft',bst='document.body.scrollTop',bsw='document.body.scrollWidth',ch='document.documentElement.clientHeight',cw='document.documentElement.clientWidth',sl='document.documentElement.scrollLeft',st='document.documentElement.scrollTop',s=el[0].style;s.position='absolute';if(i<2){s.removeExpression('height');s.removeExpression('width');s.setExpression('height',''+bsh+' > '+bch+' ? '+bsh+' : '+bch+' + "px
"');s.setExpression('width',''+bsw+' > '+bcw+' ? '+bsw+' : '+bcw+' + "px
"');}else{var te,le;if(p&&p.constructor==Array){if(p[0]){var top=typeof p[0]=='number'?p[0].toString():p[0].replace(/px/,'');te=top.indexOf('%')==-1?top+' + (t = '+st+' ? '+st+' : '+bst+') + "px
"':parseInt(top.replace(/%/,''))+' * (('+ch+' || '+bch+') / 100) + (t = '+st+' ? '+st+' : '+bst+') + "px
"';}if(p[1]){var left=typeof p[1]=='number'?p[1].toString():p[1].replace(/px/,'');le=left.indexOf('%')==-1?left+' + (t = '+sl+' ? '+sl+' : '+bsl+') + "px
"':parseInt(left.replace(/%/,''))+' * (('+cw+' || '+bcw+') / 100) + (t = '+sl+' ? '+sl+' : '+bsl+') + "px
"';}}else{te='('+ch+' || '+bch+') / 2 - (this.offsetHeight / 2) + (t = '+st+' ? '+st+' : '+bst+') + "px
"';le='('+cw+' || '+bcw+') / 2 - (this.offsetWidth / 2) + (t = '+sl+' ? '+sl+' : '+bsl+') + "px
"';}s.removeExpression('top');s.removeExpression('left');s.setExpression('top',te);s.setExpression('left',le);}}});},getDimensions:function(){var el=$(window);var h=$.browser.opera&&$.browser.version>'9.5'&&$.fn.jquery<='1.2.6'?document.documentElement['clientHeight']:el.height();return[h,el.width()];},setPosition:function(){var top,left,hCenter=(w[0]/2)-((this.dialog.container.height()||this.dialog.data.height())/2),vCenter=(w[1]/2)-((this.dialog.container.width()||this.dialog.data.width())/2);if(this.opts.position&&this.opts.position.constructor==Array){top=this.opts.position[0]||hCenter;left=this.opts.position[1]||vCenter;}else{top=hCenter;left=vCenter;}this.dialog.container.css({left:left,top:top});},open:function(){this.dialog.iframe&&this.dialog.iframe.show();if($.isFunction(this.opts.onOpen)){this.opts.onOpen.apply(this,[this.dialog]);}else{this.dialog.overlay.show();this.dialog.container.show();this.dialog.data.show();}this.bindEvents();},close:function(){if(!this.dialog.data){return false;}if($.isFunction(this.opts.onClose)&&!this.occb){this.occb=true;this.opts.onClose.apply(this,[this.dialog]);}else{if(this.dialog.parentNode){if(this.opts.persist){this.dialog.data.hide().appendTo(this.dialog.parentNode);}else{this.dialog.data.remove();this.dialog.orig.appendTo(this.dialog.parentNode);}}else{this.dialog.data.remove();}this.dialog.container.remove();this.dialog.overlay.remove();this.dialog.iframe&&this.dialog.iframe.remove();this.dialog={};}this.unbindEvents();}};})(jQuery);
3156 if( !ultimix.data_form )
3158 ultimix.data_form = {};
3170 ultimix.data_form.CreateForm = function( Action , Method )
3177 if( jQuery( '#data_form' ).length )
3179 jQuery( '#data_form' ).remove();
3182 jQuery( 'body' ).append( '<form id="data_form
" method="' + Method + '" style="display: none;
"></form>' );
3186 jQuery( '#data_form' ).attr( 'action' , Action );
3197 ultimix.data_form.AppendData = function( Data )
3201 jQuery( '#data_form' ).append( '<textarea name="' + i + '">' + Data[ i ] + '</textarea>' );
3212 ultimix.data_form.MoveFormData = function( SourceFormSelector )
3214 var Data = ultimix.forms.ExtractFormData( SourceFormSelector );
3216 ultimix.data_form.AppendData( Data );
3228 ultimix.data_form.SuccessFunction = function( SourceFormSelector , Waiting )
3233 if( Result == ultimix.std_dialogs.MB_YES )
3235 ultimix.data_form.MoveFormData( SourceFormSelector );
3237 document.getElementById( 'data_form' ).submit();
3241 ultimix.std_dialogs.MessageBox(
3242 ultimix.get_string( 'wait_please' ) , ultimix.get_string( 'Info' ) ,
3243 ultimix.std_dialogs.MB_ICONLOADING | ultimix.std_dialogs.MB_MODAL
3266 ultimix.data_form.SubmitDataForm = function( SourceFormSelector , ConfirmString , Action , Waiting , Method )
3268 ultimix.data_form.CreateForm( Action , Method );
3270 Success = ultimix.data_form.SuccessFunction( SourceFormSelector , Waiting );
3274 ultimix.std_dialogs.MessageBox( ConfirmString , ultimix.get_string( 'Question' ) , ultimix.std_dialogs.MB_YESNO | ultimix.std_dialogs.MB_ICONQUESTION | ultimix.std_dialogs.MB_MODAL , Success );
3278 Success( ultimix.std_dialogs.MB_YES );
3296 ultimix.data_form.SubmitDataFormN = function( Data , ConfirmString , Action , Waiting , Method )
3298 ultimix.data_form.CreateForm( Action , Method );
3300 Success = function( Result )
3302 if( Result == ultimix.std_dialogs.MB_YES )
3304 ultimix.data_form.AppendData( Data );
3306 ultimix.data_form.WaitForSubmit( Waiting );
3312 ultimix.std_dialogs.MessageBox(
3313 ultimix.get_string( ConfirmString ) , ultimix.get_string( 'Question' ) ,
3314 ultimix.std_dialogs.MB_YESNO | ultimix.std_dialogs.MB_ICONQUESTION | ultimix.std_dialogs.MB_MODAL , Success
3319 Success( ultimix.std_dialogs.MB_YES );
3329 ultimix.data_form.WaitForSubmit = function( Waiting )
3331 document.getElementById( 'data_form' ).submit();
3335 ultimix.std_dialogs.MessageBox(
3336 ultimix.get_string( 'wait_please' ) , ultimix.get_string( 'Info' ) ,
3337 ultimix.std_dialogs.MB_ICONLOADING | ultimix.std_dialogs.MB_MODAL
3355 ultimix.data_form.SubmitDataForm0 = function( ConfirmString , Action , Waiting , Method )
3357 ultimix.data_form.CreateForm( Action , Method );
3359 Success = function( Result )
3361 if( Result == ultimix.std_dialogs.MB_YES )
3363 ultimix.data_form.WaitForSubmit( Waiting );
3369 ultimix.std_dialogs.MessageBox(
3370 ultimix.get_string( ConfirmString ) , ultimix.get_string( 'Question' ) ,
3371 ultimix.std_dialogs.MB_YESNO | ultimix.std_dialogs.MB_ICONQUESTION | ultimix.std_dialogs.MB_MODAL , Success
3376 Success( ultimix.std_dialogs.MB_YES );
3396 ultimix.data_form.SubmitDataForm1 = function( Param1 , Value1 , ConfirmString , Action , Waiting , Method )
3398 ultimix.data_form.CreateForm( Action , Method );
3400 Success = function( Result )
3402 if( Result == ultimix.std_dialogs.MB_YES )
3405 Data[ Param1 ] = Value1;
3407 ultimix.data_form.AppendData( Data );
3409 ultimix.data_form.WaitForSubmit( Waiting );
3415 ultimix.std_dialogs.MessageBox(
3416 ultimix.get_string( ConfirmString ) , ultimix.get_string( 'Question' ) ,
3417 ultimix.std_dialogs.MB_YESNO | ultimix.std_dialogs.MB_ICONQUESTION | ultimix.std_dialogs.MB_MODAL , Success
3422 Success( ultimix.std_dialogs.MB_YES );
3446 ultimix.data_form.SubmitDataForm2 = function( Param1 , Value1 , Param2, Value2 , ConfirmString , Action , Waiting , Method )
3448 ultimix.data_form.CreateForm( Action , Method );
3450 Success = function( Result )
3452 if( Result == ultimix.std_dialogs.MB_YES )
3455 Data[ Param1 ] = Value1;
3456 Data[ Param2 ] = Value2;
3458 ultimix.data_form.AppendData( Data );
3460 ultimix.data_form.WaitForSubmit( Waiting );
3466 ultimix.std_dialogs.MessageBox(
3467 ultimix.get_string( ConfirmString ) , ultimix.get_string( 'Question' ) ,
3468 ultimix.std_dialogs.MB_YESNO | ultimix.std_dialogs.MB_ICONQUESTION | ultimix.std_dialogs.MB_MODAL , Success
3473 Success( ultimix.std_dialogs.MB_YES );
3501 ultimix.data_form.SubmitDataForm3 = function( Param1 , Value1 , Param2 , Value2 , Param3 , Value3 , ConfirmString , Action , Waiting , Method )
3503 ultimix.data_form.CreateForm( Action , Method );
3505 Success = function( Result )
3507 if( Result == ultimix.std_dialogs.MB_YES )
3510 Data[ Param1 ] = Value1;
3511 Data[ Param2 ] = Value2;
3512 Data[ Param3 ] = Value3;
3514 ultimix.data_form.AppendData( Data );
3516 ultimix.data_form.WaitForSubmit( Waiting );
3522 ultimix.std_dialogs.MessageBox(
3523 ultimix.get_string( ConfirmString ) , ultimix.get_string( 'Question' ) ,
3524 ultimix.std_dialogs.MB_YESNO | ultimix.std_dialogs.MB_ICONQUESTION | ultimix.std_dialogs.MB_MODAL , Success
3529 Success( ultimix.std_dialogs.MB_YES );
3547 if( !ultimix.multiple_line )
3549 ultimix.multiple_line = {};
3559 ultimix.multiple_line.CreateMultypleLineControl = function( Object )
3561 jQuery( Object ).wrap( '<div></div>' );
3562 jQuery( Object ).css( 'display' , 'none' );
3574 ultimix.multiple_line.GetElementCode = function( Control , Object )
3576 var Template = Control.html();
3580 eval( 'var Data = ' + jQuery( Object ).html() );
3581 Template = ultimix.string_utilities.PrintRecord( Template , Data );
3594 ultimix.multiple_line.ReviseDeleteButtons = function( Selector )
3596 var Container = jQuery( Selector ).parent();
3598 var Lines = jQuery( Container ).find( 'table.multiple_line_single_line' );
3600 if( Lines.length == 1 )
3602 Lines.find( 'span.multiple_line_delete_button' ).html( ' ' );
3606 Lines.find( 'span.multiple_line_delete_button' ).html( ultimix.multiple_line.CreateDelButton( Selector ) );
3619 ultimix.multiple_line.OnAddElement = function( Button , Selector )
3621 ultimix.multiple_line.AddLineForSelector(
3622 Selector , false , jQuery( Button ).parents( 'table.multiple_line_single_line' )
3625 ultimix.multiple_line.ReviseDeleteButtons( Selector );
3637 ultimix.multiple_line.OnDelElement = function( Button , Selector )
3639 jQuery( Button ).parents( 'table.multiple_line_single_line' ).remove();
3641 var Control = jQuery( Selector );
3643 /* calling event handler */
3644 if( jQuery( Control ).attr( 'ondeleteline' ) )
3646 eval( jQuery( Control ).attr( 'ondeleteline' ) );
3649 ultimix.multiple_line.ReviseDeleteButtons( Selector );
3661 ultimix.multiple_line.GetAddButtonTemplate = function( Selector )
3663 var CustomTemplate = jQuery( Selector ).find( '.add_button_template' ).first();
3665 if( CustomTemplate.length == 0 )
3667 /* custom template was not found */
3669 "<span
class=\
"multiple_line_add_button\"><a class=\"pointer\" style=\"text-decoration: none; " +
3670 "font-weight: bold;\" onclick=\"ultimix.multiple_line.OnAddElement( this , '" + Selector +
3671 "' );\">+</a></span>"
3676 CustomTemplate = CustomTemplate.html();
3678 CustomTemplate =
ultimix.string_utilities.StrReplace(
'[selector]' , Selector , CustomTemplate );
3680 return( CustomTemplate );
3691 ultimix.multiple_line.CreateAddButton =
function( Selector )
3694 ultimix.multiple_line.GetAddButtonTemplate( Selector )
3707 ultimix.multiple_line.GetDeleteButtonTemplate =
function( Selector )
3709 var CustomTemplate =
jQuery( Selector ).find(
'.delete_button_template' ).first();
3711 if( CustomTemplate.length == 0 )
3715 "<span class=\"multiple_line_delete_button\"><a class=\"pointer\" style=\"text-decoration: none; " +
3716 "font-weight: bold;\" onclick=\"ultimix.multiple_line.OnDelElement( this , '" +
3717 Selector +
"' );\">-</a></span>"
3722 CustomTemplate = CustomTemplate.html();
3724 CustomTemplate =
ultimix.string_utilities.StrReplace(
'[selector]' , Selector , CustomTemplate );
3726 return( CustomTemplate );
3737 ultimix.multiple_line.CreateDelButton =
function( Selector )
3740 ultimix.multiple_line.GetDeleteButtonTemplate( Selector )
3757 ultimix.multiple_line.AppendLine =
function( Selector , Line , AfterLine )
3759 var Container =
jQuery( Selector ).parent();
3760 var Code =
'<table class="multiple_line_single_line"><tr><td style="width: 10px; font-family:' +
3761 'Courier New;">' +
ultimix.multiple_line.CreateAddButton( Selector ) +
'</td><td style="width: 10px; ' +
3762 'font-family: Courier New;">' +
ultimix.multiple_line.CreateDelButton( Selector ) +
'</td><td style="width: ' +
3763 '100%;">' + Line +
'</td></tr></table>';
3764 var AddedLine =
false;
3767 jQuery( AfterLine ).after( Code );
3768 AddedLine =
jQuery( AfterLine ).next();
3772 jQuery( Container ).append( Code );
3773 AddedLine =
jQuery( Container ).find(
'table.multiple_line_single_line' ).last();
3775 jQuery( AddedLine ).find(
'.add_button_template,.delete_button_template' ).remove();
3776 ultimix.multiple_line.ReviseDeleteButtons( Selector );
3777 return( AddedLine );
3793 ultimix.multiple_line.AddLineInDOM =
function( Selector , Object , AfterLine )
3795 var Control =
jQuery( Selector );
3796 if( Control.length )
3798 var Line =
ultimix.multiple_line.GetElementCode( Control , Object );
3799 var AddedLine =
ultimix.multiple_line.AppendLine( Selector , Line , AfterLine );
3802 jQuery( Object ).remove();
3804 return( AddedLine );
3808 if( !Object )
return;
3810 jQuery( Object ).replaceWith(
3811 ultimix.get_string(
'dom_element' ) +
' "' +
jQuery( Object ).attr(
'control' ) +
'" ' +
3812 ultimix.get_string(
'was_not_found' )
3826 ultimix.multiple_line.OnAddLine =
function( AddedLine , Data )
3828 for( FieldName in Data )
3830 var Element =
jQuery( AddedLine ).find(
'[name^=' + FieldName +
']' );
3831 if( Element.prop(
'tagName' ) ==
'TEXTAREA' )
3833 Element.html( Data[ FieldName ] );
3837 Element.val( Data[ FieldName ] );
3853 ultimix.multiple_line.TriggerOnAddEvent =
function( Selector , AddedLine , Data )
3855 var Control =
jQuery( Selector );
3858 if(
jQuery( Control ).attr(
'onaddline' ) )
3860 eval(
jQuery( Control ).attr(
'onaddline' ) +
'( AddedLine , Data );' );
3864 eval(
'ultimix.multiple_line.OnAddLine( AddedLine , Data );' );
3879 ultimix.multiple_line.AddLineForSelector =
function( Selector , Object , AfterLine )
3881 if( Object &&
jQuery( Object ).html() )
3883 eval(
'var Data = ' +
jQuery( Object ).html() );
3887 eval(
'var Data = {}' );
3890 var AddedLine =
ultimix.multiple_line.AddLineInDOM( Selector , Object , AfterLine );
3892 ultimix.multiple_line.TriggerOnAddEvent( Selector , AddedLine , Data );
3902 ultimix.multiple_line.AddLine =
function( Object )
3904 ultimix.multiple_line.AddLineForSelector(
jQuery( Object ).attr(
'control' ) , Object );
3914 ultimix.multiple_line.AddLineInEmptyControl =
function( Control )
3916 if(
jQuery( Control ).find(
'table.multiple_line_single_line' ).length == 0 )
3918 ultimix.multiple_line.AddLineForSelector(
jQuery( Control ).children().first().attr(
'control' ) );
3931 jQuery(
'.multiple_line_template' ).each(
3932 function( Index , Object )
3934 ultimix.multiple_line.CreateMultypleLineControl( Object );
3939 jQuery(
'.multiple_line_element' ).each(
3940 function( Index , Object )
3942 ultimix.multiple_line.AddLine( Object );
3947 jQuery(
'.multiple_line_template' ).each(
3948 function( Index , Object )
3950 ultimix.multiple_line.AddLineInEmptyControl(
jQuery( Object ).parent() );
3988 ultimix.report.CreateFrame =
function( PackageName , PackageVersion , ReportName , Data )
3990 if(
jQuery(
'#report_generation_id' ).length )
3992 jQuery(
'#report_generation_id' ).remove();
3995 var ReportGenerationParameters =
'';
4002 ReportGenerationParameters =
'&' + i +
"=" +
new String( Data[ i ] ) + ReportGenerationParameters;
4005 IFrameCode =
'<iframe id="report_generation_id" style="display: none;" src="./report.html?report_package_name=';
4006 IFrameCode = IFrameCode + PackageName +
'&report_package_version=' + PackageVersion;
4007 IFrameCode = IFrameCode +
'&report_name=' + ReportName +
'&' + (
new Date() ).getTime();
4008 IFrameCode = IFrameCode + ReportGenerationParameters +
'"></iframe>';
4009 jQuery(
'body' ).append( IFrameCode );
4021 ultimix.report.ReportGenerationProcess =
function( OnGenerate , ShowProgress )
4025 var LoadingId =
ultimix.std_dialogs.MessageBox(
4026 ultimix.get_string(
'report_is_generating' ) ,
4027 ultimix.get_string(
'report' ) ,
4028 ultimix.std_dialogs.MB_ICONLOADING
4032 jQuery(
'#report_generation_id' ).load(
4037 ultimix.std_dialogs.CloseMessageBox( LoadingId );
4064 ultimix.report.GenerateReport =
function( PackageName , PackageVersion , ReportName , Data , OnGenerate , ShowProgress )
4066 ultimix.report.CreateFrame( PackageName , PackageVersion , ReportName , Data );
4068 ultimix.report.ReportGenerationProcess( OnGenerate , ShowProgress );
4082 ultimix.report.OnRunReportGeneration =
function( DataAcceptor , StatusAcceptor , DataSource )
4084 var PackageName =
jQuery( DataSource ).find(
'span.package_name' ).html();
4085 var PackageVersion =
jQuery( DataSource ).find(
'span.package_version' ).html();
4086 var ReportName =
jQuery( DataSource ).find(
'span.report_name' ).html();
4087 var Data =
ultimix.forms.ExtractFormData( DataSource );
4089 ultimix.report.GenerateReport( PackageName , PackageVersion , ReportName , Data ,
false ,
true );
4117 ultimix.std_dialogs.MB_ABORT = 1;
4118 ultimix.std_dialogs.MB_RETRY = 2;
4119 ultimix.std_dialogs.MB_IGNORE = 4;
4120 ultimix.std_dialogs.MB_ABORTRETRYIGNORE = 7;
4121 ultimix.std_dialogs.MB_CANCEL = 8;
4122 ultimix.std_dialogs.MB_TRY = 16;
4123 ultimix.std_dialogs.MB_CONTINUE = 32;
4124 ultimix.std_dialogs.MB_CANCELTRYCONTINUE = 56;
4125 ultimix.std_dialogs.MB_HELP = 64;
4126 ultimix.std_dialogs.MB_OK = 128;
4127 ultimix.std_dialogs.MB_OKCANCEL = 136;
4128 ultimix.std_dialogs.MB_RETRYCANCEL = 10;
4129 ultimix.std_dialogs.MB_YES = 256;
4130 ultimix.std_dialogs.MB_NO = 512;
4131 ultimix.std_dialogs.MB_YESNO = 768;
4132 ultimix.std_dialogs.MB_YESNOCANCEL = 776;
4139 ultimix.std_dialogs.MB_ICONEXCLAMATION = 2048;
4140 ultimix.std_dialogs.MB_ICONWARNING = 4096;
4141 ultimix.std_dialogs.MB_ICONINFORMATION = 8192;
4142 ultimix.std_dialogs.MB_ICONASTERISK = 16384;
4143 ultimix.std_dialogs.MB_ICONQUESTION = 32768;
4144 ultimix.std_dialogs.MB_ICONSTOP = 65536;
4145 ultimix.std_dialogs.MB_ICONERROR = 131072;
4146 ultimix.std_dialogs.MB_ICONHAND = 262144;
4147 ultimix.std_dialogs.MB_ICONLOADING = 524288;
4148 ultimix.std_dialogs.MB_ICONWAIT = 524288;
4149 ultimix.std_dialogs.MB_MODAL = 1048576;
4151 ultimix.std_dialogs.MessageBoxCounter = 0;
4160 ultimix.std_dialogs.CloseMessageBox =
function( Selector )
4162 jQuery( Selector ).dialog(
"close" );
4163 jQuery( Selector ).remove();
4183 ultimix.std_dialogs.MessageBox =
function( Text , Caption , Style , AcceptResult )
4187 Caption =
'MessageBox';
4191 Style =
ultimix.std_dialogs.MB_OK;
4194 Class =
'jsdialogs-default';
4195 if( Style &
ultimix.std_dialogs.MB_ICONEXCLAMATION ) Class =
'jsdialogs-exclamation';
4196 if( Style &
ultimix.std_dialogs.MB_ICONWARNING ) Class =
'jsdialogs-warning';
4197 if( Style &
ultimix.std_dialogs.MB_ICONINFORMATION ) Class =
'jsdialogs-information';
4198 if( Style &
ultimix.std_dialogs.MB_ICONASTERISK ) Class =
'jsdialogs-asterisk';
4199 if( Style &
ultimix.std_dialogs.MB_ICONQUESTION ) Class =
'jsdialogs-question';
4200 if( Style &
ultimix.std_dialogs.MB_ICONSTOP ) Class =
'jsdialogs-stop';
4201 if( Style &
ultimix.std_dialogs.MB_ICONERROR ) Class =
'jsdialogs-error';
4202 if( Style &
ultimix.std_dialogs.MB_ICONHAND ) Class =
'jsdialogs-hand';
4203 if( Style &
ultimix.std_dialogs.MB_ICONLOADING ) Class =
'jsdialogs-loading';
4205 var
id =
"ultimix-MessageBox-span-" +
ultimix.std_dialogs.MessageBoxCounter++;
4208 if( Style &
ultimix.std_dialogs.MB_MODAL ) Modal =
true;
4210 if( !
jQuery(
"#" +
id ).length )
4212 jQuery(
"body" ).append(
'<span id="' +
id +
'" style="display:none"></span>' );
4215 var ExitOnEscape =
true;
4216 if( Style &
ultimix.std_dialogs.MB_ICONLOADING ) ExitOnEscape =
false;
4219 if( Style &
ultimix.std_dialogs.MB_ABORT )
4221 Buttons[
ultimix.get_string(
'Abort' ) ] =
function(){
if( AcceptResult )AcceptResult(
ultimix.std_dialogs.MB_ABORT );
ultimix.std_dialogs.CloseMessageBox(
"#" +
id ); };
4223 if( Style &
ultimix.std_dialogs.MB_RETRY )
4225 Buttons[
ultimix.get_string(
'Retry' ) ] =
function(){
if( AcceptResult )AcceptResult(
ultimix.std_dialogs.MB_RETRY );
ultimix.std_dialogs.CloseMessageBox(
"#" +
id ); };
4227 if( Style &
ultimix.std_dialogs.MB_IGNORE )
4229 Buttons[
ultimix.get_string(
'Ignore' ) ] =
function(){
if( AcceptResult )AcceptResult(
ultimix.std_dialogs.MB_IGNORE );
ultimix.std_dialogs.CloseMessageBox(
"#" +
id ); };
4231 if( Style &
ultimix.std_dialogs.MB_NO )
4233 Buttons[
ultimix.get_string(
'No' ) ] =
function(){
if( AcceptResult )AcceptResult(
ultimix.std_dialogs.MB_NO );
ultimix.std_dialogs.CloseMessageBox(
"#" +
id ); };
4235 if( Style &
ultimix.std_dialogs.MB_YES )
4237 Buttons[
ultimix.get_string(
'Yes' ) ] =
function(){
if( AcceptResult )AcceptResult(
ultimix.std_dialogs.MB_YES );
ultimix.std_dialogs.CloseMessageBox(
"#" +
id ); };
4239 if( Style &
ultimix.std_dialogs.MB_CANCEL )
4241 Buttons[
ultimix.get_string(
'Cancel' ) ] =
function(){
if( AcceptResult )AcceptResult(
ultimix.std_dialogs.MB_CANCEL );
ultimix.std_dialogs.CloseMessageBox(
"#" +
id ); };
4243 if( Style &
ultimix.std_dialogs.MB_OK )
4245 Buttons[
ultimix.get_string(
'OK' ) ] =
function(){
if( AcceptResult )AcceptResult(
ultimix.std_dialogs.MB_OK );
ultimix.std_dialogs.CloseMessageBox(
"#" +
id ); };
4247 if( Style &
ultimix.std_dialogs.MB_HELP )
4249 Buttons[
ultimix.get_string(
'Help' ) ] =
function(){
if( AcceptResult )AcceptResult(
ultimix.std_dialogs.MB_HELP );
ultimix.std_dialogs.CloseMessageBox(
"#" +
id ); };
4251 if( Style &
ultimix.std_dialogs.MB_CONTINUE )
4253 Buttons[
ultimix.get_string(
'Continue' ) ] =
function(){
if( AcceptResult )AcceptResult(
ultimix.std_dialogs.MB_CONTINUE );
ultimix.std_dialogs.CloseMessageBox(
"#" +
id ); };
4256 jQuery(
"#" +
id ).dialog( { width: 480 , modal : Modal , title :
ultimix.get_string( Caption ) , buttons : Buttons , resizable : false , closeOnEscape : ExitOnEscape } )
4257 jQuery(
"#" +
id ).html(
'<div class="ultimix-MessageBox-content"><div class="' + Class +
'"></div>' +
ultimix.get_string( Text ) +
'</div>' );
4258 jQuery(
"#" +
id ).parent().find(
'.ui-dialog-titlebar-close' ).remove();
4270 ultimix.std_dialogs.WaitingMessageBox =
function()
4273 ultimix.std_dialogs.MessageBox(
4274 ultimix.get_string(
'wait_please' ) ,
4275 ultimix.get_string(
'Info' ) ,
4276 ultimix.std_dialogs.MB_ICONLOADING |
ultimix.std_dialogs.MB_MODAL
4290 ultimix.std_dialogs.ErrorMessageBox =
function( Text )
4293 ultimix.std_dialogs.MessageBox(
4295 ultimix.get_string(
'Error' ) ,
4312 ultimix.std_dialogs.QuestionMessageBox =
function( Text , Success )
4315 ultimix.std_dialogs.MessageBox(
4317 ultimix.get_string(
'Question' ) ,
4318 ultimix.std_dialogs.MB_YESNO |
ultimix.std_dialogs.MB_ICONQUESTION |
ultimix.std_dialogs.MB_MODAL , Success
4353 ultimix.ajax_gate.DirectController =
function( Data , Success , Options )
4355 if( !Options )Options = {};
4356 jQuery.extend( Options , {
'async' : true ,
'dataType' :
'text' } );
4357 jQuery.extend( Data , {
'auto_redirect' : 0 ,
'template' :
'ajax_result_template' } );
4361 async : Options.async ,
4363 url :
'direct_controller.html?' + (
new Date() ).getTime() ,
4389 ultimix.ajax_gate.DirectControllerMeta =
function( PackageName , PackageVersion , Meta , DataSource , Success , Waiting , Options )
4392 var Data =
ultimix.forms.ExtractFormData( DataSource );
4394 jQuery.extend( Data , {
'package_name' : PackageName ,
'package_version' : PackageVersion ,
'meta' : Meta } );
4396 var DialogSelector =
false;
4400 DialogSelector =
ultimix.std_dialogs.WaitingMessageBox();
4403 var AtuoSuccess =
function( Result )
4407 ultimix.std_dialogs.CloseMessageBox( DialogSelector );
4413 ultimix.ajax_gate.DirectController( Data , AtuoSuccess , Options );
4427 ultimix.ajax_gate.DirectView =
function( Data , Success , Options )
4429 if( !Options )Options = {};
4430 jQuery.extend( {
'async' : true ,
'dataType' :
'json' } , Options );
4431 jQuery.extend( {
'auto_redirect' : 0 ,
'template' :
'ajax_result_template' } , Data );
4435 async : Options.async ,
4437 url :
'direct_view.html?' + (
new Date() ).getTime() ,
4457 ultimix.ajax_gate.DirectViewComposer =
function( Selector , Data , Url , Options )
4459 if( !Options )Options = {};
4460 jQuery.extend( {
'async' : true ,
'template' :
'standalone_view' } , Options );
4464 async : Options.async ,
4466 url : Url +
'?' + (
new Date() ).getTime() ,
4468 success :
function( Content )
4470 if( Options.replace )
4472 jQuery( Selector ).replaceWith( Content );
4476 jQuery( Selector ).html( Content );
4500 function SetCookie( Name , Value , Expiredays , Path , Domain , Secure )
4504 var Exdate =
new Date();
4505 Exdate.setDate( Exdate.getDate() + Expiredays );
4506 var Expires = Exdate.toGMTString();
4509 document.cookie = Name +
"=" + escape( Value ) +
4510 ( ( Expiredays ) ?
"; expires=" + Expires :
"" ) +
4511 ( ( Path ) ?
"; path=" + Path :
"" ) +
4512 ( ( Domain ) ?
"; domain=" + Domain :
"" ) +
4513 ( ( Secure ) ?
"; secure" :
"" );
4527 function GetCookie( Name , Default )
4529 var Cookie =
" " + document.cookie;
4530 var Search =
" " + Name +
"=";
4531 var SetStr = Default;
4534 if( Cookie.length > 0 )
4536 Offset = Cookie.indexOf( Search );
4539 Offset += Search.length;
4540 End = Cookie.indexOf(
";" , Offset )
4543 End = Cookie.length;
4545 SetStr = unescape( Cookie.substring( Offset , End ) );
4580 for( var i = 0 ; i < Arr.length ; i++ )
4582 if( Element == Arr[ i ] )
4604 ultimix.DeleteParentItem =
function( Selector )
4606 jQuery( Selector ).parent().remove();
4620 ultimix.GetRandomInt =
function( Min , Max )
4623 if( !Max )Max = 1000000000;
4625 return( Math.floor( Math.random() * ( Max - Min + 1 ) ) + Min );
4635 ultimix.core.GetCurrentMilliseconds =
function()
4638 return( d.getTime() );
4656 var RotateLeft =
function(lValue, iShiftBits) {
4657 return (lValue<<iShiftBits) | (lValue>>>(32-iShiftBits));
4660 var AddUnsigned =
function(lX,lY) {
4661 var lX4,lY4,lX8,lY8,lResult;
4662 lX8 = (lX & 0x80000000);
4663 lY8 = (lY & 0x80000000);
4664 lX4 = (lX & 0x40000000);
4665 lY4 = (lY & 0x40000000);
4666 lResult = (lX & 0x3FFFFFFF)+(lY & 0x3FFFFFFF);
4668 return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
4671 if (lResult & 0x40000000) {
4672 return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
4674 return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
4677 return (lResult ^ lX8 ^ lY8);
4681 var F =
function(x,y,z) {
return (x & y) | ((~x) & z); };
4682 var G =
function(x,y,z) {
return (x & z) | (y & (~z)); };
4683 var H =
function(x,y,z) {
return (x ^ y ^ z); };
4684 var I =
function(x,y,z) {
return (y ^ (x | (~z))); };
4686 var FF =
function(
a,
b,c,d,x,s,ac) {
4687 a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
4688 return AddUnsigned(RotateLeft(a, s), b);
4691 var GG =
function(
a,
b,c,d,x,s,ac) {
4692 a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
4693 return AddUnsigned(RotateLeft(a, s), b);
4696 var HH =
function(
a,
b,c,d,x,s,ac) {
4697 a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
4698 return AddUnsigned(RotateLeft(a, s), b);
4701 var II =
function(
a,
b,c,d,x,s,ac) {
4702 a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
4703 return AddUnsigned(RotateLeft(a, s), b);
4706 var ConvertToWordArray =
function(str) {
4708 var lMessageLength = str.length;
4709 var lNumberOfWords_temp1=lMessageLength + 8;
4710 var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1 % 64))/64;
4711 var lNumberOfWords = (lNumberOfWords_temp2+1)*16;
4712 var lWordArray=Array(lNumberOfWords-1);
4713 var lBytePosition = 0;
4715 while ( lByteCount < lMessageLength ) {
4716 lWordCount = (lByteCount-(lByteCount % 4))/4;
4717 lBytePosition = (lByteCount % 4)*8;
4718 lWordArray[lWordCount] = (lWordArray[lWordCount] | (str.charCodeAt(lByteCount)<<lBytePosition));
4721 lWordCount = (lByteCount-(lByteCount % 4))/4;
4722 lBytePosition = (lByteCount % 4)*8;
4723 lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80<<lBytePosition);
4724 lWordArray[lNumberOfWords-2] = lMessageLength<<3;
4725 lWordArray[lNumberOfWords-1] = lMessageLength>>>29;
4729 var WordToHex =
function(lValue) {
4730 var WordToHexValue=
"",WordToHexValue_temp=
"",lByte,lCount;
4731 for (lCount = 0;lCount<=3;lCount++) {
4732 lByte = (lValue>>>(lCount*8)) & 255;
4733 WordToHexValue_temp =
"0" + lByte.toString(16);
4734 WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2);
4736 return WordToHexValue;
4740 var k , AA , BB , CC , DD ,
a ,
b , c , d;
4741 var S11 = 7 , S12 = 12 , S13 = 17 , S14 = 22;
4742 var S21 = 5 , S22 = 9 , S23 = 14 , S24 = 20;
4743 var S31 = 4 , S32 = 11 , S33 = 16 , S34 = 23;
4744 var S41 = 6 , S42 = 10 , S43 = 15 , S44 = 21;
4746 str = this.utf8_encode( str );
4747 x = ConvertToWordArray( str );
4748 a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476;
4750 for( k = 0 ; k < x.length ; k += 16 )
4752 AA =
a; BB =
b; CC = c; DD = d;
4753 a = FF(a,b,c,d,x[k+0], S11,0xD76AA478);
4754 d = FF(d,a,b,c,x[k+1], S12,0xE8C7B756);
4755 c = FF(c,d,a,b,x[k+2], S13,0x242070DB);
4756 b = FF(b,c,d,a,x[k+3], S14,0xC1BDCEEE);
4757 a = FF(a,b,c,d,x[k+4], S11,0xF57C0FAF);
4758 d = FF(d,a,b,c,x[k+5], S12,0x4787C62A);
4759 c = FF(c,d,a,b,x[k+6], S13,0xA8304613);
4760 b = FF(b,c,d,a,x[k+7], S14,0xFD469501);
4761 a = FF(a,b,c,d,x[k+8], S11,0x698098D8);
4762 d = FF(d,a,b,c,x[k+9], S12,0x8B44F7AF);
4763 c = FF(c,d,a,b,x[k+10],S13,0xFFFF5BB1);
4764 b = FF(b,c,d,a,x[k+11],S14,0x895CD7BE);
4765 a = FF(a,b,c,d,x[k+12],S11,0x6B901122);
4766 d = FF(d,a,b,c,x[k+13],S12,0xFD987193);
4767 c = FF(c,d,a,b,x[k+14],S13,0xA679438E);
4768 b = FF(b,c,d,a,x[k+15],S14,0x49B40821);
4769 a = GG(a,b,c,d,x[k+1], S21,0xF61E2562);
4770 d = GG(d,a,b,c,x[k+6], S22,0xC040B340);
4771 c = GG(c,d,a,b,x[k+11],S23,0x265E5A51);
4772 b = GG(b,c,d,a,x[k+0], S24,0xE9B6C7AA);
4773 a = GG(a,b,c,d,x[k+5], S21,0xD62F105D);
4774 d = GG(d,a,b,c,x[k+10],S22,0x2441453);
4775 c = GG(c,d,a,b,x[k+15],S23,0xD8A1E681);
4776 b = GG(b,c,d,a,x[k+4], S24,0xE7D3FBC8);
4777 a = GG(a,b,c,d,x[k+9], S21,0x21E1CDE6);
4778 d = GG(d,a,b,c,x[k+14],S22,0xC33707D6);
4779 c = GG(c,d,a,b,x[k+3], S23,0xF4D50D87);
4780 b = GG(b,c,d,a,x[k+8], S24,0x455A14ED);
4781 a = GG(a,b,c,d,x[k+13],S21,0xA9E3E905);
4782 d = GG(d,a,b,c,x[k+2], S22,0xFCEFA3F8);
4783 c = GG(c,d,a,b,x[k+7], S23,0x676F02D9);
4784 b = GG(b,c,d,a,x[k+12],S24,0x8D2A4C8A);
4785 a = HH(a,b,c,d,x[k+5], S31,0xFFFA3942);
4786 d = HH(d,a,b,c,x[k+8], S32,0x8771F681);
4787 c = HH(c,d,a,b,x[k+11],S33,0x6D9D6122);
4788 b = HH(b,c,d,a,x[k+14],S34,0xFDE5380C);
4789 a = HH(a,b,c,d,x[k+1], S31,0xA4BEEA44);
4790 d = HH(d,a,b,c,x[k+4], S32,0x4BDECFA9);
4791 c = HH(c,d,a,b,x[k+7], S33,0xF6BB4B60);
4792 b = HH(b,c,d,a,x[k+10],S34,0xBEBFBC70);
4793 a = HH(a,b,c,d,x[k+13],S31,0x289B7EC6);
4794 d = HH(d,a,b,c,x[k+0], S32,0xEAA127FA);
4795 c = HH(c,d,a,b,x[k+3], S33,0xD4EF3085);
4796 b = HH(b,c,d,a,x[k+6], S34,0x4881D05);
4797 a = HH(a,b,c,d,x[k+9], S31,0xD9D4D039);
4798 d = HH(d,a,b,c,x[k+12],S32,0xE6DB99E5);
4799 c = HH(c,d,a,b,x[k+15],S33,0x1FA27CF8);
4800 b = HH(b,c,d,a,x[k+2], S34,0xC4AC5665);
4801 a = II(a,b,c,d,x[k+0], S41,0xF4292244);
4802 d = II(d,a,b,c,x[k+7], S42,0x432AFF97);
4803 c = II(c,d,a,b,x[k+14],S43,0xAB9423A7);
4804 b = II(b,c,d,a,x[k+5], S44,0xFC93A039);
4805 a = II(a,b,c,d,x[k+12],S41,0x655B59C3);
4806 d = II(d,a,b,c,x[k+3], S42,0x8F0CCC92);
4807 c = II(c,d,a,b,x[k+10],S43,0xFFEFF47D);
4808 b = II(b,c,d,a,x[k+1], S44,0x85845DD1);
4809 a = II(a,b,c,d,x[k+8], S41,0x6FA87E4F);
4810 d = II(d,a,b,c,x[k+15],S42,0xFE2CE6E0);
4811 c = II(c,d,a,b,x[k+6], S43,0xA3014314);
4812 b = II(b,c,d,a,x[k+13],S44,0x4E0811A1);
4813 a = II(a,b,c,d,x[k+4], S41,0xF7537E82);
4814 d = II(d,a,b,c,x[k+11],S42,0xBD3AF235);
4815 c = II(c,d,a,b,x[k+2], S43,0x2AD7D2BB);
4816 b = II(b,c,d,a,x[k+9], S44,0xEB86D391);
4817 a = AddUnsigned(a,AA);
4818 b = AddUnsigned(b,BB);
4819 c = AddUnsigned(c,CC);
4820 d = AddUnsigned(d,DD);
4823 var temp = WordToHex(a)+WordToHex(b)+WordToHex(c)+WordToHex(d);
4825 return temp.toLowerCase();
4831 function FirstToSecond( FirstPanel , SecondPanel , EntityName )
4833 if( EntityName !=
'' )
4835 document.getElementById( FirstPanel ).removeChild( document.getElementById( EntityName +
'_hidden_id' ) );
4836 document.getElementById( FirstPanel ).removeChild( document.getElementById( EntityName +
'_div_id_first' ) );
4837 document.getElementById( SecondPanel ).innerHTML +=
"<div onclick=\"javascript:SecondToFirst( '" + FirstPanel +
"' , '" + SecondPanel +
"' , '" + EntityName +
"' );\" class='double_panel_row no_selection_text' id='" + EntityName +
"_div_id_second'>" + EntityName +
"</div>";
4839 jQuery(
'.no_selection_text' ).disableTextSelect();
4846 function SecondToFirst( FirstPanel , SecondPanel , EntityName )
4848 if( EntityName !=
'' )
4850 document.getElementById( FirstPanel ).innerHTML +=
"<input type='hidden' name='entities[]' id='" + EntityName +
"_hidden_id' value='" + EntityName +
"'>";
4851 document.getElementById( SecondPanel ).removeChild( document.getElementById( EntityName +
'_div_id_second' ) );
4852 document.getElementById( FirstPanel ).innerHTML +=
"<div onclick=\"javascript:FirstToSecond( '" + FirstPanel +
"' , '" + SecondPanel +
"' , '" + EntityName +
"' );\" class='double_panel_row no_selection_text' id='" + EntityName +
"_div_id_first'>" + EntityName +
"</div>";
4854 jQuery(
'.no_selection_text' ).disableTextSelect();
4861 function InitPanels( FirstPanel , SecondPanel , FirstPanelEntities , SecondPanelEntities )
4863 if( FirstPanelEntities !=
'' )
4865 FirstPanelEntities = FirstPanelEntities.split(
',' );
4867 for( i = 0 ; i < FirstPanelEntities.length ; i++ )
4869 document.getElementById( FirstPanel ).innerHTML +=
"<div onclick=\"javascript:FirstToSecond( '" + FirstPanel +
"' , '" + SecondPanel +
"' , '" + FirstPanelEntities[ i ] +
"' );\" class='double_panel_row no_selection_text' id='" + FirstPanelEntities[ i ] +
"_div_id_first'>" + FirstPanelEntities[ i ] +
"</div>";
4870 document.getElementById( FirstPanel ).innerHTML +=
"<input type='hidden' name='entities[]' id='" + FirstPanelEntities[ i ] +
"_hidden_id' value='" + FirstPanelEntities[ i ] +
"'>";
4875 FirstPanelEntities =
new Array;
4878 if( SecondPanelEntities !=
'' )
4880 SecondPanelEntities = SecondPanelEntities.split(
',' );
4882 for( i = 0 ; i < SecondPanelEntities.length ; i++ )
4884 if(
in_array( SecondPanelEntities[ i ] , FirstPanelEntities ) ==
false )
4886 document.getElementById( SecondPanel ).innerHTML +=
"<div onclick=\"javascript:SecondToFirst( '" + FirstPanel +
"' , '" + SecondPanel +
"' , '" + SecondPanelEntities[ i ] +
"' );\" class='double_panel_row no_selection_text' id='" + SecondPanelEntities[ i ] +
"_div_id_second'>" + SecondPanelEntities[ i ] +
"</div>";
4892 jQuery(
'.no_selection_text' ).disableTextSelect();
4926 ultimix.forms.EnterProcessor =
function( e , Id )
4928 if( e.keyCode == 13 )
4930 document.getElementById( Id ).submit();
4943 ultimix.forms.TripleSetCheckboxClick =
function( Id , Name )
4945 Checkbox = document.getElementById(
'_checkbox_' + Id );
4946 Value = document.getElementById( Id );
4948 if( Value.value == 0 )
4950 jQuery( Checkbox ).prop(
'checked' ,
true );
4951 Checkbox.disabled =
false;
4956 if( Value.value == 1 )
4958 jQuery( Checkbox ).prop(
'checked' ,
true );
4959 Checkbox.disabled =
true;
4964 if( Value.value == 2 )
4966 jQuery( Checkbox ).prop(
'checked' ,
false );
4967 Checkbox.disabled =
false;
4982 ultimix.forms.DoubleSetCheckboxClick =
function( Id , Name )
4984 Checkbox = document.getElementById(
'_checkbox_' + Id );
4985 Value = document.getElementById( Id );
4987 if( Value.value == 0 )
4989 jQuery( Checkbox ).prop(
'checked' ,
true );
4994 if( Value.value == 1 )
4996 jQuery( Checkbox ).prop(
'checked' ,
false );
5017 ultimix.forms.SubmitForm0 =
function( FormId , ConfirmString , Action , Waiting , Method )
5019 if( document.getElementById( FormId ) == null )
5021 ultimix.std_dialogs.ErrorMessageBox(
'Form ' + FormId +
' was not found' );
5025 Success =
function( Result )
5027 if( Result ==
ultimix.std_dialogs.MB_YES )
5031 document.getElementById( FormId ).setAttribute(
'action' , Action );
5035 document.getElementById( FormId ).setAttribute(
'method' , Method );
5038 document.getElementById( FormId ).submit();
5042 ultimix.std_dialogs.WaitingMessageBox();
5049 ultimix.std_dialogs.QuestionMessageBox( ConfirmString , Success );
5053 Success(
ultimix.std_dialogs.MB_YES );
5075 ultimix.forms.SubmitForm1 =
function( FormId , Param1 , Value1 , ConfirmString , Action , Waiting , Method )
5077 if( document.getElementById( FormId ) == null )
5079 ultimix.std_dialogs.ErrorMessageBox(
'Form ' + FormId +
' was not found' );
5083 if( document.getElementById( Param1 ) == null )
5085 ultimix.std_dialogs.ErrorMessageBox(
'Field ' + Param1 +
' was not found' );
5089 Success =
function( Result )
5091 if( Result ==
ultimix.std_dialogs.MB_YES )
5093 document.getElementById( Param1 ).setAttribute(
'value' , Value1 );
5096 document.getElementById( FormId ).setAttribute(
'action' , Action );
5100 document.getElementById( FormId ).setAttribute(
'method' , Method );
5103 document.getElementById( FormId ).submit();
5107 ultimix.std_dialogs.WaitingMessageBox();
5114 ultimix.std_dialogs.QuestionMessageBox( ConfirmString , Success );
5118 Success(
ultimix.std_dialogs.MB_YES );
5144 ultimix.forms.SubmitForm2 =
function( FormId , Param1 , Value1 , Param2 , Value2 , ConfirmString , Action , Waiting , Method )
5146 if( document.getElementById( FormId ) == null )
5148 ultimix.std_dialogs.ErrorMessageBox(
'Form ' + FormId +
' was not found' );
5152 if( document.getElementById( Param1 ) == null )
5154 ultimix.std_dialogs.ErrorMessageBox(
'Field ' + Param1 +
' was not found' );
5158 if( document.getElementById( Param2 ) == null )
5160 ultimix.std_dialogs.ErrorMessageBox(
'Field ' + Param2 +
' was not found' );
5164 Success =
function( Result )
5166 if( Result ==
ultimix.std_dialogs.MB_YES )
5168 document.getElementById( Param1 ).setAttribute(
'value' , Value1 );
5169 document.getElementById( Param2 ).setAttribute(
'value' , Value2 );
5172 document.getElementById( FormId ).setAttribute(
'action' , Action );
5176 document.getElementById( FormId ).setAttribute(
'method' , Method );
5179 document.getElementById( FormId ).submit();
5183 ultimix.std_dialogs.WaitingMessageBox();
5190 ultimix.std_dialogs.QuestionMessageBox( ConfirmString , Success );
5194 Success(
ultimix.std_dialogs.MB_YES );
5224 ultimix.forms.SubmitForm3 =
function( FormId , Param1 , Value1 , Param2 , Value2 , Param3 , Value3 , ConfirmString , Action , Waiting , Method )
5226 if( document.getElementById( FormId ) == null )
5228 ultimix.std_dialogs.ErrorMessageBox(
'Form ' + FormId +
' was not found' );
5232 if( document.getElementById( Param1 ) == null )
5234 ultimix.std_dialogs.ErrorMessageBox(
'Field ' + Param1 +
' was not found' );
5238 if( document.getElementById( Param2 ) == null )
5240 ultimix.std_dialogs.ErrorMessageBox(
'Field ' + Param2 +
' was not found' );
5244 if( document.getElementById( Param3 ) == null )
5246 ultimix.std_dialogs.ErrorMessageBox(
'Field ' + Param3 +
' was not found' );
5250 Success =
function( Result )
5252 if( Result ==
ultimix.std_dialogs.MB_YES )
5254 document.getElementById( Param1 ).setAttribute(
'value' , Value1 );
5255 document.getElementById( Param2 ).setAttribute(
'value' , Value2 );
5256 document.getElementById( Param3 ).setAttribute(
'value' , Value3 );
5259 document.getElementById( FormId ).setAttribute(
'action' , Action );
5263 document.getElementById( FormId ).setAttribute(
'method' , Method );
5266 document.getElementById( FormId ).submit();
5270 ultimix.std_dialogs.WaitingMessageBox();
5277 ultimix.std_dialogs.QuestionMessageBox( ConfirmString , Success );
5281 Success(
ultimix.std_dialogs.MB_YES );
5293 ultimix.forms.ExtractFormData =
function( Selector )
5295 var Items =
jQuery( Selector ).find(
'*' ).andSelf();
5296 var Data =
new Object();
5298 for( var i = 0 ; i < Items.length ; i++ )
5300 var TagName =
jQuery( Items[ i ] ).prop(
'tagName' );
5301 TagName = TagName.toLowerCase();
5303 if( TagName ==
'input' )
5305 var TagType =
jQuery( Items[ i ] ).prop(
'type' );
5306 TagType = TagType.toLowerCase();
5308 if( TagType ==
'checkbox' )
5310 if(
jQuery( Items[ i ] ).prop(
'checked' ) )
5312 Data[
jQuery( Items[ i ] ).attr(
'name' ) ] = 1;
5316 Data[
jQuery( Items[ i ] ).attr(
'name' ) ] = 0;
5320 if( TagType ==
'radio' )
5322 if(
jQuery( Items[ i ] ).prop(
'checked' ) )
5324 Data[
jQuery( Items[ i ] ).attr(
'name' ) ] =
jQuery( Items[ i ] ).val();
5328 if( TagType ==
'text' || TagType ==
'hidden' || TagType ==
'password' )
5330 Data[
jQuery( Items[ i ] ).attr(
'name' ) ] =
jQuery( Items[ i ] ).val();
5334 if( TagName ==
'textarea' )
5336 Data[
jQuery( Items[ i ] ).attr(
'name' ) ] =
jQuery( Items[ i ] ).val();
5339 if( TagName ==
'select' )
5341 Data[
jQuery( Items[ i ] ).attr(
'name' ) ] =
jQuery( Items[ i ] ).children(
':selected' ).eq( 0 ).val();
5360 ultimix.forms.EditRecord =
function( id , Prefix , Method )
5362 ultimix.forms.SubmitForm2( Prefix +
'_form' , Prefix +
'_context_action' ,
'update_record_form' , Prefix +
'_record_id' ,
id ,
'' ,
'' ,
false , Method );
5374 ultimix.forms.CancelSearch =
function( ElementId , Speed )
5376 if( document.getElementById(
'search_string' ).value ==
'' )
5378 ultimix.ToggleElement( ElementId , Speed );
5382 document.getElementById(
'search_string' ).value =
'';
5383 window.location.href = window.location.href;
5417 ultimix.grids.RecordSelected =
function( Name , ErrorMessage )
5419 return(
ultimix.grids.RecordSelectedEx(
'._' + Name +
'_item_checkbox' , ErrorMessage ) );
5433 ultimix.grids.RecordSelectedEx =
function( Selector , ErrorMessage )
5435 var Items =
jQuery( Selector );
5437 for( i = 0 ; i < Items.length ; i++ )
5439 if(
jQuery( Items[ i ] ).prop(
'checked' ) )
5462 ultimix.grids.GetIdentificators =
function( Name )
5464 return(
ultimix.grids.GetIdentificatorsEx(
'._' + Name +
'_item_checkbox' ) );
5476 ultimix.grids.GetIdentificatorsEx =
function( Selector )
5478 var Identificators =
new Array();
5480 var Items =
jQuery( Selector );
5482 for( var i = 0 ; i < Items.length ; i++ )
5484 if(
jQuery( Items[ i ] ).prop(
'checked' ) )
5486 Identificators.push( (
new String(
jQuery( Items[ i ] ).attr(
'id' ) ) ).replace(
'_id_' ,
'' ) );
5490 return( Identificators );
5500 ultimix.grids.ToggleChildrenCheckboxes =
function( Checkbox )
5502 var ChildrenSelector =
jQuery( Checkbox ).attr(
'children_selector' );
5504 var Checked =
jQuery( Checkbox ).prop(
'checked' );
5506 jQuery( ChildrenSelector ).each(
5509 jQuery(
this ).prop(
'checked' , Checked );
5512 if(
jQuery(
this ).attr(
'children_selector' ) )
5515 ultimix.grids.ToggleChildrenCheckboxes(
this );
5528 ultimix.grids.TryToggleParentCheckbox =
function( Checkbox )
5530 var ParentSelector =
jQuery( Checkbox ).attr(
'parent_selector' );
5533 if( ParentSelector )
5536 var Checked =
jQuery( Checkbox ).prop(
'checked' );
5540 var SiblingsSelector =
jQuery( Checkbox ).attr(
'siblings_selector' );
5541 if(
jQuery( SiblingsSelector ).length ==
jQuery( SiblingsSelector ).filter(
':checked' ).length )
5543 jQuery( ParentSelector ).each(
5546 jQuery(
this ).prop(
'checked' , Checked );
5547 ultimix.grids.TryToggleParentCheckbox(
this );
5554 jQuery( ParentSelector ).each(
5557 jQuery(
this ).prop(
'checked' , Checked );
5558 ultimix.grids.TryToggleParentCheckbox(
this );
5572 ultimix.grids.ProcessLinkedCheckboxes =
function( Checkbox )
5574 ultimix.grids.ToggleChildrenCheckboxes( Checkbox );
5575 ultimix.grids.TryToggleParentCheckbox( Checkbox );
5597 ultimix.grids.SubmitForm0Mass =
function( FormId , ConfirmString , Action , Name , NotSelectedErrorMessage , Waiting , Method )
5599 if(
ultimix.grids.RecordSelected( Name ) == false )
5601 ultimix.std_dialogs.MessageBox( NotSelectedErrorMessage ,
ultimix.get_string(
'Error' ) ,
ultimix.std_dialogs.MB_OK |
ultimix.std_dialogs.MB_ICONERROR |
ultimix.std_dialogs.MB_MODAL );
5605 ultimix.forms.SubmitForm0( FormId , ConfirmString , Action , Waiting , Method );
5631 ultimix.grids.SubmitForm1Mass =
function( FormId , Param1, Value1 , ConfirmString , Action , Name , NotSelectedErrorMessage , Waiting , Method )
5633 if(
ultimix.grids.RecordSelected( Name ) == false )
5635 ultimix.std_dialogs.MessageBox( NotSelectedErrorMessage ,
ultimix.get_string(
'Error' ) ,
ultimix.std_dialogs.MB_OK |
ultimix.std_dialogs.MB_ICONERROR |
ultimix.std_dialogs.MB_MODAL );
5639 ultimix.forms.SubmitForm1( FormId , Param1, Value1 , ConfirmString , Action , Waiting , Method );
5669 ultimix.grids.SubmitForm2Mass =
function( FormId , Param1, Value1 , Param2, Value2 , ConfirmString , Action , Name , NotSelectedErrorMessage , Waiting , Method )
5671 if(
ultimix.grids.RecordSelected( Name ) == false )
5673 ultimix.std_dialogs.MessageBox( NotSelectedErrorMessage ,
ultimix.get_string(
'Error' ) ,
ultimix.std_dialogs.MB_OK |
ultimix.std_dialogs.MB_ICONERROR |
ultimix.std_dialogs.MB_MODAL );
5677 ultimix.forms.SubmitForm2( FormId , Param1, Value1 , Param2, Value2 , ConfirmString , Action , Waiting );
5711 ultimix.grids.SubmitForm3Mass =
function( FormId , Param1, Value1 , Param2, Value2 , Param3, Value3 , ConfirmString , Action , Name , NotSelectedErrorMessage , Waiting , Method )
5713 if(
ultimix.grids.RecordSelected( Name ) == false )
5715 ultimix.std_dialogs.MessageBox( NotSelectedErrorMessage ,
ultimix.get_string(
'Error' ) ,
ultimix.std_dialogs.MB_OK |
ultimix.std_dialogs.MB_ICONERROR |
ultimix.std_dialogs.MB_MODAL );
5719 ultimix.forms.SubmitForm3( FormId , Param1, Value1 , Param2, Value2 , Param3, Value3 , ConfirmString , Action , Waiting );
5749 ultimix.inplace.ReplaceWithTextarea =
function( Event )
5751 var Width =
jQuery( Event.target ).outerWidth();
5752 var Height =
jQuery( Event.target ).outerHeight();
5753 var Name =
jQuery( Event.target ).attr(
'field_name' );
5754 var Class =
jQuery( Event.target ).attr(
'field_class' );
5755 var Value =
jQuery( Event.target ).html();
5757 jQuery( Event.target ).hide();
5758 jQuery( Event.target ).after(
5759 '<textarea style="margin: 0px; width: ' + ( Width - 5 ) +
'px; height: ' + ( Height - 3 ) +
5760 'px" class="' + Class +
'" name="' + Name +
'">' + Value +
'</textarea>'
5771 ultimix.inplace.ReplaceWithInput =
function( Event )
5773 var Width =
jQuery( Event.target ).outerWidth();
5774 var Name =
jQuery( Event.target ).attr(
'field_name' );
5775 var Class =
jQuery( Event.target ).attr(
'field_class' );
5776 var Value =
jQuery( Event.target ).html();
5778 jQuery( Event.target ).hide();
5779 jQuery( Event.target ).after(
5780 '<input style="margin: 0px; width: ' + ( Width - 5 ) +
'px;' +
5781 '" class="' + Class +
'" name="' + Name +
'" value="' + Value +
'">'
5793 jQuery(
'.inplace_textarea' ).each(
5794 function( i , Element )
5796 jQuery( Element ).dblclick(
ultimix.inplace.ReplaceWithTextarea );
5799 jQuery(
'.inplace_input' ).each(
5800 function( i , Element )
5802 jQuery( Element ).dblclick(
ultimix.inplace.ReplaceWithInput );
5822 if( !
ultimix.string_utilities )
5824 ultimix.string_utilities = {};
5836 ultimix.string_utilities.CompileTags =
function( Str )
5838 Str =
ultimix.string_utilities.StrReplace(
'[js_rand_0]' ,
ultimix.GetRandomInt() , Str );
5839 Str =
ultimix.string_utilities.StrReplace(
'[js_rand_1]' ,
ultimix.GetRandomInt() , Str );
5840 Str =
ultimix.string_utilities.StrReplace(
'[js_rand_2]' ,
ultimix.GetRandomInt() , Str );
5841 Str =
ultimix.string_utilities.StrReplace(
'[js_rand_3]' ,
ultimix.GetRandomInt() , Str );
5842 Str =
ultimix.string_utilities.StrReplace(
'[js_rand_4]' ,
ultimix.GetRandomInt() , Str );
5843 Str =
ultimix.string_utilities.StrReplace(
'[js_rand_5]' ,
ultimix.GetRandomInt() , Str );
5844 Str =
ultimix.string_utilities.StrReplace(
'[js_rand_6]' ,
ultimix.GetRandomInt() , Str );
5845 Str =
ultimix.string_utilities.StrReplace(
'[js_rand_7]' ,
ultimix.GetRandomInt() , Str );
5846 Str =
ultimix.string_utilities.StrReplace(
'[js_rand_8]' ,
ultimix.GetRandomInt() , Str );
5847 Str =
ultimix.string_utilities.StrReplace(
'[js_rand_9]' ,
ultimix.GetRandomInt() , Str );
5865 ultimix.string_utilities.StrReplace =
function( Search , Replace , Subject )
5867 return( Subject.split( Search ).join( Replace ) );
5881 ultimix.string_utilities.PrintRecord =
function( Format , Record )
5885 Format =
ultimix.string_utilities.StrReplace(
'[' + i +
']' , Record[ i ] , Format );
5900 ultimix.string_utilities.Base64Encode =
function( data )
5907 var b64 =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
5908 var o1 , o2 , o3 , h1 , h2 , h3 , h4 , bits , i = 0 , enc =
'';
5913 o1 = data.charCodeAt( i++ );
5914 o2 = data.charCodeAt( i++ );
5915 o3 = data.charCodeAt( i++ );
5917 bits = o1 << 16 | o2 << 8 | o3;
5919 h1 = bits >> 18 & 0x3f;
5920 h2 = bits >> 12 & 0x3f;
5921 h3 = bits >> 6 & 0x3f;
5925 enc += b64.charAt( h1 ) + b64.charAt( h2 ) + b64.charAt( h3 ) + b64.charAt( h4 );
5927 while ( i < data.length );
5929 switch( data.length % 3 )
5932 enc = enc.slice( 0 , -2 ) +
'==';
5935 enc = enc.slice( 0 , -1 ) +
'=';
5951 ultimix.string_utilities.Base64Decode =
function( data )
5957 var b64 =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
5958 var o1 , o2 , o3 , h1 , h2 , h3 , h4 , bits , i = 0 , enc =
'';
5963 h1 = b64.indexOf( data.charAt( i++ ) );
5964 h2 = b64.indexOf( data.charAt( i++ ) );
5965 h3 = b64.indexOf( data.charAt( i++ ) );
5966 h4 = b64.indexOf( data.charAt( i++ ) );
5968 bits = h1<<18 | h2<<12 | h3<<6 | h4;
5970 o1 = bits>>16 & 0xff;
5971 o2 = bits>>8 & 0xff;
5974 if( h3 == 64 ) enc += String.fromCharCode( o1 );
5975 else if ( h4 == 64 ) enc += String.fromCharCode( o1 , o2 );
5976 else enc += String.fromCharCode( o1 , o2 , o3 );
5978 while( i < data.length );
6004 ultimix.PopupHref =
function( URL , Width , Height )
6006 window.open( URL ,
"" ,
"width=" + Width +
", height=" + Height );
6014 ultimix.ReloadPage =
function()
6016 window.location.reload(
true );
6038 if (SWFUpload == undefined) {
6039 SWFUpload =
function (settings) {
6044 SWFUpload.prototype.initSWFUpload =
function (settings) {
6046 this.customSettings = {};
6047 this.settings = settings;
6048 this.eventQueue = [];
6049 this.movieName =
"SWFUpload_" + SWFUpload.movieCount++;
6050 this.movieElement = null;
6054 SWFUpload.instances[this.movieName] =
this;
6061 delete SWFUpload.instances[this.movieName];
6069 SWFUpload.instances = {};
6070 SWFUpload.movieCount = 0;
6071 SWFUpload.version =
"2.2.0 2009-03-25";
6072 SWFUpload.QUEUE_ERROR = {
6073 QUEUE_LIMIT_EXCEEDED : -100,
6074 FILE_EXCEEDS_SIZE_LIMIT : -110,
6075 ZERO_BYTE_FILE : -120,
6076 INVALID_FILETYPE : -130
6078 SWFUpload.UPLOAD_ERROR = {
6080 MISSING_UPLOAD_URL : -210,
6082 SECURITY_ERROR : -230,
6083 UPLOAD_LIMIT_EXCEEDED : -240,
6084 UPLOAD_FAILED : -250,
6085 SPECIFIED_FILE_ID_NOT_FOUND : -260,
6086 FILE_VALIDATION_FAILED : -270,
6087 FILE_CANCELLED : -280,
6088 UPLOAD_STOPPED : -290
6090 SWFUpload.FILE_STATUS = {
6097 SWFUpload.BUTTON_ACTION = {
6099 SELECT_FILES : -110,
6102 SWFUpload.CURSOR = {
6106 SWFUpload.WINDOW_MODE = {
6108 TRANSPARENT :
"transparent",
6114 SWFUpload.completeURL =
function(url) {
6115 if (typeof(url) !==
"string" || url.match(/^https?:\/\
6119 var currentURL = window.location.protocol +
"//" + window.location.hostname + (window.location.port ?
":" + window.location.port :
"");
6121 var
indexSlash = window.location.pathname.lastIndexOf(
"/");
6122 if (indexSlash <= 0) {
6125 path = window.location.pathname.substr(0, indexSlash) +
"/";
6140 this.ensureDefault =
function (settingName, defaultValue) {
6141 this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
6145 this.ensureDefault(
"upload_url",
"");
6146 this.ensureDefault(
"preserve_relative_urls",
false);
6147 this.ensureDefault(
"file_post_name",
"Filedata");
6148 this.ensureDefault(
"post_params", {});
6149 this.ensureDefault(
"use_query_string",
false);
6150 this.ensureDefault(
"requeue_on_error",
false);
6151 this.ensureDefault(
"http_success", []);
6152 this.ensureDefault(
"assume_success_timeout", 0);
6155 this.ensureDefault(
"file_types",
"*.*");
6156 this.ensureDefault(
"file_types_description",
"All Files");
6157 this.ensureDefault(
"file_size_limit", 0);
6158 this.ensureDefault(
"file_upload_limit", 0);
6159 this.ensureDefault(
"file_queue_limit", 0);
6162 this.ensureDefault(
"flash_url",
"swfupload.swf");
6163 this.ensureDefault(
"prevent_swf_caching",
true);
6166 this.ensureDefault(
"button_image_url",
"");
6167 this.ensureDefault(
"button_width", 1);
6168 this.ensureDefault(
"button_height", 1);
6169 this.ensureDefault(
"button_text",
"");
6170 this.ensureDefault(
"button_text_style",
"color: #000000; font-size: 16pt;");
6171 this.ensureDefault(
"button_text_top_padding", 0);
6172 this.ensureDefault(
"button_text_left_padding", 0);
6173 this.ensureDefault(
"button_action",
SWFUpload.BUTTON_ACTION.SELECT_FILES);
6174 this.ensureDefault(
"button_disabled",
false);
6175 this.ensureDefault(
"button_placeholder_id",
"");
6176 this.ensureDefault(
"button_placeholder", null);
6177 this.ensureDefault(
"button_cursor",
SWFUpload.CURSOR.ARROW);
6178 this.ensureDefault(
"button_window_mode",
SWFUpload.WINDOW_MODE.WINDOW);
6181 this.ensureDefault(
"debug",
false);
6182 this.settings.debug_enabled = this.settings.debug;
6186 this.ensureDefault(
"swfupload_loaded_handler", null);
6187 this.ensureDefault(
"file_dialog_start_handler", null);
6188 this.ensureDefault(
"file_queued_handler", null);
6189 this.ensureDefault(
"file_queue_error_handler", null);
6190 this.ensureDefault(
"file_dialog_complete_handler", null);
6192 this.ensureDefault(
"upload_start_handler", null);
6193 this.ensureDefault(
"upload_progress_handler", null);
6194 this.ensureDefault(
"upload_error_handler", null);
6195 this.ensureDefault(
"upload_success_handler", null);
6196 this.ensureDefault(
"upload_complete_handler", null);
6198 this.ensureDefault(
"debug_handler", this.
debugMessage);
6200 this.ensureDefault(
"custom_settings", {});
6203 this.customSettings = this.settings.custom_settings;
6206 if (!!this.settings.prevent_swf_caching) {
6207 this.settings.flash_url = this.settings.flash_url + (this.settings.flash_url.indexOf(
"?") < 0 ?
"?" :
"&") +
"preventswfcaching=" +
new Date().getTime();
6210 if (!this.settings.preserve_relative_urls) {
6212 this.settings.upload_url =
SWFUpload.completeURL(this.settings.upload_url);
6213 this.settings.button_image_url =
SWFUpload.completeURL(this.settings.button_image_url);
6216 delete this.ensureDefault;
6221 var targetElement, tempParent;
6224 if (document.getElementById(
this.movieName) !== null) {
6225 throw "ID " + this.movieName +
" is already in use. The Flash Object could not be added";
6229 targetElement = document.getElementById(this.settings.button_placeholder_id) || this.settings.button_placeholder;
6231 if (targetElement == undefined) {
6232 throw "Could not find the placeholder element: " + this.settings.button_placeholder_id;
6236 tempParent = document.createElement(
"div");
6238 targetElement.parentNode.replaceChild(tempParent.firstChild, targetElement);
6241 if (window[this.movieName] == undefined) {
6250 return [
'<object id="', this.movieName,
'" type="application/x-shockwave-flash" data="', this.settings.flash_url,
'" width="', this.settings.button_width,
'" height="', this.settings.button_height,
'" class="swfupload">',
6251 '<param name="wmode" value="', this.settings.button_window_mode,
'" />',
6252 '<param name="movie" value="', this.settings.flash_url,
'" />',
6253 '<param name="quality" value="high" />',
6254 '<param name="menu" value="false" />',
6255 '<param name="allowScriptAccess" value="always" />',
6256 '<param name="flashvars" value="' + this.
getFlashVars() +
'" />',
6257 '</object>'].join(
"");
6265 var httpSuccessString = this.settings.http_success.join(
",");
6268 return [
"movieName=", encodeURIComponent(this.movieName),
6269 "&uploadURL=", encodeURIComponent(this.settings.upload_url),
6270 "&useQueryString=", encodeURIComponent(this.settings.use_query_string),
6271 "&requeueOnError=", encodeURIComponent(this.settings.requeue_on_error),
6272 "&httpSuccess=", encodeURIComponent(httpSuccessString),
6273 "&assumeSuccessTimeout=", encodeURIComponent(this.settings.assume_success_timeout),
6274 "&params=", encodeURIComponent(paramString),
6275 "&filePostName=", encodeURIComponent(this.settings.file_post_name),
6276 "&fileTypes=", encodeURIComponent(this.settings.file_types),
6277 "&fileTypesDescription=", encodeURIComponent(this.settings.file_types_description),
6278 "&fileSizeLimit=", encodeURIComponent(this.settings.file_size_limit),
6279 "&fileUploadLimit=", encodeURIComponent(this.settings.file_upload_limit),
6280 "&fileQueueLimit=", encodeURIComponent(this.settings.file_queue_limit),
6281 "&debugEnabled=", encodeURIComponent(this.settings.debug_enabled),
6282 "&buttonImageURL=", encodeURIComponent(this.settings.button_image_url),
6283 "&buttonWidth=", encodeURIComponent(this.settings.button_width),
6284 "&buttonHeight=", encodeURIComponent(this.settings.button_height),
6285 "&buttonText=", encodeURIComponent(this.settings.button_text),
6286 "&buttonTextTopPadding=", encodeURIComponent(this.settings.button_text_top_padding),
6287 "&buttonTextLeftPadding=", encodeURIComponent(this.settings.button_text_left_padding),
6288 "&buttonTextStyle=", encodeURIComponent(this.settings.button_text_style),
6289 "&buttonAction=", encodeURIComponent(this.settings.button_action),
6290 "&buttonDisabled=", encodeURIComponent(this.settings.button_disabled),
6291 "&buttonCursor=", encodeURIComponent(this.settings.button_cursor)
6298 if (this.movieElement == undefined) {
6299 this.movieElement = document.getElementById(this.movieName);
6302 if (this.movieElement === null) {
6303 throw "Could not find Flash element";
6306 return this.movieElement;
6312 var postParams = this.settings.post_params;
6313 var paramStringPairs = [];
6315 if (typeof(postParams) ===
"object") {
6316 for (var name in postParams) {
6317 if (postParams.hasOwnProperty(name)) {
6318 paramStringPairs.push(encodeURIComponent(name.toString()) +
"=" + encodeURIComponent(postParams[name].toString()));
6323 return paramStringPairs.join(
"&");
6337 var movieElement = null;
6340 if (movieElement && typeof(movieElement.CallFunction) ===
"unknown") {
6342 for (var i in movieElement) {
6344 if (typeof(movieElement[i]) ===
"function") {
6345 movieElement[i] = null;
6352 movieElement.parentNode.removeChild(movieElement);
6357 window[this.movieName] = null;
6360 SWFUpload.instances[this.movieName] = null;
6361 delete SWFUpload.instances[this.movieName];
6363 this.movieElement = null;
6364 this.settings = null;
6365 this.customSettings = null;
6366 this.eventQueue = null;
6367 this.movieName = null;
6384 "---SWFUpload Instance Info---\n",
6386 "Movie Name: ",
this.movieName,
"\n",
6388 "\t",
"upload_url: ",
this.settings.upload_url,
"\n",
6389 "\t",
"flash_url: ",
this.settings.flash_url,
"\n",
6390 "\t",
"use_query_string: ",
this.settings.use_query_string.toString(),
"\n",
6391 "\t",
"requeue_on_error: ", this.settings.requeue_on_error.toString(),
"\n",
6392 "\t",
"http_success: ", this.settings.http_success.join(
", "),
"\n",
6393 "\t",
"assume_success_timeout: ", this.settings.assume_success_timeout,
"\n",
6394 "\t",
"file_post_name: ", this.settings.file_post_name,
"\n",
6395 "\t",
"post_params: ", this.settings.post_params.toString(),
"\n",
6396 "\t",
"file_types: ", this.settings.file_types,
"\n",
6397 "\t",
"file_types_description: ", this.settings.file_types_description,
"\n",
6398 "\t",
"file_size_limit: ", this.settings.file_size_limit,
"\n",
6399 "\t",
"file_upload_limit: ", this.settings.file_upload_limit,
"\n",
6400 "\t",
"file_queue_limit: ", this.settings.file_queue_limit,
"\n",
6401 "\t",
"debug: ", this.settings.debug.toString(),
"\n",
6403 "\t",
"prevent_swf_caching: ", this.settings.prevent_swf_caching.toString(),
"\n",
6405 "\t",
"button_placeholder_id: ", this.settings.button_placeholder_id.toString(),
"\n",
6406 "\t",
"button_placeholder: ", (this.settings.button_placeholder ?
"Set" :
"Not Set"),
"\n",
6407 "\t",
"button_image_url: ", this.settings.button_image_url.toString(),
"\n",
6408 "\t",
"button_width: ", this.settings.button_width.toString(),
"\n",
6409 "\t",
"button_height: ", this.settings.button_height.toString(),
"\n",
6410 "\t",
"button_text: ", this.settings.button_text.toString(),
"\n",
6411 "\t",
"button_text_style: ", this.settings.button_text_style.toString(),
"\n",
6412 "\t",
"button_text_top_padding: ", this.settings.button_text_top_padding.toString(),
"\n",
6413 "\t",
"button_text_left_padding: ", this.settings.button_text_left_padding.toString(),
"\n",
6414 "\t",
"button_action: ", this.settings.button_action.toString(),
"\n",
6415 "\t",
"button_disabled: ", this.settings.button_disabled.toString(),
"\n",
6417 "\t",
"custom_settings: ", this.settings.custom_settings.toString(),
"\n",
6418 "Event Handlers:\n",
6419 "\t",
"swfupload_loaded_handler assigned: ", (typeof this.settings.swfupload_loaded_handler ===
"function").toString(),
"\n",
6420 "\t",
"file_dialog_start_handler assigned: ", (typeof this.settings.file_dialog_start_handler ===
"function").toString(),
"\n",
6421 "\t",
"file_queued_handler assigned: ", (typeof this.settings.file_queued_handler ===
"function").toString(),
"\n",
6422 "\t",
"file_queue_error_handler assigned: ", (typeof this.settings.file_queue_error_handler ===
"function").toString(),
"\n",
6423 "\t",
"upload_start_handler assigned: ", (typeof this.settings.upload_start_handler ===
"function").toString(),
"\n",
6424 "\t",
"upload_progress_handler assigned: ", (typeof this.settings.upload_progress_handler ===
"function").toString(),
"\n",
6425 "\t",
"upload_error_handler assigned: ", (typeof this.settings.upload_error_handler ===
"function").toString(),
"\n",
6426 "\t",
"upload_success_handler assigned: ", (typeof this.settings.upload_success_handler ===
"function").toString(),
"\n",
6427 "\t",
"upload_complete_handler assigned: ", (typeof this.settings.upload_complete_handler ===
"function").toString(),
"\n",
6428 "\t",
"debug_handler assigned: ", (typeof this.settings.debug_handler ===
"function").toString(),
"\n"
6437 SWFUpload.prototype.addSetting =
function (name, value, default_value) {
6438 if (value == undefined) {
6439 return (this.settings[name] = default_value);
6441 return (this.settings[name] = value);
6447 if (this.settings[name] != undefined) {
6448 return this.settings[name];
6459 SWFUpload.prototype.callFlash =
function (functionName, argumentArray) {
6460 argumentArray = argumentArray || [];
6463 var returnValue, returnString;
6467 returnString = movieElement.CallFunction(
'<invoke name="' + functionName +
'" returntype="javascript">' + __flash__argumentsToXML(argumentArray, 0) +
'</invoke>');
6468 returnValue = eval(returnString);
6470 throw "Call to " + functionName +
" failed";
6474 if (returnValue != undefined && typeof returnValue.post ===
"object") {
6508 this.
callFlash(
"StartUpload", [fileID]);
6514 SWFUpload.prototype.cancelUpload =
function (fileID, triggerErrorEvent) {
6515 if (triggerErrorEvent !==
false) {
6516 triggerErrorEvent =
true;
6518 this.
callFlash(
"CancelUpload", [fileID, triggerErrorEvent]);
6545 this.
callFlash(
"SetStats", [statsObject]);
6551 if (typeof(fileID) ===
"number") {
6552 return this.
callFlash(
"GetFileByIndex", [fileID]);
6554 return this.
callFlash(
"GetFile", [fileID]);
6561 SWFUpload.prototype.addFileParam =
function (fileID, name, value) {
6562 return this.
callFlash(
"AddFileParam", [fileID, name, value]);
6567 SWFUpload.prototype.removeFileParam =
function (fileID, name) {
6568 this.
callFlash(
"RemoveFileParam", [fileID, name]);
6573 this.settings.upload_url = url.toString();
6578 SWFUpload.prototype.setPostParams =
function (paramsObject) {
6579 this.settings.post_params = paramsObject;
6580 this.
callFlash(
"SetPostParams", [paramsObject]);
6585 this.settings.post_params[name] = value;
6586 this.
callFlash(
"SetPostParams", [this.settings.post_params]);
6591 delete this.settings.post_params[name];
6592 this.
callFlash(
"SetPostParams", [this.settings.post_params]);
6596 SWFUpload.prototype.setFileTypes =
function (types, description) {
6597 this.settings.file_types = types;
6598 this.settings.file_types_description = description;
6599 this.
callFlash(
"SetFileTypes", [types, description]);
6603 SWFUpload.prototype.setFileSizeLimit =
function (fileSizeLimit) {
6604 this.settings.file_size_limit = fileSizeLimit;
6605 this.
callFlash(
"SetFileSizeLimit", [fileSizeLimit]);
6609 SWFUpload.prototype.setFileUploadLimit =
function (fileUploadLimit) {
6610 this.settings.file_upload_limit = fileUploadLimit;
6611 this.
callFlash(
"SetFileUploadLimit", [fileUploadLimit]);
6615 SWFUpload.prototype.setFileQueueLimit =
function (fileQueueLimit) {
6616 this.settings.file_queue_limit = fileQueueLimit;
6617 this.
callFlash(
"SetFileQueueLimit", [fileQueueLimit]);
6621 SWFUpload.prototype.setFilePostName =
function (filePostName) {
6622 this.settings.file_post_name = filePostName;
6623 this.
callFlash(
"SetFilePostName", [filePostName]);
6627 SWFUpload.prototype.setUseQueryString =
function (useQueryString) {
6628 this.settings.use_query_string = useQueryString;
6629 this.
callFlash(
"SetUseQueryString", [useQueryString]);
6633 SWFUpload.prototype.setRequeueOnError =
function (requeueOnError) {
6634 this.settings.requeue_on_error = requeueOnError;
6635 this.
callFlash(
"SetRequeueOnError", [requeueOnError]);
6639 SWFUpload.prototype.setHTTPSuccess =
function (http_status_codes) {
6640 if (typeof http_status_codes ===
"string") {
6641 http_status_codes = http_status_codes.replace(
" ",
"").split(
",");
6644 this.settings.http_success = http_status_codes;
6645 this.
callFlash(
"SetHTTPSuccess", [http_status_codes]);
6649 SWFUpload.prototype.setAssumeSuccessTimeout =
function (timeout_seconds) {
6650 this.settings.assume_success_timeout = timeout_seconds;
6651 this.
callFlash(
"SetAssumeSuccessTimeout", [timeout_seconds]);
6655 SWFUpload.prototype.setDebugEnabled =
function (debugEnabled) {
6656 this.settings.debug_enabled = debugEnabled;
6657 this.
callFlash(
"SetDebugEnabled", [debugEnabled]);
6661 SWFUpload.prototype.setButtonImageURL =
function (buttonImageURL) {
6662 if (buttonImageURL == undefined) {
6663 buttonImageURL =
"";
6666 this.settings.button_image_url = buttonImageURL;
6667 this.
callFlash(
"SetButtonImageURL", [buttonImageURL]);
6671 SWFUpload.prototype.setButtonDimensions =
function (width, height) {
6672 this.settings.button_width = width;
6673 this.settings.button_height = height;
6676 if (movie != undefined) {
6677 movie.style.width = width +
"px";
6678 movie.style.height = height +
"px";
6681 this.
callFlash(
"SetButtonDimensions", [width, height]);
6685 this.settings.button_text = html;
6686 this.
callFlash(
"SetButtonText", [html]);
6689 SWFUpload.prototype.setButtonTextPadding =
function (left, top) {
6690 this.settings.button_text_top_padding = top;
6691 this.settings.button_text_left_padding = left;
6692 this.
callFlash(
"SetButtonTextPadding", [left, top]);
6697 this.settings.button_text_style = css;
6698 this.
callFlash(
"SetButtonTextStyle", [css]);
6701 SWFUpload.prototype.setButtonDisabled =
function (isDisabled) {
6702 this.settings.button_disabled = isDisabled;
6703 this.
callFlash(
"SetButtonDisabled", [isDisabled]);
6706 SWFUpload.prototype.setButtonAction =
function (buttonAction) {
6707 this.settings.button_action = buttonAction;
6708 this.
callFlash(
"SetButtonAction", [buttonAction]);
6713 this.settings.button_cursor = cursor;
6714 this.
callFlash(
"SetButtonCursor", [cursor]);
6730 SWFUpload.prototype.queueEvent =
function (handlerName, argumentArray) {
6733 if (argumentArray == undefined) {
6735 }
else if (!(argumentArray instanceof Array)) {
6736 argumentArray = [argumentArray];
6740 if (typeof this.settings[handlerName] ===
"function") {
6742 this.eventQueue.push(
function () {
6743 this.settings[handlerName].apply(
this, argumentArray);
6747 setTimeout(
function () {
6748 self.executeNextEvent();
6751 }
else if (this.settings[handlerName] !== null) {
6752 throw "Event handler " + handlerName +
" is unknown or is not a function";
6761 var f = this.eventQueue ? this.eventQueue.shift() : null;
6762 if (typeof(f) ===
"function") {
6770 SWFUpload.prototype.unescapeFilePostParams =
function (file) {
6771 var reg = /[$]([0-9a-f]{4})/i;
6772 var unescapedPost = {};
6775 if (file != undefined) {
6776 for (var k in file.post) {
6777 if (file.post.hasOwnProperty(k)) {
6780 while ((match = reg.exec(uk)) !== null) {
6781 uk = uk.replace(match[0], String.fromCharCode(parseInt(
"0x" + match[1], 16)));
6783 unescapedPost[uk] = file.post[k];
6787 file.post = unescapedPost;
6796 return this.
callFlash(
"TestExternalInterface");
6808 if (!movieElement) {
6809 this.
debug(
"Flash called back ready but the flash movie can't be found.");
6823 if (this.movieElement && typeof(movieElement.CallFunction) ===
"unknown") {
6824 this.
debug(
"Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
6825 for (var key in movieElement) {
6827 if (typeof(movieElement[key]) ===
"function") {
6828 movieElement[key] = null;
6840 window[
"__flash__removeCallback"] =
function (instance, name) {
6843 instance[name] = null;
6855 this.
queueEvent(
"file_dialog_start_handler");
6862 this.
queueEvent(
"file_queued_handler", file);
6867 SWFUpload.prototype.fileQueueError =
function (file, errorCode, message) {
6869 this.
queueEvent(
"file_queue_error_handler", [file, errorCode, message]);
6874 SWFUpload.prototype.fileDialogComplete =
function (numFilesSelected, numFilesQueued, numFilesInQueue) {
6875 this.
queueEvent(
"file_dialog_complete_handler", [numFilesSelected, numFilesQueued, numFilesInQueue]);
6880 this.
queueEvent(
"return_upload_start_handler", file);
6885 if (typeof this.settings.upload_start_handler ===
"function") {
6887 returnValue = this.settings.upload_start_handler.call(
this, file);
6888 }
else if (this.settings.upload_start_handler != undefined) {
6889 throw "upload_start_handler must be a function";
6894 if (returnValue === undefined) {
6898 returnValue = !!returnValue;
6900 this.
callFlash(
"ReturnUploadStart", [returnValue]);
6905 SWFUpload.prototype.uploadProgress =
function (file, bytesComplete, bytesTotal) {
6907 this.
queueEvent(
"upload_progress_handler", [file, bytesComplete, bytesTotal]);
6910 SWFUpload.prototype.uploadError =
function (file, errorCode, message) {
6912 this.
queueEvent(
"upload_error_handler", [file, errorCode, message]);
6915 SWFUpload.prototype.uploadSuccess =
function (file, serverData, responseReceived) {
6917 this.
queueEvent(
"upload_success_handler", [file, serverData, responseReceived]);
6922 this.
queueEvent(
"upload_complete_handler", file);
6949 if (this.settings.debug) {
6950 var exceptionMessage, exceptionValues = [];
6953 if (typeof message ===
"object" && typeof message.name ===
"string" && typeof message.message ===
"string") {
6954 for (var key in message) {
6955 if (message.hasOwnProperty(key)) {
6956 exceptionValues.push(key +
": " + message[key]);
6959 exceptionMessage = exceptionValues.join(
"\n") ||
"";
6960 exceptionValues = exceptionMessage.split(
"\n");
6961 exceptionMessage =
"EXCEPTION: " + exceptionValues.join(
"\nEXCEPTION: ");
6962 SWFUpload.Console.writeLine(exceptionMessage);
6971 var console, documentForm;
6974 console = document.getElementById(
"SWFUpload_Console");
6977 documentForm = document.createElement(
"form");
6978 document.getElementsByTagName(
"body")[0].appendChild(documentForm);
6980 console = document.createElement(
"textarea");
6981 console.id =
"SWFUpload_Console";
6982 console.style.fontFamily =
"monospace";
6983 console.setAttribute(
"wrap",
"off");
6984 console.wrap =
"off";
6985 console.style.overflow =
"auto";
6986 console.style.width =
"700px";
6987 console.style.height =
"350px";
6988 console.style.margin =
"5px";
6989 documentForm.appendChild(console);
6992 console.value += message +
"\n";
6994 console.scrollTop = console.scrollHeight - console.clientHeight;
6996 alert(
"Exception: " + ex.name +
" Message: " + ex.message);
7009 if (typeof(SWFUpload) ===
"function") {
7010 SWFUpload.prototype.initSettings =
function (oldInitSettings) {
7011 return function () {
7012 if (typeof(oldInitSettings) ===
"function") {
7013 oldInitSettings.call(
this);
7016 this.refreshCookies(
false);
7018 }(SWFUpload.prototype.initSettings);
7021 SWFUpload.prototype.refreshCookies =
function (sendToFlash) {
7022 if (sendToFlash === undefined) {
7025 sendToFlash = !!sendToFlash;
7028 var postParams = this.settings.post_params;
7031 var i, cookieArray = document.cookie.split(
';'), caLength = cookieArray.length, c, eqIndex, name, value;
7032 for (i = 0; i < caLength; i++) {
7036 while (c.charAt(0) ===
" ") {
7037 c = c.substring(1, c.length);
7039 eqIndex = c.indexOf(
"=");
7041 name = c.substring(0, eqIndex);
7042 value = c.substring(eqIndex + 1);
7043 postParams[name] = value;
7068 if (typeof(SWFUpload) ===
"function") {
7069 SWFUpload.queue = {};
7071 SWFUpload.prototype.initSettings = (
function (oldInitSettings) {
7072 return function () {
7073 if (typeof(oldInitSettings) ===
"function") {
7074 oldInitSettings.call(
this);
7077 this.queueSettings = {};
7079 this.queueSettings.queue_cancelled_flag =
false;
7080 this.queueSettings.queue_upload_count = 0;
7082 this.queueSettings.user_upload_complete_handler = this.settings.upload_complete_handler;
7083 this.queueSettings.user_upload_start_handler = this.settings.upload_start_handler;
7084 this.settings.upload_complete_handler = SWFUpload.queue.uploadCompleteHandler;
7085 this.settings.upload_start_handler = SWFUpload.queue.uploadStartHandler;
7087 this.settings.queue_complete_handler = this.settings.queue_complete_handler || null;
7089 })(SWFUpload.prototype.initSettings);
7091 SWFUpload.prototype.startUpload =
function (fileID) {
7092 this.queueSettings.queue_cancelled_flag =
false;
7093 this.
callFlash(
"StartUpload", [fileID]);
7096 SWFUpload.prototype.cancelQueue =
function () {
7097 this.queueSettings.queue_cancelled_flag =
true;
7101 while (stats.files_queued > 0) {
7107 SWFUpload.queue.uploadStartHandler =
function (file) {
7109 if (typeof(this.queueSettings.user_upload_start_handler) ===
"function") {
7110 returnValue = this.queueSettings.user_upload_start_handler.call(
this, file);
7114 returnValue = (returnValue ===
false) ?
false :
true;
7116 this.queueSettings.queue_cancelled_flag = !returnValue;
7121 SWFUpload.queue.uploadCompleteHandler =
function (file) {
7122 var user_upload_complete_handler = this.queueSettings.user_upload_complete_handler;
7125 if (file.filestatus === SWFUpload.FILE_STATUS.COMPLETE) {
7126 this.queueSettings.queue_upload_count++;
7129 if (typeof(user_upload_complete_handler) ===
"function") {
7130 continueUpload = (user_upload_complete_handler.call(
this, file) ===
false) ?
false :
true;
7131 }
else if (file.filestatus === SWFUpload.FILE_STATUS.QUEUED) {
7133 continueUpload =
false;
7135 continueUpload =
true;
7138 if (continueUpload) {
7140 if (stats.files_queued > 0 &&
this.queueSettings.queue_cancelled_flag ===
false) {
7142 }
else if (this.queueSettings.queue_cancelled_flag ===
false) {
7143 this.
queueEvent(
"queue_complete_handler", [this.queueSettings.queue_upload_count]);
7144 this.queueSettings.queue_upload_count = 0;
7146 this.queueSettings.queue_cancelled_flag =
false;
7147 this.queueSettings.queue_upload_count = 0;
7179 if (typeof(SWFUpload) ===
"function") {
7180 SWFUpload.speed = {};
7182 SWFUpload.prototype.initSettings = (
function (oldInitSettings) {
7183 return function () {
7184 if (typeof(oldInitSettings) ===
"function") {
7185 oldInitSettings.call(
this);
7188 this.ensureDefault =
function (settingName, defaultValue) {
7189 this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
7193 this.fileSpeedStats = {};
7194 this.speedSettings = {};
7196 this.ensureDefault(
"moving_average_history_size",
"10");
7198 this.speedSettings.user_file_queued_handler = this.settings.file_queued_handler;
7199 this.speedSettings.user_file_queue_error_handler = this.settings.file_queue_error_handler;
7200 this.speedSettings.user_upload_start_handler = this.settings.upload_start_handler;
7201 this.speedSettings.user_upload_error_handler = this.settings.upload_error_handler;
7202 this.speedSettings.user_upload_progress_handler = this.settings.upload_progress_handler;
7203 this.speedSettings.user_upload_success_handler = this.settings.upload_success_handler;
7204 this.speedSettings.user_upload_complete_handler = this.settings.upload_complete_handler;
7206 this.settings.file_queued_handler = SWFUpload.speed.fileQueuedHandler;
7207 this.settings.file_queue_error_handler = SWFUpload.speed.fileQueueErrorHandler;
7208 this.settings.upload_start_handler = SWFUpload.speed.uploadStartHandler;
7209 this.settings.upload_error_handler = SWFUpload.speed.uploadErrorHandler;
7210 this.settings.upload_progress_handler = SWFUpload.speed.uploadProgressHandler;
7211 this.settings.upload_success_handler = SWFUpload.speed.uploadSuccessHandler;
7212 this.settings.upload_complete_handler = SWFUpload.speed.uploadCompleteHandler;
7214 delete this.ensureDefault;
7216 })(SWFUpload.prototype.initSettings);
7219 SWFUpload.speed.fileQueuedHandler =
function (file) {
7220 if (typeof this.speedSettings.user_file_queued_handler ===
"function") {
7221 file = SWFUpload.speed.extendFile(file);
7223 return this.speedSettings.user_file_queued_handler.call(
this, file);
7227 SWFUpload.speed.fileQueueErrorHandler =
function (file, errorCode, message) {
7228 if (typeof this.speedSettings.user_file_queue_error_handler ===
"function") {
7229 file = SWFUpload.speed.extendFile(file);
7231 return this.speedSettings.user_file_queue_error_handler.call(
this, file, errorCode, message);
7235 SWFUpload.speed.uploadStartHandler =
function (file) {
7236 if (typeof this.speedSettings.user_upload_start_handler ===
"function") {
7237 file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
7238 return this.speedSettings.user_upload_start_handler.call(
this, file);
7242 SWFUpload.speed.uploadErrorHandler =
function (file, errorCode, message) {
7243 file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
7244 SWFUpload.speed.removeTracking(file, this.fileSpeedStats);
7246 if (typeof this.speedSettings.user_upload_error_handler ===
"function") {
7247 return this.speedSettings.user_upload_error_handler.call(
this, file, errorCode, message);
7250 SWFUpload.speed.uploadProgressHandler =
function (file, bytesComplete, bytesTotal) {
7251 this.updateTracking(file, bytesComplete);
7252 file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
7254 if (typeof this.speedSettings.user_upload_progress_handler ===
"function") {
7255 return this.speedSettings.user_upload_progress_handler.call(
this, file, bytesComplete, bytesTotal);
7259 SWFUpload.speed.uploadSuccessHandler =
function (file, serverData) {
7260 if (typeof this.speedSettings.user_upload_success_handler ===
"function") {
7261 file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
7262 return this.speedSettings.user_upload_success_handler.call(
this, file, serverData);
7265 SWFUpload.speed.uploadCompleteHandler =
function (file) {
7266 file = SWFUpload.speed.extendFile(file, this.fileSpeedStats);
7267 SWFUpload.speed.removeTracking(file, this.fileSpeedStats);
7269 if (typeof this.speedSettings.user_upload_complete_handler ===
"function") {
7270 return this.speedSettings.user_upload_complete_handler.call(
this, file);
7275 SWFUpload.speed.extendFile =
function (file, trackingList) {
7279 tracking = trackingList[file.id];
7283 file.currentSpeed = tracking.currentSpeed;
7284 file.averageSpeed = tracking.averageSpeed;
7285 file.movingAverageSpeed = tracking.movingAverageSpeed;
7286 file.timeRemaining = tracking.timeRemaining;
7287 file.timeElapsed = tracking.timeElapsed;
7288 file.percentUploaded = tracking.percentUploaded;
7289 file.sizeUploaded = tracking.bytesUploaded;
7292 file.currentSpeed = 0;
7293 file.averageSpeed = 0;
7294 file.movingAverageSpeed = 0;
7295 file.timeRemaining = 0;
7296 file.timeElapsed = 0;
7297 file.percentUploaded = 0;
7298 file.sizeUploaded = 0;
7305 SWFUpload.prototype.updateTracking =
function (file, bytesUploaded) {
7306 var tracking = this.fileSpeedStats[file.id];
7308 this.fileSpeedStats[file.id] = tracking = {};
7312 bytesUploaded = bytesUploaded || tracking.bytesUploaded || 0;
7313 if (bytesUploaded < 0) {
7316 if (bytesUploaded > file.size) {
7317 bytesUploaded = file.size;
7320 var tickTime = (
new Date()).getTime();
7321 if (!tracking.startTime) {
7322 tracking.startTime = (
new Date()).getTime();
7323 tracking.lastTime = tracking.startTime;
7324 tracking.currentSpeed = 0;
7325 tracking.averageSpeed = 0;
7326 tracking.movingAverageSpeed = 0;
7327 tracking.movingAverageHistory = [];
7328 tracking.timeRemaining = 0;
7329 tracking.timeElapsed = 0;
7330 tracking.percentUploaded = bytesUploaded / file.size;
7331 tracking.bytesUploaded = bytesUploaded;
7332 }
else if (tracking.startTime > tickTime) {
7333 this.
debug(
"When backwards in time");
7336 var now = (
new Date()).getTime();
7337 var lastTime = tracking.lastTime;
7338 var deltaTime = now - lastTime;
7339 var deltaBytes = bytesUploaded - tracking.bytesUploaded;
7341 if (deltaBytes === 0 || deltaTime === 0) {
7346 tracking.lastTime = now;
7347 tracking.bytesUploaded = bytesUploaded;
7350 tracking.currentSpeed = (deltaBytes * 8 ) / (deltaTime / 1000);
7351 tracking.averageSpeed = (tracking.bytesUploaded * 8) / ((now - tracking.startTime) / 1000);
7354 tracking.movingAverageHistory.push(tracking.currentSpeed);
7355 if (tracking.movingAverageHistory.length >
this.settings.moving_average_history_size) {
7356 tracking.movingAverageHistory.shift();
7359 tracking.movingAverageSpeed = SWFUpload.speed.calculateMovingAverage(tracking.movingAverageHistory);
7362 tracking.timeRemaining = (file.size - tracking.bytesUploaded) * 8 / tracking.movingAverageSpeed;
7363 tracking.timeElapsed = (now - tracking.startTime) / 1000;
7366 tracking.percentUploaded = (tracking.bytesUploaded / file.size * 100);
7371 SWFUpload.speed.removeTracking =
function (file, trackingList) {
7373 trackingList[file.id] = null;
7374 delete trackingList[file.id];
7379 SWFUpload.speed.formatUnits =
function (baseNumber, unitDivisors, unitLabels, singleFractional) {
7380 var i, unit, unitDivisor, unitLabel;
7382 if (baseNumber === 0) {
7383 return "0 " + unitLabels[unitLabels.length - 1];
7386 if (singleFractional) {
7388 unitLabel = unitLabels.length >= unitDivisors.length ? unitLabels[unitDivisors.length - 1] :
"";
7389 for (i = 0; i < unitDivisors.length; i++) {
7390 if (baseNumber >= unitDivisors[i]) {
7391 unit = (baseNumber / unitDivisors[i]).toFixed(2);
7392 unitLabel = unitLabels.length >= i ?
" " + unitLabels[i] :
"";
7397 return unit + unitLabel;
7399 var formattedStrings = [];
7400 var remainder = baseNumber;
7402 for (i = 0; i < unitDivisors.length; i++) {
7403 unitDivisor = unitDivisors[i];
7404 unitLabel = unitLabels.length > i ?
" " + unitLabels[i] :
"";
7406 unit = remainder / unitDivisor;
7407 if (i < unitDivisors.length -1) {
7408 unit = Math.floor(unit);
7410 unit = unit.toFixed(2);
7413 remainder = remainder % unitDivisor;
7415 formattedStrings.push(unit + unitLabel);
7419 return formattedStrings.join(
" ");
7423 SWFUpload.speed.formatBPS =
function (baseNumber) {
7424 var bpsUnits = [1073741824, 1048576, 1024, 1], bpsUnitLabels = [
"Gbps",
"Mbps",
"Kbps",
"bps"];
7425 return SWFUpload.speed.formatUnits(baseNumber, bpsUnits, bpsUnitLabels,
true);
7428 SWFUpload.speed.formatTime =
function (baseNumber) {
7429 var timeUnits = [86400, 3600, 60, 1], timeUnitLabels = [
"d",
"h",
"m",
"s"];
7430 return SWFUpload.speed.formatUnits(baseNumber, timeUnits, timeUnitLabels,
false);
7433 SWFUpload.speed.formatBytes =
function (baseNumber) {
7434 var sizeUnits = [1073741824, 1048576, 1024, 1], sizeUnitLabels = [
"GB",
"MB",
"KB",
"bytes"];
7435 return SWFUpload.speed.formatUnits(baseNumber, sizeUnits, sizeUnitLabels,
true);
7438 SWFUpload.speed.formatPercent =
function (baseNumber) {
7439 return baseNumber.toFixed(2) +
" %";
7442 SWFUpload.speed.calculateMovingAverage =
function (history) {
7443 var vals = [], size, sum = 0.0, mean = 0.0, varianceTemp = 0.0, variance = 0.0, standardDev = 0.0;
7445 var mSum = 0, mCount = 0;
7447 size = history.length;
7452 for (i = 0; i < size; i++) {
7453 vals[i] = history[i];
7460 for (i = 0; i < size; i++) {
7461 varianceTemp += Math.pow((vals[i] - mean), 2);
7464 variance = varianceTemp / size;
7465 standardDev = Math.sqrt(variance);
7468 for (i = 0; i < size; i++) {
7469 vals[i] = (vals[i] - mean) / standardDev;
7473 var deviationRange = 2.0;
7474 for (i = 0; i < size; i++) {
7476 if (vals[i] <= deviationRange && vals[i] >= -deviationRange) {
7485 for (i = 0; i < size; i++) {
7490 return mSum / mCount;
7505 this.fileProgressID = file.id;
7511 this.fileProgressWrapper = document.getElementById(this.fileProgressID);
7512 if (!this.fileProgressWrapper) {
7513 this.fileProgressWrapper = document.createElement(
"div");
7514 this.fileProgressWrapper.className =
"progressWrapper";
7515 this.fileProgressWrapper.id = this.fileProgressID;
7517 this.fileProgressElement = document.createElement(
"div");
7518 this.fileProgressElement.className =
"progressContainer";
7520 var progressCancel = document.createElement(
"a");
7521 progressCancel.className =
"progressCancel";
7522 progressCancel.href =
"#";
7523 progressCancel.style.visibility =
"hidden";
7524 progressCancel.appendChild(document.createTextNode(
" "));
7526 var progressText = document.createElement(
"div");
7527 progressText.className =
"progressName";
7528 progressText.appendChild(document.createTextNode(file.name));
7530 var progressBar = document.createElement(
"div");
7531 progressBar.className =
"progressBarInProgress";
7533 var progressStatus = document.createElement(
"div");
7534 progressStatus.className =
"progressBarStatus";
7535 progressStatus.innerHTML =
" ";
7537 this.fileProgressElement.appendChild(progressCancel);
7538 this.fileProgressElement.appendChild(progressText);
7539 this.fileProgressElement.appendChild(progressStatus);
7540 this.fileProgressElement.appendChild(progressBar);
7542 this.fileProgressWrapper.appendChild(this.fileProgressElement);
7544 document.getElementById(targetID).appendChild(this.fileProgressWrapper);
7546 this.fileProgressElement = this.fileProgressWrapper.firstChild;
7550 this.height = this.fileProgressWrapper.offsetHeight;
7557 this.fileProgressElement[
"FP_TIMER"] = timer;
7560 return this.fileProgressElement[
"FP_TIMER"] || null;
7564 this.fileProgressElement.className =
"progressContainer";
7566 this.fileProgressElement.childNodes[2].innerHTML =
" ";
7567 this.fileProgressElement.childNodes[2].className =
"progressBarStatus";
7569 this.fileProgressElement.childNodes[3].className =
"progressBarInProgress";
7570 this.fileProgressElement.childNodes[3].style.width =
"0%";
7576 this.fileProgressElement.className =
"progressContainer green";
7577 this.fileProgressElement.childNodes[3].className =
"progressBarInProgress";
7578 this.fileProgressElement.childNodes[3].style.width = percentage +
"%";
7583 this.fileProgressElement.className =
"progressContainer blue";
7584 this.fileProgressElement.childNodes[3].className =
"progressBarComplete";
7585 this.fileProgressElement.childNodes[3].style.width =
"";
7588 this.
setTimer(setTimeout(
function () {
7593 this.fileProgressElement.className =
"progressContainer red";
7594 this.fileProgressElement.childNodes[3].className =
"progressBarError";
7595 this.fileProgressElement.childNodes[3].style.width =
"";
7598 this.
setTimer(setTimeout(
function () {
7603 this.fileProgressElement.className =
"progressContainer";
7604 this.fileProgressElement.childNodes[3].className =
"progressBarError";
7605 this.fileProgressElement.childNodes[3].style.width =
"";
7608 this.
setTimer(setTimeout(
function () {
7613 this.fileProgressElement.childNodes[2].innerHTML = status;
7618 this.fileProgressElement.childNodes[0].style.visibility = show ?
"visible" :
"hidden";
7619 if (swfUploadInstance) {
7620 var fileID = this.fileProgressID;
7621 this.fileProgressElement.childNodes[0].onclick =
function () {
7622 swfUploadInstance.cancelUpload(fileID);
7634 if (this.fileProgressWrapper.filters) {
7636 this.fileProgressWrapper.filters.item(
"DXImageTransform.Microsoft.Alpha").opacity = 100;
7639 this.fileProgressWrapper.style.filter =
"progid:DXImageTransform.Microsoft.Alpha(opacity=100)";
7642 this.fileProgressWrapper.style.opacity = 1;
7645 this.fileProgressWrapper.style.height =
"";
7647 this.height = this.fileProgressWrapper.offsetHeight;
7649 this.fileProgressWrapper.style.display =
"";
7656 var reduceOpacityBy = 15;
7657 var reduceHeightBy = 4;
7660 if (this.opacity > 0) {
7661 this.opacity -= reduceOpacityBy;
7662 if (this.opacity < 0) {
7666 if (this.fileProgressWrapper.filters) {
7668 this.fileProgressWrapper.filters.item(
"DXImageTransform.Microsoft.Alpha").opacity = this.opacity;
7671 this.fileProgressWrapper.style.filter =
"progid:DXImageTransform.Microsoft.Alpha(opacity=" + this.opacity +
")";
7674 this.fileProgressWrapper.style.opacity = this.opacity / 100;
7678 if (this.height > 0) {
7679 this.height -= reduceHeightBy;
7680 if (this.height < 0) {
7684 this.fileProgressWrapper.style.height = this.height +
"px";
7687 if (this.height > 0 || this.opacity > 0) {
7689 this.
setTimer(setTimeout(
function () {
7693 this.fileProgressWrapper.style.display =
"none";
7712 var progress =
new FileProgress(file, this.customSettings.progressTarget);
7713 progress.setStatus(
ultimix.get_string(
"pending" ) );
7714 progress.toggleCancel(
true,
this);
7724 if (errorCode === SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED) {
7725 alert(
"You have attempted to queue too many files.\n" + (message === 0 ?
"You have reached the upload limit." :
"You may select " + (message > 1 ?
"up to " + message +
" files." :
"one file.")));
7729 var progress =
new FileProgress(file, this.customSettings.progressTarget);
7730 progress.setError();
7731 progress.toggleCancel(
false);
7733 switch (errorCode) {
7734 case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
7735 progress.setStatus(
ultimix.get_string(
"file_is_too_big" ));
7736 this.
debug(
"Error Code: File too big, File name: " + file.name +
", File size: " + file.size +
", Message: " + message);
7738 case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:
7739 progress.setStatus(
ultimix.get_string(
"cannot_upload_zero_bytes" ) );
7740 this.
debug(
"Error Code: Zero byte file, File name: " + file.name +
", File size: " + file.size +
", Message: " + message);
7742 case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:
7743 progress.setStatus(
ultimix.get_string(
"invalid_file_type" ) );
7744 this.
debug(
"Error Code: Invalid File Type, File name: " + file.name +
", File size: " + file.size +
", Message: " + message);
7747 if (file !== null) {
7748 progress.setStatus(
ultimix.get_string(
"unhandled_error" ) );
7750 this.
debug(
"Error Code: " + errorCode +
", File name: " + file.name +
", File size: " + file.size +
", Message: " + message);
7760 if (numFilesSelected > 0) {
7761 document.getElementById(this.customSettings.cancelButtonId).disabled =
false;
7778 var progress =
new FileProgress(file, this.customSettings.progressTarget);
7779 progress.setStatus(
ultimix.get_string(
'uploading' ) );
7780 progress.toggleCancel(
true,
this);
7789 var percent = Math.ceil((bytesLoaded / bytesTotal) * 100);
7791 var progress =
new FileProgress(file, this.customSettings.progressTarget);
7792 progress.setProgress(percent);
7793 progress.setStatus(
ultimix.get_string(
'uploading' ) );
7801 var progress =
new FileProgress(file, this.customSettings.progressTarget);
7802 progress.setComplete();
7803 progress.setStatus(
ultimix.get_string(
'complete' ) );
7804 progress.toggleCancel(
false);
7813 var progress =
new FileProgress(file, this.customSettings.progressTarget);
7814 progress.setError();
7815 progress.toggleCancel(
false);
7817 switch (errorCode) {
7818 case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:
7819 progress.setStatus(
ultimix.get_string(
"upload_error" ) + message );
7820 this.
debug(
"Error Code: HTTP Error, File name: " + file.name +
", Message: " + message);
7822 case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:
7823 progress.setStatus(
ultimix.get_string(
"upload_failed" ) );
7824 this.
debug(
"Error Code: Upload Failed, File name: " + file.name +
", File size: " + file.size +
", Message: " + message);
7826 case SWFUpload.UPLOAD_ERROR.IO_ERROR:
7827 progress.setStatus(
ultimix.get_string(
"server_io_error" ) ) ;
7828 this.
debug(
"Error Code: IO Error, File name: " + file.name +
", Message: " + message);
7830 case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:
7831 progress.setStatus(
ultimix.get_string(
"security_error" ) );
7832 this.
debug(
"Error Code: Security Error, File name: " + file.name +
", Message: " + message);
7834 case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:
7835 progress.setStatus(
ultimix.get_string(
"upload_limit" ) );
7836 this.
debug(
"Error Code: Upload Limit Exceeded, File name: " + file.name +
", File size: " + file.size +
", Message: " + message);
7838 case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:
7839 progress.setStatus(
ultimix.get_string(
"failed_validation" ) );
7840 this.
debug(
"Error Code: File Validation Failed, File name: " + file.name +
", File size: " + file.size +
", Message: " + message);
7842 case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:
7844 if (this.
getStats().files_queued === 0) {
7845 document.getElementById(this.customSettings.cancelButtonId).disabled =
true;
7847 progress.setStatus(
ultimix.get_string(
"cancelled" ) );
7848 progress.setCancelled();
7850 case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:
7851 progress.setStatus(
ultimix.get_string(
"stopped" ) );
7854 progress.setStatus(
ultimix.get_string(
"unhandled_error" ) +
": " + errorCode);
7855 this.
debug(
"Error Code: " + errorCode +
", File name: " + file.name +
", File size: " + file.size +
", Message: " + message);
7864 if (this.
getStats().files_queued === 0) {
7865 document.getElementById(this.customSettings.cancelButtonId).disabled =
true;
7871 var status = document.getElementById(
"divStatus");
7872 status.innerHTML = numFilesUploaded +
" file" + (numFilesUploaded === 1 ?
"" :
"s") +
" uploaded.";
7904 ultimix.file_input.SetSingleUploadedFileInfo =
function( ServerDataObject , ControlSettings )
7906 jQuery(
'#' + ControlSettings.statusAcceptor ).html(
7907 ServerDataObject.original_file_name
7910 jQuery(
'#' + ControlSettings.dataAcceptor ).html(
7911 "<input type=\"hidden\" name=\"" + ControlSettings.name +
"\" value=\"" + ServerDataObject.id +
"\">" +
7912 "<input type=\"hidden\" name=\"visible_" + ControlSettings.name +
"\" value=\"" +
7913 ServerDataObject.original_file_name+
"\">"
7928 ultimix_file_input_view_AfterImageUploadProcessor =
function( File , ServerData , ReceivedResponse )
7932 var Progress =
new FileProgress( File , this.customSettings.progressTarget );
7933 Progress.setComplete();
7934 Progress.setStatus(
ultimix.get_string(
'complete' ) );
7935 Progress.toggleCancel(
false );
7937 var ServerDataObject = {};
7938 eval(
"ServerDataObject=" + ServerData );
7940 ultimix.file_input.SetSingleUploadedFileInfo( ServerDataObject , this.customSettings );
7948 ultimix.lang.Strings[
ultimix.lang.Locale ][
'pending' ][
'default' ] =
'Отправка...';
7949 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'file_is_too_big' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'file_is_too_big' ] = {};
7950 ultimix.lang.Strings[
ultimix.lang.Locale ][
'file_is_too_big' ][
'default' ] =
'Файл слишком большой.';
7951 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'cannot_upload_zero_bytes' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'cannot_upload_zero_bytes' ] = {};
7952 ultimix.lang.Strings[
ultimix.lang.Locale ][
'cannot_upload_zero_bytes' ][
'default' ] =
'Невозможно отправить файл нулевого размера.';
7953 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'invalid_file_type' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'invalid_file_type' ] = {};
7954 ultimix.lang.Strings[
ultimix.lang.Locale ][
'invalid_file_type' ][
'default' ] =
'Некорректный тип файла.';
7955 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'unhandled_error' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'unhandled_error' ] = {};
7956 ultimix.lang.Strings[
ultimix.lang.Locale ][
'unhandled_error' ][
'default' ] =
'Неизвестная ошибка';
7957 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'upload_error' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'upload_error' ] = {};
7958 ultimix.lang.Strings[
ultimix.lang.Locale ][
'upload_error' ][
'default' ] =
'Ошибка загрузки: ';
7959 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'upload_failed' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'upload_failed' ] = {};
7960 ultimix.lang.Strings[
ultimix.lang.Locale ][
'upload_failed' ][
'default' ] =
'Загрузка сорвана';
7961 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'server_io_error' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'server_io_error' ] = {};
7962 ultimix.lang.Strings[
ultimix.lang.Locale ][
'server_io_error' ][
'default' ] =
'Ошибка сервера';
7963 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'security_error' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'security_error' ] = {};
7964 ultimix.lang.Strings[
ultimix.lang.Locale ][
'security_error' ][
'default' ] =
'Ошибка безопасности';
7965 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'upload_limit' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'upload_limit' ] = {};
7966 ultimix.lang.Strings[
ultimix.lang.Locale ][
'upload_limit' ][
'default' ] =
'Предел загрузки исчерпан';
7967 if( !
ultimix.lang.Strings[
ultimix.lang.Locale ][
'failed_validation' ] )
ultimix.lang.Strings[
ultimix.lang.Locale ][
'failed_validation' ] = {};
7968 ultimix.lang.Strings[
ultimix.lang.Locale ][
'failed_validation' ][
'default' ] =
'Проверка не пройдена. Загрузка пропущена.';
7970 ultimix.lang.Strings[
ultimix.lang.Locale ][
'cancelled' ][
'default' ] =
'Отменена';
7972 ultimix.lang.Strings[
ultimix.lang.Locale ][
'stopped' ][
'default' ] =
'Остановлена';
7974 ultimix.lang.Strings[
ultimix.lang.Locale ][
'uploading' ][
'default' ] =
'Загрузка...';
7976 ultimix.lang.Strings[
ultimix.lang.Locale ][
'complete' ][
'default' ] =
'Завершено';
7999 var is_ie6 =
false, is_ie7 =
false, is_ff2 =
false;
8010 get_css :
function(rule_name, delete_flag, sheet) {
8011 rule_name = rule_name.toLowerCase();
8012 var css_rules = sheet.cssRules || sheet.rules,
8015 if(css_rules.length && j > css_rules.length + 5) {
return false; }
8016 if(css_rules[j].selectorText && css_rules[j].selectorText.toLowerCase() == rule_name) {
8017 if(delete_flag ===
true) {
8018 if(sheet.removeRule) { sheet.removeRule(j); }
8019 if(sheet.deleteRule) { sheet.deleteRule(j); }
8022 else {
return css_rules[j]; }
8025 while (css_rules[++j]);
8028 add_css :
function(rule_name, sheet) {
8029 if($.jstree.css.get_css(rule_name,
false, sheet)) {
return false; }
8030 if(sheet.insertRule) { sheet.insertRule(rule_name +
' { }', 0); }
else { sheet.addRule(rule_name, null, 0); }
8031 return $.vakata.css.get_css(rule_name);
8033 remove_css :
function(rule_name, sheet) {
8034 return $.vakata.css.get_css(rule_name,
true, sheet);
8036 add_sheet :
function(opts) {
8037 var tmp =
false, is_new =
true;
8039 if(opts.title) { tmp = $(
"style[id='" + opts.title +
"-stylesheet']")[0]; }
8040 if(tmp) { is_new =
false; }
8042 tmp = document.createElement(
"style");
8043 tmp.setAttribute(
'type',
"text/css");
8044 if(opts.title) { tmp.setAttribute(
"id", opts.title +
"-stylesheet"); }
8046 if(tmp.styleSheet) {
8048 document.getElementsByTagName(
"head")[0].appendChild(tmp);
8049 tmp.styleSheet.cssText = opts.str;
8052 tmp.styleSheet.cssText = tmp.styleSheet.cssText +
" " + opts.str;
8056 tmp.appendChild(document.createTextNode(opts.str));
8057 document.getElementsByTagName(
"head")[0].appendChild(tmp);
8059 return tmp.sheet || tmp.styleSheet;
8062 if(document.createStyleSheet) {
8063 try { tmp = document.createStyleSheet(opts.url); }
catch (e) { }
8066 tmp = document.createElement(
'link');
8067 tmp.rel =
'stylesheet';
8068 tmp.type =
'text/css';
8070 tmp.href = opts.url;
8071 document.getElementsByTagName(
"head")[0].appendChild(tmp);
8072 return tmp.styleSheet;
8080 focused_instance = -1,
8085 $.fn.jstree =
function (settings) {
8086 var isMethodCall = (typeof settings ==
'string'),
8087 args = Array.prototype.slice.call(arguments, 1),
8092 if(settings.substring(0, 1) ==
'_') {
return returnValue; }
8093 this.each(
function() {
8094 var instance = instances[$.data(
this,
"jstree_instance_id")],
8095 methodValue = (instance && $.isFunction(instance[settings])) ? instance[settings].apply(instance, args) : instance;
8096 if(typeof methodValue !==
"undefined" && (settings.indexOf(
"is_") === 0 || (methodValue !==
true && methodValue !==
false))) { returnValue = methodValue;
return false; }
8100 this.each(
function() {
8102 var instance_id = $.data(
this,
"jstree_instance_id"),
8104 b = settings ? $.extend({},
true, settings) : {},
8109 if(c.data(
"jstree")) { a.push(c.data(
"jstree")); }
8110 b = a.length ? $.extend.apply(null, [
true, b].concat(a)) :
b;
8113 if(typeof instance_id !==
"undefined" && instances[instance_id]) { instances[instance_id].destroy(); }
8115 instance_id = parseInt(instances.push({}),10) - 1;
8117 $.data(
this,
"jstree_instance_id", instance_id);
8119 b.plugins = $.isArray(b.plugins) ? b.plugins : $.jstree.defaults.plugins.slice();
8120 b.plugins.unshift(
"core");
8122 b.plugins = b.plugins.sort().join(
",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,
"$1$2$4").replace(/,,+/g,
",").replace(/,$/,
"").split(
",");
8125 s = $.extend(
true, {}, $.jstree.defaults,
b);
8126 s.plugins = b.plugins;
8127 $.each(plugins,
function (i, val) {
8128 if($.inArray(i, s.plugins) === -1) { s[i] = null;
delete s[i]; }
8134 instances[instance_id] =
new $.jstree._instance(instance_id, $(
this).addClass(
"jstree jstree-" + instance_id), s);
8136 $.each(instances[instance_id]._get_settings().plugins,
function (i, val) { instances[instance_id].data[val] = {}; });
8137 $.each(instances[instance_id]._get_settings().plugins,
function (i, val) {
if(plugins[val]) { plugins[val].__init.apply(instances[instance_id]); } });
8139 setTimeout(
function() {
if(instances[instance_id]) { instances[instance_id].init(); } }, 0);
8150 _focused :
function () {
return instances[focused_instance] || null; },
8151 _reference :
function (needle) {
8156 if(!o.length && typeof needle ===
"string") { o = $(
"#" + needle); }
8157 if(!o.length) {
return null; }
8158 return instances[o.closest(
".jstree").data(
"jstree_instance_id")] || null;
8160 _instance :
function (index, container, settings) {
8162 this.data = { core : {} };
8163 this.get_settings =
function () {
return $.extend(
true, {}, settings); };
8164 this._get_settings =
function () {
return settings; };
8165 this.get_index =
function () {
return index; };
8166 this.get_container =
function () {
return container; };
8167 this.get_container_ul =
function () {
return container.children(
"ul:eq(0)"); };
8168 this._set_settings =
function (s) {
8169 settings = $.extend(
true, {}, settings, s);
8173 plugin :
function (pname, pdata) {
8174 pdata = $.extend({}, {
8180 plugins[pname] = pdata;
8182 $.jstree.defaults[pname] = pdata.defaults;
8183 $.each(pdata._fn, function (i, val) {
8185 val.old = $.jstree._fn[i];
8186 $.jstree._fn[i] =
function () {
8189 args = Array.prototype.slice.call(arguments),
8190 evnt =
new $.Event(
"before.jstree"),
8193 if(this.data.core.locked ===
true && i !==
"unlock" && i !==
"is_locked") {
return; }
8197 if(func && func.plugin && $.inArray(func.plugin,
this._get_settings().plugins) !== -1) {
break; }
8200 if(!func) {
return; }
8203 if(i.indexOf(
"_") === 0) {
8204 rslt = func.apply(
this, args);
8207 rslt = this.get_container().triggerHandler(evnt, {
"func" : i,
"inst" :
this,
"args" : args,
"plugin" : func.plugin });
8208 if(rslt ===
false) {
return; }
8209 if(typeof rslt !==
"undefined") { args = rslt; }
8213 __callback :
function (data) {
8214 this.get_container().triggerHandler( i +
'.jstree', {
"inst" :
this,
"args" : args,
"rslt" : data,
"rlbk" : rlbk });
8216 __rollback :
function () {
8217 rlbk = this.get_rollback();
8220 __call_old :
function (replace_arguments) {
8221 return func.old.apply(
this, (replace_arguments ? Array.prototype.slice.call(arguments, 1) : args ) );
8229 $.jstree._fn[i].old = val.old;
8230 $.jstree._fn[i].plugin = pname;
8233 rollback :
function (rb) {
8235 if(!$.isArray(rb)) { rb = [ rb ]; }
8236 $.each(rb,
function (i, val) {
8237 instances[val.i].set_rollback(val.h, val.d);
8243 $.jstree._fn = $.jstree._instance.prototype = {};
8248 var u = navigator.userAgent.toLowerCase(),
8249 v = (u.match( /.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,
'0'])[1],
8251 '.jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } ' +
8252 '.jstree li { display:block; min-height:18px; line-height:18px; white-space:nowrap; margin-left:18px; min-width:18px; } ' +
8253 '.jstree-rtl li { margin-left:0; margin-right:18px; } ' +
8254 '.jstree > ul > li { margin-left:0px; } ' +
8255 '.jstree-rtl > ul > li { margin-right:0px; } ' +
8256 '.jstree ins { display:inline-block; text-decoration:none; width:18px; height:18px; margin:0 0 0 0; padding:0; } ' +
8257 '.jstree a { display:inline-block; line-height:16px; height:16px; color:black; white-space:nowrap; text-decoration:none; padding:1px 2px; margin:0; } ' +
8258 '.jstree a:focus { outline: none; } ' +
8259 '.jstree a > ins { height:16px; width:16px; } ' +
8260 '.jstree a > .jstree-icon { margin-right:3px; } ' +
8261 '.jstree-rtl a > .jstree-icon { margin-left:3px; margin-right:0; } ' +
8262 'li.jstree-open > ul { display:block; } ' +
8263 'li.jstree-closed > ul { display:none; } ';
8265 if(/msie/.test(u) && parseInt(v, 10) == 6) {
8270 document.execCommand(
"BackgroundImageCache",
false,
true);
8274 '.jstree li { height:18px; margin-left:0; margin-right:0; } ' +
8275 '.jstree li li { margin-left:18px; } ' +
8276 '.jstree-rtl li li { margin-left:0px; margin-right:18px; } ' +
8277 'li.jstree-open ul { display:block; } ' +
8278 'li.jstree-closed ul { display:none !important; } ' +
8279 '.jstree li a { display:inline; border-width:0 !important; padding:0px 2px !important; } ' +
8280 '.jstree li a ins { height:16px; width:16px; margin-right:3px; } ' +
8281 '.jstree-rtl li a ins { margin-right:0px; margin-left:3px; } ';
8284 if(/msie/.test(u) && parseInt(v, 10) == 7) {
8286 css_string +=
'.jstree li a { border-width:0 !important; padding:0px 2px !important; } ';
8289 if(!/compatible/.test(u) && /mozilla/.test(u) && parseFloat(v, 10) < 1.9) {
8292 '.jstree ins { display:-moz-inline-box; } ' +
8293 '.jstree li { line-height:12px; } ' +
8294 '.jstree a { display:-moz-inline-box; } ' +
8295 '.jstree .jstree-no-icons .jstree-checkbox { display:-moz-inline-stack !important; } ';
8299 $.vakata.css.add_sheet({ str : css_string, title :
"jstree" });
8303 $.jstree.plugin(
"core", {
8304 __init :
function () {
8305 this.data.core.locked =
false;
8306 this.data.core.to_open = this.get_settings().core.initially_open;
8307 this.data.core.to_load = this.get_settings().core.initially_load;
8310 html_titles :
false,
8312 initially_open : [],
8313 initially_load : [],
8314 open_parents :
true,
8315 notify_plugins :
true,
8319 loading :
"Loading ...",
8320 new_node :
"New node",
8321 multiple_selection :
"Multiple selection"
8325 init :
function () {
8327 if(this._get_settings().core.rtl) {
8328 this.get_container().addClass(
"jstree-rtl").css(
"direction",
"rtl");
8330 this.get_container().html(
"<ul><li class='jstree-last jstree-leaf'><ins> </ins><a class='jstree-loading' href='#'><ins class='jstree-icon'> </ins>" + this._get_string(
"loading") +
"</a></li></ul>");
8331 this.data.core.li_height = this.get_container_ul().find(
"li.jstree-closed, li.jstree-leaf").eq(0).height() || 18;
8333 this.get_container()
8334 .delegate(
"li > ins",
"click.jstree", $.proxy(
function (event) {
8335 var trgt = $(
event.target);
8337 this.toggle_node(trgt);
8339 .bind(
"mousedown.jstree", $.proxy(
function () {
8342 .bind(
"dblclick.jstree",
function (event) {
8344 if(document.selection && document.selection.empty) { document.selection.empty(); }
8346 if(window.getSelection) {
8347 sel = window.getSelection();
8349 sel.removeAllRanges();
8355 if(this._get_settings().core.notify_plugins) {
8356 this.get_container()
8357 .bind(
"load_node.jstree", $.proxy(
function (e, data) {
8358 var o = this._get_node(data.rslt.obj),
8360 if(o === -1) { o = this.get_container_ul(); }
8361 if(!o.length) {
return; }
8362 o.find(
"li").each(
function () {
8364 if(th.data(
"jstree")) {
8365 $.each(th.data(
"jstree"),
function (plugin, values) {
8366 if(t.data[plugin] && $.isFunction(t[
"_" + plugin +
"_notify"])) {
8367 t[
"_" + plugin +
"_notify"].call(t, th, values);
8374 if(this._get_settings().core.load_open) {
8375 this.get_container()
8376 .bind(
"load_node.jstree", $.proxy(
function (e, data) {
8377 var o = this._get_node(data.rslt.obj),
8379 if(o === -1) { o = this.get_container_ul(); }
8380 if(!o.length) {
return; }
8381 o.find(
"li.jstree-open:not(:has(ul))").each(
function () {
8382 t.load_node(
this, $.noop, $.noop);
8387 this.load_node(-1,
function () { this.loaded(); this.reload_nodes(); });
8391 n = this.get_index(),
8392 s = this._get_settings(),
8395 $.each(s.plugins, function (i, val) {
8396 try { plugins[val].__destroy.apply(_this); }
catch(err) { }
8400 if(this.is_focused()) {
8402 if(instances.hasOwnProperty(i) && i != n) {
8403 instances[i].set_focus();
8409 if(n === focused_instance) { focused_instance = -1; }
8411 this.get_container()
8413 .undelegate(
".jstree")
8414 .removeData(
"jstree_instance_id")
8415 .find(
"[class^='jstree']")
8417 .attr(
"class",
function () {
return this.className.replace(/jstree[^ ]*|$/ig,
''); });
8419 .unbind(
".jstree-" + n)
8420 .undelegate(
".jstree-" + n);
8422 instances[n] = null;
8423 delete instances[n];
8426 _core_notify :
function (n, data) {
8428 this.open_node(n,
false,
true);
8432 lock :
function () {
8433 this.data.core.locked =
true;
8434 this.get_container().children(
"ul").addClass(
"jstree-locked").css(
"opacity",
"0.7");
8435 this.__callback({});
8437 unlock :
function () {
8438 this.data.core.locked =
false;
8439 this.get_container().children(
"ul").removeClass(
"jstree-locked").css(
"opacity",
"1");
8440 this.__callback({});
8442 is_locked :
function () {
return this.data.core.locked; },
8443 save_opened :
function () {
8445 this.data.core.to_open = [];
8446 this.get_container_ul().find(
"li.jstree-open").each(
function () {
8447 if(this.
id) { _this.data.core.to_open.push(
"#" + this.
id.toString().replace(/^#/,
"").replace(/\\\
8449 this.__callback(_this.data.core.to_open);
8451 save_loaded :
function () { },
8452 reload_nodes :
function (is_callback) {
8458 this.data.core.reopen =
false;
8459 this.data.core.refreshing =
true;
8460 this.data.core.to_open = $.map($.makeArray(this.data.core.to_open), function (n) {
return "#" + n.toString().replace(/^#/,
"").replace(/\\\
8461 this.data.core.to_load = $.map($.makeArray(
this.data.core.to_load),
function (n) {
return "#" + n.toString().replace(/^#/,
"").replace(/\\\
8462 if(this.data.core.to_open.length) {
8463 this.data.core.to_load =
this.data.core.to_load.concat(
this.data.core.to_open);
8466 if(this.data.core.to_load.length) {
8467 $.each(this.data.core.to_load, function (i, val) {
8468 if(val ==
"#") {
return true; }
8469 if($(val).length) { current.push(val); }
8470 else { remaining.push(val); }
8472 if(current.length) {
8473 this.data.core.to_load = remaining;
8474 $.each(current,
function (i, val) {
8475 if(!_this._is_loaded(val)) {
8476 _this.load_node(val,
function () { _this.reload_nodes(
true); },
function () { _this.reload_nodes(
true); });
8482 if(this.data.core.to_open.length) {
8483 $.each(this.data.core.to_open, function (i, val) {
8484 _this.open_node(val,
false,
true);
8489 if(this.data.core.reopen) { clearTimeout(this.data.core.reopen); }
8490 this.data.core.reopen = setTimeout(
function () { _this.__callback({}, _this); }, 50);
8491 this.data.core.refreshing =
false;
8495 reopen :
function () {
8497 if(this.data.core.to_open.length) {
8498 $.each(this.data.core.to_open, function (i, val) {
8499 _this.open_node(val,
false,
true);
8502 this.__callback({});
8504 refresh :
function (obj) {
8507 if(!obj) { obj = -1; }
8508 obj = this._get_node(obj);
8509 if(!obj) { obj = -1; }
8510 if(obj !== -1) { obj.children(
"UL").remove(); }
8511 else { this.get_container_ul().empty(); }
8512 this.load_node(obj,
function () { _this.__callback({
"obj" : obj}); _this.reload_nodes(); });
8515 loaded :
function () {
8519 set_focus :
function () {
8520 if(this.is_focused()) {
return; }
8521 var f = $.jstree._focused();
8522 if(f) { f.unset_focus(); }
8524 this.get_container().addClass(
"jstree-focused");
8525 focused_instance = this.get_index();
8528 is_focused :
function () {
8529 return focused_instance == this.get_index();
8531 unset_focus :
function () {
8532 if(this.is_focused()) {
8533 this.get_container().removeClass(
"jstree-focused");
8534 focused_instance = -1;
8540 _get_node :
function (obj) {
8541 var $obj = $(obj, this.get_container());
8542 if($obj.is(
".jstree") || obj == -1) {
return -1; }
8543 $obj = $obj.closest(
"li", this.get_container());
8544 return $obj.length ? $obj :
false;
8546 _get_next :
function (obj,
strict) {
8547 obj = this._get_node(obj);
8548 if(obj === -1) {
return this.get_container().find(
"> ul > li:first-child"); }
8549 if(!obj.length) {
return false; }
8550 if(
strict) {
return (obj.nextAll(
"li").size() > 0) ? obj.nextAll(
"li:eq(0)") :
false; }
8552 if(obj.hasClass(
"jstree-open")) {
return obj.find(
"li:eq(0)"); }
8553 else if(obj.nextAll(
"li").size() > 0) {
return obj.nextAll(
"li:eq(0)"); }
8554 else {
return obj.parentsUntil(
".jstree",
"li").next(
"li").eq(0); }
8556 _get_prev :
function (obj,
strict) {
8557 obj = this._get_node(obj);
8558 if(obj === -1) {
return this.get_container().find(
"> ul > li:last-child"); }
8559 if(!obj.length) {
return false; }
8560 if(
strict) {
return (obj.prevAll(
"li").length > 0) ? obj.prevAll(
"li:eq(0)") :
false; }
8562 if(obj.prev(
"li").length) {
8563 obj = obj.prev(
"li").eq(0);
8564 while(obj.hasClass(
"jstree-open")) { obj = obj.children(
"ul:eq(0)").children(
"li:last"); }
8567 else { var o = obj.parentsUntil(
".jstree",
"li:eq(0)");
return o.length ? o :
false; }
8569 _get_parent :
function (obj) {
8570 obj = this._get_node(obj);
8571 if(obj == -1 || !obj.length) {
return false; }
8572 var o = obj.parentsUntil(
".jstree",
"li:eq(0)");
8573 return o.length ? o : -1;
8575 _get_children :
function (obj) {
8576 obj = this._get_node(obj);
8577 if(obj === -1) {
return this.get_container().children(
"ul:eq(0)").children(
"li"); }
8578 if(!obj.length) {
return false; }
8579 return obj.children(
"ul:eq(0)").children(
"li");
8581 get_path :
function (obj, id_mode) {
8584 obj = this._get_node(obj);
8585 if(obj === -1 || !obj || !obj.length) {
return false; }
8586 obj.parentsUntil(
".jstree",
"li").each(
function () {
8587 p.push( id_mode ? this.
id : _this.get_text(
this) );
8590 p.push( id_mode ? obj.attr(
"id") : this.get_text(obj) );
8595 _get_string :
function (key) {
8596 return this._get_settings().core.strings[key] || key;
8599 is_open :
function (obj) { obj = this._get_node(obj);
return obj && obj !== -1 && obj.hasClass(
"jstree-open"); },
8600 is_closed :
function (obj) { obj = this._get_node(obj);
return obj && obj !== -1 && obj.hasClass(
"jstree-closed"); },
8601 is_leaf :
function (obj) { obj = this._get_node(obj);
return obj && obj !== -1 && obj.hasClass(
"jstree-leaf"); },
8602 correct_state :
function (obj) {
8603 obj = this._get_node(obj);
8604 if(!obj || obj === -1) {
return false; }
8605 obj.removeClass(
"jstree-closed jstree-open").addClass(
"jstree-leaf").children(
"ul").remove();
8606 this.__callback({
"obj" : obj });
8609 open_node :
function (obj, callback, skip_animation) {
8610 obj = this._get_node(obj);
8611 if(!obj.length) {
return false; }
8612 if(!obj.hasClass(
"jstree-closed")) {
if(callback) { callback.call(); }
return false; }
8613 var s = skip_animation || is_ie6 ? 0 : this._get_settings().core.animation,
8615 if(!this._is_loaded(obj)) {
8616 obj.children(
"a").addClass(
"jstree-loading");
8617 this.load_node(obj,
function () { t.open_node(obj, callback, skip_animation); }, callback);
8620 if(this._get_settings().core.open_parents) {
8621 obj.parentsUntil(
".jstree",
".jstree-closed").each(
function () {
8622 t.open_node(
this,
false,
true);
8625 if(s) { obj.children(
"ul").css(
"display",
"none"); }
8626 obj.removeClass(
"jstree-closed").addClass(
"jstree-open").children(
"a").removeClass(
"jstree-loading");
8627 if(s) { obj.children(
"ul").stop(
true,
true).slideDown(s,
function () { this.style.display =
""; t.after_open(obj); }); }
8628 else { t.after_open(obj); }
8629 this.__callback({
"obj" : obj });
8630 if(callback) { callback.call(); }
8633 after_open :
function (obj) { this.__callback({
"obj" : obj }); },
8634 close_node :
function (obj, skip_animation) {
8635 obj = this._get_node(obj);
8636 var s = skip_animation || is_ie6 ? 0 : this._get_settings().core.animation,
8638 if(!obj.length || !obj.hasClass(
"jstree-open")) {
return false; }
8639 if(s) { obj.children(
"ul").attr(
"style",
"display:block !important"); }
8640 obj.removeClass(
"jstree-open").addClass(
"jstree-closed");
8641 if(s) { obj.children(
"ul").stop(
true,
true).slideUp(s,
function () { this.style.display =
""; t.after_close(obj); }); }
8642 else { t.after_close(obj); }
8643 this.__callback({
"obj" : obj });
8645 after_close :
function (obj) { this.__callback({
"obj" : obj }); },
8646 toggle_node :
function (obj) {
8647 obj = this._get_node(obj);
8648 if(obj.hasClass(
"jstree-closed")) {
return this.open_node(obj); }
8649 if(obj.hasClass(
"jstree-open")) {
return this.close_node(obj); }
8651 open_all :
function (obj, do_animation, original_obj) {
8652 obj = obj ? this._get_node(obj) : -1;
8653 if(!obj || obj === -1) { obj = this.get_container_ul(); }
8655 obj = obj.find(
"li.jstree-closed");
8659 if(obj.is(
".jstree-closed")) { obj = obj.find(
"li.jstree-closed").andSelf(); }
8660 else { obj = obj.find(
"li.jstree-closed"); }
8663 obj.each(
function () {
8665 if(!_this._is_loaded(
this)) { _this.open_node(
this,
function() { _this.open_all(__this, do_animation, original_obj); }, !do_animation); }
8666 else { _this.open_node(
this,
false, !do_animation); }
8669 if(original_obj.find(
'li.jstree-closed').length === 0) { this.__callback({
"obj" : original_obj }); }
8671 close_all :
function (obj, do_animation) {
8673 obj = obj ? this._get_node(obj) : this.get_container();
8674 if(!obj || obj === -1) { obj = this.get_container_ul(); }
8675 obj.find(
"li.jstree-open").andSelf().each(
function () { _this.close_node(
this, !do_animation); });
8676 this.__callback({
"obj" : obj });
8678 clean_node :
function (obj) {
8679 obj = obj && obj != -1 ? $(obj) : this.get_container_ul();
8680 obj = obj.is(
"li") ? obj.find(
"li").andSelf() : obj.find(
"li");
8681 obj.removeClass(
"jstree-last")
8682 .filter(
"li:last-child").addClass(
"jstree-last").end()
8684 .not(
".jstree-open").removeClass(
"jstree-leaf").addClass(
"jstree-closed");
8685 obj.not(
".jstree-open, .jstree-closed").addClass(
"jstree-leaf").children(
"ul").remove();
8686 this.__callback({
"obj" : obj });
8689 get_rollback :
function () {
8691 return { i : this.get_index(), h : this.get_container().children(
"ul").clone(
true), d : this.data };
8693 set_rollback :
function (html, data) {
8694 this.get_container().empty().append(html);
8699 load_node :
function (obj, s_call, e_call) { this.__callback({
"obj" : obj }); },
8700 _is_loaded :
function (obj) {
return true; },
8703 create_node :
function (obj, position, js, callback, is_loaded) {
8704 obj = this._get_node(obj);
8705 position = typeof position ===
"undefined" ?
"last" : position;
8706 var d = $(
"<li />"),
8707 s = this._get_settings().core,
8710 if(obj !== -1 && !obj.length) {
return false; }
8711 if(!is_loaded && !this._is_loaded(obj)) { this.load_node(obj,
function () { this.create_node(obj, position, js, callback,
true); });
return false; }
8715 if(typeof js ===
"string") { js = {
"data" : js }; }
8716 if(!js) { js = {}; }
8717 if(js.attr) { d.attr(js.attr); }
8718 if(js.metadata) { d.data(js.metadata); }
8719 if(js.state) { d.addClass(
"jstree-" + js.state); }
8720 if(!js.data) { js.data = this._get_string(
"new_node"); }
8721 if(!$.isArray(js.data)) { tmp = js.data; js.data = []; js.data.push(tmp); }
8722 $.each(js.data, function (i, m) {
8724 if($.isFunction(m)) { m = m.call(
this, js); }
8725 if(typeof m ==
"string") { tmp.attr(
'href',
'#')[ s.html_titles ?
"html" :
"text" ](m); }
8727 if(!m.attr) { m.attr = {}; }
8728 if(!m.attr.href) { m.attr.href =
'#'; }
8729 tmp.attr(m.attr)[ s.html_titles ?
"html" :
"text" ](m.title);
8730 if(m.language) { tmp.addClass(m.language); }
8732 tmp.prepend(
"<ins class='jstree-icon'> </ins>");
8733 if(!m.icon && js.icon) { m.icon = js.icon; }
8735 if(m.icon.indexOf(
"/") === -1) { tmp.children(
"ins").addClass(m.icon); }
8736 else { tmp.children(
"ins").css(
"background",
"url('" + m.icon +
"') center center no-repeat"); }
8740 d.prepend(
"<ins class='jstree-icon'> </ins>");
8742 obj = this.get_container();
8743 if(position ===
"before") { position =
"first"; }
8744 if(position ===
"after") { position =
"last"; }
8747 case "before": obj.before(d); tmp = this._get_parent(obj);
break;
8748 case "after" : obj.after(d); tmp = this._get_parent(obj);
break;
8751 if(!obj.children(
"ul").length) { obj.append(
"<ul />"); }
8752 obj.children(
"ul").prepend(d);
8756 if(!obj.children(
"ul").length) { obj.append(
"<ul />"); }
8757 obj.children(
"ul").append(d);
8761 if(!obj.children(
"ul").length) { obj.append(
"<ul />"); }
8762 if(!position) { position = 0; }
8763 tmp = obj.children(
"ul").children(
"li").eq(position);
8764 if(tmp.length) { tmp.before(d); }
8765 else { obj.children(
"ul").append(d); }
8769 if(tmp === -1 || tmp.get(0) === this.get_container().get(0)) { tmp = -1; }
8770 this.clean_node(tmp);
8771 this.__callback({
"obj" : d,
"parent" : tmp });
8772 if(callback) { callback.call(
this, d); }
8776 get_text :
function (obj) {
8777 obj = this._get_node(obj);
8778 if(!obj.length) {
return false; }
8779 var s = this._get_settings().core.html_titles;
8780 obj = obj.children(
"a:eq(0)");
8783 obj.children(
"INS").remove();
8787 obj = obj.contents().filter(
function() {
return this.nodeType == 3; })[0];
8788 return obj.nodeValue;
8791 set_text :
function (obj, val) {
8792 obj = this._get_node(obj);
8793 if(!obj.length) {
return false; }
8794 obj = obj.children(
"a:eq(0)");
8795 if(this._get_settings().core.html_titles) {
8796 var tmp = obj.children(
"INS").clone();
8797 obj.html(val).prepend(tmp);
8798 this.__callback({
"obj" : obj,
"name" : val });
8802 obj = obj.contents().filter(
function() {
return this.nodeType == 3; })[0];
8803 this.__callback({
"obj" : obj,
"name" : val });
8804 return (obj.nodeValue = val);
8807 rename_node :
function (obj, val) {
8808 obj = this._get_node(obj);
8810 if(obj && obj.length &&
this.set_text.apply(
this, Array.prototype.slice.call(arguments))) { this.__callback({
"obj" : obj,
"name" : val }); }
8813 delete_node :
function (obj) {
8814 obj = this._get_node(obj);
8815 if(!obj.length) {
return false; }
8817 var p = this._get_parent(obj), prev = $([]), t =
this;
8818 obj.each(
function () {
8819 prev = prev.add(t._get_prev(
this));
8822 if(p !== -1 && p.find(
"> ul > li").length === 0) {
8823 p.removeClass(
"jstree-open jstree-closed").addClass(
"jstree-leaf");
8826 this.__callback({
"obj" : obj,
"prev" : prev,
"parent" : p });
8829 prepare_move :
function (o, r, pos, cb, is_cb) {
8832 p.ot = $.jstree._reference(o) ||
this;
8833 p.o = p.ot._get_node(o);
8834 p.r = r === - 1 ? -1 : this._get_node(r);
8835 p.p = (typeof pos ===
"undefined" || pos ===
false) ?
"last" : pos;
8836 if(!is_cb && prepared_move.o && prepared_move.o[0] === p.o[0] && prepared_move.r[0] === p.r[0] && prepared_move.p === p.p) {
8837 this.__callback(prepared_move);
8838 if(cb) { cb.call(
this, prepared_move); }
8841 p.ot = $.jstree._reference(p.o) ||
this;
8842 p.rt = $.jstree._reference(p.r) ||
this;
8843 if(p.r === -1 || !p.r) {
8853 p.cp = p.rt.get_container().find(
" > ul > li").length;
8861 if(!/^(before|after)$/.test(p.p) && !
this._is_loaded(p.r)) {
8862 return this.load_node(p.r, function () { this.prepare_move(o, r, pos, cb,
true); });
8867 p.cr = p.rt._get_parent(p.r);
8870 p.cp = p.r.index() + 1;
8871 p.cr = p.rt._get_parent(p.r);
8879 p.cp = p.r.find(
" > ul > li").length;
8888 p.np = p.cr == -1 ? p.rt.get_container() : p.cr;
8889 p.op = p.ot._get_parent(p.o);
8890 p.cop = p.o.index();
8891 if(p.op === -1) { p.op = p.ot ? p.ot.get_container() : this.get_container(); }
8892 if(!/^(before|after)$/.test(p.p) && p.op && p.np && p.op[0] === p.np[0] && p.o.index() < p.cp) { p.cp++; }
8894 p.or = p.np.find(
" > ul > li:nth-child(" + (p.cp + 1) +
")");
8896 this.__callback(prepared_move);
8897 if(cb) { cb.call(
this, prepared_move); }
8899 check_move :
function () {
8900 var obj = prepared_move, ret =
true, r = obj.r === -1 ? this.get_container() : obj.r;
8901 if(!obj || !obj.o || obj.or[0] === obj.o[0]) {
return false; }
8902 if(obj.op && obj.np && obj.op[0] === obj.np[0] && obj.cp - 1 === obj.o.index()) {
return false; }
8903 obj.o.each(
function () {
8904 if(r.parentsUntil(
".jstree",
"li").andSelf().index(
this) !== -1) { ret =
false;
return false; }
8908 move_node :
function (obj, ref, position, is_copy, is_prepared, skip_check) {
8910 return this.prepare_move(obj, ref, position,
function (p) {
8911 this.move_node(p,
false,
false, is_copy,
true, skip_check);
8915 prepared_move.cy =
true;
8917 if(!skip_check && !this.check_move()) {
return false; }
8922 o = obj.o.clone(
true);
8923 o.find(
"*[id]").andSelf().each(
function () {
8924 if(this.
id) { this.
id =
"copy_" + this.id; }
8929 if(obj.or.length) { obj.or.before(o); }
8931 if(!obj.np.children(
"ul").length) { $(
"<ul />").appendTo(obj.np); }
8932 obj.np.children(
"ul:eq(0)").append(o);
8936 obj.ot.clean_node(obj.op);
8937 obj.rt.clean_node(obj.np);
8938 if(!obj.op.find(
"> ul > li").length) {
8939 obj.op.removeClass(
"jstree-open jstree-closed").addClass(
"jstree-leaf").children(
"ul").remove();
8944 prepared_move.cy =
true;
8945 prepared_move.oc = o;
8947 this.__callback(prepared_move);
8948 return prepared_move;
8950 _get_move :
function () {
return prepared_move; }
8961 var scrollbar_width, e1, e2;
8963 if (/msie/.test(navigator.userAgent.toLowerCase())) {
8964 e1 = $(
'<textarea cols="10" rows="2"></textarea>').css({ position:
'absolute', top: -1000, left: 0 }).appendTo(
'body');
8965 e2 = $(
'<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({ position:
'absolute', top: -1000, left: 0 }).appendTo(
'body');
8966 scrollbar_width = e1.width() - e2.width();
8967 e1.add(e2).remove();
8970 e1 = $(
'<div />').css({ width: 100, height: 100, overflow:
'auto', position:
'absolute', top: -1000, left: 0 })
8971 .prependTo(
'body').append(
'<div />').find(
'div').css({ width:
'100%', height: 200 });
8972 scrollbar_width = 100 - e1.width();
8973 e1.parent().remove();
8976 $.jstree.plugin(
"ui", {
8977 __init :
function () {
8978 this.data.ui.selected = $();
8979 this.data.ui.last_selected =
false;
8980 this.data.ui.hovered = null;
8981 this.data.ui.to_select = this.get_settings().ui.initially_select;
8983 this.get_container()
8984 .delegate(
"a",
"click.jstree", $.proxy(
function (event) {
8985 event.preventDefault();
8986 event.currentTarget.blur();
8987 if(!$(event.currentTarget).hasClass(
"jstree-loading")) {
8988 this.select_node(event.currentTarget,
true, event);
8991 .delegate(
"a",
"mouseenter.jstree", $.proxy(
function (event) {
8992 if(!$(event.currentTarget).hasClass(
"jstree-loading")) {
8993 this.hover_node(event.target);
8996 .delegate(
"a",
"mouseleave.jstree", $.proxy(
function (event) {
8997 if(!$(event.currentTarget).hasClass(
"jstree-loading")) {
8998 this.dehover_node(event.target);
9001 .bind(
"reopen.jstree", $.proxy(
function () {
9004 .bind(
"get_rollback.jstree", $.proxy(
function () {
9005 this.dehover_node();
9006 this.save_selected();
9008 .bind(
"set_rollback.jstree", $.proxy(
function () {
9011 .bind(
"close_node.jstree", $.proxy(
function (event, data) {
9012 var s = this._get_settings().ui,
9013 obj = this._get_node(data.rslt.obj),
9014 clk = (obj && obj.length) ? obj.children(
"ul").find(
"a.jstree-clicked") : $(),
9016 if(s.selected_parent_close ===
false || !clk.length) {
return; }
9017 clk.each(
function () {
9018 _this.deselect_node(
this);
9019 if(s.selected_parent_close ===
"select_parent") { _this.select_node(obj); }
9022 .bind(
"delete_node.jstree", $.proxy(
function (event, data) {
9023 var s = this._get_settings().ui.select_prev_on_delete,
9024 obj = this._get_node(data.rslt.obj),
9025 clk = (obj && obj.length) ? obj.find(
"a.jstree-clicked") : [],
9027 clk.each(
function () { _this.deselect_node(
this); });
9028 if(s && clk.length) {
9029 data.rslt.prev.each(
function () {
9030 if(this.parentNode) { _this.select_node(
this);
return false; }
9034 .bind(
"move_node.jstree", $.proxy(
function (event, data) {
9036 data.rslt.oc.find(
"a.jstree-clicked").removeClass(
"jstree-clicked");
9042 select_multiple_modifier :
"ctrl",
9043 select_range_modifier :
"shift",
9044 selected_parent_close :
"select_parent",
9045 selected_parent_open :
true,
9046 select_prev_on_delete :
true,
9047 disable_selecting_children :
false,
9048 initially_select : []
9051 _get_node :
function (obj, allow_multiple) {
9052 if(typeof obj ===
"undefined" || obj === null) {
return allow_multiple ? this.data.ui.selected : this.data.ui.last_selected; }
9053 var $obj = $(obj, this.get_container());
9054 if($obj.is(
".jstree") || obj == -1) {
return -1; }
9055 $obj = $obj.closest(
"li", this.get_container());
9056 return $obj.length ? $obj :
false;
9058 _ui_notify :
function (n, data) {
9060 this.select_node(n,
false);
9063 save_selected :
function () {
9065 this.data.ui.to_select = [];
9066 this.data.ui.selected.each(
function () {
if(this.
id) { _this.data.ui.to_select.push(
"#" + this.
id.toString().replace(/^#/,
"").replace(/\\\
9067 this.__callback(this.data.ui.to_select);
9069 reselect :
function () {
9071 s = this.data.ui.to_select;
9072 s = $.map($.makeArray(s),
function (n) {
return "#" + n.toString().replace(/^#/,
"").replace(/\\\
9074 $.each(s,
function (i, val) {
if(val && val !==
"#") { _this.select_node(val); } });
9075 this.data.ui.selected = this.data.ui.selected.filter(
function () {
return this.parentNode; });
9078 refresh :
function (obj) {
9079 this.save_selected();
9080 return this.__call_old();
9082 hover_node :
function (obj) {
9083 obj = this._get_node(obj);
9084 if(!obj.length) {
return false; }
9086 if(!obj.hasClass(
"jstree-hovered")) { this.dehover_node(); }
9087 this.data.ui.hovered = obj.children(
"a").addClass(
"jstree-hovered").parent();
9088 this._fix_scroll(obj);
9089 this.__callback({
"obj" : obj });
9091 dehover_node :
function () {
9092 var obj = this.data.ui.hovered, p;
9093 if(!obj || !obj.length) {
return false; }
9094 p = obj.children(
"a").removeClass(
"jstree-hovered").parent();
9095 if(this.data.ui.hovered[0] === p[0]) { this.data.ui.hovered = null; }
9096 this.__callback({
"obj" : obj });
9098 select_node :
function (obj, check, e) {
9099 obj = this._get_node(obj);
9100 if(obj == -1 || !obj || !obj.length) {
return false; }
9101 var s = this._get_settings().ui,
9102 is_multiple = (s.select_multiple_modifier ==
"on" || (s.select_multiple_modifier !==
false && e && e[s.select_multiple_modifier +
"Key"])),
9103 is_range = (s.select_range_modifier !==
false && e && e[s.select_range_modifier +
"Key"] && this.data.ui.last_selected && this.data.ui.last_selected[0] !== obj[0] && this.data.ui.last_selected.parent()[0] === obj.parent()[0]),
9104 is_selected = this.is_selected(obj),
9108 if(s.disable_selecting_children && is_multiple &&
9110 (obj.parentsUntil(
".jstree",
"li").children(
"a.jstree-clicked").length) ||
9111 (obj.children(
"ul").find(
"a.jstree-clicked:eq(0)").length)
9119 this.data.ui.last_selected.addClass(
"jstree-last-selected");
9120 obj = obj[ obj.index() < this.data.ui.last_selected.index() ?
"nextUntil" :
"prevUntil" ](
".jstree-last-selected").andSelf();
9121 if(s.select_limit == -1 || obj.length < s.select_limit) {
9122 this.data.ui.last_selected.removeClass(
"jstree-last-selected");
9123 this.data.ui.selected.each(
function () {
9124 if(
this !== t.data.ui.last_selected[0]) { t.deselect_node(
this); }
9126 is_selected =
false;
9133 case (is_selected && !is_multiple):
9134 this.deselect_all();
9135 is_selected =
false;
9138 case (!is_selected && !is_multiple):
9139 if(s.select_limit == -1 || s.select_limit > 0) {
9140 this.deselect_all();
9144 case (is_selected && is_multiple):
9145 this.deselect_node(obj);
9147 case (!is_selected && is_multiple):
9148 if(s.select_limit == -1 ||
this.data.ui.selected.length + 1 <= s.select_limit) {
9154 if(proceed && !is_selected) {
9155 if(!is_range) { this.data.ui.last_selected = obj; }
9156 obj.children(
"a").addClass(
"jstree-clicked");
9157 if(s.selected_parent_open) {
9158 obj.parents(
".jstree-closed").each(
function () { t.open_node(
this,
false,
true); });
9160 this.data.ui.selected = this.data.ui.selected.add(obj);
9161 this._fix_scroll(obj.eq(0));
9162 this.__callback({
"obj" : obj,
"e" : e });
9165 _fix_scroll :
function (obj) {
9166 var c = this.get_container()[0], t;
9167 if(c.scrollHeight > c.offsetHeight) {
9168 obj = this._get_node(obj);
9169 if(!obj || obj === -1 || !obj.length || !obj.is(
":visible")) {
return; }
9170 t = obj.offset().top - this.get_container().offset().top;
9172 c.scrollTop = c.scrollTop + t - 1;
9174 if(t + this.data.core.li_height + (c.scrollWidth > c.offsetWidth ? scrollbar_width : 0) > c.offsetHeight) {
9175 c.scrollTop = c.scrollTop + (t - c.offsetHeight + this.data.core.li_height + 1 + (c.scrollWidth > c.offsetWidth ? scrollbar_width : 0));
9179 deselect_node :
function (obj) {
9180 obj = this._get_node(obj);
9181 if(!obj.length) {
return false; }
9182 if(this.is_selected(obj)) {
9183 obj.children(
"a").removeClass(
"jstree-clicked");
9184 this.data.ui.selected = this.data.ui.selected.not(obj);
9185 if(this.data.ui.last_selected.get(0) === obj.get(0)) { this.data.ui.last_selected = this.data.ui.selected.eq(0); }
9186 this.__callback({
"obj" : obj });
9189 toggle_select :
function (obj) {
9190 obj = this._get_node(obj);
9191 if(!obj.length) {
return false; }
9192 if(this.is_selected(obj)) { this.deselect_node(obj); }
9193 else { this.select_node(obj); }
9195 is_selected :
function (obj) {
return this.data.ui.selected.index(this._get_node(obj)) >= 0; },
9196 get_selected :
function (context) {
9197 return context ? $(context).find(
"a.jstree-clicked").parent() : this.data.ui.selected;
9199 deselect_all :
function (context) {
9200 var ret = context ? $(context).find(
"a.jstree-clicked").parent() : this.get_container().find(
"a.jstree-clicked").parent();
9201 ret.children(
"a.jstree-clicked").removeClass(
"jstree-clicked");
9202 this.data.ui.selected = $([]);
9203 this.data.ui.last_selected =
false;
9204 this.__callback({
"obj" : ret });
9209 $.jstree.defaults.plugins.push(
"ui");
9218 $.jstree.plugin(
"crrm", {
9219 __init :
function () {
9220 this.get_container()
9221 .bind(
"move_node.jstree", $.proxy(
function (e, data) {
9222 if(this._get_settings().crrm.move.open_onmove) {
9224 data.rslt.np.parentsUntil(
".jstree").andSelf().filter(
".jstree-closed").each(
function () {
9225 t.open_node(
this,
false,
true);
9231 input_width_limit : 200,
9233 always_copy :
false,
9235 default_position :
"last",
9236 check_move :
function (m) {
return true; }
9240 _show_input :
function (obj, callback) {
9241 obj = this._get_node(obj);
9242 var rtl = this._get_settings().core.rtl,
9243 w = this._get_settings().crrm.input_width_limit,
9244 w1 = obj.children(
"ins").width(),
9245 w2 = obj.find(
"> a:visible > ins").width() * obj.find(
"> a:visible > ins").length,
9246 t = this.get_text(obj),
9247 h1 = $(
"<div />", { css : {
"position" :
"absolute",
"top" :
"-200px",
"left" : (rtl ?
"0px" :
"-1000px"),
"visibility" :
"hidden" } }).appendTo(
"body"),
9248 h2 = obj.css(
"position",
"relative").append(
9251 "class" :
"jstree-rename-input",
9255 "border" :
"1px solid silver",
9256 "position" :
"absolute",
9257 "left" : (rtl ?
"auto" : (w1 + w2 + 4) +
"px"),
9258 "right" : (rtl ? (w1 + w2 + 4) +
"px" :
"auto"),
9260 "height" : (this.data.core.li_height - 2) +
"px",
9261 "lineHeight" : (this.data.core.li_height - 2) +
"px",
9264 "blur" : $.proxy(
function () {
9265 var i = obj.children(
".jstree-rename-input"),
9267 if(v ===
"") { v = t; }
9270 this.set_text(obj,t);
9271 this.rename_node(obj, v);
9272 callback.call(
this, obj, v, t);
9273 obj.css(
"position",
"");
9275 "keyup" :
function (event) {
9276 var key =
event.keyCode ||
event.which;
9277 if(key == 27) { this.value = t; this.blur();
return; }
9278 else if(key == 13) { this.blur();
return; }
9280 h2.width(Math.min(h1.text(
"pW" +
this.value).width(),w));
9283 "keypress" :
function(event) {
9284 var key =
event.keyCode ||
event.which;
9285 if(key == 13) {
return false; }
9288 ).children(
".jstree-rename-input");
9289 this.set_text(obj,
"");
9291 fontFamily : h2.css(
'fontFamily') ||
'',
9292 fontSize : h2.css(
'fontSize') ||
'',
9293 fontWeight : h2.css(
'fontWeight') ||
'',
9294 fontStyle : h2.css(
'fontStyle') ||
'',
9295 fontStretch : h2.css(
'fontStretch') ||
'',
9296 fontVariant : h2.css(
'fontVariant') ||
'',
9297 letterSpacing : h2.css(
'letterSpacing') ||
'',
9298 wordSpacing : h2.css(
'wordSpacing') ||
''
9300 h2.width(Math.min(h1.text(
"pW" + h2[0].value).width(),w))[0].select();
9302 rename :
function (obj) {
9303 obj = this._get_node(obj);
9305 var f = this.__callback;
9306 this._show_input(obj,
function (obj, new_name, old_name) {
9307 f.call(
this, {
"obj" : obj,
"new_name" : new_name,
"old_name" : old_name });
9310 create :
function (obj, position, js, callback, skip_rename) {
9311 var t, _this =
this;
9312 obj = this._get_node(obj);
9313 if(!obj) { obj = -1; }
9315 t = this.create_node(obj, position, js,
function (t) {
9316 var p = this._get_parent(t),
9318 if(callback) { callback.call(
this, t); }
9319 if(p.length && p.hasClass(
"jstree-closed")) { this.open_node(p,
false,
true); }
9321 this._show_input(t,
function (obj, new_name, old_name) {
9322 _this.__callback({
"obj" : obj,
"name" : new_name,
"parent" : p,
"position" : pos });
9325 else { _this.__callback({
"obj" : t,
"name" : this.get_text(t),
"parent" : p,
"position" : pos }); }
9329 remove :
function (obj) {
9330 obj = this._get_node(obj,
true);
9331 var p = this._get_parent(obj), prev = this._get_prev(obj);
9333 obj = this.delete_node(obj);
9334 if(obj !==
false) { this.__callback({
"obj" : obj,
"prev" : prev,
"parent" : p }); }
9336 check_move :
function () {
9337 if(!this.__call_old()) {
return false; }
9338 var s = this._get_settings().crrm.move;
9339 if(!s.check_move.call(
this,
this._get_move())) {
return false; }
9342 move_node :
function (obj, ref, position, is_copy, is_prepared, skip_check) {
9343 var s = this._get_settings().crrm.move;
9345 if(typeof position ===
"undefined") { position = s.default_position; }
9346 if(position ===
"inside" && !s.default_position.match(/^(before|after)$/)) { position = s.default_position; }
9347 return this.__call_old(
true, obj, ref, position, is_copy,
false, skip_check);
9350 if(s.always_copy ===
true || (s.always_copy ===
"multitree" && obj.rt.get_index() !== obj.ot.get_index() )) {
9353 this.__call_old(
true, obj, ref, position, is_copy,
true, skip_check);
9356 cut :
function (obj) {
9357 obj = this._get_node(obj,
true);
9358 if(!obj || !obj.length) {
return false; }
9359 this.data.crrm.cp_nodes =
false;
9360 this.data.crrm.ct_nodes = obj;
9361 this.__callback({
"obj" : obj });
9363 copy :
function (obj) {
9364 obj = this._get_node(obj,
true);
9365 if(!obj || !obj.length) {
return false; }
9366 this.data.crrm.ct_nodes =
false;
9367 this.data.crrm.cp_nodes = obj;
9368 this.__callback({
"obj" : obj });
9370 paste :
function (obj) {
9371 obj = this._get_node(obj);
9372 if(!obj || !obj.length) {
return false; }
9373 var nodes = this.data.crrm.ct_nodes ? this.data.crrm.ct_nodes : this.data.crrm.cp_nodes;
9374 if(!this.data.crrm.ct_nodes && !
this.data.crrm.cp_nodes) {
return false; }
9375 if(this.data.crrm.ct_nodes) { this.move_node(this.data.crrm.ct_nodes, obj); this.data.crrm.ct_nodes =
false; }
9376 if(this.data.crrm.cp_nodes) { this.move_node(this.data.crrm.cp_nodes, obj,
false,
true); }
9377 this.__callback({
"obj" : obj,
"nodes" : nodes });
9391 var themes_loaded = [];
9393 $.jstree._themes =
false;
9394 $.jstree.plugin(
"themes", {
9395 __init :
function () {
9396 this.get_container()
9397 .bind(
"init.jstree", $.proxy(
function () {
9398 var s = this._get_settings().themes;
9399 this.data.themes.dots = s.dots;
9400 this.data.themes.icons = s.icons;
9401 this.set_theme(s.theme, s.url);
9403 .bind(
"loaded.jstree", $.proxy(
function () {
9405 if(!this.data.themes.dots) {
this.hide_dots(); }
9406 else { this.show_dots(); }
9407 if(!this.data.themes.icons) { this.hide_icons(); }
9408 else { this.show_icons(); }
9418 set_theme :
function (theme_name, theme_url) {
9419 if(!theme_name) {
return false; }
9420 if(!theme_url) { theme_url = $.jstree._themes + theme_name +
'/style.css'; }
9421 if($.inArray(theme_url, themes_loaded) == -1) {
9422 $.vakata.css.add_sheet({
"url" : theme_url });
9423 themes_loaded.push(theme_url);
9425 if(this.data.themes.theme != theme_name) {
9426 this.get_container().removeClass(
'jstree-' + this.data.themes.theme);
9427 this.data.themes.theme = theme_name;
9429 this.get_container().addClass(
'jstree-' + theme_name);
9430 if(!this.data.themes.dots) { this.hide_dots(); }
9431 else { this.show_dots(); }
9432 if(!this.data.themes.icons) { this.hide_icons(); }
9433 else { this.show_icons(); }
9436 get_theme :
function () {
return this.data.themes.theme; },
9438 show_dots :
function () { this.data.themes.dots =
true; this.get_container().children(
"ul").removeClass(
"jstree-no-dots"); },
9439 hide_dots :
function () { this.data.themes.dots =
false; this.get_container().children(
"ul").addClass(
"jstree-no-dots"); },
9440 toggle_dots :
function () {
if(this.data.themes.dots) { this.hide_dots(); }
else { this.show_dots(); } },
9442 show_icons :
function () { this.data.themes.icons =
true; this.get_container().children(
"ul").removeClass(
"jstree-no-icons"); },
9443 hide_icons :
function () { this.data.themes.icons =
false; this.get_container().children(
"ul").addClass(
"jstree-no-icons"); },
9444 toggle_icons:
function () {
if(this.data.themes.icons) { this.hide_icons(); }
else { this.show_icons(); } }
9449 if($.jstree._themes ===
false) {
9450 $(
"script").each(
function () {
9451 if(this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)) {
9452 $.jstree._themes = this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/,
"") +
'themes/';
9457 if($.jstree._themes ===
false) { $.jstree._themes =
"themes/"; }
9460 $.jstree.defaults.plugins.push(
"themes");
9471 function exec(i, event) {
9472 var f = $.jstree._focused(), tmp;
9473 if(f && f.data && f.data.hotkeys && f.data.hotkeys.enabled) {
9474 tmp = f._get_settings().hotkeys[i];
9475 if(tmp) {
return tmp.call(f, event); }
9478 $.jstree.plugin(
"hotkeys", {
9479 __init :
function () {
9480 if(typeof $.hotkeys ===
"undefined") {
throw "jsTree hotkeys: jQuery hotkeys plugin not included."; }
9481 if(!this.data.ui) {
throw "jsTree hotkeys: jsTree UI plugin not included."; }
9482 $.each(this._get_settings().hotkeys,
function (i, v) {
9483 if(v !==
false && $.inArray(i, bound) == -1) {
9484 $(document).bind(
"keydown", i,
function (event) {
return exec(i, event); });
9488 this.get_container()
9489 .bind(
"lock.jstree", $.proxy(
function () {
9490 if(this.data.hotkeys.enabled) {
this.data.hotkeys.enabled =
false;
this.data.hotkeys.revert =
true; }
9492 .bind(
"unlock.jstree", $.proxy(
function () {
9493 if(this.data.hotkeys.revert) {
this.data.hotkeys.enabled =
true; }
9495 this.enable_hotkeys();
9498 "up" :
function () {
9499 var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
9500 this.hover_node(this._get_prev(o));
9503 "ctrl+up" :
function () {
9504 var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
9505 this.hover_node(this._get_prev(o));
9508 "shift+up" :
function () {
9509 var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
9510 this.hover_node(this._get_prev(o));
9513 "down" :
function () {
9514 var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
9515 this.hover_node(this._get_next(o));
9518 "ctrl+down" :
function () {
9519 var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
9520 this.hover_node(this._get_next(o));
9523 "shift+down" :
function () {
9524 var o = this.data.ui.hovered || this.data.ui.last_selected || -1;
9525 this.hover_node(this._get_next(o));
9528 "left" :
function () {
9529 var o = this.data.ui.hovered || this.data.ui.last_selected;
9531 if(o.hasClass(
"jstree-open")) { this.close_node(o); }
9532 else { this.hover_node(this._get_prev(o)); }
9536 "ctrl+left" :
function () {
9537 var o = this.data.ui.hovered || this.data.ui.last_selected;
9539 if(o.hasClass(
"jstree-open")) { this.close_node(o); }
9540 else { this.hover_node(this._get_prev(o)); }
9544 "shift+left" :
function () {
9545 var o = this.data.ui.hovered || this.data.ui.last_selected;
9547 if(o.hasClass(
"jstree-open")) { this.close_node(o); }
9548 else { this.hover_node(this._get_prev(o)); }
9552 "right" :
function () {
9553 var o = this.data.ui.hovered || this.data.ui.last_selected;
9555 if(o.hasClass(
"jstree-closed")) { this.open_node(o); }
9556 else { this.hover_node(this._get_next(o)); }
9560 "ctrl+right" :
function () {
9561 var o = this.data.ui.hovered || this.data.ui.last_selected;
9563 if(o.hasClass(
"jstree-closed")) { this.open_node(o); }
9564 else { this.hover_node(this._get_next(o)); }
9568 "shift+right" :
function () {
9569 var o = this.data.ui.hovered || this.data.ui.last_selected;
9571 if(o.hasClass(
"jstree-closed")) { this.open_node(o); }
9572 else { this.hover_node(this._get_next(o)); }
9576 "space" :
function () {
9577 if(this.data.ui.hovered) { this.data.ui.hovered.children(
"a:eq(0)").click(); }
9580 "ctrl+space" :
function (event) {
9581 event.type =
"click";
9582 if(this.data.ui.hovered) { this.data.ui.hovered.children(
"a:eq(0)").trigger(event); }
9585 "shift+space" :
function (event) {
9586 event.type =
"click";
9587 if(this.data.ui.hovered) { this.data.ui.hovered.children(
"a:eq(0)").trigger(event); }
9590 "f2" :
function () { this.rename(this.data.ui.hovered ||
this.data.ui.last_selected); },
9591 "del" :
function () { this.
remove(this.data.ui.hovered || this._get_node(null)); }
9594 enable_hotkeys :
function () {
9595 this.data.hotkeys.enabled =
true;
9597 disable_hotkeys :
function () {
9598 this.data.hotkeys.enabled =
false;
9610 $.jstree.plugin(
"json_data", {
9611 __init :
function() {
9612 var s = this._get_settings().json_data;
9613 if(s.progressive_unload) {
9614 this.get_container().bind(
"after_close.jstree",
function (e, data) {
9615 data.rslt.obj.children(
"ul").remove();
9625 correct_state :
true,
9626 progressive_render :
false,
9627 progressive_unload :
false
9630 load_node :
function (obj, s_call, e_call) { var _this =
this; this.load_node_json(obj,
function () { _this.__callback({
"obj" : _this._get_node(obj) }); s_call.call(
this); }, e_call); },
9631 _is_loaded :
function (obj) {
9632 var s = this._get_settings().json_data;
9633 obj = this._get_node(obj);
9634 return obj == -1 || !obj || (!s.ajax && !s.progressive_render && !$.isFunction(s.data)) || obj.is(
".jstree-open, .jstree-leaf") || obj.children(
"ul").children(
"li").length > 0;
9636 refresh :
function (obj) {
9637 obj = this._get_node(obj);
9638 var s = this._get_settings().json_data;
9639 if(obj && obj !== -1 && s.progressive_unload && ($.isFunction(s.data) || !!s.ajax)) {
9640 obj.removeData(
"jstree_children");
9642 return this.__call_old();
9644 load_node_json :
function (obj, s_call, e_call) {
9645 var s = this.get_settings().json_data, d,
9646 error_func =
function () {},
9647 success_func =
function () {};
9648 obj = this._get_node(obj);
9650 if(obj && obj !== -1 && (s.progressive_render || s.progressive_unload) && !obj.is(
".jstree-open, .jstree-leaf") && obj.children(
"ul").children(
"li").length === 0 && obj.data(
"jstree_children")) {
9651 d = this._parse_json(obj.data(
"jstree_children"), obj);
9654 if(!s.progressive_unload) { obj.removeData(
"jstree_children"); }
9656 this.clean_node(obj);
9657 if(s_call) { s_call.call(
this); }
9661 if(obj && obj !== -1) {
9662 if(obj.data(
"jstree_is_loading")) {
return; }
9663 else { obj.data(
"jstree_is_loading",
true); }
9666 case (!s.data && !s.ajax):
throw "Neither data nor ajax settings supplied.";
9668 case ($.isFunction(s.data)):
9669 s.data.call(
this, obj, $.proxy(
function (d) {
9670 d = this._parse_json(d, obj);
9672 if(obj === -1 || !obj) {
9673 if(s.correct_state) { this.get_container().children(
"ul").empty(); }
9676 obj.children(
"a.jstree-loading").removeClass(
"jstree-loading");
9677 obj.removeData(
"jstree_is_loading");
9678 if(s.correct_state) { this.correct_state(obj); }
9680 if(e_call) { e_call.call(
this); }
9683 if(obj === -1 || !obj) { this.get_container().children(
"ul").empty().append(d.children()); }
9684 else { obj.append(d).children(
"a.jstree-loading").removeClass(
"jstree-loading"); obj.removeData(
"jstree_is_loading"); }
9685 this.clean_node(obj);
9686 if(s_call) { s_call.call(
this); }
9690 case (!!s.data && !s.ajax) || (!!s.data && !!s.ajax && (!obj || obj === -1)):
9691 if(!obj || obj == -1) {
9692 d = this._parse_json(s.data, obj);
9694 this.get_container().children(
"ul").empty().append(d.children());
9698 if(s.correct_state) { this.get_container().children(
"ul").empty(); }
9701 if(s_call) { s_call.call(
this); }
9703 case (!s.data && !!s.ajax) || (!!s.data && !!s.ajax && obj && obj !== -1):
9704 error_func =
function (x, t, e) {
9705 var ef = this.get_settings().json_data.ajax.error;
9706 if(ef) { ef.call(
this, x, t, e); }
9707 if(obj != -1 && obj.length) {
9708 obj.children(
"a.jstree-loading").removeClass(
"jstree-loading");
9709 obj.removeData(
"jstree_is_loading");
9710 if(t ===
"success" && s.correct_state) { this.correct_state(obj); }
9713 if(t ===
"success" && s.correct_state) { this.get_container().children(
"ul").empty(); }
9715 if(e_call) { e_call.call(
this); }
9717 success_func =
function (d, t, x) {
9718 var sf = this.get_settings().json_data.ajax.success;
9719 if(sf) { d = sf.call(
this,d,t,x) || d; }
9720 if(d ===
"" || (d && d.toString && d.toString().replace(/^[\s\n]+$/,
"") ===
"") || (!$.isArray(d) && !$.isPlainObject(d))) {
9721 return error_func.call(
this, x, t,
"");
9723 d = this._parse_json(d, obj);
9725 if(obj === -1 || !obj) { this.get_container().children(
"ul").empty().append(d.children()); }
9726 else { obj.append(d).children(
"a.jstree-loading").removeClass(
"jstree-loading"); obj.removeData(
"jstree_is_loading"); }
9727 this.clean_node(obj);
9728 if(s_call) { s_call.call(
this); }
9731 if(obj === -1 || !obj) {
9732 if(s.correct_state) {
9733 this.get_container().children(
"ul").empty();
9734 if(s_call) { s_call.call(
this); }
9738 obj.children(
"a.jstree-loading").removeClass(
"jstree-loading");
9739 obj.removeData(
"jstree_is_loading");
9740 if(s.correct_state) {
9741 this.correct_state(obj);
9742 if(s_call) { s_call.call(
this); }
9747 s.ajax.context =
this;
9748 s.ajax.error = error_func;
9749 s.ajax.success = success_func;
9750 if(!s.ajax.dataType) { s.ajax.dataType =
"json"; }
9751 if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(
this, obj); }
9752 if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(
this, obj); }
9757 _parse_json :
function (js, obj, is_callback) {
9759 p = this._get_settings(),
9761 t = p.core.html_titles,
9762 tmp, i, j, ul1, ul2;
9764 if(!js) {
return d; }
9765 if(s.progressive_unload && obj && obj !== -1) {
9766 obj.data(
"jstree_children", d);
9770 if(!js.length) {
return false; }
9771 for(i = 0, j = js.length; i < j; i++) {
9772 tmp = this._parse_json(js[i], obj,
true);
9773 if(tmp.length) { d = d.add(tmp); }
9777 if(typeof js ==
"string") { js = { data : js }; }
9778 if(!js.data && js.data !==
"") {
return d; }
9780 if(js.attr) { d.attr(js.attr); }
9781 if(js.metadata) { d.data(js.metadata); }
9782 if(js.state) { d.addClass(
"jstree-" + js.state); }
9783 if(!$.isArray(js.data)) { tmp = js.data; js.data = []; js.data.push(tmp); }
9784 $.each(js.data, function (i, m) {
9786 if($.isFunction(m)) { m = m.call(
this, js); }
9787 if(typeof m ==
"string") { tmp.attr(
'href',
'#')[ t ?
"html" :
"text" ](m); }
9789 if(!m.attr) { m.attr = {}; }
9790 if(!m.attr.href) { m.attr.href =
'#'; }
9791 tmp.attr(m.attr)[ t ?
"html" :
"text" ](m.title);
9792 if(m.language) { tmp.addClass(m.language); }
9794 tmp.prepend(
"<ins class='jstree-icon'> </ins>");
9795 if(!m.icon && js.icon) { m.icon = js.icon; }
9797 if(m.icon.indexOf(
"/") === -1) { tmp.children(
"ins").addClass(m.icon); }
9798 else { tmp.children(
"ins").css(
"background",
"url('" + m.icon +
"') center center no-repeat"); }
9802 d.prepend(
"<ins class='jstree-icon'> </ins>");
9804 if(s.progressive_render && js.state !==
"open") {
9805 d.addClass(
"jstree-closed").data(
"jstree_children", js.children);
9808 if(s.progressive_unload) { d.data(
"jstree_children", js.children); }
9809 if($.isArray(js.children) && js.children.length) {
9810 tmp = this._parse_json(js.children, obj,
true);
9827 get_json :
function (obj, li_attr, a_attr, is_callback) {
9829 s = this._get_settings(),
9831 tmp1, tmp2, li,
a, t, lang;
9832 obj = this._get_node(obj);
9833 if(!obj || obj === -1) { obj = this.get_container().find(
"> ul > li"); }
9834 li_attr = $.isArray(li_attr) ? li_attr : [
"id",
"class" ];
9835 if(!is_callback && this.data.types) { li_attr.push(s.types.type_attr); }
9836 a_attr = $.isArray(a_attr) ? a_attr : [ ];
9838 obj.each(
function () {
9840 tmp1 = { data : [] };
9841 if(li_attr.length) { tmp1.attr = { }; }
9842 $.each(li_attr,
function (i, v) {
9844 if(tmp2 && tmp2.length && tmp2.replace(/jstree[^ ]*/ig,
'').length) {
9845 tmp1.attr[v] = (
" " + tmp2).replace(/ jstree[^ ]*/ig,
'').replace(/\s+$/ig,
" ").replace(/^ /,
"").replace(/ $/,
"");
9848 if(li.hasClass(
"jstree-open")) { tmp1.state =
"open"; }
9849 if(li.hasClass(
"jstree-closed")) { tmp1.state =
"closed"; }
9850 if(li.data()) { tmp1.metadata = li.data(); }
9851 a = li.children(
"a");
9852 a.each(
function () {
9856 $.inArray(
"languages", s.plugins) !== -1 ||
9857 t.children(
"ins").get(0).style.backgroundImage.length ||
9858 (t.children(
"ins").get(0).className && t.children(
"ins").get(0).className.replace(/jstree[^ ]*|$/ig,
'').length)
9861 if($.inArray(
"languages", s.plugins) !== -1 && $.isArray(s.languages) && s.languages.length) {
9862 $.each(s.languages, function (l, lv) {
9863 if(t.hasClass(lv)) {
9869 tmp2 = { attr : { }, title : _this.get_text(t, lang) };
9870 $.each(a_attr,
function (k, z) {
9871 tmp2.attr[z] = (
" " + (t.attr(z) ||
"")).replace(/ jstree[^ ]*/ig,
'').replace(/\s+$/ig,
" ").replace(/^ /,
"").replace(/ $/,
"");
9873 if($.inArray(
"languages", s.plugins) !== -1 && $.isArray(s.languages) && s.languages.length) {
9874 $.each(s.languages, function (k, z) {
9875 if(t.hasClass(z)) { tmp2.language = z;
return true; }
9878 if(t.children(
"ins").get(0).className.replace(/jstree[^ ]*|$/ig,
'').replace(/^\s+$/ig,
"").length) {
9879 tmp2.icon = t.children(
"ins").get(0).className.replace(/jstree[^ ]*|$/ig,
'').replace(/\s+$/ig,
" ").replace(/^ /,
"").replace(/ $/,
"");
9881 if(t.children(
"ins").get(0).style.backgroundImage.length) {
9882 tmp2.icon = t.children(
"ins").get(0).style.backgroundImage.replace(
"url(",
"").replace(
")",
"");
9886 tmp2 = _this.get_text(t);
9888 if(a.length > 1) { tmp1.data.push(tmp2); }
9889 else { tmp1.data = tmp2; }
9891 li = li.find(
"> ul > li");
9892 if(li.length) { tmp1.children = _this.get_json(li, li_attr, a_attr,
true); }
9909 $.jstree.plugin(
"languages", {
9910 __init :
function () { this._load_css(); },
9913 set_lang :
function (i) {
9914 var langs = this._get_settings().languages,
9916 selector =
".jstree-" + this.get_index() +
' a';
9917 if(!$.isArray(langs) || langs.length === 0) {
return false; }
9918 if($.inArray(i,langs) == -1) {
9919 if(!!langs[i]) { i = langs[i]; }
9920 else {
return false; }
9922 if(i == this.data.languages.current_language) {
return true; }
9923 st = $.vakata.css.get_css(selector +
"." + this.data.languages.current_language,
false,
this.data.languages.language_css);
9924 if(st !==
false) { st.style.display =
"none"; }
9925 st = $.vakata.css.get_css(selector +
"." + i,
false, this.data.languages.language_css);
9926 if(st !==
false) { st.style.display =
""; }
9927 this.data.languages.current_language = i;
9931 get_lang :
function () {
9932 return this.data.languages.current_language;
9934 _get_string :
function (key, lang) {
9935 var langs = this._get_settings().languages,
9936 s = this._get_settings().core.strings;
9937 if($.isArray(langs) && langs.length) {
9938 lang = (lang && $.inArray(lang,langs) != -1) ? lang : this.data.languages.current_language;
9940 if(s[lang] && s[lang][key]) {
return s[lang][key]; }
9941 if(s[key]) {
return s[key]; }
9944 get_text :
function (obj, lang) {
9945 obj = this._get_node(obj) || this.data.ui.last_selected;
9946 if(!obj.size()) {
return false; }
9947 var langs = this._get_settings().languages,
9948 s = this._get_settings().core.html_titles;
9949 if($.isArray(langs) && langs.length) {
9950 lang = (lang && $.inArray(lang,langs) != -1) ? lang : this.data.languages.current_language;
9951 obj = obj.children(
"a." + lang);
9953 else { obj = obj.children(
"a:eq(0)"); }
9956 obj.children(
"INS").remove();
9960 obj = obj.contents().filter(
function() {
return this.nodeType == 3; })[0];
9961 return obj.nodeValue;
9964 set_text :
function (obj, val, lang) {
9965 obj = this._get_node(obj) || this.data.ui.last_selected;
9966 if(!obj.size()) {
return false; }
9967 var langs = this._get_settings().languages,
9968 s = this._get_settings().core.html_titles,
9970 if($.isArray(langs) && langs.length) {
9971 lang = (lang && $.inArray(lang,langs) != -1) ? lang : this.data.languages.current_language;
9972 obj = obj.children(
"a." + lang);
9974 else { obj = obj.children(
"a:eq(0)"); }
9976 tmp = obj.children(
"INS").clone();
9977 obj.html(val).prepend(tmp);
9978 this.__callback({
"obj" : obj,
"name" : val,
"lang" : lang });
9982 obj = obj.contents().filter(
function() {
return this.nodeType == 3; })[0];
9983 this.__callback({
"obj" : obj,
"name" : val,
"lang" : lang });
9984 return (obj.nodeValue = val);
9987 _load_css :
function () {
9988 var langs = this._get_settings().languages,
9989 str =
"/* languages css */",
9990 selector =
".jstree-" + this.get_index() +
' a',
9992 if($.isArray(langs) && langs.length) {
9993 this.data.languages.current_language = langs[0];
9994 for(ln = 0; ln < langs.length; ln++) {
9995 str += selector +
"." + langs[ln] +
" {";
9996 if(langs[ln] != this.data.languages.current_language) { str +=
" display:none; "; }
9999 this.data.languages.language_css = $.vakata.css.add_sheet({
'str' : str,
'title' :
"jstree-languages" });
10002 create_node :
function (obj, position, js, callback) {
10003 var t = this.__call_old(
true, obj, position, js,
function (t) {
10004 var langs = this._get_settings().languages,
10005 a = t.children(
"a"),
10007 if($.isArray(langs) && langs.length) {
10008 for(ln = 0; ln < langs.length; ln++) {
10009 if(!a.is(
"." + langs[ln])) {
10010 t.append(a.eq(0).clone().removeClass(langs.join(
" ")).addClass(langs[ln]));
10013 a.not(
"." + langs.join(
", .")).
remove();
10015 if(callback) { callback.call(
this, t); }
10030 $.jstree.plugin(
"cookies", {
10031 __init :
function () {
10032 if(typeof $.
cookie ===
"undefined") {
throw "jsTree cookie: jQuery cookie plugin not included."; }
10034 var s = this._get_settings().cookies,
10036 if(!!s.save_loaded) {
10037 tmp = $.cookie(s.save_loaded);
10038 if(tmp && tmp.length) { this.data.core.to_load = tmp.split(
","); }
10040 if(!!s.save_opened) {
10041 tmp = $.cookie(s.save_opened);
10042 if(tmp && tmp.length) { this.data.core.to_open = tmp.split(
","); }
10044 if(!!s.save_selected) {
10045 tmp = $.cookie(s.save_selected);
10046 if(tmp && tmp.length &&
this.data.ui) { this.data.ui.to_select = tmp.split(
","); }
10048 this.get_container()
10049 .one( ( this.data.ui ?
"reselect" :
"reopen" ) +
".jstree", $.proxy(function () {
10050 this.get_container()
10051 .bind(
"open_node.jstree close_node.jstree select_node.jstree deselect_node.jstree", $.proxy(
function (e) {
10052 if(this._get_settings().cookies.auto_save) {
this.save_cookie((e.handleObj.namespace + e.handleObj.type).replace(
"jstree",
"")); }
10057 save_loaded :
"jstree_load",
10058 save_opened :
"jstree_open",
10059 save_selected :
"jstree_select",
10061 cookie_options : {}
10064 save_cookie :
function (c) {
10065 if(this.data.core.refreshing) {
return; }
10066 var s = this._get_settings().cookies;
10068 if(s.save_loaded) {
10069 this.save_loaded();
10070 $.cookie(s.save_loaded,
this.data.core.to_load.join(
","), s.cookie_options);
10072 if(s.save_opened) {
10073 this.save_opened();
10074 $.cookie(s.save_opened,
this.data.core.to_open.join(
","), s.cookie_options);
10076 if(s.save_selected &&
this.data.ui) {
10077 this.save_selected();
10078 $.cookie(s.save_selected,
this.data.ui.to_select.join(
","), s.cookie_options);
10085 if(!!s.save_opened) {
10086 this.save_opened();
10087 $.cookie(s.save_opened,
this.data.core.to_open.join(
","), s.cookie_options);
10089 if(!!s.save_loaded) {
10090 this.save_loaded();
10091 $.cookie(s.save_loaded,
this.data.core.to_load.join(
","), s.cookie_options);
10094 case "select_node":
10095 case "deselect_node":
10096 if(!!s.save_selected &&
this.data.ui) {
10097 this.save_selected();
10098 $.cookie(s.save_selected,
this.data.ui.to_select.join(
","), s.cookie_options);
10115 $.jstree.plugin(
"sort", {
10116 __init :
function () {
10117 this.get_container()
10118 .bind(
"load_node.jstree", $.proxy(
function (e, data) {
10119 var obj = this._get_node(data.rslt.obj);
10120 obj = obj === -1 ? this.get_container().children(
"ul") : obj.children(
"ul");
10123 .bind(
"rename_node.jstree create_node.jstree create.jstree", $.proxy(
function (e, data) {
10124 this.sort(data.rslt.obj.parent());
10126 .bind(
"move_node.jstree", $.proxy(
function (e, data) {
10127 var m = data.rslt.np == -1 ? this.get_container() : data.rslt.np;
10128 this.sort(m.children(
"ul"));
10131 defaults :
function (
a,
b) {
return this.get_text(a) > this.get_text(b) ? 1 : -1; },
10133 sort :
function (obj) {
10134 var s = this._get_settings().sort,
10136 obj.append($.makeArray(obj.children(
"li")).sort($.proxy(s, t)));
10137 obj.find(
"> li > ul").each(
function() { t.sort($(
this)); });
10138 this.clean_node(obj);
10171 drag_start :
function (e, data, html) {
10172 if($.vakata.dnd.is_drag) { $.vakata.drag_stop({}); }
10174 e.currentTarget.unselectable =
"on";
10175 e.currentTarget.onselectstart =
function() {
return false; };
10176 if(e.currentTarget.style) { e.currentTarget.style.MozUserSelect =
"none"; }
10178 $.vakata.dnd.init_x = e.pageX;
10179 $.vakata.dnd.init_y = e.pageY;
10180 $.vakata.dnd.user_data = data;
10181 $.vakata.dnd.is_down =
true;
10182 $.vakata.dnd.helper = $(
"<div id='vakata-dragged' />").html(html);
10183 $(document).bind(
"mousemove", $.vakata.dnd.drag);
10184 $(document).bind(
"mouseup", $.vakata.dnd.drag_stop);
10187 drag :
function (e) {
10188 if(!$.vakata.dnd.is_down) {
return; }
10189 if(!$.vakata.dnd.is_drag) {
10190 if(Math.abs(e.pageX - $.vakata.dnd.init_x) > 5 || Math.abs(e.pageY - $.vakata.dnd.init_y) > 5) {
10191 $.vakata.dnd.helper.appendTo(
"body");
10192 $.vakata.dnd.is_drag =
true;
10193 $(document).triggerHandler(
"drag_start.vakata", {
"event" : e,
"data" : $.vakata.dnd.user_data });
10199 if(e.type ===
"mousemove") {
10200 var d = $(document), t = d.scrollTop(), l = d.scrollLeft();
10201 if(e.pageY - t < 20) {
10202 if(sti && dir1 ===
"down") { clearInterval(sti); sti =
false; }
10203 if(!sti) { dir1 =
"up"; sti = setInterval(
function () { $(document).scrollTop($(document).scrollTop() - $.vakata.dnd.scroll_spd); }, 150); }
10206 if(sti && dir1 ===
"up") { clearInterval(sti); sti =
false; }
10208 if($(window).height() - (e.pageY - t) < 20) {
10209 if(sti && dir1 ===
"up") { clearInterval(sti); sti =
false; }
10210 if(!sti) { dir1 =
"down"; sti = setInterval(
function () { $(document).scrollTop($(document).scrollTop() + $.vakata.dnd.scroll_spd); }, 150); }
10213 if(sti && dir1 ===
"down") { clearInterval(sti); sti =
false; }
10216 if(e.pageX - l < 20) {
10217 if(sli && dir2 ===
"right") { clearInterval(sli); sli =
false; }
10218 if(!sli) { dir2 =
"left"; sli = setInterval(
function () { $(document).scrollLeft($(document).scrollLeft() - $.vakata.dnd.scroll_spd); }, 150); }
10221 if(sli && dir2 ===
"left") { clearInterval(sli); sli =
false; }
10223 if($(window).width() - (e.pageX - l) < 20) {
10224 if(sli && dir2 ===
"left") { clearInterval(sli); sli =
false; }
10225 if(!sli) { dir2 =
"right"; sli = setInterval(
function () { $(document).scrollLeft($(document).scrollLeft() + $.vakata.dnd.scroll_spd); }, 150); }
10228 if(sli && dir2 ===
"right") { clearInterval(sli); sli =
false; }
10232 $.vakata.dnd.helper.css({ left : (e.pageX + $.vakata.dnd.helper_left) +
"px", top : (e.pageY + $.vakata.dnd.helper_top) +
"px" });
10233 $(document).triggerHandler(
"drag.vakata", {
"event" : e,
"data" : $.vakata.dnd.user_data });
10235 drag_stop :
function (e) {
10236 if(sli) { clearInterval(sli); }
10237 if(sti) { clearInterval(sti); }
10238 $(document).unbind(
"mousemove", $.vakata.dnd.drag);
10239 $(document).unbind(
"mouseup", $.vakata.dnd.drag_stop);
10240 $(document).triggerHandler(
"drag_stop.vakata", {
"event" : e,
"data" : $.vakata.dnd.user_data });
10241 $.vakata.dnd.helper.remove();
10242 $.vakata.dnd.init_x = 0;
10243 $.vakata.dnd.init_y = 0;
10244 $.vakata.dnd.user_data = {};
10245 $.vakata.dnd.is_down =
false;
10246 $.vakata.dnd.is_drag =
false;
10250 var css_string =
'#vakata-dragged { display:block; margin:0 0 0 0; padding:4px 4px 4px 24px; position:absolute; top:-2000px; line-height:16px; z-index:10000; } ';
10251 $.vakata.css.add_sheet({ str : css_string, title :
"vakata" });
10254 $.jstree.plugin(
"dnd", {
10255 __init :
function () {
10273 this.get_container()
10274 .bind(
"mouseenter.jstree", $.proxy(
function (e) {
10275 if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
10276 if(
this.data.themes) {
10277 m.attr(
"class",
"jstree-" +
this.data.themes.theme);
10278 if(ml) { ml.attr(
"class",
"jstree-" + this.data.themes.theme); }
10279 $.vakata.dnd.helper.attr(
"class",
"jstree-dnd-helper jstree-" + this.data.themes.theme);
10282 if(e.currentTarget === e.target && $.vakata.dnd.user_data.obj && $($.vakata.dnd.user_data.obj).length && $($.vakata.dnd.user_data.obj).parents(
".jstree:eq(0)")[0] !== e.target) {
10283 var tr = $.jstree._reference(e.target), dc;
10284 if(tr.data.dnd.foreign) {
10285 dc = tr._get_settings().dnd.drag_check.call(
this, {
"o" : o,
"r" : tr.get_container(), is_root :
true });
10286 if(dc ===
true || dc.inside ===
true || dc.before ===
true || dc.after ===
true) {
10287 $.vakata.dnd.helper.children(
"ins").attr(
"class",
"jstree-ok");
10291 tr.prepare_move(o, tr.get_container(),
"last");
10292 if(tr.check_move()) {
10293 $.vakata.dnd.helper.children(
"ins").attr(
"class",
"jstree-ok");
10299 .bind(
"mouseup.jstree", $.proxy(
function (e) {
10301 if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree && e.currentTarget === e.target && $.vakata.dnd.user_data.obj && $($.vakata.dnd.user_data.obj).length && $($.vakata.dnd.user_data.obj).parents(
".jstree:eq(0)")[0] !== e.target) {
10302 var tr = $.jstree._reference(e.currentTarget), dc;
10303 if(tr.data.dnd.foreign) {
10304 dc = tr._get_settings().dnd.drag_check.call(
this, {
"o" : o,
"r" : tr.get_container(), is_root :
true });
10305 if(dc ===
true || dc.inside ===
true || dc.before ===
true || dc.after ===
true) {
10306 tr._get_settings().dnd.drag_finish.call(
this, {
"o" : o,
"r" : tr.get_container(), is_root :
true });
10310 tr.move_node(o, tr.get_container(),
"last", e[tr._get_settings().dnd.copy_modifier +
"Key"]);
10314 .bind(
"mouseleave.jstree", $.proxy(
function (e) {
10315 if(e.relatedTarget && e.relatedTarget.id && e.relatedTarget.id ===
"jstree-marker-line") {
10318 if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
10319 if(
this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
10320 if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
10321 if(this.data.dnd.to1) { clearTimeout(this.data.dnd.to1); }
10322 if(this.data.dnd.to2) { clearTimeout(this.data.dnd.to2); }
10323 if($.vakata.dnd.helper.children(
"ins").hasClass(
"jstree-ok")) {
10324 $.vakata.dnd.helper.children(
"ins").attr(
"class",
"jstree-invalid");
10328 .bind(
"mousemove.jstree", $.proxy(
function (e) {
10329 if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
10330 var cnt =
this.get_container()[0];
10333 if(e.pageX + 24 >
this.data.dnd.cof.left +
this.data.dnd.cw) {
10334 if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
10335 this.data.dnd.i1 = setInterval($.proxy(
function () { this.scrollLeft += $.vakata.dnd.scroll_spd; }, cnt), 100);
10337 else if(e.pageX - 24 <
this.data.dnd.cof.left) {
10338 if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
10339 this.data.dnd.i1 = setInterval($.proxy(
function () { this.scrollLeft -= $.vakata.dnd.scroll_spd; }, cnt), 100);
10342 if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
10346 if(e.pageY + 24 >
this.data.dnd.cof.top +
this.data.dnd.ch) {
10347 if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
10348 this.data.dnd.i2 = setInterval($.proxy(
function () { this.scrollTop += $.vakata.dnd.scroll_spd; }, cnt), 100);
10350 else if(e.pageY - 24 <
this.data.dnd.cof.top) {
10351 if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
10352 this.data.dnd.i2 = setInterval($.proxy(
function () { this.scrollTop -= $.vakata.dnd.scroll_spd; }, cnt), 100);
10355 if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
10360 .bind(
"scroll.jstree", $.proxy(
function (e) {
10361 if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree && m && ml) {
10366 .delegate(
"a",
"mousedown.jstree", $.proxy(
function (e) {
10367 if(e.which === 1) {
10368 this.start_drag(e.currentTarget, e);
10372 .delegate(
"a",
"mouseenter.jstree", $.proxy(
function (e) {
10373 if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
10374 this.dnd_enter(e.currentTarget);
10377 .delegate(
"a",
"mousemove.jstree", $.proxy(
function (e) {
10378 if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
10379 if(!r || !r.length || r.children(
"a")[0] !== e.currentTarget) {
10380 this.dnd_enter(e.currentTarget);
10382 if(typeof this.data.dnd.off.top ===
"undefined") { this.data.dnd.off = $(e.target).offset(); }
10383 this.data.dnd.w = (e.pageY - (this.data.dnd.off.top || 0)) % this.data.core.li_height;
10384 if(this.data.dnd.w < 0) { this.data.dnd.w += this.data.core.li_height; }
10388 .delegate(
"a",
"mouseleave.jstree", $.proxy(
function (e) {
10389 if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
10390 if(e.relatedTarget && e.relatedTarget.id && e.relatedTarget.id ===
"jstree-marker-line") {
10393 if(m) { m.hide(); }
10394 if(ml) { ml.hide(); }
10403 this.data.dnd.mto = setTimeout(
10404 (
function (t) {
return function () { t.dnd_leave(e); }; })(
this),
10408 .delegate(
"a",
"mouseup.jstree", $.proxy(
function (e) {
10409 if($.vakata.dnd.is_drag && $.vakata.dnd.user_data.jstree) {
10410 this.dnd_finish(e);
10415 .bind(
"drag_stop.vakata", $.proxy(
function () {
10416 if(this.data.dnd.to1) { clearTimeout(this.data.dnd.to1); }
10417 if(this.data.dnd.to2) { clearTimeout(this.data.dnd.to2); }
10418 if(this.data.dnd.i1) { clearInterval(this.data.dnd.i1); }
10419 if(this.data.dnd.i2) { clearInterval(this.data.dnd.i2); }
10420 this.data.dnd.after =
false;
10421 this.data.dnd.before =
false;
10422 this.data.dnd.inside =
false;
10423 this.data.dnd.off =
false;
10424 this.data.dnd.prepared =
false;
10425 this.data.dnd.w =
false;
10426 this.data.dnd.to1 =
false;
10427 this.data.dnd.to2 =
false;
10428 this.data.dnd.i1 =
false;
10429 this.data.dnd.i2 =
false;
10430 this.data.dnd.active =
false;
10431 this.data.dnd.foreign =
false;
10432 if(m) { m.css({
"top" :
"-2000px" }); }
10433 if(ml) { ml.css({
"top" :
"-2000px" }); }
10435 .bind(
"drag_start.vakata", $.proxy(
function (e, data) {
10436 if(data.data.jstree) {
10437 var et = $(data.event.target);
10438 if(et.closest(
".jstree").hasClass(
"jstree-" + this.get_index())) {
10439 this.dnd_enter(et);
10458 var s = this._get_settings().dnd;
10459 if(s.drag_target) {
10461 .delegate(s.drag_target,
"mousedown.jstree-" +
this.get_index(), $.proxy(
function (e) {
10463 $.vakata.dnd.drag_start(e, { jstree :
true, obj : e.target },
"<ins class='jstree-icon'></ins>" + $(e.target).text() );
10464 if(this.data.themes) {
10465 if(m) { m.attr(
"class",
"jstree-" + this.data.themes.theme); }
10466 if(ml) { ml.attr(
"class",
"jstree-" + this.data.themes.theme); }
10467 $.vakata.dnd.helper.attr(
"class",
"jstree-dnd-helper jstree-" + this.data.themes.theme);
10469 $.vakata.dnd.helper.children(
"ins").attr(
"class",
"jstree-invalid");
10470 var cnt = this.get_container();
10471 this.data.dnd.cof = cnt.offset();
10472 this.data.dnd.cw = parseInt(cnt.width(),10);
10473 this.data.dnd.ch = parseInt(cnt.height(),10);
10474 this.data.dnd.foreign =
true;
10475 e.preventDefault();
10478 if(s.drop_target) {
10480 .delegate(s.drop_target,
"mouseenter.jstree-" +
this.get_index(), $.proxy(
function (e) {
10481 if(this.data.dnd.active &&
this._get_settings().dnd.drop_check.call(
this, {
"o" : o,
"r" : $(e.target),
"e" : e })) {
10482 $.vakata.dnd.helper.children(
"ins").attr(
"class",
"jstree-ok");
10485 .delegate(s.drop_target,
"mouseleave.jstree-" +
this.get_index(), $.proxy(
function (e) {
10486 if(this.data.dnd.active) {
10487 $.vakata.dnd.helper.children(
"ins").attr(
"class",
"jstree-invalid");
10490 .delegate(s.drop_target,
"mouseup.jstree-" +
this.get_index(), $.proxy(
function (e) {
10491 if(this.data.dnd.active && $.vakata.dnd.helper.children(
"ins").hasClass(
"jstree-ok")) {
10492 this._get_settings().dnd.drop_finish.call(
this, {
"o" : o,
"r" : $(e.target),
"e" : e });
10498 copy_modifier :
"ctrl",
10499 check_timeout : 100,
10500 open_timeout : 500,
10501 drop_target :
".jstree-drop",
10502 drop_check :
function (data) {
return true; },
10503 drop_finish : $.noop,
10504 drag_target :
".jstree-draggable",
10505 drag_finish : $.noop,
10506 drag_check :
function (data) {
return { after :
false, before :
false, inside :
true }; }
10509 dnd_prepare :
function () {
10510 if(!r || !r.length) {
return; }
10511 this.data.dnd.off = r.offset();
10512 if(this._get_settings().core.rtl) {
10513 this.data.dnd.off.right = this.data.dnd.off.left + r.width();
10515 if(this.data.dnd.foreign) {
10516 var a = this._get_settings().dnd.drag_check.call(
this, {
"o" : o,
"r" : r });
10517 this.data.dnd.after = a.after;
10518 this.data.dnd.before = a.before;
10519 this.data.dnd.inside = a.inside;
10520 this.data.dnd.prepared =
true;
10521 return this.dnd_show();
10523 this.prepare_move(o, r,
"before");
10524 this.data.dnd.before = this.check_move();
10525 this.prepare_move(o, r,
"after");
10526 this.data.dnd.after = this.check_move();
10527 if(this._is_loaded(r)) {
10528 this.prepare_move(o, r,
"inside");
10529 this.data.dnd.inside = this.check_move();
10532 this.data.dnd.inside =
false;
10534 this.data.dnd.prepared =
true;
10535 return this.dnd_show();
10537 dnd_show :
function () {
10538 if(!this.data.dnd.prepared) {
return; }
10539 var o = [
"before",
"inside",
"after"],
10541 rtl = this._get_settings().core.rtl,
10543 if(this.data.dnd.w <
this.data.core.li_height/3) { o = [
"before",
"inside",
"after"]; }
10544 else if(this.data.dnd.w <=
this.data.core.li_height*2/3) {
10545 o = this.data.dnd.w < this.data.core.li_height/2 ? [
"inside",
"before",
"after"] : [
"inside",
"after",
"before"];
10547 else { o = [
"after",
"inside",
"before"]; }
10548 $.each(o, $.proxy(
function (i, val) {
10549 if(this.data.dnd[val]) {
10550 $.vakata.dnd.helper.children(
"ins").attr(
"class",
"jstree-ok");
10555 if(r ===
false) { $.vakata.dnd.helper.children(
"ins").attr(
"class",
"jstree-invalid"); }
10557 pos = rtl ? (this.data.dnd.off.right - 18) : (this.data.dnd.off.left + 10);
10560 m.css({
"left" : pos +
"px",
"top" : (this.data.dnd.off.top - 6) +
"px" }).show();
10561 if(ml) { ml.css({
"left" : (pos + 8) +
"px",
"top" : (this.data.dnd.off.top - 1) +
"px" }).show(); }
10564 m.css({
"left" : pos +
"px",
"top" : (this.data.dnd.off.top + this.data.core.li_height - 6) +
"px" }).show();
10565 if(ml) { ml.css({
"left" : (pos + 8) +
"px",
"top" : (this.data.dnd.off.top +
this.data.core.li_height - 1) +
"px" }).show(); }
10568 m.css({
"left" : pos + ( rtl ? -4 : 4) +
"px",
"top" : (this.data.dnd.off.top +
this.data.core.li_height/2 - 5) +
"px" }).show();
10569 if(ml) { ml.hide(); }
10573 if(ml) { ml.hide(); }
10579 dnd_open :
function () {
10580 this.data.dnd.to2 =
false;
10581 this.open_node(r, $.proxy(this.dnd_prepare,
this),
true);
10583 dnd_finish :
function (e) {
10584 if(this.data.dnd.foreign) {
10585 if(this.data.dnd.after ||
this.data.dnd.before ||
this.data.dnd.inside) {
10586 this._get_settings().dnd.drag_finish.call(
this, {
"o" : o,
"r" : r,
"p" : last_pos });
10590 this.dnd_prepare();
10591 this.move_node(o, r, last_pos, e[this._get_settings().dnd.copy_modifier +
"Key"]);
10596 if(ml) { ml.hide(); }
10598 dnd_enter :
function (obj) {
10599 if(this.data.dnd.mto) {
10600 clearTimeout(this.data.dnd.mto);
10601 this.data.dnd.mto =
false;
10603 var s = this._get_settings().dnd;
10604 this.data.dnd.prepared =
false;
10605 r = this._get_node(obj);
10606 if(s.check_timeout) {
10608 if(this.data.dnd.to1) { clearTimeout(this.data.dnd.to1); }
10609 this.data.dnd.to1 = setTimeout($.proxy(this.dnd_prepare,
this), s.check_timeout);
10612 this.dnd_prepare();
10614 if(s.open_timeout) {
10615 if(this.data.dnd.to2) { clearTimeout(this.data.dnd.to2); }
10616 if(r && r.length && r.hasClass(
"jstree-closed")) {
10618 this.data.dnd.to2 = setTimeout($.proxy(this.dnd_open,
this), s.open_timeout);
10622 if(r && r.length && r.hasClass(
"jstree-closed")) {
10627 dnd_leave :
function (e) {
10628 this.data.dnd.after =
false;
10629 this.data.dnd.before =
false;
10630 this.data.dnd.inside =
false;
10631 $.vakata.dnd.helper.children(
"ins").attr(
"class",
"jstree-invalid");
10633 if(ml) { ml.hide(); }
10634 if(r && r[0] === e.target.parentNode) {
10635 if(this.data.dnd.to1) {
10636 clearTimeout(this.data.dnd.to1);
10637 this.data.dnd.to1 =
false;
10639 if(this.data.dnd.to2) {
10640 clearTimeout(this.data.dnd.to2);
10641 this.data.dnd.to2 =
false;
10645 start_drag :
function (obj, e) {
10646 o = this._get_node(obj);
10647 if(this.data.ui &&
this.is_selected(o)) { o = this._get_node(null,
true); }
10648 var dt = o.length > 1 ? this._get_string(
"multiple_selection") : this.get_text(o),
10649 cnt = this.get_container();
10650 if(!this._get_settings().core.html_titles) { dt = dt.replace(/</ig,
"<").replace(/>/ig,
">"); }
10651 $.vakata.dnd.drag_start(e, { jstree :
true, obj : o },
"<ins class='jstree-icon'></ins>" + dt );
10652 if(this.data.themes) {
10653 if(m) { m.attr(
"class",
"jstree-" + this.data.themes.theme); }
10654 if(ml) { ml.attr(
"class",
"jstree-" + this.data.themes.theme); }
10655 $.vakata.dnd.helper.attr(
"class",
"jstree-dnd-helper jstree-" + this.data.themes.theme);
10657 this.data.dnd.cof = cnt.offset();
10658 this.data.dnd.cw = parseInt(cnt.width(),10);
10659 this.data.dnd.ch = parseInt(cnt.height(),10);
10660 this.data.dnd.active =
true;
10665 var css_string =
'' +
10666 '#vakata-dragged ins { display:block; text-decoration:none; width:16px; height:16px; margin:0 0 0 0; padding:0; position:absolute; top:4px; left:4px; ' +
10667 ' -moz-border-radius:4px; border-radius:4px; -webkit-border-radius:4px; ' +
10669 '#vakata-dragged .jstree-ok { background:green; } ' +
10670 '#vakata-dragged .jstree-invalid { background:red; } ' +
10671 '#jstree-marker { padding:0; margin:0; font-size:12px; overflow:hidden; height:12px; width:8px; position:absolute; top:-30px; z-index:10001; background-repeat:no-repeat; display:none; background-color:transparent; text-shadow:1px 1px 1px white; color:black; line-height:10px; } ' +
10672 '#jstree-marker-line { padding:0; margin:0; line-height:0%; font-size:1px; overflow:hidden; height:1px; width:100px; position:absolute; top:-30px; z-index:10000; background-repeat:no-repeat; display:none; background-color:#456c43; ' +
10673 ' cursor:pointer; border:1px solid #eeeeee; border-left:0; -moz-box-shadow: 0px 0px 2px #666; -webkit-box-shadow: 0px 0px 2px #666; box-shadow: 0px 0px 2px #666; ' +
10674 ' -moz-border-radius:1px; border-radius:1px; -webkit-border-radius:1px; ' +
10677 $.vakata.css.add_sheet({ str : css_string, title :
"jstree" });
10678 m = $(
"<div />").attr({
id :
"jstree-marker" }).hide().html(
"»")
10679 .bind(
"mouseleave mouseenter",
function (e) {
10682 e.preventDefault();
10683 e.stopImmediatePropagation();
10687 ml = $(
"<div />").attr({
id :
"jstree-marker-line" }).hide()
10688 .bind(
"mouseup",
function (e) {
10689 if(r && r.length) {
10690 r.children(
"a").trigger(e);
10691 e.preventDefault();
10692 e.stopImmediatePropagation();
10696 .bind(
"mouseleave",
function (e) {
10697 var rt = $(e.relatedTarget);
10698 if(rt.is(
".jstree") || rt.closest(
".jstree").length === 0) {
10699 if(r && r.length) {
10700 r.children(
"a").trigger(e);
10703 e.preventDefault();
10704 e.stopImmediatePropagation();
10710 $(document).bind(
"drag_start.vakata",
function (e, data) {
10711 if(data.data.jstree) { m.show();
if(ml) { ml.show(); } }
10713 $(document).bind(
"drag_stop.vakata",
function (e, data) {
10714 if(data.data.jstree) { m.hide();
if(ml) { ml.hide(); } }
10727 $.jstree.plugin(
"checkbox", {
10728 __init :
function () {
10729 this.data.checkbox.noui = this._get_settings().checkbox.override_ui;
10730 if(this.data.ui &&
this.data.checkbox.noui) {
10731 this.select_node = this.deselect_node = this.deselect_all = $.noop;
10732 this.get_selected = this.get_checked;
10735 this.get_container()
10736 .bind(
"open_node.jstree create_node.jstree clean_node.jstree refresh.jstree", $.proxy(
function (e, data) {
10737 this._prepare_checkboxes(data.rslt.obj);
10739 .bind(
"loaded.jstree", $.proxy(
function (e) {
10740 this._prepare_checkboxes();
10742 .delegate( (this.data.ui &&
this.data.checkbox.noui ?
"a" :
"ins.jstree-checkbox") ,
"click.jstree", $.proxy(function (e) {
10743 e.preventDefault();
10744 if(this._get_node(e.target).hasClass(
"jstree-checked")) { this.uncheck_node(e.target); }
10745 else { this.check_node(e.target); }
10746 if(this.data.ui &&
this.data.checkbox.noui) {
10747 this.save_selected();
10748 if(this.data.cookies) { this.save_cookie(
"select_node"); }
10751 e.stopImmediatePropagation();
10757 override_ui :
false,
10759 real_checkboxes :
false,
10760 checked_parent_open :
true,
10761 real_checkboxes_names :
function (n) {
return [ (
"check_" + (n[0].id || Math.ceil(Math.random() * 10000))) , 1]; }
10763 __destroy :
function () {
10764 this.get_container()
10765 .find(
"input.jstree-real-checkbox").removeClass(
"jstree-real-checkbox").end()
10766 .find(
"ins.jstree-checkbox").remove();
10769 _checkbox_notify :
function (n, data) {
10771 this.check_node(n,
false);
10774 _prepare_checkboxes :
function (obj) {
10775 obj = !obj || obj == -1 ? this.get_container().find(
"> ul > li") : this._get_node(obj);
10776 if(obj ===
false) {
return; }
10777 var c, _this =
this, t, ts = this._get_settings().checkbox.two_state, rc = this._get_settings().checkbox.real_checkboxes, rcn = this._get_settings().checkbox.real_checkboxes_names;
10778 obj.each(
function () {
10780 c = t.is(
"li") && (t.hasClass(
"jstree-checked") || (rc && t.children(
":checked").length)) ?
"jstree-checked" :
"jstree-unchecked";
10781 t.find(
"li").andSelf().each(
function () {
10782 var $t = $(
this), nm;
10783 $t.children(
"a" + (_this.data.languages ?
"" :
":eq(0)") ).not(
":has(.jstree-checkbox)").prepend(
"<ins class='jstree-checkbox'> </ins>").parent().not(
".jstree-checked, .jstree-unchecked").addClass( ts ?
"jstree-unchecked" : c );
10785 if(!$t.children(
":checkbox").length) {
10786 nm = rcn.call(_this, $t);
10787 $t.prepend(
"<input type='checkbox' class='jstree-real-checkbox' id='" + nm[0] +
"' name='" + nm[0] +
"' value='" + nm[1] +
"' />");
10790 $t.children(
":checkbox").addClass(
"jstree-real-checkbox");
10794 if(c ===
"jstree-checked" || $t.hasClass(
"jstree-checked") || $t.children(
':checked').length) {
10795 $t.find(
"li").andSelf().addClass(
"jstree-checked").children(
":checkbox").prop(
"checked",
true);
10799 if($t.hasClass(
"jstree-checked") || $t.children(
':checked').length) {
10800 $t.addClass(
"jstree-checked").children(
":checkbox").prop(
"checked",
true);
10806 obj.find(
".jstree-checked").parent().parent().each(
function () { _this._repair_state(
this); });
10809 change_state :
function (obj, state) {
10810 obj = this._get_node(obj);
10811 var coll =
false, rc = this._get_settings().checkbox.real_checkboxes;
10812 if(!obj || obj === -1) {
return false; }
10813 state = (state ===
false || state ===
true) ? state : obj.hasClass(
"jstree-checked");
10814 if(this._get_settings().checkbox.two_state) {
10816 obj.removeClass(
"jstree-checked").addClass(
"jstree-unchecked");
10817 if(rc) { obj.children(
":checkbox").prop(
"checked",
false); }
10820 obj.removeClass(
"jstree-unchecked").addClass(
"jstree-checked");
10821 if(rc) { obj.children(
":checkbox").prop(
"checked",
true); }
10826 coll = obj.find(
"li").andSelf();
10827 if(!coll.filter(
".jstree-checked, .jstree-undetermined").length) {
return false; }
10828 coll.removeClass(
"jstree-checked jstree-undetermined").addClass(
"jstree-unchecked");
10829 if(rc) { coll.children(
":checkbox").prop(
"checked",
false); }
10832 coll = obj.find(
"li").andSelf();
10833 if(!coll.filter(
".jstree-unchecked, .jstree-undetermined").length) {
return false; }
10834 coll.removeClass(
"jstree-unchecked jstree-undetermined").addClass(
"jstree-checked");
10835 if(rc) { coll.children(
":checkbox").prop(
"checked",
true); }
10836 if(this.data.ui) { this.data.ui.last_selected = obj; }
10837 this.data.checkbox.last_selected = obj;
10839 obj.parentsUntil(
".jstree",
"li").each(
function () {
10840 var $this = $(
this);
10842 if($this.children(
"ul").children(
"li.jstree-checked, li.jstree-undetermined").length) {
10843 $this.parentsUntil(
".jstree",
"li").andSelf().removeClass(
"jstree-checked jstree-unchecked").addClass(
"jstree-undetermined");
10844 if(rc) { $this.parentsUntil(
".jstree",
"li").andSelf().children(
":checkbox").prop(
"checked",
false); }
10848 $this.removeClass(
"jstree-checked jstree-undetermined").addClass(
"jstree-unchecked");
10849 if(rc) { $this.children(
":checkbox").prop(
"checked",
false); }
10853 if($this.children(
"ul").children(
"li.jstree-unchecked, li.jstree-undetermined").length) {
10854 $this.parentsUntil(
".jstree",
"li").andSelf().removeClass(
"jstree-checked jstree-unchecked").addClass(
"jstree-undetermined");
10855 if(rc) { $this.parentsUntil(
".jstree",
"li").andSelf().children(
":checkbox").prop(
"checked",
false); }
10859 $this.removeClass(
"jstree-unchecked jstree-undetermined").addClass(
"jstree-checked");
10860 if(rc) { $this.children(
":checkbox").prop(
"checked",
true); }
10865 if(this.data.ui &&
this.data.checkbox.noui) { this.data.ui.selected = this.get_checked(); }
10866 this.__callback(obj);
10869 check_node :
function (obj) {
10870 if(this.change_state(obj,
false)) {
10871 obj = this._get_node(obj);
10872 if(this._get_settings().checkbox.checked_parent_open) {
10874 obj.parents(
".jstree-closed").each(
function () { t.open_node(
this,
false,
true); });
10876 this.__callback({
"obj" : obj });
10879 uncheck_node :
function (obj) {
10880 if(this.change_state(obj,
true)) { this.__callback({
"obj" : this._get_node(obj) }); }
10882 check_all :
function () {
10884 coll = this._get_settings().checkbox.two_state ? this.get_container_ul().find(
"li") : this.get_container_ul().children(
"li");
10885 coll.each(
function () {
10886 _this.change_state(
this,
false);
10890 uncheck_all :
function () {
10892 coll = this._get_settings().checkbox.two_state ? this.get_container_ul().find(
"li") : this.get_container_ul().children(
"li");
10893 coll.each(
function () {
10894 _this.change_state(
this,
true);
10899 is_checked :
function(obj) {
10900 obj = this._get_node(obj);
10901 return obj.length ? obj.is(
".jstree-checked") :
false;
10903 get_checked :
function (obj, get_all) {
10904 obj = !obj || obj === -1 ? this.get_container() : this._get_node(obj);
10905 return get_all || this._get_settings().checkbox.two_state ? obj.find(
".jstree-checked") : obj.find(
"> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked");
10907 get_unchecked :
function (obj, get_all) {
10908 obj = !obj || obj === -1 ? this.get_container() : this._get_node(obj);
10909 return get_all || this._get_settings().checkbox.two_state ? obj.find(
".jstree-unchecked") : obj.find(
"> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked");
10912 show_checkboxes :
function () { this.get_container().children(
"ul").removeClass(
"jstree-no-checkboxes"); },
10913 hide_checkboxes :
function () { this.get_container().children(
"ul").addClass(
"jstree-no-checkboxes"); },
10915 _repair_state :
function (obj) {
10916 obj = this._get_node(obj);
10917 if(!obj.length) {
return; }
10918 if(this._get_settings().checkbox.two_state) {
10919 obj.find(
'li').andSelf().not(
'.jstree-checked').removeClass(
'jstree-undetermined').addClass(
'jstree-unchecked').children(
':checkbox').prop(
'checked',
true);
10922 var rc = this._get_settings().checkbox.real_checkboxes,
10923 a = obj.find(
"> ul > .jstree-checked").length,
10924 b = obj.find(
"> ul > .jstree-undetermined").length,
10925 c = obj.find(
"> ul > li").length;
10926 if(c === 0) {
if(obj.hasClass(
"jstree-undetermined")) { this.change_state(obj,
false); } }
10927 else if(a === 0 && b === 0) { this.change_state(obj,
true); }
10928 else if(a === c) { this.change_state(obj,
false); }
10930 obj.parentsUntil(
".jstree",
"li").andSelf().removeClass(
"jstree-checked jstree-unchecked").addClass(
"jstree-undetermined");
10931 if(rc) { obj.parentsUntil(
".jstree",
"li").andSelf().children(
":checkbox").prop(
"checked",
false); }
10934 reselect :
function () {
10935 if(this.data.ui &&
this.data.checkbox.noui) {
10937 s = this.data.ui.to_select;
10938 s = $.map($.makeArray(s),
function (n) {
return "#" + n.toString().replace(/^#/,
"").replace(/\\\
10939 this.deselect_all();
10940 $.each(s,
function (i, val) { _this.check_node(val); });
10947 save_loaded :
function () {
10949 this.data.core.to_load = [];
10950 this.get_container_ul().find(
"li.jstree-closed.jstree-undetermined").each(
function () {
10951 if(this.
id) { _this.data.core.to_load.push(
"#" + this.
id); }
10957 var css_string =
'.jstree .jstree-real-checkbox { display:none; } ';
10958 $.vakata.css.add_sheet({ str : css_string, title :
"jstree" });
10968 $.vakata.xslt =
function (xml, xsl, callback) {
10969 var rs =
"", xm, xs, processor, support;
10971 if(document.recalc) {
10972 xm = document.createElement(
'xml');
10973 xs = document.createElement(
'xml');
10974 xm.innerHTML = xml;
10975 xs.innerHTML = xsl;
10976 $(
"body").append(xm).append(xs);
10977 setTimeout( (
function (xm, xs, callback) {
10978 return function () {
10979 callback.call(null, xm.transformNode(xs.XMLDocument));
10980 setTimeout( (
function (xm, xs) {
return function () { $(xm).
remove(); $(xs).
remove(); }; })(xm, xs), 200);
10982 })(xm, xs, callback), 100);
10985 if(typeof window.DOMParser !==
"undefined" && typeof window.XMLHttpRequest !==
"undefined" && typeof window.XSLTProcessor ===
"undefined") {
10986 xml =
new DOMParser().parseFromString(xml,
"text/xml");
10987 xsl =
new DOMParser().parseFromString(xsl,
"text/xml");
10992 if(typeof window.DOMParser !==
"undefined" && typeof window.XMLHttpRequest !==
"undefined" && typeof window.XSLTProcessor !==
"undefined") {
10993 processor =
new XSLTProcessor();
10994 support = $.isFunction(processor.transformDocument) ? (typeof window.XMLSerializer !==
"undefined") :
true;
10995 if(!support) {
return false; }
10996 xml =
new DOMParser().parseFromString(xml,
"text/xml");
10997 xsl =
new DOMParser().parseFromString(xsl,
"text/xml");
10998 if($.isFunction(processor.transformDocument)) {
10999 rs = document.implementation.createDocument(
"",
"", null);
11000 processor.transformDocument(xml, xsl, rs, null);
11001 callback.call(null,
new XMLSerializer().serializeToString(rs));
11005 processor.importStylesheet(xsl);
11006 rs = processor.transformToFragment(xml, document);
11007 callback.call(null, $(
"<div />").append(rs).html());
11014 'nest' :
'<' +
'?xml version="1.0" encoding="utf-8" ?>' +
11015 '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >' +
11016 '<xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/html" />' +
11017 '<xsl:template match="/">' +
11018 ' <xsl:call-template name="nodes">' +
11019 ' <xsl:with-param name="node" select="/root" />' +
11020 ' </xsl:call-template>' +
11021 '</xsl:template>' +
11022 '<xsl:template name="nodes">' +
11023 ' <xsl:param name="node" />' +
11025 ' <xsl:for-each select="$node/item">' +
11026 ' <xsl:variable name="children" select="count(./item) > 0" />' +
11028 ' <xsl:attribute name="class">' +
11029 ' <xsl:if test="position() = last()">jstree-last </xsl:if>' +
11031 ' <xsl:when test="@state = \'open\'">jstree-open </xsl:when>' +
11032 ' <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when>' +
11033 ' <xsl:otherwise>jstree-leaf </xsl:otherwise>' +
11035 ' <xsl:value-of select="@class" />' +
11036 ' </xsl:attribute>' +
11037 ' <xsl:for-each select="@*">' +
11038 ' <xsl:if test="name() != \'class\' and name() != \'state\' and name() != \'hasChildren\'">' +
11039 ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' +
11041 ' </xsl:for-each>' +
11042 ' <ins class="jstree-icon"><xsl:text> </xsl:text></ins>' +
11043 ' <xsl:for-each select="content/name">' +
11045 ' <xsl:attribute name="href">' +
11047 ' <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>' +
11048 ' <xsl:otherwise>#</xsl:otherwise>' +
11050 ' </xsl:attribute>' +
11051 ' <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>' +
11052 ' <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute>' +
11053 ' <xsl:for-each select="@*">' +
11054 ' <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'">' +
11055 ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' +
11057 ' </xsl:for-each>' +
11059 ' <xsl:attribute name="class">jstree-icon ' +
11060 ' <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if>' +
11061 ' </xsl:attribute>' +
11062 ' <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>' +
11063 ' <xsl:text> </xsl:text>' +
11065 ' <xsl:copy-of select="./child::node()" />' +
11067 ' </xsl:for-each>' +
11068 ' <xsl:if test="$children or @hasChildren"><xsl:call-template name="nodes"><xsl:with-param name="node" select="current()" /></xsl:call-template></xsl:if>' +
11070 ' </xsl:for-each>' +
11072 '</xsl:template>' +
11073 '</xsl:stylesheet>',
11075 'flat' :
'<' +
'?xml version="1.0" encoding="utf-8" ?>' +
11076 '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >' +
11077 '<xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/xml" />' +
11078 '<xsl:template match="/">' +
11080 ' <xsl:for-each select="//item[not(@parent_id) or @parent_id=0 or not(@parent_id = //item/@id)]">' +
11081 ' <xsl:call-template name="nodes">' +
11082 ' <xsl:with-param name="node" select="." />' +
11083 ' <xsl:with-param name="is_last" select="number(position() = last())" />' +
11084 ' </xsl:call-template>' +
11085 ' </xsl:for-each>' +
11087 '</xsl:template>' +
11088 '<xsl:template name="nodes">' +
11089 ' <xsl:param name="node" />' +
11090 ' <xsl:param name="is_last" />' +
11091 ' <xsl:variable name="children" select="count(//item[@parent_id=$node/attribute::id]) > 0" />' +
11093 ' <xsl:attribute name="class">' +
11094 ' <xsl:if test="$is_last = true()">jstree-last </xsl:if>' +
11096 ' <xsl:when test="@state = \'open\'">jstree-open </xsl:when>' +
11097 ' <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when>' +
11098 ' <xsl:otherwise>jstree-leaf </xsl:otherwise>' +
11100 ' <xsl:value-of select="@class" />' +
11101 ' </xsl:attribute>' +
11102 ' <xsl:for-each select="@*">' +
11103 ' <xsl:if test="name() != \'parent_id\' and name() != \'hasChildren\' and name() != \'class\' and name() != \'state\'">' +
11104 ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' +
11106 ' </xsl:for-each>' +
11107 ' <ins class="jstree-icon"><xsl:text> </xsl:text></ins>' +
11108 ' <xsl:for-each select="content/name">' +
11110 ' <xsl:attribute name="href">' +
11112 ' <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>' +
11113 ' <xsl:otherwise>#</xsl:otherwise>' +
11115 ' </xsl:attribute>' +
11116 ' <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>' +
11117 ' <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute>' +
11118 ' <xsl:for-each select="@*">' +
11119 ' <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'">' +
11120 ' <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>' +
11122 ' </xsl:for-each>' +
11124 ' <xsl:attribute name="class">jstree-icon ' +
11125 ' <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if>' +
11126 ' </xsl:attribute>' +
11127 ' <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>' +
11128 ' <xsl:text> </xsl:text>' +
11130 ' <xsl:copy-of select="./child::node()" />' +
11132 ' </xsl:for-each>' +
11133 ' <xsl:if test="$children">' +
11135 ' <xsl:for-each select="//item[@parent_id=$node/attribute::id]">' +
11136 ' <xsl:call-template name="nodes">' +
11137 ' <xsl:with-param name="node" select="." />' +
11138 ' <xsl:with-param name="is_last" select="number(position() = last())" />' +
11139 ' </xsl:call-template>' +
11140 ' </xsl:for-each>' +
11144 '</xsl:template>' +
11145 '</xsl:stylesheet>'
11147 escape_xml =
function(string) {
11150 .replace(/&/g,
'&')
11151 .replace(/</g,
'<')
11152 .replace(/>/g,
'>')
11153 .replace(/
"/g, '"')
11154 .replace(/'/g, ''');
11156 $.jstree.plugin("xml_data
", {
11161 clean_node : false,
11162 correct_state : true,
11163 get_skip_empty : false,
11164 get_include_preamble : true
11167 load_node : function (obj, s_call, e_call) { var _this = this; this.load_node_xml(obj, function () { _this.__callback({ "obj
" : _this._get_node(obj) }); s_call.call(this); }, e_call); },
11168 _is_loaded : function (obj) {
11169 var s = this._get_settings().xml_data;
11170 obj = this._get_node(obj);
11171 return obj == -1 || !obj || (!s.ajax && !$.isFunction(s.data)) || obj.is(".jstree-open, .jstree-leaf
") || obj.children("ul
").children("li
").size() > 0;
11173 load_node_xml : function (obj, s_call, e_call) {
11174 var s = this.get_settings().xml_data,
11175 error_func = function () {},
11176 success_func = function () {};
11178 obj = this._get_node(obj);
11179 if(obj && obj !== -1) {
11180 if(obj.data("jstree_is_loading
")) { return; }
11181 else { obj.data("jstree_is_loading
",true); }
11184 case (!s.data && !s.ajax): throw "Neither data nor ajax settings supplied.
";
11185 case ($.isFunction(s.data)):
11186 s.data.call(this, obj, $.proxy(function (d) {
11187 this.parse_xml(d, $.proxy(function (d) {
11189 d = d.replace(/ ?xmlns="[^
"]*"/ig,
"");
11190 if(d.length > 10) {
11192 if(obj === -1 || !obj) { this.get_container().children(
"ul").empty().append(d.children()); }
11193 else { obj.children(
"a.jstree-loading").removeClass(
"jstree-loading"); obj.append(d); obj.removeData(
"jstree_is_loading"); }
11194 if(s.clean_node) { this.clean_node(obj); }
11195 if(s_call) { s_call.call(
this); }
11198 if(obj && obj !== -1) {
11199 obj.children(
"a.jstree-loading").removeClass(
"jstree-loading");
11200 obj.removeData(
"jstree_is_loading");
11201 if(s.correct_state) {
11202 this.correct_state(obj);
11203 if(s_call) { s_call.call(
this); }
11207 if(s.correct_state) {
11208 this.get_container().children(
"ul").empty();
11209 if(s_call) { s_call.call(
this); }
11217 case (!!s.data && !s.ajax) || (!!s.data && !!s.ajax && (!obj || obj === -1)):
11218 if(!obj || obj == -1) {
11219 this.parse_xml(s.data, $.proxy(function (d) {
11221 d = d.replace(/ ?xmlns=
"[^"]*
"/ig, "");
11222 if(d.length > 10) {
11224 this.get_container().children("ul
").empty().append(d.children());
11225 if(s.clean_node) { this.clean_node(obj); }
11226 if(s_call) { s_call.call(this); }
11230 if(s.correct_state) {
11231 this.get_container().children("ul
").empty();
11232 if(s_call) { s_call.call(this); }
11238 case (!s.data && !!s.ajax) || (!!s.data && !!s.ajax && obj && obj !== -1):
11239 error_func = function (x, t, e) {
11240 var ef = this.get_settings().xml_data.ajax.error;
11241 if(ef) { ef.call(this, x, t, e); }
11242 if(obj !== -1 && obj.length) {
11243 obj.children("a.jstree-loading
").removeClass("jstree-loading
");
11244 obj.removeData("jstree_is_loading
");
11245 if(t === "success
" && s.correct_state) { this.correct_state(obj); }
11248 if(t === "success
" && s.correct_state) { this.get_container().children("ul
").empty(); }
11250 if(e_call) { e_call.call(this); }
11252 success_func = function (d, t, x) {
11253 d = x.responseText;
11254 var sf = this.get_settings().xml_data.ajax.success;
11255 if(sf) { d = sf.call(this,d,t,x) || d; }
11256 if(d === "" || (d && d.toString && d.toString().replace(/^[\s\n]+$/,"") === "")) {
11257 return error_func.call(this, x, t, "");
11259 this.parse_xml(d, $.proxy(function (d) {
11261 d = d.replace(/ ?xmlns="[^
"]*"/ig,
"");
11262 if(d.length > 10) {
11264 if(obj === -1 || !obj) { this.get_container().children(
"ul").empty().append(d.children()); }
11265 else { obj.children(
"a.jstree-loading").removeClass(
"jstree-loading"); obj.append(d); obj.removeData(
"jstree_is_loading"); }
11266 if(s.clean_node) { this.clean_node(obj); }
11267 if(s_call) { s_call.call(
this); }
11270 if(obj && obj !== -1) {
11271 obj.children(
"a.jstree-loading").removeClass(
"jstree-loading");
11272 obj.removeData(
"jstree_is_loading");
11273 if(s.correct_state) {
11274 this.correct_state(obj);
11275 if(s_call) { s_call.call(
this); }
11279 if(s.correct_state) {
11280 this.get_container().children(
"ul").empty();
11281 if(s_call) { s_call.call(
this); }
11288 s.ajax.context =
this;
11289 s.ajax.error = error_func;
11290 s.ajax.success = success_func;
11291 if(!s.ajax.dataType) { s.ajax.dataType =
"xml"; }
11292 if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(
this, obj); }
11293 if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(
this, obj); }
11298 parse_xml :
function (xml, callback) {
11299 var s = this._get_settings().xml_data;
11300 $.vakata.xslt(xml, xsl[s.xsl], callback);
11302 get_xml :
function (tp, obj, li_attr, a_attr, is_callback) {
11304 s = this._get_settings(),
11306 tmp1, tmp2, li,
a, lang;
11307 if(!tp) { tp =
"flat"; }
11308 if(!is_callback) { is_callback = 0; }
11309 obj = this._get_node(obj);
11310 if(!obj || obj === -1) { obj = this.get_container().find(
"> ul > li"); }
11311 li_attr = $.isArray(li_attr) ? li_attr : [
"id",
"class" ];
11312 if(!is_callback && this.data.types && $.inArray(s.types.type_attr, li_attr) === -1) { li_attr.push(s.types.type_attr); }
11314 a_attr = $.isArray(a_attr) ? a_attr : [ ];
11317 if(s.xml_data.get_include_preamble) {
11318 result +=
'<' +
'?xml version="1.0" encoding="UTF-8"?' +
'>';
11320 result +=
"<root>";
11322 obj.each(
function () {
11325 $.each(li_attr,
function (i, v) {
11326 var t = li.attr(v);
11327 if(!s.xml_data.get_skip_empty || typeof t !==
"undefined") {
11328 result +=
" " + v +
"=\"" + escape_xml((
" " + (t ||
"")).replace(/ jstree[^ ]*/ig,
'').replace(/\s+$/ig,
" ").replace(/^ /,
"").replace(/ $/,
"")) +
"\"";
11331 if(li.hasClass(
"jstree-open")) { result +=
" state=\"open\""; }
11332 if(li.hasClass(
"jstree-closed")) { result +=
" state=\"closed\""; }
11333 if(tp ===
"flat") { result +=
" parent_id=\"" + escape_xml(is_callback) +
"\""; }
11335 result +=
"<content>";
11336 a = li.children(
"a");
11337 a.each(
function () {
11341 if($.inArray(
"languages", s.plugins) !== -1) {
11342 $.each(s.languages, function (k, z) {
11343 if(tmp1.hasClass(z)) { result +=
" lang=\"" + escape_xml(z) +
"\""; lang = z;
return false; }
11346 if(a_attr.length) {
11347 $.each(a_attr,
function (k, z) {
11348 var t = tmp1.attr(z);
11349 if(!s.xml_data.get_skip_empty || typeof t !==
"undefined") {
11350 result +=
" " + z +
"=\"" + escape_xml((
" " + t ||
"").replace(/ jstree[^ ]*/ig,
'').replace(/\s+$/ig,
" ").replace(/^ /,
"").replace(/ $/,
"")) +
"\"";
11354 if(tmp1.children(
"ins").get(0).className.replace(/jstree[^ ]*|$/ig,
'').replace(/^\s+$/ig,
"").length) {
11355 result +=
' icon="' + escape_xml(tmp1.children(
"ins").get(0).className.replace(/jstree[^ ]*|$/ig,
'').replace(/\s+$/ig,
" ").replace(/^ /,
"").replace(/ $/,
"")) +
'"';
11357 if(tmp1.children(
"ins").get(0).style.backgroundImage.length) {
11358 result +=
' icon="' + escape_xml(tmp1.children(
"ins").get(0).style.backgroundImage.replace(
"url(",
"").replace(
")",
"").replace(/
'/ig,"").replace(/"/ig,"")) + '"';
11361 result += "<![CDATA[
" + _this.get_text(tmp1, lang) + "]]>
";
11362 result += "</name>
";
11364 result += "</content>
";
11365 tmp2 = li[0].id || true;
11366 li = li.find("> ul > li
");
11367 if(li.length) { tmp2 = _this.get_xml(tp, li, li_attr, a_attr, tmp2); }
11368 else { tmp2 = ""; }
11369 if(tp == "nest
") { result += tmp2; }
11370 result += "</item>
";
11371 if(tp == "flat
") { result += tmp2; }
11373 if(!is_callback) { result += "</root>
"; }
11382 * jsTree search plugin
11383 * Enables both sync and async search on the tree
11384 * DOES NOT WORK WITH JSON PROGRESSIVE RENDER
11387 $.expr[':'].jstree_contains = function(a,i,m){
11388 return (a.textContent || a.innerText || "").toLowerCase().indexOf(m[3].toLowerCase())>=0;
11390 $.expr[':'].jstree_title_contains = function(a,i,m) {
11391 return (a.getAttribute("title
") || "").toLowerCase().indexOf(m[3].toLowerCase())>=0;
11393 $.jstree.plugin("search
", {
11394 __init : function () {
11395 this.data.search.str = "";
11396 this.data.search.result = $();
11397 if(this._get_settings().search.show_only_matches) {
11398 this.get_container()
11399 .bind("search.jstree
", function (e, data) {
11400 $(this).children("ul
").find("li
").hide().removeClass("jstree-last
");
11401 data.rslt.nodes.parentsUntil(".jstree
").andSelf().show()
11402 .filter("ul
").each(function () { $(this).children("li:visible
").eq(-1).addClass("jstree-last
"); });
11404 .bind("clear_search.jstree
", function () {
11405 $(this).children("ul
").find("li
").css("display
","").end().end().jstree("clean_node
", -1);
11411 search_method : "jstree_contains
", // for case insensitive - jstree_contains
11412 show_only_matches : false
11415 search : function (str, skip_async) {
11416 if($.trim(str) === "") { this.clear_search(); return; }
11417 var s = this.get_settings().search,
11419 error_func = function () { },
11420 success_func = function () { };
11421 this.data.search.str = str;
11423 if(!skip_async && s.ajax !== false && this.get_container_ul().find("li.jstree-closed:not(:has(ul)):eq(0)
").length > 0) {
11424 this.search.supress_callback = true;
11425 error_func = function () { };
11426 success_func = function (d, t, x) {
11427 var sf = this.get_settings().search.ajax.success;
11428 if(sf) { d = sf.call(this,d,t,x) || d; }
11429 this.data.search.to_open = d;
11430 this._search_open();
11432 s.ajax.context = this;
11433 s.ajax.error = error_func;
11434 s.ajax.success = success_func;
11435 if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, str); }
11436 if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, str); }
11437 if(!s.ajax.data) { s.ajax.data = { "search_string
" : str }; }
11438 if(!s.ajax.dataType || /^json/.exec(s.ajax.dataType)) { s.ajax.dataType = "json
"; }
11442 if(this.data.search.result.length) { this.clear_search(); }
11443 this.data.search.result = this.get_container().find("a
" + (this.data.languages ? ".
" + this.get_lang() : "" ) + ":
" + (s.search_method) + "(
" + this.data.search.str + ")
");
11444 this.data.search.result.addClass("jstree-search
").parent().parents(".jstree-closed
").each(function () {
11445 t.open_node(this, false, true);
11447 this.__callback({ nodes : this.data.search.result, str : str });
11449 clear_search : function (str) {
11450 this.data.search.result.removeClass("jstree-search
");
11451 this.__callback(this.data.search.result);
11452 this.data.search.result = $();
11454 _search_open : function (is_callback) {
11459 if(this.data.search.to_open.length) {
11460 $.each(this.data.search.to_open, function (i, val) {
11461 if(val == "#
") { return true; }
11462 if($(val).length && $(val).is(".jstree-closed
")) { current.push(val); }
11463 else { remaining.push(val); }
11465 if(current.length) {
11466 this.data.search.to_open = remaining;
11467 $.each(current, function (i, val) {
11468 _this.open_node(val, function () { _this._search_open(true); });
11473 if(done) { this.search(this.data.search.str, true); }
11481 * jsTree contextmenu plugin
11484 $.vakata.context = {
11485 hide_on_mouseleave : false,
11487 cnt : $("<div
id=
'vakata-contextmenu' />
"),
11494 show : function (s, t, x, y, d, p, rtl) {
11495 $.vakata.context.rtl = !!rtl;
11496 var html = $.vakata.context.parse(s), h, w;
11497 if(!html) { return; }
11498 $.vakata.context.vis = true;
11499 $.vakata.context.tgt = t;
11500 $.vakata.context.par = p || t || null;
11501 $.vakata.context.data = d || null;
11502 $.vakata.context.cnt
11504 .css({ "visibility
" : "hidden
", "display
" : "block
", "left
" : 0, "top
" : 0 });
11506 if($.vakata.context.hide_on_mouseleave) {
11507 $.vakata.context.cnt
11508 .one("mouseleave
", function(e) { $.vakata.context.hide(); });
11511 h = $.vakata.context.cnt.height();
11512 w = $.vakata.context.cnt.width();
11513 if(x + w > $(document).width()) {
11514 x = $(document).width() - (w + 5);
11515 $.vakata.context.cnt.find("li > ul
").addClass("right
");
11517 if(y + h > $(document).height()) {
11518 y = y - (h + t[0].offsetHeight);
11519 $.vakata.context.cnt.find("li > ul
").addClass("bottom
");
11522 $.vakata.context.cnt
11523 .css({ "left
" : x, "top
" : y })
11524 .find("li:has(ul)
")
11525 .bind("mouseenter
", function (e) {
11526 var w = $(document).width(),
11527 h = $(document).height(),
11528 ul = $(this).children("ul
").show();
11529 if(w !== $(document).width()) { ul.toggleClass("right
"); }
11530 if(h !== $(document).height()) { ul.toggleClass("bottom
"); }
11532 .bind("mouseleave
", function (e) {
11533 $(this).children("ul
").hide();
11536 .css({ "visibility
" : "visible
" })
11538 $(document).triggerHandler("context_show.vakata
");
11540 hide : function () {
11541 $.vakata.context.vis = false;
11542 $.vakata.context.cnt.attr("class","").css({ "visibility
" : "hidden
" });
11543 $(document).triggerHandler("context_hide.vakata
");
11545 parse : function (s, is_callback) {
11546 if(!s) { return false; }
11550 if(!is_callback) { $.vakata.context.func = {}; }
11552 $.each(s, function (i, val) {
11553 if(!val) { return true; }
11554 $.vakata.context.func[i] = val.action;
11555 if(!was_sep && val.separator_before) {
11556 str += "<li
class=
'vakata-separator vakata-separator-before'></li>
";
11559 str += "<li
class=
'" + (val._class || "") + (val._disabled ? " jstree-contextmenu-disabled " : "") + "'><ins
";
11560 if(val.icon && val.icon.indexOf("/
") === -1) { str += " class=
'" + val.icon + "' "; }
11561 if(val.icon && val.icon.indexOf("/
") !== -1) { str += " style=
'background:url(" + val.icon + ") center center no-repeat;' "; }
11562 str += "> </ins><a href=
'#' rel=
'" + i + "'>
";
11564 str += "<span style=
'float:" + ($.vakata.context.rtl ? "left" : "right") + ";'>»</span>
";
11566 str += val.label + "</a>
";
11568 tmp = $.vakata.context.parse(val.submenu, true);
11569 if(tmp) { str += tmp; }
11572 if(val.separator_after) {
11573 str += "<li
class=
'vakata-separator vakata-separator-after'></li>
";
11577 str = str.replace(/<li class\='vakata-separator vakata-separator-after'><\/li>$/,"");
11579 $(document).triggerHandler("context_parse.vakata
");
11580 return str.length > 10 ? str : false;
11582 exec : function (i) {
11583 if($.isFunction($.vakata.context.func[i])) {
11584 // if is string - eval and call it!
11585 $.vakata.context.func[i].call($.vakata.context.data, $.vakata.context.par);
11588 else { return false; }
11592 var css_string = '' +
11593 '#vakata-contextmenu { display:block; visibility:hidden; left:0; top:-200px; position:absolute; margin:0; padding:0; min-width:180px; background:#ebebeb; border:1px solid silver; z-index:10000; *width:180px; } ' +
11594 '#vakata-contextmenu ul { min-width:180px; *width:180px; } ' +
11595 '#vakata-contextmenu ul, #vakata-contextmenu li { margin:0; padding:0; list-style-type:none; display:block; } ' +
11596 '#vakata-contextmenu li { line-height:20px; min-height:20px; position:relative; padding:0px; } ' +
11597 '#vakata-contextmenu li a { padding:1px 6px; line-height:17px; display:block; text-decoration:none; margin:1px 1px 0 1px; } ' +
11598 '#vakata-contextmenu li ins { float:left; width:16px; height:16px; text-decoration:none; margin-right:2px; } ' +
11599 '#vakata-contextmenu li a:hover, #vakata-contextmenu li.vakata-hover > a { background:gray; color:white; } ' +
11600 '#vakata-contextmenu li ul { display:none; position:absolute; top:-2px; left:100%; background:#ebebeb; border:1px solid gray; } ' +
11601 '#vakata-contextmenu .right { right:100%; left:auto; } ' +
11602 '#vakata-contextmenu .bottom { bottom:-1px; top:auto; } ' +
11603 '#vakata-contextmenu li.vakata-separator { min-height:0; height:1px; line-height:1px; font-size:1px; overflow:hidden; margin:0 2px; background:silver; /* border-top:1px solid #fefefe; */ padding:0; } ';
11604 $.vakata.css.add_sheet({ str : css_string, title : "vakata
" });
11605 $.vakata.context.cnt
11606 .delegate("a
","click
", function (e) { e.preventDefault(); })
11607 .delegate("a
","mouseup
", function (e) {
11608 if(!$(this).parent().hasClass("jstree-contextmenu-disabled
") && $.vakata.context.exec($(this).attr("rel
"))) {
11609 $.vakata.context.hide();
11611 else { $(this).blur(); }
11613 .delegate("a
","mouseover
", function () {
11614 $.vakata.context.cnt.find(".vakata-hover
").removeClass("vakata-hover
");
11617 $(document).bind("mousedown
", function (e) { if($.vakata.context.vis && !$.contains($.vakata.context.cnt[0], e.target)) { $.vakata.context.hide(); } });
11618 if(typeof $.hotkeys !== "undefined
") {
11620 .bind("keydown
", "up
", function (e) {
11621 if($.vakata.context.vis) {
11622 var o = $.vakata.context.cnt.find("ul:visible
").last().children(".vakata-hover
").removeClass("vakata-hover
").prevAll("li:not(.vakata-separator)
").first();
11623 if(!o.length) { o = $.vakata.context.cnt.find("ul:visible
").last().children("li:not(.vakata-separator)
").last(); }
11624 o.addClass("vakata-hover
");
11625 e.stopImmediatePropagation();
11626 e.preventDefault();
11629 .bind("keydown
", "down
", function (e) {
11630 if($.vakata.context.vis) {
11631 var o = $.vakata.context.cnt.find("ul:visible
").last().children(".vakata-hover
").removeClass("vakata-hover
").nextAll("li:not(.vakata-separator)
").first();
11632 if(!o.length) { o = $.vakata.context.cnt.find("ul:visible
").last().children("li:not(.vakata-separator)
").first(); }
11633 o.addClass("vakata-hover
");
11634 e.stopImmediatePropagation();
11635 e.preventDefault();
11638 .bind("keydown
", "right
", function (e) {
11639 if($.vakata.context.vis) {
11640 $.vakata.context.cnt.find(".vakata-hover
").children("ul
").show().children("li:not(.vakata-separator)
").removeClass("vakata-hover
").first().addClass("vakata-hover
");
11641 e.stopImmediatePropagation();
11642 e.preventDefault();
11645 .bind("keydown
", "left
", function (e) {
11646 if($.vakata.context.vis) {
11647 $.vakata.context.cnt.find(".vakata-hover
").children("ul
").hide().children(".vakata-separator
").removeClass("vakata-hover
");
11648 e.stopImmediatePropagation();
11649 e.preventDefault();
11652 .bind("keydown
", "esc
", function (e) {
11653 $.vakata.context.hide();
11654 e.preventDefault();
11656 .bind("keydown
", "space
", function (e) {
11657 $.vakata.context.cnt.find(".vakata-hover
").last().children("a
").click();
11658 e.preventDefault();
11663 $.jstree.plugin("contextmenu
", {
11664 __init : function () {
11665 this.get_container()
11666 .delegate("a
", "contextmenu.jstree
", $.proxy(function (e) {
11667 e.preventDefault();
11668 if(!$(e.currentTarget).hasClass("jstree-loading
")) {
11669 this.show_contextmenu(e.currentTarget, e.pageX, e.pageY);
11672 .delegate("a
", "click.jstree
", $.proxy(function (e) {
11673 if(this.data.contextmenu) {
11674 $.vakata.context.hide();
11677 .bind("destroy.jstree
", $.proxy(function () {
11678 // TODO: move this to descruct method
11679 if(this.data.contextmenu) {
11680 $.vakata.context.hide();
11683 $(document).bind("context_hide.vakata
", $.proxy(function () { this.data.contextmenu = false; }, this));
11686 select_node : false, // requires UI plugin
11687 show_at_node : true,
11688 items : { // Could be a function that should return an object like this one
11690 "separator_before
" : false,
11691 "separator_after
" : true,
11692 "label
" : "Create
",
11693 "action
" : function (obj) { this.create(obj); }
11696 "separator_before
" : false,
11697 "separator_after
" : false,
11698 "label
" : "Rename
",
11699 "action
" : function (obj) { this.rename(obj); }
11702 "separator_before
" : false,
11704 "separator_after
" : false,
11705 "label
" : "Delete
",
11706 "action
" : function (obj) { if(this.is_selected(obj)) { this.remove(); } else { this.remove(obj); } }
11709 "separator_before
" : true,
11711 "separator_after
" : false,
11716 "separator_before
" : false,
11717 "separator_after
" : false,
11719 "action
" : function (obj) { this.cut(obj); }
11722 "separator_before
" : false,
11724 "separator_after
" : false,
11726 "action
" : function (obj) { this.copy(obj); }
11729 "separator_before
" : false,
11731 "separator_after
" : false,
11733 "action
" : function (obj) { this.paste(obj); }
11740 show_contextmenu : function (obj, x, y) {
11741 obj = this._get_node(obj);
11742 var s = this.get_settings().contextmenu,
11743 a = obj.children("a:visible:eq(0)
"),
11746 if(s.select_node && this.data.ui && !this.is_selected(obj)) {
11747 this.deselect_all();
11748 this.select_node(obj, true);
11750 if(s.show_at_node || typeof x === "undefined
" || typeof y === "undefined
") {
11753 y = o.top + this.data.core.li_height;
11755 i = obj.data("jstree
") && obj.data("jstree
").contextmenu ? obj.data("jstree
").contextmenu : s.items;
11756 if($.isFunction(i)) { i = i.call(this, obj); }
11757 this.data.contextmenu = true;
11758 $.vakata.context.show(i, a, x, y, this, obj, this._get_settings().core.rtl);
11759 if(this.data.themes) { $.vakata.context.cnt.attr("class", "jstree-
" + this.data.themes.theme + "-context
"); }
11767 * jsTree types plugin
11768 * Adds support types of nodes
11769 * You can set an attribute on each li node, that represents its type.
11770 * According to the type setting the node may get custom icon/validation rules
11773 $.jstree.plugin("types
", {
11774 __init : function () {
11775 var s = this._get_settings().types;
11776 this.data.types.attach_to = [];
11777 this.get_container()
11778 .bind("init.jstree
", $.proxy(function () {
11779 var types = s.types,
11780 attr = s.type_attr,
11784 $.each(types, function (i, tp) {
11785 $.each(tp, function (k, v) {
11786 if(!/^(max_depth|max_children|icon|valid_children)$/.test(k)) { _this.data.types.attach_to.push(k); }
11788 if(!tp.icon) { return true; }
11789 if( tp.icon.image || tp.icon.position) {
11790 if(i == "default") { icons_css += '.jstree-' + _this.get_index() + ' a > .jstree-icon { '; }
11791 else { icons_css += '.jstree-' + _this.get_index() + ' li[' + attr + '="' + i + '"] > a > .jstree-icon { '; }
11792 if(tp.icon.image) { icons_css += ' background-image:url(' + tp.icon.image + '); '; }
11793 if(tp.icon.position){ icons_css += ' background-position:' + tp.icon.position + '; '; }
11794 else { icons_css += ' background-position:0 0; '; }
11798 if(icons_css !== "") { $.vakata.css.add_sheet({ 'str' : icons_css, title : "jstree-types
" }); }
11800 .bind("before.jstree
", $.proxy(function (e, data) {
11802 o = this._get_settings().types.use_data ? this._get_node(data.args[0]) : false,
11803 d = o && o !== -1 && o.length ? o.data("jstree
") : false;
11804 if(d && d.types && d.types[data.func] === false) { e.stopImmediatePropagation(); return false; }
11805 if($.inArray(data.func, this.data.types.attach_to) !== -1) {
11806 if(!data.args[0] || (!data.args[0].tagName && !data.args[0].jquery)) { return; }
11807 s = this._get_settings().types.types;
11808 t = this._get_type(data.args[0]);
11811 (s[t] && typeof s[t][data.func] !== "undefined
") ||
11812 (s["default"] && typeof s["default"][data.func] !== "undefined
")
11813 ) && this._check(data.func, data.args[0]) === false
11815 e.stopImmediatePropagation();
11821 this.get_container()
11822 .bind("load_node.jstree set_type.jstree
", $.proxy(function (e, data) {
11823 var r = data && data.rslt && data.rslt.obj && data.rslt.obj !== -1 ? this._get_node(data.rslt.obj).parent() : this.get_container_ul(),
11825 s = this._get_settings().types;
11826 $.each(s.types, function (i, tp) {
11827 if(tp.icon && (tp.icon.image || tp.icon.position)) {
11828 c = i === "default" ? r.find("li > a > .jstree-icon
") : r.find("li[
" + s.type_attr + "=
'" + i + "'] > a > .jstree-icon
");
11829 if(tp.icon.image) { c.css("backgroundImage
","url(
" + tp.icon.image + ")
"); }
11830 c.css("backgroundPosition
", tp.icon.position || "0 0
");
11837 // defines maximum number of root nodes (-1 means unlimited, -2 means disable max_children checking)
11839 // defines the maximum depth of the tree (-1 means unlimited, -2 means disable max_depth checking)
11841 // defines valid node types for the root nodes
11842 valid_children : "all
",
11844 // whether to use $.data
11846 // where is the type stores (the rel attribute of the LI element)
11850 // the default type
11852 "max_children
" : -1,
11854 "valid_children
": "all
"
11856 // Bound functions - you can bind any other function here (using boolean or function)
11857 //"select_node
" : true
11862 _types_notify : function (n, data) {
11863 if(data.type && this._get_settings().types.use_data) {
11864 this.set_type(data.type, n);
11867 _get_type : function (obj) {
11868 obj = this._get_node(obj);
11869 return (!obj || !obj.length) ? false : obj.attr(this._get_settings().types.type_attr) || "default";
11871 set_type : function (str, obj) {
11872 obj = this._get_node(obj);
11873 var ret = (!obj.length || !str) ? false : obj.attr(this._get_settings().types.type_attr, str);
11874 if(ret) { this.__callback({ obj : obj, type : str}); }
11877 _check : function (rule, obj, opts) {
11878 obj = this._get_node(obj);
11879 var v = false, t = this._get_type(obj), d = 0, _this = this, s = this._get_settings().types, data = false;
11881 if(!!s[rule]) { v = s[rule]; }
11885 if(t === false) { return; }
11886 data = s.use_data ? obj.data("jstree
") : false;
11887 if(data && data.types && typeof data.types[rule] !== "undefined
") { v = data.types[rule]; }
11888 else if(!!s.types[t] && typeof s.types[t][rule] !== "undefined
") { v = s.types[t][rule]; }
11889 else if(!!s.types["default"] && typeof s.types["default"][rule] !== "undefined
") { v = s.types["default"][rule]; }
11891 if($.isFunction(v)) { v = v.call(this, obj); }
11892 if(rule === "max_depth
" && obj !== -1 && opts !== false && s.max_depth !== -2 && v !== 0) {
11893 // also include the node itself - otherwise if root node it is not checked
11894 obj.children("a:eq(0)
").parentsUntil(".jstree
","li
").each(function (i) {
11895 // check if current depth already exceeds global tree depth
11896 if(s.max_depth !== -1 && s.max_depth - (i + 1) <= 0) { v = 0; return false; }
11897 d = (i === 0) ? v : _this._check(rule, this, false);
11898 // check if current node max depth is already matched or exceeded
11899 if(d !== -1 && d - (i + 1) <= 0) { v = 0; return false; }
11900 // otherwise - set the max depth to the current value minus current depth
11901 if(d >= 0 && (d - (i + 1) < v || v < 0) ) { v = d - (i + 1); }
11902 // if the global tree depth exists and it minus the nodes calculated so far is less than `v` or `v` is unlimited
11903 if(s.max_depth >= 0 && (s.max_depth - (i + 1) < v || v < 0) ) { v = s.max_depth - (i + 1); }
11908 check_move : function () {
11909 if(!this.__call_old()) { return false; }
11910 var m = this._get_move(),
11911 s = m.rt._get_settings().types,
11912 mc = m.rt._check("max_children
", m.cr),
11913 md = m.rt._check("max_depth
", m.cr),
11914 vc = m.rt._check("valid_children
", m.cr),
11917 if(vc === "none
") { return false; }
11918 if($.isArray(vc) && m.ot && m.ot._get_type) {
11919 m.o.each(function () {
11920 if($.inArray(m.ot._get_type(this), vc) === -1) { d = false; return false; }
11922 if(d === false) { return false; }
11924 if(s.max_children !== -2 && mc !== -1) {
11925 ch = m.cr === -1 ? this.get_container().find("> ul > li
").not(m.o).length : m.cr.find("> ul > li
").not(m.o).length;
11926 if(ch + m.o.length > mc) { return false; }
11928 if(s.max_depth !== -2 && md !== -1) {
11930 if(md === 0) { return false; }
11931 if(typeof m.o.d === "undefined
") {
11932 // TODO: deal with progressive rendering and async when checking max_depth (how to know the depth of the moved node)
11934 while(t.length > 0) {
11935 t = t.find("> ul > li
");
11940 if(md - m.o.d < 0) { return false; }
11944 create_node : function (obj, position, js, callback, is_loaded, skip_check) {
11945 if(!skip_check && (is_loaded || this._is_loaded(obj))) {
11946 var p = (typeof position == "string" && position.match(/^before|after$/i) && obj !== -1) ? this._get_parent(obj) : this._get_node(obj),
11947 s = this._get_settings().types,
11948 mc = this._check("max_children
", p),
11949 md = this._check("max_depth
", p),
11950 vc = this._check("valid_children
", p),
11952 if(typeof js === "string") { js = { data : js }; }
11953 if(!js) { js = {}; }
11954 if(vc === "none
") { return false; }
11955 if($.isArray(vc)) {
11956 if(!js.attr || !js.attr[s.type_attr]) {
11957 if(!js.attr) { js.attr = {}; }
11958 js.attr[s.type_attr] = vc[0];
11961 if($.inArray(js.attr[s.type_attr], vc) === -1) { return false; }
11964 if(s.max_children !== -2 && mc !== -1) {
11965 ch = p === -1 ? this.get_container().find("> ul > li
").length : p.find("> ul > li
").length;
11966 if(ch + 1 > mc) { return false; }
11968 if(s.max_depth !== -2 && md !== -1 && (md - 1) < 0) { return false; }
11970 return this.__call_old(true, obj, position, js, callback, is_loaded, skip_check);
11978 * jsTree HTML plugin
11979 * The HTML data store. Datastores are build by replacing the `load_node` and `_is_loaded` functions.
11982 $.jstree.plugin("html_data
", {
11983 __init : function () {
11984 // this used to use html() and clean the whitespace, but this way any attached data was lost
11985 this.data.html_data.original_container_html = this.get_container().find(" > ul > li
").clone(true);
11986 // remove white space from LI node - otherwise nodes appear a bit to the right
11987 this.data.html_data.original_container_html.find("li
").andSelf().contents().filter(function() { return this.nodeType == 3; }).remove();
11992 correct_state : true
11995 load_node : function (obj, s_call, e_call) { var _this = this; this.load_node_html(obj, function () { _this.__callback({ "obj
" : _this._get_node(obj) }); s_call.call(this); }, e_call); },
11996 _is_loaded : function (obj) {
11997 obj = this._get_node(obj);
11998 return obj == -1 || !obj || (!this._get_settings().html_data.ajax && !$.isFunction(this._get_settings().html_data.data)) || obj.is(".jstree-open, .jstree-leaf
") || obj.children("ul
").children("li
").size() > 0;
12000 load_node_html : function (obj, s_call, e_call) {
12002 s = this.get_settings().html_data,
12003 error_func = function () {},
12004 success_func = function () {};
12005 obj = this._get_node(obj);
12006 if(obj && obj !== -1) {
12007 if(obj.data("jstree_is_loading
")) { return; }
12008 else { obj.data("jstree_is_loading
",true); }
12011 case ($.isFunction(s.data)):
12012 s.data.call(this, obj, $.proxy(function (d) {
12013 if(d && d !== "" && d.toString && d.toString().replace(/^[\s\n]+$/,"") !== "") {
12015 if(!d.is("ul
")) { d = $("<ul />
").append(d); }
12016 if(obj == -1 || !obj) { this.get_container().children("ul
").empty().append(d.children()).find("li, a
").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS
"; }).prepend("<ins
class=
'jstree-icon'> </ins>
").end().filter("a
").children("ins:first-child
").not(".jstree-icon
").addClass("jstree-icon
"); }
12017 else { obj.children("a.jstree-loading
").removeClass("jstree-loading
"); obj.append(d).children("ul
").find("li, a
").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS
"; }).prepend("<ins
class=
'jstree-icon'> </ins>
").end().filter("a
").children("ins:first-child
").not(".jstree-icon
").addClass("jstree-icon
"); obj.removeData("jstree_is_loading
"); }
12018 this.clean_node(obj);
12019 if(s_call) { s_call.call(this); }
12022 if(obj && obj !== -1) {
12023 obj.children("a.jstree-loading
").removeClass("jstree-loading
");
12024 obj.removeData("jstree_is_loading
");
12025 if(s.correct_state) {
12026 this.correct_state(obj);
12027 if(s_call) { s_call.call(this); }
12031 if(s.correct_state) {
12032 this.get_container().children("ul
").empty();
12033 if(s_call) { s_call.call(this); }
12039 case (!s.data && !s.ajax):
12040 if(!obj || obj == -1) {
12041 this.get_container()
12042 .children("ul
").empty()
12043 .append(this.data.html_data.original_container_html)
12044 .find("li, a
").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS
"; }).prepend("<ins
class=
'jstree-icon'> </ins>
").end()
12045 .filter("a
").children("ins:first-child
").not(".jstree-icon
").addClass("jstree-icon
");
12048 if(s_call) { s_call.call(this); }
12050 case (!!s.data && !s.ajax) || (!!s.data && !!s.ajax && (!obj || obj === -1)):
12051 if(!obj || obj == -1) {
12053 if(!d.is("ul
")) { d = $("<ul />
").append(d); }
12054 this.get_container()
12055 .children("ul
").empty().append(d.children())
12056 .find("li, a
").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS
"; }).prepend("<ins
class=
'jstree-icon'> </ins>
").end()
12057 .filter("a
").children("ins:first-child
").not(".jstree-icon
").addClass("jstree-icon
");
12060 if(s_call) { s_call.call(this); }
12062 case (!s.data && !!s.ajax) || (!!s.data && !!s.ajax && obj && obj !== -1):
12063 obj = this._get_node(obj);
12064 error_func = function (x, t, e) {
12065 var ef = this.get_settings().html_data.ajax.error;
12066 if(ef) { ef.call(this, x, t, e); }
12067 if(obj != -1 && obj.length) {
12068 obj.children("a.jstree-loading
").removeClass("jstree-loading
");
12069 obj.removeData("jstree_is_loading
");
12070 if(t === "success
" && s.correct_state) { this.correct_state(obj); }
12073 if(t === "success
" && s.correct_state) { this.get_container().children("ul
").empty(); }
12075 if(e_call) { e_call.call(this); }
12077 success_func = function (d, t, x) {
12078 var sf = this.get_settings().html_data.ajax.success;
12079 if(sf) { d = sf.call(this,d,t,x) || d; }
12080 if(d === "" || (d && d.toString && d.toString().replace(/^[\s\n]+$/,"") === "")) {
12081 return error_func.call(this, x, t, "");
12085 if(!d.is("ul
")) { d = $("<ul />
").append(d); }
12086 if(obj == -1 || !obj) { this.get_container().children("ul
").empty().append(d.children()).find("li, a
").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS
"; }).prepend("<ins
class=
'jstree-icon'> </ins>
").end().filter("a
").children("ins:first-child
").not(".jstree-icon
").addClass("jstree-icon
"); }
12087 else { obj.children("a.jstree-loading
").removeClass("jstree-loading
"); obj.append(d).children("ul
").find("li, a
").filter(function () { return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS
"; }).prepend("<ins
class=
'jstree-icon'> </ins>
").end().filter("a
").children("ins:first-child
").not(".jstree-icon
").addClass("jstree-icon
"); obj.removeData("jstree_is_loading
"); }
12088 this.clean_node(obj);
12089 if(s_call) { s_call.call(this); }
12092 if(obj && obj !== -1) {
12093 obj.children("a.jstree-loading
").removeClass("jstree-loading
");
12094 obj.removeData("jstree_is_loading
");
12095 if(s.correct_state) {
12096 this.correct_state(obj);
12097 if(s_call) { s_call.call(this); }
12101 if(s.correct_state) {
12102 this.get_container().children("ul
").empty();
12103 if(s_call) { s_call.call(this); }
12108 s.ajax.context = this;
12109 s.ajax.error = error_func;
12110 s.ajax.success = success_func;
12111 if(!s.ajax.dataType) { s.ajax.dataType = "html
"; }
12112 if($.isFunction(s.ajax.url)) { s.ajax.url = s.ajax.url.call(this, obj); }
12113 if($.isFunction(s.ajax.data)) { s.ajax.data = s.ajax.data.call(this, obj); }
12120 // include the HTML data plugin by default
12121 $.jstree.defaults.plugins.push("html_data
");
12126 * jsTree themeroller plugin
12127 * Adds support for jQuery UI themes. Include this at the end of your plugins list, also make sure "themes
" is not included.
12130 $.jstree.plugin("themeroller
", {
12131 __init : function () {
12132 var s = this._get_settings().themeroller;
12133 this.get_container()
12134 .addClass("ui-widget-content
")
12135 .addClass("jstree-themeroller
")
12136 .delegate("a
","mouseenter.jstree
", function (e) {
12137 if(!$(e.currentTarget).hasClass("jstree-loading
")) {
12138 $(this).addClass(s.item_h);
12141 .delegate("a
","mouseleave.jstree
", function () {
12142 $(this).removeClass(s.item_h);
12144 .bind("init.jstree
", $.proxy(function (e, data) {
12145 data.inst.get_container().find("> ul > li > .jstree-loading > ins
").addClass("ui-icon-refresh
");
12146 this._themeroller(data.inst.get_container().find("> ul > li
"));
12148 .bind("open_node.jstree create_node.jstree
", $.proxy(function (e, data) {
12149 this._themeroller(data.rslt.obj);
12151 .bind("loaded.jstree refresh.jstree
", $.proxy(function (e) {
12152 this._themeroller();
12154 .bind("close_node.jstree
", $.proxy(function (e, data) {
12155 this._themeroller(data.rslt.obj);
12157 .bind("delete_node.jstree
", $.proxy(function (e, data) {
12158 this._themeroller(data.rslt.parent);
12160 .bind("correct_state.jstree
", $.proxy(function (e, data) {
12162 .children("ins.jstree-icon
").removeClass(s.opened + " " + s.closed + " ui-icon
").end()
12163 .find("> a > ins.ui-icon
")
12164 .filter(function() {
12165 return this.className.toString()
12166 .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
12167 .indexOf("ui-icon-
") === -1;
12168 }).removeClass(s.item_open + " " + s.item_clsd).addClass(s.item_leaf || "jstree-no-icon
");
12170 .bind("select_node.jstree
", $.proxy(function (e, data) {
12171 data.rslt.obj.children("a
").addClass(s.item_a);
12173 .bind("deselect_node.jstree deselect_all.jstree
", $.proxy(function (e, data) {
12174 this.get_container()
12175 .find("a.
" + s.item_a).removeClass(s.item_a).end()
12176 .find("a.jstree-clicked
").addClass(s.item_a);
12178 .bind("dehover_node.jstree
", $.proxy(function (e, data) {
12179 data.rslt.obj.children("a
").removeClass(s.item_h);
12181 .bind("hover_node.jstree
", $.proxy(function (e, data) {
12182 this.get_container()
12183 .find("a.
" + s.item_h).not(data.rslt.obj).removeClass(s.item_h);
12184 data.rslt.obj.children("a
").addClass(s.item_h);
12186 .bind("move_node.jstree
", $.proxy(function (e, data) {
12187 this._themeroller(data.rslt.o);
12188 this._themeroller(data.rslt.op);
12191 __destroy : function () {
12192 var s = this._get_settings().themeroller,
12194 $.each(s, function (i, v) {
12196 if(v.length) { c = c.concat(v); }
12198 this.get_container()
12199 .removeClass("ui-widget-content
")
12200 .find(".
" + c.join(", .
")).removeClass(c.join(" "));
12203 _themeroller : function (obj) {
12204 var s = this._get_settings().themeroller;
12205 obj = !obj || obj == -1 ? this.get_container_ul() : this._get_node(obj).parent();
12207 .find("li.jstree-closed
")
12208 .children("ins.jstree-icon
").removeClass(s.opened).addClass("ui-icon
" + s.closed).end()
12209 .children("a
").addClass(s.item)
12210 .children("ins.jstree-icon
").addClass("ui-icon
")
12211 .filter(function() {
12212 return this.className.toString()
12213 .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
12214 .indexOf("ui-icon-
") === -1;
12215 }).removeClass(s.item_leaf + " " + s.item_open).addClass(s.item_clsd || "jstree-no-icon
")
12220 .find("li.jstree-open
")
12221 .children("ins.jstree-icon
").removeClass(s.closed).addClass("ui-icon
" + s.opened).end()
12222 .children("a
").addClass(s.item)
12223 .children("ins.jstree-icon
").addClass("ui-icon
")
12224 .filter(function() {
12225 return this.className.toString()
12226 .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
12227 .indexOf("ui-icon-
") === -1;
12228 }).removeClass(s.item_leaf + " " + s.item_clsd).addClass(s.item_open || "jstree-no-icon
")
12233 .find("li.jstree-leaf
")
12234 .children("ins.jstree-icon
").removeClass(s.closed + " ui-icon
" + s.opened).end()
12235 .children("a
").addClass(s.item)
12236 .children("ins.jstree-icon
").addClass("ui-icon
")
12237 .filter(function() {
12238 return this.className.toString()
12239 .replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
12240 .indexOf("ui-icon-
") === -1;
12241 }).removeClass(s.item_clsd + " " + s.item_open).addClass(s.item_leaf || "jstree-no-icon
");
12245 "opened
" : "ui-icon-triangle-1-se
",
12246 "closed
" : "ui-icon-triangle-1-e
",
12247 "item
" : "ui-state-
default",
12248 "item_h
" : "ui-state-hover
",
12249 "item_a
" : "ui-state-active
",
12250 "item_open
" : "ui-icon-folder-open
",
12251 "item_clsd
" : "ui-icon-folder-collapsed
",
12252 "item_leaf
" : "ui-icon-document
"
12256 var css_string = '' +
12257 '.jstree-themeroller .ui-icon { overflow:visible; } ' +
12258 '.jstree-themeroller a { padding:0 2px; } ' +
12259 '.jstree-themeroller .jstree-no-icon { display:none; }';
12260 $.vakata.css.add_sheet({ str : css_string, title : "jstree
" });
12266 * jsTree unique plugin
12267 * Forces different names amongst siblings (still a bit experimental)
12268 * NOTE: does not check language versions (it will not be possible to have nodes with the same title, even in different languages)
12271 $.jstree.plugin("unique
", {
12272 __init : function () {
12273 this.get_container()
12274 .bind("before.jstree
", $.proxy(function (e, data) {
12275 var nms = [], res = true, p, t;
12276 if(data.func == "move_node
") {
12277 // obj, ref, position, is_copy, is_prepared, skip_check
12278 if(data.args[4] === true) {
12279 if(data.args[0].o && data.args[0].o.length) {
12280 data.args[0].o.children("a
").each(function () { nms.push($(this).text().replace(/^\s+/g,"")); });
12281 res = this._check_unique(nms, data.args[0].np.find("> ul > li
").not(data.args[0].o), "move_node
");
12285 if(data.func == "create_node
") {
12286 // obj, position, js, callback, is_loaded
12287 if(data.args[4] || this._is_loaded(data.args[0])) {
12288 p = this._get_node(data.args[0]);
12289 if(data.args[1] && (data.args[1] === "before
" || data.args[1] === "after
")) {
12290 p = this._get_parent(data.args[0]);
12291 if(!p || p === -1) { p = this.get_container(); }
12293 if(typeof data.args[2] === "string") { nms.push(data.args[2]); }
12294 else if(!data.args[2] || !data.args[2].data) { nms.push(this._get_string("new_node
")); }
12295 else { nms.push(data.args[2].data); }
12296 res = this._check_unique(nms, p.find("> ul > li
"), "create_node
");
12299 if(data.func == "rename_node
") {
12301 nms.push(data.args[1]);
12302 t = this._get_node(data.args[0]);
12303 p = this._get_parent(t);
12304 if(!p || p === -1) { p = this.get_container(); }
12305 res = this._check_unique(nms, p.find("> ul > li
").not(t), "rename_node
");
12308 e.stopPropagation();
12314 error_callback : $.noop
12317 _check_unique : function (nms, p, func) {
12319 p.children("a
").each(function () { cnms.push($(this).text().replace(/^\s+/g,"")); });
12320 if(!cnms.length || !nms.length) { return true; }
12321 cnms = cnms.sort().join(",,
").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4
").replace(/,,+/g,",
").replace(/,$/,"").split(",
");
12322 if((cnms.length + nms.length) != cnms.concat(nms).sort().join(",,
").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4
").replace(/,,+/g,",
").replace(/,$/,"").split(",
").length) {
12323 this._get_settings().unique.error_callback.call(null, nms, p, func);
12328 check_move : function () {
12329 if(!this.__call_old()) { return false; }
12330 var p = this._get_move(), nms = [];
12331 if(p.o && p.o.length) {
12332 p.o.children("a
").each(function () { nms.push($(this).text().replace(/^\s+/g,"")); });
12333 return this._check_unique(nms, p.np.find("> ul > li
").not(p.o), "check_move
");
12343 * jsTree wholerow plugin
12344 * Makes select and hover work on the entire width of the node
12345 * MAY BE HEAVY IN LARGE DOM
12348 $.jstree.plugin("wholerow
", {
12349 __init : function () {
12350 if(!this.data.ui) { throw "jsTree wholerow: jsTree UI plugin not included.
"; }
12351 this.data.wholerow.html = false;
12352 this.data.wholerow.to = false;
12353 this.get_container()
12354 .bind("init.jstree
", $.proxy(function (e, data) {
12355 this._get_settings().core.animation = 0;
12357 .bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree
", $.proxy(function (e, data) {
12358 this._prepare_wholerow_span( data && data.rslt && data.rslt.obj ? data.rslt.obj : -1 );
12360 .bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree
", $.proxy(function (e, data) {
12361 if(this.data.to) { clearTimeout(this.data.to); }
12362 this.data.to = setTimeout( (function (t, o) { return function() { t._prepare_wholerow_ul(o); }; })(this, data && data.rslt && data.rslt.obj ? data.rslt.obj : -1), 0);
12364 .bind("deselect_all.jstree
", $.proxy(function (e, data) {
12365 this.get_container().find(" > .jstree-wholerow .jstree-clicked
").removeClass("jstree-clicked
" + (this.data.themeroller ? this._get_settings().themeroller.item_a : "" ));
12367 .bind("select_node.jstree deselect_node.jstree
", $.proxy(function (e, data) {
12368 data.rslt.obj.each(function () {
12369 var ref = data.inst.get_container().find(" > .jstree-wholerow li:visible:eq(
" + ( parseInt((($(this).offset().top - data.inst.get_container().offset().top + data.inst.get_container()[0].scrollTop) / data.inst.data.core.li_height),10)) + ")
");
12370 // ref.children("a
")[e.type === "select_node
" ? "addClass
" : "removeClass
"]("jstree-clicked
");
12371 ref.children("a
").attr("class",data.rslt.obj.children("a
").attr("class"));
12374 .bind("hover_node.jstree dehover_node.jstree
", $.proxy(function (e, data) {
12375 this.get_container().find(" > .jstree-wholerow .jstree-hovered
").removeClass("jstree-hovered
" + (this.data.themeroller ? this._get_settings().themeroller.item_h : "" ));
12376 if(e.type === "hover_node
") {
12377 var ref = this.get_container().find(" > .jstree-wholerow li:visible:eq(
" + ( parseInt(((data.rslt.obj.offset().top - this.get_container().offset().top + this.get_container()[0].scrollTop) / this.data.core.li_height),10)) + ")
");
12378 // ref.children("a
").addClass("jstree-hovered
");
12379 ref.children("a
").attr("class",data.rslt.obj.children(".jstree-hovered
").attr("class"));
12382 .delegate(".jstree-wholerow-span, ins.jstree-icon, li
", "click.jstree
", function (e) {
12383 var n = $(e.currentTarget);
12384 if(e.target.tagName === "A
" || (e.target.tagName === "INS
" && n.closest("li
").is(".jstree-open, .jstree-closed
"))) { return; }
12385 n.closest("li
").children("a:visible:eq(0)
").click();
12386 e.stopImmediatePropagation();
12388 .delegate("li
", "mouseover.jstree
", $.proxy(function (e) {
12389 e.stopImmediatePropagation();
12390 if($(e.currentTarget).children(".jstree-hovered, .jstree-clicked
").length) { return false; }
12391 this.hover_node(e.currentTarget);
12394 .delegate("li
", "mouseleave.jstree
", $.proxy(function (e) {
12395 if($(e.currentTarget).children("a
").hasClass("jstree-hovered
").length) { return; }
12396 this.dehover_node(e.currentTarget);
12398 if(is_ie7 || is_ie6) {
12399 $.vakata.css.add_sheet({ str : ".jstree-
" + this.get_index() + " { position:relative; }
", title : "jstree
" });
12404 __destroy : function () {
12405 this.get_container().children(".jstree-wholerow
").remove();
12406 this.get_container().find(".jstree-wholerow-span
").remove();
12409 _prepare_wholerow_span : function (obj) {
12410 obj = !obj || obj == -1 ? this.get_container().find("> ul > li
") : this._get_node(obj);
12411 if(obj === false) { return; } // added for removing root nodes
12412 obj.each(function () {
12413 $(this).find("li
").andSelf().each(function () {
12415 if($t.children(".jstree-wholerow-span
").length) { return true; }
12416 $t.prepend("<span
class=
'jstree-wholerow-span' style=
'width:" + ($t.parentsUntil(".jstree","li").length * 18) + "px;'> </span>
");
12420 _prepare_wholerow_ul : function () {
12421 var o = this.get_container().children("ul
").eq(0), h = o.html();
12422 o.addClass("jstree-wholerow-real
");
12423 if(this.data.wholerow.last_html !== h) {
12424 this.data.wholerow.last_html = h;
12425 this.get_container().children(".jstree-wholerow
").remove();
12426 this.get_container().append(
12427 o.clone().removeClass("jstree-wholerow-real
")
12428 .wrapAll("<div
class=
'jstree-wholerow' />
").parent()
12429 .width(o.parent()[0].scrollWidth)
12430 .css("top
", (o.height() + ( is_ie7 ? 5 : 0)) * -1 )
12431 .find("li[id]
").each(function () { this.removeAttribute("id"); }).end()
12438 var css_string = '' +
12439 '.jstree .jstree-wholerow-real { position:relative; z-index:1; } ' +
12440 '.jstree .jstree-wholerow-real li { cursor:pointer; } ' +
12441 '.jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } ' +
12442 '.jstree .jstree-wholerow { position:relative; z-index:0; height:0; } ' +
12443 '.jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } ' +
12444 '.jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } ' +
12445 '.jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }' +
12446 '.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }' +
12447 '.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } ' +
12448 '.jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }';
12451 '.jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } ' +
12452 '.jstree .jstree-wholerow-real a { border-color:transparent !important; } ';
12454 if(is_ie7 || is_ie6) {
12456 '.jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } ' +
12457 '.jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } ';
12459 $.vakata.css.add_sheet({ str : css_string, title : "jstree
" });
12465 * jsTree model plugin
12466 * This plugin gets jstree to use a class model to retrieve data, creating great dynamism
12469 var nodeInterface = ["getChildren
","getChildrenCount
","getAttr
","getName
","getProps
"],
12470 validateInterface = function(obj, inter) {
12473 inter = [].concat(inter);
12474 $.each(inter, function (i, v) {
12475 if(!$.isFunction(obj[v])) { valid = false; return false; }
12479 $.jstree.plugin("model
", {
12480 __init : function () {
12481 if(!this.data.json_data) { throw "jsTree model: jsTree json_data plugin not included.
"; }
12482 this._get_settings().json_data.data = function (n, b) {
12483 var obj = (n == -1) ? this._get_settings().model.object : n.data("jstree_model
");
12484 if(!validateInterface(obj, nodeInterface)) { return b.call(null, false); }
12485 if(this._get_settings().model.async) {
12486 obj.getChildren($.proxy(function (data) {
12487 this.model_done(data, b);
12491 this.model_done(obj.getChildren(), b);
12501 model_done : function (data, callback) {
12503 s = this._get_settings(),
12506 if(!$.isArray(data)) { data = [data]; }
12507 $.each(data, function (i, nd) {
12508 var r = nd.getProps() || {};
12509 r.attr = nd.getAttr() || {};
12510 if(nd.getChildrenCount()) { r.state = "closed
"; }
12511 r.data = nd.getName();
12512 if(!$.isArray(r.data)) { r.data = [r.data]; }
12513 if(_this.data.types && $.isFunction(nd.getType)) {
12514 r.attr[s.types.type_attr] = nd.getType();
12516 if(r.attr.id && s.model.id_prefix) { r.attr.id = s.model.id_prefix + r.attr.id; }
12517 if(!r.metadata) { r.metadata = { }; }
12518 r.metadata.jstree_model = nd;
12521 callback.call(null, ret);
12544 if( !ultimix.jstree )
12546 ultimix.jstree = {};
12558 ultimix.jstree.CreateNodeEventHandler = function( e , Data )
12560 var RootId = jQuery( Data.rslt.parent ).attr( 'id' ).replace( 'phtml_' , '' );
12562 ultimix.ajax_gate.DirectController(
12564 'package_name' : 'category::category_controller' ,
12565 'create_category' : 1 ,
12566 'category_action' : 'create_record' ,
12567 'root_id' : RootId ,
12568 'title' : Data.rslt.name ,
12569 'category_name' : 'category_name'
12573 /* parsing result */
12574 eval( "Result =
" + Result + ";
" );
12575 jQuery( Data.rslt.obj ).attr( 'id' , 'phtml_' + Result.id );
12589 ultimix.jstree.RenameNodeEventHandler = function( e , Data )
12591 var NodeId = jQuery( Data.rslt.obj ).attr( 'id' ).replace( 'phtml_' , '' );
12593 ultimix.ajax_gate.DirectController(
12595 'package_name' : 'category::category_controller' ,
12596 'update_category' : 1 ,
12597 'category_action' : 'update_category_title' ,
12598 'category_id' : NodeId ,
12599 'title' : Data.rslt.new_name
12613 ultimix.jstree.RemoveNodeEventHandler = function( e , Data )
12615 for( var i = 0 ; i < Data.rslt.obj.length ; i++ )
12617 var NodeId = jQuery( Data.rslt.obj[ i ] ).attr( 'id' ).replace( 'phtml_' , '' );
12619 ultimix.ajax_gate.DirectController(
12621 'package_name' : 'category::category_controller' ,
12622 'delete_category' : 1 ,
12623 'category_action' : 'delete_record' ,
12624 'category_record_id' : NodeId
12635 ultimix.jstree.CreateItem = function()
12637 var Tree = jQuery.jstree._focused();
12638 var Node = Tree.get_selected();
12642 Tree.create( Node , 'last' , ultimix.get_string( 'tree_new_item' ) );
12646 ultimix.std_dialogs.MessageBox(
12647 ultimix.get_string( 'select_tree_node_first' ) , ultimix.get_string( 'Error' ) ,
12648 ultimix.std_dialogs.MB_OK | ultimix.std_dialogs.MB_ICONERROR | ultimix.std_dialogs.MB_MODAL
12658 ultimix.jstree.RenameItem = function()
12660 var Tree = jQuery.jstree._focused();
12661 var Node = Tree.get_selected();
12669 ultimix.std_dialogs.MessageBox(
12670 ultimix.get_string( 'select_tree_node_first' ) , ultimix.get_string( 'Error' ) ,
12671 ultimix.std_dialogs.MB_OK | ultimix.std_dialogs.MB_ICONERROR | ultimix.std_dialogs.MB_MODAL
12683 ultimix.jstree.MoveUpForSelected = function( Tree )
12685 /* move children elements upper */
12686 var SelectedNodes = Tree.get_selected();
12688 for( var i = 0 ; i < SelectedNodes.length ; i++ )
12690 var Children = Tree._get_children( SelectedNodes[ i ] );
12692 if( Children.length )
12694 Tree.move_node( Children , SelectedNodes[ i ] , 'after' );
12706 ultimix.jstree.ShowRemoveItemDialog = function( ConfirmString )
12708 if( ConfirmString == '' )
12710 ConfirmString = 'shure_to_delete_tree_item';
12713 ultimix.std_dialogs.MessageBox(
12714 ultimix.get_string( ConfirmString ) ,
12715 ultimix.get_string( 'Question' ) ,
12716 ultimix.std_dialogs.MB_YESNO | ultimix.std_dialogs.MB_ICONQUESTION | ultimix.std_dialogs.MB_MODAL ,
12719 if( Result == ultimix.std_dialogs.MB_YES )
12721 var Tree = jQuery.jstree._focused();
12723 ultimix.jstree.MoveUpForSelected( Tree );
12738 ultimix.jstree.RemoveItem = function( ConfirmString )
12740 var Tree = jQuery.jstree._focused();
12741 var Node = Tree.get_selected();
12743 if( jQuery( Node ).attr( 'rel' ) == 'root' )
12745 ErrMsg = ultimix.get_string( 'cant_delete_root_node' );
12747 if( Node.length == 0 )
12749 ErrMsg = ultimix.get_string( 'select_tree_node_first' );
12753 ultimix.std_dialogs.MessageBox(
12754 ErrMsg , ultimix.get_string( 'Error' ) ,
12755 ultimix.std_dialogs.MB_OK | ultimix.std_dialogs.MB_ICONERROR | ultimix.std_dialogs.MB_MODAL
12760 ultimix.jstree.ShowRemoveItemDialog( ConfirmString );
12766 jQuery( ".tree_control
" ).jstree(
12768 "plugins
" : [ "themes
" , "html_data
" , "types
" , "ui
" , "crrm
" , "cookies
" , "types
" ] ,
12770 "theme
" : "classic
" ,
12771 "url
" : './packages/jstree/res/themes/classic/style.css'
12777 draggable : false ,
12781 new_node : "New item
"
12784 "initially_open
" : [ "thtml_1
" ] ,
12785 "strings
" : { new_node : "New item
" }
12789 "valid_children
" : [ "not_selectable
" ],
12794 "valid_children
" : [ "default" ] ,
12795 "hover_node
" : false ,
12796 "select_node
" : function(){ return( false ); }
12800 "valid_children
" : [ "default" ]
12807 jQuery( '.tree_control' ).bind( "create.jstree
" , ultimix.jstree.CreateNodeEventHandler );
12808 jQuery( '.tree_control' ).bind( "rename.jstree
" , ultimix.jstree.RenameNodeEventHandler );
12809 jQuery( '.tree_control' ).bind( "remove.jstree
" , ultimix.jstree.RemoveNodeEventHandler );
12827 if( !ultimix.jstree )
12829 ultimix.jstree = {};
12843 ultimix.jstree.ExtractJSTreeNode = function( AcceptorSelector , StatusSelector )
12845 var Tree = jQuery.jstree._focused();
12846 var Node = Tree.get_selected();
12850 var id = jQuery( Node ).attr( 'id' );
12851 id = id.replace( 'phtml_' , '' );
12853 jQuery( AcceptorSelector ).attr( 'value' , id );
12854 jQuery( StatusSelector ).attr( 'value' , Tree.get_text( Node ) );
12860 ultimix.std_dialogs.MessageBox(
12861 ultimix.get_string( 'nothing_was_selected' ) , ultimix.get_string( 'Error' ) ,
12862 ultimix.std_dialogs.MB_OK | ultimix.std_dialogs.MB_ICONERROR
12868 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'shure_to_delete_tree_item' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'shure_to_delete_tree_item' ] = {};
12869 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'shure_to_delete_tree_item' ][ 'default' ] = 'Вы уверены что хотите удалить выбранный элемент?';
12870 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'nothing_was_selected' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'nothing_was_selected' ] = {};
12871 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'nothing_was_selected' ][ 'default' ] = 'Не выбрано ни одного элемента.';
12872 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'select_tree_node_first' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'select_tree_node_first' ] = {};
12873 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'select_tree_node_first' ][ 'default' ] = 'Сначала выберите какой-нибудь элемент';
12874 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'cant_delete_this_item' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'cant_delete_this_item' ] = {};
12875 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'cant_delete_this_item' ][ 'default' ] = 'Этот элемент нельзя удалить';
12876 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'cant_edit_this_item' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'cant_edit_this_item' ] = {};
12877 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'cant_edit_this_item' ][ 'default' ] = 'Этот элемент нельзя изменить';
12878 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'tree_new_item' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'tree_new_item' ] = {};
12879 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'tree_new_item' ][ 'default' ] = 'Новый элемент';
12880 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'cant_delete_root_node' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'cant_delete_root_node' ] = {};
12881 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'cant_delete_root_node' ][ 'default' ] = 'Невозможно удалить корневой элемент';
12883 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'root_category' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'root_category' ] = {};
12884 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'root_category' ][ 'default' ] = 'Корневая[nbsp]категория';
12885 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_title' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_title' ] = {};
12886 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_title' ][ 'default' ] = 'Название[nbsp]категории';
12887 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_root_title' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_root_title' ] = {};
12888 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_root_title' ][ 'default' ] = 'Название[nbsp]корневой[nbsp]категории';
12889 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_mask' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_mask' ] = {};
12890 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_mask' ][ 'default' ] = 'Маска';
12891 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_actions' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_actions' ] = {};
12892 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_actions' ][ 'default' ] = 'Действия';
12893 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_delete' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_delete' ] = {};
12894 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_delete' ][ 'default' ] = 'удалить';
12895 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_edit' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_edit' ] = {};
12896 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_edit' ][ 'default' ] = 'редактировать';
12897 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_save' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_save' ] = {};
12898 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_save' ][ 'default' ] = 'сохранить';
12899 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_create' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_create' ] = {};
12900 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_create' ][ 'default' ] = 'создать';
12901 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'shure_to_delete_category' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'shure_to_delete_category' ] = {};
12902 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'shure_to_delete_category' ][ 'default' ] = 'Вы[nbsp]уверены,[nbsp]что[nbsp]хотите[nbsp]удалить[nbsp]категорию?';
12903 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_direct_title' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_direct_title' ] = {};
12904 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_direct_title' ][ 'default' ] = 'Сквозная[nbsp]категория';
12905 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category' ] = {};
12906 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category' ][ 'default' ] = 'Категория';
12907 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'catalogue_is_empty' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'catalogue_is_empty' ] = {};
12908 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'catalogue_is_empty' ][ 'default' ] = 'Каталог пуст';
12909 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'catalogue' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'catalogue' ] = {};
12910 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'catalogue' ][ 'default' ] = 'Каталог';
12911 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_label' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_label' ] = {};
12912 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_label' ][ 'default' ] = 'Категории';
12913 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_manager' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_manager' ] = {};
12914 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_manager' ][ 'default' ] = 'Управление категориями';
12915 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'mask_must_be_filled' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'mask_must_be_filled' ] = {};
12916 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'mask_must_be_filled' ][ 'default' ] = 'Поле "{lang:category_mask}
" должно быть заполнено';
12917 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'title_must_be_filled' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'title_must_be_filled' ] = {};
12918 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'title_must_be_filled' ][ 'default' ] = 'Поле "{lang:category_title}
" должно быть заполнено';
12919 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_delete_was_completed' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_delete_was_completed' ] = {};
12920 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_delete_was_completed' ][ 'default' ] = 'Удаление выбранных записей было завершено';
12921 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_create_was_completed' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_create_was_completed' ] = {};
12922 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_create_was_completed' ][ 'default' ] = 'Запись была создана';
12923 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_update_was_completed' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_update_was_completed' ] = {};
12924 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_update_was_completed' ][ 'default' ] = 'Редактирование было успешно завершено';
12925 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_selection' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_selection' ] = {};
12926 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_selection' ][ 'default' ] = 'Выбор категории';
12927 if( !ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_name' ] ) ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_name' ] = {};
12928 ultimix.lang.Strings[ ultimix.lang.Locale ][ 'category_name' ][ 'default' ] = 'Локатор';
12961 ultimix.DeleteRecord = function( Selector , Url , Prefix , NotSelectedErrorMessage , ConfirmStrign , Waiting , PackageName , PackageVersion )
12963 var CheckBoxSelector = '._' + Prefix + '_item_checkbox';
12964 var DialogBoxSelector;
12966 if( ultimix.grids.RecordSelectedEx( CheckBoxSelector ) == false )
12968 ultimix.std_dialogs.MessageBox( NotSelectedErrorMessage , ultimix.get_string( 'Error' ) , ultimix.std_dialogs.MB_OK | ultimix.std_dialogs.MB_ICONERROR | ultimix.std_dialogs.MB_MODAL );
12974 DialogBoxSelector = ultimix.std_dialogs.MessageBox( ultimix.get_string( 'wait_please' ) , ultimix.get_string( 'Info' ) , ultimix.std_dialogs.MB_ICONLOADING | ultimix.std_dialogs.MB_MODAL );
12979 Data = ultimix.forms.ExtractFormData( jQuery( CheckBoxSelector ).filter( 'input:checked' ) );
12980 Data[ Prefix + '_context_action' ] = 'delete_record';
12981 Data[ Prefix + '_record_id' ] = -1;
12982 Data[ 'package_name' ] = PackageName;
12983 Data[ 'package_version' ] = PackageVersion;
12984 Data[ 'delete_' + Prefix ] = 1;
12985 Data[ 'ajaxed' ] = 1;
12987 ultimix.DirectController(
12991 jQuery( DialogBoxSelector ).dialog( 'close' );
12992 ultimix.ReloadGrid( Selector , true , Url );