eea.facetednavigation 16.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- eea/facetednavigation/README.txt +34 -0
- eea/facetednavigation/__init__.py +10 -0
- eea/facetednavigation/browser/__init__.py +2 -0
- eea/facetednavigation/browser/app/__init__.py +2 -0
- eea/facetednavigation/browser/app/catalog.py +43 -0
- eea/facetednavigation/browser/app/configure.py +307 -0
- eea/facetednavigation/browser/app/counter.py +77 -0
- eea/facetednavigation/browser/app/error.py +28 -0
- eea/facetednavigation/browser/app/exportimport.py +85 -0
- eea/facetednavigation/browser/app/query.py +209 -0
- eea/facetednavigation/browser/app/schema.py +39 -0
- eea/facetednavigation/browser/app/view.py +169 -0
- eea/facetednavigation/browser/configure.zcml +155 -0
- eea/facetednavigation/browser/interfaces.py +52 -0
- eea/facetednavigation/browser/javascript/edit.js +1198 -0
- eea/facetednavigation/browser/javascript/expand.js +107 -0
- eea/facetednavigation/browser/javascript/independent.js +25 -0
- eea/facetednavigation/browser/javascript/view.js +551 -0
- eea/facetednavigation/browser/static/30px.png +0 -0
- eea/facetednavigation/browser/static/32px.png +0 -0
- eea/facetednavigation/browser/static/README.md +6 -0
- eea/facetednavigation/browser/static/ajax-loader-small.gif +0 -0
- eea/facetednavigation/browser/static/ajax-loader.gif +0 -0
- eea/facetednavigation/browser/static/faceted-edit.css +325 -0
- eea/facetednavigation/browser/static/faceted-edit.css.map +1 -0
- eea/facetednavigation/browser/static/faceted-edit.min.css +2 -0
- eea/facetednavigation/browser/static/faceted-edit.min.css.map +1 -0
- eea/facetednavigation/browser/static/faceted-edit.min.js +1 -0
- eea/facetednavigation/browser/static/faceted-jquery.css +4117 -0
- eea/facetednavigation/browser/static/faceted-jquery.css.map +1 -0
- eea/facetednavigation/browser/static/faceted-jquery.min.css +6 -0
- eea/facetednavigation/browser/static/faceted-jquery.min.css.map +1 -0
- eea/facetednavigation/browser/static/faceted-jquery.min.js +2 -0
- eea/facetednavigation/browser/static/faceted-jquery.min.js.LICENSE.txt +263 -0
- eea/facetednavigation/browser/static/faceted-view.css +447 -0
- eea/facetednavigation/browser/static/faceted-view.css.map +1 -0
- eea/facetednavigation/browser/static/faceted-view.min.css +2 -0
- eea/facetednavigation/browser/static/faceted-view.min.css.map +1 -0
- eea/facetednavigation/browser/static/faceted-view.min.js +1 -0
- eea/facetednavigation/browser/static/fonts/titillium/titilliumweb-bold-webfont.eot +0 -0
- eea/facetednavigation/browser/static/fonts/titillium/titilliumweb-bold-webfont.svg +2377 -0
- eea/facetednavigation/browser/static/fonts/titillium/titilliumweb-bold-webfont.ttf +0 -0
- eea/facetednavigation/browser/static/fonts/titillium/titilliumweb-bold-webfont.woff +0 -0
- eea/facetednavigation/browser/static/fonts/titillium/titilliumweb-extralight-webfont.eot +0 -0
- eea/facetednavigation/browser/static/fonts/titillium/titilliumweb-extralight-webfont.svg +2410 -0
- eea/facetednavigation/browser/static/fonts/titillium/titilliumweb-extralight-webfont.ttf +0 -0
- eea/facetednavigation/browser/static/fonts/titillium/titilliumweb-extralight-webfont.woff +0 -0
- eea/facetednavigation/browser/static/fonts/titillium/titilliumweb-regular-webfont.eot +0 -0
- eea/facetednavigation/browser/static/fonts/titillium/titilliumweb-regular-webfont.svg +2725 -0
- eea/facetednavigation/browser/static/fonts/titillium/titilliumweb-regular-webfont.ttf +0 -0
- eea/facetednavigation/browser/static/fonts/titillium/titilliumweb-regular-webfont.woff +0 -0
- eea/facetednavigation/browser/static/hide.png +0 -0
- eea/facetednavigation/browser/static/images/ui-icons_444444_256x240.png +0 -0
- eea/facetednavigation/browser/static/images/ui-icons_555555_256x240.png +0 -0
- eea/facetednavigation/browser/static/images/ui-icons_777620_256x240.png +0 -0
- eea/facetednavigation/browser/static/images/ui-icons_777777_256x240.png +0 -0
- eea/facetednavigation/browser/static/images/ui-icons_cc0000_256x240.png +0 -0
- eea/facetednavigation/browser/static/images/ui-icons_ffffff_256x240.png +0 -0
- eea/facetednavigation/browser/static/select2-spinner.gif +0 -0
- eea/facetednavigation/browser/static/select2.png +0 -0
- eea/facetednavigation/browser/static/select2x2.png +0 -0
- eea/facetednavigation/browser/static/show.png +0 -0
- eea/facetednavigation/browser/static/throbber.gif +0 -0
- eea/facetednavigation/browser/stylesheets/edit.scss +383 -0
- eea/facetednavigation/browser/stylesheets/view.scss +126 -0
- eea/facetednavigation/browser/template/configure.pt +180 -0
- eea/facetednavigation/browser/template/counter.pt +0 -0
- eea/facetednavigation/browser/template/default.xml +54 -0
- eea/facetednavigation/browser/template/error.pt +15 -0
- eea/facetednavigation/browser/template/macros.pt +59 -0
- eea/facetednavigation/browser/template/query.pt +14 -0
- eea/facetednavigation/browser/template/simple_view.pt +9 -0
- eea/facetednavigation/browser/template/view.pt +34 -0
- eea/facetednavigation/browser/template/widgets.pt +57 -0
- eea/facetednavigation/caching/__init__.py +24 -0
- eea/facetednavigation/caching/cache.py +64 -0
- eea/facetednavigation/caching/configure.zcml +17 -0
- eea/facetednavigation/caching/nocache.py +24 -0
- eea/facetednavigation/config.py +6 -0
- eea/facetednavigation/configure.zcml +29 -0
- eea/facetednavigation/criteria/__init__.py +2 -0
- eea/facetednavigation/criteria/configure.zcml +12 -0
- eea/facetednavigation/criteria/handler.py +291 -0
- eea/facetednavigation/criteria/interfaces.py +7 -0
- eea/facetednavigation/criteria/utils.py +11 -0
- eea/facetednavigation/data/vocabularies/faceted_sortorder.vdex +115 -0
- eea/facetednavigation/docs/browser.txt +294 -0
- eea/facetednavigation/docs/counter.txt +76 -0
- eea/facetednavigation/docs/criteria.txt +134 -0
- eea/facetednavigation/docs/exportimport.txt +544 -0
- eea/facetednavigation/docs/facetednavigation.txt +113 -0
- eea/facetednavigation/docs/solr.txt +66 -0
- eea/facetednavigation/docs/syndication.txt +36 -0
- eea/facetednavigation/docs/unicode.txt +224 -0
- eea/facetednavigation/docs/versions.txt +175 -0
- eea/facetednavigation/docs/vocabularies.txt +69 -0
- eea/facetednavigation/docs/widgets.txt +10 -0
- eea/facetednavigation/docs/wrapper.txt +87 -0
- eea/facetednavigation/events.py +56 -0
- eea/facetednavigation/exportimport/__init__.py +2 -0
- eea/facetednavigation/exportimport/configure.zcml +27 -0
- eea/facetednavigation/exportimport/criteria.py +103 -0
- eea/facetednavigation/exportimport/criterion.py +75 -0
- eea/facetednavigation/exportimport/faceted.py +35 -0
- eea/facetednavigation/indexes/__init__.py +2 -0
- eea/facetednavigation/indexes/configure.zcml +8 -0
- eea/facetednavigation/indexes/language/__init__.py +2 -0
- eea/facetednavigation/indexes/language/adapter.py +77 -0
- eea/facetednavigation/indexes/language/configure.zcml +13 -0
- eea/facetednavigation/indexes/language/interfaces.py +7 -0
- eea/facetednavigation/interfaces.py +109 -0
- eea/facetednavigation/layout/__init__.py +2 -0
- eea/facetednavigation/layout/configure.zcml +38 -0
- eea/facetednavigation/layout/events.py +63 -0
- eea/facetednavigation/layout/interfaces.py +21 -0
- eea/facetednavigation/layout/layout.py +95 -0
- eea/facetednavigation/layout/menu.py +77 -0
- eea/facetednavigation/layout/overrides.zcml +13 -0
- eea/facetednavigation/locales/bg/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/bg/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/bg/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/bg/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/ca/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/ca/LC_MESSAGES/eea.po +1180 -0
- eea/facetednavigation/locales/ca/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/ca/LC_MESSAGES/plone.po +38 -0
- eea/facetednavigation/locales/cs/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/cs/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/cs/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/cs/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/da/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/da/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/da/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/da/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/de/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/de/LC_MESSAGES/eea.po +1236 -0
- eea/facetednavigation/locales/de/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/de/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/eea.pot +1182 -0
- eea/facetednavigation/locales/el/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/el/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/el/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/el/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/en/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/en/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/en/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/en/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/es/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/es/LC_MESSAGES/eea.po +1247 -0
- eea/facetednavigation/locales/es/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/es/LC_MESSAGES/plone.po +39 -0
- eea/facetednavigation/locales/et/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/et/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/et/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/et/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/eu/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/eu/LC_MESSAGES/eea.po +1247 -0
- eea/facetednavigation/locales/eu/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/eu/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/fi/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/fi/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/fi/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/fi/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/fr/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/fr/LC_MESSAGES/eea.po +1247 -0
- eea/facetednavigation/locales/fr/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/fr/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/hr/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/hr/LC_MESSAGES/eea.po +1182 -0
- eea/facetednavigation/locales/hr/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/hr/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/hu/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/hu/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/hu/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/hu/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/is/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/is/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/is/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/is/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/it/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/it/LC_MESSAGES/eea.po +1242 -0
- eea/facetednavigation/locales/it/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/it/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/kl/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/kl/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/kl/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/kl/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/lt/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/lt/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/lt/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/lt/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/lv/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/lv/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/lv/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/lv/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/mt/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/mt/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/mt/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/mt/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/nl/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/nl/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/nl/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/nl/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/no/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/no/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/no/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/no/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/pl/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/pl/LC_MESSAGES/eea.po +1242 -0
- eea/facetednavigation/locales/pl/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/pl/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/plone-manual.pot +38 -0
- eea/facetednavigation/locales/pt/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/pt/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/pt/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/pt/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/pt_BR/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/pt_BR/LC_MESSAGES/eea.po +1180 -0
- eea/facetednavigation/locales/pt_BR/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/pt_BR/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/ro/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/ro/LC_MESSAGES/eea.po +1244 -0
- eea/facetednavigation/locales/ro/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/ro/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/ru/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/ru/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/ru/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/ru/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/sk/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/sk/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/sk/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/sk/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/sl/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/sl/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/sl/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/sl/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/sv/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/sv/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/sv/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/sv/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/tr/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/tr/LC_MESSAGES/eea.po +1179 -0
- eea/facetednavigation/locales/tr/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/tr/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/locales/update.sh +6 -0
- eea/facetednavigation/locales/zh_TW/LC_MESSAGES/eea.mo +0 -0
- eea/facetednavigation/locales/zh_TW/LC_MESSAGES/eea.po +1243 -0
- eea/facetednavigation/locales/zh_TW/LC_MESSAGES/plone.mo +0 -0
- eea/facetednavigation/locales/zh_TW/LC_MESSAGES/plone.po +37 -0
- eea/facetednavigation/meta.zcml +22 -0
- eea/facetednavigation/overrides.zcml +11 -0
- eea/facetednavigation/permissions.zcml +12 -0
- eea/facetednavigation/plonex.py +36 -0
- eea/facetednavigation/profiles/default/actions.xml +67 -0
- eea/facetednavigation/profiles/default/eea.facetednavigation.txt +0 -0
- eea/facetednavigation/profiles/default/metadata.xml +4 -0
- eea/facetednavigation/profiles/default/registry.xml +48 -0
- eea/facetednavigation/profiles/default/rolemap.xml +11 -0
- eea/facetednavigation/profiles/uninstall/actions.xml +11 -0
- eea/facetednavigation/profiles/uninstall/eea.facetednavigation.txt +0 -0
- eea/facetednavigation/profiles/uninstall/registry.xml +8 -0
- eea/facetednavigation/profiles.zcml +42 -0
- eea/facetednavigation/search/__init__.py +2 -0
- eea/facetednavigation/search/catalog.py +84 -0
- eea/facetednavigation/search/configure.zcml +8 -0
- eea/facetednavigation/search/interfaces.py +10 -0
- eea/facetednavigation/settings/__init__.py +2 -0
- eea/facetednavigation/settings/configure.zcml +34 -0
- eea/facetednavigation/settings/interfaces.py +52 -0
- eea/facetednavigation/settings/menu.py +170 -0
- eea/facetednavigation/setuphandlers.py +92 -0
- eea/facetednavigation/subtypes/__init__.py +2 -0
- eea/facetednavigation/subtypes/configure.zcml +61 -0
- eea/facetednavigation/subtypes/interfaces.py +45 -0
- eea/facetednavigation/subtypes/subtyper.py +130 -0
- eea/facetednavigation/subtypes/wrapper.py +39 -0
- eea/facetednavigation/syndication/__init__.py +2 -0
- eea/facetednavigation/syndication/configure.zcml +13 -0
- eea/facetednavigation/syndication/feed.py +19 -0
- eea/facetednavigation/tests/__init__.py +2 -0
- eea/facetednavigation/tests/autocomplete.py +33 -0
- eea/facetednavigation/tests/autocomplete.zcml +15 -0
- eea/facetednavigation/tests/base.py +49 -0
- eea/facetednavigation/tests/configure.zcml +17 -0
- eea/facetednavigation/tests/data/criteria_with_purge_false.xml +15 -0
- eea/facetednavigation/tests/data/criteria_with_purge_true.xml +15 -0
- eea/facetednavigation/tests/data/criterion_with_purge_false.xml +15 -0
- eea/facetednavigation/tests/data/criterion_with_purge_true.xml +15 -0
- eea/facetednavigation/tests/data/exportimport.xml +31 -0
- eea/facetednavigation/tests/profiles/testing/types/Document.xml +6 -0
- eea/facetednavigation/tests/profiles/testing/types.xml +4 -0
- eea/facetednavigation/tests/test_bundles.py +42 -0
- eea/facetednavigation/tests/test_doctests.py +139 -0
- eea/facetednavigation/tests/utils.py +39 -0
- eea/facetednavigation/upgrades/__init__.py +2 -0
- eea/facetednavigation/upgrades/configure.zcml +28 -0
- eea/facetednavigation/upgrades/evolve165.py +13 -0
- eea/facetednavigation/utils.py +66 -0
- eea/facetednavigation/version.txt +1 -0
- eea/facetednavigation/versions/__init__.py +2 -0
- eea/facetednavigation/versions/browser.py +78 -0
- eea/facetednavigation/versions/configure.zcml +20 -0
- eea/facetednavigation/versions/events.py +16 -0
- eea/facetednavigation/versions/interfaces.py +15 -0
- eea/facetednavigation/views/__init__.py +2 -0
- eea/facetednavigation/views/configure.zcml +41 -0
- eea/facetednavigation/views/example/__init__.py +2 -0
- eea/facetednavigation/views/example/configure.zcml +24 -0
- eea/facetednavigation/views/example/summary.pt +74 -0
- eea/facetednavigation/views/example/summary.py +20 -0
- eea/facetednavigation/views/interfaces.py +7 -0
- eea/facetednavigation/views/meta.py +63 -0
- eea/facetednavigation/views/preview-item.pt +10 -0
- eea/facetednavigation/views/preview-items.pt +38 -0
- eea/facetednavigation/views/preview.py +74 -0
- eea/facetednavigation/vocabularies/__init__.py +2 -0
- eea/facetednavigation/vocabularies/autocomplete.py +44 -0
- eea/facetednavigation/vocabularies/catalog.py +204 -0
- eea/facetednavigation/vocabularies/configure.zcml +101 -0
- eea/facetednavigation/vocabularies/faceted.py +62 -0
- eea/facetednavigation/vocabularies/portal.py +55 -0
- eea/facetednavigation/vocabularies/position.py +23 -0
- eea/facetednavigation/vocabularies/section.py +19 -0
- eea/facetednavigation/vocabularies/simple.py +40 -0
- eea/facetednavigation/vocabularies/types.py +23 -0
- eea/facetednavigation/vocabularies/utils.py +10 -0
- eea/facetednavigation/widgets/__init__.py +12 -0
- eea/facetednavigation/widgets/alphabetic/__init__.py +2 -0
- eea/facetednavigation/widgets/alphabetic/adapters.py +48 -0
- eea/facetednavigation/widgets/alphabetic/alphabets.py +1042 -0
- eea/facetednavigation/widgets/alphabetic/configure.zcml +19 -0
- eea/facetednavigation/widgets/alphabetic/edit.js +80 -0
- eea/facetednavigation/widgets/alphabetic/edit.scss +0 -0
- eea/facetednavigation/widgets/alphabetic/interfaces.py +44 -0
- eea/facetednavigation/widgets/alphabetic/tests.py +32 -0
- eea/facetednavigation/widgets/alphabetic/view.js +229 -0
- eea/facetednavigation/widgets/alphabetic/view.scss +47 -0
- eea/facetednavigation/widgets/alphabetic/widget.pt +45 -0
- eea/facetednavigation/widgets/alphabetic/widget.py +64 -0
- eea/facetednavigation/widgets/alphabetic/widget.txt +104 -0
- eea/facetednavigation/widgets/autocomplete/__init__.py +2 -0
- eea/facetednavigation/widgets/autocomplete/configure.zcml +20 -0
- eea/facetednavigation/widgets/autocomplete/edit.js +52 -0
- eea/facetednavigation/widgets/autocomplete/edit.scss +0 -0
- eea/facetednavigation/widgets/autocomplete/interfaces.py +77 -0
- eea/facetednavigation/widgets/autocomplete/tests.py +32 -0
- eea/facetednavigation/widgets/autocomplete/view.js +245 -0
- eea/facetednavigation/widgets/autocomplete/view.scss +52 -0
- eea/facetednavigation/widgets/autocomplete/widget.pt +63 -0
- eea/facetednavigation/widgets/autocomplete/widget.py +117 -0
- eea/facetednavigation/widgets/autocomplete/widget.txt +142 -0
- eea/facetednavigation/widgets/boolean/__init__.py +2 -0
- eea/facetednavigation/widgets/boolean/configure.zcml +12 -0
- eea/facetednavigation/widgets/boolean/interfaces.py +48 -0
- eea/facetednavigation/widgets/boolean/widget.pt +46 -0
- eea/facetednavigation/widgets/boolean/widget.py +56 -0
- eea/facetednavigation/widgets/checkbox/__init__.py +2 -0
- eea/facetednavigation/widgets/checkbox/configure.zcml +12 -0
- eea/facetednavigation/widgets/checkbox/edit.js +115 -0
- eea/facetednavigation/widgets/checkbox/edit.scss +0 -0
- eea/facetednavigation/widgets/checkbox/interfaces.py +104 -0
- eea/facetednavigation/widgets/checkbox/view.js +319 -0
- eea/facetednavigation/widgets/checkbox/view.scss +59 -0
- eea/facetednavigation/widgets/checkbox/widget.pt +75 -0
- eea/facetednavigation/widgets/checkbox/widget.py +102 -0
- eea/facetednavigation/widgets/configure.zcml +30 -0
- eea/facetednavigation/widgets/criteria/__init__.py +2 -0
- eea/facetednavigation/widgets/criteria/configure.zcml +12 -0
- eea/facetednavigation/widgets/criteria/edit.js +0 -0
- eea/facetednavigation/widgets/criteria/edit.scss +0 -0
- eea/facetednavigation/widgets/criteria/interfaces.py +35 -0
- eea/facetednavigation/widgets/criteria/view.js +123 -0
- eea/facetednavigation/widgets/criteria/view.scss +61 -0
- eea/facetednavigation/widgets/criteria/widget.pt +36 -0
- eea/facetednavigation/widgets/criteria/widget.py +17 -0
- eea/facetednavigation/widgets/date/__init__.py +2 -0
- eea/facetednavigation/widgets/date/configure.zcml +12 -0
- eea/facetednavigation/widgets/date/edit.js +89 -0
- eea/facetednavigation/widgets/date/edit.scss +0 -0
- eea/facetednavigation/widgets/date/interfaces.py +36 -0
- eea/facetednavigation/widgets/date/tests.py +32 -0
- eea/facetednavigation/widgets/date/view.js +195 -0
- eea/facetednavigation/widgets/date/view.scss +10 -0
- eea/facetednavigation/widgets/date/widget.pt +40 -0
- eea/facetednavigation/widgets/date/widget.py +166 -0
- eea/facetednavigation/widgets/date/widget.txt +225 -0
- eea/facetednavigation/widgets/daterange/__init__.py +2 -0
- eea/facetednavigation/widgets/daterange/configure.zcml +12 -0
- eea/facetednavigation/widgets/daterange/edit.js +114 -0
- eea/facetednavigation/widgets/daterange/edit.scss +0 -0
- eea/facetednavigation/widgets/daterange/interfaces.py +102 -0
- eea/facetednavigation/widgets/daterange/tests.py +32 -0
- eea/facetednavigation/widgets/daterange/utils.py +117 -0
- eea/facetednavigation/widgets/daterange/view.js +308 -0
- eea/facetednavigation/widgets/daterange/view.scss +14 -0
- eea/facetednavigation/widgets/daterange/widget.pt +61 -0
- eea/facetednavigation/widgets/daterange/widget.py +184 -0
- eea/facetednavigation/widgets/daterange/widget.txt +280 -0
- eea/facetednavigation/widgets/debug/__init__.py +2 -0
- eea/facetednavigation/widgets/debug/browser.py +161 -0
- eea/facetednavigation/widgets/debug/configure.zcml +58 -0
- eea/facetednavigation/widgets/debug/edit.js +104 -0
- eea/facetednavigation/widgets/debug/edit.scss +0 -0
- eea/facetednavigation/widgets/debug/interfaces.py +35 -0
- eea/facetednavigation/widgets/debug/view.js +109 -0
- eea/facetednavigation/widgets/debug/view.scss +6 -0
- eea/facetednavigation/widgets/debug/vocabulary.py +21 -0
- eea/facetednavigation/widgets/debug/widget.pt +43 -0
- eea/facetednavigation/widgets/debug/widget.py +17 -0
- eea/facetednavigation/widgets/etag/__init__.py +2 -0
- eea/facetednavigation/widgets/etag/configure.zcml +12 -0
- eea/facetednavigation/widgets/etag/edit.js +51 -0
- eea/facetednavigation/widgets/etag/edit.scss +0 -0
- eea/facetednavigation/widgets/etag/interfaces.py +52 -0
- eea/facetednavigation/widgets/etag/view.js +0 -0
- eea/facetednavigation/widgets/etag/view.scss +0 -0
- eea/facetednavigation/widgets/etag/widget.pt +25 -0
- eea/facetednavigation/widgets/etag/widget.py +16 -0
- eea/facetednavigation/widgets/interfaces.py +156 -0
- eea/facetednavigation/widgets/multiselect/__init__.py +2 -0
- eea/facetednavigation/widgets/multiselect/configure.zcml +12 -0
- eea/facetednavigation/widgets/multiselect/edit.js +131 -0
- eea/facetednavigation/widgets/multiselect/edit.scss +0 -0
- eea/facetednavigation/widgets/multiselect/interfaces.py +120 -0
- eea/facetednavigation/widgets/multiselect/view.js +383 -0
- eea/facetednavigation/widgets/multiselect/view.scss +65 -0
- eea/facetednavigation/widgets/multiselect/widget.pt +73 -0
- eea/facetednavigation/widgets/multiselect/widget.py +107 -0
- eea/facetednavigation/widgets/path/__init__.py +2 -0
- eea/facetednavigation/widgets/path/configure.zcml +28 -0
- eea/facetednavigation/widgets/path/edit.js +63 -0
- eea/facetednavigation/widgets/path/edit.scss +0 -0
- eea/facetednavigation/widgets/path/interfaces.py +67 -0
- eea/facetednavigation/widgets/path/tree.js +99 -0
- eea/facetednavigation/widgets/path/tree.py +171 -0
- eea/facetednavigation/widgets/path/view.js +158 -0
- eea/facetednavigation/widgets/path/view.scss +16 -0
- eea/facetednavigation/widgets/path/widget.pt +29 -0
- eea/facetednavigation/widgets/path/widget.py +134 -0
- eea/facetednavigation/widgets/portlet/__init__.py +2 -0
- eea/facetednavigation/widgets/portlet/configure.zcml +12 -0
- eea/facetednavigation/widgets/portlet/edit.js +0 -0
- eea/facetednavigation/widgets/portlet/edit.scss +0 -0
- eea/facetednavigation/widgets/portlet/interfaces.py +34 -0
- eea/facetednavigation/widgets/portlet/view.js +23 -0
- eea/facetednavigation/widgets/portlet/view.scss +6 -0
- eea/facetednavigation/widgets/portlet/widget.pt +20 -0
- eea/facetednavigation/widgets/portlet/widget.py +46 -0
- eea/facetednavigation/widgets/radio/__init__.py +2 -0
- eea/facetednavigation/widgets/radio/configure.zcml +12 -0
- eea/facetednavigation/widgets/radio/edit.js +76 -0
- eea/facetednavigation/widgets/radio/edit.scss +0 -0
- eea/facetednavigation/widgets/radio/interfaces.py +76 -0
- eea/facetednavigation/widgets/radio/view.js +262 -0
- eea/facetednavigation/widgets/radio/view.scss +11 -0
- eea/facetednavigation/widgets/radio/widget.pt +71 -0
- eea/facetednavigation/widgets/radio/widget.py +53 -0
- eea/facetednavigation/widgets/range/__init__.py +2 -0
- eea/facetednavigation/widgets/range/configure.zcml +12 -0
- eea/facetednavigation/widgets/range/edit.js +66 -0
- eea/facetednavigation/widgets/range/edit.scss +0 -0
- eea/facetednavigation/widgets/range/interfaces.py +78 -0
- eea/facetednavigation/widgets/range/tests.py +32 -0
- eea/facetednavigation/widgets/range/view.js +176 -0
- eea/facetednavigation/widgets/range/view.scss +14 -0
- eea/facetednavigation/widgets/range/widget.pt +50 -0
- eea/facetednavigation/widgets/range/widget.py +74 -0
- eea/facetednavigation/widgets/range/widget.txt +153 -0
- eea/facetednavigation/widgets/resultsfilter/__init__.py +2 -0
- eea/facetednavigation/widgets/resultsfilter/adapters.py +18 -0
- eea/facetednavigation/widgets/resultsfilter/configure.zcml +19 -0
- eea/facetednavigation/widgets/resultsfilter/edit.js +54 -0
- eea/facetednavigation/widgets/resultsfilter/edit.scss +0 -0
- eea/facetednavigation/widgets/resultsfilter/interfaces.py +41 -0
- eea/facetednavigation/widgets/resultsfilter/tests.py +32 -0
- eea/facetednavigation/widgets/resultsfilter/view.js +0 -0
- eea/facetednavigation/widgets/resultsfilter/view.scss +0 -0
- eea/facetednavigation/widgets/resultsfilter/widget.pt +24 -0
- eea/facetednavigation/widgets/resultsfilter/widget.py +94 -0
- eea/facetednavigation/widgets/resultsfilter/widget.txt +66 -0
- eea/facetednavigation/widgets/resultsperpage/__init__.py +2 -0
- eea/facetednavigation/widgets/resultsperpage/configure.zcml +12 -0
- eea/facetednavigation/widgets/resultsperpage/edit.js +47 -0
- eea/facetednavigation/widgets/resultsperpage/edit.scss +0 -0
- eea/facetednavigation/widgets/resultsperpage/interfaces.py +65 -0
- eea/facetednavigation/widgets/resultsperpage/view.js +159 -0
- eea/facetednavigation/widgets/resultsperpage/view.scss +5 -0
- eea/facetednavigation/widgets/resultsperpage/widget.pt +45 -0
- eea/facetednavigation/widgets/resultsperpage/widget.py +71 -0
- eea/facetednavigation/widgets/schema.pt +36 -0
- eea/facetednavigation/widgets/schema.py +31 -0
- eea/facetednavigation/widgets/select/__init__.py +2 -0
- eea/facetednavigation/widgets/select/configure.zcml +12 -0
- eea/facetednavigation/widgets/select/edit.js +63 -0
- eea/facetednavigation/widgets/select/edit.scss +0 -0
- eea/facetednavigation/widgets/select/interfaces.py +68 -0
- eea/facetednavigation/widgets/select/view.js +239 -0
- eea/facetednavigation/widgets/select/view.scss +24 -0
- eea/facetednavigation/widgets/select/widget.pt +59 -0
- eea/facetednavigation/widgets/select/widget.py +44 -0
- eea/facetednavigation/widgets/sorting/__init__.py +2 -0
- eea/facetednavigation/widgets/sorting/configure.zcml +12 -0
- eea/facetednavigation/widgets/sorting/edit.js +55 -0
- eea/facetednavigation/widgets/sorting/edit.scss +0 -0
- eea/facetednavigation/widgets/sorting/interfaces.py +35 -0
- eea/facetednavigation/widgets/sorting/view.js +213 -0
- eea/facetednavigation/widgets/sorting/view.scss +9 -0
- eea/facetednavigation/widgets/sorting/widget.pt +58 -0
- eea/facetednavigation/widgets/sorting/widget.py +80 -0
- eea/facetednavigation/widgets/storage.py +65 -0
- eea/facetednavigation/widgets/tagscloud/__init__.py +2 -0
- eea/facetednavigation/widgets/tagscloud/configure.zcml +20 -0
- eea/facetednavigation/widgets/tagscloud/counter.pt +0 -0
- eea/facetednavigation/widgets/tagscloud/counter.py +79 -0
- eea/facetednavigation/widgets/tagscloud/edit.js +150 -0
- eea/facetednavigation/widgets/tagscloud/edit.scss +0 -0
- eea/facetednavigation/widgets/tagscloud/interfaces.py +154 -0
- eea/facetednavigation/widgets/tagscloud/tagcloud.js +210 -0
- eea/facetednavigation/widgets/tagscloud/view.js +301 -0
- eea/facetednavigation/widgets/tagscloud/view.scss +33 -0
- eea/facetednavigation/widgets/tagscloud/widget.pt +65 -0
- eea/facetednavigation/widgets/tagscloud/widget.py +100 -0
- eea/facetednavigation/widgets/tal/__init__.py +2 -0
- eea/facetednavigation/widgets/tal/configure.zcml +12 -0
- eea/facetednavigation/widgets/tal/edit.js +54 -0
- eea/facetednavigation/widgets/tal/edit.scss +0 -0
- eea/facetednavigation/widgets/tal/interfaces.py +42 -0
- eea/facetednavigation/widgets/tal/tests.py +32 -0
- eea/facetednavigation/widgets/tal/view.js +0 -0
- eea/facetednavigation/widgets/tal/view.scss +0 -0
- eea/facetednavigation/widgets/tal/widget.pt +24 -0
- eea/facetednavigation/widgets/tal/widget.py +118 -0
- eea/facetednavigation/widgets/tal/widget.txt +216 -0
- eea/facetednavigation/widgets/text/__init__.py +2 -0
- eea/facetednavigation/widgets/text/configure.zcml +12 -0
- eea/facetednavigation/widgets/text/edit.js +52 -0
- eea/facetednavigation/widgets/text/edit.scss +0 -0
- eea/facetednavigation/widgets/text/interfaces.py +64 -0
- eea/facetednavigation/widgets/text/tests.py +32 -0
- eea/facetednavigation/widgets/text/view.js +190 -0
- eea/facetednavigation/widgets/text/view.scss +15 -0
- eea/facetednavigation/widgets/text/widget.pt +53 -0
- eea/facetednavigation/widgets/text/widget.py +77 -0
- eea/facetednavigation/widgets/text/widget.txt +153 -0
- eea/facetednavigation/widgets/widget.py +386 -0
- eea/facetednavigation/widgets/widgets.py +127 -0
- eea.facetednavigation-16.5-py3.14-nspkg.pth +1 -0
- eea_facetednavigation-16.5.dist-info/METADATA +1617 -0
- eea_facetednavigation-16.5.dist-info/RECORD +553 -0
- eea_facetednavigation-16.5.dist-info/WHEEL +5 -0
- eea_facetednavigation-16.5.dist-info/entry_points.txt +2 -0
- eea_facetednavigation-16.5.dist-info/namespace_packages.txt +1 -0
- eea_facetednavigation-16.5.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1198 @@
|
|
|
1
|
+
var FacetedEdit;
|
|
2
|
+
if (window.FacetedEdit !== undefined) {
|
|
3
|
+
FacetedEdit = window.FacetedEdit;
|
|
4
|
+
} else {
|
|
5
|
+
FacetedEdit = window.FacetedEdit = { version: "15.0" };
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
FacetedEdit.loading = '<div class="faceted_loading"></div>';
|
|
9
|
+
|
|
10
|
+
// Widgets
|
|
11
|
+
FacetedEdit.Widgets = {};
|
|
12
|
+
|
|
13
|
+
/* Context url.
|
|
14
|
+
Default: (context related)
|
|
15
|
+
*/
|
|
16
|
+
FacetedEdit.BASEURL = "";
|
|
17
|
+
|
|
18
|
+
// Events
|
|
19
|
+
FacetedEdit.Events = {};
|
|
20
|
+
FacetedEdit.Events.RELOAD_WIDGETS = "FACETEDEDIT-RELOAD-WIDGETS";
|
|
21
|
+
FacetedEdit.Events.INITIALIZE_WIDGETS = "FACETEDEDIT-INITIALIZE-WIDGETS";
|
|
22
|
+
FacetedEdit.Events.POSITION_UPDATED = "FACETEDEDIT-POSITION-UPDATED";
|
|
23
|
+
FacetedEdit.Events.WINDOW_WIDTH_CHANGED = "FACETEDEDIT-WINDOW-WIDTH-CHANGED";
|
|
24
|
+
FacetedEdit.Events.WINDOW_HEIGHT_CHANGED = "FACETEDEDIT-WINDOW-HEIGHT-CHANGED";
|
|
25
|
+
FacetedEdit.Events.AJAX_START = "FACETEDEDIT-AJAX-START";
|
|
26
|
+
FacetedEdit.Events.AJAX_STOP = "FACETEDEDIT-AJAX-STOP";
|
|
27
|
+
FacetedEdit.Events.CATALOG_CHANGED = "FACETEDEDIT-CATALOG-CHANGED";
|
|
28
|
+
|
|
29
|
+
FacetedEdit.Window = {
|
|
30
|
+
initialize: function () {
|
|
31
|
+
this.width = jQuery(window).width();
|
|
32
|
+
this.height = jQuery(window).height();
|
|
33
|
+
|
|
34
|
+
var self = this;
|
|
35
|
+
jQuery(window).on("resize", function () {
|
|
36
|
+
self.width_change();
|
|
37
|
+
self.height_change();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Full screen icon clicked
|
|
41
|
+
var fullscreen = jQuery("a:has(img#icon-full_screen)");
|
|
42
|
+
if (fullscreen.length) {
|
|
43
|
+
self.toggle_fullscreen(fullscreen);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
width_change: function () {
|
|
48
|
+
var width = jQuery(window).width();
|
|
49
|
+
if (width != this.width) {
|
|
50
|
+
this.width = width;
|
|
51
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.WINDOW_WIDTH_CHANGED, {
|
|
52
|
+
width: width,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
height_change: function () {
|
|
58
|
+
var height = jQuery(window).height();
|
|
59
|
+
if (height != this.height) {
|
|
60
|
+
this.height = height;
|
|
61
|
+
jQuery(FacetedEdit.Events).trigger(
|
|
62
|
+
FacetedEdit.Events.WINDOW_HEIGHT_CHANGED,
|
|
63
|
+
{ height: height }
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
toggle_fullscreen: function (button) {
|
|
69
|
+
button.attr("href", "#");
|
|
70
|
+
button.on("click", function () {
|
|
71
|
+
var toggleFullScreenMode = window.toggleFullScreenMode;
|
|
72
|
+
if (toggleFullScreenMode) {
|
|
73
|
+
toggleFullScreenMode();
|
|
74
|
+
jQuery(FacetedEdit.Events).trigger(
|
|
75
|
+
FacetedEdit.Events.WINDOW_WIDTH_CHANGED
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
return false;
|
|
79
|
+
});
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
FacetedEdit.FormMessage = {
|
|
84
|
+
initialize: function () {
|
|
85
|
+
var self = this;
|
|
86
|
+
// Add portal status message
|
|
87
|
+
var context = jQuery("#faceted-edit-widgets-ajax");
|
|
88
|
+
var msg = jQuery("<dl>")
|
|
89
|
+
.addClass("portalMessage")
|
|
90
|
+
.attr("id", "faceted-portal-status-message")
|
|
91
|
+
.append(jQuery("<dt>").text("Info"));
|
|
92
|
+
|
|
93
|
+
var msg_area = jQuery("<dd>").attr("id", "faceted-portal-status-message-area");
|
|
94
|
+
|
|
95
|
+
var msg_close = jQuery("<span>")
|
|
96
|
+
.addClass("ui-icon")
|
|
97
|
+
.addClass("ui-icon-close")
|
|
98
|
+
.attr("title", "Close message")
|
|
99
|
+
.html(" ")
|
|
100
|
+
.css({
|
|
101
|
+
float: "right",
|
|
102
|
+
margin: "0.5em",
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
msg.on("click", function () {
|
|
106
|
+
self.msg.hide("slide", { direction: "down" });
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
msg.append(msg_close).append(msg_area);
|
|
110
|
+
context.prepend(msg);
|
|
111
|
+
this.msg = msg;
|
|
112
|
+
this.msg_area = msg_area;
|
|
113
|
+
this.msg.hide();
|
|
114
|
+
|
|
115
|
+
var lock = jQuery("<div>");
|
|
116
|
+
lock.attr("id", "faceted-portal-status-message-lock");
|
|
117
|
+
lock.css("margin", "0px");
|
|
118
|
+
context.prepend(lock);
|
|
119
|
+
this.lock = jQuery("#faceted-portal-status-message-lock", context);
|
|
120
|
+
|
|
121
|
+
this.lock.dialog({
|
|
122
|
+
modal: true,
|
|
123
|
+
closeOnEscape: false,
|
|
124
|
+
autoOpen: false,
|
|
125
|
+
draggable: false,
|
|
126
|
+
resize: false,
|
|
127
|
+
dialogClass: "faceted-loading-overlay",
|
|
128
|
+
});
|
|
129
|
+
this.lock.html(FacetedEdit.loading);
|
|
130
|
+
|
|
131
|
+
// Events
|
|
132
|
+
jQuery(FacetedEdit.Events).on(
|
|
133
|
+
FacetedEdit.Events.AJAX_START,
|
|
134
|
+
function (evt, data) {
|
|
135
|
+
self.start(data.msg);
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
jQuery(FacetedEdit.Events).on(
|
|
139
|
+
FacetedEdit.Events.AJAX_STOP,
|
|
140
|
+
function (evt, data) {
|
|
141
|
+
self.stop(data.msg);
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
start: function (msg) {
|
|
147
|
+
this.lock.dialog("open");
|
|
148
|
+
this.update(msg);
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
stop: function (msg) {
|
|
152
|
+
this.lock.dialog("close");
|
|
153
|
+
this.update(msg);
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
update: function (msg, level) {
|
|
157
|
+
if (!level) {
|
|
158
|
+
level = "success";
|
|
159
|
+
}
|
|
160
|
+
this.msg.removeClass().addClass(level);
|
|
161
|
+
this.msg_area.html(msg);
|
|
162
|
+
if (!msg) {
|
|
163
|
+
this.msg.hide("slide", { direction: "down" });
|
|
164
|
+
} else {
|
|
165
|
+
this.msg.show("slide", { direction: "down" });
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
|
|
169
|
+
custom_message: function (text, area) {
|
|
170
|
+
var msg = jQuery("#" + area + " .faceted-add-widget-dialog-msg");
|
|
171
|
+
if (!msg.length) {
|
|
172
|
+
var loading_text = jQuery("<span>");
|
|
173
|
+
loading_text.attr("class", "portalMessage faceted-add-widget-dialog-msg");
|
|
174
|
+
loading_text.css("display", "none");
|
|
175
|
+
loading_text.html(text);
|
|
176
|
+
jQuery("#" + area).append(loading_text);
|
|
177
|
+
}
|
|
178
|
+
msg = jQuery("#" + area + " .faceted-add-widget-dialog-msg");
|
|
179
|
+
msg.fadeIn("slow", function () {
|
|
180
|
+
msg.fadeOut("slow");
|
|
181
|
+
});
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
FacetedEdit.FormPosition = {
|
|
186
|
+
initialize: function () {
|
|
187
|
+
this.query = {};
|
|
188
|
+
},
|
|
189
|
+
|
|
190
|
+
submit: function (action) {
|
|
191
|
+
this.update();
|
|
192
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.AJAX_START, {
|
|
193
|
+
msg: "Saving ...",
|
|
194
|
+
});
|
|
195
|
+
jQuery.post(action, this.query, function (data) {
|
|
196
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.POSITION_UPDATED);
|
|
197
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.AJAX_STOP, {
|
|
198
|
+
msg: data,
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
},
|
|
202
|
+
|
|
203
|
+
update: function () {
|
|
204
|
+
var context = this;
|
|
205
|
+
context.query = {};
|
|
206
|
+
context.query.redirect = "";
|
|
207
|
+
context.query.updatePosition_button = "Change";
|
|
208
|
+
|
|
209
|
+
var positions = jQuery("#wposition option");
|
|
210
|
+
positions.each(function () {
|
|
211
|
+
var pos_val = jQuery(this).val();
|
|
212
|
+
context.query[pos_val] = [];
|
|
213
|
+
|
|
214
|
+
var widgets = jQuery("#faceted-" + pos_val + "-column div.faceted-widget");
|
|
215
|
+
widgets.each(function () {
|
|
216
|
+
var wid = jQuery(this).attr("id").split("_")[0];
|
|
217
|
+
context.query[pos_val].push(wid);
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
},
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
FacetedEdit.FormWidgets = {
|
|
224
|
+
initialize: function () {
|
|
225
|
+
this.form = jQuery("#faceted-edit-widgets");
|
|
226
|
+
var form = this.form;
|
|
227
|
+
jQuery(document).ajaxError(function () {
|
|
228
|
+
jQuery(form).html(
|
|
229
|
+
"<h3>This site encountered an error trying to fulfill your request</h3><p>If the error persists please contact the site maintainer. Thank you for your patience.</p>"
|
|
230
|
+
);
|
|
231
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.AJAX_STOP, {
|
|
232
|
+
msg: "Error",
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
jQuery(".faceted-edit-fieldset").hide();
|
|
236
|
+
this.action = this.form.attr("action");
|
|
237
|
+
this.form.css("display", "block");
|
|
238
|
+
this.form.css("clear", "both");
|
|
239
|
+
this.form.html(FacetedEdit.loading);
|
|
240
|
+
this.update();
|
|
241
|
+
|
|
242
|
+
// Confirm delete dialog
|
|
243
|
+
var self = this;
|
|
244
|
+
jQuery("#confirm-delete-dialog").dialog({
|
|
245
|
+
bgiframe: true,
|
|
246
|
+
autoOpen: false,
|
|
247
|
+
modal: true,
|
|
248
|
+
dialogClass: "faceted-ui-dialog",
|
|
249
|
+
buttons: {
|
|
250
|
+
Yes: function () {
|
|
251
|
+
var label = jQuery("strong", jQuery(this));
|
|
252
|
+
var wid = label.attr("id");
|
|
253
|
+
var cid = wid.split("_")[0];
|
|
254
|
+
jQuery("#" + wid).slideUp(function () {
|
|
255
|
+
self.delete_widget(cid);
|
|
256
|
+
jQuery("#" + wid).remove();
|
|
257
|
+
});
|
|
258
|
+
jQuery(this).dialog("close");
|
|
259
|
+
},
|
|
260
|
+
No: function () {
|
|
261
|
+
jQuery(this).dialog("close");
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
create: function () {
|
|
265
|
+
jQuery(this)
|
|
266
|
+
.closest(".ui-dialog")
|
|
267
|
+
.find(".ui-dialog-buttonset button")
|
|
268
|
+
.first()
|
|
269
|
+
.addClass("context btn btn-danger");
|
|
270
|
+
jQuery(this)
|
|
271
|
+
.closest(".ui-dialog")
|
|
272
|
+
.find(".ui-dialog-buttonset button")
|
|
273
|
+
.last()
|
|
274
|
+
.addClass("standalone btn btn-secondary");
|
|
275
|
+
},
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
// Events
|
|
279
|
+
jQuery(FacetedEdit.Events).on(FacetedEdit.Events.RELOAD_WIDGETS, function () {
|
|
280
|
+
self.update();
|
|
281
|
+
});
|
|
282
|
+
},
|
|
283
|
+
|
|
284
|
+
update: function () {
|
|
285
|
+
var context = this;
|
|
286
|
+
var nocache = new Date();
|
|
287
|
+
nocache = nocache.getTime();
|
|
288
|
+
|
|
289
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.AJAX_START, {
|
|
290
|
+
msg: "Refreshing ...",
|
|
291
|
+
});
|
|
292
|
+
jQuery.get(
|
|
293
|
+
FacetedEdit.BASEURL + "@@faceted_widgets",
|
|
294
|
+
{ nocache: nocache },
|
|
295
|
+
function (data) {
|
|
296
|
+
context.form.html(data);
|
|
297
|
+
|
|
298
|
+
jQuery("#faceted-results").html(
|
|
299
|
+
context.background_text("Results here", {
|
|
300
|
+
"padding-top": "2em",
|
|
301
|
+
"padding-bottom": "2em",
|
|
302
|
+
})
|
|
303
|
+
);
|
|
304
|
+
|
|
305
|
+
jQuery("div.faceted-widget").show();
|
|
306
|
+
|
|
307
|
+
jQuery(".faceted-drag-drop").sortable({
|
|
308
|
+
items: ".faceted-widget",
|
|
309
|
+
connectWith: ".faceted-drag-drop",
|
|
310
|
+
placeholder: "ui-state-highlight",
|
|
311
|
+
forcePlaceholderSize: true,
|
|
312
|
+
opacity: 0.7,
|
|
313
|
+
delay: 300,
|
|
314
|
+
cursor: "crosshair",
|
|
315
|
+
tolerance: "pointer",
|
|
316
|
+
update: function (event, ui) {
|
|
317
|
+
if (!ui.sender) {
|
|
318
|
+
var parent = ui.item.parent();
|
|
319
|
+
if (jQuery(parent).hasClass("faceted-widgets")) {
|
|
320
|
+
FacetedEdit.FormPosition.submit(context.action);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
jQuery(".faceted-widgets .ui-widget-header").disableSelection();
|
|
327
|
+
jQuery("div.faceted-widget").on("dblclick", function () {
|
|
328
|
+
var wid = jQuery(this).attr("id");
|
|
329
|
+
context.edit_widget(wid);
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
jQuery("div.faceted-widget input[type=submit]").on("click", function () {
|
|
333
|
+
return false;
|
|
334
|
+
});
|
|
335
|
+
jQuery("div.faceted-widget a").on("click", function () {
|
|
336
|
+
return false;
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
// Add widget buttons
|
|
340
|
+
var addbutton = jQuery("<span>");
|
|
341
|
+
addbutton.attr("title", "Add widget here");
|
|
342
|
+
addbutton.text(" + ");
|
|
343
|
+
addbutton.attr("class", "ui-icon ui-icon-plus ui-corner-all");
|
|
344
|
+
jQuery(".faceted-widgets").each(function () {
|
|
345
|
+
var container = jQuery(this);
|
|
346
|
+
var container_id = container.attr("id").split("---");
|
|
347
|
+
var position = container_id[0];
|
|
348
|
+
var section = container_id[1];
|
|
349
|
+
var local_addbutton = addbutton.clone();
|
|
350
|
+
local_addbutton.on("click", function () {
|
|
351
|
+
var dialog = jQuery("#faceted-edit-addwidget");
|
|
352
|
+
jQuery("#wposition", dialog).val(position);
|
|
353
|
+
jQuery("#wsection", dialog).val(section);
|
|
354
|
+
dialog.dialog("open");
|
|
355
|
+
FacetedEdit.FormAddWidgets.wtype_update(
|
|
356
|
+
FacetedEdit.FormAddWidgets.wtype.val()
|
|
357
|
+
);
|
|
358
|
+
return false;
|
|
359
|
+
});
|
|
360
|
+
var div = jQuery("<div>");
|
|
361
|
+
div.addClass("faceted-add-button");
|
|
362
|
+
div.append(local_addbutton);
|
|
363
|
+
container.prepend(div);
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
// Make portlets
|
|
367
|
+
jQuery(".faceted-widget").each(function () {
|
|
368
|
+
var wid = jQuery(this).attr("id");
|
|
369
|
+
jQuery(this).attr(
|
|
370
|
+
"title",
|
|
371
|
+
"Click and drag to change widget position"
|
|
372
|
+
);
|
|
373
|
+
var cid = wid.split("_")[0];
|
|
374
|
+
var legend = jQuery("#" + wid + " legend");
|
|
375
|
+
legend.hide();
|
|
376
|
+
|
|
377
|
+
// Widget header
|
|
378
|
+
var header = jQuery("<div>");
|
|
379
|
+
header.attr("class", "ui-widget-header");
|
|
380
|
+
|
|
381
|
+
// Delete widget button
|
|
382
|
+
var header_del_button = jQuery("<div>");
|
|
383
|
+
header_del_button.attr("title", "Delete widget");
|
|
384
|
+
header_del_button.css("float", "right");
|
|
385
|
+
header_del_button.attr("class", "ui-icon ui-icon-trash");
|
|
386
|
+
header_del_button.html("x");
|
|
387
|
+
header_del_button.on("click", function () {
|
|
388
|
+
var confirm = jQuery("#confirm-delete-dialog");
|
|
389
|
+
var label = jQuery("strong", confirm);
|
|
390
|
+
label.attr("id", wid);
|
|
391
|
+
label.text(legend.text());
|
|
392
|
+
jQuery("#confirm-delete-dialog").dialog("open");
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
// Edit widget button
|
|
396
|
+
var header_edit_button = jQuery("<div>");
|
|
397
|
+
header_edit_button.attr("title", "Edit widget");
|
|
398
|
+
header_edit_button.css("float", "right");
|
|
399
|
+
header_edit_button.attr("class", "ui-icon ui-icon-pencil");
|
|
400
|
+
header_edit_button.html("e");
|
|
401
|
+
header_edit_button.on("click", function () {
|
|
402
|
+
context.edit_widget(cid);
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
// Hide/show widget button
|
|
406
|
+
var header_hide_button = jQuery("<div>");
|
|
407
|
+
var css = "ui-icon-unlocked";
|
|
408
|
+
if (jQuery("#" + wid).hasClass("faceted-widget-hidden")) {
|
|
409
|
+
header_hide_button.attr("title", "Show widget");
|
|
410
|
+
css = "ui-icon-locked";
|
|
411
|
+
} else {
|
|
412
|
+
header_hide_button.attr("title", "Hide widget");
|
|
413
|
+
}
|
|
414
|
+
header_hide_button.css("float", "right");
|
|
415
|
+
header_hide_button.attr("class", "ui-icon");
|
|
416
|
+
header_hide_button.addClass(css);
|
|
417
|
+
header_hide_button.html("h");
|
|
418
|
+
header_hide_button.on("click", function () {
|
|
419
|
+
context.hide_button_click(wid, cid);
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
// Widget title
|
|
423
|
+
var header_legend = jQuery("<div>");
|
|
424
|
+
header_legend.html(legend.html());
|
|
425
|
+
|
|
426
|
+
header.append(header_del_button);
|
|
427
|
+
header.append(header_edit_button);
|
|
428
|
+
header.append(header_hide_button);
|
|
429
|
+
header.append(header_legend);
|
|
430
|
+
legend.after(header);
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
FacetedEdit.Widgets = {};
|
|
434
|
+
jQuery(FacetedEdit.Events).trigger(
|
|
435
|
+
FacetedEdit.Events.INITIALIZE_WIDGETS
|
|
436
|
+
);
|
|
437
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.AJAX_STOP, {
|
|
438
|
+
msg: "Interface refreshed",
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
);
|
|
442
|
+
},
|
|
443
|
+
|
|
444
|
+
background_text: function (text, css) {
|
|
445
|
+
var div = jQuery("<div>");
|
|
446
|
+
div.html(text);
|
|
447
|
+
div.attr("class", "faceted-empty-column");
|
|
448
|
+
if (css) {
|
|
449
|
+
div.css(css);
|
|
450
|
+
}
|
|
451
|
+
return div;
|
|
452
|
+
},
|
|
453
|
+
|
|
454
|
+
delete_widget: function (criterion_id) {
|
|
455
|
+
var query = {};
|
|
456
|
+
query.path = criterion_id;
|
|
457
|
+
query.deleteWidget_button = "Delete";
|
|
458
|
+
query.redirect = "";
|
|
459
|
+
jQuery.post(this.action, query, function (data) {
|
|
460
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.AJAX_STOP, {
|
|
461
|
+
msg: data,
|
|
462
|
+
});
|
|
463
|
+
});
|
|
464
|
+
},
|
|
465
|
+
|
|
466
|
+
edit_widget: function (widget_id) {
|
|
467
|
+
FacetedEdit.FormEditWidget.edit(widget_id);
|
|
468
|
+
},
|
|
469
|
+
|
|
470
|
+
hide_button_click: function (widget_id, criterion_id) {
|
|
471
|
+
var widget = jQuery("#" + widget_id);
|
|
472
|
+
var action = FacetedEdit.BASEURL + "@@faceted_configure";
|
|
473
|
+
var query = {};
|
|
474
|
+
query.redirect = "";
|
|
475
|
+
query.updateCriterion_button = "Save";
|
|
476
|
+
query.cid = criterion_id;
|
|
477
|
+
|
|
478
|
+
if (widget.hasClass("faceted-widget-hidden")) {
|
|
479
|
+
this.show_widget(widget_id);
|
|
480
|
+
query["faceted." + criterion_id + ".hidden-empty-marker"] = 1;
|
|
481
|
+
} else {
|
|
482
|
+
this.hide_widget(widget_id);
|
|
483
|
+
query["faceted." + criterion_id + ".hidden"] = "selected";
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
jQuery.post(action, query, function (data) {
|
|
487
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.AJAX_STOP, {
|
|
488
|
+
msg: data,
|
|
489
|
+
});
|
|
490
|
+
});
|
|
491
|
+
},
|
|
492
|
+
|
|
493
|
+
hide_widget: function (widget_id) {
|
|
494
|
+
var button = jQuery("#" + widget_id + " div.ui-icon-unlocked");
|
|
495
|
+
button.attr("title", "Show widget");
|
|
496
|
+
button.removeClass("ui-icon-unlocked");
|
|
497
|
+
button.addClass("ui-icon-locked");
|
|
498
|
+
jQuery("#" + widget_id).addClass("faceted-widget-hidden");
|
|
499
|
+
},
|
|
500
|
+
|
|
501
|
+
show_widget: function (widget_id) {
|
|
502
|
+
var button = jQuery("#" + widget_id + " div.ui-icon-locked");
|
|
503
|
+
button.attr("title", "Hide widget");
|
|
504
|
+
button.removeClass("ui-icon-locked");
|
|
505
|
+
button.addClass("ui-icon-unlocked");
|
|
506
|
+
jQuery("#" + widget_id).removeClass("faceted-widget-hidden");
|
|
507
|
+
},
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
FacetedEdit.FormEditWidget = {
|
|
511
|
+
initialize: function () {
|
|
512
|
+
this.query = "";
|
|
513
|
+
this.cid = null;
|
|
514
|
+
var context = this;
|
|
515
|
+
var form = jQuery(".faceted-edit-widget-dialog");
|
|
516
|
+
if (!form.length) {
|
|
517
|
+
form = jQuery("<form>");
|
|
518
|
+
form.attr("class", "faceted-edit-widget-dialog");
|
|
519
|
+
form.attr("title", "Edit widget");
|
|
520
|
+
form.attr("id", "faceted-edit-widget-dialog");
|
|
521
|
+
jQuery("#faceted-edit-widgets-ajax").append(form);
|
|
522
|
+
}
|
|
523
|
+
this.form = jQuery(".faceted-edit-widget-dialog");
|
|
524
|
+
this.form.dialog({
|
|
525
|
+
bgiframe: true,
|
|
526
|
+
modal: true,
|
|
527
|
+
autoOpen: false,
|
|
528
|
+
dialogClass: "faceted-ui-dialog",
|
|
529
|
+
buttons: {
|
|
530
|
+
Save: function () {
|
|
531
|
+
var valid = FacetedEdit.FormValidator.validate(context.form);
|
|
532
|
+
if (valid) {
|
|
533
|
+
context.submit();
|
|
534
|
+
jQuery(this).dialog("close");
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
Cancel: function () {
|
|
538
|
+
jQuery(this).dialog("close");
|
|
539
|
+
},
|
|
540
|
+
},
|
|
541
|
+
create: function () {
|
|
542
|
+
jQuery(this)
|
|
543
|
+
.closest(".ui-dialog")
|
|
544
|
+
.find(".ui-dialog-buttonset button")
|
|
545
|
+
.first()
|
|
546
|
+
.addClass("context btn btn-primary");
|
|
547
|
+
jQuery(this)
|
|
548
|
+
.closest(".ui-dialog")
|
|
549
|
+
.find(".ui-dialog-buttonset button")
|
|
550
|
+
.last()
|
|
551
|
+
.addClass("standalone btn btn-secondary");
|
|
552
|
+
},
|
|
553
|
+
close: function () {
|
|
554
|
+
FacetedEdit.FormValidator.clear(context.form);
|
|
555
|
+
context.form.html("");
|
|
556
|
+
},
|
|
557
|
+
});
|
|
558
|
+
},
|
|
559
|
+
|
|
560
|
+
edit: function (widget_id) {
|
|
561
|
+
var context = this;
|
|
562
|
+
context.cid = widget_id.split("_")[0];
|
|
563
|
+
var query = {};
|
|
564
|
+
query.criterion = widget_id;
|
|
565
|
+
|
|
566
|
+
context.form.html(FacetedEdit.loading);
|
|
567
|
+
context.form.dialog("open");
|
|
568
|
+
jQuery.get(FacetedEdit.BASEURL + "@@faceted_schema", query, function (data) {
|
|
569
|
+
context.form.html(data);
|
|
570
|
+
|
|
571
|
+
//jQuery('.field-c0-form-c0-default').remove();
|
|
572
|
+
var selector = ".field-" + context.cid + "-faceted-" + context.cid;
|
|
573
|
+
jQuery(selector + "-default").remove();
|
|
574
|
+
|
|
575
|
+
var catalog = jQuery(selector + "-index select");
|
|
576
|
+
var operator = jQuery(selector + "-operator select");
|
|
577
|
+
if (catalog.length && operator.length) {
|
|
578
|
+
operator = operator.clone();
|
|
579
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.CATALOG_CHANGED, {
|
|
580
|
+
cid: context.cid,
|
|
581
|
+
catalog: catalog,
|
|
582
|
+
operator: operator,
|
|
583
|
+
});
|
|
584
|
+
catalog.on("change", function () {
|
|
585
|
+
jQuery(FacetedEdit.Events).trigger(
|
|
586
|
+
FacetedEdit.Events.CATALOG_CHANGED,
|
|
587
|
+
{
|
|
588
|
+
cid: context.cid,
|
|
589
|
+
catalog: catalog,
|
|
590
|
+
operator: operator,
|
|
591
|
+
}
|
|
592
|
+
);
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
var widget = jQuery(".faceted-widget-edit", context.form);
|
|
596
|
+
jQuery("ul", widget).addClass("formTabs").show();
|
|
597
|
+
jQuery("li", widget).addClass("formTab");
|
|
598
|
+
try {
|
|
599
|
+
widget.tabs();
|
|
600
|
+
} catch (e) {
|
|
601
|
+
// BBB: jquery.tools.tabs
|
|
602
|
+
jQuery("ul", widget).tabs("div.panes > div");
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
},
|
|
606
|
+
|
|
607
|
+
submit: function () {
|
|
608
|
+
var action = FacetedEdit.BASEURL + "@@faceted_configure";
|
|
609
|
+
this.update_query();
|
|
610
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.AJAX_START, {
|
|
611
|
+
msg: "Saving ...",
|
|
612
|
+
});
|
|
613
|
+
jQuery.post(action, this.query, function (data) {
|
|
614
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.AJAX_STOP, {
|
|
615
|
+
msg: data,
|
|
616
|
+
});
|
|
617
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.RELOAD_WIDGETS, {
|
|
618
|
+
msg: data,
|
|
619
|
+
});
|
|
620
|
+
});
|
|
621
|
+
return false;
|
|
622
|
+
},
|
|
623
|
+
|
|
624
|
+
update_query: function () {
|
|
625
|
+
this.query = "cid=" + this.cid;
|
|
626
|
+
this.query += "&redirect=&updateCriterion_button=Save&";
|
|
627
|
+
this.query += this.form.serialize();
|
|
628
|
+
},
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
FacetedEdit.FormAddWidgets = {
|
|
632
|
+
initialize: function () {
|
|
633
|
+
this.query = "";
|
|
634
|
+
this.form = jQuery("#faceted-edit-addwidget");
|
|
635
|
+
var context = this;
|
|
636
|
+
jQuery("#faceted-edit-addwidget").dialog({
|
|
637
|
+
bgiframe: true,
|
|
638
|
+
modal: true,
|
|
639
|
+
autoOpen: false,
|
|
640
|
+
dialogClass: "faceted-ui-dialog",
|
|
641
|
+
buttons: {
|
|
642
|
+
Add: function () {
|
|
643
|
+
var valid = FacetedEdit.FormValidator.validate(context.form);
|
|
644
|
+
if (valid) {
|
|
645
|
+
context.submit(context.form);
|
|
646
|
+
jQuery(this).dialog("close");
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
Cancel: function () {
|
|
650
|
+
jQuery(this).dialog("close");
|
|
651
|
+
},
|
|
652
|
+
},
|
|
653
|
+
create: function () {
|
|
654
|
+
jQuery(this)
|
|
655
|
+
.closest(".ui-dialog")
|
|
656
|
+
.find(".ui-dialog-buttonset button")
|
|
657
|
+
.first()
|
|
658
|
+
.addClass("context btn btn-primary");
|
|
659
|
+
jQuery(this)
|
|
660
|
+
.closest(".ui-dialog")
|
|
661
|
+
.find(".ui-dialog-buttonset button")
|
|
662
|
+
.last()
|
|
663
|
+
.addClass("standalone btn btn-secondary");
|
|
664
|
+
},
|
|
665
|
+
close: function () {
|
|
666
|
+
FacetedEdit.FormValidator.clear(context.form);
|
|
667
|
+
context.details.html("");
|
|
668
|
+
},
|
|
669
|
+
});
|
|
670
|
+
this.wtype = jQuery("#wtype");
|
|
671
|
+
|
|
672
|
+
this.details = jQuery("#faceted-widget-details");
|
|
673
|
+
|
|
674
|
+
// Events
|
|
675
|
+
this.form.on("submit", function (evt) {
|
|
676
|
+
return context.submit(context.form, evt);
|
|
677
|
+
});
|
|
678
|
+
this.wtype.on("change", function (evt) {
|
|
679
|
+
return context.wtype_change(this, evt);
|
|
680
|
+
});
|
|
681
|
+
|
|
682
|
+
jQuery("#faceted-edit-addwidget input[type=submit]").hide();
|
|
683
|
+
jQuery("#faceted-field-wposition").hide();
|
|
684
|
+
jQuery("#faceted-field-wsection").hide();
|
|
685
|
+
jQuery("#faceted-widget-type .field", this.form).css("float", "left");
|
|
686
|
+
var clear = jQuery("<div>");
|
|
687
|
+
clear.html(" ");
|
|
688
|
+
clear.css("clear", "both");
|
|
689
|
+
jQuery("#faceted-widget-type", this.form).after(clear);
|
|
690
|
+
},
|
|
691
|
+
|
|
692
|
+
wtype_change: function (element) {
|
|
693
|
+
FacetedEdit.FormValidator.clear(this.form);
|
|
694
|
+
this.wtype_update(jQuery(element).val());
|
|
695
|
+
},
|
|
696
|
+
|
|
697
|
+
wtype_update: function (widget_type) {
|
|
698
|
+
var faceted_query = {};
|
|
699
|
+
faceted_query.criterion = "addformcriterion_widget";
|
|
700
|
+
faceted_query.widget = widget_type;
|
|
701
|
+
var context = this;
|
|
702
|
+
|
|
703
|
+
jQuery.get(
|
|
704
|
+
FacetedEdit.BASEURL + "@@faceted_schema",
|
|
705
|
+
faceted_query,
|
|
706
|
+
function (data) {
|
|
707
|
+
FacetedEdit.FormMessage.custom_message(
|
|
708
|
+
"Loading...",
|
|
709
|
+
"faceted-widget-type"
|
|
710
|
+
);
|
|
711
|
+
context.details.html(data);
|
|
712
|
+
var selector = ".field-c0-faceted-c0";
|
|
713
|
+
jQuery(selector + "-default").hide();
|
|
714
|
+
var catalog = jQuery(selector + "-index select");
|
|
715
|
+
var operator = jQuery(selector + "-operator select");
|
|
716
|
+
if (catalog.length && operator.length) {
|
|
717
|
+
operator = operator.clone();
|
|
718
|
+
catalog.on("change", function () {
|
|
719
|
+
jQuery(FacetedEdit.Events).trigger(
|
|
720
|
+
FacetedEdit.Events.CATALOG_CHANGED,
|
|
721
|
+
{
|
|
722
|
+
cid: "c0",
|
|
723
|
+
catalog: catalog,
|
|
724
|
+
operator: operator,
|
|
725
|
+
}
|
|
726
|
+
);
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
jQuery("#c0-layout-header").remove();
|
|
730
|
+
jQuery("#c0-layout-tab").remove();
|
|
731
|
+
var widget = jQuery(".faceted-widget-edit", context.details);
|
|
732
|
+
jQuery("ul", widget).attr("class", "formTabs").show();
|
|
733
|
+
jQuery("li", widget).attr("class", "formTab");
|
|
734
|
+
try {
|
|
735
|
+
widget.tabs();
|
|
736
|
+
} catch (e) {
|
|
737
|
+
// BBB: jquery.tools.tabs
|
|
738
|
+
jQuery("ul", widget).tabs("div.panes > div");
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
);
|
|
742
|
+
},
|
|
743
|
+
|
|
744
|
+
submit: function (form) {
|
|
745
|
+
this.update_query();
|
|
746
|
+
|
|
747
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.AJAX_START, {
|
|
748
|
+
msg: "Adding ...",
|
|
749
|
+
});
|
|
750
|
+
jQuery.post(form.attr("action"), this.query, function (data) {
|
|
751
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.AJAX_STOP, {
|
|
752
|
+
msg: data,
|
|
753
|
+
});
|
|
754
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.RELOAD_WIDGETS, {
|
|
755
|
+
msg: data,
|
|
756
|
+
});
|
|
757
|
+
});
|
|
758
|
+
return false;
|
|
759
|
+
},
|
|
760
|
+
|
|
761
|
+
update_query: function () {
|
|
762
|
+
this.query = "redirect=&addPropertiesWidget_button=Add&";
|
|
763
|
+
this.query += this.form.serialize();
|
|
764
|
+
console.log(this.query);
|
|
765
|
+
},
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
FacetedEdit.FormImportExport = {
|
|
769
|
+
initialize: function () {
|
|
770
|
+
jQuery(".faceted-exportimport-fieldset").hide();
|
|
771
|
+
this.form = jQuery(".faceted-exportimport-fieldset form");
|
|
772
|
+
this.form.on("submit", function () {
|
|
773
|
+
return false;
|
|
774
|
+
});
|
|
775
|
+
|
|
776
|
+
var context = this;
|
|
777
|
+
var buttons = jQuery("input[type=submit]", this.form);
|
|
778
|
+
buttons.each(function () {
|
|
779
|
+
var button = jQuery(this);
|
|
780
|
+
var new_button = button.clone();
|
|
781
|
+
new_button.on("click", function () {
|
|
782
|
+
if (new_button.attr("name") == "export_button") {
|
|
783
|
+
context.export_xml();
|
|
784
|
+
}
|
|
785
|
+
});
|
|
786
|
+
jQuery("#faceted-edit-widgets-ajax").prepend(new_button);
|
|
787
|
+
button.remove();
|
|
788
|
+
});
|
|
789
|
+
|
|
790
|
+
var import_file = jQuery("#import_file");
|
|
791
|
+
import_file.ajaxfileupload({
|
|
792
|
+
action: this.form.attr("action"),
|
|
793
|
+
params: {
|
|
794
|
+
redirect: "",
|
|
795
|
+
import_button: "Import",
|
|
796
|
+
},
|
|
797
|
+
valid_extensions: ["xml"],
|
|
798
|
+
onComplete: function (response) {
|
|
799
|
+
import_file.val("");
|
|
800
|
+
if (!response.status && response.message) {
|
|
801
|
+
FacetedEdit.FormMessage.update(response.message, "error");
|
|
802
|
+
return false;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
if (response.startsWith && response.startsWith("ERROR")) {
|
|
806
|
+
FacetedEdit.FormMessage.update(response, "error");
|
|
807
|
+
return false;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.RELOAD_WIDGETS, {
|
|
811
|
+
msg: response,
|
|
812
|
+
});
|
|
813
|
+
return true;
|
|
814
|
+
},
|
|
815
|
+
});
|
|
816
|
+
|
|
817
|
+
jQuery("#import_button")
|
|
818
|
+
.css("cursor", "pointer")
|
|
819
|
+
.on("click", function () {
|
|
820
|
+
import_file.trigger("click");
|
|
821
|
+
});
|
|
822
|
+
},
|
|
823
|
+
|
|
824
|
+
export_xml: function () {
|
|
825
|
+
var query = {};
|
|
826
|
+
query.redirect = "";
|
|
827
|
+
query.export_button = "Export";
|
|
828
|
+
var action = this.form.attr("action");
|
|
829
|
+
action += "?" + jQuery.param(query);
|
|
830
|
+
return window.open(action, "_blank");
|
|
831
|
+
},
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
FacetedEdit.FormValidator = {
|
|
835
|
+
validate: function (form) {
|
|
836
|
+
this.clear();
|
|
837
|
+
|
|
838
|
+
var error = jQuery("<div>");
|
|
839
|
+
error.attr("class", "dialog-error-header ui-state-error ui-corner-all");
|
|
840
|
+
error.attr("id", "form-validator-errors");
|
|
841
|
+
form.prepend(error);
|
|
842
|
+
|
|
843
|
+
var valid = true;
|
|
844
|
+
valid = valid && this.validate_numbers(form);
|
|
845
|
+
valid = valid && this.validate_required(form);
|
|
846
|
+
return valid;
|
|
847
|
+
},
|
|
848
|
+
|
|
849
|
+
validate_numbers: function (form) {
|
|
850
|
+
var inputs = jQuery("#" + jQuery(form).attr("id") + " input[type=text]");
|
|
851
|
+
var valid = true;
|
|
852
|
+
var context = this;
|
|
853
|
+
jQuery.each(inputs, function () {
|
|
854
|
+
var input = jQuery(this);
|
|
855
|
+
if (jQuery(this).attr("name").indexOf(":int") == -1) {
|
|
856
|
+
return;
|
|
857
|
+
}
|
|
858
|
+
var value = input.val();
|
|
859
|
+
value = parseInt(value, 10);
|
|
860
|
+
if (value || value === 0) {
|
|
861
|
+
input.val(value);
|
|
862
|
+
} else {
|
|
863
|
+
input.addClass("ui-state-error");
|
|
864
|
+
context.error_message(form, input, "Invalid number");
|
|
865
|
+
valid = false;
|
|
866
|
+
}
|
|
867
|
+
});
|
|
868
|
+
return valid;
|
|
869
|
+
},
|
|
870
|
+
|
|
871
|
+
validate_required: function (form) {
|
|
872
|
+
var valid = true;
|
|
873
|
+
var elements = jQuery("div.field:has(span.required) :input", jQuery(form));
|
|
874
|
+
|
|
875
|
+
var context = this;
|
|
876
|
+
jQuery.each(elements, function () {
|
|
877
|
+
var element = jQuery(this);
|
|
878
|
+
var value = element.val();
|
|
879
|
+
if (!value) {
|
|
880
|
+
element.addClass("ui-state-error");
|
|
881
|
+
context.error_message(form, element, "Value required");
|
|
882
|
+
valid = false;
|
|
883
|
+
}
|
|
884
|
+
});
|
|
885
|
+
return valid;
|
|
886
|
+
},
|
|
887
|
+
|
|
888
|
+
error_message: function (form, element, msg) {
|
|
889
|
+
var error = jQuery("#form-validator-errors");
|
|
890
|
+
var message = jQuery("<span>");
|
|
891
|
+
message.attr("class", "ui-icon ui-icon-alert");
|
|
892
|
+
message.css({ "float": "left", "margin-right": "0.3em" });
|
|
893
|
+
error.append(message);
|
|
894
|
+
|
|
895
|
+
var label_id = jQuery(element).attr("id").split("_")[1];
|
|
896
|
+
var label = jQuery("label[for=" + label_id + "]");
|
|
897
|
+
if (label.length) {
|
|
898
|
+
var strong = jQuery("<strong>");
|
|
899
|
+
strong.text(label.text() + ": ");
|
|
900
|
+
error.append(strong);
|
|
901
|
+
}
|
|
902
|
+
error.append(msg);
|
|
903
|
+
error.append('<div style="clear: both" />');
|
|
904
|
+
},
|
|
905
|
+
|
|
906
|
+
clear: function () {
|
|
907
|
+
jQuery(".ui-state-error").removeClass("ui-state-error");
|
|
908
|
+
jQuery(".submitting").removeClass(".submitting");
|
|
909
|
+
jQuery("#form-validator-errors").remove();
|
|
910
|
+
},
|
|
911
|
+
};
|
|
912
|
+
|
|
913
|
+
FacetedEdit.FormSections = {
|
|
914
|
+
initialize: function () {
|
|
915
|
+
this.initialized = false;
|
|
916
|
+
this.context = null;
|
|
917
|
+
this.selected = null;
|
|
918
|
+
|
|
919
|
+
var context = this;
|
|
920
|
+
jQuery(FacetedEdit.Events).on(
|
|
921
|
+
FacetedEdit.Events.INITIALIZE_WIDGETS,
|
|
922
|
+
function () {
|
|
923
|
+
context.update();
|
|
924
|
+
}
|
|
925
|
+
);
|
|
926
|
+
},
|
|
927
|
+
|
|
928
|
+
update: function () {
|
|
929
|
+
if (!this.initialized) {
|
|
930
|
+
this.first_initialize();
|
|
931
|
+
return;
|
|
932
|
+
}
|
|
933
|
+
jQuery(".faceted-section-header").remove();
|
|
934
|
+
this.selected.removeClass("ui-tabs-selected");
|
|
935
|
+
this.selected.click();
|
|
936
|
+
},
|
|
937
|
+
|
|
938
|
+
first_initialize: function () {
|
|
939
|
+
var context = this;
|
|
940
|
+
this.initialized = true;
|
|
941
|
+
|
|
942
|
+
var column = jQuery(".faceted-column");
|
|
943
|
+
if (!column.length) {
|
|
944
|
+
return;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
column = jQuery(column[0]);
|
|
948
|
+
var sections = jQuery(".faceted-section-header", column);
|
|
949
|
+
if (!sections.length) {
|
|
950
|
+
return;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
this.sections = sections.clone();
|
|
954
|
+
jQuery(".faceted-section-header").remove();
|
|
955
|
+
|
|
956
|
+
var div = jQuery("<div>");
|
|
957
|
+
div.addClass("faceted-section-tabs");
|
|
958
|
+
var ul = jQuery("<ul>").addClass("formTabs");
|
|
959
|
+
|
|
960
|
+
this.sections.each(function () {
|
|
961
|
+
var section = jQuery(this);
|
|
962
|
+
var section_id = section.attr("id").split("---")[1];
|
|
963
|
+
var li = jQuery("<li>");
|
|
964
|
+
|
|
965
|
+
li.attr("id", "section-tabs-" + section_id);
|
|
966
|
+
li.attr("class", "faceted-drag-drop formTab");
|
|
967
|
+
li.on("click", function () {
|
|
968
|
+
context.tab_clicked(this, section_id);
|
|
969
|
+
});
|
|
970
|
+
var a = jQuery("<a>");
|
|
971
|
+
a.text(section.attr("title"));
|
|
972
|
+
li.append(a);
|
|
973
|
+
ul.append(li);
|
|
974
|
+
if (!context.selected) {
|
|
975
|
+
context.selected = li;
|
|
976
|
+
}
|
|
977
|
+
});
|
|
978
|
+
|
|
979
|
+
div.append(ul);
|
|
980
|
+
jQuery("#faceted-edit-widgets-ajax").after(div);
|
|
981
|
+
|
|
982
|
+
this.context = div;
|
|
983
|
+
this.selected.click();
|
|
984
|
+
|
|
985
|
+
// Make it droppable
|
|
986
|
+
var tabs = jQuery("li", this.context);
|
|
987
|
+
tabs.sortable({
|
|
988
|
+
items: ".faceted-widget",
|
|
989
|
+
connectWith: ".faceted-drag-drop",
|
|
990
|
+
placeholder: "ui-state-highlight",
|
|
991
|
+
forcePlaceholderSize: false,
|
|
992
|
+
opacity: 0.7,
|
|
993
|
+
delay: 300,
|
|
994
|
+
cursor: "crosshair",
|
|
995
|
+
tolerance: "pointer",
|
|
996
|
+
receive: function (evt, ui) {
|
|
997
|
+
var tab = jQuery(this);
|
|
998
|
+
if (tab.hasClass("ui-tabs-selected")) {
|
|
999
|
+
jQuery(ui.sender).sortable("cancel");
|
|
1000
|
+
return;
|
|
1001
|
+
}
|
|
1002
|
+
context.receive_widget(ui.item, tab);
|
|
1003
|
+
},
|
|
1004
|
+
});
|
|
1005
|
+
},
|
|
1006
|
+
|
|
1007
|
+
tab_clicked: function (tab, section_id) {
|
|
1008
|
+
this.selected = jQuery(tab);
|
|
1009
|
+
if (this.selected.hasClass("ui-tabs-selected")) {
|
|
1010
|
+
return false;
|
|
1011
|
+
}
|
|
1012
|
+
var tabs = jQuery("li", this.context);
|
|
1013
|
+
|
|
1014
|
+
tabs.removeClass("ui-tabs-selected");
|
|
1015
|
+
this.selected.addClass("ui-tabs-selected");
|
|
1016
|
+
jQuery("a", tabs).removeClass("selected");
|
|
1017
|
+
jQuery("a", this.selected).addClass("selected");
|
|
1018
|
+
|
|
1019
|
+
if (section_id == "all") {
|
|
1020
|
+
jQuery("div.faceted-widgets").show();
|
|
1021
|
+
return false;
|
|
1022
|
+
}
|
|
1023
|
+
jQuery("div.faceted-widgets").hide();
|
|
1024
|
+
jQuery("div.faceted-" + section_id + "-widgets").show();
|
|
1025
|
+
return false;
|
|
1026
|
+
},
|
|
1027
|
+
|
|
1028
|
+
receive_widget: function (widget, section) {
|
|
1029
|
+
widget = jQuery(widget);
|
|
1030
|
+
section = jQuery(section);
|
|
1031
|
+
var context = this;
|
|
1032
|
+
widget.remove();
|
|
1033
|
+
var wid = widget.attr("id").split("_")[0];
|
|
1034
|
+
var sid = section.attr("id").replace("section-tabs-", "");
|
|
1035
|
+
context.selected = section;
|
|
1036
|
+
|
|
1037
|
+
// Submit
|
|
1038
|
+
var action = FacetedEdit.BASEURL + "@@faceted_configure";
|
|
1039
|
+
var query = {
|
|
1040
|
+
redirect: "",
|
|
1041
|
+
updateCriterion_button: "Save",
|
|
1042
|
+
cid: wid,
|
|
1043
|
+
};
|
|
1044
|
+
query[wid + "_section"] = sid;
|
|
1045
|
+
|
|
1046
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.AJAX_START, {
|
|
1047
|
+
msg: "Saving ...",
|
|
1048
|
+
});
|
|
1049
|
+
jQuery.post(action, query, function (data) {
|
|
1050
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.AJAX_STOP, {
|
|
1051
|
+
msg: data,
|
|
1052
|
+
});
|
|
1053
|
+
jQuery(FacetedEdit.Events).trigger(FacetedEdit.Events.RELOAD_WIDGETS, {
|
|
1054
|
+
msg: data,
|
|
1055
|
+
});
|
|
1056
|
+
});
|
|
1057
|
+
},
|
|
1058
|
+
};
|
|
1059
|
+
|
|
1060
|
+
FacetedEdit.Catalog = {
|
|
1061
|
+
initialize: function () {
|
|
1062
|
+
this.types = {};
|
|
1063
|
+
var context = this;
|
|
1064
|
+
jQuery.getJSON(
|
|
1065
|
+
FacetedEdit.BASEURL + "@@faceted.catalog.types.json",
|
|
1066
|
+
{},
|
|
1067
|
+
function (data) {
|
|
1068
|
+
context.types = data;
|
|
1069
|
+
}
|
|
1070
|
+
);
|
|
1071
|
+
|
|
1072
|
+
jQuery(FacetedEdit.Events).on(
|
|
1073
|
+
FacetedEdit.Events.CATALOG_CHANGED,
|
|
1074
|
+
function (evt, data) {
|
|
1075
|
+
context.handle_change(data.catalog, data.operator, data.cid);
|
|
1076
|
+
}
|
|
1077
|
+
);
|
|
1078
|
+
},
|
|
1079
|
+
|
|
1080
|
+
get: function (key) {
|
|
1081
|
+
return this.types[key];
|
|
1082
|
+
},
|
|
1083
|
+
|
|
1084
|
+
handle_change: function (catalog, operator, cid) {
|
|
1085
|
+
var select = jQuery("#faceted-" + cid + "-operator");
|
|
1086
|
+
var index = catalog.val();
|
|
1087
|
+
var mapping = this.get(index);
|
|
1088
|
+
var values = mapping ? mapping.operator : ["or"];
|
|
1089
|
+
|
|
1090
|
+
select.empty();
|
|
1091
|
+
jQuery("option", operator).each(function () {
|
|
1092
|
+
var option = jQuery(this).attr("value");
|
|
1093
|
+
if (jQuery.inArray(option, values) != -1) {
|
|
1094
|
+
select.append(jQuery(this).clone());
|
|
1095
|
+
}
|
|
1096
|
+
});
|
|
1097
|
+
},
|
|
1098
|
+
};
|
|
1099
|
+
|
|
1100
|
+
FacetedEdit.FormPage = {
|
|
1101
|
+
initialize: function () {
|
|
1102
|
+
this.cookie_id = "faceted-config-disable-ajax";
|
|
1103
|
+
var use_ajax = true;
|
|
1104
|
+
if (jQuery.cookie) {
|
|
1105
|
+
if (jQuery.cookie(this.cookie_id) === "disable") {
|
|
1106
|
+
use_ajax = false;
|
|
1107
|
+
}
|
|
1108
|
+
if (use_ajax) {
|
|
1109
|
+
this.add_ajax_button(
|
|
1110
|
+
"Disable AJAX UI",
|
|
1111
|
+
"configure_faceted.html",
|
|
1112
|
+
"disable"
|
|
1113
|
+
);
|
|
1114
|
+
} else {
|
|
1115
|
+
this.add_ajax_button("Enable AJAX UI", "configure_faceted.html", null);
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
if (use_ajax) {
|
|
1120
|
+
FacetedEdit.FormAddWidgets.initialize();
|
|
1121
|
+
FacetedEdit.FormImportExport.initialize();
|
|
1122
|
+
FacetedEdit.FormWidgets.initialize();
|
|
1123
|
+
FacetedEdit.FormMessage.initialize();
|
|
1124
|
+
FacetedEdit.FormPosition.initialize();
|
|
1125
|
+
FacetedEdit.FormEditWidget.initialize();
|
|
1126
|
+
FacetedEdit.Window.initialize();
|
|
1127
|
+
FacetedEdit.FormSections.initialize();
|
|
1128
|
+
FacetedEdit.Catalog.initialize();
|
|
1129
|
+
} else {
|
|
1130
|
+
jQuery("#faceted-edit-select-all-items").css("display", "inline");
|
|
1131
|
+
}
|
|
1132
|
+
},
|
|
1133
|
+
|
|
1134
|
+
add_ajax_button: function (label, action, cookie) {
|
|
1135
|
+
var button = jQuery("<span>");
|
|
1136
|
+
var context = this;
|
|
1137
|
+
button.html("X");
|
|
1138
|
+
if (cookie) {
|
|
1139
|
+
button.attr("class", "ui-icon ui-icon-extlink");
|
|
1140
|
+
} else {
|
|
1141
|
+
button.attr("class", "ui-icon ui-icon-newwin");
|
|
1142
|
+
}
|
|
1143
|
+
button
|
|
1144
|
+
.attr("title", label)
|
|
1145
|
+
.addClass("faceted-ajax")
|
|
1146
|
+
.on("click", function () {
|
|
1147
|
+
jQuery.cookie(context.cookie_id, cookie);
|
|
1148
|
+
window.location.href = action;
|
|
1149
|
+
});
|
|
1150
|
+
jQuery(".documentFirstHeading").before(button);
|
|
1151
|
+
},
|
|
1152
|
+
};
|
|
1153
|
+
|
|
1154
|
+
FacetedEdit.Load = function (evt, baseurl) {
|
|
1155
|
+
if (baseurl) {
|
|
1156
|
+
FacetedEdit.BASEURL = baseurl;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
FacetedEdit.FormPage.initialize();
|
|
1160
|
+
// Override calendar close handler method in order to raise custom events
|
|
1161
|
+
if (window.Calendar) {
|
|
1162
|
+
window.Calendar.prototype.callCloseHandler = function () {
|
|
1163
|
+
// Original code
|
|
1164
|
+
if (this.onClose) {
|
|
1165
|
+
this.onClose(this);
|
|
1166
|
+
}
|
|
1167
|
+
this.hideShowCovered();
|
|
1168
|
+
// Custom events
|
|
1169
|
+
var wid = this.params.inputField.id;
|
|
1170
|
+
wid = wid.split("_")[2];
|
|
1171
|
+
if (!wid) {
|
|
1172
|
+
return false;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
var widget = FacetedEdit.Widgets[wid];
|
|
1176
|
+
widget.set_default();
|
|
1177
|
+
return false;
|
|
1178
|
+
};
|
|
1179
|
+
}
|
|
1180
|
+
};
|
|
1181
|
+
|
|
1182
|
+
FacetedEdit.Unload = function () {};
|
|
1183
|
+
|
|
1184
|
+
// Unload
|
|
1185
|
+
jQuery(window).on("unload", function () {
|
|
1186
|
+
var context = jQuery("body").find(".faceted-edit-fieldset");
|
|
1187
|
+
if (context.length) {
|
|
1188
|
+
FacetedEdit.Unload();
|
|
1189
|
+
}
|
|
1190
|
+
});
|
|
1191
|
+
|
|
1192
|
+
// Load
|
|
1193
|
+
jQuery(function (evt) {
|
|
1194
|
+
var context = jQuery("body").find(".faceted-edit-fieldset");
|
|
1195
|
+
if (context.length) {
|
|
1196
|
+
FacetedEdit.Load(evt, context.data("baseurl"));
|
|
1197
|
+
}
|
|
1198
|
+
});
|