kuppayam 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +28 -0
- data/Rakefile +37 -0
- data/app/assets/config/kuppayam_manifest.js +0 -0
- data/app/assets/images/kuppayam/defaults/default-large.png +0 -0
- data/app/assets/images/kuppayam/defaults/default-small.png +0 -0
- data/app/assets/images/kuppayam/defaults/user-large.png +0 -0
- data/app/assets/images/kuppayam/defaults/user-small.png +0 -0
- data/app/assets/images/kuppayam/favicon.png +0 -0
- data/app/assets/images/kuppayam/logo.png +0 -0
- data/app/assets/javascripts/jquery_with_ujs.js +15 -0
- data/app/assets/javascripts/kuppayam.js +21 -0
- data/app/assets/javascripts/kuppayam/utilities.js +68 -0
- data/app/assets/stylesheets/kuppayam.css +23 -0
- data/app/assets/stylesheets/kuppayam/custom.css +8 -0
- data/app/assets/stylesheets/kuppayam/handycss.css +996 -0
- data/app/controllers/kuppayam/base_controller.rb +43 -0
- data/app/helpers/breadcrumbs_helper.rb +27 -0
- data/app/helpers/filter_helper.rb +370 -0
- data/app/helpers/flash_helper.rb +54 -0
- data/app/helpers/image_helper.rb +209 -0
- data/app/helpers/kuppayam_helper.rb +72 -0
- data/app/helpers/meta_tags_helper.rb +50 -0
- data/app/helpers/navigation_helper.rb +17 -0
- data/app/helpers/params_parser_helper.rb +48 -0
- data/app/helpers/render_helper.rb +28 -0
- data/app/helpers/resource_helper.rb +133 -0
- data/app/views/kaminari/_first_page.html.erb +11 -0
- data/app/views/kaminari/_gap.html.erb +8 -0
- data/app/views/kaminari/_last_page.html.erb +11 -0
- data/app/views/kaminari/_next_page.html.erb +11 -0
- data/app/views/kaminari/_page.html.erb +12 -0
- data/app/views/kaminari/_paginator.html.erb +25 -0
- data/app/views/kaminari/_prev_page.html.erb +11 -0
- data/app/views/layouts/kuppayam/_footer.html.erb +25 -0
- data/app/views/layouts/kuppayam/_head.html.erb +29 -0
- data/app/views/layouts/kuppayam/_header.html.erb +43 -0
- data/app/views/layouts/kuppayam/_heading.html.erb +9 -0
- data/app/views/layouts/kuppayam/_navbar.html.erb +321 -0
- data/app/views/layouts/kuppayam/_overlays.html.erb +40 -0
- data/app/views/layouts/kuppayam/_settings_pane.html.erb +107 -0
- data/app/views/layouts/kuppayam/_sidebar.html.erb +612 -0
- data/app/views/layouts/kuppayam/_sidebar_old.html.erb +54 -0
- data/app/views/layouts/kuppayam/admin.html.erb +59 -0
- data/app/views/layouts/kuppayam/blank.html.erb +37 -0
- data/config/initializers/config_center.rb +60 -0
- data/config/initializers/kuppayam_validators.rb +76 -0
- data/config/routes.rb +2 -0
- data/lib/kuppayam.rb +8 -0
- data/lib/kuppayam/action_view/form_helper.rb +254 -0
- data/lib/kuppayam/action_view/modal_helper.rb +7 -0
- data/lib/kuppayam/action_view/theme_helper.rb +226 -0
- data/lib/kuppayam/engine.rb +34 -0
- data/lib/kuppayam/version.rb +3 -0
- data/lib/tasks/kuppayam_tasks.rake +4 -0
- data/vendor/assets/fonts/elusive/css/animation.css +85 -0
- data/vendor/assets/fonts/elusive/css/elusive-codes.css +272 -0
- data/vendor/assets/fonts/elusive/css/elusive-embedded.css +325 -0
- data/vendor/assets/fonts/elusive/css/elusive-ie7-codes.css +272 -0
- data/vendor/assets/fonts/elusive/css/elusive-ie7.css +283 -0
- data/vendor/assets/fonts/elusive/css/elusive.css +323 -0
- data/vendor/assets/fonts/elusive/font/elusive.eot +0 -0
- data/vendor/assets/fonts/elusive/font/elusive.svg +282 -0
- data/vendor/assets/fonts/elusive/font/elusive.ttf +0 -0
- data/vendor/assets/fonts/elusive/font/elusive.woff +0 -0
- data/vendor/assets/fonts/elusive/index.html +0 -0
- data/vendor/assets/fonts/fontawesome/css/font-awesome.css +1681 -0
- data/vendor/assets/fonts/fontawesome/css/font-awesome.min.css +4 -0
- data/vendor/assets/fonts/fontawesome/fonts/FontAwesome.otf +0 -0
- data/vendor/assets/fonts/fontawesome/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/fontawesome/fonts/fontawesome-webfont.svg +520 -0
- data/vendor/assets/fonts/fontawesome/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/fonts/fontawesome/index.html +0 -0
- data/vendor/assets/fonts/glyphicons/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/fonts/glyphicons/glyphicons-halflings-regular.svg +229 -0
- data/vendor/assets/fonts/glyphicons/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/fonts/glyphicons/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/fonts/glyphicons/index.html +0 -0
- data/vendor/assets/fonts/linecons/css/animation.css +85 -0
- data/vendor/assets/fonts/linecons/css/linecons-codes.css +49 -0
- data/vendor/assets/fonts/linecons/css/linecons-embedded.css +102 -0
- data/vendor/assets/fonts/linecons/css/linecons-ie7-codes.css +49 -0
- data/vendor/assets/fonts/linecons/css/linecons-ie7.css +60 -0
- data/vendor/assets/fonts/linecons/css/linecons.css +100 -0
- data/vendor/assets/fonts/linecons/font/linecons.eot +0 -0
- data/vendor/assets/fonts/linecons/font/linecons.svg +59 -0
- data/vendor/assets/fonts/linecons/font/linecons.ttf +0 -0
- data/vendor/assets/fonts/linecons/font/linecons.woff +0 -0
- data/vendor/assets/fonts/linecons/index.html +0 -0
- data/vendor/assets/fonts/meteocons/css/animation.css +85 -0
- data/vendor/assets/fonts/meteocons/css/meteocons-codes.css +48 -0
- data/vendor/assets/fonts/meteocons/css/meteocons-embedded.css +101 -0
- data/vendor/assets/fonts/meteocons/css/meteocons-ie7-codes.css +48 -0
- data/vendor/assets/fonts/meteocons/css/meteocons-ie7.css +59 -0
- data/vendor/assets/fonts/meteocons/css/meteocons.css +99 -0
- data/vendor/assets/fonts/meteocons/font/meteocons.eot +0 -0
- data/vendor/assets/fonts/meteocons/font/meteocons.svg +58 -0
- data/vendor/assets/fonts/meteocons/font/meteocons.ttf +0 -0
- data/vendor/assets/fonts/meteocons/font/meteocons.woff +0 -0
- data/vendor/assets/fonts/meteocons/index.html +0 -0
- data/vendor/assets/images/flags/flag-al.png +0 -0
- data/vendor/assets/images/flags/flag-br.png +0 -0
- data/vendor/assets/images/flags/flag-de.png +0 -0
- data/vendor/assets/images/flags/flag-es.png +0 -0
- data/vendor/assets/images/flags/flag-fr.png +0 -0
- data/vendor/assets/images/flags/flag-uk.png +0 -0
- data/vendor/assets/images/flags/index.html +0 -0
- data/vendor/assets/javascripts/TweenLite.min.js +12 -0
- data/vendor/assets/javascripts/TweenMax.min.js +17 -0
- data/vendor/assets/javascripts/bootstrap.min.js +7 -0
- data/vendor/assets/javascripts/ckeditor/CHANGES.md +643 -0
- data/vendor/assets/javascripts/ckeditor/LICENSE.md +1264 -0
- data/vendor/assets/javascripts/ckeditor/README.md +39 -0
- data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +10 -0
- data/vendor/assets/javascripts/ckeditor/build-config.js +152 -0
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +936 -0
- data/vendor/assets/javascripts/ckeditor/config.js +42 -0
- data/vendor/assets/javascripts/ckeditor/contents.css +134 -0
- data/vendor/assets/javascripts/ckeditor/index.html +0 -0
- data/vendor/assets/javascripts/ckeditor/lang/af.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ar.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/bg.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/bn.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/bs.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ca.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/cs.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/cy.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/da.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/de.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/el.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/en-au.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/en.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/eo.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/es.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/et.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/eu.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/fa.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/fi.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/fo.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/fr-ca.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/fr.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/gl.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/gu.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/he.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/hi.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/hr.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/hu.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/id.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/is.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/it.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ja.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ka.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/km.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ko.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ku.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/lt.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/lv.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/mk.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/mn.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ms.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/nb.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/nl.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/no.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/pl.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/pt.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ro.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/si.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/sk.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/sl.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/sq.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/sr-latn.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/sr.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/sv.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/th.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/tr.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/tt.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/ug.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/uk.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/vi.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +5 -0
- data/vendor/assets/javascripts/ckeditor/lang/zh.js +5 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +43 -0
- data/vendor/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +26 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +31 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +17 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tt.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +12 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
- data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +21 -0
- data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +17 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +28 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/README.md +25 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +74 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
- data/vendor/assets/javascripts/ckeditor/samples/ajax.html +82 -0
- data/vendor/assets/javascripts/ckeditor/samples/api.html +207 -0
- data/vendor/assets/javascripts/ckeditor/samples/appendto.html +56 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/inlineall/logo.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/outputxhtml/outputxhtml.css +204 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/posteddata.php +59 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/sample.jpg +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/assets/uilanguages/languages.js +7 -0
- data/vendor/assets/javascripts/ckeditor/samples/datafiltering.html +401 -0
- data/vendor/assets/javascripts/ckeditor/samples/divreplace.html +141 -0
- data/vendor/assets/javascripts/ckeditor/samples/index.html +128 -0
- data/vendor/assets/javascripts/ckeditor/samples/inlineall.html +311 -0
- data/vendor/assets/javascripts/ckeditor/samples/inlinebycode.html +121 -0
- data/vendor/assets/javascripts/ckeditor/samples/inlinetextarea.html +110 -0
- data/vendor/assets/javascripts/ckeditor/samples/jquery.html +100 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/assets/my_dialog.js +48 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/dialog.html +187 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/enterkey/enterkey.html +103 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js +18 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputforflash.html +280 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputhtml.html +221 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/magicline/magicline.html +206 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/toolbar/toolbar.html +232 -0
- data/vendor/assets/javascripts/ckeditor/samples/plugins/wysiwygarea/fullpage.html +77 -0
- data/vendor/assets/javascripts/ckeditor/samples/readonly.html +73 -0
- data/vendor/assets/javascripts/ckeditor/samples/replacebyclass.html +57 -0
- data/vendor/assets/javascripts/ckeditor/samples/replacebycode.html +56 -0
- data/vendor/assets/javascripts/ckeditor/samples/sample.css +365 -0
- data/vendor/assets/javascripts/ckeditor/samples/sample.js +50 -0
- data/vendor/assets/javascripts/ckeditor/samples/sample_posteddata.php +16 -0
- data/vendor/assets/javascripts/ckeditor/samples/tabindex.html +75 -0
- data/vendor/assets/javascripts/ckeditor/samples/uicolor.html +69 -0
- data/vendor/assets/javascripts/ckeditor/samples/uilanguages.html +119 -0
- data/vendor/assets/javascripts/ckeditor/samples/xhtmlstyle.html +231 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dev/icons16.svg +683 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dev/icons32.svg +694 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dev/locations.json +140 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog.css +1 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog_ie.css +1 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog_ie7.css +1 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog_ie8.css +1 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog_iequirks.css +1 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/dialog_opera.css +1 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor.css +1 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor_gecko.css +1 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor_ie.css +1 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor_ie7.css +1 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor_ie8.css +1 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/editor_iequirks.css +1 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/arrow.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/hidpi/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/hidpi/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/hidpi/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/images/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/readme.md +35 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/sample/bootstrapck-sample.html +127 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/sample/css/bootstrapck-sample.css +1 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/sample/js/analytics.js +4 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/sample/js/jquery-1.11.0.min.js +189 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/gecko/editor_gecko.scss +25 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie/dialog_ie.scss +62 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie/editor_ie.scss +71 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie7/dialog_ie7.scss +68 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie7/editor_ie7.scss +213 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie8/dialog_ie8.scss +24 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/ie8/editor_ie8.scss +27 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/iequirks/dialog_iequirks.scss +21 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/iequirks/editor_iequirks.scss +79 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/browser-specific/opera/dialog_opera.scss +31 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_colorpanel.scss +119 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_elementspath.scss +66 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_mainui.scss +189 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_menu.scss +182 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_panel.scss +199 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_presets.scss +32 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_reset.scss +107 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_richcombo.scss +174 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/_toolbar.scss +317 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/components/editor.scss +66 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/config/_colors.scss +61 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/config/_config.scss +9 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/config/_defaults.scss +37 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/scss/dialog/dialog.scss +822 -0
- data/vendor/assets/javascripts/ckeditor/skins/bootstrapck/skin.js +10 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +51 -0
- data/vendor/assets/javascripts/ckeditor/styles.js +111 -0
- data/vendor/assets/javascripts/colorpicker/bootstrap-colorpicker.min.js +1 -0
- data/vendor/assets/javascripts/colorpicker/images/alpha-horizontal.png +0 -0
- data/vendor/assets/javascripts/colorpicker/images/alpha.png +0 -0
- data/vendor/assets/javascripts/colorpicker/images/hue-horizontal.png +0 -0
- data/vendor/assets/javascripts/colorpicker/images/hue.png +0 -0
- data/vendor/assets/javascripts/colorpicker/images/saturation.png +0 -0
- data/vendor/assets/javascripts/colorpicker/index.html +0 -0
- data/vendor/assets/javascripts/cropper/cropper.css +266 -0
- data/vendor/assets/javascripts/cropper/cropper.js +1063 -0
- data/vendor/assets/javascripts/cropper/cropper.min.css +9 -0
- data/vendor/assets/javascripts/cropper/cropper.min.js +9 -0
- data/vendor/assets/javascripts/cropper/index.html +0 -0
- data/vendor/assets/javascripts/datatables/css/jquery.dataTables.css +476 -0
- data/vendor/assets/javascripts/datatables/css/jquery.dataTables.min.css +1 -0
- data/vendor/assets/javascripts/datatables/css/jquery.dataTables_themeroller.css +330 -0
- data/vendor/assets/javascripts/datatables/dataTables.bootstrap.css +281 -0
- data/vendor/assets/javascripts/datatables/dataTables.bootstrap.js +186 -0
- data/vendor/assets/javascripts/datatables/datatables-angular.js +2651 -0
- data/vendor/assets/javascripts/datatables/images/Sorting icons.psd +0 -0
- data/vendor/assets/javascripts/datatables/images/back_disabled.png +0 -0
- data/vendor/assets/javascripts/datatables/images/back_enabled.png +0 -0
- data/vendor/assets/javascripts/datatables/images/back_enabled_hover.png +0 -0
- data/vendor/assets/javascripts/datatables/images/favicon.ico +0 -0
- data/vendor/assets/javascripts/datatables/images/forward_disabled.png +0 -0
- data/vendor/assets/javascripts/datatables/images/forward_enabled.png +0 -0
- data/vendor/assets/javascripts/datatables/images/forward_enabled_hover.png +0 -0
- data/vendor/assets/javascripts/datatables/images/sort_asc.png +0 -0
- data/vendor/assets/javascripts/datatables/images/sort_asc_disabled.png +0 -0
- data/vendor/assets/javascripts/datatables/images/sort_both.png +0 -0
- data/vendor/assets/javascripts/datatables/images/sort_desc.png +0 -0
- data/vendor/assets/javascripts/datatables/images/sort_desc_disabled.png +0 -0
- data/vendor/assets/javascripts/datatables/index.html +0 -0
- data/vendor/assets/javascripts/datatables/js/jquery.dataTables.js +14624 -0
- data/vendor/assets/javascripts/datatables/js/jquery.dataTables.min.js +155 -0
- data/vendor/assets/javascripts/datatables/js/jquery.js +4 -0
- data/vendor/assets/javascripts/datatables/tabletools/copy_csv_xls.swf +0 -0
- data/vendor/assets/javascripts/datatables/tabletools/copy_csv_xls_pdf.swf +0 -0
- data/vendor/assets/javascripts/datatables/tabletools/dataTables.tableTools.css +361 -0
- data/vendor/assets/javascripts/datatables/tabletools/dataTables.tableTools.min.js +69 -0
- data/vendor/assets/javascripts/datatables/yadcf/jquery.dataTables.yadcf.css +116 -0
- data/vendor/assets/javascripts/datatables/yadcf/jquery.dataTables.yadcf.js +2235 -0
- data/vendor/assets/javascripts/datepicker/bootstrap-datepicker.js +1395 -0
- data/vendor/assets/javascripts/datepicker/index.html +0 -0
- data/vendor/assets/javascripts/daterangepicker/daterangepicker-bs2.css +256 -0
- data/vendor/assets/javascripts/daterangepicker/daterangepicker-bs3.css +288 -0
- data/vendor/assets/javascripts/daterangepicker/daterangepicker.js +1118 -0
- data/vendor/assets/javascripts/daterangepicker/index.html +0 -0
- data/vendor/assets/javascripts/devexpress-web-14.1/js/dx.chartjs.js +12 -0
- data/vendor/assets/javascripts/devexpress-web-14.1/js/globalize.min.js +12 -0
- data/vendor/assets/javascripts/devexpress-web-14.1/js/knockout-3.1.0.js +12 -0
- data/vendor/assets/javascripts/dropzone/css/basic.css +155 -0
- data/vendor/assets/javascripts/dropzone/css/dropzone.css +397 -0
- data/vendor/assets/javascripts/dropzone/css/stylus/basic.styl +165 -0
- data/vendor/assets/javascripts/dropzone/css/stylus/dropzone.styl +180 -0
- data/vendor/assets/javascripts/dropzone/dropzone-amd-module.min.js +1 -0
- data/vendor/assets/javascripts/dropzone/dropzone.min.js +1 -0
- data/vendor/assets/javascripts/dropzone/images/spritemap.png +0 -0
- data/vendor/assets/javascripts/dropzone/images/spritemap@2x.png +0 -0
- data/vendor/assets/javascripts/dropzone/index.html +0 -0
- data/vendor/assets/javascripts/formwizard/index.html +0 -0
- data/vendor/assets/javascripts/formwizard/jquery.bootstrap.wizard.js +331 -0
- data/vendor/assets/javascripts/formwizard/jquery.bootstrap.wizard.min.js +22 -0
- data/vendor/assets/javascripts/fullcalendar/fullcalendar.css +933 -0
- data/vendor/assets/javascripts/fullcalendar/fullcalendar.js +8391 -0
- data/vendor/assets/javascripts/fullcalendar/fullcalendar.min.css +5 -0
- data/vendor/assets/javascripts/fullcalendar/fullcalendar.min.js +8 -0
- data/vendor/assets/javascripts/fullcalendar/fullcalendar.print.css +201 -0
- data/vendor/assets/javascripts/fullcalendar/index.html +0 -0
- data/vendor/assets/javascripts/fullcalendar/moment.min.js +6 -0
- data/vendor/assets/javascripts/handlebars.min.js +28 -0
- data/vendor/assets/javascripts/icheck/icheck.min.js +11 -0
- data/vendor/assets/javascripts/icheck/index.html +0 -0
- data/vendor/assets/javascripts/icheck/skins/all.css +61 -0
- data/vendor/assets/javascripts/icheck/skins/flat/_all.css +530 -0
- data/vendor/assets/javascripts/icheck/skins/flat/aero.css +53 -0
- data/vendor/assets/javascripts/icheck/skins/flat/aero.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/aero@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/blue.css +53 -0
- data/vendor/assets/javascripts/icheck/skins/flat/blue.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/blue@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/flat.css +53 -0
- data/vendor/assets/javascripts/icheck/skins/flat/flat.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/flat@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/green.css +53 -0
- data/vendor/assets/javascripts/icheck/skins/flat/green.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/green@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/grey.css +53 -0
- data/vendor/assets/javascripts/icheck/skins/flat/grey.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/grey@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/orange.css +53 -0
- data/vendor/assets/javascripts/icheck/skins/flat/orange.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/orange@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/pink.css +53 -0
- data/vendor/assets/javascripts/icheck/skins/flat/pink.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/pink@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/purple.css +53 -0
- data/vendor/assets/javascripts/icheck/skins/flat/purple.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/purple@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/red.css +53 -0
- data/vendor/assets/javascripts/icheck/skins/flat/red.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/red@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/yellow.css +53 -0
- data/vendor/assets/javascripts/icheck/skins/flat/yellow.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/flat/yellow@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/futurico/futurico.css +53 -0
- data/vendor/assets/javascripts/icheck/skins/futurico/futurico.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/futurico/futurico@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/line/_all.css +710 -0
- data/vendor/assets/javascripts/icheck/skins/line/aero.css +71 -0
- data/vendor/assets/javascripts/icheck/skins/line/blue.css +71 -0
- data/vendor/assets/javascripts/icheck/skins/line/green.css +71 -0
- data/vendor/assets/javascripts/icheck/skins/line/grey.css +71 -0
- data/vendor/assets/javascripts/icheck/skins/line/line.css +71 -0
- data/vendor/assets/javascripts/icheck/skins/line/line.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/line/line@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/line/orange.css +71 -0
- data/vendor/assets/javascripts/icheck/skins/line/pink.css +71 -0
- data/vendor/assets/javascripts/icheck/skins/line/purple.css +71 -0
- data/vendor/assets/javascripts/icheck/skins/line/red.css +71 -0
- data/vendor/assets/javascripts/icheck/skins/line/yellow.css +71 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/_all.css +590 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/aero.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/aero.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/aero@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/blue.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/blue.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/blue@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/green.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/green.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/green@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/grey.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/grey.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/grey@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/minimal.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/minimal.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/minimal@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/orange.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/orange.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/orange@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/pink.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/pink.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/pink@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/purple.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/purple.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/purple@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/red.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/red.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/red@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/yellow.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/yellow.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/minimal/yellow@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/polaris/polaris.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/polaris/polaris.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/polaris/polaris@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/_all.css +590 -0
- data/vendor/assets/javascripts/icheck/skins/square/aero.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/square/aero.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/aero@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/blue.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/square/blue.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/blue@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/green.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/square/green.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/green@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/grey.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/square/grey.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/grey@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/orange.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/square/orange.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/orange@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/pink.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/square/pink.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/pink@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/purple.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/square/purple.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/purple@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/red.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/square/red.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/red@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/square.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/square/square.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/square@2x.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/yellow.css +59 -0
- data/vendor/assets/javascripts/icheck/skins/square/yellow.png +0 -0
- data/vendor/assets/javascripts/icheck/skins/square/yellow@2x.png +0 -0
- data/vendor/assets/javascripts/inputmask/index.html +0 -0
- data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.date.extensions.js +8 -0
- data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.extensions.js +8 -0
- data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.js +9 -0
- data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.numeric.extensions.js +8 -0
- data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.phone.extensions.js +8 -0
- data/vendor/assets/javascripts/inputmask/inputmask/jquery.inputmask.regex.extensions.js +8 -0
- data/vendor/assets/javascripts/inputmask/jquery.inputmask.bundle.js +9 -0
- data/vendor/assets/javascripts/joinable.js +45 -0
- data/vendor/assets/javascripts/jquery-1.11.1.min.js +4 -0
- data/vendor/assets/javascripts/jquery-ui/external/jquery/jquery.js +9789 -0
- data/vendor/assets/javascripts/jquery-ui/index.html +317 -0
- data/vendor/assets/javascripts/jquery-ui/jquery-ui.css +239 -0
- data/vendor/assets/javascripts/jquery-ui/jquery-ui.js +6343 -0
- data/vendor/assets/javascripts/jquery-ui/jquery-ui.min.css +6 -0
- data/vendor/assets/javascripts/jquery-ui/jquery-ui.min.js +9 -0
- data/vendor/assets/javascripts/jquery-ui/jquery-ui.structure.css +245 -0
- data/vendor/assets/javascripts/jquery-ui/jquery-ui.structure.min.css +5 -0
- data/vendor/assets/javascripts/jquery-validate/additional-methods.js +928 -0
- data/vendor/assets/javascripts/jquery-validate/additional-methods.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/index.html +0 -0
- data/vendor/assets/javascripts/jquery-validate/jquery.validate.js +1357 -0
- data/vendor/assets/javascripts/jquery-validate/jquery.validate.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_ar.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_ar.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_bg.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_bg.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_ca.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_ca.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_cs.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_cs.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_da.js +30 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_da.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_de.js +30 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_de.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_el.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_el.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_es.js +36 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_es.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_es_AR.js +37 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_es_AR.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_et.js +31 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_et.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_eu.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_eu.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_fa.js +36 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_fa.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_fi.js +31 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_fi.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_fr.js +59 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_fr.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_gl.js +38 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_gl.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_he.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_he.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_hr.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_hr.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_hu.js +32 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_hu.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_id.js +32 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_id.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_is.js +31 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_is.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_it.js +36 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_it.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_ja.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_ja.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_ka.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_ka.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_kk.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_kk.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_ko.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_ko.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_lt.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_lt.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_lv.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_lv.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_my.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_my.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_nl.js +43 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_nl.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_no.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_no.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_pl.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_pl.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_pt_BR.js +37 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_pt_BR.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_pt_PT.js +37 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_pt_PT.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_ro.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_ro.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_ru.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_ru.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_si.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_si.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_sk.js +30 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_sk.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_sl.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_sl.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_sr.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_sr.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_sr_lat.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_sr_lat.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_sv.js +31 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_sv.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_th.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_th.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_tj.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_tj.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_tr.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_tr.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_uk.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_uk.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_vi.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_vi.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_zh.js +33 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_zh.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_zh_TW.js +34 -0
- data/vendor/assets/javascripts/jquery-validate/localization/messages_zh_TW.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/methods_de.js +22 -0
- data/vendor/assets/javascripts/jquery-validate/localization/methods_de.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/methods_es_CL.js +22 -0
- data/vendor/assets/javascripts/jquery-validate/localization/methods_es_CL.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/methods_fi.js +22 -0
- data/vendor/assets/javascripts/jquery-validate/localization/methods_fi.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/methods_nl.js +19 -0
- data/vendor/assets/javascripts/jquery-validate/localization/methods_nl.min.js +4 -0
- data/vendor/assets/javascripts/jquery-validate/localization/methods_pt.js +19 -0
- data/vendor/assets/javascripts/jquery-validate/localization/methods_pt.min.js +4 -0
- data/vendor/assets/javascripts/jquery.mousewheel.js +201 -0
- data/vendor/assets/javascripts/jvectormap/index.html +0 -0
- data/vendor/assets/javascripts/jvectormap/jquery-jvectormap-1.1.1.css +37 -0
- data/vendor/assets/javascripts/jvectormap/jquery-jvectormap-1.1.1.min.js +7 -0
- data/vendor/assets/javascripts/jvectormap/jquery-jvectormap-1.2.2.css +37 -0
- data/vendor/assets/javascripts/jvectormap/jquery-jvectormap-1.2.2.min.js +8 -0
- data/vendor/assets/javascripts/jvectormap/regions/index.html +0 -0
- data/vendor/assets/javascripts/jvectormap/regions/jquery-jvectormap-it-mill-en.js +1 -0
- data/vendor/assets/javascripts/jvectormap/regions/jquery-jvectormap-world-mill-en.js +1 -0
- data/vendor/assets/javascripts/knob/index.html +0 -0
- data/vendor/assets/javascripts/knob/jquery.knob.min.js +1 -0
- data/vendor/assets/javascripts/min/bootstrap.min-min.js +2 -0
- data/vendor/assets/javascripts/min/resizeable-min.js +1 -0
- data/vendor/assets/javascripts/min/xenon-notes-min.js +1 -0
- data/vendor/assets/javascripts/min/xenon-toggles-min.js +1 -0
- data/vendor/assets/javascripts/moment.min.js +6 -0
- data/vendor/assets/javascripts/multiselect/css/index.html +0 -0
- data/vendor/assets/javascripts/multiselect/css/multi-select.css +93 -0
- data/vendor/assets/javascripts/multiselect/img/index.html +0 -0
- data/vendor/assets/javascripts/multiselect/img/switch.png +0 -0
- data/vendor/assets/javascripts/multiselect/index.html +0 -0
- data/vendor/assets/javascripts/multiselect/js/index.html +0 -0
- data/vendor/assets/javascripts/multiselect/js/jquery.multi-select.js +532 -0
- data/vendor/assets/javascripts/resizeable.js +122 -0
- data/vendor/assets/javascripts/rwd-table/css/rwd-table.css +306 -0
- data/vendor/assets/javascripts/rwd-table/css/rwd-table.min.css +7 -0
- data/vendor/assets/javascripts/rwd-table/index.html +0 -0
- data/vendor/assets/javascripts/rwd-table/js/rwd-table.js +674 -0
- data/vendor/assets/javascripts/rwd-table/js/rwd-table.min.js +7 -0
- data/vendor/assets/javascripts/select2/LICENSE +18 -0
- data/vendor/assets/javascripts/select2/index.html +0 -0
- data/vendor/assets/javascripts/select2/select2-bootstrap.css +87 -0
- data/vendor/assets/javascripts/select2/select2-spinner.gif +0 -0
- data/vendor/assets/javascripts/select2/select2.css +704 -0
- data/vendor/assets/javascripts/select2/select2.jquery.json +36 -0
- data/vendor/assets/javascripts/select2/select2.js +3508 -0
- data/vendor/assets/javascripts/select2/select2.min.js +23 -0
- data/vendor/assets/javascripts/select2/select2.png +0 -0
- data/vendor/assets/javascripts/select2/select2_locale_ar.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_az.js +20 -0
- data/vendor/assets/javascripts/select2/select2_locale_bg.js +20 -0
- data/vendor/assets/javascripts/select2/select2_locale_ca.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_cs.js +51 -0
- data/vendor/assets/javascripts/select2/select2_locale_da.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_de.js +18 -0
- data/vendor/assets/javascripts/select2/select2_locale_el.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_en.js.template +20 -0
- data/vendor/assets/javascripts/select2/select2_locale_es.js +17 -0
- data/vendor/assets/javascripts/select2/select2_locale_et.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_eu.js +45 -0
- data/vendor/assets/javascripts/select2/select2_locale_fa.js +21 -0
- data/vendor/assets/javascripts/select2/select2_locale_fi.js +30 -0
- data/vendor/assets/javascripts/select2/select2_locale_fr.js +18 -0
- data/vendor/assets/javascripts/select2/select2_locale_gl.js +45 -0
- data/vendor/assets/javascripts/select2/select2_locale_he.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_hr.js +24 -0
- data/vendor/assets/javascripts/select2/select2_locale_hu.js +17 -0
- data/vendor/assets/javascripts/select2/select2_locale_id.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_is.js +17 -0
- data/vendor/assets/javascripts/select2/select2_locale_it.js +17 -0
- data/vendor/assets/javascripts/select2/select2_locale_ja.js +17 -0
- data/vendor/assets/javascripts/select2/select2_locale_ka.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_ko.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_lt.js +26 -0
- data/vendor/assets/javascripts/select2/select2_locale_lv.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_mk.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_ms.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_nl.js +17 -0
- data/vendor/assets/javascripts/select2/select2_locale_no.js +20 -0
- data/vendor/assets/javascripts/select2/select2_locale_pl.js +25 -0
- data/vendor/assets/javascripts/select2/select2_locale_pt-BR.js +17 -0
- data/vendor/assets/javascripts/select2/select2_locale_pt-PT.js +17 -0
- data/vendor/assets/javascripts/select2/select2_locale_ro.js +17 -0
- data/vendor/assets/javascripts/select2/select2_locale_rs.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_ru.js +23 -0
- data/vendor/assets/javascripts/select2/select2_locale_sk.js +50 -0
- data/vendor/assets/javascripts/select2/select2_locale_sv.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_th.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_tr.js +19 -0
- data/vendor/assets/javascripts/select2/select2_locale_ug-CN.js +16 -0
- data/vendor/assets/javascripts/select2/select2_locale_uk.js +25 -0
- data/vendor/assets/javascripts/select2/select2_locale_vi.js +20 -0
- data/vendor/assets/javascripts/select2/select2_locale_zh-CN.js +16 -0
- data/vendor/assets/javascripts/select2/select2_locale_zh-TW.js +16 -0
- data/vendor/assets/javascripts/select2/select2x2.png +0 -0
- data/vendor/assets/javascripts/selectboxit/index.html +0 -0
- data/vendor/assets/javascripts/selectboxit/jquery.selectBoxIt.css +278 -0
- data/vendor/assets/javascripts/selectboxit/jquery.selectBoxIt.js +3259 -0
- data/vendor/assets/javascripts/selectboxit/jquery.selectBoxIt.min.js +4 -0
- data/vendor/assets/javascripts/tagsinput/bootstrap-tagsinput.css +46 -0
- data/vendor/assets/javascripts/tagsinput/bootstrap-tagsinput.js +617 -0
- data/vendor/assets/javascripts/tagsinput/bootstrap-tagsinput.less +50 -0
- data/vendor/assets/javascripts/tagsinput/bootstrap-tagsinput.min.js +7 -0
- data/vendor/assets/javascripts/tagsinput/bootstrap-tagsinput.min.js.map +1 -0
- data/vendor/assets/javascripts/tagsinput/index.html +0 -0
- data/vendor/assets/javascripts/tagsinput/min/bootstrap-tagsinput.min-min.js +8 -0
- data/vendor/assets/javascripts/timepicker/bootstrap-timepicker.min.js +5 -0
- data/vendor/assets/javascripts/timepicker/index.html +0 -0
- data/vendor/assets/javascripts/toastr/index.html +0 -0
- data/vendor/assets/javascripts/toastr/toastr-icon.png +0 -0
- data/vendor/assets/javascripts/toastr/toastr.css +180 -0
- data/vendor/assets/javascripts/toastr/toastr.js +350 -0
- data/vendor/assets/javascripts/toastr/toastr.less +232 -0
- data/vendor/assets/javascripts/toastr/toastr.min.css +1 -0
- data/vendor/assets/javascripts/toastr/toastr.min.js +1 -0
- data/vendor/assets/javascripts/toastr/toastr.min.js.map +8 -0
- data/vendor/assets/javascripts/toastr/toastr.scss +183 -0
- data/vendor/assets/javascripts/tocify/index.html +0 -0
- data/vendor/assets/javascripts/tocify/jquery.tocify.css +62 -0
- data/vendor/assets/javascripts/tocify/jquery.tocify.min.js +4 -0
- data/vendor/assets/javascripts/typeahead.bundle.js +1782 -0
- data/vendor/assets/javascripts/uikit/css/addons/uikit.addons.css +1253 -0
- data/vendor/assets/javascripts/uikit/css/addons/uikit.addons.min.css +3 -0
- data/vendor/assets/javascripts/uikit/css/addons/uikit.almost-flat.addons.css +1334 -0
- data/vendor/assets/javascripts/uikit/css/addons/uikit.almost-flat.addons.min.css +3 -0
- data/vendor/assets/javascripts/uikit/css/addons/uikit.gradient.addons.css +1355 -0
- data/vendor/assets/javascripts/uikit/css/addons/uikit.gradient.addons.min.css +3 -0
- data/vendor/assets/javascripts/uikit/css/index.html +0 -0
- data/vendor/assets/javascripts/uikit/css/uikit.almost-flat.css +7273 -0
- data/vendor/assets/javascripts/uikit/css/uikit.almost-flat.min.css +3 -0
- data/vendor/assets/javascripts/uikit/css/uikit.css +1 -0
- data/vendor/assets/javascripts/uikit/css/uikit.gradient.css +7341 -0
- data/vendor/assets/javascripts/uikit/css/uikit.gradient.min.css +3 -0
- data/vendor/assets/javascripts/uikit/css/uikit.min.css +3 -0
- data/vendor/assets/javascripts/uikit/fonts/FontAwesome.otf +0 -0
- data/vendor/assets/javascripts/uikit/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/javascripts/uikit/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/javascripts/uikit/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/javascripts/uikit/fonts/index.html +0 -0
- data/vendor/assets/javascripts/uikit/index.html +0 -0
- data/vendor/assets/javascripts/uikit/js/addons/autocomplete.js +305 -0
- data/vendor/assets/javascripts/uikit/js/addons/autocomplete.min.js +3 -0
- data/vendor/assets/javascripts/uikit/js/addons/cover.js +90 -0
- data/vendor/assets/javascripts/uikit/js/addons/cover.min.js +3 -0
- data/vendor/assets/javascripts/uikit/js/addons/datepicker.js +379 -0
- data/vendor/assets/javascripts/uikit/js/addons/datepicker.min.js +3 -0
- data/vendor/assets/javascripts/uikit/js/addons/form-password.js +62 -0
- data/vendor/assets/javascripts/uikit/js/addons/form-password.min.js +3 -0
- data/vendor/assets/javascripts/uikit/js/addons/form-select.js +62 -0
- data/vendor/assets/javascripts/uikit/js/addons/form-select.min.js +3 -0
- data/vendor/assets/javascripts/uikit/js/addons/htmleditor.js +615 -0
- data/vendor/assets/javascripts/uikit/js/addons/htmleditor.min.js +3 -0
- data/vendor/assets/javascripts/uikit/js/addons/nestable.js +575 -0
- data/vendor/assets/javascripts/uikit/js/addons/nestable.min.js +3 -0
- data/vendor/assets/javascripts/uikit/js/addons/notify.js +180 -0
- data/vendor/assets/javascripts/uikit/js/addons/notify.min.js +3 -0
- data/vendor/assets/javascripts/uikit/js/addons/pagination.js +146 -0
- data/vendor/assets/javascripts/uikit/js/addons/pagination.min.js +3 -0
- data/vendor/assets/javascripts/uikit/js/addons/search.js +90 -0
- data/vendor/assets/javascripts/uikit/js/addons/search.min.js +3 -0
- data/vendor/assets/javascripts/uikit/js/addons/sortable.js +520 -0
- data/vendor/assets/javascripts/uikit/js/addons/sortable.min.js +3 -0
- data/vendor/assets/javascripts/uikit/js/addons/sticky.js +240 -0
- data/vendor/assets/javascripts/uikit/js/addons/sticky.min.js +3 -0
- data/vendor/assets/javascripts/uikit/js/addons/timepicker.js +165 -0
- data/vendor/assets/javascripts/uikit/js/addons/timepicker.min.js +3 -0
- data/vendor/assets/javascripts/uikit/js/addons/upload.js +256 -0
- data/vendor/assets/javascripts/uikit/js/addons/upload.min.js +3 -0
- data/vendor/assets/javascripts/uikit/js/index.html +0 -0
- data/vendor/assets/javascripts/uikit/js/uikit.js +2592 -0
- data/vendor/assets/javascripts/uikit/js/uikit.min.js +4 -0
- data/vendor/assets/javascripts/uikit/less/addons/autocomplete.less +102 -0
- data/vendor/assets/javascripts/uikit/less/addons/cover.less +70 -0
- data/vendor/assets/javascripts/uikit/less/addons/datepicker.less +193 -0
- data/vendor/assets/javascripts/uikit/less/addons/dotnav.less +141 -0
- data/vendor/assets/javascripts/uikit/less/addons/flex.less +62 -0
- data/vendor/assets/javascripts/uikit/less/addons/form-advanced.less +123 -0
- data/vendor/assets/javascripts/uikit/less/addons/form-file.less +63 -0
- data/vendor/assets/javascripts/uikit/less/addons/form-password.less +74 -0
- data/vendor/assets/javascripts/uikit/less/addons/form-select.less +66 -0
- data/vendor/assets/javascripts/uikit/less/addons/htmleditor.less +274 -0
- data/vendor/assets/javascripts/uikit/less/addons/nestable.less +204 -0
- data/vendor/assets/javascripts/uikit/less/addons/notify.less +191 -0
- data/vendor/assets/javascripts/uikit/less/addons/placeholder.less +66 -0
- data/vendor/assets/javascripts/uikit/less/addons/search.less +310 -0
- data/vendor/assets/javascripts/uikit/less/addons/slidenav.less +164 -0
- data/vendor/assets/javascripts/uikit/less/addons/sortable.less +110 -0
- data/vendor/assets/javascripts/uikit/less/addons/sticky.less +52 -0
- data/vendor/assets/javascripts/uikit/less/addons/upload.less +34 -0
- data/vendor/assets/javascripts/uikit/less/alert.less +141 -0
- data/vendor/assets/javascripts/uikit/less/animation.less +580 -0
- data/vendor/assets/javascripts/uikit/less/article.less +139 -0
- data/vendor/assets/javascripts/uikit/less/badge.less +111 -0
- data/vendor/assets/javascripts/uikit/less/base.less +521 -0
- data/vendor/assets/javascripts/uikit/less/breadcrumb.less +86 -0
- data/vendor/assets/javascripts/uikit/less/button.less +407 -0
- data/vendor/assets/javascripts/uikit/less/close.less +133 -0
- data/vendor/assets/javascripts/uikit/less/comment.less +172 -0
- data/vendor/assets/javascripts/uikit/less/description-list.less +70 -0
- data/vendor/assets/javascripts/uikit/less/dropdown.less +272 -0
- data/vendor/assets/javascripts/uikit/less/form.less +623 -0
- data/vendor/assets/javascripts/uikit/less/grid.less +593 -0
- data/vendor/assets/javascripts/uikit/less/icon.less +695 -0
- data/vendor/assets/javascripts/uikit/less/index.html +0 -0
- data/vendor/assets/javascripts/uikit/less/list.less +102 -0
- data/vendor/assets/javascripts/uikit/less/modal.less +226 -0
- data/vendor/assets/javascripts/uikit/less/nav.less +468 -0
- data/vendor/assets/javascripts/uikit/less/navbar.less +327 -0
- data/vendor/assets/javascripts/uikit/less/offcanvas.less +162 -0
- data/vendor/assets/javascripts/uikit/less/overlay.less +241 -0
- data/vendor/assets/javascripts/uikit/less/pagination.less +198 -0
- data/vendor/assets/javascripts/uikit/less/panel.less +244 -0
- data/vendor/assets/javascripts/uikit/less/print.less +52 -0
- data/vendor/assets/javascripts/uikit/less/progress.less +174 -0
- data/vendor/assets/javascripts/uikit/less/subnav.less +183 -0
- data/vendor/assets/javascripts/uikit/less/switcher.less +33 -0
- data/vendor/assets/javascripts/uikit/less/tab.less +368 -0
- data/vendor/assets/javascripts/uikit/less/table.less +120 -0
- data/vendor/assets/javascripts/uikit/less/text.less +124 -0
- data/vendor/assets/javascripts/uikit/less/thumbnail.less +123 -0
- data/vendor/assets/javascripts/uikit/less/tooltip.less +179 -0
- data/vendor/assets/javascripts/uikit/less/uikit-addons.less +26 -0
- data/vendor/assets/javascripts/uikit/less/uikit.css +4426 -0
- data/vendor/assets/javascripts/uikit/less/uikit.less +53 -0
- data/vendor/assets/javascripts/uikit/less/utility.less +526 -0
- data/vendor/assets/javascripts/uikit/less/variables.less +27 -0
- data/vendor/assets/javascripts/uikit/uikit.css +1 -0
- data/vendor/assets/javascripts/uikit/vendor/codemirror/codemirror.css +340 -0
- data/vendor/assets/javascripts/uikit/vendor/codemirror/codemirror.js +65 -0
- data/vendor/assets/javascripts/uikit/vendor/codemirror/show-hint.css +38 -0
- data/vendor/assets/javascripts/uikit/vendor/customizer.js +290 -0
- data/vendor/assets/javascripts/uikit/vendor/highlight/highlight.css +127 -0
- data/vendor/assets/javascripts/uikit/vendor/highlight/highlight.js +1 -0
- data/vendor/assets/javascripts/uikit/vendor/highlight/test.html +45 -0
- data/vendor/assets/javascripts/uikit/vendor/holder.js +648 -0
- data/vendor/assets/javascripts/uikit/vendor/index.html +0 -0
- data/vendor/assets/javascripts/uikit/vendor/jquery.js +4 -0
- data/vendor/assets/javascripts/uikit/vendor/jquery.less.js +274 -0
- data/vendor/assets/javascripts/uikit/vendor/jquery.mustache.js +16 -0
- data/vendor/assets/javascripts/uikit/vendor/jquery.rtl.js +271 -0
- data/vendor/assets/javascripts/uikit/vendor/less.js +16 -0
- data/vendor/assets/javascripts/uikit/vendor/marked.js +1272 -0
- data/vendor/assets/javascripts/uikit/vendor/spectrum/spectrum.css +480 -0
- data/vendor/assets/javascripts/uikit/vendor/spectrum/spectrum.js +1889 -0
- data/vendor/assets/javascripts/uikit/vendor/spectrum/test.html +343 -0
- data/vendor/assets/javascripts/wysihtml5/index.html +0 -0
- data/vendor/assets/javascripts/wysihtml5/lib/css/bootstrap-responsive.css +686 -0
- data/vendor/assets/javascripts/wysihtml5/lib/css/bootstrap-responsive.min.css +12 -0
- data/vendor/assets/javascripts/wysihtml5/lib/css/bootstrap.css +3990 -0
- data/vendor/assets/javascripts/wysihtml5/lib/css/bootstrap.min.css +689 -0
- data/vendor/assets/javascripts/wysihtml5/lib/css/index.html +0 -0
- data/vendor/assets/javascripts/wysihtml5/lib/css/prettify.css +30 -0
- data/vendor/assets/javascripts/wysihtml5/lib/css/wysiwyg-color.css +67 -0
- data/vendor/assets/javascripts/wysihtml5/lib/img/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/javascripts/wysihtml5/lib/img/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/wysihtml5/lib/img/index.html +0 -0
- data/vendor/assets/javascripts/wysihtml5/lib/index.html +0 -0
- data/vendor/assets/javascripts/wysihtml5/lib/js/bootstrap-button.js +100 -0
- data/vendor/assets/javascripts/wysihtml5/lib/js/bootstrap.js +2025 -0
- data/vendor/assets/javascripts/wysihtml5/lib/js/bootstrap.min.js +6 -0
- data/vendor/assets/javascripts/wysihtml5/lib/js/index.html +0 -0
- data/vendor/assets/javascripts/wysihtml5/lib/js/jquery-1.7.2.min.js +4 -0
- data/vendor/assets/javascripts/wysihtml5/lib/js/prettify.js +28 -0
- data/vendor/assets/javascripts/wysihtml5/lib/js/wysihtml5-0.3.0.js +9523 -0
- data/vendor/assets/javascripts/wysihtml5/lib/js/wysihtml5-0.3.0.min.js +261 -0
- data/vendor/assets/javascripts/wysihtml5/src/bootstrap-wysihtml5.css +102 -0
- data/vendor/assets/javascripts/wysihtml5/src/bootstrap-wysihtml5.js +519 -0
- data/vendor/assets/javascripts/wysihtml5/src/index.html +0 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ar-AR.js +49 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.bg-BG.js +49 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ca-CT.js +47 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.cs-CZ.js +48 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.da-DK.js +48 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.de-DE.js +49 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.el-GR.js +48 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.es-AR.js +49 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.es-ES.js +48 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.fr-FR.js +49 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.hr-HR.js +48 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.it-IT.js +47 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ja-JP.js +49 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ko-KR.js +49 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.lt-LT.js +48 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.mo-MD.js +48 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.nb-NB.js +49 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.nl-NL.js +48 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.pl-PL.js +48 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.pt-BR.js +52 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ru-RU.js +49 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.sk-SK.js +48 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.sv-SE.js +48 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.tr-TR.js +48 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.ua-UA.js +49 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.zh-CN.js +48 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/bootstrap-wysihtml5.zh-TW.js +48 -0
- data/vendor/assets/javascripts/wysihtml5/src/locales/index.html +0 -0
- data/vendor/assets/javascripts/wysihtml5/wysihtml5-angular.js +10042 -0
- data/vendor/assets/javascripts/xenon-api.js +91 -0
- data/vendor/assets/javascripts/xenon-custom.js +1950 -0
- data/vendor/assets/javascripts/xenon-notes.js +189 -0
- data/vendor/assets/javascripts/xenon-toggles.js +321 -0
- data/vendor/assets/javascripts/xenon-widgets.js +171 -0
- data/vendor/assets/stylesheets/bootstrap.css +1 -0
- data/vendor/assets/stylesheets/handycss.css +996 -0
- data/vendor/assets/stylesheets/other/wysihtml5-color.css +67 -0
- data/vendor/assets/stylesheets/xenon-components.css +1 -0
- data/vendor/assets/stylesheets/xenon-core.css +1 -0
- data/vendor/assets/stylesheets/xenon-forms.css +18 -0
- data/vendor/assets/stylesheets/xenon-skins.css +1 -0
- data/vendor/assets/stylesheets/xenon.css +18 -0
- metadata +1341 -0
@@ -0,0 +1,186 @@
|
|
1
|
+
/*! DataTables Bootstrap integration
|
2
|
+
* ©2011-2014 SpryMedia Ltd - datatables.net/license
|
3
|
+
*/
|
4
|
+
|
5
|
+
/**
|
6
|
+
* DataTables integration for Bootstrap 3. This requires Bootstrap 3 and
|
7
|
+
* DataTables 1.10 or newer.
|
8
|
+
*
|
9
|
+
* This file sets the defaults and adds options to DataTables to style its
|
10
|
+
* controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap
|
11
|
+
* for further information.
|
12
|
+
*/
|
13
|
+
(function(window, document, undefined){
|
14
|
+
|
15
|
+
var factory = function( $, DataTable ) {
|
16
|
+
"use strict";
|
17
|
+
|
18
|
+
|
19
|
+
/* Set the defaults for DataTables initialisation */
|
20
|
+
$.extend( true, DataTable.defaults, {
|
21
|
+
dom:
|
22
|
+
"<'row'<'col-xs-6'l><'col-xs-6'f>r>"+
|
23
|
+
"t"+
|
24
|
+
"<'row'<'col-xs-6'i><'col-xs-6'p>>",
|
25
|
+
renderer: 'bootstrap'
|
26
|
+
} );
|
27
|
+
|
28
|
+
|
29
|
+
/* Default class modification */
|
30
|
+
$.extend( DataTable.ext.classes, {
|
31
|
+
sWrapper: "dataTables_wrapper form-inline dt-bootstrap",
|
32
|
+
sFilterInput: "form-control input-sm",
|
33
|
+
sLengthSelect: "form-control input-sm"
|
34
|
+
} );
|
35
|
+
|
36
|
+
|
37
|
+
/* Bootstrap paging button renderer */
|
38
|
+
DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) {
|
39
|
+
var api = new DataTable.Api( settings );
|
40
|
+
var classes = settings.oClasses;
|
41
|
+
var lang = settings.oLanguage.oPaginate;
|
42
|
+
var btnDisplay, btnClass;
|
43
|
+
|
44
|
+
var attach = function( container, buttons ) {
|
45
|
+
var i, ien, node, button;
|
46
|
+
var clickHandler = function ( e ) {
|
47
|
+
e.preventDefault();
|
48
|
+
if ( e.data.action !== 'ellipsis' ) {
|
49
|
+
api.page( e.data.action ).draw( false );
|
50
|
+
}
|
51
|
+
};
|
52
|
+
|
53
|
+
for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
|
54
|
+
button = buttons[i];
|
55
|
+
|
56
|
+
if ( $.isArray( button ) ) {
|
57
|
+
attach( container, button );
|
58
|
+
}
|
59
|
+
else {
|
60
|
+
btnDisplay = '';
|
61
|
+
btnClass = '';
|
62
|
+
|
63
|
+
switch ( button ) {
|
64
|
+
case 'ellipsis':
|
65
|
+
btnDisplay = '…';
|
66
|
+
btnClass = 'disabled';
|
67
|
+
break;
|
68
|
+
|
69
|
+
case 'first':
|
70
|
+
btnDisplay = lang.sFirst;
|
71
|
+
btnClass = button + (page > 0 ?
|
72
|
+
'' : ' disabled');
|
73
|
+
break;
|
74
|
+
|
75
|
+
case 'previous':
|
76
|
+
btnDisplay = lang.sPrevious;
|
77
|
+
btnClass = button + (page > 0 ?
|
78
|
+
'' : ' disabled');
|
79
|
+
break;
|
80
|
+
|
81
|
+
case 'next':
|
82
|
+
btnDisplay = lang.sNext;
|
83
|
+
btnClass = button + (page < pages-1 ?
|
84
|
+
'' : ' disabled');
|
85
|
+
break;
|
86
|
+
|
87
|
+
case 'last':
|
88
|
+
btnDisplay = lang.sLast;
|
89
|
+
btnClass = button + (page < pages-1 ?
|
90
|
+
'' : ' disabled');
|
91
|
+
break;
|
92
|
+
|
93
|
+
default:
|
94
|
+
btnDisplay = button + 1;
|
95
|
+
btnClass = page === button ?
|
96
|
+
'active' : '';
|
97
|
+
break;
|
98
|
+
}
|
99
|
+
|
100
|
+
if ( btnDisplay ) {
|
101
|
+
node = $('<li>', {
|
102
|
+
'class': classes.sPageButton+' '+btnClass,
|
103
|
+
'aria-controls': settings.sTableId,
|
104
|
+
'tabindex': settings.iTabIndex,
|
105
|
+
'id': idx === 0 && typeof button === 'string' ?
|
106
|
+
settings.sTableId +'_'+ button :
|
107
|
+
null
|
108
|
+
} )
|
109
|
+
.append( $('<a>', {
|
110
|
+
'href': '#'
|
111
|
+
} )
|
112
|
+
.html( btnDisplay )
|
113
|
+
)
|
114
|
+
.appendTo( container );
|
115
|
+
|
116
|
+
settings.oApi._fnBindAction(
|
117
|
+
node, {action: button}, clickHandler
|
118
|
+
);
|
119
|
+
}
|
120
|
+
}
|
121
|
+
}
|
122
|
+
};
|
123
|
+
|
124
|
+
attach(
|
125
|
+
$(host).empty().html('<ul class="pagination"/>').children('ul'),
|
126
|
+
buttons
|
127
|
+
);
|
128
|
+
};
|
129
|
+
|
130
|
+
|
131
|
+
/*
|
132
|
+
* TableTools Bootstrap compatibility
|
133
|
+
* Required TableTools 2.1+
|
134
|
+
*/
|
135
|
+
if ( DataTable.TableTools ) {
|
136
|
+
// Set the classes that TableTools uses to something suitable for Bootstrap
|
137
|
+
$.extend( true, DataTable.TableTools.classes, {
|
138
|
+
"container": "DTTT btn-group",
|
139
|
+
"buttons": {
|
140
|
+
"normal": "btn btn-default",
|
141
|
+
"disabled": "disabled"
|
142
|
+
},
|
143
|
+
"collection": {
|
144
|
+
"container": "DTTT_dropdown dropdown-menu",
|
145
|
+
"buttons": {
|
146
|
+
"normal": "",
|
147
|
+
"disabled": "disabled"
|
148
|
+
}
|
149
|
+
},
|
150
|
+
"print": {
|
151
|
+
"info": "DTTT_print_info modal"
|
152
|
+
},
|
153
|
+
"select": {
|
154
|
+
"row": "active"
|
155
|
+
}
|
156
|
+
} );
|
157
|
+
|
158
|
+
// Have the collection use a bootstrap compatible drop down
|
159
|
+
$.extend( true, DataTable.TableTools.DEFAULTS.oTags, {
|
160
|
+
"collection": {
|
161
|
+
"container": "ul",
|
162
|
+
"button": "li",
|
163
|
+
"liner": "a"
|
164
|
+
}
|
165
|
+
} );
|
166
|
+
}
|
167
|
+
|
168
|
+
}; // /factory
|
169
|
+
|
170
|
+
|
171
|
+
// Define as an AMD module if possible
|
172
|
+
if ( typeof define === 'function' && define.amd ) {
|
173
|
+
define( ['jquery', 'datatables'], factory );
|
174
|
+
}
|
175
|
+
else if ( typeof exports === 'object' ) {
|
176
|
+
// Node/CommonJS
|
177
|
+
factory( require('jquery'), require('datatables') );
|
178
|
+
}
|
179
|
+
else if ( jQuery ) {
|
180
|
+
// Otherwise simply initialise as normal, stopping multiple evaluation
|
181
|
+
factory( jQuery, jQuery.fn.dataTable );
|
182
|
+
}
|
183
|
+
|
184
|
+
|
185
|
+
})(window, document);
|
186
|
+
|
@@ -0,0 +1,2651 @@
|
|
1
|
+
/*! DataTables 1.10.2
|
2
|
+
* ©2008-2014 SpryMedia Ltd - datatables.net/license
|
3
|
+
*/
|
4
|
+
(function(za,O,l){var N=function(h){function T(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),d[c]=e,"o"===b[1]&&T(a[e])});a._hungarianMap=d}function G(a,b,c){a._hungarianMap||T(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==l&&(c||b[d]===l))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),G(a[d],b[d],c)):b[d]=b[e]})}function N(a){var b=p.defaults.oLanguage,c=a.sZeroRecords;
|
5
|
+
!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&D(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&D(a,a,"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&cb(a)}function db(a){w(a,"ordering","bSort");w(a,"orderMulti","bSortMulti");w(a,"orderClasses","bSortClasses");w(a,"orderCellsTop","bSortCellsTop");w(a,"order","aaSorting");w(a,"orderFixed","aaSortingFixed");w(a,"paging","bPaginate");
|
6
|
+
w(a,"pagingType","sPaginationType");w(a,"pageLength","iDisplayLength");w(a,"searching","bFilter");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&G(p.models.oSearch,a[b])}function eb(a){w(a,"orderable","bSortable");w(a,"orderData","aDataSort");w(a,"orderSequence","asSorting");w(a,"orderDataType","sortDataType")}function fb(a){var a=a.oBrowser,b=h("<div/>").css({position:"absolute",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(h("<div/>").css({position:"absolute",top:1,left:1,width:100,
|
7
|
+
overflow:"scroll"}).append(h('<div class="test"/>').css({width:"100%",height:10}))).appendTo("body"),c=b.find(".test");a.bScrollOversize=100===c[0].offsetWidth;a.bScrollbarLeft=1!==c.offset().left;b.remove()}function gb(a,b,c,d,e,f){var g,j=!1;c!==l&&(g=c,j=!0);for(;d!==e;)a.hasOwnProperty(d)&&(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Aa(a,b){var c=p.defaults.column,d=a.aoColumns.length,c=h.extend({},p.models.oColumn,c,{nTh:b?b:O.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:
|
8
|
+
"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},p.models.oSearch,c[d]);fa(a,d,null)}function fa(a,b,c){var b=a.aoColumns[b],d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==l&&null!==c&&(eb(c),G(p.defaults.column,c),c.mDataProp!==l&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&
|
9
|
+
!c.sClass&&(c.sClass=c.className),h.extend(b,c),D(b,c,"sWidth","sWidthOrig"),"number"===typeof c.iDataSort&&(b.aDataSort=[c.iDataSort]),D(b,c,"aDataSort"));var g=b.mData,j=U(g),i=b.mRender?U(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b.fnGetData=function(a,b,c){var d=j(a,b,l,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return Ba(g)(a,b,c)};a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));
|
10
|
+
a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function V(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ca(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=
|
11
|
+
a.oScroll;(""!==b.sY||""!==b.sX)&&W(a);u(a,null,"column-sizing",[a])}function ga(a,b){var c=X(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function Y(a,b){var c=X(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function Z(a){return X(a,"bVisible").length}function X(a,b){var c=[];h.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Da(a){var b=a.aoColumns,c=a.aoData,d=p.ext.type.detect,e,f,g,j,i,h,m,o,k;e=0;for(f=b.length;e<f;e++)if(m=b[e],k=[],!m.sType&&m._sManualType)m.sType=
|
12
|
+
m._sManualType;else if(!m.sType){g=0;for(j=d.length;g<j;g++){i=0;for(h=c.length;i<h&&!(k[i]===l&&(k[i]=A(a,i,e,"type")),o=d[g](k[i],a),!o||"html"===o);i++);if(o){m.sType=o;break}}m.sType||(m.sType="string")}}function hb(a,b,c,d){var e,f,g,j,i,n,m=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){n=b[e];var o=n.targets!==l?n.targets:n.aTargets;h.isArray(o)||(o=[o]);f=0;for(g=o.length;f<g;f++)if("number"===typeof o[f]&&0<=o[f]){for(;m.length<=o[f];)Aa(a);d(o[f],n)}else if("number"===typeof o[f]&&0>o[f])d(m.length+
|
13
|
+
o[f],n);else if("string"===typeof o[f]){j=0;for(i=m.length;j<i;j++)("_all"==o[f]||h(m[j].nTh).hasClass(o[f]))&&d(j,n)}}if(c){e=0;for(a=c.length;e<a;e++)d(e,c[e])}}function I(a,b,c,d){var e=a.aoData.length,f=h.extend(!0,{},p.models.oRow,{src:c?"dom":"data"});f._aData=b;a.aoData.push(f);for(var b=a.aoColumns,f=0,g=b.length;f<g;f++)c&&Ea(a,e,f,A(a,e,f)),b[f].sType=null;a.aiDisplayMaster.push(e);(c||!a.oFeatures.bDeferRender)&&Fa(a,e,c,d);return e}function ha(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b,
|
14
|
+
e){c=ia(a,e);return I(a,c.data,e,c.cells)})}function A(a,b,c,d){var e=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,c=f.fnGetData(g,d,{settings:a,row:b,col:c});if(c===l)return a.iDrawError!=e&&null===j&&(P(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b,4),a.iDrawError=e),j;if((c===g||null===c)&&null!==j)c=j;else if("function"===typeof c)return c.call(g);return null===c&&"display"==d?"":c}function Ea(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,
|
15
|
+
d,{settings:a,row:b,col:c})}function Ga(a){return h.map(a.match(/(\\.|[^\.])+/g),function(a){return a.replace(/\\./g,".")})}function U(a){if(h.isPlainObject(a)){var b={};h.each(a,function(a,c){c&&(b[a]=U(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==l?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var c=function(a,b,f){var g,
|
16
|
+
j;if(""!==f){j=Ga(f);for(var i=0,h=j.length;i<h;i++){f=j[i].match($);g=j[i].match(Q);if(f){j[i]=j[i].replace($,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=j.join(".");i=0;for(h=a.length;i<h;i++)g.push(c(a[i],b,j));a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(Q,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===l)return l;a=a[j[i]]}}return a};return function(b,e){return c(b,e,a)}}return function(b){return b[a]}}function Ba(a){if(h.isPlainObject(a))return Ba(a._);
|
17
|
+
if(null===a)return function(){};if("function"===typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,d,e){var e=Ga(e),f;f=e[e.length-1];for(var g,j,i=0,h=e.length-1;i<h;i++){g=e[i].match($);j=e[i].match(Q);if(g){e[i]=e[i].replace($,"");a[e[i]]=[];f=e.slice();f.splice(0,i+1);g=f.join(".");j=0;for(h=d.length;j<h;j++)f={},b(f,d[j],g),a[e[i]].push(f);return}j&&(e[i]=e[i].replace(Q,""),a=a[e[i]](d));if(null===
|
18
|
+
a[e[i]]||a[e[i]]===l)a[e[i]]={};a=a[e[i]]}if(f.match(Q))a[f.replace(Q,"")](d);else a[f.replace($,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Ha(a){return C(a.aoData,"_aData")}function ja(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0}function ka(a,b,c){for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===l&&a.splice(d,1)}function la(a,b,c,d){var e=a.aoData[b],f;if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=
|
19
|
+
ia(a,e).data;else{var g=e.anCells,j;if(g){c=0;for(f=g.length;c<f;c++){for(j=g[c];j.childNodes.length;)j.removeChild(j.firstChild);g[c].innerHTML=A(a,b,c,"display")}}}e._aSortData=null;e._aFilterData=null;a=a.aoColumns;if(d!==l)a[d].sType=null;else{c=0;for(f=a.length;c<f;c++)a[c].sType=null}Ia(e)}function ia(a,b){var c=[],d=[],e=b.firstChild,f,g,j,i=0,n,m=a.aoColumns,o=function(a,b,c){"string"===typeof a&&(b=a.indexOf("@"),-1!==b&&(a=a.substring(b+1),j["@"+a]=c.getAttribute(a)))},k=function(a){g=m[i];
|
20
|
+
n=h.trim(a.innerHTML);g&&g._bAttrSrc?(j={display:n},o(g.mData.sort,j,a),o(g.mData.type,j,a),o(g.mData.filter,j,a),c.push(j)):c.push(n);i++};if(e)for(;e;){f=e.nodeName.toUpperCase();if("TD"==f||"TH"==f)k(e),d.push(e);e=e.nextSibling}else{d=b.anCells;e=0;for(f=d.length;e<f;e++)k(d[e])}return{data:c,cells:d}}function Fa(a,b,c,d){var e=a.aoData[b],f=e._aData,g=[],j,i,h,m,o;if(null===e.nTr){j=c||O.createElement("tr");e.nTr=j;e.anCells=g;j._DT_RowIndex=b;Ia(e);m=0;for(o=a.aoColumns.length;m<o;m++){h=a.aoColumns[m];
|
21
|
+
i=c?d[m]:O.createElement(h.sCellType);g.push(i);if(!c||h.mRender||h.mData!==m)i.innerHTML=A(a,b,m,"display");h.sClass&&(i.className+=" "+h.sClass);h.bVisible&&!c?j.appendChild(i):!h.bVisible&&c&&i.parentNode.removeChild(i);h.fnCreatedCell&&h.fnCreatedCell.call(a.oInstance,i,A(a,b,m),f,b,m)}u(a,"aoRowCreatedCallback",null,[j,f,b])}e.nTr.setAttribute("role","row")}function Ia(a){var b=a.nTr,c=a._aData;if(b){c.DT_RowId&&(b.id=c.DT_RowId);if(c.DT_RowClass){var d=c.DT_RowClass.split(" ");a.__rowc=a.__rowc?
|
22
|
+
Ja(a.__rowc.concat(d)):d;h(b).removeClass(a.__rowc.join(" ")).addClass(c.DT_RowClass)}c.DT_RowData&&h(b).data(c.DT_RowData)}}function ib(a){var b,c,d,e,f,g=a.nTHead,j=a.nTFoot,i=0===h("th, td",g).length,n=a.oClasses,m=a.aoColumns;i&&(e=h("<tr/>").appendTo(g));b=0;for(c=m.length;b<c;b++)f=m[b],d=h(f.nTh).addClass(f.sClass),i&&d.appendTo(e),a.oFeatures.bSort&&(d.addClass(f.sSortingClass),!1!==f.bSortable&&(d.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),Ka(a,f.nTh,b))),f.sTitle!=d.html()&&
|
23
|
+
d.html(f.sTitle),La(a,"header")(a,d,f,n);i&&aa(a.aoHeader,g);h(g).find(">tr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(n.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(n.sFooterTH);if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=m[b],f.nTf=a[b].cell,f.sClass&&h(f.nTf).addClass(f.sClass)}}function ba(a,b,c){var d,e,f,g=[],j=[],i=a.aoColumns.length,n;if(b){c===l&&(c=!1);d=0;for(e=b.length;d<e;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&
|
24
|
+
!c&&g[d].splice(f,1);j.push([])}d=0;for(e=g.length;d<e;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(n=i=1,j[d][f]===l){a.appendChild(g[d][f].cell);for(j[d][f]=1;g[d+i]!==l&&g[d][f].cell==g[d+i][f].cell;)j[d+i][f]=1,i++;for(;g[d][f+n]!==l&&g[d][f].cell==g[d][f+n].cell;){for(c=0;c<i;c++)j[d+c][f+n]=1;n++}h(g[d][f].cell).attr("rowspan",i).attr("colspan",n)}}}}function K(a){var b=u(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))B(a,!1);else{var b=
|
25
|
+
[],c=0,d=a.asStripeClasses,e=d.length,f=a.oLanguage,g=a.iInitDisplayStart,j="ssp"==z(a),i=a.aiDisplay;a.bDrawing=!0;g!==l&&-1!==g&&(a._iDisplayStart=j?g:g>=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=-1);var g=a._iDisplayStart,n=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,B(a,!1);else if(j){if(!a.bDestroying&&!jb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:n;for(j=j?0:g;j<f;j++){var m=i[j],o=a.aoData[m];null===o.nTr&&Fa(a,m);m=o.nTr;if(0!==e){var k=d[c%e];o._sRowStripe!=
|
26
|
+
k&&(h(m).removeClass(o._sRowStripe).addClass(k),o._sRowStripe=k)}u(a,"aoRowCallback",null,[m,o._aData,c,j]);b.push(m);c++}}else c=f.sZeroRecords,1==a.iDraw&&"ajax"==z(a)?c=f.sLoadingRecords:f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=h("<tr/>",{"class":e?d[0]:""}).append(h("<td />",{valign:"top",colSpan:Z(a),"class":a.oClasses.sRowEmpty}).html(c))[0];u(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ha(a),g,n,i]);u(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],
|
27
|
+
Ha(a),g,n,i]);d=h(a.nTBody);d.children().detach();d.append(h(b));u(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function L(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&kb(a);d?ca(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;K(a);a._drawHold=!1}function lb(a){var b=a.oClasses,c=h(a.nTable),c=h("<div/>").insertBefore(c),d=a.oFeatures,e=h("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});
|
28
|
+
a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,n,m,o,k=0;k<f.length;k++){g=null;j=f[k];if("<"==j){i=h("<div/>")[0];n=f[k+1];if("'"==n||'"'==n){m="";for(o=2;f[k+o]!=n;)m+=f[k+o],o++;"H"==m?m=b.sJUIHeader:"F"==m&&(m=b.sJUIFooter);-1!=m.indexOf(".")?(n=m.split("."),i.id=n[0].substr(1,n[0].length-1),i.className=n[1]):"#"==m.charAt(0)?i.id=m.substr(1,m.length-1):i.className=m;k+=o}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==
|
29
|
+
j&&d.bPaginate&&d.bLengthChange)g=mb(a);else if("f"==j&&d.bFilter)g=nb(a);else if("r"==j&&d.bProcessing)g=ob(a);else if("t"==j)g=pb(a);else if("i"==j&&d.bInfo)g=qb(a);else if("p"==j&&d.bPaginate)g=rb(a);else if(0!==p.ext.feature.length){i=p.ext.feature;o=0;for(n=i.length;o<n;o++)if(j==i[o].cFeature){g=i[o].fnInit(a);break}}g&&(i=a.aanFeatures,i[j]||(i[j]=[]),i[j].push(g),e.append(g))}c.replaceWith(e)}function aa(a,b){var c=h(b).children("tr"),d,e,f,g,j,i,n,m,o,k;a.splice(0,a.length);f=0;for(i=c.length;f<
|
30
|
+
i;f++)a.push([]);f=0;for(i=c.length;f<i;f++){d=c[f];for(e=d.firstChild;e;){if("TD"==e.nodeName.toUpperCase()||"TH"==e.nodeName.toUpperCase()){m=1*e.getAttribute("colspan");o=1*e.getAttribute("rowspan");m=!m||0===m||1===m?1:m;o=!o||0===o||1===o?1:o;g=0;for(j=a[f];j[g];)g++;n=g;k=1===m?!0:!1;for(j=0;j<m;j++)for(g=0;g<o;g++)a[f+g][n+j]={cell:e,unique:k},a[f+g].nTr=d}e=e.nextSibling}}}function ma(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],aa(c,b)));for(var b=0,e=c.length;b<e;b++)for(var f=0,g=c[b].length;f<
|
31
|
+
g;f++)if(c[b][f].unique&&(!d[f]||!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function na(a,b,c){u(a,"aoServerParams","serverParams",[b]);if(b&&h.isArray(b)){var d={},e=/(.*?)\[\]$/;h.each(b,function(a,b){var c=b.name.match(e);c?(c=c[0],d[c]||(d[c]=[]),d[c].push(b.value)):d[b.name]=b.value});b=d}var f,g=a.ajax,j=a.oInstance;if(h.isPlainObject(g)&&g.data){f=g.data;var i=h.isFunction(f)?f(b):f,b=h.isFunction(f)&&i?i:h.extend(!0,b,i);delete g.data}i={data:b,success:function(b){var d=b.error||b.sError;
|
32
|
+
d&&a.oApi._fnLog(a,0,d);a.json=b;u(a,null,"xhr",[a,b]);c(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c){var d=a.oApi._fnLog;"parsererror"==c?d(a,0,"Invalid JSON response",1):4===b.readyState&&d(a,0,"Ajax error",7);B(a,!1)}};a.oAjaxData=b;u(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(j,a.sAjaxSource,h.map(b,function(a,b){return{name:b,value:a}}),c,a):a.sAjaxSource||"string"===typeof g?a.jqXHR=h.ajax(h.extend(i,{url:g||a.sAjaxSource})):h.isFunction(g)?a.jqXHR=g.call(j,
|
33
|
+
b,c,a):(a.jqXHR=h.ajax(h.extend(i,g)),g.data=f)}function jb(a){return a.bAjaxDataGet?(a.iDraw++,B(a,!0),na(a,sb(a),function(b){tb(a,b)}),!1):!0}function sb(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,f=a.aoPreSearchCols,g,j=[],i,n,m,o=R(a);g=a._iDisplayStart;i=!1!==d.bPaginate?a._iDisplayLength:-1;var k=function(a,b){j.push({name:a,value:b})};k("sEcho",a.iDraw);k("iColumns",c);k("sColumns",C(b,"sName").join(","));k("iDisplayStart",g);k("iDisplayLength",i);var l={draw:a.iDraw,
|
34
|
+
columns:[],order:[],start:g,length:i,search:{value:e.sSearch,regex:e.bRegex}};for(g=0;g<c;g++)n=b[g],m=f[g],i="function"==typeof n.mData?"function":n.mData,l.columns.push({data:i,name:n.sName,searchable:n.bSearchable,orderable:n.bSortable,search:{value:m.sSearch,regex:m.bRegex}}),k("mDataProp_"+g,i),d.bFilter&&(k("sSearch_"+g,m.sSearch),k("bRegex_"+g,m.bRegex),k("bSearchable_"+g,n.bSearchable)),d.bSort&&k("bSortable_"+g,n.bSortable);d.bFilter&&(k("sSearch",e.sSearch),k("bRegex",e.bRegex));d.bSort&&
|
35
|
+
(h.each(o,function(a,b){l.order.push({column:b.col,dir:b.dir});k("iSortCol_"+a,b.col);k("sSortDir_"+a,b.dir)}),k("iSortingCols",o.length));b=p.ext.legacy.ajax;return null===b?a.sAjaxSource?j:l:b?j:l}function tb(a,b){var c=b.sEcho!==l?b.sEcho:b.draw,d=b.iTotalRecords!==l?b.iTotalRecords:b.recordsTotal,e=b.iTotalDisplayRecords!==l?b.iTotalDisplayRecords:b.recordsFiltered;if(c){if(1*c<a.iDraw)return;a.iDraw=1*c}ja(a);a._iRecordsTotal=parseInt(d,10);a._iRecordsDisplay=parseInt(e,10);c=oa(a,b);d=0;for(e=
|
36
|
+
c.length;d<e;d++)I(a,c[d]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;K(a);a._bInitComplete||pa(a,b);a.bAjaxDataGet=!0;B(a,!1)}function oa(a,b){var c=h.isPlainObject(a.ajax)&&a.ajax.dataSrc!==l?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===c?b.aaData||b[c]:""!==c?U(c)(b):b}function nb(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("<div/>",
|
37
|
+
{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("<label/>").append(j)),f=function(){var b=!this.value?"":this.value;b!=e.sSearch&&(ca(a,{sSearch:b,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,K(a))},i=h("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).bind("keyup.DT search.DT input.DT paste.DT cut.DT","ssp"===z(a)?Ma(f,400):f).bind("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls",c);h(a.nTable).on("search.dt.DT",
|
38
|
+
function(b,c){if(a===c)try{i[0]!==O.activeElement&&i.val(e.sSearch)}catch(d){}});return b[0]}function ca(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};Da(a);if("ssp"!=z(a)){ub(a,b.sSearch,c,b.bEscapeRegex!==l?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<e.length;b++)vb(a,e[b].sSearch,b,e[b].bEscapeRegex!==l?!e[b].bEscapeRegex:e[b].bRegex,e[b].bSmart,e[b].bCaseInsensitive);
|
39
|
+
wb(a)}else f(b);a.bFiltered=!0;u(a,null,"search",[a])}function wb(a){for(var b=p.ext.search,c=a.aiDisplay,d,e,f=0,g=b.length;f<g;f++){for(var j=[],i=0,h=c.length;i<h;i++)e=c[i],d=a.aoData[e],b[f](a,d._aFilterData,e,d._aData,i)&&j.push(e);c.length=0;c.push.apply(c,j)}}function vb(a,b,c,d,e,f){if(""!==b)for(var g=a.aiDisplay,d=Na(b,d,e,f),e=g.length-1;0<=e;e--)b=a.aoData[g[e]]._aFilterData[c],d.test(b)||g.splice(e,1)}function ub(a,b,c,d,e,f){var d=Na(b,d,e,f),e=a.oPreviousSearch.sSearch,f=a.aiDisplayMaster,
|
40
|
+
g;0!==p.ext.search.length&&(c=!0);g=xb(a);if(0>=b.length)a.aiDisplay=f.slice();else{if(g||c||e.length>b.length||0!==b.indexOf(e)||a.bSorted)a.aiDisplay=f.slice();b=a.aiDisplay;for(c=b.length-1;0<=c;c--)d.test(a.aoData[b[c]]._sFilterRow)||b.splice(c,1)}}function Na(a,b,c,d){a=b?a:Oa(a);c&&(a="^(?=.*?"+h.map(a.match(/"[^"]+"|[^ ]+/g)||"",function(a){return'"'===a.charAt(0)?a.match(/^"(.*)"$/)[1]:a}).join(")(?=.*?")+").*$");return RegExp(a,d?"i":"")}function Oa(a){return a.replace(Vb,"\\$1")}function xb(a){var b=
|
41
|
+
a.aoColumns,c,d,e,f,g,j,i,h,m=p.ext.type.search;c=!1;d=0;for(f=a.aoData.length;d<f;d++)if(h=a.aoData[d],!h._aFilterData){j=[];e=0;for(g=b.length;e<g;e++)c=b[e],c.bSearchable?(i=A(a,d,e,"filter"),m[c.sType]&&(i=m[c.sType](i)),null===i&&(i=""),"string"!==typeof i&&i.toString&&(i=i.toString())):i="",i.indexOf&&-1!==i.indexOf("&")&&(qa.innerHTML=i,i=Wb?qa.textContent:qa.innerText),i.replace&&(i=i.replace(/[\r\n]/g,"")),j.push(i);h._aFilterData=j;h._sFilterRow=j.join(" ");c=!0}return c}function yb(a){return{search:a.sSearch,
|
42
|
+
smart:a.bSmart,regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}function zb(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function qb(a){var b=a.sTableId,c=a.aanFeatures.i,d=h("<div/>",{"class":a.oClasses.sInfo,id:!c?b+"_info":null});c||(a.aoDrawCallback.push({fn:Ab,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),h(a.nTable).attr("aria-describedby",b+"_info"));return d[0]}function Ab(a){var b=a.aanFeatures.i;if(0!==b.length){var c=
|
43
|
+
a.oLanguage,d=a._iDisplayStart+1,e=a.fnDisplayEnd(),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),j=g?c.sInfo:c.sInfoEmpty;g!==f&&(j+=" "+c.sInfoFiltered);j+=c.sInfoPostFix;j=Bb(a,j);c=c.fnInfoCallback;null!==c&&(j=c.call(a.oInstance,a,d,e,f,g,j));h(b).html(j)}}function Bb(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,f=a.fnRecordsDisplay(),g=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,
|
44
|
+
c.call(a,f)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(d/e))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(f/e)))}function ra(a){var b,c,d=a.iInitDisplayStart,e=a.aoColumns,f;c=a.oFeatures;if(a.bInitialised){lb(a);ib(a);ba(a,a.aoHeader);ba(a,a.aoFooter);B(a,!0);c.bAutoWidth&&Ca(a);b=0;for(c=e.length;b<c;b++)f=e[b],f.sWidth&&(f.nTh.style.width=s(f.sWidth));L(a);e=z(a);"ssp"!=e&&("ajax"==e?na(a,[],function(c){var f=oa(a,c);for(b=0;b<f.length;b++)I(a,f[b]);a.iInitDisplayStart=d;L(a);B(a,!1);pa(a,c)},a):
|
45
|
+
(B(a,!1),pa(a)))}else setTimeout(function(){ra(a)},200)}function pa(a,b){a._bInitComplete=!0;b&&V(a);u(a,"aoInitComplete","init",[a,b])}function Pa(a,b){var c=parseInt(b,10);a._iDisplayLength=c;Qa(a);u(a,null,"length",[a,c])}function mb(a){for(var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=h.isArray(d[0]),f=e?d[0]:d,d=e?d[1]:d,e=h("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect}),g=0,j=f.length;g<j;g++)e[0][g]=new Option(d[g],f[g]);var i=h("<div><label/></div>").addClass(b.sLength);
|
46
|
+
a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).bind("change.DT",function(){Pa(a,h(this).val());K(a)});h(a.nTable).bind("length.dt.DT",function(b,c,d){a===c&&h("select",i).val(d)});return i[0]}function rb(a){var b=a.sPaginationType,c=p.ext.pager[b],d="function"===typeof c,e=function(a){K(a)},b=h("<div/>").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+
|
47
|
+
"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),m=-1===i,b=m?0:Math.ceil(b/i),i=m?1:Math.ceil(h/i),h=c(b,i),o,m=0;for(o=f.p.length;m<o;m++)La(a,"pageButton")(a,f.p[m],m,h,b,i)}else c.fnUpdate(a,e)},sName:"pagination"}));return b}function Ra(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,f=a.fnRecordsDisplay();0===f||-1===e?d=0:"number"===typeof b?(d=b*e,d>f&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==
|
48
|
+
b?d+e<f&&(d+=e):"last"==b?d=Math.floor((f-1)/e)*e:P(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(u(a,null,"page",[a]),c&&K(a));return b}function ob(a){return h("<div/>",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function B(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",b?"block":"none");u(a,null,"processing",[a,b])}function pb(a){var b=h(a.nTable);b.attr("role",
|
49
|
+
"grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),n=h(b[0].cloneNode(!1)),m=b.children("tfoot");c.sX&&"100%"===b.attr("width")&&b.removeAttr("width");m.length||(m=null);c=h("<div/>",{"class":f.sScrollWrapper}).append(h("<div/>",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?!d?null:s(d):"100%"}).append(h("<div/>",{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",
|
50
|
+
width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append(b.children("thead")))).append("top"===j?g:null)).append(h("<div/>",{"class":f.sScrollBody}).css({overflow:"auto",height:!e?null:s(e),width:!d?null:s(d)}).append(b));m&&c.append(h("<div/>",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:s(d):"100%"}).append(h("<div/>",{"class":f.sScrollFootInner}).append(n.removeAttr("id").css("margin-left",0).append(b.children("tfoot")))).append("bottom"===j?g:
|
51
|
+
null));var b=c.children(),o=b[0],f=b[1],k=m?b[2]:null;d&&h(f).scroll(function(){var a=this.scrollLeft;o.scrollLeft=a;m&&(k.scrollLeft=a)});a.nScrollHead=o;a.nScrollBody=f;a.nScrollFoot=k;a.aoDrawCallback.push({fn:W,sName:"scrolling"});return c[0]}function W(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,f=b.iBarWidth,g=h(a.nScrollHead),j=g[0].style,i=g.children("div"),n=i[0].style,m=i.children("table"),i=a.nScrollBody,o=h(i),k=i.style,l=h(a.nScrollFoot).children("div"),p=l.children("table"),r=h(a.nTHead),
|
52
|
+
q=h(a.nTable),da=q[0],M=da.style,J=a.nTFoot?h(a.nTFoot):null,u=a.oBrowser,v=u.bScrollOversize,y,t,x,w,z,A=[],B=[],C=[],D,E=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};q.children("thead, tfoot").remove();z=r.clone().prependTo(q);y=r.find("tr");x=z.find("tr");z.find("th, td").removeAttr("tabindex");J&&(w=J.clone().prependTo(q),t=J.find("tr"),w=w.find("tr"));c||(k.width="100%",g[0].style.width="100%");h.each(ma(a,z),function(b,c){D=
|
53
|
+
ga(a,b);c.style.width=a.aoColumns[D].sWidth});J&&F(function(a){a.style.width=""},w);b.bCollapse&&""!==e&&(k.height=o[0].offsetHeight+r[0].offsetHeight+"px");g=q.outerWidth();if(""===c){if(M.width="100%",v&&(q.find("tbody").height()>i.offsetHeight||"scroll"==o.css("overflow-y")))M.width=s(q.outerWidth()-f)}else""!==d?M.width=s(d):g==o.width()&&o.height()<q.height()?(M.width=s(g-f),q.outerWidth()>g-f&&(M.width=s(g))):M.width=s(g);g=q.outerWidth();F(E,x);F(function(a){C.push(a.innerHTML);A.push(s(h(a).css("width")))},
|
54
|
+
x);F(function(a,b){a.style.width=A[b]},y);h(x).height(0);J&&(F(E,w),F(function(a){B.push(s(h(a).css("width")))},w),F(function(a,b){a.style.width=B[b]},t),h(w).height(0));F(function(a,b){a.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+C[b]+"</div>";a.style.width=A[b]},x);J&&F(function(a,b){a.innerHTML="";a.style.width=B[b]},w);if(q.outerWidth()<g){t=i.scrollHeight>i.offsetHeight||"scroll"==o.css("overflow-y")?g+f:g;if(v&&(i.scrollHeight>i.offsetHeight||"scroll"==o.css("overflow-y")))M.width=
|
55
|
+
s(t-f);(""===c||""!==d)&&P(a,1,"Possible column misalignment",6)}else t="100%";k.width=s(t);j.width=s(t);J&&(a.nScrollFoot.style.width=s(t));!e&&v&&(k.height=s(da.offsetHeight+f));e&&b.bCollapse&&(k.height=s(e),b=c&&da.offsetWidth>i.offsetWidth?f:0,da.offsetHeight<i.offsetHeight&&(k.height=s(da.offsetHeight+b)));b=q.outerWidth();m[0].style.width=s(b);n.width=s(b);m=q.height()>i.clientHeight||"scroll"==o.css("overflow-y");u="padding"+(u.bScrollbarLeft?"Left":"Right");n[u]=m?f+"px":"0px";J&&(p[0].style.width=
|
56
|
+
s(b),l[0].style.width=s(b),l[0].style[u]=m?f+"px":"0px");o.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)i.scrollTop=0}function F(a,b,c){for(var d=0,e=0,f=b.length,g,j;e<f;){g=b[e].firstChild;for(j=c?c[e].firstChild:null;g;)1===g.nodeType&&(c?a(g,j,d):a(g,d),d++),g=g.nextSibling,j=c?j.nextSibling:null;e++}}function Ca(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,e=d.sY,f=d.sX,g=d.sXInner,j=c.length,d=X(a,"bVisible"),i=h("th",a.nTHead),n=b.getAttribute("width"),m=b.parentNode,o=!1,k,l;for(k=0;k<
|
57
|
+
d.length;k++)l=c[d[k]],null!==l.sWidth&&(l.sWidth=Cb(l.sWidthOrig,m),o=!0);if(!o&&!f&&!e&&j==Z(a)&&j==i.length)for(k=0;k<j;k++)c[k].sWidth=s(i.eq(k).width());else{j=h(b).clone().empty().css("visibility","hidden").removeAttr("id").append(h(a.nTHead).clone(!1)).append(h(a.nTFoot).clone(!1)).append(h("<tbody><tr/></tbody>"));j.find("tfoot th, tfoot td").css("width","");var p=j.find("tbody tr"),i=ma(a,j.find("thead")[0]);for(k=0;k<d.length;k++)l=c[d[k]],i[k].style.width=null!==l.sWidthOrig&&""!==l.sWidthOrig?
|
58
|
+
s(l.sWidthOrig):"";if(a.aoData.length)for(k=0;k<d.length;k++)o=d[k],l=c[o],h(Db(a,o)).clone(!1).append(l.sContentPadding).appendTo(p);j.appendTo(m);f&&g?j.width(g):f?(j.css("width","auto"),j.width()<m.offsetWidth&&j.width(m.offsetWidth)):e?j.width(m.offsetWidth):n&&j.width(n);Eb(a,j[0]);if(f){for(k=g=0;k<d.length;k++)l=c[d[k]],e=h(i[k]).outerWidth(),g+=null===l.sWidthOrig?e:parseInt(l.sWidth,10)+e-h(i[k]).width();j.width(s(g));b.style.width=s(g)}for(k=0;k<d.length;k++)if(l=c[d[k]],e=h(i[k]).width())l.sWidth=
|
59
|
+
s(e);b.style.width=s(j.css("width"));j.remove()}n&&(b.style.width=s(n));if((n||f)&&!a._reszEvt)h(za).bind("resize.DT-"+a.sInstance,Ma(function(){V(a)})),a._reszEvt=!0}function Ma(a,b){var c=b||200,d,e;return function(){var b=this,g=+new Date,j=arguments;d&&g<d+c?(clearTimeout(e),e=setTimeout(function(){d=l;a.apply(b,j)},c)):d?(d=g,a.apply(b,j)):d=g}}function Cb(a,b){if(!a)return 0;var c=h("<div/>").css("width",s(a)).appendTo(b||O.body),d=c[0].offsetWidth;c.remove();return d}function Eb(a,b){var c=
|
60
|
+
a.oScroll;if(c.sX||c.sY)c=!c.sX?c.iBarWidth:0,b.style.width=s(h(b).outerWidth()-c)}function Db(a,b){var c=Fb(a,b);if(0>c)return null;var d=a.aoData[c];return!d.nTr?h("<td/>").html(A(a,c,b,"display"))[0]:d.anCells[b]}function Fb(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;f<g;f++)c=A(a,f,b,"display")+"",c=c.replace(Xb,""),c.length>d&&(d=c.length,e=f);return e}function s(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function Gb(){if(!p.__scrollbarWidth){var a=
|
61
|
+
h("<p/>").css({width:"100%",height:200,padding:0})[0],b=h("<div/>").css({position:"absolute",top:0,left:0,width:200,height:150,padding:0,overflow:"hidden",visibility:"hidden"}).append(a).appendTo("body"),c=a.offsetWidth;b.css("overflow","scroll");a=a.offsetWidth;c===a&&(a=b[0].clientWidth);b.remove();p.__scrollbarWidth=c-a}return p.__scrollbarWidth}function R(a){var b,c,d=[],e=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var n=[];f=function(a){a.length&&!h.isArray(a[0])?n.push(a):n.push.apply(n,
|
62
|
+
a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;a<n.length;a++){i=n[a][0];f=e[i].aDataSort;b=0;for(c=f.length;b<c;b++)g=f[b],j=e[g].sType||"string",d.push({src:i,col:g,dir:n[a][1],index:n[a][2],type:j,formatter:p.ext.type.order[j+"-pre"]})}return d}function kb(a){var b,c,d=[],e=p.ext.type.order,f=a.aoData,g=0,j,i=a.aiDisplayMaster,h;Da(a);h=R(a);b=0;for(c=h.length;b<c;b++)j=h[b],j.formatter&&g++,Hb(a,j.col);if("ssp"!=z(a)&&0!==h.length){b=0;for(c=i.length;b<c;b++)d[i[b]]=
|
63
|
+
b;g===h.length?i.sort(function(a,b){var c,e,g,j,i=h.length,l=f[a]._aSortData,p=f[b]._aSortData;for(g=0;g<i;g++)if(j=h[g],c=l[j.col],e=p[j.col],c=c<e?-1:c>e?1:0,0!==c)return"asc"===j.dir?c:-c;c=d[a];e=d[b];return c<e?-1:c>e?1:0}):i.sort(function(a,b){var c,g,j,i,l=h.length,p=f[a]._aSortData,r=f[b]._aSortData;for(j=0;j<l;j++)if(i=h[j],c=p[i.col],g=r[i.col],i=e[i.type+"-"+i.dir]||e["string-"+i.dir],c=i(c,g),0!==c)return c;c=d[a];g=d[b];return c<g?-1:c>g?1:0})}a.bSorted=!0}function Ib(a){for(var b,c,
|
64
|
+
d=a.aoColumns,e=R(a),a=a.oLanguage.oAria,f=0,g=d.length;f<g;f++){c=d[f];var j=c.asSorting;b=c.sTitle.replace(/<.*?>/g,"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0<e.length&&e[0].col==f?(i.setAttribute("aria-sort","asc"==e[0].dir?"ascending":"descending"),c=j[e[0].index+1]||j[0]):c=j[0],b+="asc"===c?a.sSortAscending:a.sSortDescending);i.setAttribute("aria-label",b)}}function Sa(a,b,c,d){var e=a.aaSorting,f=a.aoColumns[b].asSorting,g=function(a){var b=a._idx;b===l&&(b=h.inArray(a[1],
|
65
|
+
f));return b+1>=f.length?0:b+1};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=h.inArray(b,C(e,"0")),-1!==c?(b=g(e[c]),e[c][1]=f[b],e[c]._idx=b):(e.push([b,f[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=g(e[0]),e.length=1,e[0][1]=f[b],e[0]._idx=b):(e.length=0,e.push([b,f[0]]),e[0]._idx=0);L(a);"function"==typeof d&&d(a)}function Ka(a,b,c,d){var e=a.aoColumns[c];Ta(b,{},function(b){!1!==e.bSortable&&(a.oFeatures.bProcessing?(B(a,!0),setTimeout(function(){Sa(a,c,b.shiftKey,
|
66
|
+
d);"ssp"!==z(a)&&B(a,!1)},0)):Sa(a,c,b.shiftKey,d))})}function sa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=R(a),e=a.oFeatures,f,g;if(e.bSort&&e.bSortClasses){e=0;for(f=b.length;e<f;e++)g=b[e].src,h(C(a.aoData,"anCells",g)).removeClass(c+(2>e?e+1:3));e=0;for(f=d.length;e<f;e++)g=d[e].src,h(C(a.aoData,"anCells",g)).addClass(c+(2>e?e+1:3))}a.aLastSort=d}function Hb(a,b){var c=a.aoColumns[b],d=p.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,Y(a,b)));for(var f,g=p.ext.type.order[c.sType+
|
67
|
+
"-pre"],j=0,i=a.aoData.length;j<i;j++)if(c=a.aoData[j],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:A(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function ta(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:yb(a.oPreviousSearch),columns:h.map(a.aoColumns,function(b,d){return{visible:b.bVisible,search:yb(a.aoPreSearchCols[d])}})};u(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=
|
68
|
+
b;a.fnStateSaveCallback.call(a.oInstance,a,b)}}function Jb(a){var b,c,d=a.aoColumns;if(a.oFeatures.bStateSave){var e=a.fnStateLoadCallback.call(a.oInstance,a);if(e&&e.time&&(b=u(a,"aoStateLoadParams","stateLoadParams",[a,e]),-1===h.inArray(!1,b)&&(b=a.iStateDuration,!(0<b&&e.time<+new Date-1E3*b)&&d.length===e.columns.length))){a.oLoadedState=h.extend(!0,{},e);a._iDisplayStart=e.start;a.iInitDisplayStart=e.start;a._iDisplayLength=e.length;a.aaSorting=[];h.each(e.order,function(b,c){a.aaSorting.push(c[0]>=
|
69
|
+
d.length?[0,c[1]]:c)});h.extend(a.oPreviousSearch,zb(e.search));b=0;for(c=e.columns.length;b<c;b++){var f=e.columns[b];d[b].bVisible=f.visible;h.extend(a.aoPreSearchCols[b],zb(f.search))}u(a,"aoStateLoaded","stateLoaded",[a,e])}}}function ua(a){var b=p.settings,a=h.inArray(a,C(b,"nTable"));return-1!==a?b[a]:null}function P(a,b,c,d){c="DataTables warning: "+(null!==a?"table id="+a.sTableId+" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+d);if(b)za.console&&
|
70
|
+
console.log&&console.log(c);else if(a=p.ext,"alert"==(a.sErrMode||a.errMode))alert(c);else throw Error(c);}function D(a,b,c,d){h.isArray(c)?h.each(c,function(c,d){h.isArray(d)?D(a,b,d[0],d[1]):D(a,b,d)}):(d===l&&(d=c),b[c]!==l&&(a[d]=b[c]))}function Kb(a,b,c){var d,e;for(e in b)b.hasOwnProperty(e)&&(d=b[e],h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==e&&h.isArray(d)?d.slice():d);return a}function Ta(a,b,c){h(a).bind("click.DT",b,function(b){a.blur();
|
71
|
+
c(b)}).bind("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).bind("selectstart.DT",function(){return!1})}function x(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function u(a,b,c,d){var e=[];b&&(e=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,d)}));null!==c&&h(a.nTable).trigger(c+".dt",d);return e}function Qa(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;c===a.fnRecordsDisplay()&&(b=c-d);if(-1===d||0>b)b=0;a._iDisplayStart=b}function La(a,b){var c=
|
72
|
+
a.renderer,d=p.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function z(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Ua(a,b){var c=[],c=Lb.numbers_length,d=Math.floor(c/2);b<=c?c=S(0,b):a<=d?(c=S(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=S(b-(c-2),b):(c=S(a-1,a+2),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function cb(a){h.each({num:function(b){return va(b,
|
73
|
+
a)},"num-fmt":function(b){return va(b,a,Va)},"html-num":function(b){return va(b,a,wa)},"html-num-fmt":function(b){return va(b,a,wa,Va)}},function(b,c){t.type.order[b+a+"-pre"]=c})}function Mb(a){return function(){var b=[ua(this[p.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return p.ext.internal[a].apply(this,b)}}var p,t,q,r,v,Wa={},Nb=/[\r\n]/g,wa=/<.*?>/g,Yb=/^[\w\+\-]/,Zb=/[\w\+\-]$/,Vb=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Va=/[',$\u00a3\u20ac\u00a5%\u2009\u202F]/g,
|
74
|
+
H=function(a){return!a||!0===a||"-"===a?!0:!1},Ob=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Pb=function(a,b){Wa[b]||(Wa[b]=RegExp(Oa(b),"g"));return"string"===typeof a?a.replace(/\./g,"").replace(Wa[b],"."):a},Xa=function(a,b,c){var d="string"===typeof a;b&&d&&(a=Pb(a,b));c&&d&&(a=a.replace(Va,""));return H(a)||!isNaN(parseFloat(a))&&isFinite(a)},Qb=function(a,b,c){return H(a)?!0:!(H(a)||"string"===typeof a)?null:Xa(a.replace(wa,""),b,c)?!0:null},C=function(a,b,c){var d=
|
75
|
+
[],e=0,f=a.length;if(c!==l)for(;e<f;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<f;e++)a[e]&&d.push(a[e][b]);return d},xa=function(a,b,c,d){var e=[],f=0,g=b.length;if(d!==l)for(;f<g;f++)e.push(a[b[f]][c][d]);else for(;f<g;f++)e.push(a[b[f]][c]);return e},S=function(a,b){var c=[],d;b===l?(b=0,d=a):(d=b,b=a);for(var e=b;e<d;e++)c.push(e);return c},Ja=function(a){var b=[],c,d,e=a.length,f,g=0;d=0;a:for(;d<e;d++){c=a[d];for(f=0;f<g;f++)if(b[f]===c)continue a;b.push(c);g++}return b},w=function(a,
|
76
|
+
b,c){a[b]!==l&&(a[c]=a[b])},$=/\[.*?\]$/,Q=/\(\)$/,qa=h("<div>")[0],Wb=qa.textContent!==l,Xb=/<.*?>/g;p=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new q(ua(this[t.iApiIndex])):new q(this)};this.fnAddData=function(a,b){var c=this.api(!0),d=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===l||b)&&c.draw();return d.flatten().toArray()};this.fnAdjustColumnSizing=
|
77
|
+
function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===l||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&W(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===l||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0],h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===l||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(!a)};
|
78
|
+
this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===l?e.search(a,c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==l){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==l||"td"==d||"th"==d?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==l?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();
|
79
|
+
return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===l||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===l||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return ua(this[t.iApiIndex])};
|
80
|
+
this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===l||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===l||e)&&h.columns.adjust();(d===l||d)&&h.draw();return 0};this.fnVersionCheck=t.fnVersionCheck;var b=this,c=a===l,d=this.length;c&&(a={});this.oApi=this.internal=t.internal;for(var e in p.ext.internal)e&&(this[e]=Mb(e));this.each(function(){var e={},g=1<d?Kb(e,a,!0):
|
81
|
+
a,j=0,i,n=this.getAttribute("id"),e=!1,m=p.defaults;if("table"!=this.nodeName.toLowerCase())P(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{db(m);eb(m.column);G(m,m,!0);G(m.column,m.column,!0);G(m,g);var o=p.settings,j=0;for(i=o.length;j<i;j++){if(o[j].nTable==this){i=g.bRetrieve!==l?g.bRetrieve:m.bRetrieve;if(c||i)return o[j].oInstance;if(g.bDestroy!==l?g.bDestroy:m.bDestroy){o[j].oInstance.fnDestroy();break}else{P(o[j],0,"Cannot reinitialise DataTable",3);return}}if(o[j].sTableId==
|
82
|
+
this.id){o.splice(j,1);break}}if(null===n||""===n)this.id=n="DataTables_Table_"+p.ext._unique++;var k=h.extend(!0,{},p.models.oSettings,{nTable:this,oApi:b.internal,oInit:g,sDestroyWidth:h(this)[0].style.width,sInstance:n,sTableId:n});o.push(k);k.oInstance=1===b.length?b:h(this).dataTable();db(g);g.oLanguage&&N(g.oLanguage);g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=h.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]);g=Kb(h.extend(!0,{},m),g);D(k.oFeatures,g,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));
|
83
|
+
D(k,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"],["bJQueryUI","bJUI"]]);D(k.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],
|
84
|
+
["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);D(k.oLanguage,g,"fnInfoCallback");x(k,"aoDrawCallback",g.fnDrawCallback,"user");x(k,"aoServerParams",g.fnServerParams,"user");x(k,"aoStateSaveParams",g.fnStateSaveParams,"user");x(k,"aoStateLoadParams",g.fnStateLoadParams,"user");x(k,"aoStateLoaded",g.fnStateLoaded,"user");x(k,"aoRowCallback",g.fnRowCallback,"user");x(k,"aoRowCreatedCallback",g.fnCreatedRow,"user");x(k,"aoHeaderCallback",g.fnHeaderCallback,"user");x(k,"aoFooterCallback",g.fnFooterCallback,
|
85
|
+
"user");x(k,"aoInitComplete",g.fnInitComplete,"user");x(k,"aoPreDrawCallback",g.fnPreDrawCallback,"user");n=k.oClasses;g.bJQueryUI?(h.extend(n,p.ext.oJUIClasses,g.oClasses),g.sDom===m.sDom&&"lfrtip"===m.sDom&&(k.sDom='<"H"lfr>t<"F"ip>'),k.renderer)?h.isPlainObject(k.renderer)&&!k.renderer.header&&(k.renderer.header="jqueryui"):k.renderer="jqueryui":h.extend(n,p.ext.classes,g.oClasses);h(this).addClass(n.sTable);if(""!==k.oScroll.sX||""!==k.oScroll.sY)k.oScroll.iBarWidth=Gb();!0===k.oScroll.sX&&(k.oScroll.sX=
|
86
|
+
"100%");k.iInitDisplayStart===l&&(k.iInitDisplayStart=g.iDisplayStart,k._iDisplayStart=g.iDisplayStart);null!==g.iDeferLoading&&(k.bDeferLoading=!0,j=h.isArray(g.iDeferLoading),k._iRecordsDisplay=j?g.iDeferLoading[0]:g.iDeferLoading,k._iRecordsTotal=j?g.iDeferLoading[1]:g.iDeferLoading);""!==g.oLanguage.sUrl?(k.oLanguage.sUrl=g.oLanguage.sUrl,h.getJSON(k.oLanguage.sUrl,null,function(a){N(a);G(m.oLanguage,a);h.extend(true,k.oLanguage,g.oLanguage,a);ra(k)}),e=!0):h.extend(!0,k.oLanguage,g.oLanguage);
|
87
|
+
null===g.asStripeClasses&&(k.asStripeClasses=[n.sStripeOdd,n.sStripeEven]);var j=k.asStripeClasses,r=h("tbody tr:eq(0)",this);-1!==h.inArray(!0,h.map(j,function(a){return r.hasClass(a)}))&&(h("tbody tr",this).removeClass(j.join(" ")),k.asDestroyStripes=j.slice());var o=[],q,j=this.getElementsByTagName("thead");0!==j.length&&(aa(k.aoHeader,j[0]),o=ma(k));if(null===g.aoColumns){q=[];j=0;for(i=o.length;j<i;j++)q.push(null)}else q=g.aoColumns;j=0;for(i=q.length;j<i;j++)Aa(k,o?o[j]:null);hb(k,g.aoColumnDefs,
|
88
|
+
q,function(a,b){fa(k,a,b)});if(r.length){var s=function(a,b){return a.getAttribute("data-"+b)?b:null};h.each(ia(k,r[0]).cells,function(a,b){var c=k.aoColumns[a];if(c.mData===a){var d=s(b,"sort")||s(b,"order"),e=s(b,"filter")||s(b,"search");if(d!==null||e!==null){c.mData={_:a+".display",sort:d!==null?a+".@data-"+d:l,type:d!==null?a+".@data-"+d:l,filter:e!==null?a+".@data-"+e:l};fa(k,a)}}})}var t=k.oFeatures;g.bStateSave&&(t.bStateSave=!0,Jb(k,g),x(k,"aoDrawCallback",ta,"state_save"));if(g.aaSorting===
|
89
|
+
l){o=k.aaSorting;j=0;for(i=o.length;j<i;j++)o[j][1]=k.aoColumns[j].asSorting[0]}sa(k);t.bSort&&x(k,"aoDrawCallback",function(){if(k.bSorted){var a=R(k),b={};h.each(a,function(a,c){b[c.src]=c.dir});u(k,null,"order",[k,a,b]);Ib(k)}});x(k,"aoDrawCallback",function(){(k.bSorted||z(k)==="ssp"||t.bDeferRender)&&sa(k)},"sc");fb(k);j=h(this).children("caption").each(function(){this._captionSide=h(this).css("caption-side")});i=h(this).children("thead");0===i.length&&(i=h("<thead/>").appendTo(this));k.nTHead=
|
90
|
+
i[0];i=h(this).children("tbody");0===i.length&&(i=h("<tbody/>").appendTo(this));k.nTBody=i[0];i=h(this).children("tfoot");if(0===i.length&&0<j.length&&(""!==k.oScroll.sX||""!==k.oScroll.sY))i=h("<tfoot/>").appendTo(this);0===i.length||0===i.children().length?h(this).addClass(n.sNoFooter):0<i.length&&(k.nTFoot=i[0],aa(k.aoFooter,k.nTFoot));if(g.aaData)for(j=0;j<g.aaData.length;j++)I(k,g.aaData[j]);else(k.bDeferLoading||"dom"==z(k))&&ha(k,h(k.nTBody).children("tr"));k.aiDisplay=k.aiDisplayMaster.slice();
|
91
|
+
k.bInitialised=!0;!1===e&&ra(k)}});b=null;return this};var Rb=[],y=Array.prototype,$b=function(a){var b,c,d=p.settings,e=h.map(d,function(a){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase())return b=h.inArray(a,e),-1!==b?[d[b]]:null;if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?c=h(a):a instanceof h&&(c=a)}else return[];if(c)return c.map(function(){b=h.inArray(this,e);return-1!==b?d[b]:null}).toArray()};
|
92
|
+
q=function(a,b){if(!this instanceof q)throw"DT API must be constructed as a new object";var c=[],d=function(a){(a=$b(a))&&c.push.apply(c,a)};if(h.isArray(a))for(var e=0,f=a.length;e<f;e++)d(a[e]);else d(a);this.context=Ja(c);b&&this.push.apply(this,b.toArray?b.toArray():b);this.selector={rows:null,cols:null,opts:null};q.extend(this,this,Rb)};p.Api=q;q.prototype={concat:y.concat,context:[],each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=
|
93
|
+
this.context;return b.length>a?new q(b[a],this[a]):null},filter:function(a){var b=[];if(y.filter)b=y.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]);return new q(this.context,b)},flatten:function(){var a=[];return new q(this.context,a.concat.apply(a,this.toArray()))},join:y.join,indexOf:y.indexOf||function(a,b){for(var c=b||0,d=this.length;c<d;c++)if(this[c]===a)return c;return-1},iterator:function(a,b,c){var d=[],e,f,g,h,i,n=this.context,
|
94
|
+
m,o,k=this.selector;"string"===typeof a&&(c=b,b=a,a=!1);f=0;for(g=n.length;f<g;f++)if("table"===b)e=c(n[f],f),e!==l&&d.push(e);else if("columns"===b||"rows"===b)e=c(n[f],this[f],f),e!==l&&d.push(e);else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){o=this[f];"column-rows"===b&&(m=Ya(n[f],k.opts));h=0;for(i=o.length;h<i;h++)e=o[h],e="cell"===b?c(n[f],e.row,e.column,f,h):c(n[f],e,f,h,m),e!==l&&d.push(e)}return d.length?(a=new q(n,a?d.concat.apply([],d):d),b=a.selector,b.rows=k.rows,b.cols=
|
95
|
+
k.cols,b.opts=k.opts,a):this},lastIndexOf:y.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(a){var b=[];if(y.map)b=y.map.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new q(this.context,b)},pluck:function(a){return this.map(function(b){return b[a]})},pop:y.pop,push:y.push,reduce:y.reduce||function(a,b){return gb(this,a,b,0,this.length,1)},reduceRight:y.reduceRight||function(a,b){return gb(this,
|
96
|
+
a,b,this.length-1,-1,-1)},reverse:y.reverse,selector:null,shift:y.shift,sort:y.sort,splice:y.splice,toArray:function(){return y.slice.call(this)},to$:function(){return h(this)},toJQuery:function(){return h(this)},unique:function(){return new q(this.context,Ja(this))},unshift:y.unshift};q.extend=function(a,b,c){if(b&&(b instanceof q||b.__dt_wrapper)){var d,e,f,g=function(a,b,c){return function(){var d=b.apply(a,arguments);q.extend(d,d,c.methodExt);return d}};d=0;for(e=c.length;d<e;d++)f=c[d],b[f.name]=
|
97
|
+
"function"===typeof f.val?g(a,f.val,f):h.isPlainObject(f.val)?{}:f.val,b[f.name].__dt_wrapper=!0,q.extend(a,b[f.name],f.propExt)}};q.register=r=function(a,b){if(h.isArray(a))for(var c=0,d=a.length;c<d;c++)q.register(a[c],b);else for(var e=a.split("."),f=Rb,g,j,c=0,d=e.length;c<d;c++){g=(j=-1!==e[c].indexOf("()"))?e[c].replace("()",""):e[c];var i;a:{i=0;for(var n=f.length;i<n;i++)if(f[i].name===g){i=f[i];break a}i=null}i||(i={name:g,val:{},methodExt:[],propExt:[]},f.push(i));c===d-1?i.val=b:f=j?i.methodExt:
|
98
|
+
i.propExt}};q.registerPlural=v=function(a,b,c){q.register(a,c);q.register(b,function(){var a=c.apply(this,arguments);return a===this?this:a instanceof q?a.length?h.isArray(a[0])?new q(a.context,a[0]):a[0]:l:a})};r("tables()",function(a){var b;if(a){b=q;var c=this.context;if("number"===typeof a)a=[c[a]];else var d=h.map(c,function(a){return a.nTable}),a=h(d).filter(a).map(function(){var a=h.inArray(this,d);return c[a]}).toArray();b=new b(a)}else b=this;return b});r("table()",function(a){var a=this.tables(a),
|
99
|
+
b=a.context;return b.length?new q(b[0]):a});v("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable})});v("tables().body()","table().body()",function(){return this.iterator("table",function(a){return a.nTBody})});v("tables().header()","table().header()",function(){return this.iterator("table",function(a){return a.nTHead})});v("tables().footer()","table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot})});v("tables().containers()",
|
100
|
+
"table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper})});r("draw()",function(a){return this.iterator("table",function(b){L(b,!1===a)})});r("page()",function(a){return a===l?this.page.info().page:this.iterator("table",function(b){Ra(b,a)})});r("page.info()",function(){if(0===this.context.length)return l;var a=this.context[0],b=a._iDisplayStart,c=a._iDisplayLength,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,
|
101
|
+
end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:d}});r("page.len()",function(a){return a===l?0!==this.context.length?this.context[0]._iDisplayLength:l:this.iterator("table",function(b){Pa(b,a)})});var Sb=function(a,b,c){"ssp"==z(a)?L(a,b):(B(a,!0),na(a,[],function(c){ja(a);for(var c=oa(a,c),d=0,g=c.length;d<g;d++)I(a,c[d]);L(a,b);B(a,!1)}));if(c){var d=new q(a);d.one("draw",function(){c(d.ajax.json())})}};r("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});
|
102
|
+
r("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});r("ajax.reload()",function(a,b){return this.iterator("table",function(c){Sb(c,!1===b,a)})});r("ajax.url()",function(a){var b=this.context;if(a===l){if(0===b.length)return l;b=b[0];return b.ajax?h.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(b){h.isPlainObject(b.ajax)?b.ajax.url=a:b.ajax=a})});r("ajax.url().load()",function(a,b){return this.iterator("table",function(c){Sb(c,
|
103
|
+
!1===b,a)})});var Za=function(a,b){var c=[],d,e,f,g,j,i;if(!a||"string"===typeof a||a.length===l)a=[a];f=0;for(g=a.length;f<g;f++){e=a[f]&&a[f].split?a[f].split(","):[a[f]];j=0;for(i=e.length;j<i;j++)(d=b("string"===typeof e[j]?h.trim(e[j]):e[j]))&&d.length&&c.push.apply(c,d)}return c},$a=function(a){a||(a={});a.filter&&!a.search&&(a.search=a.filter);return{search:a.search||"none",order:a.order||"current",page:a.page||"all"}},ab=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=
|
104
|
+
a[b],a.length=1,a.context=[a.context[b]],a;a.length=0;return a},Ya=function(a,b){var c,d,e,f=[],g=a.aiDisplay;c=a.aiDisplayMaster;var j=b.search;d=b.order;e=b.page;if("ssp"==z(a))return"removed"===j?[]:S(0,c.length);if("current"==e){c=a._iDisplayStart;for(d=a.fnDisplayEnd();c<d;c++)f.push(g[c])}else if("current"==d||"applied"==d)f="none"==j?c.slice():"applied"==j?g.slice():h.map(c,function(a){return-1===h.inArray(a,g)?a:null});else if("index"==d||"original"==d){c=0;for(d=a.aoData.length;c<d;c++)"none"==
|
105
|
+
j?f.push(c):(e=h.inArray(c,g),(-1===e&&"removed"==j||0<=e&&"applied"==j)&&f.push(c))}return f};r("rows()",function(a,b){a===l?a="":h.isPlainObject(a)&&(b=a,a="");var b=$a(b),c=this.iterator("table",function(c){var e=b;return Za(a,function(a){var b=Ob(a);if(b!==null&&!e)return[b];var j=Ya(c,e);if(b!==null&&h.inArray(b,j)!==-1)return[b];if(!a)return j;for(var b=[],i=0,n=j.length;i<n;i++)b.push(c.aoData[j[i]].nTr);return a.nodeName&&h.inArray(a,b)!==-1?[a._DT_RowIndex]:h(b).filter(a).map(function(){return this._DT_RowIndex}).toArray()})});
|
106
|
+
c.selector.rows=a;c.selector.opts=b;return c});r("rows().nodes()",function(){return this.iterator("row",function(a,b){return a.aoData[b].nTr||l})});r("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return xa(a.aoData,b,"_aData")})});v("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){var d=b.aoData[c];return"search"===a?d._aFilterData:d._aSortData})});v("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,
|
107
|
+
c){la(b,c,a)})});v("rows().indexes()","row().index()",function(){return this.iterator("row",function(a,b){return b})});v("rows().remove()","row().remove()",function(){var a=this;return this.iterator("row",function(b,c,d){var e=b.aoData;e.splice(c,1);for(var f=0,g=e.length;f<g;f++)null!==e[f].nTr&&(e[f].nTr._DT_RowIndex=f);h.inArray(c,b.aiDisplay);ka(b.aiDisplayMaster,c);ka(b.aiDisplay,c);ka(a[d],c,!1);Qa(b)})});r("rows.add()",function(a){var b=this.iterator("table",function(b){var c,f,g,h=[];f=0;
|
108
|
+
for(g=a.length;f<g;f++)c=a[f],c.nodeName&&"TR"===c.nodeName.toUpperCase()?h.push(ha(b,c)[0]):h.push(I(b,c));return h}),c=this.rows(-1);c.pop();c.push.apply(c,b.toArray());return c});r("row()",function(a,b){return ab(this.rows(a,b))});r("row().data()",function(a){var b=this.context;if(a===l)return b.length&&this.length?b[0].aoData[this[0]]._aData:l;b[0].aoData[this[0]]._aData=a;la(b[0],this[0],"data");return this});r("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||
|
109
|
+
null:null});r("row.add()",function(a){a instanceof h&&a.length&&(a=a[0]);var b=this.iterator("table",function(b){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?ha(b,a)[0]:I(b,a)});return this.row(b[0])});var bb=function(a){var b=a.context;b.length&&a.length&&(a=b[0].aoData[a[0]],a._details&&(a._details.remove(),a._detailsShow=l,a._details=l))},Tb=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];if(d._details){(d._detailsShow=b)?d._details.insertAfter(d.nTr):d._details.detach();
|
110
|
+
var e=c[0],f=new q(e),g=e.aoData;f.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");0<C(g,"_details").length&&(f.on("draw.dt.DT_details",function(a,b){e===b&&f.rows({page:"current"}).eq(0).each(function(a){a=g[a];a._detailsShow&&a._details.insertAfter(a.nTr)})}),f.on("column-visibility.dt.DT_details",function(a,b){if(e===b)for(var c,d=Z(b),f=0,h=g.length;f<h;f++)c=g[f],c._details&&c._details.children("td[colspan]").attr("colspan",d)}),f.on("destroy.dt.DT_details",function(a,
|
111
|
+
b){if(e===b)for(var c=0,d=g.length;c<d;c++)g[c]._details&&bb(g[c])}))}}};r("row().child()",function(a,b){var c=this.context;if(a===l)return c.length&&this.length?c[0].aoData[this[0]]._details:l;if(!0===a)this.child.show();else if(!1===a)bb(this);else if(c.length&&this.length){var d=c[0],c=c[0].aoData[this[0]],e=[],f=function(a,b){if(a.nodeName&&"tr"===a.nodeName.toLowerCase())e.push(a);else{var c=h("<tr><td/></tr>").addClass(b);h("td",c).addClass(b).html(a)[0].colSpan=Z(d);e.push(c[0])}};if(h.isArray(a)||
|
112
|
+
a instanceof h)for(var g=0,j=a.length;g<j;g++)f(a[g],b);else f(a,b);c._details&&c._details.remove();c._details=h(e);c._detailsShow&&c._details.insertAfter(c.nTr)}return this});r(["row().child.show()","row().child().show()"],function(){Tb(this,!0);return this});r(["row().child.hide()","row().child().hide()"],function(){Tb(this,!1);return this});r(["row().child.remove()","row().child().remove()"],function(){bb(this);return this});r("row().child.isShown()",function(){var a=this.context;return a.length&&
|
113
|
+
this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var ac=/^(.+):(name|visIdx|visible)$/;r("columns()",function(a,b){a===l?a="":h.isPlainObject(a)&&(b=a,a="");var b=$a(b),c=this.iterator("table",function(b){var c=a,f=b.aoColumns,g=C(f,"sName"),j=C(f,"nTh");return Za(c,function(a){var c=Ob(a);if(a==="")return S(f.length);if(c!==null)return[c>=0?c:f.length+c];var e=typeof a==="string"?a.match(ac):"";if(e)switch(e[2]){case "visIdx":case "visible":a=parseInt(e[1],10);if(a<0){c=h.map(f,function(a,
|
114
|
+
b){return a.bVisible?b:null});return[c[c.length+a]]}return[ga(b,a)];case "name":return h.map(g,function(a,b){return a===e[1]?b:null})}else return h(j).filter(a).map(function(){return h.inArray(this,j)}).toArray()})});c.selector.cols=a;c.selector.opts=b;return c});v("columns().header()","column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh})});v("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf})});
|
115
|
+
v("columns().data()","column().data()",function(){return this.iterator("column-rows",function(a,b,c,d,e){for(var c=[],d=0,f=e.length;d<f;d++)c.push(A(a,e[d],b,""));return c})});v("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,f){return xa(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)})});v("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return xa(a.aoData,e,"anCells",b)})});v("columns().visible()",
|
116
|
+
"column().visible()",function(a,b){return this.iterator("column",function(c,d){var e;if(a===l)e=c.aoColumns[d].bVisible;else{var f=c.aoColumns;e=f[d];var g=c.aoData,j,i,n;if(a===l)e=e.bVisible;else{if(e.bVisible!==a){if(a){var m=h.inArray(!0,C(f,"bVisible"),d+1);j=0;for(i=g.length;j<i;j++)n=g[j].nTr,f=g[j].anCells,n&&n.insertBefore(f[d],f[m]||null)}else h(C(c.aoData,"anCells",d)).detach();e.bVisible=a;ba(c,c.aoHeader);ba(c,c.aoFooter);if(b===l||b)V(c),(c.oScroll.sX||c.oScroll.sY)&&W(c);u(c,null,"column-visibility",
|
117
|
+
[c,d,a]);ta(c)}e=void 0}}return e})});v("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?Y(b,c):c})});r("columns.adjust()",function(){return this.iterator("table",function(a){V(a)})});r("column.index()",function(a,b){if(0!==this.context.length){var c=this.context[0];if("fromVisible"===a||"toData"===a)return ga(c,b);if("fromData"===a||"toVisible"===a)return Y(c,b)}});r("column()",function(a,b){return ab(this.columns(a,b))});r("cells()",
|
118
|
+
function(a,b,c){h.isPlainObject(a)&&(typeof a.row!==l?(c=b,b=null):(c=a,a=null));h.isPlainObject(b)&&(c=b,b=null);if(null===b||b===l)return this.iterator("table",function(b){var d=a,e=$a(c),f=b.aoData,g=Ya(b,e),e=xa(f,g,"anCells"),j=h([].concat.apply([],e)),i,m=b.aoColumns.length,n,p,r,q;return Za(d,function(a){if(a===null||a===l){n=[];p=0;for(r=g.length;p<r;p++){i=g[p];for(q=0;q<m;q++)n.push({row:i,column:q})}return n}return h.isPlainObject(a)?[a]:j.filter(a).map(function(a,b){i=b.parentNode._DT_RowIndex;
|
119
|
+
return{row:i,column:h.inArray(b,f[i].anCells)}}).toArray()})});var d=this.columns(b,c),e=this.rows(a,c),f,g,j,i,n,m=this.iterator("table",function(a,b){f=[];g=0;for(j=e[b].length;g<j;g++){i=0;for(n=d[b].length;i<n;i++)f.push({row:e[b][g],column:d[b][i]})}return f});h.extend(m.selector,{cols:b,rows:a,opts:c});return m});v("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return a.aoData[b].anCells[c]})});r("cells().data()",function(){return this.iterator("cell",
|
120
|
+
function(a,b,c){return A(a,b,c)})});v("cells().cache()","cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]})});v("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,b,c){return{row:b,column:c,columnVisible:Y(a,c)}})});r(["cells().invalidate()","cell().invalidate()"],function(a){var b=this.selector;this.rows(b.rows,b.opts).invalidate(a);return this});r("cell()",function(a,b,
|
121
|
+
c){return ab(this.cells(a,b,c))});r("cell().data()",function(a){var b=this.context,c=this[0];if(a===l)return b.length&&c.length?A(b[0],c[0].row,c[0].column):l;Ea(b[0],c[0].row,c[0].column,a);la(b[0],c[0].row,"data",c[0].column);return this});r("order()",function(a,b){var c=this.context;if(a===l)return 0!==c.length?c[0].aaSorting:l;"number"===typeof a?a=[[a,b]]:h.isArray(a[0])||(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(b){b.aaSorting=a.slice()})});r("order.listener()",
|
122
|
+
function(a,b,c){return this.iterator("table",function(d){Ka(d,a,b,c)})});r(["columns().order()","column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];h.each(b[d],function(b,c){e.push([c,a])});c.aaSorting=e})});r("search()",function(a,b,c,d){var e=this.context;return a===l?0!==e.length?e[0].oPreviousSearch.sSearch:l:this.iterator("table",function(e){e.oFeatures.bFilter&&ca(e,h.extend({},e.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:
|
123
|
+
c,bCaseInsensitive:null===d?!0:d}),1)})});v("columns().search()","column().search()",function(a,b,c,d){return this.iterator("column",function(e,f){var g=e.aoPreSearchCols;if(a===l)return g[f].sSearch;e.oFeatures.bFilter&&(h.extend(g[f],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),ca(e,e.oPreviousSearch,1))})});r("state()",function(){return this.context.length?this.context[0].oSavedState:null});r("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,
|
124
|
+
a,{})})});r("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null});r("state.save()",function(){return this.iterator("table",function(a){ta(a)})});p.versionCheck=p.fnVersionCheck=function(a){for(var b=p.version.split("."),a=a.split("."),c,d,e=0,f=a.length;e<f;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};p.isDataTable=p.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;h.each(p.settings,function(a,e){if(e.nTable===b||e.nScrollHead===
|
125
|
+
b||e.nScrollFoot===b)c=!0});return c};p.tables=p.fnTables=function(a){return jQuery.map(p.settings,function(b){if(!a||a&&h(b.nTable).is(":visible"))return b.nTable})};p.camelToHungarian=G;r("$()",function(a,b){var c=this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,b){r(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0].match(/\.dt\b/)||(a[0]+=".dt");var d=h(this.tables().nodes());d[b].apply(d,a);return this})});
|
126
|
+
r("clear()",function(){return this.iterator("table",function(a){ja(a)})});r("settings()",function(){return new q(this.context,this.context)});r("data()",function(){return this.iterator("table",function(a){return C(a.aoData,"_aData")}).flatten()});r("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(e),f=h(f),l=h(b.nTableWrapper),m=h.map(b.aoData,function(a){return a.nTr}),o;b.bDestroying=
|
127
|
+
!0;u(b,"aoDestroyCallback","destroy",[b]);a||(new q(b)).columns().visible(!0);l.unbind(".DT").find(":not(tbody *)").unbind(".DT");h(za).unbind(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&e!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));i.detach();l.detach();b.aaSorting=[];b.aaSortingFixed=[];sa(b);h(m).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);b.bJUI&&
|
128
|
+
(h("th span."+d.sSortIcon+", td span."+d.sSortIcon,g).detach(),h("th, td",g).each(function(){var a=h("div."+d.sSortJUIWrapper,this);h(this).append(a.contents());a.detach()}));!a&&c&&c.insertBefore(e,b.nTableReinsertBefore);f.children().detach();f.append(m);i.css("width",b.sDestroyWidth).removeClass(d.sTable);(o=b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%o])});c=h.inArray(b,p.settings);-1!==c&&p.settings.splice(c,1)})});p.version="1.10.2";p.settings=
|
129
|
+
[];p.models={};p.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};p.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null};p.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",
|
130
|
+
sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};p.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,
|
131
|
+
fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,
|
132
|
+
fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},
|
133
|
+
sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},p.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",sPaginationType:"simple_numbers",
|
134
|
+
sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null};T(p.defaults);p.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};T(p.defaults.column);p.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,
|
135
|
+
bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],
|
136
|
+
aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:l,oAjaxData:l,
|
137
|
+
fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==z(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==z(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=
|
138
|
+
this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{}};p.ext=t={classes:{},errMode:"alert",feature:[],search:[],internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:p.fnVersionCheck,
|
139
|
+
iApiIndex:0,oJUIClasses:{},sVersion:p.version};h.extend(t,{afnFiltering:t.search,aTypes:t.type.detect,ofnSearch:t.type.search,oSort:t.type.order,afnSortData:t.order,aoFeatures:t.feature,oApi:t.internal,oStdClasses:t.classes,oPagination:t.pager});h.extend(p.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",
|
140
|
+
sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",
|
141
|
+
sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var ya="",ya="",E=ya+"ui-state-default",ea=ya+"css_right ui-icon ui-icon-",Ub=ya+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";h.extend(p.ext.oJUIClasses,p.ext.classes,{sPageButton:"fg-button ui-button "+E,sPageButtonActive:"ui-state-disabled",
|
142
|
+
sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:E+" sorting_asc",sSortDesc:E+" sorting_desc",sSortable:E+" sorting",sSortableAsc:E+" sorting_asc_disabled",sSortableDesc:E+" sorting_desc_disabled",sSortableNone:E+" sorting_disabled",sSortJUIAsc:ea+"triangle-1-n",sSortJUIDesc:ea+"triangle-1-s",sSortJUI:ea+"carat-2-n-s",sSortJUIAscAllowed:ea+"carat-1-n",sSortJUIDescAllowed:ea+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",
|
143
|
+
sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+E,sScrollFoot:"dataTables_scrollFoot "+E,sHeaderTH:E,sFooterTH:E,sJUIHeader:Ub+" ui-corner-tl ui-corner-tr",sJUIFooter:Ub+" ui-corner-bl ui-corner-br"});var Lb=p.ext.pager;h.extend(Lb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},simple_numbers:function(a,b){return["previous",Ua(a,b),"next"]},full_numbers:function(a,b){return["first","previous",Ua(a,b),"next","last"]},_numbers:Ua,
|
144
|
+
numbers_length:7});h.extend(!0,p.ext.renderer,{pageButton:{_:function(a,b,c,d,e,f){var g=a.oClasses,j=a.oLanguage.oPaginate,i,l,m=0,o=function(b,d){var k,p,r,q,s=function(b){Ra(a,b.data.action,true)};k=0;for(p=d.length;k<p;k++){q=d[k];if(h.isArray(q)){r=h("<"+(q.DT_el||"div")+"/>").appendTo(b);o(r,q)}else{l=i="";switch(q){case "ellipsis":b.append("<span>…</span>");break;case "first":i=j.sFirst;l=q+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":i=j.sPrevious;l=q+(e>0?"":" "+g.sPageButtonDisabled);
|
145
|
+
break;case "next":i=j.sNext;l=q+(e<f-1?"":" "+g.sPageButtonDisabled);break;case "last":i=j.sLast;l=q+(e<f-1?"":" "+g.sPageButtonDisabled);break;default:i=q+1;l=e===q?g.sPageButtonActive:""}if(i){r=h("<a>",{"class":g.sPageButton+" "+l,"aria-controls":a.sTableId,"data-dt-idx":m,tabindex:a.iTabIndex,id:c===0&&typeof q==="string"?a.sTableId+"_"+q:null}).html(i).appendTo(b);Ta(r,{action:q},s);m++}}}};try{var k=h(O.activeElement).data("dt-idx");o(h(b).empty(),d);k!==null&&h(b).find("[data-dt-idx="+k+"]").focus()}catch(p){}}}});
|
146
|
+
var va=function(a,b,c,d){if(!a||"-"===a)return-Infinity;b&&(a=Pb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};h.extend(t.type.order,{"date-pre":function(a){return Date.parse(a)||0},"html-pre":function(a){return H(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return H(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,b){return a<b?1:a>
|
147
|
+
b?-1:0}});cb("");h.extend(p.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return Xa(a,c)?"num"+c:null},function(a){if(a&&(!Yb.test(a)||!Zb.test(a)))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||H(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return Xa(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Qb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Qb(a,c,!0)?"html-num-fmt"+c:null},function(a){return H(a)||"string"===
|
148
|
+
typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(p.ext.type.search,{html:function(a){return H(a)?a:"string"===typeof a?a.replace(Nb," ").replace(wa,""):""},string:function(a){return H(a)?a:"string"===typeof a?a.replace(Nb," "):a}});h.extend(!0,p.ext.renderer,{header:{_:function(a,b,c,d){h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass)}})},jqueryui:function(a,
|
149
|
+
b,c,d){var e=c.idx;h("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(h("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);h(a.nTable).on("order.dt.DT",function(f,g,h,i){if(a===g){b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass(i[e]=="asc"?d.sSortAsc:i[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(i[e]=="asc"?d.sSortJUIAsc:
|
150
|
+
i[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)}})}}});p.render={number:function(a,b,c,d){return{display:function(e){var f=0>e?"-":"",e=Math.abs(parseFloat(e)),g=parseInt(e,10),e=c?b+(e-g).toFixed(c).substring(2):"";return f+(d||"")+g.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+e}}}};h.extend(p.ext.internal,{_fnExternApiFunc:Mb,_fnBuildAjax:na,_fnAjaxUpdate:jb,_fnAjaxParameters:sb,_fnAjaxUpdateDraw:tb,_fnAjaxDataSrc:oa,_fnAddColumn:Aa,_fnColumnOptions:fa,_fnAdjustColumnSizing:V,_fnVisibleToColumnIndex:ga,
|
151
|
+
_fnColumnIndexToVisible:Y,_fnVisbleColumns:Z,_fnGetColumns:X,_fnColumnTypes:Da,_fnApplyColumnDefs:hb,_fnHungarianMap:T,_fnCamelToHungarian:G,_fnLanguageCompat:N,_fnBrowserDetect:fb,_fnAddData:I,_fnAddTr:ha,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==l?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:A,_fnSetCellData:Ea,_fnSplitObjNotation:Ga,_fnGetObjectDataFn:U,_fnSetObjectDataFn:Ba,_fnGetDataMaster:Ha,_fnClearTable:ja,
|
152
|
+
_fnDeleteIndex:ka,_fnInvalidateRow:la,_fnGetRowElements:ia,_fnCreateTr:Fa,_fnBuildHead:ib,_fnDrawHead:ba,_fnDraw:K,_fnReDraw:L,_fnAddOptionsHtml:lb,_fnDetectHeader:aa,_fnGetUniqueThs:ma,_fnFeatureHtmlFilter:nb,_fnFilterComplete:ca,_fnFilterCustom:wb,_fnFilterColumn:vb,_fnFilter:ub,_fnFilterCreateSearch:Na,_fnEscapeRegex:Oa,_fnFilterData:xb,_fnFeatureHtmlInfo:qb,_fnUpdateInfo:Ab,_fnInfoMacros:Bb,_fnInitialise:ra,_fnInitComplete:pa,_fnLengthChange:Pa,_fnFeatureHtmlLength:mb,_fnFeatureHtmlPaginate:rb,
|
153
|
+
_fnPageChange:Ra,_fnFeatureHtmlProcessing:ob,_fnProcessingDisplay:B,_fnFeatureHtmlTable:pb,_fnScrollDraw:W,_fnApplyToChildren:F,_fnCalculateColumnWidths:Ca,_fnThrottle:Ma,_fnConvertToWidth:Cb,_fnScrollingWidthAdjust:Eb,_fnGetWidestNode:Db,_fnGetMaxLenString:Fb,_fnStringToCss:s,_fnScrollBarWidth:Gb,_fnSortFlatten:R,_fnSort:kb,_fnSortAria:Ib,_fnSortListener:Sa,_fnSortAttachListener:Ka,_fnSortingClasses:sa,_fnSortData:Hb,_fnSaveState:ta,_fnLoadState:Jb,_fnSettingsFromNode:ua,_fnLog:P,_fnMap:D,_fnBindAction:Ta,
|
154
|
+
_fnCallbackReg:x,_fnCallbackFire:u,_fnLengthOverflow:Qa,_fnRenderer:La,_fnDataSource:z,_fnRowAttributes:Ia,_fnCalculateEnd:function(){}});h.fn.dataTable=p;h.fn.dataTableSettings=p.settings;h.fn.dataTableExt=p.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};h.each(p,function(a,b){h.fn.DataTable[a]=b});return h.fn.dataTable};"function"===typeof define&&define.amd?define("datatables",["jquery"],N):"object"===typeof exports?N(require("jquery")):jQuery&&!jQuery.fn.dataTable&&N(jQuery)})(window,
|
155
|
+
document);
|
156
|
+
|
157
|
+
|
158
|
+
/*global $, jQuery, exFilterColumn*/
|
159
|
+
/*jslint plusplus: true, nomen: true */
|
160
|
+
/*!
|
161
|
+
* Yet Another DataTables Column Filter - (yadcf)
|
162
|
+
*
|
163
|
+
* File: jquery.dataTables.yadcf.js
|
164
|
+
* Version: 0.8.3
|
165
|
+
*
|
166
|
+
* Author: Daniel Reznick
|
167
|
+
* Info: https://github.com/vedmack/yadcf
|
168
|
+
* Contact: vedmack@gmail.com
|
169
|
+
* Twitter: @danielreznick
|
170
|
+
* Q&A https://groups.google.com/forum/#!forum/daniels_code
|
171
|
+
*
|
172
|
+
* Copyright 2013 Daniel Reznick, all rights reserved.
|
173
|
+
* Dual licensed under two licenses: GPL v2 license or a BSD (3-point) license (just like DataTables itself)
|
174
|
+
*
|
175
|
+
* This source file is distributed in the hope that it will be useful, but
|
176
|
+
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
177
|
+
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
178
|
+
*/
|
179
|
+
/*
|
180
|
+
* Parameters:
|
181
|
+
*
|
182
|
+
*
|
183
|
+
* -------------
|
184
|
+
|
185
|
+
* column_number
|
186
|
+
Required: true
|
187
|
+
Type: String
|
188
|
+
Description: The number of the column to which the filter will be applied
|
189
|
+
|
190
|
+
* filter_type
|
191
|
+
Required: false
|
192
|
+
Type: String
|
193
|
+
Default value: select
|
194
|
+
Possible values: select / multi_select / auto_complete / text / date / range_number / range_number_slider / range_date / custom_func
|
195
|
+
Description: The type of the filter to be used in the column
|
196
|
+
|
197
|
+
* custom_func
|
198
|
+
Required: true (when filter_type is custom_func)
|
199
|
+
Type: function
|
200
|
+
Default value: undefined
|
201
|
+
Description: should be pointing to a function with the following signature myCustomFilterFunction(filterVal, columnVal) , where filterVal is the value from the select box and
|
202
|
+
columnVal is the value from the relevant row column, this function should return true if teh row matches your condition and the row should be displayed) and false otherwise
|
203
|
+
|
204
|
+
* data
|
205
|
+
Required: false / true (when filter_type is custom_func)
|
206
|
+
Type: Array (of string or objects)
|
207
|
+
Description: When the need of predefined data for filter is needed just use an array of strings ["value1","value2"....] (supported in select / multi_select / auto_complete filters) or
|
208
|
+
array of objects [{value: 'Some Data 1', label: 'One'}, {value: 'Some Data 3', label: 'Three'}] (supported in select / multi_select filters)
|
209
|
+
Note: that when filter_type is custom_func this array will populate the custom filter select element
|
210
|
+
|
211
|
+
* column_data_type
|
212
|
+
Required: false
|
213
|
+
Type: String
|
214
|
+
Default value: text
|
215
|
+
Possible values: text / html
|
216
|
+
Description: The type of data in column , use "html" when you have some html code in the column (support parsing of multiple elements per cell)
|
217
|
+
|
218
|
+
* text_data_delimiter
|
219
|
+
Required: false
|
220
|
+
Type: String
|
221
|
+
Description: Delimiter that seperates text in table column, for example text_data_delimiter: ","
|
222
|
+
|
223
|
+
* html_data_type
|
224
|
+
Required: false
|
225
|
+
Type: String
|
226
|
+
Default value: text
|
227
|
+
Possible values: text / value / id
|
228
|
+
Description: When using "html" for column_data_type argument you can choose how exactly to parse your html element/s in column , for example use "text" for the following <span class="someClass">Some text</span>
|
229
|
+
|
230
|
+
* filter_container_id
|
231
|
+
Required: false
|
232
|
+
Type: String
|
233
|
+
Description: In case that user don't want to place the filter in column header , he can pass an id of the desired container for the column filter
|
234
|
+
|
235
|
+
* filter_default_label
|
236
|
+
Required: false
|
237
|
+
Type: String / Array of string in case of range_number filter (first entry is for the first input and the second entry is for the second input
|
238
|
+
Default value: Select value
|
239
|
+
Description: The label that will appear in the select menu filter when no value is selected from the filter
|
240
|
+
|
241
|
+
* filter_reset_button_text
|
242
|
+
Required: false
|
243
|
+
Type: String / boolean
|
244
|
+
Default value: x
|
245
|
+
Description: The text that will appear inside the reset button next to the select drop down (set this to false (boolean) in order to hide it from that column filter)
|
246
|
+
|
247
|
+
* enable_auto_complete (this attribute is deprecated , and will become obsolete in the future , so you better start using filter_type: "auto_complete")
|
248
|
+
Required: false
|
249
|
+
Type: boolean
|
250
|
+
Default value: false
|
251
|
+
Description: Turns the filter into an autocomplete input - make use of the jQuery UI Autocomplete widget (with some enhancements)
|
252
|
+
|
253
|
+
* sort_as
|
254
|
+
Required: false
|
255
|
+
Type: String
|
256
|
+
Default value: alpha
|
257
|
+
Possible values: alpha / num
|
258
|
+
Description: Defines how the values in the filter will be sorted, alphabetically or numerically
|
259
|
+
|
260
|
+
* sort_order
|
261
|
+
Required: false
|
262
|
+
Type: String
|
263
|
+
Default value: asc
|
264
|
+
Possible values: asc / desc
|
265
|
+
Description: Defines the order in which the values in the filter will be sorted, ascending or descending
|
266
|
+
|
267
|
+
* date_format
|
268
|
+
Required: false
|
269
|
+
Type: String
|
270
|
+
Default value: mm/dd/yyyy
|
271
|
+
Possible values: mm/dd/yyyy / dd/mm/yyyy (eventually I replace yyyy into yy for jquery datepicker)
|
272
|
+
Description: Defines the format in which the date values are being parsed into Date object
|
273
|
+
|
274
|
+
* ignore_char
|
275
|
+
Required: false
|
276
|
+
Type: String
|
277
|
+
Description: Tells the range_number and range_number_slide to ignore specific char while filtering (that char can used as number separator)
|
278
|
+
|
279
|
+
* filter_match_mode
|
280
|
+
Required: false
|
281
|
+
Type: String
|
282
|
+
Default value: contains
|
283
|
+
Possible values: contains / exact / startsWith
|
284
|
+
Description: Allows to control the matching mode of the filter (supported in select / auto_complete / text filters)
|
285
|
+
|
286
|
+
* select_type
|
287
|
+
Required: false
|
288
|
+
Type: String
|
289
|
+
Default value: undefined
|
290
|
+
Possible values: chosen / select2
|
291
|
+
Description: Turns the simple select element into "Chosen/Select2 select" (make use of the Chosen/Select2 jQuery plugin)
|
292
|
+
|
293
|
+
|
294
|
+
* select_type_options
|
295
|
+
Required: false
|
296
|
+
Type: Object
|
297
|
+
Default value: {}
|
298
|
+
Description: This parameter will be passed "as is" to the Chosen/Select2 plugin constructor
|
299
|
+
|
300
|
+
|
301
|
+
* case_insensitive
|
302
|
+
Required: false
|
303
|
+
Type: boolean
|
304
|
+
Default value: true
|
305
|
+
Description: Do case-insensitive filtering (supported in select / auto_complete / text filters)
|
306
|
+
|
307
|
+
|
308
|
+
* filter_delay
|
309
|
+
Required: false
|
310
|
+
Type: integer
|
311
|
+
Default value: undefined
|
312
|
+
Description: Delay filter execution for a XXX milliseconds - filter will fire XXX milliseconds after the last keyup.
|
313
|
+
Special Notes: Currently supported in text / range_number / range_date filters / range_number_slider
|
314
|
+
|
315
|
+
*
|
316
|
+
*
|
317
|
+
*
|
318
|
+
* External API functions:
|
319
|
+
*
|
320
|
+
*
|
321
|
+
* -------------
|
322
|
+
|
323
|
+
* exFilterColumn
|
324
|
+
Description: Allows to trigger filter/s externally/programmatically (support ALL filter types!!!) , perfect for showing table with pre filtered columns
|
325
|
+
Arguments: table_arg: (variable of the datatable),
|
326
|
+
array of pairs: column number String/Object with from and to, filter_value (the actual string value that we want to filter by)
|
327
|
+
Usage Example: yadcf.exFilterColumn(oTable, [[0, 'Some Data 2']]); //pre filter one column
|
328
|
+
yadcf.exFilterColumn(oTable, [[0, 'Some Data 1'], [1, {from: 111, to: 1110}], [2, {from: "", to: "11/25/2014"}]]); //pre filter several columns
|
329
|
+
|
330
|
+
* exGetColumnFilterVal
|
331
|
+
Description: Allows to retreive column current filtered value (support ALL filter types!!!)
|
332
|
+
Arguments: table_arg: (variable of the datatable),
|
333
|
+
column number: column number from which we want the value
|
334
|
+
Usage Example: yadcf.exGetColumnFilterVal(oTable,1);
|
335
|
+
Return value: String (for simple filter) / Object (for range filter) with from and to properties / Array of strings for multi_select filter
|
336
|
+
|
337
|
+
*
|
338
|
+
*
|
339
|
+
*
|
340
|
+
* Server-side processing API (see more on showcase):
|
341
|
+
*
|
342
|
+
* From server to client:
|
343
|
+
* In order to populate the filters with data from server (select / auto_complete / range_number_slider (min and max values), you should add to your current json respond the following properties:
|
344
|
+
* lets say for first column you add yadcf_data_0 filled with array of values, for column second column yadcf_data_1 and so on...
|
345
|
+
*
|
346
|
+
* From client to server:
|
347
|
+
* Read the filtered value like this (for first column) req.getParameter("columns[0][search][value]"); <- java code , php/.Net/etc you just need to get it from the request
|
348
|
+
* Range filter value will arrive delimited by -yadcf_delim- , so just split it into an array or something like this: String[] minMax = sSearch_0.split("-yadcf_delim-");
|
349
|
+
*
|
350
|
+
*
|
351
|
+
* -------------
|
352
|
+
*
|
353
|
+
*/
|
354
|
+
var yadcf = (function ($) {
|
355
|
+
|
356
|
+
'use strict';
|
357
|
+
|
358
|
+
var oTables = {},
|
359
|
+
oTablesIndex = {},
|
360
|
+
options = {},
|
361
|
+
exFilterColumnQueue = [],
|
362
|
+
yadcfDelay;
|
363
|
+
|
364
|
+
function getOptions(selector) {
|
365
|
+
return options[selector];
|
366
|
+
}
|
367
|
+
|
368
|
+
function setOptions(selector_arg, options_arg) {
|
369
|
+
var tmpOptions = {},
|
370
|
+
i,
|
371
|
+
j,
|
372
|
+
col_num_as_int,
|
373
|
+
default_options = {
|
374
|
+
filter_type : "select",
|
375
|
+
enable_auto_complete : false,
|
376
|
+
sort_as : "alpha",
|
377
|
+
sort_order : "asc",
|
378
|
+
date_format : "mm/dd/yyyy",
|
379
|
+
ignore_char : undefined,
|
380
|
+
filter_match_mode : "contains",
|
381
|
+
select_type : undefined,
|
382
|
+
select_type_options : {},
|
383
|
+
case_insensitive : true
|
384
|
+
},
|
385
|
+
adaptContainerCssClassImpl = function (dummy) { return ''; };
|
386
|
+
|
387
|
+
for (i = 0; i < options_arg.length; i++) {
|
388
|
+
if (options_arg[i].select_type === 'select2') {
|
389
|
+
default_options.select_type_options = {adaptContainerCssClass: adaptContainerCssClassImpl};
|
390
|
+
}
|
391
|
+
//validate custom function required attributes
|
392
|
+
if (options_arg[i].filter_type === 'custom_func') {
|
393
|
+
if (options_arg[i].custom_func === undefined) {
|
394
|
+
alert('You are trying to use filter_type: "custom_func" for column ' + options_arg[i].column_number + ' but there is no such custom_func attribute provided (custom_func: \"function reference goes here...\")');
|
395
|
+
return;
|
396
|
+
}
|
397
|
+
if (options_arg[i].data === undefined) {
|
398
|
+
alert('You are trying to use filter_type: "custom_func" for column ' + options_arg[i].column_number + ' but there is no such data attribute provided (data: \"array of options goes here...\")');
|
399
|
+
return;
|
400
|
+
}
|
401
|
+
}
|
402
|
+
col_num_as_int = +options_arg[i].column_number;
|
403
|
+
tmpOptions[col_num_as_int] = $.extend(true, {}, default_options, options_arg[i]);
|
404
|
+
}
|
405
|
+
options[selector_arg] = tmpOptions;
|
406
|
+
}
|
407
|
+
|
408
|
+
function resetIApiIndex() {
|
409
|
+
$.fn.dataTableExt.iApiIndex = 0;
|
410
|
+
|
411
|
+
}
|
412
|
+
|
413
|
+
function generateTableSelectorJQFriendly(tmpStr) {
|
414
|
+
return tmpStr.replace(":", "-").replace("(", "").replace(")", "").replace(".", "-").replace("#", "-");
|
415
|
+
}
|
416
|
+
|
417
|
+
yadcfDelay = (function () {
|
418
|
+
var timer = 0;
|
419
|
+
return function (callback, ms, param) {
|
420
|
+
clearTimeout(timer);
|
421
|
+
timer = setTimeout(function () {
|
422
|
+
callback(param);
|
423
|
+
}, ms);
|
424
|
+
return timer;
|
425
|
+
};
|
426
|
+
}());
|
427
|
+
|
428
|
+
//Used by exFilterColumn for translating readable search value into proper search string for datatables filtering
|
429
|
+
function yadcfMatchFilterString(table_arg, column_number, selected_value, filter_match_mode, multiple) {
|
430
|
+
var case_insensitive = yadcf.getOptions(table_arg.selector)[column_number].case_insensitive,
|
431
|
+
ret_val;
|
432
|
+
|
433
|
+
table_arg.fnSettings().aoPreSearchCols[column_number].bSmart = false;
|
434
|
+
table_arg.fnSettings().aoPreSearchCols[column_number].bCaseInsensitive = case_insensitive;
|
435
|
+
|
436
|
+
if (multiple === undefined || multiple === false) {
|
437
|
+
if (filter_match_mode === "contains") {
|
438
|
+
table_arg.fnSettings().aoPreSearchCols[column_number].bRegex = false;
|
439
|
+
ret_val = selected_value;
|
440
|
+
} else if (filter_match_mode === "exact") {
|
441
|
+
table_arg.fnSettings().aoPreSearchCols[column_number].bRegex = true;
|
442
|
+
ret_val = "^" + selected_value + "$";
|
443
|
+
} else if (filter_match_mode === "startsWith") {
|
444
|
+
table_arg.fnSettings().aoPreSearchCols[column_number].bRegex = true;
|
445
|
+
ret_val = "^" + selected_value;
|
446
|
+
}
|
447
|
+
} else {
|
448
|
+
if (filter_match_mode === "contains") {
|
449
|
+
table_arg.fnSettings().aoPreSearchCols[column_number].bRegex = true;
|
450
|
+
ret_val = selected_value.join("|");
|
451
|
+
} else if (filter_match_mode === "exact") {
|
452
|
+
table_arg.fnSettings().aoPreSearchCols[column_number].bRegex = true;
|
453
|
+
ret_val = "^(" + selected_value.join("|") + ")$";
|
454
|
+
} else if (filter_match_mode === "startsWith") {
|
455
|
+
table_arg.fnSettings().aoPreSearchCols[column_number].bRegex = true;
|
456
|
+
ret_val = "^(" + selected_value.join("|") + ")";
|
457
|
+
}
|
458
|
+
}
|
459
|
+
return ret_val;
|
460
|
+
}
|
461
|
+
|
462
|
+
function yadcfMatchFilter(oTable, selected_value, filter_match_mode, column_number) {
|
463
|
+
var case_insensitive = yadcf.getOptions(oTable.selector)[column_number].case_insensitive;
|
464
|
+
if (filter_match_mode === "contains") {
|
465
|
+
oTable.fnFilter(selected_value, column_number, false, false, true, case_insensitive);
|
466
|
+
} else if (filter_match_mode === "exact") {
|
467
|
+
oTable.fnFilter("^" + selected_value + "$", column_number, true, false, true, case_insensitive);
|
468
|
+
} else if (filter_match_mode === "startsWith") {
|
469
|
+
oTable.fnFilter("^" + selected_value, column_number, true, false, true, case_insensitive);
|
470
|
+
}
|
471
|
+
}
|
472
|
+
|
473
|
+
function yadcfParseMatchFilter(tmpStr, filter_match_mode) {
|
474
|
+
var retVal;
|
475
|
+
if (filter_match_mode === "contains") {
|
476
|
+
retVal = tmpStr;
|
477
|
+
} else if (filter_match_mode === "exact") {
|
478
|
+
retVal = tmpStr.substring(1, tmpStr.length - 1);
|
479
|
+
} else if (filter_match_mode === "startsWith") {
|
480
|
+
retVal = tmpStr.substring(1, tmpStr.length);
|
481
|
+
}
|
482
|
+
return retVal;
|
483
|
+
}
|
484
|
+
|
485
|
+
function doFilterCustomDateFunc(arg, table_selector_jq_friendly, column_number) {
|
486
|
+
var oTable = oTables[table_selector_jq_friendly];
|
487
|
+
if (arg === "clear" || arg.value === "-1") {
|
488
|
+
if (arg === "clear") {
|
489
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).val("-1").focus();
|
490
|
+
}
|
491
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).removeClass("inuse");
|
492
|
+
} else {
|
493
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).addClass("inuse");
|
494
|
+
}
|
495
|
+
|
496
|
+
oTable.fnDraw();
|
497
|
+
}
|
498
|
+
|
499
|
+
function doFilter(arg, table_selector_jq_friendly, column_number, filter_match_mode) {
|
500
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
501
|
+
var oTable = oTables[table_selector_jq_friendly],
|
502
|
+
selected_value;
|
503
|
+
|
504
|
+
if (arg === "clear") {
|
505
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).val("-1").focus();
|
506
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).removeClass("inuse");
|
507
|
+
$(document).data("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number + "_val", "-1");
|
508
|
+
oTable.fnFilter("", column_number);
|
509
|
+
resetIApiIndex();
|
510
|
+
if (yadcf.getOptions(oTable.selector)[column_number].select_type === 'chosen') {
|
511
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).trigger("chosen:updated");
|
512
|
+
}
|
513
|
+
return;
|
514
|
+
}
|
515
|
+
|
516
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).addClass("inuse");
|
517
|
+
|
518
|
+
$(document).data("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number + "_val", arg.value);
|
519
|
+
|
520
|
+
selected_value = $.trim($(arg).find('option:selected').val());
|
521
|
+
|
522
|
+
if (arg.value !== "-1") {
|
523
|
+
yadcfMatchFilter(oTable, selected_value, filter_match_mode, column_number);
|
524
|
+
} else {
|
525
|
+
oTable.fnFilter("", column_number);
|
526
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).removeClass("inuse");
|
527
|
+
}
|
528
|
+
resetIApiIndex();
|
529
|
+
}
|
530
|
+
|
531
|
+
function doFilterMultiSelect(arg, table_selector_jq_friendly, column_number, filter_match_mode) {
|
532
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
533
|
+
var oTable = oTables[table_selector_jq_friendly],
|
534
|
+
aEscapedTerms = [],
|
535
|
+
selected_values = $(arg).val(),
|
536
|
+
i,
|
537
|
+
stringForSearch;
|
538
|
+
|
539
|
+
$(document).data("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number + "_val", selected_values);
|
540
|
+
|
541
|
+
if (selected_values !== null) {
|
542
|
+
for (i = selected_values.length - 1; i >= 0; i--) {
|
543
|
+
if (selected_values[i] === "-1") {
|
544
|
+
selected_values.splice(i, 1);
|
545
|
+
break;
|
546
|
+
}
|
547
|
+
}
|
548
|
+
if (selected_values.length !== 0) {
|
549
|
+
stringForSearch = selected_values.join("|");
|
550
|
+
stringForSearch = stringForSearch.replace(/([.*+?^=!:${}()\[\]\/\\])/g, "\\$1");
|
551
|
+
if (filter_match_mode === "contains") {
|
552
|
+
oTable.fnFilter(stringForSearch, column_number, true, false, true);
|
553
|
+
} else if (filter_match_mode === "exact") {
|
554
|
+
oTable.fnFilter("^(" + stringForSearch + ")$", column_number, true, false, true);
|
555
|
+
} else if (filter_match_mode === "startsWith") {
|
556
|
+
oTable.fnFilter("^(" + stringForSearch + ")", column_number, true, false, true);
|
557
|
+
}
|
558
|
+
} else {
|
559
|
+
oTable.fnFilter("", column_number);
|
560
|
+
}
|
561
|
+
} else {
|
562
|
+
oTable.fnFilter("", column_number);
|
563
|
+
}
|
564
|
+
resetIApiIndex();
|
565
|
+
}
|
566
|
+
|
567
|
+
function yadcfParseMatchFilterMultiSelect(tmpStr, filter_match_mode) {
|
568
|
+
var retVal;
|
569
|
+
if (filter_match_mode === "contains") {
|
570
|
+
retVal = tmpStr;
|
571
|
+
} else if (filter_match_mode === "exact") {
|
572
|
+
retVal = tmpStr.substring(1, tmpStr.length - 1);
|
573
|
+
retVal = retVal.substring(1, retVal.length - 1);
|
574
|
+
} else if (filter_match_mode === "startsWith") {
|
575
|
+
retVal = tmpStr.substring(1, tmpStr.length);
|
576
|
+
retVal = retVal.substring(1, retVal.length - 1);
|
577
|
+
}
|
578
|
+
return retVal;
|
579
|
+
}
|
580
|
+
|
581
|
+
function doFilterAutocomplete(arg, table_selector_jq_friendly, column_number, filter_match_mode) {
|
582
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
583
|
+
var oTable = oTables[table_selector_jq_friendly];
|
584
|
+
|
585
|
+
if (arg === "clear") {
|
586
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).val("").focus();
|
587
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).removeClass("inuse");
|
588
|
+
$(document).removeData("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number + "_val");
|
589
|
+
oTable.fnFilter("", column_number);
|
590
|
+
resetIApiIndex();
|
591
|
+
return;
|
592
|
+
}
|
593
|
+
|
594
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).addClass("inuse");
|
595
|
+
|
596
|
+
$(document).data("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number + "_val", arg.value);
|
597
|
+
|
598
|
+
yadcfMatchFilter(oTable, arg.value, filter_match_mode, column_number);
|
599
|
+
|
600
|
+
resetIApiIndex();
|
601
|
+
}
|
602
|
+
|
603
|
+
function autocompleteSelect(event, ui) {
|
604
|
+
|
605
|
+
var table_column = event.target.id.replace("yadcf-filter-", ""),
|
606
|
+
dashIndex = table_column.lastIndexOf("-"),
|
607
|
+
table_selector_jq_friendly = table_column.substring(0, dashIndex),
|
608
|
+
col_num = parseInt(table_column.substring(dashIndex + 1), 10),
|
609
|
+
filter_match_mode = $(event.target).attr("filter_match_mode");
|
610
|
+
doFilterAutocomplete(ui.item, table_selector_jq_friendly, col_num, filter_match_mode);
|
611
|
+
}
|
612
|
+
|
613
|
+
function sortNumAsc(a, b) {
|
614
|
+
return a - b;
|
615
|
+
}
|
616
|
+
|
617
|
+
function sortNumDesc(a, b) {
|
618
|
+
return b - a;
|
619
|
+
}
|
620
|
+
|
621
|
+
function findMinInArray(array, ignore_char) {
|
622
|
+
var narray = [], i;
|
623
|
+
for (i = 0; i < array.length; i++) {
|
624
|
+
if (array[i] !== null) {
|
625
|
+
if (ignore_char !== undefined) {
|
626
|
+
array[i] = array[i].toString().replace(ignore_char, "");
|
627
|
+
}
|
628
|
+
narray.push(array[i]);
|
629
|
+
}
|
630
|
+
}
|
631
|
+
return Math.min.apply(Math, narray);
|
632
|
+
}
|
633
|
+
|
634
|
+
function findMaxInArray(array, ignore_char) {
|
635
|
+
var narray = [], i;
|
636
|
+
for (i = 0; i < array.length; i++) {
|
637
|
+
if (array[i] !== null) {
|
638
|
+
if (ignore_char !== undefined) {
|
639
|
+
array[i] = array[i].toString().replace(ignore_char, "");
|
640
|
+
}
|
641
|
+
narray.push(array[i]);
|
642
|
+
}
|
643
|
+
}
|
644
|
+
return Math.max.apply(Math, narray);
|
645
|
+
}
|
646
|
+
|
647
|
+
function addRangeNumberFilterCapability(table_selector_jq_friendly, fromId, toId, col_num, ignore_char) {
|
648
|
+
|
649
|
+
$.fn.dataTableExt.afnFiltering.push(
|
650
|
+
function (oSettings, aData, iDataIndex) {
|
651
|
+
var min = document.getElementById(fromId).value,
|
652
|
+
max = document.getElementById(toId).value,
|
653
|
+
val = aData[col_num] === "-" ? 0 : aData[col_num],
|
654
|
+
retVal = false,
|
655
|
+
table_selector_jq_friendly_local = table_selector_jq_friendly,
|
656
|
+
current_table_selector_jq_friendly = yadcf.generateTableSelectorJQFriendly(oSettings.oInstance.selector),
|
657
|
+
ignore_char_local = ignore_char;
|
658
|
+
|
659
|
+
if (table_selector_jq_friendly_local !== current_table_selector_jq_friendly) {
|
660
|
+
return true;
|
661
|
+
}
|
662
|
+
|
663
|
+
if (ignore_char_local !== undefined) {
|
664
|
+
min = min.replace(ignore_char_local, "");
|
665
|
+
max = max.replace(ignore_char_local, "");
|
666
|
+
val = val.toString().replace(ignore_char_local, "");
|
667
|
+
}
|
668
|
+
|
669
|
+
min = (min !== "") ? (+min) : min;
|
670
|
+
max = (max !== "") ? (+max) : max;
|
671
|
+
val = (val !== "") ? (+val) : val;
|
672
|
+
if (min === "" && max === "") {
|
673
|
+
retVal = true;
|
674
|
+
} else if (min === "" && val <= max) {
|
675
|
+
retVal = true;
|
676
|
+
} else if (min <= val && "" === max) {
|
677
|
+
retVal = true;
|
678
|
+
} else if (min <= val && val <= max) {
|
679
|
+
retVal = true;
|
680
|
+
}
|
681
|
+
return retVal;
|
682
|
+
}
|
683
|
+
);
|
684
|
+
}
|
685
|
+
|
686
|
+
function addCustomFunctionFilterCapability(table_selector_jq_friendly, filterId, col_num) {
|
687
|
+
|
688
|
+
$.fn.dataTableExt.afnFiltering.push(
|
689
|
+
function (oSettings, aData, iDataIndex) {
|
690
|
+
var filterVal = document.getElementById(filterId) !== null ? document.getElementById(filterId).value : "",
|
691
|
+
columnVal = aData[col_num] === "-" ? 0 : aData[col_num],
|
692
|
+
retVal = false,
|
693
|
+
table_selector_jq_friendly_local = table_selector_jq_friendly,
|
694
|
+
current_table_selector_jq_friendly = yadcf.generateTableSelectorJQFriendly(oSettings.oInstance.selector),
|
695
|
+
custom_func;
|
696
|
+
|
697
|
+
if (table_selector_jq_friendly_local !== current_table_selector_jq_friendly) {
|
698
|
+
return true;
|
699
|
+
}
|
700
|
+
|
701
|
+
custom_func = yadcf.getOptions(oSettings.oInstance.selector)[col_num].custom_func;
|
702
|
+
|
703
|
+
retVal = custom_func(filterVal, columnVal);
|
704
|
+
|
705
|
+
return retVal;
|
706
|
+
}
|
707
|
+
);
|
708
|
+
}
|
709
|
+
function addRangeDateFilterCapability(table_selector_jq_friendly, fromId, toId, col_num, date_format) {
|
710
|
+
|
711
|
+
$.fn.dataTableExt.afnFiltering.push(
|
712
|
+
function (oSettings, aData, iDataIndex) {
|
713
|
+
var min = document.getElementById(fromId) !== null ? document.getElementById(fromId).value : "",
|
714
|
+
max = document.getElementById(toId) !== null ? document.getElementById(toId).value : "",
|
715
|
+
val = aData[col_num] === "-" ? 0 : aData[col_num],
|
716
|
+
retVal = false,
|
717
|
+
table_selector_jq_friendly_local = table_selector_jq_friendly,
|
718
|
+
current_table_selector_jq_friendly = yadcf.generateTableSelectorJQFriendly(oSettings.oInstance.selector);
|
719
|
+
|
720
|
+
if (table_selector_jq_friendly_local !== current_table_selector_jq_friendly) {
|
721
|
+
return true;
|
722
|
+
}
|
723
|
+
try {
|
724
|
+
if (min.length === (date_format.length + 2)) {
|
725
|
+
min = (min !== "") ? $.datepicker.parseDate(date_format, min) : min;
|
726
|
+
}
|
727
|
+
} catch (err1) {}
|
728
|
+
try {
|
729
|
+
if (max.length === (date_format.length + 2)) {
|
730
|
+
max = (max !== "") ? $.datepicker.parseDate(date_format, max) : max;
|
731
|
+
}
|
732
|
+
} catch (err2) {}
|
733
|
+
try {
|
734
|
+
val = (val !== "") ? $.datepicker.parseDate(date_format, val) : val;
|
735
|
+
} catch (err3) {}
|
736
|
+
|
737
|
+
if ((min === "" || !(min instanceof Date)) && (max === "" || !(max instanceof Date))) {
|
738
|
+
retVal = true;
|
739
|
+
} else if (min === "" && val <= max) {
|
740
|
+
retVal = true;
|
741
|
+
} else if (min <= val && "" === max) {
|
742
|
+
retVal = true;
|
743
|
+
} else if (min <= val && val <= max) {
|
744
|
+
retVal = true;
|
745
|
+
}
|
746
|
+
|
747
|
+
return retVal;
|
748
|
+
}
|
749
|
+
);
|
750
|
+
}
|
751
|
+
|
752
|
+
function addRangeNumberSliderFilterCapability(table_selector_jq_friendly, fromId, toId, col_num, ignore_char) {
|
753
|
+
|
754
|
+
$.fn.dataTableExt.afnFiltering.push(
|
755
|
+
function (oSettings, aData, iDataIndex) {
|
756
|
+
var min = $('#' + fromId).text(),
|
757
|
+
max = $('#' + toId).text(),
|
758
|
+
val = aData[col_num] === "-" ? 0 : aData[col_num],
|
759
|
+
retVal = false,
|
760
|
+
table_selector_jq_friendly_local = table_selector_jq_friendly,
|
761
|
+
current_table_selector_jq_friendly = yadcf.generateTableSelectorJQFriendly(oSettings.oInstance.selector),
|
762
|
+
ignore_char_local = ignore_char,
|
763
|
+
column_data_type,
|
764
|
+
html_data_type,
|
765
|
+
i,
|
766
|
+
columnObjKey;
|
767
|
+
|
768
|
+
if (table_selector_jq_friendly_local !== current_table_selector_jq_friendly) {
|
769
|
+
return true;
|
770
|
+
}
|
771
|
+
|
772
|
+
if (!isFinite(min) || !isFinite(max)) {
|
773
|
+
return true;
|
774
|
+
}
|
775
|
+
|
776
|
+
column_data_type = yadcf.getOptions(oSettings.oInstance.selector)[col_num].column_data_type;
|
777
|
+
html_data_type = yadcf.getOptions(oSettings.oInstance.selector)[col_num].html_data_type;
|
778
|
+
|
779
|
+
if (column_data_type === "html") {
|
780
|
+
if (html_data_type === undefined) {
|
781
|
+
html_data_type = "text";
|
782
|
+
}
|
783
|
+
switch (html_data_type) {
|
784
|
+
case "text":
|
785
|
+
val = $(val).text();
|
786
|
+
break;
|
787
|
+
case "value":
|
788
|
+
val = $(val).val();
|
789
|
+
break;
|
790
|
+
case "id":
|
791
|
+
val = val.id;
|
792
|
+
break;
|
793
|
+
}
|
794
|
+
}
|
795
|
+
|
796
|
+
if (ignore_char_local !== undefined) {
|
797
|
+
min = min.replace(ignore_char_local, "");
|
798
|
+
max = max.replace(ignore_char_local, "");
|
799
|
+
val = val.toString().replace(ignore_char_local, "");
|
800
|
+
}
|
801
|
+
|
802
|
+
min = (min !== "") ? (+min) : min;
|
803
|
+
max = (max !== "") ? (+max) : max;
|
804
|
+
val = (val !== "") ? (+val) : val;
|
805
|
+
if (min === "" && max === "") {
|
806
|
+
retVal = true;
|
807
|
+
} else if (min === "" && val <= max) {
|
808
|
+
retVal = true;
|
809
|
+
} else if (min <= val && "" === max) {
|
810
|
+
retVal = true;
|
811
|
+
} else if (min <= val && val <= max) {
|
812
|
+
retVal = true;
|
813
|
+
}
|
814
|
+
return retVal;
|
815
|
+
}
|
816
|
+
);
|
817
|
+
}
|
818
|
+
|
819
|
+
function addRangeNumberFilter(filter_selector_string, table_selector_jq_friendly, column_number, filter_reset_button_text, filter_default_label, ignore_char) {
|
820
|
+
var fromId = "yadcf-filter-" + table_selector_jq_friendly + "-from-" + column_number,
|
821
|
+
toId = "yadcf-filter-" + table_selector_jq_friendly + "-to-" + column_number,
|
822
|
+
filter_selector_string_tmp,
|
823
|
+
filter_wrapper_id,
|
824
|
+
oTable;
|
825
|
+
|
826
|
+
filter_wrapper_id = "yadcf-filter-wrapper-" + table_selector_jq_friendly + "-" + column_number;
|
827
|
+
|
828
|
+
if ($("#" + filter_wrapper_id).length > 0) {
|
829
|
+
return;
|
830
|
+
}
|
831
|
+
|
832
|
+
//add a wrapper to hold both filter and reset button
|
833
|
+
$(filter_selector_string).append("<div onclick=\"yadcf.stopPropagation(event);\" id=\"" + filter_wrapper_id + "\" class=\"yadcf-filter-wrapper\"></div>");
|
834
|
+
filter_selector_string = filter_selector_string + " div.yadcf-filter-wrapper";
|
835
|
+
filter_selector_string_tmp = filter_selector_string;
|
836
|
+
|
837
|
+
$(filter_selector_string).append("<div id=\"yadcf-filter-wrapper-inner-" + table_selector_jq_friendly + "-" + column_number + "\" class=\"yadcf-filter-wrapper-inner\"></div>");
|
838
|
+
filter_selector_string = filter_selector_string + " div.yadcf-filter-wrapper-inner";
|
839
|
+
|
840
|
+
$(filter_selector_string).append("<input placeholder=\"" + filter_default_label[0] + "\" id=\"" + fromId + "\" class=\"yadcf-filter-range-number yadcf-filter-range\" onkeyup=\"yadcf.rangeNumberKeyUP('" + table_selector_jq_friendly + "',event);\">" +
|
841
|
+
"</input>");
|
842
|
+
$(filter_selector_string).append("<span class=\"yadcf-filter-range-number-seperator\" >" +
|
843
|
+
"</span>");
|
844
|
+
$(filter_selector_string).append("<input placeholder=\"" + filter_default_label[1] + "\" id=\"" + toId + "\" class=\"yadcf-filter-range-number yadcf-filter-range\" onkeyup=\"yadcf.rangeNumberKeyUP('" + table_selector_jq_friendly + "',event);\">" +
|
845
|
+
"</input>");
|
846
|
+
|
847
|
+
if (filter_reset_button_text !== false) {
|
848
|
+
$(filter_selector_string_tmp).append("<input value=\"" + filter_reset_button_text + "\" type=\"button\" " +
|
849
|
+
"onclick=\"yadcf.stopPropagation(event);yadcf.rangeClear('" + table_selector_jq_friendly + "',event); return false;\" class=\"yadcf-filter-reset-button\">");
|
850
|
+
}
|
851
|
+
|
852
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
853
|
+
oTable = oTables[table_selector_jq_friendly];
|
854
|
+
if (oTable.fnSettings().oFeatures.bStateSave === true && oTable.fnSettings().oLoadedState) {
|
855
|
+
if (oTable.fnSettings().oLoadedState.yadcfState && oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly] && oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number]) {
|
856
|
+
$('#' + fromId).val(oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].from);
|
857
|
+
if (oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].from !== "") {
|
858
|
+
$('#' + fromId).addClass("inuse");
|
859
|
+
}
|
860
|
+
$('#' + toId).val(oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].to);
|
861
|
+
if (oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].to !== "") {
|
862
|
+
$('#' + toId).addClass("inuse");
|
863
|
+
}
|
864
|
+
}
|
865
|
+
}
|
866
|
+
resetIApiIndex();
|
867
|
+
|
868
|
+
if (oTable.fnSettings().oFeatures.bServerSide !== true) {
|
869
|
+
addRangeNumberFilterCapability(table_selector_jq_friendly, fromId, toId, column_number, ignore_char);
|
870
|
+
}
|
871
|
+
|
872
|
+
}
|
873
|
+
|
874
|
+
function dateSelectSingle(date, event, clear) {
|
875
|
+
var oTable,
|
876
|
+
column_number = $(event).attr('id').replace('yadcf-filter-', '').replace('-date', '').replace('-reset', ''),
|
877
|
+
dashIndex = column_number.lastIndexOf("-"),
|
878
|
+
table_selector_jq_friendly = column_number.substring(0, dashIndex),
|
879
|
+
date_str;
|
880
|
+
|
881
|
+
column_number = column_number.substring(dashIndex + 1);
|
882
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
883
|
+
oTable = oTables[table_selector_jq_friendly];
|
884
|
+
|
885
|
+
if (clear === undefined) {
|
886
|
+
date_str = document.getElementById($(event).attr('id')).value;
|
887
|
+
oTable.fnFilter(date, column_number);
|
888
|
+
$('#yadcf-filter-' + table_selector_jq_friendly + '-' + column_number).addClass("inuse");
|
889
|
+
} else if (clear === 'clear') {
|
890
|
+
oTable.fnFilter('', column_number);
|
891
|
+
$('#yadcf-filter-' + table_selector_jq_friendly + '-' + column_number).val('').removeClass("inuse");
|
892
|
+
}
|
893
|
+
|
894
|
+
resetIApiIndex();
|
895
|
+
}
|
896
|
+
|
897
|
+
function dateSelect(date, event) {
|
898
|
+
|
899
|
+
var oTable,
|
900
|
+
column_number = $(event).attr("id").replace("yadcf-filter-", "").replace("-from-date", "").replace("-to-date", ""),
|
901
|
+
dashIndex = column_number.lastIndexOf("-"),
|
902
|
+
table_selector_jq_friendly = column_number.substring(0, dashIndex),
|
903
|
+
yadcfState,
|
904
|
+
from,
|
905
|
+
to,
|
906
|
+
min,
|
907
|
+
max,
|
908
|
+
min_server,
|
909
|
+
max_server,
|
910
|
+
date_format;
|
911
|
+
|
912
|
+
column_number = column_number.substring(dashIndex + 1);
|
913
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
914
|
+
|
915
|
+
oTable = oTables[table_selector_jq_friendly];
|
916
|
+
date_format = yadcf.getOptions(oTable.selector)[column_number].date_format;
|
917
|
+
date_format = date_format.replace("yyyy", "yy");
|
918
|
+
|
919
|
+
$("#" + $(event).attr("id")).addClass("inuse");
|
920
|
+
|
921
|
+
if ($(event).attr("id").indexOf("-from-") !== -1) {
|
922
|
+
from = document.getElementById($(event).attr("id")).value;
|
923
|
+
to = document.getElementById($(event).attr("id").replace("-from-", "-to-")).value;
|
924
|
+
} else {
|
925
|
+
to = document.getElementById($(event).attr("id")).value;
|
926
|
+
from = document.getElementById($(event).attr("id").replace("-to-", "-from-")).value;
|
927
|
+
}
|
928
|
+
|
929
|
+
if (oTable.fnSettings().oFeatures.bServerSide !== true) {
|
930
|
+
oTable.fnDraw();
|
931
|
+
} else {
|
932
|
+
min = from;
|
933
|
+
max = to;
|
934
|
+
|
935
|
+
try {
|
936
|
+
if (min.length === (date_format.length + 2)) {
|
937
|
+
min = (min !== "") ? $.datepicker.parseDate(date_format, min) : min;
|
938
|
+
}
|
939
|
+
} catch (err1) {}
|
940
|
+
try {
|
941
|
+
if (max.length === (date_format.length + 2)) {
|
942
|
+
max = (max !== "") ? $.datepicker.parseDate(date_format, max) : max;
|
943
|
+
}
|
944
|
+
} catch (err2) {}
|
945
|
+
if (min instanceof Date) {
|
946
|
+
min_server = min.getTime();
|
947
|
+
} else {
|
948
|
+
min_server = min;
|
949
|
+
}
|
950
|
+
if (max instanceof Date) {
|
951
|
+
max_server = max.getTime();
|
952
|
+
} else {
|
953
|
+
max_server = max;
|
954
|
+
}
|
955
|
+
oTable.fnFilter(min_server + '-yadcf_delim-' + max_server, column_number);
|
956
|
+
}
|
957
|
+
|
958
|
+
if (!oTable.fnSettings().oLoadedState) {
|
959
|
+
oTable.fnSettings().oLoadedState = {};
|
960
|
+
oTable.fnSettings().oApi._fnSaveState(oTable.fnSettings());
|
961
|
+
}
|
962
|
+
if (oTable.fnSettings().oFeatures.bStateSave === true) {
|
963
|
+
if (oTable.fnSettings().oLoadedState.yadcfState !== undefined && oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly] !== undefined) {
|
964
|
+
oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number] =
|
965
|
+
{
|
966
|
+
'from' : from,
|
967
|
+
'to' : to
|
968
|
+
};
|
969
|
+
} else {
|
970
|
+
yadcfState = {};
|
971
|
+
yadcfState[table_selector_jq_friendly] = [];
|
972
|
+
yadcfState[table_selector_jq_friendly][column_number] = {
|
973
|
+
'from' : from,
|
974
|
+
'to' : to
|
975
|
+
};
|
976
|
+
oTable.fnSettings().oLoadedState.yadcfState = yadcfState;
|
977
|
+
}
|
978
|
+
oTable.fnSettings().oApi._fnSaveState(oTable.fnSettings());
|
979
|
+
}
|
980
|
+
|
981
|
+
resetIApiIndex();
|
982
|
+
}
|
983
|
+
|
984
|
+
function addRangeDateFilter(filter_selector_string, table_selector_jq_friendly, column_number, filter_reset_button_text, filter_default_label, date_format) {
|
985
|
+
var fromId = "yadcf-filter-" + table_selector_jq_friendly + "-from-date-" + column_number,
|
986
|
+
toId = "yadcf-filter-" + table_selector_jq_friendly + "-to-date-" + column_number,
|
987
|
+
filter_selector_string_tmp,
|
988
|
+
filter_wrapper_id,
|
989
|
+
oTable;
|
990
|
+
|
991
|
+
filter_wrapper_id = "yadcf-filter-wrapper-" + table_selector_jq_friendly + "-" + column_number;
|
992
|
+
|
993
|
+
if ($("#" + filter_wrapper_id).length > 0) {
|
994
|
+
return;
|
995
|
+
}
|
996
|
+
|
997
|
+
//add a wrapper to hold both filter and reset button
|
998
|
+
$(filter_selector_string).append("<div onclick=\"yadcf.stopPropagation(event);\" id=\"" + filter_wrapper_id + "\" class=\"yadcf-filter-wrapper\"></div>");
|
999
|
+
filter_selector_string = filter_selector_string + " div.yadcf-filter-wrapper";
|
1000
|
+
filter_selector_string_tmp = filter_selector_string;
|
1001
|
+
|
1002
|
+
$(filter_selector_string).append("<div id=\"yadcf-filter-wrapper-inner-" + table_selector_jq_friendly + "-" + column_number + "\" class=\"yadcf-filter-wrapper-inner\"></div>");
|
1003
|
+
filter_selector_string = filter_selector_string + " div.yadcf-filter-wrapper-inner";
|
1004
|
+
|
1005
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
1006
|
+
oTable = oTables[table_selector_jq_friendly];
|
1007
|
+
$(filter_selector_string).append("<input placeholder=\"" + filter_default_label[0] + "\" id=\"" + fromId + "\" class=\"yadcf-filter-range-date yadcf-filter-range\" onkeyup=\"yadcf.rangeDateKeyUP('" + table_selector_jq_friendly + "','" + date_format + "',event);\">" +
|
1008
|
+
"</input>");
|
1009
|
+
$(filter_selector_string).append("<span class=\"yadcf-filter-range-date-seperator\" >" +
|
1010
|
+
"</span>");
|
1011
|
+
$(filter_selector_string).append("<input placeholder=\"" + filter_default_label[1] + "\" id=\"" + toId + "\" class=\"yadcf-filter-range-date yadcf-filter-range\" onkeyup=\"yadcf.rangeDateKeyUP('" + table_selector_jq_friendly + "','" + date_format + "',event);\">" +
|
1012
|
+
"</input>");
|
1013
|
+
|
1014
|
+
if (filter_reset_button_text !== false) {
|
1015
|
+
$(filter_selector_string_tmp).append("<input value=\"" + filter_reset_button_text + "\" type=\"button\" " +
|
1016
|
+
"onclick=\"yadcf.stopPropagation(event);yadcf.rangeClear('" + table_selector_jq_friendly + "',event); return false;\" class=\"yadcf-filter-reset-button\">");
|
1017
|
+
}
|
1018
|
+
|
1019
|
+
$("#" + fromId).datepicker({
|
1020
|
+
dateFormat: date_format,
|
1021
|
+
onSelect: dateSelect
|
1022
|
+
});
|
1023
|
+
$("#" + toId).datepicker({
|
1024
|
+
dateFormat: date_format,
|
1025
|
+
onSelect: dateSelect
|
1026
|
+
});
|
1027
|
+
|
1028
|
+
if (oTable.fnSettings().oFeatures.bStateSave === true && oTable.fnSettings().oLoadedState) {
|
1029
|
+
if (oTable.fnSettings().oLoadedState.yadcfState && oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly] && oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number]) {
|
1030
|
+
$('#' + fromId).val(oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].from);
|
1031
|
+
if (oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].from !== "") {
|
1032
|
+
$('#' + fromId).addClass("inuse");
|
1033
|
+
}
|
1034
|
+
$('#' + toId).val(oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].to);
|
1035
|
+
if (oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].to !== "") {
|
1036
|
+
$('#' + toId).addClass("inuse");
|
1037
|
+
}
|
1038
|
+
}
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
if (oTable.fnSettings().oFeatures.bServerSide !== true) {
|
1042
|
+
addRangeDateFilterCapability(table_selector_jq_friendly, fromId, toId, column_number, date_format);
|
1043
|
+
}
|
1044
|
+
|
1045
|
+
resetIApiIndex();
|
1046
|
+
}
|
1047
|
+
|
1048
|
+
function addDateFilter(filter_selector_string, table_selector_jq_friendly, column_number, filter_reset_button_text, filter_default_label, date_format) {
|
1049
|
+
var dateId = "yadcf-filter-" + table_selector_jq_friendly + "-" + column_number,
|
1050
|
+
filter_selector_string_tmp,
|
1051
|
+
filter_wrapper_id,
|
1052
|
+
oTable;
|
1053
|
+
|
1054
|
+
filter_wrapper_id = "yadcf-filter-wrapper-" + table_selector_jq_friendly + "-" + column_number;
|
1055
|
+
|
1056
|
+
if ($("#" + filter_wrapper_id).length > 0) {
|
1057
|
+
return;
|
1058
|
+
}
|
1059
|
+
|
1060
|
+
//add a wrapper to hold both filter and reset button
|
1061
|
+
$(filter_selector_string).append("<div onclick=\"yadcf.stopPropagation(event);\" id=\"" + filter_wrapper_id + "\" class=\"yadcf-filter-wrapper\"></div>");
|
1062
|
+
filter_selector_string = filter_selector_string + " div.yadcf-filter-wrapper";
|
1063
|
+
filter_selector_string_tmp = filter_selector_string;
|
1064
|
+
|
1065
|
+
$(filter_selector_string).append("<input placeholder=\"" + filter_default_label + "\" id=\"" + dateId + "\" class=\"yadcf-filter-date\" onkeyup=\"yadcf.dateKeyUP('" +
|
1066
|
+
table_selector_jq_friendly + "','" + date_format + "',event);\"></input>");
|
1067
|
+
|
1068
|
+
if (filter_reset_button_text !== false) {
|
1069
|
+
$(filter_selector_string_tmp).append('<input value="' + filter_reset_button_text + '" type="button" id="' + dateId + '-reset"' +
|
1070
|
+
'onclick="yadcf.stopPropagation(event);yadcf.dateSelectSingle(\'' + table_selector_jq_friendly + '\',event.target, \'clear\'); return false;" class="yadcf-filter-reset-button">');
|
1071
|
+
}
|
1072
|
+
|
1073
|
+
$("#" + dateId).datepicker({
|
1074
|
+
dateFormat: date_format,
|
1075
|
+
onSelect: dateSelectSingle
|
1076
|
+
});
|
1077
|
+
|
1078
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
1079
|
+
oTable = oTables[table_selector_jq_friendly];
|
1080
|
+
|
1081
|
+
if (oTable.fnSettings().aoPreSearchCols[column_number].sSearch !== '') {
|
1082
|
+
$('#yadcf-filter-' + table_selector_jq_friendly + '-' + column_number).val(oTable.fnSettings().aoPreSearchCols[column_number].sSearch).addClass("inuse");
|
1083
|
+
}
|
1084
|
+
|
1085
|
+
resetIApiIndex();
|
1086
|
+
|
1087
|
+
}
|
1088
|
+
|
1089
|
+
function rangeNumberSldierDrawTips(min_tip_val, max_tip_val, min_tip_id, max_tip_id, table_selector_jq_friendly, column_number) {
|
1090
|
+
var first_handle = $("#yadcf-filter-wrapper-inner-" + table_selector_jq_friendly + "-" + column_number + " .ui-slider-handle:first"),
|
1091
|
+
last_handle = $("#yadcf-filter-wrapper-inner-" + table_selector_jq_friendly + "-" + column_number + " .ui-slider-handle:last"),
|
1092
|
+
min_tip_inner,
|
1093
|
+
max_tip_inner;
|
1094
|
+
|
1095
|
+
min_tip_inner = "<div id=\"" + min_tip_id + "\" class=\"yadcf-filter-range-number-slider-min-tip-inner\">" + min_tip_val + "</div>";
|
1096
|
+
max_tip_inner = "<div id=\"" + max_tip_id + "\" class=\"yadcf-filter-range-number-slider-max-tip-inner\">" + max_tip_val + "</div>";
|
1097
|
+
|
1098
|
+
$(first_handle).addClass("yadcf-filter-range-number-slider-min-tip").html(min_tip_inner);
|
1099
|
+
$(last_handle).addClass("yadcf-filter-range-number-slider-max-tip").html(max_tip_inner);
|
1100
|
+
}
|
1101
|
+
|
1102
|
+
function rangeNumberSliderChange(table_selector_jq_friendly, event, ui) {
|
1103
|
+
var oTable,
|
1104
|
+
min_val,
|
1105
|
+
max_val,
|
1106
|
+
slider_inuse,
|
1107
|
+
yadcfState,
|
1108
|
+
column_number = $(event.target).attr('id').replace("yadcf-filter-", "").replace(table_selector_jq_friendly, "").replace("-slider-", ""),
|
1109
|
+
options,
|
1110
|
+
keyUp;
|
1111
|
+
|
1112
|
+
oTable = oTables[table_selector_jq_friendly];
|
1113
|
+
options = getOptions(oTable.selector)[column_number];
|
1114
|
+
|
1115
|
+
keyUp = function () {
|
1116
|
+
|
1117
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
1118
|
+
|
1119
|
+
if (oTable.fnSettings().oFeatures.bServerSide !== true) {
|
1120
|
+
oTable.fnDraw();
|
1121
|
+
} else {
|
1122
|
+
oTable.fnFilter(ui.values[0] + '-yadcf_delim-' + ui.values[1], column_number);
|
1123
|
+
}
|
1124
|
+
|
1125
|
+
min_val = +$($(event.target).parent().find(".yadcf-filter-range-number-slider-min-tip-hidden")).text();
|
1126
|
+
max_val = +$($(event.target).parent().find(".yadcf-filter-range-number-slider-max-tip-hidden")).text();
|
1127
|
+
|
1128
|
+
|
1129
|
+
if (min_val !== ui.values[0]) {
|
1130
|
+
$($(event.target).find(".ui-slider-handle")[0]).addClass("inuse");
|
1131
|
+
slider_inuse = true;
|
1132
|
+
} else {
|
1133
|
+
$($(event.target).find(".ui-slider-handle")[0]).removeClass("inuse");
|
1134
|
+
}
|
1135
|
+
if (max_val !== ui.values[1]) {
|
1136
|
+
$($(event.target).find(".ui-slider-handle")[1]).addClass("inuse");
|
1137
|
+
slider_inuse = true;
|
1138
|
+
} else {
|
1139
|
+
$($(event.target).find(".ui-slider-handle")[1]).removeClass("inuse");
|
1140
|
+
}
|
1141
|
+
|
1142
|
+
if (slider_inuse === true) {
|
1143
|
+
$(event.target).find(".ui-slider-range").addClass("inuse");
|
1144
|
+
} else {
|
1145
|
+
$(event.target).find(".ui-slider-range").removeClass("inuse");
|
1146
|
+
}
|
1147
|
+
if (!oTable.fnSettings().oLoadedState) {
|
1148
|
+
oTable.fnSettings().oLoadedState = {};
|
1149
|
+
oTable.fnSettings().oApi._fnSaveState(oTable.fnSettings());
|
1150
|
+
}
|
1151
|
+
if (oTable.fnSettings().oFeatures.bStateSave === true) {
|
1152
|
+
if (oTable.fnSettings().oLoadedState.yadcfState !== undefined && oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly] !== undefined) {
|
1153
|
+
oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number] =
|
1154
|
+
{
|
1155
|
+
'from' : ui.values[0],
|
1156
|
+
'to' : ui.values[1]
|
1157
|
+
};
|
1158
|
+
} else {
|
1159
|
+
yadcfState = {};
|
1160
|
+
yadcfState[table_selector_jq_friendly] = [];
|
1161
|
+
yadcfState[table_selector_jq_friendly][column_number] = {
|
1162
|
+
'from' : ui.values[0],
|
1163
|
+
'to' : ui.values[1]
|
1164
|
+
};
|
1165
|
+
oTable.fnSettings().oLoadedState.yadcfState = yadcfState;
|
1166
|
+
}
|
1167
|
+
oTable.fnSettings().oApi._fnSaveState(oTable.fnSettings());
|
1168
|
+
}
|
1169
|
+
|
1170
|
+
resetIApiIndex();
|
1171
|
+
};
|
1172
|
+
|
1173
|
+
if (options.filter_delay === undefined) {
|
1174
|
+
keyUp();
|
1175
|
+
} else {
|
1176
|
+
yadcfDelay(function () {
|
1177
|
+
keyUp();
|
1178
|
+
}, options.filter_delay);
|
1179
|
+
}
|
1180
|
+
}
|
1181
|
+
|
1182
|
+
function addRangeNumberSliderFilter(filter_selector_string, table_selector_jq_friendly, column_number, filter_reset_button_text, min_val, max_val, ignore_char) {
|
1183
|
+
var sliderId = "yadcf-filter-" + table_selector_jq_friendly + "-slider-" + column_number,
|
1184
|
+
min_tip_id = "yadcf-filter-" + table_selector_jq_friendly + "-min_tip-" + column_number,
|
1185
|
+
max_tip_id = "yadcf-filter-" + table_selector_jq_friendly + "-max_tip-" + column_number,
|
1186
|
+
filter_selector_string_tmp,
|
1187
|
+
filter_wrapper_id,
|
1188
|
+
oTable,
|
1189
|
+
min_state_val = min_val,
|
1190
|
+
max_state_val = max_val;
|
1191
|
+
|
1192
|
+
filter_wrapper_id = "yadcf-filter-wrapper-" + table_selector_jq_friendly + "-" + column_number;
|
1193
|
+
|
1194
|
+
if ($("#" + filter_wrapper_id).length > 0) {
|
1195
|
+
if (!isFinite($('#' + min_tip_id).text()) || !isFinite($('#' + max_tip_id).text()) || !isFinite(min_val) || !isFinite(max_val) ||
|
1196
|
+
!isFinite($(filter_selector_string).find('.yadcf-filter-range-number-slider-min-tip-hidden.hide').text()) ||
|
1197
|
+
!isFinite($(filter_selector_string).find('.yadcf-filter-range-number-slider-max-tip-hidden.hide').text())) {
|
1198
|
+
$(filter_selector_string).empty();
|
1199
|
+
} else {
|
1200
|
+
return;
|
1201
|
+
}
|
1202
|
+
}
|
1203
|
+
|
1204
|
+
//add a wrapper to hold both filter and reset button
|
1205
|
+
$(filter_selector_string).append("<div onclick=\"yadcf.stopPropagation(event);\" id=\"" + filter_wrapper_id + "\" class=\"yadcf-filter-wrapper\"></div>");
|
1206
|
+
filter_selector_string = filter_selector_string + " div.yadcf-filter-wrapper";
|
1207
|
+
filter_selector_string_tmp = filter_selector_string;
|
1208
|
+
|
1209
|
+
$(filter_selector_string).append("<div id=\"yadcf-filter-wrapper-inner-" + table_selector_jq_friendly + "-" + column_number + "\" class=\"yadcf-number-slider-filter-wrapper-inner\"></div>");
|
1210
|
+
filter_selector_string = filter_selector_string + " div.yadcf-number-slider-filter-wrapper-inner";
|
1211
|
+
|
1212
|
+
$(filter_selector_string).append("<div id=\"" + sliderId + "\" class=\"yadcf-filter-range-number-slider\"></div>");
|
1213
|
+
filter_selector_string = filter_selector_string + " #" + sliderId;
|
1214
|
+
|
1215
|
+
$(filter_selector_string).append("<span class=\"yadcf-filter-range-number-slider-min-tip-hidden hide\">" + min_val + "</span>");
|
1216
|
+
$(filter_selector_string).append("<span class=\"yadcf-filter-range-number-slider-max-tip-hidden hide\">" + max_val + "</span>");
|
1217
|
+
|
1218
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
1219
|
+
oTable = oTables[table_selector_jq_friendly];
|
1220
|
+
if (oTable.fnSettings().oFeatures.bStateSave === true && oTable.fnSettings().oLoadedState) {
|
1221
|
+
if (oTable.fnSettings().oLoadedState.yadcfState && oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly] && oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number]) {
|
1222
|
+
if (min_val !== oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].from) {
|
1223
|
+
min_state_val = oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].from;
|
1224
|
+
}
|
1225
|
+
if (max_val !== oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].to) {
|
1226
|
+
max_state_val = oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].to;
|
1227
|
+
}
|
1228
|
+
}
|
1229
|
+
}
|
1230
|
+
|
1231
|
+
if (isFinite(min_val) && isFinite(max_val) && isFinite(min_state_val) && isFinite(max_state_val)) {
|
1232
|
+
$("#" + sliderId).slider({
|
1233
|
+
range: true,
|
1234
|
+
min: min_val,
|
1235
|
+
max: max_val,
|
1236
|
+
values: [min_state_val, max_state_val],
|
1237
|
+
create: function (event, ui) {
|
1238
|
+
rangeNumberSldierDrawTips(min_state_val, max_state_val, min_tip_id, max_tip_id, table_selector_jq_friendly, column_number);
|
1239
|
+
},
|
1240
|
+
slide: function (event, ui) {
|
1241
|
+
rangeNumberSldierDrawTips(ui.values[0], ui.values[1], min_tip_id, max_tip_id, table_selector_jq_friendly, column_number);
|
1242
|
+
rangeNumberSliderChange(table_selector_jq_friendly, event, ui);
|
1243
|
+
},
|
1244
|
+
change: function (event, ui) {
|
1245
|
+
rangeNumberSldierDrawTips(ui.values[0], ui.values[1], min_tip_id, max_tip_id, table_selector_jq_friendly, column_number);
|
1246
|
+
rangeNumberSliderChange(table_selector_jq_friendly, event, ui);
|
1247
|
+
}
|
1248
|
+
});
|
1249
|
+
|
1250
|
+
if (filter_reset_button_text !== false) {
|
1251
|
+
$(filter_selector_string_tmp).append("<input value=\"" + filter_reset_button_text + "\" type=\"button\" " +
|
1252
|
+
"onclick=\"yadcf.stopPropagation(event);yadcf.rangeNumberSliderClear('" + table_selector_jq_friendly + "',event); return false;\" class=\"yadcf-filter-reset-button range-number-slider-reset-button\">");
|
1253
|
+
}
|
1254
|
+
}
|
1255
|
+
|
1256
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
1257
|
+
oTable = oTables[table_selector_jq_friendly];
|
1258
|
+
if (oTable.fnSettings().oFeatures.bStateSave === true && oTable.fnSettings().oLoadedState) {
|
1259
|
+
if (oTable.fnSettings().oLoadedState.yadcfState && oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly] && oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number]) {
|
1260
|
+
if (isFinite(min_val) && min_val !== oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].from) {
|
1261
|
+
$($(filter_selector_string).find(".ui-slider-handle")[0]).addClass("inuse");
|
1262
|
+
}
|
1263
|
+
if (isFinite(max_val) && max_val !== oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].to) {
|
1264
|
+
$($(filter_selector_string).find(".ui-slider-handle")[1]).addClass("inuse");
|
1265
|
+
}
|
1266
|
+
if ((isFinite(min_val) && isFinite(max_val)) && (min_val !== oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].from || max_val !== oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number].to)) {
|
1267
|
+
$($(filter_selector_string).find(".ui-slider-range")).addClass("inuse");
|
1268
|
+
}
|
1269
|
+
}
|
1270
|
+
}
|
1271
|
+
resetIApiIndex();
|
1272
|
+
|
1273
|
+
if (oTable.fnSettings().oFeatures.bServerSide !== true) {
|
1274
|
+
addRangeNumberSliderFilterCapability(table_selector_jq_friendly, min_tip_id, max_tip_id, column_number, ignore_char);
|
1275
|
+
}
|
1276
|
+
}
|
1277
|
+
|
1278
|
+
function dot2obj(tmpObj, dot_refs) {
|
1279
|
+
var i = 0;
|
1280
|
+
dot_refs = dot_refs.split(".");
|
1281
|
+
for (i = 0; i < dot_refs.length; i++) {
|
1282
|
+
tmpObj = tmpObj[dot_refs[i]];
|
1283
|
+
}
|
1284
|
+
return tmpObj;
|
1285
|
+
}
|
1286
|
+
|
1287
|
+
function appendFilters(oTable, args, table_selector) {
|
1288
|
+
|
1289
|
+
var i = 0,
|
1290
|
+
$filter_selector,
|
1291
|
+
filter_selector_string,
|
1292
|
+
|
1293
|
+
data,
|
1294
|
+
filter_container_id,
|
1295
|
+
column_number_data,
|
1296
|
+
column_number,
|
1297
|
+
column_data_type,
|
1298
|
+
html_data_type,
|
1299
|
+
text_data_delimiter,
|
1300
|
+
filter_default_label,
|
1301
|
+
filter_reset_button_text,
|
1302
|
+
enable_auto_complete,
|
1303
|
+
sort_as,
|
1304
|
+
sort_order,
|
1305
|
+
date_format,
|
1306
|
+
ignore_char,
|
1307
|
+
filter_match_mode,
|
1308
|
+
|
1309
|
+
options,
|
1310
|
+
options_tmp,
|
1311
|
+
j,
|
1312
|
+
k,
|
1313
|
+
data_length,
|
1314
|
+
col_inner_elements,
|
1315
|
+
col_inner_data,
|
1316
|
+
col_filter_array,
|
1317
|
+
ii,
|
1318
|
+
table_selector_jq_friendly,
|
1319
|
+
min_val,
|
1320
|
+
max_val,
|
1321
|
+
col_num_visible,
|
1322
|
+
col_num_visible_iter,
|
1323
|
+
tmpStr,
|
1324
|
+
columnObjKey,
|
1325
|
+
columnObj;
|
1326
|
+
|
1327
|
+
|
1328
|
+
for (columnObjKey in args) {
|
1329
|
+
if (args.hasOwnProperty(columnObjKey)) {
|
1330
|
+
columnObj = args[columnObjKey];
|
1331
|
+
|
1332
|
+
data = columnObj.data;
|
1333
|
+
filter_container_id = columnObj.filter_container_id;
|
1334
|
+
column_number = columnObj.column_number;
|
1335
|
+
column_number = +column_number;
|
1336
|
+
column_number_data = undefined;
|
1337
|
+
if (isNaN(oTable.fnSettings().aoColumns[column_number].mData) && typeof oTable.fnSettings().aoColumns[column_number].mData !== 'object') {
|
1338
|
+
column_number_data = oTable.fnSettings().aoColumns[column_number].mData;
|
1339
|
+
}
|
1340
|
+
column_data_type = columnObj.column_data_type;
|
1341
|
+
html_data_type = columnObj.html_data_type;
|
1342
|
+
text_data_delimiter = columnObj.text_data_delimiter;
|
1343
|
+
filter_default_label = columnObj.filter_default_label;
|
1344
|
+
filter_reset_button_text = columnObj.filter_reset_button_text;
|
1345
|
+
enable_auto_complete = columnObj.enable_auto_complete;
|
1346
|
+
sort_as = columnObj.sort_as;
|
1347
|
+
sort_order = columnObj.sort_order;
|
1348
|
+
date_format = columnObj.date_format;
|
1349
|
+
//for jquery datepicker
|
1350
|
+
date_format = date_format.replace("yyyy", "yy");
|
1351
|
+
|
1352
|
+
if (columnObj.ignore_char !== undefined) {
|
1353
|
+
ignore_char = new RegExp(columnObj.ignore_char, "g");
|
1354
|
+
}
|
1355
|
+
filter_match_mode = columnObj.filter_match_mode;
|
1356
|
+
|
1357
|
+
if (column_number === undefined) {
|
1358
|
+
alert("You must specify column number");
|
1359
|
+
return;
|
1360
|
+
}
|
1361
|
+
|
1362
|
+
if (column_data_type === undefined) {
|
1363
|
+
column_data_type = "text";
|
1364
|
+
} else if (column_data_type === "html") {
|
1365
|
+
if (html_data_type === undefined) {
|
1366
|
+
html_data_type = "text";
|
1367
|
+
}
|
1368
|
+
}
|
1369
|
+
|
1370
|
+
if (enable_auto_complete === true) {
|
1371
|
+
columnObj.filter_type = "auto_complete";
|
1372
|
+
}
|
1373
|
+
|
1374
|
+
if (filter_default_label === undefined) {
|
1375
|
+
if (columnObj.filter_type === "select" || columnObj.filter_type === 'custom_func') {
|
1376
|
+
filter_default_label = "Select value";
|
1377
|
+
} else if (columnObj.filter_type === "multi_select") {
|
1378
|
+
filter_default_label = "Select values";
|
1379
|
+
} else if (columnObj.filter_type === "auto_complete" || columnObj.filter_type === "text") {
|
1380
|
+
filter_default_label = "Type a value";
|
1381
|
+
} else if (columnObj.filter_type === "range_number" || columnObj.filter_type === "range_date") {
|
1382
|
+
filter_default_label = ["from", "to"];
|
1383
|
+
} else if (columnObj.filter_type === "date") {
|
1384
|
+
filter_default_label = "Select a date";
|
1385
|
+
}
|
1386
|
+
}
|
1387
|
+
|
1388
|
+
if (filter_reset_button_text === undefined) {
|
1389
|
+
filter_reset_button_text = "x";
|
1390
|
+
}
|
1391
|
+
|
1392
|
+
options = [];
|
1393
|
+
col_filter_array = {};
|
1394
|
+
|
1395
|
+
if (data === undefined) {
|
1396
|
+
data = oTable.fnSettings().aoData;
|
1397
|
+
data_length = data.length;
|
1398
|
+
|
1399
|
+
for (j = 0; j < data_length; j++) {
|
1400
|
+
if (column_data_type === "html") {
|
1401
|
+
if (column_number_data === undefined) {
|
1402
|
+
col_inner_elements = $(data[j]._aData[column_number]);
|
1403
|
+
} else {
|
1404
|
+
col_inner_elements = dot2obj(data[j]._aData, column_number_data);
|
1405
|
+
col_inner_elements = $(col_inner_elements);
|
1406
|
+
}
|
1407
|
+
for (k = 0; k < col_inner_elements.length; k++) {
|
1408
|
+
switch (html_data_type) {
|
1409
|
+
case "text":
|
1410
|
+
col_inner_data = $(col_inner_elements[k]).text();
|
1411
|
+
break;
|
1412
|
+
case "value":
|
1413
|
+
col_inner_data = $(col_inner_elements[k]).val();
|
1414
|
+
break;
|
1415
|
+
case "id":
|
1416
|
+
col_inner_data = col_inner_elements[k].id;
|
1417
|
+
break;
|
1418
|
+
}
|
1419
|
+
if (!(col_filter_array.hasOwnProperty(col_inner_data))) {
|
1420
|
+
col_filter_array[col_inner_data] = col_inner_data;
|
1421
|
+
options.push(col_inner_data);
|
1422
|
+
}
|
1423
|
+
}
|
1424
|
+
} else if (column_data_type === "text") {
|
1425
|
+
if (text_data_delimiter !== undefined) {
|
1426
|
+
if (column_number_data === undefined) {
|
1427
|
+
col_inner_elements = data[j]._aData[column_number].split(text_data_delimiter);
|
1428
|
+
} else {
|
1429
|
+
col_inner_elements = dot2obj(data[j]._aData, column_number_data);
|
1430
|
+
col_inner_elements = col_inner_elements.split(text_data_delimiter);
|
1431
|
+
}
|
1432
|
+
for (k = 0; k < col_inner_elements.length; k++) {
|
1433
|
+
col_inner_data = col_inner_elements[k];
|
1434
|
+
if (!(col_filter_array.hasOwnProperty(col_inner_data))) {
|
1435
|
+
col_filter_array[col_inner_data] = col_inner_data;
|
1436
|
+
options.push(col_inner_data);
|
1437
|
+
}
|
1438
|
+
}
|
1439
|
+
} else {
|
1440
|
+
if (column_number_data === undefined) {
|
1441
|
+
col_inner_data = data[j]._aData[column_number];
|
1442
|
+
} else {
|
1443
|
+
col_inner_data = dot2obj(data[j]._aData, column_number_data);
|
1444
|
+
}
|
1445
|
+
if (!(col_filter_array.hasOwnProperty(col_inner_data))) {
|
1446
|
+
col_filter_array[col_inner_data] = col_inner_data;
|
1447
|
+
options.push(col_inner_data);
|
1448
|
+
}
|
1449
|
+
}
|
1450
|
+
}
|
1451
|
+
}
|
1452
|
+
|
1453
|
+
} else {
|
1454
|
+
for (ii = 0; ii < data.length; ii++) {
|
1455
|
+
options.push(data[ii]);
|
1456
|
+
}
|
1457
|
+
}
|
1458
|
+
|
1459
|
+
if (columnObj.filter_type === "range_number_slider") {
|
1460
|
+
min_val = findMinInArray(options, ignore_char);
|
1461
|
+
max_val = findMaxInArray(options, ignore_char);
|
1462
|
+
}
|
1463
|
+
|
1464
|
+
|
1465
|
+
if (filter_container_id === undefined) {
|
1466
|
+
//Can't show filter inside a column for a hidden one (place it outside using filter_container_id)
|
1467
|
+
if (oTable.fnSettings().aoColumns[column_number].bVisible === false) {
|
1468
|
+
//console.log('Yadcf warning: Can\'t show filter inside a column N#' + column_number + ' for a hidden one (place it outside using filter_container_id)');
|
1469
|
+
continue;
|
1470
|
+
}
|
1471
|
+
col_num_visible = column_number;
|
1472
|
+
|
1473
|
+
for (col_num_visible_iter = 0; col_num_visible_iter < oTable.fnSettings().aoColumns.length && col_num_visible_iter < column_number; col_num_visible_iter++) {
|
1474
|
+
if (oTable.fnSettings().aoColumns[col_num_visible_iter].bVisible === false) {
|
1475
|
+
col_num_visible--;
|
1476
|
+
}
|
1477
|
+
}
|
1478
|
+
filter_selector_string = table_selector + " thead th:eq(" + col_num_visible + ")";
|
1479
|
+
$filter_selector = $(filter_selector_string).find(".yadcf-filter");
|
1480
|
+
} else {
|
1481
|
+
if ($("#" + filter_container_id).length === 0) {
|
1482
|
+
alert("Filter container could not be found.");
|
1483
|
+
return;
|
1484
|
+
}
|
1485
|
+
filter_selector_string = "#" + filter_container_id;
|
1486
|
+
$filter_selector = $(filter_selector_string).find(".yadcf-filter");
|
1487
|
+
}
|
1488
|
+
|
1489
|
+
table_selector_jq_friendly = yadcf.generateTableSelectorJQFriendly(table_selector);
|
1490
|
+
|
1491
|
+
if (columnObj.filter_type === "select" || columnObj.filter_type === "auto_complete" || columnObj.filter_type === "multi_select" || columnObj.filter_type === "custom_func") {
|
1492
|
+
if (sort_as === "alpha") {
|
1493
|
+
if (sort_order === "asc") {
|
1494
|
+
options.sort();
|
1495
|
+
} else if (sort_order === "desc") {
|
1496
|
+
options.sort();
|
1497
|
+
options.reverse();
|
1498
|
+
}
|
1499
|
+
} else if (sort_as === "num") {
|
1500
|
+
if (sort_order === "asc") {
|
1501
|
+
options.sort(sortNumAsc);
|
1502
|
+
} else if (sort_order === "desc") {
|
1503
|
+
options.sort(sortNumDesc);
|
1504
|
+
}
|
1505
|
+
}
|
1506
|
+
}
|
1507
|
+
|
1508
|
+
if (columnObj.filter_type === "select" || columnObj.filter_type === 'custom_func') {
|
1509
|
+
options_tmp = "<option value=\"" + "-1" + "\">" + filter_default_label + "</option>";
|
1510
|
+
if (typeof options[0] === 'object') {
|
1511
|
+
for (ii = 0; ii < options.length; ii++) {
|
1512
|
+
options_tmp += "<option value=\"" + options[ii].value + "\">" + options[ii].label + "</option>";
|
1513
|
+
}
|
1514
|
+
} else {
|
1515
|
+
for (ii = 0; ii < options.length; ii++) {
|
1516
|
+
options_tmp += "<option value=\"" + options[ii] + "\">" + options[ii] + "</option>";
|
1517
|
+
}
|
1518
|
+
}
|
1519
|
+
options = options_tmp;
|
1520
|
+
|
1521
|
+
} else if (columnObj.filter_type === "multi_select") {
|
1522
|
+
if (columnObj.select_type === undefined) {
|
1523
|
+
options_tmp = "<option data-placeholder=\"true\" value=\"" + "-1" + "\">" + filter_default_label + "</option>";
|
1524
|
+
} else {
|
1525
|
+
options_tmp = "";
|
1526
|
+
}
|
1527
|
+
if (typeof options[0] === 'object') {
|
1528
|
+
for (ii = 0; ii < options.length; ii++) {
|
1529
|
+
options_tmp += "<option value=\"" + options[ii].value + "\">" + options[ii].label + "</option>";
|
1530
|
+
}
|
1531
|
+
} else {
|
1532
|
+
for (ii = 0; ii < options.length; ii++) {
|
1533
|
+
options_tmp += "<option value=\"" + options[ii] + "\">" + options[ii] + "</option>";
|
1534
|
+
}
|
1535
|
+
}
|
1536
|
+
options = options_tmp;
|
1537
|
+
}
|
1538
|
+
|
1539
|
+
if ($filter_selector.length === 1) {
|
1540
|
+
if (columnObj.filter_type === "select" || columnObj.filter_type === "multi_select") {
|
1541
|
+
|
1542
|
+
$filter_selector.empty();
|
1543
|
+
$filter_selector.append(options);
|
1544
|
+
if (oTable.fnSettings().aoPreSearchCols[column_number].sSearch !== '') {
|
1545
|
+
tmpStr = oTable.fnSettings().aoPreSearchCols[column_number].sSearch;
|
1546
|
+
if (columnObj.filter_type === "select") {
|
1547
|
+
tmpStr = yadcfParseMatchFilter(tmpStr, getOptions(oTable.selector)[column_number].filter_match_mode);
|
1548
|
+
$('#yadcf-filter-' + table_selector_jq_friendly + '-' + column_number).val(tmpStr).addClass("inuse");
|
1549
|
+
} else if (columnObj.filter_type === "multi_select") {
|
1550
|
+
tmpStr = yadcfParseMatchFilterMultiSelect(tmpStr, getOptions(oTable.selector)[column_number].filter_match_mode);
|
1551
|
+
tmpStr = tmpStr.replace(/\\/g, "");
|
1552
|
+
tmpStr = tmpStr.split("|");
|
1553
|
+
$('#yadcf-filter-' + table_selector_jq_friendly + '-' + column_number).val(tmpStr);
|
1554
|
+
}
|
1555
|
+
}
|
1556
|
+
if (columnObj.select_type !== undefined && columnObj.select_type === 'chosen') {
|
1557
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).trigger("chosen:updated");
|
1558
|
+
} else if (columnObj.select_type !== undefined && columnObj.select_type === 'select2') {
|
1559
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).select2("destroy").select2(columnObj.select_type_options);
|
1560
|
+
}
|
1561
|
+
} else if (columnObj.filter_type === "auto_complete") {
|
1562
|
+
$(document).data("yadcf-filter-" + table_selector_jq_friendly + "-" + column_number, options);
|
1563
|
+
}
|
1564
|
+
} else {
|
1565
|
+
if (filter_container_id === undefined) {
|
1566
|
+
if ($(filter_selector_string + " div.DataTables_sort_wrapper").length > 0) {
|
1567
|
+
$(filter_selector_string + " div.DataTables_sort_wrapper").css("display", "inline-block");
|
1568
|
+
}
|
1569
|
+
} else {
|
1570
|
+
if ($("#yadcf-filter-wrapper-" + filter_container_id).length === 0) {
|
1571
|
+
$("#" + filter_container_id).append("<div id=\"yadcf-filter-wrapper-" + filter_container_id + "\"></div>");
|
1572
|
+
}
|
1573
|
+
filter_selector_string = "#yadcf-filter-wrapper-" + filter_container_id;
|
1574
|
+
}
|
1575
|
+
|
1576
|
+
if (columnObj.filter_type === "select" || columnObj.filter_type === 'custom_func') {
|
1577
|
+
|
1578
|
+
//add a wrapper to hold both filter and reset button
|
1579
|
+
$(filter_selector_string).append("<div id=\"yadcf-filter-wrapper-" + table_selector_jq_friendly + "-" + column_number + "\" class=\"yadcf-filter-wrapper\"></div>");
|
1580
|
+
filter_selector_string = filter_selector_string + " div.yadcf-filter-wrapper";
|
1581
|
+
|
1582
|
+
if (columnObj.filter_type === "select") {
|
1583
|
+
$(filter_selector_string).append("<select id=\"yadcf-filter-" + table_selector_jq_friendly + "-" + column_number + "\" class=\"yadcf-filter\" " +
|
1584
|
+
"onchange=\"yadcf.doFilter(this, '" + table_selector_jq_friendly + "', " + column_number + ", '" + filter_match_mode + "')\" onclick='yadcf.stopPropagation(event);'>" + options + "</select>");
|
1585
|
+
if (filter_reset_button_text !== false) {
|
1586
|
+
$(filter_selector_string).find(".yadcf-filter").after("<input value=\"" + filter_reset_button_text + "\" type=\"button\" " +
|
1587
|
+
"onclick=\"yadcf.stopPropagation(event);yadcf.doFilter('clear', '" + table_selector_jq_friendly + "', " + column_number + "); return false;\" class=\"yadcf-filter-reset-button\">");
|
1588
|
+
}
|
1589
|
+
} else {
|
1590
|
+
$(filter_selector_string).append("<select id=\"yadcf-filter-" + table_selector_jq_friendly + "-" + column_number + "\" class=\"yadcf-filter\" " +
|
1591
|
+
"onchange=\"yadcf.doFilterCustomDateFunc(this, '" + table_selector_jq_friendly + "', " + column_number + ")\" onclick='yadcf.stopPropagation(event);'>" + options + "</select>");
|
1592
|
+
if (filter_reset_button_text !== false) {
|
1593
|
+
$(filter_selector_string).find(".yadcf-filter").after("<input value=\"" + filter_reset_button_text + "\" type=\"button\" " +
|
1594
|
+
"onclick=\"yadcf.stopPropagation(event);yadcf.doFilterCustomDateFunc('clear', '" + table_selector_jq_friendly + "', " + column_number + "); return false;\" class=\"yadcf-filter-reset-button\">");
|
1595
|
+
}
|
1596
|
+
if (oTable.fnSettings().oFeatures.bServerSide !== true) {
|
1597
|
+
addCustomFunctionFilterCapability(table_selector_jq_friendly, "yadcf-filter-" + table_selector_jq_friendly + "-" + column_number, column_number);
|
1598
|
+
}
|
1599
|
+
}
|
1600
|
+
|
1601
|
+
if (oTable.fnSettings().aoPreSearchCols[column_number].sSearch !== '') {
|
1602
|
+
tmpStr = oTable.fnSettings().aoPreSearchCols[column_number].sSearch;
|
1603
|
+
tmpStr = yadcfParseMatchFilter(tmpStr, getOptions(oTable.selector)[column_number].filter_match_mode);
|
1604
|
+
$('#yadcf-filter-' + table_selector_jq_friendly + '-' + column_number).val(tmpStr).addClass("inuse");
|
1605
|
+
}
|
1606
|
+
|
1607
|
+
if (columnObj.select_type !== undefined && columnObj.select_type === 'chosen') {
|
1608
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).chosen(columnObj.select_type_options);
|
1609
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).next().attr("onclick", "yadcf.stopPropagation(event);");
|
1610
|
+
} else if (columnObj.select_type !== undefined && columnObj.select_type === 'select2') {
|
1611
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).select2(columnObj.select_type_options);
|
1612
|
+
}
|
1613
|
+
|
1614
|
+
} else if (columnObj.filter_type === "multi_select") {
|
1615
|
+
|
1616
|
+
//add a wrapper to hold both filter and reset button
|
1617
|
+
$(filter_selector_string).append("<div id=\"yadcf-filter-wrapper-" + table_selector_jq_friendly + "-" + column_number + "\" class=\"yadcf-filter-wrapper\"></div>");
|
1618
|
+
filter_selector_string = filter_selector_string + " div.yadcf-filter-wrapper";
|
1619
|
+
|
1620
|
+
$(filter_selector_string).append("<select multiple data-placeholder=\"" + filter_default_label + "\" id=\"yadcf-filter-" + table_selector_jq_friendly + "-" + column_number + "\" class=\"yadcf-filter\" " +
|
1621
|
+
"onchange=\"yadcf.doFilterMultiSelect(this, '" + table_selector_jq_friendly + "', " + column_number + ", '" + filter_match_mode + "')\" onclick='yadcf.stopPropagation(event);'>" + options + "</select>");
|
1622
|
+
|
1623
|
+
if (filter_reset_button_text !== false) {
|
1624
|
+
$(filter_selector_string).find(".yadcf-filter").after("<input value=\"" + filter_reset_button_text + "\" type=\"button\" " +
|
1625
|
+
"onclick=\"yadcf.stopPropagation(event);yadcf.doFilter('clear', '" + table_selector_jq_friendly + "', " + column_number + "); return false;\" class=\"yadcf-filter-reset-button\">");
|
1626
|
+
}
|
1627
|
+
|
1628
|
+
if (oTable.fnSettings().aoPreSearchCols[column_number].sSearch !== '') {
|
1629
|
+
tmpStr = oTable.fnSettings().aoPreSearchCols[column_number].sSearch;
|
1630
|
+
tmpStr = yadcfParseMatchFilterMultiSelect(tmpStr, getOptions(oTable.selector)[column_number].filter_match_mode);
|
1631
|
+
tmpStr = tmpStr.replace(/\\/g, "");
|
1632
|
+
tmpStr = tmpStr.split("|");
|
1633
|
+
$('#yadcf-filter-' + table_selector_jq_friendly + '-' + column_number).val(tmpStr);
|
1634
|
+
}
|
1635
|
+
|
1636
|
+
if (columnObj.filter_container_id === undefined && columnObj.select_type_options.width === undefined) {
|
1637
|
+
columnObj.select_type_options = $.extend(columnObj.select_type_options, {width: $(filter_selector_string).closest("th").width() + "px"});
|
1638
|
+
}
|
1639
|
+
if (columnObj.select_type !== undefined && columnObj.select_type === 'chosen') {
|
1640
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).chosen(columnObj.select_type_options);
|
1641
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).next().attr("onclick", "yadcf.stopPropagation(event);");
|
1642
|
+
} else if (columnObj.select_type !== undefined && columnObj.select_type === 'select2') {
|
1643
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).select2(columnObj.select_type_options);
|
1644
|
+
}
|
1645
|
+
|
1646
|
+
} else if (columnObj.filter_type === "auto_complete") {
|
1647
|
+
|
1648
|
+
//add a wrapper to hold both filter and reset button
|
1649
|
+
$(filter_selector_string).append("<div id=\"yadcf-filter-wrapper-" + table_selector_jq_friendly + "-" + column_number + "\" class=\"yadcf-filter-wrapper\"></div>");
|
1650
|
+
filter_selector_string = filter_selector_string + " div.yadcf-filter-wrapper";
|
1651
|
+
|
1652
|
+
$(filter_selector_string).append("<input id=\"yadcf-filter-" + table_selector_jq_friendly + "-" + column_number + "\" class=\"yadcf-filter\" onclick='yadcf.stopPropagation(event);"
|
1653
|
+
+ "' placeholder='" + filter_default_label + "'" + " filter_match_mode='" + filter_match_mode + "'" + " onkeyup=\"yadcf.autocompleteKeyUP('" + table_selector_jq_friendly + "',event);\"></input>");
|
1654
|
+
$(document).data("yadcf-filter-" + table_selector_jq_friendly + "-" + column_number, options);
|
1655
|
+
|
1656
|
+
if (filter_reset_button_text !== false) {
|
1657
|
+
$(filter_selector_string).find(".yadcf-filter").after("<input value=\"" + filter_reset_button_text + "\" type=\"button\" " +
|
1658
|
+
"onclick=\"yadcf.stopPropagation(event);yadcf.doFilterAutocomplete('clear', '" + table_selector_jq_friendly + "', " + column_number + "); return false;\" class=\"yadcf-filter-reset-button\">");
|
1659
|
+
}
|
1660
|
+
|
1661
|
+
} else if (columnObj.filter_type === "text") {
|
1662
|
+
|
1663
|
+
//add a wrapper to hold both filter and reset button
|
1664
|
+
$(filter_selector_string).append("<div id=\"yadcf-filter-wrapper-" + table_selector_jq_friendly + "-" + column_number + "\" class=\"yadcf-filter-wrapper\"></div>");
|
1665
|
+
filter_selector_string = filter_selector_string + " div.yadcf-filter-wrapper";
|
1666
|
+
|
1667
|
+
$(filter_selector_string).append("<input type=\"text\" id=\"yadcf-filter-" + table_selector_jq_friendly + "-" + column_number + "\" class=\"yadcf-filter\" onclick='yadcf.stopPropagation(event);"
|
1668
|
+
+ "' placeholder='" + filter_default_label + "'" + " filter_match_mode='" + filter_match_mode + "'" + " onkeyup=\"yadcf.textKeyUP('" + table_selector_jq_friendly + "',event);\"></input>");
|
1669
|
+
|
1670
|
+
if (filter_reset_button_text !== false) {
|
1671
|
+
$(filter_selector_string).find(".yadcf-filter").after("<input value=\"" + filter_reset_button_text + "\" type=\"button\" " + " id=\"yadcf-filter-" + table_selector_jq_friendly + "-" + column_number + "-reset\"" +
|
1672
|
+
"onclick=\"yadcf.stopPropagation(event);yadcf.textKeyUP('" + table_selector_jq_friendly + "', event, 'clear'); return false;\" class=\"yadcf-filter-reset-button\">");
|
1673
|
+
}
|
1674
|
+
|
1675
|
+
if (oTable.fnSettings().aoPreSearchCols[column_number].sSearch !== '') {
|
1676
|
+
tmpStr = oTable.fnSettings().aoPreSearchCols[column_number].sSearch;
|
1677
|
+
tmpStr = yadcfParseMatchFilter(tmpStr, getOptions(oTable.selector)[column_number].filter_match_mode);
|
1678
|
+
$('#yadcf-filter-' + table_selector_jq_friendly + '-' + column_number).val(tmpStr).addClass("inuse");
|
1679
|
+
}
|
1680
|
+
|
1681
|
+
} else if (columnObj.filter_type === "date") {
|
1682
|
+
|
1683
|
+
addDateFilter(filter_selector_string, table_selector_jq_friendly, column_number, filter_reset_button_text, filter_default_label, date_format);
|
1684
|
+
|
1685
|
+
} else if (columnObj.filter_type === "range_number") {
|
1686
|
+
|
1687
|
+
addRangeNumberFilter(filter_selector_string, table_selector_jq_friendly, column_number, filter_reset_button_text, filter_default_label, ignore_char);
|
1688
|
+
|
1689
|
+
} else if (columnObj.filter_type === "range_number_slider") {
|
1690
|
+
|
1691
|
+
addRangeNumberSliderFilter(filter_selector_string, table_selector_jq_friendly, column_number, filter_reset_button_text, min_val, max_val, ignore_char);
|
1692
|
+
|
1693
|
+
} else if (columnObj.filter_type === "range_date") {
|
1694
|
+
|
1695
|
+
addRangeDateFilter(filter_selector_string, table_selector_jq_friendly, column_number, filter_reset_button_text, filter_default_label, date_format);
|
1696
|
+
|
1697
|
+
}
|
1698
|
+
}
|
1699
|
+
|
1700
|
+
if ($(document).data("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number + "_val") !== undefined && $(document).data("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number + "_val") !== "-1") {
|
1701
|
+
$(filter_selector_string).find(".yadcf-filter").val($(document).data("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number + "_val"));
|
1702
|
+
}
|
1703
|
+
if (columnObj.filter_type === "auto_complete") {
|
1704
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).autocomplete({
|
1705
|
+
source: $(document).data("yadcf-filter-" + table_selector_jq_friendly + "-" + column_number),
|
1706
|
+
select: autocompleteSelect
|
1707
|
+
});
|
1708
|
+
if (oTable.fnSettings().aoPreSearchCols[column_number].sSearch !== '') {
|
1709
|
+
tmpStr = oTable.fnSettings().aoPreSearchCols[column_number].sSearch;
|
1710
|
+
tmpStr = yadcfParseMatchFilter(tmpStr, getOptions(oTable.selector)[column_number].filter_match_mode);
|
1711
|
+
$('#yadcf-filter-' + table_selector_jq_friendly + '-' + column_number).val(tmpStr).addClass("inuse");
|
1712
|
+
}
|
1713
|
+
}
|
1714
|
+
}
|
1715
|
+
}
|
1716
|
+
if (exFilterColumnQueue.length > 0) {
|
1717
|
+
(exFilterColumnQueue.shift())();
|
1718
|
+
}
|
1719
|
+
}
|
1720
|
+
|
1721
|
+
function endsWith(str, suffix) {
|
1722
|
+
return str.indexOf(suffix, str.length - suffix.length) !== -1;
|
1723
|
+
}
|
1724
|
+
|
1725
|
+
function rangeClear(table_selector_jq_friendly, event) {
|
1726
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
1727
|
+
var oTable = oTables[table_selector_jq_friendly],
|
1728
|
+
yadcfState,
|
1729
|
+
column_number;
|
1730
|
+
|
1731
|
+
column_number = parseInt($(event.target).parent().attr("id").replace('yadcf-filter-wrapper-' + table_selector_jq_friendly + '-', ''), 10);
|
1732
|
+
|
1733
|
+
$(event.target).parent().find(".yadcf-filter-range").val("");
|
1734
|
+
if ($(event.target).parent().find(".yadcf-filter-range-number").length > 0) {
|
1735
|
+
$($(event.target).parent().find(".yadcf-filter-range")[0]).focus();
|
1736
|
+
}
|
1737
|
+
|
1738
|
+
if (oTable.fnSettings().oFeatures.bServerSide !== true) {
|
1739
|
+
oTable.fnDraw();
|
1740
|
+
} else {
|
1741
|
+
oTable.fnFilter('-yadcf_delim-', column_number);
|
1742
|
+
}
|
1743
|
+
|
1744
|
+
if (!oTable.fnSettings().oLoadedState) {
|
1745
|
+
oTable.fnSettings().oLoadedState = {};
|
1746
|
+
oTable.fnSettings().oApi._fnSaveState(oTable.fnSettings());
|
1747
|
+
}
|
1748
|
+
if (oTable.fnSettings().oFeatures.bStateSave === true) {
|
1749
|
+
if (oTable.fnSettings().oLoadedState.yadcfState !== undefined && oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly] !== undefined) {
|
1750
|
+
oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number] =
|
1751
|
+
{
|
1752
|
+
'from' : "",
|
1753
|
+
'to' : ""
|
1754
|
+
};
|
1755
|
+
} else {
|
1756
|
+
yadcfState = {};
|
1757
|
+
yadcfState[table_selector_jq_friendly] = [];
|
1758
|
+
yadcfState[table_selector_jq_friendly][column_number] = {
|
1759
|
+
'from' : "",
|
1760
|
+
'to' : ""
|
1761
|
+
};
|
1762
|
+
oTable.fnSettings().oLoadedState.yadcfState = yadcfState;
|
1763
|
+
}
|
1764
|
+
oTable.fnSettings().oApi._fnSaveState(oTable.fnSettings());
|
1765
|
+
}
|
1766
|
+
resetIApiIndex();
|
1767
|
+
|
1768
|
+
$(event.target).parent().find(".yadcf-filter-range").removeClass("inuse");
|
1769
|
+
|
1770
|
+
return;
|
1771
|
+
}
|
1772
|
+
|
1773
|
+
function rangeNumberSliderClear(table_selector_jq_friendly, event) {
|
1774
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
1775
|
+
var oTable = oTables[table_selector_jq_friendly],
|
1776
|
+
min_val,
|
1777
|
+
max_val;
|
1778
|
+
|
1779
|
+
min_val = +$($(event.target).parent().find(".yadcf-filter-range-number-slider-min-tip-hidden")).text();
|
1780
|
+
max_val = +$($(event.target).parent().find(".yadcf-filter-range-number-slider-max-tip-hidden")).text();
|
1781
|
+
|
1782
|
+
$("#" + $(event.target).prev().find(".yadcf-filter-range-number-slider").attr("id")).slider("option", "values", [min_val, max_val]);
|
1783
|
+
|
1784
|
+
$($(event.target).prev().find(".ui-slider-handle")[0]).attr("tabindex", -1).focus();
|
1785
|
+
|
1786
|
+
$($(event.target).prev().find(".ui-slider-handle")[0]).removeClass("inuse");
|
1787
|
+
$($(event.target).prev().find(".ui-slider-handle")[1]).removeClass("inuse");
|
1788
|
+
$(event.target).prev().find(".ui-slider-range").removeClass("inuse");
|
1789
|
+
|
1790
|
+
oTable.fnDraw();
|
1791
|
+
resetIApiIndex();
|
1792
|
+
|
1793
|
+
return;
|
1794
|
+
}
|
1795
|
+
|
1796
|
+
function dateKeyUP(table_selector_jq_friendly, date_format, event) {
|
1797
|
+
var oTable,
|
1798
|
+
date,
|
1799
|
+
dateId,
|
1800
|
+
column_number;
|
1801
|
+
|
1802
|
+
dateId = event.target.id;
|
1803
|
+
date = document.getElementById(dateId).value;
|
1804
|
+
try {
|
1805
|
+
if (date.length === (date_format.length + 2)) {
|
1806
|
+
date = (date !== "") ? $.datepicker.parseDate(date_format, date) : date;
|
1807
|
+
}
|
1808
|
+
} catch (err1) {}
|
1809
|
+
|
1810
|
+
if (((date instanceof Date) || date === "")) {
|
1811
|
+
|
1812
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
1813
|
+
oTable = oTables[table_selector_jq_friendly];
|
1814
|
+
column_number = parseInt(dateId.replace("yadcf-filter-" + table_selector_jq_friendly + "-", ""), 10);
|
1815
|
+
|
1816
|
+
if (date instanceof Date) {
|
1817
|
+
$("#" + dateId).addClass('inuse');
|
1818
|
+
oTable.fnFilter(document.getElementById(dateId).value, column_number);
|
1819
|
+
} else {
|
1820
|
+
$("#" + dateId).removeClass('inuse');
|
1821
|
+
}
|
1822
|
+
if ($.trim(event.target.value) === '' && $(event.target).hasClass('inuse')) {
|
1823
|
+
$('#' + event.target.id).removeClass('inuse');
|
1824
|
+
oTable.fnFilter('', column_number);
|
1825
|
+
}
|
1826
|
+
resetIApiIndex();
|
1827
|
+
} else if ($(event.target).hasClass('inuse')) {
|
1828
|
+
|
1829
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
1830
|
+
oTable = oTables[table_selector_jq_friendly];
|
1831
|
+
column_number = parseInt(dateId.replace("yadcf-filter-" + table_selector_jq_friendly + "-", ""), 10);
|
1832
|
+
|
1833
|
+
$("#" + dateId).removeClass('inuse');
|
1834
|
+
|
1835
|
+
oTable.fnFilter('', column_number);
|
1836
|
+
resetIApiIndex();
|
1837
|
+
}
|
1838
|
+
}
|
1839
|
+
|
1840
|
+
function rangeDateKeyUP(table_selector_jq_friendly, date_format, event) {
|
1841
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
1842
|
+
var oTable = oTables[table_selector_jq_friendly],
|
1843
|
+
min,
|
1844
|
+
min_server,
|
1845
|
+
max,
|
1846
|
+
max_server,
|
1847
|
+
fromId,
|
1848
|
+
toId,
|
1849
|
+
column_number,
|
1850
|
+
options,
|
1851
|
+
keyUp;
|
1852
|
+
|
1853
|
+
column_number = parseInt($(event.target).attr("id").replace('-from-date-', '').replace('-to-date-', '').replace('yadcf-filter-' + table_selector_jq_friendly, ''), 10);
|
1854
|
+
options = getOptions(oTable.selector)[column_number];
|
1855
|
+
|
1856
|
+
keyUp = function () {
|
1857
|
+
if (event.target.id.indexOf("-from-") !== -1) {
|
1858
|
+
fromId = event.target.id;
|
1859
|
+
toId = event.target.id.replace("-from-", "-to-");
|
1860
|
+
|
1861
|
+
min = document.getElementById(fromId).value;
|
1862
|
+
max = document.getElementById(toId).value;
|
1863
|
+
} else {
|
1864
|
+
toId = event.target.id;
|
1865
|
+
fromId = event.target.id.replace("-to-", "-from-");
|
1866
|
+
|
1867
|
+
max = document.getElementById(toId).value;
|
1868
|
+
min = document.getElementById(fromId).value;
|
1869
|
+
}
|
1870
|
+
|
1871
|
+
try {
|
1872
|
+
if (min.length === (date_format.length + 2)) {
|
1873
|
+
min = (min !== "") ? $.datepicker.parseDate(date_format, min) : min;
|
1874
|
+
}
|
1875
|
+
} catch (err1) {}
|
1876
|
+
try {
|
1877
|
+
if (max.length === (date_format.length + 2)) {
|
1878
|
+
max = (max !== "") ? $.datepicker.parseDate(date_format, max) : max;
|
1879
|
+
}
|
1880
|
+
} catch (err2) {}
|
1881
|
+
|
1882
|
+
if (((max instanceof Date) && (min instanceof Date) && (max >= min)) || min === "" || max === "") {
|
1883
|
+
|
1884
|
+
if (oTable.fnSettings().oFeatures.bServerSide !== true) {
|
1885
|
+
oTable.fnDraw();
|
1886
|
+
} else {
|
1887
|
+
if (min instanceof Date) {
|
1888
|
+
min_server = min.getTime();
|
1889
|
+
} else {
|
1890
|
+
min_server = min;
|
1891
|
+
}
|
1892
|
+
if (max instanceof Date) {
|
1893
|
+
max_server = max.getTime();
|
1894
|
+
} else {
|
1895
|
+
max_server = max;
|
1896
|
+
}
|
1897
|
+
oTable.fnFilter(min_server + '-yadcf_delim-' + max_server, column_number);
|
1898
|
+
}
|
1899
|
+
|
1900
|
+
if (min instanceof Date) {
|
1901
|
+
$("#" + fromId).addClass("inuse");
|
1902
|
+
} else {
|
1903
|
+
$("#" + fromId).removeClass("inuse");
|
1904
|
+
}
|
1905
|
+
if (max instanceof Date) {
|
1906
|
+
$("#" + toId).addClass("inuse");
|
1907
|
+
} else {
|
1908
|
+
$("#" + toId).removeClass("inuse");
|
1909
|
+
}
|
1910
|
+
|
1911
|
+
if ($.trim(event.target.value) === "" && $(event.target).hasClass("inuse")) {
|
1912
|
+
$("#" + event.target.id).removeClass("inuse");
|
1913
|
+
}
|
1914
|
+
|
1915
|
+
}
|
1916
|
+
resetIApiIndex();
|
1917
|
+
};
|
1918
|
+
|
1919
|
+
if (options.filter_delay === undefined) {
|
1920
|
+
keyUp(table_selector_jq_friendly, event);
|
1921
|
+
} else {
|
1922
|
+
yadcfDelay(function () {
|
1923
|
+
keyUp(table_selector_jq_friendly, event);
|
1924
|
+
}, options.filter_delay);
|
1925
|
+
}
|
1926
|
+
}
|
1927
|
+
|
1928
|
+
function rangeNumberKeyUP(table_selector_jq_friendly, event) {
|
1929
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
1930
|
+
var oTable = oTables[table_selector_jq_friendly],
|
1931
|
+
min,
|
1932
|
+
max,
|
1933
|
+
fromId,
|
1934
|
+
toId,
|
1935
|
+
yadcfState,
|
1936
|
+
column_number,
|
1937
|
+
options,
|
1938
|
+
keyUp;
|
1939
|
+
|
1940
|
+
column_number = parseInt($(event.target).attr("id").replace('-from-', '').replace('-to-', '').replace('yadcf-filter-' + table_selector_jq_friendly, ''), 10);
|
1941
|
+
options = getOptions(oTable.selector)[column_number];
|
1942
|
+
|
1943
|
+
keyUp = function () {
|
1944
|
+
|
1945
|
+
if (event.target.id.indexOf("-from-") !== -1) {
|
1946
|
+
fromId = event.target.id;
|
1947
|
+
toId = event.target.id.replace("-from-", "-to-");
|
1948
|
+
|
1949
|
+
min = document.getElementById(fromId).value;
|
1950
|
+
max = document.getElementById(toId).value;
|
1951
|
+
} else {
|
1952
|
+
toId = event.target.id;
|
1953
|
+
fromId = event.target.id.replace("-to-", "-from-");
|
1954
|
+
|
1955
|
+
max = document.getElementById(toId).value;
|
1956
|
+
min = document.getElementById(fromId).value;
|
1957
|
+
}
|
1958
|
+
|
1959
|
+
min = (min !== "") ? (+min) : min;
|
1960
|
+
max = (max !== "") ? (+max) : max;
|
1961
|
+
|
1962
|
+
if ((!isNaN(max) && !isNaN(min) && (max >= min)) || min === "" || max === "") {
|
1963
|
+
|
1964
|
+
if (oTable.fnSettings().oFeatures.bServerSide !== true) {
|
1965
|
+
oTable.fnDraw();
|
1966
|
+
} else {
|
1967
|
+
oTable.fnFilter(min + '-yadcf_delim-' + max, column_number);
|
1968
|
+
}
|
1969
|
+
if (document.getElementById(fromId).value !== "") {
|
1970
|
+
$("#" + fromId).addClass("inuse");
|
1971
|
+
}
|
1972
|
+
if (document.getElementById(toId).value !== "") {
|
1973
|
+
$("#" + toId).addClass("inuse");
|
1974
|
+
}
|
1975
|
+
|
1976
|
+
if ($.trim(event.target.value) === "" && $(event.target).hasClass("inuse")) {
|
1977
|
+
$("#" + event.target.id).removeClass("inuse");
|
1978
|
+
}
|
1979
|
+
if (!oTable.fnSettings().oLoadedState) {
|
1980
|
+
oTable.fnSettings().oLoadedState = {};
|
1981
|
+
oTable.fnSettings().oApi._fnSaveState(oTable.fnSettings());
|
1982
|
+
}
|
1983
|
+
if (oTable.fnSettings().oFeatures.bStateSave === true) {
|
1984
|
+
if (oTable.fnSettings().oLoadedState.yadcfState !== undefined && oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly] !== undefined) {
|
1985
|
+
oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number] =
|
1986
|
+
{
|
1987
|
+
'from' : min,
|
1988
|
+
'to' : max
|
1989
|
+
};
|
1990
|
+
} else {
|
1991
|
+
yadcfState = {};
|
1992
|
+
yadcfState[table_selector_jq_friendly] = [];
|
1993
|
+
yadcfState[table_selector_jq_friendly][column_number] = {
|
1994
|
+
'from' : min,
|
1995
|
+
'to' : max
|
1996
|
+
};
|
1997
|
+
oTable.fnSettings().oLoadedState.yadcfState = yadcfState;
|
1998
|
+
}
|
1999
|
+
oTable.fnSettings().oApi._fnSaveState(oTable.fnSettings());
|
2000
|
+
}
|
2001
|
+
}
|
2002
|
+
resetIApiIndex();
|
2003
|
+
};
|
2004
|
+
|
2005
|
+
if (options.filter_delay === undefined) {
|
2006
|
+
keyUp();
|
2007
|
+
} else {
|
2008
|
+
yadcfDelay(function () {
|
2009
|
+
keyUp();
|
2010
|
+
}, options.filter_delay);
|
2011
|
+
}
|
2012
|
+
}
|
2013
|
+
|
2014
|
+
function textKeyUP(table_selector_jq_friendly, event, clear) {
|
2015
|
+
|
2016
|
+
var column_number = parseInt($(event.target).attr("id").replace("yadcf-filter-" + table_selector_jq_friendly + "-", "").replace('-reset', ''), 10),
|
2017
|
+
oTable = oTables[table_selector_jq_friendly],
|
2018
|
+
options = getOptions(oTable.selector)[column_number],
|
2019
|
+
|
2020
|
+
keyUp = function (table_selector_jq_friendly, event, clear) {
|
2021
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
2022
|
+
|
2023
|
+
if (clear !== undefined || event.target.value === '') {
|
2024
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).val("").focus();
|
2025
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).removeClass("inuse");
|
2026
|
+
oTable.fnFilter("", column_number);
|
2027
|
+
resetIApiIndex();
|
2028
|
+
return;
|
2029
|
+
}
|
2030
|
+
|
2031
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).addClass("inuse");
|
2032
|
+
|
2033
|
+
yadcfMatchFilter(oTable, event.target.value, options.filter_match_mode, column_number);
|
2034
|
+
|
2035
|
+
resetIApiIndex();
|
2036
|
+
};
|
2037
|
+
|
2038
|
+
if (options.filter_delay === undefined) {
|
2039
|
+
keyUp(table_selector_jq_friendly, event, clear);
|
2040
|
+
} else {
|
2041
|
+
yadcfDelay(function () {
|
2042
|
+
keyUp(table_selector_jq_friendly, event, clear);
|
2043
|
+
}, options.filter_delay);
|
2044
|
+
}
|
2045
|
+
}
|
2046
|
+
|
2047
|
+
function autocompleteKeyUP(table_selector_jq_friendly, event) {
|
2048
|
+
if (event.target.value === "" && event.keyCode === 8 && $(event.target).hasClass("inuse")) {
|
2049
|
+
$.fn.dataTableExt.iApiIndex = oTablesIndex[table_selector_jq_friendly];
|
2050
|
+
var oTable = oTables[table_selector_jq_friendly],
|
2051
|
+
column_number = parseInt($(event.target).attr("id").replace("yadcf-filter-" + table_selector_jq_friendly + "-", ""), 10);
|
2052
|
+
|
2053
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).removeClass("inuse");
|
2054
|
+
$(document).removeData("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number + "_val");
|
2055
|
+
oTable.fnFilter("", column_number);
|
2056
|
+
resetIApiIndex();
|
2057
|
+
}
|
2058
|
+
}
|
2059
|
+
|
2060
|
+
//taken and modified from DataTables 1.10.0-beta.2 source
|
2061
|
+
function yadcfVersionCheck(version) {
|
2062
|
+
var aThis = $.fn.dataTable.ext.sVersion.split('.'),
|
2063
|
+
aThat = version.split('.'),
|
2064
|
+
iThis,
|
2065
|
+
iThat,
|
2066
|
+
i,
|
2067
|
+
iLen;
|
2068
|
+
|
2069
|
+
for (i = 0, iLen = aThat.length; i < iLen; i++) {
|
2070
|
+
iThis = parseInt(aThis[i], 10) || 0;
|
2071
|
+
iThat = parseInt(aThat[i], 10) || 0;
|
2072
|
+
|
2073
|
+
// Parts are the same, keep comparing
|
2074
|
+
if (iThis === iThat) {
|
2075
|
+
continue;
|
2076
|
+
}
|
2077
|
+
|
2078
|
+
// Parts are different, return immediately
|
2079
|
+
return iThis > iThat;
|
2080
|
+
}
|
2081
|
+
|
2082
|
+
return true;
|
2083
|
+
}
|
2084
|
+
|
2085
|
+
function initAndBindTable(oTable, table_selector, index) {
|
2086
|
+
|
2087
|
+
var table_selector_jq_friendly = yadcf.generateTableSelectorJQFriendly(table_selector),
|
2088
|
+
table_selector_tmp;
|
2089
|
+
oTables[table_selector_jq_friendly] = oTable;
|
2090
|
+
oTablesIndex[table_selector_jq_friendly] = index;
|
2091
|
+
|
2092
|
+
if (oTable.fnSettings().sAjaxSource === null && oTable.fnSettings().ajax === null) {
|
2093
|
+
table_selector_tmp = table_selector;
|
2094
|
+
if (table_selector.indexOf(":eq") !== -1) {
|
2095
|
+
table_selector_tmp = table_selector.substring(0, table_selector.lastIndexOf(":eq"));
|
2096
|
+
}
|
2097
|
+
appendFilters(oTable, yadcf.getOptions(table_selector_tmp), table_selector);
|
2098
|
+
} else {
|
2099
|
+
appendFilters(oTable, yadcf.getOptions(table_selector), table_selector);
|
2100
|
+
if (yadcfVersionCheck('1.10')) {
|
2101
|
+
$(document).off('draw.dt').on('draw.dt', oTable.selector, function (event, ui) {
|
2102
|
+
appendFilters(oTable, yadcf.getOptions(ui.oInstance.selector), ui.oInstance.selector);
|
2103
|
+
});
|
2104
|
+
$(document).off('xhr.dt').on('xhr.dt', function (e, settings, json) {
|
2105
|
+
var col_num;
|
2106
|
+
for (col_num in yadcf.getOptions(settings.oInstance.selector)) {
|
2107
|
+
if (yadcf.getOptions(settings.oInstance.selector).hasOwnProperty(col_num)) {
|
2108
|
+
if (json['yadcf_data_' + col_num] !== undefined) {
|
2109
|
+
yadcf.getOptions(settings.oInstance.selector)[col_num].data = json['yadcf_data_' + col_num];
|
2110
|
+
}
|
2111
|
+
}
|
2112
|
+
}
|
2113
|
+
});
|
2114
|
+
$(document).off('column-visibility.dt').on('column-visibility.dt', function (e, settings, col_num, state) {
|
2115
|
+
var obj = {};
|
2116
|
+
if (state === true) {
|
2117
|
+
obj[col_num] = yadcf.getOptions(settings.oInstance.selector)[col_num];
|
2118
|
+
appendFilters(oTables[yadcf.generateTableSelectorJQFriendly(settings.oInstance.selector)],
|
2119
|
+
obj,
|
2120
|
+
settings.oInstance.selector);
|
2121
|
+
}
|
2122
|
+
});
|
2123
|
+
} else {
|
2124
|
+
$(document).off('draw').on('draw', oTable.selector, function (event, ui) {
|
2125
|
+
appendFilters(oTable, yadcf.getOptions(ui.oInstance.selector), ui.oInstance.selector);
|
2126
|
+
});
|
2127
|
+
}
|
2128
|
+
}
|
2129
|
+
if (oTable.fnSettings().oFeatures.bStateSave === true) {
|
2130
|
+
if (yadcfVersionCheck('1.10')) {
|
2131
|
+
$(oTable.selector).off('stateSaveParams.dt').on('stateSaveParams.dt', function (e, settings, data) {
|
2132
|
+
if (settings.oLoadedState && settings.oLoadedState.yadcfState !== undefined) {
|
2133
|
+
data.yadcfState = settings.oLoadedState.yadcfState;
|
2134
|
+
} else {
|
2135
|
+
data.naruto = 'kurama';
|
2136
|
+
}
|
2137
|
+
});
|
2138
|
+
} else {
|
2139
|
+
$(oTable.selector).off('stateSaveParams').on('stateSaveParams', function (e, settings, data) {
|
2140
|
+
if (settings.oLoadedState && settings.oLoadedState.yadcfState !== undefined) {
|
2141
|
+
data.yadcfState = settings.oLoadedState.yadcfState;
|
2142
|
+
} else {
|
2143
|
+
data.naruto = 'kurama';
|
2144
|
+
}
|
2145
|
+
});
|
2146
|
+
}
|
2147
|
+
//when using DOM source
|
2148
|
+
if (oTable.fnSettings().sAjaxSource === null && oTable.fnSettings().ajax === null) {
|
2149
|
+
//we need to make sure that the yadcf state will be saved after page reload
|
2150
|
+
oTable.fnSettings().oApi._fnSaveState(oTable.fnSettings());
|
2151
|
+
//redraw the table in order to apply the filters
|
2152
|
+
oTable.fnDraw();
|
2153
|
+
}
|
2154
|
+
}
|
2155
|
+
}
|
2156
|
+
|
2157
|
+
$.fn.yadcf = function (options_arg) {
|
2158
|
+
|
2159
|
+
if ($(this.selector).length === 1) {
|
2160
|
+
setOptions(this.selector, options_arg);
|
2161
|
+
initAndBindTable(this, this.selector, 0);
|
2162
|
+
} else {
|
2163
|
+
var i = 0,
|
2164
|
+
selector;
|
2165
|
+
for (i; i < $(this.selector).length; i++) {
|
2166
|
+
$.fn.dataTableExt.iApiIndex = i;
|
2167
|
+
selector = this.selector + ":eq(" + i + ")";
|
2168
|
+
setOptions(this.selector, options_arg);
|
2169
|
+
initAndBindTable(this, selector, i);
|
2170
|
+
}
|
2171
|
+
$.fn.dataTableExt.iApiIndex = 0;
|
2172
|
+
}
|
2173
|
+
return this;
|
2174
|
+
};
|
2175
|
+
|
2176
|
+
function init(oTable, options_arg) {
|
2177
|
+
var instance = oTable.settings()[0].oInstance,
|
2178
|
+
i = 0,
|
2179
|
+
selector;
|
2180
|
+
if ($(instance.selector).length === 1) {
|
2181
|
+
setOptions(instance.selector, options_arg);
|
2182
|
+
initAndBindTable(instance, instance.selector, 0);
|
2183
|
+
} else {
|
2184
|
+
for (i; i < $(instance.selector).length; i++) {
|
2185
|
+
$.fn.dataTableExt.iApiIndex = i;
|
2186
|
+
selector = instance.selector + ":eq(" + i + ")";
|
2187
|
+
setOptions(instance.selector, options_arg);
|
2188
|
+
initAndBindTable(instance, selector, i);
|
2189
|
+
}
|
2190
|
+
$.fn.dataTableExt.iApiIndex = 0;
|
2191
|
+
}
|
2192
|
+
}
|
2193
|
+
|
2194
|
+
function stopPropagation(evt) {
|
2195
|
+
if (evt.stopPropagation !== undefined) {
|
2196
|
+
evt.stopPropagation();
|
2197
|
+
} else {
|
2198
|
+
evt.cancelBubble = true;
|
2199
|
+
}
|
2200
|
+
}
|
2201
|
+
|
2202
|
+
//--------------------------------------------------------
|
2203
|
+
function exInternalFilterColumnAJAXQueue(table_arg, col_filter_arr) {
|
2204
|
+
return function () {
|
2205
|
+
exFilterColumn(table_arg, col_filter_arr, true);
|
2206
|
+
};
|
2207
|
+
}
|
2208
|
+
|
2209
|
+
function exFilterColumn(table_arg, col_filter_arr, ajaxSource) {
|
2210
|
+
var table_selector_jq_friendly,
|
2211
|
+
j,
|
2212
|
+
tmpStr,
|
2213
|
+
column_number,
|
2214
|
+
filter_value,
|
2215
|
+
fromId,
|
2216
|
+
toId,
|
2217
|
+
sliderId,
|
2218
|
+
optionsObj;
|
2219
|
+
//check if the table arg is from new datatables API (capital "D")
|
2220
|
+
if (table_arg.settings !== undefined) {
|
2221
|
+
table_arg = table_arg.settings()[0].oInstance;
|
2222
|
+
}
|
2223
|
+
table_selector_jq_friendly = yadcf.generateTableSelectorJQFriendly(table_arg.selector);
|
2224
|
+
if ((table_arg.fnSettings().sAjaxSource === null && table_arg.fnSettings().ajax === null) || ajaxSource === true) {
|
2225
|
+
for (j = 0; j < col_filter_arr.length; j++) {
|
2226
|
+
column_number = col_filter_arr[j][0];
|
2227
|
+
optionsObj = getOptions(table_arg.selector)[column_number];
|
2228
|
+
filter_value = col_filter_arr[j][1];
|
2229
|
+
|
2230
|
+
switch (optionsObj.filter_type) {
|
2231
|
+
case 'select':
|
2232
|
+
case 'auto_complete':
|
2233
|
+
case 'text':
|
2234
|
+
case 'date':
|
2235
|
+
$('#yadcf-filter-' + table_selector_jq_friendly + '-' + column_number).val(filter_value).addClass('inuse');
|
2236
|
+
tmpStr = yadcfMatchFilterString(table_arg, column_number, filter_value, optionsObj.filter_match_mode, false);
|
2237
|
+
table_arg.fnSettings().aoPreSearchCols[column_number].sSearch = tmpStr;
|
2238
|
+
break;
|
2239
|
+
case 'multi_select':
|
2240
|
+
$('#yadcf-filter-' + table_selector_jq_friendly + '-' + column_number).val(filter_value);
|
2241
|
+
tmpStr = yadcfMatchFilterString(table_arg, column_number, filter_value, optionsObj.filter_match_mode, true);
|
2242
|
+
table_arg.fnSettings().aoPreSearchCols[column_number].sSearch = tmpStr;
|
2243
|
+
if (optionsObj.select_type !== undefined) {
|
2244
|
+
if (optionsObj.select_type === 'chosen') {
|
2245
|
+
$('#yadcf-filter-' + table_selector_jq_friendly + '-' + column_number).trigger('chosen:updated');
|
2246
|
+
} else if (optionsObj.select_type === 'select2') {
|
2247
|
+
$("#yadcf-filter-" + table_selector_jq_friendly + "-" + column_number).select2("destroy").select2(optionsObj.select_type_options);
|
2248
|
+
}
|
2249
|
+
}
|
2250
|
+
break;
|
2251
|
+
case 'range_date':
|
2252
|
+
fromId = 'yadcf-filter-' + table_selector_jq_friendly + '-from-date-' + column_number;
|
2253
|
+
toId = 'yadcf-filter-' + table_selector_jq_friendly + '-to-date-' + column_number;
|
2254
|
+
if (filter_value.from !== '') {
|
2255
|
+
$('#' + fromId).val(filter_value.from);
|
2256
|
+
$('#' + fromId).addClass('inuse');
|
2257
|
+
}
|
2258
|
+
if (filter_value.to !== '') {
|
2259
|
+
$('#' + toId).val(filter_value.to);
|
2260
|
+
$('#' + toId).addClass('inuse');
|
2261
|
+
}
|
2262
|
+
break;
|
2263
|
+
case 'range_number':
|
2264
|
+
fromId = 'yadcf-filter-' + table_selector_jq_friendly + '-from-' + column_number;
|
2265
|
+
toId = 'yadcf-filter-' + table_selector_jq_friendly + '-to-' + column_number;
|
2266
|
+
if (filter_value.from !== '') {
|
2267
|
+
$('#' + fromId).val(filter_value.from);
|
2268
|
+
$('#' + fromId).addClass('inuse');
|
2269
|
+
}
|
2270
|
+
if (filter_value.to !== '') {
|
2271
|
+
$('#' + toId).val(filter_value.to);
|
2272
|
+
$('#' + toId).addClass('inuse');
|
2273
|
+
}
|
2274
|
+
break;
|
2275
|
+
case 'range_number_slider':
|
2276
|
+
sliderId = 'yadcf-filter-' + table_selector_jq_friendly + '-slider-' + column_number;
|
2277
|
+
fromId = 'yadcf-filter-' + table_selector_jq_friendly + '-min_tip-' + column_number;
|
2278
|
+
toId = 'yadcf-filter-' + table_selector_jq_friendly + '-max_tip-' + column_number;
|
2279
|
+
if (filter_value.from !== '') {
|
2280
|
+
$('#' + fromId).text(filter_value.from);
|
2281
|
+
$('#' + fromId).parent().addClass('inuse');
|
2282
|
+
$('#' + fromId).parent().parent().find('ui-slider-range').addClass('inuse');
|
2283
|
+
$('#' + sliderId).slider('values', 0, filter_value.from);
|
2284
|
+
}
|
2285
|
+
if (filter_value.to !== '') {
|
2286
|
+
$('#' + toId).text(filter_value.to);
|
2287
|
+
$('#' + toId).parent().addClass('inuse');
|
2288
|
+
$('#' + toId).parent().parent().find('.ui-slider-range').addClass('inuse');
|
2289
|
+
$('#' + sliderId).slider('values', 1, filter_value.to);
|
2290
|
+
}
|
2291
|
+
break;
|
2292
|
+
}
|
2293
|
+
|
2294
|
+
}
|
2295
|
+
if (table_arg.fnSettings().oFeatures.bServerSide !== true) {
|
2296
|
+
table_arg.fnDraw();
|
2297
|
+
} else {
|
2298
|
+
switch (optionsObj.filter_type) {
|
2299
|
+
case 'select':
|
2300
|
+
case 'auto_complete':
|
2301
|
+
case 'text':
|
2302
|
+
case 'date':
|
2303
|
+
setTimeout(function () {
|
2304
|
+
table_arg.fnFilter(filter_value, column_number);
|
2305
|
+
}, 10);
|
2306
|
+
break;
|
2307
|
+
default:
|
2308
|
+
console.log('exFilterColumn is not supported for ' + optionsObj.filter_type);
|
2309
|
+
break;
|
2310
|
+
}
|
2311
|
+
}
|
2312
|
+
} else {
|
2313
|
+
exFilterColumnQueue.push(exInternalFilterColumnAJAXQueue(table_arg, col_filter_arr));
|
2314
|
+
}
|
2315
|
+
}
|
2316
|
+
|
2317
|
+
function exGetColumnFilterVal(table_arg, column_number) {
|
2318
|
+
var retVal,
|
2319
|
+
fromId,
|
2320
|
+
toId,
|
2321
|
+
table_selector_jq_friendly,
|
2322
|
+
optionsObj = getOptions(table_arg.selector)[column_number];
|
2323
|
+
|
2324
|
+
table_selector_jq_friendly = yadcf.generateTableSelectorJQFriendly(table_arg.selector);
|
2325
|
+
|
2326
|
+
switch (optionsObj.filter_type) {
|
2327
|
+
case 'select':
|
2328
|
+
retVal = $('#yadcf-filter-' + table_selector_jq_friendly + '-' + column_number).val();
|
2329
|
+
if (retVal === '-1') {
|
2330
|
+
retVal = '';
|
2331
|
+
}
|
2332
|
+
break;
|
2333
|
+
case 'auto_complete':
|
2334
|
+
case 'text':
|
2335
|
+
case 'date':
|
2336
|
+
retVal = $('#yadcf-filter-' + table_selector_jq_friendly + '-' + column_number).val();
|
2337
|
+
break;
|
2338
|
+
case 'multi_select':
|
2339
|
+
retVal = $('#yadcf-filter-' + table_selector_jq_friendly + '-' + column_number).val();
|
2340
|
+
if (retVal === null) {
|
2341
|
+
retVal = '';
|
2342
|
+
}
|
2343
|
+
break;
|
2344
|
+
case 'range_date':
|
2345
|
+
retVal = {};
|
2346
|
+
fromId = 'yadcf-filter-' + table_selector_jq_friendly + '-from-date-' + column_number;
|
2347
|
+
toId = 'yadcf-filter-' + table_selector_jq_friendly + '-to-date-' + column_number;
|
2348
|
+
|
2349
|
+
retVal.from = $('#' + fromId).val();
|
2350
|
+
retVal.to = $('#' + toId).val();
|
2351
|
+
break;
|
2352
|
+
case 'range_number':
|
2353
|
+
retVal = {};
|
2354
|
+
fromId = 'yadcf-filter-' + table_selector_jq_friendly + '-from-' + column_number;
|
2355
|
+
toId = 'yadcf-filter-' + table_selector_jq_friendly + '-to-' + column_number;
|
2356
|
+
|
2357
|
+
retVal.from = $('#' + fromId).val();
|
2358
|
+
retVal.to = $('#' + toId).val();
|
2359
|
+
break;
|
2360
|
+
case 'range_number_slider':
|
2361
|
+
retVal = {};
|
2362
|
+
fromId = 'yadcf-filter-' + table_selector_jq_friendly + '-min_tip-' + column_number;
|
2363
|
+
toId = 'yadcf-filter-' + table_selector_jq_friendly + '-max_tip-' + column_number;
|
2364
|
+
|
2365
|
+
retVal.from = $('#' + fromId).text();
|
2366
|
+
retVal.to = $('#' + toId).text();
|
2367
|
+
break;
|
2368
|
+
}
|
2369
|
+
return retVal;
|
2370
|
+
}
|
2371
|
+
return {
|
2372
|
+
init : init,
|
2373
|
+
doFilter : doFilter,
|
2374
|
+
doFilterMultiSelect : doFilterMultiSelect,
|
2375
|
+
doFilterAutocomplete : doFilterAutocomplete,
|
2376
|
+
autocompleteKeyUP : autocompleteKeyUP,
|
2377
|
+
getOptions : getOptions,
|
2378
|
+
rangeNumberKeyUP : rangeNumberKeyUP,
|
2379
|
+
rangeDateKeyUP : rangeDateKeyUP,
|
2380
|
+
rangeClear : rangeClear,
|
2381
|
+
rangeNumberSliderClear : rangeNumberSliderClear,
|
2382
|
+
stopPropagation : stopPropagation,
|
2383
|
+
generateTableSelectorJQFriendly : generateTableSelectorJQFriendly,
|
2384
|
+
exFilterColumn : exFilterColumn,
|
2385
|
+
exGetColumnFilterVal : exGetColumnFilterVal,
|
2386
|
+
dateKeyUP : dateKeyUP,
|
2387
|
+
dateSelectSingle : dateSelectSingle,
|
2388
|
+
textKeyUP : textKeyUP,
|
2389
|
+
doFilterCustomDateFunc : doFilterCustomDateFunc
|
2390
|
+
};
|
2391
|
+
|
2392
|
+
}(jQuery));
|
2393
|
+
|
2394
|
+
|
2395
|
+
/*!
|
2396
|
+
TableTools 2.2.3
|
2397
|
+
2009-2014 SpryMedia Ltd - datatables.net/license
|
2398
|
+
|
2399
|
+
ZeroClipboard 1.0.4
|
2400
|
+
Author: Joseph Huckaby - MIT licensed
|
2401
|
+
*/
|
2402
|
+
var TableTools;
|
2403
|
+
(function(n,k,q){var p=function(m,p){var g={version:"1.0.4-TableTools2",clients:{},moviePath:"",nextId:1,$:function(a){"string"==typeof a&&(a=k.getElementById(a));a.addClass||(a.hide=function(){this.style.display="none"},a.show=function(){this.style.display=""},a.addClass=function(a){this.removeClass(a);this.className+=" "+a},a.removeClass=function(a){this.className=this.className.replace(RegExp("\\s*"+a+"\\s*")," ").replace(/^\s+/,"").replace(/\s+$/,"")},a.hasClass=function(a){return!!this.className.match(RegExp("\\s*"+a+
|
2404
|
+
"\\s*"))});return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(a,b,c){(a=this.clients[a])&&a.receiveEvent(b,c)},register:function(a,b){this.clients[a]=b},getDOMObjectPosition:function(a){var b={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};""!==a.style.width&&(b.width=a.style.width.replace("px",""));""!==a.style.height&&(b.height=a.style.height.replace("px",""));for(;a;)b.left+=a.offsetLeft,b.top+=a.offsetTop,a=a.offsetParent;return b},
|
2405
|
+
Client:function(a){this.handlers={};this.id=g.nextId++;this.movieId="ZeroClipboard_TableToolsMovie_"+this.id;g.register(this.id,this);a&&this.glue(a)}};g.Client.prototype={id:0,ready:!1,movie:null,clipText:"",fileName:"",action:"copy",handCursorEnabled:!0,cssEffects:!0,handlers:null,sized:!1,glue:function(a,b){this.domElement=g.$(a);var c=99;this.domElement.style.zIndex&&(c=parseInt(this.domElement.style.zIndex,10)+1);var d=g.getDOMObjectPosition(this.domElement);this.div=k.createElement("div");var f=
|
2406
|
+
this.div.style;f.position="absolute";f.left="0px";f.top="0px";f.width=d.width+"px";f.height=d.height+"px";f.zIndex=c;"undefined"!=typeof b&&""!==b&&(this.div.title=b);0!==d.width&&0!==d.height&&(this.sized=!0);this.domElement&&(this.domElement.appendChild(this.div),this.div.innerHTML=this.getHTML(d.width,d.height).replace(/&/g,"&"))},positionElement:function(){var a=g.getDOMObjectPosition(this.domElement),b=this.div.style;b.position="absolute";b.width=a.width+"px";b.height=a.height+"px";0!==a.width&&
|
2407
|
+
0!==a.height&&(this.sized=!0,b=this.div.childNodes[0],b.width=a.width,b.height=a.height)},getHTML:function(a,b){var c="",d="id="+this.id+"&width="+a+"&height="+b;if(navigator.userAgent.match(/MSIE/))var f=location.href.match(/^https/i)?"https://":"http://",c=c+('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+f+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+a+'" height="'+b+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+
|
2408
|
+
g.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+d+'"/><param name="wmode" value="transparent"/></object>');else c+='<embed id="'+this.movieId+'" src="'+g.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+a+'" height="'+b+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+
|
2409
|
+
d+'" wmode="transparent" />';return c},hide:function(){this.div&&(this.div.style.left="-2000px")},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=k.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.div=this.domElement=null}},reposition:function(a){a&&((this.domElement=g.$(a))||this.hide());if(this.domElement&&this.div){var a=g.getDOMObjectPosition(this.domElement),b=this.div.style;b.left=""+a.left+
|
2410
|
+
"px";b.top=""+a.top+"px"}},clearText:function(){this.clipText="";this.ready&&this.movie.clearText()},appendText:function(a){this.clipText+=a;this.ready&&this.movie.appendText(a)},setText:function(a){this.clipText=a;this.ready&&this.movie.setText(a)},setCharSet:function(a){this.charSet=a;this.ready&&this.movie.setCharSet(a)},setBomInc:function(a){this.incBom=a;this.ready&&this.movie.setBomInc(a)},setFileName:function(a){this.fileName=a;this.ready&&this.movie.setFileName(a)},setAction:function(a){this.action=
|
2411
|
+
a;this.ready&&this.movie.setAction(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");this.handlers[a]||(this.handlers[a]=[]);this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(a,b){var c,a=a.toString().toLowerCase().replace(/^on/,"");switch(a){case "load":this.movie=k.getElementById(this.movieId);if(!this.movie){c=this;setTimeout(function(){c.receiveEvent("load",
|
2412
|
+
null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){c=this;setTimeout(function(){c.receiveEvent("load",null)},100);this.ready=!0;return}this.ready=!0;this.movie.clearText();this.movie.appendText(this.clipText);this.movie.setFileName(this.fileName);this.movie.setAction(this.action);this.movie.setCharSet(this.charSet);this.movie.setBomInc(this.incBom);this.movie.setHandCursor(this.handCursorEnabled);break;case "mouseover":this.domElement&&this.cssEffects&&
|
2413
|
+
this.recoverActive&&this.domElement.addClass("active");break;case "mouseout":this.domElement&&this.cssEffects&&(this.recoverActive=!1,this.domElement.hasClass("active")&&(this.domElement.removeClass("active"),this.recoverActive=!0));break;case "mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case "mouseup":this.domElement&&this.cssEffects&&(this.domElement.removeClass("active"),this.recoverActive=!1)}if(this.handlers[a])for(var d=0,f=this.handlers[a].length;d<
|
2414
|
+
f;d++){var e=this.handlers[a][d];if("function"==typeof e)e(this,b);else if("object"==typeof e&&2==e.length)e[0][e[1]](this,b);else if("string"==typeof e)n[e](this,b)}}};n.ZeroClipboard_TableTools=g;var e=jQuery;TableTools=function(a,b){!this instanceof TableTools&&alert("Warning: TableTools must be initialised with the keyword 'new'");this.s={that:this,dt:e.fn.dataTable.Api?(new e.fn.dataTable.Api(a)).settings()[0]:a.fnSettings(),print:{saveStart:-1,saveLength:-1,saveScroll:-1,funcEnd:function(){}},
|
2415
|
+
buttonCounter:0,select:{type:"",selected:[],preRowSelect:null,postSelected:null,postDeselected:null,all:!1,selectedClass:""},custom:{},swfPath:"",buttonSet:[],master:!1,tags:{}};this.dom={container:null,table:null,print:{hidden:[],message:null},collection:{collection:null,background:null}};this.classes=e.extend(!0,{},TableTools.classes);this.s.dt.bJUI&&e.extend(!0,this.classes,TableTools.classes_themeroller);this.fnSettings=function(){return this.s};"undefined"==typeof b&&(b={});TableTools._aInstances.push(this);
|
2416
|
+
this._fnConstruct(b);return this};TableTools.prototype={fnGetSelected:function(a){var b=[],c=this.s.dt.aoData,d=this.s.dt.aiDisplay,f;if(a){a=0;for(f=d.length;a<f;a++)c[d[a]]._DTTT_selected&&b.push(c[d[a]].nTr)}else{a=0;for(f=c.length;a<f;a++)c[a]._DTTT_selected&&b.push(c[a].nTr)}return b},fnGetSelectedData:function(){var a=[],b=this.s.dt.aoData,c,d;c=0;for(d=b.length;c<d;c++)b[c]._DTTT_selected&&a.push(this.s.dt.oInstance.fnGetData(c));return a},fnGetSelectedIndexes:function(a){var b=[],c=this.s.dt.aoData,
|
2417
|
+
d=this.s.dt.aiDisplay,f;if(a){a=0;for(f=d.length;a<f;a++)c[d[a]]._DTTT_selected&&b.push(d[a])}else{a=0;for(f=c.length;a<f;a++)c[a]._DTTT_selected&&b.push(a)}return b},fnIsSelected:function(a){a=this.s.dt.oInstance.fnGetPosition(a);return!0===this.s.dt.aoData[a]._DTTT_selected?!0:!1},fnSelectAll:function(a){this._fnRowSelect(a?this.s.dt.aiDisplay:this.s.dt.aoData)},fnSelectNone:function(a){this._fnRowDeselect(this.fnGetSelectedIndexes(a))},fnSelect:function(a){"single"==this.s.select.type&&this.fnSelectNone();
|
2418
|
+
this._fnRowSelect(a)},fnDeselect:function(a){this._fnRowDeselect(a)},fnGetTitle:function(a){var b="";"undefined"!=typeof a.sTitle&&""!==a.sTitle?b=a.sTitle:(a=k.getElementsByTagName("title"),0<a.length&&(b=a[0].innerHTML));return 4>"¡".toString().length?b.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""):b.replace(/[^a-zA-Z0-9_\.,\-_ !\(\)]/g,"")},fnCalcColRatios:function(a){var b=this.s.dt.aoColumns,a=this._fnColumnTargets(a.mColumns),c=[],d=0,f=0,e,i;e=0;for(i=a.length;e<i;e++)a[e]&&(d=b[e].nTh.offsetWidth,
|
2419
|
+
f+=d,c.push(d));e=0;for(i=c.length;e<i;e++)c[e]/=f;return c.join("\t")},fnGetTableData:function(a){if(this.s.dt)return this._fnGetDataTablesData(a)},fnSetText:function(a,b){this._fnFlashSetText(a,b)},fnResizeButtons:function(){for(var a in g.clients)if(a){var b=g.clients[a];"undefined"!=typeof b.domElement&&b.domElement.parentNode&&b.positionElement()}},fnResizeRequired:function(){for(var a in g.clients)if(a){var b=g.clients[a];if("undefined"!=typeof b.domElement&&b.domElement.parentNode==this.dom.container&&
|
2420
|
+
!1===b.sized)return!0}return!1},fnPrint:function(a,b){b===q&&(b={});a===q||a?this._fnPrintStart(b):this._fnPrintEnd()},fnInfo:function(a,b){var c=e("<div/>").addClass(this.classes.print.info).html(a).appendTo("body");setTimeout(function(){c.fadeOut("normal",function(){c.remove()})},b)},fnContainer:function(){return this.dom.container},_fnConstruct:function(a){var b=this;this._fnCustomiseSettings(a);this.dom.container=k.createElement(this.s.tags.container);this.dom.container.className=this.classes.container;
|
2421
|
+
"none"!=this.s.select.type&&this._fnRowSelectConfig();this._fnButtonDefinations(this.s.buttonSet,this.dom.container);this.s.dt.aoDestroyCallback.push({sName:"TableTools",fn:function(){e(b.s.dt.nTBody).off("click.DTTT_Select","tr");e(b.dom.container).empty();var a=e.inArray(b,TableTools._aInstances);-1!==a&&TableTools._aInstances.splice(a,1)}})},_fnCustomiseSettings:function(a){"undefined"==typeof this.s.dt._TableToolsInit&&(this.s.master=!0,this.s.dt._TableToolsInit=!0);this.dom.table=this.s.dt.nTable;
|
2422
|
+
this.s.custom=e.extend({},TableTools.DEFAULTS,a);this.s.swfPath=this.s.custom.sSwfPath;"undefined"!=typeof g&&(g.moviePath=this.s.swfPath);this.s.select.type=this.s.custom.sRowSelect;this.s.select.preRowSelect=this.s.custom.fnPreRowSelect;this.s.select.postSelected=this.s.custom.fnRowSelected;this.s.select.postDeselected=this.s.custom.fnRowDeselected;this.s.custom.sSelectedClass&&(this.classes.select.row=this.s.custom.sSelectedClass);this.s.tags=this.s.custom.oTags;this.s.buttonSet=this.s.custom.aButtons},
|
2423
|
+
_fnButtonDefinations:function(a,b){for(var c,d=0,f=a.length;d<f;d++){if("string"==typeof a[d]){if("undefined"==typeof TableTools.BUTTONS[a[d]]){alert("TableTools: Warning - unknown button type: "+a[d]);continue}c=e.extend({},TableTools.BUTTONS[a[d]],!0)}else{if("undefined"==typeof TableTools.BUTTONS[a[d].sExtends]){alert("TableTools: Warning - unknown button type: "+a[d].sExtends);continue}c=e.extend({},TableTools.BUTTONS[a[d].sExtends],!0);c=e.extend(c,a[d],!0)}(c=this._fnCreateButton(c,e(b).hasClass(this.classes.collection.container)))&&
|
2424
|
+
b.appendChild(c)}},_fnCreateButton:function(a,b){var c=this._fnButtonBase(a,b);if(a.sAction.match(/flash/)){if(!this._fnHasFlash())return!1;this._fnFlashConfig(c,a)}else"text"==a.sAction?this._fnTextConfig(c,a):"div"==a.sAction?this._fnTextConfig(c,a):"collection"==a.sAction&&(this._fnTextConfig(c,a),this._fnCollectionConfig(c,a));if(-1!==this.s.dt.iTabIndex)e(c).attr("tabindex",this.s.dt.iTabIndex).attr("aria-controls",this.s.dt.sTableId).on("keyup.DTTT",function(a){13===a.keyCode&&(a.stopPropagation(),
|
2425
|
+
e(this).trigger("click"))}).on("mousedown.DTTT",function(b){a.sAction.match(/flash/)||b.preventDefault()});return c},_fnButtonBase:function(a,b){var c,d,f;b?(c=a.sTag&&"default"!==a.sTag?a.sTag:this.s.tags.collection.button,d=a.sLinerTag&&"default"!==a.sLinerTag?a.sLiner:this.s.tags.collection.liner,f=this.classes.collection.buttons.normal):(c=a.sTag&&"default"!==a.sTag?a.sTag:this.s.tags.button,d=a.sLinerTag&&"default"!==a.sLinerTag?a.sLiner:this.s.tags.liner,f=this.classes.buttons.normal);c=k.createElement(c);
|
2426
|
+
d=k.createElement(d);var e=this._fnGetMasterSettings();c.className=f+" "+a.sButtonClass;c.setAttribute("id","ToolTables_"+this.s.dt.sInstance+"_"+e.buttonCounter);c.appendChild(d);d.innerHTML=a.sButtonText;e.buttonCounter++;return c},_fnGetMasterSettings:function(){if(this.s.master)return this.s;for(var a=TableTools._aInstances,b=0,c=a.length;b<c;b++)if(this.dom.table==a[b].s.dt.nTable)return a[b].s},_fnCollectionConfig:function(a,b){var c=k.createElement(this.s.tags.collection.container);c.style.display=
|
2427
|
+
"none";c.className=this.classes.collection.container;b._collection=c;k.body.appendChild(c);this._fnButtonDefinations(b.aButtons,c)},_fnCollectionShow:function(a,b){var c=this,d=e(a).offset(),f=b._collection,j=d.left,d=d.top+e(a).outerHeight(),i=e(n).height(),h=e(k).height(),o=e(n).width(),g=e(k).width();f.style.position="absolute";f.style.left=j+"px";f.style.top=d+"px";f.style.display="block";e(f).css("opacity",0);var l=k.createElement("div");l.style.position="absolute";l.style.left="0px";l.style.top=
|
2428
|
+
"0px";l.style.height=(i>h?i:h)+"px";l.style.width=(o>g?o:g)+"px";l.className=this.classes.collection.background;e(l).css("opacity",0);k.body.appendChild(l);k.body.appendChild(f);i=e(f).outerWidth();o=e(f).outerHeight();j+i>g&&(f.style.left=g-i+"px");d+o>h&&(f.style.top=d-o-e(a).outerHeight()+"px");this.dom.collection.collection=f;this.dom.collection.background=l;setTimeout(function(){e(f).animate({opacity:1},500);e(l).animate({opacity:0.25},500)},10);this.fnResizeButtons();e(l).click(function(){c._fnCollectionHide.call(c,
|
2429
|
+
null,null)})},_fnCollectionHide:function(a,b){!(null!==b&&"collection"==b.sExtends)&&null!==this.dom.collection.collection&&(e(this.dom.collection.collection).animate({opacity:0},500,function(){this.style.display="none"}),e(this.dom.collection.background).animate({opacity:0},500,function(){this.parentNode.removeChild(this)}),this.dom.collection.collection=null,this.dom.collection.background=null)},_fnRowSelectConfig:function(){if(this.s.master){var a=this,b=this.s.dt;e(b.nTable).addClass(this.classes.select.table);
|
2430
|
+
"os"===this.s.select.type&&(e(b.nTBody).on("mousedown.DTTT_Select","tr",function(a){if(a.shiftKey)e(b.nTBody).css("-moz-user-select","none").one("selectstart.DTTT_Select","tr",function(){return!1})}),e(b.nTBody).on("mouseup.DTTT_Select","tr",function(){e(b.nTBody).css("-moz-user-select","")}));e(b.nTBody).on("click.DTTT_Select",this.s.custom.sRowSelector,function(c){var d=this.nodeName.toLowerCase()==="tr"?this:e(this).parents("tr")[0],f=a.s.select,j=a.s.dt.oInstance.fnGetPosition(d);if(d.parentNode==
|
2431
|
+
b.nTBody&&b.oInstance.fnGetData(d)!==null){if(f.type=="os")if(c.ctrlKey||c.metaKey)a.fnIsSelected(d)?a._fnRowDeselect(d,c):a._fnRowSelect(d,c);else if(c.shiftKey){var i=a.s.dt.aiDisplay.slice(),h=e.inArray(f.lastRow,i),o=e.inArray(j,i);if(a.fnGetSelected().length===0||h===-1)i.splice(e.inArray(j,i)+1,i.length);else{if(h>o)var g=o,o=h,h=g;i.splice(o+1,i.length);i.splice(0,h)}if(a.fnIsSelected(d)){i.splice(e.inArray(j,i),1);a._fnRowDeselect(i,c)}else a._fnRowSelect(i,c)}else if(a.fnIsSelected(d)&&a.fnGetSelected().length===
|
2432
|
+
1)a._fnRowDeselect(d,c);else{a.fnSelectNone();a._fnRowSelect(d,c)}else if(a.fnIsSelected(d))a._fnRowDeselect(d,c);else if(f.type=="single"){a.fnSelectNone();a._fnRowSelect(d,c)}else f.type=="multi"&&a._fnRowSelect(d,c);f.lastRow=j}});b.oApi._fnCallbackReg(b,"aoRowCreatedCallback",function(c,d,f){b.aoData[f]._DTTT_selected&&e(c).addClass(a.classes.select.row)},"TableTools-SelectAll")}},_fnRowSelect:function(a,b){var c=this._fnSelectData(a),d=[],f,j;f=0;for(j=c.length;f<j;f++)c[f].nTr&&d.push(c[f].nTr);
|
2433
|
+
if(null===this.s.select.preRowSelect||this.s.select.preRowSelect.call(this,b,d,!0)){f=0;for(j=c.length;f<j;f++)c[f]._DTTT_selected=!0,c[f].nTr&&e(c[f].nTr).addClass(this.classes.select.row);null!==this.s.select.postSelected&&this.s.select.postSelected.call(this,d);TableTools._fnEventDispatch(this,"select",d,!0)}},_fnRowDeselect:function(a,b){var c=this._fnSelectData(a),d=[],f,j;f=0;for(j=c.length;f<j;f++)c[f].nTr&&d.push(c[f].nTr);if(null===this.s.select.preRowSelect||this.s.select.preRowSelect.call(this,
|
2434
|
+
b,d,!1)){f=0;for(j=c.length;f<j;f++)c[f]._DTTT_selected=!1,c[f].nTr&&e(c[f].nTr).removeClass(this.classes.select.row);null!==this.s.select.postDeselected&&this.s.select.postDeselected.call(this,d);TableTools._fnEventDispatch(this,"select",d,!1)}},_fnSelectData:function(a){var b=[],c,d,f;if(a.nodeName)c=this.s.dt.oInstance.fnGetPosition(a),b.push(this.s.dt.aoData[c]);else if("undefined"!==typeof a.length){d=0;for(f=a.length;d<f;d++)a[d].nodeName?(c=this.s.dt.oInstance.fnGetPosition(a[d]),b.push(this.s.dt.aoData[c])):
|
2435
|
+
"number"===typeof a[d]?b.push(this.s.dt.aoData[a[d]]):b.push(a[d])}else b.push(a);return b},_fnTextConfig:function(a,b){var c=this;null!==b.fnInit&&b.fnInit.call(this,a,b);""!==b.sToolTip&&(a.title=b.sToolTip);e(a).hover(function(){b.fnMouseover!==null&&b.fnMouseover.call(this,a,b,null)},function(){b.fnMouseout!==null&&b.fnMouseout.call(this,a,b,null)});null!==b.fnSelect&&TableTools._fnEventListen(this,"select",function(d){b.fnSelect.call(c,a,b,d)});e(a).click(function(d){b.fnClick!==null&&b.fnClick.call(c,
|
2436
|
+
a,b,null,d);b.fnComplete!==null&&b.fnComplete.call(c,a,b,null,null);c._fnCollectionHide(a,b)})},_fnHasFlash:function(){try{if(new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return!0}catch(a){if(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]!==q&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)return!0}return!1},_fnFlashConfig:function(a,b){var c=this,d=new g.Client;null!==b.fnInit&&b.fnInit.call(this,a,b);d.setHandCursor(!0);"flash_save"==b.sAction?
|
2437
|
+
(d.setAction("save"),d.setCharSet("utf16le"==b.sCharSet?"UTF16LE":"UTF8"),d.setBomInc(b.bBomInc),d.setFileName(b.sFileName.replace("*",this.fnGetTitle(b)))):"flash_pdf"==b.sAction?(d.setAction("pdf"),d.setFileName(b.sFileName.replace("*",this.fnGetTitle(b)))):d.setAction("copy");d.addEventListener("mouseOver",function(){b.fnMouseover!==null&&b.fnMouseover.call(c,a,b,d)});d.addEventListener("mouseOut",function(){b.fnMouseout!==null&&b.fnMouseout.call(c,a,b,d)});d.addEventListener("mouseDown",function(){b.fnClick!==
|
2438
|
+
null&&b.fnClick.call(c,a,b,d)});d.addEventListener("complete",function(f,e){b.fnComplete!==null&&b.fnComplete.call(c,a,b,d,e);c._fnCollectionHide(a,b)});this._fnFlashGlue(d,a,b.sToolTip)},_fnFlashGlue:function(a,b,c){var d=this,f=b.getAttribute("id");k.getElementById(f)?a.glue(b,c):setTimeout(function(){d._fnFlashGlue(a,b,c)},100)},_fnFlashSetText:function(a,b){var c=this._fnChunkData(b,8192);a.clearText();for(var d=0,f=c.length;d<f;d++)a.appendText(c[d])},_fnColumnTargets:function(a){var b=[],c=
|
2439
|
+
this.s.dt,d,f=c.aoColumns;d=f.length;if("function"==typeof a){a=a.call(this,c);for(c=0;c<d;c++)b.push(-1!==e.inArray(c,a)?!0:!1)}else if("object"==typeof a){for(c=0;c<d;c++)b.push(!1);c=0;for(d=a.length;c<d;c++)b[a[c]]=!0}else if("visible"==a)for(c=0;c<d;c++)b.push(f[c].bVisible?!0:!1);else if("hidden"==a)for(c=0;c<d;c++)b.push(f[c].bVisible?!1:!0);else if("sortable"==a)for(c=0;c<d;c++)b.push(f[c].bSortable?!0:!1);else for(c=0;c<d;c++)b.push(!0);return b},_fnNewline:function(a){return"auto"==a.sNewLine?
|
2440
|
+
navigator.userAgent.match(/Windows/)?"\r\n":"\n":a.sNewLine},_fnGetDataTablesData:function(a){var b,c,d,f,j,i=[],h="",g=this.s.dt,k,l=RegExp(a.sFieldBoundary,"g"),n=this._fnColumnTargets(a.mColumns);d="undefined"!=typeof a.bSelectedOnly?a.bSelectedOnly:!1;if(a.bHeader){j=[];b=0;for(c=g.aoColumns.length;b<c;b++)n[b]&&(h=g.aoColumns[b].sTitle.replace(/\n/g," ").replace(/<.*?>/g,"").replace(/^\s+|\s+$/g,""),h=this._fnHtmlDecode(h),j.push(this._fnBoundData(h,a.sFieldBoundary,l)));i.push(j.join(a.sFieldSeperator))}d=
|
2441
|
+
!0;var m;f=this.fnGetSelectedIndexes();m=(d="none"!==this.s.select.type&&d&&0!==f.length)?f:p.Api?(new p.Api(g)).rows(a.oSelectorOpts).indexes().flatten().toArray():g.oInstance.$("tr",a.oSelectorOpts).map(function(a,b){return g.oInstance.fnGetPosition(b)}).get();d=0;for(f=m.length;d<f;d++){k=g.aoData[m[d]].nTr;j=[];b=0;for(c=g.aoColumns.length;b<c;b++)n[b]&&(h=g.oApi._fnGetCellData(g,m[d],b,"display"),a.fnCellRender?h=a.fnCellRender(h,b,k,m[d])+"":"string"==typeof h?(h=h.replace(/\n/g," "),h=h.replace(/<img.*?\s+alt\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s>]+)).*?>/gi,
|
2442
|
+
"$1$2$3"),h=h.replace(/<.*?>/g,"")):h+="",h=h.replace(/^\s+/,"").replace(/\s+$/,""),h=this._fnHtmlDecode(h),j.push(this._fnBoundData(h,a.sFieldBoundary,l)));i.push(j.join(a.sFieldSeperator));a.bOpenRows&&(b=e.grep(g.aoOpenRows,function(a){return a.nParent===k}),1===b.length&&(h=this._fnBoundData(e("td",b[0].nTr).html(),a.sFieldBoundary,l),i.push(h)))}if(a.bFooter&&null!==g.nTFoot){j=[];b=0;for(c=g.aoColumns.length;b<c;b++)n[b]&&null!==g.aoColumns[b].nTf&&(h=g.aoColumns[b].nTf.innerHTML.replace(/\n/g,
|
2443
|
+
" ").replace(/<.*?>/g,""),h=this._fnHtmlDecode(h),j.push(this._fnBoundData(h,a.sFieldBoundary,l)));i.push(j.join(a.sFieldSeperator))}return i.join(this._fnNewline(a))},_fnBoundData:function(a,b,c){return""===b?a:b+a.replace(c,b+b)+b},_fnChunkData:function(a,b){for(var c=[],d=a.length,f=0;f<d;f+=b)f+b<d?c.push(a.substring(f,f+b)):c.push(a.substring(f,d));return c},_fnHtmlDecode:function(a){if(-1===a.indexOf("&"))return a;var b=k.createElement("div");return a.replace(/&([^\s]*?);/g,function(a,d){if("#"===
|
2444
|
+
a.substr(1,1))return String.fromCharCode(Number(d.substr(1)));b.innerHTML=a;return b.childNodes[0].nodeValue})},_fnPrintStart:function(a){var b=this,c=this.s.dt;this._fnPrintHideNodes(c.nTable);this.s.print.saveStart=c._iDisplayStart;this.s.print.saveLength=c._iDisplayLength;a.bShowAll&&(c._iDisplayStart=0,c._iDisplayLength=-1,c.oApi._fnCalculateEnd&&c.oApi._fnCalculateEnd(c),c.oApi._fnDraw(c));if(""!==c.oScroll.sX||""!==c.oScroll.sY)this._fnPrintScrollStart(c),e(this.s.dt.nTable).bind("draw.DTTT_Print",
|
2445
|
+
function(){b._fnPrintScrollStart(c)});var d=c.aanFeatures,f;for(f in d)if("i"!=f&&"t"!=f&&1==f.length)for(var g=0,i=d[f].length;g<i;g++)this.dom.print.hidden.push({node:d[f][g],display:"block"}),d[f][g].style.display="none";e(k.body).addClass(this.classes.print.body);""!==a.sInfo&&this.fnInfo(a.sInfo,3E3);a.sMessage&&e("<div/>").addClass(this.classes.print.message).html(a.sMessage).prependTo("body");this.s.print.saveScroll=e(n).scrollTop();n.scrollTo(0,0);e(k).bind("keydown.DTTT",function(a){if(a.keyCode==
|
2446
|
+
27){a.preventDefault();b._fnPrintEnd.call(b,a)}})},_fnPrintEnd:function(){var a=this.s.dt,b=this.s.print;this._fnPrintShowNodes();if(""!==a.oScroll.sX||""!==a.oScroll.sY)e(this.s.dt.nTable).unbind("draw.DTTT_Print"),this._fnPrintScrollEnd();n.scrollTo(0,b.saveScroll);e("div."+this.classes.print.message).remove();e(k.body).removeClass("DTTT_Print");a._iDisplayStart=b.saveStart;a._iDisplayLength=b.saveLength;a.oApi._fnCalculateEnd&&a.oApi._fnCalculateEnd(a);a.oApi._fnDraw(a);e(k).unbind("keydown.DTTT")},
|
2447
|
+
_fnPrintScrollStart:function(){var a=this.s.dt;a.nScrollHead.getElementsByTagName("div")[0].getElementsByTagName("table");var b=a.nTable.parentNode,c;c=a.nTable.getElementsByTagName("thead");0<c.length&&a.nTable.removeChild(c[0]);null!==a.nTFoot&&(c=a.nTable.getElementsByTagName("tfoot"),0<c.length&&a.nTable.removeChild(c[0]));c=a.nTHead.cloneNode(!0);a.nTable.insertBefore(c,a.nTable.childNodes[0]);null!==a.nTFoot&&(c=a.nTFoot.cloneNode(!0),a.nTable.insertBefore(c,a.nTable.childNodes[1]));""!==a.oScroll.sX&&
|
2448
|
+
(a.nTable.style.width=e(a.nTable).outerWidth()+"px",b.style.width=e(a.nTable).outerWidth()+"px",b.style.overflow="visible");""!==a.oScroll.sY&&(b.style.height=e(a.nTable).outerHeight()+"px",b.style.overflow="visible")},_fnPrintScrollEnd:function(){var a=this.s.dt,b=a.nTable.parentNode;""!==a.oScroll.sX&&(b.style.width=a.oApi._fnStringToCss(a.oScroll.sX),b.style.overflow="auto");""!==a.oScroll.sY&&(b.style.height=a.oApi._fnStringToCss(a.oScroll.sY),b.style.overflow="auto")},_fnPrintShowNodes:function(){for(var a=
|
2449
|
+
this.dom.print.hidden,b=0,c=a.length;b<c;b++)a[b].node.style.display=a[b].display;a.splice(0,a.length)},_fnPrintHideNodes:function(a){for(var b=this.dom.print.hidden,c=a.parentNode,d=c.childNodes,f=0,g=d.length;f<g;f++)if(d[f]!=a&&1==d[f].nodeType){var i=e(d[f]).css("display");"none"!=i&&(b.push({node:d[f],display:i}),d[f].style.display="none")}"BODY"!=c.nodeName.toUpperCase()&&this._fnPrintHideNodes(c)}};TableTools._aInstances=[];TableTools._aListeners=[];TableTools.fnGetMasters=function(){for(var a=
|
2450
|
+
[],b=0,c=TableTools._aInstances.length;b<c;b++)TableTools._aInstances[b].s.master&&a.push(TableTools._aInstances[b]);return a};TableTools.fnGetInstance=function(a){"object"!=typeof a&&(a=k.getElementById(a));for(var b=0,c=TableTools._aInstances.length;b<c;b++)if(TableTools._aInstances[b].s.master&&TableTools._aInstances[b].dom.table==a)return TableTools._aInstances[b];return null};TableTools._fnEventListen=function(a,b,c){TableTools._aListeners.push({that:a,type:b,fn:c})};TableTools._fnEventDispatch=
|
2451
|
+
function(a,b,c,d){for(var f=TableTools._aListeners,e=0,g=f.length;e<g;e++)a.dom.table==f[e].that.dom.table&&f[e].type==b&&f[e].fn(c,d)};TableTools.buttonBase={sAction:"text",sTag:"default",sLinerTag:"default",sButtonClass:"DTTT_button_text",sButtonText:"Button text",sTitle:"",sToolTip:"",sCharSet:"utf8",bBomInc:!1,sFileName:"*.csv",sFieldBoundary:"",sFieldSeperator:"\t",sNewLine:"auto",mColumns:"all",bHeader:!0,bFooter:!0,bOpenRows:!1,bSelectedOnly:!1,oSelectorOpts:q,fnMouseover:null,fnMouseout:null,
|
2452
|
+
fnClick:null,fnSelect:null,fnComplete:null,fnInit:null,fnCellRender:null};TableTools.BUTTONS={csv:e.extend({},TableTools.buttonBase,{sAction:"flash_save",sButtonClass:"DTTT_button_csv",sButtonText:"CSV",sFieldBoundary:'"',sFieldSeperator:",",fnClick:function(a,b,c){this.fnSetText(c,this.fnGetTableData(b))}}),xls:e.extend({},TableTools.buttonBase,{sAction:"flash_save",sCharSet:"utf16le",bBomInc:!0,sButtonClass:"DTTT_button_xls",sButtonText:"Excel",fnClick:function(a,b,c){this.fnSetText(c,this.fnGetTableData(b))}}),
|
2453
|
+
copy:e.extend({},TableTools.buttonBase,{sAction:"flash_copy",sButtonClass:"DTTT_button_copy",sButtonText:"Copy",fnClick:function(a,b,c){this.fnSetText(c,this.fnGetTableData(b))},fnComplete:function(a,b,c,d){a=d.split("\n").length;b.bHeader&&a--;null!==this.s.dt.nTFoot&&b.bFooter&&a--;this.fnInfo("<h6>Table copied</h6><p>Copied "+a+" row"+(1==a?"":"s")+" to the clipboard.</p>",1500)}}),pdf:e.extend({},TableTools.buttonBase,{sAction:"flash_pdf",sNewLine:"\n",sFileName:"*.pdf",sButtonClass:"DTTT_button_pdf",
|
2454
|
+
sButtonText:"PDF",sPdfOrientation:"portrait",sPdfSize:"A4",sPdfMessage:"",fnClick:function(a,b,c){this.fnSetText(c,"title:"+this.fnGetTitle(b)+"\nmessage:"+b.sPdfMessage+"\ncolWidth:"+this.fnCalcColRatios(b)+"\norientation:"+b.sPdfOrientation+"\nsize:"+b.sPdfSize+"\n--/TableToolsOpts--\n"+this.fnGetTableData(b))}}),print:e.extend({},TableTools.buttonBase,{sInfo:"<h6>Print view</h6><p>Please use your browser's print function to print this table. Press escape when finished.</p>",sMessage:null,bShowAll:!0,
|
2455
|
+
sToolTip:"View print view",sButtonClass:"DTTT_button_print",sButtonText:"Print",fnClick:function(a,b){this.fnPrint(!0,b)}}),text:e.extend({},TableTools.buttonBase),select:e.extend({},TableTools.buttonBase,{sButtonText:"Select button",fnSelect:function(a){0!==this.fnGetSelected().length?e(a).removeClass(this.classes.buttons.disabled):e(a).addClass(this.classes.buttons.disabled)},fnInit:function(a){e(a).addClass(this.classes.buttons.disabled)}}),select_single:e.extend({},TableTools.buttonBase,{sButtonText:"Select button",
|
2456
|
+
fnSelect:function(a){1==this.fnGetSelected().length?e(a).removeClass(this.classes.buttons.disabled):e(a).addClass(this.classes.buttons.disabled)},fnInit:function(a){e(a).addClass(this.classes.buttons.disabled)}}),select_all:e.extend({},TableTools.buttonBase,{sButtonText:"Select all",fnClick:function(){this.fnSelectAll()},fnSelect:function(a){this.fnGetSelected().length==this.s.dt.fnRecordsDisplay()?e(a).addClass(this.classes.buttons.disabled):e(a).removeClass(this.classes.buttons.disabled)}}),select_none:e.extend({},
|
2457
|
+
TableTools.buttonBase,{sButtonText:"Deselect all",fnClick:function(){this.fnSelectNone()},fnSelect:function(a){0!==this.fnGetSelected().length?e(a).removeClass(this.classes.buttons.disabled):e(a).addClass(this.classes.buttons.disabled)},fnInit:function(a){e(a).addClass(this.classes.buttons.disabled)}}),ajax:e.extend({},TableTools.buttonBase,{sAjaxUrl:"/xhr.php",sButtonText:"Ajax button",fnClick:function(a,b){var c=this.fnGetTableData(b);e.ajax({url:b.sAjaxUrl,data:[{name:"tableData",value:c}],success:b.fnAjaxComplete,
|
2458
|
+
dataType:"json",type:"POST",cache:!1,error:function(){alert("Error detected when sending table data to server")}})},fnAjaxComplete:function(){alert("Ajax complete")}}),div:e.extend({},TableTools.buttonBase,{sAction:"div",sTag:"div",sButtonClass:"DTTT_nonbutton",sButtonText:"Text button"}),collection:e.extend({},TableTools.buttonBase,{sAction:"collection",sButtonClass:"DTTT_button_collection",sButtonText:"Collection",fnClick:function(a,b){this._fnCollectionShow(a,b)}})};TableTools.buttons=TableTools.BUTTONS;
|
2459
|
+
TableTools.classes={container:"DTTT_container",buttons:{normal:"DTTT_button",disabled:"DTTT_disabled"},collection:{container:"DTTT_collection",background:"DTTT_collection_background",buttons:{normal:"DTTT_button",disabled:"DTTT_disabled"}},select:{table:"DTTT_selectable",row:"DTTT_selected selected"},print:{body:"DTTT_Print",info:"DTTT_print_info",message:"DTTT_PrintMessage"}};TableTools.classes_themeroller={container:"DTTT_container ui-buttonset ui-buttonset-multi",buttons:{normal:"DTTT_button ui-button ui-state-default"},
|
2460
|
+
collection:{container:"DTTT_collection ui-buttonset ui-buttonset-multi"}};TableTools.DEFAULTS={sSwfPath:"../swf/copy_csv_xls_pdf.swf",sRowSelect:"none",sRowSelector:"tr",sSelectedClass:null,fnPreRowSelect:null,fnRowSelected:null,fnRowDeselected:null,aButtons:["copy","csv","xls","pdf","print"],oTags:{container:"div",button:"a",liner:"span",collection:{container:"div",button:"a",liner:"span"}}};TableTools.defaults=TableTools.DEFAULTS;TableTools.prototype.CLASS="TableTools";TableTools.version="2.2.3";
|
2461
|
+
e.fn.dataTable.Api&&e.fn.dataTable.Api.register("tabletools()",function(){var a=null;0<this.context.length&&(a=TableTools.fnGetInstance(this.context[0].nTable));return a});"function"==typeof e.fn.dataTable&&"function"==typeof e.fn.dataTableExt.fnVersionCheck&&e.fn.dataTableExt.fnVersionCheck("1.9.0")?e.fn.dataTableExt.aoFeatures.push({fnInit:function(a){var b=a.oInit;return(new TableTools(a.oInstance,b?b.tableTools||b.oTableTools||{}:{})).dom.container},cFeature:"T",sFeature:"TableTools"}):alert("Warning: TableTools requires DataTables 1.9.0 or newer - www.datatables.net/download");
|
2462
|
+
e.fn.DataTable.TableTools=TableTools;"function"==typeof m.fn.dataTable&&"function"==typeof m.fn.dataTableExt.fnVersionCheck&&m.fn.dataTableExt.fnVersionCheck("1.9.0")?m.fn.dataTableExt.aoFeatures.push({fnInit:function(a){a=new TableTools(a.oInstance,"undefined"!=typeof a.oInit.oTableTools?a.oInit.oTableTools:{});TableTools._aInstances.push(a);return a.dom.container},cFeature:"T",sFeature:"TableTools"}):alert("Warning: TableTools 2 requires DataTables 1.9.0 or newer - www.datatables.net/download");
|
2463
|
+
m.fn.dataTable.TableTools=TableTools;return m.fn.DataTable.TableTools=TableTools};"function"===typeof define&&define.amd?define(["jquery","datatables"],p):"object"===typeof exports?p(require("jquery"),require("datatables")):jQuery&&!jQuery.fn.dataTable.TableTools&&p(jQuery,jQuery.fn.dataTable)})(window,document);
|
2464
|
+
|
2465
|
+
|
2466
|
+
/*! DataTables Bootstrap integration
|
2467
|
+
* ©2011-2014 SpryMedia Ltd - datatables.net/license
|
2468
|
+
*/
|
2469
|
+
|
2470
|
+
/**
|
2471
|
+
* DataTables integration for Bootstrap 3. This requires Bootstrap 3 and
|
2472
|
+
* DataTables 1.10 or newer.
|
2473
|
+
*
|
2474
|
+
* This file sets the defaults and adds options to DataTables to style its
|
2475
|
+
* controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap
|
2476
|
+
* for further information.
|
2477
|
+
*/
|
2478
|
+
(function(window, document, undefined){
|
2479
|
+
|
2480
|
+
var factory = function( $, DataTable ) {
|
2481
|
+
"use strict";
|
2482
|
+
|
2483
|
+
|
2484
|
+
/* Set the defaults for DataTables initialisation */
|
2485
|
+
$.extend( true, DataTable.defaults, {
|
2486
|
+
dom:
|
2487
|
+
"<'row'<'col-xs-6'l><'col-xs-6'f>r>"+
|
2488
|
+
"t"+
|
2489
|
+
"<'row'<'col-xs-6'i><'col-xs-6'p>>",
|
2490
|
+
renderer: 'bootstrap'
|
2491
|
+
} );
|
2492
|
+
|
2493
|
+
|
2494
|
+
/* Default class modification */
|
2495
|
+
$.extend( DataTable.ext.classes, {
|
2496
|
+
sWrapper: "dataTables_wrapper form-inline dt-bootstrap",
|
2497
|
+
sFilterInput: "form-control input-sm",
|
2498
|
+
sLengthSelect: "form-control input-sm"
|
2499
|
+
} );
|
2500
|
+
|
2501
|
+
|
2502
|
+
/* Bootstrap paging button renderer */
|
2503
|
+
DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) {
|
2504
|
+
var api = new DataTable.Api( settings );
|
2505
|
+
var classes = settings.oClasses;
|
2506
|
+
var lang = settings.oLanguage.oPaginate;
|
2507
|
+
var btnDisplay, btnClass;
|
2508
|
+
|
2509
|
+
var attach = function( container, buttons ) {
|
2510
|
+
var i, ien, node, button;
|
2511
|
+
var clickHandler = function ( e ) {
|
2512
|
+
e.preventDefault();
|
2513
|
+
if ( e.data.action !== 'ellipsis' ) {
|
2514
|
+
api.page( e.data.action ).draw( false );
|
2515
|
+
}
|
2516
|
+
};
|
2517
|
+
|
2518
|
+
for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
|
2519
|
+
button = buttons[i];
|
2520
|
+
|
2521
|
+
if ( $.isArray( button ) ) {
|
2522
|
+
attach( container, button );
|
2523
|
+
}
|
2524
|
+
else {
|
2525
|
+
btnDisplay = '';
|
2526
|
+
btnClass = '';
|
2527
|
+
|
2528
|
+
switch ( button ) {
|
2529
|
+
case 'ellipsis':
|
2530
|
+
btnDisplay = '…';
|
2531
|
+
btnClass = 'disabled';
|
2532
|
+
break;
|
2533
|
+
|
2534
|
+
case 'first':
|
2535
|
+
btnDisplay = lang.sFirst;
|
2536
|
+
btnClass = button + (page > 0 ?
|
2537
|
+
'' : ' disabled');
|
2538
|
+
break;
|
2539
|
+
|
2540
|
+
case 'previous':
|
2541
|
+
btnDisplay = lang.sPrevious;
|
2542
|
+
btnClass = button + (page > 0 ?
|
2543
|
+
'' : ' disabled');
|
2544
|
+
break;
|
2545
|
+
|
2546
|
+
case 'next':
|
2547
|
+
btnDisplay = lang.sNext;
|
2548
|
+
btnClass = button + (page < pages-1 ?
|
2549
|
+
'' : ' disabled');
|
2550
|
+
break;
|
2551
|
+
|
2552
|
+
case 'last':
|
2553
|
+
btnDisplay = lang.sLast;
|
2554
|
+
btnClass = button + (page < pages-1 ?
|
2555
|
+
'' : ' disabled');
|
2556
|
+
break;
|
2557
|
+
|
2558
|
+
default:
|
2559
|
+
btnDisplay = button + 1;
|
2560
|
+
btnClass = page === button ?
|
2561
|
+
'active' : '';
|
2562
|
+
break;
|
2563
|
+
}
|
2564
|
+
|
2565
|
+
if ( btnDisplay ) {
|
2566
|
+
node = $('<li>', {
|
2567
|
+
'class': classes.sPageButton+' '+btnClass,
|
2568
|
+
'aria-controls': settings.sTableId,
|
2569
|
+
'tabindex': settings.iTabIndex,
|
2570
|
+
'id': idx === 0 && typeof button === 'string' ?
|
2571
|
+
settings.sTableId +'_'+ button :
|
2572
|
+
null
|
2573
|
+
} )
|
2574
|
+
.append( $('<a>', {
|
2575
|
+
'href': '#'
|
2576
|
+
} )
|
2577
|
+
.html( btnDisplay )
|
2578
|
+
)
|
2579
|
+
.appendTo( container );
|
2580
|
+
|
2581
|
+
settings.oApi._fnBindAction(
|
2582
|
+
node, {action: button}, clickHandler
|
2583
|
+
);
|
2584
|
+
}
|
2585
|
+
}
|
2586
|
+
}
|
2587
|
+
};
|
2588
|
+
|
2589
|
+
attach(
|
2590
|
+
$(host).empty().html('<ul class="pagination"/>').children('ul'),
|
2591
|
+
buttons
|
2592
|
+
);
|
2593
|
+
};
|
2594
|
+
|
2595
|
+
|
2596
|
+
/*
|
2597
|
+
* TableTools Bootstrap compatibility
|
2598
|
+
* Required TableTools 2.1+
|
2599
|
+
*/
|
2600
|
+
if ( DataTable.TableTools ) {
|
2601
|
+
// Set the classes that TableTools uses to something suitable for Bootstrap
|
2602
|
+
$.extend( true, DataTable.TableTools.classes, {
|
2603
|
+
"container": "DTTT btn-group",
|
2604
|
+
"buttons": {
|
2605
|
+
"normal": "btn btn-default",
|
2606
|
+
"disabled": "disabled"
|
2607
|
+
},
|
2608
|
+
"collection": {
|
2609
|
+
"container": "DTTT_dropdown dropdown-menu",
|
2610
|
+
"buttons": {
|
2611
|
+
"normal": "",
|
2612
|
+
"disabled": "disabled"
|
2613
|
+
}
|
2614
|
+
},
|
2615
|
+
"print": {
|
2616
|
+
"info": "DTTT_print_info modal"
|
2617
|
+
},
|
2618
|
+
"select": {
|
2619
|
+
"row": "active"
|
2620
|
+
}
|
2621
|
+
} );
|
2622
|
+
|
2623
|
+
// Have the collection use a bootstrap compatible drop down
|
2624
|
+
$.extend( true, DataTable.TableTools.DEFAULTS.oTags, {
|
2625
|
+
"collection": {
|
2626
|
+
"container": "ul",
|
2627
|
+
"button": "li",
|
2628
|
+
"liner": "a"
|
2629
|
+
}
|
2630
|
+
} );
|
2631
|
+
}
|
2632
|
+
|
2633
|
+
}; // /factory
|
2634
|
+
|
2635
|
+
|
2636
|
+
// Define as an AMD module if possible
|
2637
|
+
if ( typeof define === 'function' && define.amd ) {
|
2638
|
+
define( ['jquery', 'datatables'], factory );
|
2639
|
+
}
|
2640
|
+
else if ( typeof exports === 'object' ) {
|
2641
|
+
// Node/CommonJS
|
2642
|
+
factory( require('jquery'), require('datatables') );
|
2643
|
+
}
|
2644
|
+
else if ( jQuery ) {
|
2645
|
+
// Otherwise simply initialise as normal, stopping multiple evaluation
|
2646
|
+
factory( jQuery, jQuery.fn.dataTable );
|
2647
|
+
}
|
2648
|
+
|
2649
|
+
|
2650
|
+
})(window, document);
|
2651
|
+
|