From 45450de4ae7e6e1105837f8c9580e77405b6069a Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Mon, 20 Apr 2015 15:42:06 +0400 Subject: [PATCH 001/108] Clear dev branch --- CHANGELOG | 81 - LICENSE | 20 - README.md | 68 - composer.json | 35 - gulpfile.js | 30 - phpunit.xml | 23 - public/all.min.css | 1 - public/all.min.js | 17 - public/ckeditor/CHANGES.md | 643 - public/ckeditor/LICENSE.md | 1264 -- public/ckeditor/README.md | 39 - public/ckeditor/adapters/jquery.js | 10 - public/ckeditor/build-config.js | 92 - public/ckeditor/ckeditor.js | 943 -- public/ckeditor/config.js | 41 - public/ckeditor/contents.css | 134 - public/ckeditor/lang/en.js | 5 - public/ckeditor/lang/ru.js | 5 - .../plugins/a11yhelp/dialogs/a11yhelp.js | 10 - .../dialogs/lang/_translationstatus.txt | 25 - .../plugins/a11yhelp/dialogs/lang/ar.js | 11 - .../plugins/a11yhelp/dialogs/lang/bg.js | 11 - .../plugins/a11yhelp/dialogs/lang/ca.js | 13 - .../plugins/a11yhelp/dialogs/lang/cs.js | 13 - .../plugins/a11yhelp/dialogs/lang/cy.js | 11 - .../plugins/a11yhelp/dialogs/lang/da.js | 11 - .../plugins/a11yhelp/dialogs/lang/de.js | 12 - .../plugins/a11yhelp/dialogs/lang/el.js | 13 - .../plugins/a11yhelp/dialogs/lang/en-gb.js | 11 - .../plugins/a11yhelp/dialogs/lang/en.js | 11 - .../plugins/a11yhelp/dialogs/lang/eo.js | 13 - .../plugins/a11yhelp/dialogs/lang/es.js | 12 - .../plugins/a11yhelp/dialogs/lang/et.js | 11 - .../plugins/a11yhelp/dialogs/lang/fa.js | 11 - .../plugins/a11yhelp/dialogs/lang/fi.js | 12 - .../plugins/a11yhelp/dialogs/lang/fr-ca.js | 12 - .../plugins/a11yhelp/dialogs/lang/fr.js | 13 - .../plugins/a11yhelp/dialogs/lang/gl.js | 12 - .../plugins/a11yhelp/dialogs/lang/gu.js | 11 - .../plugins/a11yhelp/dialogs/lang/he.js | 11 - .../plugins/a11yhelp/dialogs/lang/hi.js | 11 - .../plugins/a11yhelp/dialogs/lang/hr.js | 11 - .../plugins/a11yhelp/dialogs/lang/hu.js | 13 - .../plugins/a11yhelp/dialogs/lang/id.js | 11 - .../plugins/a11yhelp/dialogs/lang/it.js | 13 - .../plugins/a11yhelp/dialogs/lang/ja.js | 9 - .../plugins/a11yhelp/dialogs/lang/km.js | 11 - .../plugins/a11yhelp/dialogs/lang/ko.js | 10 - .../plugins/a11yhelp/dialogs/lang/ku.js | 12 - .../plugins/a11yhelp/dialogs/lang/lt.js | 11 - .../plugins/a11yhelp/dialogs/lang/lv.js | 13 - .../plugins/a11yhelp/dialogs/lang/mk.js | 11 - .../plugins/a11yhelp/dialogs/lang/mn.js | 11 - .../plugins/a11yhelp/dialogs/lang/nb.js | 12 - .../plugins/a11yhelp/dialogs/lang/nl.js | 12 - .../plugins/a11yhelp/dialogs/lang/no.js | 11 - .../plugins/a11yhelp/dialogs/lang/pl.js | 13 - .../plugins/a11yhelp/dialogs/lang/pt-br.js | 12 - .../plugins/a11yhelp/dialogs/lang/pt.js | 12 - .../plugins/a11yhelp/dialogs/lang/ro.js | 12 - .../plugins/a11yhelp/dialogs/lang/ru.js | 11 - .../plugins/a11yhelp/dialogs/lang/si.js | 10 - .../plugins/a11yhelp/dialogs/lang/sk.js | 12 - .../plugins/a11yhelp/dialogs/lang/sl.js | 12 - .../plugins/a11yhelp/dialogs/lang/sq.js | 11 - .../plugins/a11yhelp/dialogs/lang/sr-latn.js | 11 - .../plugins/a11yhelp/dialogs/lang/sr.js | 11 - .../plugins/a11yhelp/dialogs/lang/sv.js | 12 - .../plugins/a11yhelp/dialogs/lang/th.js | 11 - .../plugins/a11yhelp/dialogs/lang/tr.js | 12 - .../plugins/a11yhelp/dialogs/lang/tt.js | 11 - .../plugins/a11yhelp/dialogs/lang/ug.js | 11 - .../plugins/a11yhelp/dialogs/lang/uk.js | 12 - .../plugins/a11yhelp/dialogs/lang/vi.js | 11 - .../plugins/a11yhelp/dialogs/lang/zh-cn.js | 9 - .../plugins/a11yhelp/dialogs/lang/zh.js | 9 - .../ckeditor/plugins/about/dialogs/about.js | 7 - .../about/dialogs/hidpi/logo_ckeditor.png | Bin 13339 -> 0 bytes .../plugins/about/dialogs/logo_ckeditor.png | Bin 6757 -> 0 bytes .../plugins/clipboard/dialogs/paste.js | 11 - .../plugins/dialog/dialogDefinition.js | 4 - .../plugins/fastimage/dialogs/fastimage.js | 5 - .../plugins/fastimage/images/noimage.png | Bin 2115 -> 0 bytes public/ckeditor/plugins/icons.png | Bin 10564 -> 0 bytes public/ckeditor/plugins/icons_hidpi.png | Bin 34839 -> 0 bytes .../ckeditor/plugins/image/dialogs/image.js | 43 - .../ckeditor/plugins/image/images/noimage.png | Bin 2115 -> 0 bytes .../ckeditor/plugins/imagebrowser/LICENSE.txt | 10 - .../ckeditor/plugins/imagebrowser/README.rst | 69 - .../plugins/imagebrowser/browser/browser.css | 62 - .../plugins/imagebrowser/browser/browser.html | 25 - .../plugins/imagebrowser/browser/browser.js | 6 - .../imagebrowser/browser/jquery-1.9.1.min.js | 181 - .../ckeditor/plugins/link/dialogs/anchor.js | 7 - public/ckeditor/plugins/link/dialogs/link.js | 26 - .../ckeditor/plugins/link/images/anchor.png | Bin 763 -> 0 bytes .../plugins/link/images/hidpi/anchor.png | Bin 1597 -> 0 bytes .../magicline/images/hidpi/icon-rtl.png | Bin 2878 -> 0 bytes .../plugins/magicline/images/hidpi/icon.png | Bin 260 -> 0 bytes .../plugins/magicline/images/icon-rtl.png | Bin 2796 -> 0 bytes .../plugins/magicline/images/icon.png | Bin 172 -> 0 bytes .../plugins/pastefromword/filter/default.js | 31 - public/ckeditor/plugins/scayt/LICENSE.md | 28 - public/ckeditor/plugins/scayt/README.md | 25 - .../ckeditor/plugins/scayt/dialogs/options.js | 17 - .../plugins/scayt/dialogs/toolbar.css | 71 - .../plugins/simple-image-browser/README.md | 34 - .../simple-image-browser/images/icon.png | Bin 507 -> 0 bytes .../dialogs/lang/_translationstatus.txt | 20 - .../plugins/specialchar/dialogs/lang/ar.js | 13 - .../plugins/specialchar/dialogs/lang/bg.js | 13 - .../plugins/specialchar/dialogs/lang/ca.js | 14 - .../plugins/specialchar/dialogs/lang/cs.js | 13 - .../plugins/specialchar/dialogs/lang/cy.js | 14 - .../plugins/specialchar/dialogs/lang/de.js | 13 - .../plugins/specialchar/dialogs/lang/el.js | 13 - .../plugins/specialchar/dialogs/lang/en-gb.js | 13 - .../plugins/specialchar/dialogs/lang/en.js | 13 - .../plugins/specialchar/dialogs/lang/eo.js | 12 - .../plugins/specialchar/dialogs/lang/es.js | 13 - .../plugins/specialchar/dialogs/lang/et.js | 13 - .../plugins/specialchar/dialogs/lang/fa.js | 12 - .../plugins/specialchar/dialogs/lang/fi.js | 13 - .../plugins/specialchar/dialogs/lang/fr-ca.js | 10 - .../plugins/specialchar/dialogs/lang/fr.js | 11 - .../plugins/specialchar/dialogs/lang/gl.js | 13 - .../plugins/specialchar/dialogs/lang/he.js | 12 - .../plugins/specialchar/dialogs/lang/hr.js | 13 - .../plugins/specialchar/dialogs/lang/hu.js | 12 - .../plugins/specialchar/dialogs/lang/id.js | 13 - .../plugins/specialchar/dialogs/lang/it.js | 14 - .../plugins/specialchar/dialogs/lang/ja.js | 9 - .../plugins/specialchar/dialogs/lang/km.js | 13 - .../plugins/specialchar/dialogs/lang/ku.js | 13 - .../plugins/specialchar/dialogs/lang/lv.js | 13 - .../plugins/specialchar/dialogs/lang/nb.js | 11 - .../plugins/specialchar/dialogs/lang/nl.js | 13 - .../plugins/specialchar/dialogs/lang/no.js | 11 - .../plugins/specialchar/dialogs/lang/pl.js | 12 - .../plugins/specialchar/dialogs/lang/pt-br.js | 11 - .../plugins/specialchar/dialogs/lang/pt.js | 13 - .../plugins/specialchar/dialogs/lang/ru.js | 13 - .../plugins/specialchar/dialogs/lang/si.js | 13 - .../plugins/specialchar/dialogs/lang/sk.js | 13 - .../plugins/specialchar/dialogs/lang/sl.js | 12 - .../plugins/specialchar/dialogs/lang/sq.js | 13 - .../plugins/specialchar/dialogs/lang/sv.js | 11 - .../plugins/specialchar/dialogs/lang/th.js | 13 - .../plugins/specialchar/dialogs/lang/tr.js | 12 - .../plugins/specialchar/dialogs/lang/tt.js | 13 - .../plugins/specialchar/dialogs/lang/ug.js | 13 - .../plugins/specialchar/dialogs/lang/uk.js | 12 - .../plugins/specialchar/dialogs/lang/vi.js | 14 - .../plugins/specialchar/dialogs/lang/zh-cn.js | 9 - .../plugins/specialchar/dialogs/lang/zh.js | 12 - .../specialchar/dialogs/specialchar.js | 14 - .../ckeditor/plugins/table/dialogs/table.js | 21 - .../plugins/tabletools/dialogs/tableCell.js | 17 - public/ckeditor/plugins/wsc/LICENSE.md | 28 - public/ckeditor/plugins/wsc/README.md | 25 - .../ckeditor/plugins/wsc/dialogs/ciframe.html | 66 - .../plugins/wsc/dialogs/tmpFrameset.html | 52 - public/ckeditor/plugins/wsc/dialogs/wsc.css | 82 - public/ckeditor/plugins/wsc/dialogs/wsc.js | 74 - public/ckeditor/plugins/wsc/dialogs/wsc_ie.js | 11 - .../skins/bootstrapck/.temp/css/dialog.css | 1 - .../skins/bootstrapck/.temp/css/dialog_ie.css | 1 - .../bootstrapck/.temp/css/dialog_ie7.css | 1 - .../bootstrapck/.temp/css/dialog_ie8.css | 1 - .../bootstrapck/.temp/css/dialog_iequirks.css | 1 - .../bootstrapck/.temp/css/dialog_opera.css | 1 - .../skins/bootstrapck/.temp/css/editor.css | 1 - .../bootstrapck/.temp/css/editor_gecko.css | 1 - .../skins/bootstrapck/.temp/css/editor_ie.css | 1 - .../bootstrapck/.temp/css/editor_ie7.css | 1 - .../bootstrapck/.temp/css/editor_ie8.css | 1 - .../bootstrapck/.temp/css/editor_iequirks.css | 1 - public/ckeditor/skins/bootstrapck/dialog.css | 1 - .../ckeditor/skins/bootstrapck/dialog_ie.css | 1 - .../ckeditor/skins/bootstrapck/dialog_ie7.css | 1 - .../ckeditor/skins/bootstrapck/dialog_ie8.css | 1 - .../skins/bootstrapck/dialog_iequirks.css | 1 - .../skins/bootstrapck/dialog_opera.css | 1 - public/ckeditor/skins/bootstrapck/editor.css | 1 - .../skins/bootstrapck/editor_gecko.css | 1 - .../ckeditor/skins/bootstrapck/editor_ie.css | 1 - .../ckeditor/skins/bootstrapck/editor_ie7.css | 1 - .../ckeditor/skins/bootstrapck/editor_ie8.css | 1 - .../skins/bootstrapck/editor_iequirks.css | 1 - public/ckeditor/skins/bootstrapck/icons.png | Bin 10564 -> 0 bytes .../skins/bootstrapck/icons_hidpi.png | Bin 34839 -> 0 bytes .../skins/bootstrapck/images/arrow.png | Bin 261 -> 0 bytes .../skins/bootstrapck/images/close.png | Bin 415 -> 0 bytes .../skins/bootstrapck/images/hidpi/close.png | Bin 498 -> 0 bytes .../bootstrapck/images/hidpi/lock-open.png | Bin 573 -> 0 bytes .../skins/bootstrapck/images/hidpi/lock.png | Bin 571 -> 0 bytes .../bootstrapck/images/hidpi/refresh.png | Bin 867 -> 0 bytes .../skins/bootstrapck/images/lock-open.png | Bin 402 -> 0 bytes .../skins/bootstrapck/images/lock.png | Bin 413 -> 0 bytes .../skins/bootstrapck/images/refresh.png | Bin 532 -> 0 bytes public/ckeditor/skins/bootstrapck/readme.md | 35 - .../sample/bootstrapck-sample.html | 127 - .../sample/css/bootstrapck-sample.css | 1 - .../skins/bootstrapck/sample/js/analytics.js | 4 - .../sample/js/jquery-1.11.0.min.js | 189 - .../browser-specific/gecko/editor_gecko.scss | 25 - .../scss/browser-specific/ie/dialog_ie.scss | 62 - .../scss/browser-specific/ie/editor_ie.scss | 71 - .../scss/browser-specific/ie7/dialog_ie7.scss | 68 - .../scss/browser-specific/ie7/editor_ie7.scss | 213 - .../scss/browser-specific/ie8/dialog_ie8.scss | 24 - .../scss/browser-specific/ie8/editor_ie8.scss | 27 - .../iequirks/dialog_iequirks.scss | 21 - .../iequirks/editor_iequirks.scss | 79 - .../browser-specific/opera/dialog_opera.scss | 31 - .../scss/components/_colorpanel.scss | 119 - .../scss/components/_elementspath.scss | 66 - .../bootstrapck/scss/components/_mainui.scss | 189 - .../bootstrapck/scss/components/_menu.scss | 182 - .../bootstrapck/scss/components/_panel.scss | 199 - .../bootstrapck/scss/components/_presets.scss | 32 - .../bootstrapck/scss/components/_reset.scss | 107 - .../scss/components/_richcombo.scss | 174 - .../bootstrapck/scss/components/_toolbar.scss | 317 - .../bootstrapck/scss/components/editor.scss | 66 - .../bootstrapck/scss/config/_colors.scss | 61 - .../bootstrapck/scss/config/_config.scss | 9 - .../bootstrapck/scss/config/_defaults.scss | 37 - .../skins/bootstrapck/scss/dialog/dialog.scss | 822 - public/ckeditor/styles.js | 36 - public/fonts/FontAwesome.otf | Bin 75188 -> 0 bytes public/fonts/fontawesome-webfont.eot | Bin 72449 -> 0 bytes public/fonts/fontawesome-webfont.svg | 504 - public/fonts/fontawesome-webfont.ttf | Bin 141564 -> 0 bytes public/fonts/fontawesome-webfont.woff | Bin 83760 -> 0 bytes resources/css/admin.css | 63 - .../css/bootstrap-datetimepicker.min.css | 5 - resources/css/bootstrap-multiselect.css | 1 - resources/css/bootstrap.min.css | 5 - resources/css/dataTables.bootstrap.css | 213 - resources/css/ekko-lightbox.min.css | 6 - resources/css/font-awesome.min.css | 4 - resources/css/metisMenu.min.css | 1 - resources/css/morris.css | 2 - resources/css/sb-admin-2.css | 345 - resources/js/admin.js | 193 - resources/js/bootbox.js | 894 - resources/js/bootstrap-multiselect.js | 1180 -- resources/js/bootstrap.min.js | 6 - resources/js/ekko-lightbox.min.js | 7 - resources/js/jquery-1.11.0.js | 4 - resources/js/moment-with-locales.min.js | 10 - .../plugins/dataTables/jquery.dataTables.js | 14020 ---------------- .../dataTables/jquery.dataTables_bootstrap.js | 245 - .../js/plugins/metisMenu/metisMenu.min.js | 9 - resources/js/plugins/morris/morris.min.js | 7 - resources/js/plugins/morris/raphael.min.js | 11 - .../js/s_bootstrap-datetimepicker.min.js | 1 - resources/js/sb-admin-2.js | 26 - src/SleepingOwl/Admin/Admin.php | 154 - .../Admin/AdminServiceProvider.php | 129 - .../Admin/AssetManager/AssetManager.php | 59 - src/SleepingOwl/Admin/Columns/Column.php | 69 - .../Admin/Columns/Column/Action.php | 171 - .../Admin/Columns/Column/BaseColumn.php | 246 - .../Admin/Columns/Column/Control.php | 138 - .../Admin/Columns/Column/Count.php | 22 - src/SleepingOwl/Admin/Columns/Column/Date.php | 94 - .../Admin/Columns/Column/Filter.php | 87 - .../Admin/Columns/Column/Image.php | 52 - .../Admin/Columns/Column/Lists.php | 28 - .../Admin/Columns/Column/String.php | 56 - src/SleepingOwl/Admin/Columns/Column/Url.php | 35 - .../Columns/Interfaces/ColumnInterface.php | 28 - .../Admin/Commands/AdministratorsCommand.php | 176 - .../Commands/Compilers/ModelCompiler.php | 533 - .../Admin/Commands/InstallCommand.php | 175 - .../Admin/Commands/ModelCommand.php | 128 - .../Admin/Commands/stubs/User.stub | 27 - .../Admin/Commands/stubs/bootstrap.stub | 23 - .../Admin/Commands/stubs/menu.stub | 18 - .../Admin/Commands/stubs/model.stub | 12 - .../Admin/Controllers/AdminController.php | 407 - .../Admin/Controllers/AuthController.php | 63 - .../Admin/Controllers/BaseController.php | 61 - .../Admin/Controllers/DummyController.php | 12 - .../Admin/Controllers/ImagesController.php | 221 - .../Admin/Controllers/LangController.php | 35 - .../Exceptions/MethodNotFoundException.php | 10 - .../ModelAttributeNotFoundException.php | 11 - .../Exceptions/ModelNotFoundException.php | 5 - .../Exceptions/TitleNotFormattedException.php | 5 - .../Admin/Exceptions/ValidationException.php | 32 - .../Admin/Exceptions/ValueNotSetException.php | 10 - src/SleepingOwl/Admin/Facades/AdminRouter.php | 18 - src/SleepingOwl/Admin/Menu/MenuItem.php | 301 - .../Admin/Models/Filters/Filter.php | 164 - .../Admin/Models/Filters/Title.php | 101 - src/SleepingOwl/Admin/Models/Form/Form.php | 186 - .../Admin/Models/Form/FormItem.php | 94 - .../Models/Form/FormItem/BaseFormItem.php | 152 - .../Admin/Models/Form/FormItem/BaseTime.php | 36 - .../Admin/Models/Form/FormItem/Checkbox.php | 9 - .../Admin/Models/Form/FormItem/Ckeditor.php | 18 - .../Models/Form/FormItem/ClosureHandler.php | 26 - .../Admin/Models/Form/FormItem/Date.php | 17 - .../Admin/Models/Form/FormItem/File.php | 10 - .../Admin/Models/Form/FormItem/Hidden.php | 10 - .../Admin/Models/Form/FormItem/Image.php | 36 - .../Models/Form/FormItem/MultiSelect.php | 151 - .../Admin/Models/Form/FormItem/Password.php | 9 - .../Admin/Models/Form/FormItem/Select.php | 101 - .../Admin/Models/Form/FormItem/Text.php | 9 - .../Admin/Models/Form/FormItem/TextAddon.php | 59 - .../Admin/Models/Form/FormItem/Textarea.php | 9 - .../Admin/Models/Form/FormItem/Time.php | 31 - .../Admin/Models/Form/FormItem/Timestamp.php | 23 - .../Admin/Models/Form/FormItem/View.php | 24 - .../Form/Interfaces/FormItemInterface.php | 31 - src/SleepingOwl/Admin/Models/ModelItem.php | 448 - src/SleepingOwl/Admin/Models/Models.php | 65 - .../Interfaces/ModelRepositoryInterface.php | 63 - .../Admin/Repositories/ModelRepository.php | 288 - src/SleepingOwl/Admin/Router.php | 316 - src/SleepingOwl/Admin/Session/QueryState.php | 76 - .../Admin/Validation/Validator.php | 116 - src/SleepingOwl/Admin/filters.php | 15 - .../AdminAuth/AdminAuthManager.php | 44 - .../AdminAuth/AdminAuthServiceProvider.php | 37 - .../Seeders/AdministratorsTableSeeder.php | 28 - .../AdminAuth/Entities/Administrator.php | 21 - .../AdminAuth/Facades/AdminAuth.php | 22 - src/SleepingOwl/AdminAuth/Guard.php | 5 - .../DateFormatter/DateFormatter.php | 38 - src/SleepingOwl/Html/FormBuilder.php | 409 - src/SleepingOwl/Html/HtmlBuilder.php | 86 - src/SleepingOwl/Models/Attributes/File.php | 124 - src/SleepingOwl/Models/Attributes/Image.php | 130 - .../ModelWithFileFieldsInterface.php | 22 - .../ModelWithImageFieldsInterface.php | 22 - .../ModelWithOrderFieldInterface.php | 24 - .../Interfaces/ValidationModelInterface.php | 18 - src/SleepingOwl/Models/SleepingOwlModel.php | 77 - .../Models/Traits/DeleteAllModelTrait.php | 15 - .../ModelWithImageOrFileFieldsTrait.php | 264 - .../Traits/ModelWithOrderFieldTrait.php | 75 - .../Models/Traits/ValidationModelTrait.php | 53 - .../RandomFilenamer/RandomFilenamer.php | 27 - src/config/config.php | 59 - src/docs/00_Introduction.md | 33 - .../01_Getting_Started/00_Installation.md | 29 - .../01_Getting_Started/01_Configuration.md | 47 - .../02_Menu_Configuration.md | 64 - .../03_Model_Configuration.md | 173 - .../01_Getting_Started/04_Authentication.md | 15 - src/docs/01_Getting_Started/05_Validation.md | 30 - .../01_Getting_Started/06_Localization.md | 10 - src/docs/03_Commands/00_Install.md | 26 - .../01_Model_Configuration_Generation.md | 53 - src/docs/03_Commands/02_Administrators.md | 27 - src/docs/03_Models/00_SleepingOwlModel.md | 55 - src/docs/03_Models/01_With_Image_Fields.md | 66 - src/docs/03_Models/02_With_File_Fields.md | 63 - src/docs/03_Models/03_Orderable_Model.md | 27 - src/docs/04_Routes.md | 25 - src/docs/05_FIlters/00_Overview.md | 34 - src/docs/05_FIlters/01_Filter_Title.md | 23 - src/docs/06_Columns/00_Overview.md | 34 - src/docs/06_Columns/01_Column_Appendants.md | 41 - src/docs/06_Columns/02_Custom_Columns.md | 88 - src/docs/06_Columns/03_string.md | 37 - src/docs/06_Columns/04_lists.md | 9 - src/docs/06_Columns/05_count.md | 13 - src/docs/06_Columns/06_image.md | 9 - src/docs/06_Columns/07_date.md | 30 - src/docs/06_Columns/08_action.md | 72 - src/docs/07_Form_Elements/00_Overview.md | 41 - .../01_Custom_Form_Elements.md | 113 - src/docs/07_Form_Elements/02_text.md | 7 - src/docs/07_Form_Elements/03_textAddon.md | 16 - src/docs/07_Form_Elements/04_checkbox.md | 7 - src/docs/07_Form_Elements/05_date.md | 14 - src/docs/07_Form_Elements/06_time.md | 21 - src/docs/07_Form_Elements/07_timestamp.md | 21 - src/docs/07_Form_Elements/08_file.md | 7 - src/docs/07_Form_Elements/09_image.md | 9 - src/docs/07_Form_Elements/10_select.md | 32 - src/docs/07_Form_Elements/11_multiSelect.md | 52 - src/docs/07_Form_Elements/12_textarea.md | 7 - src/docs/07_Form_Elements/13_ckeditor.md | 7 - src/docs/07_Form_Elements/14_view.md | 13 - src/docs/08_Troubleshooting.md | 13 - src/docs/09_License.md | 22 - src/lang/en/lang.php | 66 - src/lang/en/validation.php | 92 - src/lang/ru/lang.php | 66 - src/lang/ru/validation.php | 91 - ..._12_104748_create_administrators_table.php | 37 - src/views/_layout/base.blade.php | 27 - src/views/_layout/inner.blade.php | 14 - src/views/_partials/header.blade.php | 9 - src/views/_partials/menu.blade.php | 9 - src/views/_partials/user.blade.php | 10 - src/views/dummy.blade.php | 8 - src/views/login.blade.php | 30 - src/views/model/form.blade.php | 14 - src/views/model/table.blade.php | 54 - src/views/page.blade.php | 5 - tests/.gitkeep | 0 tests/AdminTest.php | 101 - tests/FilterTest.php | 98 - tests/MenuItemTest.php | 127 - tests/ModelItemTest.php | 194 - tests/ModelsTest.php | 59 - tests/QueryStateTest.php | 25 - tests/RandomFilenamerTest.php | 14 - tests/RouterTest.php | 253 - tests/TitleTest.php | 87 - 418 files changed, 37920 deletions(-) delete mode 100644 CHANGELOG delete mode 100644 LICENSE delete mode 100644 README.md delete mode 100644 composer.json delete mode 100644 gulpfile.js delete mode 100644 phpunit.xml delete mode 100755 public/all.min.css delete mode 100755 public/all.min.js delete mode 100644 public/ckeditor/CHANGES.md delete mode 100644 public/ckeditor/LICENSE.md delete mode 100644 public/ckeditor/README.md delete mode 100644 public/ckeditor/adapters/jquery.js delete mode 100644 public/ckeditor/build-config.js delete mode 100644 public/ckeditor/ckeditor.js delete mode 100644 public/ckeditor/config.js delete mode 100644 public/ckeditor/contents.css delete mode 100644 public/ckeditor/lang/en.js delete mode 100644 public/ckeditor/lang/ru.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/da.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/de.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/el.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/en.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/es.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/et.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/he.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/id.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/it.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/km.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/no.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/si.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/th.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js delete mode 100644 public/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js delete mode 100644 public/ckeditor/plugins/about/dialogs/about.js delete mode 100644 public/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png delete mode 100644 public/ckeditor/plugins/about/dialogs/logo_ckeditor.png delete mode 100644 public/ckeditor/plugins/clipboard/dialogs/paste.js delete mode 100644 public/ckeditor/plugins/dialog/dialogDefinition.js delete mode 100644 public/ckeditor/plugins/fastimage/dialogs/fastimage.js delete mode 100644 public/ckeditor/plugins/fastimage/images/noimage.png delete mode 100644 public/ckeditor/plugins/icons.png delete mode 100644 public/ckeditor/plugins/icons_hidpi.png delete mode 100644 public/ckeditor/plugins/image/dialogs/image.js delete mode 100644 public/ckeditor/plugins/image/images/noimage.png delete mode 100644 public/ckeditor/plugins/imagebrowser/LICENSE.txt delete mode 100644 public/ckeditor/plugins/imagebrowser/README.rst delete mode 100644 public/ckeditor/plugins/imagebrowser/browser/browser.css delete mode 100644 public/ckeditor/plugins/imagebrowser/browser/browser.html delete mode 100644 public/ckeditor/plugins/imagebrowser/browser/browser.js delete mode 100644 public/ckeditor/plugins/imagebrowser/browser/jquery-1.9.1.min.js delete mode 100644 public/ckeditor/plugins/link/dialogs/anchor.js delete mode 100644 public/ckeditor/plugins/link/dialogs/link.js delete mode 100644 public/ckeditor/plugins/link/images/anchor.png delete mode 100644 public/ckeditor/plugins/link/images/hidpi/anchor.png delete mode 100644 public/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png delete mode 100644 public/ckeditor/plugins/magicline/images/hidpi/icon.png delete mode 100644 public/ckeditor/plugins/magicline/images/icon-rtl.png delete mode 100644 public/ckeditor/plugins/magicline/images/icon.png delete mode 100644 public/ckeditor/plugins/pastefromword/filter/default.js delete mode 100644 public/ckeditor/plugins/scayt/LICENSE.md delete mode 100644 public/ckeditor/plugins/scayt/README.md delete mode 100644 public/ckeditor/plugins/scayt/dialogs/options.js delete mode 100644 public/ckeditor/plugins/scayt/dialogs/toolbar.css delete mode 100644 public/ckeditor/plugins/simple-image-browser/README.md delete mode 100644 public/ckeditor/plugins/simple-image-browser/images/icon.png delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/ar.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/bg.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/ca.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/cs.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/cy.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/de.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/el.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/en.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/eo.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/es.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/et.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/fa.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/fi.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/fr.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/gl.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/he.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/hr.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/hu.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/id.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/it.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/ja.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/km.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/ku.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/lv.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/nb.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/nl.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/no.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/pl.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/pt.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/ru.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/si.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/sk.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/sl.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/sq.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/sv.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/th.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/tr.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/tt.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/ug.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/uk.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/vi.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/lang/zh.js delete mode 100644 public/ckeditor/plugins/specialchar/dialogs/specialchar.js delete mode 100644 public/ckeditor/plugins/table/dialogs/table.js delete mode 100644 public/ckeditor/plugins/tabletools/dialogs/tableCell.js delete mode 100644 public/ckeditor/plugins/wsc/LICENSE.md delete mode 100644 public/ckeditor/plugins/wsc/README.md delete mode 100644 public/ckeditor/plugins/wsc/dialogs/ciframe.html delete mode 100644 public/ckeditor/plugins/wsc/dialogs/tmpFrameset.html delete mode 100644 public/ckeditor/plugins/wsc/dialogs/wsc.css delete mode 100644 public/ckeditor/plugins/wsc/dialogs/wsc.js delete mode 100644 public/ckeditor/plugins/wsc/dialogs/wsc_ie.js delete mode 100644 public/ckeditor/skins/bootstrapck/.temp/css/dialog.css delete mode 100644 public/ckeditor/skins/bootstrapck/.temp/css/dialog_ie.css delete mode 100644 public/ckeditor/skins/bootstrapck/.temp/css/dialog_ie7.css delete mode 100644 public/ckeditor/skins/bootstrapck/.temp/css/dialog_ie8.css delete mode 100644 public/ckeditor/skins/bootstrapck/.temp/css/dialog_iequirks.css delete mode 100644 public/ckeditor/skins/bootstrapck/.temp/css/dialog_opera.css delete mode 100644 public/ckeditor/skins/bootstrapck/.temp/css/editor.css delete mode 100644 public/ckeditor/skins/bootstrapck/.temp/css/editor_gecko.css delete mode 100644 public/ckeditor/skins/bootstrapck/.temp/css/editor_ie.css delete mode 100644 public/ckeditor/skins/bootstrapck/.temp/css/editor_ie7.css delete mode 100644 public/ckeditor/skins/bootstrapck/.temp/css/editor_ie8.css delete mode 100644 public/ckeditor/skins/bootstrapck/.temp/css/editor_iequirks.css delete mode 100644 public/ckeditor/skins/bootstrapck/dialog.css delete mode 100644 public/ckeditor/skins/bootstrapck/dialog_ie.css delete mode 100644 public/ckeditor/skins/bootstrapck/dialog_ie7.css delete mode 100644 public/ckeditor/skins/bootstrapck/dialog_ie8.css delete mode 100644 public/ckeditor/skins/bootstrapck/dialog_iequirks.css delete mode 100644 public/ckeditor/skins/bootstrapck/dialog_opera.css delete mode 100644 public/ckeditor/skins/bootstrapck/editor.css delete mode 100644 public/ckeditor/skins/bootstrapck/editor_gecko.css delete mode 100644 public/ckeditor/skins/bootstrapck/editor_ie.css delete mode 100644 public/ckeditor/skins/bootstrapck/editor_ie7.css delete mode 100644 public/ckeditor/skins/bootstrapck/editor_ie8.css delete mode 100644 public/ckeditor/skins/bootstrapck/editor_iequirks.css delete mode 100644 public/ckeditor/skins/bootstrapck/icons.png delete mode 100644 public/ckeditor/skins/bootstrapck/icons_hidpi.png delete mode 100644 public/ckeditor/skins/bootstrapck/images/arrow.png delete mode 100644 public/ckeditor/skins/bootstrapck/images/close.png delete mode 100644 public/ckeditor/skins/bootstrapck/images/hidpi/close.png delete mode 100644 public/ckeditor/skins/bootstrapck/images/hidpi/lock-open.png delete mode 100644 public/ckeditor/skins/bootstrapck/images/hidpi/lock.png delete mode 100644 public/ckeditor/skins/bootstrapck/images/hidpi/refresh.png delete mode 100644 public/ckeditor/skins/bootstrapck/images/lock-open.png delete mode 100644 public/ckeditor/skins/bootstrapck/images/lock.png delete mode 100644 public/ckeditor/skins/bootstrapck/images/refresh.png delete mode 100644 public/ckeditor/skins/bootstrapck/readme.md delete mode 100644 public/ckeditor/skins/bootstrapck/sample/bootstrapck-sample.html delete mode 100644 public/ckeditor/skins/bootstrapck/sample/css/bootstrapck-sample.css delete mode 100644 public/ckeditor/skins/bootstrapck/sample/js/analytics.js delete mode 100644 public/ckeditor/skins/bootstrapck/sample/js/jquery-1.11.0.min.js delete mode 100644 public/ckeditor/skins/bootstrapck/scss/browser-specific/gecko/editor_gecko.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/browser-specific/ie/dialog_ie.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/browser-specific/ie/editor_ie.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/browser-specific/ie7/dialog_ie7.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/browser-specific/ie7/editor_ie7.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/browser-specific/ie8/dialog_ie8.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/browser-specific/ie8/editor_ie8.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/browser-specific/iequirks/dialog_iequirks.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/browser-specific/iequirks/editor_iequirks.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/browser-specific/opera/dialog_opera.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/components/_colorpanel.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/components/_elementspath.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/components/_mainui.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/components/_menu.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/components/_panel.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/components/_presets.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/components/_reset.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/components/_richcombo.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/components/_toolbar.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/components/editor.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/config/_colors.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/config/_config.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/config/_defaults.scss delete mode 100644 public/ckeditor/skins/bootstrapck/scss/dialog/dialog.scss delete mode 100644 public/ckeditor/styles.js delete mode 100755 public/fonts/FontAwesome.otf delete mode 100755 public/fonts/fontawesome-webfont.eot delete mode 100755 public/fonts/fontawesome-webfont.svg delete mode 100755 public/fonts/fontawesome-webfont.ttf delete mode 100755 public/fonts/fontawesome-webfont.woff delete mode 100644 resources/css/admin.css delete mode 100644 resources/css/bootstrap-datetimepicker.min.css delete mode 100755 resources/css/bootstrap-multiselect.css delete mode 100755 resources/css/bootstrap.min.css delete mode 100755 resources/css/dataTables.bootstrap.css delete mode 100755 resources/css/ekko-lightbox.min.css delete mode 100755 resources/css/font-awesome.min.css delete mode 100755 resources/css/metisMenu.min.css delete mode 100755 resources/css/morris.css delete mode 100755 resources/css/sb-admin-2.css delete mode 100644 resources/js/admin.js delete mode 100755 resources/js/bootbox.js delete mode 100755 resources/js/bootstrap-multiselect.js delete mode 100755 resources/js/bootstrap.min.js delete mode 100755 resources/js/ekko-lightbox.min.js delete mode 100755 resources/js/jquery-1.11.0.js delete mode 100644 resources/js/moment-with-locales.min.js delete mode 100755 resources/js/plugins/dataTables/jquery.dataTables.js delete mode 100755 resources/js/plugins/dataTables/jquery.dataTables_bootstrap.js delete mode 100755 resources/js/plugins/metisMenu/metisMenu.min.js delete mode 100755 resources/js/plugins/morris/morris.min.js delete mode 100755 resources/js/plugins/morris/raphael.min.js delete mode 100644 resources/js/s_bootstrap-datetimepicker.min.js delete mode 100755 resources/js/sb-admin-2.js delete mode 100644 src/SleepingOwl/Admin/Admin.php delete mode 100644 src/SleepingOwl/Admin/AdminServiceProvider.php delete mode 100644 src/SleepingOwl/Admin/AssetManager/AssetManager.php delete mode 100644 src/SleepingOwl/Admin/Columns/Column.php delete mode 100644 src/SleepingOwl/Admin/Columns/Column/Action.php delete mode 100644 src/SleepingOwl/Admin/Columns/Column/BaseColumn.php delete mode 100644 src/SleepingOwl/Admin/Columns/Column/Control.php delete mode 100644 src/SleepingOwl/Admin/Columns/Column/Count.php delete mode 100644 src/SleepingOwl/Admin/Columns/Column/Date.php delete mode 100644 src/SleepingOwl/Admin/Columns/Column/Filter.php delete mode 100644 src/SleepingOwl/Admin/Columns/Column/Image.php delete mode 100644 src/SleepingOwl/Admin/Columns/Column/Lists.php delete mode 100644 src/SleepingOwl/Admin/Columns/Column/String.php delete mode 100644 src/SleepingOwl/Admin/Columns/Column/Url.php delete mode 100644 src/SleepingOwl/Admin/Columns/Interfaces/ColumnInterface.php delete mode 100644 src/SleepingOwl/Admin/Commands/AdministratorsCommand.php delete mode 100644 src/SleepingOwl/Admin/Commands/Compilers/ModelCompiler.php delete mode 100644 src/SleepingOwl/Admin/Commands/InstallCommand.php delete mode 100644 src/SleepingOwl/Admin/Commands/ModelCommand.php delete mode 100644 src/SleepingOwl/Admin/Commands/stubs/User.stub delete mode 100644 src/SleepingOwl/Admin/Commands/stubs/bootstrap.stub delete mode 100644 src/SleepingOwl/Admin/Commands/stubs/menu.stub delete mode 100644 src/SleepingOwl/Admin/Commands/stubs/model.stub delete mode 100644 src/SleepingOwl/Admin/Controllers/AdminController.php delete mode 100644 src/SleepingOwl/Admin/Controllers/AuthController.php delete mode 100644 src/SleepingOwl/Admin/Controllers/BaseController.php delete mode 100644 src/SleepingOwl/Admin/Controllers/DummyController.php delete mode 100644 src/SleepingOwl/Admin/Controllers/ImagesController.php delete mode 100644 src/SleepingOwl/Admin/Controllers/LangController.php delete mode 100644 src/SleepingOwl/Admin/Exceptions/MethodNotFoundException.php delete mode 100644 src/SleepingOwl/Admin/Exceptions/ModelAttributeNotFoundException.php delete mode 100644 src/SleepingOwl/Admin/Exceptions/ModelNotFoundException.php delete mode 100644 src/SleepingOwl/Admin/Exceptions/TitleNotFormattedException.php delete mode 100644 src/SleepingOwl/Admin/Exceptions/ValidationException.php delete mode 100644 src/SleepingOwl/Admin/Exceptions/ValueNotSetException.php delete mode 100755 src/SleepingOwl/Admin/Facades/AdminRouter.php delete mode 100644 src/SleepingOwl/Admin/Menu/MenuItem.php delete mode 100644 src/SleepingOwl/Admin/Models/Filters/Filter.php delete mode 100644 src/SleepingOwl/Admin/Models/Filters/Title.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/Form.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/BaseFormItem.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/BaseTime.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/Checkbox.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/Ckeditor.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/ClosureHandler.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/Date.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/File.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/Hidden.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/Image.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/MultiSelect.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/Password.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/Select.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/Text.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/TextAddon.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/Textarea.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/Time.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/Timestamp.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/FormItem/View.php delete mode 100644 src/SleepingOwl/Admin/Models/Form/Interfaces/FormItemInterface.php delete mode 100644 src/SleepingOwl/Admin/Models/ModelItem.php delete mode 100644 src/SleepingOwl/Admin/Models/Models.php delete mode 100644 src/SleepingOwl/Admin/Repositories/Interfaces/ModelRepositoryInterface.php delete mode 100644 src/SleepingOwl/Admin/Repositories/ModelRepository.php delete mode 100644 src/SleepingOwl/Admin/Router.php delete mode 100644 src/SleepingOwl/Admin/Session/QueryState.php delete mode 100644 src/SleepingOwl/Admin/Validation/Validator.php delete mode 100644 src/SleepingOwl/Admin/filters.php delete mode 100755 src/SleepingOwl/AdminAuth/AdminAuthManager.php delete mode 100755 src/SleepingOwl/AdminAuth/AdminAuthServiceProvider.php delete mode 100644 src/SleepingOwl/AdminAuth/Database/Seeders/AdministratorsTableSeeder.php delete mode 100644 src/SleepingOwl/AdminAuth/Entities/Administrator.php delete mode 100755 src/SleepingOwl/AdminAuth/Facades/AdminAuth.php delete mode 100755 src/SleepingOwl/AdminAuth/Guard.php delete mode 100644 src/SleepingOwl/DateFormatter/DateFormatter.php delete mode 100644 src/SleepingOwl/Html/FormBuilder.php delete mode 100644 src/SleepingOwl/Html/HtmlBuilder.php delete mode 100644 src/SleepingOwl/Models/Attributes/File.php delete mode 100644 src/SleepingOwl/Models/Attributes/Image.php delete mode 100644 src/SleepingOwl/Models/Interfaces/ModelWithFileFieldsInterface.php delete mode 100644 src/SleepingOwl/Models/Interfaces/ModelWithImageFieldsInterface.php delete mode 100644 src/SleepingOwl/Models/Interfaces/ModelWithOrderFieldInterface.php delete mode 100644 src/SleepingOwl/Models/Interfaces/ValidationModelInterface.php delete mode 100644 src/SleepingOwl/Models/SleepingOwlModel.php delete mode 100644 src/SleepingOwl/Models/Traits/DeleteAllModelTrait.php delete mode 100644 src/SleepingOwl/Models/Traits/ModelWithImageOrFileFieldsTrait.php delete mode 100644 src/SleepingOwl/Models/Traits/ModelWithOrderFieldTrait.php delete mode 100644 src/SleepingOwl/Models/Traits/ValidationModelTrait.php delete mode 100644 src/SleepingOwl/RandomFilenamer/RandomFilenamer.php delete mode 100644 src/config/config.php delete mode 100644 src/docs/00_Introduction.md delete mode 100644 src/docs/01_Getting_Started/00_Installation.md delete mode 100644 src/docs/01_Getting_Started/01_Configuration.md delete mode 100644 src/docs/01_Getting_Started/02_Menu_Configuration.md delete mode 100644 src/docs/01_Getting_Started/03_Model_Configuration.md delete mode 100644 src/docs/01_Getting_Started/04_Authentication.md delete mode 100644 src/docs/01_Getting_Started/05_Validation.md delete mode 100644 src/docs/01_Getting_Started/06_Localization.md delete mode 100644 src/docs/03_Commands/00_Install.md delete mode 100644 src/docs/03_Commands/01_Model_Configuration_Generation.md delete mode 100644 src/docs/03_Commands/02_Administrators.md delete mode 100644 src/docs/03_Models/00_SleepingOwlModel.md delete mode 100644 src/docs/03_Models/01_With_Image_Fields.md delete mode 100644 src/docs/03_Models/02_With_File_Fields.md delete mode 100644 src/docs/03_Models/03_Orderable_Model.md delete mode 100644 src/docs/04_Routes.md delete mode 100644 src/docs/05_FIlters/00_Overview.md delete mode 100644 src/docs/05_FIlters/01_Filter_Title.md delete mode 100644 src/docs/06_Columns/00_Overview.md delete mode 100644 src/docs/06_Columns/01_Column_Appendants.md delete mode 100644 src/docs/06_Columns/02_Custom_Columns.md delete mode 100644 src/docs/06_Columns/03_string.md delete mode 100644 src/docs/06_Columns/04_lists.md delete mode 100644 src/docs/06_Columns/05_count.md delete mode 100644 src/docs/06_Columns/06_image.md delete mode 100644 src/docs/06_Columns/07_date.md delete mode 100644 src/docs/06_Columns/08_action.md delete mode 100644 src/docs/07_Form_Elements/00_Overview.md delete mode 100644 src/docs/07_Form_Elements/01_Custom_Form_Elements.md delete mode 100644 src/docs/07_Form_Elements/02_text.md delete mode 100644 src/docs/07_Form_Elements/03_textAddon.md delete mode 100644 src/docs/07_Form_Elements/04_checkbox.md delete mode 100644 src/docs/07_Form_Elements/05_date.md delete mode 100644 src/docs/07_Form_Elements/06_time.md delete mode 100644 src/docs/07_Form_Elements/07_timestamp.md delete mode 100644 src/docs/07_Form_Elements/08_file.md delete mode 100644 src/docs/07_Form_Elements/09_image.md delete mode 100644 src/docs/07_Form_Elements/10_select.md delete mode 100644 src/docs/07_Form_Elements/11_multiSelect.md delete mode 100644 src/docs/07_Form_Elements/12_textarea.md delete mode 100644 src/docs/07_Form_Elements/13_ckeditor.md delete mode 100644 src/docs/07_Form_Elements/14_view.md delete mode 100644 src/docs/08_Troubleshooting.md delete mode 100644 src/docs/09_License.md delete mode 100644 src/lang/en/lang.php delete mode 100644 src/lang/en/validation.php delete mode 100644 src/lang/ru/lang.php delete mode 100644 src/lang/ru/validation.php delete mode 100644 src/migrations/2014_10_12_104748_create_administrators_table.php delete mode 100644 src/views/_layout/base.blade.php delete mode 100644 src/views/_layout/inner.blade.php delete mode 100644 src/views/_partials/header.blade.php delete mode 100644 src/views/_partials/menu.blade.php delete mode 100644 src/views/_partials/user.blade.php delete mode 100644 src/views/dummy.blade.php delete mode 100755 src/views/login.blade.php delete mode 100644 src/views/model/form.blade.php delete mode 100644 src/views/model/table.blade.php delete mode 100644 src/views/page.blade.php delete mode 100644 tests/.gitkeep delete mode 100644 tests/AdminTest.php delete mode 100644 tests/FilterTest.php delete mode 100644 tests/MenuItemTest.php delete mode 100644 tests/ModelItemTest.php delete mode 100644 tests/ModelsTest.php delete mode 100644 tests/QueryStateTest.php delete mode 100644 tests/RandomFilenamerTest.php delete mode 100644 tests/RouterTest.php delete mode 100644 tests/TitleTest.php diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index 8a6c48e0..00000000 --- a/CHANGELOG +++ /dev/null @@ -1,81 +0,0 @@ -CHANGELOG -========= - -2014-11-26, v1.1.4 ------------------- - -* Bugfix: renamed sort field fixed -* Bugfix: nullable relation fix - -2014-11-17, v1.1.3 ------------------- - -* Bugfix: Unique validation rule fixed - -2014-11-08, v1.1.2 ------------------- - -* Custom column now can be subclass of \SleepingOwl\Admin\Columns\Column\BaseColumn - -2014-11-08, v1.1.1 ------------------- - -* Demo file User.php updated to support php 5.4 - -2014-11-04, v1.1.0 ------------------- - -* New column type: action. Use it to add custom buttons to the tableview. See documentation for details - -2014-10-29, v1.0.10 ------------------- - -* Bugfix: Administrator username maximum length reduced to 190 to support utf8mb4 charset. Fix issue #1 - -2014-10-20, v1.0.9 ------------------- - -* Bugfix: Fixed bug with wrong date format - -2014-10-20, v1.0.8 ------------------- - -* New way to add validation rules to form elements and combine it with old method - -2014-10-16, v1.0.7 ------------------- - -* New exception when "intl" extension not installed - -2014-10-16, v1.0.6 ------------------- - -* Bugfix: Default admin credentials seeding fixed - -2014-10-16, v1.0.5 ------------------- - -* PHP 5.4 support added - -2014-10-16, v1.0.4 ------------------- - -* ValidationException handler moved to service provider -* Bugfix: Menu with subitems icon problem solved - -2014-10-15, v1.0.3 ------------------- - -* Image info speed improvements -* Model compiler template update -* Added user-friendly error message for missing getList method - -2014-10-15, v1.0.2 ------------------- - -* Global validation exception handler added - -2014-10-13, v1.0.0 ------------------- - -* Initial Version diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 6b426831..00000000 --- a/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright 2014 SleepingOwl - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 06e40c21..00000000 --- a/README.md +++ /dev/null @@ -1,68 +0,0 @@ -## Laravel 5 Admin Module - -[![Latest Stable Version](https://poser.pugx.org/sleeping-owl/admin/v/stable.svg)](https://packagist.org/packages/sleeping-owl/admin) -[![License](https://poser.pugx.org/sleeping-owl/admin/license.svg)](https://packagist.org/packages/sleeping-owl/admin) - -*Note: if you are looking for the version for Laravel 4.2 check out [laravel-4.2 branch](https://github.com/sleeping-owl/admin/tree/laravel-4.2).* - -SleepingOwl Admin is administrative interface builder for Laravel. - -It includes: - - - [sb-admin-2 template](http://startbootstrap.com/template-overviews/sb-admin-2/) - - [jQuery 1.11.0](http://jquery.org) - - [Bootstrap v3.2.0](http://getbootstrap.com) - - [Bootstrap Multiselect v0.9.8](https://github.com/davidstutz/bootstrap-multiselect) - - [DataTables 1.10.0-dev](http://www.sprymedia.co.uk) - - [Lightbox for Bootstrap 3](https://github.com/ashleydw/lightbox) - - [Font Awesome 4.1.0](http://fontawesome.io) - - [Metismenu 1.0.3](https://github.com/onokumus/metisMenu) - - [morris.js v0.5.0]() - - [bootbox.js v4.3.0](http://bootboxjs.com) - - [Bootstrap datetimepicker](http://eonasdan.github.io/bootstrap-datetimepicker/) - - [CKEditor](http://ckeditor.com) - -## Installation - - 1. Require this package in your composer.json and run composer update (or run `composer require sleeping-owl/admin:dev-laravel-5` directly): - - "sleeping-owl/admin": "2.*" - - 2. After composer update, add service providers to the `config/app.php` - - 'SleepingOwl\Admin\AdminServiceProvider', - 'Illuminate\Html\HtmlServiceProvider', - - 3. Add this to the facades in `config/app.php`: - - 'Admin' => 'SleepingOwl\Admin\Admin', - 'AdminAuth' => 'SleepingOwl\AdminAuth\Facades\AdminAuth', - 'AdminRouter' => 'SleepingOwl\Admin\Facades\AdminRouter', - 'AssetManager' => 'SleepingOwl\Admin\AssetManager\AssetManager', - 'Column' => 'SleepingOwl\Admin\Columns\Column', - 'FormItem' => 'SleepingOwl\Admin\Models\Form\FormItem', - 'ModelItem' => 'SleepingOwl\Admin\Models\ModelItem', - - 'Form' => 'Illuminate\Html\FormFacade', - 'Html' => 'Illuminate\Html\HtmlFacade', - - 4. Run this command in terminal (if you want to know what exactly this command makes, see [install command documentation](http://sleeping-owl.github.io/en/Commands/Install.html)): - - $ php artisan admin:install - -## Documentation - -Documentation can be found at [sleeping owl documentation](http://sleeping-owl.github.io). -You can also find it in the `/src/docs` directory. - -## Demo Application - -View [live demo](http://sleepingowladmindemo.cloudcontrolled.com). - -## Support Library - -You can donate via [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AXJMWMRPCBGVA) or in BTC: 13k36pym383rEmsBSLyWfT3TxCQMN2Lekd - -## Copyright and License - -Admin was written by Sleeping Owl for the Laravel framework and is released under the MIT License. See the LICENSE file for details. diff --git a/composer.json b/composer.json deleted file mode 100644 index af2a7aa9..00000000 --- a/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "sleeping-owl/admin", - "description": "Aministrative interface builder for Laravel.", - "homepage": "http://sleeping-owl.github.io", - "keywords": ["laravel", "admin", "administrator"], - "license": "MIT", - "authors": [ - { - "name": "Sleeping Owl", - "email": "owl.sleeping@yahoo.com" - } - ], - "require": { - "php": ">=5.4.0", - "illuminate/support": "5.*", - "intervention/image": "2.*", - "intervention/imagecache": "2.*", - "doctrine/dbal": "~2.3", - "sleeping-owl/with-join": "1.*", - "illuminate/html": "~5.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*", - "mockery/mockery": "0.9.*" - }, - "autoload": { - "psr-0": { - "SleepingOwl\\Admin": "src/", - "SleepingOwl\\DateFormatter": "src/", - "SleepingOwl\\Html": "src/", - "SleepingOwl\\Models": "src/", - "SleepingOwl\\RandomFilenamer": "src/" - } - } -} diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index fc3d971d..00000000 --- a/gulpfile.js +++ /dev/null @@ -1,30 +0,0 @@ -var gulp = require('gulp'); -var concat = require('gulp-concat'); -var uglify = require('gulp-uglify'); -var concatCSS = require('gulp-concat-css'); -var minifyCSS = require('gulp-minify-css'); -var notify = require('gulp-notify'); - -var src = './resources/'; -var dest = './public/'; -gulp.task('css', function () { - gulp.src(src + 'css/*.css') - .pipe(concatCSS('all.min.css')) - .pipe(minifyCSS({keepSpecialComments:0})) - .pipe(gulp.dest(dest)) - .pipe(notify('Minified CSS created.')); -}); - -gulp.task('js', function () { - gulp.src([src + 'js/jquery-1.11.0.js', src + 'js/plugins/**/*.js', src + 'js/*.js']) - .pipe(concat('all.min.js')) - .pipe(uglify()) - .pipe(gulp.dest(dest)) - .pipe(notify('Minified JS created.')); -}); - -gulp.task('default', function () { - gulp.run(['js', 'css']); - gulp.watch(src + 'js/*.js', ['js']); - gulp.watch(src + 'css/*.css', ['css']); -}); \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml deleted file mode 100644 index d0104307..00000000 --- a/phpunit.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - ./tests/ - - - - - - diff --git a/public/all.min.css b/public/all.min.css deleted file mode 100755 index 8ab0cd91..00000000 --- a/public/all.min.css +++ /dev/null @@ -1 +0,0 @@ -.inline-block{display:inline-block}#imageBrowser{max-height:300px;overflow-y:scroll}#imageBrowser .thumbnail{opacity:.7}#imageBrowser .thumbnail:hover{border-color:#428bca!important;opacity:1}.file-info{display:inline-block!important}.input-group-addon .fa-calendar,.input-group-addon .fa-clock-o{cursor:pointer}.form-group.datepicker,.form-group.timepicker{width:250px}#map{margin-bottom:15px}#map *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}#map ul{font-size:9px;line-height:12px}.dataTables_processing{position:absolute;left:50%;top:140px;margin-left:-35px}.img-container a{float:left}.img-container a+a{margin-left:20px}.img-container a.img-delete{color:#d9534f}.bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:99999!important;border-radius:4px}.bootstrap-datetimepicker-widget.timepicker-sbs{width:600px}.bootstrap-datetimepicker-widget.bottom:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:7px}.bootstrap-datetimepicker-widget.bottom:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:8px}.bootstrap-datetimepicker-widget.top:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.top:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff;position:absolute;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget .dow{width:14.2857%}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget a[data-action]{padding:6px 0}.bootstrap-datetimepicker-widget a[data-action]:active{box-shadow:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:54px;font-weight:700;font-size:1.2em;margin:0}.bootstrap-datetimepicker-widget button[data-action]{padding:6px}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget td{height:54px;line-height:54px;width:54px}.bootstrap-datetimepicker-widget td.cw{font-size:10px;height:20px;line-height:20px;color:#777}.bootstrap-datetimepicker-widget td.day{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.new,.bootstrap-datetimepicker-widget td.old{color:#777}.bootstrap-datetimepicker-widget td.today{position:relative}.bootstrap-datetimepicker-widget td.today:before{content:'';display:inline-block;border-left:7px solid transparent;border-bottom:7px solid #428bca;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:4px;right:4px}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td.active.today:before{border-bottom-color:#fff}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:0 0;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:inline-block;width:54px;height:54px;line-height:54px;margin:2px 1.5px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td span.old{color:#777}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:0 0;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget th{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget th.picker-switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{background:0 0;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-group.date .input-group-addon span{display:block;cursor:pointer;width:16px;height:16px}.bootstrap-datetimepicker-widget.left-oriented:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.left-oriented:after{left:auto;right:7px}.bootstrap-datetimepicker-widget ul.list-unstyled li div.timepicker div.timepicker-picker table.table-condensed tbody>tr>td{padding:0!important}@media screen and (max-width:767px){.bootstrap-datetimepicker-widget.timepicker-sbs{width:283px}}.multiselect-container{position:absolute;list-style-type:none;margin:0;padding:0}.multiselect-container .input-group{margin:5px}.multiselect-container>li{padding:0}.multiselect-container>li>a.multiselect-all label{font-weight:700}.multiselect-container>li>label.multiselect-group{margin:0;padding:3px 20px;height:100%;font-weight:700}.multiselect-container>li>a{padding:0}.multiselect-container>li>a>label{margin:0;height:100%;cursor:pointer;font-weight:400;padding:3px 20px 3px 40px}.multiselect-container>li>a>label.checkbox,.multiselect-container>li>a>label.radio{margin:0}.multiselect-container>li>a>label>input[type=checkbox]{margin-bottom:5px}.btn-group>.btn-group:nth-child(2)>.multiselect.btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.form-inline .multiselect-container label.checkbox,.form-inline .multiselect-container label.radio{padding:3px 20px 3px 40px}.form-inline .multiselect-container li a label.checkbox input[type=checkbox],.form-inline .multiselect-container li a label.radio input[type=radio]{margin-left:-20px;margin-right:0}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{color:#000;background:#ff0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}@media print{*{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:focus,a:hover{color:#2a6496;text-decoration:underline}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}cite{font-style:normal}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}blockquote:after,blockquote:before{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container,.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#777;opacity:1}.form-control:-ms-input-placeholder{color:#777}.form-control::-webkit-input-placeholder{color:#777}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{line-height:34px;line-height:1.42857143 \0}input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;min-height:20px;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.form-horizontal .form-group-sm .form-control,.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-horizontal .form-group-lg .form-control,.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:25px;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.3px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active:focus,.btn:active:focus,.btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.active,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary.active,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.active,.btn-success:active,.btn-success:focus,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.active,.btn-info:active,.btn-info:focus,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.active,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.active,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#428bca;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#428bca;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group-vertical>.btn:focus,.btn-group>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn>input[type=checkbox],[data-toggle=buttons]>.btn>input[type=radio]{position:absolute;z-index:-1;filter:alpha(opacity=0);opacity:0}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;margin:8px -15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#777}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#777}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#777}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#777}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#428bca;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#428bca}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.nav-pills>.active>a>.badge,a.list-group-item.active>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar[aria-valuenow="1"],.progress-bar[aria-valuenow="2"]{min-width:30px}.progress-bar[aria-valuenow="0"]{min-width:30px;color:#777;background-color:transparent;background-image:none;-webkit-box-shadow:none;box-shadow:none}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#428bca}.panel-primary>.panel-heading .badge{color:#428bca;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate3d(0,-25%,0);-o-transform:translate3d(0,-25%,0);transform:translate3d(0,-25%,0)}.modal.in .modal-dialog{-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;line-height:1.4;visibility:visible;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-print,.visible-print-block,.visible-print-inline,.visible-print-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}@media print{.visible-print-block{display:block!important}}@media print{.visible-print-inline{display:inline!important}}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}div.dataTables_length label{float:left;text-align:left;font-weight:400}div.dataTables_length select{width:75px}div.dataTables_filter label{float:right;font-weight:400}div.dataTables_filter input{width:16em}div.dataTables_info{padding-top:8px}div.dataTables_paginate{float:right;margin:0}div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}table.dataTable,table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}table.dataTable{clear:both;margin-top:6px!important;margin-bottom:6px!important;max-width:none!important}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_desc_disabled{cursor:pointer}table.dataTable th:active{outline:0}div.dataTables_scrollHead table{margin-bottom:0!important;border-bottom-left-radius:0;border-bottom-right-radius:0}div.dataTables_scrollHead table thead tr:last-child td:first-child,div.dataTables_scrollHead table thead tr:last-child th:first-child{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}div.dataTables_scrollBody table{margin-top:0!important;margin-bottom:0!important;border-top:none}div.dataTables_scrollBody tbody tr:first-child td,div.dataTables_scrollBody tbody tr:first-child th{border-top:none}div.dataTables_scrollFoot table{margin-top:0!important;border-top:none}.table tbody tr.active td,.table tbody tr.active th{color:#fff;background-color:#08C}.table tbody tr.active:hover td,.table tbody tr.active:hover th{background-color:#0075b0!important}.table tbody tr.active a{color:#fff}.table-striped tbody tr.active:nth-child(odd) td,.table-striped tbody tr.active:nth-child(odd) th{background-color:#017ebc}table.DTTT_selectable tbody tr{cursor:pointer}div.DTTT .btn{font-size:12px;color:#333!important}div.DTTT .btn:hover{text-decoration:none!important}ul.DTTT_dropdown.dropdown-menu{z-index:2003}ul.DTTT_dropdown.dropdown-menu a{color:#333!important}ul.DTTT_dropdown.dropdown-menu li{position:relative}ul.DTTT_dropdown.dropdown-menu li:hover a{color:#fff!important;background-color:#08c}div.DTTT_collection_background{z-index:2002}div.DTTT_print_info.modal{height:150px;margin-top:-75px;text-align:center}div.DTTT_print_info h6{margin:1em;font-size:28px;font-weight:400;line-height:28px}div.DTTT_print_info p{font-size:14px;line-height:20px}div.DTFC_LeftFootWrapper table,div.DTFC_LeftHeadWrapper table,div.DTFC_RightFootWrapper table,div.DTFC_RightHeadWrapper table,table.DTFC_Cloned tr.even{background-color:#fff}div.DTFC_LeftHeadWrapper table,div.DTFC_RightHeadWrapper table{margin-bottom:0!important;border-top-right-radius:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}div.DTFC_LeftHeadWrapper table thead tr:last-child td:first-child,div.DTFC_LeftHeadWrapper table thead tr:last-child th:first-child,div.DTFC_RightHeadWrapper table thead tr:last-child td:first-child,div.DTFC_RightHeadWrapper table thead tr:last-child th:first-child{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}div.DTFC_LeftBodyWrapper table,div.DTFC_RightBodyWrapper table{margin-bottom:0!important;border-top:none}div.DTFC_LeftBodyWrapper tbody tr:first-child td,div.DTFC_LeftBodyWrapper tbody tr:first-child th,div.DTFC_LeftFootWrapper table,div.DTFC_RightBodyWrapper tbody tr:first-child td,div.DTFC_RightBodyWrapper tbody tr:first-child th,div.DTFC_RightFootWrapper table{border-top:none}.ekko-lightbox-container{position:relative}.ekko-lightbox-nav-overlay{position:absolute;top:0;left:0;z-index:100;width:100%;height:100%}.ekko-lightbox-nav-overlay a{z-index:100;display:block;width:49%;height:100%;padding-top:45%;font-size:30px;color:#fff;text-shadow:2px 2px 4px #000;opacity:0;filter:dropshadow(color=#000000,offx=2,offy=2);-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ekko-lightbox-nav-overlay a:empty{width:49%}.ekko-lightbox a:hover{text-decoration:none;opacity:1}.ekko-lightbox .glyphicon-chevron-left{left:0;float:left;padding-left:15px;text-align:left}.ekko-lightbox .glyphicon-chevron-right{right:0;float:right;padding-right:15px;text-align:right}.ekko-lightbox .modal-footer{text-align:left}@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?v=4.1.0);src:url(fonts/fontawesome-webfont.eot?#iefix&v=4.1.0) format('embedded-opentype'),url(fonts/fontawesome-webfont.woff?v=4.1.0) format('woff'),url(fonts/fontawesome-webfont.ttf?v=4.1.0) format('truetype'),url(fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular) format('svg');font-weight:400;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-square:before,.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.arrow{float:right}.glyphicon.arrow:before{content:"\e079"}.active>a>.glyphicon.arrow:before{content:"\e114"}.fa.arrow:before{content:"\f104"}.active>a>.fa.arrow:before{content:"\f107"}.plus-times{float:right}.fa.plus-times:before{content:"\f067"}.active>a>.fa.plus-times{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.plus-minus{float:right}.fa.plus-minus:before{content:"\f067"}.active>a>.fa.plus-minus:before{content:"\f068"}.morris-hover{position:absolute;z-index:1000}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#666;background:rgba(255,255,255,.8);border:2px solid rgba(230,230,230,.8);font-family:sans-serif;font-size:12px;text-align:center}.morris-hover.morris-default-style .morris-hover-row-label{font-weight:700;margin:.25em 0}.morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:.1em 0}body{background-color:#f8f8f8}#wrapper{width:100%}#page-wrapper{padding:0 15px;min-height:568px;background-color:#fff}@media (min-width:768px){#page-wrapper{position:inherit;margin:0 0 0 250px;padding:0 30px;border-left:1px solid #e7e7e7}}.navbar-top-links li{display:inline-block}.navbar-top-links li:last-child{margin-right:15px}.navbar-top-links li a{padding:15px;min-height:50px}.navbar-top-links .dropdown-menu li{display:block}.navbar-top-links .dropdown-menu li:last-child{margin-right:0}.navbar-top-links .dropdown-menu li a{padding:3px 20px;min-height:0}.navbar-top-links .dropdown-menu li a div{white-space:normal}.navbar-top-links .dropdown-alerts,.navbar-top-links .dropdown-messages,.navbar-top-links .dropdown-tasks{width:310px;min-width:0}.navbar-top-links .dropdown-messages{margin-left:5px}.navbar-top-links .dropdown-tasks{margin-left:-59px}.navbar-top-links .dropdown-alerts{margin-left:-123px}.navbar-top-links .dropdown-user{right:0;left:auto}.sidebar .sidebar-nav.navbar-collapse{padding-right:0;padding-left:0}.sidebar .sidebar-search{padding:15px}.sidebar ul li{border-bottom:1px solid #e7e7e7}.sidebar ul li a.active{background-color:#eee}.sidebar .arrow{float:right}.sidebar .fa.arrow:before{content:"\f104"}.sidebar .active>a>.fa.arrow:before{content:"\f107"}.sidebar .nav-second-level li,.sidebar .nav-third-level li{border-bottom:0!important}.sidebar .nav-second-level li a{padding-left:37px}.sidebar .nav-third-level li a{padding-left:52px}@media (min-width:768px){.sidebar{z-index:1;position:absolute;width:250px;margin-top:51px}.navbar-top-links .dropdown-alerts,.navbar-top-links .dropdown-messages,.navbar-top-links .dropdown-tasks{margin-left:auto}}.btn-outline{color:inherit;background-color:transparent;transition:all .5s}.btn-primary.btn-outline{color:#428bca}.btn-success.btn-outline{color:#5cb85c}.btn-info.btn-outline{color:#5bc0de}.btn-warning.btn-outline{color:#f0ad4e}.btn-danger.btn-outline{color:#d9534f}.btn-danger.btn-outline:hover,.btn-info.btn-outline:hover,.btn-primary.btn-outline:hover,.btn-success.btn-outline:hover,.btn-warning.btn-outline:hover{color:#fff}.chat{margin:0;padding:0;list-style:none}.chat li{margin-bottom:10px;padding-bottom:5px;border-bottom:1px dotted #999}.chat li.left .chat-body{margin-left:60px}.chat li.right .chat-body{margin-right:60px}.chat li .chat-body p{margin:0}.chat .glyphicon,.panel .slidedown .glyphicon{margin-right:5px}.chat-panel .panel-body{height:350px;overflow-y:scroll}.login-panel{margin-top:25%}.flot-chart{display:block;height:400px}.flot-chart-content{width:100%;height:100%}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_desc_disabled{background:0 0}table.dataTable thead .sorting_asc:after{content:"\f0de";float:right;font-family:fontawesome}table.dataTable thead .sorting_desc:after{content:"\f0dd";float:right;font-family:fontawesome}table.dataTable thead .sorting:after{content:"\f0dc";float:right;font-family:fontawesome;color:rgba(50,50,50,.5)}.btn-circle{width:30px;height:30px;padding:6px 0;border-radius:15px;text-align:center;font-size:12px;line-height:1.428571429}.btn-circle.btn-lg{width:50px;height:50px;padding:10px 16px;border-radius:25px;font-size:18px;line-height:1.33}.btn-circle.btn-xl{width:70px;height:70px;padding:10px 16px;border-radius:35px;font-size:24px;line-height:1.33}.show-grid [class^=col-]{padding-top:10px;padding-bottom:10px;border:1px solid #ddd;background-color:#eee!important}.show-grid{margin:15px 0}.huge{font-size:40px}.panel-green{border-color:#5cb85c}.panel-green .panel-heading{border-color:#5cb85c;color:#fff;background-color:#5cb85c}.panel-green a{color:#5cb85c}.panel-green a:hover{color:#3d8b3d}.panel-red{border-color:#d9534f}.panel-red .panel-heading{border-color:#d9534f;color:#fff;background-color:#d9534f}.panel-red a{color:#d9534f}.panel-red a:hover{color:#b52b27}.panel-yellow{border-color:#f0ad4e}.panel-yellow .panel-heading{border-color:#f0ad4e;color:#fff;background-color:#f0ad4e}.panel-yellow a{color:#f0ad4e}.panel-yellow a:hover{color:#df8a13} \ No newline at end of file diff --git a/public/all.min.js b/public/all.min.js deleted file mode 100755 index 0e7a171b..00000000 --- a/public/all.min.js +++ /dev/null @@ -1,17 +0,0 @@ -if(!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function n(t){var e=t.length,n=re.type(t);return"function"===n||re.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}function i(t,e,n){if(re.isFunction(e))return re.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return re.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(pe.test(e))return re.filter(e,t,n);e=re.filter(e,t)}return re.grep(t,function(t){return re.inArray(t,e)>=0!==n})}function a(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function r(t){var e=we[t]={};return re.each(t.match(be)||[],function(t,n){e[n]=!0}),e}function s(){me.addEventListener?(me.removeEventListener("DOMContentLoaded",o,!1),t.removeEventListener("load",o,!1)):(me.detachEvent("onreadystatechange",o),t.detachEvent("onload",o))}function o(){(me.addEventListener||"load"===event.type||"complete"===me.readyState)&&(s(),re.ready())}function l(t,e,n){if(void 0===n&&1===t.nodeType){var i="data-"+e.replace(Te,"-$1").toLowerCase();if(n=t.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:De.test(n)?re.parseJSON(n):n}catch(a){}re.data(t,e,n)}else n=void 0}return n}function d(t){var e;for(e in t)if(("data"!==e||!re.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function u(t,e,n,i){if(re.acceptData(t)){var a,r,s=re.expando,o=t.nodeType,l=o?re.cache:t,d=o?t[s]:t[s]&&s;if(d&&l[d]&&(i||l[d].data)||void 0!==n||"string"!=typeof e)return d||(d=o?t[s]=G.pop()||re.guid++:s),l[d]||(l[d]=o?{}:{toJSON:re.noop}),("object"==typeof e||"function"==typeof e)&&(i?l[d]=re.extend(l[d],e):l[d].data=re.extend(l[d].data,e)),r=l[d],i||(r.data||(r.data={}),r=r.data),void 0!==n&&(r[re.camelCase(e)]=n),"string"==typeof e?(a=r[e],null==a&&(a=r[re.camelCase(e)])):a=r,a}}function c(t,e,n){if(re.acceptData(t)){var i,a,r=t.nodeType,s=r?re.cache:t,o=r?t[re.expando]:re.expando;if(s[o]){if(e&&(i=n?s[o]:s[o].data)){re.isArray(e)?e=e.concat(re.map(e,re.camelCase)):e in i?e=[e]:(e=re.camelCase(e),e=e in i?[e]:e.split(" ")),a=e.length;for(;a--;)delete i[e[a]];if(n?!d(i):!re.isEmptyObject(i))return}(n||(delete s[o].data,d(s[o])))&&(r?re.cleanData([t],!0):ie.deleteExpando||s!=s.window?delete s[o]:s[o]=null)}}}function h(){return!0}function p(){return!1}function f(){try{return me.activeElement}catch(t){}}function m(t){var e=He.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function _(t,e){var n,i,a=0,r=typeof t.getElementsByTagName!==xe?t.getElementsByTagName(e||"*"):typeof t.querySelectorAll!==xe?t.querySelectorAll(e||"*"):void 0;if(!r)for(r=[],n=t.childNodes||t;null!=(i=n[a]);a++)!e||re.nodeName(i,e)?r.push(i):re.merge(r,_(i,e));return void 0===e||e&&re.nodeName(t,e)?re.merge([t],r):r}function g(t){Ae.test(t.type)&&(t.defaultChecked=t.checked)}function y(t,e){return re.nodeName(t,"table")&&re.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function v(t){return t.type=(null!==re.find.attr(t,"type"))+"/"+t.type,t}function b(t){var e=Ge.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function w(t,e){for(var n,i=0;null!=(n=t[i]);i++)re._data(n,"globalEval",!e||re._data(e[i],"globalEval"))}function M(t,e){if(1===e.nodeType&&re.hasData(t)){var n,i,a,r=re._data(t),s=re._data(e,r),o=r.events;if(o){delete s.handle,s.events={};for(n in o)for(i=0,a=o[n].length;a>i;i++)re.event.add(e,n,o[n][i])}s.data&&(s.data=re.extend({},s.data))}}function L(t,e){var n,i,a;if(1===e.nodeType){if(n=e.nodeName.toLowerCase(),!ie.noCloneEvent&&e[re.expando]){a=re._data(e);for(i in a.events)re.removeEvent(e,i,a.handle);e.removeAttribute(re.expando)}"script"===n&&e.text!==t.text?(v(e).text=t.text,b(e)):"object"===n?(e.parentNode&&(e.outerHTML=t.outerHTML),ie.html5Clone&&t.innerHTML&&!re.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===n&&Ae.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===n?e.defaultSelected=e.selected=t.defaultSelected:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}}function x(e,n){var i=re(n.createElement(e)).appendTo(n.body),a=t.getDefaultComputedStyle?t.getDefaultComputedStyle(i[0]).display:re.css(i[0],"display");return i.detach(),a}function D(t){var e=me,n=tn[t];return n||(n=x(t,e),"none"!==n&&n||(Ze=(Ze||re("'),this.modal_arrows?this.modal_arrows.css("display","none"):void 0},showVimeoVideo:function(t){var e,n,i;return e=500/281,i=this.$element.data("width")||560,i=this.checkDimensions(i),n=i/e,this.resize(i),this.lightbox_body.html(''),this.modal_arrows?this.modal_arrows.css("display","none"):void 0},showInstagramVideo:function(t){var e,n;return n=this.$element.data("width")||612,n=this.checkDimensions(n),e=n,this.resize(n),this.lightbox_body.html(''),this.modal_arrows?this.modal_arrows.css("display","none"):void 0},error:function(t){return this.lightbox_body.html(t),this},preloadImage:function(e,n){var i,a=this;return i=new Image,(null==n||n===!0)&&(i.onload=function(){var e;return e=t(""),e.attr("src",i.src),e.addClass("img-responsive"),a.lightbox_body.html(e),a.modal_arrows&&a.modal_arrows.css("display","block"),a.resize(i.width)},i.onerror=function(){return a.error("Failed to load image: "+e)}),i.src=e,i},resize:function(e){var n;return n=e+this.border.left+this.padding.left+this.padding.right+this.border.right,this.modal_dialog.css("width","auto").css("max-width",n),this.lightbox_container.find("a").css("padding-top",function(){return t(this).parent().height()/2}),this},checkDimensions:function(t){var e,n;return n=t+this.border.left+this.padding.left+this.padding.right+this.border.right,e=document.body.clientWidth,n>e&&(t=this.modal_body.width()),t},close:function(){return this.modal.modal("hide")},addTrailingSlash:function(t){return"/"!==t.substr(-1)&&(t+="/"),t}},t.fn.ekkoLightbox=function(n){return this.each(function(){var i;return i=t(this),n=t.extend({remote:i.attr("data-remote")||i.attr("href"),gallery_parent_selector:i.attr("data-parent"),type:i.attr("data-type")},n,i.data()),new e(this,n),this})},t.fn.ekkoLightbox.defaults={gallery_parent_selector:"*:not(.row)",left_arrow_class:".glyphicon .glyphicon-chevron-left",right_arrow_class:".glyphicon .glyphicon-chevron-right",directional_arrows:!0,type:null,always_show_close:!0,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){}}}.call(this),function(t){function e(t,e,n){switch(arguments.length){case 2:return null!=t?t:e;case 3:return null!=t?t:null!=e?e:n;default:throw new Error("Implement me")}}function n(t,e){return De.call(t,e)}function i(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function a(t){ve.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function r(t,e){var n=!0;return h(function(){return n&&(a(t),n=!1),e.apply(this,arguments)},e)}function s(t,e){gn[t]||(a(e),gn[t]=!0)}function o(t,e){return function(n){return m(t.call(this,n),e)}}function l(t,e){return function(n){return this.localeData().ordinal(t.call(this,n),e)}}function d(){}function u(t,e){e!==!1&&A(t),p(this,t),this._d=new Date(+t._d)}function c(t){var e=x(t),n=e.year||0,i=e.quarter||0,a=e.month||0,r=e.week||0,s=e.day||0,o=e.hour||0,l=e.minute||0,d=e.second||0,u=e.millisecond||0;this._milliseconds=+u+1e3*d+6e4*l+36e5*o,this._days=+s+7*r,this._months=+a+3*i+12*n,this._data={},this._locale=ve.localeData(),this._bubble()}function h(t,e){for(var i in e)n(e,i)&&(t[i]=e[i]);return n(e,"toString")&&(t.toString=e.toString),n(e,"valueOf")&&(t.valueOf=e.valueOf),t}function p(t,e){var n,i,a;if("undefined"!=typeof e._isAMomentObject&&(t._isAMomentObject=e._isAMomentObject),"undefined"!=typeof e._i&&(t._i=e._i),"undefined"!=typeof e._f&&(t._f=e._f),"undefined"!=typeof e._l&&(t._l=e._l),"undefined"!=typeof e._strict&&(t._strict=e._strict),"undefined"!=typeof e._tzm&&(t._tzm=e._tzm),"undefined"!=typeof e._isUTC&&(t._isUTC=e._isUTC),"undefined"!=typeof e._offset&&(t._offset=e._offset),"undefined"!=typeof e._pf&&(t._pf=e._pf),"undefined"!=typeof e._locale&&(t._locale=e._locale),je.length>0)for(n in je)i=je[n],a=e[i],"undefined"!=typeof a&&(t[i]=a);return t}function f(t){return 0>t?Math.ceil(t):Math.floor(t)}function m(t,e,n){for(var i=""+Math.abs(t),a=t>=0;i.lengthi;i++)(n&&t[i]!==e[i]||!n&&T(t[i])!==T(e[i]))&&s++;return s+r}function L(t){if(t){var e=t.toLowerCase().replace(/(.)s$/,"$1");t=un[t]||cn[e]||e}return t}function x(t){var e,i,a={};for(i in t)n(t,i)&&(e=L(i),e&&(a[e]=t[i]));return a}function D(e){var n,i;if(0===e.indexOf("week"))n=7,i="day";else{if(0!==e.indexOf("month"))return;n=12,i="month"}ve[e]=function(a,r){var s,o,l=ve._locale[e],d=[];if("number"==typeof a&&(r=a,a=t),o=function(t){var e=ve().utc().set(i,t);return l.call(ve._locale,e,a||"")},null!=r)return o(r);for(s=0;n>s;s++)d.push(o(s));return d}}function T(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=e>=0?Math.floor(e):Math.ceil(e)),n}function k(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function Y(t,e,n){return oe(ve([t,11,31+e-n]),e,n).week}function S(t){return C(t)?366:365}function C(t){return t%4===0&&t%100!==0||t%400===0}function A(t){var e;t._a&&-2===t._pf.overflow&&(e=t._a[ke]<0||t._a[ke]>11?ke:t._a[Ye]<1||t._a[Ye]>k(t._a[Te],t._a[ke])?Ye:t._a[Se]<0||t._a[Se]>23?Se:t._a[Ce]<0||t._a[Ce]>59?Ce:t._a[Ae]<0||t._a[Ae]>59?Ae:t._a[Fe]<0||t._a[Fe]>999?Fe:-1,t._pf._overflowDayOfYear&&(Te>e||e>Ye)&&(e=Ye),t._pf.overflow=e)}function F(t){return null==t._isValid&&(t._isValid=!isNaN(t._d.getTime())&&t._pf.overflow<0&&!t._pf.empty&&!t._pf.invalidMonth&&!t._pf.nullInput&&!t._pf.invalidFormat&&!t._pf.userInvalidated,t._strict&&(t._isValid=t._isValid&&0===t._pf.charsLeftOver&&0===t._pf.unusedTokens.length)),t._isValid}function E(t){return t?t.toLowerCase().replace("_","-"):t}function j(t){for(var e,n,i,a,r=0;r0;){if(i=N(a.slice(0,e).join("-")))return i;if(n&&n.length>=e&&M(a,n,!0)>=e-1)break;e--}r++}return null}function N(t){var e=null;if(!Ee[t]&&Ne)try{e=ve.locale(),require("./locale/"+t),ve.locale(e)}catch(n){}return Ee[t]}function I(t,e){return e._isUTC?ve(t).zone(e._offset||0):ve(t).local()}function H(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function P(t){var e,n,i=t.match(We);for(e=0,n=i.length;n>e;e++)i[e]=_n[i[e]]?_n[i[e]]:H(i[e]);return function(a){var r="";for(e=0;n>e;e++)r+=i[e]instanceof Function?i[e].call(a,t):i[e];return r}}function W(t,e){return t.isValid()?(e=O(e,t.localeData()),hn[e]||(hn[e]=P(e)),hn[e](t)):t.localeData().invalidDate()}function O(t,e){function n(t){return e.longDateFormat(t)||t}var i=5;for(Oe.lastIndex=0;i>=0&&Oe.test(t);)t=t.replace(Oe,n),Oe.lastIndex=0,i-=1;return t}function $(t,e){var n,i=e._strict;switch(t){case"Q":return Ke;case"DDDD":return Ze;case"YYYY":case"GGGG":case"gggg":return i?tn:ze;case"Y":case"G":case"g":return nn;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return i?en:Re;case"S":if(i)return Ke;case"SS":if(i)return Qe;case"SSS":if(i)return Ze;case"DDD":return Be;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Ue;case"a":case"A":return e._locale._meridiemParse;case"X":return Je;case"Z":case"ZZ":return Ve;case"T":return Ge;case"SSSS":return qe;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return i?Qe:$e;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return $e;case"Do":return Xe;default:return n=new RegExp(X(J(t.replace("\\","")),"i"))}}function B(t){t=t||"";var e=t.match(Ve)||[],n=e[e.length-1]||[],i=(n+"").match(ln)||["-",0,0],a=+(60*i[1])+T(i[2]);return"+"===i[0]?-a:a}function z(t,e,n){var i,a=n._a;switch(t){case"Q":null!=e&&(a[ke]=3*(T(e)-1));break;case"M":case"MM":null!=e&&(a[ke]=T(e)-1);break;case"MMM":case"MMMM":i=n._locale.monthsParse(e),null!=i?a[ke]=i:n._pf.invalidMonth=e;break;case"D":case"DD":null!=e&&(a[Ye]=T(e));break;case"Do":null!=e&&(a[Ye]=T(parseInt(e,10)));break;case"DDD":case"DDDD":null!=e&&(n._dayOfYear=T(e));break;case"YY":a[Te]=ve.parseTwoDigitYear(e);break;case"YYYY":case"YYYYY":case"YYYYYY":a[Te]=T(e);break;case"a":case"A":n._isPm=n._locale.isPM(e);break;case"H":case"HH":case"h":case"hh":a[Se]=T(e);break;case"m":case"mm":a[Ce]=T(e);break;case"s":case"ss":a[Ae]=T(e);break;case"S":case"SS":case"SSS":case"SSSS":a[Fe]=T(1e3*("0."+e));break;case"X":n._d=new Date(1e3*parseFloat(e));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=B(e);break;case"dd":case"ddd":case"dddd":i=n._locale.weekdaysParse(e),null!=i?(n._w=n._w||{},n._w.d=i):n._pf.invalidWeekday=e;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":t=t.substr(0,1);case"gggg":case"GGGG":case"GGGGG":t=t.substr(0,2),e&&(n._w=n._w||{},n._w[t]=T(e));break;case"gg":case"GG":n._w=n._w||{},n._w[t]=ve.parseTwoDigitYear(e)}}function R(t){var n,i,a,r,s,o,l;n=t._w,null!=n.GG||null!=n.W||null!=n.E?(s=1,o=4,i=e(n.GG,t._a[Te],oe(ve(),1,4).year),a=e(n.W,1),r=e(n.E,1)):(s=t._locale._week.dow,o=t._locale._week.doy,i=e(n.gg,t._a[Te],oe(ve(),s,o).year),a=e(n.w,1),null!=n.d?(r=n.d,s>r&&++a):r=null!=n.e?n.e+s:s),l=le(i,a,r,o,s),t._a[Te]=l.year,t._dayOfYear=l.dayOfYear}function q(t){var n,i,a,r,s=[];if(!t._d){for(a=V(t),t._w&&null==t._a[Ye]&&null==t._a[ke]&&R(t),t._dayOfYear&&(r=e(t._a[Te],a[Te]),t._dayOfYear>S(r)&&(t._pf._overflowDayOfYear=!0),i=ie(r,0,t._dayOfYear),t._a[ke]=i.getUTCMonth(),t._a[Ye]=i.getUTCDate()),n=0;3>n&&null==t._a[n];++n)t._a[n]=s[n]=a[n];for(;7>n;n++)t._a[n]=s[n]=null==t._a[n]?2===n?1:0:t._a[n];t._d=(t._useUTC?ie:ne).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()+t._tzm)}}function U(t){var e;t._d||(e=x(t._i),t._a=[e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond],q(t))}function V(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function G(t){if(t._f===ve.ISO_8601)return void Q(t);t._a=[],t._pf.empty=!0;var e,n,i,a,r,s=""+t._i,o=s.length,l=0;for(i=O(t._f,t._locale).match(We)||[],e=0;e0&&t._pf.unusedInput.push(r),s=s.slice(s.indexOf(n)+n.length),l+=n.length),_n[a]?(n?t._pf.empty=!1:t._pf.unusedTokens.push(a),z(a,n,t)):t._strict&&!n&&t._pf.unusedTokens.push(a);t._pf.charsLeftOver=o-l,s.length>0&&t._pf.unusedInput.push(s),t._isPm&&t._a[Se]<12&&(t._a[Se]+=12),t._isPm===!1&&12===t._a[Se]&&(t._a[Se]=0),q(t),A(t)}function J(t){return t.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,a){return e||n||i||a})}function X(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function K(t){var e,n,a,r,s;if(0===t._f.length)return t._pf.invalidFormat=!0,void(t._d=new Date(0/0));for(r=0;rs)&&(a=s,n=e));h(t,n||e)}function Q(t){var e,n,i=t._i,a=an.exec(i);if(a){for(t._pf.iso=!0,e=0,n=sn.length;n>e;e++)if(sn[e][1].exec(i)){t._f=sn[e][0]+(a[6]||" ");break}for(e=0,n=on.length;n>e;e++)if(on[e][1].exec(i)){t._f+=on[e][0];break}i.match(Ve)&&(t._f+="Z"),G(t)}else t._isValid=!1}function Z(t){Q(t),t._isValid===!1&&(delete t._isValid,ve.createFromInputFallback(t))}function te(t,e){var n,i=[];for(n=0;nt&&o.setFullYear(t),o}function ie(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function ae(t,e){if("string"==typeof t)if(isNaN(t)){if(t=e.weekdaysParse(t),"number"!=typeof t)return null}else t=parseInt(t,10);return t}function re(t,e,n,i,a){return a.relativeTime(e||1,!!n,t,i)}function se(t,e,n){var i=ve.duration(t).abs(),a=xe(i.as("s")),r=xe(i.as("m")),s=xe(i.as("h")),o=xe(i.as("d")),l=xe(i.as("M")),d=xe(i.as("y")),u=a0,u[4]=n,re.apply({},u)}function oe(t,e,n){var i,a=n-e,r=n-t.day();return r>a&&(r-=7),a-7>r&&(r+=7),i=ve(t).add(r,"d"),{week:Math.ceil(i.dayOfYear()/7),year:i.year()}}function le(t,e,n,i,a){var r,s,o=ie(t,0,1).getUTCDay();return o=0===o?7:o,n=null!=n?n:a,r=a-o+(o>i?7:0)-(a>o?7:0),s=7*(e-1)+(n-a)+r+1,{year:s>0?t:t-1,dayOfYear:s>0?s:S(t-1)+s}}function de(e){var n=e._i,i=e._f;return e._locale=e._locale||ve.localeData(e._l),null===n||i===t&&""===n?ve.invalid({nullInput:!0}):("string"==typeof n&&(e._i=n=e._locale.preparse(n)),ve.isMoment(n)?new u(n,!0):(i?b(i)?K(e):G(e):ee(e),new u(e)))}function ue(t,e){var n,i;if(1===e.length&&b(e[0])&&(e=e[0]),!e.length)return ve();for(n=e[0],i=1;i=0?"+":"-";return e+m(Math.abs(t),6)},gg:function(){return m(this.weekYear()%100,2)},gggg:function(){return m(this.weekYear(),4)},ggggg:function(){return m(this.weekYear(),5)},GG:function(){return m(this.isoWeekYear()%100,2)},GGGG:function(){return m(this.isoWeekYear(),4)},GGGGG:function(){return m(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return T(this.milliseconds()/100)},SS:function(){return m(T(this.milliseconds()/10),2)},SSS:function(){return m(this.milliseconds(),3)},SSSS:function(){return m(this.milliseconds(),3)},Z:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+m(T(t/60),2)+":"+m(T(t)%60,2)},ZZ:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+m(T(t/60),2)+m(T(t)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},gn={},yn=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];fn.length;)we=fn.pop(),_n[we+"o"]=l(_n[we],we);for(;mn.length;)we=mn.pop(),_n[we+we]=o(_n[we],2);_n.DDDD=o(_n.DDD,3),h(d.prototype,{set:function(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(t){return this._months[t.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(t){return this._monthsShort[t.month()]},monthsParse:function(t){var e,n,i;for(this._monthsParse||(this._monthsParse=[]),e=0;12>e;e++)if(this._monthsParse[e]||(n=ve.utc([2e3,e]),i="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[e]=new RegExp(i.replace(".",""),"i")),this._monthsParse[e].test(t))return e},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(t){return this._weekdays[t.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(t){return this._weekdaysShort[t.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(t){return this._weekdaysMin[t.day()]},weekdaysParse:function(t){var e,n,i;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;7>e;e++)if(this._weekdaysParse[e]||(n=ve([2e3,1]).day(e),i="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(i.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e},isPM:function(t){return"p"===(t+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(t,e){var n=this._calendar[t];return"function"==typeof n?n.apply(e):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(t,e,n,i){var a=this._relativeTime[n];return"function"==typeof a?a(t,e,n,i):a.replace(/%d/i,t)},pastFuture:function(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)},ordinal:function(t){return this._ordinal.replace("%d",t)},_ordinal:"%d",preparse:function(t){return t},postformat:function(t){return t},week:function(t){return oe(t,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),ve=function(e,n,a,r){var s;return"boolean"==typeof a&&(r=a,a=t),s={},s._isAMomentObject=!0,s._i=e,s._f=n,s._l=a,s._strict=r,s._isUTC=!1,s._pf=i(),de(s)},ve.suppressDeprecationWarnings=!1,ve.createFromInputFallback=r("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i)}),ve.min=function(){var t=[].slice.call(arguments,0);return ue("isBefore",t)},ve.max=function(){var t=[].slice.call(arguments,0);return ue("isAfter",t)},ve.utc=function(e,n,a,r){var s;return"boolean"==typeof a&&(r=a,a=t),s={},s._isAMomentObject=!0,s._useUTC=!0,s._isUTC=!0,s._l=a,s._i=e,s._f=n,s._strict=r,s._pf=i(),de(s).utc()},ve.unix=function(t){return ve(1e3*t)},ve.duration=function(t,e){var i,a,r,s,o=t,l=null;return ve.isDuration(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(o={},e?o[e]=t:o.milliseconds=t):(l=He.exec(t))?(i="-"===l[1]?-1:1,o={y:0,d:T(l[Ye])*i,h:T(l[Se])*i,m:T(l[Ce])*i,s:T(l[Ae])*i,ms:T(l[Fe])*i}):(l=Pe.exec(t))?(i="-"===l[1]?-1:1,r=function(t){var e=t&&parseFloat(t.replace(",","."));return(isNaN(e)?0:e)*i},o={y:r(l[2]),M:r(l[3]),d:r(l[4]),h:r(l[5]),m:r(l[6]),s:r(l[7]),w:r(l[8])}):"object"==typeof o&&("from"in o||"to"in o)&&(s=g(ve(o.from),ve(o.to)),o={},o.ms=s.milliseconds,o.M=s.months),a=new c(o),ve.isDuration(t)&&n(t,"_locale")&&(a._locale=t._locale),a},ve.version=Me,ve.defaultFormat=rn,ve.ISO_8601=function(){},ve.momentProperties=je,ve.updateOffset=function(){},ve.relativeTimeThreshold=function(e,n){return pn[e]===t?!1:n===t?pn[e]:(pn[e]=n,!0)},ve.lang=r("moment.lang is deprecated. Use moment.locale instead.",function(t,e){return ve.locale(t,e)}),ve.locale=function(t,e){var n;return t&&(n="undefined"!=typeof e?ve.defineLocale(t,e):ve.localeData(t),n&&(ve.duration._locale=ve._locale=n)),ve._locale._abbr},ve.defineLocale=function(t,e){return null!==e?(e.abbr=t,Ee[t]||(Ee[t]=new d),Ee[t].set(e),ve.locale(t),Ee[t]):(delete Ee[t],null)},ve.langData=r("moment.langData is deprecated. Use moment.localeData instead.",function(t){return ve.localeData(t)}),ve.localeData=function(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ve._locale;if(!b(t)){if(e=N(t))return e;t=[t]}return j(t)},ve.isMoment=function(t){return t instanceof u||null!=t&&n(t,"_isAMomentObject")},ve.isDuration=function(t){return t instanceof c};for(we=yn.length-1;we>=0;--we)D(yn[we]);ve.normalizeUnits=function(t){return L(t)},ve.invalid=function(t){var e=ve.utc(0/0);return null!=t?h(e._pf,t):e._pf.userInvalidated=!0,e},ve.parseZone=function(){return ve.apply(null,arguments).parseZone()},ve.parseTwoDigitYear=function(t){return T(t)+(T(t)>68?1900:2e3)},h(ve.fn=u.prototype,{clone:function(){return ve(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var t=ve(this).utc();return 00:!1},parsingFlags:function(){return h({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(t){return this.zone(0,t)},local:function(t){return this._isUTC&&(this.zone(0,t),this._isUTC=!1,t&&this.add(this._dateTzOffset(),"m")),this},format:function(t){var e=W(this,t||ve.defaultFormat);return this.localeData().postformat(e)},add:y(1,"add"),subtract:y(-1,"subtract"),diff:function(t,e,n){var i,a,r,s=I(t,this),o=6e4*(this.zone()-s.zone());return e=L(e),"year"===e||"month"===e?(i=432e5*(this.daysInMonth()+s.daysInMonth()),a=12*(this.year()-s.year())+(this.month()-s.month()),r=this-ve(this).startOf("month")-(s-ve(s).startOf("month")),r-=6e4*(this.zone()-ve(this).startOf("month").zone()-(s.zone()-ve(s).startOf("month").zone())),a+=r/i,"year"===e&&(a/=12)):(i=this-s,a="second"===e?i/1e3:"minute"===e?i/6e4:"hour"===e?i/36e5:"day"===e?(i-o)/864e5:"week"===e?(i-o)/6048e5:i),n?a:f(a)},from:function(t,e){return ve.duration({to:this,from:t}).locale(this.locale()).humanize(!e)},fromNow:function(t){return this.from(ve(),t)},calendar:function(t){var e=t||ve(),n=I(e,this).startOf("day"),i=this.diff(n,"days",!0),a=-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse";return this.format(this.localeData().calendar(a,this))},isLeapYear:function(){return C(this.year())},isDST:function(){return this.zone()+t):+this.clone().startOf(e)>+ve(t).startOf(e)},isBefore:function(t,e){return e=L("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=ve.isMoment(t)?t:ve(t),+t>+this):+this.clone().startOf(e)<+ve(t).startOf(e)},isSame:function(t,e){return e=L(e||"millisecond"),"millisecond"===e?(t=ve.isMoment(t)?t:ve(t),+this===+t):+this.clone().startOf(e)===+I(t,this).startOf(e)},min:r("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(t){return t=ve.apply(null,arguments),this>t?this:t}),max:r("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(t){return t=ve.apply(null,arguments),t>this?this:t}),zone:function(t,e){var n,i=this._offset||0;return null==t?this._isUTC?i:this._dateTzOffset():("string"==typeof t&&(t=B(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(n=this._dateTzOffset()),this._offset=t,this._isUTC=!0,null!=n&&this.subtract(n,"m"),i!==t&&(!e||this._changeInProgress?v(this,ve.duration(i-t,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ve.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(t){return t=t?ve(t).zone():0,(this.zone()-t)%60===0},daysInMonth:function(){return k(this.year(),this.month())},dayOfYear:function(t){var e=xe((ve(this).startOf("day")-ve(this).startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},quarter:function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},weekYear:function(t){var e=oe(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==t?e:this.add(t-e,"y")},isoWeekYear:function(t){var e=oe(this,1,4).year;return null==t?e:this.add(t-e,"y")},week:function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},isoWeek:function(t){var e=oe(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},weekday:function(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},isoWeekday:function(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)},isoWeeksInYear:function(){return Y(this.year(),1,4)},weeksInYear:function(){var t=this.localeData()._week;return Y(this.year(),t.dow,t.doy)},get:function(t){return t=L(t),this[t]()},set:function(t,e){return t=L(t),"function"==typeof this[t]&&this[t](e),this},locale:function(e){var n;return e===t?this._locale._abbr:(n=ve.localeData(e),null!=n&&(this._locale=n),this)},lang:r("moment().lang() is deprecated. Use moment().localeData() instead.",function(e){return e===t?this.localeData():this.locale(e)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}}),ve.fn.millisecond=ve.fn.milliseconds=fe("Milliseconds",!1),ve.fn.second=ve.fn.seconds=fe("Seconds",!1),ve.fn.minute=ve.fn.minutes=fe("Minutes",!1),ve.fn.hour=ve.fn.hours=fe("Hours",!0),ve.fn.date=fe("Date",!0),ve.fn.dates=r("dates accessor is deprecated. Use date instead.",fe("Date",!0)),ve.fn.year=fe("FullYear",!0),ve.fn.years=r("years accessor is deprecated. Use year instead.",fe("FullYear",!0)),ve.fn.days=ve.fn.day,ve.fn.months=ve.fn.month,ve.fn.weeks=ve.fn.week,ve.fn.isoWeeks=ve.fn.isoWeek,ve.fn.quarters=ve.fn.quarter,ve.fn.toJSON=ve.fn.toISOString,h(ve.duration.fn=c.prototype,{_bubble:function(){var t,e,n,i=this._milliseconds,a=this._days,r=this._months,s=this._data,o=0;s.milliseconds=i%1e3,t=f(i/1e3),s.seconds=t%60,e=f(t/60),s.minutes=e%60,n=f(e/60),s.hours=n%24,a+=f(n/24),o=f(me(a)),a-=f(_e(o)),r+=f(a/30),a%=30,o+=f(r/12),r%=12,s.days=a,s.months=r,s.years=o},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return f(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*T(this._months/12)},humanize:function(t){var e=se(this,!t,this.localeData());return t&&(e=this.localeData().pastFuture(+this,e)),this.localeData().postformat(e)},add:function(t,e){var n=ve.duration(t,e);return this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this._bubble(),this},subtract:function(t,e){var n=ve.duration(t,e);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this._bubble(),this},get:function(t){return t=L(t),this[t.toLowerCase()+"s"]()},as:function(t){var e,n;if(t=L(t),"month"===t||"year"===t)return e=this._days+this._milliseconds/864e5,n=this._months+12*me(e),"month"===t?n:n/12;switch(e=this._days+_e(this._months/12),t){case"week":return e/7+this._milliseconds/6048e5;case"day":return e+this._milliseconds/864e5;case"hour":return 24*e+this._milliseconds/36e5;case"minute":return 24*e*60+this._milliseconds/6e4;case"second":return 24*e*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*e*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+t)}},lang:ve.fn.lang,locale:ve.fn.locale,toIsoString:r("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var t=Math.abs(this.years()),e=Math.abs(this.months()),n=Math.abs(this.days()),i=Math.abs(this.hours()),a=Math.abs(this.minutes()),r=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(i||a||r?"T":"")+(i?i+"H":"")+(a?a+"M":"")+(r?r+"S":""):"P0D"},localeData:function(){return this._locale}}),ve.duration.fn.toString=ve.duration.fn.toISOString;for(we in dn)n(dn,we)&&ge(we.toLowerCase());ve.duration.fn.asMilliseconds=function(){return this.as("ms")},ve.duration.fn.asSeconds=function(){return this.as("s")},ve.duration.fn.asMinutes=function(){return this.as("m")},ve.duration.fn.asHours=function(){return this.as("h")},ve.duration.fn.asDays=function(){return this.as("d")},ve.duration.fn.asWeeks=function(){return this.as("weeks")},ve.duration.fn.asMonths=function(){return this.as("M")},ve.duration.fn.asYears=function(){return this.as("y")},ve.locale("en",{ordinal:function(t){var e=t%10,n=1===T(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),function(t){t(ve)}(function(t){return t.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiem:function(t,e,n){return 12>t?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},ordinal:function(t){return t+(1===t||8===t||t>=20?"ste":"de")},week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}})}),function(t){t(ve)}(function(t){var e={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};return t.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:function(t){return 12>t?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(t){return t.replace(/[۰-۹]/g,function(t){return n[t]}).replace(/،/g,",")},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]}).replace(/,/g,"،")},week:{dow:6,doy:12}})}),function(t){t(ve)}(function(t){var e={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},i=function(t){return 0===t?0:1===t?1:2===t?2:t%100>=3&&10>=t%100?3:t%100>=11?4:5},a={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(t){return function(e,n){var r=i(e),s=a[t][i(e)];return 2===r&&(s=s[n?0:1]),s.replace(/%d/i,e)}},s=["كانون الثاني يناير","شباط فبراير","آذار مارس","نيسان أبريل","أيار مايو","حزيران يونيو","تموز يوليو","آب أغسطس","أيلول سبتمبر","تشرين الأول أكتوبر","تشرين الثاني نوفمبر","كانون الأول ديسمبر"];return t.defineLocale("ar",{months:s,monthsShort:s,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},meridiem:function(t){return 12>t?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},preparse:function(t){return t.replace(/[۰-۹]/g,function(t){return n[t]}).replace(/،/g,",")},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]}).replace(/,/g,"،")},week:{dow:6,doy:12}})}),function(t){t(ve)}(function(t){var e={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};return t.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiem:function(t){return 4>t?"gecə":12>t?"səhər":17>t?"gündüz":"axşam"},ordinal:function(t){if(0===t)return t+"-ıncı";var n=t%10,i=t%100-n,a=t>=100?100:null;return t+(e[n]||e[i]||e[a])},week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){function e(t,e){var n=t.split("_");return e%10===1&&e%100!==11?n[0]:e%10>=2&&4>=e%10&&(10>e%100||e%100>=20)?n[1]:n[2]}function n(t,n,i){var a={mm:n?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:n?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return"m"===i?n?"хвіліна":"хвіліну":"h"===i?n?"гадзіна":"гадзіну":t+" "+e(a[i],+t)}function i(t,e){var n={nominative:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_"),accusative:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_")},i=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(e)?"accusative":"nominative";return n[i][t.month()]}function a(t,e){var n={nominative:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),accusative:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_")},i=/\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/.test(e)?"accusative":"nominative";return n[i][t.day()]}return t.defineLocale("be",{months:i,monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:a,weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., LT",LLLL:"dddd, D MMMM YYYY г., LT"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:n,mm:n,h:n,hh:n,d:"дзень",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiem:function(t){return 4>t?"ночы":12>t?"раніцы":17>t?"дня":"вечара"},ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":case"w":case"W":return t%10!==2&&t%10!==3||t%100===12||t%100===13?t+"-ы":t+"-і";case"D":return t+"-га";default:return t}},week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){return t.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},ordinal:function(t){var e=t%10,n=t%100;return 0===t?t+"-ев":0===n?t+"-ен":n>10&&20>n?t+"-ти":1===e?t+"-ви":2===e?t+"-ри":7===e||8===e?t+"-ми":t+"-ти"},week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){var e={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};return t.defineLocale("bn",{months:"জানুয়ারী_ফেবুয়ারী_মার্চ_এপ্রিল_মে_জুন_জুলাই_অগাস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপর_মে_জুন_জুল_অগ_সেপ্ট_অক্টো_নভ_ডিসেম্".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পত্তিবার_শুক্রুবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পত্তি_শুক্রু_শনি".split("_"),weekdaysMin:"রব_সম_মঙ্গ_বু_ব্রিহ_শু_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কএক সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(t){return t.replace(/[১২৩৪৫৬৭৮৯০]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiem:function(t){return 4>t?"রাত":10>t?"শকাল":17>t?"দুপুর":20>t?"বিকেল":"রাত"},week:{dow:0,doy:6}})}),function(t){t(ve)}(function(t){var e={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};return t.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(t){return t.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiem:function(t){return 4>t?"མཚན་མོ":10>t?"ཞོགས་ཀས":17>t?"ཉིན་གུང":20>t?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})}),function(t){t(ve)}(function(e){function n(t,e,n){var i={mm:"munutenn",MM:"miz",dd:"devezh"};return t+" "+r(i[n],t)}function i(t){switch(a(t)){case 1:case 3:case 4:case 5:case 9:return t+" bloaz";default:return t+" vloaz"}}function a(t){return t>9?a(t%10):t}function r(t,e){return 2===e?s(t):t}function s(e){var n={m:"v",b:"v",d:"z"};return n[e.charAt(0)]===t?e:n[e.charAt(0)]+e.substring(1)}return e.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),longDateFormat:{LT:"h[e]mm A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY LT",LLLL:"dddd, D [a viz] MMMM YYYY LT"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",m:"ur vunutenn",mm:n,h:"un eur",hh:"%d eur",d:"un devezh",dd:n,M:"ur miz",MM:n,y:"ur bloaz",yy:i},ordinal:function(t){var e=1===t?"añ":"vet";return t+e},week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){function e(t,e,n){var i=t+" ";switch(n){case"m":return e?"jedna minuta":"jedne minute";case"mm":return i+=1===t?"minuta":2===t||3===t||4===t?"minute":"minuta";case"h":return e?"jedan sat":"jednog sata";case"hh":return i+=1===t?"sat":2===t||3===t||4===t?"sata":"sati";case"dd":return i+=1===t?"dan":"dana";case"MM":return i+=1===t?"mjesec":2===t||3===t||4===t?"mjeseca":"mjeseci";case"yy":return i+=1===t?"godina":2===t||3===t||4===t?"godine":"godina"}}return t.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT"; -case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:e,mm:e,h:e,hh:e,d:"dan",dd:e,M:"mjesec",MM:e,y:"godinu",yy:e},ordinal:"%d.",week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){return t.defineLocale("ca",{months:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),monthsShort:"gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.".split("_"),weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){function e(t){return t>1&&5>t&&1!==~~(t/10)}function n(t,n,i,a){var r=t+" ";switch(i){case"s":return n||a?"pár sekund":"pár sekundami";case"m":return n?"minuta":a?"minutu":"minutou";case"mm":return n||a?r+(e(t)?"minuty":"minut"):r+"minutami";case"h":return n?"hodina":a?"hodinu":"hodinou";case"hh":return n||a?r+(e(t)?"hodiny":"hodin"):r+"hodinami";case"d":return n||a?"den":"dnem";case"dd":return n||a?r+(e(t)?"dny":"dní"):r+"dny";case"M":return n||a?"měsíc":"měsícem";case"MM":return n||a?r+(e(t)?"měsíce":"měsíců"):r+"měsíci";case"y":return n||a?"rok":"rokem";case"yy":return n||a?r+(e(t)?"roky":"let"):r+"lety"}}var i="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),a="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_");return t.defineLocale("cs",{months:i,monthsShort:a,monthsParse:function(t,e){var n,i=[];for(n=0;12>n;n++)i[n]=new RegExp("^"+t[n]+"$|^"+e[n]+"$","i");return i}(i,a),weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd D. MMMM YYYY LT"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},ordinal:"%d.",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("cv",{months:"кăрлач_нарăс_пуш_ака_май_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"),monthsShort:"кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кĕç_эрн_шăм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кç_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ]",LLL:"YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT",LLLL:"dddd, YYYY [çулхи] MMMM [уйăхĕн] D[-мĕшĕ], LT"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ĕнер] LT [сехетре]",nextWeek:"[Çитес] dddd LT [сехетре]",lastWeek:"[Иртнĕ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(t){var e=/сехет$/i.exec(t)?"рен":/çул$/i.exec(t)?"тан":"ран";return t+e},past:"%s каялла",s:"пĕр-ик çеккунт",m:"пĕр минут",mm:"%d минут",h:"пĕр сехет",hh:"%d сехет",d:"пĕр кун",dd:"%d кун",M:"пĕр уйăх",MM:"%d уйăх",y:"пĕр çул",yy:"%d çул"},ordinal:"%d-мĕш",week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){return t.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},ordinal:function(t){var e=t,n="",i=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];return e>20?n=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(n=i[e]),t+n},week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd [d.] D. MMMM YYYY LT"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){function e(t,e,n){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[t+" Tage",t+" Tagen"],M:["ein Monat","einem Monat"],MM:[t+" Monate",t+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[t+" Jahre",t+" Jahren"]};return e?i[n][0]:i[n][1]}return t.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm [Uhr]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,M:e,MM:e,y:e,yy:e},ordinal:"%d.",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){function e(t,e,n){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[t+" Tage",t+" Tagen"],M:["ein Monat","einem Monat"],MM:[t+" Monate",t+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[t+" Jahre",t+" Jahren"]};return e?i[n][0]:i[n][1]}return t.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm [Uhr]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,M:e,MM:e,y:e,yy:e},ordinal:"%d.",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(t,e){return/D/.test(e.substring(0,e.indexOf("MMMM")))?this._monthsGenitiveEl[t.month()]:this._monthsNominativeEl[t.month()]},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(t,e,n){return t>11?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(t){return"μ"===(t+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(t,e){var n=this._calendarEl[t],i=e&&e.hours();return"function"==typeof n&&(n=n.apply(e)),n.replace("{}",i%12===1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},ordinal:function(t){return t+"η"},week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(t){var e=t%10,n=1===~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n},week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"YYYY-MM-DD",LL:"D MMMM, YYYY",LLL:"D MMMM, YYYY LT",LLLL:"dddd, D MMMM, YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(t){var e=t%10,n=1===~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}})}),function(t){t(ve)}(function(t){return t.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(t){var e=t%10,n=1===~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n},week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato".split("_"),weekdaysShort:"Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Ĵa_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D[-an de] MMMM, YYYY",LLL:"D[-an de] MMMM, YYYY LT",LLLL:"dddd, [la] D[-an de] MMMM, YYYY LT"},meridiem:function(t,e,n){return t>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"je %s",past:"antaŭ %s",s:"sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},ordinal:"%da",week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){var e="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");return t.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(t,i){return/-MMM-/.test(i)?n[t.month()]:e[t.month()]},weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY LT",LLLL:"dddd, D [de] MMMM [de] YYYY LT"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){function e(t,e,n,i){var a={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:[t+" minuti",t+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[t+" tunni",t+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[t+" kuu",t+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[t+" aasta",t+" aastat"]};return e?a[n][2]?a[n][2]:a[n][1]:i?a[n][0]:a[n][1]}return t.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:"%d päeva",M:e,MM:e,y:e,yy:e},ordinal:"%d.",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] LT",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] LT",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] LT",llll:"ddd, YYYY[ko] MMM D[a] LT"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:"%d.",week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){var e={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};return t.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},meridiem:function(t){return 12>t?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چندین ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(t){return t.replace(/[۰-۹]/g,function(t){return n[t]}).replace(/،/g,",")},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]}).replace(/,/g,"،")},ordinal:"%dم",week:{dow:6,doy:12}})}),function(t){t(ve)}(function(t){function e(t,e,i,a){var r="";switch(i){case"s":return a?"muutaman sekunnin":"muutama sekunti";case"m":return a?"minuutin":"minuutti";case"mm":r=a?"minuutin":"minuuttia";break;case"h":return a?"tunnin":"tunti";case"hh":r=a?"tunnin":"tuntia";break;case"d":return a?"päivän":"päivä";case"dd":r=a?"päivän":"päivää";break;case"M":return a?"kuukauden":"kuukausi";case"MM":r=a?"kuukauden":"kuukautta";break;case"y":return a?"vuoden":"vuosi";case"yy":r=a?"vuoden":"vuotta"}return r=n(t,a)+" "+r}function n(t,e){return 10>t?e?a[t]:i[t]:t}var i="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),a=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",i[7],i[8],i[9]];return t.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] LT",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] LT",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] LT",llll:"ddd, Do MMM YYYY, [klo] LT"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},ordinal:"%d.",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D. MMMM, YYYY LT"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",m:"ein minutt",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaði",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(t){return t+(1===t?"er":"")}})}),function(t){t(ve)}(function(t){return t.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(t){return t+(1===t?"er":"")},week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("gl",{months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(t){return"uns segundos"===t?"nuns segundos":"en "+t},past:"hai %s",s:"uns segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:"%dº",week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){return t.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY LT",LLLL:"dddd, D [ב]MMMM YYYY LT",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY LT",llll:"ddd, D MMM YYYY LT"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(t){return 2===t?"שעתיים":t+" שעות"},d:"יום",dd:function(t){return 2===t?"יומיים":t+" ימים"},M:"חודש",MM:function(t){return 2===t?"חודשיים":t+" חודשים"},y:"שנה",yy:function(t){return 2===t?"שנתיים":t+" שנים"}}})}),function(t){t(ve)}(function(t){var e={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};return t.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(t){return t.replace(/[१२३४५६७८९०]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiem:function(t){return 4>t?"रात":10>t?"सुबह":17>t?"दोपहर":20>t?"शाम":"रात"},week:{dow:0,doy:6}})}),function(t){t(ve)}(function(t){function e(t,e,n){var i=t+" ";switch(n){case"m":return e?"jedna minuta":"jedne minute";case"mm":return i+=1===t?"minuta":2===t||3===t||4===t?"minute":"minuta";case"h":return e?"jedan sat":"jednog sata";case"hh":return i+=1===t?"sat":2===t||3===t||4===t?"sata":"sati";case"dd":return i+=1===t?"dan":"dana";case"MM":return i+=1===t?"mjesec":2===t||3===t||4===t?"mjeseca":"mjeseci";case"yy":return i+=1===t?"godina":2===t||3===t||4===t?"godine":"godina"}}return t.defineLocale("hr",{months:"sječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),monthsShort:"sje._vel._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:e,mm:e,h:e,hh:e,d:"dan",dd:e,M:"mjesec",MM:e,y:"godinu",yy:e},ordinal:"%d.",week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){function e(t,e,n,i){var a=t;switch(n){case"s":return i||e?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(i||e?" perc":" perce");case"mm":return a+(i||e?" perc":" perce");case"h":return"egy"+(i||e?" óra":" órája");case"hh":return a+(i||e?" óra":" órája");case"d":return"egy"+(i||e?" nap":" napja");case"dd":return a+(i||e?" nap":" napja");case"M":return"egy"+(i||e?" hónap":" hónapja");case"MM":return a+(i||e?" hónap":" hónapja");case"y":return"egy"+(i||e?" év":" éve");case"yy":return a+(i||e?" év":" éve")}return""}function n(t){return(t?"":"[múlt] ")+"["+i[this.day()]+"] LT[-kor]"}var i="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");return t.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D., LT",LLLL:"YYYY. MMMM D., dddd LT"},meridiem:function(t,e,n){return 12>t?n===!0?"de":"DE":n===!0?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return n.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return n.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},ordinal:"%d.",week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){function e(t,e){var n={nominative:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_"),accusative:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_")},i=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(e)?"accusative":"nominative";return n[i][t.month()]}function n(t){var e="հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_");return e[t.month()]}function i(t){var e="կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_");return e[t.day()]}return t.defineLocale("hy-am",{months:e,monthsShort:n,weekdays:i,weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., LT",LLLL:"dddd, D MMMM YYYY թ., LT"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT" -},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiem:function(t){return 4>t?"գիշերվա":12>t?"առավոտվա":17>t?"ցերեկվա":"երեկոյան"},ordinal:function(t,e){switch(e){case"DDD":case"w":case"W":case"DDDo":return 1===t?t+"-ին":t+"-րդ";default:return t}},week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){return t.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] LT",LLLL:"dddd, D MMMM YYYY [pukul] LT"},meridiem:function(t){return 11>t?"pagi":15>t?"siang":19>t?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){function e(t){return t%100===11?!0:t%10===1?!1:!0}function n(t,n,i,a){var r=t+" ";switch(i){case"s":return n||a?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return n?"mínúta":"mínútu";case"mm":return e(t)?r+(n||a?"mínútur":"mínútum"):n?r+"mínúta":r+"mínútu";case"hh":return e(t)?r+(n||a?"klukkustundir":"klukkustundum"):r+"klukkustund";case"d":return n?"dagur":a?"dag":"degi";case"dd":return e(t)?n?r+"dagar":r+(a?"daga":"dögum"):n?r+"dagur":r+(a?"dag":"degi");case"M":return n?"mánuður":a?"mánuð":"mánuði";case"MM":return e(t)?n?r+"mánuðir":r+(a?"mánuði":"mánuðum"):n?r+"mánuður":r+(a?"mánuð":"mánuði");case"y":return n||a?"ár":"ári";case"yy":return e(t)?r+(n||a?"ár":"árum"):r+(n||a?"ár":"ári")}}return t.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] LT",LLLL:"dddd, D. MMMM YYYY [kl.] LT"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},ordinal:"%d.",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"D_L_Ma_Me_G_V_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:function(t){return(/^[0-9].+$/.test(t)?"tra":"in")+" "+t},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah時m分",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日LT",LLLL:"YYYY年M月D日LT dddd"},meridiem:function(t){return 12>t?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})}),function(t){t(ve)}(function(t){function e(t,e){var n={nominative:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),accusative:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},i=/D[oD] *MMMM?/.test(e)?"accusative":"nominative";return n[i][t.month()]}function n(t,e){var n={nominative:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),accusative:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_")},i=/(წინა|შემდეგ)/.test(e)?"accusative":"nominative";return n[i][t.day()]}return t.defineLocale("ka",{months:e,monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:n,weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(t){return/(წამი|წუთი|საათი|წელი)/.test(t)?t.replace(/ი$/,"ში"):t+"ში"},past:function(t){return/(წამი|წუთი|საათი|დღე|თვე)/.test(t)?t.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(t)?t.replace(/წელი$/,"წლის წინ"):void 0},s:"რამდენიმე წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},ordinal:function(t){return 0===t?t:1===t?t+"-ლი":20>t||100>=t&&t%20===0||t%100===0?"მე-"+t:t+"-ე"},week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){return t.defineLocale("km",{months:"មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysMin:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[ថ្ងៃនៈ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 m분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:function(t){return 12>t?"오전":"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:"%d일",meridiemParse:/(오전|오후)/,isPM:function(t){return"오후"===t}})}),function(t){t(ve)}(function(t){function e(t,e,n){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return e?i[n][0]:i[n][1]}function n(t){var e=t.substr(0,t.indexOf(" "));return a(e)?"a "+t:"an "+t}function i(t){var e=t.substr(0,t.indexOf(" "));return a(e)?"viru "+t:"virun "+t}function a(t){if(t=parseInt(t,10),isNaN(t))return!1;if(0>t)return!0;if(10>t)return t>=4&&7>=t?!0:!1;if(100>t){var e=t%10,n=t/10;return a(0===e?n:e)}if(1e4>t){for(;t>=10;)t/=10;return a(t)}return t/=1e3,a(t)}return t.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),longDateFormat:{LT:"H:mm [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:n,past:i,s:"e puer Sekonnen",m:e,mm:"%d Minutten",h:e,hh:"%d Stonnen",d:e,dd:"%d Deeg",M:e,MM:"%d Méint",y:e,yy:"%d Joer"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){function e(t,e,n,i){return e?"kelios sekundės":i?"kelių sekundžių":"kelias sekundes"}function n(t,e,n,i){return e?a(n)[0]:i?a(n)[1]:a(n)[2]}function i(t){return t%10===0||t>10&&20>t}function a(t){return o[t].split("_")}function r(t,e,r,s){var o=t+" ";return 1===t?o+n(t,e,r[0],s):e?o+(i(t)?a(r)[1]:a(r)[0]):s?o+a(r)[1]:o+(i(t)?a(r)[1]:a(r)[2])}function s(t,e){var n=-1===e.indexOf("dddd HH:mm"),i=l[t.day()];return n?i:i.substring(0,i.length-2)+"į"}var o={m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"},l="sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_");return t.defineLocale("lt",{months:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:s,weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], LT [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, LT [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], LT [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, LT [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:e,m:n,mm:r,h:n,hh:r,d:n,dd:r,M:n,MM:r,y:n,yy:r},ordinal:function(t){return t+"-oji"},week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){function e(t,e,n){var i=t.split("_");return n?e%10===1&&11!==e?i[2]:i[3]:e%10===1&&11!==e?i[0]:i[1]}function n(t,n,a){return t+" "+e(i[a],t,n)}var i={mm:"minūti_minūtes_minūte_minūtes",hh:"stundu_stundas_stunda_stundas",dd:"dienu_dienas_diena_dienas",MM:"mēnesi_mēnešus_mēnesis_mēneši",yy:"gadu_gadus_gads_gadi"};return t.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, LT",LLLL:"YYYY. [gada] D. MMMM, dddd, LT"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"%s vēlāk",past:"%s agrāk",s:"dažas sekundes",m:"minūti",mm:n,h:"stundu",hh:n,d:"dienu",dd:n,M:"mēnesi",MM:n,y:"gadu",yy:n},ordinal:"%d.",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Во изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Во изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},ordinal:function(t){var e=t%10,n=t%100;return 0===t?t+"-ев":0===n?t+"-ен":n>10&&20>n?t+"-ти":1===e?t+"-ви":2===e?t+"-ри":7===e||8===e?t+"-ми":t+"-ти"},week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){return t.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiem:function(t){return 4>t?"രാത്രി":12>t?"രാവിലെ":17>t?"ഉച്ച കഴിഞ്ഞ്":20>t?"വൈകുന്നേരം":"രാത്രി"}})}),function(t){t(ve)}(function(t){var e={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};return t.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%s नंतर",past:"%s पूर्वी",s:"सेकंद",m:"एक मिनिट",mm:"%d मिनिटे",h:"एक तास",hh:"%d तास",d:"एक दिवस",dd:"%d दिवस",M:"एक महिना",MM:"%d महिने",y:"एक वर्ष",yy:"%d वर्षे"},preparse:function(t){return t.replace(/[१२३४५६७८९०]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiem:function(t){return 4>t?"रात्री":10>t?"सकाळी":17>t?"दुपारी":20>t?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}),function(t){t(ve)}(function(t){return t.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] LT",LLLL:"dddd, D MMMM YYYY [pukul] LT"},meridiem:function(t){return 11>t?"pagi":15>t?"tengahari":19>t?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){var e={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};return t.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_င်္ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_င်္ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(t){return t.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tirs_ons_tors_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"H.mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] LT",LLLL:"dddd D. MMMM YYYY [kl.] LT"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){var e={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};return t.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आइ._सो._मङ्_बु._बि._शु._श.".split("_"),longDateFormat:{LT:"Aको h:mm बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},preparse:function(t){return t.replace(/[१२३४५६७८९०]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiem:function(t){return 3>t?"राती":10>t?"बिहान":15>t?"दिउँसो":18>t?"बेलुका":20>t?"साँझ":"राती"},calendar:{sameDay:"[आज] LT",nextDay:"[भोली] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडी",s:"केही समय",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){var e="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_");return t.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(t,i){return/-MMM-/.test(i)?n[t.month()]:e[t.month()]},weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(t){return t+(1===t||8===t||t>=20?"ste":"de")},week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s sidan",s:"nokre sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){function e(t){return 5>t%10&&t%10>1&&~~(t/10)%10!==1}function n(t,n,i){var a=t+" ";switch(i){case"m":return n?"minuta":"minutę";case"mm":return a+(e(t)?"minuty":"minut");case"h":return n?"godzina":"godzinę";case"hh":return a+(e(t)?"godziny":"godzin");case"MM":return a+(e(t)?"miesiące":"miesięcy");case"yy":return a+(e(t)?"lata":"lat")}}var i="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),a="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");return t.defineLocale("pl",{months:function(t,e){return/D MMMM/.test(e)?a[t.month()]:i[t.month()]},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"N_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:n,mm:n,h:n,hh:n,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:n,y:"rok",yy:n},ordinal:"%d.",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"dom_2ª_3ª_4ª_5ª_6ª_sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] LT",LLLL:"dddd, D [de] MMMM [de] YYYY [às] LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:"%dº"})}),function(t){t(ve)}(function(t){return t.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"dom_2ª_3ª_4ª_5ª_6ª_sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY LT",LLLL:"dddd, D [de] MMMM [de] YYYY LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:"%dº",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){function e(t,e,n){var i={mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"},a=" ";return(t%100>=20||t>=100&&t%100===0)&&(a=" de "),t+a+i[n]}return t.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",m:"un minut",mm:e,h:"o oră",hh:e,d:"o zi",dd:e,M:"o lună",MM:e,y:"un an",yy:e},week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){function e(t,e){var n=t.split("_");return e%10===1&&e%100!==11?n[0]:e%10>=2&&4>=e%10&&(10>e%100||e%100>=20)?n[1]:n[2]}function n(t,n,i){var a={mm:n?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===i?n?"минута":"минуту":t+" "+e(a[i],+t)}function i(t,e){var n={nominative:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),accusative:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_")},i=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(e)?"accusative":"nominative";return n[i][t.month()]}function a(t,e){var n={nominative:"янв_фев_мар_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),accusative:"янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек".split("_")},i=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(e)?"accusative":"nominative";return n[i][t.month()]}function r(t,e){var n={nominative:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),accusative:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_")},i=/\[ ?[Вв] ?(?:прошлую|следующую)? ?\] ?dddd/.test(e)?"accusative":"nominative";return n[i][t.day()]}return t.defineLocale("ru",{months:i,monthsShort:a,weekdays:r,weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[й|я]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., LT",LLLL:"dddd, D MMMM YYYY г., LT"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(){switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:n,mm:n,h:"час",hh:n,d:"день",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(t){return/^(дня|вечера)$/.test(t)},meridiem:function(t){return 4>t?"ночи":12>t?"утра":17>t?"дня":"вечера"},ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":return t+"-й";case"D":return t+"-го";case"w":case"W":return t+"-я";default:return t}},week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){function e(t){return t>1&&5>t}function n(t,n,i,a){var r=t+" ";switch(i){case"s":return n||a?"pár sekúnd":"pár sekundami";case"m":return n?"minúta":a?"minútu":"minútou";case"mm":return n||a?r+(e(t)?"minúty":"minút"):r+"minútami";case"h":return n?"hodina":a?"hodinu":"hodinou";case"hh":return n||a?r+(e(t)?"hodiny":"hodín"):r+"hodinami";case"d":return n||a?"deň":"dňom";case"dd":return n||a?r+(e(t)?"dni":"dní"):r+"dňami";case"M":return n||a?"mesiac":"mesiacom";case"MM":return n||a?r+(e(t)?"mesiace":"mesiacov"):r+"mesiacmi";case"y":return n||a?"rok":"rokom";case"yy":return n||a?r+(e(t)?"roky":"rokov"):r+"rokmi"}}var i="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),a="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");return t.defineLocale("sk",{months:i,monthsShort:a,monthsParse:function(t,e){var n,i=[];for(n=0;12>n;n++)i[n]=new RegExp("^"+t[n]+"$|^"+e[n]+"$","i");return i}(i,a),weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd D. MMMM YYYY LT"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},ordinal:"%d.",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){function e(t,e,n){var i=t+" ";switch(n){case"m":return e?"ena minuta":"eno minuto";case"mm":return i+=1===t?"minuta":2===t?"minuti":3===t||4===t?"minute":"minut";case"h":return e?"ena ura":"eno uro";case"hh":return i+=1===t?"ura":2===t?"uri":3===t||4===t?"ure":"ur"; -case"dd":return i+=1===t?"dan":"dni";case"MM":return i+=1===t?"mesec":2===t?"meseca":3===t||4===t?"mesece":"mesecev";case"yy":return i+=1===t?"leto":2===t?"leti":3===t||4===t?"leta":"let"}}return t.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[prejšnja] dddd [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"%s nazaj",s:"nekaj sekund",m:e,mm:e,h:e,hh:e,d:"en dan",dd:e,M:"en mesec",MM:e,y:"eno leto",yy:e},ordinal:"%d.",week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){return t.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),meridiem:function(t){return 12>t?"PD":"MD"},longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},ordinal:"%d.",week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){var e={words:{m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(t,e){return 1===t?e[0]:t>=2&&4>=t?e[1]:e[2]},translate:function(t,n,i){var a=e.words[i];return 1===i.length?n?a[0]:a[1]:t+" "+e.correctGrammaticalCase(t,a)}};return t.defineLocale("sr-cyrl",{months:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],monthsShort:["јан.","феб.","мар.","апр.","мај","јун","јул","авг.","сеп.","окт.","нов.","дец."],weekdays:["недеља","понедељак","уторак","среда","четвртак","петак","субота"],weekdaysShort:["нед.","пон.","уто.","сре.","чет.","пет.","суб."],weekdaysMin:["не","по","ут","ср","че","пе","су"],longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){var t=["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"];return t[this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",m:e.translate,mm:e.translate,h:e.translate,hh:e.translate,d:"дан",dd:e.translate,M:"месец",MM:e.translate,y:"годину",yy:e.translate},ordinal:"%d.",week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){var e={words:{m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(t,e){return 1===t?e[0]:t>=2&&4>=t?e[1]:e[2]},translate:function(t,n,i){var a=e.words[i];return 1===i.length?n?a[0]:a[1]:t+" "+e.correctGrammaticalCase(t,a)}};return t.defineLocale("sr",{months:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"],monthsShort:["jan.","feb.","mar.","apr.","maj","jun","jul","avg.","sep.","okt.","nov.","dec."],weekdays:["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],weekdaysShort:["ned.","pon.","uto.","sre.","čet.","pet.","sub."],weekdaysMin:["ne","po","ut","sr","če","pe","su"],longDateFormat:{LT:"H:mm",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var t=["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return t[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:e.translate,mm:e.translate,h:e.translate,hh:e.translate,d:"dan",dd:e.translate,M:"mesec",MM:e.translate,y:"godinu",yy:e.translate},ordinal:"%d.",week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){return t.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"dddd LT",lastWeek:"[Förra] dddd[en] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinal:function(t){var e=t%10,n=1===~~(t%100/10)?"e":1===e?"a":2===e?"a":3===e?"e":"e";return t+n},week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, LT",LLLL:"dddd, D MMMM YYYY, LT"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},ordinal:function(t){return t+"வது"},meridiem:function(t){return t>=6&&10>=t?" காலை":t>=10&&14>=t?" நண்பகல்":t>=14&&18>=t?" எற்பாடு":t>=18&&20>=t?" மாலை":t>=20&&24>=t?" இரவு":t>=0&&6>=t?" வைகறை":void 0},week:{dow:0,doy:6}})}),function(t){t(ve)}(function(t){return t.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"มกรา_กุมภา_มีนา_เมษา_พฤษภา_มิถุนา_กรกฎา_สิงหา_กันยา_ตุลา_พฤศจิกา_ธันวา".split("_"),weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),longDateFormat:{LT:"H นาฬิกา m นาที",L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา LT",LLLL:"วันddddที่ D MMMM YYYY เวลา LT"},meridiem:function(t){return 12>t?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}),function(t){t(ve)}(function(t){return t.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM DD, YYYY LT"},calendar:{sameDay:"[Ngayon sa] LT",nextDay:"[Bukas sa] LT",nextWeek:"dddd [sa] LT",lastDay:"[Kahapon sa] LT",lastWeek:"dddd [huling linggo] LT",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},ordinal:function(t){return t},week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){var e={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};return t.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(t){if(0===t)return t+"'ıncı";var n=t%10,i=t%100-n,a=t>=100?100:null;return t+(e[n]||e[i]||e[a])},week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){return t.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}),function(t){t(ve)}(function(t){return t.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}),function(t){t(ve)}(function(t){function e(t,e){var n=t.split("_");return e%10===1&&e%100!==11?n[0]:e%10>=2&&4>=e%10&&(10>e%100||e%100>=20)?n[1]:n[2]}function n(t,n,i){var a={mm:"хвилина_хвилини_хвилин",hh:"година_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===i?n?"хвилина":"хвилину":"h"===i?n?"година":"годину":t+" "+e(a[i],+t)}function i(t,e){var n={nominative:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_"),accusative:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_")},i=/D[oD]? *MMMM?/.test(e)?"accusative":"nominative";return n[i][t.month()]}function a(t,e){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")},i=/(\[[ВвУу]\]) ?dddd/.test(e)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(e)?"genitive":"nominative";return n[i][t.day()]}function r(t){return function(){return t+"о"+(11===this.hours()?"б":"")+"] LT"}}return t.defineLocale("uk",{months:i,monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:a,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., LT",LLLL:"dddd, D MMMM YYYY р., LT"},calendar:{sameDay:r("[Сьогодні "),nextDay:r("[Завтра "),lastDay:r("[Вчора "),nextWeek:r("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return r("[Минулої] dddd [").call(this);case 1:case 2:case 4:return r("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:n,mm:n,h:"годину",hh:n,d:"день",dd:n,M:"місяць",MM:n,y:"рік",yy:n},meridiem:function(t){return 4>t?"ночі":12>t?"ранку":17>t?"дня":"вечора"},ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":case"w":case"W":return t+"-й";case"D":return t+"-го";default:return t}},week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){return t.defineLocale("uz",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"D MMMM YYYY, dddd LT"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}),function(t){t(ve)}(function(t){return t.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY LT",LLLL:"dddd, D MMMM [năm] YYYY LT",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY LT",llll:"ddd, D MMM YYYY LT"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},ordinal:function(t){return t},week:{dow:1,doy:4}})}),function(t){t(ve)}(function(t){return t.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm",L:"YYYY-MM-DD",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT",l:"YYYY-MM-DD",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日LT",llll:"YYYY年MMMD日ddddLT"},meridiem:function(t,e){var n=100*t+e;return 600>n?"凌晨":900>n?"早上":1130>n?"上午":1230>n?"中午":1800>n?"下午":"晚上"},calendar:{sameDay:function(){return 0===this.minutes()?"[今天]Ah[点整]":"[今天]LT"},nextDay:function(){return 0===this.minutes()?"[明天]Ah[点整]":"[明天]LT"},lastDay:function(){return 0===this.minutes()?"[昨天]Ah[点整]":"[昨天]LT"},nextWeek:function(){var e,n;return e=t().startOf("week"),n=this.unix()-e.unix()>=604800?"[下]":"[本]",0===this.minutes()?n+"dddAh点整":n+"dddAh点mm"},lastWeek:function(){var e,n;return e=t().startOf("week"),n=this.unix()n?"早上":1130>n?"上午":1230>n?"中午":1800>n?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";case"M":return t+"月";case"w":case"W":return t+"週";default:return t}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d分鐘",h:"一小時",hh:"%d小時",d:"一天",dd:"%d天",M:"一個月",MM:"%d個月",y:"一年",yy:"%d年"}})}),ve.locale("en"),Ne?module.exports=ve:"function"==typeof define&&define.amd?(define("moment",function(t,e,n){return n.config&&n.config()&&n.config().noGlobal===!0&&(Le.moment=be),ve}),ye(!0)):ye()}.call(this),!function(t,e){"use strict";if("function"==typeof define&&define.amd)define(["jquery","moment"],e);else if("object"==typeof exports)e(require("jquery"),require("moment"));else{if(!jQuery)throw new Error("bootstrap-datetimepicker requires jQuery to be loaded first");if(!moment)throw new Error("bootstrap-datetimepicker requires moment.js to be loaded first");e(t.jQuery,moment)}}(this,function(t,e){"use strict";if("undefined"==typeof e)throw new Error("momentjs is required");var n=0,i=function(i,a){var r,s=t.fn.datetimepicker.defaults,o={time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down"},l=this,d=!1,u=function(){var r,d,u=!1;if(l.options=t.extend({},s,a),l.options.icons=t.extend({},o,l.options.icons),l.element=t(i),h(),!l.options.pickTime&&!l.options.pickDate)throw new Error("Must choose at least one picker");if(l.id=n++,e.locale(l.options.language),l.date=e(),l.unset=!1,l.isInput=l.element.is("input"),l.component=!1,l.element.hasClass("input-group")&&(l.component=l.element.find(0===l.element.find(".datepickerbutton").size()?'[class^="input-group-"]':".datepickerbutton")),l.format=l.options.format,r=e().localeData(),l.format||(l.format=l.options.pickDate?r.longDateFormat("L"):"",l.options.pickDate&&l.options.pickTime&&(l.format+=" "),l.format+=l.options.pickTime?r.longDateFormat("LT"):"",l.options.useSeconds&&(-1!==r.longDateFormat("LT").indexOf(" A")?l.format=l.format.split(" A")[0]+":ss A":l.format+=":ss")),l.use24hours=l.format.toLowerCase().indexOf("a")<0&&l.format.indexOf("h")<0,l.component&&(u=l.component.find("span")),l.options.pickTime&&u&&u.addClass(l.options.icons.time),l.options.pickDate&&u&&(u.removeClass(l.options.icons.time),u.addClass(l.options.icons.date)),l.options.widgetParent="string"==typeof l.options.widgetParent&&l.options.widgetParent||l.element.parents().filter(function(){return"scroll"===t(this).css("overflow-y")}).get(0)||"body",l.widget=t(B()).appendTo(l.options.widgetParent),l.minViewMode=l.options.minViewMode||0,"string"==typeof l.minViewMode)switch(l.minViewMode){case"months":l.minViewMode=1;break;case"years":l.minViewMode=2;break;default:l.minViewMode=0}if(l.viewMode=l.options.viewMode||0,"string"==typeof l.viewMode)switch(l.viewMode){case"months":l.viewMode=1;break;case"years":l.viewMode=2;break;default:l.viewMode=0}l.viewMode=Math.max(l.viewMode,l.minViewMode),l.options.disabledDates=O(l.options.disabledDates),l.options.enabledDates=O(l.options.enabledDates),l.startViewMode=l.viewMode,l.setMinDate(l.options.minDate),l.setMaxDate(l.options.maxDate),g(),y(),b(),w(),M(),_(),C(),c().prop("disabled")||A(),""!==l.options.defaultDate&&""===c().val()&&l.setValue(l.options.defaultDate),1!==l.options.minuteStepping&&(d=l.options.minuteStepping,l.date.minutes(Math.round(l.date.minutes()/d)*d%60).seconds(0))},c=function(){var t;if(l.isInput)return l.element;if(t=l.element.find(".datepickerinput"),0===t.size())t=l.element.find("input");else if(!t.is("input"))throw new Error('CSS class "datepickerinput" cannot be applied to non input element');return t},h=function(){var t;t=l.element.is("input")?l.element.data():l.element.find("input").data(),void 0!==t.dateFormat&&(l.options.format=t.dateFormat),void 0!==t.datePickdate&&(l.options.pickDate=t.datePickdate),void 0!==t.datePicktime&&(l.options.pickTime=t.datePicktime),void 0!==t.dateUseminutes&&(l.options.useMinutes=t.dateUseminutes),void 0!==t.dateUseseconds&&(l.options.useSeconds=t.dateUseseconds),void 0!==t.dateUsecurrent&&(l.options.useCurrent=t.dateUsecurrent),void 0!==t.calendarWeeks&&(l.options.calendarWeeks=t.calendarWeeks),void 0!==t.dateMinutestepping&&(l.options.minuteStepping=t.dateMinutestepping),void 0!==t.dateMindate&&(l.options.minDate=t.dateMindate),void 0!==t.dateMaxdate&&(l.options.maxDate=t.dateMaxdate),void 0!==t.dateShowtoday&&(l.options.showToday=t.dateShowtoday),void 0!==t.dateCollapse&&(l.options.collapse=t.dateCollapse),void 0!==t.dateLanguage&&(l.options.language=t.dateLanguage),void 0!==t.dateDefaultdate&&(l.options.defaultDate=t.dateDefaultdate),void 0!==t.dateDisableddates&&(l.options.disabledDates=t.dateDisableddates),void 0!==t.dateEnableddates&&(l.options.enabledDates=t.dateEnableddates),void 0!==t.dateIcons&&(l.options.icons=t.dateIcons),void 0!==t.dateUsestrict&&(l.options.useStrict=t.dateUsestrict),void 0!==t.dateDirection&&(l.options.direction=t.dateDirection),void 0!==t.dateSidebyside&&(l.options.sideBySide=t.dateSidebyside),void 0!==t.dateDaysofweekdisabled&&(l.options.daysOfWeekDisabled=t.dateDaysofweekdisabled)},p=function(){var e,n="absolute",i=l.component?l.component.offset():l.element.offset(),a=t(window);l.width=l.component?l.component.outerWidth():l.element.outerWidth(),i.top=i.top+l.element.outerHeight(),"up"===l.options.direction?e="top":"bottom"===l.options.direction?e="bottom":"auto"===l.options.direction&&(e=i.top+l.widget.height()>a.height()+a.scrollTop()&&l.widget.height()+l.element.outerHeight()"),a=e.weekdaysMin();if(l.options.calendarWeeks===!0&&i.append('#'),0===e().localeData()._week.dow)for(n=0;7>n;n++)i.append(''+a[n]+"");else for(n=1;8>n;n++)i.append(7===n?''+a[0]+"":''+a[n]+"");l.widget.find(".datepicker-days thead").append(i)},y=function(){e.locale(l.options.language);var t,n="",i=e.monthsShort();for(t=0;12>t;t++)n+=''+i[t]+"";l.widget.find(".datepicker-months td").append(n)},v=function(){if(l.options.pickDate){e.locale(l.options.language);var n,i,a,r,s,o,d,u,c,h=l.viewDate.year(),p=l.viewDate.month(),f=l.options.minDate.year(),m=l.options.minDate.month(),_=l.options.maxDate.year(),g=l.options.maxDate.month(),y=[],v=e.months();for(l.widget.find(".datepicker-days").find(".disabled").removeClass("disabled"),l.widget.find(".datepicker-months").find(".disabled").removeClass("disabled"),l.widget.find(".datepicker-years").find(".disabled").removeClass("disabled"),l.widget.find(".datepicker-days th:eq(1)").text(v[p]+" "+h),i=e(l.viewDate,l.format,l.options.useStrict).subtract(1,"months"),d=i.daysInMonth(),i.date(d).startOf("week"),(h===f&&m>=p||f>h)&&l.widget.find(".datepicker-days th:eq(0)").addClass("disabled"),(h===_&&p>=g||h>_)&&l.widget.find(".datepicker-days th:eq(2)").addClass("disabled"),a=e(i).add(42,"d");i.isBefore(a);){if(i.weekday()===e().startOf("week").weekday()&&(r=t(""),y.push(r),l.options.calendarWeeks===!0&&r.append(''+i.week()+"")),s="",i.year()h||i.year()===h&&i.month()>p)&&(s+=" new"),i.isSame(e({y:l.date.year(),M:l.date.month(),d:l.date.date()}))&&(s+=" active"),(P(i,"day")||!W(i))&&(s+=" disabled"),l.options.showToday===!0&&i.isSame(e(),"day")&&(s+=" today"),l.options.daysOfWeekDisabled)for(o=0;o'+i.date()+""),n=i.date(),i.add(1,"d"),n===i.date()&&i.add(1,"d")}for(l.widget.find(".datepicker-days tbody").empty().append(y),c=l.date.year(),v=l.widget.find(".datepicker-months").find("th:eq(1)").text(h).end().find("span").removeClass("active"),c===h&&v.eq(l.date.month()).addClass("active"),f>h-1&&l.widget.find(".datepicker-months th:eq(0)").addClass("disabled"),h+1>_&&l.widget.find(".datepicker-months th:eq(2)").addClass("disabled"),o=0;12>o;o++)h===f&&m>o||f>h?t(v[o]).addClass("disabled"):(h===_&&o>g||h>_)&&t(v[o]).addClass("disabled");for(y="",h=10*parseInt(h/10,10),u=l.widget.find(".datepicker-years").find("th:eq(1)").text(h+"-"+(h+9)).parents("table").find("td"),l.widget.find(".datepicker-years").find("th").removeClass("disabled"),f>h&&l.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled"),h+9>_&&l.widget.find(".datepicker-years").find("th:eq(2)").addClass("disabled"),h-=1,o=-1;11>o;o++)y+='h||h>_?" disabled":"")+'">'+h+"",h+=1;u.html(y)}},b=function(){e.locale(l.options.language);var t,n,i,a=l.widget.find(".timepicker .timepicker-hours table"),r="";if(a.parent().hide(),l.use24hours)for(t=0,n=0;6>n;n+=1){for(r+="",i=0;4>i;i+=1)r+=''+$(t.toString())+"",t++;r+=""}else for(t=1,n=0;3>n;n+=1){for(r+="",i=0;4>i;i+=1)r+=''+$(t.toString())+"",t++;r+=""}a.html(r)},w=function(){var t,e,n=l.widget.find(".timepicker .timepicker-minutes table"),i="",a=0,r=l.options.minuteStepping;for(n.parent().hide(),1===r&&(r=5),t=0;te;e+=1)60>a?(i+=''+$(a.toString())+"",a+=r):i+="";i+=""}n.html(i)},M=function(){var t,e,n=l.widget.find(".timepicker .timepicker-seconds table"),i="",a=0;for(n.parent().hide(),t=0;3>t;t++){for(i+="",e=0;4>e;e+=1)i+=''+$(a.toString())+"",a+=5;i+=""}n.html(i)},L=function(){if(l.date){var t=l.widget.find(".timepicker span[data-time-component]"),e=l.date.hours(),n=l.date.format("A");l.use24hours||(0===e?e=12:12!==e&&(e%=12),l.widget.find(".timepicker [data-action=togglePeriod]").text(n)),t.filter("[data-time-component=hours]").text($(e)),t.filter("[data-time-component=minutes]").text($(l.date.minutes())),t.filter("[data-time-component=seconds]").text($(l.date.second()))}},x=function(n){n.stopPropagation(),n.preventDefault(),l.unset=!1;var i,a,r,s,o=t(n.target).closest("span, td, th"),d=e(l.date);if(1===o.length&&!o.is(".disabled"))switch(o[0].nodeName.toLowerCase()){case"th":switch(o[0].className){case"picker-switch":C(1);break;case"prev":case"next":r=z.modes[l.viewMode].navStep,"prev"===o[0].className&&(r=-1*r),l.viewDate.add(r,z.modes[l.viewMode].navFnc),v()}break;case"span":o.is(".month")?(i=o.parent().find("span").index(o),l.viewDate.month(i)):(a=parseInt(o.text(),10)||0,l.viewDate.year(a)),l.viewMode===l.minViewMode&&(l.date=e({y:l.viewDate.year(),M:l.viewDate.month(),d:l.viewDate.date(),h:l.date.hours(),m:l.date.minutes(),s:l.date.seconds()}),I(),f(d,n.type)),C(-1),v();break;case"td":o.is(".day")&&(s=parseInt(o.text(),10)||1,i=l.viewDate.month(),a=l.viewDate.year(),o.is(".old")?0===i?(i=11,a-=1):i-=1:o.is(".new")&&(11===i?(i=0,a+=1):i+=1),l.date=e({y:a,M:i,d:s,h:l.date.hours(),m:l.date.minutes(),s:l.date.seconds()}),l.viewDate=e({y:a,M:i,d:Math.min(28,s)}),v(),I(),f(d,n.type))}},D={incrementHours:function(){H("add","hours",1)},incrementMinutes:function(){H("add","minutes",l.options.minuteStepping)},incrementSeconds:function(){H("add","seconds",1)},decrementHours:function(){H("subtract","hours",1)},decrementMinutes:function(){H("subtract","minutes",l.options.minuteStepping)},decrementSeconds:function(){H("subtract","seconds",1)},togglePeriod:function(){var t=l.date.hours();t>=12?t-=12:t+=12,l.date.hours(t)},showPicker:function(){l.widget.find(".timepicker > div:not(.timepicker-picker)").hide(),l.widget.find(".timepicker .timepicker-picker").show() -},showHours:function(){l.widget.find(".timepicker .timepicker-picker").hide(),l.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){l.widget.find(".timepicker .timepicker-picker").hide(),l.widget.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){l.widget.find(".timepicker .timepicker-picker").hide(),l.widget.find(".timepicker .timepicker-seconds").show()},selectHour:function(e){var n=parseInt(t(e.target).text(),10);l.use24hours||(l.date.hours()>=12?12!==n&&(n+=12):12===n&&(n=0)),l.date.hours(n),D.showPicker.call(l)},selectMinute:function(e){l.date.minutes(parseInt(t(e.target).text(),10)),D.showPicker.call(l)},selectSecond:function(e){l.date.seconds(parseInt(t(e.target).text(),10)),D.showPicker.call(l)}},T=function(n){var i=e(l.date),a=t(n.currentTarget).data("action"),r=D[a].apply(l,arguments);return k(n),l.date||(l.date=e({y:1970})),I(),L(),f(i,n.type),r},k=function(t){t.stopPropagation(),t.preventDefault()},Y=function(t){27===t.keyCode&&l.hide()},S=function(n){e.locale(l.options.language);var i=t(n.target),a=e(l.date),r=e(i.val(),l.format,l.options.useStrict);r.isValid()&&!P(r)&&W(r)?(_(),l.setValue(r),f(a,n.type),I()):(l.viewDate=a,l.unset=!0,f(a,n.type),m(r))},C=function(t){t&&(l.viewMode=Math.max(l.minViewMode,Math.min(2,l.viewMode+t))),l.widget.find(".datepicker > div").hide().filter(".datepicker-"+z.modes[l.viewMode].clsName).show()},A=function(){var e,n,i,a,r;l.widget.on("click",".datepicker *",t.proxy(x,this)),l.widget.on("click","[data-action]",t.proxy(T,this)),l.widget.on("mousedown",t.proxy(k,this)),l.element.on("keydown",t.proxy(Y,this)),l.options.pickDate&&l.options.pickTime&&l.widget.on("click.togglePicker",".accordion-toggle",function(s){if(s.stopPropagation(),e=t(this),n=e.closest("ul"),i=n.find(".in"),a=n.find(".collapse:not(.in)"),i&&i.length){if(r=i.data("collapse"),r&&r.transitioning)return;i.collapse("hide"),a.collapse("show"),e.find("span").toggleClass(l.options.icons.time+" "+l.options.icons.date),l.component&&l.component.find("span").toggleClass(l.options.icons.time+" "+l.options.icons.date)}}),l.isInput?l.element.on({click:t.proxy(l.show,this),focus:t.proxy(l.show,this),change:t.proxy(S,this),blur:t.proxy(l.hide,this)}):(l.element.on({change:t.proxy(S,this)},"input"),l.component?(l.component.on("click",t.proxy(l.show,this)),l.component.on("mousedown",t.proxy(k,this))):l.element.on("click",t.proxy(l.show,this)))},F=function(){t(window).on("resize.datetimepicker"+l.id,t.proxy(p,this)),l.isInput||t(document).on("mousedown.datetimepicker"+l.id,t.proxy(l.hide,this))},E=function(){l.widget.off("click",".datepicker *",l.click),l.widget.off("click","[data-action]"),l.widget.off("mousedown",l.stopEvent),l.options.pickDate&&l.options.pickTime&&l.widget.off("click.togglePicker"),l.isInput?l.element.off({focus:l.show,change:S,click:l.show,blur:l.hide}):(l.element.off({change:S},"input"),l.component?(l.component.off("click",l.show),l.component.off("mousedown",l.stopEvent)):l.element.off("click",l.show))},j=function(){t(window).off("resize.datetimepicker"+l.id),l.isInput||t(document).off("mousedown.datetimepicker"+l.id)},N=function(){if(l.element){var e,n=l.element.parents(),i=!1;for(e=0;e0?i:!1},$=function(t){return t=t.toString(),t.length>=2?t:"0"+t},B=function(){var t='‹›',e='',n='
'+t+'
'+t+e+'
'+t+e+"
",i="";return l.options.pickDate&&l.options.pickTime?(i='
',i+=l.options.sideBySide?'
'+n+'
'+R.getTemplate()+"
":'
    '+n+'
  • '+R.getTemplate()+"
",i+="
"):l.options.pickTime?'":'"},z={modes:[{clsName:"days",navFnc:"month",navStep:1},{clsName:"months",navFnc:"year",navStep:1},{clsName:"years",navFnc:"year",navStep:10}]},R={hourTemplate:'',minuteTemplate:'',secondTemplate:''};R.getTemplate=function(){return'
"+(l.options.useSeconds?'':"")+(l.use24hours?"":'')+" "+(l.options.useSeconds?'":"")+(l.use24hours?"":'')+'"+(l.options.useSeconds?'':"")+(l.use24hours?"":'')+'
'+(l.options.useMinutes?'':"")+"
"+R.hourTemplate+' :'+(l.options.useMinutes?R.minuteTemplate:'00')+":'+R.secondTemplate+"
'+(l.options.useMinutes?'':"")+"
'+(l.options.useSeconds?'
':"")},l.destroy=function(){E(),j(),l.widget.remove(),l.element.removeData("DateTimePicker"),l.component&&l.component.removeData("DateTimePicker")},l.show=function(t){if(!c().prop("disabled")){if(l.options.useCurrent&&""===c().val()){if(1!==l.options.minuteStepping){var n=e(),i=l.options.minuteStepping;n.minutes(Math.round(n.minutes()/i)*i%60).seconds(0),l.setValue(n.format(l.format))}else l.setValue(e().format(l.format));f("",t.type)}t&&"click"===t.type&&l.isInput&&l.widget.hasClass("picker-open")||(l.widget.hasClass("picker-open")?(l.widget.hide(),l.widget.removeClass("picker-open")):(l.widget.show(),l.widget.addClass("picker-open")),l.height=l.component?l.component.outerHeight():l.element.outerHeight(),p(),l.element.trigger({type:"dp.show",date:e(l.date)}),F(),t&&k(t))}},l.disable=function(){var t=c();t.prop("disabled")||(t.prop("disabled",!0),E())},l.enable=function(){var t=c();t.prop("disabled")&&(t.prop("disabled",!1),A())},l.hide=function(){var t,n,i=l.widget.find(".collapse");for(t=0;t0?this.window.innerWidth:this.screen.width,768>width?($("div.navbar-collapse").addClass("collapse"),topOffset=100):$("div.navbar-collapse").removeClass("collapse"),height=this.window.innerHeight>0?this.window.innerHeight:this.screen.height,height-=topOffset,1>height&&(height=1),height>topOffset&&$("#page-wrapper").css("min-height",height+"px")})}); \ No newline at end of file diff --git a/public/ckeditor/CHANGES.md b/public/ckeditor/CHANGES.md deleted file mode 100644 index fd290571..00000000 --- a/public/ckeditor/CHANGES.md +++ /dev/null @@ -1,643 +0,0 @@ -CKEditor 4 Changelog -==================== - -## CKEditor 4.4.4 - -Fixed Issues: - -* [#12268](http://dev.ckeditor.com/ticket/12268): Cleanup of [UI Color](http://ckeditor.com/addon/uicolor) YUI styles. Thanks to [CasherWest](https://github.com/CasherWest)! -* [#12263](http://dev.ckeditor.com/ticket/12263): Fixed: [Paste from Word]((http://ckeditor.com/addon/pastefromword)) filter does not properly normalize semicolons style text. Thanks to [Alin Purcaru](https://github.com/mesmerizero)! -* [#12243](http://dev.ckeditor.com/ticket/12243): Fixed: Text formatting lost when pasting from Word. Thanks to [Alin Purcaru](https://github.com/mesmerizero)! -* [#111739](http://dev.ckeditor.com/ticket/11739): Fixed: `keypress` listeners should not be used in the undo manager. A complete rewrite of keyboard handling in the undo manager was made. Numerous smaller issues were fixed, among others: - * [#10926](http://dev.ckeditor.com/ticket/10926): [Chrome@Android] Fixed: Typing does not record snapshots and does not fire the [`editor.change`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-change) event. - * [#11611](http://dev.ckeditor.com/ticket/11611): [Firefox] Fixed: The [`editor.change`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-change) event is fired when pressing Arrow keys. - * [#12219](http://dev.ckeditor.com/ticket/12219): [Safari] Fixed: Some modifications of the [`UndoManager.locked`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.undo.UndoManager-property-locked) property violate strict mode in the [Undo](http://ckeditor.com/addon/undo) plugin. -* [#10916](http://dev.ckeditor.com/ticket/10916): Fixed: [Magic Line](http://ckeditor.com/addon/magicline) icon in Right-To-Left environments. -* [#11970](http://dev.ckeditor.com/ticket/11970): [IE] Fixed: CKEditor `paste` event is not fired when pasting with *Shift+Ins*. -* [#12111](http://dev.ckeditor.com/ticket/12111): Fixed: Linked image attributes are not read when opening the image dialog window by doubleclicking. -* [#10030](http://dev.ckeditor.com/ticket/10030): [IE] Fixed: Prevented "Unspecified Error" thrown in various cases when IE8-9 does not allow access to `document.activeElement`. -* [#12273](http://dev.ckeditor.com/ticket/12273): Fixed: Applying block style in a description list breaks it. -* [#12218](http://dev.ckeditor.com/ticket/12218): Fixed: Minor syntax issue in CSS files. -* [#12178](http://dev.ckeditor.com/ticket/12178): [Blink/WebKit] Fixed: Iterator does not return the block if the selection is located at the end of it. -* [#12185](http://dev.ckeditor.com/ticket/12185): [IE9QM] Fixed: Error thrown when moving the mouse over focused editor's scrollbar. -* [#12215](http://dev.ckeditor.com/ticket/12215): Fixed: Basepath resolution does not recognize semicolon as a query separator. -* [#12135](http://dev.ckeditor.com/ticket/12135): Fixed: [Remove Format](http://ckeditor.com/addon/removeformat) does not work on widgets. -* [#12298](http://dev.ckeditor.com/ticket/12298): [IE11] Fixed: Clicking below `` in Compatibility Mode will no longer reset selection to the first line. -* [#12204](http://dev.ckeditor.com/ticket/12204): Fixed: Editor's voice label is not affected by [`config.title`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-title). -* [#11915](http://dev.ckeditor.com/ticket/11915): Fixed: With [SCAYT](http://ckeditor.com/addon/scayt) enabled, cursor moves to the beginning of the first highlighted, misspelled word after typing or pasting into the editor. -* [SCAYT](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/69): Fixed: Error thrown in the console after enabling [SCAYT](http://ckeditor.com/addon/scayt) and trying to add a new image. - - -Other Changes: - -* [#12296](http://dev.ckeditor.com/ticket/12296): Merged `benderjs-ckeditor` into the main CKEditor repository. - -## CKEditor 4.4.3 - -**Security Updates:** - -* Fixed XSS vulnerability in the Preview plugin reported by Mario Heiderich of [Cure53](https://cure53.de/). - -**An upgrade is highly recommended!** - -New Features: - -* [#12164](http://dev.ckeditor.com/ticket/12164): Added the "Justify" option to the "Horizontal Alignment" drop-down in the Table Cell Properties dialog window. - -Fixed Issues: - -* [#12110](http://dev.ckeditor.com/ticket/12110): Fixed: Editor crash after deleting a table. Thanks to [Alin Purcaru](https://github.com/mesmerizero)! -* [#11897](http://dev.ckeditor.com/ticket/11897): Fixed: **Enter** key used in an empty list item creates a new line instead of breaking the list. Thanks to [noam-si](https://github.com/noam-si)! -* [#12140](http://dev.ckeditor.com/ticket/12140): Fixed: Double-clicking linked widgets opens two dialog windows. -* [#12132](http://dev.ckeditor.com/ticket/12132): Fixed: Image is inserted with `width` and `height` styles even when they are not allowed. -* [#9317](http://dev.ckeditor.com/ticket/9317): [IE] Fixed: [`config.disableObjectResizing`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-disableObjectResizing) does not work on IE. **Note**: We were not able to fix this issue on IE11+ because necessary events stopped working. See a [last resort workaround](http://dev.ckeditor.com/ticket/9317#comment:16) and make sure to [support our complaint to Microsoft](https://connect.microsoft.com/IE/feedback/details/742593/please-respect-execcommand-enableobjectresizing-in-contenteditable-elements). -* [#9638](http://dev.ckeditor.com/ticket/9638): Fixed: There should be no information about accessibility help available under the *Alt+0* keyboard shortcut if the [Accessibility Help](http://ckeditor.com/addon/a11yhelp) plugin is not available. -* [#8117](http://dev.ckeditor.com/ticket/8117) and [#9186](http://dev.ckeditor.com/ticket/9186): Fixed: In HTML5 `` tags should be allowed everywhere, including inside the `` element. -* [#10422](http://dev.ckeditor.com/ticket/10422): Fixed: [`config.fillEmptyBlocks`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-fillEmptyBlocks) not working properly if a function is specified. - -## CKEditor 4.4.2 - -Important Notes: - -* The CKEditor testing environment is now publicly available. Read more about how to set up the environment and execute tests in the [CKEditor Testing Environment](http://docs.ckeditor.com/#!/guide/dev_tests) guide. - Please note that the [`tests/`](https://github.com/ckeditor/ckeditor-dev/tree/master/tests) directory which contains editor tests is not available in release packages. It can only be found in the development version of CKEditor on [GitHub](https://github.com/ckeditor/ckeditor-dev/). - -New Features: - -* [#11909](http://dev.ckeditor.com/ticket/11909): Introduced a parameter to prevent the [`editor.setData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData) method from recording undo snapshots. - -Fixed Issues: - -* [#11757](http://dev.ckeditor.com/ticket/11757): Fixed: Imperfections in the [Moono](http://ckeditor.com/addon/moono) skin. Thanks to [danyaPostfactum](https://github.com/danyaPostfactum)! -* [#10091](http://dev.ckeditor.com/ticket/10091): Blockquote should be treated like an object by the styles system. Thanks to [dan-james-deeson](https://github.com/dan-james-deeson)! -* [#11478](http://dev.ckeditor.com/ticket/11478): Fixed: Issue with passing jQuery objects to [adapter](http://docs.ckeditor.com/#!/guide/dev_jquery) configuration. -* [#10867](http://dev.ckeditor.com/ticket/10867): Fixed: Issue with setting encoded URI as image link. -* [#11983](http://dev.ckeditor.com/ticket/11983): Fixed: Clicking a nested widget does not focus it. Additionally, performance of the [`widget.repository.getByElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-getByElement) method was improved. -* [#12000](http://dev.ckeditor.com/ticket/12000): Fixed: Nested widgets should be initialized on [`editor.setData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData) and [`nestedEditable.setData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.nestedEditable-method-setData). -* [#12022](http://dev.ckeditor.com/ticket/12022): Fixed: Outer widget's drag handler is not created at all if it has any nested widgets inside. -* [#11960](http://dev.ckeditor.com/ticket/11960): [Blink/WebKit] Fixed: The caret should be scrolled into view on *Backspace* and *Delete* (covers only the merging blocks case). -* [#11306](http://dev.ckeditor.com/ticket/11306): [OSX][Blink/WebKit] Fixed: No widget entries in the context menu on widget right-click. -* [#11957](http://dev.ckeditor.com/ticket/11957): Fixed: Alignment labels in the [Enhanced Image](http://ckeditor.com/addon/image2) dialog window are not translated. -* [#11980](http://dev.ckeditor.com/ticket/11980): [Blink/WebKit] Fixed: `` elements created when joining adjacent elements (non-collapsed selection). -* [#12009](http://dev.ckeditor.com/ticket/12009): [Nested widgets] Integration with the [Magic Line](http://ckeditor.com/addon/magicline) plugin. -* [#11387](http://dev.ckeditor.com/ticket/11387): Fixed: `role="radiogroup"` should be applied only to radio inputs' container. -* [#7975](http://dev.ckeditor.com/ticket/7975): [IE8] Fixed: Errors when trying to select an empty table cell. -* [#11947](http://dev.ckeditor.com/ticket/11947): [Firefox+IE11] Fixed: *Shift+Enter* in lists produces two line breaks. -* [#11972](http://dev.ckeditor.com/ticket/11972): Fixed: Feature detection in the [`element.setText()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-setText) method should not trigger the layout engine. -* [#7634](http://dev.ckeditor.com/ticket/7634): Fixed: The [Flash Dialog](http://ckeditor.com/addon/flash) plugin omits the `allowFullScreen` parameter in the editor data if set to `true`. -* [#11910](http://dev.ckeditor.com/ticket/11910): Fixed: [Enhanced Image](http://ckeditor.com/addon/image2) does not take [`config.baseHref`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-baseHref) into account when updating image dimensions. -* [#11753](http://dev.ckeditor.com/ticket/11753): Fixed: Wrong [`checkDirty()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty) method value after focusing or blurring a widget. -* [#11830](http://dev.ckeditor.com/ticket/11830): Fixed: Impossible to pass some arguments to [CKBuilder](https://github.com/ckeditor/ckbuilder) when using the `/dev/builder/build.sh` script. -* [#11945](http://dev.ckeditor.com/ticket/11945): Fixed: [Form Elements](http://ckeditor.com/addon/forms) plugin should not change a core method. -* [#11384](http://dev.ckeditor.com/ticket/11384): [IE9+] Fixed: `IndexSizeError` thrown when pasting into a non-empty selection anchored in one text node. - -## CKEditor 4.4.1 - -New Features: - -* [#9661](http://dev.ckeditor.com/ticket/9661): Added the option to [configure](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-linkJavaScriptLinksAllowed) anchor tags with JavaScript code in the `href` attribute. - -Fixed Issues: - -* [#11861](http://dev.ckeditor.com/ticket/11861): [Webkit/Blink] Fixed: Span elements created while joining adjacent elements. **Note:** This patch only covers cases when *Backspace* or *Delete* is pressed on a collapsed (empty) selection. The remaining case, with a non-empty selection, will be fixed in the next release. -* [#10714](http://dev.ckeditor.com/ticket/10714): [iOS] Fixed: Selection and drop-downs are broken if a touch event listener is used due to a [Webkit bug](https://bugs.webkit.org/show_bug.cgi?id=128924). Thanks to [Arty Gus](https://github.com/artygus)! -* [#11911](http://dev.ckeditor.com/ticket/11911): Fixed setting the `dir` attribute for a preloaded language in [CKEDITOR.lang](http://docs.ckeditor.com/#!/api/CKEDITOR.lang). Thanks to [Akash Mohapatra](https://github.com/akashmohapatra)! -* [#11926](http://dev.ckeditor.com/ticket/11926): Fixed: [Code Snippet](http://ckeditor.com/addon/codesnippet) does not decode HTML entities when loading code from the `` element. -* [#11223](http://dev.ckeditor.com/ticket/11223): Fixed: Issue when [Protected Source](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-protectedSource) was not working in the `` element. -* [#11859](http://dev.ckeditor.com/ticket/11859): Fixed: Removed the [Source Dialog](http://ckeditor.com/addon/sourcedialog) plugin dependency from the [Code Snippet](http://ckeditor.com/addon/codesnippet) sample. -* [#11754](http://dev.ckeditor.com/ticket/11754): [Chrome] Fixed: Infinite loop when content includes not closed attributes. -* [#11848](http://dev.ckeditor.com/ticket/11848): [IE] Fixed: [`editor.insertElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) throwing an exception when there was no selection in the editor. -* [#11801](http://dev.ckeditor.com/ticket/11801): Fixed: Editor anchors unavailable when linking the [Enhanced Image](http://ckeditor.com/addon/image2) widget. -* [#11626](http://dev.ckeditor.com/ticket/11626): Fixed: [Table Resize](http://ckeditor.com/addon/tableresize) sets invalid column width. -* [#11872](http://dev.ckeditor.com/ticket/11872): Made [`element.addClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-addClass) chainable symmetrically to [`element.removeClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-removeClass). -* [#11813](http://dev.ckeditor.com/ticket/11813): Fixed: Link lost while pasting a captioned image and restoring an undo snapshot ([Enhanced Image](http://ckeditor.com/addon/image2)). -* [#11814](http://dev.ckeditor.com/ticket/11814): Fixed: _Link_ and _Unlink_ entries persistently displayed in the [Enhanced Image](http://ckeditor.com/addon/image2) context menu. -* [#11839](http://dev.ckeditor.com/ticket/11839): [IE9] Fixed: The caret jumps out of the editable area when resizing the editor in the source mode. -* [#11822](http://dev.ckeditor.com/ticket/11822): [Webkit] Fixed: Editing anchors by double-click is broken in some cases. -* [#11823](http://dev.ckeditor.com/ticket/11823): [IE8] Fixed: [Table Resize](http://ckeditor.com/addon/tableresize) throws an error over scrollbar. -* [#11788](http://dev.ckeditor.com/ticket/11788): Fixed: It is not possible to change the language back to _Not set_ in the [Code Snippet](http://ckeditor.com/addon/codesnippet) dialog window. -* [#11788](http://dev.ckeditor.com/ticket/11788): Fixed: [Filter](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter) rules are not applied inside elements with the `contenteditable` attribute set to `true`. -* [#11798](http://dev.ckeditor.com/ticket/11798): Fixed: Inserting a non-editable element inside a table cell breaks the table. -* [#11793](http://dev.ckeditor.com/ticket/11793): Fixed: Drop-down is not "on" when clicking it while the editor is blurred. -* [#11850](http://dev.ckeditor.com/ticket/11850): Fixed: Fake objects with the `contenteditable` attribute set to `false` are not downcasted properly. -* [#11811](http://dev.ckeditor.com/ticket/11811): Fixed: Widget's data is not encoded correctly when passed to an attribute. -* [#11777](http://dev.ckeditor.com/ticket/11777): Fixed encoding ampersand in the [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin. -* [#11880](http://dev.ckeditor.com/ticket/11880): [IE8-9] Fixed: Linked image has a default thick border. - -Other Changes: - -* [#11807](http://dev.ckeditor.com/ticket/11807): Updated jQuery version used in the sample to 1.11.0 and tested CKEditor jQuery Adapter with version 1.11.0 and 2.1.0. -* [#9504](http://dev.ckeditor.com/ticket/9504): Stopped using deprecated `attribute.specified` in all browsers except Internet Explorer. -* [#11809](http://dev.ckeditor.com/ticket/11809): Changed tab size in `<pre>` to 4 spaces. - -## CKEditor 4.4 - -**Important Notes:** - -* Marked the [`editor.beforePaste`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-beforePaste) event as deprecated. -* The default class of captioned images has changed to `image` (was: `caption`). Please note that once edited in CKEditor 4.4+, all existing images of the `caption` class (`<figure class="caption">`) will be [filtered out](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) unless the [`config.image2_captionedClass`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image2_captionedClass) option is set to `caption`. For backward compatibility (i.e. when upgrading), it is highly recommended to use this setting, which also helps prevent CSS conflicts, etc. This does not apply to new CKEditor integrations. -* Widgets without defined buttons are no longer registered automatically to the [Advanced Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter). Before CKEditor 4.4 widgets were registered to the ACF which was an incorrect behavior ([#11567](http://dev.ckeditor.com/ticket/11567)). This change should not have any impact on standard scenarios, but if your button does not execute the widget command, you need to set [`allowedContent`](http://docs.ckeditor.com/#!/api/CKEDITOR.feature-property-allowedContent) and [`requiredContent`](http://docs.ckeditor.com/#!/api/CKEDITOR.feature-property-requiredContent) properties for it manually, because the editor will not be able to find them. -* The [Show Borders](http://ckeditor.com/addon/showborders) plugin was added to the Standard installation package in order to ensure that unstyled tables are still visible for the user ([#11665](http://dev.ckeditor.com/ticket/11665)). -* Since CKEditor 4.4 the editor instance should be passed to [`CKEDITOR.style`](http://docs.ckeditor.com/#!/api/CKEDITOR.style) methods to ensure full compatibility with other features (e.g. applying styles to widgets requires that). We ensured backward compatibility though, so the [`CKEDITOR.style`](http://docs.ckeditor.com/#!/api/CKEDITOR.style) will work even when the editor instance is not provided. - -New Features: - -* [#11297](http://dev.ckeditor.com/ticket/11297): Styles can now be applied to widgets. The definition of a style which can be applied to a specific widget must contain two additional properties — `type` and `widget`. Read more in the [Widget Styles](http://docs.ckeditor.com/#!/guide/dev_styles-section-widget-styles) section of the "Syles Drop-down" guide. Note that by default, widgets support only classes and no other attributes or styles. Related changes and features: - * Introduced the [`CKEDITOR.style.addCustomHandler()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-static-method-addCustomHandler) method for registering custom style handlers. - * The [`CKEDITOR.style.apply()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-method-apply) and [`CKEDITOR.style.remove()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-method-remove) methods are now called with an editor instance instead of the document so they can be reused by the [`CKEDITOR.editor.applyStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-applyStyle) and [`CKEDITOR.editor.removeStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-removeStyle) methods. Backward compatibility was preserved, but from CKEditor 4.4 it is highly recommended to pass an editor instead of a document to these methods. - * Many new methods and properties were introduced in the [Widget API](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget) to make the handling of styles by widgets fully customizable. See: [`widget.definition.styleableElements`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.definition-property-styleableElements), [`widget.definition.styleToAllowedContentRule`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.definition-property-styleToAllowedContentRules), [`widget.addClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-addClass), [`widget.removeClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-removeClass), [`widget.getClasses()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-getClasses), [`widget.hasClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-hasClass), [`widget.applyStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-applyStyle), [`widget.removeStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-removeStyle), [`widget.checkStyleActive()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-method-checkStyleActive). - * Integration with the [Allowed Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) required an introduction of the [`CKEDITOR.style.toAllowedContent()`](http://docs.ckeditor.com/#!/api/CKEDITOR.style-method-toAllowedContentRules) method which can be implemented by the custom style handler and if exists, it is used by the [`CKEDITOR.filter`](http://docs.ckeditor.com/#!/api/CKEDITOR.filter) to translate a style to [allowed content rules](http://docs.ckeditor.com/#!/api/CKEDITOR.filter.allowedContentRules). -* [#11300](http://dev.ckeditor.com/ticket/11300): Various changes in the [Enhanced Image](http://ckeditor.com/addon/image2) plugin: - * Introduced the [`config.image2_captionedClass`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image2_captionedClass) option to configure the class of captioned images. - * Introduced the [`config.image2_alignClasses`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image2_alignClasses) option to configure the way images are aligned with CSS classes. - If this setting is defined, the editor produces classes instead of inline styles for aligned images. - * Default image caption can be translated (customized) with the `editor.lang.image2.captionPlaceholder` string. -* [#11341](http://dev.ckeditor.com/ticket/11341): [Enhanced Image](http://ckeditor.com/addon/image2) plugin: It is now possible to add a link to any image type. -* [#10202](http://dev.ckeditor.com/ticket/10202): Introduced wildcard support in the [Allowed Content Rules](http://docs.ckeditor.com/#!/guide/dev_allowed_content_rules) format. -* [#10276](http://dev.ckeditor.com/ticket/10276): Introduced blacklisting in the [Allowed Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter). -* [#10480](http://dev.ckeditor.com/ticket/10480): Introduced code snippets with code highlighting. There are two versions available so far — the default [Code Snippet](http://ckeditor.com/addon/codesnippet) which uses the [highlight.js](http://highlightjs.org) library and the [Code Snippet GeSHi](http://ckeditor.com/addon/codesnippetgeshi) which uses the [GeSHi](http://qbnz.com/highlighter/) library. -* [#11737](http://dev.ckeditor.com/ticket/11737): Introduced an option to prevent [filtering](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) of an element that matches custom criteria (see [`filter.addElementCallback()`](http://docs.ckeditor.com/#!/api/CKEDITOR.filter-method-addElementCallback)). -* [#11532](http://dev.ckeditor.com/ticket/11532): Introduced the [`editor.addContentsCss()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-addContentsCss) method that can be used for [adding custom CSS files](http://docs.ckeditor.com/#!/guide/plugin_sdk_styles). -* [#11536](http://dev.ckeditor.com/ticket/11536): Added the [`CKEDITOR.tools.htmlDecode()`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-method-htmlDecode) method for decoding HTML entities. -* [#11225](http://dev.ckeditor.com/ticket/11225): Introduced the [`CKEDITOR.tools.transparentImageData`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-property-transparentImageData) property which contains transparent image data to be used in CSS or as image source. - -Other Changes: - -* [#11377](http://dev.ckeditor.com/ticket/11377): Unified internal representation of empty anchors using the [fake objects](http://ckeditor.com/addon/fakeobjects). -* [#11422](http://dev.ckeditor.com/ticket/11422): Removed Firefox 3.x, Internet Explorer 6 and Opera 12.x leftovers in code. -* [#5217](http://dev.ckeditor.com/ticket/5217): Setting data (including switching between modes) creates a new undo snapshot. Besides that: - * Introduced the [`editable.status`](http://docs.ckeditor.com/#!/api/CKEDITOR.editable-property-status) property. - * Introduced a new `forceUpdate` option for the [`editor.lockSnapshot`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-lockSnapshot) event. - * Fixed: Selection not being unlocked in inline editor after setting data ([#11500](http://dev.ckeditor.com/ticket/11500)). -* The [WebSpellChecker](http://ckeditor.com/addon/wsc) plugin was updated to the latest version. - -Fixed Issues: - -* [#10190](http://dev.ckeditor.com/ticket/10190): Fixed: Removing block style with [`editor.removeStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-removeStyle) should result in a paragraph and not a div. -* [#11727](http://dev.ckeditor.com/ticket/11727): Fixed: The editor tries to select a non-editable image which was clicked. - -## CKEditor 4.3.5 - -New Features: - -* Added new translation: Tatar. - -Fixed Issues: - -* [#11677](http://dev.ckeditor.com/ticket/11677): Fixed: Undo/Redo keystrokes are blocked in the source mode. -* [#11717](http://dev.ckeditor.com/ticket/11717): [Document Properties](http://ckeditor.com/addon/docprops) plugin requires the [Color Dialog](http://ckeditor.com/addon/colordialog) plugin to work. - -## CKEditor 4.3.4 - -Fixed Issues: - -* [#11597](http://dev.ckeditor.com/ticket/11597): [IE11] Fixed: Error thrown when trying to open the [preview](http://ckeditor.com/addon/preview) using the keyboard. -* [#11544](http://dev.ckeditor.com/ticket/11544): [Placeholders](http://ckeditor.com/addon/placeholder) will no longer be upcasted in parents not accepting `<span>` elements. -* [#8663](http://dev.ckeditor.com/ticket/8663): Fixed [`element.renameNode()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-renameNode) not clearing the [`element.getName()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-getName) cache. -* [#11574](http://dev.ckeditor.com/ticket/11574): Fixed: *Backspace* destroying the DOM structure if an inline editable is placed in a list item. -* [#11603](http://dev.ckeditor.com/ticket/11603): Fixed: [Table Resize](http://ckeditor.com/addon/tableresize) attaches to tables outside the editable. -* [#9205](http://dev.ckeditor.com/ticket/9205), [#7805](http://dev.ckeditor.com/ticket/7805), [#8216](http://dev.ckeditor.com/ticket/8216): Fixed: `{cke_protected_1}` appearing in data in various cases where HTML comments are placed next to `"` or `'`. -* [#11635](http://dev.ckeditor.com/ticket/11635): Fixed: Some attributes are not protected before the content is passed through the fix bin. -* [#11660](http://dev.ckeditor.com/ticket/11660): [IE] Fixed: Table content is lost when some extra markup is inside the table. -* [#11641](http://dev.ckeditor.com/ticket/11641): Fixed: Switching between modes in the classic editor removes content styles for the inline editor. -* [#11568](http://dev.ckeditor.com/ticket/11568): Fixed: [Styles](http://ckeditor.com/addon/stylescombo) drop-down list is not enabled on selection change. - -## CKEditor 4.3.3 - -Fixed Issues: - -* [#11500](http://dev.ckeditor.com/ticket/11500): [Webkit/Blink] Fixed: Selection lost when setting data in another inline editor. Additionally, [`selection.removeAllRanges()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-removeAllRanges) is now scoped to selection's [root](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-property-root). -* [#11104](http://dev.ckeditor.com/ticket/11104): [IE] Fixed: Various issues with scrolling and selection when focusing widgets. -* [#11487](http://dev.ckeditor.com/ticket/11487): Moving mouse over the [Enhanced Image](http://ckeditor.com/addon/image2) widget will no longer change the value returned by the [`editor.checkDirty()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty) method. -* [#8673](http://dev.ckeditor.com/ticket/8673): [WebKit] Fixed: Cannot select and remove the [Page Break](http://ckeditor.com/addon/pagebreak). -* [#11413](http://dev.ckeditor.com/ticket/11413): Fixed: Incorrect [`editor.execCommand()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-execCommand) behavior. -* [#11438](http://dev.ckeditor.com/ticket/11438): Splitting table cells vertically is no longer changing table structure. -* [#8899](http://dev.ckeditor.com/ticket/8899): Fixed: Links in the [About CKEditor](http://ckeditor.com/addon/about) dialog window now open in a new browser window or tab. -* [#11490](http://dev.ckeditor.com/ticket/11490): Fixed: [Menu button](http://ckeditor.com/addon/menubutton) panel not showing in the source mode. -* [#11417](http://dev.ckeditor.com/ticket/11417): The [`widget.doubleclick`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget-event-doubleclick) event is not canceled anymore after editing was triggered. -* [#11253](http://dev.ckeditor.com/ticket/11253): [IE] Fixed: Clipped upload button in the [Enhanced Image](http://ckeditor.com/addon/image2) dialog window. -* [#11359](http://dev.ckeditor.com/ticket/11359): Standardized the way anchors are discovered by the [Link](http://ckeditor.com/addon/link) plugin. -* [#11058](http://dev.ckeditor.com/ticket/11058): [IE8] Fixed: Error when deleting a table row. -* [#11508](http://dev.ckeditor.com/ticket/11508): Fixed: [`htmlDataProcessor`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlDataProcessor) discovering protected attributes within other attributes' values. -* [#11533](http://dev.ckeditor.com/ticket/11533): Widgets: Avoid recurring upcasts if the DOM structure was modified during an upcast. -* [#11400](http://dev.ckeditor.com/ticket/11400): Fixed: The [`domObject.removeAllListeners()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.domObject-method-removeAllListeners) method does not remove custom listeners completely. -* [#11493](http://dev.ckeditor.com/ticket/11493): Fixed: The [`selection.getRanges()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-getRanges) method does not override cached ranges when used with the `onlyEditables` argument. -* [#11390](http://dev.ckeditor.com/ticket/11390): [IE] All [XML](http://ckeditor.com/addon/xml) plugin [methods](http://docs.ckeditor.com/#!/api/CKEDITOR.xml) now work in IE10+. -* [#11542](http://dev.ckeditor.com/ticket/11542): [IE11] Fixed: Blurry toolbar icons when Right-to-Left UI language is set. -* [#11504](http://dev.ckeditor.com/ticket/11504): Fixed: When [`config.fullPage`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-fullPage) is set to `true`, entities are not encoded in editor output. -* [#11004](http://dev.ckeditor.com/ticket/11004): Integrated [Enhanced Image](http://ckeditor.com/addon/image2) dialog window with [Advanced Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter). -* [#11439](http://dev.ckeditor.com/ticket/11439): Fixed: Properties get cloned in the Cell Properties dialog window if multiple cells are selected. - -## CKEditor 4.3.2 - -Fixed Issues: - -* [#11331](http://dev.ckeditor.com/ticket/11331): A menu button will have a changed label when selected instead of using the `aria-pressed` attribute. -* [#11177](http://dev.ckeditor.com/ticket/11177): Widget drag handler improvements: - * [#11176](http://dev.ckeditor.com/ticket/11176): Fixed: Initial position is not updated when the widget data object is empty. - * [#11001](http://dev.ckeditor.com/ticket/11001): Fixed: Multiple synchronous layout recalculations are caused by initial drag handler positioning causing performance issues. - * [#11161](http://dev.ckeditor.com/ticket/11161): Fixed: Drag handler is not repositioned in various situations. - * [#11281](http://dev.ckeditor.com/ticket/11281): Fixed: Drag handler and mask are duplicated after widget reinitialization. -* [#11207](http://dev.ckeditor.com/ticket/11207): [Firefox] Fixed: Misplaced [Enhanced Image](http://ckeditor.com/addon/image2) resizer in the inline editor. -* [#11102](http://dev.ckeditor.com/ticket/11102): `CKEDITOR.template` improvements: - * [#11102](http://dev.ckeditor.com/ticket/11102): Added newline character support. - * [#11216](http://dev.ckeditor.com/ticket/11216): Added "\\'" substring support. -* [#11121](http://dev.ckeditor.com/ticket/11121): [Firefox] Fixed: High Contrast mode is enabled when the editor is loaded in a hidden iframe. -* [#11350](http://dev.ckeditor.com/ticket/11350): The default value of [`config.contentsCss`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-contentsCss) is affected by [`CKEDITOR.getUrl()`](http://docs.ckeditor.com/#!/api/CKEDITOR-method-getUrl). -* [#11097](http://dev.ckeditor.com/ticket/11097): Improved the [Autogrow](http://ckeditor.com/addon/autogrow) plugin performance when dealing with very big tables. -* [#11290](http://dev.ckeditor.com/ticket/11290): Removed redundant code in the [Source Dialog](http://ckeditor.com/addon/sourcedialog) plugin. -* [#11133](http://dev.ckeditor.com/ticket/11133): [Page Break](http://ckeditor.com/addon/pagebreak) becomes editable if pasted. -* [#11126](http://dev.ckeditor.com/ticket/11126): Fixed: Native Undo executed once the bottom of the snapshot stack is reached. -* [#11131](http://dev.ckeditor.com/ticket/11131): [Div Editing Area](http://ckeditor.com/addon/divarea): Fixed: Error thrown when switching to source mode if the selection was in widget's nested editable. -* [#11139](http://dev.ckeditor.com/ticket/11139): [Div Editing Area](http://ckeditor.com/addon/divarea): Fixed: Elements Path is not cleared after switching to source mode. -* [#10778](http://dev.ckeditor.com/ticket/10778): Fixed a bug with range enlargement. The range no longer expands to visible whitespace. -* [#11146](http://dev.ckeditor.com/ticket/11146): [IE] Fixed: Preview window switches Internet Explorer to Quirks Mode. -* [#10762](http://dev.ckeditor.com/ticket/10762): [IE] Fixed: JavaScript code displayed in preview window's URL bar. -* [#11186](http://dev.ckeditor.com/ticket/11186): Introduced the [`widgets.repository.addUpcastCallback()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-addUpcastCallback) method that allows to block upcasting given element to a widget. -* [#11307](http://dev.ckeditor.com/ticket/11307): Fixed: Paste as Plain Text conflict with the [MooTools](http://mootools.net) library. -* [#11140](http://dev.ckeditor.com/ticket/11140): [IE11] Fixed: Anchors are not draggable. -* [#11379](http://dev.ckeditor.com/ticket/11379): Changed default contents `line-height` to unitless values to avoid huge text overlapping (like in [#9696](http://dev.ckeditor.com/ticket/9696)). -* [#10787](http://dev.ckeditor.com/ticket/10787): [Firefox] Fixed: Broken replacement of text while pasting into `div`-based editor. -* [#10884](http://dev.ckeditor.com/ticket/10884): Widgets integration with the [Show Blocks](http://ckeditor.com/addon/showblocks) plugin. -* [#11021](http://dev.ckeditor.com/ticket/11021): Fixed: An error thrown when selecting entire editable contents while fake selection is on. -* [#11086](http://dev.ckeditor.com/ticket/11086): [IE8] Re-enable inline widgets drag&drop in Internet Explorer 8. -* [#11372](http://dev.ckeditor.com/ticket/11372): Widgets: Special characters encoded twice in nested editables. -* [#10068](http://dev.ckeditor.com/ticket/10068): Fixed: Support for protocol-relative URLs. -* [#11283](http://dev.ckeditor.com/ticket/11283): [Enhanced Image](http://ckeditor.com/addon/image2): A `<div>` element with `text-align: center` and an image inside is not recognised correctly. -* [#11196](http://dev.ckeditor.com/ticket/11196): [Accessibility Instructions](http://ckeditor.com/addon/a11yhelp): Allowed additional keyboard button labels to be translated in the dialog window. - -## CKEditor 4.3.1 - -**Important Notes:** - -* To match the naming convention, the `language` button is now `Language` ([#11201](http://dev.ckeditor.com/ticket/11201)). -* [Enhanced Image](http://ckeditor.com/addon/image2) button, context menu, command, and icon names match those of the [Image](http://ckeditor.com/addon/image) plugin ([#11222](http://dev.ckeditor.com/ticket/11222)). - -Fixed Issues: - -* [#11244](http://dev.ckeditor.com/ticket/11244): Changed: The [`widget.repository.checkWidgets()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-checkWidgets) method now fires the [`widget.repository.checkWidgets`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-event-checkWidgets) event, so from CKEditor 4.3.1 it is preferred to use the method rather than fire the event. -* [#11171](http://dev.ckeditor.com/ticket/11171): Fixed: [`editor.insertElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) and [`editor.insertText()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertText) methods do not call the [`widget.repository.checkWidgets()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-checkWidgets) method. -* [#11085](http://dev.ckeditor.com/ticket/11085): [IE8] Replaced preview generated by the [Mathematical Formulas](http://ckeditor.com/addon/mathjax) widget with a placeholder. -* [#11044](http://dev.ckeditor.com/ticket/11044): Enhanced WAI-ARIA support for the [Language](http://ckeditor.com/addon/language) plugin drop-down menu. -* [#11075](http://dev.ckeditor.com/ticket/11075): With drop-down menu button focused, pressing the *Down Arrow* key will now open the menu and focus its first option. -* [#11165](http://dev.ckeditor.com/ticket/11165): Fixed: The [File Browser](http://ckeditor.com/addon/filebrowser) plugin cannot be removed from the editor. -* [#11159](http://dev.ckeditor.com/ticket/11159): [IE9-10] [Enhanced Image](http://ckeditor.com/addon/image2): Fixed buggy discovery of image dimensions. -* [#11101](http://dev.ckeditor.com/ticket/11101): Drop-down lists no longer break when given double quotes. -* [#11077](http://dev.ckeditor.com/ticket/11077): [Enhanced Image](http://ckeditor.com/addon/image2): Empty undo step recorded when resizing the image. -* [#10853](http://dev.ckeditor.com/ticket/10853): [Enhanced Image](http://ckeditor.com/addon/image2): Widget has paragraph wrapper when de-captioning unaligned image. -* [#11198](http://dev.ckeditor.com/ticket/11198): Widgets: Drag handler is not fully visible when an inline widget is in a heading. -* [#11132](http://dev.ckeditor.com/ticket/11132): [Firefox] Fixed: Caret is lost after drag and drop of an inline widget. -* [#11182](http://dev.ckeditor.com/ticket/11182): [IE10-11] Fixed: Editor crashes (IE11) or works with minor issues (IE10) if a page is loaded in Quirks Mode. See [`env.quirks`](http://docs.ckeditor.com/#!/api/CKEDITOR.env-property-quirks) for more details. -* [#11204](http://dev.ckeditor.com/ticket/11204): Added `figure` and `figcaption` styles to the `contents.css` file so [Enhanced Image](http://ckeditor.com/addon/image2) looks nicer. -* [#11202](http://dev.ckeditor.com/ticket/11202): Fixed: No newline in [BBCode](http://ckeditor.com/addon/bbcode) mode. -* [#10890](http://dev.ckeditor.com/ticket/10890): Fixed: Error thrown when pressing the *Delete* key in a list item. -* [#10055](http://dev.ckeditor.com/ticket/10055): [IE8-10] Fixed: *Delete* pressed on a selected image causes the browser to go back. -* [#11183](http://dev.ckeditor.com/ticket/11183): Fixed: Inserting a horizontal rule or a table in multiple row selection causes a browser crash. Additionally, the [`editor.insertElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) method does not insert the element into every range of a selection any more. -* [#11042](http://dev.ckeditor.com/ticket/11042): Fixed: Selection made on an element containing a non-editable element was not auto faked. -* [#11125](http://dev.ckeditor.com/ticket/11125): Fixed: Keyboard navigation through menu and drop-down items will now cycle. -* [#11011](http://dev.ckeditor.com/ticket/11011): Fixed: The [`editor.applyStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-applyStyle) method removes attributes from nested elements. -* [#11179](http://dev.ckeditor.com/ticket/11179): Fixed: [`editor.destroy()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-destroy) does not cleanup content generated by the [Table Resize](http://ckeditor.com/addon/tableresize) plugin for inline editors. -* [#11237](http://dev.ckeditor.com/ticket/11237): Fixed: Table border attribute value is deleted when pasting content from Microsoft Word. -* [#11250](http://dev.ckeditor.com/ticket/11250): Fixed: HTML entities inside the `<textarea>` element are not encoded. -* [#11260](http://dev.ckeditor.com/ticket/11260): Fixed: Initially disabled buttons are not read by JAWS as disabled. -* [#11200](http://dev.ckeditor.com/ticket/11200): Added [Clipboard](http://ckeditor.com/addon/clipboard) plugin as a dependency for [Widget](http://ckeditor.com/addon/widget) to fix drag and drop. - -## CKEditor 4.3 - -New Features: - -* [#10612](http://dev.ckeditor.com/ticket/10612): Internet Explorer 11 support. -* [#10869](http://dev.ckeditor.com/ticket/10869): Widgets: Added better integration with the [Elements Path](http://ckeditor.com/addon/elementspath) plugin. -* [#10886](http://dev.ckeditor.com/ticket/10886): Widgets: Added tooltip to the drag handle. -* [#10933](http://dev.ckeditor.com/ticket/10933): Widgets: Introduced drag and drop of block widgets with the [Line Utilities](http://ckeditor.com/addon/lineutils) plugin. -* [#10936](http://dev.ckeditor.com/ticket/10936): Widget System changes for easier integration with other dialog systems. -* [#10895](http://dev.ckeditor.com/ticket/10895): [Enhanced Image](http://ckeditor.com/addon/image2): Added file browser integration. -* [#11002](http://dev.ckeditor.com/ticket/11002): Added the [`draggable`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.definition-property-draggable) option to disable drag and drop support for widgets. -* [#10937](http://dev.ckeditor.com/ticket/10937): [Mathematical Formulas](http://ckeditor.com/addon/mathjax) widget improvements: - * loading indicator ([#10948](http://dev.ckeditor.com/ticket/10948)), - * applying paragraph changes (like font color change) to iframe ([#10841](http://dev.ckeditor.com/ticket/10841)), - * Firefox and IE9 clipboard fixes ([#10857](http://dev.ckeditor.com/ticket/10857)), - * fixing same origin policy issue ([#10840](http://dev.ckeditor.com/ticket/10840)), - * fixing undo bugs ([#10842](http://dev.ckeditor.com/ticket/10842), [#10930](http://dev.ckeditor.com/ticket/10930)), - * fixing other minor bugs. -* [#10862](http://dev.ckeditor.com/ticket/10862): [Placeholder](http://ckeditor.com/addon/placeholder) plugin was rewritten as a widget. -* [#10822](http://dev.ckeditor.com/ticket/10822): Added styles system integration with non-editable elements (for example widgets) and their nested editables. Styles cannot change non-editable content and are applied in nested editable only if allowed by its type and content filter. -* [#10856](http://dev.ckeditor.com/ticket/10856): Menu buttons will now toggle the visibility of their panels when clicked multiple times. [Language](http://ckeditor.com/addon/language) plugin fixes: Added active language highlighting, added an option to remove the language. -* [#10028](http://dev.ckeditor.com/ticket/10028): New [`config.dialog_noConfirmCancel`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-dialog_noConfirmCancel) configuration option that eliminates the need to confirm closing of a dialog window when the user changed any of its fields. -* [#10848](http://dev.ckeditor.com/ticket/10848): Integrate remaining plugins ([Styles](http://ckeditor.com/addon/stylescombo), [Format](http://ckeditor.com/addon/format), [Font](http://ckeditor.com/addon/font), [Color Button](http://ckeditor.com/addon/colorbutton), [Language](http://ckeditor.com/addon/language) and [Indent](http://ckeditor.com/addon/indent)) with [active filter](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeFilter). -* [#10855](http://dev.ckeditor.com/ticket/10855): Change the extension of emoticons in the [BBCode](http://ckeditor.com/addon/bbcode) sample from GIF to PNG. - -Fixed Issues: - -* [#10831](http://dev.ckeditor.com/ticket/10831): [Enhanced Image](http://ckeditor.com/addon/image2): Merged `image2inline` and `image2block` into one `image2` widget. -* [#10835](http://dev.ckeditor.com/ticket/10835): [Enhanced Image](http://ckeditor.com/addon/image2): Improved visibility of the resize handle. -* [#10836](http://dev.ckeditor.com/ticket/10836): [Enhanced Image](http://ckeditor.com/addon/image2): Preserve custom mouse cursor while resizing the image. -* [#10939](http://dev.ckeditor.com/ticket/10939): [Firefox] [Enhanced Image](http://ckeditor.com/addon/image2): hovering the image causes it to change. -* [#10866](http://dev.ckeditor.com/ticket/10866): Fixed: Broken *Tab* key navigation in the [Enhanced Image](http://ckeditor.com/addon/image2) dialog window. -* [#10833](http://dev.ckeditor.com/ticket/10833): Fixed: *Lock ratio* option should be on by default in the [Enhanced Image](http://ckeditor.com/addon/image2) dialog window. -* [#10881](http://dev.ckeditor.com/ticket/10881): Various improvements to *Enter* key behavior in nested editables. -* [#10879](http://dev.ckeditor.com/ticket/10879): [Remove Format](http://ckeditor.com/addon/removeformat) should not leak from a nested editable. -* [#10877](http://dev.ckeditor.com/ticket/10877): Fixed: [WebSpellChecker](http://ckeditor.com/addon/wsc) fails to apply changes if a nested editable was focused. -* [#10877](http://dev.ckeditor.com/ticket/10877): Fixed: [SCAYT](http://ckeditor.com/addon/wsc) blocks typing in nested editables. -* [#11079](http://dev.ckeditor.com/ticket/11079): Add button icons to the [Placeholder](http://ckeditor.com/addon/placeholder) sample. -* [#10870](http://dev.ckeditor.com/ticket/10870): The `paste` command is no longer being disabled when the clipboard is empty. -* [#10854](http://dev.ckeditor.com/ticket/10854): Fixed: Firefox prepends `<br>` to `<body>`, so it is stripped by the HTML data processor. -* [#10823](http://dev.ckeditor.com/ticket/10823): Fixed: [Link](http://ckeditor.com/addon/link) plugin does not work with non-editable content. -* [#10828](http://dev.ckeditor.com/ticket/10828): [Magic Line](http://ckeditor.com/addon/magicline) integration with the Widget System. -* [#10865](http://dev.ckeditor.com/ticket/10865): Improved hiding copybin, so copying widgets works smoothly. -* [#11066](http://dev.ckeditor.com/ticket/11066): Widget's private parts use CSS reset. -* [#11027](http://dev.ckeditor.com/ticket/11027): Fixed: Block commands break on widgets; added the [`contentDomInvalidated`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-contentDomInvalidated) event. -* [#10430](http://dev.ckeditor.com/ticket/10430): Resolve dependence of the [Image](http://ckeditor.com/addon/image) plugin on the [Form Elements](http://ckeditor.com/addon/forms) plugin. -* [#10911](http://dev.ckeditor.com/ticket/10911): Fixed: Browser *Alt* hotkeys will no longer be blocked while a widget is focused. -* [#11082](http://dev.ckeditor.com/ticket/11082): Fixed: Selected widget is not copied or cut when using toolbar buttons or context menu. -* [#11083](http://dev.ckeditor.com/ticket/11083): Fixed list and div element application to block widgets. -* [#10887](http://dev.ckeditor.com/ticket/10887): Internet Explorer 8 compatibility issues related to the Widget System. -* [#11074](http://dev.ckeditor.com/ticket/11074): Temporarily disabled inline widget drag and drop, because of seriously buggy native `range#moveToPoint` method. -* [#11098](http://dev.ckeditor.com/ticket/11098): Fixed: Wrong selection position after undoing widget drag and drop. -* [#11110](http://dev.ckeditor.com/ticket/11110): Fixed: IFrame and Flash objects are being incorrectly pasted in certain conditions. -* [#11129](http://dev.ckeditor.com/ticket/11129): Page break is lost when loading data. -* [#11123](http://dev.ckeditor.com/ticket/11123): [Firefox] Widget is destroyed after being dragged outside of `<body>`. -* [#11124](http://dev.ckeditor.com/ticket/11124): Fixed the [Elements Path](http://ckeditor.com/addon/elementspath) in an editor using the [Div Editing Area](http://ckeditor.com/addon/divarea). - -## CKEditor 4.3 Beta - -New Features: - -* [#9764](http://dev.ckeditor.com/ticket/9764): Widget System. - * [Widget plugin](http://ckeditor.com/addon/widget) introducing the [Widget API](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget). - * New [`editor.enterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-enterMode) and [`editor.shiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-shiftEnterMode) properties – normalized versions of [`config.enterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterMode) and [`config.shiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-shiftEnterMode). - * Dynamic editor settings. Starting from CKEditor 4.3 Beta, *Enter* mode values and [content filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) instances may be changed dynamically (for example when the caret was placed in an element in which editor features should be adjusted). When you are implementing a new editor feature, you should base its behavior on [dynamic](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeEnterMode) or [static](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-enterMode) *Enter* mode values depending on whether this feature works in selection context or globally on editor content. - * Dynamic *Enter* mode values – [`editor.setActiveEnterMode()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setActiveEnterMode) method, [`editor.activeEnterModeChange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-activeEnterModeChange) event, and two properties: [`editor.activeEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeEnterMode) and [`editor.activeShiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeShiftEnterMode). - * Dynamic content filter instances – [`editor.setActiveFilter()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setActiveFilter) method, [`editor.activeFilterChange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-activeFilterChange) event, and [`editor.activeFilter`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-activeFilter) property. - * "Fake" selection was introduced. It makes it possible to virtually select any element when the real selection remains hidden. See the [`selection.fake()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-fake) method. - * Default [`htmlParser.filter`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter) rules are not applied to non-editable elements (elements with `contenteditable` attribute set to `false` and their descendants) anymore. To add a rule which will be applied to all elements you need to pass an additional argument to the [`filter.addRules()`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter-method-addRules) method. - * Dozens of new methods were introduced – most interesting ones: - * [`document.find()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.document-method-find), - * [`document.findOne()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.document-method-findOne), - * [`editable.insertElementIntoRange()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editable-method-insertElementIntoRange), - * [`range.moveToClosestEditablePosition()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-moveToClosestEditablePosition), - * New methods for [`htmlParser.node`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.node) and [`htmlParser.element`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.element). -* [#10659](http://dev.ckeditor.com/ticket/10659): New [Enhanced Image](http://ckeditor.com/addon/image2) plugin that introduces a widget with integrated image captions, an option to center images, and dynamic "click and drag" resizing. -* [#10664](http://dev.ckeditor.com/ticket/10664): New [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin that introduces the MathJax widget. -* [#7987](https://dev.ckeditor.com/ticket/7987): New [Language](http://ckeditor.com/addon/language) plugin that implements Language toolbar button to support [WCAG 3.1.2 Language of Parts](http://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html). -* [#10708](http://dev.ckeditor.com/ticket/10708): New [smileys](http://ckeditor.com/addon/smiley). - -## CKEditor 4.2.3 - -Fixed Issues: - -* [#10994](http://dev.ckeditor.com/ticket/10994): Fixed: Loading external jQuery library when opening the [jQuery Adapter](http://docs.ckeditor.com/#!/guide/dev_jquery) sample directly from file. -* [#10975](http://dev.ckeditor.com/ticket/10975): [IE] Fixed: Error thrown while opening the color palette. -* [#9929](http://dev.ckeditor.com/ticket/9929): [Blink/WebKit] Fixed: A non-breaking space is created once a character is deleted and a regular space is typed. -* [#10963](http://dev.ckeditor.com/ticket/10963): Fixed: JAWS issue with the keyboard shortcut for [Magic Line](http://ckeditor.com/addon/magicline). -* [#11096](http://dev.ckeditor.com/ticket/11096): Fixed: TypeError: Object has no method 'is'. - -## CKEditor 4.2.2 - -Fixed Issues: - -* [#9314](http://dev.ckeditor.com/ticket/9314): Fixed: Incorrect error message on closing a dialog window without saving changs. -* [#10308](http://dev.ckeditor.com/ticket/10308): [IE10] Fixed: Unspecified error when deleting a row. -* [#10945](http://dev.ckeditor.com/ticket/10945): [Chrome] Fixed: Clicking with a mouse inside the editor does not show the caret. -* [#10912](http://dev.ckeditor.com/ticket/10912): Prevent default action when content of a non-editable link is clicked. -* [#10913](http://dev.ckeditor.com/ticket/10913): Fixed [`CKEDITOR.plugins.addExternal()`](http://docs.ckeditor.com/#!/api/CKEDITOR.resourceManager-method-addExternal) not handling paths including file name specified. -* [#10666](http://dev.ckeditor.com/ticket/10666): Fixed [`CKEDITOR.tools.isArray()`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-method-isArray) not working cross frame. -* [#10910](http://dev.ckeditor.com/ticket/10910): [IE9] Fixed JavaScript error thrown in Compatibility Mode when clicking and/or typing in the editing area. -* [#10868](http://dev.ckeditor.com/ticket/10868): [IE8] Prevent the browser from crashing when applying the Inline Quotation style. -* [#10915](http://dev.ckeditor.com/ticket/10915): Fixed: Invalid CSS filter in the Kama skin. -* [#10914](http://dev.ckeditor.com/ticket/10914): Plugins [Indent List](http://ckeditor.com/addon/indentlist) and [Indent Block](http://ckeditor.com/addon/indentblock) are now included in the build configuration. -* [#10812](http://dev.ckeditor.com/ticket/10812): Fixed [`range.createBookmark2()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-createBookmark2) incorrectly normalizing offsets. This bug was causing many issues: [#10850](http://dev.ckeditor.com/ticket/10850), [#10842](http://dev.ckeditor.com/ticket/10842). -* [#10951](http://dev.ckeditor.com/ticket/10951): Reviewed and optimized focus handling on panels (combo, menu buttons, color buttons, and context menu) to enhance accessibility. Fixed [#10705](http://dev.ckeditor.com/ticket/10705), [#10706](http://dev.ckeditor.com/ticket/10706) and [#10707](http://dev.ckeditor.com/ticket/10707). -* [#10704](http://dev.ckeditor.com/ticket/10704): Fixed a JAWS issue with the Select Color dialog window title not being announced. -* [#10753](http://dev.ckeditor.com/ticket/10753): The floating toolbar in inline instances now has a dedicated accessibility label. - -## CKEditor 4.2.1 - -Fixed Issues: - -* [#10301](http://dev.ckeditor.com/ticket/10301): [IE9-10] Undo fails after 3+ consecutive paste actions with a JavaScript error. -* [#10689](http://dev.ckeditor.com/ticket/10689): Save toolbar button saves only the first editor instance. -* [#10368](http://dev.ckeditor.com/ticket/10368): Move language reading direction definition (`dir`) from main language file to core. -* [#9330](http://dev.ckeditor.com/ticket/9330): Fixed pasting anchors from MS Word. -* [#8103](http://dev.ckeditor.com/ticket/8103): Fixed pasting nested lists from MS Word. -* [#9958](http://dev.ckeditor.com/ticket/9958): [IE9] Pressing the "OK" button will trigger the `onbeforeunload` event in the popup dialog. -* [#10662](http://dev.ckeditor.com/ticket/10662): Fixed styles from the Styles drop-down list not registering to the ACF in case when the [Shared Spaces plugin](http://ckeditor.com/addon/sharedspace) is used. -* [#9654](http://dev.ckeditor.com/ticket/9654): Problems with Internet Explorer 10 Quirks Mode. -* [#9816](http://dev.ckeditor.com/ticket/9816): Floating toolbar does not reposition vertically in several cases. -* [#10646](http://dev.ckeditor.com/ticket/10646): Removing a selected sublist or nested table with *Backspace/Delete* removes the parent element. -* [#10623](http://dev.ckeditor.com/ticket/10623): [WebKit] Page is scrolled when opening a drop-down list. -* [#10004](http://dev.ckeditor.com/ticket/10004): [ChromeVox] Button names are not announced. -* [#10731](http://dev.ckeditor.com/ticket/10731): [WebSpellChecker](http://ckeditor.com/addon/wsc) plugin breaks cloning of editor configuration. -* It is now possible to set per instance [WebSpellChecker](http://ckeditor.com/addon/wsc) plugin configuration instead of setting the configuration globally. - -## CKEditor 4.2 - -**Important Notes:** - -* Dropped compatibility support for Internet Explorer 7 and Firefox 3.6. - -* Both the Basic and the Standard distribution packages will not contain the new [Indent Block](http://ckeditor.com/addon/indentblock) plugin. Because of this the [Advanced Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) might remove block indentations from existing contents. If you want to prevent this, either [add an appropriate ACF rule to your filter](http://docs.ckeditor.com/#!/guide/dev_allowed_content_rules) or create a custom build based on the Basic/Standard package and add the Indent Block plugin in [CKBuilder](http://ckeditor.com/builder). - -New Features: - -* [#10027](http://dev.ckeditor.com/ticket/10027): Separated list and block indentation into two plugins: [Indent List](http://ckeditor.com/addon/indentlist) and [Indent Block](http://ckeditor.com/addon/indentblock). -* [#8244](http://dev.ckeditor.com/ticket/8244): Use *(Shift+)Tab* to indent and outdent lists. -* [#10281](http://dev.ckeditor.com/ticket/10281): The [jQuery Adapter](http://docs.ckeditor.com/#!/guide/dev_jquery) is now available. Several jQuery-related issues fixed: [#8261](http://dev.ckeditor.com/ticket/8261), [#9077](http://dev.ckeditor.com/ticket/9077), [#8710](http://dev.ckeditor.com/ticket/8710), [#8530](http://dev.ckeditor.com/ticket/8530), [#9019](http://dev.ckeditor.com/ticket/9019), [#6181](http://dev.ckeditor.com/ticket/6181), [#7876](http://dev.ckeditor.com/ticket/7876), [#6906](http://dev.ckeditor.com/ticket/6906). -* [#10042](http://dev.ckeditor.com/ticket/10042): Introduced [`config.title`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-title) setting to change the human-readable title of the editor. -* [#9794](http://dev.ckeditor.com/ticket/9794): Added [`editor.change`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-change) event. -* [#9923](http://dev.ckeditor.com/ticket/9923): HiDPI support in the editor UI. HiDPI icons for [Moono skin](http://ckeditor.com/addon/moono) added. -* [#8031](http://dev.ckeditor.com/ticket/8031): Handle `required` attributes on `<textarea>` elements — introduced [`editor.required`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-required) event. -* [#10280](http://dev.ckeditor.com/ticket/10280): Ability to replace `<textarea>` elements with the inline editor. - -Fixed Issues: - -* [#10599](http://dev.ckeditor.com/ticket/10599): [Indent](http://ckeditor.com/addon/indent) plugin is no longer required by the [List](http://ckeditor.com/addon/list) plugin. -* [#10370](http://dev.ckeditor.com/ticket/10370): Inconsistency in data events between framed and inline editors. -* [#10438](http://dev.ckeditor.com/ticket/10438): [FF, IE] No selection is done on an editable element on executing [`editor.setData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData). - -## CKEditor 4.1.3 - -New Features: - -* Added new translation: Indonesian. - -Fixed Issues: - -* [#10644](http://dev.ckeditor.com/ticket/10644): Fixed a critical bug when pasting plain text in Blink-based browsers. -* [#5189](http://dev.ckeditor.com/ticket/5189): [Find/Replace](http://ckeditor.com/addon/find) dialog window: rename "Cancel" button to "Close". -* [#10562](http://dev.ckeditor.com/ticket/10562): [Housekeeping] Unified CSS gradient filter formats in the [Moono](http://ckeditor.com/addon/moono) skin. -* [#10537](http://dev.ckeditor.com/ticket/10537): Advanced Content Filter should register a default rule for [`config.shiftEnterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-shiftEnterMode). -* [#10610](http://dev.ckeditor.com/ticket/10610): [`CKEDITOR.dialog.addIframe()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dialog-static-method-addIframe) incorrectly sets the iframe size in dialog windows. - -## CKEditor 4.1.2 - -New Features: - -* Added new translation: Sinhala. - -Fixed Issues: - -* [#10339](http://dev.ckeditor.com/ticket/10339): Fixed: Error thrown when inserted data was totally stripped out after filtering and processing. -* [#10298](http://dev.ckeditor.com/ticket/10298): Fixed: Data processor breaks attributes containing protected parts. -* [#10367](http://dev.ckeditor.com/ticket/10367): Fixed: [`editable.insertText()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editable-method-insertText) loses characters when `RegExp` replace controls are being inserted. -* [#10165](http://dev.ckeditor.com/ticket/10165): [IE] Access denied error when `document.domain` has been altered. -* [#9761](http://dev.ckeditor.com/ticket/9761): Update the *Backspace* key state in [`keystrokeHandler.blockedKeystrokes`](http://docs.ckeditor.com/#!/api/CKEDITOR.keystrokeHandler-property-blockedKeystrokes) when calling [`editor.setReadOnly()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setReadOnly). -* [#6504](http://dev.ckeditor.com/ticket/6504): Fixed: Race condition while loading several [`config.customConfig`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-customConfig) files. -* [#10146](http://dev.ckeditor.com/ticket/10146): [Firefox] Empty lines are being removed while [`config.enterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterMode) is [`CKEDITOR.ENTER_BR`](http://docs.ckeditor.com/#!/api/CKEDITOR-property-ENTER_BR). -* [#10360](http://dev.ckeditor.com/ticket/10360): Fixed: ARIA `role="application"` should not be used for dialog windows. -* [#10361](http://dev.ckeditor.com/ticket/10361): Fixed: ARIA `role="application"` should not be used for floating panels. -* [#10510](http://dev.ckeditor.com/ticket/10510): Introduced unique voice labels to differentiate between different editor instances. -* [#9945](http://dev.ckeditor.com/ticket/9945): [iOS] Scrolling not possible on iPad. -* [#10389](http://dev.ckeditor.com/ticket/10389): Fixed: Invalid HTML in the "Text and Table" template. -* [WebSpellChecker](http://ckeditor.com/addon/wsc) plugin user interface was changed to match CKEditor 4 style. - -## CKEditor 4.1.1 - -New Features: - -* Added new translation: Albanian. - -Fixed Issues: - -* [#10172](http://dev.ckeditor.com/ticket/10172): Pressing *Delete* or *Backspace* in an empty table cell moves the cursor to the next/previous cell. -* [#10219](http://dev.ckeditor.com/ticket/10219): Error thrown when destroying an editor instance in parallel with a `mouseup` event. -* [#10265](http://dev.ckeditor.com/ticket/10265): Wrong loop type in the [File Browser](http://ckeditor.com/addon/filebrowser) plugin. -* [#10249](http://dev.ckeditor.com/ticket/10249): Wrong undo/redo states at start. -* [#10268](http://dev.ckeditor.com/ticket/10268): [Show Blocks](http://ckeditor.com/addon/showblocks) does not recover after switching to Source view. -* [#9995](http://dev.ckeditor.com/ticket/9995): HTML code in the `<textarea>` should not be modified by the [`htmlDataProcessor`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlDataProcessor). -* [#10320](http://dev.ckeditor.com/ticket/10320): [Justify](http://ckeditor.com/addon/justify) plugin should add elements to Advanced Content Filter based on current [Enter mode](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterMode). -* [#10260](http://dev.ckeditor.com/ticket/10260): Fixed: Advanced Content Filter blocks [`tabSpaces`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-tabSpaces). Unified `data-cke-*` attributes filtering. -* [#10315](http://dev.ckeditor.com/ticket/10315): [WebKit] [Undo manager](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.undo.UndoManager) should not record snapshots after a filling character was added/removed. -* [#10291](http://dev.ckeditor.com/ticket/10291): [WebKit] Space after a filling character should be secured. -* [#10330](http://dev.ckeditor.com/ticket/10330): [WebKit] The filling character is not removed on `keydown` in specific cases. -* [#10285](http://dev.ckeditor.com/ticket/10285): Fixed: Styled text pasted from MS Word causes an infinite loop. -* [#10131](http://dev.ckeditor.com/ticket/10131): Fixed: [`undoManager.update()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.undo.UndoManager-method-update) does not refresh the command state. -* [#10337](http://dev.ckeditor.com/ticket/10337): Fixed: Unable to remove `<s>` using [Remove Format](http://ckeditor.com/addon/removeformat). - -## CKEditor 4.1 - -Fixed Issues: - -* [#10192](http://dev.ckeditor.com/ticket/10192): Closing lists with the *Enter* key does not work with [Advanced Content Filter](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) in several cases. -* [#10191](http://dev.ckeditor.com/ticket/10191): Fixed allowed content rules unification, so the [`filter.allowedContent`](http://docs.ckeditor.com/#!/api/CKEDITOR.filter-property-allowedContent) property always contains rules in the same format. -* [#10224](http://dev.ckeditor.com/ticket/10224): Advanced Content Filter does not remove non-empty `<a>` elements anymore. -* Minor issues in plugin integration with Advanced Content Filter: - * [#10166](http://dev.ckeditor.com/ticket/10166): Added transformation from the `align` attribute to `float` style to preserve backward compatibility after the introduction of Advanced Content Filter. - * [#10195](http://dev.ckeditor.com/ticket/10195): [Image](http://ckeditor.com/addon/image) plugin no longer registers rules for links to Advanced Content Filter. - * [#10213](http://dev.ckeditor.com/ticket/10213): [Justify](http://ckeditor.com/addon/justify) plugin is now correctly registering rules to Advanced Content Filter when [`config.justifyClasses`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-justifyClasses) is defined. - -## CKEditor 4.1 RC - -New Features: - -* [#9829](http://dev.ckeditor.com/ticket/9829): Advanced Content Filter - data and features activation based on editor configuration. - - Brand new data filtering system that works in 2 modes: - - * Based on loaded features (toolbar items, plugins) - the data will be filtered according to what the editor in its - current configuration can handle. - * Based on [`config.allowedContent`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent) rules - the data - will be filtered and the editor features (toolbar items, commands, keystrokes) will be enabled if they are allowed. - - See the `datafiltering.html` sample, [guides](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) and [`CKEDITOR.filter` API documentation](http://docs.ckeditor.com/#!/api/CKEDITOR.filter). -* [#9387](http://dev.ckeditor.com/ticket/9387): Reintroduced [Shared Spaces](http://ckeditor.com/addon/sharedspace) - the ability to display toolbar and bottom editor space in selected locations and to share them by different editor instances. -* [#9907](http://dev.ckeditor.com/ticket/9907): Added the [`contentPreview`](http://docs.ckeditor.com/#!/api/CKEDITOR-event-contentPreview) event for preview data manipulation. -* [#9713](http://dev.ckeditor.com/ticket/9713): Introduced the [Source Dialog](http://ckeditor.com/addon/sourcedialog) plugin that brings raw HTML editing for inline editor instances. -* Included in [#9829](http://dev.ckeditor.com/ticket/9829): Introduced new events, [`toHtml`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-toHtml) and [`toDataFormat`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-toDataFormat), allowing for better integration with data processing. -* [#9981](http://dev.ckeditor.com/ticket/9981): Added ability to filter [`htmlParser.fragment`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.fragment), [`htmlParser.element`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.element) etc. by many [`htmlParser.filter`](http://docs.ckeditor.com/#!/api/CKEDITOR.htmlParser.filter)s before writing structure to an HTML string. -* Included in [#10103](http://dev.ckeditor.com/ticket/10103): - * Introduced the [`editor.status`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-status) property to make it easier to check the current status of the editor. - * Default [`command`](http://docs.ckeditor.com/#!/api/CKEDITOR.command) state is now [`CKEDITOR.TRISTATE_DISABLE`](http://docs.ckeditor.com/#!/api/CKEDITOR-property-TRISTATE_DISABLED). It will be activated on [`editor.instanceReady`](http://docs.ckeditor.com/#!/api/CKEDITOR-event-instanceReady) or immediately after being added if the editor is already initialized. -* [#9796](http://dev.ckeditor.com/ticket/9796): Introduced `<s>` as a default tag for strikethrough, which replaces obsolete `<strike>` in HTML5. - -## CKEditor 4.0.3 - -Fixed Issues: - -* [#10196](http://dev.ckeditor.com/ticket/10196): Fixed context menus not opening with keyboard shortcuts when [Autogrow](http://ckeditor.com/addon/autogrow) is enabled. -* [#10212](http://dev.ckeditor.com/ticket/10212): [IE7-10] Undo command throws errors after multiple switches between Source and WYSIWYG view. -* [#10219](http://dev.ckeditor.com/ticket/10219): [Inline editor] Error thrown after calling [`editor.destroy()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-destroy). - -## CKEditor 4.0.2 - -Fixed Issues: - -* [#9779](http://dev.ckeditor.com/ticket/9779): Fixed overriding [`CKEDITOR.getUrl()`](http://docs.ckeditor.com/#!/api/CKEDITOR-method-getUrl) with `CKEDITOR_GETURL`. -* [#9772](http://dev.ckeditor.com/ticket/9772): Custom buttons in the dialog window footer have different look and size ([Moono](http://ckeditor.com/addon/moono), [Kama](http://ckeditor.com/addon/kama) skins). -* [#9029](http://dev.ckeditor.com/ticket/9029): Custom styles added with the [`stylesSet.add()`](http://docs.ckeditor.com/#!/api/CKEDITOR.stylesSet-method-add) are displayed in the wrong order. -* [#9887](http://dev.ckeditor.com/ticket/9887): Disable [Magic Line](http://ckeditor.com/addon/magicline) when [`editor.readOnly`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-readOnly) is set. -* [#9882](http://dev.ckeditor.com/ticket/9882): Fixed empty document title on [`editor.getData()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-getData) if set via the Document Properties dialog window. -* [#9773](http://dev.ckeditor.com/ticket/9773): Fixed rendering problems with selection fields in the Kama skin. -* [#9851](http://dev.ckeditor.com/ticket/9851): The [`selectionChange`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-selectionChange) event is not fired when mouse selection ended outside editable. -* [#9903](http://dev.ckeditor.com/ticket/9903): [Inline editor] Bad positioning of floating space with page horizontal scroll. -* [#9872](http://dev.ckeditor.com/ticket/9872): [`editor.checkDirty()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty) returns `true` when called onload. Removed the obsolete `editor.mayBeDirty` flag. -* [#9893](http://dev.ckeditor.com/ticket/9893): [IE] Fixed broken toolbar when editing mixed direction content in Quirks mode. -* [#9845](http://dev.ckeditor.com/ticket/9845): Fixed TAB navigation in the [Link](http://ckeditor.com/addon/link) dialog window when the Anchor option is used and no anchors are available. -* [#9883](http://dev.ckeditor.com/ticket/9883): Maximizing was making the entire page editable with [divarea](http://ckeditor.com/addon/divarea)-based editors. -* [#9940](http://dev.ckeditor.com/ticket/9940): [Firefox] Navigating back to a page with the editor was making the entire page editable. -* [#9966](http://dev.ckeditor.com/ticket/9966): Fixed: Unable to type square brackets with French keyboard layout. Changed [Magic Line](http://ckeditor.com/addon/magicline) keystrokes. -* [#9507](http://dev.ckeditor.com/ticket/9507): [Firefox] Selection is moved before editable position when the editor is focused for the first time. -* [#9947](http://dev.ckeditor.com/ticket/9947): [WebKit] Editor overflows parent container in some edge cases. -* [#10105](http://dev.ckeditor.com/ticket/10105): Fixed: Broken [sourcearea](http://ckeditor.com/addon/sourcearea) view when an RTL language is set. -* [#10123](http://dev.ckeditor.com/ticket/10123): [WebKit] Fixed: Several dialog windows have broken layout since the latest WebKit release. -* [#10152](http://dev.ckeditor.com/ticket/10152): Fixed: Invalid ARIA property used on menu items. - -## CKEditor 4.0.1.1 - -Fixed Issues: - -* Security update: Added protection against XSS attack and possible path disclosure in the PHP sample. - -## CKEditor 4.0.1 - -Fixed Issues: - -* [#9655](http://dev.ckeditor.com/ticket/9655): Support for IE Quirks Mode in the new [Moono skin](http://ckeditor.com/addon/moono). -* Accessibility issues (mainly in inline editor): [#9364](http://dev.ckeditor.com/ticket/9364), [#9368](http://dev.ckeditor.com/ticket/9368), [#9369](http://dev.ckeditor.com/ticket/9369), [#9370](http://dev.ckeditor.com/ticket/9370), [#9541](http://dev.ckeditor.com/ticket/9541), [#9543](http://dev.ckeditor.com/ticket/9543), [#9841](http://dev.ckeditor.com/ticket/9841), [#9844](http://dev.ckeditor.com/ticket/9844). -* [Magic Line](http://ckeditor.com/addon/magicline) plugin: - * [#9481](http://dev.ckeditor.com/ticket/9481): Added accessibility support for Magic Line. - * [#9509](http://dev.ckeditor.com/ticket/9509): Added Magic Line support for forms. - * [#9573](http://dev.ckeditor.com/ticket/9573): Magic Line does not disappear on `mouseout` in a specific case. -* [#9754](http://dev.ckeditor.com/ticket/9754): [WebKit] Cutting & pasting simple unformatted text generates an inline wrapper in WebKit browsers. -* [#9456](http://dev.ckeditor.com/ticket/9456): [Chrome] Properly paste bullet list style from MS Word. -* [#9699](http://dev.ckeditor.com/ticket/9699), [#9758](http://dev.ckeditor.com/ticket/9758): Improved selection locking when selecting by dragging. -* Context menu: - * [#9712](http://dev.ckeditor.com/ticket/9712): Opening the context menu destroys editor focus. - * [#9366](http://dev.ckeditor.com/ticket/9366): Context menu should be displayed over the floating toolbar. - * [#9706](http://dev.ckeditor.com/ticket/9706): Context menu generates a JavaScript error in inline mode when the editor is attached to a header element. -* [#9800](http://dev.ckeditor.com/ticket/9800): Hide float panel when resizing the window. -* [#9721](http://dev.ckeditor.com/ticket/9721): Padding in content of div-based editor puts the editing area under the bottom UI space. -* [#9528](http://dev.ckeditor.com/ticket/9528): Host page `box-sizing` style should not influence the editor UI elements. -* [#9503](http://dev.ckeditor.com/ticket/9503): [Form Elements](http://ckeditor.com/addon/forms) plugin adds context menu listeners only on supported input types. Added support for `tel`, `email`, `search` and `url` input types. -* [#9769](http://dev.ckeditor.com/ticket/9769): Improved floating toolbar positioning in a narrow window. -* [#9875](http://dev.ckeditor.com/ticket/9875): Table dialog window does not populate width correctly. -* [#8675](http://dev.ckeditor.com/ticket/8675): Deleting cells in a nested table removes the outer table cell. -* [#9815](http://dev.ckeditor.com/ticket/9815): Cannot edit dialog window fields in an editor initialized in the jQuery UI modal dialog. -* [#8888](http://dev.ckeditor.com/ticket/8888): CKEditor dialog windows do not show completely in a small window. -* [#9360](http://dev.ckeditor.com/ticket/9360): [Inline editor] Blocks shown for a `<div>` element stay permanently even after the user exits editing the `<div>`. -* [#9531](http://dev.ckeditor.com/ticket/9531): [Firefox & Inline editor] Toolbar is lost when closing the Format drop-down list by clicking its button. -* [#9553](http://dev.ckeditor.com/ticket/9553): Table width incorrectly set when the `border-width` style is specified. -* [#9594](http://dev.ckeditor.com/ticket/9594): Cannot tab past CKEditor when it is in read-only mode. -* [#9658](http://dev.ckeditor.com/ticket/9658): [IE9] Justify not working on selected images. -* [#9686](http://dev.ckeditor.com/ticket/9686): Added missing contents styles for `<pre>` elements. -* [#9709](http://dev.ckeditor.com/ticket/9709): [Paste from Word](http://ckeditor.com/addon/pastefromword) should not depend on configuration from other styles. -* [#9726](http://dev.ckeditor.com/ticket/9726): Removed [Color Dialog](http://ckeditor.com/addon/colordialog) plugin dependency from [Table Tools](http://ckeditor.com/addon/tabletools). -* [#9765](http://dev.ckeditor.com/ticket/9765): Toolbar Collapse command documented incorrectly in the [Accessibility Instructions](http://ckeditor.com/addon/a11yhelp) dialog window. -* [#9771](http://dev.ckeditor.com/ticket/9771): [WebKit & Opera] Fixed scrolling issues when pasting. -* [#9787](http://dev.ckeditor.com/ticket/9787): [IE9] `onChange` is not fired for checkboxes in dialogs. -* [#9842](http://dev.ckeditor.com/ticket/9842): [Firefox 17] When opening a toolbar menu for the first time and pressing the *Down Arrow* key, focus goes to the next toolbar button instead of the menu options. -* [#9847](http://dev.ckeditor.com/ticket/9847): [Elements Path](http://ckeditor.com/addon/elementspath) should not be initialized in the inline editor. -* [#9853](http://dev.ckeditor.com/ticket/9853): [`editor.addRemoveFormatFilter()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-addRemoveFormatFilter) is exposed before it really works. -* [#8893](http://dev.ckeditor.com/ticket/8893): Value of the [`pasteFromWordCleanupFile`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordCleanupFile) configuration option is now taken from the instance configuration. -* [#9693](http://dev.ckeditor.com/ticket/9693): Removed "Live Preview" checkbox from UI color picker. - - -## CKEditor 4.0 - -The first stable release of the new CKEditor 4 code line. - -The CKEditor JavaScript API has been kept compatible with CKEditor 4, whenever -possible. The list of relevant changes can be found in the [API Changes page of -the CKEditor 4 documentation][1]. - -[1]: http://docs.ckeditor.com/#!/guide/dev_api_changes "API Changes" diff --git a/public/ckeditor/LICENSE.md b/public/ckeditor/LICENSE.md deleted file mode 100644 index b6e0b9ca..00000000 --- a/public/ckeditor/LICENSE.md +++ /dev/null @@ -1,1264 +0,0 @@ -Software License Agreement -========================== - -CKEditor - The text editor for Internet - http://ckeditor.com -Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. - -Licensed under the terms of any of the following licenses at your -choice: - - - GNU General Public License Version 2 or later (the "GPL") - http://www.gnu.org/licenses/gpl.html - (See Appendix A) - - - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - http://www.gnu.org/licenses/lgpl.html - (See Appendix B) - - - Mozilla Public License Version 1.1 or later (the "MPL") - http://www.mozilla.org/MPL/MPL-1.1.html - (See Appendix C) - -You are not required to, but if you want to explicitly declare the -license you have chosen to be bound to when using, reproducing, -modifying and distributing this software, just include a text file -titled "legal.txt" in your version of this software, indicating your -license choice. In any case, your choice will not restrict any -recipient of your version of this software to use, reproduce, modify -and distribute this software under any of the above licenses. - -Sources of Intellectual Property Included in CKEditor ------------------------------------------------------ - -Where not otherwise indicated, all CKEditor content is authored by -CKSource engineers and consists of CKSource-owned intellectual -property. In some specific instances, CKEditor will incorporate work -done by developers outside of CKSource with their express permission. - -Trademarks ----------- - -CKEditor is a trademark of CKSource - Frederico Knabben. All other brand -and product names are trademarks, registered trademarks or service -marks of their respective holders. - ---- - -Appendix A: The GPL License ---------------------------- - -GNU GENERAL PUBLIC LICENSE -Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software-to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - -GNU GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - -NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - -END OF TERMS AND CONDITIONS - - -Appendix B: The LGPL License ----------------------------- - -GNU LESSER GENERAL PUBLIC LICENSE -Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - -Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software-to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages-typically libraries-of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - -GNU LESSER GENERAL PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - -NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - -END OF TERMS AND CONDITIONS - - -Appendix C: The MPL License ---------------------------- - -MOZILLA PUBLIC LICENSE -Version 1.1 - -1. Definitions. - - 1.0.1. "Commercial Use" means distribution or otherwise making the - Covered Code available to a third party. - - 1.1. "Contributor" means each entity that creates or contributes to - the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Code, prior Modifications used by a Contributor, and the Modifications - made by that particular Contributor. - - 1.3. "Covered Code" means the Original Code or Modifications or the - combination of the Original Code and Modifications, in each case - including portions thereof. - - 1.4. "Electronic Distribution Mechanism" means a mechanism generally - accepted in the software development community for the electronic - transfer of data. - - 1.5. "Executable" means Covered Code in any form other than Source - Code. - - 1.6. "Initial Developer" means the individual or entity identified - as the Initial Developer in the Source Code notice required by Exhibit - A. - - 1.7. "Larger Work" means a work which combines Covered Code or - portions thereof with code not governed by the terms of this License. - - 1.8. "License" means this document. - - 1.8.1. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means any addition to or deletion from the - substance or structure of either the Original Code or any previous - Modifications. When Covered Code is released as a series of files, a - Modification is: - A. Any addition to or deletion from the contents of a file - containing Original Code or previous Modifications. - - B. Any new file that contains any part of the Original Code or - previous Modifications. - - 1.10. "Original Code" means Source Code of computer software code - which is described in the Source Code notice required by Exhibit A as - Original Code, and which, at the time of its release under this - License is not already Covered Code governed by this License. - - 1.10.1. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.11. "Source Code" means the preferred form of the Covered Code for - making modifications to it, including all modules it contains, plus - any associated interface definition files, scripts used to control - compilation and installation of an Executable, or source code - differential comparisons against either the Original Code or another - well known, available Covered Code of the Contributor's choice. The - Source Code can be in a compressed or archival form, provided the - appropriate decompression or de-archiving software is widely available - for no charge. - - 1.12. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, this - License or a future version of this License issued under Section 6.1. - For legal entities, "You" includes any entity which controls, is - controlled by, or is under common control with You. For purposes of - this definition, "control" means (a) the power, direct or indirect, - to cause the direction or management of such entity, whether by - contract or otherwise, or (b) ownership of more than fifty percent - (50%) of the outstanding shares or beneficial ownership of such - entity. - -2. Source Code License. - - 2.1. The Initial Developer Grant. - The Initial Developer hereby grants You a world-wide, royalty-free, - non-exclusive license, subject to third party intellectual property - claims: - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Code (or portions thereof) with or without Modifications, and/or - as part of a Larger Work; and - - (b) under Patents Claims infringed by the making, using or - selling of Original Code, to make, have made, use, practice, - sell, and offer for sale, and/or otherwise dispose of the - Original Code (or portions thereof). - - (c) the licenses granted in this Section 2.1(a) and (b) are - effective on the date Initial Developer first distributes - Original Code under the terms of this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: 1) for code that You delete from the Original Code; 2) - separate from the Original Code; or 3) for infringements caused - by: i) the modification of the Original Code or ii) the - combination of the Original Code with other software or devices. - - 2.2. Contributor Grant. - Subject to third party intellectual property claims, each Contributor - hereby grants You a world-wide, royalty-free, non-exclusive license - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor, to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof) either on an - unmodified basis, with other Modifications, as Covered Code - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or - selling of Modifications made by that Contributor either alone - and/or in combination with its Contributor Version (or portions - of such combination), to make, use, sell, offer for sale, have - made, and/or otherwise dispose of: 1) Modifications made by that - Contributor (or portions thereof); and 2) the combination of - Modifications made by that Contributor with its Contributor - Version (or portions of such combination). - - (c) the licenses granted in Sections 2.2(a) and 2.2(b) are - effective on the date Contributor first makes Commercial Use of - the Covered Code. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: 1) for any code that Contributor has deleted from the - Contributor Version; 2) separate from the Contributor Version; - 3) for infringements caused by: i) third party modifications of - Contributor Version or ii) the combination of Modifications made - by that Contributor with other software (except as part of the - Contributor Version) or other devices; or 4) under Patent Claims - infringed by Covered Code in the absence of Modifications made by - that Contributor. - -3. Distribution Obligations. - - 3.1. Application of License. - The Modifications which You create or to which You contribute are - governed by the terms of this License, including without limitation - Section 2.2. The Source Code version of Covered Code may be - distributed only under the terms of this License or a future version - of this License released under Section 6.1, and You must include a - copy of this License with every copy of the Source Code You - distribute. You may not offer or impose any terms on any Source Code - version that alters or restricts the applicable version of this - License or the recipients' rights hereunder. However, You may include - an additional document offering the additional rights described in - Section 3.5. - - 3.2. Availability of Source Code. - Any Modification which You create or to which You contribute must be - made available in Source Code form under the terms of this License - either on the same media as an Executable version or via an accepted - Electronic Distribution Mechanism to anyone to whom you made an - Executable version available; and if made available via Electronic - Distribution Mechanism, must remain available for at least twelve (12) - months after the date it initially became available, or at least six - (6) months after a subsequent version of that particular Modification - has been made available to such recipients. You are responsible for - ensuring that the Source Code version remains available even if the - Electronic Distribution Mechanism is maintained by a third party. - - 3.3. Description of Modifications. - You must cause all Covered Code to which You contribute to contain a - file documenting the changes You made to create that Covered Code and - the date of any change. You must include a prominent statement that - the Modification is derived, directly or indirectly, from Original - Code provided by the Initial Developer and including the name of the - Initial Developer in (a) the Source Code, and (b) in any notice in an - Executable version or related documentation in which You describe the - origin or ownership of the Covered Code. - - 3.4. Intellectual Property Matters - (a) Third Party Claims. - If Contributor has knowledge that a license under a third party's - intellectual property rights is required to exercise the rights - granted by such Contributor under Sections 2.1 or 2.2, - Contributor must include a text file with the Source Code - distribution titled "LEGAL" which describes the claim and the - party making the claim in sufficient detail that a recipient will - know whom to contact. If Contributor obtains such knowledge after - the Modification is made available as described in Section 3.2, - Contributor shall promptly modify the LEGAL file in all copies - Contributor makes available thereafter and shall take other steps - (such as notifying appropriate mailing lists or newsgroups) - reasonably calculated to inform those who received the Covered - Code that new knowledge has been obtained. - - (b) Contributor APIs. - If Contributor's Modifications include an application programming - interface and Contributor has knowledge of patent licenses which - are reasonably necessary to implement that API, Contributor must - also include this information in the LEGAL file. - - (c) Representations. - Contributor represents that, except as disclosed pursuant to - Section 3.4(a) above, Contributor believes that Contributor's - Modifications are Contributor's original creation(s) and/or - Contributor has sufficient rights to grant the rights conveyed by - this License. - - 3.5. Required Notices. - You must duplicate the notice in Exhibit A in each file of the Source - Code. If it is not possible to put such notice in a particular Source - Code file due to its structure, then You must include such notice in a - location (such as a relevant directory) where a user would be likely - to look for such a notice. If You created one or more Modification(s) - You may add your name as a Contributor to the notice described in - Exhibit A. You must also duplicate this License in any documentation - for the Source Code where You describe recipients' rights or ownership - rights relating to Covered Code. You may choose to offer, and to - charge a fee for, warranty, support, indemnity or liability - obligations to one or more recipients of Covered Code. However, You - may do so only on Your own behalf, and not on behalf of the Initial - Developer or any Contributor. You must make it absolutely clear than - any such warranty, support, indemnity or liability obligation is - offered by You alone, and You hereby agree to indemnify the Initial - Developer and every Contributor for any liability incurred by the - Initial Developer or such Contributor as a result of warranty, - support, indemnity or liability terms You offer. - - 3.6. Distribution of Executable Versions. - You may distribute Covered Code in Executable form only if the - requirements of Section 3.1-3.5 have been met for that Covered Code, - and if You include a notice stating that the Source Code version of - the Covered Code is available under the terms of this License, - including a description of how and where You have fulfilled the - obligations of Section 3.2. The notice must be conspicuously included - in any notice in an Executable version, related documentation or - collateral in which You describe recipients' rights relating to the - Covered Code. You may distribute the Executable version of Covered - Code or ownership rights under a license of Your choice, which may - contain terms different from this License, provided that You are in - compliance with the terms of this License and that the license for the - Executable version does not attempt to limit or alter the recipient's - rights in the Source Code version from the rights set forth in this - License. If You distribute the Executable version under a different - license You must make it absolutely clear that any terms which differ - from this License are offered by You alone, not by the Initial - Developer or any Contributor. You hereby agree to indemnify the - Initial Developer and every Contributor for any liability incurred by - the Initial Developer or such Contributor as a result of any such - terms You offer. - - 3.7. Larger Works. - You may create a Larger Work by combining Covered Code with other code - not governed by the terms of this License and distribute the Larger - Work as a single product. In such a case, You must make sure the - requirements of this License are fulfilled for the Covered Code. - -4. Inability to Comply Due to Statute or Regulation. - - If it is impossible for You to comply with any of the terms of this - License with respect to some or all of the Covered Code due to - statute, judicial order, or regulation then You must: (a) comply with - the terms of this License to the maximum extent possible; and (b) - describe the limitations and the code they affect. Such description - must be included in the LEGAL file described in Section 3.4 and must - be included with all distributions of the Source Code. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Application of this License. - - This License applies to code to which the Initial Developer has - attached the notice in Exhibit A and to related Covered Code. - -6. Versions of the License. - - 6.1. New Versions. - Netscape Communications Corporation ("Netscape") may publish revised - and/or new versions of the License from time to time. Each version - will be given a distinguishing version number. - - 6.2. Effect of New Versions. - Once Covered Code has been published under a particular version of the - License, You may always continue to use it under the terms of that - version. You may also choose to use such Covered Code under the terms - of any subsequent version of the License published by Netscape. No one - other than Netscape has the right to modify the terms applicable to - Covered Code created under this License. - - 6.3. Derivative Works. - If You create or use a modified version of this License (which you may - only do in order to apply it to code which is not already Covered Code - governed by this License), You must (a) rename Your license so that - the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", - "MPL", "NPL" or any confusingly similar phrase do not appear in your - license (except to note that your license differs from this License) - and (b) otherwise make it clear that Your version of the license - contains terms which differ from the Mozilla Public License and - Netscape Public License. (Filling in the name of the Initial - Developer, Original Code or Contributor in the notice described in - Exhibit A shall not of themselves be deemed to be modifications of - this License.) - -7. DISCLAIMER OF WARRANTY. - - COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, - WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF - DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. - THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE - IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, - YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE - COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER - OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF - ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -8. TERMINATION. - - 8.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to cure - such breach within 30 days of becoming aware of the breach. All - sublicenses to the Covered Code which are properly granted shall - survive any termination of this License. Provisions which, by their - nature, must remain in effect beyond the termination of this License - shall survive. - - 8.2. If You initiate litigation by asserting a patent infringement - claim (excluding declatory judgment actions) against Initial Developer - or a Contributor (the Initial Developer or Contributor against whom - You file such action is referred to as "Participant") alleging that: - - (a) such Participant's Contributor Version directly or indirectly - infringes any patent, then any and all rights granted by such - Participant to You under Sections 2.1 and/or 2.2 of this License - shall, upon 60 days notice from Participant terminate prospectively, - unless if within 60 days after receipt of notice You either: (i) - agree in writing to pay Participant a mutually agreeable reasonable - royalty for Your past and future use of Modifications made by such - Participant, or (ii) withdraw Your litigation claim with respect to - the Contributor Version against such Participant. If within 60 days - of notice, a reasonable royalty and payment arrangement are not - mutually agreed upon in writing by the parties or the litigation claim - is not withdrawn, the rights granted by Participant to You under - Sections 2.1 and/or 2.2 automatically terminate at the expiration of - the 60 day notice period specified above. - - (b) any software, hardware, or device, other than such Participant's - Contributor Version, directly or indirectly infringes any patent, then - any rights granted to You by such Participant under Sections 2.1(b) - and 2.2(b) are revoked effective as of the date You first made, used, - sold, distributed, or had made, Modifications made by that - Participant. - - 8.3. If You assert a patent infringement claim against Participant - alleging that such Participant's Contributor Version directly or - indirectly infringes any patent where such claim is resolved (such as - by license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 8.4. In the event of termination under Sections 8.1 or 8.2 above, - all end user license agreements (excluding distributors and resellers) - which have been validly granted by You or any distributor hereunder - prior to termination shall survive termination. - -9. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL - DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, - OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR - ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY - CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, - WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER - COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN - INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF - LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY - RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW - PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE - EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO - THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -10. U.S. GOVERNMENT END USERS. - - The Covered Code is a "commercial item," as that term is defined in - 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" and "commercial computer software documentation," as such - terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 - C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), - all U.S. Government End Users acquire Covered Code with only those - rights set forth herein. - -11. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - California law provisions (except to the extent applicable law, if - any, provides otherwise), excluding its conflict-of-law provisions. - With respect to disputes in which at least one party is a citizen of, - or an entity chartered or registered to do business in the United - States of America, any litigation relating to this License shall be - subject to the jurisdiction of the Federal Courts of the Northern - District of California, with venue lying in Santa Clara County, - California, with the losing party responsible for costs, including - without limitation, court costs and reasonable attorneys' fees and - expenses. The application of the United Nations Convention on - Contracts for the International Sale of Goods is expressly excluded. - Any law or regulation which provides that the language of a contract - shall be construed against the drafter shall not apply to this - License. - -12. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. - -13. MULTIPLE-LICENSED CODE. - - Initial Developer may designate portions of the Covered Code as - "Multiple-Licensed". "Multiple-Licensed" means that the Initial - Developer permits you to utilize portions of the Covered Code under - Your choice of the NPL or the alternative licenses, if any, specified - by the Initial Developer in the file described in Exhibit A. - -EXHIBIT A -Mozilla Public License. - - ``The contents of this file are subject to the Mozilla Public License - Version 1.1 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - License for the specific language governing rights and limitations - under the License. - - The Original Code is ______________________________________. - - The Initial Developer of the Original Code is ________________________. - Portions created by ______________________ are Copyright (C) ______ - _______________________. All Rights Reserved. - - Contributor(s): ______________________________________. - - Alternatively, the contents of this file may be used under the terms - of the _____ license (the "[___] License"), in which case the - provisions of [______] License are applicable instead of those - above. If you wish to allow use of your version of this file only - under the terms of the [____] License and not to allow others to use - your version of this file under the MPL, indicate your decision by - deleting the provisions above and replace them with the notice and - other provisions required by the [___] License. If you do not delete - the provisions above, a recipient may use your version of this file - under either the MPL or the [___] License." - - [NOTE: The text of this Exhibit A may differ slightly from the text of - the notices in the Source Code files of the Original Code. You should - use the text of this Exhibit A rather than the text found in the - Original Code Source Code for Your Modifications.] diff --git a/public/ckeditor/README.md b/public/ckeditor/README.md deleted file mode 100644 index c5a55cd8..00000000 --- a/public/ckeditor/README.md +++ /dev/null @@ -1,39 +0,0 @@ -CKEditor 4 -========== - -Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. -http://ckeditor.com - See LICENSE.md for license information. - -CKEditor is a text editor to be used inside web pages. It's not a replacement -for desktop text editors like Word or OpenOffice, but a component to be used as -part of web applications and websites. - -## Documentation - -The full editor documentation is available online at the following address: -http://docs.ckeditor.com - -## Installation - -Installing CKEditor is an easy task. Just follow these simple steps: - - 1. **Download** the latest version from the CKEditor website: - http://ckeditor.com. You should have already completed this step, but be - sure you have the very latest version. - 2. **Extract** (decompress) the downloaded file into the root of your website. - -**Note:** CKEditor is by default installed in the `ckeditor` folder. You can -place the files in whichever you want though. - -## Checking Your Installation - -The editor comes with a few sample pages that can be used to verify that -installation proceeded properly. Take a look at the `samples` directory. - -To test your installation, just call the following page at your website: - - http://<your site>/<CKEditor installation path>/samples/index.html - -For example: - - http://www.example.com/ckeditor/samples/index.html diff --git a/public/ckeditor/adapters/jquery.js b/public/ckeditor/adapters/jquery.js deleted file mode 100644 index 3ec908b0..00000000 --- a/public/ckeditor/adapters/jquery.js +++ /dev/null @@ -1,10 +0,0 @@ -/* - Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. - For licensing, see LICENSE.md or http://ckeditor.com/license -*/ -(function(a){CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;"undefined"!=typeof a&&(a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a},ckeditor:function(g,d){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g))var k=d,d=g,g=k;var i=[],d=d||{};this.each(function(){var b= -a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,j=new a.Deferred;i.push(j.promise());if(c&&!f)g&&g.apply(c,[this]),j.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),j.resolve()):setTimeout(arguments.callee,100)},0)},null,null,9999);else{if(d.autoUpdateElement||"undefined"==typeof d.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)d.autoUpdateElementJquery=!0;d.autoUpdateElement=!1;b.data("_ckeditorInstanceLock", -!0);c=a(this).is("textarea")?CKEDITOR.replace(h,d):CKEDITOR.inline(h,d);b.data("ckeditorInstance",c);c.on("instanceReady",function(d){var e=d.editor;setTimeout(function(){if(e.element){d.removeListener();e.on("dataReady",function(){b.trigger("dataReady.ckeditor",[e])});e.on("setData",function(a){b.trigger("setData.ckeditor",[e,a.data])});e.on("getData",function(a){b.trigger("getData.ckeditor",[e,a.data])},999);e.on("destroy",function(){b.trigger("destroy.ckeditor",[e])});e.on("save",function(){a(h.form).submit(); -return!1},null,null,20);if(e.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){e.updateElement()})};a(h.form).submit(c);a(h.form).bind("form-pre-serialize",c);b.bind("destroy.ckeditor",function(){a(h.form).unbind("submit",c);a(h.form).unbind("form-pre-serialize",c)})}e.on("destroy",function(){b.removeData("ckeditorInstance")});b.removeData("_ckeditorInstanceLock");b.trigger("instanceReady.ckeditor",[e]);g&&g.apply(e,[h]);j.resolve()}else setTimeout(arguments.callee, -100)},0)},null,null,9999)}});var f=new a.Deferred;this.promise=f.promise();a.when.apply(this,i).then(function(){f.resolve()});this.editor=this.eq(0).data("ckeditorInstance");return this}}),CKEDITOR.config.jqueryOverrideVal&&(a.fn.val=CKEDITOR.tools.override(a.fn.val,function(g){return function(d){if(arguments.length){var k=this,i=[],f=this.each(function(){var b=a(this),c=b.data("ckeditorInstance");if(b.is("textarea")&&c){var f=new a.Deferred;c.setData(d,function(){f.resolve()});i.push(f.promise()); -return!0}return g.call(b,d)});if(i.length){var b=new a.Deferred;a.when.apply(this,i).done(function(){b.resolveWith(k)});return b.promise()}return f}var f=a(this).eq(0),c=f.data("ckeditorInstance");return f.is("textarea")&&c?c.getData():g.call(f)}})))})(window.jQuery); \ No newline at end of file diff --git a/public/ckeditor/build-config.js b/public/ckeditor/build-config.js deleted file mode 100644 index 15c3b761..00000000 --- a/public/ckeditor/build-config.js +++ /dev/null @@ -1,92 +0,0 @@ -/** - * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md or http://ckeditor.com/license - */ - -/** - * This file was added automatically by CKEditor builder. - * You may re-use it at any time to build CKEditor again. - * - * If you would like to build CKEditor online again - * (for example to upgrade), visit one the following links: - * - * (1) http://ckeditor.com/builder - * Visit online builder to build CKEditor from scratch. - * - * (2) http://ckeditor.com/builder/c9734b33cb18cd9116b8a4ed8c66711c - * Visit online builder to build CKEditor, starting with the same setup as before. - * - * (3) http://ckeditor.com/builder/download/c9734b33cb18cd9116b8a4ed8c66711c - * Straight download link to the latest version of CKEditor (Optimized) with the same setup as before. - * - * NOTE: - * This file is not used by CKEditor, you may remove it. - * Changing this file will not change your CKEditor configuration. - */ - -var CKBUILDER_CONFIG = { - skin: 'bootstrapck', - preset: 'standard', - ignore: [ - '.bender', - '.DS_Store', - '.gitignore', - '.gitattributes', - '.idea', - '.mailmap', - 'bender.js', - 'bender-err.log', - 'bender-out.log', - 'dev', - 'node_modules', - 'package.json', - 'README.md', - 'tests' - ], - plugins : { - 'a11yhelp' : 1, - 'about' : 1, - 'basicstyles' : 1, - 'blockquote' : 1, - 'clipboard' : 1, - 'contextmenu' : 1, - 'elementspath' : 1, - 'enterkey' : 1, - 'entities' : 1, - 'fastimage' : 1, - 'filebrowser' : 1, - 'floatingspace' : 1, - 'format' : 1, - 'horizontalrule' : 1, - 'htmlwriter' : 1, - 'image' : 1, - 'imagebrowser' : 1, - 'imgupload' : 1, - 'indentlist' : 1, - 'link' : 1, - 'list' : 1, - 'magicline' : 1, - 'maximize' : 1, - 'pastefromword' : 1, - 'pastetext' : 1, - 'removeformat' : 1, - 'resize' : 1, - 'scayt' : 1, - 'showborders' : 1, - 'simple-image-browser' : 1, - 'sourcearea' : 1, - 'specialchar' : 1, - 'stylescombo' : 1, - 'tab' : 1, - 'table' : 1, - 'tabletools' : 1, - 'toolbar' : 1, - 'undo' : 1, - 'wsc' : 1, - 'wysiwygarea' : 1 - }, - languages : { - 'en' : 1, - 'ru' : 1 - } -}; \ No newline at end of file diff --git a/public/ckeditor/ckeditor.js b/public/ckeditor/ckeditor.js deleted file mode 100644 index 2b0f9750..00000000 --- a/public/ckeditor/ckeditor.js +++ /dev/null @@ -1,943 +0,0 @@ -/* -Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. -For licensing, see LICENSE.md or http://ckeditor.com/license -*/ -(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,e={timestamp:"E7KD",version:"4.4.4",revision:"1ba5105",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var f=window.CKEDITOR_BASEPATH||"";if(!f)for(var d=document.getElementsByTagName("script"),c=0;c<d.length;c++){var b=d[c].src.match(a);if(b){f=b[1];break}}-1==f.indexOf(":/")&&"//"!=f.slice(0,2)&&(f=0===f.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+ -f:location.href.match(/^[^\?]*\/(?:)/)[0]+f);if(!f)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return f}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);this.timestamp&&("/"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a))&&(a+=(0<=a.indexOf("?")?"&":"?")+"t="+this.timestamp);return a},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded", -a,!1),d()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),d())}catch(c){}}function d(){for(var a;a=c.shift();)a()}var c=[];return function(d){c.push(d);"complete"===document.readyState&&setTimeout(a,1);if(1==c.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);d=!1;try{d= -!window.frameElement}catch(b){}if(document.documentElement.doScroll&&d){var e=function(){try{document.documentElement.doScroll("left")}catch(n){setTimeout(e,1);return}a()};e()}}}}()},b=window.CKEDITOR_GETURL;if(b){var c=e.getUrl;e.getUrl=function(a){return b.call(e,a)||c.call(e,a)}}return e}()); -CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var e=CKEDITOR.event.prototype,b;for(b in e)a[b]==void 0&&(a[b]=e[b])},CKEDITOR.event.prototype=function(){function a(a){var f=e(this);return f[a]||(f[a]=new b(a))}var e=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},b=function(a){this.name=a;this.listeners=[]};b.prototype={getListenerIndex:function(a){for(var f=0,d=this.listeners;f<d.length;f++)if(d[f].fn==a)return f;return-1}}; -return{define:function(c,f){var d=a.call(this,c);CKEDITOR.tools.extend(d,f,true)},on:function(c,f,d,b,e){function l(a,n,t,e){a={name:c,sender:this,editor:a,data:n,listenerData:b,stop:t,cancel:e,removeListener:h};return f.call(d,a)===false?false:a.data}function h(){t.removeListener(c,f)}var n=a.call(this,c);if(n.getListenerIndex(f)<0){n=n.listeners;d||(d=this);isNaN(e)&&(e=10);var t=this;l.fn=f;l.priority=e;for(var y=n.length-1;y>=0;y--)if(n[y].priority<=e){n.splice(y+1,0,l);return{removeListener:h}}n.unshift(l)}return{removeListener:h}}, -once:function(){var a=arguments[1];arguments[1]=function(f){f.removeListener();return a.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,f=function(){a=1},d=0,b=function(){d=1};return function(j,l,h){var n=e(this)[j],j=a,t=d;a=d=0;if(n){var y=n.listeners;if(y.length)for(var y=y.slice(0),z,o=0;o<y.length;o++){if(n.errorProof)try{z=y[o].call(this, -h,l,f,b)}catch(r){}else z=y[o].call(this,h,l,f,b);z===false?d=1:typeof z!="undefined"&&(l=z);if(a||d)break}}l=d?false:typeof l=="undefined"?true:l;a=j;d=t;return l}}(),fireOnce:function(a,f,d){f=this.fire(a,f,d);delete e(this)[a];return f},removeListener:function(a,f){var d=e(this)[a];if(d){var b=d.getListenerIndex(f);b>=0&&d.listeners.splice(b,1)}},removeAllListeners:function(){var a=e(this),f;for(f in a)delete a[f]},hasListeners:function(a){return(a=e(this)[a])&&a.listeners.length>0}}}()); -CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,e,this)},CKEDITOR.editor.prototype.fireOnce=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,e,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)); -CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),e={ie:a.indexOf("trident/")>-1,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10),mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var a=document.domain,d=window.location.hostname;return a!=d&&a!="["+d+"]"},secure:location.protocol== -"https:"};e.gecko=navigator.product=="Gecko"&&!e.webkit&&!e.ie;if(e.webkit)a.indexOf("chrome")>-1?e.chrome=true:e.safari=true;var b=0;if(e.ie){b=e.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;e.ie9Compat=b==9;e.ie8Compat=b==8;e.ie7Compat=b==7;e.ie6Compat=b<7||e.quirks}if(e.gecko){var c=a.match(/rv:([\d\.]+)/);if(c){c=c[1].split(".");b=c[0]*1E4+(c[1]||0)*100+(c[2]||0)*1}}e.air&&(b=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));e.webkit&&(b=parseFloat(a.match(/ applewebkit\/(\d+)/)[1])); -e.version=b;e.isCompatible=e.iOS&&b>=534||!e.mobile&&(e.ie&&b>6||e.gecko&&b>=2E4||e.air&&b>=1||e.webkit&&b>=522||false);e.hidpi=window.devicePixelRatio>=2;e.needsBrFiller=e.gecko||e.webkit||e.ie&&b>10;e.needsNbspFiller=e.ie&&b<11;e.cssClass="cke_browser_"+(e.ie?"ie":e.gecko?"gecko":e.webkit?"webkit":"unknown");if(e.quirks)e.cssClass=e.cssClass+" cke_browser_quirks";if(e.ie)e.cssClass=e.cssClass+(" cke_browser_ie"+(e.quirks?"6 cke_browser_iequirks":e.version));if(e.air)e.cssClass=e.cssClass+" cke_browser_air"; -if(e.iOS)e.cssClass=e.cssClass+" cke_browser_ios";if(e.hidpi)e.cssClass=e.cssClass+" cke_hidpi";return e}()); -"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a= -CKEDITOR.loadFullCore,e=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status="basic_ready";a&&a._load?a():e&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},e*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={}; -(function(){var a=[],e=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,c=/>/g,f=/</g,d=/"/g,g=/&/g,j=/>/g,l=/</g,h=/"/g;CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(a,f){if(!a&&!f)return true;if(!a||!f||a.length!=f.length)return false;for(var d=0;d<a.length;d++)if(a[d]!=f[d])return false;return true},clone:function(a){var f;if(a&&a instanceof Array){f=[];for(var d=0;d<a.length;d++)f[d]=CKEDITOR.tools.clone(a[d]); -return f}if(a===null||typeof a!="object"||a instanceof String||a instanceof Number||a instanceof Boolean||a instanceof Date||a instanceof RegExp||a.nodeType||a.window===a)return a;f=new a.constructor;for(d in a)f[d]=CKEDITOR.tools.clone(a[d]);return f},capitalize:function(a,f){return a.charAt(0).toUpperCase()+(f?a.slice(1):a.slice(1).toLowerCase())},extend:function(a){var f=arguments.length,d,b;if(typeof(d=arguments[f-1])=="boolean")f--;else if(typeof(d=arguments[f-2])=="boolean"){b=arguments[f-1]; -f=f-2}for(var c=1;c<f;c++){var e=arguments[c],g;for(g in e)if(d===true||a[g]==void 0)if(!b||g in b)a[g]=e[g]}return a},prototypedCopy:function(a){var f=function(){};f.prototype=a;return new f},copy:function(a){var f={},d;for(d in a)f[d]=a[d];return f},isArray:function(a){return Object.prototype.toString.call(a)=="[object Array]"},isEmpty:function(a){for(var f in a)if(a.hasOwnProperty(f))return false;return true},cssVendorPrefix:function(a,f,d){if(d)return e+a+":"+f+";"+a+":"+f;d={};d[a]=f;d[e+a]= -f;return d},cssStyleToDomStyle:function(){var a=document.createElement("div").style,f=typeof a.cssFloat!="undefined"?"cssFloat":typeof a.styleFloat!="undefined"?"styleFloat":"float";return function(a){return a=="float"?f:a.replace(/-./g,function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(a){for(var a=[].concat(a),f,d=[],b=0;b<a.length;b++)if(f=a[b])/@import|[{}]/.test(f)?d.push("<style>"+f+"</style>"):d.push('<link type="text/css" rel=stylesheet href="'+f+'">');return d.join("")}, -htmlEncode:function(a){return(""+a).replace(b,"&").replace(c,">").replace(f,"<")},htmlDecode:function(a){return a.replace(g,"&").replace(j,">").replace(l,"<")},htmlEncodeAttr:function(a){return a.replace(d,""").replace(f,"<").replace(c,">")},htmlDecodeAttr:function(a){return a.replace(h,'"').replace(l,"<").replace(j,">")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,f){var d=f(a);d.prototype= -a.prototype;return d},setTimeout:function(a,f,d,b,c){c||(c=window);d||(d=c);return c.setTimeout(function(){b?a.apply(d,[].concat(b)):a.apply(d)},f||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(f){return f.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(f){return f.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(f){return f.replace(a,"")}}(),indexOf:function(a,f){if(typeof f=="function")for(var d=0,b=a.length;d<b;d++){if(f(a[d]))return d}else{if(a.indexOf)return a.indexOf(f); -d=0;for(b=a.length;d<b;d++)if(a[d]===f)return d}return-1},search:function(a,f){var d=CKEDITOR.tools.indexOf(a,f);return d>=0?a[d]:null},bind:function(a,f){return function(){return a.apply(f,arguments)}},createClass:function(a){var f=a.$,d=a.base,b=a.privates||a._,c=a.proto,a=a.statics;!f&&(f=function(){d&&this.base.apply(this,arguments)});if(b)var e=f,f=function(){var a=this._||(this._={}),f;for(f in b){var d=b[f];a[f]=typeof d=="function"?CKEDITOR.tools.bind(d,this):d}e.apply(this,arguments)};if(d){f.prototype= -this.prototypedCopy(d.prototype);f.prototype.constructor=f;f.base=d;f.baseProto=d.prototype;f.prototype.base=function(){this.base=d.prototype.base;d.apply(this,arguments);this.base=arguments.callee}}c&&this.extend(f.prototype,c,true);a&&this.extend(f,a,true);return f},addFunction:function(f,d){return a.push(function(){return f.apply(d||this,arguments)})-1},removeFunction:function(f){a[f]=null},callFunction:function(f){var d=a[f];return d&&d.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a= -/^-?\d+\.?\d*px$/,f;return function(d){f=CKEDITOR.tools.trim(d+"")+"px";return a.test(f)?f:d||""}}(),convertToPx:function(){var a;return function(f){if(!a){a=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(f)){a.setStyle("width",f);return a.$.clientWidth}return f}}(),repeat:function(a,f){return Array(f+1).join(a)},tryThese:function(){for(var a, -f=0,d=arguments.length;f<d;f++){var b=arguments[f];try{a=b();break}catch(c){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var f=arguments,d=this;window.setTimeout(function(){a.apply(d,f)},0)}},normalizeCssText:function(a,f){var d=[],b,c=CKEDITOR.tools.parseCssText(a,true,f);for(b in c)d.push(b+":"+c[b]);d.sort();return d.length?d.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi, -function(a,f,d,b){a=[f,d,b];for(f=0;f<3;f++)a[f]=("0"+parseInt(a[f],10).toString(16)).slice(-2);return"#"+a.join("")})},parseCssText:function(a,f,d){var b={};if(d){d=new CKEDITOR.dom.element("span");d.setAttribute("style",a);a=CKEDITOR.tools.convertRgbToHex(d.getAttribute("style")||"")}if(!a||a==";")return b;a.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,d,c){if(f){d=d.toLowerCase();d=="font-family"&&(c=c.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,",")); -c=CKEDITOR.tools.trim(c)}b[d]=c});return b},writeCssText:function(a,f){var d,b=[];for(d in a)b.push(d+":"+a[d]);f&&b.sort();return b.join("; ")},objectCompare:function(a,f,d){var b;if(!a&&!f)return true;if(!a||!f)return false;for(b in a)if(a[b]!=f[b])return false;if(!d)for(b in f)if(a[b]!=f[b])return false;return true},objectKeys:function(a){var f=[],d;for(d in a)f.push(d);return f},convertArrayToObject:function(a,f){var d={};arguments.length==1&&(f=true);for(var b=0,c=a.length;b<c;++b)d[a[b]]=f; -return d},fixDomain:function(){for(var a;;)try{a=window.parent.document.domain;break}catch(f){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a,f){function d(){c=(new Date).getTime();b=false;f()}var b,c=0;return{input:function(){if(!b){var f=(new Date).getTime()-c;f<a?b=setTimeout(d,a-f):d()}},reset:function(){b&&clearTimeout(b);b=c=0}}},enableHtml5Elements:function(a,f){for(var d=["abbr","article","aside","audio","bdi","canvas","data", -"datalist","details","figcaption","figure","footer","header","hgroup","mark","meter","nav","output","progress","section","summary","time","video"],b=d.length,c;b--;){c=a.createElement(d[b]);f&&a.appendChild(c)}},checkIfAnyArrayItemMatches:function(a,f){for(var d=0,b=a.length;d<b;++d)if(a[d].match(f))return true;return false},checkIfAnyObjectPropertyMatches:function(a,f){for(var d in a)if(d.match(f))return true;return false},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw=="}})(); -CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,e=function(a,f){for(var d=CKEDITOR.tools.clone(a),b=1;b<arguments.length;b++){var f=arguments[b],c;for(c in f)delete d[c]}return d},b={},c={},f={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},d={command:1,link:1,meta:1,noscript:1,script:1,style:1},g={},j={"#":1},l={center:1,dir:1,noframes:1}; -a(b,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},j,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(c,f,b,l);e={a:e(b,{a:1,button:1}),abbr:b,address:c, -area:g,article:a({style:1},c),aside:a({style:1},c),audio:a({source:1,track:1},c),b:b,base:g,bdi:b,bdo:b,blockquote:c,body:c,br:g,button:e(b,{a:1,button:1}),canvas:b,caption:c,cite:b,code:b,col:g,colgroup:{col:1},command:g,datalist:a({option:1},b),dd:c,del:b,details:a({summary:1},c),dfn:b,div:a({style:1},c),dl:{dt:1,dd:1},dt:c,em:b,embed:g,fieldset:a({legend:1},c),figcaption:c,figure:a({figcaption:1},c),footer:c,form:c,h1:b,h2:b,h3:b,h4:b,h5:b,h6:b,head:a({title:1,base:1},d),header:c,hgroup:{h1:1, -h2:1,h3:1,h4:1,h5:1,h6:1},hr:g,html:a({head:1,body:1},c,d),i:b,iframe:j,img:g,input:g,ins:b,kbd:b,keygen:g,label:b,legend:b,li:c,link:g,map:c,mark:b,menu:a({li:1},c),meta:g,meter:e(b,{meter:1}),nav:c,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:j,output:b,p:b,param:g,pre:b,progress:e(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,script:j,section:a({style:1},c),select:{optgroup:1,option:1},small:b,source:g,span:b,strong:b,style:j, -sub:b,summary:b,sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:c,textarea:j,tfoot:{tr:1},th:c,thead:{tr:1},time:e(b,{time:1}),title:j,tr:{th:1,td:1},track:g,u:b,ul:{li:1},"var":b,video:a({source:1,track:1},c),wbr:g,acronym:b,applet:a({param:1},c),basefont:g,big:b,center:c,dialog:g,dir:{li:1},font:b,isindex:g,noframes:c,strike:b,tt:b};a(e,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},f,l),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1, -div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1, -wbr:1},$inline:b,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},e.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1, -small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});return e}(); -CKEDITOR.dom.event=function(a){this.$=a}; -CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var a=this.getKey();if(this.$.ctrlKey||this.$.metaKey)a=a+CKEDITOR.CTRL;this.$.shiftKey&&(a=a+CKEDITOR.SHIFT);this.$.altKey&&(a=a+CKEDITOR.ALT);return a},preventDefault:function(a){var e=this.$;e.preventDefault?e.preventDefault():e.returnValue=false;a&&this.stopPropagation()},stopPropagation:function(){var a=this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=true},getTarget:function(){var a= -this.$.target||this.$.srcElement;return a?new CKEDITOR.dom.node(a):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var a=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(a.documentElement.scrollLeft||a.body.scrollLeft),y:this.$.pageY||this.$.clientY+(a.documentElement.scrollTop||a.body.scrollTop)}}};CKEDITOR.CTRL=1114112;CKEDITOR.SHIFT=2228224;CKEDITOR.ALT=4456448;CKEDITOR.EVENT_PHASE_CAPTURING=1;CKEDITOR.EVENT_PHASE_AT_TARGET=2; -CKEDITOR.EVENT_PHASE_BUBBLING=3;CKEDITOR.dom.domObject=function(a){if(a)this.$=a}; -CKEDITOR.dom.domObject.prototype=function(){var a=function(a,b){return function(c){typeof CKEDITOR!="undefined"&&a.fire(b,new CKEDITOR.dom.event(c))}};return{getPrivate:function(){var a;if(!(a=this.getCustomData("_")))this.setCustomData("_",a={});return a},on:function(e){var b=this.getCustomData("_cke_nativeListeners");if(!b){b={};this.setCustomData("_cke_nativeListeners",b)}if(!b[e]){b=b[e]=a(this,e);this.$.addEventListener?this.$.addEventListener(e,b,!!CKEDITOR.event.useCapture):this.$.attachEvent&& -this.$.attachEvent("on"+e,b)}return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(a)){var b=this.getCustomData("_cke_nativeListeners"),c=b&&b[a];if(c){this.$.removeEventListener?this.$.removeEventListener(a,c,false):this.$.detachEvent&&this.$.detachEvent("on"+a,c);delete b[a]}}},removeAllListeners:function(){var a=this.getCustomData("_cke_nativeListeners"),b;for(b in a){var c=a[b];this.$.detachEvent? -this.$.detachEvent("on"+b,c):this.$.removeEventListener&&this.$.removeEventListener(b,c,false);delete a[b]}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(); -(function(a){var e={};CKEDITOR.on("reset",function(){e={}});a.equals=function(a){try{return a&&a.$===this.$}catch(c){return false}};a.setCustomData=function(a,c){var f=this.getUniqueId();(e[f]||(e[f]={}))[a]=c;return this};a.getCustomData=function(a){var c=this.$["data-cke-expando"];return(c=c&&e[c])&&a in c?c[a]:null};a.removeCustomData=function(a){var c=this.$["data-cke-expando"],c=c&&e[c],f,d;if(c){f=c[a];d=a in c;delete c[a]}return d?f:null};a.clearCustomData=function(){this.removeAllListeners(); -var a=this.$["data-cke-expando"];a&&delete e[a]};a.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(a)})(CKEDITOR.dom.domObject.prototype); -CKEDITOR.dom.node=function(a){return a?new CKEDITOR.dom[a.nodeType==CKEDITOR.NODE_DOCUMENT?"document":a.nodeType==CKEDITOR.NODE_ELEMENT?"element":a.nodeType==CKEDITOR.NODE_TEXT?"text":a.nodeType==CKEDITOR.NODE_COMMENT?"comment":a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](a):this};CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject;CKEDITOR.NODE_ELEMENT=1;CKEDITOR.NODE_DOCUMENT=9;CKEDITOR.NODE_TEXT=3;CKEDITOR.NODE_COMMENT=8;CKEDITOR.NODE_DOCUMENT_FRAGMENT=11; -CKEDITOR.POSITION_IDENTICAL=0;CKEDITOR.POSITION_DISCONNECTED=1;CKEDITOR.POSITION_FOLLOWING=2;CKEDITOR.POSITION_PRECEDING=4;CKEDITOR.POSITION_IS_CONTAINED=8;CKEDITOR.POSITION_CONTAINS=16; -CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,e){a.append(this,e);return a},clone:function(a,e){var b=this.$.cloneNode(a),c=function(f){f["data-cke-expando"]&&(f["data-cke-expando"]=false);if(f.nodeType==CKEDITOR.NODE_ELEMENT){e||f.removeAttribute("id",false);if(a)for(var f=f.childNodes,d=0;d<f.length;d++)c(f[d])}};c(b);return new CKEDITOR.dom.node(b)},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$, -a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var e=[],b=this.getDocument().$.documentElement,c=this.$;c&&c!=b;){var f=c.parentNode;f&&e.unshift(this.getIndex.call({$:c},a));c=f}return e},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){var e=this.$,b=-1, -c;if(!this.$.parentNode)return b;do if(!a||!(e!=this.$&&e.nodeType==CKEDITOR.NODE_TEXT&&(c||!e.nodeValue))){b++;c=e.nodeType==CKEDITOR.NODE_TEXT}while(e=e.previousSibling);return b},getNextSourceNode:function(a,e,b){if(b&&!b.call)var c=b,b=function(a){return!a.equals(c)};var a=!a&&this.getFirst&&this.getFirst(),f;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&b(this,true)===false)return null;a=this.getNext()}for(;!a&&(f=(f||this).getParent());){if(b&&b(f,true)===false)return null;a=f.getNext()}return!a|| -b&&b(a)===false?null:e&&e!=a.type?a.getNextSourceNode(false,e,b):a},getPreviousSourceNode:function(a,e,b){if(b&&!b.call)var c=b,b=function(a){return!a.equals(c)};var a=!a&&this.getLast&&this.getLast(),f;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&b(this,true)===false)return null;a=this.getPrevious()}for(;!a&&(f=(f||this).getParent());){if(b&&b(f,true)===false)return null;a=f.getPrevious()}return!a||b&&b(a)===false?null:e&&a.type!=e?a.getPreviousSourceNode(false,e,b):a},getPrevious:function(a){var e= -this.$,b;do b=(e=e.previousSibling)&&e.nodeType!=10&&new CKEDITOR.dom.node(e);while(b&&a&&!a(b));return b},getNext:function(a){var e=this.$,b;do b=(e=e.nextSibling)&&new CKEDITOR.dom.node(e);while(b&&a&&!a(b));return b},getParent:function(a){var e=this.$.parentNode;return e&&(e.nodeType==CKEDITOR.NODE_ELEMENT||a&&e.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(e):null},getParents:function(a){var e=this,b=[];do b[a?"push":"unshift"](e);while(e=e.getParent());return b},getCommonAncestor:function(a){if(a.equals(this))return this; -if(a.contains&&a.contains(this))return a;var e=this.contains?this:this.getParent();do if(e.contains(a))return e;while(e=e.getParent());return null},getPosition:function(a){var e=this.$,b=a.$;if(e.compareDocumentPosition)return e.compareDocumentPosition(b);if(e==b)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(e.contains){if(e.contains(b))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(b.contains(e))return CKEDITOR.POSITION_IS_CONTAINED+ -CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in e)return e.sourceIndex<0||b.sourceIndex<0?CKEDITOR.POSITION_DISCONNECTED:e.sourceIndex<b.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}for(var e=this.getAddress(),a=a.getAddress(),b=Math.min(e.length,a.length),c=0;c<=b-1;c++)if(e[c]!=a[c]){if(c<b)return e[c]<a[c]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;break}return e.length<a.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+ -CKEDITOR.POSITION_FOLLOWING},getAscendant:function(a,e){var b=this.$,c;if(!e)b=b.parentNode;for(;b;){if(b.nodeName&&(c=b.nodeName.toLowerCase(),typeof a=="string"?c==a:c in a))return new CKEDITOR.dom.node(b);try{b=b.parentNode}catch(f){b=null}}return null},hasAscendant:function(a,e){var b=this.$;if(!e)b=b.parentNode;for(;b;){if(b.nodeName&&b.nodeName.toLowerCase()==a)return true;b=b.parentNode}return false},move:function(a,e){a.append(this.remove(),e)},remove:function(a){var e=this.$,b=e.parentNode; -if(b){if(a)for(;a=e.firstChild;)b.insertBefore(e.removeChild(a),e);b.removeChild(e)}return this},replace:function(a){this.insertBefore(a);a.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var a;this.getFirst&&(a=this.getFirst());){if(a.type==CKEDITOR.NODE_TEXT){var e=CKEDITOR.tools.ltrim(a.getText()),b=a.getLength();if(e){if(e.length<b){a.split(b-e.length);this.$.removeChild(this.$.firstChild)}}else{a.remove();continue}}break}},rtrim:function(){for(var a;this.getLast&&(a= -this.getLast());){if(a.type==CKEDITOR.NODE_TEXT){var e=CKEDITOR.tools.rtrim(a.getText()),b=a.getLength();if(e){if(e.length<b){a.split(e.length);this.$.lastChild.parentNode.removeChild(this.$.lastChild)}}else{a.remove();continue}}break}if(CKEDITOR.env.needsBrFiller)(a=this.$.lastChild)&&(a.type==1&&a.nodeName.toLowerCase()=="br")&&a.parentNode.removeChild(a)},isReadOnly:function(){var a=this;this.type!=CKEDITOR.NODE_ELEMENT&&(a=this.getParent());if(a&&typeof a.$.isContentEditable!="undefined")return!(a.$.isContentEditable|| -a.data("cke-editable"));for(;a;){if(a.data("cke-editable"))break;if(a.getAttribute("contentEditable")=="false")return true;if(a.getAttribute("contentEditable")=="true")break;a=a.getParent()}return!a}});CKEDITOR.dom.window=function(a){CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject; -CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var a=this.$.document,e=a.compatMode=="CSS1Compat";return{width:(e?a.documentElement.clientWidth:a.body.clientWidth)||0,height:(e?a.documentElement.clientHeight:a.body.clientHeight)||0}},getScrollPosition:function(){var a=this.$;if("pageXOffset"in a)return{x:a.pageXOffset||0,y:a.pageYOffset||0};a=a.document;return{x:a.documentElement.scrollLeft||a.body.scrollLeft||0,y:a.documentElement.scrollTop|| -a.body.scrollTop||0}},getFrame:function(){var a=this.$.frameElement;return a?new CKEDITOR.dom.element.get(a):null}});CKEDITOR.dom.document=function(a){CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject; -CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(a){if(this.$.createStyleSheet)this.$.createStyleSheet(a);else{var e=new CKEDITOR.dom.element("link");e.setAttributes({rel:"stylesheet",type:"text/css",href:a});this.getHead().append(e)}},appendStyleText:function(a){if(this.$.createStyleSheet){var e=this.$.createStyleSheet("");e.cssText=a}else{var b=new CKEDITOR.dom.element("style",this);b.append(new CKEDITOR.dom.text(a,this));this.getHead().append(b)}return e|| -b.$.sheet},createElement:function(a,e){var b=new CKEDITOR.dom.element(a,this);if(e){e.attributes&&b.setAttributes(e.attributes);e.styles&&b.setStyles(e.styles)}return b},createText:function(a){return new CKEDITOR.dom.text(a,this)},focus:function(){this.getWindow().focus()},getActive:function(){var a;try{a=this.$.activeElement}catch(e){return null}return new CKEDITOR.dom.element(a)},getById:function(a){return(a=this.$.getElementById(a))?new CKEDITOR.dom.element(a):null},getByAddress:function(a,e){for(var b= -this.$.documentElement,c=0;b&&c<a.length;c++){var f=a[c];if(e)for(var d=-1,g=0;g<b.childNodes.length;g++){var j=b.childNodes[g];if(!(e===true&&j.nodeType==3&&j.previousSibling&&j.previousSibling.nodeType==3)){d++;if(d==f){b=j;break}}}else b=b.childNodes[f]}return b?new CKEDITOR.dom.node(b):null},getElementsByTag:function(a,e){if((!CKEDITOR.env.ie||document.documentMode>8)&&e)a=e+":"+a;return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0]; -return a=a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),true)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$&\n<script data-cke-temp="1">('+ -CKEDITOR.tools.fixDomain+")();<\/script>"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");if(!a){a=this.$.createDocumentFragment();CKEDITOR.tools.enableHtml5Elements(a,true);this.setCustomData("html5ShivFrag",a)}return a}});CKEDITOR.dom.nodeList=function(a){this.$=a}; -CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){if(a<0||a>=this.$.length)return null;return(a=this.$[a])?new CKEDITOR.dom.node(a):null}};CKEDITOR.dom.element=function(a,e){typeof a=="string"&&(a=(e?e.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.element.get=function(a){return(a=typeof a=="string"?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))}; -CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.createFromHtml=function(a,e){var b=new CKEDITOR.dom.element("div",e);b.setHtml(a);return b.getFirst().remove()}; -CKEDITOR.dom.element.setMarker=function(a,e,b,c){var f=e.getCustomData("list_marker_id")||e.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),d=e.getCustomData("list_marker_names")||e.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[f]=e;d[b]=1;return e.setCustomData(b,c)};CKEDITOR.dom.element.clearAllMarkers=function(a){for(var e in a)CKEDITOR.dom.element.clearMarkers(a,a[e],1)}; -CKEDITOR.dom.element.clearMarkers=function(a,e,b){var c=e.getCustomData("list_marker_names"),f=e.getCustomData("list_marker_id"),d;for(d in c)e.removeCustomData(d);e.removeCustomData("list_marker_names");if(b){e.removeCustomData("list_marker_id");delete a[f]}}; -(function(){function a(a){var d=true;if(!a.$.id){a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber();d=false}return function(){d||a.removeAttribute("id")}}function e(a,d){return"#"+a.$.id+" "+d.split(/,\s*/).join(", #"+a.$.id+" ")}function b(a){for(var d=0,b=0,e=c[a].length;b<e;b++)d=d+(parseInt(this.getComputedStyle(c[a][b])||0,10)||0);return d}CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:function(a){var d=this.$.className;d&&(RegExp("(?:^|\\s)"+a+"(?:\\s|$)", -"").test(d)||(d=d+(" "+a)));this.$.className=d||a;return this},removeClass:function(a){var d=this.getAttribute("class");if(d){a=RegExp("(?:^|\\s+)"+a+"(?=\\s|$)","i");if(a.test(d))(d=d.replace(a,"").replace(/^\s+/,""))?this.setAttribute("class",d):this.removeAttribute("class")}return this},hasClass:function(a){return RegExp("(?:^|\\s+)"+a+"(?=\\s|$)","").test(this.getAttribute("class"))},append:function(a,d){typeof a=="string"&&(a=this.getDocument().createElement(a));d?this.$.insertBefore(a.$,this.$.firstChild): -this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var d=new CKEDITOR.dom.element("div",this.getDocument());d.setHtml(a);d.moveChildren(this)}else this.setHtml(a)},appendText:function(a){this.$.text!=void 0?this.$.text=this.$.text+a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();if(!a||!a.is||!a.is("br")){a=this.getDocument().createElement("br"); -CKEDITOR.env.gecko&&a.setAttribute("type","_moz");this.append(a)}}},breakParent:function(a){var d=new CKEDITOR.dom.range(this.getDocument());d.setStartAfter(this);d.setEndAfter(a);a=d.extractContents();d.insertNode(this.remove());a.insertAfterNode(this)},contains:CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a){var d=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?d.contains(a.getParent().$):d!=a.$&&d.contains(a.$)}:function(a){return!!(this.$.compareDocumentPosition(a.$)&16)},focus:function(){function a(){try{this.$.focus()}catch(f){}} -return function(d){d?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(true));return a.innerHTML},getClientRect:function(){var a=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&& -(a.height=a.bottom-a.top);return a},setHtml:CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(a){try{var d=this.$;if(this.getParent())return d.innerHTML=a;var b=this.getDocument()._getHtml5ShivFrag();b.appendChild(d);d.innerHTML=a;b.removeChild(d);return a}catch(c){this.$.innerHTML="";d=new CKEDITOR.dom.element("body",this.getDocument());d.$.innerHTML=a;for(d=d.getChildren();d.count();)this.append(d.getItem(0));return a}}:function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p"); -a.innerHTML="x";a=a.textContent;return function(d){this.$[a?"textContent":"innerText"]=d}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":a=this.$.getAttribute(a,2);a!==0&&this.$.tabIndex===0&&(a=null);return a;case "checked":a=this.$.attributes.getNamedItem(a); -return(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]}: -function(a){var d=this.getWindow().$.getComputedStyle(this.$,null);return d?d.getPropertyValue(a):""},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:CKEDITOR.env.ie?function(){var a=this.$.tabIndex;a===0&&(!CKEDITOR.dtd.$tabIndex[this.getName()]&&parseInt(this.getAttribute("tabindex"),10)!==0)&&(a=-1);return a}:CKEDITOR.env.webkit?function(){var a=this.$.tabIndex;if(a==void 0){a= -parseInt(this.getAttribute("tabindex"),10);isNaN(a)&&(a=-1)}return a}:function(){return this.$.tabIndex},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var a=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&!(document.documentMode>8)){var d=this.$.scopeName;d!="HTML"&&(a=d.toLowerCase()+":"+a)}return(this.getName= -function(){return a})()},getValue:function(){return this.$.value},getFirst:function(a){var d=this.$.firstChild;(d=d&&new CKEDITOR.dom.node(d))&&(a&&!a(d))&&(d=d.getNext(a));return d},getLast:function(a){var d=this.$.lastChild;(d=d&&new CKEDITOR.dom.node(d))&&(a&&!a(d))&&(d=d.getPrevious(a));return d},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if(typeof arguments[0]=="object")return!!arguments[0][a];for(var d=0;d<arguments.length;d++)if(arguments[d]== -a)return true;return false},isEditable:function(a){var d=this.getName();if(this.isReadOnly()||this.getComputedStyle("display")=="none"||this.getComputedStyle("visibility")=="hidden"||CKEDITOR.dtd.$nonEditable[d]||CKEDITOR.dtd.$empty[d]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount())return false;if(a!==false){a=CKEDITOR.dtd[d]||CKEDITOR.dtd.span;return!(!a||!a["#"])}return true},isIdentical:function(a){var d=this.clone(0,1),a=a.clone(0,1);d.removeAttributes(["_moz_dirty", -"data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(d.$.isEqualNode){d.$.style.cssText=CKEDITOR.tools.normalizeCssText(d.$.style.cssText);a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText);return d.$.isEqualNode(a.$)}d=d.getOuterHtml();a=a.getOuterHtml();if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&this.is("a")){var b=this.getParent();if(b.type==CKEDITOR.NODE_ELEMENT){b= -b.clone();b.setHtml(d);d=b.getHtml();b.setHtml(a);a=b.getHtml()}}return d==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&this.getComputedStyle("visibility")!="hidden",d,b;if(a&&CKEDITOR.env.webkit){d=this.getWindow();if(!d.equals(CKEDITOR.document.getWindow())&&(b=d.$.frameElement))a=(new CKEDITOR.dom.element(b)).isVisible()}return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return false;for(var a=this.getChildren(),d=0,b=a.count();d< -b;d++){var c=a.getItem(d);if(!(c.type==CKEDITOR.NODE_ELEMENT&&c.data("cke-bookmark"))&&(c.type==CKEDITOR.NODE_ELEMENT&&!c.isEmptyInlineRemoveable()||c.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(c.getText())))return false}return true},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,d=0;d<a.length;d++){var b=a[d];switch(b.nodeName){case "class":if(this.getAttribute("class"))return true;case "data-cke-expando":continue;default:if(b.specified)return true}}return false}: -function(){var a=this.$.attributes,d=a.length,b={"data-cke-expando":1,_moz_dirty:1};return d>0&&(d>2||!b[a[0].nodeName]||d==2&&!b[a[1].nodeName])},hasAttribute:function(){function a(d){var f=this.$.attributes.getNamedItem(d);if(this.getName()=="input")switch(d){case "class":return this.$.className.length>0;case "checked":return!!this.$.checked;case "value":d=this.getAttribute("type");return d=="checkbox"||d=="radio"?this.$.value!="on":!!this.$.value}return!f?false:f.specified}return CKEDITOR.env.ie? -CKEDITOR.env.version<8?function(d){return d=="name"?!!this.$.name:a.call(this,d)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,d){var b=this.$,a=a.$;if(b!=a){var c;if(d)for(;c=b.lastChild;)a.insertBefore(b.removeChild(c),a.firstChild);else for(;c=b.firstChild;)a.appendChild(b.removeChild(c))}},mergeSiblings:function(){function a(d,f,b){if(f&&f.type==CKEDITOR.NODE_ELEMENT){for(var c=[];f.data("cke-bookmark")||f.isEmptyInlineRemoveable();){c.push(f); -f=b?f.getNext():f.getPrevious();if(!f||f.type!=CKEDITOR.NODE_ELEMENT)return}if(d.isIdentical(f)){for(var e=b?d.getLast():d.getFirst();c.length;)c.shift().move(d,!b);f.moveChildren(d,!b);f.remove();e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(d){if(d===false||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a")){a(this,this.getNext(),true);a(this,this.getPrevious())}}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a, -f){this.$.setAttribute(a,f);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(d,b){d=="class"?this.$.className=b:d=="style"?this.$.style.cssText=b:d=="tabindex"?this.$.tabIndex=b:d=="checked"?this.$.checked=b:d=="contenteditable"?a.call(this,"contentEditable",b):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(d,b){if(d=="src"&&b.match(/^http:\/\//))try{a.apply(this,arguments)}catch(c){}else a.apply(this,arguments); -return this}:a}(),setAttributes:function(a){for(var d in a)this.setAttribute(d,a[d]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){a=="class"?a="className":a=="tabindex"?a="tabIndex":a=="contenteditable"&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var d=0;d< -a.length;d++)this.removeAttribute(a[d]);else for(d in a)a.hasOwnProperty(d)&&this.removeAttribute(d)},removeStyle:function(a){var d=this.$.style;if(!d.removeProperty&&(a=="border"||a=="margin"||a=="padding")){var b=["top","left","right","bottom"],c;a=="border"&&(c=["color","style","width"]);for(var d=[],e=0;e<b.length;e++)if(c)for(var h=0;h<c.length;h++)d.push([a,b[e],c[h]].join("-"));else d.push([a,b[e]].join("-"));for(a=0;a<d.length;a++)this.removeStyle(d[a])}else{d.removeProperty?d.removeProperty(a): -d.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a));this.$.style.cssText||this.removeAttribute("style")}},setStyle:function(a,d){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=d;return this},setStyles:function(a){for(var d in a)this.setStyle(d,a[d]);return this},setOpacity:function(a){if(CKEDITOR.env.ie&&CKEDITOR.env.version<9){a=Math.round(a*100);this.setStyle("filter",a>=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+a+")")}else this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", -"none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,d=this.getElementsByTag("*"),b=0,c=d.count();b<c;b++){a=d.getItem(b);a.setAttribute("unselectable","on")}}},getPositionedAncestor:function(){for(var a=this;a.getName()!="html";){if(a.getComputedStyle("position")!="static")return a;a=a.getParent()}return null},getDocumentPosition:function(a){var d=0,b=0,c=this.getDocument(),e=c.getBody(),h=c.$.compatMode=="BackCompat";if(document.documentElement.getBoundingClientRect){var n= -this.$.getBoundingClientRect(),t=c.$.documentElement,y=t.clientTop||e.$.clientTop||0,z=t.clientLeft||e.$.clientLeft||0,o=true;if(CKEDITOR.env.ie){o=c.getDocumentElement().contains(this);c=c.getBody().contains(this);o=h&&c||!h&&o}if(o){d=n.left+(!h&&t.scrollLeft||e.$.scrollLeft);d=d-z;b=n.top+(!h&&t.scrollTop||e.$.scrollTop);b=b-y}}else{e=this;for(c=null;e&&!(e.getName()=="body"||e.getName()=="html");){d=d+(e.$.offsetLeft-e.$.scrollLeft);b=b+(e.$.offsetTop-e.$.scrollTop);if(!e.equals(this)){d=d+(e.$.clientLeft|| -0);b=b+(e.$.clientTop||0)}for(;c&&!c.equals(e);){d=d-c.$.scrollLeft;b=b-c.$.scrollTop;c=c.getParent()}c=e;e=(n=e.$.offsetParent)?new CKEDITOR.dom.element(n):null}}if(a){e=this.getWindow();c=a.getWindow();if(!e.equals(c)&&e.$.frameElement){a=(new CKEDITOR.dom.element(e.$.frameElement)).getDocumentPosition(a);d=d+a.x;b=b+a.y}}if(!document.documentElement.getBoundingClientRect&&CKEDITOR.env.gecko&&!h){d=d+(this.$.clientLeft?1:0);b=b+(this.$.clientTop?1:0)}return{x:d,y:b}},scrollIntoView:function(a){var b= -this.getParent();if(b){do{(b.$.clientWidth&&b.$.clientWidth<b.$.scrollWidth||b.$.clientHeight&&b.$.clientHeight<b.$.scrollHeight)&&!b.is("body")&&this.scrollIntoParent(b,a,1);if(b.is("html")){var c=b.getWindow();try{var e=c.$.frameElement;e&&(b=new CKEDITOR.dom.element(e))}catch(l){}}}while(b=b.getParent())}},scrollIntoParent:function(a,b,c){var e,l,h,n;function t(b,d){if(/body|html/.test(a.getName()))a.getWindow().$.scrollBy(b,d);else{a.$.scrollLeft=a.$.scrollLeft+b;a.$.scrollTop=a.$.scrollTop+d}} -function y(a,b){var d={x:0,y:0};if(!a.is(o?"body":"html")){var c=a.$.getBoundingClientRect();d.x=c.left;d.y=c.top}c=a.getWindow();if(!c.equals(b)){c=y(CKEDITOR.dom.element.get(c.$.frameElement),b);d.x=d.x+c.x;d.y=d.y+c.y}return d}function z(a,b){return parseInt(a.getComputedStyle("margin-"+b)||0,10)||0}!a&&(a=this.getWindow());h=a.getDocument();var o=h.$.compatMode=="BackCompat";a instanceof CKEDITOR.dom.window&&(a=o?h.getBody():h.getDocumentElement());h=a.getWindow();l=y(this,h);var r=y(a,h),q=this.$.offsetHeight; -e=this.$.offsetWidth;var x=a.$.clientHeight,i=a.$.clientWidth;h=l.x-z(this,"left")-r.x||0;n=l.y-z(this,"top")-r.y||0;e=l.x+e+z(this,"right")-(r.x+i)||0;l=l.y+q+z(this,"bottom")-(r.y+x)||0;if(n<0||l>0)t(0,b===true?n:b===false?l:n<0?n:l);if(c&&(h<0||e>0))t(h<0?h:e,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+"_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",true);c&&this.removeAttribute("aria-disabled"); -break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");c&&this.setAttribute("aria-disabled",true);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off");this.removeClass(b+"_on");this.removeClass(b+"_disabled");c&&this.removeAttribute("aria-pressed");c&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)}, -copyAttributes:function(a,b){for(var c=this.$.attributes,b=b||{},e=0;e<c.length;e++){var l=c[e],h=l.nodeName.toLowerCase(),n;if(!(h in b))if(h=="checked"&&(n=this.getAttribute(h)))a.setAttribute(h,n);else if(!CKEDITOR.env.ie||this.hasAttribute(h)){n=this.getAttribute(h);if(n===null)n=l.nodeValue;a.setAttribute(h,n)}}if(this.$.style.cssText!=="")a.$.style.cssText=this.$.style.cssText},renameNode:function(a){if(this.getName()!=a){var b=this.getDocument(),a=new CKEDITOR.dom.element(a,b);this.copyAttributes(a); -this.moveChildren(a);this.getParent()&&this.$.parentNode.replaceChild(a.$,this.$);a.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=a.$;delete this.getName}},getChild:function(){function a(b,c){var f=b.childNodes;if(c>=0&&c<f.length)return f[c]}return function(b){var c=this.$;if(b.slice)for(;b.length>0&&c;)c=a(c,b.shift());else c=a(c,b);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu",function(a){a.data.getTarget().hasClass("cke_enable_context_menu")|| -a.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,b){a="data-"+a;if(b===void 0)return this.getAttribute(a);b===false?this.removeAttribute(a):this.setAttribute(a,b);return null},getEditor:function(){var a=CKEDITOR.instances,b,c;for(b in a){c=a[b];if(c.element.equals(this)&&c.elementMode!= -CKEDITOR.ELEMENT_MODE_APPENDTO)return c}return null},find:function(b){var c=a(this),b=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e(this,b)));c();return b},findOne:function(b){var c=a(this),b=this.$.querySelector(e(this,b));c();return b?new CKEDITOR.dom.element(b):null},forEach:function(a,b,c){if(!c&&(!b||this.type==b))var e=a(this);if(e!==false)for(var c=this.getChildren(),l=0;l<c.count();l++){e=c.getItem(l);e.type==CKEDITOR.NODE_ELEMENT?e.forEach(a,b):(!b||e.type==b)&&a(e)}}});var c={width:["border-left-width", -"border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(a,c,e){if(typeof c=="number"){if(e&&(!CKEDITOR.env.ie||!CKEDITOR.env.quirks))c=c-b.call(this,a);this.setStyle(a,c+"px")}};CKEDITOR.dom.element.prototype.getSize=function(a,c){var e=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;c&&(e=e-b.call(this,a));return e}})(); -CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?a.$.createDocumentFragment():a}; -CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(a){a=a.$;a.parentNode.insertBefore(this.$,a.nextSibling)}},!0,{append:1,appendBogus:1,getFirst:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1}); -(function(){function a(a,b){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed){this.end();return null}c.optimize()}var d,e=c.startContainer;d=c.endContainer;var f=c.startOffset,n=c.endOffset,i,m=this.guard,k=this.type,s=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var u=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),p=d.type==CKEDITOR.NODE_ELEMENT?d.getChild(n):d.getNext();this._.guardLTR=function(a,b){return(!b||!u.equals(a))&&(!p|| -!a.equals(p))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var g=e.type==CKEDITOR.NODE_ELEMENT?e:e.getParent(),h=e.type==CKEDITOR.NODE_ELEMENT?f?e.getChild(f-1):null:e.getPrevious();this._.guardRTL=function(a,b){return(!b||!g.equals(a))&&(!h||!a.equals(h))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var F=a?this._.guardRTL:this._.guardLTR;i=m?function(a,b){return F(a,b)===false?false:m(a,b)}:F;if(this.current)d=this.current[s](false,k,i);else{if(a)d.type== -CKEDITOR.NODE_ELEMENT&&(d=n>0?d.getChild(n-1):i(d,true)===false?null:d.getPreviousSourceNode(true,k,i));else{d=e;if(d.type==CKEDITOR.NODE_ELEMENT&&!(d=d.getChild(f)))d=i(e,true)===false?null:e.getNextSourceNode(true,k,i)}d&&i(d)===false&&(d=null)}for(;d&&!this._.end;){this.current=d;if(!this.evaluator||this.evaluator(d)!==false){if(!b)return d}else if(b&&this.evaluator)return false;d=d[s](false,k,i)}this.end();return this.current=null}function e(b){for(var c,d=null;c=a.call(this,b);)d=c;return d} -function b(a){if(h(a))return false;if(a.type==CKEDITOR.NODE_TEXT)return true;if(a.type==CKEDITOR.NODE_ELEMENT){if(a.is(CKEDITOR.dtd.$inline)||a.is("hr")||a.getAttribute("contenteditable")=="false")return true;var b;if(b=!CKEDITOR.env.needsBrFiller)if(b=a.is(n))a:{b=0;for(var c=a.getChildCount();b<c;++b)if(!h(a.getChild(b))){b=false;break a}b=true}if(b)return true}return false}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1}, -next:function(){return a.call(this)},previous:function(){return a.call(this,1)},checkForward:function(){return a.call(this,0,1)!==false},checkBackward:function(){return a.call(this,1,1)!==false},lastForward:function(){return e.call(this)},lastBackward:function(){return e.call(this,1)},reset:function(){delete this.current;this._={}}}});var c={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1, -"table-caption":1},f={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){return this.getComputedStyle("float")=="none"&&!(this.getComputedStyle("position")in f)&&c[this.getComputedStyle("display")]?true:!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a))};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark= -function(a,b){function c(a){return a&&a.getName&&a.getName()=="span"&&a.data("cke-bookmark")}return function(d){var e,f;e=d&&d.type!=CKEDITOR.NODE_ELEMENT&&(f=d.getParent())&&c(f);e=a?e:e||c(d);return!!(b^e)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var c;b&&b.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()=="​");return!!(a^c)}};CKEDITOR.dom.walker.invisible=function(a){var b=CKEDITOR.dom.walker.whitespaces();return function(c){if(b(c))c= -1;else{c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent());c=!c.$.offsetHeight}return!!(a^c)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(c){return!!(b^c.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!g(a)&&!j(a)}return function(c){var e=CKEDITOR.env.needsBrFiller?c.is&&c.is("br"):c.getText&&d.test(c.getText());if(e){e=c.getParent();c=c.getNext(b);e=e.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary())}return!!(a^e)}};CKEDITOR.dom.walker.temp= -function(a){return function(b){b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=b&&b.hasAttribute("data-cke-temp");return!!(a^b)}};var d=/^[\t\r\n ]*(?: |\xa0)$/,g=CKEDITOR.dom.walker.whitespaces(),j=CKEDITOR.dom.walker.bookmark(),l=CKEDITOR.dom.walker.temp();CKEDITOR.dom.walker.ignored=function(a){return function(b){b=g(b)||j(b)||l(b);return!!(a^b)}};var h=CKEDITOR.dom.walker.ignored(),n=function(a){var b={},c;for(c in a)CKEDITOR.dtd[c]["#"]&&(b[c]=1);return b}(CKEDITOR.dtd.$block);CKEDITOR.dom.walker.editable= -function(a){return function(c){return!!(a^b(c))}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(j(a)||g(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&d.test(a.getText()))?a:false}})(); -CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=true;var e=a instanceof CKEDITOR.dom.document;this.document=e?a:a.getDocument();this.root=e?a.getBody():a}; -(function(){function a(){var a=false,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(true),e=CKEDITOR.dom.walker.bogus();return function(f){if(c(f)||b(f))return true;if(e(f)&&!a)return a=true;return f.type==CKEDITOR.NODE_TEXT&&(f.hasAscendant("pre")||CKEDITOR.tools.trim(f.getText()).length)||f.type==CKEDITOR.NODE_ELEMENT&&!f.is(d)?false:true}}function e(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(d){return c(d)||b(d)?true:!a&&g(d)|| -d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}}function b(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&h(a)&&(b=a);return l(a)&&!(g(a)&&a.equals(b))})}}var c=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},f=function(a,b,c,d){a.optimizeBookmark();var e=a.startContainer,f=a.endContainer,q=a.startOffset,g=a.endOffset,i,m;if(f.type==CKEDITOR.NODE_TEXT)f=f.split(g); -else if(f.getChildCount()>0)if(g>=f.getChildCount()){f=f.append(a.document.createText(""));m=true}else f=f.getChild(g);if(e.type==CKEDITOR.NODE_TEXT){e.split(q);e.equals(f)&&(f=e.getNext())}else if(q)if(q>=e.getChildCount()){e=e.append(a.document.createText(""));i=true}else e=e.getChild(q).getPrevious();else{e=e.append(a.document.createText(""),1);i=true}var q=e.getParents(),g=f.getParents(),k,s,u;for(k=0;k<q.length;k++){s=q[k];u=g[k];if(!s.equals(u))break}for(var p=c,h,l,F,j=k;j<q.length;j++){h= -q[j];p&&!h.equals(e)&&(l=p.append(h.clone()));for(h=h.getNext();h;){if(h.equals(g[j])||h.equals(f))break;F=h.getNext();if(b==2)p.append(h.clone(true));else{h.remove();b==1&&p.append(h)}h=F}p&&(p=l)}p=c;for(c=k;c<g.length;c++){h=g[c];b>0&&!h.equals(f)&&(l=p.append(h.clone()));if(!q[c]||h.$.parentNode!=q[c].$.parentNode)for(h=h.getPrevious();h;){if(h.equals(q[c])||h.equals(e))break;F=h.getPrevious();if(b==2)p.$.insertBefore(h.$.cloneNode(true),p.$.firstChild);else{h.remove();b==1&&p.$.insertBefore(h.$, -p.$.firstChild)}h=F}p&&(p=l)}if(b==2){s=a.startContainer;if(s.type==CKEDITOR.NODE_TEXT){s.$.data=s.$.data+s.$.nextSibling.data;s.$.parentNode.removeChild(s.$.nextSibling)}a=a.endContainer;if(a.type==CKEDITOR.NODE_TEXT&&a.$.nextSibling){a.$.data=a.$.data+a.$.nextSibling.data;a.$.parentNode.removeChild(a.$.nextSibling)}}else{if(s&&u&&(e.$.parentNode!=s.$.parentNode||f.$.parentNode!=u.$.parentNode)){b=u.getIndex();i&&u.$.parentNode==e.$.parentNode&&b--;if(d&&s.type==CKEDITOR.NODE_ELEMENT){d=CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none"> </span>', -a.document);d.insertAfter(s);s.mergeSiblings(false);a.moveToBookmark({startNode:d})}else a.setStart(u.getParent(),b)}a.collapse(true)}i&&e.remove();m&&f.$.parentNode&&f.remove()},d={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},g=CKEDITOR.dom.walker.bogus(),j=/^[\t\r\n ]*(?: |\xa0)$/,l=CKEDITOR.dom.walker.editable(),h=CKEDITOR.dom.walker.ignored(true);CKEDITOR.dom.range.prototype= -{clone:function(){var a=new CKEDITOR.dom.range(this.root);a.startContainer=this.startContainer;a.startOffset=this.startOffset;a.endContainer=this.endContainer;a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){if(a){this.endContainer=this.startContainer;this.endOffset=this.startOffset}else{this.startContainer=this.endContainer;this.startOffset=this.endOffset}this.collapsed=true},cloneContents:function(){var a=new CKEDITOR.dom.documentFragment(this.document);this.collapsed|| -f(this,2,a);return a},deleteContents:function(a){this.collapsed||f(this,0,null,a)},extractContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||f(this,1,b,a);return b},createBookmark:function(a){var b,c,d,e,f=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml(" ");if(a){d="cke_bm_"+CKEDITOR.tools.getNextNumber();b.setAttribute("id",d+(f?"C":"S"))}if(!f){c=b.clone();c.setHtml(" ");a&&c.setAttribute("id", -d+"E");e=this.clone();e.collapse();e.insertNode(c)}e=this.clone();e.collapse(true);e.insertNode(b);if(c){this.setStartAfter(b);this.setEndBefore(c)}else this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?d+(f?"C":"S"):b,endNode:a?d+"E":c,serializable:a,collapsed:f}},createBookmark2:function(){function a(b){var c=b.container,d=b.offset,e;e=c;var f=d;e=e.type!=CKEDITOR.NODE_ELEMENT||f===0||f==e.getChildCount()?0:e.getChild(f-1).type==CKEDITOR.NODE_TEXT&&e.getChild(f).type==CKEDITOR.NODE_TEXT; -if(e){c=c.getChild(d-1);d=c.getLength()}c.type==CKEDITOR.NODE_ELEMENT&&d>1&&(d=c.getChild(d-1).getIndex(true)+1);if(c.type==CKEDITOR.NODE_TEXT){e=c;for(f=0;(e=e.getPrevious())&&e.type==CKEDITOR.NODE_TEXT;)f=f+e.getLength();d=d+f}b.container=c;b.offset=d}return function(b){var c=this.collapsed,d={container:this.startContainer,offset:this.startOffset},e={container:this.endContainer,offset:this.endOffset};if(b){a(d);c||a(e)}return{start:d.container.getAddress(b),end:c?null:e.container.getAddress(b), -startOffset:d.offset,endOffset:e.offset,normalized:b,collapsed:c,is2:true}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized),a=a.endOffset;this.setStart(b,c);d?this.setEnd(d,a):this.collapse(true)}else{b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode;a=c?this.document.getById(a.endNode):a.endNode;this.setStartBefore(b);b.remove();if(a){this.setEndBefore(a);a.remove()}else this.collapse(true)}}, -getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,d=this.endOffset,e;if(a.type==CKEDITOR.NODE_ELEMENT){e=a.getChildCount();if(e>c)a=a.getChild(c);else if(e<1)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}}if(b.type==CKEDITOR.NODE_ELEMENT){e=b.getChildCount();if(e>d)b=b.getChild(d).getPreviousSourceNode(true);else if(e<1)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b= -b.lastChild;b=new CKEDITOR.dom.node(b)}}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a): -this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&(a.is("span")&&a.data("cke-bookmark"))&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&(b.is&&b.is("span")&&b.data("cke-bookmark"))&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var c=this.startContainer,d=this.startOffset,e=this.collapsed; -if((!a||e)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength()){d=c.getIndex()+1;c=c.getParent()}else{var f=c.split(d),d=c.getIndex()+1,c=c.getParent();if(this.startContainer.equals(this.endContainer))this.setEnd(f,this.endOffset-this.startOffset);else if(c.equals(this.endContainer))this.endOffset=this.endOffset+1}else{d=c.getIndex();c=c.getParent()}this.setStart(c,d);if(e){this.collapse(true);return}}c=this.endContainer;d=this.endOffset;if(!b&&!e&&c&&c.type==CKEDITOR.NODE_TEXT){if(d){d>=c.getLength()|| -c.split(d);d=c.getIndex()+1}else d=c.getIndex();c=c.getParent();this.setEnd(c,d)}},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var d=RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var f=this.getCommonAncestor(),q=this.root,g,i,m,k,s,u=false,p,h;p=this.startContainer;var l=this.startOffset;if(p.type==CKEDITOR.NODE_TEXT){if(l){p=!CKEDITOR.tools.trim(p.substring(0, -l)).length&&p;u=!!p}if(p&&!(k=p.getPrevious()))m=p.getParent()}else{l&&(k=p.getChild(l-1)||p.getLast());k||(m=p)}for(m=c(m);m||k;){if(m&&!k){!s&&m.equals(f)&&(s=true);if(e?m.isBlockBoundary():!q.contains(m))break;if(!u||m.getComputedStyle("display")!="inline"){u=false;s?g=m:this.setStartBefore(m)}k=m.getPrevious()}for(;k;){p=false;if(k.type==CKEDITOR.NODE_COMMENT)k=k.getPrevious();else{if(k.type==CKEDITOR.NODE_TEXT){h=k.getText();d.test(h)&&(k=null);p=/[\s\ufeff]$/.test(h)}else if((k.$.offsetWidth> -0||b&&k.is("br"))&&!k.data("cke-bookmark"))if(u&&CKEDITOR.dtd.$removeEmpty[k.getName()]){h=k.getText();if(d.test(h))k=null;else for(var l=k.$.getElementsByTagName("*"),F=0,j;j=l[F++];)if(!CKEDITOR.dtd.$removeEmpty[j.nodeName.toLowerCase()]){k=null;break}k&&(p=!!h.length)}else k=null;p&&(u?s?g=m:m&&this.setStartBefore(m):u=true);if(k){p=k.getPrevious();if(!m&&!p){m=k;k=null;break}k=p}else m=null}}m&&(m=c(m.getParent()))}p=this.endContainer;l=this.endOffset;m=k=null;s=u=false;var L=function(a,b){var c= -new CKEDITOR.dom.range(q);c.setStart(a,b);c.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),e;for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};e=c.next();){if(e.type!=CKEDITOR.NODE_TEXT)return false;h=e!=a?e.getText():e.substring(b);if(d.test(h))return false}return true};if(p.type==CKEDITOR.NODE_TEXT)if(CKEDITOR.tools.trim(p.substring(l)).length)u=true;else{u=!p.getLength();if(l==p.getLength()){if(!(k=p.getNext()))m=p.getParent()}else L(p, -l)&&(m=p.getParent())}else(k=p.getChild(l))||(m=p);for(;m||k;){if(m&&!k){!s&&m.equals(f)&&(s=true);if(e?m.isBlockBoundary():!q.contains(m))break;if(!u||m.getComputedStyle("display")!="inline"){u=false;s?i=m:m&&this.setEndAfter(m)}k=m.getNext()}for(;k;){p=false;if(k.type==CKEDITOR.NODE_TEXT){h=k.getText();L(k,0)||(k=null);p=/^[\s\ufeff]/.test(h)}else if(k.type==CKEDITOR.NODE_ELEMENT){if((k.$.offsetWidth>0||b&&k.is("br"))&&!k.data("cke-bookmark"))if(u&&CKEDITOR.dtd.$removeEmpty[k.getName()]){h=k.getText(); -if(d.test(h))k=null;else{l=k.$.getElementsByTagName("*");for(F=0;j=l[F++];)if(!CKEDITOR.dtd.$removeEmpty[j.nodeName.toLowerCase()]){k=null;break}}k&&(p=!!h.length)}else k=null}else p=1;p&&u&&(s?i=m:this.setEndAfter(m));if(k){p=k.getNext();if(!m&&!p){m=k;k=null;break}k=p}else m=null}m&&(m=c(m.getParent()))}if(g&&i){f=g.contains(i)?i:g;this.setStartBefore(f);this.setEndAfter(f)}break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:m=new CKEDITOR.dom.range(this.root);q= -this.root;m.setStartAt(q,CKEDITOR.POSITION_AFTER_START);m.setEnd(this.startContainer,this.startOffset);m=new CKEDITOR.dom.walker(m);var I,w,B=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),v=null,C=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&a.getAttribute("contenteditable")=="false")if(v){if(v.equals(a)){v=null;return}}else v=a;else if(v)return;var b=B(a);b||(I=a);return b},e=function(a){var b=C(a);!b&&(a.is&&a.is("br"))&&(w=a);return b};m.guard=C;m=m.lastBackward(); -I=I||q;this.setStartAt(I,!I.is("br")&&(!m&&this.checkStartOfBlock()||m&&I.contains(m))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){m=this.clone();m=new CKEDITOR.dom.walker(m);var A=CKEDITOR.dom.walker.whitespaces(),E=CKEDITOR.dom.walker.bookmark();m.evaluator=function(a){return!A(a)&&!E(a)};if((m=m.previous())&&m.type==CKEDITOR.NODE_ELEMENT&&m.is("br"))break}m=this.clone();m.collapse();m.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);m=new CKEDITOR.dom.walker(m); -m.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:C;I=v=w=null;m=m.lastForward();I=I||q;this.setEndAt(I,!m&&this.checkEndOfBlock()||m&&I.contains(m)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);w&&this.setEndAfter(w)}},shrink:function(a,b,c){if(!this.collapsed){var a=a||CKEDITOR.SHRINK_TEXT,d=this.clone(),e=this.startContainer,f=this.endContainer,q=this.startOffset,g=this.endOffset,i=1,m=1;if(e&&e.type==CKEDITOR.NODE_TEXT)if(q)if(q>=e.getLength())d.setStartAfter(e);else{d.setStartBefore(e); -i=0}else d.setStartBefore(e);if(f&&f.type==CKEDITOR.NODE_TEXT)if(g)if(g>=f.getLength())d.setEndAfter(f);else{d.setEndAfter(f);m=0}else d.setEndBefore(f);var d=new CKEDITOR.dom.walker(d),k=CKEDITOR.dom.walker.bookmark();d.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var s;d.guard=function(b,d){if(k(b))return true;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||d&&b.equals(s)||c===false&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()|| -b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return false;!d&&b.type==CKEDITOR.NODE_ELEMENT&&(s=b);return true};if(i)(e=d[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(e,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);if(m){d.reset();(d=d[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(d,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)}return!(!i&&!m)}},insertNode:function(a){this.optimizeBookmark();this.trim(false, -true);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(true)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(a, -b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex();a=a.getParent()}this.startContainer=a;this.startOffset=b;if(!this.endContainer){this.endContainer=a;this.endOffset=b}c(this)},setEnd:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]){b=a.getIndex()+1;a=a.getParent()}this.endContainer=a;this.endOffset=b;if(!this.startContainer){this.startContainer=a;this.startOffset=b}c(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+ -1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}c(this)}, -setEndAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}c(this)},fixBlock:function(a,b){var c=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d); -d.trim();d.appendBogus();this.insertNode(d);this.moveToBookmark(c);return d},splitBlock:function(a){var b=new CKEDITOR.dom.elementPath(this.startContainer,this.root),c=new CKEDITOR.dom.elementPath(this.endContainer,this.root),d=b.block,e=c.block,f=null;if(!b.blockLimit.equals(c.blockLimit))return null;if(a!="br"){if(!d){d=this.fixBlock(true,a);e=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block}e||(e=this.fixBlock(false,a))}a=d&&this.checkStartOfBlock();b=e&&this.checkEndOfBlock(); -this.deleteContents();if(d&&d.equals(e))if(b){f=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END);e=null}else if(a){f=new CKEDITOR.dom.elementPath(this.startContainer,this.root);this.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d=null}else{e=this.splitElement(d);d.is("ul","ol")||d.appendBogus()}return{previousBlock:d,nextBlock:e,wasStartOfBlock:a,wasEndOfBlock:b,elementPath:f}},splitElement:function(a){if(!this.collapsed)return null; -this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var b=this.extractContents(),c=a.clone(false);b.appendTo(c);c.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return c},removeEmptyBlocksAtEnd:function(){function a(d){return function(a){return b(a)||(c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable())||d.is("table")&&a.is("caption")?false:true}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(false);return function(b){for(var c=this.createBookmark(), -d=this[b?"endPath":"startPath"](),e=d.block||d.blockLimit,f;e&&!e.equals(d.root)&&!e.getFirst(a(e));){f=e.getParent();this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END);e.remove(1);e=f}this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,b){var c=b==CKEDITOR.START,d=this.clone();d.collapse(c);d[c?"setStartAt": -"setEndAt"](a,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=e(c);return d[c?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var b=this.startContainer,c=this.startOffset;if(CKEDITOR.env.ie&&c&&b.type==CKEDITOR.NODE_TEXT){b=CKEDITOR.tools.ltrim(b.substring(0,c));j.test(b)&&this.trim(0,1)}this.trim();b=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(true);c.setStartAt(b.block||b.blockLimit, -CKEDITOR.POSITION_AFTER_START);b=new CKEDITOR.dom.walker(c);b.evaluator=a();return b.checkBackward()},checkEndOfBlock:function(){var b=this.endContainer,c=this.endOffset;if(CKEDITOR.env.ie&&b.type==CKEDITOR.NODE_TEXT){b=CKEDITOR.tools.rtrim(b.substring(c));j.test(b)&&this.trim(1,0)}this.trim();b=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(false);c.setEndAt(b.block||b.blockLimit,CKEDITOR.POSITION_BEFORE_END);b=new CKEDITOR.dom.walker(c);b.evaluator=a();return b.checkForward()}, -getPreviousNode:function(a,b,c){var d=this.clone();d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type==CKEDITOR.NODE_ELEMENT){if(b.getAttribute("contentEditable")== -"false"&&!b.data("cke-editable"))return 0;if(b.is("html")||b.getAttribute("contentEditable")=="true"&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(false)){this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);return true}for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&& -this.checkEndOfBlock()&&j.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable()){this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START);c=1}else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if(a.getAttribute("contenteditable")=="false"&& -a.is(CKEDITOR.dtd.$block)){this.setStartBefore(a);this.setEndAfter(a);return true}var d=a,e=c,f=void 0;d.type==CKEDITOR.NODE_ELEMENT&&d.isEditable(false)&&(f=d[b?"getLast":"getFirst"](h));!e&&!f&&(f=d[b?"getPrevious":"getNext"](h));a=f}return!!c},moveToClosestEditablePosition:function(a,b){var c=new CKEDITOR.dom.range(this.root),d=0,e,f=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];c.moveToPosition(a,f[b?0:1]);if(a.is(CKEDITOR.dtd.$block)){if(e=c[b?"getNextEditableNode":"getPreviousEditableNode"]()){d= -1;if(e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$block)&&e.getAttribute("contenteditable")=="false"){c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START);c.setEndAt(e,CKEDITOR.POSITION_AFTER_END)}else c.moveToPosition(e,f[b?1:0])}}else d=1;d&&this.moveToRange(c);return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,true)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!= -CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(false,true),c=CKEDITOR.dom.walker.whitespaces(true);a.evaluator=function(a){return c(a)&&b(a)};var d=a.next();a.reset();return d&&d.equals(a.previous())?d:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer; -return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:b(),getPreviousEditableNode:b(1),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("<span> </span>",this.document),b,c,d,e=this.clone();e.optimize();if(d=e.startContainer.type==CKEDITOR.NODE_TEXT){c=e.startContainer.getText();b=e.startContainer.split(e.startOffset);a.insertAfter(e.startContainer)}else e.insertNode(a);a.scrollIntoView();if(d){e.startContainer.setText(c); -b.remove()}a.remove()}}})();CKEDITOR.POSITION_AFTER_START=1;CKEDITOR.POSITION_BEFORE_END=2;CKEDITOR.POSITION_BEFORE_START=3;CKEDITOR.POSITION_AFTER_END=4;CKEDITOR.ENLARGE_ELEMENT=1;CKEDITOR.ENLARGE_BLOCK_CONTENTS=2;CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3;CKEDITOR.ENLARGE_INLINE=4;CKEDITOR.START=1;CKEDITOR.END=2;CKEDITOR.SHRINK_ELEMENT=1;CKEDITOR.SHRINK_TEXT=2;"use strict"; -(function(){function a(a){if(!(arguments.length<1)){this.range=a;this.forceBrBreak=0;this.enlargeBr=1;this.enforceRealBlocks=0;this._||(this._={})}}function e(a,b,c){for(a=a.getNextSourceNode(b,null,c);!g(a);)a=a.getNextSourceNode(b,null,c);return a}function b(a){var b=[];a.forEach(function(a){if(a.getAttribute("contenteditable")=="true"){b.push(a);return false}},CKEDITOR.NODE_ELEMENT,true);return b}function c(a,d,e,f){a:{f==void 0&&(f=b(e));for(var o;o=f.shift();)if(o.getDtd().p){f={element:o,remaining:f}; -break a}f=null}if(!f)return 0;if((o=CKEDITOR.filter.instances[f.element.data("cke-filter")])&&!o.check(d))return c(a,d,e,f.remaining);d=new CKEDITOR.dom.range(f.element);d.selectNodeContents(f.element);d=d.createIterator();d.enlargeBr=a.enlargeBr;d.enforceRealBlocks=a.enforceRealBlocks;d.activeFilter=d.filter=o;a._.nestedEditable={element:f.element,container:e,remaining:f.remaining,iterator:d};return 1}function f(a,b,c){if(!b)return false;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b, -c?CKEDITOR.START:CKEDITOR.END)}var d=/^[\r\n\t ]+$/,g=CKEDITOR.dom.walker.bookmark(false,true),j=CKEDITOR.dom.walker.whitespaces(true),l=function(a){return g(a)&&j(a)},h={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var b,j,z,o,r,a=a||"p";if(this._.nestedEditable){if(b=this._.nestedEditable.iterator.getNextParagraph(a)){this.activeFilter=this._.nestedEditable.iterator.activeFilter;return b}this.activeFilter=this.filter;if(c(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining)){this.activeFilter= -this._.nestedEditable.iterator.activeFilter;return this._.nestedEditable.iterator.getNextParagraph(a)}this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var q=this.range.clone();j=q.startPath();var x=q.endPath(),i=!q.collapsed&&f(q,j.block),m=!q.collapsed&&f(q,x.block,1);q.shrink(CKEDITOR.SHRINK_ELEMENT,true);i&&q.setStartAt(j.block,CKEDITOR.POSITION_BEFORE_END);m&&q.setEndAt(x.block,CKEDITOR.POSITION_AFTER_START);j=q.endContainer.hasAscendant("pre",true)|| -q.startContainer.hasAscendant("pre",true);q.enlarge(this.forceBrBreak&&!j||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(!q.collapsed){j=new CKEDITOR.dom.walker(q.clone());x=CKEDITOR.dom.walker.bookmark(true,true);j.evaluator=x;this._.nextNode=j.next();j=new CKEDITOR.dom.walker(q.clone());j.evaluator=x;j=j.previous();this._.lastNode=j.getNextSourceNode(true);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&& -this._.lastNode.getParent().isBlockBoundary()){x=this.range.clone();x.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END);if(x.checkEndOfBlock()){x=new CKEDITOR.dom.elementPath(x.endContainer,x.root);this._.lastNode=(x.block||x.blockLimit).getNextSourceNode(true)}}if(!this._.lastNode||!q.root.contains(this._.lastNode)){this._.lastNode=this._.docEndMarker=q.document.createText("");this._.lastNode.insertAfter(j)}q=null}this._.started=1;j=q}x=this._.nextNode;q=this._.lastNode;for(this._.nextNode= -null;x;){var i=0,m=x.hasAscendant("pre"),k=x.type!=CKEDITOR.NODE_ELEMENT,s=0;if(k)x.type==CKEDITOR.NODE_TEXT&&d.test(x.getText())&&(k=0);else{var u=x.getName();if(CKEDITOR.dtd.$block[u]&&x.getAttribute("contenteditable")=="false"){b=x;c(this,a,b);break}else if(x.isBlockBoundary(this.forceBrBreak&&!m&&{br:1})){if(u=="br")k=1;else if(!j&&!x.getChildCount()&&u!="hr"){b=x;z=x.equals(q);break}if(j){j.setEndAt(x,CKEDITOR.POSITION_BEFORE_START);if(u!="br")this._.nextNode=x}i=1}else{if(x.getFirst()){if(!j){j= -this.range.clone();j.setStartAt(x,CKEDITOR.POSITION_BEFORE_START)}x=x.getFirst();continue}k=1}}if(k&&!j){j=this.range.clone();j.setStartAt(x,CKEDITOR.POSITION_BEFORE_START)}z=(!i||k)&&x.equals(q);if(j&&!i)for(;!x.getNext(l)&&!z;){u=x.getParent();if(u.isBlockBoundary(this.forceBrBreak&&!m&&{br:1})){i=1;k=0;z||u.equals(q);j.setEndAt(u,CKEDITOR.POSITION_BEFORE_END);break}x=u;k=1;z=x.equals(q);s=1}k&&j.setEndAt(x,CKEDITOR.POSITION_AFTER_END);x=e(x,s,q);if((z=!x)||i&&j)break}if(!b){if(!j){this._.docEndMarker&& -this._.docEndMarker.remove();return this._.nextNode=null}b=new CKEDITOR.dom.elementPath(j.startContainer,j.root);x=b.blockLimit;i={div:1,th:1,td:1};b=b.block;if(!b&&x&&!this.enforceRealBlocks&&i[x.getName()]&&j.checkStartOfBlock()&&j.checkEndOfBlock()&&!x.equals(j.root))b=x;else if(!b||this.enforceRealBlocks&&b.is(h)){b=this.range.document.createElement(a);j.extractContents().appendTo(b);b.trim();j.insertNode(b);o=r=true}else if(b.getName()!="li"){if(!j.checkStartOfBlock()||!j.checkEndOfBlock()){b= -b.clone(false);j.extractContents().appendTo(b);b.trim();r=j.splitBlock();o=!r.wasStartOfBlock;r=!r.wasEndOfBlock;j.insertNode(b)}}else if(!z)this._.nextNode=b.equals(q)?null:e(j.getBoundaryNodes().endNode,1,q)}if(o)(o=b.getPrevious())&&o.type==CKEDITOR.NODE_ELEMENT&&(o.getName()=="br"?o.remove():o.getLast()&&o.getLast().$.nodeName.toLowerCase()=="br"&&o.getLast().remove());if(r)(o=b.getLast())&&o.type==CKEDITOR.NODE_ELEMENT&&o.getName()=="br"&&(!CKEDITOR.env.needsBrFiller||o.getPrevious(g)||o.getNext(g))&& -o.remove();if(!this._.nextNode)this._.nextNode=z||b.equals(q)||!q?null:e(b,1,q);return b}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}})(); -CKEDITOR.command=function(a,e){this.uiItems=[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return false;this.editorFocus&&a.focus();return this.fire("exec")===false?true:e.exec.call(this,a,b)!==false};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return true;if(this.context&&!b.isContextFor(this.context)){this.disable();return true}if(!this.checkAllowed(true)){this.disable();return true}this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&& -this.disable();return this.fire("refresh",{editor:a,path:b})===false?true:e.refresh&&e.refresh.apply(this,arguments)!==false};var b;this.checkAllowed=function(c){return!c&&typeof b=="boolean"?b:b=a.activeFilter.checkFeature(this)};CKEDITOR.tools.extend(this,e,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!e.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)}; -CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(!this.preserveState||typeof this.previousState=="undefined"?CKEDITOR.TRISTATE_OFF:this.previousState)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return false;this.previousState=this.state;this.state=a;this.fire("state");return true},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF? -this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.event.implementOn(CKEDITOR.command.prototype);CKEDITOR.ENTER_P=1;CKEDITOR.ENTER_BR=2;CKEDITOR.ENTER_DIV=3; -CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"<!DOCTYPE html>",bodyId:"",bodyClass:"",fullPage:!1,height:200,extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]}; -(function(){function a(a,b,c,d,e){var f,k,a=[];for(f in b){k=b[f];k=typeof k=="boolean"?{}:typeof k=="function"?{match:k}:L(k);if(f.charAt(0)!="$")k.elements=f;if(c)k.featureName=c.toLowerCase();var i=k;i.elements=g(i.elements,/\s+/)||null;i.propertiesOnly=i.propertiesOnly||i.elements===true;var r=/\s*,\s*/,m=void 0;for(m in v){i[m]=g(i[m],r)||null;var s=i,p=C[m],A=g(i[C[m]],r),q=i[m],o=[],w=true,u=void 0;A?w=false:A={};for(u in q)if(u.charAt(0)=="!"){u=u.slice(1);o.push(u);A[u]=true;w=false}for(;u= -o.pop();){q[u]=q["!"+u];delete q["!"+u]}s[p]=(w?false:A)||null}i.match=i.match||null;d.push(k);a.push(k)}for(var b=e.elements,e=e.generic,h,c=0,d=a.length;c<d;++c){f=L(a[c]);k=f.classes===true||f.styles===true||f.attributes===true;i=f;m=p=r=void 0;for(r in v)i[r]=x(i[r]);s=true;for(m in C){r=C[m];p=i[r];A=[];q=void 0;for(q in p)q.indexOf("*")>-1?A.push(RegExp("^"+q.replace(/\*/g,".*")+"$")):A.push(q);p=A;if(p.length){i[r]=p;s=false}}i.nothingRequired=s;i.noProperties=!(i.attributes||i.classes||i.styles); -if(f.elements===true||f.elements===null)e[k?"unshift":"push"](f);else{i=f.elements;delete f.elements;for(h in i)if(b[h])b[h][k?"unshift":"push"](f);else b[h]=[f]}}}function e(a,c,d,e){if(!a.match||a.match(c))if(e||j(a,c)){if(!a.propertiesOnly)d.valid=true;if(!d.allAttributes)d.allAttributes=b(a.attributes,c.attributes,d.validAttributes);if(!d.allStyles)d.allStyles=b(a.styles,c.styles,d.validStyles);if(!d.allClasses){a=a.classes;c=c.classes;e=d.validClasses;if(a)if(a===true)a=true;else{for(var f=0, -k=c.length,i;f<k;++f){i=c[f];e[i]||(e[i]=a(i))}a=false}else a=false;d.allClasses=a}}}function b(a,b,c){if(!a)return false;if(a===true)return true;for(var d in b)c[d]||(c[d]=a(d));return false}function c(a,b,c){if(!a.match||a.match(b)){if(a.noProperties)return false;c.hadInvalidAttribute=f(a.attributes,b.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle=f(a.styles,b.styles)||c.hadInvalidStyle;a=a.classes;b=b.classes;if(a){for(var d=false,e=a===true,k=b.length;k--;)if(e||a(b[k])){b.splice(k,1);d= -true}a=d}else a=false;c.hadInvalidClass=a||c.hadInvalidClass}}function f(a,b){if(!a)return false;var c=false,d=a===true,e;for(e in b)if(d||a(e)){delete b[e];c=true}return c}function d(a,b,c){if(a.disabled||a.customConfig&&!c||!b)return false;a._.cachedChecks={};return true}function g(a,b){if(!a)return false;if(a===true)return a;if(typeof a=="string"){a=I(a);return a=="*"?true:CKEDITOR.tools.convertArrayToObject(a.split(b))}if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a): -false;var c={},d=0,e;for(e in a){c[e]=a[e];d++}return d?c:false}function j(a,b){if(a.nothingRequired)return true;var c,d,e,f;if(e=a.requiredClasses){f=b.classes;for(c=0;c<e.length;++c){d=e[c];if(typeof d=="string"){if(CKEDITOR.tools.indexOf(f,d)==-1)return false}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(f,d))return false}}return l(b.styles,a.requiredStyles)&&l(b.attributes,a.requiredAttributes)}function l(a,b){if(!b)return true;for(var c=0,d;c<b.length;++c){d=b[c];if(typeof d=="string"){if(!(d in -a))return false}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,d))return false}return true}function h(a){if(!a)return{};for(var a=a.split(/\s*,\s*/).sort(),b={};a.length;)b[a.shift()]=w;return b}function n(a){for(var b,c,d,e,f={},k=1,a=I(a);b=a.match(A);){if(c=b[2]){d=t(c,"styles");e=t(c,"attrs");c=t(c,"classes")}else d=e=c=null;f["$"+k++]={elements:b[1],classes:c,styles:d,attributes:e};a=a.slice(b[0].length)}return f}function t(a,b){var c=a.match(E[b]);return c?I(c[1]):null}function y(a){var b= -a.styleBackup=a.attributes.style,c=a.classBackup=a.attributes["class"];if(!a.styles)a.styles=CKEDITOR.tools.parseCssText(b||"",1);if(!a.classes)a.classes=c?c.split(/\s+/):[]}function z(a,b,d,f){var k=0,i;if(f.toHtml)b.name=b.name.replace(ba,"$1");if(f.doCallbacks&&a.elementCallbacks){a:for(var m=a.elementCallbacks,p=0,A=m.length,o;p<A;++p)if(o=m[p](b)){i=o;break a}if(i)return i}if(f.doTransform)if(i=a._.transformations[b.name]){y(b);for(m=0;m<i.length;++m)s(a,b,i[m]);r(b)}if(f.doFilter){a:{m=b.name; -p=a._;a=p.allowedRules.elements[m];i=p.allowedRules.generic;m=p.disallowedRules.elements[m];p=p.disallowedRules.generic;A=f.skipRequired;o={valid:false,validAttributes:{},validClasses:{},validStyles:{},allAttributes:false,allClasses:false,allStyles:false,hadInvalidAttribute:false,hadInvalidClass:false,hadInvalidStyle:false};var w,g;if(!a&&!i)a=null;else{y(b);if(m){w=0;for(g=m.length;w<g;++w)if(c(m[w],b,o)===false){a=null;break a}}if(p){w=0;for(g=p.length;w<g;++w)c(p[w],b,o)}if(a){w=0;for(g=a.length;w< -g;++w)e(a[w],b,o,A)}if(i){w=0;for(g=i.length;w<g;++w)e(i[w],b,o,A)}a=o}}if(!a){d.push(b);return J}if(!a.valid){d.push(b);return J}g=a.validAttributes;var u=a.validStyles;i=a.validClasses;var m=b.attributes,h=b.styles,p=b.classes,A=b.classBackup,C=b.styleBackup,v,j,B=[];o=[];var E=/^data-cke-/;w=false;delete m.style;delete m["class"];delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(v in m)if(!g[v])if(E.test(v)){if(v!=(j=v.replace(/^data-cke-saved-/,""))&&!g[j]){delete m[v];w=true}}else{delete m[v]; -w=true}if(!a.allStyles||a.hadInvalidStyle){for(v in h)a.allStyles||u[v]?B.push(v+":"+h[v]):w=true;if(B.length)m.style=B.sort().join("; ")}else if(C)m.style=C;if(!a.allClasses||a.hadInvalidClass){for(v=0;v<p.length;++v)(a.allClasses||i[p[v]])&&o.push(p[v]);o.length&&(m["class"]=o.sort().join(" "));A&&o.length<A.split(/\s+/).length&&(w=true)}else A&&(m["class"]=A);w&&(k=J);if(!f.skipFinalValidation&&!q(b)){d.push(b);return J}}if(f.toHtml)b.name=b.name.replace(ca,"cke:$1");return k}function o(a){var b= -[],c;for(c in a)c.indexOf("*")>-1&&b.push(c.replace(/\*/g,".*"));return b.length?RegExp("^(?:"+b.join("|")+")$"):null}function r(a){var b=a.attributes,c;delete b.style;delete b["class"];if(c=CKEDITOR.tools.writeCssText(a.styles,true))b.style=c;a.classes.length&&(b["class"]=a.classes.sort().join(" "))}function q(a){switch(a.name){case "a":if(!a.children.length&&!a.attributes.name)return false;break;case "img":if(!a.attributes.src)return false}return true}function x(a){if(!a)return false;if(a===true)return true; -var b=o(a);return function(c){return c in a||b&&c.match(b)}}function i(){return new CKEDITOR.htmlParser.element("br")}function m(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.name=="br"||F.$block[a.name])}function k(a,b,c){var d=a.name;if(F.$empty[d]||!a.children.length)if(d=="hr"&&b=="br")a.replaceWith(i());else{a.parent&&c.push({check:"it",el:a.parent});a.remove()}else if(F.$block[d]||d=="tr")if(b=="br"){if(a.previous&&!m(a.previous)){b=i();b.insertBefore(a)}if(a.next&&!m(a.next)){b=i();b.insertAfter(a)}a.replaceWithChildren()}else{var d= -a.children,e;b:{e=F[b];for(var f=0,k=d.length,r;f<k;++f){r=d[f];if(r.type==CKEDITOR.NODE_ELEMENT&&!e[r.name]){e=false;break b}}e=true}if(e){a.name=b;a.attributes={};c.push({check:"parent-down",el:a})}else{e=a.parent;for(var f=e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||e.name=="body",s,k=d.length;k>0;){r=d[--k];if(f&&(r.type==CKEDITOR.NODE_TEXT||r.type==CKEDITOR.NODE_ELEMENT&&F.$inline[r.name])){if(!s){s=new CKEDITOR.htmlParser.element(b);s.insertAfter(a);c.push({check:"parent-down",el:s})}s.add(r,0)}else{s= -null;r.insertAfter(a);e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(r.type==CKEDITOR.NODE_ELEMENT&&!F[e.name][r.name])&&c.push({check:"el-up",el:r})}}a.remove()}}else if(d=="style")a.remove();else{a.parent&&c.push({check:"it",el:a.parent});a.replaceWithChildren()}}function s(a,b,c){var d,e;for(d=0;d<c.length;++d){e=c[d];if((!e.check||a.check(e.check,false))&&(!e.left||e.left(b))){e.right(b,G);break}}}function u(a,b){var c=b.getDefinition(),d=c.attributes,e=c.styles,f,k,i,r;if(a.name!=c.element)return false; -for(f in d)if(f=="class"){c=d[f].split(/\s+/);for(i=a.classes.join("|");r=c.pop();)if(i.indexOf(r)==-1)return false}else if(a.attributes[f]!=d[f])return false;for(k in e)if(a.styles[k]!=e[k])return false;return true}function p(a,b){var c,d;if(typeof a=="string")c=a;else if(a instanceof CKEDITOR.style)d=a;else{c=a[0];d=a[1]}return[{element:c,left:d,right:function(a,c){c.transform(a,b)}}]}function O(a){return function(b){return u(b,a)}}function S(a){return function(b,c){c[a](b)}}var F=CKEDITOR.dtd, -J=1,L=CKEDITOR.tools.copy,I=CKEDITOR.tools.trim,w="cke-test",B=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a){this.allowedContent=[];this.disallowedContent=[];this.elementCallbacks=null;this.disabled=false;this.editor=null;this.id=CKEDITOR.tools.getNextNumber();this._={allowedRules:{elements:{},generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{}};CKEDITOR.filter.instances[this.id]=this;if(a instanceof CKEDITOR.editor){a=this.editor=a; -this.customConfig=true;var b=a.config.allowedContent;if(b===true)this.disabled=true;else{if(!b)this.customConfig=false;this.allow(b,"config",1);this.allow(a.config.extraAllowedContent,"extra",1);this.allow(B[a.enterMode]+" "+B[a.shiftEnterMode],"default",1);this.disallow(a.config.disallowedContent)}}else{this.customConfig=false;this.allow(a,"default",1)}};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(b,c,e){if(!d(this,b,e))return false;var f,k;if(typeof b=="string")b=n(b); -else if(b instanceof CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),c,e);f=b.getDefinition();b={};e=f.attributes;b[f.element]=f={styles:f.styles,requiredStyles:f.styles&&CKEDITOR.tools.objectKeys(f.styles)};if(e){e=L(e);f.classes=e["class"]?e["class"].split(/\s+/):null;f.requiredClasses=f.classes;delete e["class"];f.attributes=e;f.requiredAttributes=e&&CKEDITOR.tools.objectKeys(e)}}else if(CKEDITOR.tools.isArray(b)){for(f=0;f<b.length;++f)k=this.allow(b[f], -c,e);return k}a(this,b,c,this.allowedContent,this._.allowedRules);return true},applyTo:function(a,b,c,d){if(this.disabled)return false;var e=this,f=[],i=this.editor&&this.editor.config.protectedSource,r,m=false,s={doFilter:!c,doTransform:true,doCallbacks:true,toHtml:b};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if(a.attributes["data-cke-filter"]=="off")return false;if(!b||!(a.name=="span"&&~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-"))){r=z(e,a,f,s);if(r&J)m= -true;else if(r&2)return false}}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var d=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var k,p,A;if(i)for(p=0;p<i.length;++p)if((A=d.match(i[p]))&&A[0].length==d.length){c=true;break a}d=CKEDITOR.htmlParser.fragment.fromHtml(d);d.children.length==1&&(k=d.children[0]).type==CKEDITOR.NODE_ELEMENT&&z(e,k,c,s);c=!c.length}c||f.push(a)}},null,true);f.length&&(m=true);for(var p,a=[],d=B[d||(this.editor? -this.editor.enterMode:CKEDITOR.ENTER_P)];c=f.pop();)c.type==CKEDITOR.NODE_ELEMENT?k(c,d,a):c.remove();for(;p=a.pop();){c=p.el;if(c.parent)switch(p.check){case "it":F.$removeEmpty[c.name]&&!c.children.length?k(c,d,a):q(c)||k(c,d,a);break;case "el-up":c.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&!F[c.parent.name][c.name]&&k(c,d,a);break;case "parent-down":c.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&!F[c.parent.name][c.name]&&k(c.parent,d,a)}}return m},checkFeature:function(a){if(this.disabled|| -!a)return true;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=true},disallow:function(b){if(!d(this,b,true))return false;typeof b=="string"&&(b=n(b));a(this,b,null,this.disallowedContent,this._.disallowedRules);return true},addContentForms:function(a){if(!this.disabled&&a){var b,c,d=[],e;for(b=0;b<a.length&&!e;++b){c=a[b];if((typeof c=="string"||c instanceof CKEDITOR.style)&&this.check(c))e=c}if(e){for(b=0;b<a.length;++b)d.push(p(a[b], -e));this.addTransformations(d)}}},addElementCallback:function(a){if(!this.elementCallbacks)this.elementCallbacks=[];this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return true;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):true},addTransformations:function(a){var b, -c;if(!this.disabled&&a){var d=this._.transformations,e;for(e=0;e<a.length;++e){b=a[e];var f=void 0,k=void 0,i=void 0,r=void 0,m=void 0,s=void 0;c=[];for(k=0;k<b.length;++k){i=b[k];if(typeof i=="string"){i=i.split(/\s*:\s*/);r=i[0];m=null;s=i[1]}else{r=i.check;m=i.left;s=i.right}if(!f){f=i;f=f.element?f.element:r?r.match(/^([a-z0-9]+)/i)[0]:f.left.getDefinition().element}m instanceof CKEDITOR.style&&(m=O(m));c.push({check:r==f?null:r,left:m,right:typeof s=="string"?S(s):s})}b=f;d[b]||(d[b]=[]);d[b].push(c)}}}, -check:function(a,b,c){if(this.disabled)return true;if(CKEDITOR.tools.isArray(a)){for(var d=a.length;d--;)if(this.check(a[d],b,c))return true;return false}var e,f;if(typeof a=="string"){f=a+"<"+(b===false?"0":"1")+(c?"1":"0")+">";if(f in this._.cachedChecks)return this._.cachedChecks[f];d=n(a).$1;e=d.styles;var k=d.classes;d.name=d.elements;d.classes=k=k?k.split(/\s*,\s*/):[];d.styles=h(e);d.attributes=h(d.attributes);d.children=[];k.length&&(d.attributes["class"]=k.join(" "));if(e)d.attributes.style= -CKEDITOR.tools.writeCssText(d.styles);e=d}else{d=a.getDefinition();e=d.styles;k=d.attributes||{};if(e){e=L(e);k.style=CKEDITOR.tools.writeCssText(e,true)}else e={};e={name:d.element,attributes:k,classes:k["class"]?k["class"].split(/\s+/):[],styles:e,children:[]}}var k=CKEDITOR.tools.clone(e),i=[],m;if(b!==false&&(m=this._.transformations[e.name])){for(d=0;d<m.length;++d)s(this,e,m[d]);r(e)}z(this,k,i,{doFilter:true,doTransform:b!==false,skipRequired:!c,skipFinalValidation:!c});b=i.length>0?false: -CKEDITOR.tools.objectCompare(e.attributes,k.attributes,true)?true:false;typeof a=="string"&&(this._.cachedChecks[f]=b);return b},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,d){var e=a.slice(),f;if(this.check(B[c]))return c;for(d||(e=e.reverse());f=e.pop();)if(this.check(f))return b[f];return CKEDITOR.ENTER_BR}}()};var v={styles:1,attributes:1,classes:1},C={styles:"requiredStyles",attributes:"requiredAttributes", -classes:"requiredClasses"},A=/^([a-z0-9*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,E={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},ba=/^cke:(object|embed|param)$/,ca=/^(object|embed|param)$/,G=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a, -b,c){c=c||b;if(!(c in a.styles)){var d=a.attributes[b];if(d){/^\d+$/.test(d)&&(d=d+"px");a.styles[c]=d}}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var d=a.styles[b],e=d&&d.match(/^(\d+)(?:\.\d*)?px$/);e?a.attributes[c]=e[1]:d==w&&(a.attributes[c]=w)}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if(b=="left"||b=="right")a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in -a.attributes)){var b=a.styles["float"];if(b=="left"||b=="right")a.attributes.align=b}delete a.styles["float"]},matchesStyle:u,transform:function(a,b){if(typeof b=="string")a.name=b;else{var c=b.getDefinition(),d=c.styles,e=c.attributes,f,k,i,r;a.name=c.element;for(f in e)if(f=="class"){c=a.classes.join("|");for(i=e[f].split(/\s+/);r=i.pop();)c.indexOf(r)==-1&&a.classes.push(r)}else a.attributes[f]=e[f];for(k in d)a.styles[k]=d[k]}}}})(); -(function(){CKEDITOR.focusManager=function(a){if(a.focusManager)return a.focusManager;this.hasFocus=false;this.currentActive=null;this._={editor:a};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(a){this._.timer&&clearTimeout(this._.timer);if(a)this.currentActive=a;if(!this.hasFocus&&!this._.locked){(a=CKEDITOR.currentInstance)&&a.focusManager.blur(1);this.hasFocus=true;(a=this._.editor.container)&&a.addClass("cke_focus");this._.editor.fire("focus")}}, -lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(a){function e(){if(this.hasFocus){this.hasFocus=false;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var b=CKEDITOR.focusManager._.blurDelay;a||!b?e.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;e.call(this)},b,this)}},add:function(a,e){var b=a.getCustomData("focusmanager");if(!b|| -b!=this){b&&b.remove(a);var b="focus",c="blur";if(e)if(CKEDITOR.env.ie){b="focusin";c="focusout"}else CKEDITOR.event.useCapture=1;var f={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(a)}};a.on(b,f.focus,this);a.on(c,f.blur,this);if(e)CKEDITOR.event.useCapture=0;a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",f)}},remove:function(a){a.removeCustomData("focusmanager");var e=a.removeCustomData("focusmanager_handlers");a.removeListener("blur", -e.blur);a.removeListener("focus",e.focus)}}})();CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this}; -(function(){var a,e=function(b){var b=b.data,e=b.getKeystroke(),d=this.keystrokes[e],g=this._.editor;a=g.fire("key",{keyCode:e,domEvent:b})===false;if(!a){d&&(a=g.execCommand(d,{from:"keystrokeHandler"})!==false);a||(a=!!this.blockedKeystrokes[e])}a&&b.preventDefault(true);return!a},b=function(b){if(a){a=false;b.data.preventDefault(true)}};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",e,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",b,this)}}})(); -(function(){CKEDITOR.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(a,e,b){if(!a||!CKEDITOR.lang.languages[a])a=this.detect(e, -a);var c=this,e=function(){c[a].dir=c.rtl[a]?"rtl":"ltr";b(a,c[a])};this[a]?e():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),e,this)},detect:function(a,e){var b=this.languages,e=e||navigator.userLanguage||navigator.language||a,c=e.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),f=c[1],c=c[2];b[f+"-"+c]?f=f+"-"+c:b[f]||(f=null);CKEDITOR.lang.detect=f?function(){return f}:function(a){return a};return f||a}}})(); -CKEDITOR.scriptLoader=function(){var a={},e={};return{load:function(b,c,f,d){var g=typeof b=="string";g&&(b=[b]);f||(f=CKEDITOR);var j=b.length,l=[],h=[],n=function(a){c&&(g?c.call(f,a):c.call(f,l,h))};if(j===0)n(true);else{var t=function(a,b){(b?l:h).push(a);if(--j<=0){d&&CKEDITOR.document.getDocumentElement().removeStyle("cursor");n(b)}},y=function(b,c){a[b]=1;var d=e[b];delete e[b];for(var f=0;f<d.length;f++)d[f](b,c)},z=function(b){if(a[b])t(b,true);else{var d=e[b]||(e[b]=[]);d.push(t);if(!(d.length> -1)){var f=new CKEDITOR.dom.element("script");f.setAttributes({type:"text/javascript",src:b});if(c)if(CKEDITOR.env.ie&&CKEDITOR.env.version<11)f.$.onreadystatechange=function(){if(f.$.readyState=="loaded"||f.$.readyState=="complete"){f.$.onreadystatechange=null;y(b,true)}};else{f.$.onload=function(){setTimeout(function(){y(b,true)},0)};f.$.onerror=function(){y(b,false)}}f.appendTo(CKEDITOR.document.getHead())}}};d&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var o=0;o<j;o++)z(b[o])}}, -queue:function(){function a(){var b;(b=c[0])&&this.load(b.scriptUrl,b.callback,CKEDITOR,0)}var c=[];return function(e,d){var g=this;c.push({scriptUrl:e,callback:function(){d&&d.apply(this,arguments);c.shift();a.call(g)}});c.length==1&&a.call(this)}}()}}();CKEDITOR.resourceManager=function(a,e){this.basePath=a;this.fileName=e;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}}; -CKEDITOR.resourceManager.prototype={add:function(a,e){if(this.registered[a])throw'[CKEDITOR.resourceManager.add] The resource name "'+a+'" is already registered.';var b=this.registered[a]=e||{};b.name=a;b.path=this.getPath(a);CKEDITOR.fire(a+CKEDITOR.tools.capitalize(this.fileName)+"Ready",b);return this.get(a)},get:function(a){return this.registered[a]||null},getPath:function(a){var e=this.externals[a];return CKEDITOR.getUrl(e&&e.dir||this.basePath+a+"/")},getFilePath:function(a){var e=this.externals[a]; -return CKEDITOR.getUrl(this.getPath(a)+(e?e.file:this.fileName+".js"))},addExternal:function(a,e,b){for(var a=a.split(","),c=0;c<a.length;c++){var f=a[c];b||(e=e.replace(/[^\/]+$/,function(a){b=a;return""}));this.externals[f]={dir:e,file:b||this.fileName+".js"}}},load:function(a,e,b){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var c=this.loaded,f=this.registered,d=[],g={},j={},l=0;l<a.length;l++){var h=a[l];if(h)if(!c[h]&&!f[h]){var n=this.getFilePath(h);d.push(n);n in g||(g[n]=[]);g[n].push(h)}else j[h]= -this.get(h)}CKEDITOR.scriptLoader.load(d,function(a,d){if(d.length)throw'[CKEDITOR.resourceManager.load] Resource name "'+g[d[0]].join(",")+'" was not found at "'+d[0]+'".';for(var f=0;f<a.length;f++)for(var o=g[a[f]],r=0;r<o.length;r++){var q=o[r];j[q]=this.get(q);c[q]=1}e.call(b,j)},this)}};CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"); -CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var e={};return function(b,c,f){var d={},g=function(b){a.call(this,b,function(a){CKEDITOR.tools.extend(d,a);var b=[],j;for(j in a){var t=a[j],y=t&&t.requires;if(!e[j]){if(t.icons)for(var z=t.icons.split(","),o=z.length;o--;)CKEDITOR.skin.addIcon(z[o],t.path+"icons/"+(CKEDITOR.env.hidpi&&t.hidpi?"hidpi/":"")+z[o]+".png");e[j]=1}if(y){y.split&&(y=y.split(","));for(t=0;t<y.length;t++)d[y[t]]||b.push(y[t])}}if(b.length)g.call(this, -b);else{for(j in d){t=d[j];if(t.onLoad&&!t.onLoad._called){t.onLoad()===false&&delete d[j];t.onLoad._called=1}}c&&c.call(f||window,d)}},this)};g.call(this,b)}});CKEDITOR.plugins.setLang=function(a,e,b){var c=this.get(a),a=c.langEntries||(c.langEntries={}),c=c.lang||(c.lang=[]);c.split&&(c=c.split(","));CKEDITOR.tools.indexOf(c,e)==-1&&c.push(e);a[e]=b};CKEDITOR.ui=function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this}; -CKEDITOR.ui.prototype={add:function(a,e,b){b.name=a.toLowerCase();var c=this.items[a]={type:e,command:b.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(c,b)},get:function(a){return this.instances[a]},create:function(a){var e=this.items[a],b=e&&this._.handlers[e.type],c=e&&e.command&&this.editor.getCommand(e.command),b=b&&b.create.apply(this,e.args);this.instances[a]=b;c&&c.uiItems.push(b);if(b&&!b.type)b.type=e.type;return b},addHandler:function(a,e){this._.handlers[a]= -e},space:function(a){return CKEDITOR.document.getById(this.spaceId(a))},spaceId:function(a){return this.editor.id+"_"+a}};CKEDITOR.event.implementOn(CKEDITOR.ui); -(function(){function a(a,c,d){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(c!==void 0){if(c instanceof CKEDITOR.dom.element){if(!d)throw Error("One of the element modes must be specified.");}else throw Error("Expect element of type CKEDITOR.dom.element.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&d==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!(d==CKEDITOR.ELEMENT_MODE_INLINE?c.is(CKEDITOR.dtd.$editable)||c.is("textarea"):d==CKEDITOR.ELEMENT_MODE_REPLACE? -!c.is(CKEDITOR.dtd.$nonBodyContent):1))throw Error('The specified element mode is not supported on element: "'+c.getName()+'".');this.element=c;this.elementMode=d;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(c.getId()||c.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||e();this.id=CKEDITOR.tools.getNextId();this.status="unloaded";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this); -this.focusManager=new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("readOnly",b);this.on("selectionChange",function(a){f(this,a.data.path)});this.on("activeFilterChange",function(){f(this,this.elementPath(),true)});this.on("mode",b);this.on("instanceReady",function(){this.config.startupFocus&&this.focus()});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){g(this,a)},0,this)}function e(){do var a="editor"+ -++y;while(CKEDITOR.instances[a]);return a}function b(){var a=this.commands,b;for(b in a)c(this,a[b])}function c(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function f(a,b,c){if(b){var d,e,f=a.commands;for(e in f){d=f[e];(c||d.contextSensitive)&&d.refresh(a,b)}}}function d(a){var b=a.config.customConfig;if(!b)return false;var b=CKEDITOR.getUrl(b),c=z[b]||(z[b]={});if(c.fn){c.fn.call(a,a.config);(CKEDITOR.getUrl(a.config.customConfig)==b|| -!d(a))&&a.fireOnce("customConfigLoaded")}else CKEDITOR.scriptLoader.queue(b,function(){c.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};d(a)});return true}function g(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var c in b.on)a.on(c,b.on[c]);CKEDITOR.tools.extend(a.config,b,true);delete a.config.on}c=a.config;a.readOnly=!(!c.readOnly&&!(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.is("textarea")?a.element.hasAttribute("disabled"):a.element.isReadOnly():a.elementMode== -CKEDITOR.ELEMENT_MODE_REPLACE&&a.element.hasAttribute("disabled")));a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is("textarea")||CKEDITOR.dtd[a.element.getName()].p):false;a.tabIndex=c.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:c.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:c.shiftEnterMode;if(c.skin)CKEDITOR.skinName=c.skin;a.fireOnce("configLoaded");a.dataProcessor= -new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);j(a)});if(b&&b.customConfig!=void 0)a.config.customConfig=b.customConfig;d(a)||a.fireOnce("customConfigLoaded")}function j(a){CKEDITOR.skin.loadPart("editor",function(){l(a)})}function l(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,c){var d=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(c);a.title=typeof d=="string"||d===false?d:[a.lang.editor,a.name].join(", ");if(!a.config.contentsLangDirection)a.config.contentsLangDirection= -a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir;a.fire("langLoaded");h(a)})}function h(a){a.getStylesSet(function(b){a.once("loaded",function(){a.fire("stylesSet",{styles:b})},null,null,1);n(a)})}function n(a){var b=a.config,c=b.plugins,d=b.extraPlugins,e=b.removePlugins;if(d)var f=RegExp("(?:^|,)(?:"+d.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),c=c.replace(f,""),c=c+(","+d);if(e)var k=RegExp("(?:^|,)(?:"+e.replace(/\s*,\s*/g,"|")+")(?=,|$)","g"),c=c.replace(k,"");CKEDITOR.env.air&& -(c=c+",adobeair");CKEDITOR.plugins.load(c.split(","),function(c){var d=[],e=[],f=[];a.plugins=c;for(var i in c){var m=c[i],g=m.lang,q=null,h=m.requires,w;CKEDITOR.tools.isArray(h)&&(h=h.join(","));if(h&&(w=h.match(k)))for(;h=w.pop();)CKEDITOR.tools.setTimeout(function(a,b){throw Error('Plugin "'+a.replace(",","")+'" cannot be removed from the plugins list, because it\'s required by "'+b+'" plugin.');},0,null,[h,i]);if(g&&!a.lang[i]){g.split&&(g=g.split(","));if(CKEDITOR.tools.indexOf(g,a.langCode)>= -0)q=a.langCode;else{q=a.langCode.replace(/-.*/,"");q=q!=a.langCode&&CKEDITOR.tools.indexOf(g,q)>=0?q:CKEDITOR.tools.indexOf(g,"en")>=0?"en":g[0]}if(!m.langEntries||!m.langEntries[q])f.push(CKEDITOR.getUrl(m.path+"lang/"+q+".js"));else{a.lang[i]=m.langEntries[q];q=null}}e.push(q);d.push(m)}CKEDITOR.scriptLoader.load(f,function(){for(var c=["beforeInit","init","afterInit"],f=0;f<c.length;f++)for(var k=0;k<d.length;k++){var i=d[k];f===0&&(e[k]&&i.lang&&i.langEntries)&&(a.lang[i.name]=i.langEntries[e[k]]); -if(i[c[f]])i[c[f]](a)}a.fireOnce("pluginsLoaded");b.keystrokes&&a.setKeystroke(a.config.keystrokes);for(k=0;k<a.config.blockedKeystrokes.length;k++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[k]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)})})}function t(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b): -a.setHtml(b);return true}return false}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var y=0,z={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(a,b){b.name=a.toLowerCase();var d=new CKEDITOR.command(this,b);this.mode&&c(this,d);return this.commands[a]=d},_attachToForm:function(){var a=this,b=a.element,c=new CKEDITOR.dom.element(b.$.form);if(b.is("textarea")&&c){var d=function(c){a.updateElement();a._.required&&(!b.getValue()&&a.fire("required")===false)&&c.data.preventDefault()}; -c.on("submit",d);if(c.$.submit&&c.$.submit.call&&c.$.submit.apply)c.$.submit=CKEDITOR.tools.override(c.$.submit,function(a){return function(){d();a.apply?a.apply(this):a()}});a.on("destroy",function(){c.removeListener("submit",d)})}},destroy:function(a){this.fire("beforeDestroy");!a&&t.call(this);this.editable(null);this.status="destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){if(!a){a=this.getSelection(); -if(!a)return null;a=a.getStartElement()}return a?new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,b){var c=this.getCommand(a),d={name:a,commandData:b,command:c};if(c&&c.state!=CKEDITOR.TRISTATE_DISABLED&&this.fire("beforeCommandExec",d)!==false){d.returnValue=c.exec(d.commandData);if(!c.async&&this.fire("afterCommandExec",d)!==false)return d.returnValue}return false},getCommand:function(a){return this.commands[a]}, -getData:function(a){!a&&this.fire("beforeGetData");var b=this._.data;if(typeof b!="string")b=(b=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?b.is("textarea")?b.getValue():b.getHtml():"";b={dataValue:b};!a&&this.fire("getData",b);return b.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");if(typeof a!="string"){var b=this.element;b&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(a=b.is("textarea")?b.getValue():b.getHtml())}return a},loadSnapshot:function(a){this.fire("loadSnapshot", -a)},setData:function(a,b,c){var d=true,e=b;if(b&&typeof b=="object"){c=b.internal;e=b.callback;d=!b.noSnapshot}!c&&d&&this.fire("saveSnapshot");if(e||!c)this.once("dataReady",function(a){!c&&d&&this.fire("saveSnapshot");e&&e.call(a.editor)});a={dataValue:a};!c&&this.fire("setData",a);this._.data=a.dataValue;!c&&this.fire("afterSetData",a)},setReadOnly:function(a){a=a==void 0||a;if(this.readOnly!=a){this.readOnly=a;this.keystrokeHandler.blockedKeystrokes[8]=+a;this.editable().setReadOnly(a);this.fire("readOnly")}}, -insertHtml:function(a,b){this.fire("insertHtml",{dataValue:a,mode:b})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return this.status=="ready"&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return t.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])? -arguments[0]:[[].slice.call(arguments,0)],c,d,e=b.length;e--;){c=b[e];d=0;if(CKEDITOR.tools.isArray(c)){d=c[1];c=c[0]}d?a[c]=d:delete a[c]}},addFeature:function(a){return this.filter.addFeature(a)},setActiveFilter:function(a){if(!a)a=this.filter;if(this.activeFilter!==a){this.activeFilter=a;this.fire("activeFilterChange");a===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode),a.getAllowedEnterMode(this.shiftEnterMode,true))}},setActiveEnterMode:function(a, -b){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b){this.activeEnterMode=a;this.activeShiftEnterMode=b;this.fire("activeEnterModeChange")}}})})();CKEDITOR.ELEMENT_MODE_NONE=0;CKEDITOR.ELEMENT_MODE_REPLACE=1;CKEDITOR.ELEMENT_MODE_APPENDTO=2;CKEDITOR.ELEMENT_MODE_INLINE=3; -CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:RegExp("<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)--\>)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))","g")}}; -(function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,e={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(b){for(var c,f,d=0,g;c=this._.htmlPartsRegex.exec(b);){f=c.index;if(f>d){d=b.substring(d,f);if(g)g.push(d);else this.onText(d)}d= -this._.htmlPartsRegex.lastIndex;if(f=c[1]){f=f.toLowerCase();if(g&&CKEDITOR.dtd.$cdata[f]){this.onCDATA(g.join(""));g=null}if(!g){this.onTagClose(f);continue}}if(g)g.push(c[0]);else if(f=c[3]){f=f.toLowerCase();if(!/="/.test(f)){var j={},l;c=c[4];var h=!!(c&&c.charAt(c.length-1)=="/");if(c)for(;l=a.exec(c);){var n=l[1].toLowerCase();l=l[2]||l[3]||l[4]||"";j[n]=!l&&e[n]?n:CKEDITOR.tools.htmlDecodeAttr(l)}this.onTagOpen(f,j,h);!g&&CKEDITOR.dtd.$cdata[f]&&(g=[])}}else if(f=c[2])this.onComment(f)}if(b.length> -d)this.onText(b.substring(d,b.length))}}})(); -CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("<",a)},openTagClose:function(a,e){e?this._.output.push(" />"):this._.output.push(">")},attribute:function(a,e){typeof e=="string"&&(e=CKEDITOR.tools.htmlEncodeAttr(e));this._.output.push(" ",a,'="',e,'"')},closeTag:function(a){this._.output.push("</",a,">")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("<\!--",a,"--\>")},write:function(a){this._.output.push(a)}, -reset:function(){this._.output=[];this._.indent=false},getHtml:function(a){var e=this._.output.join("");a&&this.reset();return e}}});"use strict"; -(function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,e=CKEDITOR.tools.indexOf(a,this),b=this.previous,c=this.next;b&&(b.next=c);c&&(c.previous=b);a.splice(e,1);this.parent=null},replaceWith:function(a){var e=this.parent.children,b=CKEDITOR.tools.indexOf(e,this),c=a.previous=this.previous,f=a.next=this.next;c&&(c.next=a);f&&(f.previous=a);e[b]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var e=a.parent.children, -b=CKEDITOR.tools.indexOf(e,a),c=a.next;e.splice(b+1,0,this);this.next=a.next;this.previous=a;a.next=this;c&&(c.previous=this);this.parent=a.parent},insertBefore:function(a){var e=a.parent.children,b=CKEDITOR.tools.indexOf(e,a);e.splice(b,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var e=typeof a=="function"?a:typeof a=="string"?function(b){return b.name==a}:function(b){return b.name in a},b=this.parent;for(;b&& -b.type==CKEDITOR.NODE_ELEMENT;){if(e(b))return b;b=b.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}})();"use strict";CKEDITOR.htmlParser.comment=function(a){this.value=a;this._={isBlockLike:false}}; -CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a,e){var b=this.value;if(!(b=a.onComment(e,b,this))){this.remove();return false}if(typeof b!="string"){this.replaceWith(b);return false}this.value=b;return true},writeHtml:function(a,e){e&&this.filter(e);a.comment(this.value)}});"use strict"; -(function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:false}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,e){if(!(this.value=a.onText(e,this.value,this))){this.remove();return false}},writeHtml:function(a,e){e&&this.filter(e);a.text(this.value)}})})();"use strict"; -(function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})})();"use strict";CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false}}; -(function(){function a(a){return a.attributes["data-cke-survive"]?false:a.name=="a"&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var e=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),b={ol:1,ul:1},c=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),f={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml= -function(d,g,j){function l(a){var b;if(q.length>0)for(var c=0;c<q.length;c++){var d=q[c],e=d.name,f=CKEDITOR.dtd[e],k=i.name&&CKEDITOR.dtd[i.name];if((!k||k[e])&&(!a||!f||f[a]||!CKEDITOR.dtd[a])){if(!b){h();b=1}d=d.clone();d.parent=i;i=d;q.splice(c,1);c--}else if(e==i.name){t(i,i.parent,1);c--}}}function h(){for(;x.length;)t(x.shift(),i)}function n(a){if(a._.isBlockLike&&a.name!="pre"&&a.name!="textarea"){var b=a.children.length,c=a.children[b-1],d;if(c&&c.type==CKEDITOR.NODE_TEXT)(d=CKEDITOR.tools.rtrim(c.value))? -c.value=d:a.children.length=b-1}}function t(b,c,d){var c=c||i||r,e=i;if(b.previous===void 0){if(y(c,b)){i=c;o.onTagOpen(j,{});b.returnPoint=c=i}n(b);(!a(b)||b.children.length)&&c.add(b);b.name=="pre"&&(k=false);b.name=="textarea"&&(m=false)}if(b.returnPoint){i=b.returnPoint;delete b.returnPoint}else i=d?c:e}function y(a,b){if((a==r||a.name=="body")&&j&&(!a.name||CKEDITOR.dtd[a.name][j])){var c,d;return(c=b.attributes&&(d=b.attributes["data-cke-real-element-type"])?d:b.name)&&c in CKEDITOR.dtd.$inline&& -!(c in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function z(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||a=="dt"&&b=="dd"||a=="dd"&&b=="dt":false}var o=new CKEDITOR.htmlParser,r=g instanceof CKEDITOR.htmlParser.element?g:typeof g=="string"?new CKEDITOR.htmlParser.element(g):new CKEDITOR.htmlParser.fragment,q=[],x=[],i=r,m=r.name=="textarea",k=r.name=="pre";o.onTagOpen=function(d,f,p,r){f=new CKEDITOR.htmlParser.element(d,f);if(f.isUnknown&&p)f.isEmpty= -true;f.isOptionalClose=r;if(a(f))q.push(f);else{if(d=="pre")k=true;else{if(d=="br"&&k){i.add(new CKEDITOR.htmlParser.text("\n"));return}d=="textarea"&&(m=true)}if(d=="br")x.push(f);else{for(;;){r=(p=i.name)?CKEDITOR.dtd[p]||(i._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c;if(!f.isUnknown&&!i.isUnknown&&!r[d])if(i.isOptionalClose)o.onTagClose(p);else if(d in b&&p in b){p=i.children;(p=p[p.length-1])&&p.name=="li"||t(p=new CKEDITOR.htmlParser.element("li"),i);!f.returnPoint&&(f.returnPoint=i); -i=p}else if(d in CKEDITOR.dtd.$listItem&&!z(d,p))o.onTagOpen(d=="li"?"ul":"dl",{},0,1);else if(p in e&&!z(d,p)){!f.returnPoint&&(f.returnPoint=i);i=i.parent}else{p in CKEDITOR.dtd.$inline&&q.unshift(i);if(i.parent)t(i,i.parent,1);else{f.isOrphan=1;break}}else break}l(d);h();f.parent=i;f.isEmpty?t(f):i=f}}};o.onTagClose=function(a){for(var b=q.length-1;b>=0;b--)if(a==q[b].name){q.splice(b,1);return}for(var c=[],d=[],e=i;e!=r&&e.name!=a;){e._.isBlockLike||d.unshift(e);c.push(e);e=e.returnPoint||e.parent}if(e!= -r){for(b=0;b<c.length;b++){var f=c[b];t(f,f.parent)}i=e;e._.isBlockLike&&h();t(e,e.parent);if(e==i)i=i.parent;q=q.concat(d)}a=="body"&&(j=false)};o.onText=function(a){if((!i._.hasInlineStarted||x.length)&&!k&&!m){a=CKEDITOR.tools.ltrim(a);if(a.length===0)return}var b=i.name,d=b?CKEDITOR.dtd[b]||(i._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):c;if(!m&&!d["#"]&&b in e){o.onTagOpen(f[b]||"");o.onText(a)}else{h();l();!k&&!m&&(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a); -if(y(i,a))this.onTagOpen(j,{},0,1);i.add(a)}};o.onCDATA=function(a){i.add(new CKEDITOR.htmlParser.cdata(a))};o.onComment=function(a){h();l();i.add(new CKEDITOR.htmlParser.comment(a))};o.parse(d);for(h();i!=r;)t(i,i.parent,1);n(r);return r};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var c=b>0?this.children[b-1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT){c.value=CKEDITOR.tools.rtrim(c.value);if(c.value.length=== -0){this.children.pop();this.add(a);return}}c.next=a}a.previous=c;a.parent=this;this.children.splice(b,0,a);if(!this._.hasInlineStarted)this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike},filter:function(a,b){b=this.getFilterContext(b);a.onRoot(b,this);this.filterChildren(a,false,b)},filterChildren:function(a,b,c){if(this.childrenFilteredBy!=a.id){c=this.getFilterContext(c);if(b&&!this.parent)a.onRoot(c,this);this.childrenFilteredBy=a.id;for(b=0;b<this.children.length;b++)this.children[b].filter(a, -c)===false&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,c){var e=this.getFilterContext();if(c&&!this.parent&&b)b.onRoot(e,this);b&&this.filterChildren(b,false,e);b=0;c=this.children;for(e=c.length;b<e;b++)c[b].writeHtml(a)},forEach:function(a,b,c){if(!c&&(!b||this.type==b))var e=a(this);if(e!==false)for(var c=this.children,f=0;f<c.length;f++){e=c[f];e.type==CKEDITOR.NODE_ELEMENT?e.forEach(a,b):(!b||e.type==b)&&a(e)}},getFilterContext:function(a){return a|| -{}}}})();"use strict"; -(function(){function a(){this.rules=[]}function e(b,c,e,d){var g,j;for(g in c){(j=b[g])||(j=b[g]=new a);j.add(c[g],e,d)}}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(b){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new a;this.attributeNameRules=new a;this.elementsRules={};this.attributesRules={};this.textRules=new a;this.commentRules=new a;this.rootRules=new a;b&&this.addRules(b,10)},proto:{addRules:function(a,c){var f;if(typeof c=="number")f=c;else if(c&&"priority"in -c)f=c.priority;typeof f!="number"&&(f=10);typeof c!="object"&&(c={});a.elementNames&&this.elementNameRules.addMany(a.elementNames,f,c);a.attributeNames&&this.attributeNameRules.addMany(a.attributeNames,f,c);a.elements&&e(this.elementsRules,a.elements,f,c);a.attributes&&e(this.attributesRules,a.attributes,f,c);a.text&&this.textRules.add(a.text,f,c);a.comment&&this.commentRules.add(a.comment,f,c);a.root&&this.rootRules.add(a.root,f,c)},applyTo:function(a){a.filter(this)},onElementName:function(a,c){return this.elementNameRules.execOnName(a, -c)},onAttributeName:function(a,c){return this.attributeNameRules.execOnName(a,c)},onText:function(a,c,e){return this.textRules.exec(a,c,e)},onComment:function(a,c,e){return this.commentRules.exec(a,c,e)},onRoot:function(a,c){return this.rootRules.exec(a,c)},onElement:function(a,c){for(var e=[this.elementsRules["^"],this.elementsRules[c.name],this.elementsRules.$],d,g=0;g<3;g++)if(d=e[g]){d=d.exec(a,c,this);if(d===false)return null;if(d&&d!=c)return this.onNode(a,d);if(c.parent&&!c.name)break}return c}, -onNode:function(a,c){var e=c.type;return e==CKEDITOR.NODE_ELEMENT?this.onElement(a,c):e==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,c.value)):e==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,c.value)):null},onAttribute:function(a,c,e,d){return(e=this.attributesRules[e])?e.exec(a,d,c,this):d}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,c,e){this.rules.splice(this.findIndex(c),0,{value:a,priority:c,options:e})},addMany:function(a, -c,e){for(var d=[this.findIndex(c),0],g=0,j=a.length;g<j;g++)d.push({value:a[g],priority:c,options:e});this.rules.splice.apply(this.rules,d)},findIndex:function(a){for(var c=this.rules,e=c.length-1;e>=0&&a<c[e].priority;)e--;return e+1},exec:function(a,c){var e=c instanceof CKEDITOR.htmlParser.node||c instanceof CKEDITOR.htmlParser.fragment,d=Array.prototype.slice.call(arguments,1),g=this.rules,j=g.length,l,h,n,t;for(t=0;t<j;t++){if(e){l=c.type;h=c.name}n=g[t];if(!(a.nonEditable&&!n.options.applyToAll|| -a.nestedEditable&&n.options.excludeNestedEditable)){n=n.value.apply(null,d);if(n===false||e&&n&&(n.name!=h||n.type!=l))return n;n!=void 0&&(d[0]=c=n)}}return c},execOnName:function(a,c){for(var e=0,d=this.rules,g=d.length,j;c&&e<g;e++){j=d[e];!(a.nonEditable&&!j.options.applyToAll||a.nestedEditable&&j.options.excludeNestedEditable)&&(c=c.replace(j.value[0],j.value[1]))}return c}}})(); -(function(){function a(a,e){function m(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function p(a,e){return function(f){if(f.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var k=[],i=b(f),p,A;if(i)for(r(i,1)&&k.push(i);i;){if(d(i)&&(p=c(i))&&r(p))if((A=c(p))&&!d(A))k.push(p);else{m(s).insertAfter(p);p.remove()}i=i.previous}for(i=0;i<k.length;i++)k[i].remove();if(k=(typeof e=="function"?e(f):e)!==false)if(!s&&!CKEDITOR.env.needsBrFiller&& -f.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)k=false;else if(!s&&!CKEDITOR.env.needsBrFiller&&(document.documentMode>7||f.name in CKEDITOR.dtd.tr||f.name in CKEDITOR.dtd.$listItem))k=false;else{k=b(f);k=!k||f.name=="form"&&k.name=="input"}k&&f.add(m(a))}}}function r(a,b){if((!s||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&a.name=="br"&&!a.attributes["data-cke-eol"])return true;var c;if(a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(q))){if(c.index){(new CKEDITOR.htmlParser.text(a.value.substring(0, -c.index))).insertBefore(a);a.value=c[0]}if(!CKEDITOR.env.needsBrFiller&&s&&(!b||a.parent.name in h))return true;if(!s)if((c=a.previous)&&c.name=="br"||!c||d(c))return true}return false}var w={elements:{}},s=e=="html",h=CKEDITOR.tools.extend({},k),v;for(v in h)"#"in i[v]||delete h[v];for(v in h)w.elements[v]=p(s,a.config.fillEmptyBlocks);w.root=p(s,false);w.elements.br=function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var e=b.attributes;if("data-cke-bogus"in e||"data-cke-eol"in -e)delete e["data-cke-bogus"];else{for(e=b.next;e&&f(e);)e=e.next;var k=c(b);!e&&d(b.parent)?g(b.parent,m(a)):d(e)&&(k&&!d(k))&&m(a).insertBefore(e)}}}}(s);return w}function e(a,b){return a!=CKEDITOR.ENTER_BR&&b!==false?a==CKEDITOR.ENTER_DIV?"div":"p":false}function b(a){for(a=a.children[a.children.length-1];a&&f(a);)a=a.previous;return a}function c(a){for(a=a.previous;a&&f(a);)a=a.previous;return a}function f(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&& -a.attributes["data-cke-bookmark"]}function d(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in k||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function g(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;if(c){c.next=b;b.previous=c}}function j(a){a=a.attributes;a.contenteditable!="false"&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function l(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}} -function h(a){return a.replace(S,function(a,b,c){return"<"+b+c.replace(F,function(a,b){return J.test(b)&&c.indexOf("data-cke-saved-"+b)==-1?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+">"})}function n(a,b){return a.replace(b,function(a,b,c){a.indexOf("<textarea")===0&&(a=b+z(c).replace(/</g,"<").replace(/>/g,">")+"</textarea>");return"<cke:encoded>"+encodeURIComponent(a)+"</cke:encoded>"})}function t(a){return a.replace(w,function(a,b){return decodeURIComponent(b)})}function y(a){return a.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g, -function(a){return"<\!--"+x+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\>"})}function z(a){return a.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)})}function o(a,b){var c=b._.dataStore;return a.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function r(a,b){for(var c=[],d=b.config.protectedSource,e=b._.dataStore||(b._.dataStore= -{id:1}),f=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,d=[/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(d),a=a.replace(/<\!--[\s\S]*?--\>/g,function(a){return"<\!--{cke_tempcomment}"+(c.push(a)-1)+"--\>"}),k=0;k<d.length;k++)a=a.replace(d[k],function(a){a=a.replace(f,function(a,b,d){return c[d]});return/cke_temp(comment)?/.test(a)?a:"<\!--{cke_temp}"+(c.push(a)-1)+"--\>"});a=a.replace(f,function(a,b,d){return"<\!--"+x+(b?"{C}":"")+encodeURIComponent(c[d]).replace(/--/g, -"%2D%2D")+"--\>"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=>]+))+\s*>/g,function(a){return a.replace(/<\!--\{cke_protected\}([^>]*)--\>/g,function(a,b){e[e.id]=decodeURIComponent(b);return"{cke_protected_"+e.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,d,e){return"<"+c+d+">"+o(z(e),b)+"</"+c+">"})}CKEDITOR.htmlDataProcessor=function(b){var c,d,f=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter; -this.htmlFilter=d=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(s);c.addRules(u,{applyToAll:true});c.addRules(a(b,"data"),{applyToAll:true});d.addRules(p);d.addRules(O,{applyToAll:true});d.addRules(a(b,"html"),{applyToAll:true});b.on("toHtml",function(a){var a=a.data,c=a.dataValue,c=r(c,b),c=n(c,I),c=h(c),c=n(c,L),c=c.replace(B,"$1cke:$2"),c=c.replace(C,"<cke:$1$2></cke:$1>"),c=c.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi, -"$1data-cke-"+CKEDITOR.rnd+"-$2"),d=a.context||b.editable().getName(),f;if(CKEDITOR.env.ie&&CKEDITOR.env.version<9&&d=="pre"){d="div";c="<pre>"+c+"</pre>";f=1}d=b.document.createElement(d);d.setHtml("a"+c);c=d.getHtml().substr(1);c=c.replace(RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");f&&(c=c.replace(/^<pre>|<\/pre>$/gi,""));c=c.replace(v,"$1$2");c=t(c);c=z(c);a.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,a.fixForBody===false?false:e(a.enterMode,b.config.autoParagraph))},null,null, -5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,true,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(f.dataFilter,true)},null,null,10);b.on("toHtml",function(a){var a=a.data,b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(true);a.dataValue=y(b)},null,null,15);b.on("toDataFormat",function(a){var c=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^<br *\/?>/i, -""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,e(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(f.htmlFilter,true)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,false,true)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,d=f.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(true);c=z(c);c=o(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype= -{toHtml:function(a,b,c,d){var e=this.editor,f,k,i;if(b&&typeof b=="object"){f=b.context;c=b.fixForBody;d=b.dontFilter;k=b.filter;i=b.enterMode}else f=b;!f&&f!==null&&(f=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:f,fixForBody:c,dontFilter:d,filter:k||e.filter,enterMode:i||e.enterMode}).dataValue},toDataFormat:function(a,b){var c,d,e;if(b){c=b.context;d=b.filter;e=b.enterMode}!c&&c!==null&&(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a, -filter:d||this.editor.filter,context:c,enterMode:e||this.editor.enterMode}).dataValue}};var q=/(?: |\xa0)$/,x="{cke_protected}",i=CKEDITOR.dtd,m=["caption","colgroup","col","thead","tfoot","tbody"],k=CKEDITOR.tools.extend({},i.$blockLimit,i.$block),s={elements:{input:j,textarea:j}},u={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},p={elements:{embed:function(a){var b=a.parent;if(b&&b.name=="object"){var c=b.attributes.width,b=b.attributes.height;if(c)a.attributes.width= -c;if(b)a.attributes.height=b}},a:function(a){if(!a.children.length&&!a.attributes.name&&!a.attributes["data-cke-saved-name"])return false}}},O={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return false;for(var c=["name","href","src"],d,e=0;e<c.length;e++){d="data-cke-saved-"+c[e];d in b&&delete b[c[e]]}}return a},table:function(a){a.children.slice(0).sort(function(a, -b){var c,d;if(a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type){c=CKEDITOR.tools.indexOf(m,a.name);d=CKEDITOR.tools.indexOf(m,b.name)}if(!(c>-1&&d>-1&&c!=d)){c=a.parent?a.getIndex():-1;d=b.parent?b.getIndex():-1}return c>d?1:-1})},param:function(a){a.children=[];a.isEmpty=true;return a},span:function(a){a.attributes["class"]=="Apple-style-span"&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable}, -style:function(a){var b=a.children[0];if(b&&b.value)b.value=CKEDITOR.tools.trim(b.value);if(!a.attributes.type)a.attributes.type="text/css"},title:function(a){var b=a.children[0];!b&&g(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:l,textarea:l},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||false}}};if(CKEDITOR.env.ie)O.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})}; -var S=/<(a|area|img|input|source)\b([^>]*)>/gi,F=/([\w-]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,J=/^(href|src|name)$/i,L=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,I=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,w=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,B=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,v=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,C=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi})();"use strict"; -CKEDITOR.htmlParser.element=function(a,e){this.name=a;this.attributes=e||{};this.children=[];var b=a||"",c=b.match(/^cke:(.*)/);c&&(b=c[1]);b=!(!CKEDITOR.dtd.$nonBodyContent[b]&&!CKEDITOR.dtd.$block[b]&&!CKEDITOR.dtd.$listItem[b]&&!CKEDITOR.dtd.$tableContent[b]&&!(CKEDITOR.dtd.$nonEditable[b]||b=="br"));this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}}; -CKEDITOR.htmlParser.cssStyle=function(a){var e={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,c,f){c=="font-family"&&(f=f.replace(/["']/g,""));e[c.toLowerCase()]=f});return{rules:e,populate:function(a){var c=this.toString();if(c)a instanceof CKEDITOR.dom.element?a.setAttribute("style",c):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=c:a.style=c},toString:function(){var a=[],c; -for(c in e)e[c]&&a.push(c,":",e[c],";");return a.join("")}}}; -(function(){function a(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&(typeof a=="string"?b.name==a:b.name in a)}}var e=function(a,b){a=a[0];b=b[0];return a<b?-1:a>b?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var d=this,e,j,b=d.getFilterContext(b);if(b.off)return true; -if(!d.parent)a.onRoot(b,d);for(;;){e=d.name;if(!(j=a.onElementName(b,e))){this.remove();return false}d.name=j;if(!(d=a.onElement(b,d))){this.remove();return false}if(d!==this){this.replaceWith(d);return false}if(d.name==e)break;if(d.type!=CKEDITOR.NODE_ELEMENT){this.replaceWith(d);return false}if(!d.name){this.replaceWithChildren();return false}}e=d.attributes;var l,h;for(l in e){h=l;for(j=e[l];;)if(h=a.onAttributeName(b,l))if(h!=l){delete e[l];l=h}else break;else{delete e[l];break}h&&((j=a.onAttribute(b, -d,h,j))===false?delete e[h]:e[h]=j)}d.isEmpty||this.filterChildren(a,false,b);return true},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var d=this.name,g=[],j=this.attributes,l,h;a.openTag(d,j);for(l in j)g.push([l,j[l]]);a.sortAttributes&&g.sort(e);l=0;for(h=g.length;l<h;l++){j=g[l];a.attribute(j[0],j[1])}a.openTagClose(d,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(d)},writeChildrenHtml:b.writeChildrenHtml,replaceWithChildren:function(){for(var a= -this.children,b=a.length;b;)a[--b].insertAfter(this);this.remove()},forEach:b.forEach,getFirst:function(b){if(!b)return this.children.length?this.children[0]:null;typeof b!="function"&&(b=a(b));for(var e=0,d=this.children.length;e<d;++e)if(b(this.children[e]))return this.children[e];return null},getHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(a);return a.getHtml()},setHtml:function(a){for(var a=this.children=CKEDITOR.htmlParser.fragment.fromHtml(a).children,b=0, -d=a.length;b<d;++b)a[b].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var b=this.children.splice(a,this.children.length-a),d=this.clone(),e=0;e<b.length;++e)b[e].parent=d;d.children=b;if(b[0])b[0].previous=null;if(a>0)this.children[a-1].next=null;this.parent.add(d,this.getIndex()+1);return d},addClass:function(a){if(!this.hasClass(a)){var b=this.attributes["class"]||"";this.attributes["class"]=b+(b?" ":"")+ -a}},removeClass:function(a){var b=this.attributes["class"];if(b)(b=CKEDITOR.tools.trim(b.replace(RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"]},hasClass:function(a){var b=this.attributes["class"];return!b?false:RegExp("(?:^|\\s)"+a+"(?=\\s|$)").test(b)},getFilterContext:function(a){var b=[];a||(a={off:false,nonEditable:false,nestedEditable:false});!a.off&&this.attributes["data-cke-processor"]=="off"&&b.push("off",true);!a.nonEditable&&this.attributes.contenteditable== -"false"?b.push("nonEditable",true):a.nonEditable&&(!a.nestedEditable&&this.attributes.contenteditable=="true")&&b.push("nestedEditable",true);if(b.length)for(var a=CKEDITOR.tools.copy(a),d=0;d<b.length;d=d+2)a[b[d]]=b[d+1];return a}},true)})(); -(function(){var a={},e=/{([^}]+)}/g,b=/([\\'])/g,c=/\n/g,f=/\r/g;CKEDITOR.template=function(d){if(a[d])this.output=a[d];else{var g=d.replace(b,"\\$1").replace(c,"\\n").replace(f,"\\r").replace(e,function(a,b){return"',data['"+b+"']==undefined?'{"+b+"}':data['"+b+"'],'"});this.output=a[d]=Function("data","buffer","return buffer?buffer.push('"+g+"'):['"+g+"'].join('');")}}})();delete CKEDITOR.loadFullCore;CKEDITOR.instances={};CKEDITOR.document=new CKEDITOR.dom.document(document); -CKEDITOR.add=function(a){CKEDITOR.instances[a.name]=a;a.on("focus",function(){if(CKEDITOR.currentInstance!=a){CKEDITOR.currentInstance=a;CKEDITOR.fire("currentInstance")}});a.on("blur",function(){if(CKEDITOR.currentInstance==a){CKEDITOR.currentInstance=null;CKEDITOR.fire("currentInstance")}});CKEDITOR.fire("instance",null,a)};CKEDITOR.remove=function(a){delete CKEDITOR.instances[a.name]}; -(function(){var a={};CKEDITOR.addTemplate=function(e,b){var c=a[e];if(c)return c;c={name:e,source:b};CKEDITOR.fire("template",c);return a[e]=new CKEDITOR.template(c.source)};CKEDITOR.getTemplate=function(e){return a[e]}})();(function(){var a=[];CKEDITOR.addCss=function(e){a.push(e)};CKEDITOR.getCss=function(){return a.join("\n")}})();CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")});CKEDITOR.TRISTATE_ON=1;CKEDITOR.TRISTATE_OFF=2; -CKEDITOR.TRISTATE_DISABLED=0; -(function(){CKEDITOR.inline=function(a,e){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var b=new CKEDITOR.editor(e,a,CKEDITOR.ELEMENT_MODE_INLINE),c=a.is("textarea")?a:null;if(c){b.setData(c.getValue(),null,true);a=CKEDITOR.dom.element.createFromHtml('<div contenteditable="'+!!b.readOnly+'" class="cke_textarea_inline">'+c.getValue()+"</div>",CKEDITOR.document); -a.insertAfter(c);c.hide();c.$.form&&b._attachToForm()}else b.setData(a.getHtml(),null,true);b.on("loaded",function(){b.fire("uiReady");b.editable(a);b.container=a;b.setData(b.getData(1));b.resetDirty();b.fire("contentDom");b.mode="wysiwyg";b.fire("mode");b.status="ready";b.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,b)},null,null,1E4);b.on("destroy",function(){if(c){b.container.clearCustomData();b.container.remove();c.show()}b.element.clearCustomData();delete b.element});return b}; -CKEDITOR.inlineAll=function(){var a,e,b;for(b in CKEDITOR.dtd.$editable)for(var c=CKEDITOR.document.getElementsByTag(b),f=0,d=c.count();f<d;f++){a=c.getItem(f);if(a.getAttribute("contenteditable")=="true"){e={element:a,config:{}};CKEDITOR.fire("inline",e)!==false&&CKEDITOR.inline(a,e.config)}}};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})})();CKEDITOR.replaceClass="ckeditor"; -(function(){function a(a,f,d,g){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var j=new CKEDITOR.editor(f,a,g);if(g==CKEDITOR.ELEMENT_MODE_REPLACE){a.setStyle("visibility","hidden");j._.required=a.hasAttribute("required");a.removeAttribute("required")}d&&j.setData(d,null,true);j.on("loaded",function(){b(j);g==CKEDITOR.ELEMENT_MODE_REPLACE&&(j.config.autoUpdateElement&& -a.$.form)&&j._attachToForm();j.setMode(j.config.startupMode,function(){j.resetDirty();j.status="ready";j.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,j)})});j.on("destroy",e);return j}function e(){var a=this.container,b=this.element;if(a){a.clearCustomData();a.remove()}if(b){b.clearCustomData();if(this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE){b.show();this._.required&&b.setAttribute("required","required")}delete this.element}}function b(a){var b=a.name,d=a.element,e=a.elementMode, -j=a.fire("uiSpace",{space:"top",html:""}).html,l=a.fire("uiSpace",{space:"bottom",html:""}).html,h=new CKEDITOR.template('<{outerEl} id="cke_{name}" class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" lang="{langCode}" role="application"'+(a.title?' aria-labelledby="cke_{name}_arialbl"':"")+">"+(a.title?'<span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span>':"")+'<{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation"></{outerEl}>{bottomHtml}</{outerEl}></{outerEl}>'), -b=CKEDITOR.dom.element.createFromHtml(h.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:j?'<span id="'+a.ui.spaceId("top")+'" class="cke_top cke_reset_all" role="presentation" style="height:auto">'+j+"</span>":"",contentId:a.ui.spaceId("contents"),bottomHtml:l?'<span id="'+a.ui.spaceId("bottom")+'" class="cke_bottom cke_reset_all" role="presentation">'+l+"</span>":"",outerEl:CKEDITOR.env.ie?"span":"div"}));if(e==CKEDITOR.ELEMENT_MODE_REPLACE){d.hide();b.insertAfter(d)}else d.append(b); -a.container=b;j&&a.ui.space("top").unselectable();l&&a.ui.space("bottom").unselectable();d=a.config.width;e=a.config.height;d&&b.setStyle("width",CKEDITOR.tools.cssLength(d));e&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(e));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(b,e){return a(b,e,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(b,e,d){return a(b,e,d,CKEDITOR.ELEMENT_MODE_APPENDTO)}; -CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b<a.length;b++){var d=null,e=a[b];if(e.name||e.id){if(typeof arguments[0]=="string"){if(!RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)").test(e.className))continue}else if(typeof arguments[0]=="function"){d={};if(arguments[0](e,d)===false)continue}this.replace(e,d)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes={}))[a]=b};CKEDITOR.editor.prototype.setMode=function(a,b){var d=this,e= -this._.modes;if(!(a==d.mode||!e||!e[a])){d.fire("beforeSetMode",a);if(d.mode){var j=d.checkDirty(),e=d._.previousModeData,l,h=0;d.fire("beforeModeUnload");d.editable(0);d._.previousMode=d.mode;d._.previousModeData=l=d.getData(1);if(d.mode=="source"&&e==l){d.fire("lockSnapshot",{forceUpdate:true});h=1}d.ui.space("contents").setHtml("");d.mode=""}else d._.previousModeData=d.getData(1);this._.modes[a](function(){d.mode=a;j!==void 0&&!j&&d.resetDirty();h?d.fire("unlockSnapshot"):a=="wysiwyg"&&d.fire("saveSnapshot"); -setTimeout(function(){d.fire("mode");b&&b.call(d)},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,d,e){var j=this.container,l=this.ui.space("contents"),h=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement,e=e?j.getChild(1):j;e.setSize("width",a,true);h&&(h.style.width="1%");l.setStyle("height",Math.max(b-(d?0:(e.$.offsetHeight||0)-(l.$.clientHeight||0)),0)+"px");h&&(h.style.width="100%");this.fire("resize")};CKEDITOR.editor.prototype.getResizable=function(a){return a? -this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})})();CKEDITOR.config.startupMode="wysiwyg"; -(function(){function a(a){var b=a.editor,d=a.data.path,f=d.blockLimit,m=a.data.selection,k=m.getRanges()[0],s;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(m=e(m,d)){m.appendBogus();s=CKEDITOR.env.ie}if(b.config.autoParagraph!==false&&b.activeEnterMode!=CKEDITOR.ENTER_BR&&b.editable().equals(f)&&!d.block&&k.collapsed&&!k.getCommonAncestor().isReadOnly()){d=k.clone();d.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);f=new CKEDITOR.dom.walker(d);f.guard=function(a){return!c(a)||a.type== -CKEDITOR.NODE_COMMENT||a.isReadOnly()};if(!f.checkForward()||d.checkStartOfBlock()&&d.checkEndOfBlock()){b=k.fixBlock(true,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p");if(!CKEDITOR.env.needsBrFiller)(b=b.getFirst(c))&&(b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?: |\xa0)$/))&&b.remove();s=1;a.cancel()}}s&&k.select()}function e(a,b){if(a.isFake)return 0;var d=b.block||b.blockLimit,e=d&&d.getLast(c);if(d&&d.isBlockBoundary()&&(!e||!(e.type==CKEDITOR.NODE_ELEMENT&& -e.isBlockBoundary()))&&!d.is("pre")&&!d.getBogus())return d}function b(a){var b=a.data.getTarget();if(b.is("input")){b=b.getAttribute("type");(b=="submit"||b=="reset")&&a.data.preventDefault()}}function c(a){return t(a)&&y(a)}function f(a,b){return function(c){var d=CKEDITOR.dom.element.get(c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget);(!d||!b.equals(d)&&!b.contains(d))&&a.call(this,c)}}function d(a){var b,d=a.getRanges()[0],e=a.root,f={table:1,ul:1,ol:1,dl:1};if(d.startPath().contains(f)){var a= -function(a){return function(d,e){e&&(d.type==CKEDITOR.NODE_ELEMENT&&d.is(f))&&(b=d);if(!e&&c(d)&&(!a||!h(d)))return false}},k=d.clone();k.collapse(1);k.setStartAt(e,CKEDITOR.POSITION_AFTER_START);e=new CKEDITOR.dom.walker(k);e.guard=a();e.checkBackward();if(b){k=d.clone();k.collapse();k.setEndAt(b,CKEDITOR.POSITION_AFTER_END);e=new CKEDITOR.dom.walker(k);e.guard=a(true);b=false;e.checkForward();return b}}return null}function g(a){a.editor.focus();a.editor.fire("saveSnapshot")}function j(a){var b= -a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},0)}function l(a,b,c){for(var d=a.getCommonAncestor(b),b=a=c?b:a;(a=a.getParent())&&!d.equals(a)&&a.getChildCount()==1;)b=a;b.remove()}CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||b);this.editor=a;this.status="unloaded";this.hasFocus=false;this.setup()},proto:{focus:function(){var a;if(CKEDITOR.env.webkit&&!this.hasFocus){a=this.editor._.previousActive|| -this.getDocument().getActive();if(this.contains(a)){a.focus();return}}try{this.$[CKEDITOR.env.ie&&this.getDocument().equals(CKEDITOR.document)?"setActive":"focus"]()}catch(b){if(!CKEDITOR.env.ie)throw b;}if(CKEDITOR.env.safari&&!this.isInline()){a=CKEDITOR.document.getActive();a.equals(this.getWindow().getFrame())||this.getWindow().focus()}},on:function(a,b){var c=Array.prototype.slice.call(arguments,0);if(CKEDITOR.env.ie&&/^focus|blur$/.exec(a)){a=a=="focus"?"focusin":"focusout";b=f(b,this);c[0]= -a;c[1]=b}return CKEDITOR.dom.element.prototype.on.apply(this,c)},attachListener:function(a,b,c,d,e,f){!this._.listeners&&(this._.listeners=[]);var s=Array.prototype.slice.call(arguments,1),s=a.on.apply(a,s);this._.listeners.push(s);return s},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=this._.attrChanges,b,c;for(c in a)if(a.hasOwnProperty(c)){b=a[c];b!==null?this.setAttribute(c,b):this.removeAttribute(c)}},attachClass:function(a){var b= -this.getCustomData("classes");if(!this.hasClass(a)){!b&&(b=[]);b.push(a);this.setCustomData("classes",b);this.addClass(a)}},changeAttr:function(a,b){var c=this.getAttribute(a);if(b!==c){!this._.attrChanges&&(this._.attrChanges={});a in this._.attrChanges||(this._.attrChanges[a]=c);this.setAttribute(a,b)}},insertHtml:function(a,b){g(this);z(this,b||"html",a)},insertText:function(a){g(this);var b=this.editor,c=b.getSelection().getStartElement().hasAscendant("pre",true)?CKEDITOR.ENTER_BR:b.activeEnterMode, -b=c==CKEDITOR.ENTER_BR,d=CKEDITOR.tools,a=d.htmlEncode(a.replace(/\r\n/g,"\n")),a=a.replace(/\t/g,"    "),c=c==CKEDITOR.ENTER_P?"p":"div";if(!b){var e=/\n{2}/g;if(e.test(a))var f="<"+c+">",s="</"+c+">",a=f+a.replace(e,function(){return s+f})+s}a=a.replace(/\n/g,"<br>");b||(a=a.replace(RegExp("<br>(?=</"+c+">)"),function(a){return d.repeat(a,2)}));a=a.replace(/^ | $/g," ");a=a.replace(/(>|\s) /g,function(a,b){return b+" "}).replace(/ (?=<)/g," ");z(this,"text",a)},insertElement:function(a, -b){b?this.insertElementIntoRange(a,b):this.insertElementIntoSelection(a)},insertElementIntoRange:function(a,b){var c=this.editor,d=c.config.enterMode,e=a.getName(),f=CKEDITOR.dtd.$block[e];if(b.checkReadOnly())return false;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})&&o(b);var s,h;if(f)for(;(s=b.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[s.getName()])&&(!h||!h[e]);)if(s.getName()in CKEDITOR.dtd.span)b.splitElement(s);else if(b.checkStartOfBlock()&& -b.checkEndOfBlock()){b.setStartBefore(s);b.collapse(true);s.remove()}else b.splitBlock(d==CKEDITOR.ENTER_DIV?"div":"p",c.editable());b.insertNode(a);return true},insertElementIntoSelection:function(a){g(this);var b=this.editor,d=b.activeEnterMode,b=b.getSelection(),e=b.getRanges()[0],f=a.getName(),f=CKEDITOR.dtd.$block[f];if(this.insertElementIntoRange(a,e)){e.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);if(f)if((f=a.getNext(function(a){return c(a)&&!h(a)}))&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$block))f.getDtd()["#"]? -e.moveToElementEditStart(f):e.moveToElementEditEnd(a);else if(!f&&d!=CKEDITOR.ENTER_BR){f=e.fixBlock(true,d==CKEDITOR.ENTER_DIV?"div":"p");e.moveToElementEditStart(f)}}b.selectRanges([e]);j(this)},setData:function(a,b){b||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);if(this.status=="unloaded")this.status="ready";this.editor.fire("dataReady")},getData:function(a){var b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable", -!a)},detach:function(){this.removeClass("cke_editable");this.status="detached";var a=this.editor;this._.detach();delete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||a.config.ignoreEmptyParagraph!==false&&(b=b.replace(n,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data= -this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&b.type=="Control"||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a, -"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");this.attachClass(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"cke_editable_inline":a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE||a.elementMode==CKEDITOR.ELEMENT_MODE_APPENDTO?"cke_editable_themed":"");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus= -false},null,null,-1);this.on("focus",function(){this.hasFocus=true},null,null,-1);a.focusManager.add(this);if(this.equals(CKEDITOR.document.getActive())){this.hasFocus=true;a.once("contentDom",function(){a.focusManager.focus()})}this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var e=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var f=a.config.contentsLangDirection;this.getDirection(1)!= -f&&this.changeAttr("dir",f);var i=CKEDITOR.getCss();if(i){f=e.getHead();if(!f.getCustomData("stylesheet")){i=e.appendStyleText(i);i=new CKEDITOR.dom.element(i.ownerNode||i.owningElement);f.setCustomData("stylesheet",i);i.data("cke-temp",1)}}f=e.getCustomData("stylesheet_ref")||0;e.setCustomData("stylesheet_ref",f+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){var a=a.data,b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a"); -b&&(a.$.button!=2&&b.isReadOnly())&&a.preventDefault()});var m={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return true;var c=b.data.domEvent.getKey(),e;if(c in m){var b=a.getSelection(),f,i=b.getRanges()[0],h=i.startPath(),g,j,l,c=c==8;if(CKEDITOR.env.ie&&CKEDITOR.env.version<11&&(f=b.getSelectedElement())||(f=d(b))){a.fire("saveSnapshot");i.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove();i.select();a.fire("saveSnapshot");e=1}else if(i.collapsed)if((g=h.block)&&(l= -g[c?"getPrevious":"getNext"](t))&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("table")&&i[c?"checkStartOfBlock":"checkEndOfBlock"]()){a.fire("saveSnapshot");i[c?"checkEndOfBlock":"checkStartOfBlock"]()&&g.remove();i["moveToElementEdit"+(c?"End":"Start")](l);i.select();a.fire("saveSnapshot");e=1}else if(h.blockLimit&&h.blockLimit.is("td")&&(j=h.blockLimit.getAscendant("table"))&&i.checkBoundaryOfElement(j,c?CKEDITOR.START:CKEDITOR.END)&&(l=j[c?"getPrevious":"getNext"](t))){a.fire("saveSnapshot");i["moveToElementEdit"+ -(c?"End":"Start")](l);i.checkStartOfBlock()&&i.checkEndOfBlock()?l.remove():i.select();a.fire("saveSnapshot");e=1}else if((j=h.contains(["td","th","caption"]))&&i.checkBoundaryOfElement(j,c?CKEDITOR.START:CKEDITOR.END))e=1}return!e});a.blockless&&(CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)&&this.attachListener(this,"keyup",function(b){if(b.data.getKeystroke()in m&&!this.getFirst(c)){this.appendBogus();b=a.createRange();b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START);b.select()}});this.attachListener(this, -"dblclick",function(b){if(a.readOnly)return false;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);CKEDITOR.env.ie||this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();if(c.is("img","hr","input","textarea","select")&&!c.isReadOnly()){a.getSelection().selectElement(c);c.is("input","textarea","select")&&b.data.preventDefault()}});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(b.data.$.button==2){b= -b.data.getTarget();if(!b.getOuterHtml().replace(n,"")){var c=a.createRange();c.moveToElementEditStart(b);c.select(true)}}});if(CKEDITOR.env.webkit){this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()});this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()})}CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){b=b.data.domEvent.getKey();if(b in m){var c=b==8,d=a.getSelection().getRanges()[0], -b=d.startPath();if(d.collapsed){var e;a:{var f=b.block;if(f)if(d[c?"checkStartOfBlock":"checkEndOfBlock"]())if(!d.moveToClosestEditablePosition(f,!c)||!d.collapsed)e=false;else{if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var i=d.startContainer.getChild(d.startOffset-(c?1:0));if(i&&i.type==CKEDITOR.NODE_ELEMENT&&i.is("hr")){a.fire("saveSnapshot");i.remove();e=true;break a}}if((d=d.startPath().block)&&(!d||!d.contains(f))){a.fire("saveSnapshot");var h;(h=(c?d:f).getBogus())&&h.remove();e=a.getSelection(); -h=e.createBookmarks();(c?f:d).moveChildren(c?d:f,false);b.lastElement.mergeSiblings();l(f,d,!c);e.selectBookmarks(h);e=true}}else e=false;else e=false}if(!e)return}else{c=d;e=b.block;h=c.endPath().block;if(!e||!h||e.equals(h))b=false;else{a.fire("saveSnapshot");(f=e.getBogus())&&f.remove();c.deleteContents();if(h.getParent()){h.moveChildren(e,false);b.lastElement.mergeSiblings();l(e,h,true)}c=a.getSelection().getRanges()[0];c.collapse(1);c.select();b=true}if(!b)return}a.getSelection().scrollIntoView(); -a.fire("saveSnapshot");return false}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");if(--c)a.setCustomData("stylesheet_ref",c);else{a.removeCustomData("stylesheet_ref");b.removeCustomData("stylesheet").remove()}}}this.editor.fire("contentDomUnload"); -delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(arguments.length)b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null);return b};var h=CKEDITOR.dom.walker.bogus(),n=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,t=CKEDITOR.dom.walker.whitespaces(true),y=CKEDITOR.dom.walker.bookmark(false,true);CKEDITOR.on("instanceLoaded", -function(b){var c=b.editor;c.on("insertElement",function(a){a=a.data;if(a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))){a.getAttribute("contentEditable")!="false"&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1");a.setAttribute("contentEditable",false)}});c.on("selectionChange",function(b){if(!c.readOnly){var d=c.getSelection();if(d&&!d.isLocked){d=c.checkDirty();c.fire("lockSnapshot");a(b);c.fire("unlockSnapshot");!d&&c.resetDirty()}}})});CKEDITOR.on("instanceCreated", -function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);var d=b.fire("ariaEditorHelpLabel",{}).label;if(d)if(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var e=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('<span id="'+e+'" class="cke_voice_label">'+d+"</span>");c.append(d);a.changeAttr("aria-describedby",e)}}})}); -CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var z=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,f,i,k,m=[],p=d.range.startContainer;e=d.range.startPath();for(var p=h[p.getName()],C=0,g=c.getChildren(),j=g.count(),l=-1,n=-1,u=0,o=e.contains(h.$list);C<j;++C){e=g.getItem(C);if(a(e)){i=e.getName();if(o&&i in CKEDITOR.dtd.$list)m=m.concat(b(e,d));else{k=!!p[i];if(i=="br"&&e.data("cke-eol")&& -(!C||C==j-1)){u=(f=C?m[C-1].node:g.getItem(C+1))&&(!a(f)||!f.is("br"));f=f&&a(f)&&h.$block[f.getName()]}l==-1&&!k&&(l=C);k||(n=C);m.push({isElement:1,isLineBreak:u,isBlock:e.isBlockBoundary(),hasBlockSibling:f,node:e,name:i,allowed:k});f=u=0}}else m.push({isElement:0,node:e,allowed:1})}if(l>-1)m[l].firstNotAllowed=1;if(n>-1)m[n].lastNotAllowed=1;return m}function d(b,c){var e=[],f=b.getChildren(),i=f.count(),k,m=0,p=h[c],C=!b.is(h.$inline)||b.is("br");for(C&&e.push(" ");m<i;m++){k=f.getItem(m);a(k)&& -!k.is(p)?e=e.concat(d(k,c)):e.push(k)}C&&e.push(" ");return e}function e(b){return b&&a(b)&&(b.is(h.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function f(b,c,d,e){var k=b.clone(),i,p;k.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);if((i=(new CKEDITOR.dom.walker(k)).next())&&a(i)&&g[i.getName()]&&(p=i.getPrevious())&&a(p)&&!p.getParent().equals(b.startContainer)&&d.contains(p)&&e.contains(i)&&i.isIdentical(p)){i.moveChildren(p);i.remove();f(b,c,d,e)}}function k(b,c){function d(b,c){if(c.isBlock&&c.isElement&& -!c.node.is("br")&&a(b)&&b.is("br")){b.remove();return 1}}var e=c.endContainer.getChild(c.endOffset),f=c.endContainer.getChild(c.endOffset-1);e&&d(e,b[b.length-1]);if(f&&d(f,b[0])){c.setEnd(c.endContainer,c.endOffset-1);c.collapse()}}var h=CKEDITOR.dtd,g={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},p={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},l=CKEDITOR.tools.extend({},h.$inline);delete l.br;return function(g,n,u){var o=g.editor;g.getDocument();var t=o.getSelection().getRanges()[0], -w=false;if(n=="unfiltered_html"){n="html";w=true}if(!t.checkReadOnly()){var B=(new CKEDITOR.dom.elementPath(t.startContainer,t.root)).blockLimit||t.root,n={type:n,dontFilter:w,editable:g,editor:o,range:t,blockLimit:B,mergeCandidates:[],zombies:[]},o=n.range,w=n.mergeCandidates,v,C,A,E;if(n.type=="text"&&o.shrink(CKEDITOR.SHRINK_ELEMENT,true,false)){v=CKEDITOR.dom.element.createFromHtml("<span> </span>",o.document);o.insertNode(v);o.setStartAfter(v)}C=new CKEDITOR.dom.elementPath(o.startContainer); -n.endPath=A=new CKEDITOR.dom.elementPath(o.endContainer);if(!o.collapsed){var B=A.block||A.blockLimit,y=o.getCommonAncestor();B&&(!B.equals(y)&&!B.contains(y)&&o.checkEndOfBlock())&&n.zombies.push(B);o.deleteContents()}for(;(E=a(o.startContainer)&&o.startContainer.getChild(o.startOffset-1))&&a(E)&&E.isBlockBoundary()&&C.contains(E);)o.moveToPosition(E,CKEDITOR.POSITION_BEFORE_END);f(o,n.blockLimit,C,A);if(v){o.setEndBefore(v);o.collapse();v.remove()}v=o.startPath();if(B=v.contains(e,false,1)){o.splitElement(B); -n.inlineStylesRoot=B;n.inlineStylesPeak=v.lastElement}v=o.createBookmark();(B=v.startNode.getPrevious(c))&&a(B)&&e(B)&&w.push(B);(B=v.startNode.getNext(c))&&a(B)&&e(B)&&w.push(B);for(B=v.startNode;(B=B.getParent())&&e(B);)w.push(B);o.moveToBookmark(v);if(v=u){v=n.range;if(n.type=="text"&&n.inlineStylesRoot){E=n.inlineStylesPeak;o=E.getDocument().createText("{cke-peak}");for(w=n.inlineStylesRoot.getParent();!E.equals(w);){o=o.appendTo(E.clone());E=E.getParent()}u=o.getOuterHtml().split("{cke-peak}").join(u)}E= -n.blockLimit.getName();if(/^\s+|\s+$/.test(u)&&"span"in CKEDITOR.dtd[E])var z='<span data-cke-marker="1"> </span>',u=z+u+z;u=n.editor.dataProcessor.toHtml(u,{context:null,fixForBody:false,dontFilter:n.dontFilter,filter:n.editor.activeFilter,enterMode:n.editor.activeEnterMode});E=v.document.createElement("body");E.setHtml(u);if(z){E.getFirst().remove();E.getLast().remove()}if((z=v.startPath().block)&&!(z.getChildCount()==1&&z.getBogus()))a:{var G;if(E.getChildCount()==1&&a(G=E.getFirst())&&G.is(p)){z= -G.getElementsByTag("*");v=0;for(w=z.count();v<w;v++){o=z.getItem(v);if(!o.is(l))break a}G.moveChildren(G.getParent(1));G.remove()}}n.dataWrapper=E;v=u}if(v){G=n.range;var z=G.document,D,u=n.blockLimit;v=0;var K;E=[];var H,Q,w=o=0,M,T;C=G.startContainer;var B=n.endPath.elements[0],U;A=B.getPosition(C);y=!!B.getCommonAncestor(C)&&A!=CKEDITOR.POSITION_IDENTICAL&&!(A&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);C=b(n.dataWrapper,n);for(k(C,G);v<C.length;v++){A=C[v];if(D=A.isLineBreak){D= -G;M=u;var N=void 0,W=void 0;if(A.hasBlockSibling)D=1;else{N=D.startContainer.getAscendant(h.$block,1);if(!N||!N.is({div:1,p:1}))D=0;else{W=N.getPosition(M);if(W==CKEDITOR.POSITION_IDENTICAL||W==CKEDITOR.POSITION_CONTAINS)D=0;else{M=D.splitElement(N);D.moveToPosition(M,CKEDITOR.POSITION_AFTER_START);D=1}}}}if(D)w=v>0;else{D=G.startPath();if(!A.isBlock&&n.editor.config.autoParagraph!==false&&(n.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&n.editor.editable().equals(D.blockLimit)&&!D.block)&&(Q=n.editor.activeEnterMode!= -CKEDITOR.ENTER_BR&&n.editor.config.autoParagraph!==false?n.editor.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":false)){Q=z.createElement(Q);Q.appendBogus();G.insertNode(Q);CKEDITOR.env.needsBrFiller&&(K=Q.getBogus())&&K.remove();G.moveToPosition(Q,CKEDITOR.POSITION_BEFORE_END)}if((D=G.startPath().block)&&!D.equals(H)){if(K=D.getBogus()){K.remove();E.push(D)}H=D}A.firstNotAllowed&&(o=1);if(o&&A.isElement){D=G.startContainer;for(M=null;D&&!h[D.getName()][A.name];){if(D.equals(u)){D=null;break}M=D; -D=D.getParent()}if(D){if(M){T=G.splitElement(M);n.zombies.push(T);n.zombies.push(M)}}else{M=u.getName();U=!v;D=v==C.length-1;M=d(A.node,M);for(var N=[],W=M.length,X=0,Z=void 0,$=0,aa=-1;X<W;X++){Z=M[X];if(Z==" "){if(!$&&(!U||X)){N.push(new CKEDITOR.dom.text(" "));aa=N.length}$=1}else{N.push(Z);$=0}}D&&aa==N.length&&N.pop();U=N}}if(U){for(;D=U.pop();)G.insertNode(D);U=0}else G.insertNode(A.node);if(A.lastNotAllowed&&v<C.length-1){(T=y?B:T)&&G.setEndAt(T,CKEDITOR.POSITION_AFTER_START);o=0}G.collapse()}}n.dontMoveCaret= -w;n.bogusNeededBlocks=E}K=n.range;var P;T=n.bogusNeededBlocks;for(U=K.createBookmark();H=n.zombies.pop();)if(H.getParent()){Q=K.clone();Q.moveToElementEditStart(H);Q.removeEmptyBlocksAtEnd()}if(T)for(;H=T.pop();)CKEDITOR.env.needsBrFiller?H.appendBogus():H.append(K.document.createText(" "));for(;H=n.mergeCandidates.pop();)H.mergeSiblings();K.moveToBookmark(U);if(!n.dontMoveCaret){for(H=a(K.startContainer)&&K.startContainer.getChild(K.startOffset-1);H&&a(H)&&!H.is(h.$empty);){if(H.isBlockBoundary())K.moveToPosition(H, -CKEDITOR.POSITION_BEFORE_END);else{if(e(H)&&H.getHtml().match(/(\s| )$/g)){P=null;break}P=K.clone();P.moveToPosition(H,CKEDITOR.POSITION_BEFORE_END)}H=H.getLast(c)}P&&K.moveToRange(P)}t.select();j(g)}}}(),o=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return false;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return b}function b(a,c,d){c=a.getDocument().createElement(c); -a.append(c,d);return c}function c(a){var b=a.count(),d;for(b;b-- >0;){d=a.getItem(b);if(!CKEDITOR.tools.trim(d.getHtml())){d.appendBogus();CKEDITOR.env.ie&&(CKEDITOR.env.version<9&&d.getChildCount())&&d.getFirst().remove()}}}return function(d){var e=d.startContainer,f=e.getAscendant("table",1),h=false;c(f.getElementsByTag("td"));c(f.getElementsByTag("th"));f=d.clone();f.setStart(e,0);f=a(f).lastBackward();if(!f){f=d.clone();f.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);f=a(f).lastForward();h=true}f|| -(f=e);if(f.is("table")){d.setStartAt(f,CKEDITOR.POSITION_BEFORE_START);d.collapse(true);f.remove()}else{f.is({tbody:1,thead:1,tfoot:1})&&(f=b(f,"tr",h));f.is("tr")&&(f=b(f,f.getParent().is("thead")?"th":"td",h));(e=f.getBogus())&&e.remove();d.moveToPosition(f,h?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END)}}}()})(); -(function(){function a(){var a=this._.fakeSelection,b;if(a){b=this.getSelection(1);if(!b||!b.isHidden()){a.reset();a=0}}if(!a){a=b||this.getSelection(1);if(!a||a.getType()==CKEDITOR.SELECTION_NONE)return}this.fire("selectionCheck",a);b=this.elementPath();if(!b.compare(this._.selectionPreviousPath)){if(CKEDITOR.env.webkit)this._.previousActive=this.document.getActive();this._.selectionPreviousPath=b;this.fire("selectionChange",{selection:a,path:b})}}function e(){y=true;if(!t){b.call(this);t=CKEDITOR.tools.setTimeout(b, -200,this)}}function b(){t=null;if(y){CKEDITOR.tools.setTimeout(a,0,this);y=false}}function c(a){function b(c,d){return!c||c.type==CKEDITOR.NODE_TEXT?false:a.clone()["moveToElementEdit"+(d?"End":"Start")](c)}if(!(a.root instanceof CKEDITOR.editable))return false;var c=a.startContainer,d=a.getPreviousNode(z,null,c),e=a.getNextNode(z,null,c);return b(d)||b(e,1)||!d&&!e&&!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()&&c.getBogus())?true:false}function f(a){return a.getCustomData("cke-fillingChar")} -function d(a,b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(b!==false){var d,e=a.getDocument().getSelection().getNative(),f=e&&e.type!="None"&&e.getRangeAt(0);if(c.getLength()>1&&f&&f.intersectsNode(c.$)){d=[e.anchorOffset,e.focusOffset];f=e.focusNode==c.$&&e.focusOffset>0;e.anchorNode==c.$&&e.anchorOffset>0&&d[0]--;f&&d[1]--;var h;f=e;if(!f.isCollapsed){h=f.getRangeAt(0);h.setStart(f.anchorNode,f.anchorOffset);h.setEnd(f.focusNode,f.focusOffset);h=h.collapsed}h&&d.unshift(d.pop())}}c.setText(g(c.getText())); -if(d){c=e.getRangeAt(0);c.setStart(c.startContainer,d[0]);c.setEnd(c.startContainer,d[1]);e.removeAllRanges();e.addRange(c)}}}function g(a){return a.replace(/\u200B( )?/g,function(a){return a[1]?" ":""})}function j(a,b,c){var d=a.on("focus",function(a){a.cancel()},null,null,-100);if(CKEDITOR.env.ie)var e=a.getDocument().on("selectionchange",function(a){a.cancel()},null,null,-100);else{var f=new CKEDITOR.dom.range(a);f.moveToElementEditStart(a);var h=a.getDocument().$.createRange();h.setStart(f.startContainer.$, -f.startOffset);h.collapse(1);b.removeAllRanges();b.addRange(h)}c&&a.focus();d.removeListener();e&&e.removeListener()}function l(a){var b=CKEDITOR.dom.element.createFromHtml('<div data-cke-hidden-sel="1" data-cke-temp="1" style="'+(CKEDITOR.env.ie?"display:none":"position:fixed;top:0;left:-1000px")+'"> </div>',a.document);a.fire("lockSnapshot");a.editable().append(b);var c=a.getSelection(1),d=a.createRange(),e=c.root.on("selectionchange",function(a){a.cancel()},null,null,0);d.setStartAt(b,CKEDITOR.POSITION_AFTER_START); -d.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);c.selectRanges([d]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=b}function h(a){var b={37:1,39:1,8:1,46:1};return function(c){var d=c.data.getKeystroke();if(b[d]){var e=a.getSelection().getRanges(),f=e[0];if(e.length==1&&f.collapsed)if((d=f[d<38?"getPreviousEditableNode":"getNextEditableNode"]())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getAttribute("contenteditable")=="false"){a.getSelection().fake(d);c.data.preventDefault();c.cancel()}}}} -function n(a){for(var b=0;b<a.length;b++){var c=a[b];c.getCommonAncestor().isReadOnly()&&a.splice(b,1);if(!c.collapsed){if(c.startContainer.isReadOnly())for(var d=c.startContainer,e;d;){if((e=d.type==CKEDITOR.NODE_ELEMENT)&&d.is("body")||!d.isReadOnly())break;e&&d.getAttribute("contentEditable")=="false"&&c.setStartAfter(d);d=d.getParent()}d=c.startContainer;e=c.endContainer;var f=c.startOffset,h=c.endOffset,g=c.clone();d&&d.type==CKEDITOR.NODE_TEXT&&(f>=d.getLength()?g.setStartAfter(d):g.setStartBefore(d)); -e&&e.type==CKEDITOR.NODE_TEXT&&(h?g.setEndAfter(e):g.setEndBefore(e));d=new CKEDITOR.dom.walker(g);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&d.isReadOnly()){var e=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);if(!(d.getPosition(g.endContainer)&CKEDITOR.POSITION_CONTAINS)){e.setStartAfter(d);e.collapsed||a.splice(b+1,0,e)}return true}return false};d.next()}}return a}var t,y,z=CKEDITOR.dom.walker.invisible(1),o=function(){function a(b){return function(a){var c=a.editor.createRange(); -c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);return false}}function b(a){return function(b){var c=b.editor,d=c.createRange(),e;if(!(e=d.moveToClosestEditablePosition(b.selected,a)))e=d.moveToClosestEditablePosition(b.selected,!a);e&&c.getSelection().selectRanges([d]);c.fire("saveSnapshot");b.selected.remove();if(!e){d.moveToElementEditablePosition(c.editable());c.getSelection().selectRanges([d])}c.fire("saveSnapshot");return false}}var c=a(),d=a(1);return{37:c, -38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(b){function c(){var a=f.getSelection();a&&a.removeAllRanges()}var f=b.editor;f.on("contentDom",function(){var b=f.document,c=CKEDITOR.document,i=f.editable(),m=b.getBody(),g=b.getDocumentElement(),j=i.isInline(),n,l;CKEDITOR.env.gecko&&i.attachListener(i,"focus",function(a){a.removeListener();if(n!==0)if((a=f.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==i.$){a=f.createRange();a.moveToElementEditStart(i);a.select()}}, -null,null,-2);i.attachListener(i,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){n&&CKEDITOR.env.webkit&&(n=f._.previousActive&&f._.previousActive.equals(b.getActive()));f.unlockSelection(n);n=0},null,null,-1);i.attachListener(i,"mousedown",function(){n=0});if(CKEDITOR.env.ie||j){var o=function(){l=new CKEDITOR.dom.selection(f.getSelection());l.lock()};r?i.attachListener(i,"beforedeactivate",o,null,null,-1):i.attachListener(f,"selectionCheck",o,null,null,-1);i.attachListener(i,CKEDITOR.env.webkit? -"DOMFocusOut":"blur",function(){f.lockSelection(l);n=1},null,null,-1);i.attachListener(i,"mousedown",function(){n=0})}if(CKEDITOR.env.ie&&!j){var w;i.attachListener(i,"mousedown",function(a){if(a.data.$.button==2){a=f.document.getSelection();if(!a||a.getType()==CKEDITOR.SELECTION_NONE)w=f.window.getScrollPosition()}});i.attachListener(i,"mouseup",function(a){if(a.data.$.button==2&&w){f.document.$.documentElement.scrollLeft=w.x;f.document.$.documentElement.scrollTop=w.y}w=null});if(b.$.compatMode!= -"BackCompat"){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)g.on("mousedown",function(a){function b(a){a=a.data.$;if(e){var c=m.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(d){}e.setEndPoint(i.compareEndPoints("StartToStart",c)<0?"EndToEnd":"StartToStart",c);e.select()}}function d(){g.removeListener("mousemove",b);c.removeListener("mouseup",d);g.removeListener("mouseup",d);e.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<g.$.clientHeight&&a.$.x<g.$.clientWidth){var e= -m.$.createTextRange();try{e.moveToPoint(a.$.clientX,a.$.clientY)}catch(f){}var i=e.duplicate();g.on("mousemove",b);c.on("mouseup",d);g.on("mouseup",d)}});if(CKEDITOR.env.version>7&&CKEDITOR.env.version<11){g.on("mousedown",function(a){if(a.data.getTarget().is("html")){c.on("mouseup",B);g.on("mouseup",B)}});var B=function(){c.removeListener("mouseup",B);g.removeListener("mouseup",B);var a=CKEDITOR.document.$.selection,d=a.createRange();a.type!="None"&&d.parentElement().ownerDocument==b.$&&d.select()}}}}i.attachListener(i, -"selectionchange",a,f);i.attachListener(i,"keyup",e,f);i.attachListener(i,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){f.forceNextSelectionCheck();f.selectionChange(1)});if(j&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var v;i.attachListener(i,"mousedown",function(){v=1});i.attachListener(b.getDocumentElement(),"mouseup",function(){v&&e.call(f);v=0})}else i.attachListener(CKEDITOR.env.ie?i:b.getDocumentElement(),"mouseup",e,f);CKEDITOR.env.webkit&&i.attachListener(b,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:d(i)}}, -null,null,-1);i.attachListener(i,"keydown",h(f),null,null,-1)});f.on("setData",function(){f.unlockSelection();CKEDITOR.env.webkit&&c()});f.on("contentDomUnload",function(){f.unlockSelection()});if(CKEDITOR.env.ie9Compat)f.on("beforeDestroy",c,null,null,9);f.on("dataReady",function(){delete f._.fakeSelection;delete f._.hiddenSelectionContainer;f.selectionChange(1)});f.on("loadSnapshot",function(){var a=f.editable().getLast(function(a){return a.type==CKEDITOR.NODE_ELEMENT});a&&a.hasAttribute("data-cke-hidden-sel")&& -a.remove()},null,null,100);f.on("key",function(a){if(f.mode=="wysiwyg"){var b=f.getSelection();if(b.isFake){var c=o[a.data.keyCode];if(c)return c({editor:f,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});CKEDITOR.on("instanceReady",function(a){var b=a.editor;if(CKEDITOR.env.webkit){b.on("selectionChange",function(){var a=b.editable(),c=f(a);c&&(c.getCustomData("ready")?d(a):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){d(b.editable())},null,null,-1);var c, -e,a=function(){var a=b.editable();if(a)if(a=f(a)){var d=b.document.$.defaultView.getSelection();d.type=="Caret"&&d.anchorNode==a.$&&(e=1);c=a.getText();a.setText(g(c))}},h=function(){var a=b.editable();if(a)if(a=f(a)){a.setText(c);if(e){b.document.$.defaultView.getSelection().setPosition(a.$,a.getLength());e=0}}};b.on("beforeUndoImage",a);b.on("afterUndoImage",h);b.on("beforeGetData",a,null,null,0);b.on("getData",h)}});CKEDITOR.editor.prototype.selectionChange=function(b){(b?a:e).call(this)};CKEDITOR.editor.prototype.getSelection= -function(a){if((this._.savedSelection||this._.fakeSelection)&&!a)return this._.savedSelection||this._.fakeSelection;return(a=this.editable())&&this.mode=="wysiwyg"?new CKEDITOR.dom.selection(a):null};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);if(a.getType()!=CKEDITOR.SELECTION_NONE){!a.isLocked&&a.lock();this._.savedSelection=a;return true}return false};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;if(b){b.unlock(a);delete this._.savedSelection; -return true}return false};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;var r= -typeof window.getSelection!="function",q=1;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection)var b=a,a=a.root;var c=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:q++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=a=c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b){CKEDITOR.tools.extend(this._.cache,b._.cache);this.isFake=b.isFake;this.isLocked=b.isLocked;return this}c=r?this.document.$.selection:this.document.getWindow().$.getSelection(); -if(CKEDITOR.env.webkit)(c.type=="None"&&this.document.getActive().equals(a)||c.type=="Caret"&&c.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT)&&j(a,c);else if(CKEDITOR.env.gecko)c&&(this.document.getActive().equals(a)&&c.anchorNode&&c.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT)&&j(a,c,true);else if(CKEDITOR.env.ie){b=this.document.getActive();if(r)c.type=="None"&&(b&&b.equals(this.document.getDocumentElement()))&&j(a,null,true);else{(c=c&&c.anchorNode)&&(c=new CKEDITOR.dom.node(c));b&&(b.equals(this.document.getDocumentElement())&& -c&&(a.equals(c)||a.contains(c)))&&j(a,null,true)}}var a=this.getNative(),d,e;if(a)if(a.getRangeAt)d=(e=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(e.commonAncestorContainer);else{try{e=a.createRange()}catch(f){}d=e&&CKEDITOR.dom.element.get(e.item&&e.item(0)||e.parentElement())}if(!d||!(d.type==CKEDITOR.NODE_ELEMENT||d.type==CKEDITOR.NODE_TEXT)||!this.root.equals(d)&&!this.root.contains(d)){this._.cache.type=CKEDITOR.SELECTION_NONE;this._.cache.startElement=null;this._.cache.selectedElement= -null;this._.cache.selectedText="";this._.cache.ranges=new CKEDITOR.dom.rangeList}return this};var x={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.dom.selection.prototype={getNative:function(){return this._.cache.nativeSel!==void 0?this._.cache.nativeSel:this._.cache.nativeSel=r?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:r?function(){var a=this._.cache;if(a.type)return a.type; -var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;if(d=="Text")b=CKEDITOR.SELECTION_TEXT;if(d=="Control")b=CKEDITOR.SELECTION_ELEMENT;if(c.createRange().parentElement())b=CKEDITOR.SELECTION_TEXT}catch(e){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(c.rangeCount==1){var c=c.getRangeAt(0),d=c.startContainer;if(d==c.endContainer&&d.nodeType==1&&c.endOffset- -c.startOffset==1&&x[d.childNodes[c.startOffset].nodeName.toLowerCase()])b=CKEDITOR.SELECTION_ELEMENT}return a.type=b},getRanges:function(){var a=r?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var e=d.children,f,i,h=b.duplicate(),k=0,g=e.length-1,w=-1,j,v;k<=g;){w=Math.floor((k+g)/2);f=e[w];h.moveToElementText(f);j=h.compareEndPoints("StartToStart", -b);if(j>0)g=w-1;else if(j<0)k=w+1;else return{container:d,offset:a(f)}}if(w==-1||w==e.length-1&&j<0){h.moveToElementText(d);h.setEndPoint("StartToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!h){f=e[e.length-1];return f.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:f,offset:f.nodeValue.length}}for(d=e.length;h>0&&d>0;){i=e[--d];if(i.nodeType==CKEDITOR.NODE_TEXT){v=i;h=h-i.nodeValue.length}}return{container:v,offset:-h}}h.collapse(j>0?true:false);h.setEndPoint(j> -0?"StartToStart":"EndToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;if(!h)return{container:d,offset:a(f)+(j>0?0:1)};for(;h>0;)try{i=f[j>0?"previousSibling":"nextSibling"];if(i.nodeType==CKEDITOR.NODE_TEXT){h=h-i.nodeValue.length;v=i}f=i}catch(n){return{container:d,offset:a(f)}}return{container:v,offset:j>0?-h:v.nodeValue.length+h}};return function(){var a=this.getNative(),c=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT){a=new CKEDITOR.dom.range(this.root); -d=b(c,true);a.setStart(new CKEDITOR.dom.node(d.container),d.offset);d=b(c);a.setEnd(new CKEDITOR.dom.node(d.container),d.offset);a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse();return[a]}if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],e=0;e<c.length;e++){for(var f=c.item(e),i=f.parentNode,h=0,a=new CKEDITOR.dom.range(this.root);h<i.childNodes.length&&i.childNodes[h]!=f;h++);a.setStart(new CKEDITOR.dom.node(i),h);a.setEnd(new CKEDITOR.dom.node(i), -h+1);d.push(a)}return d}return[]}}():function(){var a=[],b,c=this.getNative();if(!c)return a;for(var d=0;d<c.rangeCount;d++){var e=c.getRangeAt(d);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(e.startContainer),e.startOffset);b.setEnd(new CKEDITOR.dom.node(e.endContainer),e.endOffset);a.push(b)}return a};return function(b){var c=this._.cache,d=c.ranges;if(!d)c.ranges=d=new CKEDITOR.dom.rangeList(a.call(this));return!b?d:n(new CKEDITOR.dom.rangeList(d.slice()))}}(),getStartElement:function(){var a= -this._.cache;if(a.startElement!==void 0)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];if(c){if(c.collapsed){b=c.startContainer;b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent())}else{for(c.optimize();;){b=c.startContainer;if(c.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary())c.setStartAfter(b);else break}b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent(); -b=b.getChild(c.startOffset);if(!b||b.type!=CKEDITOR.NODE_ELEMENT)b=c.startContainer;else for(c=b.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;){b=c;c=c.getFirst()}}b=b.$}}return a.startElement=b?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(a.selectedElement!==void 0)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),c,d,e=2;e&&(!(c=a.getEnclosedNode())|| -!(c.type==CKEDITOR.NODE_ELEMENT&&x[c.getName()]&&(d=c)));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d&&d.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=this._.cache;if(a.selectedText!==void 0)return a.selectedText;var b=this.getNative(),b=r?b.type=="Control"?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel= -null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=!b&&this.getRanges(),d=this.isFake;this.isLocked=0;this.reset();if(a)(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",1)&&(d?this.fake(b):b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection&&this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;var b=a._.hiddenSelectionContainer;if(b){var c=a.checkDirty(); -a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot");!c&&a.resetDirty()}delete a._.hiddenSelectionContainer}this.rev=q++},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){var b=this.root.editor,b=b&&b._.hiddenSelectionContainer;this.reset();if(b)for(var b=this.root,e,f=0;f<a.length;++f){e=a[f];if(e.endContainer.equals(b))e.endOffset=Math.min(e.endOffset,b.getChildCount())}if(a.length)if(this.isLocked){var h= -CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();h&&!h.equals(this.root)&&h.focus()}else{var g;a:{var j,n;if(a.length==1&&!(n=a[0]).collapsed&&(g=n.getEnclosedNode())&&g.type==CKEDITOR.NODE_ELEMENT){n=n.clone();n.shrink(CKEDITOR.SHRINK_ELEMENT,true);if((j=n.getEnclosedNode())&&j.type==CKEDITOR.NODE_ELEMENT)g=j;if(g.getAttribute("contenteditable")=="false")break a}g=void 0}if(g)this.fake(g);else{if(r){n=CKEDITOR.dom.walker.whitespaces(true);j=/\ufeff|\u00a0/;b={table:1, -tbody:1,tr:1};if(a.length>1){g=a[a.length-1];a[0].setEnd(g.endContainer,g.endOffset)}g=a[0];var a=g.collapsed,l,o,q;if((e=g.getEnclosedNode())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in x&&(!e.is("a")||!e.getText()))try{q=e.$.createControlRange();q.addElement(e.$);q.select();return}catch(t){}if(g.startContainer.type==CKEDITOR.NODE_ELEMENT&&g.startContainer.getName()in b||g.endContainer.type==CKEDITOR.NODE_ELEMENT&&g.endContainer.getName()in b){g.shrink(CKEDITOR.NODE_ELEMENT,true);a=g.collapsed}q= -g.createBookmark();b=q.startNode;if(!a)h=q.endNode;q=g.document.$.body.createTextRange();q.moveToElementText(b.$);q.moveStart("character",1);if(h){j=g.document.$.body.createTextRange();j.moveToElementText(h.$);q.setEndPoint("EndToEnd",j);q.moveEnd("character",-1)}else{l=b.getNext(n);o=b.hasAscendant("pre");l=!(l&&l.getText&&l.getText().match(j))&&(o||!b.hasPrevious()||b.getPrevious().is&&b.getPrevious().is("br"));o=g.document.createElement("span");o.setHtml("");o.insertBefore(b);l&&g.document.createText("").insertBefore(b)}g.setStartBefore(b); -b.remove();if(a){if(l){q.moveStart("character",-1);q.select();g.document.$.selection.clear()}else q.select();g.moveToPosition(o,CKEDITOR.POSITION_BEFORE_START);o.remove()}else{g.setEndBefore(h);h.remove();q.select()}}else{h=this.getNative();if(!h)return;this.removeAllRanges();for(q=0;q<a.length;q++){if(q<a.length-1){l=a[q];o=a[q+1];j=l.clone();j.setStart(l.endContainer,l.endOffset);j.setEnd(o.startContainer,o.startOffset);if(!j.collapsed){j.shrink(CKEDITOR.NODE_ELEMENT,true);g=j.getCommonAncestor(); -j=j.getEnclosedNode();if(g.isReadOnly()||j&&j.isReadOnly()){o.setStart(l.startContainer,l.startOffset);a.splice(q--,1);continue}}}g=a[q];o=this.document.$.createRange();if(g.collapsed&&CKEDITOR.env.webkit&&c(g)){l=this.root;d(l,false);j=l.getDocument().createText("​");l.setCustomData("cke-fillingChar",j);g.insertNode(j);if((l=j.getNext())&&!j.getPrevious()&&l.type==CKEDITOR.NODE_ELEMENT&&l.getName()=="br"){d(this.root);g.moveToPosition(l,CKEDITOR.POSITION_BEFORE_START)}else g.moveToPosition(j,CKEDITOR.POSITION_AFTER_END)}o.setStart(g.startContainer.$, -g.startOffset);try{o.setEnd(g.endContainer.$,g.endOffset)}catch(w){if(w.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")>=0){g.collapse(1);o.setEnd(g.endContainer.$,g.endOffset)}else throw w;}h.addRange(o)}}this.reset();this.root.fire("selectionchange")}}},fake:function(a){var b=this.root.editor;this.reset();l(b);var c=this._.cache,d=new CKEDITOR.dom.range(this.root);d.setStartBefore(a);d.setEndAfter(a);c.ranges=new CKEDITOR.dom.rangeList(d);c.selectedElement=c.startElement=a;c.type=CKEDITOR.SELECTION_ELEMENT; -c.selectedText=c.nativeSel=null;this.isFake=1;this.rev=q++;b._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b= -[],c=0;c<a.length;c++){var d=new CKEDITOR.dom.range(this.root);d.moveToBookmark(a[c]);b.push(d)}a.isFake?this.fake(b[0].getEnclosedNode()):this.selectRanges(b);return this},getCommonAncestor:function(){var a=this.getRanges();return!a.length?null:a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer)},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative(); -try{a&&a[r?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}})();"use strict";CKEDITOR.STYLE_BLOCK=1;CKEDITOR.STYLE_INLINE=2;CKEDITOR.STYLE_OBJECT=3; -(function(){function a(a,b){for(var c,d;a=a.getParent();){if(a.equals(b))break;if(a.getAttribute("data-nostyle"))c=a;else if(!d){var e=a.getAttribute("contentEditable");e=="false"?c=a:e=="true"&&(d=1)}}return c}function e(b){var d=b.document;if(b.collapsed){d=q(this,d);b.insertNode(d);b.moveToPosition(d,CKEDITOR.POSITION_BEFORE_END)}else{var f=this.element,h=this._.definition,i,g=h.ignoreReadonly,j=g||h.includeReadonly;j==void 0&&(j=b.root.getCustomData("cke_includeReadonly"));var k=CKEDITOR.dtd[f]; -if(!k){i=true;k=CKEDITOR.dtd.span}b.enlarge(CKEDITOR.ENLARGE_INLINE,1);b.trim();var n=b.createBookmark(),l=n.startNode,m=n.endNode,o=l,p;if(!g){var r=b.getCommonAncestor(),g=a(l,r),r=a(m,r);g&&(o=g.getNextSourceNode(true));r&&(m=r)}for(o.getPosition(m)==CKEDITOR.POSITION_FOLLOWING&&(o=0);o;){g=false;if(o.equals(m)){o=null;g=true}else{var t=o.type==CKEDITOR.NODE_ELEMENT?o.getName():null,r=t&&o.getAttribute("contentEditable")=="false",s=t&&o.getAttribute("data-nostyle");if(t&&o.data("cke-bookmark")){o= -o.getNextSourceNode(true);continue}if(r&&j&&CKEDITOR.dtd.$block[t])for(var y=o,u=c(y),x=void 0,J=u.length,O=0,y=J&&new CKEDITOR.dom.range(y.getDocument());O<J;++O){var x=u[O],S=CKEDITOR.filter.instances[x.data("cke-filter")];if(S?S.check(this):1){y.selectNodeContents(x);e.call(this,y)}}u=t?!k[t]||s?0:r&&!j?0:(o.getPosition(m)|L)==L&&(!h.childRule||h.childRule(o)):1;if(u)if((u=o.getParent())&&((u.getDtd()||CKEDITOR.dtd.span)[f]||i)&&(!h.parentRule||h.parentRule(u))){if(!p&&(!t||!CKEDITOR.dtd.$removeEmpty[t]|| -(o.getPosition(m)|L)==L)){p=b.clone();p.setStartBefore(o)}t=o.type;if(t==CKEDITOR.NODE_TEXT||r||t==CKEDITOR.NODE_ELEMENT&&!o.getChildCount()){for(var t=o,P;(g=!t.getNext(F))&&(P=t.getParent(),k[P.getName()])&&(P.getPosition(l)|I)==I&&(!h.childRule||h.childRule(P));)t=P;p.setEndAfter(t)}}else g=true;else g=true;o=o.getNextSourceNode(s||r)}if(g&&p&&!p.collapsed){for(var g=q(this,d),r=g.hasAttributes(),s=p.getCommonAncestor(),t={},u={},x={},J={},V,R,Y;g&&s;){if(s.getName()==f){for(V in h.attributes)if(!J[V]&& -(Y=s.getAttribute(R)))g.getAttribute(V)==Y?u[V]=1:J[V]=1;for(R in h.styles)if(!x[R]&&(Y=s.getStyle(R)))g.getStyle(R)==Y?t[R]=1:x[R]=1}s=s.getParent()}for(V in u)g.removeAttribute(V);for(R in t)g.removeStyle(R);r&&!g.hasAttributes()&&(g=null);if(g){p.extractContents().appendTo(g);p.insertNode(g);z.call(this,g);g.mergeSiblings();CKEDITOR.env.ie||g.$.normalize()}else{g=new CKEDITOR.dom.element("span");p.extractContents().appendTo(g);p.insertNode(g);z.call(this,g);g.remove(true)}p=null}}b.moveToBookmark(n); -b.shrink(CKEDITOR.SHRINK_TEXT);b.shrink(CKEDITOR.NODE_ELEMENT,true)}}function b(a){function b(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),c=new CKEDITOR.dom.elementPath(j.getParent()),e=null,f=null,h=0;h<a.elements.length;h++){var g=a.elements[h];if(g==a.block||g==a.blockLimit)break;k.checkElementRemovable(g)&&(e=g)}for(h=0;h<c.elements.length;h++){g=c.elements[h];if(g==c.block||g==c.blockLimit)break;k.checkElementRemovable(g)&&(f=g)}f&&j.breakParent(f);e&&d.breakParent(e)}a.enlarge(CKEDITOR.ENLARGE_INLINE, -1);var c=a.createBookmark(),d=c.startNode;if(a.collapsed){for(var e=new CKEDITOR.dom.elementPath(d.getParent(),a.root),f,h=0,g;h<e.elements.length&&(g=e.elements[h]);h++){if(g==e.block||g==e.blockLimit)break;if(this.checkElementRemovable(g)){var i;if(a.collapsed&&(a.checkBoundaryOfElement(g,CKEDITOR.END)||(i=a.checkBoundaryOfElement(g,CKEDITOR.START)))){f=g;f.match=i?"start":"end"}else{g.mergeSiblings();g.is(this.element)?y.call(this,g):o(g,m(this)[g.getName()])}}}if(f){g=d;for(h=0;;h++){i=e.elements[h]; -if(i.equals(f))break;else if(i.match)continue;else i=i.clone();i.append(g);g=i}g[f.match=="start"?"insertBefore":"insertAfter"](f)}}else{var j=c.endNode,k=this;b();for(e=d;!e.equals(j);){f=e.getNextSourceNode();if(e.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(e)){e.getName()==this.element?y.call(this,e):o(e,m(this)[e.getName()]);if(f.type==CKEDITOR.NODE_ELEMENT&&f.contains(d)){b();f=d.getNext()}}e=f}}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,true)}function c(a){var b=[];a.forEach(function(a){if(a.getAttribute("contenteditable")== -"true"){b.push(a);return false}},CKEDITOR.NODE_ELEMENT,true);return b}function f(a){var b=a.getEnclosedNode()||a.getCommonAncestor(false,true);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&x(a,this)}function d(a){var b=a.getCommonAncestor(true,true);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,c=b.attributes;if(c)for(var d in c)a.removeAttribute(d,c[d]);if(b.styles)for(var e in b.styles)b.styles.hasOwnProperty(e)&& -a.removeStyle(e)}}function g(a){var b=a.createBookmark(true),c=a.createIterator();c.enforceRealBlocks=true;if(this._.enterMode)c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e=a.document,f;d=c.getNextParagraph();)if(!d.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):1)){f=q(this,e,d);l(d,f)}a.moveToBookmark(b)}function j(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=true;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e;d=c.getNextParagraph();)if(this.checkElementRemovable(d))if(d.is("pre")){(e= -this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&d.copyAttributes(e);l(d,e)}else y.call(this,d);a.moveToBookmark(b)}function l(a,b){var c=!b;if(c){b=a.getDocument().createElement("div");a.copyAttributes(b)}var d=b&&b.is("pre"),e=a.is("pre"),f=!d&&e;if(d&&!e){e=b;(f=a.getBogus())&&f.remove();f=a.getHtml();f=n(f,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");f=f.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g, -" ");f=f.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var g=a.getDocument().createElement("div");g.append(e);e.$.outerHTML="<pre>"+f+"</pre>";e.copyAttributes(g.getFirst());e=g.getFirst().remove()}else e.setHtml(f);b=e}else f?b=t(c?[a.getHtml()]:h(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,i;if((i=c.getPrevious(J))&&i.type==CKEDITOR.NODE_ELEMENT&&i.is("pre")){d=n(i.getHtml(),/\n$/,"")+"\n\n"+n(c.getHtml(),/^\n/,"");CKEDITOR.env.ie?c.$.outerHTML="<pre>"+d+"</pre>":c.setHtml(d);i.remove()}}else c&& -r(b)}function h(a){a.getName();var b=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"</pre>"+c+"<pre>"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function n(a,b,c){var d="",e="",a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,c)+e}function t(a,b){var c;a.length>1&&(c=new CKEDITOR.dom.documentFragment(b.getDocument())); -for(var d=0;d<a.length;d++){var e=a[d],e=e.replace(/(\r\n|\r)/g,"\n"),e=n(e,/^[ \t]*\n/,""),e=n(e,/\n$/,""),e=n(e,/^[ \t]+|[ \t]+$/g,function(a,b){return a.length==1?" ":b?" "+CKEDITOR.tools.repeat(" ",a.length-1):CKEDITOR.tools.repeat(" ",a.length-1)+" "}),e=e.replace(/\n/g,"<br>"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat(" ",a.length-1)+" "});if(c){var f=b.clone();f.setHtml(e);c.append(f)}else b.setHtml(e)}return c||b}function y(a,b){var c=this._.definition, -d=c.attributes,c=c.styles,e=m(this)[a.getName()],f=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(c),h;for(h in d)if(!((h=="class"||this._.definition.fullMatch)&&a.getAttribute(h)!=k(h,d[h]))&&!(b&&h.slice(0,5)=="data-")){f=a.hasAttribute(h);a.removeAttribute(h)}for(var g in c)if(!(this._.definition.fullMatch&&a.getStyle(g)!=k(g,c[g],true))){f=f||!!a.getStyle(g);a.removeStyle(g)}o(a,e,u[a.getName()]);f&&(this._.definition.alwaysRemoveElement?r(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode== -CKEDITOR.ENTER_BR&&!a.hasAttributes()?r(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function z(a){for(var b=m(this),c=a.getElementsByTag(this.element),d,e=c.count();--e>=0;){d=c.getItem(e);d.isReadOnly()||y.call(this,d,true)}for(var f in b)if(f!=this.element){c=a.getElementsByTag(f);for(e=c.count()-1;e>=0;e--){d=c.getItem(e);d.isReadOnly()||o(d,b[f])}}}function o(a,b,c){if(b=b&&b.attributes)for(var d=0;d<b.length;d++){var e=b[d][0],f;if(f=a.getAttribute(e)){var h=b[d][1];(h===null|| -h.test&&h.test(f)||typeof h=="string"&&f==h)&&a.removeAttribute(e)}}c||r(a)}function r(a,b){if(!a.hasAttributes()||b)if(CKEDITOR.dtd.$block[a.getName()]){var c=a.getPrevious(J),d=a.getNext(J);c&&(c.type==CKEDITOR.NODE_TEXT||!c.isBlockBoundary({br:1}))&&a.append("br",1);d&&(d.type==CKEDITOR.NODE_TEXT||!d.isBlockBoundary({br:1}))&&a.append("br");a.remove(true)}else{c=a.getFirst();d=a.getLast();a.remove(true);if(c){c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings();d&&(!c.equals(d)&&d.type==CKEDITOR.NODE_ELEMENT)&& -d.mergeSiblings()}}}function q(a,b,c){var d;d=a.element;d=="*"&&(d="span");d=new CKEDITOR.dom.element(d,b);c&&c.copyAttributes(d);d=x(d,a);b.getCustomData("doc_processing_style")&&d.hasAttribute("id")?d.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return d}function x(a,b){var c=b._.definition,d=c.attributes,c=CKEDITOR.style.getStyleText(c);if(d)for(var e in d)a.setAttribute(e,d[e]);c&&a.setAttribute("style",c);return a}function i(a,b){for(var c in a)a[c]=a[c].replace(S,function(a, -c){return b[c]})}function m(a){if(a._.overrides)return a._.overrides;var b=a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++){var e=c[d],f,h;if(typeof e=="string")f=e.toLowerCase();else{f=e.element?e.element.toLowerCase():a.element;h=e.attributes}e=b[f]||(b[f]={});if(h){var e=e.attributes=e.attributes||[],g;for(g in h)e.push([g.toLowerCase(),h[g]])}}}return b}function k(a,b,c){var d=new CKEDITOR.dom.element("span");d[c?"setStyle":"setAttribute"](a, -b);return d[c?"getStyle":"getAttribute"](a)}function s(a,b,c){for(var d=a.document,e=a.getRanges(),b=b?this.removeFromRange:this.applyToRange,f,h=e.createIterator();f=h.getNextRange();)b.call(this,f,c);a.selectRanges(e);d.removeCustomData("doc_processing_style")}var u={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},p= -{a:1,blockquote:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},O=/\s*(?:;\s*|$)/,S=/#\((.+?)\)/g,F=CKEDITOR.dom.walker.bookmark(0,1),J=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,b){if(typeof a.type=="string")return new CKEDITOR.style.customHandlers[a.type](a);var c=a.attributes;if(c&&c.style){a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(c.style));delete c.style}if(b){a=CKEDITOR.tools.clone(a);i(a.attributes, -b);i(a.styles,b)}c=this.element=a.element?typeof a.element=="string"?a.element.toLowerCase():a.element:"*";this.type=a.type||(u[c]?CKEDITOR.STYLE_BLOCK:p[c]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE);if(typeof this.element=="object")this.type=CKEDITOR.STYLE_OBJECT;this._={definition:a}};CKEDITOR.style.prototype={apply:function(a){if(a instanceof CKEDITOR.dom.document)return s.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;if(!b)this._.enterMode=a.activeEnterMode; -s.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return s.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;if(!b)this._.enterMode=a.activeEnterMode;s.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?e:this.type==CKEDITOR.STYLE_BLOCK?g:this.type==CKEDITOR.STYLE_OBJECT?f:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange= -this.type==CKEDITOR.STYLE_INLINE?b:this.type==CKEDITOR.STYLE_BLOCK?j:this.type==CKEDITOR.STYLE_OBJECT?d:null;return this.removeFromRange(a)},applyToObject:function(a){x(a,this)},checkActive:function(a,b){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,true,b);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var c=a.elements,d=0,e;d<c.length;d++){e=c[d];if(!(this.type==CKEDITOR.STYLE_INLINE&&(e==a.block||e==a.blockLimit))){if(this.type== -CKEDITOR.STYLE_OBJECT){var f=e.getName();if(!(typeof this.element=="string"?f==this.element:f in this.element))continue}if(this.checkElementRemovable(e,true,b))return true}}}return false},checkApplicable:function(a,b,c){b&&b instanceof CKEDITOR.filter&&(c=b);if(c&&!c.check(this))return false;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return true},checkElementMatch:function(a,b){var c=this._.definition; -if(!a||!c.ignoreReadonly&&a.isReadOnly())return false;var d=a.getName();if(typeof this.element=="string"?d==this.element:d in this.element){if(!b&&!a.hasAttributes())return true;if(d=c._AC)c=d;else{var d={},e=0,f=c.attributes;if(f)for(var h in f){e++;d[h]=f[h]}if(h=CKEDITOR.style.getStyleText(c)){d.style||e++;d.style=h}d._length=e;c=c._AC=d}if(c._length){for(var g in c)if(g!="_length"){e=a.getAttribute(g)||"";if(g=="style")a:{d=c[g];typeof d=="string"&&(d=CKEDITOR.tools.parseCssText(d));typeof e== -"string"&&(e=CKEDITOR.tools.parseCssText(e,true));h=void 0;for(h in d)if(!(h in e&&(e[h]==d[h]||d[h]=="inherit"||e[h]=="inherit"))){d=false;break a}d=true}else d=c[g]==e;if(d){if(!b)return true}else if(b)return false}if(b)return true}else return true}return false},checkElementRemovable:function(a,b,c){if(this.checkElementMatch(a,b,c))return true;if(b=m(this)[a.getName()]){var d;if(!(b=b.attributes))return true;for(c=0;c<b.length;c++){d=b[c][0];if(d=a.getAttribute(d)){var e=b[c][1];if(e===null||typeof e== -"string"&&d==e||e.test(d))return true}}}return false},buildPreview:function(a){var b=this._.definition,c=[],d=b.element;d=="bdo"&&(d="span");var c=["<",d],e=b.attributes;if(e)for(var f in e)c.push(" ",f,'="',e[f],'"');(e=CKEDITOR.style.getStyleText(b))&&c.push(' style="',e,'"');c.push(">",a||b.name,"</",d,">");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,c=a.attributes&&a.attributes.style||"", -d="";c.length&&(c=c.replace(O,";"));for(var e in b){var f=b[e],h=(e+":"+f).replace(O,";");f=="inherit"?d=d+h:c=c+h}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,true));return a._ST=c+d};CKEDITOR.style.customHandlers={};CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},a,true);return this.customHandlers[a.type]=b}; -var L=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,I=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED})();CKEDITOR.styleCommand=function(a,e){this.requiredContent=this.allowedContent=this.style=a;CKEDITOR.tools.extend(this,e,true)};CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();this.state==CKEDITOR.TRISTATE_OFF?a.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&a.removeStyle(this.style)}; -CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet");CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet);CKEDITOR.loadStylesSet=function(a,e,b){CKEDITOR.stylesSet.addExternal(a,e,"");CKEDITOR.stylesSet.load(a,b)}; -CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,e){var b=this._.styleStateChangeCallbacks;if(!b){b=this._.styleStateChangeCallbacks=[];this.on("selectionChange",function(a){for(var e=0;e<b.length;e++){var d=b[e],g=d.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;d.fn.call(this,g)}})}b.push({style:a,fn:e})},applyStyle:function(a){a.apply(this)},removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions); -else{var e=this,b=e.config.stylesCombo_stylesSet||e.config.stylesSet;if(b===false)a(null);else if(b instanceof Array){e._.stylesDefinitions=b;a(b)}else{b||(b="default");var b=b.split(":"),c=b[0];CKEDITOR.stylesSet.addExternal(c,b[1]?b.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(c,function(b){e._.stylesDefinitions=b[c];a(e._.stylesDefinitions)})}}}}); -CKEDITOR.dom.comment=function(a,e){typeof a=="string"&&(a=(e?e.$:document).createComment(a));CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node;CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"<\!--"+this.$.nodeValue+"--\>"}});"use strict"; -(function(){var a={},e={},b;for(b in CKEDITOR.dtd.$blockLimit)b in CKEDITOR.dtd.$list||(a[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||b in CKEDITOR.dtd.$empty||(e[b]=1);CKEDITOR.dom.elementPath=function(b,f){var d=null,g=null,j=[],l=b,h,f=f||b.getDocument().getBody();do if(l.type==CKEDITOR.NODE_ELEMENT){j.push(l);if(!this.lastElement){this.lastElement=l;if(l.is(CKEDITOR.dtd.$object)||l.getAttribute("contenteditable")=="false")continue}if(l.equals(f))break;if(!g){h=l.getName(); -l.getAttribute("contenteditable")=="true"?g=l:!d&&e[h]&&(d=l);if(a[h]){var n;if(n=!d){if(h=h=="div"){a:{h=l.getChildren();n=0;for(var t=h.count();n<t;n++){var y=h.getItem(n);if(y.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[y.getName()]){h=true;break a}}h=false}h=!h}n=h}n?d=l:g=l}}}while(l=l.getParent());g||(g=f);this.block=d;this.blockLimit=g;this.root=f;this.elements=j}})(); -CKEDITOR.dom.elementPath.prototype={compare:function(a){var e=this.elements,a=a&&a.elements;if(!a||e.length!=a.length)return false;for(var b=0;b<e.length;b++)if(!e[b].equals(a[b]))return false;return true},contains:function(a,e,b){var c;typeof a=="string"&&(c=function(b){return b.getName()==a});a instanceof CKEDITOR.dom.element?c=function(b){return b.equals(a)}:CKEDITOR.tools.isArray(a)?c=function(b){return CKEDITOR.tools.indexOf(a,b.getName())>-1}:typeof a=="function"?c=a:typeof a=="object"&&(c= -function(b){return b.getName()in a});var f=this.elements,d=f.length;e&&d--;if(b){f=Array.prototype.slice.call(f,0);f.reverse()}for(e=0;e<d;e++)if(c(f[e]))return f[e];return null},isContextFor:function(a){var e;if(a in CKEDITOR.dtd.$block){e=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit;return!!e.getDtd()[a]}return true},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}}; -CKEDITOR.dom.text=function(a,e){typeof a=="string"&&(a=(e?e.$:document).createTextNode(a));this.$=a};CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node; -CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(a){this.$.nodeValue=a},split:function(a){var e=this.$.parentNode,b=e.childNodes.length,c=this.getLength(),f=this.getDocument(),d=new CKEDITOR.dom.text(this.$.splitText(a),f);if(e.childNodes.length==b)if(a>=c){d=f.createText("");d.insertAfter(this)}else{a=f.createText("");a.insertAfter(d);a.remove()}return d},substring:function(a, -e){return typeof e!="number"?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,e)}}); -(function(){function a(a,c,e){var d=a.serializable,g=c[e?"endContainer":"startContainer"],j=e?"endOffset":"startOffset",l=d?c.document.getById(a.startNode):a.startNode,a=d?c.document.getById(a.endNode):a.endNode;if(g.equals(l.getPrevious())){c.startOffset=c.startOffset-g.getLength()-a.getPrevious().getLength();g=a.getNext()}else if(g.equals(a.getPrevious())){c.startOffset=c.startOffset-g.getLength();g=a.getNext()}g.equals(l.getParent())&&c[j]++;g.equals(a.getParent())&&c[j]++;c[e?"endContainer":"startContainer"]= -g;return c}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,e)};var e={createIterator:function(){var a=this,c=CKEDITOR.dom.walker.bookmark(),e=[],d;return{getNextRange:function(g){d=d==void 0?0:d+1;var j=a[d];if(j&&a.length>1){if(!d)for(var l=a.length-1;l>=0;l--)e.unshift(a[l].createBookmark(true));if(g)for(var h=0;a[d+h+1];){for(var n=j.document,g=0,l=n.getById(e[h].endNode),n=n.getById(e[h+ -1].startNode);;){l=l.getNextSourceNode(false);if(n.equals(l))g=1;else if(c(l)||l.type==CKEDITOR.NODE_ELEMENT&&l.isBlockBoundary())continue;break}if(!g)break;h++}for(j.moveToBookmark(e.shift());h--;){l=a[++d];l.moveToBookmark(e.shift());j.setEnd(l.endContainer,l.endOffset)}}return j}}},createBookmarks:function(b){for(var c=[],e,d=0;d<this.length;d++){c.push(e=this[d].createBookmark(b,true));for(var g=d+1;g<this.length;g++){this[g]=a(e,this[g]);this[g]=a(e,this[g],true)}}return c},createBookmarks2:function(a){for(var c= -[],e=0;e<this.length;e++)c.push(this[e].createBookmark2(a));return c},moveToBookmarks:function(a){for(var c=0;c<this.length;c++)this[c].moveToBookmark(a[c])}}})(); -(function(){function a(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function e(b){var c=CKEDITOR.skin["ua_"+b],d=CKEDITOR.env;if(c)for(var c=c.split(",").sort(function(a,b){return a>b?-1:1}),e=0,f;e<c.length;e++){f=c[e];if(d.ie&&(f.replace(/^ie/,"")==d.version||d.quirks&&f=="iequirks"))f="ie";if(d[f]){b=b+("_"+c[e]);break}}return CKEDITOR.getUrl(a()+b+".css")}function b(a,b){if(!d[a]){CKEDITOR.document.appendStyleSheet(e(a));d[a]=1}b&&b()} -function c(a){var b=a.getById(g);if(!b){b=a.getHead().append("style");b.setAttribute("id",g);b.setAttribute("type","text/css")}return b}function f(a,b,c){var d,e,f;if(CKEDITOR.env.webkit){b=b.split("}").slice(0,-1);for(e=0;e<b.length;e++)b[e]=b[e].split("{")}for(var g=0;g<a.length;g++)if(CKEDITOR.env.webkit)for(e=0;e<b.length;e++){f=b[e][1];for(d=0;d<c.length;d++)f=f.replace(c[d][0],c[d][1]);a[g].$.sheet.addRule(b[e][0],f)}else{f=b;for(d=0;d<c.length;d++)f=f.replace(c[d][0],c[d][1]);CKEDITOR.env.ie&& -CKEDITOR.env.version<11?a[g].$.styleSheet.cssText=a[g].$.styleSheet.cssText+f:a[g].$.innerHTML=a[g].$.innerHTML+f}}var d={};CKEDITOR.skin={path:a,loadPart:function(c,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){b(c,d)}):b(c,d)},getPath:function(a){return CKEDITOR.getUrl(e(a))},icons:{},addIcon:function(a,b,c,d){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:d||"16px"})},getIconStyle:function(a, -b,c,d,e){var f;if(a){a=a.toLowerCase();b&&(f=this.icons[a+"-rtl"]);f||(f=this.icons[a])}a=c||f&&f.path||"";d=d||f&&f.offset;e=e||f&&f.bgsize||"16px";return a&&"background-image:url("+CKEDITOR.getUrl(a)+");background-position:0 "+d+"px;background-size:"+e+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=c(CKEDITOR.document);return(this.setUiColor=function(a){var c=CKEDITOR.skin.chameleon,d=[[l,a]];this.uiColor=a;f([b],c(this, -"editor"),d);f(j,c(this,"panel"),d)}).call(this,a)}});var g="cke_ui_color",j=[],l=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=a.editor,a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=c(a);j.push(a);var d=b.getUiColor();d&&f([a],CKEDITOR.skin.chameleon(b,"panel"),[[l,d]])}};b.on("panelShow",a);b.on("menuShow",a);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})})(); -(function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=false;else{var a=CKEDITOR.dom.element.createFromHtml('<div style="width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"></div>',CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var e=a.getComputedStyle("border-top-color"),b=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!!(e&&e==b)}catch(c){CKEDITOR.env.hc=false}a.remove()}if(CKEDITOR.env.hc)CKEDITOR.env.cssClass=CKEDITOR.env.cssClass+" cke_hc"; -CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending){delete CKEDITOR._.pending;for(e=0;e<a.length;e++){CKEDITOR.editor.prototype.constructor.apply(a[e][0],a[e][1]);CKEDITOR.add(a[e][0])}}})();CKEDITOR.skin.name="bootstrapck";CKEDITOR.skin.ua_editor="ie,iequirks,ie7,ie8,gecko";CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8,opera"; -CKEDITOR.skin.chameleon=function(){var b=function(){return function(b,e){for(var a=b.match(/[^#]./g),c=0;3>c;c++){var f=a,h=c,d;d=parseInt(a[c],16);d=("0"+(0>e?0|d*(1+e):0|d+(255-d)*e).toString(16)).slice(-2);f[h]=d}return"#"+a.join("")}}(),c=function(){var b=new CKEDITOR.template("background:#{to};background-image:-webkit-gradient(linear,lefttop,leftbottom,from({from}),to({to}));background-image:-moz-linear-gradient(top,{from},{to});background-image:-webkit-linear-gradient(top,{from},{to});background-image:-o-linear-gradient(top,{from},{to});background-image:-ms-linear-gradient(top,{from},{to});background-image:linear-gradient(top,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='{from}',endColorstr='{to}');");return function(c, -a){return b.output({from:c,to:a})}}(),f={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "), -panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")}; -return function(g,e){var a=g.uiColor,a={id:"."+g.id,defaultBorder:b(a,-0.1),defaultGradient:c(b(a,0.9),a),lightGradient:c(b(a,1),b(a,0.7)),mediumGradient:c(b(a,0.8),b(a,0.5)),ckeButtonOn:c(b(a,0.6),b(a,0.7)),ckeResizer:b(a,-0.4),ckeToolbarSeparator:b(a,0.5),ckeColorauto:b(a,0.8),dialogBody:b(a,0.7),dialogTabSelected:c("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:b(a,-0.6),elementsPathBg:a,menubuttonIcon:b(a,0.5),menubuttonIconHover:b(a,0.3)};return f[e].output(a).replace(/\[/g, -"{").replace(/\]/g,"}")}}();CKEDITOR.plugins.add("dialogui",{onLoad:function(){var h=function(b){this._||(this._={});this._["default"]=this._.initValue=b["default"]||"";this._.required=b.required||!1;for(var a=[this._],d=1;d<arguments.length;d++)a.push(arguments[d]);a.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,a);return this._},r={build:function(b,a,d){return new CKEDITOR.ui.dialog.textInput(b,a,d)}},l={build:function(b,a,d){return new CKEDITOR.ui.dialog[a.type](b,a,d)}},n={isChanged:function(){return this.getValue()!= -this.getInitValue()},reset:function(b){this.setValue(this.getInitValue(),b)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},o=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(b,a){this._.domOnChangeRegistered||(b.on("load",function(){this.getInputElement().on("change",function(){b.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})}, -this)},this),this._.domOnChangeRegistered=!0);this.on("change",a)}},!0),s=/^on([A-Z]\w+)/,p=function(b){for(var a in b)(s.test(a)||"title"==a||"type"==a)&&delete b[a];return b};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(b,a,d,f){if(!(4>arguments.length)){var c=h.call(this,a);c.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];var e={role:a.role||"presentation"};a.includeLabel&&(e["aria-labelledby"]=c.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"div",null, -e,function(){var e=[],g=a.required?" cke_required":"";if(a.labelLayout!="horizontal")e.push('<label class="cke_dialog_ui_labeled_label'+g+'" ',' id="'+c.labelId+'"',c.inputId?' for="'+c.inputId+'"':"",(a.labelStyle?' style="'+a.labelStyle+'"':"")+">",a.label,"</label>",'<div class="cke_dialog_ui_labeled_content"',a.controlStyle?' style="'+a.controlStyle+'"':"",' role="presentation">',f.call(this,b,a),"</div>");else{g={type:"hbox",widths:a.widths,padding:0,children:[{type:"html",html:'<label class="cke_dialog_ui_labeled_label'+ -g+'" id="'+c.labelId+'" for="'+c.inputId+'"'+(a.labelStyle?' style="'+a.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(a.label)+"</span>"},{type:"html",html:'<span class="cke_dialog_ui_labeled_content"'+(a.controlStyle?' style="'+a.controlStyle+'"':"")+">"+f.call(this,b,a)+"</span>"}]};CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,g,e)}return e.join("")})}},textInput:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);var f=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",c={"class":"cke_dialog_ui_input_"+ -a.type,id:f,type:a.type};a.validate&&(this.validate=a.validate);a.maxLength&&(c.maxlength=a.maxLength);a.size&&(c.size=a.size);a.inputStyle&&(c.style=a.inputStyle);var e=this,k=!1;b.on("load",function(){e.getInputElement().on("keydown",function(a){a.data.getKeystroke()==13&&(k=true)});e.getInputElement().on("keyup",function(a){if(a.data.getKeystroke()==13&&k){b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0);k=false}},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this, -b,a,d,function(){var b=['<div class="cke_dialog_ui_input_',a.type,'" role="presentation"'];a.width&&b.push('style="width:'+a.width+'" ');b.push("><input ");c["aria-labelledby"]=this._.labelId;this._.required&&(c["aria-required"]=this._.required);for(var e in c)b.push(e+'="'+c[e]+'" ');b.push(" /></div>");return b.join("")})}},textarea:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);var f=this,c=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",e={};a.validate&&(this.validate=a.validate); -e.rows=a.rows||5;e.cols=a.cols||20;e["class"]="cke_dialog_ui_input_textarea "+(a["class"]||"");"undefined"!=typeof a.inputStyle&&(e.style=a.inputStyle);a.dir&&(e.dir=a.dir);CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){e["aria-labelledby"]=this._.labelId;this._.required&&(e["aria-required"]=this._.required);var a=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea id="',c,'" '],b;for(b in e)a.push(b+'="'+CKEDITOR.tools.htmlEncode(e[b])+'" ');a.push(">",CKEDITOR.tools.htmlEncode(f._["default"]), -"</textarea></div>");return a.join("")})}},checkbox:function(b,a,d){if(!(3>arguments.length)){var f=h.call(this,a,{"default":!!a["default"]});a.validate&&(this.validate=a.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"span",null,null,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},true),e=[],d=CKEDITOR.tools.getNextId()+"_label",g={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":d};p(c);if(a["default"])g.checked= -"checked";if(typeof c.inputStyle!="undefined")c.style=c.inputStyle;f.checkbox=new CKEDITOR.ui.dialog.uiElement(b,c,e,"input",null,g);e.push(' <label id="',d,'" for="',g.id,'"'+(a.labelStyle?' style="'+a.labelStyle+'"':"")+">",CKEDITOR.tools.htmlEncode(a.label),"</label>");return e.join("")})}},radio:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);this._["default"]||(this._["default"]=this._.initValue=a.items[0][1]);a.validate&&(this.validate=a.valdiate);var f=[],c=this;a.role="radiogroup"; -a.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){for(var e=[],d=[],g=(a.id?a.id:CKEDITOR.tools.getNextId())+"_radio",i=0;i<a.items.length;i++){var j=a.items[i],h=j[2]!==void 0?j[2]:j[0],l=j[1]!==void 0?j[1]:j[0],m=CKEDITOR.tools.getNextId()+"_radio_input",n=m+"_label",m=CKEDITOR.tools.extend({},a,{id:m,title:null,type:null},true),h=CKEDITOR.tools.extend({},m,{title:h},true),o={type:"radio","class":"cke_dialog_ui_radio_input",name:g,value:l,"aria-labelledby":n},q=[];if(c._["default"]== -l)o.checked="checked";p(m);p(h);if(typeof m.inputStyle!="undefined")m.style=m.inputStyle;m.keyboardFocusable=true;f.push(new CKEDITOR.ui.dialog.uiElement(b,m,q,"input",null,o));q.push(" ");new CKEDITOR.ui.dialog.uiElement(b,h,q,"label",null,{id:n,"for":o.id},j[0]);e.push(q.join(""))}new CKEDITOR.ui.dialog.hbox(b,f,e,d);return d.join("")});this._.children=f}},button:function(b,a,d){if(arguments.length){"function"==typeof a&&(a=a(b.getParentEditor()));h.call(this,a,{disabled:a.disabled||!1});CKEDITOR.event.implementOn(this); -var f=this;b.on("load",function(){var a=this.getElement();(function(){a.on("click",function(a){f.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(f.click(),a.data.preventDefault())})})();a.unselectable()},this);var c=CKEDITOR.tools.extend({},a);delete c.style;var e=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,c,d,"a",null,{style:a.style,href:"javascript:void(0)",title:a.label,hidefocus:"true","class":a["class"],role:"button", -"aria-labelledby":e},'<span id="'+e+'" class="cke_dialog_ui_button">'+CKEDITOR.tools.htmlEncode(a.label)+"</span>")}},select:function(b,a,d){if(!(3>arguments.length)){var f=h.call(this,a);a.validate&&(this.validate=a.validate);f.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_select":CKEDITOR.tools.getNextId()+"_select"},true),e=[],d=[],g={id:f.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId}; -e.push('<div class="cke_dialog_ui_input_',a.type,'" role="presentation"');a.width&&e.push('style="width:'+a.width+'" ');e.push(">");if(a.size!=void 0)g.size=a.size;if(a.multiple!=void 0)g.multiple=a.multiple;p(c);for(var i=0,j;i<a.items.length&&(j=a.items[i]);i++)d.push('<option value="',CKEDITOR.tools.htmlEncode(j[1]!==void 0?j[1]:j[0]).replace(/"/g,"""),'" /> ',CKEDITOR.tools.htmlEncode(j[0]));if(typeof c.inputStyle!="undefined")c.style=c.inputStyle;f.select=new CKEDITOR.ui.dialog.uiElement(b, -c,e,"select",null,g,d.join(""));e.push("</div>");return e.join("")})}},file:function(b,a,d){if(!(3>arguments.length)){void 0===a["default"]&&(a["default"]="");var f=CKEDITOR.tools.extend(h.call(this,a),{definition:a,buttons:[]});a.validate&&(this.validate=a.validate);b.on("load",function(){CKEDITOR.document.getById(f.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){f.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var b=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" role="presentation" id="', -f.frameId,'" title="',a.label,'" src="javascript:void('];b.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");b.push(')"></iframe>');return b.join("")})}},fileButton:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);var f=this;a.validate&&(this.validate=a.validate);var c=CKEDITOR.tools.extend({},a),e=c.onClick;c.className=(c.className?c.className+" ":"")+"cke_dialog_ui_button";c.onClick=function(c){var d= -a["for"];if(!e||e.call(this,c)!==false){b.getContentElement(d[0],d[1]).submit();this.disable()}};b.on("load",function(){b.getContentElement(a["for"][0],a["for"][1])._.buttons.push(f)});CKEDITOR.ui.dialog.button.call(this,b,c,d)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,a=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,d=/\/$/;return function(f,c,e){if(!(3>arguments.length)){var k=[],g=c.html;"<"!=g.charAt(0)&&(g="<span>"+g+"</span>");var i=c.focus;if(i){var j=this.focus;this.focus=function(){("function"== -typeof i?i:j).call(this);this.fire("focus")};c.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,f,c,k,"span",null,null,"");k=k.join("").match(b);g=g.match(a)||["","",""];d.test(g[1])&&(g[1]=g[1].slice(0,-1),g[2]="/"+g[2]);e.push([g[1]," ",k[1]||"",g[2]].join(""))}}}(),fieldset:function(b,a,d,f,c){var e=c.label;this._={children:a};CKEDITOR.ui.dialog.uiElement.call(this,b,c,f,"fieldset",null,null,function(){var a=[];e&&a.push("<legend"+ -(c.labelStyle?' style="'+c.labelStyle+'"':"")+">"+e+"</legend>");for(var b=0;b<d.length;b++)a.push(d[b]);return a.join("")})}},!0);CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setLabel:function(b){var a=CKEDITOR.document.getById(this._.labelId);1>a.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(a):a.getChild(0).$.nodeValue=b;return this},getLabel:function(){var b= -CKEDITOR.document.getById(this._.labelId);return!b||1>b.getChildCount()?"":b.getChild(0).getText()},eventProcessors:o},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return!this._.disabled?this.fire("click",{dialog:this._.dialog}):!1},enable:function(){this._.disabled=!1;var b=this.getElement();b&&b.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()}, -isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(b,a){this.on("click",function(){a.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)}, -focus:function(){var b=this.selectParentTab();setTimeout(function(){var a=b.getInputElement();a&&a.$.focus()},0)},select:function(){var b=this.selectParentTab();setTimeout(function(){var a=b.getInputElement();a&&(a.$.focus(),a.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(b){!b&&(b="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},keyboardFocusable:!0},n,!0);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype= -CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(b,a,d){var f=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),c=this.getInputElement().$;f.$.text=b;f.$.value=void 0===a||null===a?b:a;void 0===d||null===d?CKEDITOR.env.ie?c.add(f.$):c.add(f.$,null):c.add(f.$,d);return this},remove:function(b){this.getInputElement().$.remove(b);return this},clear:function(){for(var b=this.getInputElement().$;0< -b.length;)b.remove(0);return this},keyboardFocusable:!0},n,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(b,a){this.getInputElement().$.checked=b;!a&&this.fire("change",{value:b})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(b,a){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return o.onChange.apply(this, -arguments);b.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;"checked"==b.propertyName&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",a);return null}},keyboardFocusable:!0},n,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(b,a){for(var d=this._.children,f,c=0;c<d.length&&(f=d[c]);c++)f.getElement().$.checked=f.getValue()==b;!a&&this.fire("change",{value:b})}, -getValue:function(){for(var b=this._.children,a=0;a<b.length;a++)if(b[a].getElement().$.checked)return b[a].getValue();return null},accessKeyUp:function(){var b=this._.children,a;for(a=0;a<b.length;a++)if(b[a].getElement().$.checked){b[a].getElement().focus();return}b[0].getElement().focus()},eventProcessors:{onChange:function(b,a){if(CKEDITOR.env.ie)b.on("load",function(){for(var a=this._.children,b=this,c=0;c<a.length;c++)a[c].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&& -this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this),this.on("change",a);else return o.onChange.apply(this,arguments);return null}}},n,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,n,{getInputElement:function(){var b=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<b.$.forms.length?new CKEDITOR.dom.element(b.$.forms[0].elements[0]):this.getElement()},submit:function(){this.getInputElement().getParent().$.submit(); -return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(b){var a=/^on([A-Z]\w+)/,d,f=function(a,b,c,d){a.on("formLoaded",function(){a.getInputElement().on(c,d,a)})},c;for(c in b)if(d=c.match(a))this.eventProcessors[c]?this.eventProcessors[c].call(this,this._.dialog,b[c]):f(this,this._.dialog,d[1].toLowerCase(),b[c]);return this},reset:function(){function b(){d.$.open();var b="";f.size&&(b=f.size-(CKEDITOR.env.ie?7:0));var h=a.frameId+"_input"; -d.$.write(['<html dir="'+g+'" lang="'+i+'"><head><title>','
- -
    - -
    Loading..
    - - - - - - - diff --git a/public/ckeditor/plugins/imagebrowser/browser/browser.js b/public/ckeditor/plugins/imagebrowser/browser/browser.js deleted file mode 100644 index 9f21faa5..00000000 --- a/public/ckeditor/plugins/imagebrowser/browser/browser.js +++ /dev/null @@ -1,6 +0,0 @@ -var CkEditorImageBrowser={folders:[],images:{},ckFunctionNum:null,$folderSwitcher:null,$imagesContainer:null,init:function(){CkEditorImageBrowser.$folderSwitcher=$("#js-folder-switcher");CkEditorImageBrowser.$imagesContainer=$("#js-images-container");var a=CkEditorImageBrowser.getQueryStringParam("baseHref");if(a){var c=document.head||document.getElementsByTagName("head")[0];c.getElementsByTagName("link")[0].href=location.href.replace(/\/[^\/]*$/,"/browser.css");c.getElementsByTagName("base")[0].href= -a}CkEditorImageBrowser.ckFunctionNum=CkEditorImageBrowser.getQueryStringParam("CKEditorFuncNum");CkEditorImageBrowser.initEventHandlers();CkEditorImageBrowser.loadData(CkEditorImageBrowser.getQueryStringParam("listUrl"),function(){CkEditorImageBrowser.initFolderSwitcher()})},loadData:function(a,c){CkEditorImageBrowser.folders=[];CkEditorImageBrowser.images={};$.getJSON(a,function(a){$.each(a,function(a,b){"undefined"===typeof b.folder&&(b.folder="Images");"undefined"===typeof b.thumb&&(b.thumb=b.image); -CkEditorImageBrowser.addImage(b.folder,b.image,b.thumb)});c()}).error(function(c,d,b){CkEditorImageBrowser.$imagesContainer.html(200>c.status||400<=c.status?"HTTP Status: "+c.status+"/"+c.statusText+': "'+a+'"':"parsererror"===d?d+': invalid JSON file: "'+a+'": '+b.message:d+" / "+c.statusText+" / "+b.message)})},addImage:function(a,c,e){"undefined"===typeof CkEditorImageBrowser.images[a]&&(CkEditorImageBrowser.folders.push(a), -CkEditorImageBrowser.images[a]=[]);CkEditorImageBrowser.images[a].push({imageUrl:c,thumbUrl:e})},initFolderSwitcher:function(){var a=CkEditorImageBrowser.$folderSwitcher;a.find("li").remove();$.each(CkEditorImageBrowser.folders,function(c,e){$("
  • ").data("idx",c).text(e).appendTo(a)});0===CkEditorImageBrowser.folders.length?(a.remove(),CkEditorImageBrowser.$imagesContainer.text("No images.")):(1===CkEditorImageBrowser.folders.length&&a.hide(),a.find("li:first").click())},renderImagesForFolder:function(a){var a= -CkEditorImageBrowser.images[a],c=$("#js-template-image").html();CkEditorImageBrowser.$imagesContainer.html("");$.each(a,function(a,d){var b=c,b=b.replace("%imageUrl%",d.imageUrl),b=b.replace("%thumbUrl%",d.thumbUrl),b=$($.parseHTML(b));CkEditorImageBrowser.$imagesContainer.append(b)})},initEventHandlers:function(){$(document).on("click","#js-folder-switcher li",function(){var a=parseInt($(this).data("idx"),10),a=CkEditorImageBrowser.folders[a];$(this).siblings("li").removeClass("active");$(this).addClass("active"); -CkEditorImageBrowser.renderImagesForFolder(a)});$(document).on("click",".js-image-link",function(){window.opener.CKEDITOR.tools.callFunction(CkEditorImageBrowser.ckFunctionNum,$(this).data("url"));window.close()})},getQueryStringParam:function(a){return(a=window.location.search.match(RegExp("[?&]"+a+"=([^&]*)")))&&1e;e++)delete g[b[e]]; -if(!(d?sa:c.isEmptyObject)(g))return}(d||(delete i[j].data,sa(i[j])))&&(h?c.cleanData([a],!0):c.support.deleteExpando||i!=i.window?delete i[j]:i[j]=null)}}}function Ta(a,b,d){if(d===k&&1===a.nodeType){var e="data-"+b.replace(Rb,"-$1").toLowerCase();if(d=a.getAttribute(e),"string"==typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:+d+""===d?+d:Sb.test(d)?c.parseJSON(d):d}catch(f){}c.data(a,b,d)}else d=k}return d}function sa(a){for(var b in a)if(("data"!==b||!c.isEmptyObject(a[b]))&&"toJSON"!== -b)return!1;return!0}function ha(){return!0}function U(){return!1}function Ua(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function Va(a,b,d){if(b=b||0,c.isFunction(b))return c.grep(a,function(a,c){return!!b.call(a,c,a)===d});if(b.nodeType)return c.grep(a,function(a){return a===b===d});if("string"==typeof b){var e=c.grep(a,function(a){return 1===a.nodeType});if(Tb.test(b))return c.filter(b,e,!d);b=c.filter(b,e)}return c.grep(a,function(a){return 0<=c.inArray(a,b)===d})}function Wa(a){var b=Xa.split("|"), -a=a.createDocumentFragment();if(a.createElement)for(;b.length;)a.createElement(b.pop());return a}function Ya(a){var b=a.getAttributeNode("type");return a.type=(b&&b.specified)+"/"+a.type,a}function Za(a){var b=Ub.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ta(a,b){for(var d,e=0;null!=(d=a[e]);e++)c._data(d,"globalEval",!b||c._data(b[e],"globalEval"))}function $a(a,b){if(1===b.nodeType&&c.hasData(a)){var d,e,f;e=c._data(a);var g=c._data(b,e),h=e.events;if(h)for(d in delete g.handle, -g.events={},h){e=0;for(f=h[d].length;f>e;e++)c.event.add(b,d,h[d][e])}g.data&&(g.data=c.extend({},g.data))}}function u(a,b){var d,e,f=0,g=typeof a.getElementsByTagName!==v?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==v?a.querySelectorAll(b||"*"):k;if(!g){g=[];for(d=a.childNodes||a;null!=(e=d[f]);f++)!b||c.nodeName(e,b)?g.push(e):c.merge(g,u(e,b))}return b===k||b&&c.nodeName(a,b)?c.merge([a],g):g}function Vb(a){ua.test(a.type)&&(a.defaultChecked=a.checked)}function ab(a,b){if(b in a)return b; -for(var c=b.charAt(0).toUpperCase()+b.slice(1),e=b,f=bb.length;f--;)if(b=bb[f]+c,b in a)return b;return e}function V(a,b){return a=b||a,"none"===c.css(a,"display")||!c.contains(a.ownerDocument,a)}function cb(a,b){for(var d,e,f,g=[],h=0,i=a.length;i>h;h++)e=a[h],e.style&&(g[h]=c._data(e,"olddisplay"),d=e.style.display,b?(g[h]||"none"!==d||(e.style.display=""),""===e.style.display&&V(e)&&(g[h]=c._data(e,"olddisplay",db(e.nodeName)))):g[h]||(f=V(e),(d&&"none"!==d||!f)&&c._data(e,"olddisplay",f?d:c.css(e, -"display"))));for(h=0;i>h;h++)e=a[h],e.style&&(b&&"none"!==e.style.display&&""!==e.style.display||(e.style.display=b?g[h]||"":"none"));return a}function eb(a,b,c){return(a=Wb.exec(b))?Math.max(0,a[1]-(c||0))+(a[2]||"px"):b}function fb(a,b,d,e,f){for(var b=d===(e?"border":"content")?4:"width"===b?1:0,g=0;4>b;b+=2)"margin"===d&&(g+=c.css(a,d+M[b],!0,f)),e?("content"===d&&(g-=c.css(a,"padding"+M[b],!0,f)),"margin"!==d&&(g-=c.css(a,"border"+M[b]+"Width",!0,f))):(g+=c.css(a,"padding"+M[b],!0,f),"padding"!== -d&&(g+=c.css(a,"border"+M[b]+"Width",!0,f)));return g}function gb(a,b,d){var e=!0,f="width"===b?a.offsetWidth:a.offsetHeight,g=F(a),h=c.support.boxSizing&&"border-box"===c.css(a,"boxSizing",!1,g);if(0>=f||null==f){if(f=P(a,b,g),(0>f||null==f)&&(f=a.style[b]),ia.test(f))return f;e=h&&(c.support.boxSizingReliable||f===a.style[b]);f=parseFloat(f)||0}return f+fb(a,b,d||(h?"border":"content"),e,g)+"px"}function db(a){var b=n,d=hb[a];return d||(d=ib(a,b),"none"!==d&&d||(aa=(aa||c("'};a.setIframe=function(b,c){var d;d=a.framesetHtml(c);var f=a.iframeNumber+"_"+c;b.getElement().setHtml(d); -d=document.getElementById(f);d=d.contentWindow?d.contentWindow:d.contentDocument.document?d.contentDocument.document:d.contentDocument;d.document.open();d.document.write('iframe
    - - - - - - - - - - - - - - diff --git a/public/ckeditor/skins/bootstrapck/sample/css/bootstrapck-sample.css b/public/ckeditor/skins/bootstrapck/sample/css/bootstrapck-sample.css deleted file mode 100644 index c135ef04..00000000 --- a/public/ckeditor/skins/bootstrapck/sample/css/bootstrapck-sample.css +++ /dev/null @@ -1 +0,0 @@ -body{margin-top:1.0em;background-color:#fff;font-family:Helvetica,Arial,sans-serif;color:#404040}.container{margin:0 auto;width:900px;padding:0 0 20px}h1{font-size:40px;margin:40px 0 28px;padding:110px 0 9px;border-bottom:1px solid #ccc}h1 a,h1 a:visited,h1 a:focus,h1 a:hover{color:#404040;text-decoration:none}h1 span{font-size:18px;font-weight:normal;color:#bfbfbf}h1 span a,h1 span a:visited,h1 span a:focus,h1 span a:hover{color:#bfbfbf}h1 a{text-decoration:none}h2{font-size:23px;margin:10px 0 8px}h3{font-size:16px;margin:10px 0 8px}p{margin:0 0 30px;font-size:13px;line-height:18px}a,a:visited,a:focus{color:#0069d6;text-decoration:none}a:hover{color:#00438a;text-decoration:underline}.download{float:right}pre{background:#f5f5f5;color:#404040;padding:16px;border:1px solid rgba(0,0,0,0.05);border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,0.05) inset;margin:-20px 0 10px;line-height:200%}.twitter{margin:-20px 0 40px;color:#666}.twitter iframe{vertical-align:bottom;margin:0 0 0 5px}.footer{text-align:center;padding-top:20px;margin-top:60px;font-size:14px;color:#808080;border-top:1px solid #ccc}.footer a,.footer a:visited,.footer a:focus{color:#333}.footer a:hover{color:#000} \ No newline at end of file diff --git a/public/ckeditor/skins/bootstrapck/sample/js/analytics.js b/public/ckeditor/skins/bootstrapck/sample/js/analytics.js deleted file mode 100644 index fd6c93aa..00000000 --- a/public/ckeditor/skins/bootstrapck/sample/js/analytics.js +++ /dev/null @@ -1,4 +0,0 @@ -var _ga=_ga||{},_gaq=_gaq||[];_ga.trackSocial=function(a,c){_ga.trackFacebook(a,c);_ga.trackTwitter(a,c)}; -_ga.trackFacebook=function(a,c){var d=_ga.buildTrackerName_(c);try{FB&&FB.Event&&FB.Event.subscribe&&(FB.Event.subscribe("edge.create",function(b){_gaq.push([d+"_trackSocial","facebook","like",b,a])}),FB.Event.subscribe("edge.remove",function(b){_gaq.push([d+"_trackSocial","facebook","unlike",b,a])}),FB.Event.subscribe("message.send",function(b){_gaq.push([d+"_trackSocial","facebook","send",b,a])}))}catch(e){}};_ga.buildTrackerName_=function(a){return a?a+".":""}; -_ga.trackTwitter=function(a,c){var d=_ga.buildTrackerName_(c);try{twttr&&twttr.events&&twttr.events.bind&&twttr.events.bind("tweet",function(b){if(b){var c;b.target&&"IFRAME"==b.target.nodeName&&(c=_ga.extractParamFromUri_(b.target.src,"url"));_gaq.push([d+"_trackSocial","twitter","tweet",c,a])}})}catch(e){}};_ga.extractParamFromUri_=function(a,c){if(a){var a=a.split("#")[0],d=a.split("?");if(1!=d.length)for(var d=decodeURI(d[1]),c=c+"=",d=d.split("&"),e=0,b;b=d[e];++e)if(0===b.indexOf(c))return unescape(b.split("=")[1])}}; -jQuery&&jQuery("a").click(function(){var a=jQuery(this).attr("href");null!=a&&(a.match(/^http/i)&&!a.match(document.domain)?_gaq.push(["_trackEvent","outgoing","click",a]):a.match(/\.(doc|pdf|xls|ppt|zip|txt|vsd|vxd|js|css|rar|exe|wma|mov|avi|wmv|mp3)$/i)?_gaq.push(["_trackEvent","download","click",a]):a.match(/^mailto:/i)&&_gaq.push(["_trackEvent","mailto","click",a]))}); \ No newline at end of file diff --git a/public/ckeditor/skins/bootstrapck/sample/js/jquery-1.11.0.min.js b/public/ckeditor/skins/bootstrapck/sample/js/jquery-1.11.0.min.js deleted file mode 100644 index 662b2272..00000000 --- a/public/ckeditor/skins/bootstrapck/sample/js/jquery-1.11.0.min.js +++ /dev/null @@ -1,189 +0,0 @@ -!function(o,ea){"object"==typeof module&&"object"==typeof module.exports?module.exports=o.document?ea(o,!0):function(o){if(!o.document)throw Error("jQuery requires a window with a document");return ea(o)}:ea(o)}("undefined"!=typeof window?window:this,function(o,ea){function Ba(a){var b=a.length,d=c.type(a);return"function"===d||c.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===d||0===b||"number"==typeof b&&0e;e++)c.event.add(b,d,h[d][e])}g.data&&(g.data=c.extend({},g.data))}}function hb(a,b){var d=c(b.createElement(a)).appendTo(b.body),e=o.getDefaultComputedStyle?o.getDefaultComputedStyle(d[0]).display:c.css(d[0],"display");return d.detach(),e}function ib(a){var b=l,d=jb[a];return d||(d=hb(a,b),"none"!==d&&d||(fa=(fa||c("'),this.modal_arrows?this.modal_arrows.css("display","none"):void 0},showVimeoVideo:function(a){var b,c,d;return b=500/281,d=this.$element.data("width")||560,d=this.checkDimensions(d),c=d/b,this.resize(d),this.lightbox_body.html(''),this.modal_arrows?this.modal_arrows.css("display","none"):void 0},showInstagramVideo:function(a){var b,c;return c=this.$element.data("width")||612,c=this.checkDimensions(c),b=c,this.resize(c),this.lightbox_body.html(''),this.modal_arrows?this.modal_arrows.css("display","none"):void 0},error:function(a){return this.lightbox_body.html(a),this},preloadImage:function(b,c){var d,e=this;return d=new Image,(null==c||c===!0)&&(d.onload=function(){var b;return b=a(""),b.attr("src",d.src),b.addClass("img-responsive"),e.lightbox_body.html(b),e.modal_arrows&&e.modal_arrows.css("display","block"),e.resize(d.width)},d.onerror=function(){return e.error("Failed to load image: "+b)}),d.src=b,d},resize:function(b){var c;return c=b+this.border.left+this.padding.left+this.padding.right+this.border.right,this.modal_dialog.css("width","auto").css("max-width",c),this.lightbox_container.find("a").css("padding-top",function(){return a(this).parent().height()/2}),this},checkDimensions:function(a){var b,c;return c=a+this.border.left+this.padding.left+this.padding.right+this.border.right,b=document.body.clientWidth,c>b&&(a=this.modal_body.width()),a},close:function(){return this.modal.modal("hide")},addTrailingSlash:function(a){return"/"!==a.substr(-1)&&(a+="/"),a}},a.fn.ekkoLightbox=function(c){return this.each(function(){var d;return d=a(this),c=a.extend({remote:d.attr("data-remote")||d.attr("href"),gallery_parent_selector:d.attr("data-parent"),type:d.attr("data-type")},c,d.data()),new b(this,c),this})},a.fn.ekkoLightbox.defaults={gallery_parent_selector:"*:not(.row)",left_arrow_class:".glyphicon .glyphicon-chevron-left",right_arrow_class:".glyphicon .glyphicon-chevron-right",directional_arrows:!0,type:null,always_show_close:!0,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){}}}).call(this); \ No newline at end of file diff --git a/resources/js/jquery-1.11.0.js b/resources/js/jquery-1.11.0.js deleted file mode 100755 index b46de336..00000000 --- a/resources/js/jquery-1.11.0.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="
    ",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f -}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML="
    a",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/\s*$/g,sb={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:l.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?""!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("');return b.join("")})}},fileButton:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);var f=this;a.validate&&(this.validate=a.validate);var c=CKEDITOR.tools.extend({},a),e=c.onClick;c.className=(c.className?c.className+" ":"")+"cke_dialog_ui_button";c.onClick=function(c){var d= +a["for"];if(!e||e.call(this,c)!==false){b.getContentElement(d[0],d[1]).submit();this.disable()}};b.on("load",function(){b.getContentElement(a["for"][0],a["for"][1])._.buttons.push(f)});CKEDITOR.ui.dialog.button.call(this,b,c,d)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,a=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,d=/\/$/;return function(f,c,e){if(!(3>arguments.length)){var k=[],g=c.html;"<"!=g.charAt(0)&&(g=""+g+"");var i=c.focus;if(i){var j=this.focus;this.focus=function(){("function"== +typeof i?i:j).call(this);this.fire("focus")};c.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,f,c,k,"span",null,null,"");k=k.join("").match(b);g=g.match(a)||["","",""];d.test(g[1])&&(g[1]=g[1].slice(0,-1),g[2]="/"+g[2]);e.push([g[1]," ",k[1]||"",g[2]].join(""))}}}(),fieldset:function(b,a,d,f,c){var e=c.label;this._={children:a};CKEDITOR.ui.dialog.uiElement.call(this,b,c,f,"fieldset",null,null,function(){var a=[];e&&a.push(""+e+"");for(var b=0;ba.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(a):a.getChild(0).$.nodeValue=b;return this},getLabel:function(){var b= +CKEDITOR.document.getById(this._.labelId);return!b||1>b.getChildCount()?"":b.getChild(0).getText()},eventProcessors:o},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return!this._.disabled?this.fire("click",{dialog:this._.dialog}):!1},enable:function(){this._.disabled=!1;var b=this.getElement();b&&b.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()}, +isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(b,a){this.on("click",function(){a.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)}, +focus:function(){var b=this.selectParentTab();setTimeout(function(){var a=b.getInputElement();a&&a.$.focus()},0)},select:function(){var b=this.selectParentTab();setTimeout(function(){var a=b.getInputElement();a&&(a.$.focus(),a.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(b){!b&&(b="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},keyboardFocusable:!0},n,!0);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype= +CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(b,a,d){var f=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),c=this.getInputElement().$;f.$.text=b;f.$.value=void 0===a||null===a?b:a;void 0===d||null===d?CKEDITOR.env.ie?c.add(f.$):c.add(f.$,null):c.add(f.$,d);return this},remove:function(b){this.getInputElement().$.remove(b);return this},clear:function(){for(var b=this.getInputElement().$;0< +b.length;)b.remove(0);return this},keyboardFocusable:!0},n,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(b,a){this.getInputElement().$.checked=b;!a&&this.fire("change",{value:b})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(b,a){if(!CKEDITOR.env.ie||8','
    + +
      + +
      Loading..
      + + + + + + + diff --git a/public/default/js/formitems/ckeditor/plugins/imagebrowser/browser/browser.js b/public/default/js/formitems/ckeditor/plugins/imagebrowser/browser/browser.js new file mode 100644 index 00000000..9f21faa5 --- /dev/null +++ b/public/default/js/formitems/ckeditor/plugins/imagebrowser/browser/browser.js @@ -0,0 +1,6 @@ +var CkEditorImageBrowser={folders:[],images:{},ckFunctionNum:null,$folderSwitcher:null,$imagesContainer:null,init:function(){CkEditorImageBrowser.$folderSwitcher=$("#js-folder-switcher");CkEditorImageBrowser.$imagesContainer=$("#js-images-container");var a=CkEditorImageBrowser.getQueryStringParam("baseHref");if(a){var c=document.head||document.getElementsByTagName("head")[0];c.getElementsByTagName("link")[0].href=location.href.replace(/\/[^\/]*$/,"/browser.css");c.getElementsByTagName("base")[0].href= +a}CkEditorImageBrowser.ckFunctionNum=CkEditorImageBrowser.getQueryStringParam("CKEditorFuncNum");CkEditorImageBrowser.initEventHandlers();CkEditorImageBrowser.loadData(CkEditorImageBrowser.getQueryStringParam("listUrl"),function(){CkEditorImageBrowser.initFolderSwitcher()})},loadData:function(a,c){CkEditorImageBrowser.folders=[];CkEditorImageBrowser.images={};$.getJSON(a,function(a){$.each(a,function(a,b){"undefined"===typeof b.folder&&(b.folder="Images");"undefined"===typeof b.thumb&&(b.thumb=b.image); +CkEditorImageBrowser.addImage(b.folder,b.image,b.thumb)});c()}).error(function(c,d,b){CkEditorImageBrowser.$imagesContainer.html(200>c.status||400<=c.status?"HTTP Status: "+c.status+"/"+c.statusText+': "'+a+'"':"parsererror"===d?d+': invalid JSON file: "'+a+'": '+b.message:d+" / "+c.statusText+" / "+b.message)})},addImage:function(a,c,e){"undefined"===typeof CkEditorImageBrowser.images[a]&&(CkEditorImageBrowser.folders.push(a), +CkEditorImageBrowser.images[a]=[]);CkEditorImageBrowser.images[a].push({imageUrl:c,thumbUrl:e})},initFolderSwitcher:function(){var a=CkEditorImageBrowser.$folderSwitcher;a.find("li").remove();$.each(CkEditorImageBrowser.folders,function(c,e){$("
    • ").data("idx",c).text(e).appendTo(a)});0===CkEditorImageBrowser.folders.length?(a.remove(),CkEditorImageBrowser.$imagesContainer.text("No images.")):(1===CkEditorImageBrowser.folders.length&&a.hide(),a.find("li:first").click())},renderImagesForFolder:function(a){var a= +CkEditorImageBrowser.images[a],c=$("#js-template-image").html();CkEditorImageBrowser.$imagesContainer.html("");$.each(a,function(a,d){var b=c,b=b.replace("%imageUrl%",d.imageUrl),b=b.replace("%thumbUrl%",d.thumbUrl),b=$($.parseHTML(b));CkEditorImageBrowser.$imagesContainer.append(b)})},initEventHandlers:function(){$(document).on("click","#js-folder-switcher li",function(){var a=parseInt($(this).data("idx"),10),a=CkEditorImageBrowser.folders[a];$(this).siblings("li").removeClass("active");$(this).addClass("active"); +CkEditorImageBrowser.renderImagesForFolder(a)});$(document).on("click",".js-image-link",function(){window.opener.CKEDITOR.tools.callFunction(CkEditorImageBrowser.ckFunctionNum,$(this).data("url"));window.close()})},getQueryStringParam:function(a){return(a=window.location.search.match(RegExp("[?&]"+a+"=([^&]*)")))&&1e;e++)delete g[b[e]]; +if(!(d?sa:c.isEmptyObject)(g))return}(d||(delete i[j].data,sa(i[j])))&&(h?c.cleanData([a],!0):c.support.deleteExpando||i!=i.window?delete i[j]:i[j]=null)}}}function Ta(a,b,d){if(d===k&&1===a.nodeType){var e="data-"+b.replace(Rb,"-$1").toLowerCase();if(d=a.getAttribute(e),"string"==typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:+d+""===d?+d:Sb.test(d)?c.parseJSON(d):d}catch(f){}c.data(a,b,d)}else d=k}return d}function sa(a){for(var b in a)if(("data"!==b||!c.isEmptyObject(a[b]))&&"toJSON"!== +b)return!1;return!0}function ha(){return!0}function U(){return!1}function Ua(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function Va(a,b,d){if(b=b||0,c.isFunction(b))return c.grep(a,function(a,c){return!!b.call(a,c,a)===d});if(b.nodeType)return c.grep(a,function(a){return a===b===d});if("string"==typeof b){var e=c.grep(a,function(a){return 1===a.nodeType});if(Tb.test(b))return c.filter(b,e,!d);b=c.filter(b,e)}return c.grep(a,function(a){return 0<=c.inArray(a,b)===d})}function Wa(a){var b=Xa.split("|"), +a=a.createDocumentFragment();if(a.createElement)for(;b.length;)a.createElement(b.pop());return a}function Ya(a){var b=a.getAttributeNode("type");return a.type=(b&&b.specified)+"/"+a.type,a}function Za(a){var b=Ub.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ta(a,b){for(var d,e=0;null!=(d=a[e]);e++)c._data(d,"globalEval",!b||c._data(b[e],"globalEval"))}function $a(a,b){if(1===b.nodeType&&c.hasData(a)){var d,e,f;e=c._data(a);var g=c._data(b,e),h=e.events;if(h)for(d in delete g.handle, +g.events={},h){e=0;for(f=h[d].length;f>e;e++)c.event.add(b,d,h[d][e])}g.data&&(g.data=c.extend({},g.data))}}function u(a,b){var d,e,f=0,g=typeof a.getElementsByTagName!==v?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==v?a.querySelectorAll(b||"*"):k;if(!g){g=[];for(d=a.childNodes||a;null!=(e=d[f]);f++)!b||c.nodeName(e,b)?g.push(e):c.merge(g,u(e,b))}return b===k||b&&c.nodeName(a,b)?c.merge([a],g):g}function Vb(a){ua.test(a.type)&&(a.defaultChecked=a.checked)}function ab(a,b){if(b in a)return b; +for(var c=b.charAt(0).toUpperCase()+b.slice(1),e=b,f=bb.length;f--;)if(b=bb[f]+c,b in a)return b;return e}function V(a,b){return a=b||a,"none"===c.css(a,"display")||!c.contains(a.ownerDocument,a)}function cb(a,b){for(var d,e,f,g=[],h=0,i=a.length;i>h;h++)e=a[h],e.style&&(g[h]=c._data(e,"olddisplay"),d=e.style.display,b?(g[h]||"none"!==d||(e.style.display=""),""===e.style.display&&V(e)&&(g[h]=c._data(e,"olddisplay",db(e.nodeName)))):g[h]||(f=V(e),(d&&"none"!==d||!f)&&c._data(e,"olddisplay",f?d:c.css(e, +"display"))));for(h=0;i>h;h++)e=a[h],e.style&&(b&&"none"!==e.style.display&&""!==e.style.display||(e.style.display=b?g[h]||"":"none"));return a}function eb(a,b,c){return(a=Wb.exec(b))?Math.max(0,a[1]-(c||0))+(a[2]||"px"):b}function fb(a,b,d,e,f){for(var b=d===(e?"border":"content")?4:"width"===b?1:0,g=0;4>b;b+=2)"margin"===d&&(g+=c.css(a,d+M[b],!0,f)),e?("content"===d&&(g-=c.css(a,"padding"+M[b],!0,f)),"margin"!==d&&(g-=c.css(a,"border"+M[b]+"Width",!0,f))):(g+=c.css(a,"padding"+M[b],!0,f),"padding"!== +d&&(g+=c.css(a,"border"+M[b]+"Width",!0,f)));return g}function gb(a,b,d){var e=!0,f="width"===b?a.offsetWidth:a.offsetHeight,g=F(a),h=c.support.boxSizing&&"border-box"===c.css(a,"boxSizing",!1,g);if(0>=f||null==f){if(f=P(a,b,g),(0>f||null==f)&&(f=a.style[b]),ia.test(f))return f;e=h&&(c.support.boxSizingReliable||f===a.style[b]);f=parseFloat(f)||0}return f+fb(a,b,d||(h?"border":"content"),e,g)+"px"}function db(a){var b=n,d=hb[a];return d||(d=ib(a,b),"none"!==d&&d||(aa=(aa||c("'};a.setIframe=function(b,c){var d;d=a.framesetHtml(c);var f=a.iframeNumber+"_"+c;b.getElement().setHtml(d); +d=document.getElementById(f);d=d.contentWindow?d.contentWindow:d.contentDocument.document?d.contentDocument.document:d.contentDocument;d.document.open();d.document.write('iframe
      + + + + + + + + + + + + + + diff --git a/public/default/js/formitems/ckeditor/skins/bootstrapck/sample/css/bootstrapck-sample.css b/public/default/js/formitems/ckeditor/skins/bootstrapck/sample/css/bootstrapck-sample.css new file mode 100644 index 00000000..c135ef04 --- /dev/null +++ b/public/default/js/formitems/ckeditor/skins/bootstrapck/sample/css/bootstrapck-sample.css @@ -0,0 +1 @@ +body{margin-top:1.0em;background-color:#fff;font-family:Helvetica,Arial,sans-serif;color:#404040}.container{margin:0 auto;width:900px;padding:0 0 20px}h1{font-size:40px;margin:40px 0 28px;padding:110px 0 9px;border-bottom:1px solid #ccc}h1 a,h1 a:visited,h1 a:focus,h1 a:hover{color:#404040;text-decoration:none}h1 span{font-size:18px;font-weight:normal;color:#bfbfbf}h1 span a,h1 span a:visited,h1 span a:focus,h1 span a:hover{color:#bfbfbf}h1 a{text-decoration:none}h2{font-size:23px;margin:10px 0 8px}h3{font-size:16px;margin:10px 0 8px}p{margin:0 0 30px;font-size:13px;line-height:18px}a,a:visited,a:focus{color:#0069d6;text-decoration:none}a:hover{color:#00438a;text-decoration:underline}.download{float:right}pre{background:#f5f5f5;color:#404040;padding:16px;border:1px solid rgba(0,0,0,0.05);border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,0.05) inset;margin:-20px 0 10px;line-height:200%}.twitter{margin:-20px 0 40px;color:#666}.twitter iframe{vertical-align:bottom;margin:0 0 0 5px}.footer{text-align:center;padding-top:20px;margin-top:60px;font-size:14px;color:#808080;border-top:1px solid #ccc}.footer a,.footer a:visited,.footer a:focus{color:#333}.footer a:hover{color:#000} \ No newline at end of file diff --git a/public/default/js/formitems/ckeditor/skins/bootstrapck/sample/js/analytics.js b/public/default/js/formitems/ckeditor/skins/bootstrapck/sample/js/analytics.js new file mode 100644 index 00000000..fd6c93aa --- /dev/null +++ b/public/default/js/formitems/ckeditor/skins/bootstrapck/sample/js/analytics.js @@ -0,0 +1,4 @@ +var _ga=_ga||{},_gaq=_gaq||[];_ga.trackSocial=function(a,c){_ga.trackFacebook(a,c);_ga.trackTwitter(a,c)}; +_ga.trackFacebook=function(a,c){var d=_ga.buildTrackerName_(c);try{FB&&FB.Event&&FB.Event.subscribe&&(FB.Event.subscribe("edge.create",function(b){_gaq.push([d+"_trackSocial","facebook","like",b,a])}),FB.Event.subscribe("edge.remove",function(b){_gaq.push([d+"_trackSocial","facebook","unlike",b,a])}),FB.Event.subscribe("message.send",function(b){_gaq.push([d+"_trackSocial","facebook","send",b,a])}))}catch(e){}};_ga.buildTrackerName_=function(a){return a?a+".":""}; +_ga.trackTwitter=function(a,c){var d=_ga.buildTrackerName_(c);try{twttr&&twttr.events&&twttr.events.bind&&twttr.events.bind("tweet",function(b){if(b){var c;b.target&&"IFRAME"==b.target.nodeName&&(c=_ga.extractParamFromUri_(b.target.src,"url"));_gaq.push([d+"_trackSocial","twitter","tweet",c,a])}})}catch(e){}};_ga.extractParamFromUri_=function(a,c){if(a){var a=a.split("#")[0],d=a.split("?");if(1!=d.length)for(var d=decodeURI(d[1]),c=c+"=",d=d.split("&"),e=0,b;b=d[e];++e)if(0===b.indexOf(c))return unescape(b.split("=")[1])}}; +jQuery&&jQuery("a").click(function(){var a=jQuery(this).attr("href");null!=a&&(a.match(/^http/i)&&!a.match(document.domain)?_gaq.push(["_trackEvent","outgoing","click",a]):a.match(/\.(doc|pdf|xls|ppt|zip|txt|vsd|vxd|js|css|rar|exe|wma|mov|avi|wmv|mp3)$/i)?_gaq.push(["_trackEvent","download","click",a]):a.match(/^mailto:/i)&&_gaq.push(["_trackEvent","mailto","click",a]))}); \ No newline at end of file diff --git a/public/default/js/formitems/ckeditor/skins/bootstrapck/sample/js/jquery-1.11.0.min.js b/public/default/js/formitems/ckeditor/skins/bootstrapck/sample/js/jquery-1.11.0.min.js new file mode 100644 index 00000000..662b2272 --- /dev/null +++ b/public/default/js/formitems/ckeditor/skins/bootstrapck/sample/js/jquery-1.11.0.min.js @@ -0,0 +1,189 @@ +!function(o,ea){"object"==typeof module&&"object"==typeof module.exports?module.exports=o.document?ea(o,!0):function(o){if(!o.document)throw Error("jQuery requires a window with a document");return ea(o)}:ea(o)}("undefined"!=typeof window?window:this,function(o,ea){function Ba(a){var b=a.length,d=c.type(a);return"function"===d||c.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===d||0===b||"number"==typeof b&&0e;e++)c.event.add(b,d,h[d][e])}g.data&&(g.data=c.extend({},g.data))}}function hb(a,b){var d=c(b.createElement(a)).appendTo(b.body),e=o.getDefaultComputedStyle?o.getDefaultComputedStyle(d[0]).display:c.css(d[0],"display");return d.detach(),e}function ib(a){var b=l,d=jb[a];return d||(d=hb(a,b),"none"!==d&&d||(fa=(fa||c("'),this.modal_arrows?this.modal_arrows.css("display","none"):void 0},showVimeoVideo:function(a){var b,c,d;return b=500/281,d=this.$element.data("width")||560,d=this.checkDimensions(d),c=d/b,this.resize(d),this.lightbox_body.html(''),this.modal_arrows?this.modal_arrows.css("display","none"):void 0},showInstagramVideo:function(a){var b,c;return c=this.$element.data("width")||612,c=this.checkDimensions(c),b=c,this.resize(c),this.lightbox_body.html(''),this.modal_arrows?this.modal_arrows.css("display","none"):void 0},error:function(a){return this.lightbox_body.html(a),this},preloadImage:function(b,c){var d,e=this;return d=new Image,(null==c||c===!0)&&(d.onload=function(){var b;return b=a(""),b.attr("src",d.src),b.addClass("img-responsive"),e.lightbox_body.html(b),e.modal_arrows&&e.modal_arrows.css("display","block"),e.resize(d.width)},d.onerror=function(){return e.error("Failed to load image: "+b)}),d.src=b,d},resize:function(b){var c;return c=b+this.border.left+this.padding.left+this.padding.right+this.border.right,this.modal_dialog.css("width","auto").css("max-width",c),this.lightbox_container.find("a").css("padding-top",function(){return a(this).parent().height()/2}),this},checkDimensions:function(a){var b,c;return c=a+this.border.left+this.padding.left+this.padding.right+this.border.right,b=document.body.clientWidth,c>b&&(a=this.modal_body.width()),a},close:function(){return this.modal.modal("hide")},addTrailingSlash:function(a){return"/"!==a.substr(-1)&&(a+="/"),a}},a.fn.ekkoLightbox=function(c){return this.each(function(){var d;return d=a(this),c=a.extend({remote:d.attr("data-remote")||d.attr("href"),gallery_parent_selector:d.attr("data-parent"),type:d.attr("data-type")},c,d.data()),new b(this,c),this})},a.fn.ekkoLightbox.defaults={gallery_parent_selector:"*:not(.row)",left_arrow_class:".glyphicon .glyphicon-chevron-left",right_arrow_class:".glyphicon .glyphicon-chevron-right",directional_arrows:!0,type:null,always_show_close:!0,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){}}}).call(this); \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Columns/Column.php b/src/SleepingOwl/Admin/Columns/Column.php index 09ffefe0..e57bd5e5 100644 --- a/src/SleepingOwl/Admin/Columns/Column.php +++ b/src/SleepingOwl/Admin/Columns/Column.php @@ -10,6 +10,7 @@ * @method static \SleepingOwl\Admin\Columns\Column\Filter filter($name) * @method static \SleepingOwl\Admin\Columns\Column\Url url($name) * @method static \SleepingOwl\Admin\Columns\Column\Lists lists($name) + * @method static \SleepingOwl\Admin\Columns\Column\Image image($name) * @method static \SleepingOwl\Admin\Columns\Column\DateTime datetime($name) * @method static \SleepingOwl\Admin\Columns\Column\Custom custom() * @method static \SleepingOwl\Admin\Columns\Column\Control control() diff --git a/src/SleepingOwl/Admin/Columns/Column/Image.php b/src/SleepingOwl/Admin/Columns/Column/Image.php new file mode 100644 index 00000000..301a240b --- /dev/null +++ b/src/SleepingOwl/Admin/Columns/Column/Image.php @@ -0,0 +1,32 @@ +getValue($this->instance, $this->name()); + if ( ! empty($value) && (strpos($value, '://') === false)) + { + $value = asset($value); + } + $params = [ + 'value' => $value, + 'append' => $this->append(), + ]; + return view(AdminTemplate::view('column.image'), $params); + } + +} \ No newline at end of file diff --git a/src/SleepingOwl/Admin/FormItems/BaseDateTime.php b/src/SleepingOwl/Admin/FormItems/BaseDateTime.php index 92fe7568..c2cd8442 100644 --- a/src/SleepingOwl/Admin/FormItems/BaseDateTime.php +++ b/src/SleepingOwl/Admin/FormItems/BaseDateTime.php @@ -66,6 +66,10 @@ public function save() { $name = $this->name(); $value = parent::value(); + if (empty($value)) + { + $value = null; + } if ( ! is_null($value)) { $value = Carbon::createFromFormat($this->format(), $value); diff --git a/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php b/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php index 262121aa..475f273d 100644 --- a/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php +++ b/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php @@ -18,6 +18,7 @@ public function register() Column::register('control', 'SleepingOwl\Admin\Columns\Column\Control'); Column::register('treeControl', 'SleepingOwl\Admin\Columns\Column\TreeControl'); Column::register('order', 'SleepingOwl\Admin\Columns\Column\Order'); + Column::register('image', 'SleepingOwl\Admin\Columns\Column\Image'); } } \ No newline at end of file diff --git a/src/views/default/column/image.blade.php b/src/views/default/column/image.blade.php new file mode 100644 index 00000000..5bd865a7 --- /dev/null +++ b/src/views/default/column/image.blade.php @@ -0,0 +1,8 @@ +
      \ No newline at end of file diff --git a/src/views/default/form/default.blade.php b/src/views/default/form/default.blade.php index abe3596b..098c5ebf 100644 --- a/src/views/default/form/default.blade.php +++ b/src/views/default/form/default.blade.php @@ -4,6 +4,8 @@ @foreach ($items as $item) {!! $item !!} @endforeach - - {{ trans('admin::lang.table.cancel') }} + \ No newline at end of file diff --git a/src/views/default/formitem/_image.blade.php b/src/views/default/formitem/_image.blade.php deleted file mode 100644 index dbb5eb4f..00000000 --- a/src/views/default/formitem/_image.blade.php +++ /dev/null @@ -1,35 +0,0 @@ -
      - -
      -
      - - @include(AdminTemplate::view('formitem.errors')) -
      - \ No newline at end of file From 974198057bd8cdba146db78a0658b6211f93939d Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Thu, 23 Apr 2015 17:57:43 +0400 Subject: [PATCH 021/108] Action column --- src/SleepingOwl/Admin/Columns/Column.php | 1 + .../Admin/Columns/Column/Action.php | 106 ++++++++++++++++++ .../Admin/Columns/Column/Order.php | 5 - .../Admin/Display/DisplayTable.php | 21 +++- .../Admin/Providers/ColumnServiceProvider.php | 1 + src/views/default/column/action.blade.php | 10 ++ 6 files changed, 137 insertions(+), 7 deletions(-) create mode 100644 src/SleepingOwl/Admin/Columns/Column/Action.php create mode 100644 src/views/default/column/action.blade.php diff --git a/src/SleepingOwl/Admin/Columns/Column.php b/src/SleepingOwl/Admin/Columns/Column.php index e57bd5e5..6301022d 100644 --- a/src/SleepingOwl/Admin/Columns/Column.php +++ b/src/SleepingOwl/Admin/Columns/Column.php @@ -16,6 +16,7 @@ * @method static \SleepingOwl\Admin\Columns\Column\Control control() * @method static \SleepingOwl\Admin\Columns\Column\TreeControl treeControl() * @method static \SleepingOwl\Admin\Columns\Column\Order order() + * @method static \SleepingOwl\Admin\Columns\Column\Action action($name) */ class Column extends AliasBinder { diff --git a/src/SleepingOwl/Admin/Columns/Column/Action.php b/src/SleepingOwl/Admin/Columns/Column/Action.php new file mode 100644 index 00000000..bc49c4a1 --- /dev/null +++ b/src/SleepingOwl/Admin/Columns/Column/Action.php @@ -0,0 +1,106 @@ +icon; + } + $this->icon = $icon; + return $this; + } + + public function style($style = null) + { + if (is_null($style)) + { + return $this->style; + } + $this->style = $style; + return $this; + } + + public function callback($callback = null) + { + if (is_null($callback)) + { + return $this->callback; + } + $this->callback = $callback; + return $this; + } + + public function target($target = null) + { + if (is_null($target)) + { + return $this->target; + } + $this->target = $target; + return $this; + } + + public function value($value = null) + { + if (is_null($value)) + { + return $this->value; + } + $this->value = $value; + return $this; + } + + public function render() + { + $params = [ + 'icon' => $this->icon(), + 'style' => $this->style(), + 'value' => $this->value(), + 'target' => $this->target(), + 'url' => $this->url(), + ]; + return view(AdminTemplate::view('column.action'), $params); + } + + public function url($url = null) + { + if (is_null($url)) + { + if ( ! is_null($this->url)) + { + if (is_callable($this->url)) + { + return call_user_func($this->url, $this->instance); + } + return strtr($this->url, [':id' => $this->instance->getKey()]); + } + return $this->model()->displayUrl([ + '_action' => $this->name(), + '_id' => $this->instance->getKey(), + ]); + } + $this->url = $url; + return $this; + } + + public function call($instance) + { + $callback = $this->callback(); + call_user_func($callback, $instance); + } + +} \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Columns/Column/Order.php b/src/SleepingOwl/Admin/Columns/Column/Order.php index c7b8a271..8fbe029b 100644 --- a/src/SleepingOwl/Admin/Columns/Column/Order.php +++ b/src/SleepingOwl/Admin/Columns/Column/Order.php @@ -7,11 +7,6 @@ class Order extends BaseColumn implements WithRoutesInterface { - public function initialize() - { - parent::initialize(); - } - public static function registerRoutes() { Route::post('{adminModel}/{adminModelId}/up', [ diff --git a/src/SleepingOwl/Admin/Display/DisplayTable.php b/src/SleepingOwl/Admin/Display/DisplayTable.php index 88f2fef5..0b958b43 100644 --- a/src/SleepingOwl/Admin/Display/DisplayTable.php +++ b/src/SleepingOwl/Admin/Display/DisplayTable.php @@ -107,11 +107,11 @@ public function title() public function initialize() { - $this->initializeFilters(); - $this->repository = new BaseRepository($this->class); $this->repository->with($this->with()); + $this->initializeFilters(); + foreach ($this->allColumns() as $column) { if ($column instanceof ColumnInterface) @@ -121,8 +121,25 @@ public function initialize() } } + protected function initializeAction() + { + $action = Input::get('_action'); + $id = Input::get('_id'); + if ( ! is_null($action) && ! is_null($id)) + { + foreach ($this->columns() as $column) + { + if ($column->name() == $action) + { + $column->call($this->repository->find($id)); + } + } + } + } + protected function initializeFilters() { + $this->initializeAction(); foreach ($this->filters() as $filter) { $filter->initialize(); diff --git a/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php b/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php index 475f273d..ebd55835 100644 --- a/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php +++ b/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php @@ -11,6 +11,7 @@ public function register() Column::register('string', 'SleepingOwl\Admin\Columns\Column\String'); Column::register('count', 'SleepingOwl\Admin\Columns\Column\Count'); Column::register('lists', 'SleepingOwl\Admin\Columns\Column\Lists'); + Column::register('action', 'SleepingOwl\Admin\Columns\Column\Action'); Column::register('filter', 'SleepingOwl\Admin\Columns\Column\Filter'); Column::register('url', 'SleepingOwl\Admin\Columns\Column\Url'); Column::register('custom', 'SleepingOwl\Admin\Columns\Column\Custom'); diff --git a/src/views/default/column/action.blade.php b/src/views/default/column/action.blade.php new file mode 100644 index 00000000..75c4b773 --- /dev/null +++ b/src/views/default/column/action.blade.php @@ -0,0 +1,10 @@ + \ No newline at end of file From 03e477aeacc7914e10396b2677928e2299fefbc4 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Thu, 23 Apr 2015 18:01:47 +0400 Subject: [PATCH 022/108] Dependencies update --- composer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index af2a7aa9..c66d0a16 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,11 @@ "name": "sleeping-owl/admin", "description": "Aministrative interface builder for Laravel.", "homepage": "http://sleeping-owl.github.io", - "keywords": ["laravel", "admin", "administrator"], + "keywords": [ + "laravel", + "admin", + "administrator" + ], "license": "MIT", "authors": [ { @@ -13,11 +17,7 @@ "require": { "php": ">=5.4.0", "illuminate/support": "5.*", - "intervention/image": "2.*", - "intervention/imagecache": "2.*", - "doctrine/dbal": "~2.3", - "sleeping-owl/with-join": "1.*", - "illuminate/html": "~5.0" + "doctrine/dbal": "~2.3" }, "require-dev": { "phpunit/phpunit": "4.*", From 9de6a55778c5f514809f91032b26af723ce8e2e7 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Thu, 23 Apr 2015 22:33:31 +0400 Subject: [PATCH 023/108] Bulk actions --- public/default/js/admin-default.js | 2 - public/default/js/columns/checkbox.js | 22 +++++++++++ public/default/js/columns/control.js | 3 +- src/SleepingOwl/Admin/Columns/Column.php | 1 + .../Admin/Columns/Column/Action.php | 12 +++++- .../Admin/Columns/Column/Checkbox.php | 35 +++++++++++++++++ .../Admin/Columns/Column/Control.php | 8 ++++ .../Admin/Columns/Column/Image.php | 6 +++ .../Admin/Display/DisplayTable.php | 38 +++++++++++++++++-- src/SleepingOwl/Admin/Form/FormDefault.php | 2 +- .../Admin/FormItems/BaseDateTime.php | 14 ++++++- .../Http/Controllers/AdminController.php | 8 +++- .../Admin/Providers/ColumnServiceProvider.php | 1 + .../Admin/Repository/BaseRepository.php | 11 ++++++ src/views/default/column/action.blade.php | 2 +- src/views/default/column/checkbox.blade.php | 3 ++ src/views/default/column/control.blade.php | 2 +- src/views/default/column/header.blade.php | 2 +- .../default/display/datatables.blade.php | 7 +++- src/views/default/display/table.blade.php | 7 +++- src/views/default/formitem/checkbox.blade.php | 2 +- 21 files changed, 171 insertions(+), 17 deletions(-) create mode 100644 public/default/js/columns/checkbox.js create mode 100644 src/SleepingOwl/Admin/Columns/Column/Checkbox.php create mode 100644 src/views/default/column/checkbox.blade.php diff --git a/public/default/js/admin-default.js b/public/default/js/admin-default.js index f52f2faa..d5ad4155 100644 --- a/public/default/js/admin-default.js +++ b/public/default/js/admin-default.js @@ -27,6 +27,4 @@ $(function () $('input[type="text"]:first').focus(); })(); - bootbox.setDefaults('locale', window.admin.locale); - }); \ No newline at end of file diff --git a/public/default/js/columns/checkbox.js b/public/default/js/columns/checkbox.js new file mode 100644 index 00000000..3cf2abce --- /dev/null +++ b/public/default/js/columns/checkbox.js @@ -0,0 +1,22 @@ +$(function () +{ + $('.adminCheckboxAll').change(function () + { + var checked = $(this).is(':checked'); + $('.adminCheckboxRow').prop('checked', checked).filter(':first').change(); + }); + $('.adminCheckboxRow').change(function () + { + var selected = []; + $('.adminCheckboxRow:checked').each(function () + { + selected.push($(this).val()); + }); + $('.tableActions .btnAction').each(function () + { + var $this = $(this); + var url = $this.data('href') + selected.join(','); + $this.attr('href', url); + }); + }); +}); \ No newline at end of file diff --git a/public/default/js/columns/control.js b/public/default/js/columns/control.js index e4670d88..372d518f 100644 --- a/public/default/js/columns/control.js +++ b/public/default/js/columns/control.js @@ -12,4 +12,5 @@ $(function () } }); }); -}) \ No newline at end of file + bootbox.setDefaults('locale', window.admin.locale); +}); \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Columns/Column.php b/src/SleepingOwl/Admin/Columns/Column.php index 6301022d..27c7dd25 100644 --- a/src/SleepingOwl/Admin/Columns/Column.php +++ b/src/SleepingOwl/Admin/Columns/Column.php @@ -16,6 +16,7 @@ * @method static \SleepingOwl\Admin\Columns\Column\Control control() * @method static \SleepingOwl\Admin\Columns\Column\TreeControl treeControl() * @method static \SleepingOwl\Admin\Columns\Column\Order order() + * @method static \SleepingOwl\Admin\Columns\Column\Checkbox checkbox() * @method static \SleepingOwl\Admin\Columns\Column\Action action($name) */ class Column extends AliasBinder diff --git a/src/SleepingOwl/Admin/Columns/Column/Action.php b/src/SleepingOwl/Admin/Columns/Column/Action.php index bc49c4a1..db35e383 100644 --- a/src/SleepingOwl/Admin/Columns/Column/Action.php +++ b/src/SleepingOwl/Admin/Columns/Column/Action.php @@ -14,6 +14,12 @@ class Action extends NamedColumn protected $value; protected $url; + function __construct($name) + { + parent::__construct($name); + $this->orderable(false); + } + public function icon($icon = null) { if (is_null($icon)) @@ -86,7 +92,11 @@ public function url($url = null) { return call_user_func($this->url, $this->instance); } - return strtr($this->url, [':id' => $this->instance->getKey()]); + if ( ! is_null($this->instance)) + { + return strtr($this->url, [':id' => $this->instance->getKey()]); + } + return $this->url; } return $this->model()->displayUrl([ '_action' => $this->name(), diff --git a/src/SleepingOwl/Admin/Columns/Column/Checkbox.php b/src/SleepingOwl/Admin/Columns/Column/Checkbox.php new file mode 100644 index 00000000..6ca301a5 --- /dev/null +++ b/src/SleepingOwl/Admin/Columns/Column/Checkbox.php @@ -0,0 +1,35 @@ +label(''); + $this->orderable(false); + } + + public function render() + { + $params = [ + 'value' => $this->instance->getKey(), + ]; + return view(AdminTemplate::view('column.' . $this->view), $params); + } + +} \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Columns/Column/Control.php b/src/SleepingOwl/Admin/Columns/Column/Control.php index 47bbf760..b960f58b 100644 --- a/src/SleepingOwl/Admin/Columns/Column/Control.php +++ b/src/SleepingOwl/Admin/Columns/Column/Control.php @@ -12,10 +12,18 @@ class Control extends BaseColumn public function initialize() { parent::initialize(); + AssetManager::addScript('admin::default/js/bootbox.js'); AssetManager::addScript('admin::default/js/columns/control.js'); } + function __construct() + { + parent::__construct(); + + $this->orderable(false); + } + protected function model() { return Admin::model(get_class($this->instance)); diff --git a/src/SleepingOwl/Admin/Columns/Column/Image.php b/src/SleepingOwl/Admin/Columns/Column/Image.php index 301a240b..8ac751af 100644 --- a/src/SleepingOwl/Admin/Columns/Column/Image.php +++ b/src/SleepingOwl/Admin/Columns/Column/Image.php @@ -15,6 +15,12 @@ public function initialize() AssetManager::addScript('admin::default/js/columns/image.js'); } + function __construct($name) + { + parent::__construct($name); + $this->orderable(false); + } + public function render() { $value = $this->getValue($this->instance, $this->name()); diff --git a/src/SleepingOwl/Admin/Display/DisplayTable.php b/src/SleepingOwl/Admin/Display/DisplayTable.php index 0b958b43..b4434244 100644 --- a/src/SleepingOwl/Admin/Display/DisplayTable.php +++ b/src/SleepingOwl/Admin/Display/DisplayTable.php @@ -23,6 +23,7 @@ class DisplayTable implements Renderable, DisplayInterface protected $activeFilters = []; protected $controlActive = true; protected $parameters = []; + protected $actions = []; public function setClass($class) { @@ -125,13 +126,26 @@ protected function initializeAction() { $action = Input::get('_action'); $id = Input::get('_id'); - if ( ! is_null($action) && ! is_null($id)) + $ids = Input::get('_ids'); + if ( ! is_null($action) && ( ! is_null($id) || ! is_null($ids))) { - foreach ($this->columns() as $column) + $columns = array_merge($this->columns(), $this->actions()); + foreach ($columns as $column) { + if ( ! $column instanceof Column\NamedColumn) continue; + if ($column->name() == $action) { - $column->call($this->repository->find($id)); + $param = null; + if ( ! is_null($id)) + { + $param = $this->repository->find($id); + } else + { + $ids = explode(',', $ids); + $param = $this->repository->findMany($ids); + } + $column->call($param); } } } @@ -172,6 +186,23 @@ protected function modifyQuery($query) } } + public function actions($actions = null) + { + if (is_null($actions)) + { + foreach ($this->actions as $action) + { + $action->url($this->model()->displayUrl([ + '_action' => $action->name(), + '_ids' => '', + ])); + } + return $this->actions; + } + $this->actions = $actions; + return $this; + } + public function controlActive($controlActive = null) { if (is_null($controlActive)) @@ -216,6 +247,7 @@ protected function getParams() 'columns' => $this->allColumns(), 'creatable' => ! is_null($this->model()->create()), 'createUrl' => $this->model()->createUrl($this->parameters() + Input::all()), + 'actions' => $this->actions(), ]; } diff --git a/src/SleepingOwl/Admin/Form/FormDefault.php b/src/SleepingOwl/Admin/Form/FormDefault.php index 8b995ecb..79958f37 100644 --- a/src/SleepingOwl/Admin/Form/FormDefault.php +++ b/src/SleepingOwl/Admin/Form/FormDefault.php @@ -129,7 +129,7 @@ public function render() 'items' => $this->items(), 'instance' => $this->instance(), 'action' => $this->action, - 'backUrl' => $this->model()->displayUrl(), + 'backUrl' => session('_redirectBack', URL::previous()), ]; return view(AdminTemplate::view('form.default'), $params); } diff --git a/src/SleepingOwl/Admin/FormItems/BaseDateTime.php b/src/SleepingOwl/Admin/FormItems/BaseDateTime.php index c2cd8442..e580cf0d 100644 --- a/src/SleepingOwl/Admin/FormItems/BaseDateTime.php +++ b/src/SleepingOwl/Admin/FormItems/BaseDateTime.php @@ -56,7 +56,19 @@ public function value() } if ( ! is_null($value)) { - $time = Carbon::parse($value); + try + { + $time = Carbon::parse($value); + } catch (\Exception $e) + { + try + { + $time = Carbon::createFromFormat($this->format(), $value); + } catch (\Exception $e) + { + return null; + } + } $value = $time->format($this->format()); } return $value; diff --git a/src/SleepingOwl/Admin/Http/Controllers/AdminController.php b/src/SleepingOwl/Admin/Http/Controllers/AdminController.php index ca5ca536..10d80486 100644 --- a/src/SleepingOwl/Admin/Http/Controllers/AdminController.php +++ b/src/SleepingOwl/Admin/Http/Controllers/AdminController.php @@ -38,7 +38,9 @@ public function postStore($model) { if ($validator = $create->validate($model)) { - return Redirect::back()->withErrors($validator)->withInput(); + return Redirect::back()->withErrors($validator)->withInput()->with([ + '_redirectBack' => Input::get('_redirectBack'), + ]); } $create->save($model); } @@ -66,7 +68,9 @@ public function postUpdate($model, $id) { if ($validator = $edit->validate($model)) { - return Redirect::back()->withErrors($validator)->withInput(); + return Redirect::back()->withErrors($validator)->withInput()->with([ + '_redirectBack' => Input::get('_redirectBack'), + ]); } $edit->save($model); } diff --git a/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php b/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php index ebd55835..1d00acd5 100644 --- a/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php +++ b/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php @@ -12,6 +12,7 @@ public function register() Column::register('count', 'SleepingOwl\Admin\Columns\Column\Count'); Column::register('lists', 'SleepingOwl\Admin\Columns\Column\Lists'); Column::register('action', 'SleepingOwl\Admin\Columns\Column\Action'); + Column::register('checkbox', 'SleepingOwl\Admin\Columns\Column\Checkbox'); Column::register('filter', 'SleepingOwl\Admin\Columns\Column\Filter'); Column::register('url', 'SleepingOwl\Admin\Columns\Column\Url'); Column::register('custom', 'SleepingOwl\Admin\Columns\Column\Custom'); diff --git a/src/SleepingOwl/Admin/Repository/BaseRepository.php b/src/SleepingOwl/Admin/Repository/BaseRepository.php index 41ba18d8..814fbe9b 100644 --- a/src/SleepingOwl/Admin/Repository/BaseRepository.php +++ b/src/SleepingOwl/Admin/Repository/BaseRepository.php @@ -1,6 +1,7 @@ model->find($id); } + public function findMany($ids) + { + $query = $this->model->query(); + if (method_exists($this->model, 'withTrashed')) + { + $query->withTrashed(); + } + return $query->whereIn($this->model->getKeyName(), $ids)->get(); + } + public function delete($id) { $this->find($id)->delete(); diff --git a/src/views/default/column/action.blade.php b/src/views/default/column/action.blade.php index 75c4b773..b689f479 100644 --- a/src/views/default/column/action.blade.php +++ b/src/views/default/column/action.blade.php @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/src/views/default/column/control.blade.php b/src/views/default/column/control.blade.php index fe6efc82..3753f169 100644 --- a/src/views/default/column/control.blade.php +++ b/src/views/default/column/control.blade.php @@ -1,4 +1,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/views/default/display/datatables.blade.php b/src/views/default/display/datatables.blade.php index 30f2ac01..00538ae9 100644 --- a/src/views/default/display/datatables.blade.php +++ b/src/views/default/display/datatables.blade.php @@ -6,8 +6,13 @@ @endif @if ($creatable) - {{ trans('admin::lang.table.new-entry') }} + {{ trans('admin::lang.table.new-entry') }} @endif +
      + @foreach ($actions as $action) + {!! $action !!} + @endforeach +
      + @if ( ! empty($value)) + + + + @endif + {!! $append !!} + + + @if ($icon) + + @endif + @if ($style == 'long') + {{ $value }} + @endif + + - + @if ($icon) @endif diff --git a/src/views/default/column/checkbox.blade.php b/src/views/default/column/checkbox.blade.php new file mode 100644 index 00000000..aa2c109b --- /dev/null +++ b/src/views/default/column/checkbox.blade.php @@ -0,0 +1,3 @@ + + + + @if ($editable) @endif diff --git a/src/views/default/column/header.blade.php b/src/views/default/column/header.blade.php index 3ffa2e53..9036a4bb 100644 --- a/src/views/default/column/header.blade.php +++ b/src/views/default/column/header.blade.php @@ -1 +1 @@ -{{{ $title }}}{!! $title !!}
      diff --git a/src/views/default/display/table.blade.php b/src/views/default/display/table.blade.php index 815b014e..0b40d1b7 100644 --- a/src/views/default/display/table.blade.php +++ b/src/views/default/display/table.blade.php @@ -6,8 +6,13 @@ @endif @if ($creatable) - {{ trans('admin::lang.table.new-entry') }} + {{ trans('admin::lang.table.new-entry') }} @endif +
      + @foreach ($actions as $action) + {!! $action !!} + @endforeach +
      diff --git a/src/views/default/formitem/checkbox.blade.php b/src/views/default/formitem/checkbox.blade.php index c5d26775..38df6e5d 100644 --- a/src/views/default/formitem/checkbox.blade.php +++ b/src/views/default/formitem/checkbox.blade.php @@ -1,7 +1,7 @@
      @include(AdminTemplate::view('formitem.errors')) From 585e77a26be39ab892030ec714c448999c2f1138 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Thu, 23 Apr 2015 23:54:20 +0400 Subject: [PATCH 024/108] File form item --- public/default/js/formitems/image/init.js | 11 +++++++-- src/SleepingOwl/Admin/FormItems/File.php | 15 ++++++++++++ src/SleepingOwl/Admin/FormItems/FormItem.php | 1 + src/SleepingOwl/Admin/FormItems/Image.php | 12 +++++++--- .../Providers/FormItemServiceProvider.php | 1 + src/lang/en/lang.php | 4 ++++ src/lang/ru/lang.php | 4 ++++ src/views/default/formitem/file.blade.php | 23 +++++++++++++++++++ src/views/default/formitem/image.blade.php | 3 ++- 9 files changed, 68 insertions(+), 6 deletions(-) create mode 100644 src/SleepingOwl/Admin/FormItems/File.php create mode 100644 src/views/default/formitem/file.blade.php diff --git a/public/default/js/formitems/image/init.js b/public/default/js/formitems/image/init.js index aacce58b..e159afc6 100644 --- a/public/default/js/formitems/image/init.js +++ b/public/default/js/formitems/image/init.js @@ -5,11 +5,14 @@ $(function () var $item = $(item); var $group = $item.closest('.form-group'); var $errors = $item.find('.errors'); - var $thumbnail = $item.find('.thumbnail img'); + var $noValue = $item.find('.no-value'); + var $hasValue = $item.find('.has-value'); + var $thumbnail = $item.find('.thumbnail img.has-value'); var $input = $item.find('.imageValue'); var flow = new Flow({ target: $item.data('target'), testChunks: false, + chunkSize: 1024 * 1024 * 1024, query: { _token: $item.data('token') } @@ -26,7 +29,10 @@ $(function () var result = $.parseJSON(message); $thumbnail.attr('src', result.url); + $hasValue.find('span').text(result.value); $input.val(result.value); + $noValue.addClass('hidden'); + $hasValue.removeClass('hidden'); }); flow.on('fileError', function(file, message){ flow.removeFile(file); @@ -43,7 +49,8 @@ $(function () $item.find('.imageRemove').click(function () { $input.val(''); - $thumbnail.attr('src', 'http://www.placehold.it/200x150/EFEFEF/AAAAAA&text=no+image'); + $noValue.removeClass('hidden'); + $hasValue.addClass('hidden'); }); }); }); \ No newline at end of file diff --git a/src/SleepingOwl/Admin/FormItems/File.php b/src/SleepingOwl/Admin/FormItems/File.php new file mode 100644 index 00000000..367f3b04 --- /dev/null +++ b/src/SleepingOwl/Admin/FormItems/File.php @@ -0,0 +1,15 @@ + 'required', + ]; + } + +} \ No newline at end of file diff --git a/src/SleepingOwl/Admin/FormItems/FormItem.php b/src/SleepingOwl/Admin/FormItems/FormItem.php index 2a6cb107..4dea64d2 100644 --- a/src/SleepingOwl/Admin/FormItems/FormItem.php +++ b/src/SleepingOwl/Admin/FormItems/FormItem.php @@ -7,6 +7,7 @@ * @package SleepingOwl\Admin\Form * @method static \SleepingOwl\Admin\FormItems\Text text($name, $label = null) * @method static \SleepingOwl\Admin\FormItems\Image image($name, $label = null) + * @method static \SleepingOwl\Admin\FormItems\File file($name, $label = null) * @method static \SleepingOwl\Admin\FormItems\Time time($name, $label = null) * @method static \SleepingOwl\Admin\FormItems\Date date($name, $label = null) * @method static \SleepingOwl\Admin\FormItems\Timestamp timestamp($name, $label = null) diff --git a/src/SleepingOwl/Admin/FormItems/Image.php b/src/SleepingOwl/Admin/FormItems/Image.php index 1d8b4c22..49d11325 100644 --- a/src/SleepingOwl/Admin/FormItems/Image.php +++ b/src/SleepingOwl/Admin/FormItems/Image.php @@ -26,9 +26,7 @@ public static function registerRoutes() 'as' => 'admin.formitems.image.upload', function () { - $validator = Validator::make(Input::all(), [ - 'file' => 'image', - ]); + $validator = Validator::make(Input::all(), static::uploadValidationRules()); if ($validator->fails()) { return Response::make($validator->errors()->get('file'), 400); @@ -46,4 +44,12 @@ function () } ]); } + + protected static function uploadValidationRules() + { + return [ + 'file' => 'image', + ]; + } + } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Providers/FormItemServiceProvider.php b/src/SleepingOwl/Admin/Providers/FormItemServiceProvider.php index b3604117..3c88c9ed 100644 --- a/src/SleepingOwl/Admin/Providers/FormItemServiceProvider.php +++ b/src/SleepingOwl/Admin/Providers/FormItemServiceProvider.php @@ -24,6 +24,7 @@ public function register() FormItem::register('textarea', 'SleepingOwl\Admin\FormItems\Textarea'); FormItem::register('view', 'SleepingOwl\Admin\FormItems\View'); FormItem::register('image', 'SleepingOwl\Admin\FormItems\Image'); + FormItem::register('file', 'SleepingOwl\Admin\FormItems\File'); } } \ No newline at end of file diff --git a/src/lang/en/lang.php b/src/lang/en/lang.php index df29ed0c..81e7d99e 100644 --- a/src/lang/en/lang.php +++ b/src/lang/en/lang.php @@ -68,4 +68,8 @@ 'browse' => 'Select Image', 'remove' => 'Remove Image', ], + 'file' => [ + 'browse' => 'Select File', + 'remove' => 'Remove File', + ], ]; \ No newline at end of file diff --git a/src/lang/ru/lang.php b/src/lang/ru/lang.php index e6053875..52b7cd1f 100644 --- a/src/lang/ru/lang.php +++ b/src/lang/ru/lang.php @@ -68,4 +68,8 @@ 'browse' => 'Выбор изображения', 'remove' => 'Удалить', ], + 'file' => [ + 'browse' => 'Выбор файла', + 'remove' => 'Удалить', + ], ]; \ No newline at end of file diff --git a/src/views/default/formitem/file.blade.php b/src/views/default/formitem/file.blade.php new file mode 100644 index 00000000..e1a740e0 --- /dev/null +++ b/src/views/default/formitem/file.blade.php @@ -0,0 +1,23 @@ +
      + +
      +
      +
      +
      + no file +
      + +
      +
      +
      +
      {{ trans('admin::lang.file.browse') }}
      +
      {{ trans('admin::lang.file.remove') }}
      +
      + +
      + @include(AdminTemplate::view('formitem.errors')) +
      +
      +
      \ No newline at end of file diff --git a/src/views/default/formitem/image.blade.php b/src/views/default/formitem/image.blade.php index 215aefd4..dcc17e4a 100644 --- a/src/views/default/formitem/image.blade.php +++ b/src/views/default/formitem/image.blade.php @@ -3,7 +3,8 @@
      - + +
      From ae1f4029d71e03e3cf05fea3c5531143fc0bf9ad Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Fri, 24 Apr 2015 15:56:50 +0400 Subject: [PATCH 025/108] Images form item --- .../js/formitems/image/initMultiple.js | 56 +++++++++++++++++++ src/SleepingOwl/Admin/FormItems/File.php | 1 + src/SleepingOwl/Admin/FormItems/FormItem.php | 1 + src/SleepingOwl/Admin/FormItems/Image.php | 7 ++- src/SleepingOwl/Admin/FormItems/Images.php | 32 +++++++++++ .../Providers/FormItemServiceProvider.php | 1 + src/lang/en/lang.php | 5 +- src/lang/ru/lang.php | 5 +- src/views/default/formitem/file.blade.php | 2 +- src/views/default/formitem/image.blade.php | 2 +- src/views/default/formitem/images.blade.php | 22 ++++++++ 11 files changed, 125 insertions(+), 9 deletions(-) create mode 100644 public/default/js/formitems/image/initMultiple.js create mode 100644 src/SleepingOwl/Admin/FormItems/Images.php create mode 100644 src/views/default/formitem/images.blade.php diff --git a/public/default/js/formitems/image/initMultiple.js b/public/default/js/formitems/image/initMultiple.js new file mode 100644 index 00000000..e159afc6 --- /dev/null +++ b/public/default/js/formitems/image/initMultiple.js @@ -0,0 +1,56 @@ +$(function () +{ + $('.imageUpload').each(function (index, item) + { + var $item = $(item); + var $group = $item.closest('.form-group'); + var $errors = $item.find('.errors'); + var $noValue = $item.find('.no-value'); + var $hasValue = $item.find('.has-value'); + var $thumbnail = $item.find('.thumbnail img.has-value'); + var $input = $item.find('.imageValue'); + var flow = new Flow({ + target: $item.data('target'), + testChunks: false, + chunkSize: 1024 * 1024 * 1024, + query: { + _token: $item.data('token') + } + }); + flow.assignBrowse($item.find('.imageBrowse'), true); + flow.on('filesSubmitted', function(file) { + flow.upload(); + }); + flow.on('fileSuccess', function(file,message){ + flow.removeFile(file); + + $errors.html(''); + $group.removeClass('has-error'); + + var result = $.parseJSON(message); + $thumbnail.attr('src', result.url); + $hasValue.find('span').text(result.value); + $input.val(result.value); + $noValue.addClass('hidden'); + $hasValue.removeClass('hidden'); + }); + flow.on('fileError', function(file, message){ + flow.removeFile(file); + + var response = $.parseJSON(message); + var errors = ''; + $.each(response, function (index, error) + { + errors += '

      ' + error + '

      ' + }); + $errors.html(errors); + $group.addClass('has-error'); + }); + $item.find('.imageRemove').click(function () + { + $input.val(''); + $noValue.removeClass('hidden'); + $hasValue.addClass('hidden'); + }); + }); +}); \ No newline at end of file diff --git a/src/SleepingOwl/Admin/FormItems/File.php b/src/SleepingOwl/Admin/FormItems/File.php index 367f3b04..1f435ac0 100644 --- a/src/SleepingOwl/Admin/FormItems/File.php +++ b/src/SleepingOwl/Admin/FormItems/File.php @@ -4,6 +4,7 @@ class File extends Image { protected $view = 'file'; + protected static $route = 'uploadFile'; protected static function uploadValidationRules() { diff --git a/src/SleepingOwl/Admin/FormItems/FormItem.php b/src/SleepingOwl/Admin/FormItems/FormItem.php index 4dea64d2..efa1a176 100644 --- a/src/SleepingOwl/Admin/FormItems/FormItem.php +++ b/src/SleepingOwl/Admin/FormItems/FormItem.php @@ -7,6 +7,7 @@ * @package SleepingOwl\Admin\Form * @method static \SleepingOwl\Admin\FormItems\Text text($name, $label = null) * @method static \SleepingOwl\Admin\FormItems\Image image($name, $label = null) + * @method static \SleepingOwl\Admin\FormItems\Images images($name, $label = null) * @method static \SleepingOwl\Admin\FormItems\File file($name, $label = null) * @method static \SleepingOwl\Admin\FormItems\Time time($name, $label = null) * @method static \SleepingOwl\Admin\FormItems\Date date($name, $label = null) diff --git a/src/SleepingOwl/Admin/FormItems/Image.php b/src/SleepingOwl/Admin/FormItems/Image.php index 49d11325..beb298ea 100644 --- a/src/SleepingOwl/Admin/FormItems/Image.php +++ b/src/SleepingOwl/Admin/FormItems/Image.php @@ -11,19 +11,20 @@ class Image extends NamedFormItem implements WithRoutesInterface { protected $view = 'image'; + protected static $route = 'uploadImage'; public function initialize() { parent::initialize(); - AssetManager::addScript('admin::default/js/formitems/image/flow.min.js'); AssetManager::addScript('admin::default/js/formitems/image/init.js'); + AssetManager::addScript('admin::default/js/formitems/image/flow.min.js'); } public static function registerRoutes() { - Route::post('formitems/image/upload', [ - 'as' => 'admin.formitems.image.upload', + Route::post('formitems/image/' . static::$route, [ + 'as' => 'admin.formitems.image.' . static::$route, function () { $validator = Validator::make(Input::all(), static::uploadValidationRules()); diff --git a/src/SleepingOwl/Admin/FormItems/Images.php b/src/SleepingOwl/Admin/FormItems/Images.php new file mode 100644 index 00000000..30db4ce5 --- /dev/null +++ b/src/SleepingOwl/Admin/FormItems/Images.php @@ -0,0 +1,32 @@ +name(); + $value = Input::get($name, ''); + if ( ! empty($value)) + { + $value = explode(',', $value); + } else + { + $value = []; + } + Input::merge([$name => $value]); + parent::save(); + } + +} \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Providers/FormItemServiceProvider.php b/src/SleepingOwl/Admin/Providers/FormItemServiceProvider.php index 3c88c9ed..5161e333 100644 --- a/src/SleepingOwl/Admin/Providers/FormItemServiceProvider.php +++ b/src/SleepingOwl/Admin/Providers/FormItemServiceProvider.php @@ -24,6 +24,7 @@ public function register() FormItem::register('textarea', 'SleepingOwl\Admin\FormItems\Textarea'); FormItem::register('view', 'SleepingOwl\Admin\FormItems\View'); FormItem::register('image', 'SleepingOwl\Admin\FormItems\Image'); + FormItem::register('images', 'SleepingOwl\Admin\FormItems\Images'); FormItem::register('file', 'SleepingOwl\Admin\FormItems\File'); } diff --git a/src/lang/en/lang.php b/src/lang/en/lang.php index 81e7d99e..dc29f33d 100644 --- a/src/lang/en/lang.php +++ b/src/lang/en/lang.php @@ -65,8 +65,9 @@ 'selected' => 'selected' ], 'image' => [ - 'browse' => 'Select Image', - 'remove' => 'Remove Image', + 'browse' => 'Select Image', + 'browseMultiple' => 'Select Images', + 'remove' => 'Remove Image', ], 'file' => [ 'browse' => 'Select File', diff --git a/src/lang/ru/lang.php b/src/lang/ru/lang.php index 52b7cd1f..9d2678b9 100644 --- a/src/lang/ru/lang.php +++ b/src/lang/ru/lang.php @@ -65,8 +65,9 @@ 'selected' => 'выбрано' ], 'image' => [ - 'browse' => 'Выбор изображения', - 'remove' => 'Удалить', + 'browse' => 'Выбор изображения', + 'browseMultiple' => 'Выбор изображений', + 'remove' => 'Удалить', ], 'file' => [ 'browse' => 'Выбор файла', diff --git a/src/views/default/formitem/file.blade.php b/src/views/default/formitem/file.blade.php index e1a740e0..db0ebb3c 100644 --- a/src/views/default/formitem/file.blade.php +++ b/src/views/default/formitem/file.blade.php @@ -1,6 +1,6 @@
      -
      +
      diff --git a/src/views/default/formitem/image.blade.php b/src/views/default/formitem/image.blade.php index dcc17e4a..44ff7205 100644 --- a/src/views/default/formitem/image.blade.php +++ b/src/views/default/formitem/image.blade.php @@ -1,6 +1,6 @@
      -
      +
      diff --git a/src/views/default/formitem/images.blade.php b/src/views/default/formitem/images.blade.php new file mode 100644 index 00000000..de1d082a --- /dev/null +++ b/src/views/default/formitem/images.blade.php @@ -0,0 +1,22 @@ +
      + +
      +
      + @foreach ($value as $image) +
      +
      + + Remove +
      +
      + @endforeach +
      +
      +
      {{ trans('admin::lang.image.browseMultiple') }}
      +
      + +
      + @include(AdminTemplate::view('formitem.errors')) +
      +
      +
      \ No newline at end of file From e2bd78a9a9e4780908a03b5c0e6e52630ce1ae9e Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Fri, 24 Apr 2015 16:01:24 +0400 Subject: [PATCH 026/108] Tree display value fix --- src/SleepingOwl/Admin/Display/DisplayTree.php | 12 ++++++++++++ src/views/default/display/datatables.blade.php | 6 +++--- src/views/default/display/tab_content.blade.php | 2 +- src/views/default/display/tabbed.blade.php | 4 ++-- src/views/default/display/table.blade.php | 6 +++--- src/views/default/display/tree_children.blade.php | 4 ++-- src/views/default/form/default.blade.php | 2 +- 7 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/SleepingOwl/Admin/Display/DisplayTree.php b/src/SleepingOwl/Admin/Display/DisplayTree.php index 5a133002..36e0dc48 100644 --- a/src/SleepingOwl/Admin/Display/DisplayTree.php +++ b/src/SleepingOwl/Admin/Display/DisplayTree.php @@ -19,6 +19,7 @@ class DisplayTree implements Renderable, DisplayInterface, WithRoutesInterface protected $repository; protected $reorderable = true; protected $parameters = []; + protected $value = 'title'; public function setClass($class) { @@ -90,6 +91,7 @@ public function render() 'items' => $this->repository->tree(), 'reorderable' => $this->reorderable(), 'url' => Admin::model($this->class)->displayUrl(), + 'value' => $this->value(), 'creatable' => ! is_null($this->model()->create()), 'createUrl' => $this->model()->createUrl($this->parameters() + Input::all()), 'controls' => [Column::treeControl()], @@ -111,4 +113,14 @@ public static function registerRoutes() }); } + public function value($value = null) + { + if (is_null($value)) + { + return $this->value; + } + $this->value = $value; + return $this; + } + } \ No newline at end of file diff --git a/src/views/default/display/datatables.blade.php b/src/views/default/display/datatables.blade.php index 00538ae9..10df35c3 100644 --- a/src/views/default/display/datatables.blade.php +++ b/src/views/default/display/datatables.blade.php @@ -10,14 +10,14 @@ @endif
      @foreach ($actions as $action) - {!! $action !!} + {!! $action->render() !!} @endforeach
      @foreach ($columns as $column) - {!! $column->header() !!} + {!! $column->header()->render() !!} @endforeach @@ -28,7 +28,7 @@ setInstance($instance); ?> - {!! $column !!} + {!! $column->render() !!} @endforeach @endforeach diff --git a/src/views/default/display/tab_content.blade.php b/src/views/default/display/tab_content.blade.php index 6fac6ce3..8de603f0 100644 --- a/src/views/default/display/tab_content.blade.php +++ b/src/views/default/display/tab_content.blade.php @@ -1,3 +1,3 @@
      - {!! $content !!} + {!! $content->render() !!}
      \ No newline at end of file diff --git a/src/views/default/display/tabbed.blade.php b/src/views/default/display/tabbed.blade.php index 1a1495a9..0858e95a 100644 --- a/src/views/default/display/tabbed.blade.php +++ b/src/views/default/display/tabbed.blade.php @@ -1,12 +1,12 @@
      @foreach ($tabs as $tab) - {!! $tab->content() !!} + {!! $tab->content()->render() !!} @endforeach
      \ No newline at end of file diff --git a/src/views/default/display/table.blade.php b/src/views/default/display/table.blade.php index 0b40d1b7..0ce533e3 100644 --- a/src/views/default/display/table.blade.php +++ b/src/views/default/display/table.blade.php @@ -10,14 +10,14 @@ @endif
      @foreach ($actions as $action) - {!! $action !!} + {!! $action->render() !!} @endforeach
      @foreach ($columns as $column) - {!! $column->header() !!} + {!! $column->header()->render() !!} @endforeach @@ -28,7 +28,7 @@ setInstance($instance); ?> - {!! $column !!} + {!! $column->render() !!} @endforeach @endforeach diff --git a/src/views/default/display/tree_children.blade.php b/src/views/default/display/tree_children.blade.php index 3cd5b997..39cf8a8a 100644 --- a/src/views/default/display/tree_children.blade.php +++ b/src/views/default/display/tree_children.blade.php @@ -4,7 +4,7 @@
      @endif
      - {{{ $entry->title }}} + {{{ $entry->$value }}} @foreach ($controls as $control) setInstance($entry); } ?> - {!! $control !!} + {!! $control->render() !!} @endforeach
      @if ($entry->children->count() > 0) diff --git a/src/views/default/form/default.blade.php b/src/views/default/form/default.blade.php index 098c5ebf..62fbc2b9 100644 --- a/src/views/default/form/default.blade.php +++ b/src/views/default/form/default.blade.php @@ -2,7 +2,7 @@ @foreach ($items as $item) - {!! $item !!} + {!! $item->render() !!} @endforeach
      From 577fe74679623ed3af17eeb31cb659326fdcd679 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Fri, 24 Apr 2015 17:06:11 +0400 Subject: [PATCH 027/108] Images form item fix --- .../js/formitems/image/initMultiple.js | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/public/default/js/formitems/image/initMultiple.js b/public/default/js/formitems/image/initMultiple.js index e159afc6..58ca9f3c 100644 --- a/public/default/js/formitems/image/initMultiple.js +++ b/public/default/js/formitems/image/initMultiple.js @@ -1,13 +1,11 @@ $(function () { - $('.imageUpload').each(function (index, item) + $('.imageUploadMultiple').each(function (index, item) { var $item = $(item); var $group = $item.closest('.form-group'); + var $innerGroup = $item.find('.form-group'); var $errors = $item.find('.errors'); - var $noValue = $item.find('.no-value'); - var $hasValue = $item.find('.has-value'); - var $thumbnail = $item.find('.thumbnail img.has-value'); var $input = $item.find('.imageValue'); var flow = new Flow({ target: $item.data('target'), @@ -17,7 +15,16 @@ $(function () _token: $item.data('token') } }); - flow.assignBrowse($item.find('.imageBrowse'), true); + var updateValue = function () + { + var values = []; + $item.find('img[data-value]').each(function () + { + values.push($(this).data('value')); + }); + $input.val(values.join(',')); + }; + flow.assignBrowse($item.find('.imageBrowse')); flow.on('filesSubmitted', function(file) { flow.upload(); }); @@ -28,11 +35,11 @@ $(function () $group.removeClass('has-error'); var result = $.parseJSON(message); - $thumbnail.attr('src', result.url); - $hasValue.find('span').text(result.value); - $input.val(result.value); - $noValue.addClass('hidden'); - $hasValue.removeClass('hidden'); + + $innerGroup.append('
      ' + + '' + + ' Remove
      '); + updateValue(); }); flow.on('fileError', function(file, message){ flow.removeFile(file); @@ -46,11 +53,11 @@ $(function () $errors.html(errors); $group.addClass('has-error'); }); - $item.find('.imageRemove').click(function () + $item.on('click', '.imageRemove', function (e) { - $input.val(''); - $noValue.removeClass('hidden'); - $hasValue.addClass('hidden'); + e.preventDefault(); + $(this).closest('.imageThumbnail').remove(); + updateValue(); }); }); }); \ No newline at end of file From 15d02d1ec818b4a58d2b0ff75b8a3a8bab19c05d Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Fri, 24 Apr 2015 18:33:46 +0400 Subject: [PATCH 028/108] Checkbox fix --- src/views/default/formitem/checkbox.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/default/formitem/checkbox.blade.php b/src/views/default/formitem/checkbox.blade.php index 38df6e5d..da22155b 100644 --- a/src/views/default/formitem/checkbox.blade.php +++ b/src/views/default/formitem/checkbox.blade.php @@ -1,7 +1,7 @@
      @include(AdminTemplate::view('formitem.errors')) From 11f390f76c0ac8874f4f13d5a863d477e16c9efd Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Fri, 24 Apr 2015 19:02:13 +0400 Subject: [PATCH 029/108] Menu item highlight fix --- public/default/js/admin-default.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/default/js/admin-default.js b/public/default/js/admin-default.js index d5ad4155..e3158c02 100644 --- a/public/default/js/admin-default.js +++ b/public/default/js/admin-default.js @@ -9,6 +9,10 @@ $(function () currentPage = currentPage.replace(/\/([0-9]+)\/edit/, ''); var currentPageLink = $('#side-menu a[href="' + currentPage + '"]'); + if ( ! currentPageLink.length) + { + currentPageLink = $('#side-menu a[href^="' + currentPage + '?"]'); + } currentPageLink.addClass('active').parents('li').addClass('active').end().parents('ul').addClass('collapse').addClass('in'); })(); From 0ed6ed2f12ea5a629a7a4fb8a58692ce63998857 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Fri, 24 Apr 2015 19:04:41 +0400 Subject: [PATCH 030/108] Menu item highlight fix 2 --- public/default/js/admin-default.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/default/js/admin-default.js b/public/default/js/admin-default.js index e3158c02..ce5afbed 100644 --- a/public/default/js/admin-default.js +++ b/public/default/js/admin-default.js @@ -11,7 +11,7 @@ $(function () var currentPageLink = $('#side-menu a[href="' + currentPage + '"]'); if ( ! currentPageLink.length) { - currentPageLink = $('#side-menu a[href^="' + currentPage + '?"]'); + currentPageLink = $('#side-menu a[href="' + window.location.href + '"]'); } currentPageLink.addClass('active').parents('li').addClass('active').end().parents('ul').addClass('collapse').addClass('in'); })(); From abdb3bc5d779576776bc969d56f416046b1d1574 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Fri, 24 Apr 2015 19:09:19 +0400 Subject: [PATCH 031/108] Menu item highlight fix 3 --- public/default/js/admin-default.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/default/js/admin-default.js b/public/default/js/admin-default.js index ce5afbed..6824e002 100644 --- a/public/default/js/admin-default.js +++ b/public/default/js/admin-default.js @@ -8,10 +8,10 @@ $(function () currentPage = currentPage.replace(/\/create$/, ''); currentPage = currentPage.replace(/\/([0-9]+)\/edit/, ''); - var currentPageLink = $('#side-menu a[href="' + currentPage + '"]'); + var currentPageLink = $('#side-menu a[href="' + window.location.href + '"]'); if ( ! currentPageLink.length) { - currentPageLink = $('#side-menu a[href="' + window.location.href + '"]'); + currentPageLink = $('#side-menu a[href="' + currentPage + '"]'); } currentPageLink.addClass('active').parents('li').addClass('active').end().parents('ul').addClass('collapse').addClass('in'); })(); From 4c27cf77cc8ecb394eb2ef8e69c0748e14ec2dd0 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Fri, 24 Apr 2015 20:05:21 +0400 Subject: [PATCH 032/108] Tab content offset fixed --- public/default/css/sb-admin-2.css | 4 ++++ src/views/default/display/tree.blade.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/public/default/css/sb-admin-2.css b/public/default/css/sb-admin-2.css index 47e576d4..38407210 100755 --- a/public/default/css/sb-admin-2.css +++ b/public/default/css/sb-admin-2.css @@ -342,4 +342,8 @@ table.dataTable thead .sorting:after { .panel-yellow a:hover { color: #df8a13; +} + +.tab-content { + padding: 10px 0; } \ No newline at end of file diff --git a/src/views/default/display/tree.blade.php b/src/views/default/display/tree.blade.php index 10055c6f..d2f16a95 100644 --- a/src/views/default/display/tree.blade.php +++ b/src/views/default/display/tree.blade.php @@ -1,5 +1,5 @@ @if ($creatable) - {{ trans('admin::lang.table.new-entry') }} + {{ trans('admin::lang.table.new-entry') }} @endif
        From 2189becd0093bad85b46d3fd25b2eb7cdc0ff2a9 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Sat, 25 Apr 2015 23:43:24 +0400 Subject: [PATCH 033/108] Create and edit form fix --- src/SleepingOwl/Admin/Model/ModelConfiguration.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SleepingOwl/Admin/Model/ModelConfiguration.php b/src/SleepingOwl/Admin/Model/ModelConfiguration.php index ef85446b..2e94fe34 100644 --- a/src/SleepingOwl/Admin/Model/ModelConfiguration.php +++ b/src/SleepingOwl/Admin/Model/ModelConfiguration.php @@ -60,7 +60,7 @@ public function title($title = null) public function create($create = null) { - if (is_null($create)) + if (func_num_args() == 0) { return $this->getCreate(); } @@ -70,7 +70,7 @@ public function create($create = null) public function edit($edit = null) { - if (is_null($edit) || is_numeric($edit)) + if ((func_num_args() == 0) || is_numeric($edit)) { return $this->getEdit($edit); } From 2552e3d85f0f85f92567b86a99da6eaeca2e0630 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Sun, 26 Apr 2015 00:16:07 +0400 Subject: [PATCH 034/108] Delete and restore model fix --- src/SleepingOwl/Admin/Model/ModelConfiguration.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SleepingOwl/Admin/Model/ModelConfiguration.php b/src/SleepingOwl/Admin/Model/ModelConfiguration.php index 2e94fe34..03d8fa52 100644 --- a/src/SleepingOwl/Admin/Model/ModelConfiguration.php +++ b/src/SleepingOwl/Admin/Model/ModelConfiguration.php @@ -87,7 +87,7 @@ public function createAndEdit($callback) public function delete($delete = null) { - if (is_null($delete) || is_numeric($delete)) + if ((func_num_args() == 0) || is_numeric($delete)) { return $this->getDelete($delete); } @@ -97,7 +97,7 @@ public function delete($delete = null) public function restore($restore = null) { - if (is_null($restore) || is_numeric($restore)) + if ((func_num_args() == 0) || is_numeric($restore)) { return $this->getRestore($restore); } From 11c34d3fbab6b5940176773f8cec3dba042c917c Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Sun, 26 Apr 2015 14:10:55 +0400 Subject: [PATCH 035/108] Images form item fix --- public/default/js/formitems/image/initMultiple.js | 2 +- src/SleepingOwl/Admin/FormItems/Images.php | 10 ++++++++++ src/views/default/formitem/images.blade.php | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/public/default/js/formitems/image/initMultiple.js b/public/default/js/formitems/image/initMultiple.js index 58ca9f3c..24400c70 100644 --- a/public/default/js/formitems/image/initMultiple.js +++ b/public/default/js/formitems/image/initMultiple.js @@ -38,7 +38,7 @@ $(function () $innerGroup.append('
        ' + '' + - ' Remove
        '); + 'Remove
      '); updateValue(); }); flow.on('fileError', function(file, message){ diff --git a/src/SleepingOwl/Admin/FormItems/Images.php b/src/SleepingOwl/Admin/FormItems/Images.php index 30db4ce5..26f00433 100644 --- a/src/SleepingOwl/Admin/FormItems/Images.php +++ b/src/SleepingOwl/Admin/FormItems/Images.php @@ -29,4 +29,14 @@ public function save() parent::save(); } + public function value() + { + $value = parent::value(); + if (is_null($value)) + { + $value = []; + } + return $value; + } + } \ No newline at end of file diff --git a/src/views/default/formitem/images.blade.php b/src/views/default/formitem/images.blade.php index de1d082a..683a5ac2 100644 --- a/src/views/default/formitem/images.blade.php +++ b/src/views/default/formitem/images.blade.php @@ -6,7 +6,7 @@ @endforeach From de250895ed5956a574a90a6d6ca4802ac549c4aa Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Sun, 26 Apr 2015 16:06:30 +0400 Subject: [PATCH 036/108] Commands added --- .../Admin/AdminServiceProvider.php | 19 + .../Admin/Commands/AdministratorsCommand.php | 197 +++++++ .../Commands/Compilers/ModelCompiler.php | 533 ++++++++++++++++++ .../Admin/Commands/InstallCommand.php | 176 ++++++ .../Admin/Commands/ModelCommand.php | 128 +++++ .../Admin/Commands/stubs/User.stub | 24 + .../Admin/Commands/stubs/bootstrap.stub | 13 + .../Admin/Commands/stubs/menu.stub | 3 + .../Admin/Commands/stubs/model.stub | 12 + .../Admin/Commands/stubs/routes.stub | 7 + ..._12_104748_create_administrators_table.php | 37 ++ 11 files changed, 1149 insertions(+) create mode 100644 src/SleepingOwl/Admin/Commands/AdministratorsCommand.php create mode 100644 src/SleepingOwl/Admin/Commands/Compilers/ModelCompiler.php create mode 100644 src/SleepingOwl/Admin/Commands/InstallCommand.php create mode 100644 src/SleepingOwl/Admin/Commands/ModelCommand.php create mode 100644 src/SleepingOwl/Admin/Commands/stubs/User.stub create mode 100644 src/SleepingOwl/Admin/Commands/stubs/bootstrap.stub create mode 100644 src/SleepingOwl/Admin/Commands/stubs/menu.stub create mode 100644 src/SleepingOwl/Admin/Commands/stubs/model.stub create mode 100644 src/SleepingOwl/Admin/Commands/stubs/routes.stub create mode 100644 src/migrations/2014_10_12_104748_create_administrators_table.php diff --git a/src/SleepingOwl/Admin/AdminServiceProvider.php b/src/SleepingOwl/Admin/AdminServiceProvider.php index 4701fe83..9b4bd706 100644 --- a/src/SleepingOwl/Admin/AdminServiceProvider.php +++ b/src/SleepingOwl/Admin/AdminServiceProvider.php @@ -16,8 +16,15 @@ class AdminServiceProvider extends ServiceProvider 'SleepingOwl\Admin\Providers\RouteServiceProvider', ]; + protected $commads = [ + 'AdministratorsCommand', + 'InstallCommand', + 'ModelCommand' + ]; + public function register() { + $this->registerCommands(); } public function boot() @@ -30,6 +37,10 @@ public function boot() __DIR__ . '/../../config/config.php' => config_path('admin.php'), ], 'config'); + $this->publishes([ + __DIR__ . '/../../migrations/' => base_path('/database/migrations'), + ], 'migrations'); + $this->publishes([ __DIR__ . '/../../../public/' => public_path('packages/sleeping-owl/admin/'), ], 'assets'); @@ -70,4 +81,12 @@ protected function registerProviders() } } + protected function registerCommands() + { + foreach ($this->commads as $command) + { + $this->commands('SleepingOwl\Admin\Commands\\' . $command); + } + } + } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Commands/AdministratorsCommand.php b/src/SleepingOwl/Admin/Commands/AdministratorsCommand.php new file mode 100644 index 00000000..e7210b88 --- /dev/null +++ b/src/SleepingOwl/Admin/Commands/AdministratorsCommand.php @@ -0,0 +1,197 @@ +option('new')) + { + return $this->createNewAdministrator(); + } + if ($this->option('delete')) + { + return $this->deleteAdministrator(); + } + if ($this->option('password')) + { + return $this->changePassword(); + } + if ($this->option('rename')) + { + return $this->renameAdministrator(); + } + $this->listAdministrators(); + } + + /** + * Get the console command options. + * @return array + */ + protected function getOptions() + { + return [ + [ + 'new', + null, + InputOption::VALUE_NONE, + 'Create new administrator.' + ], + [ + 'delete', + null, + InputOption::VALUE_NONE, + 'Delete administrator.' + ], + [ + 'password', + null, + InputOption::VALUE_NONE, + 'Change administrator password.' + ], + [ + 'rename', + null, + InputOption::VALUE_NONE, + 'Change administrator name.' + ], + ]; + } + + protected function createNewAdministrator() + { + $username = $this->ask('Username:'); + if (is_null($username)) return; + + $password = $this->secret('Password:'); + if (is_null($password)) return; + + $passwordConfirm = $this->secret('Password Confirm:'); + if (is_null($passwordConfirm)) return; + + if ($password !== $passwordConfirm) + { + $this->error('Password confirm failed.'); + return; + } + + $name = $this->ask('Administrator Name:'); + + try + { + Administrator::create([ + 'username' => $username, + 'password' => Hash::make($password), + 'name' => $name, + ]); + } catch (\Exception $e) + { + $this->error('Some error occurred. Administrator wasnt created.'); + return; + } + $this->info('Administrator ' . $username . ' was successfully created!'); + } + + protected function getAdministrators() + { + $administrators = Administrator::orderBy('id', 'asc')->get(); + $result = []; + foreach ($administrators as $administrator) + { + $result[$administrator->id] = '' . $administrator->username . ': ' . $administrator->name; + } + return $result; + } + + protected function listAdministrators() + { + $administrators = $this->getAdministrators(); + foreach ($administrators as $administrator) + { + $this->line($administrator); + } + } + + protected function deleteAdministrator() + { + $id = $this->selectAdministrator('Select administrator to delete:'); + + $confirm = $this->confirm('Are you sure want to delete administrator with id ' . $id . '?', false); + if ( ! $confirm) return; + + Administrator::destroy($id); + $this->info('Administrator with id ' . $id . ' was deleted.'); + } + + protected function renameAdministrator() + { + $id = $this->selectAdministrator('Select administrator to rename:'); + + $username = $this->ask('Username:'); + if (is_null($username)) return; + + $administrator = Administrator::find($id); + $administrator->name = $username; + $administrator->save(); + + $this->info('Administrator with id ' . $id . ' was renamed.'); + } + + protected function changePassword() + { + $id = $this->selectAdministrator('Select administrator to change password:'); + + $password = $this->secret('New password:'); + if (is_null($password)) return; + + $passwordConfirm = $this->secret('Password Confirm:'); + if (is_null($passwordConfirm)) return; + + if ($password !== $passwordConfirm) + { + $this->error('Password confirm failed.'); + return; + } + + Administrator::find($id)->fill(['password' => Hash::make($password)])->save(); + + $this->info('Password was changed.'); + } + + /** + * @return mixed + */ + protected function selectAdministrator($message) + { + $administrators = $this->getAdministrators(); + $result = $this->choice($message, $administrators); + $flipped = array_flip($administrators); + $id = $flipped[$result]; + return $id; + } + +} diff --git a/src/SleepingOwl/Admin/Commands/Compilers/ModelCompiler.php b/src/SleepingOwl/Admin/Commands/Compilers/ModelCompiler.php new file mode 100644 index 00000000..d7341f91 --- /dev/null +++ b/src/SleepingOwl/Admin/Commands/Compilers/ModelCompiler.php @@ -0,0 +1,533 @@ +command = $command; + $this->schemaManager = DB::getDoctrineSchemaManager(); + $this->schemaManager->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string'); + $this->modelClass = $modelClass; + $this->instance = new $this->modelClass; + $this->table = $this->instance->getTable(); + $this->title = $title; + $this->with = []; + $this->columns = []; + $this->filters = []; + $this->formItems = []; + } + + /** + * @param string $columnsString + */ + public function parseColumns($columnsString) + { + if (is_null($columnsString)) return; + + $columns = preg_split('/\s?,\s?/', $columnsString, -1, PREG_SPLIT_NO_EMPTY); + foreach ($columns as $column) + { + $type = $this->guessType($column); + $this->guessWith($column); + $title = $this->getColumnDefaultTitle($column); + $this->columns[] = $this->renderColumn($type, $column, $title); + } + } + + /** + * @param string $type + * @param string $column + * @param string $title + * @return string + */ + protected function renderColumn($type, $column, $title) + { + $template = "Column:::type(':field', ':title')"; + if ($type == 'image') + { + $template = "Column:::type(':field')->sortable(false)"; + } + $result = strtr($template, [ + ':type' => $type, + ':field' => $column, + ':title' => $title + ]); + if ($this->hasRelation($column, '\Illuminate\Database\Eloquent\Relations\HasMany')) + { + $appendTemplate = ";//->append(Column::filter(':foreignKey')->model(:foreignModel::class));"; + $relation = $this->getRelation($column); + list($foreignModel, $foreignKey) = explode('.', $relation->getForeignKey()); + $foreignModel = Str::studly(Str::singular($foreignModel)); + $result .= strtr($appendTemplate, [ + ':foreignKey' => $foreignKey, + ':foreignModel' => $foreignModel + ]); + return $result; + } + $first = $this->getFirstPart($column); + if ($this->hasRelation($first, '\Illuminate\Database\Eloquent\Relations\BelongsTo')) + { + $appendTemplate = "->append(Column::filter(':foreignKey')->value(':first.id'));"; + $relation = $this->getRelation($first); + $foreignKey = $relation->getForeignKey(); + $foreignModel = get_class($relation->getRelated()); + $result .= strtr($appendTemplate, [ + ':foreignKey' => $foreignKey, + ':first' => $first + ]); + + $this->appendFilter($foreignKey, $foreignModel); + return $result; + } + if ($this->isDateTimeColumn($column)) + { + $appendTemplate = "->format(':date', ':time');"; + $columnType = $this->getColumnType($column); + switch ($columnType) + { + case 'date': + $date = 'medium'; + $time = 'none'; + break; + case 'time': + $date = 'none'; + $time = 'short'; + break; + case 'datetime': + $date = 'medium'; + $time = 'short'; + break; + } + $result .= strtr($appendTemplate, [ + ':date' => $date, + ':time' => $time + ]); + return $result; + } + return $result . ';'; + } + + /** + * @param string $column + * @return string + */ + protected function guessType($column) + { + if ($this->isImageColumn($column)) + { + return 'image'; + } + if ($this->hasRelation($column, '\Illuminate\Database\Eloquent\Relations\HasMany')) + { + return 'count'; + } + if ($this->hasRelation($this->getFirstPart($column), '\Illuminate\Database\Eloquent\Relations\BelongsToMany')) + { + return 'lists'; + } + if ($this->isDateTimeColumn($column)) + { + return 'date'; + } + return 'string'; + } + + /** + * @param string $column + */ + protected function guessWith($column) + { + if ($this->hasRelation($column, '\Illuminate\Database\Eloquent\Relations\HasMany')) + { + $this->with[] = $column; + } else + { + $first = $this->getFirstPart($column); + if ($this->hasRelation($first, [ + '\Illuminate\Database\Eloquent\Relations\BelongsTo', + '\Illuminate\Database\Eloquent\Relations\BelongsToMany' + ]) + ) + { + $this->with[] = $first; + } + } + } + + /** + * @param string $column + * @param string|string[] $relation + * @return bool + */ + protected function hasRelation($column, $relation) + { + if ( ! is_array($relation)) $relation = [$relation]; + return method_exists($this->instance, $column) && in_array(get_class($this->getRelation($column)), $relation); + } + + /** + * @param string $column + * @return HasMany|BelongsTo|BelongsToMany + */ + protected function getRelation($column) + { + return $this->instance->$column(); + } + + /** + * @param string $column + * @return string + */ + protected function getColumnDefaultTitle($column) + { + return ucwords($this->getFirstPart($column)); + } + + /** + * @param string $column + * @return string|null + */ + protected function getFirstPart($column) + { + $parts = explode('.', $column); + return array_shift($parts); + } + + /** + * @return array + */ + public function getReplacements() + { + $with = array_map(function ($with) + { + return "'$with'"; + }, $this->with); + $appendTab = function ($entry) + { + return "\t$entry"; + }; + $columns = array_map($appendTab, $this->columns); + $filters = array_map($appendTab, $this->filters); + $formItems = array_map($appendTab, $this->formItems); + return [ + ':modelClass' => $this->modelClass, + ':title' => $this->title, + ':with' => implode(', ', $with), + ':filters' => implode("\n", $filters), + ':columns' => implode("\n", $columns), + ':form' => implode("\n", $formItems) + ]; + } + + /** + * @return string + */ + public function getModelClass() + { + return $this->modelClass; + } + + /** + * @param string $foreignKey + * @param string $foreignModel + */ + protected function appendFilter($foreignKey, $foreignModel) + { + $filterTemplate = "ModelItem::filter(':foreignKey')->title()->from(:foreignModel::class);"; + $this->filters[] = strtr($filterTemplate, [ + ':foreignKey' => $foreignKey, + ':foreignModel' => $foreignModel + ]); + } + + /** + * @param $column + * @return null|string + */ + protected function getColumnType($column) + { + $columns = $this->schemaManager->listTableColumns($this->table); + if (isset($columns[$column])) + { + return $columns[$column]->getType()->getName(); + } + return null; + } + + /** + * + */ + public function generateForm() + { + $ignoredColumns = [ + $this->instance->getKeyName(), + Model::CREATED_AT, + Model::UPDATED_AT + ]; + + $columns = $this->schemaManager->listTableColumns($this->table); + $textareas = []; + foreach ($columns as $column) + { + if (in_array($column->getName(), $ignoredColumns)) continue; + $formItem = $this->generateFormItem($column); + if ($column->getType()->getName() === 'text') + { + $textareas[] = $formItem; + } else + { + $this->formItems[] = $formItem; + } + } + $this->formItems = array_merge($this->formItems, $textareas); + } + + /** + * @param Column $column + * @return string + */ + protected function generateFormItem(Column $column) + { + $template = "FormItem:::type(':name', ':label')"; + $type = $this->guessFormItemType($column); + $name = $column->getName(); + $result = strtr($template, [ + ':type' => $type, + ':name' => $name, + ':label' => ucwords(Str::snake(Str::camel(str_replace('_id', '', $name)), ' ')) + ]); + + switch ($type) + { + case 'select': + if ($foreignKey = $this->getForeignKey($name)) + { + $foreignModel = Str::studly(Str::singular($foreignKey->getForeignTableName())); + $result .= "->list($foreignModel::class)"; + } + if ($this->isEnumColumn($name)) + { + $enumValues = $this->getEnumValues($name); + $result .= "->enum([" . implode(', ', $enumValues) . "])"; + } + break; + case 'time': + case 'timestamp': + $result .= ';//->seconds(true)'; + break; + } + + return $result . ';'; + } + + /** + * @param Column $column + * @return string + */ + protected function guessFormItemType(Column $column) + { + $name = $column->getName(); + if ($this->isImageColumn($name)) + { + return 'image'; + } + if ($this->isFileColumn($name)) + { + return 'file'; + } + $foreignKey = $this->getForeignKey($name); + if ( ! is_null($foreignKey)) + { + return 'select'; + } + $type = $column->getType()->getName(); + if ($type == 'string' && $this->isEnumColumn($name)) + { + return 'select'; + } + $lookup = [ + 'string' => 'text', + 'text' => 'ckeditor', + 'integer' => 'text', + 'float' => 'text', + 'boolean' => 'checkbox', + 'date' => 'date', + 'time' => 'time', + 'datetime' => 'timestamp', + ]; + return Arr::get($lookup, $type, 'text'); + } + + /** + * @param $column + * @return bool + */ + protected function isImageColumn($column) + { + return ($this->instance instanceof ModelWithImageFieldsInterface) && $this->instance->hasImageField($column); + } + + /** + * @param $column + * @return bool + */ + protected function isFileColumn($column) + { + return ($this->instance instanceof ModelWithFileFieldsInterface) && $this->instance->hasFileField($column); + } + + /** + * @param $name + * @return \Doctrine\DBAL\Schema\ForeignKeyConstraint|null + */ + protected function getForeignKey($name) + { + $foreignKeys = $this->schemaManager->listTableForeignKeys($this->table); + foreach ($foreignKeys as $foreignKey) + { + foreach ($foreignKey->getLocalColumns() as $localColumn) + { + if ($localColumn === $name) + { + return $foreignKey; + } + } + } + return null; + } + + /** + * @param $name + * @return null + */ + protected function getColumnInfo($name) + { + if (is_null($this->columnsInfo)) + { + $sql = $this->schemaManager->getDatabasePlatform()->getListTableColumnsSQL($this->table); + $this->columnsInfo = DB::select($sql); + } + foreach ($this->columnsInfo as $column) + { + if ($column->Field === $name) + { + return $column; + } + } + return null; + } + + /** + * @param $name + * @return bool + */ + protected function isEnumColumn($name) + { + if ($column = $this->getColumnInfo($name)) + { + if (strpos($column->Type, 'enum') !== false) + { + return true; + } + } + return false; + } + + /** + * @param $name + * @return array + */ + protected function getEnumValues($name) + { + if ($column = $this->getColumnInfo($name)) + { + $type = $column->Type; + $token = '(), '; + strtok($type, $token); + + $entries = []; + while ($entry = strtok($token)) + { + $entries[] = $entry; + } + return $entries; + } + return []; + } + + /** + * @param $column + * @return bool + */ + protected function isDateTimeColumn($column) + { + return in_array($this->getColumnType($column), [ + 'date', + 'time', + 'datetime' + ]); + } + +} \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Commands/InstallCommand.php b/src/SleepingOwl/Admin/Commands/InstallCommand.php new file mode 100644 index 00000000..ee38165c --- /dev/null +++ b/src/SleepingOwl/Admin/Commands/InstallCommand.php @@ -0,0 +1,176 @@ +option('title'); + + $this->call('vendor:publish', ['--provider' => 'SleepingOwl\Admin\AdminServiceProvider']); + + $this->publishDB(); + $this->publishConfig($title); + + $this->createBootstrapDirectory(); + $this->createMenuFile(); + $this->createBootstrapFile(); + $this->createRoutesFile(); + $this->createDummyUserFile(); + + $this->createPublicDefaultStructure(); + } + + /** + * + */ + protected function publishDB() + { + $this->call('migrate'); + + $this->call('db:seed', [ + '--class' => 'SleepingOwl\\AdminAuth\\Database\\Seeders\\AdministratorsTableSeeder' + ]); + } + + /** + * + */ + protected function createBootstrapDirectory() + { + $directory = config('admin.bootstrapDirectory'); + + if ( ! is_dir($directory)) + { + $this->laravel['files']->makeDirectory($directory, 0755, true, true); + $this->line('Admin bootstrap directory was created: ' . str_replace(base_path(), '', $directory)); + } + } + + /** + * + */ + protected function createMenuFile() + { + $file = Config::get('admin.bootstrapDirectory') . '/menu.php'; + if ( ! file_exists($file)) + { + $contents = $this->laravel['files']->get(__DIR__ . '/stubs/menu.stub'); + $this->laravel['files']->put($file, $contents); + $this->line('Menu file was created: ' . str_replace(base_path(), '', $file)); + } + } + + protected function createBootstrapFile() + { + $file = Config::get('admin.bootstrapDirectory') . '/bootstrap.php'; + if ( ! file_exists($file)) + { + $contents = $this->laravel['files']->get(__DIR__ . '/stubs/bootstrap.stub'); + $this->laravel['files']->put($file, $contents); + $this->line('Bootstrap file was created: ' . str_replace(base_path(), '', $file)); + } + } + + protected function createRoutesFile() + { + $file = Config::get('admin.bootstrapDirectory') . '/routes.php'; + if ( ! file_exists($file)) + { + $contents = $this->laravel['files']->get(__DIR__ . '/stubs/routes.stub'); + $this->laravel['files']->put($file, $contents); + $this->line('Bootstrap file was created: ' . str_replace(base_path(), '', $file)); + } + } + + /** + * + */ + protected function createDummyUserFile() + { + $file = Config::get('admin.bootstrapDirectory') . '/User.php'; + if ( ! file_exists($file)) + { + $contents = $this->laravel['files']->get(__DIR__ . '/stubs/User.stub'); + $this->laravel['files']->put($file, $contents); + $this->line('Dummy user file was created: ' . str_replace(base_path(), '', $file)); + } + } + + /** + * + */ + protected function publishImagecacheConfig() + { + $file = config_path('imagecache.php'); + if ( ! file_exists($file)) + { + $contents = $this->laravel['files']->get($file); + $contents = str_replace('\'route\' => null,', '\'route\' => \'img/cache\',', $contents); + $this->laravel['files']->put($file, $contents); + } + } + + /** + * + */ + protected function createPublicDefaultStructure() + { + $uploadsDirectory = public_path('images/uploads'); + if ( ! is_dir($uploadsDirectory)) + { + $this->laravel['files']->makeDirectory($uploadsDirectory, 0755, true, true); + } + } + + /** + * @param string|null $title + */ + protected function publishConfig($title = null) + { + $file = config_path('admin.php'); + if ( ! is_null($title)) + { + $contents = $this->laravel['files']->get($file); + $contents = str_replace('Sleeping Owl administrator', $title, $contents); + $this->laravel['files']->put($file, $contents); + } + } + + /** + * Get the console command options. + * @return array + */ + protected function getOptions() + { + return [ + [ + 'title', + null, + InputOption::VALUE_REQUIRED, + 'Title for admin module.' + ], + ]; + } + +} diff --git a/src/SleepingOwl/Admin/Commands/ModelCommand.php b/src/SleepingOwl/Admin/Commands/ModelCommand.php new file mode 100644 index 00000000..e97fdc21 --- /dev/null +++ b/src/SleepingOwl/Admin/Commands/ModelCommand.php @@ -0,0 +1,128 @@ +getModelClass(), $this->option('title')); + $compiler->parseColumns($this->option('columns')); + $compiler->generateForm(); + + $template = $this->getTemplate(); + $replacement = $compiler->getReplacements(); + $template = $this->makeReplacements($template, $replacement); + + $this->saveResult($compiler->getModelClass(), $template); + } + + /** + * @return string + */ + protected function getModelClass() + { + $modelClass = str_replace('/', '\\', $this->argument('modelClass')); + if ( ! class_exists($modelClass)) + { + $this->error('Class "' . $modelClass . '" not found.'); + exit(1); + } + return $modelClass; + } + + /** + * @return string + */ + protected function getTemplate() + { + return file_get_contents(__DIR__ . '/stubs/model.stub'); + } + + /** + * @param $template + * @param $replacement + * @return string + */ + protected function makeReplacements($template, $replacement) + { + return strtr($template, $replacement); + } + + /** + * @param $modelClass + * @param $template + */ + protected function saveResult($modelClass, $template) + { + $filename = class_basename($modelClass) . '.php'; + $file = Config::get('admin.bootstrapDirectory') . '/' . $filename; + if (file_exists($file)) + { + $result = $this->confirm('File "' . $filename . '" already exist in your admin bootstrap directory. Overwrite?', false); + if ( ! $result) return; + } + file_put_contents($file, $template); + + $this->info('File "' . $filename . '" was created.'); + } + + /** + * Get the console command arguments. + * @return array + */ + protected function getArguments() + { + return [ + [ + 'modelClass', + InputArgument::REQUIRED, + 'Model class name.' + ], + ]; + } + + /** + * Get the console command options. + * @return array + */ + protected function getOptions() + { + return [ + [ + 'title', + null, + InputOption::VALUE_REQUIRED, + 'Model title to display in menu and headings.' + ], + [ + 'columns', + null, + InputOption::VALUE_REQUIRED, + 'Columns to display in table view.' + ], + ]; + } + +} diff --git a/src/SleepingOwl/Admin/Commands/stubs/User.stub b/src/SleepingOwl/Admin/Commands/stubs/User.stub new file mode 100644 index 00000000..66886a5e --- /dev/null +++ b/src/SleepingOwl/Admin/Commands/stubs/User.stub @@ -0,0 +1,24 @@ +title('Users')->display(function () +{ + $display = AdminDisplay::table(); + $display->columns([ + Column::string('name')->label('Name'), + Column::string('email')->label('Email'), + ]); + return $display; +})->createAndEdit(function () +{ + $form = AdminForm::form(); + $form->items([ + FormItem::text('name', 'Name')->required(), + FormItem::text('email', 'Email')->required()->unique(), + ]); + return $form; +}); \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Commands/stubs/bootstrap.stub b/src/SleepingOwl/Admin/Commands/stubs/bootstrap.stub new file mode 100644 index 00000000..29403303 --- /dev/null +++ b/src/SleepingOwl/Admin/Commands/stubs/bootstrap.stub @@ -0,0 +1,13 @@ +url('/')->label('Start page')->icon('fa-dashboard'); diff --git a/src/SleepingOwl/Admin/Commands/stubs/model.stub b/src/SleepingOwl/Admin/Commands/stubs/model.stub new file mode 100644 index 00000000..8aec552f --- /dev/null +++ b/src/SleepingOwl/Admin/Commands/stubs/model.stub @@ -0,0 +1,12 @@ +title(':title')->with(:with)->filters(function () +{ +:filters +})->columns(function () +{ +:columns +})->form(function () +{ +:form +}); \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Commands/stubs/routes.stub b/src/SleepingOwl/Admin/Commands/stubs/routes.stub new file mode 100644 index 00000000..c90f29f4 --- /dev/null +++ b/src/SleepingOwl/Admin/Commands/stubs/routes.stub @@ -0,0 +1,7 @@ +increments('id'); + $table->string('username', 190)->unique(); + $table->string('password', 60); + $table->string('name'); + $table->string('remember_token', 100)->nullable(); + $table->timestamps(); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('administrators'); + } + +} From b60871c57d36028dfa073870ea8e4f7daf60808a Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Sun, 26 Apr 2015 16:38:22 +0400 Subject: [PATCH 037/108] Admin:model command updated --- composer.json | 9 +- .../Commands/Compilers/ModelCompiler.php | 101 ++++++------------ .../Admin/Commands/ModelCommand.php | 1 + .../Admin/Commands/stubs/model.stub | 23 ++-- .../Admin/Providers/RouteServiceProvider.php | 12 ++- 5 files changed, 62 insertions(+), 84 deletions(-) diff --git a/composer.json b/composer.json index c66d0a16..f459bcfd 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,8 @@ "keywords": [ "laravel", "admin", - "administrator" + "administrator", + "crud" ], "license": "MIT", "authors": [ @@ -25,11 +26,7 @@ }, "autoload": { "psr-0": { - "SleepingOwl\\Admin": "src/", - "SleepingOwl\\DateFormatter": "src/", - "SleepingOwl\\Html": "src/", - "SleepingOwl\\Models": "src/", - "SleepingOwl\\RandomFilenamer": "src/" + "SleepingOwl\\Admin": "src/" } } } diff --git a/src/SleepingOwl/Admin/Commands/Compilers/ModelCompiler.php b/src/SleepingOwl/Admin/Commands/Compilers/ModelCompiler.php index d7341f91..b174c88b 100644 --- a/src/SleepingOwl/Admin/Commands/Compilers/ModelCompiler.php +++ b/src/SleepingOwl/Admin/Commands/Compilers/ModelCompiler.php @@ -9,8 +9,6 @@ use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Support\Arr; use Illuminate\Support\Str; -use SleepingOwl\Models\Interfaces\ModelWithFileFieldsInterface; -use SleepingOwl\Models\Interfaces\ModelWithImageFieldsInterface; class ModelCompiler { @@ -104,19 +102,15 @@ public function parseColumns($columnsString) */ protected function renderColumn($type, $column, $title) { - $template = "Column:::type(':field', ':title')"; - if ($type == 'image') - { - $template = "Column:::type(':field')->sortable(false)"; - } + $template = "Column:::type(':field')->label(':title')"; $result = strtr($template, [ ':type' => $type, ':field' => $column, ':title' => $title ]); - if ($this->hasRelation($column, '\Illuminate\Database\Eloquent\Relations\HasMany')) + if ($this->hasRelation($column, 'Illuminate\Database\Eloquent\Relations\HasMany')) { - $appendTemplate = ";//->append(Column::filter(':foreignKey')->model(:foreignModel::class));"; + $appendTemplate = ",//->append(Column::filter(':foreignKey')->model('App\\:foreignModel')),"; $relation = $this->getRelation($column); list($foreignModel, $foreignKey) = explode('.', $relation->getForeignKey()); $foreignModel = Str::studly(Str::singular($foreignModel)); @@ -127,9 +121,9 @@ protected function renderColumn($type, $column, $title) return $result; } $first = $this->getFirstPart($column); - if ($this->hasRelation($first, '\Illuminate\Database\Eloquent\Relations\BelongsTo')) + if ($this->hasRelation($first, 'Illuminate\Database\Eloquent\Relations\BelongsTo')) { - $appendTemplate = "->append(Column::filter(':foreignKey')->value(':first.id'));"; + $appendTemplate = "->append(Column::filter(':foreignKey')),"; $relation = $this->getRelation($first); $foreignKey = $relation->getForeignKey(); $foreignModel = get_class($relation->getRelated()); @@ -143,30 +137,26 @@ protected function renderColumn($type, $column, $title) } if ($this->isDateTimeColumn($column)) { - $appendTemplate = "->format(':date', ':time');"; + $appendTemplate = "->format(':value'),"; $columnType = $this->getColumnType($column); switch ($columnType) { case 'date': - $date = 'medium'; - $time = 'none'; + $value = 'd.m.Y'; break; case 'time': - $date = 'none'; - $time = 'short'; + $value = 'H:i'; break; case 'datetime': - $date = 'medium'; - $time = 'short'; + $value = 'd.m.Y H:i'; break; } $result .= strtr($appendTemplate, [ - ':date' => $date, - ':time' => $time + ':value' => $value, ]); return $result; } - return $result . ';'; + return $result . ','; } /** @@ -175,21 +165,17 @@ protected function renderColumn($type, $column, $title) */ protected function guessType($column) { - if ($this->isImageColumn($column)) - { - return 'image'; - } - if ($this->hasRelation($column, '\Illuminate\Database\Eloquent\Relations\HasMany')) + if ($this->hasRelation($column, 'Illuminate\Database\Eloquent\Relations\HasMany')) { return 'count'; } - if ($this->hasRelation($this->getFirstPart($column), '\Illuminate\Database\Eloquent\Relations\BelongsToMany')) + if ($this->hasRelation($this->getFirstPart($column), 'Illuminate\Database\Eloquent\Relations\BelongsToMany')) { return 'lists'; } if ($this->isDateTimeColumn($column)) { - return 'date'; + return 'datetime'; } return 'string'; } @@ -199,15 +185,15 @@ protected function guessType($column) */ protected function guessWith($column) { - if ($this->hasRelation($column, '\Illuminate\Database\Eloquent\Relations\HasMany')) + if ($this->hasRelation($column, 'Illuminate\Database\Eloquent\Relations\HasMany')) { $this->with[] = $column; } else { $first = $this->getFirstPart($column); if ($this->hasRelation($first, [ - '\Illuminate\Database\Eloquent\Relations\BelongsTo', - '\Illuminate\Database\Eloquent\Relations\BelongsToMany' + 'Illuminate\Database\Eloquent\Relations\BelongsTo', + 'Illuminate\Database\Eloquent\Relations\BelongsToMany' ]) ) { @@ -266,18 +252,18 @@ public function getReplacements() }, $this->with); $appendTab = function ($entry) { - return "\t$entry"; + return "\t\t$entry"; }; $columns = array_map($appendTab, $this->columns); $filters = array_map($appendTab, $this->filters); $formItems = array_map($appendTab, $this->formItems); return [ - ':modelClass' => $this->modelClass, - ':title' => $this->title, - ':with' => implode(', ', $with), - ':filters' => implode("\n", $filters), - ':columns' => implode("\n", $columns), - ':form' => implode("\n", $formItems) + '__modelClass' => $this->modelClass, + '__title' => $this->title, + '__with' => implode(', ', $with), + '__filters' => implode("\n", $filters), + '__columns' => implode("\n", $columns), + '__form' => implode("\n", $formItems) ]; } @@ -295,7 +281,7 @@ public function getModelClass() */ protected function appendFilter($foreignKey, $foreignModel) { - $filterTemplate = "ModelItem::filter(':foreignKey')->title()->from(:foreignModel::class);"; + $filterTemplate = "Filter::related(':foreignKey')->model(':foreignModel'),"; $this->filters[] = strtr($filterTemplate, [ ':foreignKey' => $foreignKey, ':foreignModel' => $foreignModel @@ -324,7 +310,8 @@ public function generateForm() $ignoredColumns = [ $this->instance->getKeyName(), Model::CREATED_AT, - Model::UPDATED_AT + Model::UPDATED_AT, + 'deleted_at', ]; $columns = $this->schemaManager->listTableColumns($this->table); @@ -365,7 +352,7 @@ protected function generateFormItem(Column $column) if ($foreignKey = $this->getForeignKey($name)) { $foreignModel = Str::studly(Str::singular($foreignKey->getForeignTableName())); - $result .= "->list($foreignModel::class)"; + $result .= "->model('App\\$foreignModel')->display('title')"; } if ($this->isEnumColumn($name)) { @@ -374,12 +361,14 @@ protected function generateFormItem(Column $column) } break; case 'time': + $result .= '->format(\'H:i\'),//->seconds(true)'; + break; case 'timestamp': - $result .= ';//->seconds(true)'; + $result .= '->format(\'d.m.Y\'),//->seconds(true)'; break; } - return $result . ';'; + return $result . ','; } /** @@ -389,14 +378,6 @@ protected function generateFormItem(Column $column) protected function guessFormItemType(Column $column) { $name = $column->getName(); - if ($this->isImageColumn($name)) - { - return 'image'; - } - if ($this->isFileColumn($name)) - { - return 'file'; - } $foreignKey = $this->getForeignKey($name); if ( ! is_null($foreignKey)) { @@ -420,24 +401,6 @@ protected function guessFormItemType(Column $column) return Arr::get($lookup, $type, 'text'); } - /** - * @param $column - * @return bool - */ - protected function isImageColumn($column) - { - return ($this->instance instanceof ModelWithImageFieldsInterface) && $this->instance->hasImageField($column); - } - - /** - * @param $column - * @return bool - */ - protected function isFileColumn($column) - { - return ($this->instance instanceof ModelWithFileFieldsInterface) && $this->instance->hasFileField($column); - } - /** * @param $name * @return \Doctrine\DBAL\Schema\ForeignKeyConstraint|null diff --git a/src/SleepingOwl/Admin/Commands/ModelCommand.php b/src/SleepingOwl/Admin/Commands/ModelCommand.php index e97fdc21..44695917 100644 --- a/src/SleepingOwl/Admin/Commands/ModelCommand.php +++ b/src/SleepingOwl/Admin/Commands/ModelCommand.php @@ -77,6 +77,7 @@ protected function makeReplacements($template, $replacement) protected function saveResult($modelClass, $template) { $filename = class_basename($modelClass) . '.php'; + $filename = '_test.php'; $file = Config::get('admin.bootstrapDirectory') . '/' . $filename; if (file_exists($file)) { diff --git a/src/SleepingOwl/Admin/Commands/stubs/model.stub b/src/SleepingOwl/Admin/Commands/stubs/model.stub index 8aec552f..c4182777 100644 --- a/src/SleepingOwl/Admin/Commands/stubs/model.stub +++ b/src/SleepingOwl/Admin/Commands/stubs/model.stub @@ -1,12 +1,21 @@ title(':title')->with(:with)->filters(function () +Admin::model('__modelClass')->title('__title')->display(function () { -:filters -})->columns(function () + $display = AdminDisplay::datatables(); + $display->with(__with); + $display->filters([ +__filters + ]); + $display->columns([ +__columns + ]); + return $display; +})->createAndEdit(function () { -:columns -})->form(function () -{ -:form + $form = AdminForm::form(); + $form->items([ +__form + ]); + return $form; }); \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Providers/RouteServiceProvider.php b/src/SleepingOwl/Admin/Providers/RouteServiceProvider.php index 26b1d515..d4821a4d 100644 --- a/src/SleepingOwl/Admin/Providers/RouteServiceProvider.php +++ b/src/SleepingOwl/Admin/Providers/RouteServiceProvider.php @@ -21,9 +21,17 @@ public function register() 'middleware' => config('admin.middleware'), ], function () { - require config('admin.bootstrapDirectory') . '/routes.php'; + $file = config('admin.bootstrapDirectory') . '/routes.php'; + if (file_exists($file)) + { + require $file; + } }); - require __DIR__ . '/../Http/routes.php'; + $routesFile = __DIR__ . '/../Http/routes.php'; + if (file_exists($routesFile)) + { + require $routesFile; + } }); } From ea5a543095f8f9c9f87884973e6d033cf2f2ea35 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Sun, 26 Apr 2015 16:43:34 +0400 Subject: [PATCH 038/108] Readme update --- README.md | 71 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 62 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 78a5c8cd..801453cf 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,66 @@ -This is development version of sleeping-owl/admin package. +## Laravel 5 Admin Module -Available display types: +[![Latest Stable Version](https://poser.pugx.org/sleeping-owl/admin/v/stable.svg)](https://packagist.org/packages/sleeping-owl/admin) +[![License](https://poser.pugx.org/sleeping-owl/admin/license.svg)](https://packagist.org/packages/sleeping-owl/admin) -- `AdminDisplay::table()` - basic table -- `AdminDisplay::datatables()` - table with datatables plugin -- `AdminDisplay::tree()` - nested-set tree display -- `AdminDisplay::tabbed()` - tabbed display +*Note: this is development version. If you are looking for stable version check out [master branch](https://github.com/sleeping-owl/admin).* -Supported nested-set packages: +SleepingOwl Admin is administrative interface builder for Laravel. -- https://github.com/etrepat/baum -- https://github.com/lazychaser/laravel-nestedset \ No newline at end of file +It includes: + + - [sb-admin-2 template](http://startbootstrap.com/template-overviews/sb-admin-2/) + - [jQuery 1.11.0](http://jquery.org) + - [Bootstrap v3.2.0](http://getbootstrap.com) + - [Bootstrap Multiselect v0.9.8](https://github.com/davidstutz/bootstrap-multiselect) + - [DataTables 1.10.0-dev](http://www.sprymedia.co.uk) + - [Nestable jQuery Plugin](http://dbushell.github.io/Nestable/) + - [Lightbox for Bootstrap 3](https://github.com/ashleydw/lightbox) + - [Font Awesome 4.1.0](http://fontawesome.io) + - [Metismenu 1.0.3](https://github.com/onokumus/metisMenu) + - [morris.js v0.5.0]() + - [bootbox.js v4.3.0](http://bootboxjs.com) + - [Bootstrap datetimepicker](http://eonasdan.github.io/bootstrap-datetimepicker/) + - [CKEditor](http://ckeditor.com) + - [flow.js](https://github.com/flowjs/flow.js) + +## Installation + + 1. Require this package in your composer.json and run composer update: + + "sleeping-owl/admin": "dev-development" + + 2. After composer update, add service providers to the `config/app.php` + + 'SleepingOwl\Admin\AdminServiceProvider', + + 3. Add this to the facades in `config/app.php`: + + 'Admin' => 'SleepingOwl\Admin\Admin', + 'AdminAuth' => 'SleepingOwl\AdminAuth\Facades\AdminAuth', + 'Column' => 'SleepingOwl\Admin\Columns\Column', + 'Filter' => 'SleepingOwl\Admin\Filter\Filter', + 'AdminDisplay' => 'SleepingOwl\Admin\Display\AdminDisplay', + 'AdminForm' => 'SleepingOwl\Admin\Form\AdminForm', + 'AdminTemplate' => 'SleepingOwl\Admin\Templates\Facade\AdminTemplate', + 'FormItem' => 'SleepingOwl\Admin\FormItems\FormItem', + + 4. Run this command in terminal (if you want to know what exactly this command makes, see [install command documentation](http://sleeping-owl.github.io/en/Commands/Install.html)): + + $ php artisan admin:install + +## Documentation + +Documentation can be found at [sleeping owl documentation](http://sleeping-owl.github.io). + +## Demo Application + +View [live demo](http://sleepingowladmindemo.cloudcontrolled.com). + +## Support Library + +You can donate via [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AXJMWMRPCBGVA) or in BTC: 13k36pym383rEmsBSLyWfT3TxCQMN2Lekd + +## Copyright and License + +Admin was written by Sleeping Owl for the Laravel framework and is released under the MIT License. See the LICENSE file for details. \ No newline at end of file From d9b79f99f19714c78a1846bfce38ebc274898e73 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Sun, 26 Apr 2015 16:55:22 +0400 Subject: [PATCH 039/108] Admin:model command fix --- src/SleepingOwl/Admin/Commands/ModelCommand.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/SleepingOwl/Admin/Commands/ModelCommand.php b/src/SleepingOwl/Admin/Commands/ModelCommand.php index 44695917..e97fdc21 100644 --- a/src/SleepingOwl/Admin/Commands/ModelCommand.php +++ b/src/SleepingOwl/Admin/Commands/ModelCommand.php @@ -77,7 +77,6 @@ protected function makeReplacements($template, $replacement) protected function saveResult($modelClass, $template) { $filename = class_basename($modelClass) . '.php'; - $filename = '_test.php'; $file = Config::get('admin.bootstrapDirectory') . '/' . $filename; if (file_exists($file)) { From 468195025901db5b446edb6ae4be1a29194a4327 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Sun, 26 Apr 2015 21:41:26 +0400 Subject: [PATCH 040/108] Config update --- src/config/config.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/config/config.php b/src/config/config.php index 77a2fe41..ec22ef33 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -12,6 +12,9 @@ */ 'prefix' => 'admin', + /* + * Middleware to use in admin routes + */ 'middleware' => ['admin.auth'], /* @@ -20,6 +23,9 @@ */ 'bootstrapDirectory' => app_path('admin'), + /* + * Directory to upload images to (relative to public directory) + */ 'imagesUploadDirectory' => 'images/uploads', /* @@ -33,8 +39,14 @@ ] ], + /* + * Template to use + */ 'template' => 'SleepingOwl\Admin\Templates\TemplateDefault', + /* + * Default date and time formats + */ 'datetimeFormat' => 'd.m.Y H:i', 'dateFormat' => 'd.m.Y', 'timeFormat' => 'H:i', From 1188689fa75c528b6d9a765c74427165d5fd9d87 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Mon, 27 Apr 2015 00:11:25 +0400 Subject: [PATCH 041/108] Readme links updated --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 801453cf..6b0ce7c8 100644 --- a/README.md +++ b/README.md @@ -51,11 +51,11 @@ It includes: ## Documentation -Documentation can be found at [sleeping owl documentation](http://sleeping-owl.github.io). +Documentation can be found at [sleeping owl documentation](http://sleeping-owl.github.io/v3). ## Demo Application -View [live demo](http://sleepingowladmindemo.cloudcontrolled.com). +View [live demo](http://sleepingowladmindemo2.cloudcontrolled.com). ## Support Library From bb014193e234e3f0ccce4e0065cddbf23da169ee Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Mon, 27 Apr 2015 14:48:55 +0400 Subject: [PATCH 042/108] CKEditor paragraph offset fix --- public/default/js/formitems/ckeditor/contents.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/default/js/formitems/ckeditor/contents.css b/public/default/js/formitems/ckeditor/contents.css index f29bc0a8..3933fa7e 100644 --- a/public/default/js/formitems/ckeditor/contents.css +++ b/public/default/js/formitems/ckeditor/contents.css @@ -18,6 +18,11 @@ body margin: 20px; } +p +{ + margin: 10px 0; +} + .cke_editable { font-size: 13px; From f672c8b4dce48805bf6bf1a2e9cabce7fc60cbef Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Tue, 28 Apr 2015 16:20:55 +0400 Subject: [PATCH 043/108] Async datatables added --- public/default/css/dataTables.bootstrap.css | 7 + public/default/js/datatables/init.js | 33 +++-- public/default/js/notify-combined.min.js | 5 + .../Admin/Columns/Column/BaseColumn.php | 5 + .../Admin/Display/AdminDisplay.php | 1 + .../Admin/Display/DisplayDatatables.php | 1 + .../Admin/Display/DisplayDatatablesAsync.php | 125 ++++++++++++++++++ .../Providers/DisplayServiceProvider.php | 1 + .../Admin/Providers/RouteServiceProvider.php | 5 + .../Admin/Repository/BaseRepository.php | 12 ++ src/lang/en/lang.php | 1 + src/lang/ru/lang.php | 1 + src/views/default/column/action.blade.php | 20 +-- src/views/default/column/checkbox.blade.php | 6 +- src/views/default/column/control.blade.php | 44 +++--- src/views/default/column/order.blade.php | 36 ++--- .../default/display/datatablesAsync.blade.php | 26 ++++ 17 files changed, 272 insertions(+), 57 deletions(-) create mode 100644 public/default/js/notify-combined.min.js create mode 100644 src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php create mode 100644 src/views/default/display/datatablesAsync.blade.php diff --git a/public/default/css/dataTables.bootstrap.css b/public/default/css/dataTables.bootstrap.css index bba686ab..913b07bf 100755 --- a/public/default/css/dataTables.bootstrap.css +++ b/public/default/css/dataTables.bootstrap.css @@ -214,4 +214,11 @@ div.DTFC_LeftBodyWrapper tbody tr:first-child td { div.DTFC_RightFootWrapper table, div.DTFC_LeftFootWrapper table { border-top: none; +} + +.dataTables_processing { + position: absolute; + left: 50%; + top: 140px; + margin-left: -35px; } \ No newline at end of file diff --git a/public/default/js/datatables/init.js b/public/default/js/datatables/init.js index c2404306..df133ce6 100644 --- a/public/default/js/datatables/init.js +++ b/public/default/js/datatables/init.js @@ -1,12 +1,29 @@ $(function () { - var params = { - language: window.admin.lang.table, - stateSave: true, - lengthMenu: [ - [10, 25, 50, -1], - [10, 25, 50, window.admin.lang.table.all] - ] + $.fn.dataTable.ext.errMode = function () + { + $.notify(window.admin.lang.table.error, 'error'); }; - $('.datatables').DataTable(params); + $('.datatables').each(function () + { + var $this = $(this); + var params = { + language: window.admin.lang.table, + stateSave: true, + lengthMenu: [ + [10, 25, 50, -1], + [10, 25, 50, window.admin.lang.table.all] + ] + }; + var url; + if (url = $this.data('url')) + { + params.serverSide = true; + params.processing = true; + params.ajax = { + "url": url + }; + } + $this.DataTable(params); + }); }); \ No newline at end of file diff --git a/public/default/js/notify-combined.min.js b/public/default/js/notify-combined.min.js new file mode 100644 index 00000000..9ac165ee --- /dev/null +++ b/public/default/js/notify-combined.min.js @@ -0,0 +1,5 @@ +/** Notify.js - v0.3.1 - 2014/06/29 + * http://notifyjs.com/ + * Copyright (c) 2014 Jaime Pillora - MIT + */ +(function(t,i,n,e){"use strict";var r,o,s,a,l,h,c,p,u,d,f,A,m,w,g,y,b,v,x,C,S,E,M,k,H,D,F,T=[].indexOf||function(t){for(var i=0,n=this.length;n>i;i++)if(i in this&&this[i]===t)return i;return-1};S="notify",C=S+"js",s=S+"!blank",M={t:"top",m:"middle",b:"bottom",l:"left",c:"center",r:"right"},m=["l","c","r"],F=["t","m","b"],b=["t","b","l","r"],v={t:"b",m:null,b:"t",l:"r",c:null,r:"l"},x=function(t){var i;return i=[],n.each(t.split(/\W+/),function(t,n){var r;return r=n.toLowerCase().charAt(0),M[r]?i.push(r):e}),i},D={},a={name:"core",html:'
      \n
      \n
      \n
      ',css:"."+C+"-corner {\n position: fixed;\n margin: 5px;\n z-index: 1050;\n}\n\n."+C+"-corner ."+C+"-wrapper,\n."+C+"-corner ."+C+"-container {\n position: relative;\n display: block;\n height: inherit;\n width: inherit;\n margin: 3px;\n}\n\n."+C+"-wrapper {\n z-index: 1;\n position: absolute;\n display: inline-block;\n height: 0;\n width: 0;\n}\n\n."+C+"-container {\n display: none;\n z-index: 1;\n position: absolute;\n}\n\n."+C+"-hidable {\n cursor: pointer;\n}\n\n[data-notify-text],[data-notify-html] {\n position: relative;\n}\n\n."+C+"-arrow {\n position: absolute;\n z-index: 2;\n width: 0;\n height: 0;\n}"},H={"border-radius":["-webkit-","-moz-"]},f=function(t){return D[t]},o=function(i,e){var r,o,s,a;if(!i)throw"Missing Style name";if(!e)throw"Missing Style definition";if(!e.html)throw"Missing Style HTML";return(null!=(a=D[i])?a.cssElem:void 0)&&(t.console&&console.warn(""+S+": overwriting style '"+i+"'"),D[i].cssElem.remove()),e.name=i,D[i]=e,r="",e.classes&&n.each(e.classes,function(t,i){return r+="."+C+"-"+e.name+"-"+t+" {\n",n.each(i,function(t,i){return H[t]&&n.each(H[t],function(n,e){return r+=" "+e+t+": "+i+";\n"}),r+=" "+t+": "+i+";\n"}),r+="}\n"}),e.css&&(r+="/* styles for "+e.name+" */\n"+e.css),r&&(e.cssElem=y(r),e.cssElem.attr("id","notify-"+e.name)),s={},o=n(e.html),u("html",o,s),u("text",o,s),e.fields=s},y=function(t){var i;i=l("style"),i.attr("type","text/css"),n("head").append(i);try{i.html(t)}catch(e){i[0].styleSheet.cssText=t}return i},u=function(t,i,e){var r;return"html"!==t&&(t="text"),r="data-notify-"+t,p(i,"["+r+"]").each(function(){var i;return i=n(this).attr(r),i||(i=s),e[i]=t})},p=function(t,i){return t.is(i)?t:t.find(i)},E={clickToHide:!0,autoHide:!0,autoHideDelay:5e3,arrowShow:!0,arrowSize:5,breakNewLines:!0,elementPosition:"bottom",globalPosition:"top right",style:"bootstrap",className:"error",showAnimation:"slideDown",showDuration:400,hideAnimation:"slideUp",hideDuration:200,gap:5},g=function(t,i){var e;return e=function(){},e.prototype=t,n.extend(!0,new e,i)},h=function(t){return n.extend(E,t)},l=function(t){return n("<"+t+">")},A={},d=function(t){var i;return t.is("[type=radio]")&&(i=t.parents("form:first").find("[type=radio]").filter(function(i,e){return n(e).attr("name")===t.attr("name")}),t=i.first()),t},w=function(t,i,n){var r,o;if("string"==typeof n)n=parseInt(n,10);else if("number"!=typeof n)return;if(!isNaN(n))return r=M[v[i.charAt(0)]],o=i,t[r]!==e&&(i=M[r.charAt(0)],n=-n),t[i]===e?t[i]=n:t[i]+=n,null},k=function(t,i,n){if("l"===t||"t"===t)return 0;if("c"===t||"m"===t)return n/2-i/2;if("r"===t||"b"===t)return n-i;throw"Invalid alignment"},c=function(t){return c.e=c.e||l("div"),c.e.text(t).html()},r=function(){function t(t,i,e){"string"==typeof e&&(e={className:e}),this.options=g(E,n.isPlainObject(e)?e:{}),this.loadHTML(),this.wrapper=n(a.html),this.options.clickToHide&&this.wrapper.addClass(""+C+"-hidable"),this.wrapper.data(C,this),this.arrow=this.wrapper.find("."+C+"-arrow"),this.container=this.wrapper.find("."+C+"-container"),this.container.append(this.userContainer),t&&t.length&&(this.elementType=t.attr("type"),this.originalElement=t,this.elem=d(t),this.elem.data(C,this),this.elem.before(this.wrapper)),this.container.hide(),this.run(i)}return t.prototype.loadHTML=function(){var t;return t=this.getStyle(),this.userContainer=n(t.html),this.userFields=t.fields},t.prototype.show=function(t,i){var n,r,o,s,a,l=this;if(r=function(){return t||l.elem||l.destroy(),i?i():e},a=this.container.parent().parents(":hidden").length>0,o=this.container.add(this.arrow),n=[],a&&t)s="show";else if(a&&!t)s="hide";else if(!a&&t)s=this.options.showAnimation,n.push(this.options.showDuration);else{if(a||t)return r();s=this.options.hideAnimation,n.push(this.options.hideDuration)}return n.push(r),o[s].apply(o,n)},t.prototype.setGlobalPosition=function(){var t,i,e,r,o,s,a,h;return h=this.getPosition(),a=h[0],s=h[1],o=M[a],t=M[s],r=a+"|"+s,i=A[r],i||(i=A[r]=l("div"),e={},e[o]=0,"middle"===t?e.top="45%":"center"===t?e.left="45%":e[t]=0,i.css(e).addClass(""+C+"-corner"),n("body").append(i)),i.prepend(this.wrapper)},t.prototype.setElementPosition=function(){var t,i,r,o,s,a,l,h,c,p,u,d,f,A,g,y,x,C,S,E,H,D,z,Q,B,R,N,P,U;for(z=this.getPosition(),E=z[0],C=z[1],S=z[2],u=this.elem.position(),h=this.elem.outerHeight(),d=this.elem.outerWidth(),c=this.elem.innerHeight(),p=this.elem.innerWidth(),Q=this.wrapper.position(),s=this.container.height(),a=this.container.width(),A=M[E],y=v[E],x=M[y],l={},l[x]="b"===E?h:"r"===E?d:0,w(l,"top",u.top-Q.top),w(l,"left",u.left-Q.left),U=["top","left"],B=0,N=U.length;N>B;B++)H=U[B],g=parseInt(this.elem.css("margin-"+H),10),g&&w(l,H,g);if(f=Math.max(0,this.options.gap-(this.options.arrowShow?r:0)),w(l,x,f),this.options.arrowShow){for(r=this.options.arrowSize,i=n.extend({},l),t=this.userContainer.css("border-color")||this.userContainer.css("background-color")||"white",R=0,P=b.length;P>R;R++)H=b[R],D=M[H],H!==y&&(o=D===A?t:"transparent",i["border-"+D]=""+r+"px solid "+o);w(l,M[y],r),T.call(b,C)>=0&&w(i,M[C],2*r)}else this.arrow.hide();return T.call(F,E)>=0?(w(l,"left",k(C,a,d)),i&&w(i,"left",k(C,r,p))):T.call(m,E)>=0&&(w(l,"top",k(C,s,h)),i&&w(i,"top",k(C,r,c))),this.container.is(":visible")&&(l.display="block"),this.container.removeAttr("style").css(l),i?this.arrow.removeAttr("style").css(i):e},t.prototype.getPosition=function(){var t,i,n,e,r,o,s,a;if(i=this.options.position||(this.elem?this.options.elementPosition:this.options.globalPosition),t=x(i),0===t.length&&(t[0]="b"),n=t[0],0>T.call(b,n))throw"Must be one of ["+b+"]";return(1===t.length||(e=t[0],T.call(F,e)>=0&&(r=t[1],0>T.call(m,r)))||(o=t[0],T.call(m,o)>=0&&(s=t[1],0>T.call(F,s))))&&(t[1]=(a=t[0],T.call(m,a)>=0?"m":"l")),2===t.length&&(t[2]=t[1]),t},t.prototype.getStyle=function(t){var i;if(t||(t=this.options.style),t||(t="default"),i=D[t],!i)throw"Missing style: "+t;return i},t.prototype.updateClasses=function(){var t,i;return t=["base"],n.isArray(this.options.className)?t=t.concat(this.options.className):this.options.className&&t.push(this.options.className),i=this.getStyle(),t=n.map(t,function(t){return""+C+"-"+i.name+"-"+t}).join(" "),this.userContainer.attr("class",t)},t.prototype.run=function(t,i){var r,o,a,l,h,u=this;if(n.isPlainObject(i)?n.extend(this.options,i):"string"===n.type(i)&&(this.options.className=i),this.container&&!t)return this.show(!1),e;if(this.container||t){o={},n.isPlainObject(t)?o=t:o[s]=t;for(a in o)r=o[a],l=this.userFields[a],l&&("text"===l&&(r=c(r),this.options.breakNewLines&&(r=r.replace(/\n/g,"
      "))),h=a===s?"":"="+a,p(this.userContainer,"[data-notify-"+l+h+"]").html(r));return this.updateClasses(),this.elem?this.setElementPosition():this.setGlobalPosition(),this.show(!0),this.options.autoHide?(clearTimeout(this.autohideTimer),this.autohideTimer=setTimeout(function(){return u.show(!1)},this.options.autoHideDelay)):e}},t.prototype.destroy=function(){return this.wrapper.remove()},t}(),n[S]=function(t,i,e){return t&&t.nodeName||t.jquery?n(t)[S](i,e):(e=i,i=t,new r(null,i,e)),t},n.fn[S]=function(t,i){return n(this).each(function(){var e;return e=d(n(this)).data(C),e?e.run(t,i):new r(n(this),t,i)}),this},n.extend(n[S],{defaults:h,addStyle:o,pluginOptions:E,getStyle:f,insertCSS:y}),n(function(){return y(a.css).attr("id","core-notify"),n(i).on("click","."+C+"-hidable",function(){return n(this).trigger("notify-hide")}),n(i).on("notify-hide","."+C+"-wrapper",function(){var t;return null!=(t=n(this).data(C))?t.show(!1):void 0})})})(window,document,jQuery),$.notify.addStyle("bootstrap",{html:"
      \n\n
      ",classes:{base:{"font-weight":"bold",padding:"8px 15px 8px 14px","text-shadow":"0 1px 0 rgba(255, 255, 255, 0.5)","background-color":"#fcf8e3",border:"1px solid #fbeed5","border-radius":"4px","white-space":"nowrap","padding-left":"25px","background-repeat":"no-repeat","background-position":"3px 7px"},error:{color:"#B94A48","background-color":"#F2DEDE","border-color":"#EED3D7","background-image":"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAtRJREFUeNqkVc1u00AQHq+dOD+0poIQfkIjalW0SEGqRMuRnHos3DjwAH0ArlyQeANOOSMeAA5VjyBxKBQhgSpVUKKQNGloFdw4cWw2jtfMOna6JOUArDTazXi/b3dm55socPqQhFka++aHBsI8GsopRJERNFlY88FCEk9Yiwf8RhgRyaHFQpPHCDmZG5oX2ui2yilkcTT1AcDsbYC1NMAyOi7zTX2Agx7A9luAl88BauiiQ/cJaZQfIpAlngDcvZZMrl8vFPK5+XktrWlx3/ehZ5r9+t6e+WVnp1pxnNIjgBe4/6dAysQc8dsmHwPcW9C0h3fW1hans1ltwJhy0GxK7XZbUlMp5Ww2eyan6+ft/f2FAqXGK4CvQk5HueFz7D6GOZtIrK+srupdx1GRBBqNBtzc2AiMr7nPplRdKhb1q6q6zjFhrklEFOUutoQ50xcX86ZlqaZpQrfbBdu2R6/G19zX6XSgh6RX5ubyHCM8nqSID6ICrGiZjGYYxojEsiw4PDwMSL5VKsC8Yf4VRYFzMzMaxwjlJSlCyAQ9l0CW44PBADzXhe7xMdi9HtTrdYjFYkDQL0cn4Xdq2/EAE+InCnvADTf2eah4Sx9vExQjkqXT6aAERICMewd/UAp/IeYANM2joxt+q5VI+ieq2i0Wg3l6DNzHwTERPgo1ko7XBXj3vdlsT2F+UuhIhYkp7u7CarkcrFOCtR3H5JiwbAIeImjT/YQKKBtGjRFCU5IUgFRe7fF4cCNVIPMYo3VKqxwjyNAXNepuopyqnld602qVsfRpEkkz+GFL1wPj6ySXBpJtWVa5xlhpcyhBNwpZHmtX8AGgfIExo0ZpzkWVTBGiXCSEaHh62/PoR0p/vHaczxXGnj4bSo+G78lELU80h1uogBwWLf5YlsPmgDEd4M236xjm+8nm4IuE/9u+/PH2JXZfbwz4zw1WbO+SQPpXfwG/BBgAhCNZiSb/pOQAAAAASUVORK5CYII=)"},success:{color:"#468847","background-color":"#DFF0D8","border-color":"#D6E9C6","background-image":"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAutJREFUeNq0lctPE0Ecx38zu/RFS1EryqtgJFA08YCiMZIAQQ4eRG8eDGdPJiYeTIwHTfwPiAcvXIwXLwoXPaDxkWgQ6islKlJLSQWLUraPLTv7Gme32zoF9KSTfLO7v53vZ3d/M7/fIth+IO6INt2jjoA7bjHCJoAlzCRw59YwHYjBnfMPqAKWQYKjGkfCJqAF0xwZjipQtA3MxeSG87VhOOYegVrUCy7UZM9S6TLIdAamySTclZdYhFhRHloGYg7mgZv1Zzztvgud7V1tbQ2twYA34LJmF4p5dXF1KTufnE+SxeJtuCZNsLDCQU0+RyKTF27Unw101l8e6hns3u0PBalORVVVkcaEKBJDgV3+cGM4tKKmI+ohlIGnygKX00rSBfszz/n2uXv81wd6+rt1orsZCHRdr1Imk2F2Kob3hutSxW8thsd8AXNaln9D7CTfA6O+0UgkMuwVvEFFUbbAcrkcTA8+AtOk8E6KiQiDmMFSDqZItAzEVQviRkdDdaFgPp8HSZKAEAL5Qh7Sq2lIJBJwv2scUqkUnKoZgNhcDKhKg5aH+1IkcouCAdFGAQsuWZYhOjwFHQ96oagWgRoUov1T9kRBEODAwxM2QtEUl+Wp+Ln9VRo6BcMw4ErHRYjH4/B26AlQoQQTRdHWwcd9AH57+UAXddvDD37DmrBBV34WfqiXPl61g+vr6xA9zsGeM9gOdsNXkgpEtTwVvwOklXLKm6+/p5ezwk4B+j6droBs2CsGa/gNs6RIxazl4Tc25mpTgw/apPR1LYlNRFAzgsOxkyXYLIM1V8NMwyAkJSctD1eGVKiq5wWjSPdjmeTkiKvVW4f2YPHWl3GAVq6ymcyCTgovM3FzyRiDe2TaKcEKsLpJvNHjZgPNqEtyi6mZIm4SRFyLMUsONSSdkPeFtY1n0mczoY3BHTLhwPRy9/lzcziCw9ACI+yql0VLzcGAZbYSM5CCSZg1/9oc/nn7+i8N9p/8An4JMADxhH+xHfuiKwAAAABJRU5ErkJggg==)"},info:{color:"#3A87AD","background-color":"#D9EDF7","border-color":"#BCE8F1","background-image":"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QYFAhkSsdes/QAAA8dJREFUOMvVlGtMW2UYx//POaWHXg6lLaW0ypAtw1UCgbniNOLcVOLmAjHZolOYlxmTGXVZdAnRfXQm+7SoU4mXaOaiZsEpC9FkiQs6Z6bdCnNYruM6KNBw6YWewzl9z+sHImEWv+vz7XmT95f/+3/+7wP814v+efDOV3/SoX3lHAA+6ODeUFfMfjOWMADgdk+eEKz0pF7aQdMAcOKLLjrcVMVX3xdWN29/GhYP7SvnP0cWfS8caSkfHZsPE9Fgnt02JNutQ0QYHB2dDz9/pKX8QjjuO9xUxd/66HdxTeCHZ3rojQObGQBcuNjfplkD3b19Y/6MrimSaKgSMmpGU5WevmE/swa6Oy73tQHA0Rdr2Mmv/6A1n9w9suQ7097Z9lM4FlTgTDrzZTu4StXVfpiI48rVcUDM5cmEksrFnHxfpTtU/3BFQzCQF/2bYVoNbH7zmItbSoMj40JSzmMyX5qDvriA7QdrIIpA+3cdsMpu0nXI8cV0MtKXCPZev+gCEM1S2NHPvWfP/hL+7FSr3+0p5RBEyhEN5JCKYr8XnASMT0xBNyzQGQeI8fjsGD39RMPk7se2bd5ZtTyoFYXftF6y37gx7NeUtJJOTFlAHDZLDuILU3j3+H5oOrD3yWbIztugaAzgnBKJuBLpGfQrS8wO4FZgV+c1IxaLgWVU0tMLEETCos4xMzEIv9cJXQcyagIwigDGwJgOAtHAwAhisQUjy0ORGERiELgG4iakkzo4MYAxcM5hAMi1WWG1yYCJIcMUaBkVRLdGeSU2995TLWzcUAzONJ7J6FBVBYIggMzmFbvdBV44Corg8vjhzC+EJEl8U1kJtgYrhCzgc/vvTwXKSib1paRFVRVORDAJAsw5FuTaJEhWM2SHB3mOAlhkNxwuLzeJsGwqWzf5TFNdKgtY5qHp6ZFf67Y/sAVadCaVY5YACDDb3Oi4NIjLnWMw2QthCBIsVhsUTU9tvXsjeq9+X1d75/KEs4LNOfcdf/+HthMnvwxOD0wmHaXr7ZItn2wuH2SnBzbZAbPJwpPx+VQuzcm7dgRCB57a1uBzUDRL4bfnI0RE0eaXd9W89mpjqHZnUI5Hh2l2dkZZUhOqpi2qSmpOmZ64Tuu9qlz/SEXo6MEHa3wOip46F1n7633eekV8ds8Wxjn37Wl63VVa+ej5oeEZ/82ZBETJjpJ1Rbij2D3Z/1trXUvLsblCK0XfOx0SX2kMsn9dX+d+7Kf6h8o4AIykuffjT8L20LU+w4AZd5VvEPY+XpWqLV327HR7DzXuDnD8r+ovkBehJ8i+y8YAAAAASUVORK5CYII=)"},warn:{color:"#C09853","background-color":"#FCF8E3","border-color":"#FBEED5","background-image":"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABJlBMVEXr6eb/2oD/wi7/xjr/0mP/ykf/tQD/vBj/3o7/uQ//vyL/twebhgD/4pzX1K3z8e349vK6tHCilCWbiQymn0jGworr6dXQza3HxcKkn1vWvV/5uRfk4dXZ1bD18+/52YebiAmyr5S9mhCzrWq5t6ufjRH54aLs0oS+qD751XqPhAybhwXsujG3sm+Zk0PTwG6Shg+PhhObhwOPgQL4zV2nlyrf27uLfgCPhRHu7OmLgAafkyiWkD3l49ibiAfTs0C+lgCniwD4sgDJxqOilzDWowWFfAH08uebig6qpFHBvH/aw26FfQTQzsvy8OyEfz20r3jAvaKbhgG9q0nc2LbZxXanoUu/u5WSggCtp1anpJKdmFz/zlX/1nGJiYmuq5Dx7+sAAADoPUZSAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfdBgUBGhh4aah5AAAAlklEQVQY02NgoBIIE8EUcwn1FkIXM1Tj5dDUQhPU502Mi7XXQxGz5uVIjGOJUUUW81HnYEyMi2HVcUOICQZzMMYmxrEyMylJwgUt5BljWRLjmJm4pI1hYp5SQLGYxDgmLnZOVxuooClIDKgXKMbN5ggV1ACLJcaBxNgcoiGCBiZwdWxOETBDrTyEFey0jYJ4eHjMGWgEAIpRFRCUt08qAAAAAElFTkSuQmCC)"}}}); \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Columns/Column/BaseColumn.php b/src/SleepingOwl/Admin/Columns/Column/BaseColumn.php index dc97f14f..3ef07015 100644 --- a/src/SleepingOwl/Admin/Columns/Column/BaseColumn.php +++ b/src/SleepingOwl/Admin/Columns/Column/BaseColumn.php @@ -37,6 +37,11 @@ public function orderable($orderable) return $this; } + public function isOrderable() + { + return $this->header()->orderable(); + } + public function header() { return $this->header; diff --git a/src/SleepingOwl/Admin/Display/AdminDisplay.php b/src/SleepingOwl/Admin/Display/AdminDisplay.php index c7b7ee59..8abe9e1a 100644 --- a/src/SleepingOwl/Admin/Display/AdminDisplay.php +++ b/src/SleepingOwl/Admin/Display/AdminDisplay.php @@ -9,6 +9,7 @@ * @method static \SleepingOwl\Admin\Display\DisplayTabbed tabbed() * @method static \SleepingOwl\Admin\Display\DisplayTable table() * @method static \SleepingOwl\Admin\Display\DisplayDatatables datatables() + * @method static \SleepingOwl\Admin\Display\DisplayDatatablesAsync datatablesAsync() * @method static \SleepingOwl\Admin\Display\DisplayTree tree() */ class AdminDisplay extends AliasBinder diff --git a/src/SleepingOwl/Admin/Display/DisplayDatatables.php b/src/SleepingOwl/Admin/Display/DisplayDatatables.php index c849f8aa..92beb3e6 100644 --- a/src/SleepingOwl/Admin/Display/DisplayDatatables.php +++ b/src/SleepingOwl/Admin/Display/DisplayDatatables.php @@ -14,6 +14,7 @@ public function initialize() AssetManager::addScript('admin::default/js/datatables/jquery.dataTables.min.js'); AssetManager::addScript('admin::default/js/datatables/jquery.dataTables_bootstrap.js'); + AssetManager::addScript('admin::default/js/notify-combined.min.js'); AssetManager::addScript('admin::default/js/datatables/init.js'); AssetManager::addStyle('admin::default/css/dataTables.bootstrap.css'); diff --git a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php new file mode 100644 index 00000000..6e9696d4 --- /dev/null +++ b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php @@ -0,0 +1,125 @@ + 'admin.model.async', + function ($model) + { + $display = $model->display(); + if ($display instanceof DisplayDatatablesAsync) + { + return $display->renderAsync(); + } + abort(404); + } + ]); + } + + public function render() + { + $params = $this->getParams(); + $attributes = Input::all(); + array_unshift($attributes, $this->model()->alias()); + $params['url'] = route('admin.model.async', $attributes); + return view(AdminTemplate::view('display.datatablesAsync'), $params); + } + + public function renderAsync() + { + $query = $this->repository->query(); + $totalCount = $query->count(); + + $this->modifyQuery($query); + $this->applySearch($query); + + $filteredCount = $query->count(); + + $this->applyOrders($query); + $this->applyOffset($query); + $collection = $query->get(); + + return $this->prepareDatatablesStructure($collection, $totalCount, $filteredCount); + } + + protected function applyOffset($query) + { + $offset = Input::get('start', 0); + $limit = Input::get('length', 10); + $query->offset($offset)->limit($limit); + } + + protected function applyOrders($query) + { + $orders = Input::get('order', []); + foreach ($orders as $order) + { + $columnIndex = $order['column']; + $orderDirection = $order['dir']; + $column = $this->allColumns()[$columnIndex]; + if ($column instanceof NamedColumn && $column->isOrderable()) + { + $name = $column->name(); + $query->orderBy($name, $orderDirection); + } + } + } + + protected function applySearch($query) + { + $search = Input::get('search.value'); + if (is_null($search)) + { + return; + } + + $query->where(function ($query) use ($search) + { + $columns = $this->columns(); + foreach ($columns as $column) + { + if ($column instanceof String) + { + $name = $column->name(); + if ($this->repository->hasColumn($name)) + { + $query->orWhere($name, 'like', '%' . $search . '%'); + } + } + } + }); + } + + protected function prepareDatatablesStructure($collection, $totalCount, $filteredCount) + { + $columns = $this->allColumns(); + + $result = []; + $result['draw'] = Input::get('draw'); + $result['recordsTotal'] = $totalCount; + $result['recordsFiltered'] = $filteredCount; + $result['data'] = []; + foreach ($collection as $instance) + { + $_row = []; + foreach ($columns as $column) + { + $column->setInstance($instance); + $_row[] = (string) $column; + } + $result['data'][] = $_row; + } + return $result; + } + +} \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Providers/DisplayServiceProvider.php b/src/SleepingOwl/Admin/Providers/DisplayServiceProvider.php index 4fdc1bab..635c319f 100644 --- a/src/SleepingOwl/Admin/Providers/DisplayServiceProvider.php +++ b/src/SleepingOwl/Admin/Providers/DisplayServiceProvider.php @@ -10,6 +10,7 @@ public function register() { AdminDisplay::register('table', 'SleepingOwl\Admin\Display\DisplayTable'); AdminDisplay::register('datatables', 'SleepingOwl\Admin\Display\DisplayDatatables'); + AdminDisplay::register('datatablesAsync', 'SleepingOwl\Admin\Display\DisplayDatatablesAsync'); AdminDisplay::register('tree', 'SleepingOwl\Admin\Display\DisplayTree'); AdminDisplay::register('tabbed', 'SleepingOwl\Admin\Display\DisplayTabbed'); AdminDisplay::register('tab', 'SleepingOwl\Admin\Display\DisplayTab'); diff --git a/src/SleepingOwl/Admin/Providers/RouteServiceProvider.php b/src/SleepingOwl/Admin/Providers/RouteServiceProvider.php index d4821a4d..adcb3833 100644 --- a/src/SleepingOwl/Admin/Providers/RouteServiceProvider.php +++ b/src/SleepingOwl/Admin/Providers/RouteServiceProvider.php @@ -1,5 +1,6 @@ model->getTable(); + $columns = Cache::remember('admin.columns.' . $table, 60, function () use ($table) + { + return Schema::getColumnListing($table); + }); + return array_search($column, $columns) !== false; + } + } \ No newline at end of file diff --git a/src/lang/en/lang.php b/src/lang/en/lang.php index dc29f33d..2940fe1d 100644 --- a/src/lang/en/lang.php +++ b/src/lang/en/lang.php @@ -36,6 +36,7 @@ 'delete-error' => 'Error while deleting this entry. You must delete all linked entries first.', 'moveUp' => 'Move Up', 'moveDown' => 'Move Down', + 'error' => 'There was an error during your request', 'filter' => 'Show similar entries', 'filter-goto' => 'Show', 'save' => 'Save', diff --git a/src/lang/ru/lang.php b/src/lang/ru/lang.php index 9d2678b9..5090e3dd 100644 --- a/src/lang/ru/lang.php +++ b/src/lang/ru/lang.php @@ -36,6 +36,7 @@ 'delete-error' => 'Невозможно удалить эту запись. Необходимо предварительно удалить все связанные записи.', 'moveUp' => 'Подвинуть вверх', 'moveDown' => 'Подвинуть вниз', + 'error' => 'В процессе обработки вашего запроса возникла ошибку', 'filter' => 'Показать подобные записи', 'filter-goto' => 'Перейти', 'save' => 'Сохранить', diff --git a/src/views/default/column/action.blade.php b/src/views/default/column/action.blade.php index b689f479..ddf6567b 100644 --- a/src/views/default/column/action.blade.php +++ b/src/views/default/column/action.blade.php @@ -1,10 +1,12 @@ -
      \ No newline at end of file diff --git a/src/views/default/column/checkbox.blade.php b/src/views/default/column/checkbox.blade.php index aa2c109b..5ed46a99 100644 --- a/src/views/default/column/checkbox.blade.php +++ b/src/views/default/column/checkbox.blade.php @@ -1,3 +1,5 @@ - \ No newline at end of file diff --git a/src/views/default/column/control.blade.php b/src/views/default/column/control.blade.php index 3753f169..c15c8b23 100644 --- a/src/views/default/column/control.blade.php +++ b/src/views/default/column/control.blade.php @@ -1,22 +1,24 @@ - \ No newline at end of file diff --git a/src/views/default/column/order.blade.php b/src/views/default/column/order.blade.php index 24d631e7..9ca04209 100644 --- a/src/views/default/column/order.blade.php +++ b/src/views/default/column/order.blade.php @@ -1,18 +1,20 @@ - \ No newline at end of file diff --git a/src/views/default/display/datatablesAsync.blade.php b/src/views/default/display/datatablesAsync.blade.php new file mode 100644 index 00000000..58ec10c9 --- /dev/null +++ b/src/views/default/display/datatablesAsync.blade.php @@ -0,0 +1,26 @@ +@if ( ! empty($title)) +
      +
      +

      {{ $title }}

      +
      +
      +@endif +@if ($creatable) + {{ trans('admin::lang.table.new-entry') }} +@endif +
      + @foreach ($actions as $action) + {!! $action->render() !!} + @endforeach +
      +
      - - @if ($icon) - - @endif - @if ($style == 'long') - {{ $value }} - @endif - + + - + +
      + +
      - @if ($editable) - - @endif - @if ($deletable) -
      - - - -
      - @endif - @if ($restorable) -
      - - -
      - @endif +
      +
      + @if ($editable) + + @endif + @if ($deletable) +
      + + + +
      + @endif + @if ($restorable) +
      + + +
      + @endif +
      - @if ($movableUp) -
      - - -
      - @endif - @if ($movableDown) -
      - - -
      - @endif +
      +
      + @if ($movableUp) +
      + + +
      + @endif + @if ($movableDown) +
      + + +
      + @endif +
      + + + @foreach ($columns as $column) + {!! $column->header()->render() !!} + @endforeach + + + + +
      \ No newline at end of file From 0afc2a32510f82bfb86e156e8845c8fbe752916c Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Tue, 28 Apr 2015 16:33:59 +0400 Subject: [PATCH 044/108] Datatables async limit fix --- src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php index 6e9696d4..17835d20 100644 --- a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php +++ b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php @@ -56,6 +56,10 @@ protected function applyOffset($query) { $offset = Input::get('start', 0); $limit = Input::get('length', 10); + if ($limit == -1) + { + return; + } $query->offset($offset)->limit($limit); } @@ -105,7 +109,7 @@ protected function prepareDatatablesStructure($collection, $totalCount, $filtere $columns = $this->allColumns(); $result = []; - $result['draw'] = Input::get('draw'); + $result['draw'] = Input::get('draw', 0); $result['recordsTotal'] = $totalCount; $result['recordsFiltered'] = $filteredCount; $result['data'] = []; From 8da86e209b929863682379a63f674878e50c6ca4 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Tue, 28 Apr 2015 19:40:36 +0400 Subject: [PATCH 045/108] Simple tree support added --- src/SleepingOwl/Admin/Display/DisplayTree.php | 24 ++++ .../Admin/Repository/TreeRepository.php | 128 ++++++++++++++++-- 2 files changed, 142 insertions(+), 10 deletions(-) diff --git a/src/SleepingOwl/Admin/Display/DisplayTree.php b/src/SleepingOwl/Admin/Display/DisplayTree.php index 36e0dc48..d9dadd7a 100644 --- a/src/SleepingOwl/Admin/Display/DisplayTree.php +++ b/src/SleepingOwl/Admin/Display/DisplayTree.php @@ -20,6 +20,8 @@ class DisplayTree implements Renderable, DisplayInterface, WithRoutesInterface protected $reorderable = true; protected $parameters = []; protected $value = 'title'; + protected $parentField = 'parent_id'; + protected $orderField = 'order'; public function setClass($class) { @@ -87,6 +89,8 @@ public function model() public function render() { + $this->repository()->parentField($this->parentField()); + $this->repository()->orderField($this->orderField()); $params = [ 'items' => $this->repository->tree(), 'reorderable' => $this->reorderable(), @@ -123,4 +127,24 @@ public function value($value = null) return $this; } + public function parentField($parentField = null) + { + if (is_null($parentField)) + { + return $this->parentField; + } + $this->parentField = $parentField; + return $this; + } + + public function orderField($orderField = null) + { + if (is_null($orderField)) + { + return $this->orderField; + } + $this->orderField = $orderField; + return $this; + } + } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Repository/TreeRepository.php b/src/SleepingOwl/Admin/Repository/TreeRepository.php index 41fa1292..5e59f9c9 100644 --- a/src/SleepingOwl/Admin/Repository/TreeRepository.php +++ b/src/SleepingOwl/Admin/Repository/TreeRepository.php @@ -1,29 +1,85 @@ detectType(); + } + + protected function detectType() + { + if ($this->model() instanceof \Baum\Node) + { + return $this->type(static::TreeTypeBaum); + } + if ($this->model() instanceof \Kalnoy\Nestedset\Node) + { + return $this->type(static::TreeTypeKalnoy); + } + return $this->type(static::TreeTypeSimple); + } + public function tree() { $collection = $this->query()->get(); - if (method_exists($collection, 'toHierarchy')) + switch ($this->type()) { - return $collection->toHierarchy(); - } elseif (method_exists($collection, 'toTree')) + case static::TreeTypeBaum: + return $collection->toHierarchy(); + break; + case static::TreeTypeKalnoy: + return $collection->toTree(); + break; + case static::TreeTypeSimple: + return $this->createSimpleTree(); + break; + } + } + + public function reorder($data) + { + if ($this->type() == static::TreeTypeSimple) { - return $collection->toTree(); + $this->recursiveReorderSimple($data, null); } else { - throw new \Exception('Tree type not supported'); + $left = 1; + foreach ($data as $root) + { + $left = $this->recursiveReorder($root, null, $left); + } } } - public function reorder($data) + protected function recursiveReorderSimple($data, $parentId) { - $left = 1; - foreach ($data as $root) + foreach ($data as $order => $item) { - $left = $this->recursiveReorder($root, null, $left); + $id = $item['id']; + + $instance = $this->find($id); + $instance->{$this->parentField()} = $parentId; + $instance->{$this->orderField()} = $order; + $instance->save(); + + if (isset($item['children'])) + { + $this->recursiveReorderSimple($item['children'], $id); + } } } @@ -90,4 +146,56 @@ protected function callMethods($instance, $methods) throw new \Exception('Tree type not supported'); } -} \ No newline at end of file + public function parentField($parentField = null) + { + if (is_null($parentField)) + { + return $this->parentField; + } + $this->parentField = $parentField; + return $this; + } + + public function orderField($orderField = null) + { + if (is_null($orderField)) + { + return $this->orderField; + } + $this->orderField = $orderField; + return $this; + } + + protected function createSimpleTree() + { + $collection = $this->query()->orderBy($this->parentField(), 'asc')->orderBy($this->orderField(), 'asc')->get(); + + $parent = null; + return $this->getChildren($collection, $parent); + } + + protected function getChildren($collection, $id) + { + $parentField = $this->parentField(); + $result = []; + foreach ($collection as $instance) + { + if ($instance->$parentField != $id) continue; + + $instance->setRelation('children', $this->getChildren($collection, $instance->getKey())); + $result[] = $instance; + } + return Collection::make($result); + } + + public function type($type = null) + { + if (is_null($type)) + { + return $this->type; + } + $this->type = $type; + return $this; + } + +} \ No newline at end of file From 65fde895961b74bb186e2cafdbb4fe16ecb568d6 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Tue, 28 Apr 2015 22:20:39 +0400 Subject: [PATCH 046/108] Simple tree root parent fix --- src/SleepingOwl/Admin/Display/DisplayTree.php | 18 +++++++++++++++--- .../Admin/Repository/TreeRepository.php | 15 +++++++++++++-- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/src/SleepingOwl/Admin/Display/DisplayTree.php b/src/SleepingOwl/Admin/Display/DisplayTree.php index d9dadd7a..407d9e3d 100644 --- a/src/SleepingOwl/Admin/Display/DisplayTree.php +++ b/src/SleepingOwl/Admin/Display/DisplayTree.php @@ -22,6 +22,7 @@ class DisplayTree implements Renderable, DisplayInterface, WithRoutesInterface protected $value = 'title'; protected $parentField = 'parent_id'; protected $orderField = 'order'; + protected $rootParentId = null; public function setClass($class) { @@ -69,6 +70,9 @@ public function reorderable($reorderable = null) public function repository() { + $this->repository->parentField($this->parentField()); + $this->repository->orderField($this->orderField()); + $this->repository->rootParentId($this->rootParentId()); return $this->repository; } @@ -89,10 +93,8 @@ public function model() public function render() { - $this->repository()->parentField($this->parentField()); - $this->repository()->orderField($this->orderField()); $params = [ - 'items' => $this->repository->tree(), + 'items' => $this->repository()->tree(), 'reorderable' => $this->reorderable(), 'url' => Admin::model($this->class)->displayUrl(), 'value' => $this->value(), @@ -147,4 +149,14 @@ public function orderField($orderField = null) return $this; } + public function rootParentId($rootParentId = null) + { + if (func_num_args() == 0) + { + return $this->rootParentId; + } + $this->rootParentId = $rootParentId; + return $this; + } + } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Repository/TreeRepository.php b/src/SleepingOwl/Admin/Repository/TreeRepository.php index 5e59f9c9..b6f53f23 100644 --- a/src/SleepingOwl/Admin/Repository/TreeRepository.php +++ b/src/SleepingOwl/Admin/Repository/TreeRepository.php @@ -12,6 +12,7 @@ class TreeRepository extends BaseRepository protected $type; protected $parentField = 'parent_id'; protected $orderField = 'order'; + protected $rootParentId = null; function __construct($class) { @@ -54,7 +55,7 @@ public function reorder($data) { if ($this->type() == static::TreeTypeSimple) { - $this->recursiveReorderSimple($data, null); + $this->recursiveReorderSimple($data, $this->rootParentId()); } else { $left = 1; @@ -170,7 +171,7 @@ protected function createSimpleTree() { $collection = $this->query()->orderBy($this->parentField(), 'asc')->orderBy($this->orderField(), 'asc')->get(); - $parent = null; + $parent = $this->rootParentId(); return $this->getChildren($collection, $parent); } @@ -198,4 +199,14 @@ public function type($type = null) return $this; } + public function rootParentId($rootParentId = null) + { + if (func_num_args() == 0) + { + return $this->rootParentId; + } + $this->rootParentId = $rootParentId; + return $this; + } + } \ No newline at end of file From 4f59a68234c65262856f29e7ead2d169df8f342b Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Wed, 29 Apr 2015 13:24:45 +0400 Subject: [PATCH 047/108] Donate update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b0ce7c8..3bfd1239 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ View [live demo](http://sleepingowladmindemo2.cloudcontrolled.com). ## Support Library -You can donate via [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AXJMWMRPCBGVA) or in BTC: 13k36pym383rEmsBSLyWfT3TxCQMN2Lekd +You can donate via [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AXJMWMRPCBGVA), Yandex money (410012943296949) or in BTC: 13k36pym383rEmsBSLyWfT3TxCQMN2Lekd ## Copyright and License From 94865ff6febf5867010250ef07a38eeb55c39594 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Wed, 29 Apr 2015 14:42:00 +0400 Subject: [PATCH 048/108] Unnecessary queries fix --- src/SleepingOwl/Admin/Http/Controllers/AdminController.php | 4 ++-- src/SleepingOwl/Admin/Model/ModelConfiguration.php | 6 ++++++ src/views/default/column/control.blade.php | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/SleepingOwl/Admin/Http/Controllers/AdminController.php b/src/SleepingOwl/Admin/Http/Controllers/AdminController.php index 10d80486..00c3c97a 100644 --- a/src/SleepingOwl/Admin/Http/Controllers/AdminController.php +++ b/src/SleepingOwl/Admin/Http/Controllers/AdminController.php @@ -49,7 +49,7 @@ public function postStore($model) public function getEdit($model, $id) { - $edit = $model->edit($id); + $edit = $model->fullEdit($id); if (is_null($edit)) { abort(404); @@ -59,7 +59,7 @@ public function getEdit($model, $id) public function postUpdate($model, $id) { - $edit = $model->edit($id); + $edit = $model->fullEdit($id); if (is_null($edit)) { abort(404); diff --git a/src/SleepingOwl/Admin/Model/ModelConfiguration.php b/src/SleepingOwl/Admin/Model/ModelConfiguration.php index 03d8fa52..0e03cdb5 100644 --- a/src/SleepingOwl/Admin/Model/ModelConfiguration.php +++ b/src/SleepingOwl/Admin/Model/ModelConfiguration.php @@ -157,6 +157,12 @@ protected function getEdit($id) $edit->setClass($this->class); $edit->initialize(); } + return $edit; + } + + public function fullEdit($id) + { + $edit = $this->edit($id); if ($edit instanceof FormInterface) { $edit->setAction($this->updateUrl($id)); diff --git a/src/views/default/column/control.blade.php b/src/views/default/column/control.blade.php index c15c8b23..3823d57c 100644 --- a/src/views/default/column/control.blade.php +++ b/src/views/default/column/control.blade.php @@ -1,5 +1,5 @@ -
      +
      @if ($editable) @endif From 4e6ffe6c39ec6b627fe7008a60afc51ec0d51eaa Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Wed, 29 Apr 2015 15:38:05 +0400 Subject: [PATCH 049/108] Render fix --- src/SleepingOwl/Admin/Http/Controllers/AdminController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/SleepingOwl/Admin/Http/Controllers/AdminController.php b/src/SleepingOwl/Admin/Http/Controllers/AdminController.php index 00c3c97a..92a20b0a 100644 --- a/src/SleepingOwl/Admin/Http/Controllers/AdminController.php +++ b/src/SleepingOwl/Admin/Http/Controllers/AdminController.php @@ -2,6 +2,7 @@ use AdminTemplate; use App; +use Illuminate\Contracts\Support\Renderable; use Illuminate\Http\Response; use Illuminate\Routing\Controller; use Input; @@ -101,6 +102,10 @@ public function postRestore($model, $id) public function render($title, $content) { + if ($content instanceof Renderable) + { + $content = $content->render(); + } return view(AdminTemplate::view('_layout.inner'), [ 'title' => $title, 'content' => $content, From 24f0ebc02e00ed7bf9e3bfab3628ac45fab331be Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Wed, 29 Apr 2015 15:49:01 +0400 Subject: [PATCH 050/108] Bootstrap directory rename --- src/config/config.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config/config.php b/src/config/config.php index ec22ef33..7a640a64 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -18,10 +18,10 @@ 'middleware' => ['admin.auth'], /* - * Path to admin bootstrap files directory in app directory - * Default: 'app/admin' + * Path to admin bootstrap files directory + * Default: app_path('Admin') */ - 'bootstrapDirectory' => app_path('admin'), + 'bootstrapDirectory' => app_path('Admin'), /* * Directory to upload images to (relative to public directory) From 541f3a796256920a129f30b9a20f80079abce5f0 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Wed, 29 Apr 2015 19:58:28 +0400 Subject: [PATCH 051/108] Async datatables checkbox fix --- public/default/js/columns/checkbox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/default/js/columns/checkbox.js b/public/default/js/columns/checkbox.js index 3cf2abce..1d4f3c58 100644 --- a/public/default/js/columns/checkbox.js +++ b/public/default/js/columns/checkbox.js @@ -5,7 +5,7 @@ $(function () var checked = $(this).is(':checked'); $('.adminCheckboxRow').prop('checked', checked).filter(':first').change(); }); - $('.adminCheckboxRow').change(function () + $(document).delegate('.adminCheckboxRow', 'change', function () { var selected = []; $('.adminCheckboxRow:checked').each(function () From 0549e5012d2e9a8e039691941bc7a67c8253d1f9 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Thu, 30 Apr 2015 14:19:54 +0400 Subject: [PATCH 052/108] Initial tests added --- composer.json | 8 +- phpunit.xml | 5 - .../Admin/AssetManager/AssetManager.php | 3 +- .../Admin/Model/ModelConfiguration.php | 6 +- tests/AdminTest.php | 106 +++++++++++ tests/MenuItemTe.php | 49 +++++ tests/ModelConfigurationTest.php | 177 ++++++++++++++++++ tests/TestBase.php | 55 ++++++ tests/models/MyModel.php | 6 + 9 files changed, 403 insertions(+), 12 deletions(-) create mode 100644 tests/AdminTest.php create mode 100644 tests/MenuItemTe.php create mode 100644 tests/ModelConfigurationTest.php create mode 100644 tests/TestBase.php create mode 100644 tests/models/MyModel.php diff --git a/composer.json b/composer.json index f459bcfd..51204afb 100644 --- a/composer.json +++ b/composer.json @@ -22,11 +22,17 @@ }, "require-dev": { "phpunit/phpunit": "4.*", - "mockery/mockery": "0.9.*" + "orchestra/testbench": "3.*" }, "autoload": { "psr-0": { "SleepingOwl\\Admin": "src/" } + }, + "autoload-dev": { + "classmap": [ + "tests/TestBase.php", + "tests/models" + ] } } diff --git a/phpunit.xml b/phpunit.xml index d0104307..3347b75b 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -15,9 +15,4 @@ ./tests/ - - - diff --git a/src/SleepingOwl/Admin/AssetManager/AssetManager.php b/src/SleepingOwl/Admin/AssetManager/AssetManager.php index f700ae0c..c7dd9bf1 100644 --- a/src/SleepingOwl/Admin/AssetManager/AssetManager.php +++ b/src/SleepingOwl/Admin/AssetManager/AssetManager.php @@ -7,8 +7,8 @@ class AssetManager { - protected static $styles = []; + protected static $styles = []; protected static $scripts = []; public static function styles() @@ -43,4 +43,5 @@ protected static function assets($assets) return $asset; }, array_unique($assets)); } + } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Model/ModelConfiguration.php b/src/SleepingOwl/Admin/Model/ModelConfiguration.php index 0e03cdb5..9359cdce 100644 --- a/src/SleepingOwl/Admin/Model/ModelConfiguration.php +++ b/src/SleepingOwl/Admin/Model/ModelConfiguration.php @@ -30,11 +30,7 @@ public function repository() protected function setDefaultAlias() { - $alias = $this->class; - if (class_exists($this->class)) - { - $alias = Str::snake(Str::plural(class_basename($this->class))); - } + $alias = Str::snake(Str::plural(class_basename($this->class))); $this->alias($alias); } diff --git a/tests/AdminTest.php b/tests/AdminTest.php new file mode 100644 index 00000000..dd80049a --- /dev/null +++ b/tests/AdminTest.php @@ -0,0 +1,106 @@ +assertInstanceOf('SleepingOwl\Admin\Admin', Admin::instance()); + } + + /** @test */ + public function it_creates_model_configuration() + { + $model = Admin::model('Foo\Bar\Model'); + $this->assertInstanceOf('SleepingOwl\Admin\Model\ModelConfiguration', $model); + } + + /** @test */ + public function it_provides_registered_models() + { + $models = Admin::models(); + $this->assertArrayHasKey('Foo\Bar\Model', $models); + $this->assertInstanceOf('SleepingOwl\Admin\Model\ModelConfiguration', $models['Foo\Bar\Model']); + } + + /** @test */ + public function it_provides_model_aliases() + { + $aliases = Admin::modelAliases(); + $this->assertArrayHasKey('Foo\Bar\Model', $aliases); + $this->assertEquals('models', $aliases['Foo\Bar\Model']); + } + + /** @test */ + public function it_provides_access_to_model_from_admin_instance() + { + $model = Admin::instance()->getModel('Foo\Bar\Model'); + $this->assertInstanceOf('SleepingOwl\Admin\Model\ModelConfiguration', $model); + } + + /** @test */ + public function it_provides_registered_models_from_admin_instance() + { + $models = Admin::instance()->getModels(); + $this->assertArrayHasKey('Foo\Bar\Model', $models); + $this->assertInstanceOf('SleepingOwl\Admin\Model\ModelConfiguration', $models['Foo\Bar\Model']); + } + + /** @test */ + public function it_checks_model_for_registered() + { + $this->assertEquals(true, Admin::instance()->hasModel('Foo\Bar\Model')); + $this->assertEquals(false, Admin::instance()->hasModel('Bar\Baz\Model')); + } + + /** @test */ + public function it_allows_manually_create_model_configuration() + { + $model = new ModelConfiguration('My\Model'); + Admin::instance()->setModel('My\Model', $model); + + $model = Admin::model('My\Model'); + $this->assertInstanceOf('SleepingOwl\Admin\Model\ModelConfiguration', $model); + } + + /** @test */ + public function it_provides_current_template_instance() + { + $template = Admin::instance()->template(); + $this->assertInstanceOf('SleepingOwl\Admin\Templates\TemplateDefault', $template); + } + + /** @test */ + public function it_creates_menu_item() + { + $menu = Admin::menu('Foo\Bar\Model'); + $this->assertInstanceOf('SleepingOwl\Admin\Menu\MenuItem', $menu); + } + + /** @test */ + public function it_provides_root_menu_items() + { + Admin::menu('My\Model'); + $items = Admin::instance()->getMenu(); + $this->assertCount(2, $items); + $this->assertContainsOnlyInstancesOf('SleepingOwl\Admin\Menu\MenuItem', $items); + } + + /** @test */ + public function it_renders_view_within_admin_layout() + { + $view = Admin::view('my-content', 'my-title'); + $data = $view->getData(); + + $this->assertArrayHasKey('content', $data); + $this->assertEquals('my-content', $data['content']); + + $this->assertArrayHasKey('title', $data); + $this->assertEquals('my-title', $data['title']); + } + +} + \ No newline at end of file diff --git a/tests/MenuItemTe.php b/tests/MenuItemTe.php new file mode 100644 index 00000000..c68f0914 --- /dev/null +++ b/tests/MenuItemTe.php @@ -0,0 +1,49 @@ +label('My Label'); + $this->assertEquals('My Label', $menu->label()); + } + + /** @test */ + public function it_supports_icon() + { + $menu = Admin::menu()->icon('fa-user'); + $this->assertEquals('fa-user', $menu->icon()); + } + + /** @test */ + public function it_supports_subitems() + { + $menu = Admin::menu()->items(function () + { + Admin::menu(); + Admin::menu(); + Admin::menu(); + }); + $items = $menu->items(); + $this->assertCount(3, $items); + + $this->assertEquals(1, $menu->level()); + $this->assertEquals(2, $items[0]->level()); + } + + /** @test */ + public function it_support_urls() + { + $menu = Admin::menu('MyModel'); + $this->assertEquals('http://localhost/admin/my_models', $menu->url()); + + $menu->url('my-url'); + $this->assertEquals('http://localhost/admin/my-url', $menu->url()); + + $menu->url('http://google.com'); + $this->assertEquals('http://google.com', $menu->url()); + } + +} \ No newline at end of file diff --git a/tests/ModelConfigurationTest.php b/tests/ModelConfigurationTest.php new file mode 100644 index 00000000..47c37db6 --- /dev/null +++ b/tests/ModelConfigurationTest.php @@ -0,0 +1,177 @@ +model = new ModelConfiguration('MyModel'); + } + + /** @test */ + public function it_initializes() + { + $this->assertInstanceOf('SleepingOwl\Admin\Model\ModelConfiguration', $this->model); + } + + /** @test */ + public function it_generates_default_alias() + { + $this->assertEquals('my_models', $this->model->alias()); + + $model = new ModelConfiguration('My\Model'); + $this->assertEquals('models', $model->alias()); + + $model = new ModelConfiguration('My\Models'); + $this->assertEquals('models', $model->alias()); + + $model = new ModelConfiguration('My\Sub\Car'); + $this->assertEquals('cars', $model->alias()); + } + + /** @test */ + public function it_provides_repository() + { + $repository = $this->model->repository(); + $this->assertInstanceOf('SleepingOwl\Admin\Repository\BaseRepository', $repository); + } + + /** @test */ + public function it_suports_alias() + { + $model = new ModelConfiguration('My\Model'); + $model->alias('my-new-alias'); + $this->assertEquals('my-new-alias', $model->alias()); + } + + /** @test */ + public function it_suports_title() + { + $model = new ModelConfiguration('My\Model'); + $model->title('My Title'); + $this->assertEquals('My Title', $model->title()); + } + + /** @test */ + public function it_supports_create_form_from_callback() + { + $model = new ModelConfiguration('My\Model'); + $model->create(function () + { + return 42; + }); + $this->assertEquals(42, $model->create()); + } + + /** @test */ + public function it_supports_edit_form_from_callback() + { + $model = new ModelConfiguration('My\Model'); + $model->edit(function ($id) + { + return $id; + }); + $this->assertEquals(42, $model->edit(42)); + } + + /** @test */ + public function it_suports_create_and_edit_form_at_once() + { + $model = new ModelConfiguration('My\Model'); + $model->createAndEdit(function ($id) + { + if (is_null($id)) + { + return 15; + } + return $id; + }); + $this->assertEquals(15, $model->create()); + $this->assertEquals(42, $model->edit(42)); + } + + /** @test */ + public function it_supports_delete_configuration() + { + $model = new ModelConfiguration('My\Model'); + + $model->delete(null); + $this->assertEquals(null, $model->delete(42)); + + $model->delete(false); + $this->assertEquals(false, $model->delete(42)); + + $model->delete(function ($id) + { + return null; + }); + $this->assertEquals(null, $model->delete(42)); + + $model->delete(function ($id) + { + return $id; + }); + $this->assertEquals(42, $model->delete(42)); + } + + /** @test */ + public function it_supports_restore_configuration() + { + $model = new ModelConfiguration('My\Model'); + + $model->restore(null); + $this->assertEquals(null, $model->restore(42)); + + $model->restore(false); + $this->assertEquals(false, $model->restore(42)); + + $model->restore(function ($id) + { + return null; + }); + $this->assertEquals(null, $model->restore(42)); + + $model->restore(function ($id) + { + return $id; + }); + $this->assertEquals(42, $model->restore(42)); + } + + /** @test */ + public function it_supports_display_form_from_callback() + { + $model = new ModelConfiguration('My\Model'); + $model->display(function () + { + return 42; + }); + $this->assertEquals(42, $model->display()); + } + + /** @test */ + public function it_provides_urls() + { + $this->assertEquals('http://localhost/admin/my_models', $this->model->displayUrl()); + $this->assertEquals('http://localhost/admin/my_models?param=42', $this->model->displayUrl(['param' => 42])); + + $this->assertEquals('http://localhost/admin/my_models/create', $this->model->createUrl()); + $this->assertEquals('http://localhost/admin/my_models/create?param=42', $this->model->createUrl(['param' => 42])); + + $this->assertEquals('http://localhost/admin/my_models', $this->model->storeUrl()); + $this->assertEquals('http://localhost/admin/my_models/42/edit', $this->model->editUrl(42)); + $this->assertEquals('http://localhost/admin/my_models/42', $this->model->updateUrl(42)); + $this->assertEquals('http://localhost/admin/my_models/42', $this->model->deleteUrl(42)); + $this->assertEquals('http://localhost/admin/my_models/42/restore', $this->model->restoreUrl(42)); + } + +} \ No newline at end of file diff --git a/tests/TestBase.php b/tests/TestBase.php new file mode 100644 index 00000000..be1f580f --- /dev/null +++ b/tests/TestBase.php @@ -0,0 +1,55 @@ + 'SleepingOwl\Admin\Admin', + 'AdminAuth' => 'SleepingOwl\AdminAuth\Facades\AdminAuth', + 'Column' => 'SleepingOwl\Admin\Columns\Column', + 'Filter' => 'SleepingOwl\Admin\Filter\Filter', + 'AdminDisplay' => 'SleepingOwl\Admin\Display\AdminDisplay', + 'AdminForm' => 'SleepingOwl\Admin\Form\AdminForm', + 'AdminTemplate' => 'SleepingOwl\Admin\Templates\Facade\AdminTemplate', + 'FormItem' => 'SleepingOwl\Admin\FormItems\FormItem', + ]; + } + + public function setUp() + { + parent::setUp(); + + $this->artisan('migrate', [ + '--database' => 'testbench', + '--realpath' => realpath(__DIR__.'/../src/migrations'), + ]); + $this->artisan('migrate', [ + '--database' => 'testbench', + '--realpath' => realpath(__DIR__.'/migrations'), + ]); + $administrator = \SleepingOwl\AdminAuth\Entities\Administrator::create([ + 'username' => 'admin', + 'password' => 'admin', + 'name' => 'admin', + ]); + AdminAuth::login($administrator); + } + + protected function getEnvironmentSetUp($app) + { + $app['config']->set('database.default', 'testbench'); + $app['config']->set('database.connections.testbench', [ + 'driver' => 'sqlite', + 'database' => ':memory:', + 'prefix' => '', + ]); + } + +} \ No newline at end of file diff --git a/tests/models/MyModel.php b/tests/models/MyModel.php new file mode 100644 index 00000000..bca9141d --- /dev/null +++ b/tests/models/MyModel.php @@ -0,0 +1,6 @@ + Date: Thu, 30 Apr 2015 15:51:50 +0400 Subject: [PATCH 053/108] Code cleanup start --- src/SleepingOwl/Admin/Admin.php | 51 ++++++++ .../Admin/AdminServiceProvider.php | 24 ++++ .../Admin/AssetManager/AssetManager.php | 34 ++++- src/SleepingOwl/Admin/Base/AliasBinder.php | 21 ++++ src/SleepingOwl/Admin/Columns/Column.php | 26 ++-- .../Admin/Columns/Column/Action.php | 68 +++++++++- .../Admin/Columns/Column/BaseColumn.php | 55 +++++++- .../Admin/Columns/Column/Checkbox.php | 29 +++-- .../Admin/Columns/Column/ColumnHeader.php | 25 ++++ .../Admin/Columns/Column/Control.php | 58 +++++++-- .../Admin/Columns/Column/Count.php | 4 + .../Admin/Columns/Column/Custom.php | 21 ++++ .../Admin/Columns/Column/DateTime.php | 13 ++ .../Admin/Columns/Column/Filter.php | 35 +++++- .../Admin/Columns/Column/Image.php | 11 ++ .../Admin/Columns/Column/Lists.php | 4 + .../Admin/Columns/Column/NamedColumn.php | 21 +++- .../Admin/Columns/Column/Order.php | 32 +++++ .../Admin/Columns/Column/String.php | 4 + .../Admin/Columns/Column/TreeControl.php | 4 + src/SleepingOwl/Admin/Columns/Column/Url.php | 10 +- .../Admin/Commands/AdministratorsCommand.php | 26 +++- .../Commands/Compilers/ModelCompiler.php | 1 + .../Admin/Commands/InstallCommand.php | 42 +++---- .../Admin/Commands/ModelCommand.php | 9 +- .../Admin/Commands/stubs/routes.stub | 13 +- src/SleepingOwl/Admin/Form/AdminForm.php | 9 +- src/SleepingOwl/Admin/Form/FormDefault.php | 102 +++++++++++++-- .../Admin/Interfaces/ColumnInterface.php | 8 ++ .../Admin/Interfaces/DisplayInterface.php | 8 ++ .../Admin/Interfaces/FilterInterface.php | 12 ++ .../Admin/Interfaces/FormInterface.php | 19 +++ .../Admin/Interfaces/FormItemInterface.php | 17 +++ .../Admin/Interfaces/TemplateInterface.php | 5 + .../Admin/Interfaces/WithRoutesInterface.php | 3 + src/SleepingOwl/Admin/Menu/MenuItem.php | 57 +++++++++ .../Admin/Providers/ColumnServiceProvider.php | 16 +-- .../Admin/Providers/FormServiceProvider.php | 1 - .../Admin/Repository/BaseRepository.php | 53 +++++++- .../Admin/Repository/TreeRepository.php | 117 ++++++++++++++++++ .../Admin/Templates/Facade/AdminTemplate.php | 3 + .../Admin/Templates/TemplateDefault.php | 8 ++ .../Admin/Traits/OrderableModel.php | 30 +++++ 43 files changed, 993 insertions(+), 116 deletions(-) diff --git a/src/SleepingOwl/Admin/Admin.php b/src/SleepingOwl/Admin/Admin.php index fafd6f31..13caeecd 100644 --- a/src/SleepingOwl/Admin/Admin.php +++ b/src/SleepingOwl/Admin/Admin.php @@ -1,5 +1,7 @@ menu = static::menu(); } + /** + * @return Admin + */ public static function instance() { if (is_null(static::$instance)) @@ -30,16 +41,26 @@ public static function instance() return static::$instance; } + /** + * @param $class + * @return ModelConfiguration + */ public static function model($class) { return static::instance()->getModel($class); } + /** + * @return Model\ModelConfiguration[] + */ public static function models() { return static::instance()->getModels(); } + /** + * @return string[] + */ public static function modelAliases() { return array_map(function ($model) @@ -48,6 +69,10 @@ public static function modelAliases() }, static::models()); } + /** + * @param $class + * @return ModelConfiguration + */ public function getModel($class) { if ($this->hasModel($class)) @@ -59,21 +84,35 @@ public function getModel($class) return $model; } + /** + * @return Model\ModelConfiguration[] + */ public function getModels() { return $this->models; } + /** + * @param $class + * @return bool + */ public function hasModel($class) { return array_key_exists($class, $this->models); } + /** + * @param $class + * @param ModelConfiguration $model + */ public function setModel($class, $model) { $this->models[$class] = $model; } + /** + * @return TemplateInterface + */ public function template() { if (is_null($this->template)) @@ -84,16 +123,28 @@ public function template() return $this->template; } + /** + * @param string|null $model + * @return MenuItem + */ public static function menu($model = null) { return new MenuItem($model); } + /** + * @return MenuItem[] + */ public function getMenu() { return $this->menu->items(); } + /** + * @param $content + * @param string|null $title + * @return View + */ public static function view($content, $title = null) { $controller = app('SleepingOwl\Admin\Http\Controllers\AdminController'); diff --git a/src/SleepingOwl/Admin/AdminServiceProvider.php b/src/SleepingOwl/Admin/AdminServiceProvider.php index 9b4bd706..7b652a8f 100644 --- a/src/SleepingOwl/Admin/AdminServiceProvider.php +++ b/src/SleepingOwl/Admin/AdminServiceProvider.php @@ -5,6 +5,9 @@ class AdminServiceProvider extends ServiceProvider { + /** + * Providers to register + */ protected $providers = [ 'SleepingOwl\AdminAuth\AdminAuthServiceProvider', 'SleepingOwl\Admin\Providers\DisplayServiceProvider', @@ -16,17 +19,26 @@ class AdminServiceProvider extends ServiceProvider 'SleepingOwl\Admin\Providers\RouteServiceProvider', ]; + /** + * Commands to register + */ protected $commads = [ 'AdministratorsCommand', 'InstallCommand', 'ModelCommand' ]; + /** + * + */ public function register() { $this->registerCommands(); } + /** + * + */ public function boot() { $this->loadViewsFrom(__DIR__ . '/../../views', 'admin'); @@ -59,6 +71,9 @@ public function provides() return ['admin']; } + /** + * Bind current template + */ protected function registerTemplate() { app()->bind('adminTemplate', function () @@ -67,11 +82,17 @@ protected function registerTemplate() }); } + /** + * Initialize template + */ protected function initializeTemplate() { app('adminTemplate'); } + /** + * Register providers + */ protected function registerProviders() { foreach ($this->providers as $providerClass) @@ -81,6 +102,9 @@ protected function registerProviders() } } + /** + * Register commands + */ protected function registerCommands() { foreach ($this->commads as $command) diff --git a/src/SleepingOwl/Admin/AssetManager/AssetManager.php b/src/SleepingOwl/Admin/AssetManager/AssetManager.php index c7dd9bf1..c4b2ca8b 100644 --- a/src/SleepingOwl/Admin/AssetManager/AssetManager.php +++ b/src/SleepingOwl/Admin/AssetManager/AssetManager.php @@ -1,36 +1,60 @@ orderable(false); } + /** + * Get or set icon class + * @param string|null $icon + * @return $this|string + */ public function icon($icon = null) { if (is_null($icon)) @@ -30,6 +61,11 @@ public function icon($icon = null) return $this; } + /** + * Get or set action button style + * @param string|null $style + * @return $this|string + */ public function style($style = null) { if (is_null($style)) @@ -40,6 +76,11 @@ public function style($style = null) return $this; } + /** + * Get or set action callback + * @param Closure|null $callback + * @return $this|Closure + */ public function callback($callback = null) { if (is_null($callback)) @@ -50,6 +91,11 @@ public function callback($callback = null) return $this; } + /** + * Get or set action button target + * @param string|null $target + * @return $this|string + */ public function target($target = null) { if (is_null($target)) @@ -60,6 +106,11 @@ public function target($target = null) return $this; } + /** + * Get or set action buttom value (buttom label) + * @param string|null $value + * @return $this|string + */ public function value($value = null) { if (is_null($value)) @@ -70,6 +121,10 @@ public function value($value = null) return $this; } + /** + * Render action button + * @return \Illuminate\View\View + */ public function render() { $params = [ @@ -82,6 +137,11 @@ public function render() return view(AdminTemplate::view('column.action'), $params); } + /** + * Get or set action button url + * @param string|null $url + * @return $this|string + */ public function url($url = null) { if (is_null($url)) @@ -107,6 +167,10 @@ public function url($url = null) return $this; } + /** + * Call action button callback + * @param $instance + */ public function call($instance) { $callback = $this->callback(); diff --git a/src/SleepingOwl/Admin/Columns/Column/BaseColumn.php b/src/SleepingOwl/Admin/Columns/Column/BaseColumn.php index 3ef07015..6e3fe9df 100644 --- a/src/SleepingOwl/Admin/Columns/Column/BaseColumn.php +++ b/src/SleepingOwl/Admin/Columns/Column/BaseColumn.php @@ -3,50 +3,96 @@ use Illuminate\Contracts\Support\Renderable; use SleepingOwl\Admin\Admin; use SleepingOwl\Admin\Interfaces\ColumnInterface; +use SleepingOwl\Admin\Model\ModelConfiguration; abstract class BaseColumn implements Renderable, ColumnInterface { + /** + * Column header + * @var ColumnHeader + */ protected $header; + /** + * Model instance currently rendering + * @var mixed + */ protected $instance; + /** + * Column appendant + * @var ColumnInterface + */ protected $append; + /** + * + */ function __construct() { $this->header = new ColumnHeader; } + /** + * Initialize column + */ public function initialize() { } + /** + * Get related model configuration + * @return ModelConfiguration + */ protected function model() { return Admin::model(get_class($this->instance)); } + /** + * Set column header label + * @param string $title + * @return $this + */ public function label($title) { $this->header->title($title); return $this; } + /** + * Enable/disable column orderable feature + * @param bool $orderable + * @return $this + */ public function orderable($orderable) { $this->header->orderable($orderable); return $this; } + /** + * Check if column is orderable + * @return bool + */ public function isOrderable() { return $this->header()->orderable(); } + /** + * Get column header + * @return ColumnHeader + */ public function header() { return $this->header; } + /** + * Get or set column appendant + * @param ColumnInterface|null $append + * @return $this|ColumnInterface + */ public function append($append = null) { if (is_null($append)) @@ -57,6 +103,11 @@ public function append($append = null) return $this; } + /** + * Set currently rendering instance + * @param mixed $instance + * @return $this + */ public function setInstance($instance) { $this->instance = $instance; @@ -67,10 +118,12 @@ public function setInstance($instance) return $this; } + /** + * @return string + */ function __toString() { return (string)$this->render(); } - } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Columns/Column/Checkbox.php b/src/SleepingOwl/Admin/Columns/Column/Checkbox.php index 6ca301a5..9c8151e4 100644 --- a/src/SleepingOwl/Admin/Columns/Column/Checkbox.php +++ b/src/SleepingOwl/Admin/Columns/Column/Checkbox.php @@ -1,21 +1,15 @@ orderable(false); } + /** + * Initialize column + */ + public function initialize() + { + parent::initialize(); + + AssetManager::addScript('admin::default/js/columns/checkbox.js'); + } + + /** + * @return View + */ public function render() { $params = [ 'value' => $this->instance->getKey(), ]; - return view(AdminTemplate::view('column.' . $this->view), $params); + return view(AdminTemplate::view('column.checkbox'), $params); } } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Columns/Column/ColumnHeader.php b/src/SleepingOwl/Admin/Columns/Column/ColumnHeader.php index 0c1bb2be..5635349e 100644 --- a/src/SleepingOwl/Admin/Columns/Column/ColumnHeader.php +++ b/src/SleepingOwl/Admin/Columns/Column/ColumnHeader.php @@ -2,13 +2,27 @@ use AdminTemplate; use Illuminate\Contracts\Support\Renderable; +use Illuminate\View\View; class ColumnHeader implements Renderable { + /** + * Header title + * @var string + */ protected $title; + /** + * Is column orderable? + * @var bool + */ protected $orderable = true; + /** + * Get or set title + * @param string|null $title + * @return $this|string + */ public function title($title = null) { if (is_null($title)) @@ -19,6 +33,11 @@ public function title($title = null) return $this; } + /** + * Get or set column orderable feature + * @param bool|null $orderable + * @return $this|bool + */ public function orderable($orderable = null) { if (is_null($orderable)) @@ -29,6 +48,9 @@ public function orderable($orderable = null) return $this; } + /** + * @return View + */ public function render() { $params = [ @@ -38,6 +60,9 @@ public function render() return view(AdminTemplate::view('column.header'), $params); } + /** + * @return string + */ function __toString() { return (string)$this->render(); diff --git a/src/SleepingOwl/Admin/Columns/Column/Control.php b/src/SleepingOwl/Admin/Columns/Column/Control.php index b960f58b..6f8ec865 100644 --- a/src/SleepingOwl/Admin/Columns/Column/Control.php +++ b/src/SleepingOwl/Admin/Columns/Column/Control.php @@ -1,22 +1,21 @@ orderable(false); } - protected function model() + /** + * Initialize column + */ + public function initialize() { - return Admin::model(get_class($this->instance)); + parent::initialize(); + + AssetManager::addScript('admin::default/js/bootbox.js'); + AssetManager::addScript('admin::default/js/columns/control.js'); } + /** + * Check if instance supports soft-deletes and trashed + * @return bool + */ protected function trashed() { if (method_exists($this->instance, 'trashed')) @@ -38,36 +47,63 @@ protected function trashed() return false; } + /** + * Check if instance editable + * @return bool + */ protected function editable() { return ! $this->trashed() && ! is_null($this->model()->edit($this->instance->getKey())); } + /** + * Get instance edit url + * @return string + */ protected function editUrl() { return $this->model()->editUrl($this->instance->getKey()); } + /** + * Check if instance is deletable + * @return bool + */ protected function deletable() { return ! $this->trashed() && ! is_null($this->model()->delete($this->instance->getKey())); } + /** + * Get instance delete url + * @return string + */ protected function deleteUrl() { return $this->model()->deleteUrl($this->instance->getKey()); } + /** + * Check if instance is restorable + * @return bool + */ protected function restorable() { return $this->trashed() && ! is_null($this->model()->restore($this->instance->getKey())); } + /** + * Get instance restore url + * @return string + */ protected function restoreUrl() { return $this->model()->restoreUrl($this->instance->getKey()); } + /** + * @return View + */ public function render() { $params = [ diff --git a/src/SleepingOwl/Admin/Columns/Column/Count.php b/src/SleepingOwl/Admin/Columns/Column/Count.php index 1b75e766..97936efc 100644 --- a/src/SleepingOwl/Admin/Columns/Column/Count.php +++ b/src/SleepingOwl/Admin/Columns/Column/Count.php @@ -1,10 +1,14 @@ callback())) @@ -26,6 +43,10 @@ protected function getValue($instance) return call_user_func($this->callback(), $instance); } + /** + * @return View + * @throws \Exception + */ public function render() { $params = [ diff --git a/src/SleepingOwl/Admin/Columns/Column/DateTime.php b/src/SleepingOwl/Admin/Columns/Column/DateTime.php index 2383ed72..fa8359fe 100644 --- a/src/SleepingOwl/Admin/Columns/Column/DateTime.php +++ b/src/SleepingOwl/Admin/Columns/Column/DateTime.php @@ -2,12 +2,22 @@ use AdminTemplate; use Carbon\Carbon; +use Illuminate\View\View; class DateTime extends NamedColumn { + /** + * Datetime format + * @var string + */ protected $format; + /** + * Get or set datetime format + * @param string|null $format + * @return $this|string + */ public function format($format = null) { if (is_null($format)) @@ -22,6 +32,9 @@ public function format($format = null) return $this; } + /** + * @return View + */ public function render() { $value = $this->getValue($this->instance, $this->name()); diff --git a/src/SleepingOwl/Admin/Columns/Column/Filter.php b/src/SleepingOwl/Admin/Columns/Column/Filter.php index ba17065e..9f943739 100644 --- a/src/SleepingOwl/Admin/Columns/Column/Filter.php +++ b/src/SleepingOwl/Admin/Columns/Column/Filter.php @@ -1,19 +1,28 @@ getValue($this->instance, $this->field()); return Admin::model($this->model)->displayUrl([$this->name() => $value]); } + /** + * Check if filter applies to the current model + * @return bool + */ protected function isSelf() { return get_class($this->instance) == $this->model(); } + /** + * @return View + */ public function render() { $params = [ diff --git a/src/SleepingOwl/Admin/Columns/Column/Image.php b/src/SleepingOwl/Admin/Columns/Column/Image.php index 8ac751af..60e8d1f9 100644 --- a/src/SleepingOwl/Admin/Columns/Column/Image.php +++ b/src/SleepingOwl/Admin/Columns/Column/Image.php @@ -1,11 +1,15 @@ orderable(false); } + /** + * @return View + */ public function render() { $value = $this->getValue($this->instance, $this->name()); diff --git a/src/SleepingOwl/Admin/Columns/Column/Lists.php b/src/SleepingOwl/Admin/Columns/Column/Lists.php index 470804b4..72a326ba 100644 --- a/src/SleepingOwl/Admin/Columns/Column/Lists.php +++ b/src/SleepingOwl/Admin/Columns/Column/Lists.php @@ -1,10 +1,14 @@ name = $name; + + $this->name($name); } + /** + * Get or set column field name + * @param string|null $name + * @return $this|string + */ public function name($name = null) { if (is_null($name)) @@ -23,6 +36,12 @@ public function name($name = null) return $this; } + /** + * Get column value from instance + * @param mixed $instance + * @param string $name + * @return mixed + */ protected function getValue($instance, $name) { $parts = explode('.', $name); diff --git a/src/SleepingOwl/Admin/Columns/Column/Order.php b/src/SleepingOwl/Admin/Columns/Column/Order.php index 8fbe029b..d4afc377 100644 --- a/src/SleepingOwl/Admin/Columns/Column/Order.php +++ b/src/SleepingOwl/Admin/Columns/Column/Order.php @@ -1,12 +1,16 @@ instance->getOrderValue(); } + /** + * Get models total count + * @return int + */ protected function totalCount() { return $this->model()->repository()->query()->count(); } + /** + * Check if instance is movable up + * @return bool + */ protected function movableUp() { return $this->orderValue() > 0; } + /** + * Get instance move up url + * @return Route + */ protected function moveUpUrl() { return route('admin.model.move-up', [ @@ -52,11 +72,19 @@ protected function moveUpUrl() ]); } + /** + * Check if instance is movable down + * @return bool + */ protected function movableDown() { return $this->orderValue() < $this->totalCount() - 1; } + /** + * Get instance move down url + * @return Route + */ protected function moveDownUrl() { return route('admin.model.move-down', [ @@ -65,6 +93,9 @@ protected function moveDownUrl() ]); } + /** + * @return View + */ public function render() { $params = [ @@ -75,4 +106,5 @@ public function render() ]; return view(AdminTemplate::view('column.order'), $params); } + } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Columns/Column/String.php b/src/SleepingOwl/Admin/Columns/Column/String.php index aefa3d02..d04e3e78 100644 --- a/src/SleepingOwl/Admin/Columns/Column/String.php +++ b/src/SleepingOwl/Admin/Columns/Column/String.php @@ -1,10 +1,14 @@ ask('Username:'); @@ -116,6 +117,10 @@ protected function createNewAdministrator() $this->info('Administrator ' . $username . ' was successfully created!'); } + /** + * Get all administrators + * @return array + */ protected function getAdministrators() { $administrators = Administrator::orderBy('id', 'asc')->get(); @@ -127,6 +132,9 @@ protected function getAdministrators() return $result; } + /** + * Render administrators list + */ protected function listAdministrators() { $administrators = $this->getAdministrators(); @@ -136,6 +144,9 @@ protected function listAdministrators() } } + /** + * Delete administrator + */ protected function deleteAdministrator() { $id = $this->selectAdministrator('Select administrator to delete:'); @@ -147,6 +158,9 @@ protected function deleteAdministrator() $this->info('Administrator with id ' . $id . ' was deleted.'); } + /** + * Rename administrator + */ protected function renameAdministrator() { $id = $this->selectAdministrator('Select administrator to rename:'); @@ -161,6 +175,9 @@ protected function renameAdministrator() $this->info('Administrator with id ' . $id . ' was renamed.'); } + /** + * Change administrator's password + */ protected function changePassword() { $id = $this->selectAdministrator('Select administrator to change password:'); @@ -183,7 +200,8 @@ protected function changePassword() } /** - * @return mixed + * Select administrator + * @return int */ protected function selectAdministrator($message) { diff --git a/src/SleepingOwl/Admin/Commands/Compilers/ModelCompiler.php b/src/SleepingOwl/Admin/Commands/Compilers/ModelCompiler.php index b174c88b..35912987 100644 --- a/src/SleepingOwl/Admin/Commands/Compilers/ModelCompiler.php +++ b/src/SleepingOwl/Admin/Commands/Compilers/ModelCompiler.php @@ -12,6 +12,7 @@ class ModelCompiler { + /** * @var Command */ diff --git a/src/SleepingOwl/Admin/Commands/InstallCommand.php b/src/SleepingOwl/Admin/Commands/InstallCommand.php index ee38165c..70a073c7 100644 --- a/src/SleepingOwl/Admin/Commands/InstallCommand.php +++ b/src/SleepingOwl/Admin/Commands/InstallCommand.php @@ -1,18 +1,17 @@ laravel['files']->get(__DIR__ . '/stubs/menu.stub'); @@ -81,9 +80,12 @@ protected function createMenuFile() } } + /** + * Create default bootstrap file + */ protected function createBootstrapFile() { - $file = Config::get('admin.bootstrapDirectory') . '/bootstrap.php'; + $file = config('admin.bootstrapDirectory') . '/bootstrap.php'; if ( ! file_exists($file)) { $contents = $this->laravel['files']->get(__DIR__ . '/stubs/bootstrap.stub'); @@ -92,9 +94,12 @@ protected function createBootstrapFile() } } + /** + * Create default routes file + */ protected function createRoutesFile() { - $file = Config::get('admin.bootstrapDirectory') . '/routes.php'; + $file = config('admin.bootstrapDirectory') . '/routes.php'; if ( ! file_exists($file)) { $contents = $this->laravel['files']->get(__DIR__ . '/stubs/routes.stub'); @@ -104,11 +109,11 @@ protected function createRoutesFile() } /** - * + * Create dummy user file */ protected function createDummyUserFile() { - $file = Config::get('admin.bootstrapDirectory') . '/User.php'; + $file = config('admin.bootstrapDirectory') . '/User.php'; if ( ! file_exists($file)) { $contents = $this->laravel['files']->get(__DIR__ . '/stubs/User.stub'); @@ -118,21 +123,7 @@ protected function createDummyUserFile() } /** - * - */ - protected function publishImagecacheConfig() - { - $file = config_path('imagecache.php'); - if ( ! file_exists($file)) - { - $contents = $this->laravel['files']->get($file); - $contents = str_replace('\'route\' => null,', '\'route\' => \'img/cache\',', $contents); - $this->laravel['files']->put($file, $contents); - } - } - - /** - * + * Create public default structure */ protected function createPublicDefaultStructure() { @@ -144,6 +135,7 @@ protected function createPublicDefaultStructure() } /** + * Publish package config * @param string|null $title */ protected function publishConfig($title = null) diff --git a/src/SleepingOwl/Admin/Commands/ModelCommand.php b/src/SleepingOwl/Admin/Commands/ModelCommand.php index e97fdc21..9f34eb06 100644 --- a/src/SleepingOwl/Admin/Commands/ModelCommand.php +++ b/src/SleepingOwl/Admin/Commands/ModelCommand.php @@ -1,6 +1,5 @@ confirm('File "' . $filename . '" already exist in your admin bootstrap directory. Overwrite?', false); diff --git a/src/SleepingOwl/Admin/Commands/stubs/routes.stub b/src/SleepingOwl/Admin/Commands/stubs/routes.stub index c90f29f4..1b183c52 100644 --- a/src/SleepingOwl/Admin/Commands/stubs/routes.stub +++ b/src/SleepingOwl/Admin/Commands/stubs/routes.stub @@ -1,7 +1,10 @@ 'admin.home', + function () + { + $content = 'Define your dashboard here.'; + return Admin::view($content, 'Dashboard'); + } +]); diff --git a/src/SleepingOwl/Admin/Form/AdminForm.php b/src/SleepingOwl/Admin/Form/AdminForm.php index 0dcd42c5..bbafe0da 100644 --- a/src/SleepingOwl/Admin/Form/AdminForm.php +++ b/src/SleepingOwl/Admin/Form/AdminForm.php @@ -3,12 +3,15 @@ use SleepingOwl\Admin\Base\AliasBinder; /** - * Class AdminForm - * @package SleepingOwl\Admin\Form * @method static \SleepingOwl\Admin\Form\FormDefault form() - * @method static \SleepingOwl\Admin\Form\FormRelated related($field) */ class AdminForm extends AliasBinder { + + /** + * Form class aliases + * @var string[] + */ protected static $aliases = []; + } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Form/FormDefault.php b/src/SleepingOwl/Admin/Form/FormDefault.php index 79958f37..77889e9b 100644 --- a/src/SleepingOwl/Admin/Form/FormDefault.php +++ b/src/SleepingOwl/Admin/Form/FormDefault.php @@ -2,10 +2,13 @@ use AdminTemplate; use Illuminate\Contracts\Support\Renderable; +use Illuminate\View\View; use Input; use SleepingOwl\Admin\Admin; use SleepingOwl\Admin\Interfaces\DisplayInterface; use SleepingOwl\Admin\Interfaces\FormInterface; +use SleepingOwl\Admin\Interfaces\FormItemInterface; +use SleepingOwl\Admin\Model\ModelConfiguration; use SleepingOwl\Admin\Repository\BaseRepository; use URL; use Validator; @@ -13,14 +16,62 @@ class FormDefault implements Renderable, DisplayInterface, FormInterface { + /** + * Form related class + * @var string + */ protected $class; + /** + * Form related repository + * @var BaseRepository + */ protected $repository; + /** + * Form items + * @var FormItemInterface[] + */ protected $items = []; + /** + * Form action url + * @var string + */ protected $action; + /** + * Form related model instance + * @var mixed + */ protected $instance; + /** + * Currently loaded model id + * @var int + */ protected $id; + /** + * Is form already initialized? + * @var bool + */ protected $initialized = false; + /** + * Initialize form + */ + public function initialize() + { + if ($this->initialized) return; + + $this->initialized = true; + $this->repository = new BaseRepository($this->class); + $this->instance(app($this->class)); + foreach ($this->items() as $item) + { + $item->initialize(); + } + } + + /** + * Set form action + * @param string $action + */ public function setAction($action) { if (is_null($this->action)) @@ -29,6 +80,10 @@ public function setAction($action) } } + /** + * Set form class + * @param string $class + */ public function setClass($class) { if (is_null($this->class)) @@ -37,19 +92,11 @@ public function setClass($class) } } - public function initialize() - { - if ($this->initialized) return; - - $this->initialized = true; - $this->repository = new BaseRepository($this->class); - $this->instance(app($this->class)); - foreach ($this->items() as $item) - { - $item->initialize(); - } - } - + /** + * Get or set form items + * @param FormInterface[]|null $items + * @return $this|FormInterface[] + */ public function items($items = null) { if (is_null($items)) @@ -60,6 +107,11 @@ public function items($items = null) return $this; } + /** + * Get or set form related model instance + * @param mixed|null $instance + * @return $this|mixed + */ public function instance($instance = null) { if (is_null($instance)) @@ -74,6 +126,10 @@ public function instance($instance = null) return $this; } + /** + * Set currently loaded model id + * @param int $id + */ public function setId($id) { if (is_null($this->id)) @@ -83,11 +139,19 @@ public function setId($id) } } + /** + * Get related form model configuration + * @return ModelConfiguration + */ public function model() { return Admin::model($this->class); } + /** + * Save instance + * @param $model + */ public function save($model) { if ($this->model() != $model) @@ -102,6 +166,11 @@ public function save($model) $this->instance()->save(); } + /** + * Validate data, returns null on success + * @param mixed $model + * @return Validator|null + */ public function validate($model) { if ($this->model() != $model) @@ -123,6 +192,9 @@ public function validate($model) return null; } + /** + * @return View + */ public function render() { $params = [ @@ -134,8 +206,12 @@ public function render() return view(AdminTemplate::view('form.default'), $params); } + /** + * @return string + */ function __toString() { return (string)$this->render(); } + } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Interfaces/ColumnInterface.php b/src/SleepingOwl/Admin/Interfaces/ColumnInterface.php index 586fba2a..f1788aaa 100644 --- a/src/SleepingOwl/Admin/Interfaces/ColumnInterface.php +++ b/src/SleepingOwl/Admin/Interfaces/ColumnInterface.php @@ -3,7 +3,15 @@ interface ColumnInterface { + /** + * Initialize column + */ public function initialize(); + + /** + * Set currently rendered instance + * @param mixed $instance + */ public function setInstance($instance); } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Interfaces/DisplayInterface.php b/src/SleepingOwl/Admin/Interfaces/DisplayInterface.php index 3c5b851d..0b02ea9a 100644 --- a/src/SleepingOwl/Admin/Interfaces/DisplayInterface.php +++ b/src/SleepingOwl/Admin/Interfaces/DisplayInterface.php @@ -3,7 +3,15 @@ interface DisplayInterface { + /** + * Initialize display + */ public function initialize(); + + /** + * Set display class + * @param string $class + */ public function setClass($class); } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Interfaces/FilterInterface.php b/src/SleepingOwl/Admin/Interfaces/FilterInterface.php index cadebbfd..2a748712 100644 --- a/src/SleepingOwl/Admin/Interfaces/FilterInterface.php +++ b/src/SleepingOwl/Admin/Interfaces/FilterInterface.php @@ -3,8 +3,20 @@ interface FilterInterface { + /** + * Initialize filter + */ public function initialize(); + + /** + * Is filter active? + */ public function isActive(); + + /** + * Apply filter to the query + * @param $query + */ public function apply($query); } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Interfaces/FormInterface.php b/src/SleepingOwl/Admin/Interfaces/FormInterface.php index 1b467b8c..46d0d032 100644 --- a/src/SleepingOwl/Admin/Interfaces/FormInterface.php +++ b/src/SleepingOwl/Admin/Interfaces/FormInterface.php @@ -3,9 +3,28 @@ interface FormInterface { + /** + * Set form action url + * @param string $action + */ public function setAction($action); + + /** + * Set form model instance id + * @param int $id + */ public function setId($id); + + /** + * Validate model + * @param mixed $model + */ public function validate($model); + + /** + * Save model + * @param mixed $model + */ public function save($model); } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Interfaces/FormItemInterface.php b/src/SleepingOwl/Admin/Interfaces/FormItemInterface.php index 191f8cd8..324f6b95 100644 --- a/src/SleepingOwl/Admin/Interfaces/FormItemInterface.php +++ b/src/SleepingOwl/Admin/Interfaces/FormItemInterface.php @@ -3,9 +3,26 @@ interface FormItemInterface { + /** + * Initialize form item + */ public function initialize(); + + /** + * Set currently rendered instance + * @param mixed $instance + */ public function setInstance($instance); + + /** + * Get form item validation rules + * @return mixed + */ public function getValidationRules(); + + /** + * Save form item + */ public function save(); } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Interfaces/TemplateInterface.php b/src/SleepingOwl/Admin/Interfaces/TemplateInterface.php index b2905dcf..a9142793 100644 --- a/src/SleepingOwl/Admin/Interfaces/TemplateInterface.php +++ b/src/SleepingOwl/Admin/Interfaces/TemplateInterface.php @@ -3,6 +3,11 @@ interface TemplateInterface { + /** + * Get full view name + * @param string $view + * @return string + */ public function view($view); } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Interfaces/WithRoutesInterface.php b/src/SleepingOwl/Admin/Interfaces/WithRoutesInterface.php index 639e3290..b5d0feb9 100644 --- a/src/SleepingOwl/Admin/Interfaces/WithRoutesInterface.php +++ b/src/SleepingOwl/Admin/Interfaces/WithRoutesInterface.php @@ -3,6 +3,9 @@ interface WithRoutesInterface { + /** + * Register router + */ public static function registerRoutes(); } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Menu/MenuItem.php b/src/SleepingOwl/Admin/Menu/MenuItem.php index c54b96b5..633b4e5a 100644 --- a/src/SleepingOwl/Admin/Menu/MenuItem.php +++ b/src/SleepingOwl/Admin/Menu/MenuItem.php @@ -1,33 +1,50 @@ modelClass); } + /** + * Get or set menu item label + * @param string|null $label + * @return $this|string + */ public function label($label = null) { if (is_null($label)) @@ -62,6 +88,11 @@ public function label($label = null) return $this; } + /** + * Get or set menu item icon + * @param string|null $icon + * @return $this|string + */ public function icon($icon = null) { if (is_null($icon)) @@ -72,6 +103,11 @@ public function icon($icon = null) return $this; } + /** + * Get or set menu item subitems + * @param Closure|null $callback + * @return $this|MenuItem[] + */ public function items($callback = null) { if (is_null($callback)) @@ -85,12 +121,22 @@ public function items($callback = null) return $this; } + /** + * Add subitem + * @param MenuItem $item + * @return $this + */ public function addItem($item) { $this->subItems[] = $item; return $this; } + /** + * Get or set menu item depth level + * @param int|null $level + * @return $this|int + */ public function level($level = null) { if (is_null($level)) @@ -101,6 +147,11 @@ public function level($level = null) return $this; } + /** + * Get or set menu item url + * @param string|null $url + * @return $this|string + */ public function url($url = null) { if (is_null($url)) @@ -123,6 +174,9 @@ public function url($url = null) return $this; } + /** + * @return View + */ public function render() { $params = [ @@ -135,6 +189,9 @@ public function render() return view(AdminTemplate::view('_partials.menu_item'), $params); } + /** + * @return string + */ function __toString() { return (string)$this->render(); diff --git a/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php b/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php index 1d00acd5..0cfb1b11 100644 --- a/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php +++ b/src/SleepingOwl/Admin/Providers/ColumnServiceProvider.php @@ -8,19 +8,19 @@ class ColumnServiceProvider extends ServiceProvider public function register() { - Column::register('string', 'SleepingOwl\Admin\Columns\Column\String'); - Column::register('count', 'SleepingOwl\Admin\Columns\Column\Count'); - Column::register('lists', 'SleepingOwl\Admin\Columns\Column\Lists'); Column::register('action', 'SleepingOwl\Admin\Columns\Column\Action'); Column::register('checkbox', 'SleepingOwl\Admin\Columns\Column\Checkbox'); - Column::register('filter', 'SleepingOwl\Admin\Columns\Column\Filter'); - Column::register('url', 'SleepingOwl\Admin\Columns\Column\Url'); + Column::register('control', 'SleepingOwl\Admin\Columns\Column\Control'); + Column::register('count', 'SleepingOwl\Admin\Columns\Column\Count'); Column::register('custom', 'SleepingOwl\Admin\Columns\Column\Custom'); Column::register('datetime', 'SleepingOwl\Admin\Columns\Column\DateTime'); - Column::register('control', 'SleepingOwl\Admin\Columns\Column\Control'); - Column::register('treeControl', 'SleepingOwl\Admin\Columns\Column\TreeControl'); - Column::register('order', 'SleepingOwl\Admin\Columns\Column\Order'); + Column::register('filter', 'SleepingOwl\Admin\Columns\Column\Filter'); Column::register('image', 'SleepingOwl\Admin\Columns\Column\Image'); + Column::register('lists', 'SleepingOwl\Admin\Columns\Column\Lists'); + Column::register('order', 'SleepingOwl\Admin\Columns\Column\Order'); + Column::register('string', 'SleepingOwl\Admin\Columns\Column\String'); + Column::register('treeControl', 'SleepingOwl\Admin\Columns\Column\TreeControl'); + Column::register('url', 'SleepingOwl\Admin\Columns\Column\Url'); } } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Providers/FormServiceProvider.php b/src/SleepingOwl/Admin/Providers/FormServiceProvider.php index e182f616..9561bb24 100644 --- a/src/SleepingOwl/Admin/Providers/FormServiceProvider.php +++ b/src/SleepingOwl/Admin/Providers/FormServiceProvider.php @@ -9,7 +9,6 @@ class FormServiceProvider extends ServiceProvider public function register() { AdminForm::register('form', 'SleepingOwl\Admin\Form\FormDefault'); - AdminForm::register('related', 'SleepingOwl\Admin\Form\FormRelated'); } } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Repository/BaseRepository.php b/src/SleepingOwl/Admin/Repository/BaseRepository.php index 20f22727..f25c655a 100644 --- a/src/SleepingOwl/Admin/Repository/BaseRepository.php +++ b/src/SleepingOwl/Admin/Repository/BaseRepository.php @@ -8,17 +8,36 @@ class BaseRepository { + /** + * Repository related class name + * @var string + */ protected $class; + /** + * Repository related model instance + * @var mixed + */ protected $model; - + /** + * Eager loading relations + * @var string[] + */ protected $with = []; + /** + * @param string $class + */ function __construct($class) { $this->class = $class; $this->model(app($this->class)); } + /** + * Get or set eager loading relations + * @param string|string[]|null $with + * @return $this|string[] + */ public function with($with = null) { if (is_null($with)) @@ -33,6 +52,10 @@ public function with($with = null) return $this; } + /** + * Get base query + * @return mixed + */ public function query() { $query = $this->model->query(); @@ -40,11 +63,21 @@ public function query() return $query; } + /** + * Find model instance by id + * @param int $id + * @return mixed + */ public function find($id) { return $this->model->find($id); } + /** + * Find model instances by ids + * @param int[] $ids + * @return mixed + */ public function findMany($ids) { $query = $this->model->query(); @@ -55,16 +88,29 @@ public function findMany($ids) return $query->whereIn($this->model->getKeyName(), $ids)->get(); } + /** + * Delete model instance by id + * @param int $id + */ public function delete($id) { $this->find($id)->delete(); } + /** + * Restore model instance by id + * @param int $id + */ public function restore($id) { $this->query()->onlyTrashed()->find($id)->restore(); } + /** + * Get or set repository related model intance + * @param mixed|null $model + * @return $this|mixed + */ public function model($model = null) { if (is_null($model)) @@ -75,6 +121,11 @@ public function model($model = null) return $this; } + /** + * Check if model's table has column + * @param string $column + * @return bool + */ public function hasColumn($column) { $table = $this->model->getTable(); diff --git a/src/SleepingOwl/Admin/Repository/TreeRepository.php b/src/SleepingOwl/Admin/Repository/TreeRepository.php index b6f53f23..167e569b 100644 --- a/src/SleepingOwl/Admin/Repository/TreeRepository.php +++ b/src/SleepingOwl/Admin/Repository/TreeRepository.php @@ -5,15 +5,45 @@ class TreeRepository extends BaseRepository { + /** + * Extrepat/Baum tree type + * https://github.com/etrepat/baum + */ const TreeTypeBaum = 0; + /** + * Lasychaser/Laravel-nestedset tree type + * https://github.com/lazychaser/laravel-nestedset + */ const TreeTypeKalnoy = 1; + /** + * Simple tree type (with `parent_id` and `order` fields) + */ const TreeTypeSimple = 2; + /** + * Tree type + * @var int + */ protected $type; + /** + * Parent field name + * @var string + */ protected $parentField = 'parent_id'; + /** + * Order field name + * @var string + */ protected $orderField = 'order'; + /** + * Root parent id value + * @var null + */ protected $rootParentId = null; + /** + * @param string $class + */ function __construct($class) { parent::__construct($class); @@ -21,6 +51,10 @@ function __construct($class) $this->detectType(); } + /** + * Detect tree type + * @return $this + */ protected function detectType() { if ($this->model() instanceof \Baum\Node) @@ -34,6 +68,10 @@ protected function detectType() return $this->type(static::TreeTypeSimple); } + /** + * Get tree structure + * @return mixed + */ public function tree() { $collection = $this->query()->get(); @@ -49,8 +87,13 @@ public function tree() return $this->createSimpleTree(); break; } + return null; } + /** + * Reorder tree by $data value + * @param $data + */ public function reorder($data) { if ($this->type() == static::TreeTypeSimple) @@ -66,6 +109,11 @@ public function reorder($data) } } + /** + * Recursive reoder simple tree type + * @param $data + * @param $parentId + */ protected function recursiveReorderSimple($data, $parentId) { foreach ($data as $order => $item) @@ -84,6 +132,13 @@ protected function recursiveReorderSimple($data, $parentId) } } + /** + * Recursive reorder nested-set tree type + * @param $root + * @param $parentId + * @param $left + * @return mixed + */ protected function recursiveReorder($root, $parentId, $left) { $right = $left + 1; @@ -97,6 +152,13 @@ protected function recursiveReorder($root, $parentId, $left) return $left; } + /** + * Move tree node in nested-set tree type + * @param $id + * @param $parentId + * @param $left + * @param $right + */ public function move($id, $parentId, $left, $right) { $instance = $this->find($id); @@ -108,6 +170,12 @@ public function move($id, $parentId, $left, $right) $instance->save(); } + /** + * Get left column name + * @param $instance + * @return mixed + * @throws \Exception + */ public function getLeftColumn($instance) { $methods = [ @@ -117,6 +185,12 @@ public function getLeftColumn($instance) return $this->callMethods($instance, $methods); } + /** + * Get right column name + * @param $instance + * @return mixed + * @throws \Exception + */ public function getRightColumn($instance) { $methods = [ @@ -126,6 +200,12 @@ public function getRightColumn($instance) return $this->callMethods($instance, $methods); } + /** + * Get parent column name + * @param $instance + * @return mixed + * @throws \Exception + */ public function getParentColumn($instance) { $methods = [ @@ -135,6 +215,13 @@ public function getParentColumn($instance) return $this->callMethods($instance, $methods); } + /** + * Call several methods and get first result + * @param $instance + * @param $methods + * @return mixed + * @throws \Exception + */ protected function callMethods($instance, $methods) { foreach ($methods as $method) @@ -147,6 +234,11 @@ protected function callMethods($instance, $methods) throw new \Exception('Tree type not supported'); } + /** + * Get or set parent field name + * @param string|null $parentField + * @return $this|string + */ public function parentField($parentField = null) { if (is_null($parentField)) @@ -157,6 +249,11 @@ public function parentField($parentField = null) return $this; } + /** + * Get or set order field name + * @param string|null $orderField + * @return $this|string + */ public function orderField($orderField = null) { if (is_null($orderField)) @@ -167,6 +264,10 @@ public function orderField($orderField = null) return $this; } + /** + * Create simple tree type structure + * @return static + */ protected function createSimpleTree() { $collection = $this->query()->orderBy($this->parentField(), 'asc')->orderBy($this->orderField(), 'asc')->get(); @@ -175,6 +276,12 @@ protected function createSimpleTree() return $this->getChildren($collection, $parent); } + /** + * Get children for simple tree type structure + * @param $collection + * @param $id + * @return static + */ protected function getChildren($collection, $id) { $parentField = $this->parentField(); @@ -189,6 +296,11 @@ protected function getChildren($collection, $id) return Collection::make($result); } + /** + * Get or set tree type + * @param int|null $type + * @return $this|int + */ public function type($type = null) { if (is_null($type)) @@ -199,6 +311,11 @@ public function type($type = null) return $this; } + /** + * Get or set parent field name + * @param string|null $rootParentId + * @return $this|string + */ public function rootParentId($rootParentId = null) { if (func_num_args() == 0) diff --git a/src/SleepingOwl/Admin/Templates/Facade/AdminTemplate.php b/src/SleepingOwl/Admin/Templates/Facade/AdminTemplate.php index 3f95200c..093bbd72 100644 --- a/src/SleepingOwl/Admin/Templates/Facade/AdminTemplate.php +++ b/src/SleepingOwl/Admin/Templates/Facade/AdminTemplate.php @@ -5,6 +5,9 @@ class AdminTemplate extends Facade { + /** + * @return string + */ protected static function getFacadeAccessor() { return 'adminTemplate'; diff --git a/src/SleepingOwl/Admin/Templates/TemplateDefault.php b/src/SleepingOwl/Admin/Templates/TemplateDefault.php index 314faf66..ce2f3ce7 100644 --- a/src/SleepingOwl/Admin/Templates/TemplateDefault.php +++ b/src/SleepingOwl/Admin/Templates/TemplateDefault.php @@ -6,6 +6,9 @@ class TemplateDefault implements TemplateInterface { + /** + * + */ function __construct() { AssetManager::addStyle('admin::default/css/bootstrap.min.css'); @@ -20,6 +23,11 @@ function __construct() AssetManager::addScript('admin::default/js/admin-default.js'); } + /** + * Get full view name + * @param string $view + * @return string + */ public function view($view) { return 'admin::default.' . $view; diff --git a/src/SleepingOwl/Admin/Traits/OrderableModel.php b/src/SleepingOwl/Admin/Traits/OrderableModel.php index 6793176d..e13ca79a 100644 --- a/src/SleepingOwl/Admin/Traits/OrderableModel.php +++ b/src/SleepingOwl/Admin/Traits/OrderableModel.php @@ -4,6 +4,10 @@ trait OrderableModel { + + /** + * Boot trait + */ protected static function bootOrderableModel() { static::creating(function ($row) @@ -17,22 +21,33 @@ protected static function bootOrderableModel() }); } + /** + * Get order value + * @return int + */ public function getOrderValue() { return $this->{$this->getOrderField()}; } + /** + * Move model up + */ public function moveUp() { $this->move(1); } + /** + * Move model down + */ public function moveDown() { $this->move(-1); } /** + * Move model in the $destination * @param $destination -1 (move down) or 1 (move up) */ protected function move($destination) @@ -45,21 +60,36 @@ protected function move($destination) $this->save(); } + /** + * Update order field on create + */ protected function updateOrderFieldOnCreate() { $this->{$this->getOrderField()} = static::orderModel()->count(); } + /** + * Update order field on delete + */ protected function updateOrderFieldOnDelete() { static::orderModel()->where($this->getOrderField(), '>', $this->getOrderValue())->update([$this->getOrderField() => DB::raw($this->getOrderField() . ' - 1')]); } + /** + * Order scope + * @param $query + * @return mixed + */ public function scopeOrderModel($query) { return $query; } + /** + * Get order field name + * @return string + */ public function getOrderField() { return 'order'; From b64bab6180bc101e1b4cfdebc4a3db73ee29e46a Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Thu, 30 Apr 2015 18:36:15 +0400 Subject: [PATCH 054/108] Validation connection fix --- src/SleepingOwl/Admin/Form/FormDefault.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SleepingOwl/Admin/Form/FormDefault.php b/src/SleepingOwl/Admin/Form/FormDefault.php index 77889e9b..1f1d9181 100644 --- a/src/SleepingOwl/Admin/Form/FormDefault.php +++ b/src/SleepingOwl/Admin/Form/FormDefault.php @@ -184,7 +184,10 @@ public function validate($model) $rules += $item->getValidationRules(); } $data = Input::all(); + $verifier = app('validation.presence'); + $verifier->setConnection($this->instance()->getConnectionName()); $validator = Validator::make($data, $rules); + $validator->setPresenceVerifier($verifier); if ($validator->fails()) { return $validator; From 307b78865c89914f10c344c096b1a5c627876753 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Thu, 30 Apr 2015 23:18:41 +0400 Subject: [PATCH 055/108] Sortable images --- public/default/css/formitems/image/images.css | 3 + .../js/formitems/image/Sortable.min.js | 2 + .../js/formitems/image/initMultiple.js | 10 +++- .../image/sortable.jquery.binding.js | 57 +++++++++++++++++++ src/SleepingOwl/Admin/FormItems/Images.php | 3 + src/views/default/formitem/images.blade.php | 2 +- 6 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 public/default/css/formitems/image/images.css create mode 100755 public/default/js/formitems/image/Sortable.min.js create mode 100755 public/default/js/formitems/image/sortable.jquery.binding.js diff --git a/public/default/css/formitems/image/images.css b/public/default/css/formitems/image/images.css new file mode 100644 index 00000000..24c7a4e7 --- /dev/null +++ b/public/default/css/formitems/image/images.css @@ -0,0 +1,3 @@ +.images-group .imageThumbnail { + cursor: move; +} \ No newline at end of file diff --git a/public/default/js/formitems/image/Sortable.min.js b/public/default/js/formitems/image/Sortable.min.js new file mode 100755 index 00000000..6b3c9428 --- /dev/null +++ b/public/default/js/formitems/image/Sortable.min.js @@ -0,0 +1,2 @@ +/*! Sortable 1.2.0 - MIT | git://github.com/rubaxa/Sortable.git */ +!function(a){"use strict";"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a():"undefined"!=typeof Package?Sortable=a():window.Sortable=a()}(function(){"use strict";function a(a,b){this.el=a,this.options=b=q({},b),a[H]=this;var d={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(a.nodeName)?"li":">*",ghostClass:"sortable-ghost",ignore:"a, img",filter:null,animation:0,setData:function(a,b){a.setData("Text",b.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0};for(var e in d)!(e in b)&&(b[e]=d[e]);var g=b.group;g&&"object"==typeof g||(g=b.group={name:g}),["pull","put"].forEach(function(a){a in g||(g[a]=!0)}),b.groups=" "+g.name+(g.put.join?" "+g.put.join(" "):"")+" ";for(var h in this)"_"===h.charAt(0)&&(this[h]=c(this,this[h]));f(a,"mousedown",this._onTapStart),f(a,"touchstart",this._onTapStart),f(a,"dragover",this),f(a,"dragenter",this),Q.push(this._onDragOver),b.store&&this.sort(b.store.get(this))}function b(a){t&&t.state!==a&&(i(t,"display",a?"none":""),!a&&t.state&&u.insertBefore(t,r),t.state=a)}function c(a,b){var c=P.call(arguments,2);return b.bind?b.bind.apply(b,[a].concat(c)):function(){return b.apply(a,c.concat(P.call(arguments)))}}function d(a,b,c){if(a){c=c||J,b=b.split(".");var d=b.shift().toUpperCase(),e=new RegExp("\\s("+b.join("|")+")\\s","g");do if(">*"===d&&a.parentNode===c||(""===d||a.nodeName.toUpperCase()==d)&&(!b.length||((" "+a.className+" ").match(e)||[]).length==b.length))return a;while(a!==c&&(a=a.parentNode))}return null}function e(a){a.dataTransfer.dropEffect="move",a.preventDefault()}function f(a,b,c){a.addEventListener(b,c,!1)}function g(a,b,c){a.removeEventListener(b,c,!1)}function h(a,b,c){if(a)if(a.classList)a.classList[c?"add":"remove"](b);else{var d=(" "+a.className+" ").replace(G," ").replace(" "+b+" "," ");a.className=(d+(c?" "+b:"")).replace(G," ")}}function i(a,b,c){var d=a&&a.style;if(d){if(void 0===c)return J.defaultView&&J.defaultView.getComputedStyle?c=J.defaultView.getComputedStyle(a,""):a.currentStyle&&(c=a.currentStyle),void 0===b?c:c[b];b in d||(b="-webkit-"+b),d[b]=c+("string"==typeof c?"":"px")}}function j(a,b,c){if(a){var d=a.getElementsByTagName(b),e=0,f=d.length;if(c)for(;f>e;e++)c(d[e],e);return d}return[]}function k(a){a.draggable=!1}function l(){M=!1}function m(a,b){var c=a.lastElementChild,d=c.getBoundingClientRect();return b.clientY-(d.top+d.height)>5&&c}function n(a){for(var b=a.tagName+a.className+a.src+a.href+a.textContent,c=b.length,d=0;c--;)d+=b.charCodeAt(c);return d.toString(36)}function o(a){for(var b=0;a&&(a=a.previousElementSibling);)"TEMPLATE"!==a.nodeName.toUpperCase()&&b++;return b}function p(a,b){var c,d;return function(){void 0===c&&(c=arguments,d=this,setTimeout(function(){1===c.length?a.call(d,c[0]):a.apply(d,c),c=void 0},b))}}function q(a,b){if(a&&b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var r,s,t,u,v,w,x,y,z,A,B,C,D,E,F={},G=/\s+/g,H="Sortable"+(new Date).getTime(),I=window,J=I.document,K=I.parseInt,L=!!("draggable"in J.createElement("div")),M=!1,N=function(a,b,c,d,e,f,g){var h=J.createEvent("Event"),i=(a||b[H]).options,j="on"+c.charAt(0).toUpperCase()+c.substr(1);h.initEvent(c,!0,!0),h.item=d||b,h.from=e||b,h.clone=t,h.oldIndex=f,h.newIndex=g,i[j]&&i[j].call(a,h),b.dispatchEvent(h)},O=Math.abs,P=[].slice,Q=[],R=p(function(a,b,c){if(c&&b.scroll){var d,e,f,g,h=b.scrollSensitivity,i=b.scrollSpeed,j=a.clientX,k=a.clientY,l=window.innerWidth,m=window.innerHeight;if(x!==c&&(w=b.scroll,x=c,w===!0)){w=c;do if(w.offsetWidth=l-j)-(h>=j),g=(h>=m-k)-(h>=k),(f||g)&&(d=I)),(F.vx!==f||F.vy!==g||F.el!==d)&&(F.el=d,F.vx=f,F.vy=g,clearInterval(F.pid),d&&(F.pid=setInterval(function(){d===I?I.scrollTo(I.pageXOffset+f*i,I.pageYOffset+g*i):(g&&(d.scrollTop+=g*i),f&&(d.scrollLeft+=f*i))},24)))}},30);return a.prototype={constructor:a,_onTapStart:function(a){var b=this,c=this.el,e=this.options,f=a.type,g=a.touches&&a.touches[0],h=(g||a).target,i=h,j=e.filter;if(!("mousedown"===f&&0!==a.button||e.disabled)&&(h=d(h,e.draggable,c))){if(A=o(h),"function"==typeof j){if(j.call(this,a,h,this))return N(b,i,"filter",h,c,A),void a.preventDefault()}else if(j&&(j=j.split(",").some(function(a){return a=d(i,a.trim(),c),a?(N(b,a,"filter",h,c,A),!0):void 0})))return void a.preventDefault();(!e.handle||d(i,e.handle,c))&&this._prepareDragStart(a,g,h)}},_prepareDragStart:function(a,b,c){var d,e=this,g=e.el,h=e.options,i=g.ownerDocument;c&&!r&&c.parentNode===g&&(D=a,u=g,r=c,v=r.nextSibling,C=h.group,d=function(){e._disableDelayedDrag(),r.draggable=!0,h.ignore.split(",").forEach(function(a){j(r,a.trim(),k)}),e._triggerDragStart(b)},f(i,"mouseup",e._onDrop),f(i,"touchend",e._onDrop),f(i,"touchcancel",e._onDrop),h.delay?(f(i,"mousemove",e._disableDelayedDrag),f(i,"touchmove",e._disableDelayedDrag),e._dragStartTimer=setTimeout(d,h.delay)):d())},_disableDelayedDrag:function(){var a=this.el.ownerDocument;clearTimeout(this._dragStartTimer),g(a,"mousemove",this._disableDelayedDrag),g(a,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(a){a?(D={target:r,clientX:a.clientX,clientY:a.clientY},this._onDragStart(D,"touch")):L?(f(r,"dragend",this),f(u,"dragstart",this._onDragStart)):this._onDragStart(D,!0);try{J.selection?J.selection.empty():window.getSelection().removeAllRanges()}catch(b){}},_dragStarted:function(){u&&r&&(h(r,this.options.ghostClass,!0),a.active=this,N(this,u,"start",r,u,A))},_emulateDragOver:function(){if(E){i(s,"display","none");var a=J.elementFromPoint(E.clientX,E.clientY),b=a,c=" "+this.options.group.name,d=Q.length;if(b)do{if(b[H]&&b[H].options.groups.indexOf(c)>-1){for(;d--;)Q[d]({clientX:E.clientX,clientY:E.clientY,target:a,rootEl:b});break}a=b}while(b=b.parentNode);i(s,"display","")}},_onTouchMove:function(a){if(D){var b=a.touches?a.touches[0]:a,c=b.clientX-D.clientX,d=b.clientY-D.clientY,e=a.touches?"translate3d("+c+"px,"+d+"px,0)":"translate("+c+"px,"+d+"px)";E=b,i(s,"webkitTransform",e),i(s,"mozTransform",e),i(s,"msTransform",e),i(s,"transform",e),a.preventDefault()}},_onDragStart:function(a,b){var c=a.dataTransfer,d=this.options;if(this._offUpEvents(),"clone"==C.pull&&(t=r.cloneNode(!0),i(t,"display","none"),u.insertBefore(t,r)),b){var e,g=r.getBoundingClientRect(),h=i(r);s=r.cloneNode(!0),i(s,"top",g.top-K(h.marginTop,10)),i(s,"left",g.left-K(h.marginLeft,10)),i(s,"width",g.width),i(s,"height",g.height),i(s,"opacity","0.8"),i(s,"position","fixed"),i(s,"zIndex","100000"),u.appendChild(s),e=s.getBoundingClientRect(),i(s,"width",2*g.width-e.width),i(s,"height",2*g.height-e.height),"touch"===b?(f(J,"touchmove",this._onTouchMove),f(J,"touchend",this._onDrop),f(J,"touchcancel",this._onDrop)):(f(J,"mousemove",this._onTouchMove),f(J,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,150)}else c&&(c.effectAllowed="move",d.setData&&d.setData.call(this,c,r)),f(J,"drop",this);setTimeout(this._dragStarted,0)},_onDragOver:function(a){var c,e,f,g=this.el,h=this.options,j=h.group,k=j.put,n=C===j,o=h.sort;if(void 0!==a.preventDefault&&(a.preventDefault(),!h.dragoverBubble&&a.stopPropagation()),C&&!h.disabled&&(n?o||(f=!u.contains(r)):C.pull&&k&&(C.name===j.name||k.indexOf&&~k.indexOf(C.name)))&&(void 0===a.rootEl||a.rootEl===this.el)){if(R(a,h,this.el),M)return;if(c=d(a.target,h.draggable,g),e=r.getBoundingClientRect(),f)return b(!0),void(t||v?u.insertBefore(r,t||v):o||u.appendChild(r));if(0===g.children.length||g.children[0]===s||g===a.target&&(c=m(g,a))){if(c){if(c.animated)return;q=c.getBoundingClientRect()}b(n),g.appendChild(r),this._animate(e,r),c&&this._animate(q,c)}else if(c&&!c.animated&&c!==r&&void 0!==c.parentNode[H]){y!==c&&(y=c,z=i(c));var p,q=c.getBoundingClientRect(),w=q.right-q.left,x=q.bottom-q.top,A=/left|right|inline/.test(z.cssFloat+z.display),B=c.offsetWidth>r.offsetWidth,D=c.offsetHeight>r.offsetHeight,E=(A?(a.clientX-q.left)/w:(a.clientY-q.top)/x)>.5,F=c.nextElementSibling;M=!0,setTimeout(l,30),b(n),p=A?c.previousElementSibling===r&&!B||E&&B:F!==r&&!D||E&&D,p&&!F?g.appendChild(r):c.parentNode.insertBefore(r,p?F:c),this._animate(e,r),this._animate(q,c)}}},_animate:function(a,b){var c=this.options.animation;if(c){var d=b.getBoundingClientRect();i(b,"transition","none"),i(b,"transform","translate3d("+(a.left-d.left)+"px,"+(a.top-d.top)+"px,0)"),b.offsetWidth,i(b,"transition","all "+c+"ms"),i(b,"transform","translate3d(0,0,0)"),clearTimeout(b.animated),b.animated=setTimeout(function(){i(b,"transition",""),i(b,"transform",""),b.animated=!1},c)}},_offUpEvents:function(){var a=this.el.ownerDocument;g(J,"touchmove",this._onTouchMove),g(a,"mouseup",this._onDrop),g(a,"touchend",this._onDrop),g(a,"touchcancel",this._onDrop)},_onDrop:function(b){var c=this.el,d=this.options;clearInterval(this._loopId),clearInterval(F.pid),clearTimeout(this.dragStartTimer),g(J,"drop",this),g(J,"mousemove",this._onTouchMove),g(c,"dragstart",this._onDragStart),this._offUpEvents(),b&&(b.preventDefault(),!d.dropBubble&&b.stopPropagation(),s&&s.parentNode.removeChild(s),r&&(g(r,"dragend",this),k(r),h(r,this.options.ghostClass,!1),u!==r.parentNode?(B=o(r),N(null,r.parentNode,"sort",r,u,A,B),N(this,u,"sort",r,u,A,B),N(null,r.parentNode,"add",r,u,A,B),N(this,u,"remove",r,u,A,B)):(t&&t.parentNode.removeChild(t),r.nextSibling!==v&&(B=o(r),N(this,u,"update",r,u,A,B),N(this,u,"sort",r,u,A,B))),a.active&&N(this,u,"end",r,u,A,B)),u=r=s=v=t=w=x=D=E=y=z=C=a.active=null,this.save())},handleEvent:function(a){var b=a.type;"dragover"===b||"dragenter"===b?r&&(this._onDragOver(a),e(a)):("drop"===b||"dragend"===b)&&this._onDrop(a)},toArray:function(){for(var a,b=[],c=this.el.children,e=0,f=c.length,g=this.options;f>e;e++)a=c[e],d(a,g.draggable,this.el)&&b.push(a.getAttribute(g.dataIdAttr)||n(a));return b},sort:function(a){var b={},c=this.el;this.toArray().forEach(function(a,e){var f=c.children[e];d(f,this.options.draggable,c)&&(b[a]=f)},this),a.forEach(function(a){b[a]&&(c.removeChild(b[a]),c.appendChild(b[a]))})},save:function(){var a=this.options.store;a&&a.set(this)},closest:function(a,b){return d(a,b||this.options.draggable,this.el)},option:function(a,b){var c=this.options;return void 0===b?c[a]:void(c[a]=b)},destroy:function(){var a=this.el;a[H]=null,g(a,"mousedown",this._onTapStart),g(a,"touchstart",this._onTapStart),g(a,"dragover",this),g(a,"dragenter",this),Array.prototype.forEach.call(a.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),Q.splice(Q.indexOf(this._onDragOver),1),this._onDrop(),this.el=a=null}},a.utils={on:f,off:g,css:i,find:j,bind:c,is:function(a,b){return!!d(a,b,a)},extend:q,throttle:p,closest:d,toggleClass:h,index:o},a.version="1.2.0",a.create=function(b,c){return new a(b,c)},a}); \ No newline at end of file diff --git a/public/default/js/formitems/image/initMultiple.js b/public/default/js/formitems/image/initMultiple.js index 24400c70..6e978896 100644 --- a/public/default/js/formitems/image/initMultiple.js +++ b/public/default/js/formitems/image/initMultiple.js @@ -36,7 +36,7 @@ $(function () var result = $.parseJSON(message); - $innerGroup.append('
      ' + + $innerGroup.append('
      ' + '' + 'Remove
      '); updateValue(); @@ -59,5 +59,13 @@ $(function () $(this).closest('.imageThumbnail').remove(); updateValue(); }); + + $innerGroup.sortable({ + onUpdate: function () + { + updateValue(); + } + }); + }); }); \ No newline at end of file diff --git a/public/default/js/formitems/image/sortable.jquery.binding.js b/public/default/js/formitems/image/sortable.jquery.binding.js new file mode 100755 index 00000000..16d7729b --- /dev/null +++ b/public/default/js/formitems/image/sortable.jquery.binding.js @@ -0,0 +1,57 @@ +/** + * jQuery plugin for Sortable + * @author RubaXa + * @license MIT + */ +(function (factory) { + "use strict"; + + if (typeof define === "function" && define.amd) { + define(["jquery"], factory); + } + else { + /* jshint sub:true */ + factory(jQuery); + } +})(function ($) { + "use strict"; + + + /* CODE */ + + + /** + * jQuery plugin for Sortable + * @param {Object|String} options + * @param {..*} [args] + * @returns {jQuery|*} + */ + $.fn.sortable = function (options) { + var retVal; + + this.each(function () { + var $el = $(this), + sortable = $el.data('sortable'); + + if (!sortable && (options instanceof Object || !options)) { + sortable = new Sortable(this, options); + $el.data('sortable', sortable); + } + + if (sortable) { + if (options === 'widget') { + return sortable; + } + else if (options === 'destroy') { + sortable.destroy(); + $el.removeData('sortable'); + } + else if (options in sortable) { + retVal = sortable[sortable].apply(sortable, [].slice.call(arguments, 1)); + } + } + }); + + return (retVal === void 0) ? this : retVal; + }; +}); diff --git a/src/SleepingOwl/Admin/FormItems/Images.php b/src/SleepingOwl/Admin/FormItems/Images.php index 26f00433..3b06f97a 100644 --- a/src/SleepingOwl/Admin/FormItems/Images.php +++ b/src/SleepingOwl/Admin/FormItems/Images.php @@ -12,6 +12,9 @@ public function initialize() { AssetManager::addScript('admin::default/js/formitems/image/initMultiple.js'); AssetManager::addScript('admin::default/js/formitems/image/flow.min.js'); + AssetManager::addScript('admin::default/js/formitems/image/Sortable.min.js'); + AssetManager::addScript('admin::default/js/formitems/image/sortable.jquery.binding.js'); + AssetManager::addStyle('admin::default/css/formitems/image/images.css'); } public function save() diff --git a/src/views/default/formitem/images.blade.php b/src/views/default/formitem/images.blade.php index 683a5ac2..52a513a4 100644 --- a/src/views/default/formitem/images.blade.php +++ b/src/views/default/formitem/images.blade.php @@ -1,7 +1,7 @@
      -
      +
      @foreach ($value as $image)
      From 6f2dd57f76d8f6acc815277590b462b03933df54 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Fri, 1 May 2015 16:00:44 +0400 Subject: [PATCH 056/108] Async datatables within tabs fix --- .../Admin/Display/DisplayDatatablesAsync.php | 40 ++++++++++++++++++- src/SleepingOwl/Admin/Display/DisplayTab.php | 5 +++ 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php index 17835d20..fcc0acd7 100644 --- a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php +++ b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php @@ -10,13 +10,24 @@ class DisplayDatatablesAsync extends DisplayDatatables implements WithRoutesInterface { + protected $name; + + function __construct($name = null) + { + $this->name($name); + } + public static function registerRoutes() { - Route::get('{adminModel}/async', [ + Route::get('{adminModel}/async/{adminDisplayName?}', [ 'as' => 'admin.model.async', - function ($model) + function ($model, $name = null) { $display = $model->display(); + if ($display instanceof DisplayTabbed) + { + $display = static::findDatatablesAsyncByName($display, $name); + } if ($display instanceof DisplayDatatablesAsync) { return $display->renderAsync(); @@ -26,10 +37,25 @@ function ($model) ]); } + protected static function findDatatablesAsyncByName(DisplayTabbed $display, $name) + { + $tabs = $display->tabs(); + foreach ($tabs as $tab) + { + $content = $tab->getOriginalContent(); + if ($content instanceof DisplayDatatablesAsync && $content->name() === $name) + { + return $content; + } + } + return null; + } + public function render() { $params = $this->getParams(); $attributes = Input::all(); + array_unshift($attributes, $this->name()); array_unshift($attributes, $this->model()->alias()); $params['url'] = route('admin.model.async', $attributes); return view(AdminTemplate::view('display.datatablesAsync'), $params); @@ -126,4 +152,14 @@ protected function prepareDatatablesStructure($collection, $totalCount, $filtere return $result; } + public function name($name = null) + { + if (is_null($name)) + { + return $this->name; + } + $this->name = $name; + return $this; + } + } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Display/DisplayTab.php b/src/SleepingOwl/Admin/Display/DisplayTab.php index fde81a83..ba6c85a0 100644 --- a/src/SleepingOwl/Admin/Display/DisplayTab.php +++ b/src/SleepingOwl/Admin/Display/DisplayTab.php @@ -63,6 +63,11 @@ public function name($name = null) return $this; } + public function getOriginalContent() + { + return $this->content; + } + public function content() { $params = [ From e1f4730ed1c9421a12c1f82efa58151bdc966cd4 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Fri, 1 May 2015 16:15:10 +0400 Subject: [PATCH 057/108] Radio form item added --- src/SleepingOwl/Admin/FormItems/FormItem.php | 1 + src/SleepingOwl/Admin/FormItems/Radio.php | 11 ++++++++++ .../Providers/FormItemServiceProvider.php | 1 + src/views/default/formitem/radio.blade.php | 20 +++++++++++++++++++ 4 files changed, 33 insertions(+) create mode 100644 src/SleepingOwl/Admin/FormItems/Radio.php create mode 100644 src/views/default/formitem/radio.blade.php diff --git a/src/SleepingOwl/Admin/FormItems/FormItem.php b/src/SleepingOwl/Admin/FormItems/FormItem.php index efa1a176..8f8bf59e 100644 --- a/src/SleepingOwl/Admin/FormItems/FormItem.php +++ b/src/SleepingOwl/Admin/FormItems/FormItem.php @@ -23,6 +23,7 @@ * @method static \SleepingOwl\Admin\FormItems\Checkbox checkbox($name, $label = null) * @method static \SleepingOwl\Admin\FormItems\CKEditor ckeditor($name, $label = null) * @method static \SleepingOwl\Admin\FormItems\Textarea textarea($name, $label = null) + * @method static \SleepingOwl\Admin\FormItems\Radio radio($name, $label = null) */ class FormItem extends AliasBinder { diff --git a/src/SleepingOwl/Admin/FormItems/Radio.php b/src/SleepingOwl/Admin/FormItems/Radio.php new file mode 100644 index 00000000..ad1cbeb8 --- /dev/null +++ b/src/SleepingOwl/Admin/FormItems/Radio.php @@ -0,0 +1,11 @@ +has($name) ? 'has-error' : '' }}"> + + @if ($nullable) +
      + +
      + @endif + @foreach ($options as $optionValue => $optionLabel) +
      + +
      + @endforeach + @include(AdminTemplate::view('formitem.errors')) +
      \ No newline at end of file From 414e92039fbd5018d350d93780778f7780c1a726 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Fri, 1 May 2015 16:29:51 +0400 Subject: [PATCH 058/108] Minor code cleanup --- .../Admin/Display/AdminDisplay.php | 12 ++- .../Admin/Display/DisplayDatatables.php | 20 ++++ .../Admin/Display/DisplayDatatablesAsync.php | 48 +++++++++ src/SleepingOwl/Admin/Display/DisplayTab.php | 100 +++++++++++++++--- .../Admin/Display/DisplayTabbed.php | 35 ++++++ .../Providers/DisplayServiceProvider.php | 6 +- 6 files changed, 198 insertions(+), 23 deletions(-) diff --git a/src/SleepingOwl/Admin/Display/AdminDisplay.php b/src/SleepingOwl/Admin/Display/AdminDisplay.php index 8abe9e1a..4e7e4b6c 100644 --- a/src/SleepingOwl/Admin/Display/AdminDisplay.php +++ b/src/SleepingOwl/Admin/Display/AdminDisplay.php @@ -3,16 +3,20 @@ use SleepingOwl\Admin\Base\AliasBinder; /** - * Class AdminDisplay - * @package SleepingOwl\Admin\Display + * @method static \SleepingOwl\Admin\Display\DisplayDatatables datatables() + * @method static \SleepingOwl\Admin\Display\DisplayDatatablesAsync datatablesAsync() * @method static \SleepingOwl\Admin\Display\DisplayTab tab($display) * @method static \SleepingOwl\Admin\Display\DisplayTabbed tabbed() * @method static \SleepingOwl\Admin\Display\DisplayTable table() - * @method static \SleepingOwl\Admin\Display\DisplayDatatables datatables() - * @method static \SleepingOwl\Admin\Display\DisplayDatatablesAsync datatablesAsync() * @method static \SleepingOwl\Admin\Display\DisplayTree tree() */ class AdminDisplay extends AliasBinder { + + /** + * Display class aliases + * @var string[] + */ protected static $aliases = []; + } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Display/DisplayDatatables.php b/src/SleepingOwl/Admin/Display/DisplayDatatables.php index 92beb3e6..ee5e3772 100644 --- a/src/SleepingOwl/Admin/Display/DisplayDatatables.php +++ b/src/SleepingOwl/Admin/Display/DisplayDatatables.php @@ -5,9 +5,20 @@ class DisplayDatatables extends DisplayTable { + /** + * View to render + * @var string + */ protected $view = 'datatables'; + /** + * Datatables order + * @var array + */ protected $order = [[0, 'asc']]; + /** + * Initialize display + */ public function initialize() { parent::initialize(); @@ -20,6 +31,11 @@ public function initialize() AssetManager::addStyle('admin::default/css/dataTables.bootstrap.css'); } + /** + * Set or get datatables order + * @param array|null $order + * @return $this|array + */ public function order($order = null) { if (is_null($order)) @@ -30,6 +46,10 @@ public function order($order = null) return $this; } + /** + * Get view render parameters + * @return array + */ protected function getParams() { $params = parent::getParams(); diff --git a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php index fcc0acd7..98d44687 100644 --- a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php +++ b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php @@ -10,13 +10,23 @@ class DisplayDatatablesAsync extends DisplayDatatables implements WithRoutesInterface { + /** + * Datatables name + * @var string + */ protected $name; + /** + * @param string|null $name + */ function __construct($name = null) { $this->name($name); } + /** + * Register display routes + */ public static function registerRoutes() { Route::get('{adminModel}/async/{adminDisplayName?}', [ @@ -37,6 +47,12 @@ function ($model, $name = null) ]); } + /** + * Find DisplayDatatablesAsync in tabbed display by name + * @param DisplayTabbed $display + * @param string|null $name + * @return DisplayDatatablesAsync|null + */ protected static function findDatatablesAsyncByName(DisplayTabbed $display, $name) { $tabs = $display->tabs(); @@ -51,6 +67,9 @@ protected static function findDatatablesAsyncByName(DisplayTabbed $display, $nam return null; } + /** + * @return \Illuminate\View\View + */ public function render() { $params = $this->getParams(); @@ -61,6 +80,10 @@ public function render() return view(AdminTemplate::view('display.datatablesAsync'), $params); } + /** + * Render async request + * @return array + */ public function renderAsync() { $query = $this->repository->query(); @@ -78,6 +101,10 @@ public function renderAsync() return $this->prepareDatatablesStructure($collection, $totalCount, $filteredCount); } + /** + * Apply offset and limit to the query + * @param $query + */ protected function applyOffset($query) { $offset = Input::get('start', 0); @@ -89,6 +116,10 @@ protected function applyOffset($query) $query->offset($offset)->limit($limit); } + /** + * Apply orders to the query + * @param $query + */ protected function applyOrders($query) { $orders = Input::get('order', []); @@ -105,6 +136,10 @@ protected function applyOrders($query) } } + /** + * Apply search to the query + * @param $query + */ protected function applySearch($query) { $search = Input::get('search.value'); @@ -130,6 +165,14 @@ protected function applySearch($query) }); } + /** + * Convert collection to the datatables structure + * + * @param $collection + * @param $totalCount + * @param $filteredCount + * @return array + */ protected function prepareDatatablesStructure($collection, $totalCount, $filteredCount) { $columns = $this->allColumns(); @@ -152,6 +195,11 @@ protected function prepareDatatablesStructure($collection, $totalCount, $filtere return $result; } + /** + * Get or set datatables name + * @param null $name + * @return $this + */ public function name($name = null) { if (is_null($name)) diff --git a/src/SleepingOwl/Admin/Display/DisplayTab.php b/src/SleepingOwl/Admin/Display/DisplayTab.php index ba6c85a0..aa32e850 100644 --- a/src/SleepingOwl/Admin/Display/DisplayTab.php +++ b/src/SleepingOwl/Admin/Display/DisplayTab.php @@ -2,22 +2,47 @@ use AdminTemplate; use Illuminate\Contracts\Support\Renderable; +use Illuminate\View\View; use SleepingOwl\Admin\Interfaces\DisplayInterface; use SleepingOwl\Admin\Interfaces\FormInterface; class DisplayTab implements Renderable, DisplayInterface, FormInterface { - protected $label = []; + /** + * Tab label + * @var string + */ + protected $label = ''; + /** + * Is tab active by default? + * @var bool + */ protected $active = false; + /** + * Tab name + * @var string + */ protected $name; + /** + * Tab content + * @var Renderable + */ protected $content; + /** + * @param $content + */ function __construct($content) { $this->content = $content; } + /** + * Get or set tab label + * @param null $label + * @return $this|array + */ public function label($label = null) { if (is_null($label)) @@ -28,21 +53,11 @@ public function label($label = null) return $this; } - public function render() - { - $params = [ - 'label' => $this->label(), - 'active' => $this->active(), - 'name' => $this->name(), - ]; - return view(AdminTemplate::view('display.tab'), $params); - } - - function __toString() - { - return (string) $this->render(); - } - + /** + * Get or set tab active state + * @param null $active + * @return $this|bool + */ public function active($active = null) { if (is_null($active)) @@ -53,6 +68,11 @@ public function active($active = null) return $this; } + /** + * Get or set tab name + * @param null $name + * @return $this|string + */ public function name($name = null) { if (is_null($name)) @@ -63,11 +83,19 @@ public function name($name = null) return $this; } + /** + * Get tab original content + * @return mixed + */ public function getOriginalContent() { return $this->content; } + /** + * Render tab content + * @return View + */ public function content() { $params = [ @@ -78,6 +106,9 @@ public function content() return view(AdminTemplate::view('display.tab_content'), $params); } + /** + * @param string $class + */ public function setClass($class) { if ($this->content instanceof DisplayInterface) @@ -86,6 +117,9 @@ public function setClass($class) } } + /** + * Initialize tab + */ public function initialize() { if ($this->content instanceof DisplayInterface) @@ -94,6 +128,9 @@ public function initialize() } } + /** + * @param string $action + */ public function setAction($action) { if ($this->content instanceof FormInterface) @@ -102,6 +139,9 @@ public function setAction($action) } } + /** + * @param int $id + */ public function setId($id) { if ($this->content instanceof FormInterface) @@ -110,6 +150,10 @@ public function setId($id) } } + /** + * @param mixed $model + * @return null + */ public function validate($model) { if ($this->content instanceof FormInterface) @@ -119,6 +163,9 @@ public function validate($model) return null; } + /** + * @param mixed $model + */ public function save($model) { if ($this->content instanceof FormInterface) @@ -127,4 +174,25 @@ public function save($model) } } + /** + * @return View + */ + public function render() + { + $params = [ + 'label' => $this->label(), + 'active' => $this->active(), + 'name' => $this->name(), + ]; + return view(AdminTemplate::view('display.tab'), $params); + } + + /** + * @return string + */ + function __toString() + { + return (string) $this->render(); + } + } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Display/DisplayTabbed.php b/src/SleepingOwl/Admin/Display/DisplayTabbed.php index cdbd8ed8..8a287886 100644 --- a/src/SleepingOwl/Admin/Display/DisplayTabbed.php +++ b/src/SleepingOwl/Admin/Display/DisplayTabbed.php @@ -1,6 +1,7 @@ render(); } + /** + * @param string $class + */ public function setClass($class) { foreach ($this->tabs as $tab) @@ -48,6 +67,9 @@ public function setClass($class) } } + /** + * + */ public function initialize() { foreach ($this->tabs as $tab) @@ -59,6 +81,9 @@ public function initialize() } } + /** + * @param string $action + */ public function setAction($action) { foreach ($this->tabs as $tab) @@ -70,6 +95,9 @@ public function setAction($action) } } + /** + * @param int $id + */ public function setId($id) { foreach ($this->tabs as $tab) @@ -81,6 +109,10 @@ public function setId($id) } } + /** + * @param mixed $model + * @return null + */ public function validate($model) { foreach ($this->tabs as $tab) @@ -97,6 +129,9 @@ public function validate($model) return null; } + /** + * @param mixed $model + */ public function save($model) { foreach ($this->tabs as $tab) diff --git a/src/SleepingOwl/Admin/Providers/DisplayServiceProvider.php b/src/SleepingOwl/Admin/Providers/DisplayServiceProvider.php index 635c319f..5a20ab7b 100644 --- a/src/SleepingOwl/Admin/Providers/DisplayServiceProvider.php +++ b/src/SleepingOwl/Admin/Providers/DisplayServiceProvider.php @@ -8,12 +8,12 @@ class DisplayServiceProvider extends ServiceProvider public function register() { - AdminDisplay::register('table', 'SleepingOwl\Admin\Display\DisplayTable'); AdminDisplay::register('datatables', 'SleepingOwl\Admin\Display\DisplayDatatables'); AdminDisplay::register('datatablesAsync', 'SleepingOwl\Admin\Display\DisplayDatatablesAsync'); - AdminDisplay::register('tree', 'SleepingOwl\Admin\Display\DisplayTree'); - AdminDisplay::register('tabbed', 'SleepingOwl\Admin\Display\DisplayTabbed'); AdminDisplay::register('tab', 'SleepingOwl\Admin\Display\DisplayTab'); + AdminDisplay::register('tabbed', 'SleepingOwl\Admin\Display\DisplayTabbed'); + AdminDisplay::register('table', 'SleepingOwl\Admin\Display\DisplayTable'); + AdminDisplay::register('tree', 'SleepingOwl\Admin\Display\DisplayTree'); } } \ No newline at end of file From d64fed95d46d99865ffd8f865322b3404efb87f3 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Mon, 4 May 2015 14:29:24 +0400 Subject: [PATCH 059/108] Column filters started --- public/default/js/columnfilters/base.js | 1 + public/default/js/columnfilters/text.js | 9 ++++ public/default/js/datatables/init.js | 8 +++- .../Admin/AdminServiceProvider.php | 1 + .../Admin/ColumnFilters/ColumnFilter.php | 17 +++++++ src/SleepingOwl/Admin/ColumnFilters/Text.php | 48 +++++++++++++++++++ .../Admin/Display/DisplayDatatables.php | 21 ++++++++ .../Admin/Display/DisplayDatatablesAsync.php | 21 ++++++++ .../Interfaces/ColumnFilterInterface.php | 11 +++++ .../Providers/ColumnFilterServiceProvider.php | 14 ++++++ src/views/default/columnfilter/text.blade.php | 1 + .../default/display/datatables.blade.php | 10 ++++ .../default/display/datatablesAsync.blade.php | 10 ++++ 13 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 public/default/js/columnfilters/base.js create mode 100644 public/default/js/columnfilters/text.js create mode 100644 src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php create mode 100644 src/SleepingOwl/Admin/ColumnFilters/Text.php create mode 100644 src/SleepingOwl/Admin/Interfaces/ColumnFilterInterface.php create mode 100644 src/SleepingOwl/Admin/Providers/ColumnFilterServiceProvider.php create mode 100644 src/views/default/columnfilter/text.blade.php diff --git a/public/default/js/columnfilters/base.js b/public/default/js/columnfilters/base.js new file mode 100644 index 00000000..28bccf3a --- /dev/null +++ b/public/default/js/columnfilters/base.js @@ -0,0 +1 @@ +window.columnFilters = {}; \ No newline at end of file diff --git a/public/default/js/columnfilters/text.js b/public/default/js/columnfilters/text.js new file mode 100644 index 00000000..0a5313a8 --- /dev/null +++ b/public/default/js/columnfilters/text.js @@ -0,0 +1,9 @@ +window.columnFilters.text = function (input, table) +{ + var $input = $(input); + var index = $input.closest('td').data('index'); + $input.on('keyup change', function () + { + table.column(index).search($input.val()).draw(); + }); +}; \ No newline at end of file diff --git a/public/default/js/datatables/init.js b/public/default/js/datatables/init.js index df133ce6..71a3229b 100644 --- a/public/default/js/datatables/init.js +++ b/public/default/js/datatables/init.js @@ -24,6 +24,12 @@ $(function () "url": url }; } - $this.DataTable(params); + var table = $this.DataTable(params); + + $this.find('.column-filter').each(function () + { + var type = $(this).data('type'); + window.columnFilters[type](this, table); + }); }); }); \ No newline at end of file diff --git a/src/SleepingOwl/Admin/AdminServiceProvider.php b/src/SleepingOwl/Admin/AdminServiceProvider.php index 7b652a8f..e82dbead 100644 --- a/src/SleepingOwl/Admin/AdminServiceProvider.php +++ b/src/SleepingOwl/Admin/AdminServiceProvider.php @@ -12,6 +12,7 @@ class AdminServiceProvider extends ServiceProvider 'SleepingOwl\AdminAuth\AdminAuthServiceProvider', 'SleepingOwl\Admin\Providers\DisplayServiceProvider', 'SleepingOwl\Admin\Providers\ColumnServiceProvider', + 'SleepingOwl\Admin\Providers\ColumnFilterServiceProvider', 'SleepingOwl\Admin\Providers\FormServiceProvider', 'SleepingOwl\Admin\Providers\FormItemServiceProvider', 'SleepingOwl\Admin\Providers\FilterServiceProvider', diff --git a/src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php b/src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php new file mode 100644 index 00000000..23ce6ae5 --- /dev/null +++ b/src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php @@ -0,0 +1,17 @@ +placeholder; + } + $this->placeholder = $placeholder; + return $this; + } + + public function render() + { + $params = [ + 'placeholder' => $this->placeholder(), + ]; + return view(AdminTemplate::view('columnfilter.text'), $params); + } + + /** + * @return string + */ + function __toString() + { + return (string)$this->render(); + } + +} \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Display/DisplayDatatables.php b/src/SleepingOwl/Admin/Display/DisplayDatatables.php index ee5e3772..cc48992b 100644 --- a/src/SleepingOwl/Admin/Display/DisplayDatatables.php +++ b/src/SleepingOwl/Admin/Display/DisplayDatatables.php @@ -1,6 +1,7 @@ columnFilters() as $columnFilter) + { + if ($columnFilter instanceof ColumnFilterInterface) + { + $columnFilter->initialize(); + } + } + AssetManager::addScript('admin::default/js/datatables/jquery.dataTables.min.js'); AssetManager::addScript('admin::default/js/datatables/jquery.dataTables_bootstrap.js'); AssetManager::addScript('admin::default/js/notify-combined.min.js'); @@ -31,6 +41,16 @@ public function initialize() AssetManager::addStyle('admin::default/css/dataTables.bootstrap.css'); } + public function columnFilters($columnFilters = null) + { + if (is_null($columnFilters)) + { + return $this->columnFilters; + } + $this->columnFilters = $columnFilters; + return $this; + } + /** * Set or get datatables order * @param array|null $order @@ -54,6 +74,7 @@ protected function getParams() { $params = parent::getParams(); $params['order'] = $this->order(); + $params['columnFilters'] = $this->columnFilters(); return $params; } diff --git a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php index 98d44687..15e7afc3 100644 --- a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php +++ b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php @@ -91,6 +91,7 @@ public function renderAsync() $this->modifyQuery($query); $this->applySearch($query); + $this->applyColumnSearch($query); $filteredCount = $query->count(); @@ -165,6 +166,26 @@ protected function applySearch($query) }); } + protected function applyColumnSearch($query) + { + $queryColumns = Input::get('columns', []); + foreach ($queryColumns as $index => $queryColumn) + { + $search = array_get($queryColumn, 'search.value'); + if (is_null($search)) continue; + + $column = array_get($this->columns(), $index); + if ($column instanceof String) + { + $name = $column->name(); + if ($this->repository->hasColumn($name)) + { + $query->where($name, 'like', '%' . $search . '%'); + } + } + } + } + /** * Convert collection to the datatables structure * diff --git a/src/SleepingOwl/Admin/Interfaces/ColumnFilterInterface.php b/src/SleepingOwl/Admin/Interfaces/ColumnFilterInterface.php new file mode 100644 index 00000000..ac36825f --- /dev/null +++ b/src/SleepingOwl/Admin/Interfaces/ColumnFilterInterface.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/src/views/default/display/datatables.blade.php b/src/views/default/display/datatables.blade.php index 10df35c3..8e112472 100644 --- a/src/views/default/display/datatables.blade.php +++ b/src/views/default/display/datatables.blade.php @@ -21,6 +21,16 @@ @endforeach + + + @foreach ($columns as $index => $column) + + {!! $columnFilter !!} + @endforeach + + @foreach ($collection as $instance) diff --git a/src/views/default/display/datatablesAsync.blade.php b/src/views/default/display/datatablesAsync.blade.php index 58ec10c9..f66fc318 100644 --- a/src/views/default/display/datatablesAsync.blade.php +++ b/src/views/default/display/datatablesAsync.blade.php @@ -21,6 +21,16 @@ @endforeach + + + @foreach ($columns as $index => $column) + + {!! $columnFilter !!} + @endforeach + + \ No newline at end of file From 46fd240d4b5855abee333330ef5d541918749d28 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Mon, 4 May 2015 14:47:28 +0400 Subject: [PATCH 060/108] Select column filter added --- public/default/js/columnfilters/select.js | 9 ++ .../Admin/ColumnFilters/BaseColumnFilter.php | 41 +++++++++ .../Admin/ColumnFilters/ColumnFilter.php | 1 + .../Admin/ColumnFilters/Select.php | 88 +++++++++++++++++++ src/SleepingOwl/Admin/ColumnFilters/Text.php | 22 ++--- .../Providers/ColumnFilterServiceProvider.php | 1 + .../default/columnfilter/select.blade.php | 7 ++ 7 files changed, 153 insertions(+), 16 deletions(-) create mode 100644 public/default/js/columnfilters/select.js create mode 100644 src/SleepingOwl/Admin/ColumnFilters/BaseColumnFilter.php create mode 100644 src/SleepingOwl/Admin/ColumnFilters/Select.php create mode 100644 src/views/default/columnfilter/select.blade.php diff --git a/public/default/js/columnfilters/select.js b/public/default/js/columnfilters/select.js new file mode 100644 index 00000000..cb85b959 --- /dev/null +++ b/public/default/js/columnfilters/select.js @@ -0,0 +1,9 @@ +window.columnFilters.select = function (input, table) +{ + var $input = $(input); + var index = $input.closest('td').data('index'); + $input.on('keyup change', function () + { + table.column(index).search($input.val()).draw(); + }); +}; \ No newline at end of file diff --git a/src/SleepingOwl/Admin/ColumnFilters/BaseColumnFilter.php b/src/SleepingOwl/Admin/ColumnFilters/BaseColumnFilter.php new file mode 100644 index 00000000..ad4d851b --- /dev/null +++ b/src/SleepingOwl/Admin/ColumnFilters/BaseColumnFilter.php @@ -0,0 +1,41 @@ +getParams(); + return view(AdminTemplate::view('columnfilter.' . $this->view), $params); + } + + /** + * @return string + */ + function __toString() + { + return (string)$this->render(); + } + +} \ No newline at end of file diff --git a/src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php b/src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php index 23ce6ae5..935b2316 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php +++ b/src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php @@ -4,6 +4,7 @@ /** * @method static \SleepingOwl\Admin\ColumnFilters\Text text() + * @method static \SleepingOwl\Admin\ColumnFilters\Select select() */ class ColumnFilter extends AliasBinder { diff --git a/src/SleepingOwl/Admin/ColumnFilters/Select.php b/src/SleepingOwl/Admin/ColumnFilters/Select.php new file mode 100644 index 00000000..a3206039 --- /dev/null +++ b/src/SleepingOwl/Admin/ColumnFilters/Select.php @@ -0,0 +1,88 @@ +model; + } + $this->model = $model; + return $this; + } + + public function display($display = null) + { + if (is_null($display)) + { + return $this->display; + } + $this->display = $display; + return $this; + } + + public function options($options = null) + { + if (is_null($options)) + { + if ( ! is_null($this->model()) && ! is_null($this->display())) + { + $this->loadOptions(); + } + $options = $this->options; + asort($options); + return $options; + } + $this->options = $options; + return $this; + } + + protected function loadOptions() + { + $repository = new BaseRepository($this->model()); + $key = $repository->model()->getKeyName(); + $options = $repository->query()->get()->lists($this->display(), $key); + $options = array_unique($options); + $this->options($options); + } + + public function placeholder($placeholder = null) + { + if (is_null($placeholder)) + { + return $this->placeholder; + } + $this->placeholder = $placeholder; + return $this; + } + + public function getParams() + { + return parent::getParams() + [ + 'options' => $this->options(), + 'placeholder' => $this->placeholder(), + ]; + } + +} \ No newline at end of file diff --git a/src/SleepingOwl/Admin/ColumnFilters/Text.php b/src/SleepingOwl/Admin/ColumnFilters/Text.php index f32aa009..4f57e8da 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/Text.php +++ b/src/SleepingOwl/Admin/ColumnFilters/Text.php @@ -1,13 +1,11 @@ $this->placeholder(), ]; - return view(AdminTemplate::view('columnfilter.text'), $params); - } - - /** - * @return string - */ - function __toString() - { - return (string)$this->render(); } } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Providers/ColumnFilterServiceProvider.php b/src/SleepingOwl/Admin/Providers/ColumnFilterServiceProvider.php index 3464c1c8..6fa169e7 100644 --- a/src/SleepingOwl/Admin/Providers/ColumnFilterServiceProvider.php +++ b/src/SleepingOwl/Admin/Providers/ColumnFilterServiceProvider.php @@ -9,6 +9,7 @@ class ColumnFilterServiceProvider extends ServiceProvider public function register() { ColumnFilter::register('text', 'SleepingOwl\Admin\ColumnFilters\Text'); + ColumnFilter::register('select', 'SleepingOwl\Admin\ColumnFilters\Select'); } } \ No newline at end of file diff --git a/src/views/default/columnfilter/select.blade.php b/src/views/default/columnfilter/select.blade.php new file mode 100644 index 00000000..f00bc4a9 --- /dev/null +++ b/src/views/default/columnfilter/select.blade.php @@ -0,0 +1,7 @@ + \ No newline at end of file From 8d0d864d05804797fecb4bae85863a0e9e768d3e Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Mon, 4 May 2015 18:35:31 +0400 Subject: [PATCH 061/108] Datatables attributes configuration added --- README.md | 1 + public/default/js/datatables/init.js | 2 ++ .../Admin/Display/DisplayDatatables.php | 19 ++++++++++++++++++- .../default/display/datatables.blade.php | 2 +- .../default/display/datatablesAsync.blade.php | 2 +- 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3bfd1239..400b4295 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ It includes: 'Admin' => 'SleepingOwl\Admin\Admin', 'AdminAuth' => 'SleepingOwl\AdminAuth\Facades\AdminAuth', 'Column' => 'SleepingOwl\Admin\Columns\Column', + 'ColumnFilter' => 'SleepingOwl\Admin\ColumnFilters\ColumnFilter', 'Filter' => 'SleepingOwl\Admin\Filter\Filter', 'AdminDisplay' => 'SleepingOwl\Admin\Display\AdminDisplay', 'AdminForm' => 'SleepingOwl\Admin\Form\AdminForm', diff --git a/public/default/js/datatables/init.js b/public/default/js/datatables/init.js index 71a3229b..4b7b78a4 100644 --- a/public/default/js/datatables/init.js +++ b/public/default/js/datatables/init.js @@ -15,6 +15,8 @@ $(function () [10, 25, 50, window.admin.lang.table.all] ] }; + params = $.extend(params, $this.data('attributes')); + var url; if (url = $this.data('url')) { diff --git a/src/SleepingOwl/Admin/Display/DisplayDatatables.php b/src/SleepingOwl/Admin/Display/DisplayDatatables.php index cc48992b..dfa71307 100644 --- a/src/SleepingOwl/Admin/Display/DisplayDatatables.php +++ b/src/SleepingOwl/Admin/Display/DisplayDatatables.php @@ -15,8 +15,14 @@ class DisplayDatatables extends DisplayTable * Datatables order * @var array */ - protected $order = [[0, 'asc']]; + protected $order = [ + [ + 0, + 'asc' + ] + ]; protected $columnFilters = []; + protected $attributes = []; /** * Initialize display @@ -51,6 +57,16 @@ public function columnFilters($columnFilters = null) return $this; } + public function attributes($attributes = null) + { + if (is_null($attributes)) + { + return $this->attributes; + } + $this->attributes = $attributes; + return $this; + } + /** * Set or get datatables order * @param array|null $order @@ -75,6 +91,7 @@ protected function getParams() $params = parent::getParams(); $params['order'] = $this->order(); $params['columnFilters'] = $this->columnFilters(); + $params['attributes'] = $this->attributes(); return $params; } diff --git a/src/views/default/display/datatables.blade.php b/src/views/default/display/datatables.blade.php index 8e112472..05c53958 100644 --- a/src/views/default/display/datatables.blade.php +++ b/src/views/default/display/datatables.blade.php @@ -13,7 +13,7 @@ {!! $action->render() !!} @endforeach
      - +
      @foreach ($columns as $column) diff --git a/src/views/default/display/datatablesAsync.blade.php b/src/views/default/display/datatablesAsync.blade.php index f66fc318..855dc495 100644 --- a/src/views/default/display/datatablesAsync.blade.php +++ b/src/views/default/display/datatablesAsync.blade.php @@ -13,7 +13,7 @@ {!! $action->render() !!} @endforeach -
      +
      @foreach ($columns as $column) From 1ad319592dd04711bcee35cee030e8dd2a85d5ff Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Mon, 4 May 2015 18:49:47 +0400 Subject: [PATCH 062/108] Select column filter update --- src/views/default/columnfilter/select.blade.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/views/default/columnfilter/select.blade.php b/src/views/default/columnfilter/select.blade.php index f00bc4a9..b30bb383 100644 --- a/src/views/default/columnfilter/select.blade.php +++ b/src/views/default/columnfilter/select.blade.php @@ -1,7 +1,6 @@ \ No newline at end of file From 4e4ed135b3100c8b53b9dc462d35f63099bee503 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Mon, 4 May 2015 19:44:56 +0400 Subject: [PATCH 063/108] Select column filter in async mode fix --- public/default/js/columnfilters/select.js | 2 +- .../Admin/Display/DisplayDatatablesAsync.php | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/public/default/js/columnfilters/select.js b/public/default/js/columnfilters/select.js index cb85b959..4e7c3915 100644 --- a/public/default/js/columnfilters/select.js +++ b/public/default/js/columnfilters/select.js @@ -2,7 +2,7 @@ window.columnFilters.select = function (input, table) { var $input = $(input); var index = $input.closest('td').data('index'); - $input.on('keyup change', function () + $input.on('change', function () { table.column(index).search($input.val()).draw(); }); diff --git a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php index 15e7afc3..0e6de1ac 100644 --- a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php +++ b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php @@ -172,7 +172,7 @@ protected function applyColumnSearch($query) foreach ($queryColumns as $index => $queryColumn) { $search = array_get($queryColumn, 'search.value'); - if (is_null($search)) continue; + if (empty($search)) continue; $column = array_get($this->columns(), $index); if ($column instanceof String) @@ -181,6 +181,15 @@ protected function applyColumnSearch($query) if ($this->repository->hasColumn($name)) { $query->where($name, 'like', '%' . $search . '%'); + } elseif (strpos($name, '.') !== false) + { + $parts = explode('.', $name); + $fieldName = array_pop($parts); + $relationName = implode('.', $parts); + $query->whereHas($relationName, function ($q) use ($search, $fieldName) + { + $q->where($fieldName, $search); + }); } } } From 84fec7b4806ed53f5677fd9b1f8fe511d3f9991d Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Tue, 5 May 2015 15:22:35 +0400 Subject: [PATCH 064/108] Date column filter --- public/default/js/formitems/datetime/init.js | 25 +++-- .../Admin/ColumnFilters/ColumnFilter.php | 1 + src/SleepingOwl/Admin/ColumnFilters/Date.php | 104 ++++++++++++++++++ .../Admin/Display/DisplayDatatablesAsync.php | 64 ++++++++--- .../Providers/ColumnFilterServiceProvider.php | 1 + src/views/default/columnfilter/date.blade.php | 4 + 6 files changed, 175 insertions(+), 24 deletions(-) create mode 100644 src/SleepingOwl/Admin/ColumnFilters/Date.php create mode 100644 src/views/default/columnfilter/date.blade.php diff --git a/public/default/js/formitems/datetime/init.js b/public/default/js/formitems/datetime/init.js index e36e3514..87922608 100644 --- a/public/default/js/formitems/datetime/init.js +++ b/public/default/js/formitems/datetime/init.js @@ -1,12 +1,19 @@ $(function () { - $('.datepicker').datetimepicker({ - language: window.admin.locale, - icons: { - time: "fa fa-clock-o", - date: "fa fa-calendar", - up: "fa fa-arrow-up", - down: "fa fa-arrow-down" - } - }).trigger('dp.change'); + $('.datepicker').each(function () + { + var $this = $(this); + $this.datetimepicker({ + language: window.admin.locale, + icons: { + time: "fa fa-clock-o", + date: "fa fa-calendar", + up: "fa fa-arrow-up", + down: "fa fa-arrow-down" + } + }).trigger('dp.change').on('dp.change', function () + { + $this.find('input').change(); + }); + }); }); \ No newline at end of file diff --git a/src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php b/src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php index 935b2316..91e33a75 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php +++ b/src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php @@ -4,6 +4,7 @@ /** * @method static \SleepingOwl\Admin\ColumnFilters\Text text() + * @method static \SleepingOwl\Admin\ColumnFilters\Date date() * @method static \SleepingOwl\Admin\ColumnFilters\Select select() */ class ColumnFilter extends AliasBinder diff --git a/src/SleepingOwl/Admin/ColumnFilters/Date.php b/src/SleepingOwl/Admin/ColumnFilters/Date.php new file mode 100644 index 00000000..6fd34bc1 --- /dev/null +++ b/src/SleepingOwl/Admin/ColumnFilters/Date.php @@ -0,0 +1,104 @@ +format)) + { + $this->format(config('admin.datetimeFormat')); + } + return $this->format; + } + $this->format = $format; + return $this; + } + + public function seconds($seconds = null) + { + if (is_null($seconds)) + { + return $this->seconds; + } + $this->seconds = $seconds; + return $this; + } + + public function getParams() + { + return parent::getParams() + [ + 'seconds' => $this->seconds(), + 'format' => $this->format(), + 'pickerFormat' => $this->pickerFormat(), + 'width' => $this->width(), + ]; + } + + public function pickerFormat($pickerFormat = null) + { + if (is_null($pickerFormat)) + { + if (is_null($this->pickerFormat)) + { + return $this->generatePickerFormat(); + } + return $this->pickerFormat; + } + $this->pickerFormat = $pickerFormat; + return $this; + } + + public function width($width = null) + { + if (is_null($width)) + { + return $this->width; + } + $this->width = $width; + return $this; + } + + protected function generatePickerFormat() + { + $format = $this->format(); + $replacement = [ + 'i' => 'mm', + 's' => 'ss', + 'h' => 'hh', + 'H' => 'HH', + 'g' => 'h', + 'G' => 'H', + 'd' => 'DD', + 'j' => 'D', + 'm' => 'MM', + 'n' => 'M', + 'Y' => 'YYYY', + 'y' => 'YY', + ]; + return strtr($format, $replacement); + } + +} \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php index 0e6de1ac..233ffc9f 100644 --- a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php +++ b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php @@ -1,8 +1,10 @@ columns(), $index); if ($column instanceof String) { - $name = $column->name(); - if ($this->repository->hasColumn($name)) - { - $query->where($name, 'like', '%' . $search . '%'); - } elseif (strpos($name, '.') !== false) - { - $parts = explode('.', $name); - $fieldName = array_pop($parts); - $relationName = implode('.', $parts); - $query->whereHas($relationName, function ($q) use ($search, $fieldName) - { - $q->where($fieldName, $search); - }); - } + $this->applyStringColumnSearch($index, $column, $query, $search); + } + if ($column instanceof DateTime) + { + $this->applyDateTimeColumnSearch($index, $column, $query, $search); } } } + protected function applyStringColumnSearch($index, $column, $query, $search) + { + $name = $column->name(); + if ($this->repository->hasColumn($name)) + { + $query->where($name, 'like', '%' . $search . '%'); + } elseif (strpos($name, '.') !== false) + { + $parts = explode('.', $name); + $fieldName = array_pop($parts); + $relationName = implode('.', $parts); + $query->whereHas($relationName, function ($q) use ($search, $fieldName) + { + $q->where($fieldName, $search); + }); + } + } + + protected function applyDateTimeColumnSearch($index, $column, $query, $search) + { + try + { + $time = Carbon::parse($search); + } catch (\Exception $e) + { + try + { + $columnFilter = array_get($this->columnFilters(), $index); + $time = Carbon::createFromFormat($columnFilter->format(), $search); + } catch (\Exception $e) + { + return; + } + } + $name = $column->name(); + if ($this->repository->hasColumn($name)) + { + $query->where($name, $time); + } + } + /** * Convert collection to the datatables structure * @@ -218,7 +252,7 @@ protected function prepareDatatablesStructure($collection, $totalCount, $filtere foreach ($columns as $column) { $column->setInstance($instance); - $_row[] = (string) $column; + $_row[] = (string)$column; } $result['data'][] = $_row; } diff --git a/src/SleepingOwl/Admin/Providers/ColumnFilterServiceProvider.php b/src/SleepingOwl/Admin/Providers/ColumnFilterServiceProvider.php index 6fa169e7..1f455caa 100644 --- a/src/SleepingOwl/Admin/Providers/ColumnFilterServiceProvider.php +++ b/src/SleepingOwl/Admin/Providers/ColumnFilterServiceProvider.php @@ -9,6 +9,7 @@ class ColumnFilterServiceProvider extends ServiceProvider public function register() { ColumnFilter::register('text', 'SleepingOwl\Admin\ColumnFilters\Text'); + ColumnFilter::register('date', 'SleepingOwl\Admin\ColumnFilters\Date'); ColumnFilter::register('select', 'SleepingOwl\Admin\ColumnFilters\Select'); } diff --git a/src/views/default/columnfilter/date.blade.php b/src/views/default/columnfilter/date.blade.php new file mode 100644 index 00000000..5d70e8b5 --- /dev/null +++ b/src/views/default/columnfilter/date.blade.php @@ -0,0 +1,4 @@ +
      + + +
      \ No newline at end of file From 6c537191e00b5a92adf4ad3574f45e8b801ae025 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Tue, 5 May 2015 15:37:08 +0400 Subject: [PATCH 065/108] Column filters refactoring --- src/SleepingOwl/Admin/ColumnFilters/Date.php | 50 ++++++++++++++++++ .../Admin/ColumnFilters/Select.php | 18 +++++++ src/SleepingOwl/Admin/ColumnFilters/Text.php | 20 ++++++- .../Admin/Display/DisplayDatatablesAsync.php | 52 ++----------------- .../Interfaces/ColumnFilterInterface.php | 2 + 5 files changed, 92 insertions(+), 50 deletions(-) diff --git a/src/SleepingOwl/Admin/ColumnFilters/Date.php b/src/SleepingOwl/Admin/ColumnFilters/Date.php index 6fd34bc1..994670b5 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/Date.php +++ b/src/SleepingOwl/Admin/ColumnFilters/Date.php @@ -1,5 +1,6 @@ searchFormat; + } + $this->searchFormat = $searchFormat; + return $this; + } + + public function apply($repository, $column, $query, $search) + { + try + { + if ($this instanceof Date) + { + $time = Carbon::createFromFormat($this->format(), $search); + } else + { + return; + } + } catch (\Exception $e) + { + try + { + $time = Carbon::parse($search); + } catch (\Exception $e) + { + return; + } + } + $time = $time->format($this->searchFormat()); + $name = $column->name(); + if ($repository->hasColumn($name)) + { + $query->where($name, $time); + } elseif (strpos($name, '.') !== false) + { + $parts = explode('.', $name); + $fieldName = array_pop($parts); + $relationName = implode('.', $parts); + $query->whereHas($relationName, function ($q) use ($time, $fieldName) + { + $q->where($fieldName, $time); + }); + } + } + } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/ColumnFilters/Select.php b/src/SleepingOwl/Admin/ColumnFilters/Select.php index a3206039..67ff84d5 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/Select.php +++ b/src/SleepingOwl/Admin/ColumnFilters/Select.php @@ -85,4 +85,22 @@ public function getParams() ]; } + public function apply($repository, $column, $query, $search) + { + $name = $column->name(); + if ($repository->hasColumn($name)) + { + $query->where($name, 'like', '%' . $search . '%'); + } elseif (strpos($name, '.') !== false) + { + $parts = explode('.', $name); + $fieldName = array_pop($parts); + $relationName = implode('.', $parts); + $query->whereHas($relationName, function ($q) use ($search, $fieldName) + { + $q->where($fieldName, $search); + }); + } + } + } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/ColumnFilters/Text.php b/src/SleepingOwl/Admin/ColumnFilters/Text.php index 4f57e8da..da2529b0 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/Text.php +++ b/src/SleepingOwl/Admin/ColumnFilters/Text.php @@ -35,4 +35,22 @@ protected function getParams() ]; } -} \ No newline at end of file + public function apply($repository, $column, $query, $search) + { + $name = $column->name(); + if ($repository->hasColumn($name)) + { + $query->where($name, 'like', '%' . $search . '%'); + } elseif (strpos($name, '.') !== false) + { + $parts = explode('.', $name); + $fieldName = array_pop($parts); + $relationName = implode('.', $parts); + $query->whereHas($relationName, function ($q) use ($search, $fieldName) + { + $q->where($fieldName, $search); + }); + } + } + +} \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php index 233ffc9f..abc34663 100644 --- a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php +++ b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php @@ -4,6 +4,7 @@ use Carbon\Carbon; use Input; use Route; +use SleepingOwl\Admin\ColumnFilters\Date; use SleepingOwl\Admin\Columns\Column\DateTime; use SleepingOwl\Admin\Columns\Column\NamedColumn; use SleepingOwl\Admin\Columns\Column\String; @@ -177,55 +178,8 @@ protected function applyColumnSearch($query) if (empty($search)) continue; $column = array_get($this->columns(), $index); - if ($column instanceof String) - { - $this->applyStringColumnSearch($index, $column, $query, $search); - } - if ($column instanceof DateTime) - { - $this->applyDateTimeColumnSearch($index, $column, $query, $search); - } - } - } - - protected function applyStringColumnSearch($index, $column, $query, $search) - { - $name = $column->name(); - if ($this->repository->hasColumn($name)) - { - $query->where($name, 'like', '%' . $search . '%'); - } elseif (strpos($name, '.') !== false) - { - $parts = explode('.', $name); - $fieldName = array_pop($parts); - $relationName = implode('.', $parts); - $query->whereHas($relationName, function ($q) use ($search, $fieldName) - { - $q->where($fieldName, $search); - }); - } - } - - protected function applyDateTimeColumnSearch($index, $column, $query, $search) - { - try - { - $time = Carbon::parse($search); - } catch (\Exception $e) - { - try - { - $columnFilter = array_get($this->columnFilters(), $index); - $time = Carbon::createFromFormat($columnFilter->format(), $search); - } catch (\Exception $e) - { - return; - } - } - $name = $column->name(); - if ($this->repository->hasColumn($name)) - { - $query->where($name, $time); + $columnFilter = array_get($this->columnFilters(), $index); + $columnFilter->apply($this->repository, $column, $query, $search); } } diff --git a/src/SleepingOwl/Admin/Interfaces/ColumnFilterInterface.php b/src/SleepingOwl/Admin/Interfaces/ColumnFilterInterface.php index ac36825f..916cee51 100644 --- a/src/SleepingOwl/Admin/Interfaces/ColumnFilterInterface.php +++ b/src/SleepingOwl/Admin/Interfaces/ColumnFilterInterface.php @@ -8,4 +8,6 @@ interface ColumnFilterInterface */ public function initialize(); + public function apply($repository, $column, $query, $search); + } \ No newline at end of file From 446ed8d3b532ba6b6c01e27a32b546b0da83db2a Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Wed, 6 May 2015 14:06:59 +0400 Subject: [PATCH 066/108] Range column filter --- public/default/js/columnfilters/range.js | 70 +++++++++++++++++++ public/default/js/datatables/init.js | 15 +++- .../Admin/ColumnFilters/ColumnFilter.php | 1 + src/SleepingOwl/Admin/ColumnFilters/Date.php | 18 ++--- src/SleepingOwl/Admin/ColumnFilters/Range.php | 67 ++++++++++++++++++ .../Admin/ColumnFilters/Select.php | 15 ++-- src/SleepingOwl/Admin/ColumnFilters/Text.php | 15 ++-- .../Admin/Display/DisplayDatatablesAsync.php | 7 +- .../Interfaces/ColumnFilterInterface.php | 2 +- .../Providers/ColumnFilterServiceProvider.php | 1 + .../default/columnfilter/range.blade.php | 5 ++ 11 files changed, 193 insertions(+), 23 deletions(-) create mode 100644 public/default/js/columnfilters/range.js create mode 100644 src/SleepingOwl/Admin/ColumnFilters/Range.php create mode 100644 src/views/default/columnfilter/range.blade.php diff --git a/public/default/js/columnfilters/range.js b/public/default/js/columnfilters/range.js new file mode 100644 index 00000000..b9482587 --- /dev/null +++ b/public/default/js/columnfilters/range.js @@ -0,0 +1,70 @@ +window.columnFilters.range = function (container, table) +{ + var $container = $(container); + var $input = $container.find('input'); + var from = $input.filter(':first'); + var to = $input.filter(':last'); + var index = $container.closest('td').data('index'); + + from.data('ajax-data-name', 'from'); + to.data('ajax-data-name', 'to'); + + $.fn.dataTable.ext.search.push(function (settings, data, dataIndex) + { + if (table.settings()[0].sTableId != settings.sTableId) + { + return true; + } + var value = table.data()[dataIndex][index]; + if (value['@data-order'] !== undefined) + { + value = value['@data-order']; + } + + var fromValue = from.val(); + var toValue = to.val(); + if ((from.closest('.datepicker').length > 0) && (to.closest('.datepicker').length > 0)) + { + if (fromValue != '') + { + fromValue = from.closest('.datepicker').data('DateTimePicker').getDate(); + } else + { + fromValue = Number.NEGATIVE_INFINITY; + } + if (toValue != '') + { + toValue = to.closest('.datepicker').data('DateTimePicker').getDate(); + } else + { + toValue = Number.POSITIVE_INFINITY; + } + + value = moment(value); + } else + { + value = parseInt(value); + if (fromValue != '') + { + fromValue = parseInt(fromValue); + } else + { + fromValue = Number.NEGATIVE_INFINITY; + } + if (toValue != '') + { + toValue = parseInt(toValue); + } else + { + toValue = Number.POSITIVE_INFINITY; + } + } + + return (value >= fromValue && value <= toValue); + }); + + $input.on('keyup change', function () + { + table.draw(); + }); +}; \ No newline at end of file diff --git a/public/default/js/datatables/init.js b/public/default/js/datatables/init.js index 4b7b78a4..c5aa2b9c 100644 --- a/public/default/js/datatables/init.js +++ b/public/default/js/datatables/init.js @@ -23,13 +23,26 @@ $(function () params.serverSide = true; params.processing = true; params.ajax = { - "url": url + url: url, + data: function (d) + { + $this.find('.column-filter').each(function () + { + var $this = $(this); + var index = $this.closest('td').data('index'); + if (name = $this.data('ajax-data-name')) + { + d.columns[index]['search'][name] = $this.val(); + } + }); + } }; } var table = $this.DataTable(params); $this.find('.column-filter').each(function () { + if ($(this).parent().closest('.column-filter').length > 0) return; var type = $(this).data('type'); window.columnFilters[type](this, table); }); diff --git a/src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php b/src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php index 91e33a75..db4876aa 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php +++ b/src/SleepingOwl/Admin/ColumnFilters/ColumnFilter.php @@ -6,6 +6,7 @@ * @method static \SleepingOwl\Admin\ColumnFilters\Text text() * @method static \SleepingOwl\Admin\ColumnFilters\Date date() * @method static \SleepingOwl\Admin\ColumnFilters\Select select() + * @method static \SleepingOwl\Admin\ColumnFilters\Range range() */ class ColumnFilter extends AliasBinder { diff --git a/src/SleepingOwl/Admin/ColumnFilters/Date.php b/src/SleepingOwl/Admin/ColumnFilters/Date.php index 994670b5..8fb85218 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/Date.php +++ b/src/SleepingOwl/Admin/ColumnFilters/Date.php @@ -113,17 +113,13 @@ public function searchFormat($searchFormat = null) return $this; } - public function apply($repository, $column, $query, $search) + public function apply($repository, $column, $query, $search, $fullSearch, $operator = '=') { + if (empty($search)) return; + try { - if ($this instanceof Date) - { - $time = Carbon::createFromFormat($this->format(), $search); - } else - { - return; - } + $time = Carbon::createFromFormat($this->format(), $search); } catch (\Exception $e) { try @@ -138,15 +134,15 @@ public function apply($repository, $column, $query, $search) $name = $column->name(); if ($repository->hasColumn($name)) { - $query->where($name, $time); + $query->where($name, $operator, $time); } elseif (strpos($name, '.') !== false) { $parts = explode('.', $name); $fieldName = array_pop($parts); $relationName = implode('.', $parts); - $query->whereHas($relationName, function ($q) use ($time, $fieldName) + $query->whereHas($relationName, function ($q) use ($time, $fieldName, $operator) { - $q->where($fieldName, $time); + $q->where($fieldName, $operator, $time); }); } } diff --git a/src/SleepingOwl/Admin/ColumnFilters/Range.php b/src/SleepingOwl/Admin/ColumnFilters/Range.php new file mode 100644 index 00000000..50c528f1 --- /dev/null +++ b/src/SleepingOwl/Admin/ColumnFilters/Range.php @@ -0,0 +1,67 @@ +from()->initialize(); + $this->to()->initialize(); + } + + public function from($from = null) + { + if (is_null($from)) + { + return $this->from; + } + $this->from = $from; + return $this; + } + + public function to($to = null) + { + if (is_null($to)) + { + return $this->to; + } + $this->to = $to; + return $this; + } + + protected function getParams() + { + return parent::getParams() + [ + 'from' => $this->from(), + 'to' => $this->to(), + ]; + } + + public function apply($repository, $column, $query, $search, $fullSearch, $operator = '=') + { + $from = array_get($fullSearch, 'from'); + $to = array_get($fullSearch, 'to'); + if ( ! empty($from)) + { + $this->from()->apply($repository, $column, $query, $from, $fullSearch, '>='); + } + if ( ! empty($to)) + { + $this->to()->apply($repository, $column, $query, $to, $fullSearch, '<='); + } + } + +} \ No newline at end of file diff --git a/src/SleepingOwl/Admin/ColumnFilters/Select.php b/src/SleepingOwl/Admin/ColumnFilters/Select.php index 67ff84d5..0b5a3ab5 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/Select.php +++ b/src/SleepingOwl/Admin/ColumnFilters/Select.php @@ -85,20 +85,27 @@ public function getParams() ]; } - public function apply($repository, $column, $query, $search) + public function apply($repository, $column, $query, $search, $fullSearch, $operator = 'like') { + if (empty($search)) return; + + if ($operator == 'like') + { + $search = '%' . $search . '%'; + } + $name = $column->name(); if ($repository->hasColumn($name)) { - $query->where($name, 'like', '%' . $search . '%'); + $query->where($name, $operator, $search); } elseif (strpos($name, '.') !== false) { $parts = explode('.', $name); $fieldName = array_pop($parts); $relationName = implode('.', $parts); - $query->whereHas($relationName, function ($q) use ($search, $fieldName) + $query->whereHas($relationName, function ($q) use ($search, $fieldName, $operator) { - $q->where($fieldName, $search); + $q->where($fieldName, $operator, $search); }); } } diff --git a/src/SleepingOwl/Admin/ColumnFilters/Text.php b/src/SleepingOwl/Admin/ColumnFilters/Text.php index da2529b0..46a2f56e 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/Text.php +++ b/src/SleepingOwl/Admin/ColumnFilters/Text.php @@ -35,20 +35,27 @@ protected function getParams() ]; } - public function apply($repository, $column, $query, $search) + public function apply($repository, $column, $query, $search, $fullSearch, $operator = 'like') { + if (empty($search)) return; + + if ($operator == 'like') + { + $search = '%' . $search . '%'; + } + $name = $column->name(); if ($repository->hasColumn($name)) { - $query->where($name, 'like', '%' . $search . '%'); + $query->where($name, $operator, $search); } elseif (strpos($name, '.') !== false) { $parts = explode('.', $name); $fieldName = array_pop($parts); $relationName = implode('.', $parts); - $query->whereHas($relationName, function ($q) use ($search, $fieldName) + $query->whereHas($relationName, function ($q) use ($search, $fieldName, $operator) { - $q->where($fieldName, $search); + $q->where($fieldName, $operator, $search); }); } } diff --git a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php index abc34663..a4ec57d7 100644 --- a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php +++ b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php @@ -175,11 +175,14 @@ protected function applyColumnSearch($query) foreach ($queryColumns as $index => $queryColumn) { $search = array_get($queryColumn, 'search.value'); - if (empty($search)) continue; + $fullSearch = array_get($queryColumn, 'search'); $column = array_get($this->columns(), $index); $columnFilter = array_get($this->columnFilters(), $index); - $columnFilter->apply($this->repository, $column, $query, $search); + if ( ! is_null($columnFilter)) + { + $columnFilter->apply($this->repository, $column, $query, $search, $fullSearch); + } } } diff --git a/src/SleepingOwl/Admin/Interfaces/ColumnFilterInterface.php b/src/SleepingOwl/Admin/Interfaces/ColumnFilterInterface.php index 916cee51..ce142fe4 100644 --- a/src/SleepingOwl/Admin/Interfaces/ColumnFilterInterface.php +++ b/src/SleepingOwl/Admin/Interfaces/ColumnFilterInterface.php @@ -8,6 +8,6 @@ interface ColumnFilterInterface */ public function initialize(); - public function apply($repository, $column, $query, $search); + public function apply($repository, $column, $query, $search, $fullSearch, $operator = '='); } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Providers/ColumnFilterServiceProvider.php b/src/SleepingOwl/Admin/Providers/ColumnFilterServiceProvider.php index 1f455caa..e9573b7d 100644 --- a/src/SleepingOwl/Admin/Providers/ColumnFilterServiceProvider.php +++ b/src/SleepingOwl/Admin/Providers/ColumnFilterServiceProvider.php @@ -10,6 +10,7 @@ public function register() { ColumnFilter::register('text', 'SleepingOwl\Admin\ColumnFilters\Text'); ColumnFilter::register('date', 'SleepingOwl\Admin\ColumnFilters\Date'); + ColumnFilter::register('range', 'SleepingOwl\Admin\ColumnFilters\Range'); ColumnFilter::register('select', 'SleepingOwl\Admin\ColumnFilters\Select'); } diff --git a/src/views/default/columnfilter/range.blade.php b/src/views/default/columnfilter/range.blade.php new file mode 100644 index 00000000..21e49481 --- /dev/null +++ b/src/views/default/columnfilter/range.blade.php @@ -0,0 +1,5 @@ +
      + {!! $from !!} +
      + {!! $to !!} +
      \ No newline at end of file From 148a2e5d865bfd40fe11bb4d7295729815d23c41 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Sat, 9 May 2015 16:54:59 +0400 Subject: [PATCH 067/108] Formitem image fix --- public/default/js/formitems/image/init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/default/js/formitems/image/init.js b/public/default/js/formitems/image/init.js index e159afc6..ebcabe66 100644 --- a/public/default/js/formitems/image/init.js +++ b/public/default/js/formitems/image/init.js @@ -17,7 +17,7 @@ $(function () _token: $item.data('token') } }); - flow.assignBrowse($item.find('.imageBrowse'), true); + flow.assignBrowse($item.find('.imageBrowse'), false, true); flow.on('filesSubmitted', function(file) { flow.upload(); }); From eb26c57d6c02b3b0403d8c74ac4af1e6a2bee1f5 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Sun, 10 May 2015 14:40:31 +0400 Subject: [PATCH 068/108] Mistype fix --- src/lang/ru/lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang/ru/lang.php b/src/lang/ru/lang.php index 5090e3dd..221fb8a6 100644 --- a/src/lang/ru/lang.php +++ b/src/lang/ru/lang.php @@ -36,7 +36,7 @@ 'delete-error' => 'Невозможно удалить эту запись. Необходимо предварительно удалить все связанные записи.', 'moveUp' => 'Подвинуть вверх', 'moveDown' => 'Подвинуть вниз', - 'error' => 'В процессе обработки вашего запроса возникла ошибку', + 'error' => 'В процессе обработки вашего запроса возникла ошибка', 'filter' => 'Показать подобные записи', 'filter-goto' => 'Перейти', 'save' => 'Сохранить', From 1a61bd3ff74da0e0d288ab67638044361200808c Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Mon, 11 May 2015 16:02:56 +0400 Subject: [PATCH 069/108] Tabbed form --- src/SleepingOwl/Admin/Form/AdminForm.php | 1 + src/SleepingOwl/Admin/Form/FormDefault.php | 48 +++++++++++++------ src/SleepingOwl/Admin/Form/FormTabbed.php | 8 ++++ .../Admin/Providers/FormServiceProvider.php | 1 + src/views/default/form/tabbed.blade.php | 31 ++++++++++++ 5 files changed, 75 insertions(+), 14 deletions(-) create mode 100644 src/SleepingOwl/Admin/Form/FormTabbed.php create mode 100644 src/views/default/form/tabbed.blade.php diff --git a/src/SleepingOwl/Admin/Form/AdminForm.php b/src/SleepingOwl/Admin/Form/AdminForm.php index bbafe0da..70f0f0b4 100644 --- a/src/SleepingOwl/Admin/Form/AdminForm.php +++ b/src/SleepingOwl/Admin/Form/AdminForm.php @@ -4,6 +4,7 @@ /** * @method static \SleepingOwl\Admin\Form\FormDefault form() + * @method static \SleepingOwl\Admin\Form\FormTabbed tabbed() */ class AdminForm extends AliasBinder { diff --git a/src/SleepingOwl/Admin/Form/FormDefault.php b/src/SleepingOwl/Admin/Form/FormDefault.php index 1f1d9181..17debee2 100644 --- a/src/SleepingOwl/Admin/Form/FormDefault.php +++ b/src/SleepingOwl/Admin/Form/FormDefault.php @@ -16,6 +16,11 @@ class FormDefault implements Renderable, DisplayInterface, FormInterface { + /** + * View to render + * @var string + */ + protected $view = 'default'; /** * Form related class * @var string @@ -62,10 +67,14 @@ public function initialize() $this->initialized = true; $this->repository = new BaseRepository($this->class); $this->instance(app($this->class)); - foreach ($this->items() as $item) + $items = $this->items(); + array_walk_recursive($items, function ($item) { - $item->initialize(); - } + if ($item instanceof FormItemInterface) + { + $item->initialize(); + } + }); } /** @@ -119,10 +128,14 @@ public function instance($instance = null) return $this->instance; } $this->instance = $instance; - foreach ($this->items() as $item) + $items = $this->items(); + array_walk_recursive($items, function ($item) use ($instance) { - $item->setInstance($instance); - } + if ($item instanceof FormItemInterface) + { + $item->setInstance($instance); + } + }); return $this; } @@ -158,11 +171,14 @@ public function save($model) { return null; } - - foreach ($this->items() as $item) + $items = $this->items(); + array_walk_recursive($items, function ($item) { - $item->save(); - } + if ($item instanceof FormItemInterface) + { + $item->save(); + } + }); $this->instance()->save(); } @@ -179,10 +195,14 @@ public function validate($model) } $rules = []; - foreach ($this->items() as $item) + $items = $this->items(); + array_walk_recursive($items, function ($item) use (&$rules) { - $rules += $item->getValidationRules(); - } + if ($item instanceof FormItemInterface) + { + $rules += $item->getValidationRules(); + } + }); $data = Input::all(); $verifier = app('validation.presence'); $verifier->setConnection($this->instance()->getConnectionName()); @@ -206,7 +226,7 @@ public function render() 'action' => $this->action, 'backUrl' => session('_redirectBack', URL::previous()), ]; - return view(AdminTemplate::view('form.default'), $params); + return view(AdminTemplate::view('form.' . $this->view), $params); } /** diff --git a/src/SleepingOwl/Admin/Form/FormTabbed.php b/src/SleepingOwl/Admin/Form/FormTabbed.php new file mode 100644 index 00000000..277acfe1 --- /dev/null +++ b/src/SleepingOwl/Admin/Form/FormTabbed.php @@ -0,0 +1,8 @@ + + + +
      + +
      + @foreach ($items as $label => $formItems) +
      + @foreach ($formItems as $item) + {!! $item->render() !!} + @endforeach +
      + @endforeach +
      +
      + + \ No newline at end of file From 5292aa4f7865deca5ece904049bbe8ec2b2fdf61 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Tue, 12 May 2015 13:45:26 +0400 Subject: [PATCH 070/108] Bootstrap multiselect replaced with chosen --- README.md | 2 +- public/default/css/bootstrap-multiselect.css | 1 - .../css/formitems/select/chosen-sprite.png | Bin 0 -> 538 bytes .../css/formitems/select/chosen-sprite@2x.png | Bin 0 -> 738 bytes .../default/css/formitems/select/chosen.css | 450 +++++++ public/default/js/bootstrap-multiselect.js | 1180 ----------------- public/default/js/formitems/select.js | 23 - .../js/formitems/select/chosen.jquery.min.js | 2 + public/default/js/formitems/select/init.js | 14 + src/SleepingOwl/Admin/FormItems/Select.php | 6 +- src/lang/en/lang.php | 5 +- src/lang/ru/lang.php | 5 +- src/views/default/formitem/select.blade.php | 5 +- 13 files changed, 480 insertions(+), 1213 deletions(-) delete mode 100755 public/default/css/bootstrap-multiselect.css create mode 100755 public/default/css/formitems/select/chosen-sprite.png create mode 100755 public/default/css/formitems/select/chosen-sprite@2x.png create mode 100755 public/default/css/formitems/select/chosen.css delete mode 100755 public/default/js/bootstrap-multiselect.js delete mode 100644 public/default/js/formitems/select.js create mode 100755 public/default/js/formitems/select/chosen.jquery.min.js create mode 100644 public/default/js/formitems/select/init.js diff --git a/README.md b/README.md index 400b4295..cde6792a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ It includes: - [sb-admin-2 template](http://startbootstrap.com/template-overviews/sb-admin-2/) - [jQuery 1.11.0](http://jquery.org) - [Bootstrap v3.2.0](http://getbootstrap.com) - - [Bootstrap Multiselect v0.9.8](https://github.com/davidstutz/bootstrap-multiselect) + - [Chosen v1.4.2](http://harvesthq.github.io/chosen/) - [DataTables 1.10.0-dev](http://www.sprymedia.co.uk) - [Nestable jQuery Plugin](http://dbushell.github.io/Nestable/) - [Lightbox for Bootstrap 3](https://github.com/ashleydw/lightbox) diff --git a/public/default/css/bootstrap-multiselect.css b/public/default/css/bootstrap-multiselect.css deleted file mode 100755 index d982bd70..00000000 --- a/public/default/css/bootstrap-multiselect.css +++ /dev/null @@ -1 +0,0 @@ -.multiselect-container{position:absolute;list-style-type:none;margin:0;padding:0}.multiselect-container .input-group{margin:5px}.multiselect-container>li{padding:0}.multiselect-container>li>a.multiselect-all label{font-weight:700}.multiselect-container>li>label.multiselect-group{margin:0;padding:3px 20px;height:100%;font-weight:700}.multiselect-container>li>a{padding:0}.multiselect-container>li>a>label{margin:0;height:100%;cursor:pointer;font-weight:400;padding:3px 20px 3px 40px}.multiselect-container>li>a>label.radio,.multiselect-container>li>a>label.checkbox{margin:0}.multiselect-container>li>a>label>input[type=checkbox]{margin-bottom:5px}.btn-group>.btn-group:nth-child(2)>.multiselect.btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.form-inline .multiselect-container label.checkbox,.form-inline .multiselect-container label.radio{padding:3px 20px 3px 40px}.form-inline .multiselect-container li a label.checkbox input[type=checkbox],.form-inline .multiselect-container li a label.radio input[type=radio]{margin-left:-20px;margin-right:0} \ No newline at end of file diff --git a/public/default/css/formitems/select/chosen-sprite.png b/public/default/css/formitems/select/chosen-sprite.png new file mode 100755 index 0000000000000000000000000000000000000000..c57da70b4b5b1e08a6977ddde182677af0e5e1b8 GIT binary patch literal 538 zcmV+#0_FXQP)cz2)-WJLkv8J@4bb5L`rsE?Kc|FrXHkKz)ov z76MHYM&Apx%05P7orE!>9=yZ~6O0^V?1%{=1UASqa<2Pgnk7fs!OIs9gh{NCN+@=) z>Gfttd5uq;oeR{%NHjtqV~jEQeY?tDff=(jqx>~SZ_e+iN26HR*`0Q!Re)~HD85p> zbL()Mw}bI^#`7wp0+cv&7*LhrtOmR)?PK>(-BeLm#jL5Jfogv-QS(TBnUb;))Krqm zD}uDDeVLNhm1G*pFB`O?iA=dnWBEpqHk8Yh%Qu45EIG=&F-dDmt|;|nN@|3lOkVZ7>z*~a1?_t?U)c+&|JFJke1`&0-a z#PjhRlg?=$KTo4|rU@NyV_fzDy@>h!lVyKShsO8>V>$xyIXRbHK%H~^Aaz=s$Jz^V zlb?KfaKdZqu3^#m$mintvgJ15@j`sb2Zr%69Sn=xN01Tm5r)NQanT=jhwm7zqj2>O cEB}D~0$b-QdD7|v=>Px#07*qoM6N<$g6AXnUH||9 literal 0 HcmV?d00001 diff --git a/public/default/css/formitems/select/chosen-sprite@2x.png b/public/default/css/formitems/select/chosen-sprite@2x.png new file mode 100755 index 0000000000000000000000000000000000000000..6b50545202cb4770039362c55025b0b9824663ad GIT binary patch literal 738 zcmV<80v-K{P)oJoIWh{eAG@xkM<0ryd(K3(} zP8JV&;uuIJ4nL%g8!wSG9E$P+3QVMGgj><+00}M5I5kMzaT<~M;uJ`UhLfbp9Ahdsrux5(g+(>Q*+9wU{AuYPH0}W_u4`|q(9c->{ zt>Jn|lbhH<_x5jU6prFi#S}&XMZ=~Y5VyC3+ZN%hXciz8 zPcLpJgbIK#a49e31-%wf2zh2F&&(Nq;AL%4zA(=QJRGq`sx3y3#0_cg9Fim739XTOu1NKKjlWs`52Q+3 Uja*K~(*OVf07*qoM6N<$g3mu-GXMYp literal 0 HcmV?d00001 diff --git a/public/default/css/formitems/select/chosen.css b/public/default/css/formitems/select/chosen.css new file mode 100755 index 00000000..e7ea0922 --- /dev/null +++ b/public/default/css/formitems/select/chosen.css @@ -0,0 +1,450 @@ +/*! +Chosen, a Select Box Enhancer for jQuery and Prototype +by Patrick Filler for Harvest, http://getharvest.com + +Version 1.4.2 +Full source at https://github.com/harvesthq/chosen +Copyright (c) 2011-2015 Harvest http://getharvest.com + +MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md +This file is generated by `grunt build`, do not edit it by hand. +*/ + +/* @group Base */ +.chosen-container { + position: relative; + display: inline-block; + vertical-align: middle; + font-size: 13px; + zoom: 1; + *display: inline; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} +.chosen-container * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.chosen-container .chosen-drop { + position: absolute; + top: 100%; + left: -9999px; + z-index: 1010; + width: 100%; + border: 1px solid #aaa; + border-top: 0; + background: #fff; + box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); +} +.chosen-container.chosen-with-drop .chosen-drop { + left: 0; +} +.chosen-container a { + cursor: pointer; +} +.chosen-container .search-choice .group-name, .chosen-container .chosen-single .group-name { + margin-right: 4px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + font-weight: normal; + color: #999999; +} +.chosen-container .search-choice .group-name:after, .chosen-container .chosen-single .group-name:after { + content: ":"; + padding-left: 2px; + vertical-align: top; +} + +/* @end */ +/* @group Single Chosen */ +.chosen-container-single .chosen-single { + position: relative; + display: block; + overflow: hidden; + padding: 0 0 0 8px; + height: 25px; + border: 1px solid #aaa; + border-radius: 5px; + background-color: #fff; + background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4)); + background: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background-clip: padding-box; + box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1); + color: #444; + text-decoration: none; + white-space: nowrap; + line-height: 24px; +} +.chosen-container-single .chosen-default { + color: #999; +} +.chosen-container-single .chosen-single span { + display: block; + overflow: hidden; + margin-right: 26px; + text-overflow: ellipsis; + white-space: nowrap; +} +.chosen-container-single .chosen-single-with-deselect span { + margin-right: 38px; +} +.chosen-container-single .chosen-single abbr { + position: absolute; + top: 6px; + right: 26px; + display: block; + width: 12px; + height: 12px; + background: url('chosen-sprite.png') -42px 1px no-repeat; + font-size: 1px; +} +.chosen-container-single .chosen-single abbr:hover { + background-position: -42px -10px; +} +.chosen-container-single.chosen-disabled .chosen-single abbr:hover { + background-position: -42px -10px; +} +.chosen-container-single .chosen-single div { + position: absolute; + top: 0; + right: 0; + display: block; + width: 18px; + height: 100%; +} +.chosen-container-single .chosen-single div b { + display: block; + width: 100%; + height: 100%; + background: url('chosen-sprite.png') no-repeat 0px 2px; +} +.chosen-container-single .chosen-search { + position: relative; + z-index: 1010; + margin: 0; + padding: 3px 4px; + white-space: nowrap; +} +.chosen-container-single .chosen-search input[type="text"] { + margin: 1px 0; + padding: 4px 20px 4px 5px; + width: 100%; + height: auto; + outline: 0; + border: 1px solid #aaa; + background: white url('chosen-sprite.png') no-repeat 100% -20px; + background: url('chosen-sprite.png') no-repeat 100% -20px; + font-size: 1em; + font-family: sans-serif; + line-height: normal; + border-radius: 0; +} +.chosen-container-single .chosen-drop { + margin-top: -1px; + border-radius: 0 0 4px 4px; + background-clip: padding-box; +} +.chosen-container-single.chosen-container-single-nosearch .chosen-search { + position: absolute; + left: -9999px; +} + +/* @end */ +/* @group Results */ +.chosen-container .chosen-results { + color: #444; + position: relative; + overflow-x: hidden; + overflow-y: auto; + margin: 0 4px 4px 0; + padding: 0 0 0 4px; + max-height: 240px; + -webkit-overflow-scrolling: touch; +} +.chosen-container .chosen-results li { + display: none; + margin: 0; + padding: 5px 6px; + list-style: none; + line-height: 15px; + word-wrap: break-word; + -webkit-touch-callout: none; +} +.chosen-container .chosen-results li.active-result { + display: list-item; + cursor: pointer; +} +.chosen-container .chosen-results li.disabled-result { + display: list-item; + color: #ccc; + cursor: default; +} +.chosen-container .chosen-results li.highlighted { + background-color: #3875d7; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc)); + background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%); + background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%); + background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%); + background-image: linear-gradient(#3875d7 20%, #2a62bc 90%); + color: #fff; +} +.chosen-container .chosen-results li.no-results { + color: #777; + display: list-item; + background: #f4f4f4; +} +.chosen-container .chosen-results li.group-result { + display: list-item; + font-weight: bold; + cursor: default; +} +.chosen-container .chosen-results li.group-option { + padding-left: 15px; +} +.chosen-container .chosen-results li em { + font-style: normal; + text-decoration: underline; +} + +/* @end */ +/* @group Multi Chosen */ +.chosen-container-multi .chosen-choices { + position: relative; + overflow: hidden; + margin: 0; + padding: 0 5px; + width: 100%; + height: auto !important; + height: 1%; + border: 1px solid #aaa; + background-color: #fff; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); + background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%); + background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%); + background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%); + background-image: linear-gradient(#eeeeee 1%, #ffffff 15%); + cursor: text; +} +.chosen-container-multi .chosen-choices li { + float: left; + list-style: none; +} +.chosen-container-multi .chosen-choices li.search-field { + margin: 0; + padding: 0; + white-space: nowrap; +} +.chosen-container-multi .chosen-choices li.search-field input[type="text"] { + margin: 1px 0; + padding: 0; + height: 25px; + outline: 0; + border: 0 !important; + background: transparent !important; + box-shadow: none; + color: #999; + font-size: 100%; + font-family: sans-serif; + line-height: normal; + border-radius: 0; +} +.chosen-container-multi .chosen-choices li.search-choice { + position: relative; + margin: 3px 5px 3px 0; + padding: 3px 20px 3px 5px; + border: 1px solid #aaa; + max-width: 100%; + border-radius: 3px; + background-color: #eeeeee; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); + background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-size: 100% 19px; + background-repeat: repeat-x; + background-clip: padding-box; + box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05); + color: #333; + line-height: 13px; + cursor: default; +} +.chosen-container-multi .chosen-choices li.search-choice span { + word-wrap: break-word; +} +.chosen-container-multi .chosen-choices li.search-choice .search-choice-close { + position: absolute; + top: 4px; + right: 3px; + display: block; + width: 12px; + height: 12px; + background: url('chosen-sprite.png') -42px 1px no-repeat; + font-size: 1px; +} +.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover { + background-position: -42px -10px; +} +.chosen-container-multi .chosen-choices li.search-choice-disabled { + padding-right: 5px; + border: 1px solid #ccc; + background-color: #e4e4e4; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); + background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + color: #666; +} +.chosen-container-multi .chosen-choices li.search-choice-focus { + background: #d4d4d4; +} +.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close { + background-position: -42px -10px; +} +.chosen-container-multi .chosen-results { + margin: 0; + padding: 0; +} +.chosen-container-multi .chosen-drop .result-selected { + display: list-item; + color: #ccc; + cursor: default; +} + +/* @end */ +/* @group Active */ +.chosen-container-active .chosen-single { + border: 1px solid #5897fb; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); +} +.chosen-container-active.chosen-with-drop .chosen-single { + border: 1px solid #aaa; + -moz-border-radius-bottomright: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomleft: 0; + border-bottom-left-radius: 0; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff)); + background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%); + background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%); + background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%); + background-image: linear-gradient(#eeeeee 20%, #ffffff 80%); + box-shadow: 0 1px 0 #fff inset; +} +.chosen-container-active.chosen-with-drop .chosen-single div { + border-left: none; + background: transparent; +} +.chosen-container-active.chosen-with-drop .chosen-single div b { + background-position: -18px 2px; +} +.chosen-container-active .chosen-choices { + border: 1px solid #5897fb; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); +} +.chosen-container-active .chosen-choices li.search-field input[type="text"] { + color: #222 !important; +} + +/* @end */ +/* @group Disabled Support */ +.chosen-disabled { + opacity: 0.5 !important; + cursor: default; +} +.chosen-disabled .chosen-single { + cursor: default; +} +.chosen-disabled .chosen-choices .search-choice .search-choice-close { + cursor: default; +} + +/* @end */ +/* @group Right to Left */ +.chosen-rtl { + text-align: right; +} +.chosen-rtl .chosen-single { + overflow: visible; + padding: 0 8px 0 0; +} +.chosen-rtl .chosen-single span { + margin-right: 0; + margin-left: 26px; + direction: rtl; +} +.chosen-rtl .chosen-single-with-deselect span { + margin-left: 38px; +} +.chosen-rtl .chosen-single div { + right: auto; + left: 3px; +} +.chosen-rtl .chosen-single abbr { + right: auto; + left: 26px; +} +.chosen-rtl .chosen-choices li { + float: right; +} +.chosen-rtl .chosen-choices li.search-field input[type="text"] { + direction: rtl; +} +.chosen-rtl .chosen-choices li.search-choice { + margin: 3px 5px 3px 0; + padding: 3px 5px 3px 19px; +} +.chosen-rtl .chosen-choices li.search-choice .search-choice-close { + right: auto; + left: 4px; +} +.chosen-rtl.chosen-container-single-nosearch .chosen-search, +.chosen-rtl .chosen-drop { + left: 9999px; +} +.chosen-rtl.chosen-container-single .chosen-results { + margin: 0 0 4px 4px; + padding: 0 4px 0 0; +} +.chosen-rtl .chosen-results li.group-option { + padding-right: 15px; + padding-left: 0; +} +.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div { + border-right: none; +} +.chosen-rtl .chosen-search input[type="text"] { + padding: 4px 5px 4px 20px; + background: white url('chosen-sprite.png') no-repeat -30px -20px; + background: url('chosen-sprite.png') no-repeat -30px -20px; + direction: rtl; +} +.chosen-rtl.chosen-container-single .chosen-single div b { + background-position: 6px 2px; +} +.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b { + background-position: -12px 2px; +} + +/* @end */ +/* @group Retina compatibility */ +@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) { + .chosen-rtl .chosen-search input[type="text"], + .chosen-container-single .chosen-single abbr, + .chosen-container-single .chosen-single div b, + .chosen-container-single .chosen-search input[type="text"], + .chosen-container-multi .chosen-choices .search-choice .search-choice-close, + .chosen-container .chosen-results-scroll-down span, + .chosen-container .chosen-results-scroll-up span { + background-image: url('chosen-sprite@2x.png') !important; + background-size: 52px 37px !important; + background-repeat: no-repeat !important; + } +} +/* @end */ diff --git a/public/default/js/bootstrap-multiselect.js b/public/default/js/bootstrap-multiselect.js deleted file mode 100755 index 3e21e407..00000000 --- a/public/default/js/bootstrap-multiselect.js +++ /dev/null @@ -1,1180 +0,0 @@ -/** - * Bootstrap Multiselect v0.9.8 (https://github.com/davidstutz/bootstrap-multiselect) - * - * Copyright 2012 - 2014 David Stutz - * - * Dual licensed under the BSD-3-Clause and the Apache License, Version 2.0. - */ -!function($) { - - "use strict";// jshint ;_; - - if (typeof ko !== 'undefined' && ko.bindingHandlers && !ko.bindingHandlers.multiselect) { - ko.bindingHandlers.multiselect = { - - init: function (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { - - var listOfSelectedItems = allBindingsAccessor().selectedOptions; - var config = ko.utils.unwrapObservable(valueAccessor()); - - $(element).multiselect(config); - - if (isObservableArray(listOfSelectedItems)) { - - // Set the initial selection state on the multiselect list. - $(element).multiselect('select', ko.utils.unwrapObservable(listOfSelectedItems)); - - // Subscribe to the selectedOptions: ko.observableArray - listOfSelectedItems.subscribe(function (changes) { - var addedArray = [], deletedArray = []; - forEach(changes, function (change) { - switch (change.status) { - case 'added': - addedArray.push(change.value); - break; - case 'deleted': - deletedArray.push(change.value); - break; - } - }); - - if (addedArray.length > 0) { - $(element).multiselect('select', addedArray); - } - - if (deletedArray.length > 0) { - $(element).multiselect('deselect', deletedArray); - } - }, null, "arrayChange"); - } - }, - - update: function (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { - - var listOfItems = allBindingsAccessor().options, - ms = $(element).data('multiselect'), - config = ko.utils.unwrapObservable(valueAccessor()); - - if (isObservableArray(listOfItems)) { - // Subscribe to the options: ko.observableArray incase it changes later - listOfItems.subscribe(function (theArray) { - $(element).multiselect('rebuild'); - }); - } - - if (!ms) { - $(element).multiselect(config); - } - else { - ms.updateOriginalOptions(); - } - } - }; - } - - function isObservableArray(obj) { - return ko.isObservable(obj) && !(obj.destroyAll === undefined); - } - - function forEach(array, callback) { - for (var index = 0; index < array.length; ++index) { - callback(array[index]); - } - } - - /** - * Constructor to create a new multiselect using the given select. - * - * @param {jQuery} select - * @param {Object} options - * @returns {Multiselect} - */ - function Multiselect(select, options) { - - this.options = this.mergeOptions(options); - this.$select = $(select); - - // Initialization. - // We have to clone to create a new reference. - this.originalOptions = this.$select.clone()[0].options; - this.query = ''; - this.searchTimeout = null; - - this.options.multiple = this.$select.attr('multiple') === "multiple"; - this.options.onChange = $.proxy(this.options.onChange, this); - this.options.onDropdownShow = $.proxy(this.options.onDropdownShow, this); - this.options.onDropdownHide = $.proxy(this.options.onDropdownHide, this); - this.options.onDropdownShown = $.proxy(this.options.onDropdownShown, this); - this.options.onDropdownHidden = $.proxy(this.options.onDropdownHidden, this); - - // Build select all if enabled. - this.buildContainer(); - this.buildButton(); - this.buildDropdown(); - this.buildSelectAll(); - this.buildDropdownOptions(); - this.buildFilter(); - - this.updateButtonText(); - this.updateSelectAll(); - - if (this.options.disableIfEmpty) { - this.disableIfEmpty(); - } - - this.$select.hide().after(this.$container); - }; - - Multiselect.prototype = { - - defaults: { - /** - * Default text function will either print 'None selected' in case no - * option is selected or a list of the selected options up to a length - * of 3 selected options. - * - * @param {jQuery} options - * @param {jQuery} select - * @returns {String} - */ - buttonText: function(options, select) { - if (options.length === 0) { - return this.nonSelectedText + ' '; - } - else { - if (options.length > this.numberDisplayed) { - return options.length + ' ' + this.nSelectedText + ' '; - } - else { - var selected = ''; - options.each(function() { - var label = ($(this).attr('label') !== undefined) ? $(this).attr('label') : $(this).html(); - - selected += label + ', '; - }); - return selected.substr(0, selected.length - 2) + ' '; - } - } - }, - /** - * Updates the title of the button similar to the buttonText function. - * - * @param {jQuery} options - * @param {jQuery} select - * @returns {@exp;selected@call;substr} - */ - buttonTitle: function(options, select) { - if (options.length === 0) { - return this.nonSelectedText; - } - else { - var selected = ''; - options.each(function () { - selected += $(this).text() + ', '; - }); - return selected.substr(0, selected.length - 2); - } - }, - /** - * Create a label. - * - * @param {jQuery} element - * @returns {String} - */ - label: function(element){ - return $(element).attr('label') || $(element).html(); - }, - /** - * Triggered on change of the multiselect. - * - * Not triggered when selecting/deselecting options manually. - * - * @param {jQuery} option - * @param {Boolean} checked - */ - onChange : function(option, checked) { - - }, - /** - * Triggered when the dropdown is shown. - * - * @param {jQuery} event - */ - onDropdownShow: function(event) { - - }, - /** - * Triggered when the dropdown is hidden. - * - * @param {jQuery} event - */ - onDropdownHide: function(event) { - - }, - /** - * Triggered after the dropdown is shown. - * - * @param {jQuery} event - */ - onDropdownShown: function(event) { - - }, - /** - * Triggered after the dropdown is hidden. - * - * @param {jQuery} event - */ - onDropdownHidden: function(event) { - - }, - buttonClass: 'btn btn-default', - dropRight: false, - selectedClass: 'active', - buttonWidth: 'auto', - buttonContainer: '
      ', - // Maximum height of the dropdown menu. - // If maximum height is exceeded a scrollbar will be displayed. - maxHeight: false, - checkboxName: false, - includeSelectAllOption: false, - includeSelectAllIfMoreThan: 0, - selectAllText: ' Select all', - selectAllValue: 'multiselect-all', - enableFiltering: false, - enableCaseInsensitiveFiltering: false, - filterPlaceholder: 'Search', - // possible options: 'text', 'value', 'both' - filterBehavior: 'text', - preventInputChangeEvent: false, - nonSelectedText: 'None selected', - nSelectedText: 'selected', - numberDisplayed: 3, - disableIfEmpty: false, - templates: { - button: '', - ul: '', - filter: '
    • ', - li: '
    • ', - divider: '
    • ', - liGroup: '
    • ' - } - }, - - constructor: Multiselect, - - /** - * Builds the container of the multiselect. - */ - buildContainer: function() { - this.$container = $(this.options.buttonContainer); - this.$container.on('show.bs.dropdown', this.options.onDropdownShow); - this.$container.on('hide.bs.dropdown', this.options.onDropdownHide); - this.$container.on('shown.bs.dropdown', this.options.onDropdownShown); - this.$container.on('hidden.bs.dropdown', this.options.onDropdownHidden); - }, - - /** - * Builds the button of the multiselect. - */ - buildButton: function() { - this.$button = $(this.options.templates.button).addClass(this.options.buttonClass); - - // Adopt active state. - if (this.$select.prop('disabled')) { - this.disable(); - } - else { - this.enable(); - } - - // Manually add button width if set. - if (this.options.buttonWidth && this.options.buttonWidth !== 'auto') { - this.$button.css({ - 'width' : this.options.buttonWidth - }); - this.$container.css({ - 'width': this.options.buttonWidth - }); - } - - // Keep the tab index from the select. - var tabindex = this.$select.attr('tabindex'); - if (tabindex) { - this.$button.attr('tabindex', tabindex); - } - - this.$container.prepend(this.$button); - }, - - /** - * Builds the ul representing the dropdown menu. - */ - buildDropdown: function() { - - // Build ul. - this.$ul = $(this.options.templates.ul); - - if (this.options.dropRight) { - this.$ul.addClass('pull-right'); - } - - // Set max height of dropdown menu to activate auto scrollbar. - if (this.options.maxHeight) { - // TODO: Add a class for this option to move the css declarations. - this.$ul.css({ - 'max-height': this.options.maxHeight + 'px', - 'overflow-y': 'auto', - 'overflow-x': 'hidden' - }); - } - - this.$container.append(this.$ul); - }, - - /** - * Build the dropdown options and binds all nessecary events. - * - * Uses createDivider and createOptionValue to create the necessary options. - */ - buildDropdownOptions: function() { - - this.$select.children().each($.proxy(function(index, element) { - - // Support optgroups and options without a group simultaneously. - var tag = $(element).prop('tagName') - .toLowerCase(); - - if ($(element).prop('value') === this.options.selectAllValue) { - return; - } - - if (tag === 'optgroup') { - this.createOptgroup(element); - } - else if (tag === 'option') { - - if ($(element).data('role') === 'divider') { - this.createDivider(); - } - else { - this.createOptionValue(element); - } - - } - - // Other illegal tags will be ignored. - }, this)); - - // Bind the change event on the dropdown elements. - $('li input', this.$ul).on('change', $.proxy(function(event) { - var $target = $(event.target); - - var checked = $target.prop('checked') || false; - var isSelectAllOption = $target.val() === this.options.selectAllValue; - - // Apply or unapply the configured selected class. - if (this.options.selectedClass) { - if (checked) { - $target.parents('li') - .addClass(this.options.selectedClass); - } - else { - $target.parents('li') - .removeClass(this.options.selectedClass); - } - } - - // Get the corresponding option. - var value = $target.val(); - var $option = this.getOptionByValue(value); - - var $optionsNotThis = $('option', this.$select).not($option); - var $checkboxesNotThis = $('input', this.$container).not($target); - - if (isSelectAllOption) { - if (checked) { - this.selectAll(); - } - else { - this.deselectAll(); - } - } - - if(!isSelectAllOption){ - if (checked) { - $option.prop('selected', true); - - if (this.options.multiple) { - // Simply select additional option. - $option.prop('selected', true); - } - else { - // Unselect all other options and corresponding checkboxes. - if (this.options.selectedClass) { - $($checkboxesNotThis).parents('li').removeClass(this.options.selectedClass); - } - - $($checkboxesNotThis).prop('checked', false); - $optionsNotThis.prop('selected', false); - - // It's a single selection, so close. - this.$button.click(); - } - - if (this.options.selectedClass === "active") { - $optionsNotThis.parents("a").css("outline", ""); - } - } - else { - // Unselect option. - $option.prop('selected', false); - } - } - - this.$select.change(); - - this.updateButtonText(); - this.updateSelectAll(); - - this.options.onChange($option, checked); - - if(this.options.preventInputChangeEvent) { - return false; - } - }, this)); - - $('li a', this.$ul).on('touchstart click', function(event) { - event.stopPropagation(); - - var $target = $(event.target); - - if (event.shiftKey) { - var checked = $target.prop('checked') || false; - - if (checked) { - var prev = $target.parents('li:last') - .siblings('li[class="active"]:first'); - - var currentIdx = $target.parents('li') - .index(); - var prevIdx = prev.index(); - - if (currentIdx > prevIdx) { - $target.parents("li:last").prevUntil(prev).each( - function() { - $(this).find("input:first").prop("checked", true) - .trigger("change"); - } - ); - } - else { - $target.parents("li:last").nextUntil(prev).each( - function() { - $(this).find("input:first").prop("checked", true) - .trigger("change"); - } - ); - } - } - } - - $target.blur(); - }); - - // Keyboard support. - this.$container.off('keydown.multiselect').on('keydown.multiselect', $.proxy(function(event) { - if ($('input[type="text"]', this.$container).is(':focus')) { - return; - } - if ((event.keyCode === 9 || event.keyCode === 27) - && this.$container.hasClass('open')) { - - // Close on tab or escape. - this.$button.click(); - } - else { - var $items = $(this.$container).find("li:not(.divider):not(.disabled) a").filter(":visible"); - - if (!$items.length) { - return; - } - - var index = $items.index($items.filter(':focus')); - - // Navigation up. - if (event.keyCode === 38 && index > 0) { - index--; - } - // Navigate down. - else if (event.keyCode === 40 && index < $items.length - 1) { - index++; - } - else if (!~index) { - index = 0; - } - - var $current = $items.eq(index); - $current.focus(); - - if (event.keyCode === 32 || event.keyCode === 13) { - var $checkbox = $current.find('input'); - - $checkbox.prop("checked", !$checkbox.prop("checked")); - $checkbox.change(); - } - - event.stopPropagation(); - event.preventDefault(); - } - }, this)); - }, - - /** - * Create an option using the given select option. - * - * @param {jQuery} element - */ - createOptionValue: function(element) { - if ($(element).is(':selected')) { - $(element).prop('selected', true); - } - - // Support the label attribute on options. - var label = this.options.label(element); - var value = $(element).val(); - var inputType = this.options.multiple ? "checkbox" : "radio"; - - var $li = $(this.options.templates.li); - $('label', $li).addClass(inputType); - - if (this.options.checkboxName) { - $('label', $li).append(''); - } - else { - $('label', $li).append(''); - } - - var selected = $(element).prop('selected') || false; - var $checkbox = $('input', $li); - $checkbox.val(value); - - if (value === this.options.selectAllValue) { - $li.addClass("multiselect-item multiselect-all"); - $checkbox.parent().parent() - .addClass('multiselect-all'); - } - - $('label', $li).append(" " + label); - - this.$ul.append($li); - - if ($(element).is(':disabled')) { - $checkbox.attr('disabled', 'disabled') - .prop('disabled', true) - .parents('a') - .attr("tabindex", "-1") - .parents('li') - .addClass('disabled'); - } - - $checkbox.prop('checked', selected); - - if (selected && this.options.selectedClass) { - $checkbox.parents('li') - .addClass(this.options.selectedClass); - } - }, - - /** - * Creates a divider using the given select option. - * - * @param {jQuery} element - */ - createDivider: function(element) { - var $divider = $(this.options.templates.divider); - this.$ul.append($divider); - }, - - /** - * Creates an optgroup. - * - * @param {jQuery} group - */ - createOptgroup: function(group) { - var groupName = $(group).prop('label'); - - // Add a header for the group. - var $li = $(this.options.templates.liGroup); - $('label', $li).text(groupName); - - this.$ul.append($li); - - if ($(group).is(':disabled')) { - $li.addClass('disabled'); - } - - // Add the options of the group. - $('option', group).each($.proxy(function(index, element) { - this.createOptionValue(element); - }, this)); - }, - - /** - * Build the selct all. - * - * Checks if a select all has already been created. - */ - buildSelectAll: function() { - var alreadyHasSelectAll = this.hasSelectAll(); - - if (!alreadyHasSelectAll && this.options.includeSelectAllOption && this.options.multiple - && $('option', this.$select).length > this.options.includeSelectAllIfMoreThan) { - - // Check whether to add a divider after the select all. - if (this.options.includeSelectAllDivider) { - this.$ul.prepend($(this.options.templates.divider)); - } - - var $li = $(this.options.templates.li); - $('label', $li).addClass("checkbox"); - - if (this.options.checkboxName) { - $('label', $li).append(''); - } - else { - $('label', $li).append(''); - } - - var $checkbox = $('input', $li); - $checkbox.val(this.options.selectAllValue); - - $li.addClass("multiselect-item multiselect-all"); - $checkbox.parent().parent() - .addClass('multiselect-all'); - - $('label', $li).append(" " + this.options.selectAllText); - - this.$ul.prepend($li); - - $checkbox.prop('checked', false); - } - }, - - /** - * Builds the filter. - */ - buildFilter: function() { - - // Build filter if filtering OR case insensitive filtering is enabled and the number of options exceeds (or equals) enableFilterLength. - if (this.options.enableFiltering || this.options.enableCaseInsensitiveFiltering) { - var enableFilterLength = Math.max(this.options.enableFiltering, this.options.enableCaseInsensitiveFiltering); - - if (this.$select.find('option').length >= enableFilterLength) { - - this.$filter = $(this.options.templates.filter); - $('input', this.$filter).attr('placeholder', this.options.filterPlaceholder); - this.$ul.prepend(this.$filter); - - this.$filter.val(this.query).on('click', function(event) { - event.stopPropagation(); - }).on('input keydown', $.proxy(function(event) { - // This is useful to catch "keydown" events after the browser has updated the control. - clearTimeout(this.searchTimeout); - - this.searchTimeout = this.asyncFunction($.proxy(function() { - - if (this.query !== event.target.value) { - this.query = event.target.value; - - $.each($('li', this.$ul), $.proxy(function(index, element) { - var value = $('input', element).val(); - var text = $('label', element).text(); - - var filterCandidate = ''; - if ((this.options.filterBehavior === 'text')) { - filterCandidate = text; - } - else if ((this.options.filterBehavior === 'value')) { - filterCandidate = value; - } - else if (this.options.filterBehavior === 'both') { - filterCandidate = text + '\n' + value; - } - - if (value !== this.options.selectAllValue && text) { - // By default lets assume that element is not - // interesting for this search. - var showElement = false; - - if (this.options.enableCaseInsensitiveFiltering && filterCandidate.toLowerCase().indexOf(this.query.toLowerCase()) > -1) { - showElement = true; - } - else if (filterCandidate.indexOf(this.query) > -1) { - showElement = true; - } - - if (showElement) { - $(element).show().removeClass("filter-hidden"); - } - else { - $(element).hide().addClass("filter-hidden"); - } - } - }, this)); - } - - this.updateSelectAll(); - }, this), 300, this); - }, this)); - } - } - }, - - /** - * Unbinds the whole plugin. - */ - destroy: function() { - this.$container.remove(); - this.$select.show(); - this.$select.data('multiselect', null); - }, - - /** - * Refreshs the multiselect based on the selected options of the select. - */ - refresh: function() { - $('option', this.$select).each($.proxy(function(index, element) { - var $input = $('li input', this.$ul).filter(function() { - return $(this).val() === $(element).val(); - }); - - if ($(element).is(':selected')) { - $input.prop('checked', true); - - if (this.options.selectedClass) { - $input.parents('li') - .addClass(this.options.selectedClass); - } - } - else { - $input.prop('checked', false); - - if (this.options.selectedClass) { - $input.parents('li') - .removeClass(this.options.selectedClass); - } - } - - if ($(element).is(":disabled")) { - $input.attr('disabled', 'disabled') - .prop('disabled', true) - .parents('li') - .addClass('disabled'); - } - else { - $input.prop('disabled', false) - .parents('li') - .removeClass('disabled'); - } - }, this)); - - this.updateButtonText(); - this.updateSelectAll(); - }, - - /** - * Select all options of the given values. - * - * If triggerOnChange is set to true, the on change event is triggered if - * and only if one value is passed. - * - * @param {Array} selectValues - * @param {Boolean} triggerOnChange - */ - select: function(selectValues, triggerOnChange) { - if(!$.isArray(selectValues)) { - selectValues = [selectValues]; - } - - for (var i = 0; i < selectValues.length; i++) { - var value = selectValues[i]; - - var $option = this.getOptionByValue(value); - var $checkbox = this.getInputByValue(value); - - if($option === undefined || $checkbox === undefined) { - continue; - } - - if (!this.options.multiple) { - this.deselectAll(false); - } - - if (this.options.selectedClass) { - $checkbox.parents('li') - .addClass(this.options.selectedClass); - } - - $checkbox.prop('checked', true); - $option.prop('selected', true); - } - - this.updateButtonText(); - - if (triggerOnChange && selectValues.length === 1) { - this.options.onChange($option, true); - } - }, - - /** - * Clears all selected items. - */ - clearSelection: function () { - this.deselectAll(false); - this.updateButtonText(); - this.updateSelectAll(); - }, - - /** - * Deselects all options of the given values. - * - * If triggerOnChange is set to true, the on change event is triggered, if - * and only if one value is passed. - * - * @param {Array} deselectValues - * @param {Boolean} triggerOnChange - */ - deselect: function(deselectValues, triggerOnChange) { - if(!$.isArray(deselectValues)) { - deselectValues = [deselectValues]; - } - - for (var i = 0; i < deselectValues.length; i++) { - - var value = deselectValues[i]; - - var $option = this.getOptionByValue(value); - var $checkbox = this.getInputByValue(value); - - if($option === undefined || $checkbox === undefined) { - continue; - } - - if (this.options.selectedClass) { - $checkbox.parents('li') - .removeClass(this.options.selectedClass); - } - - $checkbox.prop('checked', false); - $option.prop('selected', false); - } - - this.updateButtonText(); - - if (triggerOnChange && deselectValues.length === 1) { - this.options.onChange($option, false); - } - }, - - /** - * Selects all enabled & visible options. - */ - selectAll: function () { - var allCheckboxes = $("li input[type='checkbox']:enabled", this.$ul); - var visibleCheckboxes = allCheckboxes.filter(":visible"); - var allCheckboxesCount = allCheckboxes.length; - var visibleCheckboxesCount = visibleCheckboxes.length; - - visibleCheckboxes.prop('checked', true); - $("li:not(.divider):not(.disabled)", this.$ul).filter(":visible").addClass(this.options.selectedClass); - - if (allCheckboxesCount === visibleCheckboxesCount) { - $("option:enabled", this.$select).prop('selected', true); - } - else { - var values = visibleCheckboxes.map(function() { - return $(this).val(); - }).get(); - - $("option:enabled", this.$select).filter(function(index) { - return $.inArray($(this).val(), values) !== -1; - }).prop('selected', true); - } - }, - - /** - * Deselects all options. - * - * If justVisible is true or not specified, only visible options are deselected. - * - * @param {Boolean} justVisible - */ - deselectAll: function (justVisible) { - var justVisible = typeof justVisible === 'undefined' ? true : justVisible; - - if(justVisible) { - var visibleCheckboxes = $("li input[type='checkbox']:enabled", this.$ul).filter(":visible"); - visibleCheckboxes.prop('checked', false); - - var values = visibleCheckboxes.map(function() { - return $(this).val(); - }).get(); - - $("option:enabled", this.$select).filter(function(index) { - return $.inArray($(this).val(), values) !== -1; - }).prop('selected', false); - - if (this.options.selectedClass) { - $("li:not(.divider):not(.disabled)", this.$ul).filter(":visible").removeClass(this.options.selectedClass); - } - } - else { - $("li input[type='checkbox']:enabled", this.$ul).prop('checked', false); - $("option:enabled", this.$select).prop('selected', false); - - if (this.options.selectedClass) { - $("li:not(.divider):not(.disabled)", this.$ul).removeClass(this.options.selectedClass); - } - } - }, - - /** - * Rebuild the plugin. - * - * Rebuilds the dropdown, the filter and the select all option. - */ - rebuild: function() { - this.$ul.html(''); - - // Important to distinguish between radios and checkboxes. - this.options.multiple = this.$select.attr('multiple') === "multiple"; - - this.buildSelectAll(); - this.buildDropdownOptions(); - this.buildFilter(); - - this.updateButtonText(); - this.updateSelectAll(); - - if (this.options.disableIfEmpty) { - this.disableIfEmpty(); - } - - if (this.options.dropRight) { - this.$ul.addClass('pull-right'); - } - }, - - /** - * The provided data will be used to build the dropdown. - * - * @param {Array} dataprovider - */ - dataprovider: function(dataprovider) { - var optionDOM = ""; - var groupCounter = 0; - - $.each(dataprovider, function (index, option) { - if ($.isArray(option.children)) { - groupCounter++; - optionDOM += ''; - - forEach(option.children, function(subOption) { - optionDOM += ''; - }); - - optionDOM += ''; - } - else { - optionDOM += ''; - } - }); - - this.$select.html(optionDOM); - this.rebuild(); - }, - - /** - * Enable the multiselect. - */ - enable: function() { - this.$select.prop('disabled', false); - this.$button.prop('disabled', false) - .removeClass('disabled'); - }, - - /** - * Disable the multiselect. - */ - disable: function() { - this.$select.prop('disabled', true); - this.$button.prop('disabled', true) - .addClass('disabled'); - }, - - /** - * Disable the multiselect if there are no options in the select. - */ - disableIfEmpty: function () { - if ($('option', this.$select).length <= 0) { - this.disable(); - } - else { - this.enable(); - } - }, - - /** - * Set the options. - * - * @param {Array} options - */ - setOptions: function(options) { - this.options = this.mergeOptions(options); - }, - - /** - * Merges the given options with the default options. - * - * @param {Array} options - * @returns {Array} - */ - mergeOptions: function(options) { - return $.extend(true, {}, this.defaults, options); - }, - - /** - * Checks whether a select all checkbox is present. - * - * @returns {Boolean} - */ - hasSelectAll: function() { - return $('li.' + this.options.selectAllValue, this.$ul).length > 0; - }, - - /** - * Updates the select all checkbox based on the currently displayed and selected checkboxes. - */ - updateSelectAll: function() { - if (this.hasSelectAll()) { - var allBoxes = $("li:not(.multiselect-item):not(.filter-hidden) input:enabled", this.$ul); - var allBoxesLength = allBoxes.length; - var checkedBoxesLength = allBoxes.filter(":checked").length; - var selectAllLi = $("li." + this.options.selectAllValue, this.$ul); - var selectAllInput = selectAllLi.find("input"); - - if (checkedBoxesLength > 0 && checkedBoxesLength === allBoxesLength) { - selectAllInput.prop("checked", true); - selectAllLi.addClass(this.options.selectedClass); - } - else { - selectAllInput.prop("checked", false); - selectAllLi.removeClass(this.options.selectedClass); - } - } - }, - - /** - * Update the button text and its title based on the currently selected options. - */ - updateButtonText: function() { - var options = this.getSelected(); - - // First update the displayed button text. - $('button.multiselect', this.$container).html(this.options.buttonText(options, this.$select)); - - // Now update the title attribute of the button. - $('button.multiselect', this.$container).attr('title', this.options.buttonTitle(options, this.$select)); - }, - - /** - * Get all selected options. - * - * @returns {jQUery} - */ - getSelected: function() { - return $('option', this.$select).filter(":selected"); - }, - - /** - * Gets a select option by its value. - * - * @param {String} value - * @returns {jQuery} - */ - getOptionByValue: function (value) { - - var options = $('option', this.$select); - var valueToCompare = value.toString(); - - for (var i = 0; i < options.length; i = i + 1) { - var option = options[i]; - if (option.value === valueToCompare) { - return $(option); - } - } - }, - - /** - * Get the input (radio/checkbox) by its value. - * - * @param {String} value - * @returns {jQuery} - */ - getInputByValue: function (value) { - - var checkboxes = $('li input', this.$ul); - var valueToCompare = value.toString(); - - for (var i = 0; i < checkboxes.length; i = i + 1) { - var checkbox = checkboxes[i]; - if (checkbox.value === valueToCompare) { - return $(checkbox); - } - } - }, - - /** - * Used for knockout integration. - */ - updateOriginalOptions: function() { - this.originalOptions = this.$select.clone()[0].options; - }, - - asyncFunction: function(callback, timeout, self) { - var args = Array.prototype.slice.call(arguments, 3); - return setTimeout(function() { - callback.apply(self || window, args); - }, timeout); - } - }; - - $.fn.multiselect = function(option, parameter, extraOptions) { - return this.each(function() { - var data = $(this).data('multiselect'); - var options = typeof option === 'object' && option; - - // Initialize the multiselect. - if (!data) { - data = new Multiselect(this, options); - $(this).data('multiselect', data); - } - - // Call multiselect method. - if (typeof option === 'string') { - data[option](parameter, extraOptions); - - if (option === 'destroy') { - $(this).data('multiselect', false); - } - } - }); - }; - - $.fn.multiselect.Constructor = Multiselect; - - $(function() { - $("select[data-role=multiselect]").multiselect(); - }); - -}(window.jQuery); diff --git a/public/default/js/formitems/select.js b/public/default/js/formitems/select.js deleted file mode 100644 index 50bee45c..00000000 --- a/public/default/js/formitems/select.js +++ /dev/null @@ -1,23 +0,0 @@ -$(function () -{ - $('.multiselect').multiselect({ - nonSelectedText: window.admin.lang.select.nothing, - nSelectedText: window.admin.lang.select.selected, - onChange: function(option, checked) - { - var select = this.$select; - var type = select.data('select-type'); - var nullable = select.data('nullable'); - if (type == 'single' && nullable) - { - var values = []; - select.find('option').each(function() { - if ($(this).val() !== option.val()) { - values.push($(this).val()); - } - }); - this.deselect(values); - } - } - }); -}); \ No newline at end of file diff --git a/public/default/js/formitems/select/chosen.jquery.min.js b/public/default/js/formitems/select/chosen.jquery.min.js new file mode 100755 index 00000000..22e38658 --- /dev/null +++ b/public/default/js/formitems/select/chosen.jquery.min.js @@ -0,0 +1,2 @@ +/* Chosen v1.4.2 | (c) 2011-2015 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */ +(function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),title:a.title?a.title:void 0,children:0,disabled:a.disabled,classes:a.className}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,title:a.title?a.title:void 0,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,group_label:null!=b?this.parsed[b].label:null,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"<",">":">",'"':""","'":"'","`":"`"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1},AbstractChosen.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?""+a.group_label+""+a.html:a.html},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(){var a=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return a.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(){var a=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return a.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f;for(b="",f=this.results_data,d=0,e=f.length;e>d;d++)c=f[d],b+=c.group?this.result_add_group(c):this.result_add_option(c),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(c)));return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match?this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):"":""},AbstractChosen.prototype.result_add_group=function(a){var b,c;return a.search_match||a.group_match?a.active_options>0?(b=[],b.push("group-result"),a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):"":""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l;for(this.no_results_clear(),d=0,f=this.get_search_text(),a=f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),i=new RegExp(a,"i"),c=this.get_search_regex(a),l=this.results_data,j=0,k=l.length;k>j;j++)b=l[j],b.search_match=!1,e=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(e=this.results_data[b.group_array_index],0===e.active_options&&e.search_match&&(d+=1),e.active_options+=1),b.search_text=b.group?b.label:b.html,(!b.group||this.group_search)&&(b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(d+=1),b.search_match?(f.length&&(g=b.search_text.search(i),h=b.search_text.substr(0,g+f.length)+""+b.search_text.substr(g+f.length),b.search_text=h.substr(0,g)+""+h.substr(g)),null!=e&&(e.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>d&&f.length?(this.update_results_content(""),this.no_results(f)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.get_search_regex=function(a){var b;return b=this.search_contains?"":"^",new RegExp(b+a,"i")},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(){var a=this;return setTimeout(function(){return a.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(){var c,d;c=a(this),d=c.data("chosen"),"destroy"===b&&d instanceof Chosen?d.destroy():d instanceof Chosen||c.data("chosen",new Chosen(this,b))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("
      ",c),this.is_multiple?this.container.html('
        '):this.container.html(''+this.default_text+'
          '),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("touchstart.chosen",function(b){return a.container_mousedown(b),b.preventDefault()}),this.container.bind("touchend.chosen",function(b){return a.container_mouseup(b),b.preventDefault()}),this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=a.originalEvent.deltaY||-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(){var a;return this.form_field.tabIndex?(a=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=a):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("
        • ",{"class":"search-choice"}).html(""+this.choice_label(b)+""),b.disabled?c.addClass("search-choice-disabled"):(d=a("",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(this.choice_label(c)),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,a.preventDefault(),this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after(''),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return a("
          ").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('
        • '+this.results_none_found+' ""
        • '),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:this.results_showing&&a.preventDefault();break;case 32:this.disable_search&&a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("
          ",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}).call(this); \ No newline at end of file diff --git a/public/default/js/formitems/select/init.js b/public/default/js/formitems/select/init.js new file mode 100644 index 00000000..c51bb244 --- /dev/null +++ b/public/default/js/formitems/select/init.js @@ -0,0 +1,14 @@ +$(function () +{ + $('.multiselect').each(function () + { + var $this = $(this); + var nullable = $this.data('nullable'); + $this.chosen({ + allow_single_deselect: nullable, + no_results_text: window.admin.lang.select.nothing, + placeholder_text_single: window.admin.lang.select.placeholder, + placeholder_text_multiple: window.admin.lang.select.placeholder, + }); + }); +}); \ No newline at end of file diff --git a/src/SleepingOwl/Admin/FormItems/Select.php b/src/SleepingOwl/Admin/FormItems/Select.php index 9a2920a2..59687771 100644 --- a/src/SleepingOwl/Admin/FormItems/Select.php +++ b/src/SleepingOwl/Admin/FormItems/Select.php @@ -16,9 +16,9 @@ public function initialize() { parent::initialize(); - AssetManager::addStyle('admin::default/css/bootstrap-multiselect.css'); - AssetManager::addScript('admin::default/js/bootstrap-multiselect.js'); - AssetManager::addScript('admin::default/js/formitems/select.js'); + AssetManager::addStyle('admin::default/css/formitems/select/chosen.css'); + AssetManager::addScript('admin::default/js/formitems/select/chosen.jquery.min.js'); + AssetManager::addScript('admin::default/js/formitems/select/init.js'); } public function model($model = null) diff --git a/src/lang/en/lang.php b/src/lang/en/lang.php index 2940fe1d..522c7400 100644 --- a/src/lang/en/lang.php +++ b/src/lang/en/lang.php @@ -62,8 +62,9 @@ ] ], 'select' => [ - 'nothing' => 'Nothing selected', - 'selected' => 'selected' + 'nothing' => 'Nothing selected', + 'selected' => 'selected', + 'placeholder' => 'Select from the list', ], 'image' => [ 'browse' => 'Select Image', diff --git a/src/lang/ru/lang.php b/src/lang/ru/lang.php index 221fb8a6..3a80fa0c 100644 --- a/src/lang/ru/lang.php +++ b/src/lang/ru/lang.php @@ -62,8 +62,9 @@ ] ], 'select' => [ - 'nothing' => 'Ничего не выбрано', - 'selected' => 'выбрано' + 'nothing' => 'Ничего не выбрано', + 'selected' => 'выбрано', + 'placeholder' => 'Выберите из списка', ], 'image' => [ 'browse' => 'Выбор изображения', diff --git a/src/views/default/formitem/select.blade.php b/src/views/default/formitem/select.blade.php index 7bd684c6..5f43f152 100644 --- a/src/views/default/formitem/select.blade.php +++ b/src/views/default/formitem/select.blade.php @@ -1,7 +1,10 @@
          - + @if ($nullable) + + @endif @foreach ($options as $optionValue => $optionLabel) @endforeach From b0e0fea44c755c9a5f701ef5d9cff0420ee143ba Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Tue, 12 May 2015 15:10:35 +0400 Subject: [PATCH 071/108] Session initialization added --- .../Admin/AdminServiceProvider.php | 2 + .../Admin/Helpers/StartSession.php | 50 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 src/SleepingOwl/Admin/Helpers/StartSession.php diff --git a/src/SleepingOwl/Admin/AdminServiceProvider.php b/src/SleepingOwl/Admin/AdminServiceProvider.php index e82dbead..61ffffcb 100644 --- a/src/SleepingOwl/Admin/AdminServiceProvider.php +++ b/src/SleepingOwl/Admin/AdminServiceProvider.php @@ -58,6 +58,8 @@ public function boot() __DIR__ . '/../../../public/' => public_path('packages/sleeping-owl/admin/'), ], 'assets'); + app('SleepingOwl\Admin\Helpers\StartSession')->run(); + Admin::instance(); $this->registerTemplate(); $this->registerProviders(); diff --git a/src/SleepingOwl/Admin/Helpers/StartSession.php b/src/SleepingOwl/Admin/Helpers/StartSession.php new file mode 100644 index 00000000..24ec87de --- /dev/null +++ b/src/SleepingOwl/Admin/Helpers/StartSession.php @@ -0,0 +1,50 @@ +encrypter = $encrypter; + $this->request = $request; + $this->manager = $manager; + } + + public function run() + { + $session = $this->startSession($this->request); + $this->request->setSession($session); + } + + protected function startSession(Request $request) + { + with($session = $this->getSession($request))->setRequestOnHandler($request); + + $session->start(); + + return $session; + } + + public function getSession(Request $request) + { + $session = $this->manager->driver(); + + $cookie = $request->cookies->get($session->getName()); + if ( ! is_null($cookie)) + { + $session->setId($this->encrypter->decrypt($cookie)); + } + + return $session; + } + +} \ No newline at end of file From 990a3e679dfce18c1e6726c8c7f6b7476cc1a9ea Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Wed, 13 May 2015 14:41:07 +0400 Subject: [PATCH 072/108] Administrator fix --- src/SleepingOwl/Admin/Commands/AdministratorsCommand.php | 5 ++--- src/SleepingOwl/AdminAuth/Entities/Administrator.php | 8 ++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/SleepingOwl/Admin/Commands/AdministratorsCommand.php b/src/SleepingOwl/Admin/Commands/AdministratorsCommand.php index 17bfac59..d6768bf7 100644 --- a/src/SleepingOwl/Admin/Commands/AdministratorsCommand.php +++ b/src/SleepingOwl/Admin/Commands/AdministratorsCommand.php @@ -1,6 +1,5 @@ $username, - 'password' => Hash::make($password), + 'password' => $password, 'name' => $name, ]); } catch (\Exception $e) @@ -194,7 +193,7 @@ protected function changePassword() return; } - Administrator::find($id)->fill(['password' => Hash::make($password)])->save(); + Administrator::find($id)->fill(['password' => $password])->save(); $this->info('Password was changed.'); } diff --git a/src/SleepingOwl/AdminAuth/Entities/Administrator.php b/src/SleepingOwl/AdminAuth/Entities/Administrator.php index ed554b3f..5d08cbe9 100644 --- a/src/SleepingOwl/AdminAuth/Entities/Administrator.php +++ b/src/SleepingOwl/AdminAuth/Entities/Administrator.php @@ -18,4 +18,12 @@ class Administrator extends \Eloquent implements AuthenticatableContract 'remember_token', ]; + public function setPasswordAttribute($value) + { + if ( ! empty($value)) + { + $this->attributes['password'] = Hash::make($value); + } + } + } \ No newline at end of file From 7feef80d7362caa93bb265e784894cbd9d96b93a Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Wed, 13 May 2015 16:47:18 +0400 Subject: [PATCH 073/108] Administrator fix --- src/SleepingOwl/AdminAuth/Entities/Administrator.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SleepingOwl/AdminAuth/Entities/Administrator.php b/src/SleepingOwl/AdminAuth/Entities/Administrator.php index 5d08cbe9..796963bb 100644 --- a/src/SleepingOwl/AdminAuth/Entities/Administrator.php +++ b/src/SleepingOwl/AdminAuth/Entities/Administrator.php @@ -1,5 +1,6 @@ Date: Thu, 14 May 2015 14:51:05 +0400 Subject: [PATCH 074/108] Images form item fix --- src/SleepingOwl/Admin/FormItems/Images.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SleepingOwl/Admin/FormItems/Images.php b/src/SleepingOwl/Admin/FormItems/Images.php index 3b06f97a..227ef047 100644 --- a/src/SleepingOwl/Admin/FormItems/Images.php +++ b/src/SleepingOwl/Admin/FormItems/Images.php @@ -39,6 +39,10 @@ public function value() { $value = []; } + if (is_string($value)) + { + $value = preg_split('/,/', $value, -1, PREG_SPLIT_NO_EMPTY); + } return $value; } From 8d3052c01c77eae4d710b118c7fa4e86e4528cc7 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Thu, 14 May 2015 16:07:18 +0400 Subject: [PATCH 075/108] Default administrator fix --- .../AdminAuth/Database/Seeders/AdministratorsTableSeeder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SleepingOwl/AdminAuth/Database/Seeders/AdministratorsTableSeeder.php b/src/SleepingOwl/AdminAuth/Database/Seeders/AdministratorsTableSeeder.php index fa22d365..3db0b1f3 100644 --- a/src/SleepingOwl/AdminAuth/Database/Seeders/AdministratorsTableSeeder.php +++ b/src/SleepingOwl/AdminAuth/Database/Seeders/AdministratorsTableSeeder.php @@ -13,7 +13,7 @@ public function run() $default = [ 'username' => 'admin', - 'password' => Hash::make('SleepingOwl'), + 'password' => 'SleepingOwl', 'name' => 'SleepingOwl Administrator' ]; From a4d74893486db8afb1b0c263012766ee76972301 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Mon, 18 May 2015 14:18:06 +0400 Subject: [PATCH 076/108] Lang fix --- src/SleepingOwl/Admin/Http/Controllers/AdminController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SleepingOwl/Admin/Http/Controllers/AdminController.php b/src/SleepingOwl/Admin/Http/Controllers/AdminController.php index 92a20b0a..cf6c1024 100644 --- a/src/SleepingOwl/Admin/Http/Controllers/AdminController.php +++ b/src/SleepingOwl/Admin/Http/Controllers/AdminController.php @@ -115,6 +115,10 @@ public function render($title, $content) public function getLang() { $lang = trans('admin::lang'); + if ($lang == 'admin::lang') + { + $lang = trans('admin::lang', [], 'messages', 'en'); + } $content = 'window.admin={}; window.admin.locale="' . App::getLocale() . '"; window.admin.token="' . csrf_token() . '"; window.admin.prefix="' . config('admin.prefix') . '"; window.admin.lang=' . json_encode($lang) . ';'; $response = new Response($content, 200, [ From 89490f4438bd5e6dd0d313a34e42b0c34f2fa37f Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Mon, 18 May 2015 14:32:47 +0400 Subject: [PATCH 077/108] Lang fix --- src/SleepingOwl/Admin/Http/Controllers/AuthController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/SleepingOwl/Admin/Http/Controllers/AuthController.php b/src/SleepingOwl/Admin/Http/Controllers/AuthController.php index 42496b25..ff2dac74 100644 --- a/src/SleepingOwl/Admin/Http/Controllers/AuthController.php +++ b/src/SleepingOwl/Admin/Http/Controllers/AuthController.php @@ -34,7 +34,12 @@ public function postLogin() { $rules = config('admin.auth.rules'); $data = Input::only(array_keys($rules)); - $validator = Validator::make($data, $rules, trans('admin::validation')); + $lang = trans('admin::validation'); + if ($lang == 'admin::validation') + { + $lang = []; + } + $validator = Validator::make($data, $rules, $lang); if ($validator->fails()) { return Redirect::back()->withInput()->withErrors($validator); From 49a3a4ccd1b2a60fe7f05c1441be6bae7ff2cc27 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Tue, 19 May 2015 13:37:09 +0400 Subject: [PATCH 078/108] Multiple scopes fix --- .../Admin/Display/DisplayTable.php | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/SleepingOwl/Admin/Display/DisplayTable.php b/src/SleepingOwl/Admin/Display/DisplayTable.php index b4434244..82e37a55 100644 --- a/src/SleepingOwl/Admin/Display/DisplayTable.php +++ b/src/SleepingOwl/Admin/Display/DisplayTable.php @@ -18,7 +18,7 @@ class DisplayTable implements Renderable, DisplayInterface protected $with = []; protected $repository; protected $apply; - protected $scope; + protected $scopes = []; protected $filters = []; protected $activeFilters = []; protected $controlActive = true; @@ -91,9 +91,9 @@ public function scope($scope = null) { if (is_null($scope)) { - return $this->scope; + return $this->scopes; } - $this->scope = func_get_args(); + $this->scopes[] = func_get_args(); return $this; } @@ -166,14 +166,16 @@ protected function initializeFilters() protected function modifyQuery($query) { - $scope = $this->scope(); - if ( ! is_null($scope)) + foreach ($this->scope() as $scope) { - $method = array_shift($scope); - call_user_func_array([ - $query, - $method - ], $scope); + if ( ! is_null($scope)) + { + $method = array_shift($scope); + call_user_func_array([ + $query, + $method + ], $scope); + } } $apply = $this->apply(); if ( ! is_null($apply)) From 014239a2625dd99b20bebc0923e18a2568a5bdd0 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Fri, 22 May 2015 01:30:46 +0400 Subject: [PATCH 079/108] Exception handler added --- src/SleepingOwl/Admin/Display/DisplayTable.php | 11 +++++++++-- src/SleepingOwl/Admin/FormItems/BaseFormItem.php | 11 +++++++++-- .../Admin/Helpers/ExceptionHandler.php | 16 ++++++++++++++++ 3 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 src/SleepingOwl/Admin/Helpers/ExceptionHandler.php diff --git a/src/SleepingOwl/Admin/Display/DisplayTable.php b/src/SleepingOwl/Admin/Display/DisplayTable.php index 82e37a55..ce041ae0 100644 --- a/src/SleepingOwl/Admin/Display/DisplayTable.php +++ b/src/SleepingOwl/Admin/Display/DisplayTable.php @@ -5,6 +5,7 @@ use Input; use SleepingOwl\Admin\Admin; use SleepingOwl\Admin\Columns\Column; +use SleepingOwl\Admin\Helpers\ExceptionHandler; use SleepingOwl\Admin\Interfaces\ColumnInterface; use SleepingOwl\Admin\Interfaces\DisplayInterface; use SleepingOwl\Admin\Repository\BaseRepository; @@ -259,12 +260,18 @@ public function render() $this->modifyQuery($query); $params = $this->getParams(); $params['collection'] = $query->get(); - return view(AdminTemplate::view('display.' . $this->view), $params); + return view(AdminTemplate::view('display.' . $this->view), $params)->render(); } function __toString() { - return (string)$this->render(); + try + { + return (string)$this->render(); + } catch (\Exception $e) + { + ExceptionHandler::handle($e); + } } } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/FormItems/BaseFormItem.php b/src/SleepingOwl/Admin/FormItems/BaseFormItem.php index 499d1f07..3038375f 100644 --- a/src/SleepingOwl/Admin/FormItems/BaseFormItem.php +++ b/src/SleepingOwl/Admin/FormItems/BaseFormItem.php @@ -2,6 +2,7 @@ use AdminTemplate; use Illuminate\Contracts\Support\Renderable; +use SleepingOwl\Admin\Helpers\ExceptionHandler; use SleepingOwl\Admin\Interfaces\FormItemInterface; abstract class BaseFormItem implements Renderable, FormItemInterface @@ -65,12 +66,18 @@ public function getParams() public function render() { $params = $this->getParams(); - return view(AdminTemplate::view('formitem.' . $this->view), $params); + return view(AdminTemplate::view('formitem.' . $this->view), $params)->render(); } function __toString() { - return (string)$this->render(); + try + { + return (string)$this->render(); + } catch (\Exception $e) + { + ExceptionHandler::handle($e); + } } } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/Helpers/ExceptionHandler.php b/src/SleepingOwl/Admin/Helpers/ExceptionHandler.php new file mode 100644 index 00000000..df8563b5 --- /dev/null +++ b/src/SleepingOwl/Admin/Helpers/ExceptionHandler.php @@ -0,0 +1,16 @@ + Date: Fri, 22 May 2015 20:39:19 +0400 Subject: [PATCH 080/108] Fix for 5.1 --- src/SleepingOwl/Admin/FormItems/MultiSelect.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SleepingOwl/Admin/FormItems/MultiSelect.php b/src/SleepingOwl/Admin/FormItems/MultiSelect.php index 7536c527..18b7e396 100644 --- a/src/SleepingOwl/Admin/FormItems/MultiSelect.php +++ b/src/SleepingOwl/Admin/FormItems/MultiSelect.php @@ -12,7 +12,11 @@ public function value() $value = parent::value(); if ($value instanceof Collection) { - return $value->lists('id'); + $value = $value->lists('id'); + } + if ($value instanceof Collection) + { + $value = $value->toArray(); } return $value; } From 43b03b0599b9cfdc1fa5a2ff2556d7ab10648012 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Mon, 25 May 2015 22:29:11 +0400 Subject: [PATCH 081/108] Render fix --- src/views/default/display/datatables.blade.php | 6 +++--- src/views/default/display/datatablesAsync.blade.php | 4 ++-- src/views/default/display/tab_content.blade.php | 2 +- src/views/default/display/tabbed.blade.php | 4 ++-- src/views/default/display/table.blade.php | 6 +++--- src/views/default/display/tree_children.blade.php | 2 +- src/views/default/form/default.blade.php | 2 +- src/views/default/form/tabbed.blade.php | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/views/default/display/datatables.blade.php b/src/views/default/display/datatables.blade.php index 05c53958..6060df6e 100644 --- a/src/views/default/display/datatables.blade.php +++ b/src/views/default/display/datatables.blade.php @@ -10,14 +10,14 @@ @endif
          @foreach ($actions as $action) - {!! $action->render() !!} + {!! $action !!} @endforeach
          @foreach ($columns as $column) - {!! $column->header()->render() !!} + {!! $column->header() !!} @endforeach @@ -38,7 +38,7 @@ setInstance($instance); ?> - {!! $column->render() !!} + {!! $column !!} @endforeach @endforeach diff --git a/src/views/default/display/datatablesAsync.blade.php b/src/views/default/display/datatablesAsync.blade.php index 855dc495..9d250362 100644 --- a/src/views/default/display/datatablesAsync.blade.php +++ b/src/views/default/display/datatablesAsync.blade.php @@ -10,14 +10,14 @@ @endif
          @foreach ($actions as $action) - {!! $action->render() !!} + {!! $action !!} @endforeach
          @foreach ($columns as $column) - {!! $column->header()->render() !!} + {!! $column->header() !!} @endforeach diff --git a/src/views/default/display/tab_content.blade.php b/src/views/default/display/tab_content.blade.php index 8de603f0..6fac6ce3 100644 --- a/src/views/default/display/tab_content.blade.php +++ b/src/views/default/display/tab_content.blade.php @@ -1,3 +1,3 @@
          - {!! $content->render() !!} + {!! $content !!}
          \ No newline at end of file diff --git a/src/views/default/display/tabbed.blade.php b/src/views/default/display/tabbed.blade.php index 0858e95a..1a1495a9 100644 --- a/src/views/default/display/tabbed.blade.php +++ b/src/views/default/display/tabbed.blade.php @@ -1,12 +1,12 @@
          @foreach ($tabs as $tab) - {!! $tab->content()->render() !!} + {!! $tab->content() !!} @endforeach
          \ No newline at end of file diff --git a/src/views/default/display/table.blade.php b/src/views/default/display/table.blade.php index 0ce533e3..0b40d1b7 100644 --- a/src/views/default/display/table.blade.php +++ b/src/views/default/display/table.blade.php @@ -10,14 +10,14 @@ @endif
          @foreach ($actions as $action) - {!! $action->render() !!} + {!! $action !!} @endforeach
          @foreach ($columns as $column) - {!! $column->header()->render() !!} + {!! $column->header() !!} @endforeach @@ -28,7 +28,7 @@ setInstance($instance); ?> - {!! $column->render() !!} + {!! $column !!} @endforeach @endforeach diff --git a/src/views/default/display/tree_children.blade.php b/src/views/default/display/tree_children.blade.php index 39cf8a8a..2754819f 100644 --- a/src/views/default/display/tree_children.blade.php +++ b/src/views/default/display/tree_children.blade.php @@ -12,7 +12,7 @@ $control->setInstance($entry); } ?> - {!! $control->render() !!} + {!! $control !!} @endforeach @if ($entry->children->count() > 0) diff --git a/src/views/default/form/default.blade.php b/src/views/default/form/default.blade.php index 62fbc2b9..098c5ebf 100644 --- a/src/views/default/form/default.blade.php +++ b/src/views/default/form/default.blade.php @@ -2,7 +2,7 @@ @foreach ($items as $item) - {!! $item->render() !!} + {!! $item !!} @endforeach
          diff --git a/src/views/default/form/tabbed.blade.php b/src/views/default/form/tabbed.blade.php index 45c3a655..deadd377 100644 --- a/src/views/default/form/tabbed.blade.php +++ b/src/views/default/form/tabbed.blade.php @@ -18,7 +18,7 @@ @foreach ($items as $label => $formItems)
          @foreach ($formItems as $item) - {!! $item->render() !!} + {!! $item !!} @endforeach
          @endforeach From b4d141e161c7218eaa38f7f2aeb8009e5200ce2c Mon Sep 17 00:00:00 2001 From: Internetagentur NETCONCEPTION Date: Tue, 9 Jun 2015 22:45:20 +0200 Subject: [PATCH 082/108] Add Panels for form display with same syntax like tabbed form --- src/SleepingOwl/Admin/Form/FormPanel.php | 8 +++++++ .../Admin/Providers/FormServiceProvider.php | 1 + src/views/default/form/panel.blade.php | 21 +++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 src/SleepingOwl/Admin/Form/FormPanel.php create mode 100644 src/views/default/form/panel.blade.php diff --git a/src/SleepingOwl/Admin/Form/FormPanel.php b/src/SleepingOwl/Admin/Form/FormPanel.php new file mode 100644 index 00000000..f974e270 --- /dev/null +++ b/src/SleepingOwl/Admin/Form/FormPanel.php @@ -0,0 +1,8 @@ + + + + + @foreach($items as $panelTitle => $formItems) +
          +
          + {{ $panelTitle }} +
          +
          + @foreach ($formItems as $item) + {!! $item !!} + @endforeach +
          +
          + @endforeach +
          + From 22b01dd71ecefb4543c8ff52f377f6f2c69bf358 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Sat, 13 Jun 2015 18:21:41 +0400 Subject: [PATCH 083/108] Fix for laravel 5.1 Collections --- src/SleepingOwl/Admin/ColumnFilters/BaseColumnFilter.php | 9 ++++++++- src/SleepingOwl/Admin/ColumnFilters/Select.php | 5 +++++ src/SleepingOwl/Admin/FormItems/Select.php | 5 +++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/SleepingOwl/Admin/ColumnFilters/BaseColumnFilter.php b/src/SleepingOwl/Admin/ColumnFilters/BaseColumnFilter.php index ad4d851b..4a54d9bc 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/BaseColumnFilter.php +++ b/src/SleepingOwl/Admin/ColumnFilters/BaseColumnFilter.php @@ -3,6 +3,7 @@ use AdminTemplate; use Illuminate\Contracts\Support\Renderable; use SleepingOwl\Admin\AssetManager\AssetManager; +use SleepingOwl\Admin\Helpers\ExceptionHandler; use SleepingOwl\Admin\Interfaces\ColumnFilterInterface; abstract class BaseColumnFilter implements Renderable, ColumnFilterInterface @@ -35,7 +36,13 @@ public function render() */ function __toString() { - return (string)$this->render(); + try + { + return (string)$this->render(); + } catch (\Exception $e) + { + ExceptionHandler::handle($e); + } } } \ No newline at end of file diff --git a/src/SleepingOwl/Admin/ColumnFilters/Select.php b/src/SleepingOwl/Admin/ColumnFilters/Select.php index 0b5a3ab5..4e91ade6 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/Select.php +++ b/src/SleepingOwl/Admin/ColumnFilters/Select.php @@ -1,5 +1,6 @@ model()); $key = $repository->model()->getKeyName(); $options = $repository->query()->get()->lists($this->display(), $key); + if ($options instanceof Collection) + { + $options = $options->all(); + } $options = array_unique($options); $this->options($options); } diff --git a/src/SleepingOwl/Admin/FormItems/Select.php b/src/SleepingOwl/Admin/FormItems/Select.php index 59687771..aa552642 100644 --- a/src/SleepingOwl/Admin/FormItems/Select.php +++ b/src/SleepingOwl/Admin/FormItems/Select.php @@ -1,5 +1,6 @@ model()); $key = $repository->model()->getKeyName(); $options = $repository->query()->get()->lists($this->display(), $key); + if ($options instanceof Collection) + { + $options = $options->all(); + } $this->options($options); } From 1955e907f7de5d2e265defefbc074acdfc67d8e4 Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Sat, 13 Jun 2015 18:32:19 +0400 Subject: [PATCH 084/108] Misspell fix --- src/SleepingOwl/Admin/AdminServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SleepingOwl/Admin/AdminServiceProvider.php b/src/SleepingOwl/Admin/AdminServiceProvider.php index 61ffffcb..971ac241 100644 --- a/src/SleepingOwl/Admin/AdminServiceProvider.php +++ b/src/SleepingOwl/Admin/AdminServiceProvider.php @@ -23,7 +23,7 @@ class AdminServiceProvider extends ServiceProvider /** * Commands to register */ - protected $commads = [ + protected $commands = [ 'AdministratorsCommand', 'InstallCommand', 'ModelCommand' @@ -110,7 +110,7 @@ protected function registerProviders() */ protected function registerCommands() { - foreach ($this->commads as $command) + foreach ($this->commands as $command) { $this->commands('SleepingOwl\Admin\Commands\\' . $command); } From fb745711641222ab37d9cc0eca6abdf49f5e6175 Mon Sep 17 00:00:00 2001 From: nwrman Date: Sat, 20 Jun 2015 15:57:15 -0500 Subject: [PATCH 085/108] Add Spanish localization --- src/lang/es/lang.php | 66 ++++++++++++++++++++++++++++++++++++ src/lang/es/validation.php | 68 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 src/lang/es/lang.php create mode 100644 src/lang/es/validation.php diff --git a/src/lang/es/lang.php b/src/lang/es/lang.php new file mode 100644 index 00000000..e5116a39 --- /dev/null +++ b/src/lang/es/lang.php @@ -0,0 +1,66 @@ + 'Página no encontrada.', + 'auth' => [ + 'title' => 'Autorización', + 'username' => 'Usuario', + 'password' => 'Contraseña', + 'login' => 'Inicar sesión', + 'logout' => 'Cerrar sesión', + 'wrong-username' => 'Usuario', + 'wrong-password' => 'o contraseña incorrectos' + ], + 'ckeditor' => [ + 'upload' => [ + 'success' => 'El archivo ha sido subido: \\n- Tamaño: :size kb \\n- ancho/alto: :width x :height', + 'error' => [ + 'common' => 'No se ha podido subir el archivo.', + 'wrong_extension' => 'El archivo ":file" tiene una extensión incorrecta.', + 'filesize_limit' => 'El tamaño máximo de archivo permitido es :size kb.', + 'imagesize_max_limit' => 'Ancho x Alto = :width x :height \\n El Ancho x Alto máximo debe ser: :maxwidth x :maxheight', + 'imagesize_min_limit' => 'Ancho x Alto = :width x :height \\n El Ancho x Alto mínimo debe ser: :minwidth x :minheight', + ] + ], + 'image_browser' => [ + 'title' => 'Insertar imágen desde el servidor', + 'subtitle' => 'Selecciona imágen a insertar', + ], + ], + 'table' => [ + 'new-entry' => 'Nuevo registro', + 'edit' => 'Editar', + 'delete' => 'Eliminar', + 'delete-confirm' => '¿Confirmas eliminar este registro?', + 'delete-error' => 'No se ha podido eliminar este registro. Primero debes eliminar las entradas relacionadas a esta.', + 'moveUp' => 'Mover arriba', + 'moveDown' => 'Mover abajo', + 'filter' => 'Mostrar registros similiares', + 'filter-goto' => 'Mostrar', + 'save' => 'Guardar', + 'cancel' => 'Cancelar', + 'download' => 'Descargar', + 'all' => 'Todos', + 'processing' => '', + 'loadingRecords' => 'Cargando...', + 'lengthMenu' => 'Mostrar registros de _MENU_ ', + 'zeroRecords' => 'No se han encontrado resultados.', + 'info' => 'Mostrando de _START_ a _END_ de _TOTAL_ registros', + 'infoEmpty' => 'Mostrando de 0 a 0 de 0 registros', + 'infoFiltered' => '(filtrado de un total de _MAX_ registros)', + 'infoThousands' => ',', + 'infoPostFix' => '', + 'search' => 'Buscar: ', + 'emptyTable' => 'No hay información disponible.', + 'paginate' => [ + 'first' => 'Primera', + 'previous' => '←', + 'next' => '→', + 'last' => 'Última' + ] + ], + 'select' => [ + 'nothing' => 'No hay nada seleccionado', + 'selected' => 'seleccionados' + ] +]; diff --git a/src/lang/es/validation.php b/src/lang/es/validation.php new file mode 100644 index 00000000..7648b641 --- /dev/null +++ b/src/lang/es/validation.php @@ -0,0 +1,68 @@ + "El campo :attribute debe ser aceptado.", + "active_url" => "El campo :attribute no contiene una URL válida.", + "after" => "El campo :attribute debe ser una fecha posterior a :date.", + "alpha" => "El campo :attribute sólo puede contener letras.", + "alpha_dash" => "El campo :attribute sólo puede contener letras, números y guiones.", + "alpha_num" => "El campo :attribute sólo puede contener letras y números.", + "array" => "El campo :attribute debe ser un array.", + "before" => "El campo :attribute debe ser una fecha previa a :date.", + "confirmed" => "La confirmación del campo :attribute no concuerda.", + "date" => "La fecha en :attribute no es válida.", + "date_format" => "El campo :attribute no concuerda con el formato :format.", + "different" => "Los campos :attribute y :other deben ser diferentes.", + "digits" => "El campo :attribute debe contener :digits dígitos.", + "digits_between" => "El campo :attribute debe contener entre :min y :max dígitos.", + "email" => "El campo :attribute debe ser una dirección de correo electrónico válida.", + "exists" => "El campo selected :attribute no es válido.", + "image" => "El campo :attribute debe ser una imágen.", + "in" => "El campo selected :attribute is invalid.", + "integer" => "El campo :attribute debe ser un número entero.", + "ip" => "El campo :attribute debe ser una dirección IP válida.", + "mimes" => "El tipo de archivo para :attribute debe ser del tipo: :values.", + "not_in" => "El campo selected :attribute is invalid.", + "not_php" => "Tipo de archivo no válido.", + "numeric" => "El campo :attribute debe ser numérico.", + "regex" => "El format del campo :attribute no es válido.", + "required" => "El campo :attribute es requerido.", + "required_only_on_create" => "El campo :attribute es requerido.", + "required_if" => "El campo :attribute es requerido cuando :other es :value.", + "required_with" => "El campo :attribute es requerido cuando :values está presente.", + "required_with_all" => "El campo :attribute es requerido cuando :values están presentes.", + "required_without" => "El campo :attribute es requerido cuando :values no está presente.", + "required_without_all" => "El campo :attribute es requerido cuando ninguno de :values están presentes.", + "same" => "Los campos :attribute y :other deben ser iguales.", + "unique" => "Este :attribute ya existe.", + "url" => "El formato de :attribute no es válido.", + "url_stub" => "El formato de :attribute no es válido.", + "url_stub_full" => "El formato de :attribute no es válido.", + + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [], + +]; From ed40d24656cfeda8c0368c4374c7fe363a7ad58a Mon Sep 17 00:00:00 2001 From: VirtualStep Date: Mon, 22 Jun 2015 11:04:48 +0200 Subject: [PATCH 086/108] Bugfix: MultiSelect throws error, when value is empty / add support for readonly within input fields / add support for "rows" attribute within textarea and remove unused cols attribute --- .../Admin/FormItems/NamedFormItem.php | 20 +++++++++++++--- src/SleepingOwl/Admin/FormItems/Textarea.php | 24 ++++++++++++++++++- src/views/default/formitem/date.blade.php | 2 +- .../default/formitem/multiselect.blade.php | 2 +- src/views/default/formitem/password.blade.php | 2 +- src/views/default/formitem/text.blade.php | 2 +- src/views/default/formitem/textarea.blade.php | 2 +- src/views/default/formitem/time.blade.php | 2 +- .../default/formitem/timestamp.blade.php | 2 +- 9 files changed, 47 insertions(+), 11 deletions(-) diff --git a/src/SleepingOwl/Admin/FormItems/NamedFormItem.php b/src/SleepingOwl/Admin/FormItems/NamedFormItem.php index feead557..f55b0063 100644 --- a/src/SleepingOwl/Admin/FormItems/NamedFormItem.php +++ b/src/SleepingOwl/Admin/FormItems/NamedFormItem.php @@ -8,6 +8,7 @@ abstract class NamedFormItem extends BaseFormItem protected $name; protected $label; protected $defaultValue; + protected $readonly; function __construct($name, $label = null) { @@ -38,9 +39,10 @@ public function label($label = null) public function getParams() { return parent::getParams() + [ - 'name' => $this->name(), - 'label' => $this->label(), - 'value' => $this->value(), + 'name' => $this->name(), + 'label' => $this->label(), + 'readonly' => $this->readonly(), + 'value' => $this->value() ]; } @@ -54,6 +56,18 @@ public function defaultValue($defaultValue = null) return $this; } + public function readonly($readonly = null) + { + if (is_null($readonly)) + { + return $this->readonly; + } + + $this->readonly = $readonly; + + return $this; + } + public function value() { $instance = $this->instance(); diff --git a/src/SleepingOwl/Admin/FormItems/Textarea.php b/src/SleepingOwl/Admin/FormItems/Textarea.php index 33eb98fd..9b6f98ec 100644 --- a/src/SleepingOwl/Admin/FormItems/Textarea.php +++ b/src/SleepingOwl/Admin/FormItems/Textarea.php @@ -2,7 +2,29 @@ class Textarea extends NamedFormItem { - protected $view = 'textarea'; + protected $rows = 10; + + + public function getParams() + { + return parent::getParams() + [ + 'name' => $this->name(), + 'label' => $this->label(), + 'readonly' => $this->readonly(), + 'value' => $this->value(), + 'rows' => $this->rows() + ]; + } + + public function rows($rows = null) + { + if (is_null($rows)) + { + return $this->rows; + } + $this->rows = $rows; + return $this; + } } \ No newline at end of file diff --git a/src/views/default/formitem/date.blade.php b/src/views/default/formitem/date.blade.php index 7eb02f39..448a10da 100644 --- a/src/views/default/formitem/date.blade.php +++ b/src/views/default/formitem/date.blade.php @@ -1,7 +1,7 @@
          - +
          @include(AdminTemplate::view('formitem.errors')) diff --git a/src/views/default/formitem/multiselect.blade.php b/src/views/default/formitem/multiselect.blade.php index d5590f0c..3db6692e 100644 --- a/src/views/default/formitem/multiselect.blade.php +++ b/src/views/default/formitem/multiselect.blade.php @@ -3,7 +3,7 @@
          diff --git a/src/views/default/formitem/password.blade.php b/src/views/default/formitem/password.blade.php index d547486d..d1de7f2f 100644 --- a/src/views/default/formitem/password.blade.php +++ b/src/views/default/formitem/password.blade.php @@ -1,5 +1,5 @@
          - + @include(AdminTemplate::view('formitem.errors'))
          \ No newline at end of file diff --git a/src/views/default/formitem/text.blade.php b/src/views/default/formitem/text.blade.php index b4118551..7ff93c2c 100644 --- a/src/views/default/formitem/text.blade.php +++ b/src/views/default/formitem/text.blade.php @@ -1,5 +1,5 @@
          - + @include(AdminTemplate::view('formitem.errors'))
          \ No newline at end of file diff --git a/src/views/default/formitem/textarea.blade.php b/src/views/default/formitem/textarea.blade.php index b6e21969..6ceca0e3 100644 --- a/src/views/default/formitem/textarea.blade.php +++ b/src/views/default/formitem/textarea.blade.php @@ -1,5 +1,5 @@
          - + @include(AdminTemplate::view('formitem.errors'))
          \ No newline at end of file diff --git a/src/views/default/formitem/time.blade.php b/src/views/default/formitem/time.blade.php index c102e46c..e3ab1f93 100644 --- a/src/views/default/formitem/time.blade.php +++ b/src/views/default/formitem/time.blade.php @@ -1,7 +1,7 @@
          - +
          @include(AdminTemplate::view('formitem.errors')) diff --git a/src/views/default/formitem/timestamp.blade.php b/src/views/default/formitem/timestamp.blade.php index 51b00bc2..c419849e 100644 --- a/src/views/default/formitem/timestamp.blade.php +++ b/src/views/default/formitem/timestamp.blade.php @@ -1,7 +1,7 @@
          - +
          @include(AdminTemplate::view('formitem.errors')) From 7fcfc498b138644c8721127c6ca36207d7155eb9 Mon Sep 17 00:00:00 2001 From: Ademir Mazer Junior Date: Mon, 22 Jun 2015 09:12:01 -0300 Subject: [PATCH 087/108] Brazilian portuguese messages translation --- src/lang/pt_BR/lang.php | 78 +++++++++++++++++++++ src/lang/pt_BR/validation.php | 127 ++++++++++++++++++++++++++++++++++ 2 files changed, 205 insertions(+) create mode 100644 src/lang/pt_BR/lang.php create mode 100644 src/lang/pt_BR/validation.php diff --git a/src/lang/pt_BR/lang.php b/src/lang/pt_BR/lang.php new file mode 100644 index 00000000..83943ebd --- /dev/null +++ b/src/lang/pt_BR/lang.php @@ -0,0 +1,78 @@ + 'Página não encontrada.', + 'auth' => [ + 'title' => 'Autorização', + 'username' => 'Usuário', + 'password' => 'Senha', + 'login' => 'Login', + 'logout' => 'Logout', + 'wrong-username' => 'Nome de usuário errado', + 'wrong-password' => 'ou senha' + ], + 'ckeditor' => [ + 'upload' => [ + 'success' => 'Arquivo enviado: \\n- Tamanho: :size kb \\n- largura/altura: :width x :height', + 'error' => [ + 'common' => 'Não é possível enviar o arquivo.', + 'wrong_extension' => 'Arquivo ":file" está com a extensão errada.', + 'filesize_limit' => 'O tamanho máximo permitido para arquivo é :size kb.', + 'imagesize_max_limit' => 'Largura x Altura = :width x :height \\n As dimensões máximas para Largura x Altura devem ser: :maxwidth x :maxheight', + 'imagesize_min_limit' => 'Largura x Altura = :width x :height \\n As dimensões máximas para Largura x Altura devem ser: :minwidth x :minheight', + ] + ], + 'image_browser' => [ + 'title' => 'Inserir imagem do servidor', + 'subtitle' => 'Escolha a imagem para inserir', + ], + ], + 'table' => [ + 'new-entry' => 'Nova entrada', + 'edit' => 'Editar', + 'restore' => 'Restaurar', + 'delete' => 'Excluir', + 'delete-confirm' => 'Tem certeza que deseja excluir este registro', + 'delete-error' => 'Ocorreu um erro ao excluir este registro. Você deve excluir todos os registros relacionados antes.', + 'moveUp' => 'Mover p/cima', + 'moveDown' => 'Mover p/baixo', + 'error' => 'Ocorreu um erro ao processar sua solicitação', + 'filter' => 'Mostrar entradas similares', + 'filter-goto' => 'Mostrar', + 'save' => 'Salvar', + 'cancel' => 'Cancelar', + 'download' => 'Download', + 'all' => 'Todos', + 'processing' => '', + 'loadingRecords' => 'Carregando...', + 'lengthMenu' => 'Mostrar _MENU_ entradas', + 'zeroRecords' => 'Nenhum registro encontrado.', + 'info' => 'Mostrando _START_ a _END_ de _TOTAL_ registros', + 'infoEmpty' => 'Mostrando 0 a 0 de 0 registros', + 'infoFiltered' => '(filtrado de _MAX_ registros no total)', + 'infoThousands' => '.', + 'infoPostFix' => '', + 'search' => 'Pesquisar: ', + 'emptyTable' => 'Nenhum informação na tabela', + 'paginate' => [ + 'first' => 'Primeiro', + 'previous' => '←', + 'next' => '→', + 'last' => 'Último' + ] + ], + 'select' => [ + 'nothing' => 'Nada selecionado', + 'selected' => 'selecionado' + 'placeholder' => 'Selecione da lista', + ], + 'image' => [ + 'browse' => 'Seleciona a imagem', + 'browseMultiple' => 'Selecione as imagens', + 'remove' => 'Remover a imagem', + ], + 'file' => [ + 'browse' => 'Selecionar o arquivo', + 'remove' => 'Remover o arquivo', + ], +]; diff --git a/src/lang/pt_BR/validation.php b/src/lang/pt_BR/validation.php new file mode 100644 index 00000000..116f8776 --- /dev/null +++ b/src/lang/pt_BR/validation.php @@ -0,0 +1,127 @@ + ":attribute deve ser aceito.", + "active_url" => ":attribute não é uma URL válida.", + "after" => ":attribute deve ser uma data depois de :date.", + "alpha" => ":attribute somente pode conter letras.", + "alpha_dash" => ":attribute somente pode conter letras, números, e traços.", + "alpha_num" => ":attribute somente pode conter letras e números.", + "array" => ":attribute deve ser um array.", + "before" => ":attribute deve ser uma data antes de :date.", + "between" => [ + "numeric" => ":attribute deve estar entre :min e :max.", + "file" => ":attribute deve estar entre :min e :max kilobytes.", + "string" => ":attribute deve estar entre :min e :max caracteres.", + "array" => ":attribute deve estar entre :min e :max items.", + ], + "confirmed" => ":attribute confirmação não combina.", + "date" => ":attribute não é uma data válida.", + "date_format" => ":attribute não combina com o formato :format.", + "different" => ":attribute e :other devem ser diferentes.", + "digits" => ":attribute deve ter :digits dígitos.", + "digits_between" => ":attribute deve ter entre :min e :max dígitos.", + "email" => ":attribute deve ser um endereço de email válido.", + "exists" => "A seleção :attribute é inválida.", + "image" => ":attribute deve ser uma imagem.", + "in" => "A seleção :attribute é inválida.", + "integer" => ":attribute deve ser um inteiro.", + "ip" => ":attribute deve ser um endereço de IP válido.", + "max" => [ + "numeric" => ":attribute não pode ser maior que :max.", + "file" => ":attribute não pode ser maior que :max kilobytes.", + "string" => ":attribute não pode ser maior que :max caracteres.", + "array" => ":attribute não pode ter mais que :max items.", + ], + "mimes" => ":attribute deve ser um campo do tipo: :values.", + "min" => [ + "numeric" => ":attribute dever ser no mínimo :min.", + "file" => ":attribute dever ter no mínimo :min kilobytes.", + "string" => ":attribute dever ter no mínimo :min caracteres.", + "array" => ":attribute dever ter no mínimo :min items.", + ], + "not_in" => "A seleção :attribute é inválida.", + "not_php" => "Tipo de arquivo errado.", + "numeric" => ":attribute deve ser um número.", + "regex" => ":attribute com formato inválido.", + "required" => "Campo :attribute é obrigatório.", + "required_only_on_create" => "Campo :attribute é obrigatório.", + "required_if" => "Campo :attribute é obrigatório quando :other é :value.", + "required_with" => "Campo :attribute é obrigatório quando :values está presente.", + "required_with_all" => "Campo :attribute é obrigatório quando :values está presente.", + "required_without" => "Campo :attribute é obrigatório quando :values não está presente.", + "required_without_all" => "Campo :attribute é obrigatório quando nenhum :values está resente.", + "same" => ":attribute e :other devem combinar.", + "size" => [ + "numeric" => ":attribute deve ser :size.", + "file" => ":attribute deve ter :size kilobytes.", + "string" => ":attribute deve ter :size caracteres.", + "array" => ":attribute deve conter :size items.", + ], + "unique" => ":attribute já foi utilizado.", + "url" => ":attribute esté com o formato inválido.", + "url_stub" => ":attribute esté com o formato inválido.", + "url_stub_full" => ":attribute esté com o formato inválido.", + + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [], + +]; + + + [], + +]; + From 63cea83a6b016bb13e85c8f8ec0cb7aede628041 Mon Sep 17 00:00:00 2001 From: Eugene Mednikov Date: Sat, 27 Jun 2015 09:46:05 +0300 Subject: [PATCH 088/108] fix: column select filter check for empty value --- src/SleepingOwl/Admin/ColumnFilters/Select.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/SleepingOwl/Admin/ColumnFilters/Select.php b/src/SleepingOwl/Admin/ColumnFilters/Select.php index 4e91ade6..d6326330 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/Select.php +++ b/src/SleepingOwl/Admin/ColumnFilters/Select.php @@ -92,9 +92,10 @@ public function getParams() public function apply($repository, $column, $query, $search, $fullSearch, $operator = 'like') { - if (empty($search)) return; + #if (empty($search)) return; + if ($search === '') return; - if ($operator == 'like') + if ($operator == 'like') { $search = '%' . $search . '%'; } @@ -115,4 +116,4 @@ public function apply($repository, $column, $query, $search, $fullSearch, $opera } } -} \ No newline at end of file +} From ec6cbbd7bd1d9f9c955eba96b53c995d9bcea5e5 Mon Sep 17 00:00:00 2001 From: Eugene Mednikov Date: Sat, 27 Jun 2015 09:52:26 +0300 Subject: [PATCH 089/108] fix: incorrect default operator for column select filter --- src/SleepingOwl/Admin/ColumnFilters/Select.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SleepingOwl/Admin/ColumnFilters/Select.php b/src/SleepingOwl/Admin/ColumnFilters/Select.php index d6326330..47661971 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/Select.php +++ b/src/SleepingOwl/Admin/ColumnFilters/Select.php @@ -90,7 +90,7 @@ public function getParams() ]; } - public function apply($repository, $column, $query, $search, $fullSearch, $operator = 'like') + public function apply($repository, $column, $query, $search, $fullSearch, $operator = '=') { #if (empty($search)) return; if ($search === '') return; From 5da98e5977b347f7724c86b44ac69cee9e1cb1eb Mon Sep 17 00:00:00 2001 From: Eugene Mednikov Date: Sat, 27 Jun 2015 09:56:07 +0300 Subject: [PATCH 090/108] fix: v3 select filters with options --- src/views/default/columnfilter/select.blade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/default/columnfilter/select.blade.php b/src/views/default/columnfilter/select.blade.php index b30bb383..274a5719 100644 --- a/src/views/default/columnfilter/select.blade.php +++ b/src/views/default/columnfilter/select.blade.php @@ -1,6 +1,6 @@ \ No newline at end of file + From 7d05a5df3bbbb21c5f71464a94321ac4b9783ad7 Mon Sep 17 00:00:00 2001 From: Eugene Mednikov Date: Sat, 27 Jun 2015 09:58:21 +0300 Subject: [PATCH 091/108] improvement: define filterable field for complex column filters --- src/SleepingOwl/Admin/ColumnFilters/Select.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/SleepingOwl/Admin/ColumnFilters/Select.php b/src/SleepingOwl/Admin/ColumnFilters/Select.php index 47661971..ae0361bf 100644 --- a/src/SleepingOwl/Admin/ColumnFilters/Select.php +++ b/src/SleepingOwl/Admin/ColumnFilters/Select.php @@ -12,6 +12,7 @@ class Select extends BaseColumnFilter protected $display = 'title'; protected $options = []; protected $placeholder; + protected $filter_field = ''; /** * Initialize column filter @@ -23,6 +24,15 @@ public function initialize() AssetManager::addScript('admin::default/js/columnfilters/select.js'); } + public function filter_field( $field = null ) + { + if(is_null($field)) + return $this->filter_field; + + $this->filter_field = $field; + return $this; + } + public function model($model = null) { if (is_null($model)) @@ -95,6 +105,12 @@ public function apply($repository, $column, $query, $search, $fullSearch, $opera #if (empty($search)) return; if ($search === '') return; + if($this->filter_field()) + { + $query->where($this->filter_field(), '=', $search); + return; + } + if ($operator == 'like') { $search = '%' . $search . '%'; From ce4ed6ab63f2349577b9034870c217285017b6ba Mon Sep 17 00:00:00 2001 From: Sleeping Owl Date: Mon, 29 Jun 2015 01:32:51 +0400 Subject: [PATCH 092/108] OrderableModel trait decrement fix --- src/SleepingOwl/Admin/Traits/OrderableModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SleepingOwl/Admin/Traits/OrderableModel.php b/src/SleepingOwl/Admin/Traits/OrderableModel.php index e13ca79a..2cefd8a3 100644 --- a/src/SleepingOwl/Admin/Traits/OrderableModel.php +++ b/src/SleepingOwl/Admin/Traits/OrderableModel.php @@ -73,7 +73,7 @@ protected function updateOrderFieldOnCreate() */ protected function updateOrderFieldOnDelete() { - static::orderModel()->where($this->getOrderField(), '>', $this->getOrderValue())->update([$this->getOrderField() => DB::raw($this->getOrderField() . ' - 1')]); + static::orderModel()->where($this->getOrderField(), '>', $this->getOrderValue())->decrement($this->getOrderField()); } /** From 8c283bda1f12c00f7be92273a4faeee2689350e8 Mon Sep 17 00:00:00 2001 From: arosenfeld-mentel Date: Mon, 6 Jul 2015 14:43:33 -0400 Subject: [PATCH 093/108] Fix primary key for multi-select The primary key of a model will not always be "id". This commit fixes this by using the key name from the model. --- src/SleepingOwl/Admin/FormItems/MultiSelect.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SleepingOwl/Admin/FormItems/MultiSelect.php b/src/SleepingOwl/Admin/FormItems/MultiSelect.php index 18b7e396..e3f63d41 100644 --- a/src/SleepingOwl/Admin/FormItems/MultiSelect.php +++ b/src/SleepingOwl/Admin/FormItems/MultiSelect.php @@ -12,7 +12,7 @@ public function value() $value = parent::value(); if ($value instanceof Collection) { - $value = $value->lists('id'); + $value = $value->lists($value->first()->getKeyName()); } if ($value instanceof Collection) { @@ -21,4 +21,4 @@ public function value() return $value; } -} \ No newline at end of file +} From 83e794e1faa0194fe81c8f2405639b6044aa98e1 Mon Sep 17 00:00:00 2001 From: arosenfeld-mentel Date: Fri, 10 Jul 2015 13:14:18 -0400 Subject: [PATCH 094/108] Fix for empty collections --- src/SleepingOwl/Admin/FormItems/MultiSelect.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SleepingOwl/Admin/FormItems/MultiSelect.php b/src/SleepingOwl/Admin/FormItems/MultiSelect.php index e3f63d41..1a6e5030 100644 --- a/src/SleepingOwl/Admin/FormItems/MultiSelect.php +++ b/src/SleepingOwl/Admin/FormItems/MultiSelect.php @@ -10,7 +10,7 @@ class MultiSelect extends Select public function value() { $value = parent::value(); - if ($value instanceof Collection) + if ($value instanceof Collection && $value->count() > 0) { $value = $value->lists($value->first()->getKeyName()); } From 8f0fd9f4a1a51de607ebbc490ada61cecf9ecc4e Mon Sep 17 00:00:00 2001 From: Alexandre Rosenfeld Date: Fri, 10 Jul 2015 13:13:30 -0400 Subject: [PATCH 095/108] Accept path for NamedFormItems This allows multiple forms in the same page by allowing prefixes in form elements items. You could use "form1.input1" for an input name for instance and only input1 will be used to read and write the values to the model instance. --- .../Admin/FormItems/NamedFormItem.php | 55 +++++++++++++++---- 1 file changed, 45 insertions(+), 10 deletions(-) diff --git a/src/SleepingOwl/Admin/FormItems/NamedFormItem.php b/src/SleepingOwl/Admin/FormItems/NamedFormItem.php index f55b0063..a607e24c 100644 --- a/src/SleepingOwl/Admin/FormItems/NamedFormItem.php +++ b/src/SleepingOwl/Admin/FormItems/NamedFormItem.php @@ -5,15 +5,46 @@ abstract class NamedFormItem extends BaseFormItem { + protected $path; protected $name; + protected $attribute; protected $label; protected $defaultValue; protected $readonly; - function __construct($name, $label = null) + function __construct($path, $label = null) { $this->label = $label; - $this->name = $name; + $parts = explode(".", $path); + if (count($parts) > 1) { + $this->path = $path; + $this->name = $parts[0] . "[" . implode("][", array_slice($parts, 1)) . "]"; + $this->attribute = implode(".", array_slice(explode(".", $path), -1, 1)); + } else { + $this->path = $path; + $this->name = $path; + $this->attribute = $path; + } + } + + public function path($path = null) + { + if (is_null($path)) + { + return $this->path; + } + $this->path = $path; + return $path; + } + + public function attribute($attribute = null) + { + if (is_null($attribute)) + { + return $this->attribute; + } + $this->attribute = $attribute; + return $attribute; } public function name($name = null) @@ -40,6 +71,7 @@ public function getParams() { return parent::getParams() + [ 'name' => $this->name(), + 'attribute' => $this->attribute(), 'label' => $this->label(), 'readonly' => $this->readonly(), 'value' => $this->value() @@ -71,16 +103,16 @@ public function readonly($readonly = null) public function value() { $instance = $this->instance(); - if ( ! is_null($value = old($this->name()))) + if ( ! is_null($value = old($this->path()))) { return $value; } $input = Input::all(); - if (array_key_exists($this->name, $input)) + if (($value = array_get($input, $this->path())) !== null) { - return Input::get($this->name()); + return $value; //Input::get($this->name()); } - if ( ! is_null($instance) && ! is_null($value = $instance->getAttribute($this->name()))) + if ( ! is_null($instance) && ! is_null($value = $instance->getAttribute($this->attribute()))) { return $value; } @@ -89,12 +121,15 @@ public function value() public function save() { - $name = $this->name(); - if ( ! Input::has($name)) + //$name = $this->name(); + $attribute = $this->attribute(); + if (Input::get($this->path()) == null) { - Input::merge([$name => null]); + $value = null; //Input::merge(([$name => null]); + } else { + $value = $this->value(); } - $this->instance()->$name = $this->value(); + $this->instance()->$attribute = $value; } public function required() From ba814b0633bc857cda171c3513c8a503eed935ef Mon Sep 17 00:00:00 2001 From: arosenfeld-mentel Date: Fri, 10 Jul 2015 13:29:52 -0400 Subject: [PATCH 096/108] Removed extra comments and attributes. Also fix unique validation. --- src/SleepingOwl/Admin/FormItems/NamedFormItem.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/SleepingOwl/Admin/FormItems/NamedFormItem.php b/src/SleepingOwl/Admin/FormItems/NamedFormItem.php index a607e24c..07ca3fbc 100644 --- a/src/SleepingOwl/Admin/FormItems/NamedFormItem.php +++ b/src/SleepingOwl/Admin/FormItems/NamedFormItem.php @@ -71,7 +71,6 @@ public function getParams() { return parent::getParams() + [ 'name' => $this->name(), - 'attribute' => $this->attribute(), 'label' => $this->label(), 'readonly' => $this->readonly(), 'value' => $this->value() @@ -110,7 +109,7 @@ public function value() $input = Input::all(); if (($value = array_get($input, $this->path())) !== null) { - return $value; //Input::get($this->name()); + return $value; } if ( ! is_null($instance) && ! is_null($value = $instance->getAttribute($this->attribute()))) { @@ -121,11 +120,9 @@ public function value() public function save() { - //$name = $this->name(); $attribute = $this->attribute(); - if (Input::get($this->path()) == null) - { - $value = null; //Input::merge(([$name => null]); + if (Input::get($this->path()) == null) { + $value = null; } else { $value = $this->value(); } @@ -150,7 +147,7 @@ public function getValidationRules() if ($item == '_unique') { $table = $this->instance()->getTable(); - $item = 'unique:' . $table . ',' . $this->name(); + $item = 'unique:' . $table . ',' . $this->attribute(); if ($this->instance()->exists()) { $item .= ',' . $this->instance()->getKey(); @@ -162,4 +159,4 @@ public function getValidationRules() ]; } -} \ No newline at end of file +} From 6f6fff4700e00f802b416be709bdec16314075d9 Mon Sep 17 00:00:00 2001 From: Pavol Tanuska Date: Wed, 22 Jul 2015 14:55:15 +0200 Subject: [PATCH 097/108] fixed syntax error (missing comma) and duplicated/erroneous content --- src/lang/pt_BR/lang.php | 2 +- src/lang/pt_BR/validation.php | 33 --------------------------------- 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/src/lang/pt_BR/lang.php b/src/lang/pt_BR/lang.php index 83943ebd..6a421086 100644 --- a/src/lang/pt_BR/lang.php +++ b/src/lang/pt_BR/lang.php @@ -63,7 +63,7 @@ ], 'select' => [ 'nothing' => 'Nada selecionado', - 'selected' => 'selecionado' + 'selected' => 'selecionado', 'placeholder' => 'Selecione da lista', ], 'image' => [ diff --git a/src/lang/pt_BR/validation.php b/src/lang/pt_BR/validation.php index 116f8776..185d82a9 100644 --- a/src/lang/pt_BR/validation.php +++ b/src/lang/pt_BR/validation.php @@ -77,39 +77,6 @@ "url_stub_full" => ":attribute esté com o formato inválido.", - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. - | - */ - - 'attributes' => [], - -]; - - - Date: Fri, 31 Jul 2015 12:03:03 -0500 Subject: [PATCH 098/108] Fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrección ortografía. --- src/lang/es/lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang/es/lang.php b/src/lang/es/lang.php index e5116a39..14b7c8c1 100644 --- a/src/lang/es/lang.php +++ b/src/lang/es/lang.php @@ -6,7 +6,7 @@ 'title' => 'Autorización', 'username' => 'Usuario', 'password' => 'Contraseña', - 'login' => 'Inicar sesión', + 'login' => 'Iniciar sesión', 'logout' => 'Cerrar sesión', 'wrong-username' => 'Usuario', 'wrong-password' => 'o contraseña incorrectos' From 31a8022e775febdb5b11c32d1dbee706b5321a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F?= Date: Sat, 1 Aug 2015 21:22:59 +0300 Subject: [PATCH 099/108] Create lang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Українська мова --- src/lang/uk/lang | 77 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 src/lang/uk/lang diff --git a/src/lang/uk/lang b/src/lang/uk/lang new file mode 100644 index 00000000..13d42c16 --- /dev/null +++ b/src/lang/uk/lang @@ -0,0 +1,77 @@ + 'Сторінка не знайдена., + 'auth' => [ + 'title' => 'Авторизація', + 'username' => 'Логін', + 'password' => 'Пароль', + 'login' => 'Увійти', + 'logout' => 'Вийти', + 'wrong-username' => 'Не вірний логін', + 'wrong-password' => 'або пароль' + ], + 'ckeditor' => [ + 'upload' => [ + 'success' => 'Файл був успішно завантажений: \\n- Розмір: :size кб \\n- ширина/висота: :width x :height', + 'error' => [ + 'common' => 'Появилась помилка при спробі загрузити файл.', + 'wrong_extension' => 'Файл ":file" має не вырний тип.', + 'filesize_limit' => 'Максимальний розмір файлу: :size кб.', + 'imagesize_max_limit' => 'Ширина x Висота = :width x :height \\n Максимальний розмір зображеня повинен бути: :maxwidth x :maxheight', + 'imagesize_min_limit' => 'Ширина x Висота = :width x :height \\n Мінімальний розмір зображеня повинен бути: :minwidth x :minheight', + ] + ], + 'image_browser' => [ + 'title' => 'Вставка зображеня с сервера', + 'subtitle' => 'Виберіт зображеня для вставки', + ], + ], + 'table' => [ + 'new-entry' => 'Новий запис', + 'edit' => 'Редагувати', + 'restore' => 'Востановити', + 'delete' => 'Видалити', + 'delete-confirm' => 'Ви впевнені що хочете видалити цей запис?', + 'delete-error' => 'Неможливо видалити цей запис. Потрібно спочатку видалити всі связані записи.', + 'moveUp' => 'Підвинути вверх', + 'moveDown' => 'Підвинути вниз', + 'error' => 'В процесі обробки вашого запросу з'явилась помилка', + 'filter' => 'Показати подобні записи', + 'filter-goto' => 'Перейти', + 'save' => 'Сохранити', + 'cancel' => 'Скасувати', + 'download' => 'Завантажити', + 'all' => 'Все', + 'processing' => '', + 'loadingRecords' => 'Підождіть...', + 'lengthMenu' => 'Відображати _MENU_ записів', + 'zeroRecords' => 'Не найдено підходящих записів.', + 'info' => 'Записи починаючи з _START_ до _END_ з _TOTAL_', + 'infoEmpty' => 'Записи починаючи з 0 по 0 з 0', + 'infoFiltered' => '(відфільтровано з _MAX_ записів)', + 'infoThousands' => '', + 'infoPostFix' => '', + 'search' => 'Пошук: ', + 'emptyTable' => 'Немає записів', + 'paginate' => [ + 'first' => 'Перша', + 'previous' => '←', + 'next' => '→', + 'last' => 'Остання' + ] + ], + 'select' => [ + 'nothing' => 'Нічого не вибрано', + 'selected' => 'вибрано', + 'placeholder' => 'Виберіть зі списку', + ], + 'image' => [ + 'browse' => 'Вибір зображеня', + 'browseMultiple' => 'Вибір зображеня', + 'remove' => 'Видалити', + ], + 'file' => [ + 'browse' => 'Вибір файлу', + 'remove' => 'Видалити', + ], +]; From 3bd27ab9aea8f95688eb6b4d49df9e1693e7151a Mon Sep 17 00:00:00 2001 From: Pedro Faria Date: Mon, 10 Aug 2015 21:54:03 -0300 Subject: [PATCH 100/108] add possibilities to extend ckeditor configurations --- public/default/js/formitems/ckeditor/config.js | 3 ++- .../Admin/Http/Controllers/AdminController.php | 11 ++++++++++- src/config/config.php | 7 +++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/public/default/js/formitems/ckeditor/config.js b/public/default/js/formitems/ckeditor/config.js index a0ad859c..72d51668 100644 --- a/public/default/js/formitems/ckeditor/config.js +++ b/public/default/js/formitems/ckeditor/config.js @@ -37,5 +37,6 @@ CKEDITOR.editorConfig = function (config) { CKEDITOR.config.simpleImageBrowserURL = '/' + window.admin.prefix + '/assets/images/all'; CKEDITOR.config.language = window.admin.locale; config.filebrowserImageUploadUrl = '/' + window.admin.prefix + '/assets/images/upload'; -}; + $.extend(config, window.admin.ckeditor_cfg); +}; diff --git a/src/SleepingOwl/Admin/Http/Controllers/AdminController.php b/src/SleepingOwl/Admin/Http/Controllers/AdminController.php index cf6c1024..033d864a 100644 --- a/src/SleepingOwl/Admin/Http/Controllers/AdminController.php +++ b/src/SleepingOwl/Admin/Http/Controllers/AdminController.php @@ -119,8 +119,17 @@ public function getLang() { $lang = trans('admin::lang', [], 'messages', 'en'); } - $content = 'window.admin={}; window.admin.locale="' . App::getLocale() . '"; window.admin.token="' . csrf_token() . '"; window.admin.prefix="' . config('admin.prefix') . '"; window.admin.lang=' . json_encode($lang) . ';'; + $data = array( + 'locale' => App::getLocale(), + 'token' => csrf_token(), + 'prefix' => config('admin.prefix'), + 'lang' => $lang, + 'ckeditor_cfg' => config('admin.ckeditor') + ); + + $content = 'window.admin = '.json_encode($data) . ';'; + $response = new Response($content, 200, [ 'Content-Type' => 'text/javascript', ]); diff --git a/src/config/config.php b/src/config/config.php index 7a640a64..13751bb2 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -50,4 +50,11 @@ 'datetimeFormat' => 'd.m.Y H:i', 'dateFormat' => 'd.m.Y', 'timeFormat' => 'H:i', + + /* + * If you want, you can extend ckeditor default configuration + * with this PHP Hash variable. + * Checkout for more information: https://github.com/sleeping-owl/admin/blob/development/public/default/js/formitems/ckeditor/config.js + */ + 'ckeditor' => [], ]; From c7793172b63e9d67f8b505800dab9adf127f4bfd Mon Sep 17 00:00:00 2001 From: Pedro Faria Date: Mon, 10 Aug 2015 21:59:58 -0300 Subject: [PATCH 101/108] fixing doc Url --- src/config/config.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config/config.php b/src/config/config.php index 13751bb2..3dfcfc31 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -54,7 +54,8 @@ /* * If you want, you can extend ckeditor default configuration * with this PHP Hash variable. - * Checkout for more information: https://github.com/sleeping-owl/admin/blob/development/public/default/js/formitems/ckeditor/config.js + * + * Checkout http://docs.ckeditor.com/#!/api/CKEDITOR.config for more information. */ 'ckeditor' => [], ]; From 0613359ab330664996985721eaf52e6f0f77643d Mon Sep 17 00:00:00 2001 From: Pedro Faria Date: Tue, 11 Aug 2015 18:09:42 -0300 Subject: [PATCH 102/108] Fixing bug on save false checkbox formitems --- src/SleepingOwl/Admin/FormItems/NamedFormItem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SleepingOwl/Admin/FormItems/NamedFormItem.php b/src/SleepingOwl/Admin/FormItems/NamedFormItem.php index 07ca3fbc..c01b4739 100644 --- a/src/SleepingOwl/Admin/FormItems/NamedFormItem.php +++ b/src/SleepingOwl/Admin/FormItems/NamedFormItem.php @@ -121,7 +121,7 @@ public function value() public function save() { $attribute = $this->attribute(); - if (Input::get($this->path()) == null) { + if (Input::get($this->path()) === null) { $value = null; } else { $value = $this->value(); From a5e21a4e0cd0e41a5fa209fcc02283382a5acefb Mon Sep 17 00:00:00 2001 From: Ian Kazlauskas Date: Mon, 17 Aug 2015 16:20:37 +0800 Subject: [PATCH 103/108] Fix for #166 BaseFormItem::validationRules() can accept validation string (i.e. "required|string|max:10") --- src/SleepingOwl/Admin/FormItems/BaseFormItem.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SleepingOwl/Admin/FormItems/BaseFormItem.php b/src/SleepingOwl/Admin/FormItems/BaseFormItem.php index 3038375f..4f7827fd 100644 --- a/src/SleepingOwl/Admin/FormItems/BaseFormItem.php +++ b/src/SleepingOwl/Admin/FormItems/BaseFormItem.php @@ -37,6 +37,10 @@ public function validationRules($validationRules = null) { return $this->validationRules; } + if (is_string($validationRules)) ++ { ++ $validationRules = explode('|', $validationRules); ++ } $this->validationRules = $validationRules; return $this; } @@ -80,4 +84,4 @@ function __toString() } } -} \ No newline at end of file +} From 69f230e9e496e6a83855729244785d1afed94da0 Mon Sep 17 00:00:00 2001 From: Obtlyn Date: Wed, 2 Sep 2015 01:59:19 +0700 Subject: [PATCH 104/108] Add functionality to select count distinct at some point you or i (personally) have to use some query like select count(distinct `col`) from blabla group by `col` this add a functionality to do it, please review :D --- .../Admin/Display/DisplayDatatablesAsync.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php index a4ec57d7..4be4888e 100644 --- a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php +++ b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php @@ -22,9 +22,11 @@ class DisplayDatatablesAsync extends DisplayDatatables implements WithRoutesInte /** * @param string|null $name */ - function __construct($name = null) + protected $distinct; + function __construct($name = null, $distinct=null) { $this->name($name); + $this->distinct=$distinct; } /** @@ -92,11 +94,17 @@ public function renderAsync() $query = $this->repository->query(); $totalCount = $query->count(); + if(!is_null($this->distinct)){ + $filteredCount = $query->distinct()->count($this->distinct); + } + $this->modifyQuery($query); $this->applySearch($query); $this->applyColumnSearch($query); - - $filteredCount = $query->count(); + + if(is_null($this->distinct)){ + $filteredCount = $query->count(); + } $this->applyOrders($query); $this->applyOffset($query); @@ -231,4 +239,4 @@ public function name($name = null) return $this; } -} \ No newline at end of file +} From 4905420b8cbc44f9cd91815838c9d20d70e91328 Mon Sep 17 00:00:00 2001 From: Deondre Ng Date: Tue, 22 Sep 2015 23:28:03 +0800 Subject: [PATCH 105/108] Removed "+" form lines 41-43 It doesn't compile because there were pluses added to the beginning of lines 41-43 --- src/SleepingOwl/Admin/FormItems/BaseFormItem.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SleepingOwl/Admin/FormItems/BaseFormItem.php b/src/SleepingOwl/Admin/FormItems/BaseFormItem.php index 4f7827fd..8efdffc6 100644 --- a/src/SleepingOwl/Admin/FormItems/BaseFormItem.php +++ b/src/SleepingOwl/Admin/FormItems/BaseFormItem.php @@ -38,9 +38,9 @@ public function validationRules($validationRules = null) return $this->validationRules; } if (is_string($validationRules)) -+ { -+ $validationRules = explode('|', $validationRules); -+ } + { + $validationRules = explode('|', $validationRules); + } $this->validationRules = $validationRules; return $this; } From 4fbfb48584d18d390b33bf25b0d668ad034e7b0a Mon Sep 17 00:00:00 2001 From: Vyacheslav Goryachikh Date: Mon, 18 Jan 2016 17:35:50 +0900 Subject: [PATCH 106/108] fix for laravel 5.2 --- .../Admin/Display/DisplayDatatablesAsync.php | 18 +++++++++--------- src/SleepingOwl/Admin/Display/DisplayTable.php | 12 ++++++------ src/SleepingOwl/Admin/Display/DisplayTree.php | 8 ++++---- src/SleepingOwl/Admin/Filter/FilterBase.php | 6 +++--- src/SleepingOwl/Admin/Form/FormDefault.php | 6 +++--- src/SleepingOwl/Admin/FormItems/CKEditor.php | 8 ++++---- src/SleepingOwl/Admin/FormItems/Checkbox.php | 8 ++++---- src/SleepingOwl/Admin/FormItems/Image.php | 8 ++++---- src/SleepingOwl/Admin/FormItems/Images.php | 8 ++++---- .../Admin/FormItems/NamedFormItem.php | 6 +++--- .../Admin/Http/Controllers/AdminController.php | 16 ++++++++-------- .../Admin/Http/Controllers/AuthController.php | 6 +++--- src/SleepingOwl/AdminAuth/AdminAuthManager.php | 4 ++-- .../AdminAuth/AdminAuthServiceProvider.php | 2 +- 14 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php index 4be4888e..3f138e2e 100644 --- a/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php +++ b/src/SleepingOwl/Admin/Display/DisplayDatatablesAsync.php @@ -2,7 +2,7 @@ use AdminTemplate; use Carbon\Carbon; -use Input; +use Request; use Route; use SleepingOwl\Admin\ColumnFilters\Date; use SleepingOwl\Admin\Columns\Column\DateTime; @@ -78,7 +78,7 @@ protected static function findDatatablesAsyncByName(DisplayTabbed $display, $nam public function render() { $params = $this->getParams(); - $attributes = Input::all(); + $attributes = Request::all(); array_unshift($attributes, $this->name()); array_unshift($attributes, $this->model()->alias()); $params['url'] = route('admin.model.async', $attributes); @@ -101,7 +101,7 @@ public function renderAsync() $this->modifyQuery($query); $this->applySearch($query); $this->applyColumnSearch($query); - + if(is_null($this->distinct)){ $filteredCount = $query->count(); } @@ -119,8 +119,8 @@ public function renderAsync() */ protected function applyOffset($query) { - $offset = Input::get('start', 0); - $limit = Input::get('length', 10); + $offset = Request::get('start', 0); + $limit = Request::get('length', 10); if ($limit == -1) { return; @@ -134,7 +134,7 @@ protected function applyOffset($query) */ protected function applyOrders($query) { - $orders = Input::get('order', []); + $orders = Request::get('order', []); foreach ($orders as $order) { $columnIndex = $order['column']; @@ -154,7 +154,7 @@ protected function applyOrders($query) */ protected function applySearch($query) { - $search = Input::get('search.value'); + $search = Request::get('search.value'); if (is_null($search)) { return; @@ -179,7 +179,7 @@ protected function applySearch($query) protected function applyColumnSearch($query) { - $queryColumns = Input::get('columns', []); + $queryColumns = Request::get('columns', []); foreach ($queryColumns as $index => $queryColumn) { $search = array_get($queryColumn, 'search.value'); @@ -207,7 +207,7 @@ protected function prepareDatatablesStructure($collection, $totalCount, $filtere $columns = $this->allColumns(); $result = []; - $result['draw'] = Input::get('draw', 0); + $result['draw'] = Request::get('draw', 0); $result['recordsTotal'] = $totalCount; $result['recordsFiltered'] = $filteredCount; $result['data'] = []; diff --git a/src/SleepingOwl/Admin/Display/DisplayTable.php b/src/SleepingOwl/Admin/Display/DisplayTable.php index ce041ae0..847341ae 100644 --- a/src/SleepingOwl/Admin/Display/DisplayTable.php +++ b/src/SleepingOwl/Admin/Display/DisplayTable.php @@ -2,7 +2,7 @@ use AdminTemplate; use Illuminate\Contracts\Support\Renderable; -use Input; +use Request; use SleepingOwl\Admin\Admin; use SleepingOwl\Admin\Columns\Column; use SleepingOwl\Admin\Helpers\ExceptionHandler; @@ -125,9 +125,9 @@ public function initialize() protected function initializeAction() { - $action = Input::get('_action'); - $id = Input::get('_id'); - $ids = Input::get('_ids'); + $action = Request::get('_action'); + $id = Request::get('_id'); + $ids = Request::get('_ids'); if ( ! is_null($action) && ( ! is_null($id) || ! is_null($ids))) { $columns = array_merge($this->columns(), $this->actions()); @@ -249,7 +249,7 @@ protected function getParams() 'title' => $this->title(), 'columns' => $this->allColumns(), 'creatable' => ! is_null($this->model()->create()), - 'createUrl' => $this->model()->createUrl($this->parameters() + Input::all()), + 'createUrl' => $this->model()->createUrl($this->parameters() + Request::all()), 'actions' => $this->actions(), ]; } @@ -274,4 +274,4 @@ function __toString() } } -} \ No newline at end of file +} diff --git a/src/SleepingOwl/Admin/Display/DisplayTree.php b/src/SleepingOwl/Admin/Display/DisplayTree.php index 407d9e3d..7109c85d 100644 --- a/src/SleepingOwl/Admin/Display/DisplayTree.php +++ b/src/SleepingOwl/Admin/Display/DisplayTree.php @@ -2,7 +2,7 @@ use AdminTemplate; use Illuminate\Contracts\Support\Renderable; -use Input; +use Request; use Route; use SleepingOwl\Admin\Admin; use SleepingOwl\Admin\AssetManager\AssetManager; @@ -99,7 +99,7 @@ public function render() 'url' => Admin::model($this->class)->displayUrl(), 'value' => $this->value(), 'creatable' => ! is_null($this->model()->create()), - 'createUrl' => $this->model()->createUrl($this->parameters() + Input::all()), + 'createUrl' => $this->model()->createUrl($this->parameters() + Request::all()), 'controls' => [Column::treeControl()], ]; return view(AdminTemplate::view('display.tree'), $params); @@ -114,7 +114,7 @@ public static function registerRoutes() { Route::post('{adminModel}/reorder', function ($model) { - $data = Input::get('data'); + $data = Request::get('data'); $model->display()->repository()->reorder($data); }); } @@ -159,4 +159,4 @@ public function rootParentId($rootParentId = null) return $this; } -} \ No newline at end of file +} diff --git a/src/SleepingOwl/Admin/Filter/FilterBase.php b/src/SleepingOwl/Admin/Filter/FilterBase.php index 86d1c028..ea08305d 100644 --- a/src/SleepingOwl/Admin/Filter/FilterBase.php +++ b/src/SleepingOwl/Admin/Filter/FilterBase.php @@ -1,6 +1,6 @@ value(); if (is_null($value)) { @@ -82,4 +82,4 @@ public function apply($query) $query->where($this->name(), $this->value()); } -} \ No newline at end of file +} diff --git a/src/SleepingOwl/Admin/Form/FormDefault.php b/src/SleepingOwl/Admin/Form/FormDefault.php index 17debee2..0d733a3a 100644 --- a/src/SleepingOwl/Admin/Form/FormDefault.php +++ b/src/SleepingOwl/Admin/Form/FormDefault.php @@ -3,7 +3,7 @@ use AdminTemplate; use Illuminate\Contracts\Support\Renderable; use Illuminate\View\View; -use Input; +use Request; use SleepingOwl\Admin\Admin; use SleepingOwl\Admin\Interfaces\DisplayInterface; use SleepingOwl\Admin\Interfaces\FormInterface; @@ -203,7 +203,7 @@ public function validate($model) $rules += $item->getValidationRules(); } }); - $data = Input::all(); + $data = Request::all(); $verifier = app('validation.presence'); $verifier->setConnection($this->instance()->getConnectionName()); $validator = Validator::make($data, $rules); @@ -237,4 +237,4 @@ function __toString() return (string)$this->render(); } -} \ No newline at end of file +} diff --git a/src/SleepingOwl/Admin/FormItems/CKEditor.php b/src/SleepingOwl/Admin/FormItems/CKEditor.php index b726e711..217f03ea 100644 --- a/src/SleepingOwl/Admin/FormItems/CKEditor.php +++ b/src/SleepingOwl/Admin/FormItems/CKEditor.php @@ -1,7 +1,7 @@ getClientOriginalName(); $file = $file->move($upload_dir, $finalFilename); - $CKEditorFuncNum = Input::get('CKEditorFuncNum'); + $CKEditorFuncNum = Request::get('CKEditorFuncNum'); $url = asset($path . $finalFilename); $message = trans('admin::lang.ckeditor.upload.success', [ 'size' => number_format($file->getSize() / 1024, 3, '.', ''), @@ -144,4 +144,4 @@ protected static function postUpload() return ''; } -} \ No newline at end of file +} diff --git a/src/SleepingOwl/Admin/FormItems/Checkbox.php b/src/SleepingOwl/Admin/FormItems/Checkbox.php index cd7248e8..ab1f382f 100644 --- a/src/SleepingOwl/Admin/FormItems/Checkbox.php +++ b/src/SleepingOwl/Admin/FormItems/Checkbox.php @@ -1,6 +1,6 @@ name(); - if ( ! Input::has($name)) + if ( ! Request::has($name)) { - Input::merge([$name => 0]); + Request::merge([$name => 0]); } parent::save(); } -} \ No newline at end of file +} diff --git a/src/SleepingOwl/Admin/FormItems/Image.php b/src/SleepingOwl/Admin/FormItems/Image.php index beb298ea..59f61443 100644 --- a/src/SleepingOwl/Admin/FormItems/Image.php +++ b/src/SleepingOwl/Admin/FormItems/Image.php @@ -1,6 +1,6 @@ 'admin.formitems.image.' . static::$route, function () { - $validator = Validator::make(Input::all(), static::uploadValidationRules()); + $validator = Validator::make(Request::all(), static::uploadValidationRules()); if ($validator->fails()) { return Response::make($validator->errors()->get('file'), 400); } - $file = Input::file('file'); + $file = Request::file('file'); $filename = md5(time() . $file->getClientOriginalName()) . '.' . $file->getClientOriginalExtension(); $path = config('admin.imagesUploadDirectory'); $fullpath = public_path($path); @@ -53,4 +53,4 @@ protected static function uploadValidationRules() ]; } -} \ No newline at end of file +} diff --git a/src/SleepingOwl/Admin/FormItems/Images.php b/src/SleepingOwl/Admin/FormItems/Images.php index 227ef047..ef663862 100644 --- a/src/SleepingOwl/Admin/FormItems/Images.php +++ b/src/SleepingOwl/Admin/FormItems/Images.php @@ -1,6 +1,6 @@ name(); - $value = Input::get($name, ''); + $value = Request::get($name, ''); if ( ! empty($value)) { $value = explode(',', $value); @@ -28,7 +28,7 @@ public function save() { $value = []; } - Input::merge([$name => $value]); + Request::merge([$name => $value]); parent::save(); } @@ -46,4 +46,4 @@ public function value() return $value; } -} \ No newline at end of file +} diff --git a/src/SleepingOwl/Admin/FormItems/NamedFormItem.php b/src/SleepingOwl/Admin/FormItems/NamedFormItem.php index c01b4739..6cf16b32 100644 --- a/src/SleepingOwl/Admin/FormItems/NamedFormItem.php +++ b/src/SleepingOwl/Admin/FormItems/NamedFormItem.php @@ -1,6 +1,6 @@ path())) !== null) { return $value; @@ -121,7 +121,7 @@ public function value() public function save() { $attribute = $this->attribute(); - if (Input::get($this->path()) === null) { + if (Request::get($this->path()) === null) { $value = null; } else { $value = $this->value(); diff --git a/src/SleepingOwl/Admin/Http/Controllers/AdminController.php b/src/SleepingOwl/Admin/Http/Controllers/AdminController.php index 033d864a..ff5c8206 100644 --- a/src/SleepingOwl/Admin/Http/Controllers/AdminController.php +++ b/src/SleepingOwl/Admin/Http/Controllers/AdminController.php @@ -5,7 +5,7 @@ use Illuminate\Contracts\Support\Renderable; use Illuminate\Http\Response; use Illuminate\Routing\Controller; -use Input; +use Request; use Redirect; use SleepingOwl\Admin\Interfaces\FormInterface; use SleepingOwl\Admin\Repository\BaseRepository; @@ -40,12 +40,12 @@ public function postStore($model) if ($validator = $create->validate($model)) { return Redirect::back()->withErrors($validator)->withInput()->with([ - '_redirectBack' => Input::get('_redirectBack'), + '_redirectBack' => Request::get('_redirectBack'), ]); } $create->save($model); } - return Redirect::to(Input::get('_redirectBack', $model->displayUrl())); + return Redirect::to(Request::get('_redirectBack', $model->displayUrl())); } public function getEdit($model, $id) @@ -70,12 +70,12 @@ public function postUpdate($model, $id) if ($validator = $edit->validate($model)) { return Redirect::back()->withErrors($validator)->withInput()->with([ - '_redirectBack' => Input::get('_redirectBack'), + '_redirectBack' => Request::get('_redirectBack'), ]); } $edit->save($model); } - return Redirect::to(Input::get('_redirectBack', $model->displayUrl())); + return Redirect::to(Request::get('_redirectBack', $model->displayUrl())); } public function postDestroy($model, $id) @@ -127,9 +127,9 @@ public function getLang() 'lang' => $lang, 'ckeditor_cfg' => config('admin.ckeditor') ); - + $content = 'window.admin = '.json_encode($data) . ';'; - + $response = new Response($content, 200, [ 'Content-Type' => 'text/javascript', ]); @@ -151,4 +151,4 @@ public function getWildcard() abort(404); } -} \ No newline at end of file +} diff --git a/src/SleepingOwl/Admin/Http/Controllers/AuthController.php b/src/SleepingOwl/Admin/Http/Controllers/AuthController.php index ff2dac74..6089cc6c 100644 --- a/src/SleepingOwl/Admin/Http/Controllers/AuthController.php +++ b/src/SleepingOwl/Admin/Http/Controllers/AuthController.php @@ -4,7 +4,7 @@ use App; use Illuminate\Routing\Controller; use Illuminate\Support\MessageBag; -use Input; +use Request; use Redirect; use SleepingOwl\AdminAuth\Facades\AdminAuth; use Validator; @@ -33,7 +33,7 @@ public function getLogin() public function postLogin() { $rules = config('admin.auth.rules'); - $data = Input::only(array_keys($rules)); + $data = Request::only(array_keys($rules)); $lang = trans('admin::validation'); if ($lang == 'admin::validation') { @@ -63,4 +63,4 @@ public function getLogout() return $this->redirect(); } -} \ No newline at end of file +} diff --git a/src/SleepingOwl/AdminAuth/AdminAuthManager.php b/src/SleepingOwl/AdminAuth/AdminAuthManager.php index 4a4a349d..9eb2f0e1 100755 --- a/src/SleepingOwl/AdminAuth/AdminAuthManager.php +++ b/src/SleepingOwl/AdminAuth/AdminAuthManager.php @@ -24,7 +24,7 @@ public function createEloquentDriver() * * @return \Illuminate\Auth\EloquentUserProvider */ - protected function createEloquentProvider() + protected function createEloquentProvider($config = null) { $model = Config::get('admin.auth.model'); @@ -38,7 +38,7 @@ protected function createEloquentProvider() */ public function getDefaultDriver() { - return 'eloquent'; + return 'web'; } } diff --git a/src/SleepingOwl/AdminAuth/AdminAuthServiceProvider.php b/src/SleepingOwl/AdminAuth/AdminAuthServiceProvider.php index b96aeeb2..308484c5 100755 --- a/src/SleepingOwl/AdminAuth/AdminAuthServiceProvider.php +++ b/src/SleepingOwl/AdminAuth/AdminAuthServiceProvider.php @@ -18,7 +18,7 @@ class AdminAuthServiceProvider extends ServiceProvider { */ public function register() { - $this->app->bindShared('admin.auth', function($app) + $this->app->singleton('admin.auth', function($app) { return new AdminAuthManager($app); }); From b9737939d78d31ef4f3fbcf93cc0816869990809 Mon Sep 17 00:00:00 2001 From: Vyacheslav Goryachikh Date: Mon, 18 Jan 2016 17:45:44 +0900 Subject: [PATCH 107/108] fix for laravel 5.2 (routes fix) --- src/SleepingOwl/Admin/Http/routes.php | 109 +++++++++++++------------- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/src/SleepingOwl/Admin/Http/routes.php b/src/SleepingOwl/Admin/Http/routes.php index f919686f..9abca552 100644 --- a/src/SleepingOwl/Admin/Http/routes.php +++ b/src/SleepingOwl/Admin/Http/routes.php @@ -1,66 +1,67 @@ 'admin.login', - 'uses' => 'AuthController@getLogin', -]); - -Route::post('login', [ - 'as' => 'admin.login.post', - 'uses' => 'AuthController@postLogin', -]); - -Route::get('assets/lang', [ - 'as' => 'admin.lang', - 'uses' => 'AdminController@getLang', -]); - -Route::group([ - 'middleware' => config('admin.middleware'), -], function () -{ - Route::get('logout', [ - 'as' => 'admin.logout', - 'uses' => 'AuthController@getLogout', +Route::group(['middleware'=>'web'], function() { + Route::get('login', [ + 'as' => 'admin.login', + 'uses' => 'AuthController@getLogin', ]); - Route::get('{adminModel}', [ - 'as' => 'admin.model', - 'uses' => 'AdminController@getDisplay' + Route::post('login', [ + 'as' => 'admin.login.post', + 'uses' => 'AuthController@postLogin', ]); - Route::get('{adminModel}/create', [ - 'as' => 'admin.model.create', - 'uses' => 'AdminController@getCreate', + Route::get('assets/lang', [ + 'as' => 'admin.lang', + 'uses' => 'AdminController@getLang', ]); - Route::post('{adminModel}', [ - 'as' => 'admin.model.store', - 'uses' => 'AdminController@postStore', - ]); + Route::group([ + 'middleware' => config('admin.middleware'), + ], function () + { + Route::get('logout', [ + 'as' => 'admin.logout', + 'uses' => 'AuthController@getLogout', + ]); - Route::get('{adminModel}/{adminModelId}/edit', [ - 'as' => 'admin.model.edit', - 'uses' => 'AdminController@getEdit', - ]); + Route::get('{adminModel}', [ + 'as' => 'admin.model', + 'uses' => 'AdminController@getDisplay' + ]); - Route::post('{adminModel}/{adminModelId}', [ - 'as' => 'admin.model.update', - 'uses' => 'AdminController@postUpdate', - ]); + Route::get('{adminModel}/create', [ + 'as' => 'admin.model.create', + 'uses' => 'AdminController@getCreate', + ]); - Route::delete('{adminModel}/{adminModelId}', [ - 'as' => 'admin.model.destroy', - 'uses' => 'AdminController@postDestroy', - ]); + Route::post('{adminModel}', [ + 'as' => 'admin.model.store', + 'uses' => 'AdminController@postStore', + ]); - Route::post('{adminModel}/{adminModelId}/restore', [ - 'as' => 'admin.model.restore', - 'uses' => 'AdminController@postRestore', - ]); + Route::get('{adminModel}/{adminModelId}/edit', [ + 'as' => 'admin.model.edit', + 'uses' => 'AdminController@getEdit', + ]); - Route::get('{adminWildcard}', [ - 'as' => 'admin.wildcard', - 'uses' => 'AdminController@getWildcard' - ]); -}); \ No newline at end of file + Route::post('{adminModel}/{adminModelId}', [ + 'as' => 'admin.model.update', + 'uses' => 'AdminController@postUpdate', + ]); + + Route::delete('{adminModel}/{adminModelId}', [ + 'as' => 'admin.model.destroy', + 'uses' => 'AdminController@postDestroy', + ]); + + Route::post('{adminModel}/{adminModelId}/restore', [ + 'as' => 'admin.model.restore', + 'uses' => 'AdminController@postRestore', + ]); + + Route::get('{adminWildcard}', [ + 'as' => 'admin.wildcard', + 'uses' => 'AdminController@getWildcard' + ]); + }); +}); From 0dcbf4f82145b500a940e3cf3d630778db69c64d Mon Sep 17 00:00:00 2001 From: root Date: Fri, 2 Sep 2016 23:58:01 +0300 Subject: [PATCH 108/108] fix Sentinel --- src/views/default/_partials/user.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/default/_partials/user.blade.php b/src/views/default/_partials/user.blade.php index 5bfc8bc8..d2453935 100644 --- a/src/views/default/_partials/user.blade.php +++ b/src/views/default/_partials/user.blade.php @@ -1,7 +1,7 @@