From 5e69de9db51efa1b7819b89393d6349a3d735580 Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Wed, 13 Dec 2017 20:34:08 -0400 Subject: [PATCH] Rebuild based on _s (#40) --- .editorconfig | 21 +- 404.php | 60 + LICENSE.md | 347 +- README.md | 136 +- app/activation.php | 60 - app/admin.php | 158 - app/controllers/App.php | 159 - app/controllers/FrontPage.php | 33 - app/controllers/PageCatalog.php | 35 - app/filters.php | 79 - app/helpers.php | 202 - app/intervention.php | 38 - app/setup.php | 199 - archive.php | 51 + {resources/assets => assets}/fonts/.gitkeep | 0 .../fonts/pressbooks-theme.woff | Bin {resources/assets => assets}/images/.gitkeep | 0 .../assets => assets}/images/banner.jpg | Bin .../images/catalog-header.jpg | Bin .../assets => assets}/images/header.jpg | Bin .../assets => assets}/images/left-arrow.svg | 0 {resources/assets => assets}/images/logo.svg | 0 {resources/assets => assets}/images/pb.svg | 0 .../assets => assets}/images/right-arrow.svg | 0 .../main.js => assets/scripts/aldine.js | 0 .../assets => assets}/scripts/customizer.js | 2 +- assets/scripts/routes/catalog.js | 112 + assets/scripts/routes/common.js | 16 + assets/scripts/routes/home.js | 6 + .../assets => assets}/scripts/util/Router.js | 0 .../scripts/util/camelCase.js | 0 .../main.scss => assets/styles/aldine.scss | 2 +- .../styles/common/_global.scss | 0 .../styles/common/_variables.scss | 0 .../styles/components/_comments.scss | 0 .../styles/components/_forms.scss | 0 .../styles/components/_grid.scss | 0 .../styles/components/_wp-classes.scss | 0 .../styles/layouts/_footer.scss | 0 .../styles/layouts/_header.scss | 0 .../styles/layouts/_pages.scss | 0 .../styles/layouts/_posts.scss | 0 .../styles/layouts/_sidebar.scss | 0 .../styles/layouts/_tinymce.scss | 0 .../styles/layouts/pages/_catalog.scss | 0 .../styles/layouts/pages/_front-page.scss | 0 .../assets => assets}/styles/login.scss | 0 comments.php | 72 + composer.json | 98 +- composer.lock | 999 +- config/assets.php | 31 - config/theme.php | 32 - config/view.php | 51 - dist/mix-manifest.json | 6 +- dist/scripts/aldine.js | 1 + dist/scripts/customizer.js | 2 +- dist/scripts/main.js | 1 - dist/styles/{main.css => aldine.css} | 0 footer.php | 85 +- functions.php | 255 +- header.php | 58 +- inc/actions/namespace.php | 51 + inc/activation/namespace.php | 66 + inc/customizer/namespace.php | 185 + inc/filters/namespace.php | 39 + inc/helpers/namespace.php | 146 + inc/intervention.php | 39 + inc/tags/namespace.php | 8 + index.php | 55 +- languages/aldine.pot | 186 + lib/infusion/Infusion-LICENSE.txt | 227 - lib/infusion/README.md | 212 - lib/infusion/ReleaseNotes.md | 344 - lib/infusion/infusion-uiOptions.js | 30 - lib/infusion/infusion-uiOptions.js.map | 1 - .../slidingPanel/js/SlidingPanel.js | 171 - .../slidingPanelDependencies.json | 16 - .../tableOfContents/css/TableOfContents.css | 3 - .../tableOfContents/html/TableOfContents.html | 32 - .../tableOfContents/js/TableOfContents.js | 377 - .../tableOfContentsDependencies.json | 15 - .../src/components/textToSpeech/js/MockTTS.js | 113 - .../textToSpeech/js/TextToSpeech.js | 288 - .../textToSpeechDependencies.json | 14 - .../textfieldSlider/js/TextfieldSlider.js | 312 - .../textfieldSliderDependencies.json | 18 - .../src/components/uiOptions/js/UIOptions.js | 45 - .../uiOptions/uiOptionsDependencies.json | 14 - lib/infusion/src/framework/core/css/fluid.css | 69 - .../src/framework/core/css/fluidDebugging.css | 132 - .../framework/core/frameworkDependencies.json | 26 - .../src/framework/core/images/debug_tab.png | Bin 3495 -> 0 bytes .../core/images/magnifying_glass.png | Bin 1389 -> 0 bytes .../src/framework/core/js/DataBinding.js | 1495 -- lib/infusion/src/framework/core/js/Fluid.js | 2806 --- .../framework/core/js/FluidDOMUtilities.js | 116 - .../src/framework/core/js/FluidDebugging.js | 300 - .../src/framework/core/js/FluidDocument.js | 191 - .../src/framework/core/js/FluidIoC.js | 2458 --- .../src/framework/core/js/FluidPromises.js | 266 - .../src/framework/core/js/FluidRequests.js | 439 - .../src/framework/core/js/FluidView.js | 693 - .../framework/core/js/FluidViewDebugging.js | 663 - .../src/framework/core/js/JavaProperties.js | 117 - .../framework/core/js/ModelTransformation.js | 675 - .../core/js/ModelTransformationTransforms.js | 743 - .../src/framework/core/js/ResourceLoader.js | 73 - .../framework/core/js/jquery.keyboard-a11y.js | 623 - .../framework/core/js/jquery.standalone.js | 152 - .../css/ProgressiveEnhancement.css | 4 - .../enhancement/enhancementDependencies.json | 14 - .../enhancement/js/ContextAwareness.js | 221 - .../enhancement/js/ProgressiveEnhancement.js | 34 - .../framework/preferences/css/Enactors.css | 1 - .../css/FullNoPreviewPrefsEditor.css | 1 - .../preferences/css/FullPrefsEditor.css | 1 - .../css/FullPreviewPrefsEditor.css | 1 - .../framework/preferences/css/PrefsEditor.css | 1 - .../css/SeparatedPanelPrefsEditor.css | 1 - .../css/SeparatedPanelPrefsEditorFrame.css | 1 - .../preferences/css/stylus/Enactors.styl | 42 - .../css/stylus/FullNoPreviewPrefsEditor.styl | 47 - .../css/stylus/FullPrefsEditor.styl | 47 - .../css/stylus/FullPreviewPrefsEditor.styl | 75 - .../preferences/css/stylus/PrefsEditor.styl | 420 - .../preferences/css/stylus/README.md | 26 - .../css/stylus/SeparatedPanelPrefsEditor.styl | 97 - .../SeparatedPanelPrefsEditorFrame.styl | 110 - .../preferences/css/stylus/utils/Helpers.styl | 43 - .../preferences/css/stylus/utils/Themes.styl | 358 - .../fonts/InfusionIcons-PrefsEditor.eot | Bin 4184 -> 0 bytes .../fonts/InfusionIcons-PrefsEditor.ttf | Bin 4036 -> 0 bytes .../html/FullNoPreviewPrefsEditor.html | 27 - .../html/FullPreviewPrefsEditor.html | 29 - .../html/PrefsEditorTemplate-contrast.html | 13 - .../PrefsEditorTemplate-emphasizeLinks.html | 2 - .../PrefsEditorTemplate-inputsLarger.html | 2 - .../html/PrefsEditorTemplate-layout.html | 10 - ...refsEditorTemplate-lineSpace-jQueryUI.html | 12 - ...fsEditorTemplate-lineSpace-nativeHTML.html | 12 - .../PrefsEditorTemplate-linksControls.html | 5 - .../html/PrefsEditorTemplate-speak.html | 10 - .../html/PrefsEditorTemplate-textFont.html | 6 - ...PrefsEditorTemplate-textSize-jQueryUI.html | 15 - ...efsEditorTemplate-textSize-nativeHTML.html | 15 - .../html/SeparatedPanelPrefsEditor.html | 12 - ...paratedPanelPrefsEditorFrame-jQueryUI.html | 34 - ...ratedPanelPrefsEditorFrame-nativeHTML.html | 30 - .../images/default/separatedpanelbg.png | Bin 7249 -> 0 bytes .../framework/preferences/js/AuxBuilder.js | 498 - .../src/framework/preferences/js/Builder.js | 208 - .../src/framework/preferences/js/Enactors.js | 431 - .../js/FullNoPreviewPrefsEditor.js | 49 - .../preferences/js/FullPreviewPrefsEditor.js | 80 - .../src/framework/preferences/js/Panels.js | 1034 -- .../framework/preferences/js/PrefsEditor.js | 473 - .../preferences/js/PrimaryBuilder.js | 129 - .../preferences/js/SelfVoicingEnactor.js | 135 - .../preferences/js/SelfVoicingPanel.js | 39 - .../preferences/js/SelfVoicingSchemas.js | 69 - .../js/SeparatedPanelPrefsEditor.js | 461 - .../framework/preferences/js/StarterGrades.js | 409 - .../preferences/js/StarterSchemas.js | 325 - .../src/framework/preferences/js/Store.js | 168 - .../framework/preferences/js/UIEnhancer.js | 118 - .../framework/preferences/js/URLUtilities.js | 159 - .../preferences/messages/contrast.json | 10 - .../preferences/messages/emphasizeLinks.json | 3 - .../preferences/messages/inputsLarger.json | 3 - .../preferences/messages/lineSpace.json | 5 - .../preferences/messages/linksControls.json | 3 - .../preferences/messages/prefsEditor.json | 7 - .../framework/preferences/messages/speak.json | 4 - .../preferences/messages/tableOfContents.json | 4 - .../preferences/messages/textFont.json | 9 - .../preferences/messages/textSize.json | 5 - .../preferences/preferencesDependencies.json | 45 - .../renderer/js/RendererUtilities.js | 663 - .../src/framework/renderer/js/fluidParser.js | 473 - .../framework/renderer/js/fluidRenderer.js | 1650 -- .../renderer/rendererDependencies.json | 16 - .../lib/fastXmlPull/fastXmlPull-LICENSE.txt | 34 - .../fastXmlPull/fastXmlPullDependencies.json | 9 - .../src/lib/fastXmlPull/js/fastXmlPull.js | 477 - .../src/lib/fonts/OpenSans-LICENSE.txt | 202 - lib/infusion/src/lib/fonts/OpenSans-Light.ttf | Bin 222412 -> 0 bytes .../src/lib/fonts/OpenSans-Regular.ttf | Bin 217360 -> 0 bytes .../src/lib/fonts/OpenSans-Semibold.ttf | Bin 221328 -> 0 bytes .../src/lib/fonts/fontsDependencies.json | 7 - .../lib/jquery/core/jQueryDependencies.json | 9 - lib/infusion/src/lib/jquery/core/js/jquery.js | 10074 ---------- .../jQueryTouchPunchPluginDependencies.json | 13 - .../touchPunch/js/jquery.ui.touch-punch.js | 160 - .../images/ui-icons_444444_256x240.png | Bin 6992 -> 0 bytes .../images/ui-icons_555555_256x240.png | Bin 6988 -> 0 bytes .../images/ui-icons_777620_256x240.png | Bin 4549 -> 0 bytes .../images/ui-icons_777777_256x240.png | Bin 6999 -> 0 bytes .../images/ui-icons_cc0000_256x240.png | Bin 4549 -> 0 bytes .../images/ui-icons_ffffff_256x240.png | Bin 6299 -> 0 bytes .../jquery/ui/css/default-theme/jquery-ui.css | 951 - .../src/lib/jquery/ui/css/fl-theme-bw/bw.css | 1312 -- .../images/ui-icons_000000_256x240.png | Bin 5331 -> 0 bytes .../images/ui-icons_ffffff_256x240.png | Bin 6299 -> 0 bytes .../src/lib/jquery/ui/css/fl-theme-by/by.css | 1312 -- .../images/ui-icons_000000_256x240.png | Bin 5331 -> 0 bytes .../images/ui-icons_ffff00_256x240.png | Bin 4549 -> 0 bytes .../lib/jquery/ui/css/fl-theme-dglg/dglg.css | 1312 -- .../images/ui-icons_555_256x240.png | Bin 6988 -> 0 bytes .../images/ui-icons_bdbdbb_256x240.png | Bin 4549 -> 0 bytes .../images/ui-icons_555_256x240.png | Bin 6988 -> 0 bytes .../images/ui-icons_bdbdbb_256x240.png | Bin 4549 -> 0 bytes .../lib/jquery/ui/css/fl-theme-lgdg/lgdg.css | 1312 -- .../images/ui-icons_000000_256x240.png | Bin 5331 -> 0 bytes .../images/ui-icons_ffffff_256x240.png | Bin 6299 -> 0 bytes .../src/lib/jquery/ui/css/fl-theme-wb/wb.css | 1312 -- .../images/ui-icons_000000_256x240.png | Bin 5331 -> 0 bytes .../images/ui-icons_ffff00_256x240.png | Bin 4549 -> 0 bytes .../src/lib/jquery/ui/css/fl-theme-yb/yb.css | 1312 -- .../lib/jquery/ui/jQueryUIDependencies.json | 12 - .../src/lib/jquery/ui/js/jquery-ui.js | 8331 --------- .../src/lib/normalize/css/normalize.css | 419 - .../lib/normalize/normalizeDependencies.json | 9 - package-lock.json | 15377 ---------------- package.json | 114 +- page-catalog.php | 24 + page.php | 44 + partials/book.php | 21 + partials/contact-form.php | 42 + partials/content-front-page.php | 60 + partials/content-none.php | 50 + partials/content-page-catalog.php | 89 + partials/content-page.php | 50 + partials/content-search.php | 30 + partials/content-single.php | 1 + partials/content.php | 54 + partials/page-block.php | 1 + partials/page-header.php | 3 + phpcs.ruleset.xml | 41 + phpcs.xml | 71 - phpcs.xml.dist | 60 + readme.txt | 57 + resources/assets/build/.eslintrc | 14 - resources/assets/build/config.js | 60 - resources/assets/build/helpers/hmr-client.js | 7 - resources/assets/build/helpers/public-path.js | 7 - resources/assets/build/postcss.config.js | 15 - .../assets/build/util/addHotMiddleware.js | 15 - .../build/util/assetManifestsFormatter.js | 34 - resources/assets/build/util/desire.js | 14 - resources/assets/build/webpack.config.js | 216 - .../assets/build/webpack.config.optimize.js | 19 - .../assets/build/webpack.config.watch.js | 35 - resources/assets/config.json | 20 - resources/assets/scripts/routes/catalog.js | 101 - resources/assets/scripts/routes/common.js | 14 - resources/assets/scripts/routes/home.js | 7 - resources/views/404.blade.php | 14 - resources/views/front-page.blade.php | 47 - resources/views/index.blade.php | 18 - resources/views/layouts/app.blade.php | 21 - resources/views/page-catalog.blade.php | 69 - resources/views/page.blade.php | 10 - resources/views/partials/book.blade.php | 17 - resources/views/partials/comments.blade.php | 38 - .../views/partials/contact-form.blade.php | 22 - .../views/partials/content-page.blade.php | 2 - .../views/partials/content-search.blade.php | 11 - .../views/partials/content-single.blade.php | 13 - resources/views/partials/content.blade.php | 9 - resources/views/partials/entry-meta.blade.php | 6 - resources/views/partials/footer.blade.php | 50 - resources/views/partials/head.blade.php | 6 - resources/views/partials/header.blade.php | 31 - resources/views/partials/page-block.blade.php | 7 - .../views/partials/page-header.blade.php | 3 - resources/views/partials/sidebar.blade.php | 1 - resources/views/partials/svg.blade.php | 7 - resources/views/partials/uio-script.blade.php | 11 - resources/views/partials/uio.blade.php | 9 - resources/views/search.blade.php | 18 - resources/views/single.blade.php | 7 - resources/views/template-custom.blade.php | 12 - search.php | 51 + sidebar.php | 17 + single.php | 35 + style.css | 10 +- webpack.mix.js | 79 +- 287 files changed, 2992 insertions(+), 70920 deletions(-) create mode 100644 404.php delete mode 100644 app/activation.php delete mode 100644 app/admin.php delete mode 100644 app/controllers/App.php delete mode 100644 app/controllers/FrontPage.php delete mode 100644 app/controllers/PageCatalog.php delete mode 100644 app/filters.php delete mode 100644 app/helpers.php delete mode 100644 app/intervention.php delete mode 100644 app/setup.php create mode 100644 archive.php rename {resources/assets => assets}/fonts/.gitkeep (100%) rename {resources/assets => assets}/fonts/pressbooks-theme.woff (100%) rename {resources/assets => assets}/images/.gitkeep (100%) rename {resources/assets => assets}/images/banner.jpg (100%) rename {resources/assets => assets}/images/catalog-header.jpg (100%) rename {resources/assets => assets}/images/header.jpg (100%) rename {resources/assets => assets}/images/left-arrow.svg (100%) rename {resources/assets => assets}/images/logo.svg (100%) rename {resources/assets => assets}/images/pb.svg (100%) rename {resources/assets => assets}/images/right-arrow.svg (100%) rename resources/assets/scripts/main.js => assets/scripts/aldine.js (100%) rename {resources/assets => assets}/scripts/customizer.js (57%) create mode 100644 assets/scripts/routes/catalog.js create mode 100644 assets/scripts/routes/common.js create mode 100644 assets/scripts/routes/home.js rename {resources/assets => assets}/scripts/util/Router.js (100%) rename {resources/assets => assets}/scripts/util/camelCase.js (100%) rename resources/assets/styles/main.scss => assets/styles/aldine.scss (92%) rename {resources/assets => assets}/styles/common/_global.scss (100%) rename {resources/assets => assets}/styles/common/_variables.scss (100%) rename {resources/assets => assets}/styles/components/_comments.scss (100%) rename {resources/assets => assets}/styles/components/_forms.scss (100%) rename {resources/assets => assets}/styles/components/_grid.scss (100%) rename {resources/assets => assets}/styles/components/_wp-classes.scss (100%) rename {resources/assets => assets}/styles/layouts/_footer.scss (100%) rename {resources/assets => assets}/styles/layouts/_header.scss (100%) rename {resources/assets => assets}/styles/layouts/_pages.scss (100%) rename {resources/assets => assets}/styles/layouts/_posts.scss (100%) rename {resources/assets => assets}/styles/layouts/_sidebar.scss (100%) rename {resources/assets => assets}/styles/layouts/_tinymce.scss (100%) rename {resources/assets => assets}/styles/layouts/pages/_catalog.scss (100%) rename {resources/assets => assets}/styles/layouts/pages/_front-page.scss (100%) rename {resources/assets => assets}/styles/login.scss (100%) create mode 100644 comments.php delete mode 100644 config/assets.php delete mode 100644 config/theme.php delete mode 100644 config/view.php create mode 100644 dist/scripts/aldine.js delete mode 100644 dist/scripts/main.js rename dist/styles/{main.css => aldine.css} (100%) create mode 100644 inc/actions/namespace.php create mode 100644 inc/activation/namespace.php create mode 100644 inc/customizer/namespace.php create mode 100644 inc/filters/namespace.php create mode 100644 inc/helpers/namespace.php create mode 100644 inc/intervention.php create mode 100644 inc/tags/namespace.php create mode 100644 languages/aldine.pot delete mode 100644 lib/infusion/Infusion-LICENSE.txt delete mode 100644 lib/infusion/README.md delete mode 100644 lib/infusion/ReleaseNotes.md delete mode 100644 lib/infusion/infusion-uiOptions.js delete mode 100644 lib/infusion/infusion-uiOptions.js.map delete mode 100644 lib/infusion/src/components/slidingPanel/js/SlidingPanel.js delete mode 100644 lib/infusion/src/components/slidingPanel/slidingPanelDependencies.json delete mode 100644 lib/infusion/src/components/tableOfContents/css/TableOfContents.css delete mode 100644 lib/infusion/src/components/tableOfContents/html/TableOfContents.html delete mode 100644 lib/infusion/src/components/tableOfContents/js/TableOfContents.js delete mode 100644 lib/infusion/src/components/tableOfContents/tableOfContentsDependencies.json delete mode 100644 lib/infusion/src/components/textToSpeech/js/MockTTS.js delete mode 100644 lib/infusion/src/components/textToSpeech/js/TextToSpeech.js delete mode 100644 lib/infusion/src/components/textToSpeech/textToSpeechDependencies.json delete mode 100644 lib/infusion/src/components/textfieldSlider/js/TextfieldSlider.js delete mode 100644 lib/infusion/src/components/textfieldSlider/textfieldSliderDependencies.json delete mode 100644 lib/infusion/src/components/uiOptions/js/UIOptions.js delete mode 100644 lib/infusion/src/components/uiOptions/uiOptionsDependencies.json delete mode 100644 lib/infusion/src/framework/core/css/fluid.css delete mode 100644 lib/infusion/src/framework/core/css/fluidDebugging.css delete mode 100644 lib/infusion/src/framework/core/frameworkDependencies.json delete mode 100644 lib/infusion/src/framework/core/images/debug_tab.png delete mode 100644 lib/infusion/src/framework/core/images/magnifying_glass.png delete mode 100644 lib/infusion/src/framework/core/js/DataBinding.js delete mode 100644 lib/infusion/src/framework/core/js/Fluid.js delete mode 100644 lib/infusion/src/framework/core/js/FluidDOMUtilities.js delete mode 100644 lib/infusion/src/framework/core/js/FluidDebugging.js delete mode 100644 lib/infusion/src/framework/core/js/FluidDocument.js delete mode 100644 lib/infusion/src/framework/core/js/FluidIoC.js delete mode 100644 lib/infusion/src/framework/core/js/FluidPromises.js delete mode 100644 lib/infusion/src/framework/core/js/FluidRequests.js delete mode 100644 lib/infusion/src/framework/core/js/FluidView.js delete mode 100644 lib/infusion/src/framework/core/js/FluidViewDebugging.js delete mode 100644 lib/infusion/src/framework/core/js/JavaProperties.js delete mode 100644 lib/infusion/src/framework/core/js/ModelTransformation.js delete mode 100644 lib/infusion/src/framework/core/js/ModelTransformationTransforms.js delete mode 100644 lib/infusion/src/framework/core/js/ResourceLoader.js delete mode 100644 lib/infusion/src/framework/core/js/jquery.keyboard-a11y.js delete mode 100644 lib/infusion/src/framework/core/js/jquery.standalone.js delete mode 100644 lib/infusion/src/framework/enhancement/css/ProgressiveEnhancement.css delete mode 100644 lib/infusion/src/framework/enhancement/enhancementDependencies.json delete mode 100644 lib/infusion/src/framework/enhancement/js/ContextAwareness.js delete mode 100644 lib/infusion/src/framework/enhancement/js/ProgressiveEnhancement.js delete mode 100644 lib/infusion/src/framework/preferences/css/Enactors.css delete mode 100644 lib/infusion/src/framework/preferences/css/FullNoPreviewPrefsEditor.css delete mode 100644 lib/infusion/src/framework/preferences/css/FullPrefsEditor.css delete mode 100644 lib/infusion/src/framework/preferences/css/FullPreviewPrefsEditor.css delete mode 100644 lib/infusion/src/framework/preferences/css/PrefsEditor.css delete mode 100644 lib/infusion/src/framework/preferences/css/SeparatedPanelPrefsEditor.css delete mode 100644 lib/infusion/src/framework/preferences/css/SeparatedPanelPrefsEditorFrame.css delete mode 100644 lib/infusion/src/framework/preferences/css/stylus/Enactors.styl delete mode 100644 lib/infusion/src/framework/preferences/css/stylus/FullNoPreviewPrefsEditor.styl delete mode 100644 lib/infusion/src/framework/preferences/css/stylus/FullPrefsEditor.styl delete mode 100644 lib/infusion/src/framework/preferences/css/stylus/FullPreviewPrefsEditor.styl delete mode 100644 lib/infusion/src/framework/preferences/css/stylus/PrefsEditor.styl delete mode 100644 lib/infusion/src/framework/preferences/css/stylus/README.md delete mode 100644 lib/infusion/src/framework/preferences/css/stylus/SeparatedPanelPrefsEditor.styl delete mode 100644 lib/infusion/src/framework/preferences/css/stylus/SeparatedPanelPrefsEditorFrame.styl delete mode 100644 lib/infusion/src/framework/preferences/css/stylus/utils/Helpers.styl delete mode 100644 lib/infusion/src/framework/preferences/css/stylus/utils/Themes.styl delete mode 100644 lib/infusion/src/framework/preferences/fonts/InfusionIcons-PrefsEditor.eot delete mode 100644 lib/infusion/src/framework/preferences/fonts/InfusionIcons-PrefsEditor.ttf delete mode 100644 lib/infusion/src/framework/preferences/html/FullNoPreviewPrefsEditor.html delete mode 100644 lib/infusion/src/framework/preferences/html/FullPreviewPrefsEditor.html delete mode 100644 lib/infusion/src/framework/preferences/html/PrefsEditorTemplate-contrast.html delete mode 100644 lib/infusion/src/framework/preferences/html/PrefsEditorTemplate-emphasizeLinks.html delete mode 100644 lib/infusion/src/framework/preferences/html/PrefsEditorTemplate-inputsLarger.html delete mode 100644 lib/infusion/src/framework/preferences/html/PrefsEditorTemplate-layout.html delete mode 100644 lib/infusion/src/framework/preferences/html/PrefsEditorTemplate-lineSpace-jQueryUI.html delete mode 100644 lib/infusion/src/framework/preferences/html/PrefsEditorTemplate-lineSpace-nativeHTML.html delete mode 100644 lib/infusion/src/framework/preferences/html/PrefsEditorTemplate-linksControls.html delete mode 100644 lib/infusion/src/framework/preferences/html/PrefsEditorTemplate-speak.html delete mode 100644 lib/infusion/src/framework/preferences/html/PrefsEditorTemplate-textFont.html delete mode 100644 lib/infusion/src/framework/preferences/html/PrefsEditorTemplate-textSize-jQueryUI.html delete mode 100644 lib/infusion/src/framework/preferences/html/PrefsEditorTemplate-textSize-nativeHTML.html delete mode 100644 lib/infusion/src/framework/preferences/html/SeparatedPanelPrefsEditor.html delete mode 100644 lib/infusion/src/framework/preferences/html/SeparatedPanelPrefsEditorFrame-jQueryUI.html delete mode 100644 lib/infusion/src/framework/preferences/html/SeparatedPanelPrefsEditorFrame-nativeHTML.html delete mode 100644 lib/infusion/src/framework/preferences/images/default/separatedpanelbg.png delete mode 100644 lib/infusion/src/framework/preferences/js/AuxBuilder.js delete mode 100644 lib/infusion/src/framework/preferences/js/Builder.js delete mode 100644 lib/infusion/src/framework/preferences/js/Enactors.js delete mode 100644 lib/infusion/src/framework/preferences/js/FullNoPreviewPrefsEditor.js delete mode 100644 lib/infusion/src/framework/preferences/js/FullPreviewPrefsEditor.js delete mode 100644 lib/infusion/src/framework/preferences/js/Panels.js delete mode 100644 lib/infusion/src/framework/preferences/js/PrefsEditor.js delete mode 100644 lib/infusion/src/framework/preferences/js/PrimaryBuilder.js delete mode 100644 lib/infusion/src/framework/preferences/js/SelfVoicingEnactor.js delete mode 100644 lib/infusion/src/framework/preferences/js/SelfVoicingPanel.js delete mode 100644 lib/infusion/src/framework/preferences/js/SelfVoicingSchemas.js delete mode 100644 lib/infusion/src/framework/preferences/js/SeparatedPanelPrefsEditor.js delete mode 100644 lib/infusion/src/framework/preferences/js/StarterGrades.js delete mode 100644 lib/infusion/src/framework/preferences/js/StarterSchemas.js delete mode 100644 lib/infusion/src/framework/preferences/js/Store.js delete mode 100644 lib/infusion/src/framework/preferences/js/UIEnhancer.js delete mode 100644 lib/infusion/src/framework/preferences/js/URLUtilities.js delete mode 100644 lib/infusion/src/framework/preferences/messages/contrast.json delete mode 100644 lib/infusion/src/framework/preferences/messages/emphasizeLinks.json delete mode 100644 lib/infusion/src/framework/preferences/messages/inputsLarger.json delete mode 100644 lib/infusion/src/framework/preferences/messages/lineSpace.json delete mode 100644 lib/infusion/src/framework/preferences/messages/linksControls.json delete mode 100644 lib/infusion/src/framework/preferences/messages/prefsEditor.json delete mode 100644 lib/infusion/src/framework/preferences/messages/speak.json delete mode 100644 lib/infusion/src/framework/preferences/messages/tableOfContents.json delete mode 100644 lib/infusion/src/framework/preferences/messages/textFont.json delete mode 100644 lib/infusion/src/framework/preferences/messages/textSize.json delete mode 100644 lib/infusion/src/framework/preferences/preferencesDependencies.json delete mode 100644 lib/infusion/src/framework/renderer/js/RendererUtilities.js delete mode 100644 lib/infusion/src/framework/renderer/js/fluidParser.js delete mode 100644 lib/infusion/src/framework/renderer/js/fluidRenderer.js delete mode 100644 lib/infusion/src/framework/renderer/rendererDependencies.json delete mode 100644 lib/infusion/src/lib/fastXmlPull/fastXmlPull-LICENSE.txt delete mode 100644 lib/infusion/src/lib/fastXmlPull/fastXmlPullDependencies.json delete mode 100644 lib/infusion/src/lib/fastXmlPull/js/fastXmlPull.js delete mode 100644 lib/infusion/src/lib/fonts/OpenSans-LICENSE.txt delete mode 100644 lib/infusion/src/lib/fonts/OpenSans-Light.ttf delete mode 100644 lib/infusion/src/lib/fonts/OpenSans-Regular.ttf delete mode 100644 lib/infusion/src/lib/fonts/OpenSans-Semibold.ttf delete mode 100644 lib/infusion/src/lib/fonts/fontsDependencies.json delete mode 100644 lib/infusion/src/lib/jquery/core/jQueryDependencies.json delete mode 100644 lib/infusion/src/lib/jquery/core/js/jquery.js delete mode 100644 lib/infusion/src/lib/jquery/plugins/touchPunch/jQueryTouchPunchPluginDependencies.json delete mode 100644 lib/infusion/src/lib/jquery/plugins/touchPunch/js/jquery.ui.touch-punch.js delete mode 100644 lib/infusion/src/lib/jquery/ui/css/default-theme/images/ui-icons_444444_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/default-theme/images/ui-icons_555555_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/default-theme/images/ui-icons_777620_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/default-theme/images/ui-icons_777777_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/default-theme/images/ui-icons_cc0000_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/default-theme/images/ui-icons_ffffff_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/default-theme/jquery-ui.css delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-bw/bw.css delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-bw/images/ui-icons_000000_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-bw/images/ui-icons_ffffff_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-by/by.css delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-by/images/ui-icons_000000_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-by/images/ui-icons_ffff00_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-dglg/dglg.css delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-dglg/images/ui-icons_555_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-dglg/images/ui-icons_bdbdbb_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-lgdg/images/ui-icons_555_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-lgdg/images/ui-icons_bdbdbb_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-lgdg/lgdg.css delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-wb/images/ui-icons_000000_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-wb/images/ui-icons_ffffff_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-wb/wb.css delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-yb/images/ui-icons_000000_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-yb/images/ui-icons_ffff00_256x240.png delete mode 100644 lib/infusion/src/lib/jquery/ui/css/fl-theme-yb/yb.css delete mode 100644 lib/infusion/src/lib/jquery/ui/jQueryUIDependencies.json delete mode 100644 lib/infusion/src/lib/jquery/ui/js/jquery-ui.js delete mode 100644 lib/infusion/src/lib/normalize/css/normalize.css delete mode 100644 lib/infusion/src/lib/normalize/normalizeDependencies.json delete mode 100644 package-lock.json create mode 100644 page-catalog.php create mode 100644 page.php create mode 100644 partials/book.php create mode 100644 partials/contact-form.php create mode 100644 partials/content-front-page.php create mode 100644 partials/content-none.php create mode 100644 partials/content-page-catalog.php create mode 100644 partials/content-page.php create mode 100644 partials/content-search.php create mode 100644 partials/content-single.php create mode 100644 partials/content.php create mode 100644 partials/page-block.php create mode 100644 partials/page-header.php create mode 100644 phpcs.ruleset.xml delete mode 100644 phpcs.xml create mode 100644 phpcs.xml.dist create mode 100644 readme.txt delete mode 100644 resources/assets/build/.eslintrc delete mode 100644 resources/assets/build/config.js delete mode 100644 resources/assets/build/helpers/hmr-client.js delete mode 100644 resources/assets/build/helpers/public-path.js delete mode 100644 resources/assets/build/postcss.config.js delete mode 100644 resources/assets/build/util/addHotMiddleware.js delete mode 100644 resources/assets/build/util/assetManifestsFormatter.js delete mode 100644 resources/assets/build/util/desire.js delete mode 100644 resources/assets/build/webpack.config.js delete mode 100644 resources/assets/build/webpack.config.optimize.js delete mode 100644 resources/assets/build/webpack.config.watch.js delete mode 100644 resources/assets/config.json delete mode 100644 resources/assets/scripts/routes/catalog.js delete mode 100644 resources/assets/scripts/routes/common.js delete mode 100644 resources/assets/scripts/routes/home.js delete mode 100644 resources/views/404.blade.php delete mode 100644 resources/views/front-page.blade.php delete mode 100644 resources/views/index.blade.php delete mode 100644 resources/views/layouts/app.blade.php delete mode 100644 resources/views/page-catalog.blade.php delete mode 100644 resources/views/page.blade.php delete mode 100644 resources/views/partials/book.blade.php delete mode 100644 resources/views/partials/comments.blade.php delete mode 100644 resources/views/partials/contact-form.blade.php delete mode 100644 resources/views/partials/content-page.blade.php delete mode 100644 resources/views/partials/content-search.blade.php delete mode 100644 resources/views/partials/content-single.blade.php delete mode 100644 resources/views/partials/content.blade.php delete mode 100644 resources/views/partials/entry-meta.blade.php delete mode 100644 resources/views/partials/footer.blade.php delete mode 100644 resources/views/partials/head.blade.php delete mode 100644 resources/views/partials/header.blade.php delete mode 100644 resources/views/partials/page-block.blade.php delete mode 100644 resources/views/partials/page-header.blade.php delete mode 100644 resources/views/partials/sidebar.blade.php delete mode 100644 resources/views/partials/svg.blade.php delete mode 100644 resources/views/partials/uio-script.blade.php delete mode 100644 resources/views/partials/uio.blade.php delete mode 100644 resources/views/search.blade.php delete mode 100644 resources/views/single.blade.php delete mode 100644 resources/views/template-custom.blade.php create mode 100644 search.php create mode 100644 sidebar.php create mode 100644 single.php diff --git a/.editorconfig b/.editorconfig index e5c8d6c..27da7b7 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,17 +1,24 @@ +# This file is for unifying the coding style for different editors and IDEs # editorconfig.org +# WordPress Coding Standards +# https://make.wordpress.org/core/handbook/coding-standards/ + root = true [*] -indent_style = space -indent_size = 2 -end_of_line = lf charset = utf-8 -trim_trailing_whitespace = true +end_of_line = lf insert_final_newline = true +trim_trailing_whitespace = true +indent_style = tab -[*.php] -indent_size = 4 +[*.md] +trim_trailing_whitespace = false -[resources/views/**.php] +[{.jshintrc,*.json,*.yml,*.scss}] +indent_style = space indent_size = 2 + +[{*.txt,wp-config-sample.php}] +end_of_line = crlf diff --git a/404.php b/404.php new file mode 100644 index 0000000..fc4da80 --- /dev/null +++ b/404.php @@ -0,0 +1,60 @@ + + +
+
+ +
+ + +
+

+ + + +
+

+
    + 'count', + 'order' => 'DESC', + 'show_count' => 1, + 'title_li' => '', + 'number' => 10, + ] ); + ?> +
+
+ + ' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'pressbooks-aldine' ), convert_smilies( ':)' ) ) . '

'; + the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=$archive_content" ); + + the_widget( 'WP_Widget_Tag_Cloud' ); + ?> + +
+
+ +
+
+ + + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + Preamble -You should have received a copy of the GNU General Public License -along with this program. If not, see . + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. -This project is based on work covered by the following copyright and permission notice: + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. -Copyright (c) Ben Word and Scott Walkinshaw + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {description} + Copyright (C) {year} {fullname} + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + {signature of Ty Coon}, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/README.md b/README.md index 81e4865..93df057 100644 --- a/README.md +++ b/README.md @@ -1,74 +1,68 @@ -# Aldine +# Aldine [![Build Status](https://travis-ci.org/pressbooks/pressbooks-aldine.svg?branch=dev)](https://travis-ci.org/pressbooks/pressbooks-aldine) [![GitHub Release](https://img.shields.io/github/release/pressbooks/pressbooks-aldine/all.svg)](https://github.com/pressbooks/pressbooks-aldine/releases/latest) -Aldine is the new root theme for [Pressbooks](https://github.com/pressbooks/pressbooks), based on [Sage](https://roots.io/sage/). - -## Features - -* Sass for stylesheets -* ES6 for JavaScript -* [Webpack](https://webpack.github.io/) for compiling assets, optimizing images, and concatenating and minifying files -* [Browsersync](http://www.browsersync.io/) for synchronized browser testing -* [Laravel Blade](https://laravel.com/docs/5.4/blade) as a templating engine -* [Controller](https://github.com/soberwp/controller) for passing data to Blade templates - -## Requirements - -Make sure all dependencies have been installed before moving on: - -* [PHP](http://php.net/manual/en/install.php) >= 7.0 -* [Composer](https://getcomposer.org/download/) -* [WordPress](https://wordpress.org/) >= 4.8.1 -* [Pressbooks](https://github.com/pressbooks/pressbooks) >= 4.3 -* [Node.js](http://nodejs.org/) >= 6.9.x -* [Yarn](https://yarnpkg.com/en/docs/install) - -## Theme installation - -Download the [latest zipped release](https://github.com/pressbooks/pressbooks-aldine/releases/latest) to your Pressbooks themes directory (`wp-content/themes` or `app/themes`) and unzip the theme folder. - -## Theme structure - -```shell -themes/pressbooks-aldine/ # → Theme root -├── app/ # → Theme PHP -│ ├── controllers/ # → Controller files -│ ├── widgets/ # → Custom widget classes -│ ├── admin.php # → Theme customizer setup -│ ├── filters.php # → Theme filters -│ ├── helpers.php # → Helper functions -│ └── setup.php # → Theme setup -│ └── widgets.php # → Widget initialization -├── composer.json # → Autoloading for `app/` files -├── composer.lock # → Composer lock file (never edit) -├── dist/ # → Built theme assets (never edit) -├── functions.php # → Composer autoloader, theme includes -├── index.php # → Never manually edit -├── node_modules/ # → Node.js packages (never edit) -├── package.json # → Node.js dependencies and scripts -├── resources/ # → Theme assets and templates -│ ├── assets/ # → Front-end assets -│ │ ├── config.json # → Settings for compiled assets -│ │ ├── build/ # → Webpack and ESLint config -│ │ ├── fonts/ # → Theme fonts -│ │ ├── images/ # → Theme images -│ │ ├── scripts/ # → Theme JS -│ │ └── styles/ # → Theme stylesheets -│ └── views/ # → Theme templates -│ ├── layouts/ # → Base templates -│ └── partials/ # → Partial templates -├── screenshot.png # → Theme screenshot for WP admin -├── style.css # → Theme meta information -└── vendor/ # → Composer packages (never edit) -``` - -## Theme development - -* Run `yarn` from the theme directory to install dependencies - -### Build commands - -* `yarn run start` — Compile assets when file changes are made, start Browsersync session -* `yarn run build` — Compile and optimize the files in your assets directory -* `yarn run build:production` — Compile assets for production +**Tags:** publishing, catalog, pressbooks, default-theme + +**Requires at least:** 4.9.1 +**Tested up to:** 4.9.1 +**Stable tag:** 1.0.0-alpha6 +**License:** GNU General Public License v2 or later +**License URI:** LICENSE + +Aldine is the root theme for Pressbooks. + + +## Description + +Aldine is the root theme for [Pressbooks](https://pressbooks.org), based on [Underscores](https://underscores.me/). + + +## Installation + +1. In your admin panel, go to Appearance > Themes and click the Add New button. +2. Click Upload Theme and Choose File, then select the theme's [.zip file](https://github.com/pressbooks/pressbooks-aldine/releases/latest/). Click Install Now. +3. Click Activate to use your new theme right away. + + +## Frequently Asked Questions + +TK. + + +## Changelog + + +### 1.0.0-alpha6 +* **[FEATURE]** Add Per Soderlind's WCAG validator to customizer. +* **[FEATURE]** Add Thema subject support. + + +### 1.0.0-alpha5 +* **[CORE ENHANCEMENT]** Configure for use without Pressbooks (see #26). + + +### 1.0.0-alpha4 +* **[CORE ENHANCEMENT]** Save `/dist` folder. +* **[FIX]** Add temporary fix for roots/sage-lib#2. + + +### 1.0.0-alpha3 +* **[CORE ENHANCEMENT]** Move required theme files to root (see #24 and #25). + + +### 1.0.0-alpha2 +* **[CORE ENHANCEMENT]** Optimize activation routine. +* **[FIX]** Remove extra wrapper on catalog and landing pages. +* **[FIX]** Resolve error when activating without active widgets. + + +### 1.0.0-alpha1 +* Basic landing page implementation +* Basic catalog page implementation +* Basic customizer capabilities + + +## Credits + +* Based on [Underscores](https://underscores.me/), (C) 2012-2017 Automattic, Inc., [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html) diff --git a/app/activation.php b/app/activation.php deleted file mode 100644 index 29de7ca..0000000 --- a/app/activation.php +++ /dev/null @@ -1,60 +0,0 @@ -text(file_get_contents(get_stylesheet_directory() . '/docs/about.md')); - $help = $extra->text(file_get_contents(get_stylesheet_directory() . '/docs/help.md')); - - $default_pages = [ - 'about' => [ - 'post_title' => __('About', 'aldine'), - 'post_content' => apply_filters('pb_root_about_page_content', $about) - ], - 'help' => [ - 'post_title' => __('Help', 'aldine'), - 'post_content' => apply_filters('pb_root_help_page_content', $help) - ], - 'catalog' => [ - 'post_title' => __('Catalog', 'aldine'), - 'post_content' => '' - ], - 'home' => [ - 'post_title' => __('Home', 'aldine'), - 'post_content' => '' - ], - ]; - - // Add our pages - $pages = []; - - foreach ($default_pages as $slug => $page) { - $check = get_page_by_path($slug); - if (empty($check)) { - $pages[$slug] = wp_insert_post(array_merge($page, ['post_type' => 'page', 'post_status' => 'publish'])); - } else { - $pages[$slug] = $check->ID; - } - } - - // Set front page to Home - update_option('show_on_front', 'page'); - update_option('page_on_front', $pages['home']); - - // Remove content generated by wp_install_defaults - if (! wp_delete_post(1, true)) { - return; - } - if (! wp_delete_post(2, true)) { - return; - } - if (! wp_delete_comment(1, true)) { - return; - } - - // Add "pb_aldine_activated" option to enable check above - add_option('pb_aldine_activated', 1); - } -}); diff --git a/app/admin.php b/app/admin.php deleted file mode 100644 index d508205..0000000 --- a/app/admin.php +++ /dev/null @@ -1,158 +0,0 @@ -get_setting('blogname')->transport = 'postMessage'; - $wp_customize->selective_refresh->add_partial('blogname', [ - 'selector' => '.branding h1 a', - 'render_callback' => function () { - bloginfo('name'); - } - ]); - - // Add settings - foreach ([ - [ - 'slug' => 'primary', - 'hex' => '#b01109', - 'label' => __('Primary Color', 'aldine'), - 'description' => __('Primary color, used for links and other primary elements.', 'aldine'), - ], - [ - 'slug' => 'accent', - 'hex' => '#015d75', - 'label' => __('Accent Color', 'aldine'), - 'description' => __('Accent color, used for flourishes and secondary elements.', 'aldine'), - ], - [ - 'slug' => 'primary_fg', - 'hex' => '#ffffff', - 'label' => __('Primary Foreground Color', 'aldine'), - 'description' => __('Used for text on a primary background.', 'aldine'), - ], - [ - 'slug' => 'accent_fg', - 'hex' => '#ffffff', - 'label' => __('Accent Foreground Color', 'aldine'), - 'description' => __('Used for text on an accent color background.', 'aldine'), - ], - ] as $color) { - $wp_customize->add_setting("pb_network_color_{$color['slug']}", [ - 'type' => 'option', - 'default' => $color['hex'], - ]); - $wp_customize->add_control(new \WP_Customize_Color_Control( - $wp_customize, - "pb_network_color_{$color['slug']}", - [ - 'label' => $color['label'], - 'section' => 'colors', - 'description' => $color['description'], - 'settings' => "pb_network_color_{$color['slug']}", - ] - )); - } - $wp_customize->add_section('pb_network_social', [ - 'title' => __('Social Media', 'aldine'), - 'priority' => 30, - ]); - $wp_customize->add_setting('pb_network_facebook', [ - 'type' => 'option', - 'sanitize_callback' => 'esc_url_raw', - ]); - $wp_customize->add_control('pb_network_facebook', [ - 'label' => __('Facebook', 'aldine'), - 'section' => 'pb_network_social', - 'settings' => 'pb_network_facebook', - ]); - $wp_customize->add_setting('pb_network_twitter', [ - 'type' => 'option', - 'sanitize_callback' => 'esc_url_raw', - ]); - $wp_customize->add_control('pb_network_twitter', [ - 'label' => __('Twitter', 'aldine'), - 'section' => 'pb_network_social', - 'settings' => 'pb_network_twitter', - ]); - - if (function_exists('pb_meets_minimum_requirements') && pb_meets_minimum_requirements()) { - $wp_customize->add_section('pb_front_page_catalog', [ - 'title' => __('Front Page Catalog', 'aldine'), - 'priority' => 25, - ]); - $wp_customize->add_setting('pb_front_page_catalog', [ - 'type' => 'option', - ]); - $wp_customize->add_control('pb_front_page_catalog', [ - 'label' => __('Show Front Page Catalog', 'aldine'), - 'section' => 'pb_front_page_catalog', - 'settings' => 'pb_front_page_catalog', - 'type' => 'checkbox' - ]); - $wp_customize->add_setting('pb_front_page_catalog_title', [ - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field' - ]); - $wp_customize->add_control('pb_front_page_catalog_title', [ - 'label' => __('Front Page Catalog Title', 'aldine'), - 'section' => 'pb_front_page_catalog', - 'settings' => 'pb_front_page_catalog_title', - ]); - } - - $wp_customize->add_section('pb_network_contact_form', [ - 'title' => __('Contact Form', 'aldine'), - 'priority' => 25, - ]); - $wp_customize->add_setting('pb_network_contact_form', [ - 'type' => 'option', - ]); - $wp_customize->add_control('pb_network_contact_form', [ - 'label' => __('Show Contact Form', 'aldine'), - 'section' => 'pb_network_contact_form', - 'settings' => 'pb_network_contact_form', - 'type' => 'checkbox' - ]); - $wp_customize->add_setting('pb_network_contact_form_title', [ - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field' - ]); - $wp_customize->add_control('pb_network_contact_form_title', [ - 'label' => __('Contact Form Title', 'aldine'), - 'section' => 'pb_network_contact_form', - 'settings' => 'pb_network_contact_form_title', - ]); -}); - -/** - * Customizer JS - */ -add_action('customize_preview_init', function () { - wp_enqueue_script('aldine/customizer.js', asset_path('scripts/customizer.js'), ['customize-preview'], null, true); - wp_localize_script('aldine/customizer.js', 'SAGE_DIST_PATH', get_theme_file_uri() . '/dist/'); -}); - -add_action('customize_controls_enqueue_scripts', function () { - $handle = 'wcag-validate-customizer-color-contrast'; - $src = get_theme_file_uri() . - '/lib/customizer-validate-wcag-color-contrast/customizer-validate-wcag-color-contrast.js'; - $deps = [ 'customize-controls' ]; - wp_enqueue_script($handle, $src, $deps); - - $exports = [ - 'validate_color_contrast' => [ - 'pb_network_color_primary_fg' => [ 'pb_network_color_primary' ], - 'pb_network_color_accent_fg' => [ 'pb_network_color_accent' ], - ], - ]; - wp_scripts()->add_data( - $handle, - 'data', - sprintf('var _validateWCAGColorContrastExports = %s;', wp_json_encode($exports)) - ); -}); diff --git a/app/controllers/App.php b/app/controllers/App.php deleted file mode 100644 index 1f68e36..0000000 --- a/app/controllers/App.php +++ /dev/null @@ -1,159 +0,0 @@ - 1) ? $page - 1 : 0; - } - - public function nextPage() - { - if (is_front_page()) { - $page = (get_query_var('page')) ? get_query_var('page') : 1; - } else { - $page = (get_query_var('paged')) ? get_query_var('paged') : 1; - } - - return $page + 1; - } - - public static function catalogData($page = 1, $per_page = 10, $orderby = 'title', $license = '', $subject = '') - { - if (function_exists('pb_meets_minimum_requirements') && pb_meets_minimum_requirements()) { - $request = new \WP_REST_Request('GET', '/pressbooks/v2/books'); - $request->set_query_params([ - 'page' => $page, - 'per_page' => $per_page, - ]); - $response = rest_do_request($request); - $pages = $response->headers['X-WP-TotalPages']; - $data = rest_get_server()->response_to_data($response, true); - $books = []; - foreach ($data as $key => $book) { - $book['title'] = $book['metadata']['name']; - $book['date-published'] = (isset($book['metadata']['datePublished'])) ? - $book['metadata']['datePublished'] : - ''; - $book['subject'] = (isset($book['metadata']['about'][0])) - ? $book['metadata']['about'][0]['identifier'] - : ''; - $books[] = $book; - } - if ($orderby === 'latest') { - $books = wp_list_sort($books, $orderby, 'desc'); - } else { - $books = wp_list_sort($books, $orderby); - } - return ['pages' => $pages, 'books' => $books]; - } else { - return ['pages' => 0, 'books' => []]; - } - } -} diff --git a/app/controllers/FrontPage.php b/app/controllers/FrontPage.php deleted file mode 100644 index 3354eaa..0000000 --- a/app/controllers/FrontPage.php +++ /dev/null @@ -1,33 +0,0 @@ -getSupportedTypes(); - foreach ($licenses as $key => $value) { - $licenses[$key] = preg_replace("/\([^)]+\)/", '', $value['desc']); - } - return $licenses; - } else { - return []; - } - } - - public function subjectGroups() - { - return \Pressbooks\Metadata\get_thema_subjects(); - } - - public function catalogData() - { - $page = (get_query_var('paged')) ? get_query_var('paged') : 1; - $orderby = (get_query_var('orderby')) ? get_query_var('orderby') : 'title'; - $subject = (get_query_var('subject')) ? get_query_var('subject') : ''; - $license = (get_query_var('license')) ? get_query_var('license') : ''; - return App::catalogData($page, 9, $orderby, $license, $subject); - } -} diff --git a/app/filters.php b/app/filters.php deleted file mode 100644 index d42320e..0000000 --- a/app/filters.php +++ /dev/null @@ -1,79 +0,0 @@ - classes - */ -add_filter('body_class', function (array $classes) { - /** Add page slug if it doesn't exist */ - if (is_single() || is_page() && !is_front_page()) { - if (!in_array(basename(get_permalink()), $classes)) { - $classes[] = basename(get_permalink()); - } - } - - /** Clean up class names for custom templates */ - $classes = array_map(function ($class) { - return preg_replace(['/-blade(-php)?$/', '/^page-template-views/'], '', $class); - }, $classes); - - return array_filter($classes); -}); - -/** - * Add "… Continued" to the excerpt - */ -add_filter('excerpt_more', function () { - return ' … ' . __('Continued', 'aldine') . ''; -}); - -/** - * Template Hierarchy should search for .blade.php files - */ -collect([ - 'index', '404', 'archive', 'author', 'category', 'tag', 'taxonomy', 'date', 'home', - 'frontpage', 'page', 'paged', 'search', 'single', 'singular', 'attachment' -])->map(function ($type) { - add_filter("{$type}_template_hierarchy", __NAMESPACE__.'\\filter_templates'); -}); - -/** - * Render page using Blade - */ -add_filter('template_include', function ($template) { - $data = collect(get_body_class())->reduce(function ($data, $class) use ($template) { - return apply_filters("sage/template/{$class}/data", $data, $template); - }, []); - if ($template) { - echo template($template, $data); - return get_stylesheet_directory().'/index.php'; - } - return $template; -}, PHP_INT_MAX); - -/** - * Tell WordPress how to find the compiled path of comments.blade.php - */ -add_filter('comments_template', function ($comments_template) { - $comments_template = str_replace( - [get_stylesheet_directory(), get_template_directory()], - '', - $comments_template - ); - return template_path(locate_template(["views/{$comments_template}", $comments_template]) ?: $comments_template); -}); - -/** - * Fix Controller path - */ -add_filter('sober/controller/path', function () { - return get_template_directory() . '/app/controllers'; -}); - -/** - * Remove Admin Bar callback - */ -add_action('admin_bar_init', function () { - remove_action('wp_head', '_admin_bar_bump_cb'); -}); diff --git a/app/helpers.php b/app/helpers.php deleted file mode 100644 index b89c869..0000000 --- a/app/helpers.php +++ /dev/null @@ -1,202 +0,0 @@ -bound($abstract) - ? $container->makeWith($abstract, $parameters) - : $container->makeWith("sage.{$abstract}", $parameters); -} - -/** - * Get / set the specified configuration value. - * - * If an array is passed as the key, we will assume you want to set an array of values. - * - * @param array|string $key - * @param mixed $default - * @return mixed|\Roots\Sage\Config - * @copyright Taylor Otwell - * @link https://github.com/laravel/framework/blob/c0970285/src/Illuminate/Foundation/helpers.php#L254-L265 - */ -function config($key = null, $default = null) -{ - if (is_null($key)) { - return sage('config'); - } - if (is_array($key)) { - return sage('config')->set($key); - } - return sage('config')->get($key, $default); -} - -/** - * @param string $file - * @param array $data - * @return string - */ -function template($file, $data = []) -{ - if (remove_action('wp_head', 'wp_enqueue_scripts', 1)) { - wp_enqueue_scripts(); - } - - return sage('blade')->render($file, $data); -} - -/** - * Retrieve path to a compiled blade view - * @param $file - * @param array $data - * @return string - */ -function template_path($file, $data = []) -{ - return sage('blade')->compiledPath($file, $data); -} - -/** - * @param $asset - * @return string - */ -function asset_path($asset) -{ - return fix_path(sage('assets')->getUri('/' . $asset)); -} - -/** - * @param $asset - * @return string - */ -function asset_dir($asset) -{ - return fix_path(sage('assets')->get('/' . $asset)); -} - -/** - * @param string|string[] $templates Possible template files - * @return array - */ -function filter_templates($templates) -{ - $paths = apply_filters('sage/filter_templates/paths', [ - 'views', - 'resources/views' - ]); - $paths_pattern = "#^(" . implode('|', $paths) . ")/#"; - - return collect($templates) - ->map(function ($template) use ($paths_pattern) { - /** Remove .blade.php/.blade/.php from template names */ - $template = preg_replace('#\.(blade\.?)?(php)?$#', '', ltrim($template)); - - /** Remove partial $paths from the beginning of template names */ - if (strpos($template, '/')) { - $template = preg_replace($paths_pattern, '', $template); - } - - return $template; - }) - ->flatMap(function ($template) use ($paths) { - return collect($paths) - ->flatMap(function ($path) use ($template) { - return [ - "{$path}/{$template}.blade.php", - "{$path}/{$template}.php", - "{$template}.blade.php", - "{$template}.php", - ]; - }); - }) - ->filter() - ->unique() - ->all(); -} - -/** - * @param string|string[] $templates Relative path to possible template files - * @return string Location of the template - */ -function locate_template($templates) -{ - return \locate_template(filter_templates($templates)); -} - -/** - * - * Catch a contact form submission. - * - * @return false | array - */ -function contact_form_submission() -{ - if (isset($_POST['submitted'])) { - $output = []; - $name = (isset($_POST['visitor_name'])) ? $_POST['visitor_name'] : false; - $email = (isset($_POST['visitor_email'])) ? $_POST['visitor_email'] : false; - $institution = (isset($_POST['visitor_institution'])) ? $_POST['visitor_institution'] : false; - $message = (isset($_POST['message'])) ? $_POST['message'] : false; - if (!$name) { - $output['message'] = __('Name is required.', 'aldine'); - $output['status'] = 'error'; - $output['field'] = 'visitor_name'; - } elseif (!$email) { - $output['message'] = __('Email is required.', 'aldine'); - $output['status'] = 'error'; - $output['field'] = 'visitor_email'; - } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) { - $output['message'] = __('Email is invalid.', 'aldine'); - $output['status'] = 'error'; - $output['field'] = 'visitor_email'; - } elseif (!$institution) { - $output['message'] = __('Institution is required.', 'aldine'); - $output['status'] = 'error'; - $output['field'] = 'visitor_institution'; - } elseif (!$message) { - $output['message'] = __('Message is required.', 'aldine'); - $output['status'] = 'error'; - $output['field'] = 'message'; - } else { - $sent = wp_mail( - get_option('admin_email'), - sprintf(__('Contact Form Submission from %s', 'aldine'), $name), - sprintf( - "From: %1\$s <%2\$s>\n%3\$s", - $name, - $email, - strip_tags($message) - ), - "From: ${email}\r\nReply-To: ${email}\r\n" - ); - if ($sent) { - $output['message'] = __('Your message was sent!', 'aldine'); - $output['status'] = 'success'; - } else { - $output['message'] = __('Your message could not be sent.', 'aldine'); - $output['status'] = 'error'; - } - } - return $output; - } - return false; -} - -function fix_path($path) -{ - return str_replace('/dist//', '/dist/', $path); -} diff --git a/app/intervention.php b/app/intervention.php deleted file mode 100644 index 68d0421..0000000 --- a/app/intervention.php +++ /dev/null @@ -1,38 +0,0 @@ - __('Network Footer Menu', 'aldine') - ]); - - /** - * Enable custom headers - * @link https://developer.wordpress.org/themes/functionality/custom-headers/ - */ - add_theme_support('custom-header', [ - 'default-image' => asset_path('images/header.jpg'), - 'width' => 1920, - 'height' => 884, - 'default-text-color' => '#000', - ]); - - /** - * Enable custom logos - * @link https://developer.wordpress.org/themes/functionality/custom-logo/ - */ - add_theme_support('custom-logo', [ - 'height' => 40, - 'width' => 265, - 'flex-width' => true, - 'flex-height' => true, - ]); - - /** - * Enable post thumbnails - * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ - */ - add_theme_support('post-thumbnails'); - - /** - * Enable HTML5 markup support - * @link https://developer.wordpress.org/reference/functions/add_theme_support/#html5 - */ - add_theme_support('html5', ['caption', 'comment-form', 'comment-list', 'gallery', 'search-form']); - - /** - * Enable selective refresh for widgets in customizer - * @link https://developer.wordpress.org/themes/advanced-topics/customizer-api/#theme-support-in-sidebars - */ - add_theme_support('customize-selective-refresh-widgets'); - - /** - * Use main stylesheet for visual editor - * @see resources/assets/styles/layouts/_tinymce.scss - */ - add_editor_style(asset_path('styles/main.css')); -}, 20); - -/** - * Register sidebars - */ -add_action('widgets_init', function () { - $config = [ - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '

', - 'after_title' => '

' - ]; - register_sidebar([ - 'name' => __('Front Page Content', 'aldine'), - 'description' => __( - 'Add content for your network’s front page here. Currently, only text widgets are supported.', - 'aldine' - ), - 'id' => 'front-page-block', - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '

', - 'after_title' => '

' - ]); - register_sidebar([ - 'name' => __('Network Footer Block 1', 'aldine'), - 'description' => __( - 'Add content for your network’s customizeable footer here. - Currently, only text and image widgets are supported. - Content in this widget area will appear in the first row (on mobile) or the first column (on desktops).', - 'aldine' - ), - 'id' => 'network-footer-block-1' - ] + $config); - register_sidebar([ - 'name' => __('Network Footer Block 2', 'aldine'), - 'description' => __( - 'Add content for your network’s customizeable footer here. - Currently, only text and image widgets are supported. - Content in this widget area will appear in the second row (on mobile) or the middle column (on desktop).', - 'aldine' - ), - 'id' => 'network-footer-block-2' - ] + $config); -}); - -/** - * Updates the `$post` variable on each iteration of the loop. - * Note: updated value is only available for subsequently loaded views, such as partials - */ -add_action('the_post', function ($post) { - sage('blade')->share('post', $post); -}); - -/** - * Setup Sage options - */ -add_action('after_setup_theme', function () { - /** - * Add JsonManifest to Sage container - */ - sage()->singleton('sage.assets', function () { - return new JsonManifest(config('assets.manifest'), config('assets.uri')); - }); - - /** - * Add Blade to Sage container - */ - sage()->singleton('sage.blade', function (\Illuminate\Container\Container $app) { - $cachePath = config('view.compiled'); - if (!file_exists($cachePath)) { - wp_mkdir_p($cachePath); - } - (new BladeProvider($app))->register(); - return new Blade($app['view']); - }); - - /** - * Create @asset() Blade directive - */ - sage('blade')->compiler()->directive('asset', function ($asset) { - return ""; - }); -}); - -add_action('wp_head', function () { - $primary = get_option('pb_network_color_primary'); - $accent = get_option('pb_network_color_accent'); - $primary_fg = get_option('pb_network_color_primary_fg'); - $accent_fg = get_option('pb_network_color_accent_fg'); - $header_text = get_header_textcolor(); - if ($primary || $accent || $primary_fg || $accent_fg || $header_text) { ?> - - share('contact_form_response', $response); -}); diff --git a/archive.php b/archive.php new file mode 100644 index 0000000..afc7951 --- /dev/null +++ b/archive.php @@ -0,0 +1,51 @@ + + +
+
+ + + + + + + +
+
+ + { - value.bind( to => $( '.brand' ).text( to ) ); + value.bind( to => $( '.brand a' ).text( to ) ); } ); diff --git a/assets/scripts/routes/catalog.js b/assets/scripts/routes/catalog.js new file mode 100644 index 0000000..71ab471 --- /dev/null +++ b/assets/scripts/routes/catalog.js @@ -0,0 +1,112 @@ +const jQueryBridget = require( 'jquery-bridget' ); +const Isotope = require( 'isotope-layout' ); + +export default { + init() { + // JavaScript to be fired on the catalog page + jQueryBridget( 'isotope', Isotope, $ ); + let $grid = $( '.books' ); + $grid.isotope( { + itemSelector: '.book', + getSortData: { + title: '.title a', + subject: '[data-subject]', + latest: '[data-date-published]', + }, + sortAscending: { + title: true, + subject: true, + latest: false, + }, + } ); + $( '.filters > a' ).click( e => { + e.preventDefault(); + $( '.filters' ).toggleClass( 'is-active' ); + $( '.filter-groups > div' ).removeClass( 'is-active' ); + } ); + $( '.filter-groups .subjects > a' ).click( e => { + e.preventDefault(); + let id = $( e.currentTarget ).attr( 'href' ); + $( `.filter-groups .subjects:not(${id})` ).removeClass( 'is-active' ); + $( `.filter-groups ${id}` ).toggleClass( 'is-active' ); + } ); + $( '.licenses > a' ).click( e => { + e.preventDefault(); + let id = $( e.currentTarget ).attr( 'href' ); + $( id ).toggleClass( 'is-active' ); + } ); + $( '.subjects .filter-list a' ).click( e => { + e.preventDefault(); + if ( $( e.currentTarget ).hasClass( 'is-active' ) ) { + $( '.subjects .filter-list a' ).removeClass( 'is-active' ); + $( '.subjects' ).removeClass( 'has-active-child' ); + } else { + $( '.subjects .filter-list a' ).removeClass( 'is-active' ); + $( e.currentTarget ).addClass( 'is-active' ); + $( '.subjects' ).removeClass( 'has-active-child' ); + $( e.currentTarget ) + .parent() + .parent() + .parent( '.subjects' ) + .addClass( 'has-active-child' ); + } + let subjectValue = $( '.subjects .filter-list a.is-active' ).attr( + 'data-filter' + ); + let licenseValue = $( '.licenses .filter-list a.is-active' ).attr( + 'data-filter' + ); + if ( typeof licenseValue === 'undefined' ) { + licenseValue = ''; + } else { + licenseValue = `[data-license="${licenseValue}"]`; + } + if ( typeof subjectValue === 'undefined' ) { + subjectValue = ''; + } else { + subjectValue = `[data-subject="${subjectValue}"]`; + } + $grid.isotope( { filter: `${subjectValue}${licenseValue}` } ); + } ); + $( '.licenses .filter-list a' ).click( e => { + e.preventDefault(); + if ( $( e.currentTarget ).hasClass( 'is-active' ) ) { + $( '.licenses .filter-list a' ).removeClass( 'is-active' ); + $( '.licenses' ).removeClass( 'has-active-child' ); + } else { + $( '.licenses .filter-list a' ).removeClass( 'is-active' ); + $( e.currentTarget ).addClass( 'is-active' ); + $( '.licenses' ).addClass( 'has-active-child' ); + } + let subjectValue = $( '.subjects .filter-list a.is-active' ).attr( + 'data-filter' + ); + let licenseValue = $( '.licenses .filter-list a.is-active' ).attr( + 'data-filter' + ); + if ( typeof licenseValue === 'undefined' ) { + licenseValue = ''; + } else { + licenseValue = `[data-license="${licenseValue}"]`; + } + if ( typeof subjectValue === 'undefined' ) { + subjectValue = ''; + } else { + subjectValue = `[data-subject="${subjectValue}"]`; + } + $grid.isotope( { filter: `${subjectValue}${licenseValue}` } ); + } ); + $( '.sort > a' ).click( e => { + e.preventDefault(); + $( '.sort' ).toggleClass( 'is-active' ); + } ); + $( '.sorts a' ).click( e => { + e.preventDefault(); + let sortBy = $( e.currentTarget ).attr( 'data-sort' ); + $( '.sorts a' ).removeClass( 'is-active' ); + $( e.currentTarget ).addClass( 'is-active' ); + $grid.isotope( { sortBy: sortBy } ); + } ); + }, + finalize() {}, +}; diff --git a/assets/scripts/routes/common.js b/assets/scripts/routes/common.js new file mode 100644 index 0000000..63fe5b7 --- /dev/null +++ b/assets/scripts/routes/common.js @@ -0,0 +1,16 @@ +export default { + init() { + // JavaScript to be fired on all pages + $( 'body' ) + .removeClass( 'no-js' ) + .addClass( 'js' ); + $( '.toggle' ).click( event => { + event.preventDefault(); + $( event.currentTarget ).toggleClass( 'toggle--active' ); + $( '.banner__navigation' ).toggleClass( 'banner__navigation--visible' ); + } ); + }, + finalize() { + // JavaScript to be fired on all pages, after page specific JS is fired + }, +}; diff --git a/assets/scripts/routes/home.js b/assets/scripts/routes/home.js new file mode 100644 index 0000000..1a99dc6 --- /dev/null +++ b/assets/scripts/routes/home.js @@ -0,0 +1,6 @@ +export default { + init() { + // JavaScript to be fired on the home page + }, + finalize() {}, +}; diff --git a/resources/assets/scripts/util/Router.js b/assets/scripts/util/Router.js similarity index 100% rename from resources/assets/scripts/util/Router.js rename to assets/scripts/util/Router.js diff --git a/resources/assets/scripts/util/camelCase.js b/assets/scripts/util/camelCase.js similarity index 100% rename from resources/assets/scripts/util/camelCase.js rename to assets/scripts/util/camelCase.js diff --git a/resources/assets/styles/main.scss b/assets/styles/aldine.scss similarity index 92% rename from resources/assets/styles/main.scss rename to assets/styles/aldine.scss index 412ce50..96f91ff 100644 --- a/resources/assets/styles/main.scss +++ b/assets/styles/aldine.scss @@ -6,7 +6,7 @@ * Prefix your imports with `~` to grab from node_modules/ * @see https://github.com/webpack-contrib/sass-loader#imports */ -@import '~aetna/assets/styles/aetna.scss'; +@import "~aetna/assets/styles/aetna.scss"; /** Import theme styles */ // @import "common/global"; diff --git a/resources/assets/styles/common/_global.scss b/assets/styles/common/_global.scss similarity index 100% rename from resources/assets/styles/common/_global.scss rename to assets/styles/common/_global.scss diff --git a/resources/assets/styles/common/_variables.scss b/assets/styles/common/_variables.scss similarity index 100% rename from resources/assets/styles/common/_variables.scss rename to assets/styles/common/_variables.scss diff --git a/resources/assets/styles/components/_comments.scss b/assets/styles/components/_comments.scss similarity index 100% rename from resources/assets/styles/components/_comments.scss rename to assets/styles/components/_comments.scss diff --git a/resources/assets/styles/components/_forms.scss b/assets/styles/components/_forms.scss similarity index 100% rename from resources/assets/styles/components/_forms.scss rename to assets/styles/components/_forms.scss diff --git a/resources/assets/styles/components/_grid.scss b/assets/styles/components/_grid.scss similarity index 100% rename from resources/assets/styles/components/_grid.scss rename to assets/styles/components/_grid.scss diff --git a/resources/assets/styles/components/_wp-classes.scss b/assets/styles/components/_wp-classes.scss similarity index 100% rename from resources/assets/styles/components/_wp-classes.scss rename to assets/styles/components/_wp-classes.scss diff --git a/resources/assets/styles/layouts/_footer.scss b/assets/styles/layouts/_footer.scss similarity index 100% rename from resources/assets/styles/layouts/_footer.scss rename to assets/styles/layouts/_footer.scss diff --git a/resources/assets/styles/layouts/_header.scss b/assets/styles/layouts/_header.scss similarity index 100% rename from resources/assets/styles/layouts/_header.scss rename to assets/styles/layouts/_header.scss diff --git a/resources/assets/styles/layouts/_pages.scss b/assets/styles/layouts/_pages.scss similarity index 100% rename from resources/assets/styles/layouts/_pages.scss rename to assets/styles/layouts/_pages.scss diff --git a/resources/assets/styles/layouts/_posts.scss b/assets/styles/layouts/_posts.scss similarity index 100% rename from resources/assets/styles/layouts/_posts.scss rename to assets/styles/layouts/_posts.scss diff --git a/resources/assets/styles/layouts/_sidebar.scss b/assets/styles/layouts/_sidebar.scss similarity index 100% rename from resources/assets/styles/layouts/_sidebar.scss rename to assets/styles/layouts/_sidebar.scss diff --git a/resources/assets/styles/layouts/_tinymce.scss b/assets/styles/layouts/_tinymce.scss similarity index 100% rename from resources/assets/styles/layouts/_tinymce.scss rename to assets/styles/layouts/_tinymce.scss diff --git a/resources/assets/styles/layouts/pages/_catalog.scss b/assets/styles/layouts/pages/_catalog.scss similarity index 100% rename from resources/assets/styles/layouts/pages/_catalog.scss rename to assets/styles/layouts/pages/_catalog.scss diff --git a/resources/assets/styles/layouts/pages/_front-page.scss b/assets/styles/layouts/pages/_front-page.scss similarity index 100% rename from resources/assets/styles/layouts/pages/_front-page.scss rename to assets/styles/layouts/pages/_front-page.scss diff --git a/resources/assets/styles/login.scss b/assets/styles/login.scss similarity index 100% rename from resources/assets/styles/login.scss rename to assets/styles/login.scss diff --git a/comments.php b/comments.php new file mode 100644 index 0000000..a988447 --- /dev/null +++ b/comments.php @@ -0,0 +1,72 @@ + + +
+ + +

+ ' . get_the_title() . '' + ); + } else { + printf( // WPCS: XSS OK. + /* translators: 1: comment count number, 2: title. */ + esc_html( _nx( '%1$s thought on “%2$s”', '%1$s thoughts on “%2$s”', $comment_count, 'comments title', 'pressbooks-aldine' ) ), + number_format_i18n( $comment_count ), + '' . get_the_title() . '' + ); + } + ?> +

+ + + +
    + 'ol', + 'short_ping' => true, + ] ); + ?> +
+ + +

+ + +
diff --git a/composer.json b/composer.json index fbe7e0e..4ac3393 100644 --- a/composer.json +++ b/composer.json @@ -1,61 +1,41 @@ { - "name": "pressbooks/pressbooks-aldine", - "type": "wordpress-theme", - "license": "GPL-3", - "description": "Aldine is the new root theme for Pressbooks, based on Sage.", - "homepage": "https://github.com/pressbooks/pressbooks-aldine/", - "authors": [ - { - "name": "Pressbooks (Book Oven Inc.)", - "email": "code@pressbooks.com", - "homepage": "https://pressbooks.org" - }, - { - "name": "Ben Word", - "email": "ben@benword.com", - "homepage": "https://github.com/retlehs" - }, - { - "name": "Scott Walkinshaw", - "email": "scott.walkinshaw@gmail.com", - "homepage": "https://github.com/swalkinshaw" - }, - { - "name": "QWp6t", - "email": "hi@qwp6t.me", - "homepage": "https://github.com/qwp6t" - } - ], - "keywords": [ - "publishing", - "catalog", - "pressbooks", - "default-theme" - ], - "support": { - "issues": "https://github.com/pressbooks/pressbooks-aldine/issues", - "forum": "https://discourse.pressbooks.org/" - }, - "autoload": { - "psr-4": { - "Aldine\\": "app/" - } - }, - "require": { - "php": ">=7", - "composer/installers": "~1.0", - "illuminate/support": "~5.4", - "roots/sage-lib": "~9.0.0-beta.4", - "soberwp/controller": "~9.0.0-beta.4", - "soberwp/intervention": "1.2.0-p", - "erusev/parsedown-extra": "^0.7.1" - }, - "require-dev": { - "squizlabs/php_codesniffer": "^2.8.0" - }, - "scripts": { - "test": [ - "phpcs" - ] - } + "name": "pressbooks/pressbooks-aldine", + "type": "wordpress-theme", + "license": "GPL-2.0+", + "description": "Aldine is the root theme for Pressbooks.", + "homepage": "https://github.com/pressbooks/pressbooks-aldine/", + "authors": [ + { + "name": "Pressbooks (Book Oven Inc.)", + "email": "code@pressbooks.com", + "homepage": "https://pressbooks.org" + } + ], + "keywords": ["publishing", "catalog", "pressbooks", "default-theme"], + "support": { + "issues": "https://github.com/pressbooks/pressbooks-aldine/issues", + "forum": "https://discourse.pressbooks.org/" + }, + "require": { + "php": ">=7", + "composer/installers": "~1.0", + "pressbooks/mix": "^2.1", + "soberwp/intervention": "1.2.0-p", + "erusev/parsedown-extra": "^0.7.1" + }, + "require-dev": { + "humanmade/coding-standards": "^0.2.1", + "squizlabs/php_codesniffer": "^2.8.0", + "wpreadme2markdown/wp2md": "^3.0" + }, + "scripts": { + "test": ["@standards"], + "standards": [ + "vendor/bin/phpcs --standard=phpcs.ruleset.xml inc partials *.php" + ], + "localize": [ + "wp-pot -o=languages/pressbooks-aldine.pot -d=pressbooks-aldine -t 'Pressbooks (Book Oven Inc.) ' -s '*.php'" + ], + "readme": ["vendor/bin/wp2md -i readme.txt -o README.md"] + } } diff --git a/composer.lock b/composer.lock index e7a0a45..8e26c3d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,64 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "f7726a4926f063ad567227228ba400b8", + "content-hash": "98d5bc8ff0e066bda4383130af3ae190", "packages": [ - { - "name": "brain/hierarchy", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/Brain-WP/Hierarchy.git", - "reference": "adb52da233e586051a577ef5eabe2c537df785d5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Brain-WP/Hierarchy/zipball/adb52da233e586051a577ef5eabe2c537df785d5", - "reference": "adb52da233e586051a577ef5eabe2c537df785d5", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "antecedent/patchwork": "~1.3.0", - "brain/monkey": "~1.2", - "gmazzap/andrew": "~1.0", - "mockery/mockery": "0.9.3", - "phpunit/phpunit": "~4.8", - "symfony/finder": "~2.7.0" - }, - "suggest": { - "symfony/finder": "Allows loading of templates using Symfony finder component." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev", - "dev-dev": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Brain\\Hierarchy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Giuseppe Mazzapica", - "email": "giuseppe.mazzapica@gmail.com" - } - ], - "description": "No-dependencies package that embodies WordPress template hierarchy", - "keywords": [ - "wordpress" - ], - "time": "2016-09-15T13:33:53+00:00" - }, { "name": "composer/installers", "version": "v1.4.0", @@ -179,90 +123,26 @@ ], "time": "2017-08-09T07:53:48+00:00" }, - { - "name": "doctrine/inflector", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/e11d84c6e018beedd929cff5220969a3c6d1d462", - "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "inflection", - "pluralize", - "singularize", - "string" - ], - "time": "2017-07-22T12:18:28+00:00" - }, { "name": "erusev/parsedown", - "version": "1.6.3", + "version": "1.6.4", "source": { "type": "git", "url": "https://github.com/erusev/parsedown.git", - "reference": "728952b90a333b5c6f77f06ea9422b94b585878d" + "reference": "fbe3fe878f4fe69048bb8a52783a09802004f548" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/728952b90a333b5c6f77f06ea9422b94b585878d", - "reference": "728952b90a333b5c6f77f06ea9422b94b585878d", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/fbe3fe878f4fe69048bb8a52783a09802004f548", + "reference": "fbe3fe878f4fe69048bb8a52783a09802004f548", "shasum": "" }, "require": { "php": ">=5.3.0" }, + "require-dev": { + "phpunit/phpunit": "^4.8.35" + }, "type": "library", "autoload": { "psr-0": { @@ -286,7 +166,7 @@ "markdown", "parser" ], - "time": "2017-05-14T14:47:48+00:00" + "time": "2017-11-14T20:44:03+00:00" }, { "name": "erusev/parsedown-extra", @@ -333,34 +213,26 @@ "time": "2015-11-01T10:19:22+00:00" }, { - "name": "hassankhan/config", - "version": "0.10.0", + "name": "pressbooks/mix", + "version": "2.1", "source": { "type": "git", - "url": "https://github.com/hassankhan/config.git", - "reference": "06ac500348af033f1a2e44dc357ca86282626d4a" + "url": "https://github.com/pressbooks/mix.git", + "reference": "4cb5d44244468480c24f30ea08070b37711ba864" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hassankhan/config/zipball/06ac500348af033f1a2e44dc357ca86282626d4a", - "reference": "06ac500348af033f1a2e44dc357ca86282626d4a", + "url": "https://api.github.com/repos/pressbooks/mix/zipball/4cb5d44244468480c24f30ea08070b37711ba864", + "reference": "4cb5d44244468480c24f30ea08070b37711ba864", "shasum": "" }, - "require": { - "php": ">=5.3.0" - }, "require-dev": { - "phpunit/phpunit": "~4.0", - "scrutinizer/ocular": "~1.1", - "squizlabs/php_codesniffer": "~2.2" - }, - "suggest": { - "symfony/yaml": "~2.5" + "humanmade/coding-standards": "^0.2.1" }, "type": "library", "autoload": { "psr-4": { - "Noodlehaus\\": "src" + "PressbooksMix\\": "inc/" } }, "notification-url": "https://packagist.org/downloads/", @@ -369,55 +241,42 @@ ], "authors": [ { - "name": "Hassan Khan", - "homepage": "http://hassankhan.me/", - "role": "Developer" + "name": "Pressbooks (Book Oven Inc.)", + "email": "code@pressbooks.com" } ], - "description": "Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files", - "homepage": "http://hassankhan.me/config/", - "keywords": [ - "config", - "configuration", - "ini", - "json", - "microphp", - "unframework", - "xml", - "yaml", - "yml" - ], - "time": "2016-02-11T16:21:17+00:00" + "time": "2017-09-06T21:35:04+00:00" }, { - "name": "illuminate/config", - "version": "v5.4.27", + "name": "soberwp/intervention", + "version": "1.2.0-p", "source": { "type": "git", - "url": "https://github.com/illuminate/config.git", - "reference": "8fe700aa596bc623d347e4578041fbda7a44c3d9" + "url": "https://github.com/soberwp/intervention.git", + "reference": "1698e51efe696c5867fb78ef7c5d2efff9b79260" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/config/zipball/8fe700aa596bc623d347e4578041fbda7a44c3d9", - "reference": "8fe700aa596bc623d347e4578041fbda7a44c3d9", + "url": "https://api.github.com/repos/soberwp/intervention/zipball/1698e51efe696c5867fb78ef7c5d2efff9b79260", + "reference": "1698e51efe696c5867fb78ef7c5d2efff9b79260", "shasum": "" }, "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" + "composer/installers": "~1.0", + "php": ">=5.4.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } + "require-dev": { + "squizlabs/php_codesniffer": "2.*" }, + "type": "package", "autoload": { "psr-4": { - "Illuminate\\Config\\": "" - } + "Sober\\Intervention\\": "src/", + "Sober\\Intervention\\Module\\": "src/modules/" + }, + "files": [ + "intervention.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -425,41 +284,46 @@ ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "name": "Darren Jacoby", + "email": "darren@jacoby.co.za", + "homepage": "https://twitter.com/withjacoby" } ], - "description": "The Illuminate Config package.", - "homepage": "https://laravel.com", - "time": "2017-02-04T20:27:32+00:00" - }, + "description": "WordPress plugin containing modules to cleanup and customize wp-admin.", + "homepage": "https://github.com/soberwp", + "keywords": [ + "wordpress" + ], + "time": "2017-08-26T12:21:27+00:00" + } + ], + "packages-dev": [ { - "name": "illuminate/container", - "version": "v5.4.27", + "name": "fig-r/psr2r-sniffer", + "version": "0.3.1", "source": { "type": "git", - "url": "https://github.com/illuminate/container.git", - "reference": "c5b8a02a34a52c307f16922334c355c5eef725a6" + "url": "https://github.com/php-fig-rectified/psr2r-sniffer.git", + "reference": "cdf61b2922efb225903e52c6222d7192d3b97ebf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/c5b8a02a34a52c307f16922334c355c5eef725a6", - "reference": "c5b8a02a34a52c307f16922334c355c5eef725a6", + "url": "https://api.github.com/repos/php-fig-rectified/psr2r-sniffer/zipball/cdf61b2922efb225903e52c6222d7192d3b97ebf", + "reference": "cdf61b2922efb225903e52c6222d7192d3b97ebf", "shasum": "" }, "require": { - "illuminate/contracts": "5.4.*", - "php": ">=5.6.4" + "php": ">=5.4.16", + "squizlabs/php_codesniffer": "~2.3" }, + "bin": [ + "bin/tokenize", + "bin/sniff" + ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, "autoload": { "psr-4": { - "Illuminate\\Container\\": "" + "PSR2R\\": "PSR2R" } }, "notification-url": "https://packagist.org/downloads/", @@ -468,85 +332,66 @@ ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "name": "Mark Scherer", + "homepage": "http://www.dereuromark.de", + "role": "Contributor" } ], - "description": "The Illuminate Container package.", - "homepage": "https://laravel.com", - "time": "2017-05-24T14:15:53+00:00" + "description": "Code-Sniffer, Auto-Fixer and Tokenizer for PSR2-R", + "time": "2016-07-11T14:35:34+00:00" }, { - "name": "illuminate/contracts", - "version": "v5.4.27", + "name": "humanmade/coding-standards", + "version": "0.2.2", "source": { "type": "git", - "url": "https://github.com/illuminate/contracts.git", - "reference": "31f0193eb14aa3ee07841dc254081425616e79f0" + "url": "https://github.com/humanmade/coding-standards.git", + "reference": "f3974696bf139eb17049ae0ced114cbee1f86b20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/31f0193eb14aa3ee07841dc254081425616e79f0", - "reference": "31f0193eb14aa3ee07841dc254081425616e79f0", + "url": "https://api.github.com/repos/humanmade/coding-standards/zipball/f3974696bf139eb17049ae0ced114cbee1f86b20", + "reference": "f3974696bf139eb17049ae0ced114cbee1f86b20", "shasum": "" }, "require": { - "php": ">=5.6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Contracts\\": "" - } + "fig-r/psr2r-sniffer": "^0.3.1", + "wp-coding-standards/wpcs": "^0.10.0" }, + "type": "project", "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "GPL-2.0" ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Contracts package.", - "homepage": "https://laravel.com", - "time": "2017-04-19T20:17:43+00:00" + "description": "Human Made coding standards", + "time": "2017-08-31T03:33:08+00:00" }, { - "name": "illuminate/events", - "version": "v5.4.27", + "name": "psr/log", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/illuminate/events.git", - "reference": "ebdca3b0305e9fc954afb9e422c4559482cd11e6" + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/ebdca3b0305e9fc954afb9e422c4559482cd11e6", - "reference": "ebdca3b0305e9fc954afb9e422c4559482cd11e6", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", "shasum": "" }, "require": { - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "Illuminate\\Events\\": "" + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -555,105 +400,146 @@ ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "The Illuminate Events package.", - "homepage": "https://laravel.com", - "time": "2017-05-02T12:57:00+00:00" + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" }, { - "name": "illuminate/filesystem", - "version": "v5.4.27", + "name": "squizlabs/php_codesniffer", + "version": "2.9.1", "source": { "type": "git", - "url": "https://github.com/illuminate/filesystem.git", - "reference": "e0ee832f625fbfadb816a972655b1a66af1a5bda" + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/e0ee832f625fbfadb816a972655b1a66af1a5bda", - "reference": "e0ee832f625fbfadb816a972655b1a66af1a5bda", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", "shasum": "" }, "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4", - "symfony/finder": "~3.2" + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" }, - "suggest": { - "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", - "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0)." + "require-dev": { + "phpunit/phpunit": "~4.0" }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "2.x-dev" } }, "autoload": { - "psr-4": { - "Illuminate\\Filesystem\\": "" - } + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "name": "Greg Sherwood", + "role": "lead" } ], - "description": "The Illuminate Filesystem package.", - "homepage": "https://laravel.com", - "time": "2017-05-18T14:37:58+00:00" + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2017-05-22T02:43:20+00:00" }, { - "name": "illuminate/support", - "version": "v5.4.27", + "name": "symfony/console", + "version": "v3.4.1", "source": { "type": "git", - "url": "https://github.com/illuminate/support.git", - "reference": "a42393b56d0ec75f55e760f2a47bcf85a17a278d" + "url": "https://github.com/symfony/console.git", + "reference": "2cdef78de8f54f68ff16a857e710e7302b47d4c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/a42393b56d0ec75f55e760f2a47bcf85a17a278d", - "reference": "a42393b56d0ec75f55e760f2a47bcf85a17a278d", + "url": "https://api.github.com/repos/symfony/console/zipball/2cdef78de8f54f68ff16a857e710e7302b47d4c7", + "reference": "2cdef78de8f54f68ff16a857e710e7302b47d4c7", "shasum": "" }, "require": { - "doctrine/inflector": "~1.0", - "ext-mbstring": "*", - "illuminate/contracts": "5.4.*", - "paragonie/random_compat": "~1.4|~2.0", - "php": ">=5.6.4" + "php": "^5.5.9|>=7.0.8", + "symfony/debug": "~2.8|~3.0|~4.0", + "symfony/polyfill-mbstring": "~1.0" }, - "replace": { - "tightenco/collect": "self.version" + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.3|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.3|~4.0" }, "suggest": { - "illuminate/filesystem": "Required to use the composer class (5.2.*).", - "symfony/process": "Required to use the composer class (~3.2).", - "symfony/var-dumper": "Required to use the dd function (~3.2)." + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "3.4-dev" } }, "autoload": { "psr-4": { - "Illuminate\\Support\\": "" + "Symfony\\Component\\Console\\": "" }, - "files": [ - "helpers.php" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -662,47 +548,55 @@ ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "The Illuminate Support package.", - "homepage": "https://laravel.com", - "time": "2017-06-15T12:35:32+00:00" + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2017-12-02T18:20:11+00:00" }, { - "name": "illuminate/view", - "version": "v5.4.27", + "name": "symfony/debug", + "version": "v3.4.1", "source": { "type": "git", - "url": "https://github.com/illuminate/view.git", - "reference": "423652ea1c4c4c2f6494bd6b8cfb6eb943c5ba75" + "url": "https://github.com/symfony/debug.git", + "reference": "fb2001e5d85f95d8b6ab94ae3be5d2672df128fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/423652ea1c4c4c2f6494bd6b8cfb6eb943c5ba75", - "reference": "423652ea1c4c4c2f6494bd6b8cfb6eb943c5ba75", + "url": "https://api.github.com/repos/symfony/debug/zipball/fb2001e5d85f95d8b6ab94ae3be5d2672df128fd", + "reference": "fb2001e5d85f95d8b6ab94ae3be5d2672df128fd", "shasum": "" }, "require": { - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/events": "5.4.*", - "illuminate/filesystem": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4", - "symfony/debug": "~3.2" + "php": "^5.5.9|>=7.0.8", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/http-kernel": "~2.8|~3.0|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "3.4-dev" } }, "autoload": { "psr-4": { - "Illuminate\\View\\": "" - } + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -710,193 +604,50 @@ ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "The Illuminate View package.", - "homepage": "https://laravel.com", - "time": "2017-06-07T13:32:57+00:00" + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2017-11-21T09:01:46+00:00" }, { - "name": "paragonie/random_compat", - "version": "v2.0.10", + "name": "symfony/polyfill-mbstring", + "version": "v1.6.0", "source": { "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", "shasum": "" }, "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*" + "php": ">=5.3.3" }, "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "pseudorandom", - "random" - ], - "time": "2017-03-13T16:27:32+00:00" - }, - { - "name": "psr/log", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" + "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2016-10-10T12:19:37+00:00" - }, - { - "name": "roots/sage-lib", - "version": "9.0.0-beta.4", - "source": { - "type": "git", - "url": "https://github.com/roots/sage-lib.git", - "reference": "71ed6e54e831fd1ced5bae028f0515d277e8c1c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/roots/sage-lib/zipball/71ed6e54e831fd1ced5bae028f0515d277e8c1c1", - "reference": "71ed6e54e831fd1ced5bae028f0515d277e8c1c1", - "shasum": "" - }, - "require": { - "composer/installers": "~1.0", - "illuminate/config": "~5.4", - "illuminate/view": "~5.4", - "php": ">=7" - }, - "require-dev": { - "squizlabs/php_codesniffer": "~3.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Roots\\Sage\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ben Word", - "email": "ben@benword.com", - "homepage": "https://github.com/retlehs" - }, - { - "name": "QWp6t", - "email": "hi@qwp6t.me", - "homepage": "https://github.com/qwp6t" + "dev-master": "1.6-dev" } - ], - "description": "Library files for Sage Starter Theme", - "homepage": "https://roots.io/sage/", - "keywords": [ - "wordpress" - ], - "time": "2017-08-11T23:38:23+00:00" - }, - { - "name": "soberwp/controller", - "version": "9.0.0-beta.4", - "source": { - "type": "git", - "url": "https://github.com/soberwp/controller.git", - "reference": "2b6c8450f4a3100b16bfc482c825d89422b6adc6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/soberwp/controller/zipball/2b6c8450f4a3100b16bfc482c825d89422b6adc6", - "reference": "2b6c8450f4a3100b16bfc482c825d89422b6adc6", - "shasum": "" }, - "require": { - "brain/hierarchy": "^2.3", - "composer/installers": "~1.0", - "hassankhan/config": "^0.10.0", - "php": ">=5.6.0", - "symfony/yaml": "^3.2" - }, - "require-dev": { - "squizlabs/php_codesniffer": "2.*" - }, - "type": "package", "autoload": { "psr-4": { - "Sober\\Controller\\": "src/", - "Sober\\Controller\\Module\\": "src/Module/" + "Symfony\\Polyfill\\Mbstring\\": "" }, "files": [ - "controller.php" + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -905,153 +656,92 @@ ], "authors": [ { - "name": "Darren Jacoby", - "email": "darren@jacoby.co.za", - "homepage": "https://github.com/darrenjacoby" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "WordPress package to enable a basic controller when using Blade with Sage 9", - "homepage": "https://github.com/soberwp", + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", "keywords": [ - "wordpress" + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" ], - "time": "2017-08-22T17:35:30+00:00" + "time": "2017-10-11T12:05:26+00:00" }, { - "name": "soberwp/intervention", - "version": "1.2.0-p", + "name": "wp-coding-standards/wpcs", + "version": "0.10.0", "source": { "type": "git", - "url": "https://github.com/soberwp/intervention.git", - "reference": "1698e51efe696c5867fb78ef7c5d2efff9b79260" + "url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git", + "reference": "b39490465f6fd7375743a395019cd597e12119c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/soberwp/intervention/zipball/1698e51efe696c5867fb78ef7c5d2efff9b79260", - "reference": "1698e51efe696c5867fb78ef7c5d2efff9b79260", + "url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/b39490465f6fd7375743a395019cd597e12119c9", + "reference": "b39490465f6fd7375743a395019cd597e12119c9", "shasum": "" }, "require": { - "composer/installers": "~1.0", - "php": ">=5.4.0" - }, - "require-dev": { - "squizlabs/php_codesniffer": "2.*" - }, - "type": "package", - "autoload": { - "psr-4": { - "Sober\\Intervention\\": "src/", - "Sober\\Intervention\\Module\\": "src/modules/" - }, - "files": [ - "intervention.php" - ] + "squizlabs/php_codesniffer": "^2.6" }, + "type": "library", "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { - "name": "Darren Jacoby", - "email": "darren@jacoby.co.za", - "homepage": "https://twitter.com/withjacoby" + "name": "Contributors", + "homepage": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/graphs/contributors" } ], - "description": "WordPress plugin containing modules to cleanup and customize wp-admin.", - "homepage": "https://github.com/soberwp", + "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", "keywords": [ + "phpcs", + "standards", "wordpress" ], - "time": "2017-08-26T12:21:27+00:00" + "time": "2016-08-29T20:04:47+00:00" }, { - "name": "symfony/debug", - "version": "v3.3.6", + "name": "wpreadme2markdown/wp2md", + "version": "3.0.1", "source": { "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "7c13ae8ce1e2adbbd574fc39de7be498e1284e13" + "url": "https://github.com/wpreadme2markdown/wp2md.git", + "reference": "6fec3a213080e32a5d53a235f89c6cf4d910572a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/7c13ae8ce1e2adbbd574fc39de7be498e1284e13", - "reference": "7c13ae8ce1e2adbbd574fc39de7be498e1284e13", + "url": "https://api.github.com/repos/wpreadme2markdown/wp2md/zipball/6fec3a213080e32a5d53a235f89c6cf4d910572a", + "reference": "6fec3a213080e32a5d53a235f89c6cf4d910572a", "shasum": "" }, "require": { - "php": ">=5.5.9", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + "php": ">= 5.5.9", + "symfony/console": "^3.2|^4.0", + "wpreadme2markdown/wpreadme2markdown": "^3.0.1" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } + "indeyets/pake": "~1.99", + "secondtruth/phar-compiler": "~1.1" }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } + "bin": [ + "bin/wp2md" ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com", - "time": "2017-07-28T15:27:31+00:00" - }, - { - "name": "symfony/finder", - "version": "v3.3.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/baea7f66d30854ad32988c11a09d7ffd485810c4", - "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, "autoload": { "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "WPReadme2Markdown\\Cli\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1059,54 +749,44 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Benjamin J. Balter" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Christian Archer", + "email": "sunchaser@sunchaser.info" } ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com", - "time": "2017-06-01T21:01:25+00:00" + "description": "CLI tool for converting WordPress Plugin readme.txt to Markdown", + "keywords": [ + "converter", + "markdown", + "readme", + "wordpress" + ], + "time": "2017-11-24T21:19:21+00:00" }, { - "name": "symfony/yaml", - "version": "v3.3.6", + "name": "wpreadme2markdown/wpreadme2markdown", + "version": "3.0.1", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed" + "url": "https://github.com/wpreadme2markdown/wp-readme-to-markdown.git", + "reference": "8066915828bb05a12b44360cda986e1d9e60047e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ddc23324e6cfe066f3dd34a37ff494fa80b617ed", - "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed", + "url": "https://api.github.com/repos/wpreadme2markdown/wp-readme-to-markdown/zipball/8066915828bb05a12b44360cda986e1d9e60047e", + "reference": "8066915828bb05a12b44360cda986e1d9e60047e", "shasum": "" }, "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/console": "~2.8|~3.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "php": ">= 5.3.3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, "autoload": { "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "WPReadme2Markdown\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1114,105 +794,26 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Benjamin J. Balter" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2017-07-23T12:43:26+00:00" - } - ], - "packages-dev": [ - { - "name": "squizlabs/php_codesniffer", - "version": "2.9.1", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", - "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "bin": [ - "scripts/phpcs", - "scripts/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" + "name": "Christian Archer", + "email": "sunchaser@sunchaser.info" } ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", + "description": "Convert WordPress Plugin readme.txt to Markdown", "keywords": [ - "phpcs", - "standards" + "converter", + "markdown", + "readme", + "wordpress" ], - "time": "2017-05-22T02:43:20+00:00" + "time": "2017-11-24T20:36:13+00:00" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "roots/sage-lib": 10, - "soberwp/controller": 10 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/config/assets.php b/config/assets.php deleted file mode 100644 index 979ea49..0000000 --- a/config/assets.php +++ /dev/null @@ -1,31 +0,0 @@ - get_theme_file_path().'/dist/mix-manifest.json', - - /* - |-------------------------------------------------------------------------- - | Assets Path URI - |-------------------------------------------------------------------------- - | - | The asset manifest contains relative paths to your assets. This URI will - | be prepended when using Sage's asset management system. Change this if - | you are using a CDN. - | - */ - - 'uri' => get_theme_file_uri().'/dist', -]; diff --git a/config/theme.php b/config/theme.php deleted file mode 100644 index f048be9..0000000 --- a/config/theme.php +++ /dev/null @@ -1,32 +0,0 @@ - get_theme_file_path(), - - /* - |-------------------------------------------------------------------------- - | Theme Directory URI - |-------------------------------------------------------------------------- - | - | This is the web server URI to your theme directory. - | - | Example: - | https://example.com/app/themes/sage - | - */ - - 'uri' => get_theme_file_uri(), -]; diff --git a/config/view.php b/config/view.php deleted file mode 100644 index c00d1b0..0000000 --- a/config/view.php +++ /dev/null @@ -1,51 +0,0 @@ - [ - get_theme_file_path().'/resources/views', - get_parent_theme_file_path().'/resources/views', - ], - - - /* - |-------------------------------------------------------------------------- - | Compiled View Path - |-------------------------------------------------------------------------- - | - | This option determines where all the compiled Blade templates will be - | stored for your application. Typically, this is within the uploads - | directory. However, as usual, you are free to change this value. - | - */ - - 'compiled' => wp_upload_dir()['basedir'].'/cache', - - - /* - |-------------------------------------------------------------------------- - | View Namespaces - |-------------------------------------------------------------------------- - | - | Blade has an underutilized feature that allows developers to add - | supplemental view paths that may contain conflictingly named views. - | These paths are prefixed with a namespace to get around the conflicts. - | A use case might be including views from within a plugin folder. - | - */ - - 'namespaces' => [ - /* Given the below example, in your views use something like: @include('WC::some.view.or.partial.here') */ - // 'WC' => WP_PLUGIN_DIR.'/woocommerce/templates/', - ], -]; diff --git a/dist/mix-manifest.json b/dist/mix-manifest.json index f06fe76..2c04400 100644 --- a/dist/mix-manifest.json +++ b/dist/mix-manifest.json @@ -1,5 +1,5 @@ { - "/scripts/main.js": "/scripts/main.js?id=02b42ac2ce995252e0ba", - "/styles/main.css": "/styles/main.css?id=8021de4bdd5014faae77", - "/scripts/customizer.js": "/scripts/customizer.js?id=16bf84cad576a20cf73d" + "/scripts/aldine.js": "/scripts/aldine.js?id=8a707791c89c90b8f4c6", + "/styles/aldine.css": "/styles/aldine.css?id=8021de4bdd5014faae77", + "/scripts/customizer.js": "/scripts/customizer.js?id=f1f1f4225cba4c1b35f2" } \ No newline at end of file diff --git a/dist/scripts/aldine.js b/dist/scripts/aldine.js new file mode 100644 index 0000000..471ef03 --- /dev/null +++ b/dist/scripts/aldine.js @@ -0,0 +1 @@ +!function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}({"+E39":function(t,e,n){t.exports=!n("S82l")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"+Sdf":function(t,e,n){"use strict";(function(t){e.a={init:function(){t("body").removeClass("no-js").addClass("js"),t(".toggle").click(function(e){e.preventDefault(),t(e.currentTarget).toggleClass("toggle--active"),t(".banner__navigation").toggleClass("banner__navigation--visible")})},finalize:function(){}}}).call(e,n("7t+N"))},"+ZMJ":function(t,e,n){var i=n("lOnJ");t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},"/7en":function(t,e,n){var i,r;!function(o,s){void 0===(r="function"==typeof(i=s)?i.call(e,n,e,t):i)||(t.exports=r)}("undefined"!=typeof window&&window,function(){"use strict";function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},i=n[t]=n[t]||[];return-1==i.indexOf(e)&&i.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var i=n.indexOf(e);return-1!=i&&n.splice(i,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){n=n.slice(0),e=e||[];for(var i=this._onceEvents&&this._onceEvents[t],r=0;ra||sa?1:-1)*(u?1:-1)}}return 0}}(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},l._getIsSameSortBy=function(t){for(var e=0;e0&&e-1 in t)}function u(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}function c(t,e,n){return ft.isFunction(e)?ft.grep(t,function(t,i){return!!e.call(t,i,t)!==n}):e.nodeType?ft.grep(t,function(t){return t===e!==n}):"string"!=typeof e?ft.grep(t,function(t){return rt.call(e,t)>-1!==n}):wt.test(e)?ft.filter(e,t,n):(e=ft.filter(e,t),ft.grep(t,function(t){return rt.call(e,t)>-1!==n&&1===t.nodeType}))}function l(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function f(t){return t}function h(t){throw t}function p(t,e,n,i){var r;try{t&&ft.isFunction(r=t.promise)?r.call(t).done(e).fail(n):t&&ft.isFunction(r=t.then)?r.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}function d(){Z.removeEventListener("DOMContentLoaded",d),n.removeEventListener("load",d),ft.ready()}function m(){this.expando=ft.expando+m.uid++}function g(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(Ot,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:At.test(t)?JSON.parse(t):t)}(n)}catch(t){}Nt.set(t,e,n)}else n=void 0;return n}function v(t,e,n,i){var r,o=1,s=20,a=i?function(){return i.cur()}:function(){return ft.css(t,e,"")},u=a(),c=n&&n[3]||(ft.cssNumber[e]?"":"px"),l=(ft.cssNumber[e]||"px"!==c&&+u)&&zt.exec(ft.css(t,e));if(l&&l[3]!==c){c=c||l[3],n=n||[],l=+u||1;do{l/=o=o||".5",ft.style(t,e,l+c)}while(o!==(o=a()/u)&&1!==o&&--s)}return n&&(l=+l||+u||0,r=n[1]?l+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=l,i.end=r)),r}function y(t){var e,n=t.ownerDocument,i=t.nodeName,r=qt[i];return r||(e=n.body.appendChild(n.createElement(i)),r=ft.css(e,"display"),e.parentNode.removeChild(e),"none"===r&&(r="block"),qt[i]=r,r)}function x(t,e){for(var n,i,r=[],o=0,s=t.length;o-1)r&&r.push(o);else if(c=ft.contains(o.ownerDocument,o),s=b(f.appendChild(o),"script"),c&&w(s),n)for(l=0;o=s[l++];)Bt.test(o.type||"")&&n.push(o);return f}function C(){return!0}function E(){return!1}function S(){try{return Z.activeElement}catch(t){}}function _(t,e,n,i,r,o){var s,a;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=void 0);for(a in e)_(t,a,n,i,e[a],o);return t}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=E;else if(!r)return t;return 1===o&&(s=r,(r=function(t){return ft().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=ft.guid++)),t.each(function(){ft.event.add(this,e,r,i,n)})}function D(t,e){return u(t,"table")&&u(11!==e.nodeType?e:e.firstChild,"tr")?ft(">tbody",t)[0]||t:t}function k(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function L(t){var e=Zt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function j(t,e){var n,i,r,o,s,a,u,c;if(1===e.nodeType){if(It.hasData(t)&&(o=It.access(t),s=It.set(e,o),c=o.events)){delete s.handle,s.events={};for(r in c)for(n=0,i=c[r].length;n1&&"string"==typeof d&&!lt.checkClone&&Kt.test(d))return t.each(function(r){var o=t.eq(r);m&&(e[0]=d.call(this,r,o.html())),N(o,e,n,i)});if(h&&(r=T(e,t[0].ownerDocument,!1,t,i),o=r.firstChild,1===r.childNodes.length&&(r=o),o||i)){for(u=(a=ft.map(b(r,"script"),k)).length;f=0&&nw.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[P]=!0,t}function r(t){var e=I.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var n=t.split("|"),i=n.length;i--;)w.attrHandle[n[i]]=e}function s(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function a(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function u(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function c(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&Tt(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function l(t){return i(function(e){return e=+e,i(function(n,i){for(var r,o=t([],n.length,e),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))})})}function f(t){return t&&void 0!==t.getElementsByTagName&&t}function h(){}function p(t){for(var e=0,n=t.length,i="";e1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function g(t,e,n,i,r){for(var o,s=[],a=0,u=t.length,c=null!=e;a-1&&(i[l]=!(a[l]=h))}}else x=g(x===a?x.splice(m,x.length):x),s?s(null,a,x,c):Q.apply(a,x)})}function y(t){for(var e,n,i,r=t.length,o=w.relative[t[0].type],s=o||w.relative[" "],a=o?1:0,u=d(function(t){return t===e},s,!0),c=d(function(t){return K(e,t)>-1},s,!0),l=[function(t,n,i){var r=!o&&(i||n!==D)||((e=n).nodeType?u(t,n,i):c(t,n,i));return e=null,r}];a1&&m(l),a>1&&p(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(ot,"$1"),n,a+~]|"+tt+")"+tt+"*"),ut=new RegExp("="+tt+"*([^\\]'\"]*?)"+tt+"*\\]","g"),ct=new RegExp(it),lt=new RegExp("^"+et+"$"),ft={ID:new RegExp("^#("+et+")"),CLASS:new RegExp("^\\.("+et+")"),TAG:new RegExp("^("+et+"|[*])"),ATTR:new RegExp("^"+nt),PSEUDO:new RegExp("^"+it),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+tt+"*(even|odd|(([+-]|)(\\d*)n|)"+tt+"*(?:([+-]|)"+tt+"*(\\d+)|))"+tt+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+tt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+tt+"*((?:-\\d)?\\d*)"+tt+"*\\)|)(?=[^-]|$)","i")},ht=/^(?:input|select|textarea|button)$/i,pt=/^h\d$/i,dt=/^[^{]+\{\s*\[native \w/,mt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,gt=/[+~]/,vt=new RegExp("\\\\([\\da-f]{1,6}"+tt+"?|("+tt+")|.)","ig"),yt=function(t,e,n){var i="0x"+e-65536;return i!=i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},xt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,bt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},wt=function(){j()},Tt=d(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{Q.apply(X=J.call(F.childNodes),F.childNodes),X[F.childNodes.length].nodeType}catch(t){Q={apply:X.length?function(t,e){V.apply(t,J.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}b=e.support={},C=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},j=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:F;return i!==I&&9===i.nodeType&&i.documentElement?(I=i,N=I.documentElement,A=!C(I),F!==I&&(n=I.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",wt,!1):n.attachEvent&&n.attachEvent("onunload",wt)),b.attributes=r(function(t){return t.className="i",!t.getAttribute("className")}),b.getElementsByTagName=r(function(t){return t.appendChild(I.createComment("")),!t.getElementsByTagName("*").length}),b.getElementsByClassName=dt.test(I.getElementsByClassName),b.getById=r(function(t){return N.appendChild(t).id=P,!I.getElementsByName||!I.getElementsByName(P).length}),b.getById?(w.filter.ID=function(t){var e=t.replace(vt,yt);return function(t){return t.getAttribute("id")===e}},w.find.ID=function(t,e){if(void 0!==e.getElementById&&A){var n=e.getElementById(t);return n?[n]:[]}}):(w.filter.ID=function(t){var e=t.replace(vt,yt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},w.find.ID=function(t,e){if(void 0!==e.getElementById&&A){var n,i,r,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(r=e.getElementsByName(t),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),w.find.TAG=b.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):b.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},w.find.CLASS=b.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&A)return e.getElementsByClassName(t)},H=[],O=[],(b.qsa=dt.test(I.querySelectorAll))&&(r(function(t){N.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&O.push("[*^$]="+tt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||O.push("\\["+tt+"*(?:value|"+Z+")"),t.querySelectorAll("[id~="+P+"-]").length||O.push("~="),t.querySelectorAll(":checked").length||O.push(":checked"),t.querySelectorAll("a#"+P+"+*").length||O.push(".#.+[+~]")}),r(function(t){t.innerHTML="";var e=I.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&O.push("name"+tt+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&O.push(":enabled",":disabled"),N.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&O.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),O.push(",.*:")})),(b.matchesSelector=dt.test(z=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&r(function(t){b.disconnectedMatch=z.call(t,"*"),z.call(t,"[s!='']:x"),H.push("!=",it)}),O=O.length&&new RegExp(O.join("|")),H=H.length&&new RegExp(H.join("|")),e=dt.test(N.compareDocumentPosition),W=e||dt.test(N.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},U=e?function(t,e){if(t===e)return L=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!b.sortDetached&&e.compareDocumentPosition(t)===n?t===I||t.ownerDocument===F&&W(F,t)?-1:e===I||e.ownerDocument===F&&W(F,e)?1:k?K(k,t)-K(k,e):0:4&n?-1:1)}:function(t,e){if(t===e)return L=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,a=[t],u=[e];if(!r||!o)return t===I?-1:e===I?1:r?-1:o?1:k?K(k,t)-K(k,e):0;if(r===o)return s(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)u.unshift(n);for(;a[i]===u[i];)i++;return i?s(a[i],u[i]):a[i]===F?-1:u[i]===F?1:0},I):I},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==I&&j(t),n=n.replace(ut,"='$1']"),b.matchesSelector&&A&&!$[n+" "]&&(!H||!H.test(n))&&(!O||!O.test(n)))try{var i=z.call(t,n);if(i||b.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return e(n,I,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==I&&j(t),W(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==I&&j(t);var n=w.attrHandle[e.toLowerCase()],i=n&&Y.call(w.attrHandle,e.toLowerCase())?n(t,e,!A):void 0;return void 0!==i?i:b.attributes||!A?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.escape=function(t){return(t+"").replace(xt,bt)},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,r=0;if(L=!b.detectDuplicates,k=!b.sortStable&&t.slice(0),t.sort(U),L){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)t.splice(n[i],1)}return k=null,t},T=e.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=T(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=T(e);return n},(w=e.selectors={cacheLength:50,createPseudo:i,match:ft,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(vt,yt),t[3]=(t[3]||t[4]||t[5]||"").replace(vt,yt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return ft.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ct.test(n)&&(e=E(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(vt,yt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=R[t+" "];return e||(e=new RegExp("(^|"+tt+")"+t+"("+tt+"|$)"))&&R(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(r){var o=e.attr(r,t);return null==o?"!="===n:!n||(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(rt," ")+" ").indexOf(i)>-1:"|="===n&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,u){var c,l,f,h,p,d,m=o!==s?"nextSibling":"previousSibling",g=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!u&&!a,x=!1;if(g){if(o){for(;m;){for(h=e;h=h[m];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;d=m="only"===t&&!d&&"nextSibling"}return!0}if(d=[s?g.firstChild:g.lastChild],s&&y){for(x=(p=(c=(l=(f=(h=g)[P]||(h[P]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]||[])[0]===q&&c[1])&&c[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(x=p=0)||d.pop();)if(1===h.nodeType&&++x&&h===e){l[t]=[q,p,x];break}}else if(y&&(x=p=(c=(l=(f=(h=e)[P]||(h[P]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]||[])[0]===q&&c[1]),!1===x)for(;(h=++p&&h&&h[m]||(x=p=0)||d.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++x||(y&&((l=(f=h[P]||(h[P]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]=[q,x]),h!==e)););return(x-=r)===i||x%i==0&&x/i>=0}}},PSEUDO:function(t,n){var r,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[P]?o(n):o.length>1?(r=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,r=o(t,n),s=r.length;s--;)t[i=K(t,r[s])]=!(e[i]=r[s])}):function(t){return o(t,0,r)}):o}},pseudos:{not:i(function(t){var e=[],n=[],r=S(t.replace(ot,"$1"));return r[P]?i(function(t,e,n,i){for(var o,s=r(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(vt,yt),function(e){return(e.textContent||e.innerText||T(e)).indexOf(t)>-1}}),lang:i(function(t){return lt.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(vt,yt).toLowerCase(),function(e){var n;do{if(n=A?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===N},focus:function(t){return t===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:c(!1),disabled:c(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!w.pseudos.empty(t)},header:function(t){return pt.test(t.nodeName)},input:function(t){return ht.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:l(function(){return[0]}),last:l(function(t,e){return[e-1]}),eq:l(function(t,e,n){return[n<0?n+e:n]}),even:l(function(t,e){for(var n=0;n=0;)t.push(i);return t}),gt:l(function(t,e,n){for(var i=n<0?n+e:n;++i0,o=t.length>0,s=function(i,s,a,u,c){var l,f,h,p=0,d="0",m=i&&[],v=[],y=D,x=i||o&&w.find.TAG("*",c),b=q+=null==y?1:Math.random()||.1,T=x.length;for(c&&(D=s===I||s||c);d!==T&&null!=(l=x[d]);d++){if(o&&l){for(f=0,s||l.ownerDocument===I||(j(l),a=!A);h=t[f++];)if(h(l,s||I,a)){u.push(l);break}c&&(q=b)}r&&((l=!h&&l)&&p--,i&&m.push(l))}if(p+=d,r&&d!==p){for(f=0;h=n[f++];)h(m,v,s,a);if(i){if(p>0)for(;d--;)m[d]||v[d]||(v[d]=G.call(u));v=g(v)}Q.apply(u,v),c&&!i&&v.length>0&&p+n.length>1&&e.uniqueSort(u)}return c&&(q=b,D=y),m};return r?i(s):s}(s,o))).selector=t}return a},_=e.select=function(t,e,n,i){var r,o,s,a,u,c="function"==typeof t&&t,l=!i&&E(t=c.selector||t);if(n=n||[],1===l.length){if((o=l[0]=l[0].slice(0)).length>2&&"ID"===(s=o[0]).type&&9===e.nodeType&&A&&w.relative[o[1].type]){if(!(e=(w.find.ID(s.matches[0].replace(vt,yt),e)||[])[0]))return n;c&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(r=ft.needsContext.test(t)?0:o.length;r--&&(s=o[r],!w.relative[a=s.type]);)if((u=w.find[a])&&(i=u(s.matches[0].replace(vt,yt),gt.test(o[0].type)&&f(e.parentNode)||e))){if(o.splice(r,1),!(t=i.length&&p(o)))return Q.apply(n,i),n;break}}return(c||S(t,l))(i,e,!A,n,!e||gt.test(t)&&f(e.parentNode)||e),n},b.sortStable=P.split("").sort(U).join("")===P,b.detectDuplicates=!!L,j(),b.sortDetached=r(function(t){return 1&t.compareDocumentPosition(I.createElement("fieldset"))}),r(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),b.attributes&&r(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||o(Z,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(n);ft.find=gt,ft.expr=gt.selectors,ft.expr[":"]=ft.expr.pseudos,ft.uniqueSort=ft.unique=gt.uniqueSort,ft.text=gt.getText,ft.isXMLDoc=gt.isXML,ft.contains=gt.contains,ft.escapeSelector=gt.escape;var vt=function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&ft(t).is(n))break;i.push(t)}return i},yt=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},xt=ft.expr.match.needsContext,bt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,wt=/^.[^:#\[\.,]*$/;ft.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?ft.find.matchesSelector(i,t)?[i]:[]:ft.find.matches(t,ft.grep(e,function(t){return 1===t.nodeType}))},ft.fn.extend({find:function(t){var e,n,i=this.length,r=this;if("string"!=typeof t)return this.pushStack(ft(t).filter(function(){for(e=0;e1?ft.uniqueSort(n):n},filter:function(t){return this.pushStack(c(this,t||[],!1))},not:function(t){return this.pushStack(c(this,t||[],!0))},is:function(t){return!!c(this,"string"==typeof t&&xt.test(t)?ft(t):t||[],!1).length}});var Tt,Ct=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(ft.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||Tt,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:Ct.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof ft?e[0]:e,ft.merge(this,ft.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:Z,!0)),bt.test(i[1])&&ft.isPlainObject(e))for(i in e)ft.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(r=Z.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):ft.isFunction(t)?void 0!==n.ready?n.ready(t):t(ft):ft.makeArray(t,this)}).prototype=ft.fn,Tt=ft(Z);var Et=/^(?:parents|prev(?:Until|All))/,St={children:!0,contents:!0,next:!0,prev:!0};ft.fn.extend({has:function(t){var e=ft(t,this),n=e.length;return this.filter(function(){for(var t=0;t-1:1===n.nodeType&&ft.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?ft.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?rt.call(ft(t),this[0]):rt.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(ft.uniqueSort(ft.merge(this.get(),ft(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),ft.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return vt(t,"parentNode")},parentsUntil:function(t,e,n){return vt(t,"parentNode",n)},next:function(t){return l(t,"nextSibling")},prev:function(t){return l(t,"previousSibling")},nextAll:function(t){return vt(t,"nextSibling")},prevAll:function(t){return vt(t,"previousSibling")},nextUntil:function(t,e,n){return vt(t,"nextSibling",n)},prevUntil:function(t,e,n){return vt(t,"previousSibling",n)},siblings:function(t){return yt((t.parentNode||{}).firstChild,t)},children:function(t){return yt(t.firstChild)},contents:function(t){return u(t,"iframe")?t.contentDocument:(u(t,"template")&&(t=t.content||t),ft.merge([],t.childNodes))}},function(t,e){ft.fn[t]=function(n,i){var r=ft.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=ft.filter(i,r)),this.length>1&&(St[t]||ft.uniqueSort(r),Et.test(t)&&r.reverse()),this.pushStack(r)}});var _t=/[^\x20\t\r\n\f]+/g;ft.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return ft.each(t.match(_t)||[],function(t,n){e[n]=!0}),e}(t):ft.extend({},t);var e,n,i,r,o=[],s=[],a=-1,u=function(){for(r=r||t.once,i=e=!0;s.length;a=-1)for(n=s.shift();++a-1;)o.splice(n,1),n<=a&&a--}),this},has:function(t){return t?ft.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||e||(o=n=""),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},ft.extend({Deferred:function(t){var e=[["notify","progress",ft.Callbacks("memory"),ft.Callbacks("memory"),2],["resolve","done",ft.Callbacks("once memory"),ft.Callbacks("once memory"),0,"resolved"],["reject","fail",ft.Callbacks("once memory"),ft.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return ft.Deferred(function(n){ft.each(e,function(e,i){var r=ft.isFunction(t[i[4]])&&t[i[4]];o[i[1]](function(){var t=r&&r.apply(this,arguments);t&&ft.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[t]:arguments)})}),t=null}).promise()},then:function(t,i,r){function o(t,e,i,r){return function(){var a=this,u=arguments,c=function(){var n,c;if(!(t=s&&(i!==h&&(a=void 0,u=[n]),e.rejectWith(a,u))}};t?l():(ft.Deferred.getStackHook&&(l.stackTrace=ft.Deferred.getStackHook()),n.setTimeout(l))}}var s=0;return ft.Deferred(function(n){e[0][3].add(o(0,n,ft.isFunction(r)?r:f,n.notifyWith)),e[1][3].add(o(0,n,ft.isFunction(t)?t:f)),e[2][3].add(o(0,n,ft.isFunction(i)?i:h))}).promise()},promise:function(t){return null!=t?ft.extend(t,r):r}},o={};return ft.each(e,function(t,n){var s=n[2],a=n[5];r[n[1]]=s.add,a&&s.add(function(){i=a},e[3-t][2].disable,e[0][2].lock),s.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=s.fireWith}),r.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,i=Array(n),r=et.call(arguments),o=ft.Deferred(),s=function(t){return function(n){i[t]=this,r[t]=arguments.length>1?et.call(arguments):n,--e||o.resolveWith(i,r)}};if(e<=1&&(p(t,o.done(s(n)).resolve,o.reject,!e),"pending"===o.state()||ft.isFunction(r[n]&&r[n].then)))return o.then();for(;n--;)p(r[n],s(n),o.reject);return o.promise()}});var Dt=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ft.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&Dt.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},ft.readyException=function(t){n.setTimeout(function(){throw t})};var kt=ft.Deferred();ft.fn.ready=function(t){return kt.then(t).catch(function(t){ft.readyException(t)}),this},ft.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--ft.readyWait:ft.isReady)||(ft.isReady=!0,!0!==t&&--ft.readyWait>0||kt.resolveWith(Z,[ft]))}}),ft.ready.then=kt.then,"complete"===Z.readyState||"loading"!==Z.readyState&&!Z.documentElement.doScroll?n.setTimeout(ft.ready):(Z.addEventListener("DOMContentLoaded",d),n.addEventListener("load",d));var Lt=function(t,e,n,i,r,o,s){var a=0,u=t.length,c=null==n;if("object"===ft.type(n)){r=!0;for(a in n)Lt(t,e,a,n[a],!0,o,s)}else if(void 0!==i&&(r=!0,ft.isFunction(i)||(s=!0),c&&(s?(e.call(t,i),e=null):(c=e,e=function(t,e,n){return c.call(ft(t),n)})),e))for(;a1,null,!0)},removeData:function(t){return this.each(function(){Nt.remove(this,t)})}}),ft.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=It.get(t,e),n&&(!i||Array.isArray(n)?i=It.access(t,e,ft.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=ft.queue(t,e),i=n.length,r=n.shift(),o=ft._queueHooks(t,e),s=function(){ft.dequeue(t,e)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,s,o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return It.get(t,n)||It.access(t,n,{empty:ft.Callbacks("once memory").add(function(){It.remove(t,[e+"queue",n])})})}}),ft.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Bt=/^$|\/(?:java|ecma)script/i,$t={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};$t.optgroup=$t.option,$t.tbody=$t.tfoot=$t.colgroup=$t.caption=$t.thead,$t.th=$t.td;var Ut=/<|&#?\w+;/;!function(){var t=Z.createDocumentFragment().appendChild(Z.createElement("div")),e=Z.createElement("input");e.setAttribute("type","radio"),e.setAttribute("checked","checked"),e.setAttribute("name","t"),t.appendChild(e),lt.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",lt.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Yt=Z.documentElement,Xt=/^key/,Gt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Vt=/^([^.]*)(?:\.(.+)|)/;ft.event={global:{},add:function(t,e,n,i,r){var o,s,a,u,c,l,f,h,p,d,m,g=It.get(t);if(g)for(n.handler&&(n=(o=n).handler,r=o.selector),r&&ft.find.matchesSelector(Yt,r),n.guid||(n.guid=ft.guid++),(u=g.events)||(u=g.events={}),(s=g.handle)||(s=g.handle=function(e){return void 0!==ft&&ft.event.triggered!==e.type?ft.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(_t)||[""]).length;c--;)p=m=(a=Vt.exec(e[c])||[])[1],d=(a[2]||"").split(".").sort(),p&&(f=ft.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,f=ft.event.special[p]||{},l=ft.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&ft.expr.match.needsContext.test(r),namespace:d.join(".")},o),(h=u[p])||((h=u[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,i,d,s)||t.addEventListener&&t.addEventListener(p,s)),f.add&&(f.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,l):h.push(l),ft.event.global[p]=!0)},remove:function(t,e,n,i,r){var o,s,a,u,c,l,f,h,p,d,m,g=It.hasData(t)&&It.get(t);if(g&&(u=g.events)){for(c=(e=(e||"").match(_t)||[""]).length;c--;)if(a=Vt.exec(e[c])||[],p=m=a[1],d=(a[2]||"").split(".").sort(),p){for(f=ft.event.special[p]||{},h=u[p=(i?f.delegateType:f.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)l=h[o],!r&&m!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||i&&i!==l.selector&&("**"!==i||!l.selector)||(h.splice(o,1),l.selector&&h.delegateCount--,f.remove&&f.remove.call(t,l));s&&!h.length&&(f.teardown&&!1!==f.teardown.call(t,d,g.handle)||ft.removeEvent(t,p,g.handle),delete u[p])}else for(p in u)ft.event.remove(t,p+e[c],n,i,!0);ft.isEmptyObject(u)&&It.remove(t,"handle events")}},dispatch:function(t){var e,n,i,r,o,s,a=ft.event.fix(t),u=new Array(arguments.length),c=(It.get(this,"events")||{})[a.type]||[],l=ft.event.special[a.type]||{};for(u[0]=a,e=1;e=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(o=[],s={},n=0;n-1:ft.find(r,this,null,[c]).length),s[r]&&o.push(i);o.length&&a.push({elem:c,handlers:o})}return c=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,Jt=/\s*$/g;ft.extend({htmlPrefilter:function(t){return t.replace(Qt,"<$1>")},clone:function(t,e,n){var i,r,o,s,a=t.cloneNode(!0),u=ft.contains(t.ownerDocument,t);if(!(lt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||ft.isXMLDoc(t)))for(s=b(a),i=0,r=(o=b(t)).length;i0&&w(s,!u&&b(t,"script")),a},cleanData:function(t){for(var e,n,i,r=ft.event.special,o=0;void 0!==(n=t[o]);o++)if(jt(n)){if(e=n[It.expando]){if(e.events)for(i in e.events)r[i]?ft.event.remove(n,i):ft.removeEvent(n,i,e.handle);n[It.expando]=void 0}n[Nt.expando]&&(n[Nt.expando]=void 0)}}}),ft.fn.extend({detach:function(t){return A(this,t,!0)},remove:function(t){return A(this,t)},text:function(t){return Lt(this,function(t){return void 0===t?ft.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return N(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){D(this,t).appendChild(t)}})},prepend:function(){return N(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=D(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return N(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return N(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(ft.cleanData(b(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return ft.clone(this,t,e)})},html:function(t){return Lt(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Jt.test(t)&&!$t[(Rt.exec(t)||["",""])[1].toLowerCase()]){t=ft.htmlPrefilter(t);try{for(;n1)}}),ft.Tween=q,(q.prototype={constructor:q,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||ft.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(ft.cssNumber[n]?"":"px")},cur:function(){var t=q.propHooks[this.prop];return t&&t.get?t.get(this):q.propHooks._default.get(this)},run:function(t){var e,n=q.propHooks[this.prop];return this.options.duration?this.pos=e=ft.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):q.propHooks._default.set(this),this}}).init.prototype=q.prototype,(q.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=ft.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){ft.fx.step[t.prop]?ft.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[ft.cssProps[t.prop]]&&!ft.cssHooks[t.prop]?t.elem[t.prop]=t.now:ft.style(t.elem,t.prop,t.now+t.unit)}}}).scrollTop=q.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},ft.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},ft.fx=q.prototype.init,ft.fx.step={};var le,fe,he=/^(?:toggle|show|hide)$/,pe=/queueHooks$/;ft.Animation=ft.extend(U,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return v(n.elem,t,zt.exec(e),n),n}]},tweener:function(t,e){ft.isFunction(t)?(e=t,t=["*"]):t=t.match(_t);for(var n,i=0,r=t.length;i1)},removeAttr:function(t){return this.each(function(){ft.removeAttr(this,t)})}}),ft.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?ft.prop(t,e,n):(1===o&&ft.isXMLDoc(t)||(r=ft.attrHooks[e.toLowerCase()]||(ft.expr.match.bool.test(e)?de:void 0)),void 0!==n?null===n?void ft.removeAttr(t,e):r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(i=r.get(t,e))?i:null==(i=ft.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!lt.radioValue&&"radio"===e&&u(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,r=e&&e.match(_t);if(r&&1===t.nodeType)for(;n=r[i++];)t.removeAttribute(n)}}),de={set:function(t,e,n){return!1===e?ft.removeAttr(t,n):t.setAttribute(n,n),n}},ft.each(ft.expr.match.bool.source.match(/\w+/g),function(t,e){var n=me[e]||ft.find.attr;me[e]=function(t,e,i){var r,o,s=e.toLowerCase();return i||(o=me[s],me[s]=r,r=null!=n(t,e,i)?s:null,me[s]=o),r}});var ge=/^(?:input|select|textarea|button)$/i,ve=/^(?:a|area)$/i;ft.fn.extend({prop:function(t,e){return Lt(this,ft.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[ft.propFix[t]||t]})}}),ft.extend({prop:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ft.isXMLDoc(t)||(e=ft.propFix[e]||e,r=ft.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=ft.find.attr(t,"tabindex");return e?parseInt(e,10):ge.test(t.nodeName)||ve.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),lt.optSelected||(ft.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),ft.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ft.propFix[this.toLowerCase()]=this}),ft.fn.extend({addClass:function(t){var e,n,i,r,o,s,a,u=0;if(ft.isFunction(t))return this.each(function(e){ft(this).addClass(t.call(this,e,X(this)))});if("string"==typeof t&&t)for(e=t.match(_t)||[];n=this[u++];)if(r=X(n),i=1===n.nodeType&&" "+Y(r)+" "){for(s=0;o=e[s++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(a=Y(i))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,r,o,s,a,u=0;if(ft.isFunction(t))return this.each(function(e){ft(this).removeClass(t.call(this,e,X(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(_t)||[];n=this[u++];)if(r=X(n),i=1===n.nodeType&&" "+Y(r)+" "){for(s=0;o=e[s++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");r!==(a=Y(i))&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):ft.isFunction(t)?this.each(function(n){ft(this).toggleClass(t.call(this,n,X(this),e),e)}):this.each(function(){var e,i,r,o;if("string"===n)for(i=0,r=ft(this),o=t.match(_t)||[];e=o[i++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==n||((e=X(this))&&It.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":It.get(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+Y(X(n))+" ").indexOf(e)>-1)return!0;return!1}});var ye=/\r/g;ft.fn.extend({val:function(t){var e,n,i,r=this[0];if(arguments.length)return i=ft.isFunction(t),this.each(function(n){var r;1===this.nodeType&&(null==(r=i?t.call(this,n,ft(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=ft.map(r,function(t){return null==t?"":t+""})),(e=ft.valHooks[this.type]||ft.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))});if(r)return(e=ft.valHooks[r.type]||ft.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(ye,""):null==n?"":n}}),ft.extend({valHooks:{option:{get:function(t){var e=ft.find.attr(t,"value");return null!=e?e:Y(ft.text(t))}},select:{get:function(t){var e,n,i,r=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],c=s?o+1:r.length;for(i=o<0?c:s?o:0;i-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),ft.each(["radio","checkbox"],function(){ft.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=ft.inArray(ft(t).val(),e)>-1}},lt.checkOn||(ft.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var xe=/^(?:focusinfocus|focusoutblur)$/;ft.extend(ft.event,{trigger:function(t,e,i,r){var o,s,a,u,c,l,f,h=[i||Z],p=at.call(t,"type")?t.type:t,d=at.call(t,"namespace")?t.namespace.split("."):[];if(s=a=i=i||Z,3!==i.nodeType&&8!==i.nodeType&&!xe.test(p+ft.event.triggered)&&(p.indexOf(".")>-1&&(p=(d=p.split(".")).shift(),d.sort()),c=p.indexOf(":")<0&&"on"+p,t=t[ft.expando]?t:new ft.Event(p,"object"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=d.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),e=null==e?[t]:ft.makeArray(e,[t]),f=ft.event.special[p]||{},r||!f.trigger||!1!==f.trigger.apply(i,e))){if(!r&&!f.noBubble&&!ft.isWindow(i)){for(u=f.delegateType||p,xe.test(u+p)||(s=s.parentNode);s;s=s.parentNode)h.push(s),a=s;a===(i.ownerDocument||Z)&&h.push(a.defaultView||a.parentWindow||n)}for(o=0;(s=h[o++])&&!t.isPropagationStopped();)t.type=o>1?u:f.bindType||p,(l=(It.get(s,"events")||{})[t.type]&&It.get(s,"handle"))&&l.apply(s,e),(l=c&&s[c])&&l.apply&&jt(s)&&(t.result=l.apply(s,e),!1===t.result&&t.preventDefault());return t.type=p,r||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(h.pop(),e)||!jt(i)||c&&ft.isFunction(i[p])&&!ft.isWindow(i)&&((a=i[c])&&(i[c]=null),ft.event.triggered=p,i[p](),ft.event.triggered=void 0,a&&(i[c]=a)),t.result}},simulate:function(t,e,n){var i=ft.extend(new ft.Event,n,{type:t,isSimulated:!0});ft.event.trigger(i,null,e)}}),ft.fn.extend({trigger:function(t,e){return this.each(function(){ft.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return ft.event.trigger(t,e,n,!0)}}),ft.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){ft.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),ft.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),lt.focusin="onfocusin"in n,lt.focusin||ft.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){ft.event.simulate(e,t.target,ft.event.fix(t))};ft.event.special[e]={setup:function(){var i=this.ownerDocument||this,r=It.access(i,e);r||i.addEventListener(t,n,!0),It.access(i,e,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=It.access(i,e)-1;r?It.access(i,e,r):(i.removeEventListener(t,n,!0),It.remove(i,e))}}});var be=n.location,we=ft.now(),Te=/\?/;ft.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||ft.error("Invalid XML: "+t),e};var Ce=/\[\]$/,Ee=/\r?\n/g,Se=/^(?:submit|button|image|reset|file)$/i,_e=/^(?:input|select|textarea|keygen)/i;ft.param=function(t,e){var n,i=[],r=function(t,e){var n=ft.isFunction(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(t)||t.jquery&&!ft.isPlainObject(t))ft.each(t,function(){r(this.name,this.value)});else for(n in t)G(n,t[n],e,r);return i.join("&")},ft.fn.extend({serialize:function(){return ft.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=ft.prop(this,"elements");return t?ft.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!ft(this).is(":disabled")&&_e.test(this.nodeName)&&!Se.test(t)&&(this.checked||!Mt.test(t))}).map(function(t,e){var n=ft(this).val();return null==n?null:Array.isArray(n)?ft.map(n,function(t){return{name:e.name,value:t.replace(Ee,"\r\n")}}):{name:e.name,value:n.replace(Ee,"\r\n")}}).get()}});var De=/%20/g,ke=/#.*$/,Le=/([?&])_=[^&]*/,je=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ie=/^(?:GET|HEAD)$/,Ne=/^\/\//,Ae={},Oe={},He="*/".concat("*"),ze=Z.createElement("a");ze.href=be.href,ft.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:be.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(be.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":He,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":ft.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?J(J(t,ft.ajaxSettings),e):J(ft.ajaxSettings,t)},ajaxPrefilter:V(Ae),ajaxTransport:V(Oe),ajax:function(t,e){function i(t,e,i,a){var c,h,p,b,w,T=e;l||(l=!0,u&&n.clearTimeout(u),r=void 0,s=a||"",C.readyState=t>0?4:0,c=t>=200&&t<300||304===t,i&&(b=function(t,e,n){for(var i,r,o,s,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){u.unshift(r);break}if(u[0]in n)o=u[0];else{for(r in n){if(!u[0]||t.converters[r+" "+u[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),n[o]}(d,C,i)),b=function(t,e,n,i){var r,o,s,a,u,c={},l=t.dataTypes.slice();if(l[1])for(s in t.converters)c[s.toLowerCase()]=t.converters[s];for(o=l.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=c[u+" "+o]||c["* "+o]))for(r in c)if((a=r.split(" "))[1]===o&&(s=c[u+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[r]:!0!==c[r]&&(o=a[0],l.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(d,b,C,c),c?(d.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(ft.lastModified[o]=w),(w=C.getResponseHeader("etag"))&&(ft.etag[o]=w)),204===t||"HEAD"===d.type?T="nocontent":304===t?T="notmodified":(T=b.state,h=b.data,c=!(p=b.error))):(p=T,!t&&T||(T="error",t<0&&(t=0))),C.status=t,C.statusText=(e||T)+"",c?v.resolveWith(m,[h,T,C]):v.rejectWith(m,[C,T,p]),C.statusCode(x),x=void 0,f&&g.trigger(c?"ajaxSuccess":"ajaxError",[C,d,c?h:p]),y.fireWith(m,[C,T]),f&&(g.trigger("ajaxComplete",[C,d]),--ft.active||ft.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var r,o,s,a,u,c,l,f,h,p,d=ft.ajaxSetup({},e),m=d.context||d,g=d.context&&(m.nodeType||m.jquery)?ft(m):ft.event,v=ft.Deferred(),y=ft.Callbacks("once memory"),x=d.statusCode||{},b={},w={},T="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(l){if(!a)for(a={};e=je.exec(s);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return l?s:null},setRequestHeader:function(t,e){return null==l&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,b[t]=e),this},overrideMimeType:function(t){return null==l&&(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)C.always(t[C.status]);else for(e in t)x[e]=[x[e],t[e]];return this},abort:function(t){var e=t||T;return r&&r.abort(e),i(0,e),this}};if(v.promise(C),d.url=((t||d.url||be.href)+"").replace(Ne,be.protocol+"//"),d.type=e.method||e.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(_t)||[""],null==d.crossDomain){c=Z.createElement("a");try{c.href=d.url,c.href=c.href,d.crossDomain=ze.protocol+"//"+ze.host!=c.protocol+"//"+c.host}catch(t){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=ft.param(d.data,d.traditional)),Q(Ae,d,e,C),l)return C;(f=ft.event&&d.global)&&0==ft.active++&&ft.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Ie.test(d.type),o=d.url.replace(ke,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(De,"+")):(p=d.url.slice(o.length),d.data&&(o+=(Te.test(o)?"&":"?")+d.data,delete d.data),!1===d.cache&&(o=o.replace(Le,"$1"),p=(Te.test(o)?"&":"?")+"_="+we+++p),d.url=o+p),d.ifModified&&(ft.lastModified[o]&&C.setRequestHeader("If-Modified-Since",ft.lastModified[o]),ft.etag[o]&&C.setRequestHeader("If-None-Match",ft.etag[o])),(d.data&&d.hasContent&&!1!==d.contentType||e.contentType)&&C.setRequestHeader("Content-Type",d.contentType),C.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+He+"; q=0.01":""):d.accepts["*"]);for(h in d.headers)C.setRequestHeader(h,d.headers[h]);if(d.beforeSend&&(!1===d.beforeSend.call(m,C,d)||l))return C.abort();if(T="abort",y.add(d.complete),C.done(d.success),C.fail(d.error),r=Q(Oe,d,e,C)){if(C.readyState=1,f&&g.trigger("ajaxSend",[C,d]),l)return C;d.async&&d.timeout>0&&(u=n.setTimeout(function(){C.abort("timeout")},d.timeout));try{l=!1,r.send(b,i)}catch(t){if(l)throw t;i(-1,t)}}else i(-1,"No Transport");return C},getJSON:function(t,e,n){return ft.get(t,e,n,"json")},getScript:function(t,e){return ft.get(t,void 0,e,"script")}}),ft.each(["get","post"],function(t,e){ft[e]=function(t,n,i,r){return ft.isFunction(n)&&(r=r||i,i=n,n=void 0),ft.ajax(ft.extend({url:t,type:e,dataType:r,data:n,success:i},ft.isPlainObject(t)&&t))}}),ft._evalUrl=function(t){return ft.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},ft.fn.extend({wrapAll:function(t){var e;return this[0]&&(ft.isFunction(t)&&(t=t.call(this[0])),e=ft(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return ft.isFunction(t)?this.each(function(e){ft(this).wrapInner(t.call(this,e))}):this.each(function(){var e=ft(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=ft.isFunction(t);return this.each(function(n){ft(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){ft(this).replaceWith(this.childNodes)}),this}}),ft.expr.pseudos.hidden=function(t){return!ft.expr.pseudos.visible(t)},ft.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},ft.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var We={0:200,1223:204},Pe=ft.ajaxSettings.xhr();lt.cors=!!Pe&&"withCredentials"in Pe,lt.ajax=Pe=!!Pe,ft.ajaxTransport(function(t){var e,i;if(lt.cors||Pe&&!t.crossDomain)return{send:function(r,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(s in r)a.setRequestHeader(s,r[s]);e=function(t){return function(){e&&(e=i=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(We[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),i=a.onerror=e("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout(function(){e&&i()})},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),ft.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),ft.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return ft.globalEval(t),t}}}),ft.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),ft.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(i,r){e=ft(" - - - - - -
-
-
- - - diff --git a/lib/infusion/src/framework/preferences/html/SeparatedPanelPrefsEditorFrame-nativeHTML.html b/lib/infusion/src/framework/preferences/html/SeparatedPanelPrefsEditorFrame-nativeHTML.html deleted file mode 100644 index 9323eb7..0000000 --- a/lib/infusion/src/framework/preferences/html/SeparatedPanelPrefsEditorFrame-nativeHTML.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Preferences Editor - - - -
-
-
- - - diff --git a/lib/infusion/src/framework/preferences/images/default/separatedpanelbg.png b/lib/infusion/src/framework/preferences/images/default/separatedpanelbg.png deleted file mode 100644 index 8ec84b2cf98f63f7d13bdb9bc0d9bd496d4fc36d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7249 zcmZ8mWl$WSSxDzzE1_|!E3oO34y9M_IcY;F#2`suu2<~o+TaX|x-@W(U zdiAENr+d0ipYGFtCss>C2^)g~0{{SEt0>Fs{PoKJ7#iZ=dnuU-@2^7#DI0kL0GNdT z7y=+Sp9}y%uyNEg1RJWWiCF_(xh-vgR<_)}uAskY06@Z5>~H953$~>5b#-y`6!Vp2 z_!mO#Z~RZ1hk@>25U{f(gQ2<>-CLlCE!`XLH{84oQW$h}bP^smc49j6ivKD9`;ugE z0E0ndJUl)=KHNS6+&~X|9zIb~Q664?9)5nVzX&c*KR2+YFPEDqf`aX1o7~3^YZ+c`EQ}bUyWjK zJ!~z(Ko312&_zo2pC!<#xLVrV>eyP^_(|~mf5d-UO7Q$M$N!n@-=hDO{i|9E<8S5v zZcqw?a@QXR0H8=$k(bqTKvrKivf5UzkF-?1%r=_+WBw!XxMIy{cSGgZQ;^JrTe<4% za55YmycoJ&vB&-Om%r<}ecIjKKU|Y~ZfXf|adTOdtA+bcxU; z7wun7qe)1t^!9w~RM_*CfIuK(!5zK!=i685WA`3jr^N?ze}=@jxuvC~HHHXv2TjF9 zsc=?mcg((kg2kBq#3Uu9%5N?XJ#oKpxNBTMq{I=@j|4A&|MrFi{pIq71P0&U-#<^# z7F_MhJ?!0pK=InIh1hx5pn;<6rVTq!GBPxXL^6|Nw4W}4?s(-lkJk}2hUD_^^r(}A z8Wx}+NRU4yAlTfmYu(JuPzs`e9NvG2avx3V-3JOqu#EnD7;lIAsYwBnQqssiIM1hc zD;2LCi1^>pI!G)2yx6>Zj8L1=Ot!W5?0apQUFvhJvUD@wu)g9xPTD$Nv3^v*z(2(n z^m}BQd2s5_5DSC+1gZ1j)b;lKWTJT>y4| zG)>7c%OglNX&E3}d{vxE!J{A4Nq4^tyNX_-M@Q9uO;g1C9An4YUY?2+-ES%#Fp<*T zSJ2onIw%4GeGEM^^~=jC`#{S+1zY}udaZS5xq_QvqQ_75-A)@Go6|%}7@;Klj(>Cc zI!}ew+3m?ckkLr8NP|~37l}>-|3WHFK%$rn_CvdI#t8%*A#XX%=*KOBXldt@+^Y}h zq#5-;vpGQs`G3MUsi#L&`pzK0P!^0nB{%HOkP!#RoN!D5kGO8HC~|D2NsEJqv-O_f z7ZfrD1~ilb&IAuCD-Ausw{QDrpy=fZ%GHa7bb}^!;=TRAL3_^(h(%lScPaBb1kB)6?y=kEP@e-6-5T*CA7E zdql#Pw2LbyIWz&PrUxTNu6qYVc{CCA^MYF!FH&2@{81u_KQ> zNMJb3Bq4n8>u#)o_<%eh?~lTj{Omz&rjtKrVkoS4HOPX$`R5^op7 z{hT|hx~SXL&>&U9x7H%j`a^+hdr(k6CTplsV@Y(tZdaUA`}$rfQUW6zn_hQjiD$mtU8=U8_>2ibDB?v9ciHiqx1MCinP(*-|-nYaV7A0lF^s@f17!Uw6zNjeBk9I+hI$$8^GRomFPQJN=_wV%J6H>BZTa%w|%+*Ob~ zI$k0cB^^|&crDgZI~!YD;B@shq~RT=69K8IZ65 zTK&^%ZGx^ZvfsCGC)RMz-(-${dHrZ(_oG;5RaEcJ*BV@Ej z9c2RXlNk$$mqTqrqb9ARH^0(yiT4E3GjKtfUm86llze`yk?^aUHUBoaNYAeu$qw%k zmP$u868iE{S(Sc#ONgF9)1mt-n1HTy&|@t| z2he*p97ovHoxfE&;B}{R#ZihA#jP07cSH~s-0MwWGYRd}5yE95SLRL{ShUu7!sHKi z5Fi*(27`6ZNU+cqKT;VENT@Z(s&6Obu92^GwZX#@Mh~Ai@~P*(o>x8(9cG5plmlnl z_Ni(1p-j>fL)|Hc1}Bog#XQf)%U;VO^2Zbq4X*G*TT~$qz7$_kNe5RV71`F?6riqB z(vuBWii@U-49oD+@!vW-zCCSo^!T|ml0NemEG*4Uc>35IX#jlm`S1-(q>|bbp}5rS z)~f6i9^E8nsmgzdEl|pWa+R2nwDtmFsQ7w6s#!lPD=N72yym5-NYiJiaUUP z0utKfS4C`2{}3^4Cizupre!5L4n#3qxCyTt7}A{qfhKfi6=NIQkmu+5+ubzNjRhG+ zWC7ePD3?nQAD-XvRmj|; z-BG2KfYjM+z5~)1mOD7azu_`;nzM16{@;!9V-gm6Y|iQ z3Mwfyp769t8!0)1hh900ooDJ};j9kozZe*sCNV9`9Df8LN_?`iP*67iG2h|q-n#&| z&^JbY^G8_G1_+B9BMEb|cZ#p3t9Yf0;DcLy-!H}}9y+Az#phW2s#(#cqMyu>(xy>Q zIQddgqRrOvJu(t%dMM2VGB1cn$T#wh${R!kmGb@O_m6ibI74pk- zigUKsOyS?B1X;6dM>cjszl+In`)!|-*|0E9uYvT)tX+3y5yJ(G29bZt+t0ff`Y=+& z7L(Q}VaeFDhMmIaVU+>fHPJ*DA7|5eGxv8f zTsh58mq--j1os~3u>eNlPO6GyAR>YiGnDs5!$ZS^os{QlglI@aS`$Z8YGZl!K;%w) zy`Z?!KcMw>^(i;_kgPzSDNaZx(?~^6%_n|K$jBDP$AV}D!J5b1o2oq{JOO80mmZFf zCfaPQ;Ska1{GGCy*5!ptA&+q6Rza?kOH&38DVjQb}=sf|&SVS*CI z+-pKvuT;WLer20E6E(3V`^WN)7jQYPFokoqH44`C!WKP4IGk)z7%(R)(TLq>d>S}0 z%F%v?nVman0?u9am{$8ZxhunE3$RG25+~!|_m!j9vB#Hyqk7pQj%uU6eGW%?Xpqp8 z-eP(?V9Jh&e>DTIC7%}1W(D-UJYKzhRzZwooYQJY0sWy8LhUKK=6$@ikX;#+%Y(UU+)=Ae(%c%~* zP32}L5n*|Jdb%~&hpdye9a*nyUfG+qW}Wy!3jyV~YJfDA0zvI3pdHjgVw6*ZlRB9b zIxoQoia^Eh+b+k_l%4z);oIDxiOsv`UrQ7o6Y+-UR|F*QRl+Hz&;(U+wC}^2x4^sH zth8d6mB9TDwYwUya8t*|RLA|EE&1s+Qpe(jih?rImO~{J(*pL{lYiH>C)=*H73?kT zs+sSeWDP_(ZWXngAe-LH`|^JC4+FMT*D{y$_g8$hqFSO{#Dr=pZK;f32?-)~NZ(!+ zHz9Yb+!?GtCJsjBNdl$1Wgs&y%B2f3JAb4Hxo_XMy0|6H0y3@h>g`Xm`3p{BXI{ zXk$EDxS|M2cw^wRY{Twlm@=Z1<2|z*Qnl6ZFqfsOfXfX7t8~_)tuf!c(6AC_yKMwk znfPDrJ#NG(oyaZQUq{!Zs9mvVaP5zZ0fq~*eVHY{sRYm&<(yI+IRvh+_79z9n8=;4 zN{6IqRCL@)mCK>8_(1i-ubiR2q7Ir10WOr+CxZ!%fXqqhwASJC8;$lIP(L4G$hexr z3%o#{eY^1Tqt!AAaxpkIBg*Niw>b=%U22gOjnBCW-&o(eS=B+3ImZ|Y>q{}kJbpkX zwnZ_+u}9W)-j)>DpuSG=t)AC#t^<1Wq7>TgY2CA)YfHv=N9WTd4a{~zG$B>cohk{s z9z97owqdUob;k*kwiKc1z@<_~7a`&xHKGFSaVDURzmo>DGp?A;S`KLgda&(h)1Fb^pu0>JH52;ft6*k7ih9+~BEt}c* zKM8I2PGLdLeVY>=j+XRDW%wl+;ap|g(?3$=${fn7IQR9vT*k{0CCMhm?Q#D>M6e=Pcn|2gOjUl9q5s$hV5y6@4j9ak60R{ikQw#^9twDIl-E9B41 z1RFHo$#rQAesfsmfjFNP2i2KV=Nry)+t=o@rjdz zqR-}h;b-l3M|mkd^eTy@n|uz6oFzS}+4=3kwg~!Cw zp$fyQ(GSafdP=d!gDadh>Cee(t^5S-ceEkr?h?PQF6r)0Xu<_@mNDkI4*J_ooi7|6 z#QAFNMl@YH<;m$rvPb&0$Cogke+r{l;y1#-crEBd3%N1&7MK99Ng|$L)y#DiqhfxnJs?qDjp^AC5g)B1aDMC9LM?W_kInNsHna>>E`FEz89zO zArxQ9Vd-02RE>1L#=ZEa%dfL~s(Qm|!VW~=m=*D95;ej5afiZ7IxP)X$g8&^6Uzlo z7eMnbA7%S|UC)lstK!%z93^0g2%s#);h0#dsJSh>F-nX9$^3Pmawvfz^i*zJbm+7=`xh*Ibyn?=tz`Xp$|sy8!Z2TH1Nh zzGYnP#nd%K=J9q3)axnJ>8<3^jw=y_SW-k9py(Pr%F(hk<1Y<(QH=Umo%(ecl&N zRn^alh1`{^PO*eO41qaWMTz^5FDBOaG+&6W9zLm-)lHtCdWa*n(4Cl?=;Bit{n@#< znqFP1C70`y42-pg3PkgkcG=qOU0V>G*0T`ksIvB1jMp%;KVTTk&;`FdwCXaB z+P{@gRVtEjMJy19IwBclEF`r4oHP%>%Vb65Y;3q4KKSl3lIr)pdf%~)Ke^jUJBT=e zP?qv;dwE!n9-hhF3p1@9TMJ`(ROiyJ_B$@8PtXmS+EEyH;g@yfxYK{sjXp8zoI4e! zN8HfcY-CfG895uf7-2`?Q7FeA)s(ti&Rsl0XJ_^+G+=AH*GiOf2Ocq@JUEyLK5Thq z>6%A&5R0ZajsHoEIh-;XtF5umLvdtcV-iaB@1N=}ox`Qw;I9OqD6A6ORAn2uKu`+BsjkTSu;Xg~l66{x6*DQ>n-*zZWk2F~E@M`F5;u_V}5Izt2Qr=fN z?%yBGf|D%`1$A6-Z+A-~YhJDpK7%?U-}k7g8ow@;z+C3JCU>9E@XO|MCbj;-g}$yN z<^Hhv$a`cEzs5U!IY>g$W~l3?)2ml(Gbq~OPsVrxO&}8BIJl@{vZ^2TZob7<tD>hRZ0KNM$==&1WeiXKR9MGP(&EF z>-`qGP#&~*@AYe<2cwH^DM`w}cxE0G)_STN%)aFL?oSzsN)ddH8NqJeOIJ^N`EX)- z&QkwP!@5D|W0*)H4I!3#N~%&?$tj5ml89_)I(9Ph$MwbsZs0oABu(V0x^2%k4Q8|Q z1ng&zTT#PtE==HP)H`7K*Vc{F|*w5A^K_OUqq)vb4C_lk}I@q)V3 zmnPzYH~d~`T@cox%Fhb%P~)h?E^t!F?pRqu=X`%yjQB%8T_OxOKF^Hhgg*M&mA5+DO7gRu zD@B8Nk<1QEd$!eE_RuMn45=RshSBHjR%HFD!YX+xV~#N4XAWA3KqWP-X^KPmg*6_P zjmu(NOOedJOJ^PW{UN!?Z3=vf)YG)UeAz<#bt_0Wg4CT`9El>|sHIOvJa*MvQ9_T1 z*oJ=fS<#48Fw#)P_IXA*;wJ&^uUre|8ErTuu=S@;{DK2+=%HNxYxI5XZ?{~e|kD&AuGa}t*c=8YoAQ2jZk8k<9fSlF?Pg5#FK5&-+4Wusk=+c z?`=sD0nR1_ond9y primaryBuilder}.options.primarySchema" - }] - }); - - fluid.defaults("fluid.prefs.assembler.uie", { - gradeNames: ["fluid.viewComponent"], - components: { - // These two components become global - store: { - type: "fluid.prefs.globalSettingsStore", - options: { - distributeOptions: { - target: "{that fluid.prefs.store}.options.contextAwareness.strategy.checks.user", - record: { - contextValue: "{fluid.prefs.assembler.uie}.options.storeType", - gradeNames: "{fluid.prefs.assembler.uie}.options.storeType" - } - } - } - }, - enhancer: { - type: "fluid.component", - options: { - gradeNames: "{that}.options.enhancerType", - enhancerType: "fluid.pageEnhancer", - components: { - uiEnhancer: { - options: { - gradeNames: ["{fluid.prefs.assembler.uie}.options.componentGrades.enactors"] - } - } - } - } - } - }, - distributeOptions: [{ - source: "{that}.options.enhancer", - target: "{that uiEnhancer}.options", - removeSource: true - }, { // TODO: not clear that this hits anything since settings store is not a subcomponent - source: "{that}.options.store", - target: "{that fluid.prefs.store}.options" - }, { - source: "{that}.options.enhancerType", - target: "{that > enhancer}.options.enhancerType" - }] - }); - - fluid.defaults("fluid.prefs.assembler.prefsEd", { - gradeNames: ["fluid.viewComponent", "fluid.prefs.assembler.uie"], - components: { - prefsEditorLoader: { - type: "fluid.viewComponent", - container: "{fluid.prefs.assembler.prefsEd}.container", - priority: "last", - options: { - gradeNames: [ - "{fluid.prefs.assembler.prefsEd}.options.componentGrades.terms", - "{fluid.prefs.assembler.prefsEd}.options.componentGrades.messages", - "{fluid.prefs.assembler.prefsEd}.options.componentGrades.initialModel", - "{that}.options.loaderGrades" - ], - templateLoader: { - gradeNames: ["{fluid.prefs.assembler.prefsEd}.options.componentGrades.templateLoader"] - }, - messageLoader: { - gradeNames: ["{fluid.prefs.assembler.prefsEd}.options.componentGrades.messageLoader"] - }, - prefsEditor: { - gradeNames: ["{fluid.prefs.assembler.prefsEd}.options.componentGrades.panels", "fluid.prefs.uiEnhancerRelay"] - }, - events: { - onReady: "{fluid.prefs.assembler.prefsEd}.events.onPrefsEditorReady" - } - } - } - }, - events: { - onPrefsEditorReady: null, - onReady: { - events: { - onPrefsEditorReady: "onPrefsEditorReady", - onCreate: "onCreate" - }, - args: ["{that}"] - } - }, - distributeOptions: [{ - source: "{that}.options.loaderGrades", - removeSource: true, - target: "{that > prefsEditorLoader}.options.loaderGrades" - }, { - source: "{that}.options.prefsEditor", - removeSource: true, - target: "{that prefsEditor}.options" - }, { - source: "{that}.options.terms", - removeSource: true, - target: "{that prefsEditorLoader}.options.terms" - }] - }); - - fluid.prefs.builder.generateGrade = function (name, namespace, options) { - var gradeNameTemplate = "%namespace.%name"; - var gradeName = fluid.stringTemplate(gradeNameTemplate, {name: name, namespace: namespace}); - fluid.defaults(gradeName, options); - return gradeName; - }; - - fluid.prefs.builder.constructGrades = function (auxSchema, gradeCategories) { - var constructedGrades = {}; - fluid.each(gradeCategories, function (category) { - var gradeOpts = auxSchema[category]; - if (fluid.get(gradeOpts, "gradeNames")) { - constructedGrades[category] = fluid.prefs.builder.generateGrade(category, auxSchema.namespace, gradeOpts); - } - }); - return constructedGrades; - }; - - fluid.prefs.builder.parseAuxSchema = function (auxSchema) { - var auxTypes = []; - fluid.each(auxSchema, function parse(field) { - var type = field.type; - if (type) { - auxTypes.push(type); - } - }); - return auxTypes; - }; - - /* - * A one-stop-shop function to build and instantiate a prefsEditor from a schema. - */ - fluid.prefs.create = function (container, options) { - options = options || {}; - var builder = fluid.prefs.builder(options.build); - return fluid.invokeGlobalFunction(builder.options.assembledPrefsEditorGrade, [container, options.prefsEditor]); - }; - -})(jQuery, fluid_2_0_0); diff --git a/lib/infusion/src/framework/preferences/js/Enactors.js b/lib/infusion/src/framework/preferences/js/Enactors.js deleted file mode 100644 index 3defda4..0000000 --- a/lib/infusion/src/framework/preferences/js/Enactors.js +++ /dev/null @@ -1,431 +0,0 @@ -/* -Copyright 2013-2016 OCAD University -Copyright 2015 Raising the Floor - International - -Licensed under the Educational Community License (ECL), Version 2.0 or the New -BSD license. You may not use this file except in compliance with one these -Licenses. - -You may obtain a copy of the ECL 2.0 License and BSD License at -https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt -*/ - -var fluid_2_0_0 = fluid_2_0_0 || {}; - -(function ($, fluid) { - "use strict"; - - fluid.defaults("fluid.prefs.enactor", { - gradeNames: ["fluid.modelComponent"] - }); - - /********************************************************************************** - * styleElements - * - * Adds or removes the classname to/from the elements based upon the model value. - * This component is used as a grade by emphasizeLinks & inputsLarger - **********************************************************************************/ - fluid.defaults("fluid.prefs.enactor.styleElements", { - gradeNames: ["fluid.prefs.enactor"], - cssClass: null, // Must be supplied by implementors - elementsToStyle: null, // Must be supplied by implementors - invokers: { - applyStyle: { - funcName: "fluid.prefs.enactor.styleElements.applyStyle", - args: ["{arguments}.0", "{arguments}.1"] - }, - resetStyle: { - funcName: "fluid.prefs.enactor.styleElements.resetStyle", - args: ["{arguments}.0", "{arguments}.1"] - }, - handleStyle: { - funcName: "fluid.prefs.enactor.styleElements.handleStyle", - args: ["{arguments}.0", "{that}.options.elementsToStyle", "{that}.options.cssClass", "{that}.applyStyle", "{that}.resetStyle"] - } - }, - modelListeners: { - value: { - listener: "{that}.handleStyle", - args: ["{change}.value"] - } - } - }); - - fluid.prefs.enactor.styleElements.applyStyle = function (elements, cssClass) { - elements.addClass(cssClass); - }; - - fluid.prefs.enactor.styleElements.resetStyle = function (elements, cssClass) { - $(elements, "." + cssClass).addBack().removeClass(cssClass); - }; - - fluid.prefs.enactor.styleElements.handleStyle = function (value, elements, cssClass, applyStyleFunc, resetStyleFunc) { - var func = value ? applyStyleFunc : resetStyleFunc; - func(elements, cssClass); - }; - - /******************************************************************************* - * ClassSwapper - * - * Has a hash of classes it cares about and will remove all those classes from - * its container before setting the new class. - * This component tends to be used as a grade by textFont and contrast - *******************************************************************************/ - - fluid.defaults("fluid.prefs.enactor.classSwapper", { - gradeNames: ["fluid.prefs.enactor", "fluid.viewComponent"], - classes: {}, // Must be supplied by implementors - invokers: { - clearClasses: { - funcName: "fluid.prefs.enactor.classSwapper.clearClasses", - args: ["{that}.container", "{that}.classStr"] - }, - swap: { - funcName: "fluid.prefs.enactor.classSwapper.swap", - args: ["{arguments}.0", "{that}", "{that}.clearClasses"] - } - }, - modelListeners: { - value: { - listener: "{that}.swap", - args: ["{change}.value"] - } - }, - members: { - classStr: { - expander: { - func: "fluid.prefs.enactor.classSwapper.joinClassStr", - args: "{that}.options.classes" - } - } - } - }); - - fluid.prefs.enactor.classSwapper.clearClasses = function (container, classStr) { - container.removeClass(classStr); - }; - - fluid.prefs.enactor.classSwapper.swap = function (value, that, clearClassesFunc) { - clearClassesFunc(); - that.container.addClass(that.options.classes[value]); - }; - - fluid.prefs.enactor.classSwapper.joinClassStr = function (classes) { - var classStr = ""; - - fluid.each(classes, function (oneClassName) { - if (oneClassName) { - classStr += classStr ? " " + oneClassName : oneClassName; - } - }); - return classStr; - }; - - /******************************************************************************* - * emphasizeLinks - * - * The enactor to emphasize links in the container according to the value - *******************************************************************************/ - - // Note that the implementors need to provide the container for this view component - fluid.defaults("fluid.prefs.enactor.emphasizeLinks", { - gradeNames: ["fluid.prefs.enactor.styleElements", "fluid.viewComponent"], - preferenceMap: { - "fluid.prefs.emphasizeLinks": { - "model.value": "default" - } - }, - cssClass: null, // Must be supplied by implementors - elementsToStyle: "{that}.container" - }); - - /******************************************************************************* - * inputsLarger - * - * The enactor to enlarge inputs in the container according to the value - *******************************************************************************/ - - // Note that the implementors need to provide the container for this view component - fluid.defaults("fluid.prefs.enactor.inputsLarger", { - gradeNames: ["fluid.prefs.enactor.styleElements", "fluid.viewComponent"], - preferenceMap: { - "fluid.prefs.inputsLarger": { - "model.value": "default" - } - }, - cssClass: null, // Must be supplied by implementors - elementsToStyle: "{that}.container" - }); - - /******************************************************************************* - * textFont - * - * The enactor to change the font face used according to the value - *******************************************************************************/ - // Note that the implementors need to provide the container for this view component - fluid.defaults("fluid.prefs.enactor.textFont", { - gradeNames: ["fluid.prefs.enactor.classSwapper"], - preferenceMap: { - "fluid.prefs.textFont": { - "model.value": "default" - } - } - }); - - /******************************************************************************* - * contrast - * - * The enactor to change the contrast theme according to the value - *******************************************************************************/ - // Note that the implementors need to provide the container for this view component - fluid.defaults("fluid.prefs.enactor.contrast", { - gradeNames: ["fluid.prefs.enactor.classSwapper"], - preferenceMap: { - "fluid.prefs.contrast": { - "model.value": "default" - } - } - }); - - - - /******************************************************************************* - * Functions shared by textSize and lineSpace - *******************************************************************************/ - - /** - * return "font-size" in px - * @param (Object) container - * @param (Object) fontSizeMap: the mapping between the font size string values ("small", "medium" etc) to px values - */ - fluid.prefs.enactor.getTextSizeInPx = function (container, fontSizeMap) { - var fontSize = container.css("font-size"); - - if (fontSizeMap[fontSize]) { - fontSize = fontSizeMap[fontSize]; - } - - // return fontSize in px - return parseFloat(fontSize); - }; - - /******************************************************************************* - * textSize - * - * Sets the text size on the root element to the multiple provided. - *******************************************************************************/ - - // Note that the implementors need to provide the container for this view component - fluid.defaults("fluid.prefs.enactor.textSize", { - gradeNames: ["fluid.prefs.enactor", "fluid.viewComponent"], - preferenceMap: { - "fluid.prefs.textSize": { - "model.value": "default" - } - }, - members: { - root: { - expander: { - "this": "{that}.container", - "method": "closest", // ensure that the correct document is being used. i.e. in an iframe - "args": ["html"] - } - } - }, - fontSizeMap: {}, // must be supplied by implementors - invokers: { - set: { - funcName: "fluid.prefs.enactor.textSize.set", - args: ["{arguments}.0", "{that}", "{that}.getTextSizeInPx"] - }, - getTextSizeInPx: { - funcName: "fluid.prefs.enactor.getTextSizeInPx", - args: ["{that}.root", "{that}.options.fontSizeMap"] - } - }, - modelListeners: { - value: { - listener: "{that}.set", - args: ["{change}.value"] - } - } - }); - - fluid.prefs.enactor.textSize.set = function (times, that, getTextSizeInPxFunc) { - times = times || 1; - // Calculating the initial size here rather than using a members expand because the "font-size" - // cannot be detected on hidden containers such as separated paenl iframe. - if (!that.initialSize) { - that.initialSize = getTextSizeInPxFunc(); - } - - if (that.initialSize) { - var targetSize = times * that.initialSize; - that.root.css("font-size", targetSize + "px"); - } - }; - - /******************************************************************************* - * lineSpace - * - * Sets the line space on the container to the multiple provided. - *******************************************************************************/ - - // Note that the implementors need to provide the container for this view component - fluid.defaults("fluid.prefs.enactor.lineSpace", { - gradeNames: ["fluid.prefs.enactor", "fluid.viewComponent"], - preferenceMap: { - "fluid.prefs.lineSpace": { - "model.value": "default" - } - }, - fontSizeMap: {}, // must be supplied by implementors - invokers: { - set: { - funcName: "fluid.prefs.enactor.lineSpace.set", - args: ["{arguments}.0", "{that}", "{that}.getLineHeightMultiplier"] - }, - getTextSizeInPx: { - funcName: "fluid.prefs.enactor.getTextSizeInPx", - args: ["{that}.container", "{that}.options.fontSizeMap"] - }, - getLineHeight: { - funcName: "fluid.prefs.enactor.lineSpace.getLineHeight", - args: "{that}.container" - }, - getLineHeightMultiplier: { - funcName: "fluid.prefs.enactor.lineSpace.getLineHeightMultiplier", - args: [{expander: {func: "{that}.getLineHeight"}}, {expander: {func: "{that}.getTextSizeInPx"}}] - } - }, - modelListeners: { - value: { - listener: "{that}.set", - args: ["{change}.value"] - } - } - }); - - // Get the line-height of an element - // In IE8 and IE9 this will return the line-height multiplier - // In other browsers it will return the pixel value of the line height. - fluid.prefs.enactor.lineSpace.getLineHeight = function (container) { - return container.css("line-height"); - }; - - // Interprets browser returned "line-height" value, either a string "normal", a number with "px" suffix or "undefined" - // into a numeric value in em. - // Return 0 when the given "lineHeight" argument is "undefined" (http://issues.fluidproject.org/browse/FLUID-4500). - fluid.prefs.enactor.lineSpace.getLineHeightMultiplier = function (lineHeight, fontSize) { - // Handle the given "lineHeight" argument is "undefined", which occurs when firefox detects - // "line-height" css value on a hidden container. (http://issues.fluidproject.org/browse/FLUID-4500) - if (!lineHeight) { - return 0; - } - - // Needs a better solution. For now, "line-height" value "normal" is defaulted to 1.2em - // according to https://developer.mozilla.org/en/CSS/line-height - if (lineHeight === "normal") { - return 1.2; - } - - // Continuing the work-around of jQuery + IE bug - http://bugs.jquery.com/ticket/2671 - if (lineHeight.match(/[0-9]$/)) { - return Number(lineHeight); - } - - return Math.round(parseFloat(lineHeight) / fontSize * 100) / 100; - }; - - fluid.prefs.enactor.lineSpace.set = function (times, that, getLineHeightMultiplierFunc) { - // Calculating the initial size here rather than using a members expand because the "line-height" - // cannot be detected on hidden containers such as separated paenl iframe. - if (!that.initialSize) { - that.initialSize = getLineHeightMultiplierFunc(); - } - - // that.initialSize === 0 when the browser returned "lineHeight" css value is undefined, - // which occurs when firefox detects "line-height" value on a hidden container. - // @ See getLineHeightMultiplier() & http://issues.fluidproject.org/browse/FLUID-4500 - if (that.initialSize) { - var targetLineSpace = times * that.initialSize; - that.container.css("line-height", targetLineSpace); - } - }; - - /******************************************************************************* - * tableOfContents - * - * To create and show/hide table of contents - *******************************************************************************/ - - // Note that the implementors need to provide the container for this view component - fluid.defaults("fluid.prefs.enactor.tableOfContents", { - gradeNames: ["fluid.prefs.enactor", "fluid.viewComponent"], - preferenceMap: { - "fluid.prefs.tableOfContents": { - "model.toc": "default" - } - }, - tocTemplate: null, // must be supplied by implementors - components: { - tableOfContents: { - type: "fluid.tableOfContents", - container: "{fluid.prefs.enactor.tableOfContents}.container", - createOnEvent: "onCreateTOCReady", - options: { - components: { - levels: { - type: "fluid.tableOfContents.levels", - options: { - resources: { - template: { - forceCache: true, - url: "{fluid.prefs.enactor.tableOfContents}.options.tocTemplate" - } - } - } - } - }, - listeners: { - "afterRender.boilAfterTocRender": "{fluid.prefs.enactor.tableOfContents}.events.afterTocRender" - } - } - } - }, - invokers: { - applyToc: { - funcName: "fluid.prefs.enactor.tableOfContents.applyToc", - args: ["{arguments}.0", "{that}"] - } - }, - events: { - onCreateTOCReady: null, - afterTocRender: null, - onLateRefreshRelay: null - }, - modelListeners: { - toc: { - listener: "{that}.applyToc", - args: ["{change}.value"] - } - }, - distributeOptions: { - source: "{that}.options.ignoreForToC", - target: "{that tableOfContents}.options.ignoreForToC" - } - }); - - fluid.prefs.enactor.tableOfContents.applyToc = function (value, that) { - if (value) { - if (that.tableOfContents) { - that.tableOfContents.show(); - } else { - that.events.onCreateTOCReady.fire(); - } - } else if (that.tableOfContents) { - that.tableOfContents.hide(); - } - }; - -})(jQuery, fluid_2_0_0); diff --git a/lib/infusion/src/framework/preferences/js/FullNoPreviewPrefsEditor.js b/lib/infusion/src/framework/preferences/js/FullNoPreviewPrefsEditor.js deleted file mode 100644 index f6ace02..0000000 --- a/lib/infusion/src/framework/preferences/js/FullNoPreviewPrefsEditor.js +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2011-2016 OCAD University -Copyright 2011 Lucendo Development Ltd. - -Licensed under the Educational Community License (ECL), Version 2.0 or the New -BSD license. You may not use this file except in compliance with one these -Licenses. - -You may obtain a copy of the ECL 2.0 License and BSD License at -https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt -*/ - -var fluid_2_0_0 = fluid_2_0_0 || {}; - -(function ($, fluid) { - "use strict"; - - /************************************** - * Full No Preview Preferences Editor * - **************************************/ - - fluid.defaults("fluid.prefs.fullNoPreview", { - gradeNames: ["fluid.prefs.prefsEditorLoader"], - components: { - prefsEditor: { - container: "{that}.container", - options: { - listeners: { - "afterReset.applyChanges": { - listener: "{that}.applyChanges" - }, - "afterReset.save": { - listener: "{that}.save", - priority: "after:applyChanges" - }, - "onReady.boilOnReady": { - listener: "{fullNoPreview}.events.onReady", - args: "{fullNoPreview}" - } - } - } - } - }, - events: { - onReady: null - } - }); - -})(jQuery, fluid_2_0_0); diff --git a/lib/infusion/src/framework/preferences/js/FullPreviewPrefsEditor.js b/lib/infusion/src/framework/preferences/js/FullPreviewPrefsEditor.js deleted file mode 100644 index 1d9475e..0000000 --- a/lib/infusion/src/framework/preferences/js/FullPreviewPrefsEditor.js +++ /dev/null @@ -1,80 +0,0 @@ -/* -Copyright 2011-2016 OCAD University -Copyright 2011 Lucendo Development Ltd. -Copyright 2015 Raising the Floor - International - -Licensed under the Educational Community License (ECL), Version 2.0 or the New -BSD license. You may not use this file except in compliance with one these -Licenses. - -You may obtain a copy of the ECL 2.0 License and BSD License at -https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt -*/ - -var fluid_2_0_0 = fluid_2_0_0 || {}; - -(function ($, fluid) { - "use strict"; - - /*********************************** - * Full Preview Preferences Editor * - ***********************************/ - - fluid.defaults("fluid.prefs.fullPreview", { - gradeNames: ["fluid.prefs.prefsEditorLoader"], - outerUiEnhancerOptions: "{originalEnhancerOptions}.options.originalUserOptions", - outerUiEnhancerGrades: "{originalEnhancerOptions}.uiEnhancer.options.userGrades", - components: { - prefsEditor: { - container: "{that}.container", - options: { - components: { - preview: { - type: "fluid.prefs.preview", - createOnEvent: "onReady", - container: "{prefsEditor}.dom.previewFrame", - options: { - listeners: { - "onReady.boilOnPreviewReady": "{fullPreview}.events.onPreviewReady" - } - } - } - }, - listeners: { - "onReady.boilOnPrefsEditorReady": "{fullPreview}.events.onPrefsEditorReady" - }, - distributeOptions: { - source: "{that}.options.preview", - removeSource: true, - target: "{that > preview}.options" - } - } - } - }, - events: { - onPrefsEditorReady: null, - onPreviewReady: null, - onReady: { - events: { - onPrefsEditorReady: "onPrefsEditorReady", - onPreviewReady: "onPreviewReady" - }, - args: "{that}" - } - }, - distributeOptions: [{ - source: "{that}.options.outerUiEnhancerOptions", - target: "{that enhancer}.options" - }, { - source: "{that}.options.preview", - target: "{that preview}.options" - }, { - source: "{that}.options.previewEnhancer", - target: "{that enhancer}.options" - }, { - source: "{that}.options.outerUiEnhancerGrades", - target: "{that enhancer}.options.gradeNames" - }] - }); - -})(jQuery, fluid_2_0_0); diff --git a/lib/infusion/src/framework/preferences/js/Panels.js b/lib/infusion/src/framework/preferences/js/Panels.js deleted file mode 100644 index f789112..0000000 --- a/lib/infusion/src/framework/preferences/js/Panels.js +++ /dev/null @@ -1,1034 +0,0 @@ -/* -Copyright 2013-2016 OCAD University -Copyright 2016 Raising the Floor - International - -Licensed under the Educational Community License (ECL), Version 2.0 or the New -BSD license. You may not use this file except in compliance with one these -Licenses. - -You may obtain a copy of the ECL 2.0 License and BSD License at -https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt -*/ - -var fluid_2_0_0 = fluid_2_0_0 || {}; - - -(function ($, fluid) { - "use strict"; - - /********************** - * msgLookup grade * - **********************/ - - fluid.defaults("fluid.prefs.msgLookup", { - gradeNames: ["fluid.component"], - members: { - msgLookup: { - expander: { - funcName: "fluid.prefs.stringLookup", - args: ["{msgResolver}", "{that}.options.stringArrayIndex"] - } - } - }, - stringArrayIndex: {} - }); - - fluid.prefs.stringLookup = function (messageResolver, stringArrayIndex) { - var that = {id: fluid.allocateGuid()}; - that.singleLookup = function (value) { - var looked = messageResolver.lookup([value]); - return fluid.get(looked, "template"); - }; - that.multiLookup = function (values) { - return fluid.transform(values, function (value) { - return that.singleLookup(value); - }); - }; - that.lookup = function (value) { - var values = fluid.get(stringArrayIndex, value) || value; - var lookupFn = fluid.isArrayable(values) ? "multiLookup" : "singleLookup"; - return that[lookupFn](values); - }; - that.resolvePathSegment = that.lookup; - return that; - }; - - /*********************************************** - * Base grade panel - ***********************************************/ - - fluid.defaults("fluid.prefs.panel", { - gradeNames: ["fluid.prefs.msgLookup", "fluid.rendererComponent"], - events: { - onDomBind: null - }, - // Any listener that requires a DOM element, should be registered - // to the onDomBind listener. By default it is fired by onCreate, but - // when used as a subpanel, it will be triggered by the resetDomBinder invoker. - listeners: { - "onCreate.onDomBind": "{that}.events.onDomBind" - }, - components: { - msgResolver: { - type: "fluid.messageResolver" - } - }, - rendererOptions: { - messageLocator: "{msgResolver}.resolve" - }, - distributeOptions: { - source: "{that}.options.messageBase", - target: "{that > msgResolver}.options.messageBase" - } - }); - - /*************************** - * Base grade for subpanel * - ***************************/ - - fluid.defaults("fluid.prefs.subPanel", { - gradeNames: ["fluid.prefs.panel", "{that}.getDomBindGrade"], - listeners: { - "{compositePanel}.events.afterRender": { - listener: "{that}.events.afterRender", - args: ["{that}"] - }, - // Changing the firing of onDomBind from the onCreate. - // This is due to the fact that the rendering process, controlled by the - // composite panel, will set/replace the DOM elements. - "onCreate.onDomBind": null, // remove listener - "afterRender.onDomBind": "{that}.resetDomBinder" - }, - rules: { - expander: { - func: "fluid.prefs.subPanel.generateRules", - args: ["{that}.options.preferenceMap"] - } - }, - invokers: { - refreshView: "{compositePanel}.refreshView", - // resetDomBinder must fire the onDomBind event - resetDomBinder: { - funcName: "fluid.prefs.subPanel.resetDomBinder", - args: ["{that}"] - }, - getDomBindGrade: { - funcName: "fluid.prefs.subPanel.getDomBindGrade", - args: ["{prefsEditor}"] - } - }, - strings: {}, - parentBundle: "{compositePanel}.messageResolver", - renderOnInit: false - }); - - fluid.defaults("fluid.prefs.subPanel.domBind", { - gradeNames: ["fluid.component"], - listeners: { - "onDomBind.domChange": { - listener: "{prefsEditor}.events.onSignificantDOMChange" - } - } - }); - - fluid.prefs.subPanel.getDomBindGrade = function (prefsEditor) { - var hasListener = fluid.get(prefsEditor, "options.events.onSignificantDOMChange") !== undefined; - if (hasListener) { - return "fluid.prefs.subPanel.domBind"; - } - }; - - /* - * Since the composite panel manages the rendering of the subpanels - * the markup used by subpanels needs to be completely replaced. - * The subpanel's container is refereshed to point at the newly - * rendered markup, and the domBinder is re-initialized. Once - * this is all done, the onDomBind event is fired. - */ - fluid.prefs.subPanel.resetDomBinder = function (that) { - // TODO: The line below to find the container jQuery instance was copied from the framework code - - // https://github.com/fluid-project/infusion/blob/master/src/framework/core/js/FluidView.js#L145 - // in order to reset the dom binder when panels are in an iframe. - // It can be be eliminated once we have the new renderer. - var userJQuery = that.container.constructor; - var context = that.container[0].ownerDocument; - var selector = that.container.selector; - that.container = userJQuery(selector, context); - // To address FLUID-5966, manually adding back the selector and context properties that were removed from jQuery v3.0. - // ( see: https://jquery.com/upgrade-guide/3.0/#breaking-change-deprecated-context-and-selector-properties-removed ) - // In most cases the "selector" property will already be restored through the DOM binder or fluid.container. - // However, in this case we are manually recreating the container to ensure that it is referencing an element currently added - // to the correct Document ( e.g. iframe ) (also see: FLUID-4536). This manual recreation of the container requires us to - // manually add back the selector and context from the original container. This code and fix parallels that in - // FluidView.js fluid.container line 129 - that.container.selector = selector; - that.container.context = context; - if (that.container.length === 0) { - fluid.fail("resetDomBinder got no elements in DOM for container searching for selector " + that.container.selector); - } - fluid.initDomBinder(that, that.options.selectors); - that.events.onDomBind.fire(that); - }; - - fluid.prefs.subPanel.safePrefKey = function (prefKey) { - return prefKey.replace(/[.]/g, "_"); - }; - - /* - * Generates the model relay rules for a subpanel. - * Takes advantage of the fact that compositePanel - * uses the preference key (with "." replaced by "_"), - * as its model path. - */ - fluid.prefs.subPanel.generateRules = function (preferenceMap) { - var rules = {}; - fluid.each(preferenceMap, function (prefObj, prefKey) { - fluid.each(prefObj, function (value, prefRule) { - if (prefRule.indexOf("model.") === 0) { - rules[fluid.prefs.subPanel.safePrefKey(prefKey)] = prefRule.slice("model.".length); - } - }); - }); - return rules; - }; - - /********************************** - * Base grade for composite panel * - **********************************/ - - fluid.registerNamespace("fluid.prefs.compositePanel"); - - fluid.prefs.compositePanel.arrayMergePolicy = function (target, source) { - target = fluid.makeArray(target); - source = fluid.makeArray(source); - fluid.each(source, function (selector) { - if (target.indexOf(selector) < 0) { - target.push(selector); - } - }); - return target; - }; - - fluid.defaults("fluid.prefs.compositePanel", { - gradeNames: ["fluid.prefs.panel", "{that}.getDistributeOptionsGrade", "{that}.getSubPanelLifecycleBindings"], - mergePolicy: { - subPanelOverrides: "noexpand", - selectorsToIgnore: fluid.prefs.compositePanel.arrayMergePolicy - }, - selectors: {}, // requires selectors into the template which will act as the containers for the subpanels - selectorsToIgnore: [], // should match the selectors that are used to identify the containers for the subpanels - repeatingSelectors: [], - events: { - initSubPanels: null - }, - listeners: { - "onCreate.combineResources": "{that}.combineResources", - "onCreate.appendTemplate": { - "this": "{that}.container", - "method": "append", - "args": ["{that}.options.resources.template.resourceText"] - }, - "onCreate.initSubPanels": "{that}.events.initSubPanels", - "onCreate.hideInactive": "{that}.hideInactive", - "onCreate.surfaceSubpanelRendererSelectors": "{that}.surfaceSubpanelRendererSelectors", - "afterRender.hideInactive": "{that}.hideInactive" - }, - invokers: { - getDistributeOptionsGrade: { - funcName: "fluid.prefs.compositePanel.assembleDistributeOptions", - args: ["{that}.options.components"] - }, - getSubPanelLifecycleBindings: { - funcName: "fluid.prefs.compositePanel.subPanelLifecycleBindings", - args: ["{that}.options.components"] - }, - combineResources: { - funcName: "fluid.prefs.compositePanel.combineTemplates", - args: ["{that}.options.resources", "{that}.options.selectors"] - }, - surfaceSubpanelRendererSelectors: { - funcName: "fluid.prefs.compositePanel.surfaceSubpanelRendererSelectors", - args: ["{that}", "{that}.options.components", "{that}.options.selectors"] - }, - produceSubPanelTrees: { - funcName: "fluid.prefs.compositePanel.produceSubPanelTrees", - args: ["{that}"] - }, - expandProtoTree: { - funcName: "fluid.prefs.compositePanel.expandProtoTree", - args: ["{that}"] - }, - produceTree: { - funcName: "fluid.prefs.compositePanel.produceTree", - args: ["{that}"] - }, - hideInactive: { - funcName: "fluid.prefs.compositePanel.hideInactive", - args: ["{that}"] - }, - handleRenderOnPreference: { - funcName: "fluid.prefs.compositePanel.handleRenderOnPreference", - args: ["{that}", "{that}.refreshView", "{that}.conditionalCreateEvent", "{arguments}.0", "{arguments}.1", "{arguments}.2"] - }, - conditionalCreateEvent: { - funcName: "fluid.prefs.compositePanel.conditionalCreateEvent" - } - }, - subPanelOverrides: { - gradeNames: ["fluid.prefs.subPanel"] - }, - rendererFnOptions: { - noexpand: true, - cutpointGenerator: "fluid.prefs.compositePanel.cutpointGenerator", - subPanelRepeatingSelectors: { - expander: { - funcName: "fluid.prefs.compositePanel.surfaceRepeatingSelectors", - args: ["{that}.options.components"] - } - } - }, - components: {}, - resources: {} // template is reserved for the compositePanel's template, the subpanel template should have same key as the selector for its container. - }); - - /* - * Attempts to prefetch a components options before it is instantiated. - * Only use in cases where the instatiated component cannot be used. - */ - fluid.prefs.compositePanel.prefetchComponentOptions = function (type, options) { - var baseOptions = fluid.getMergedDefaults(type, fluid.get(options, "gradeNames")); - // TODO: awkwardly, fluid.merge is destructive on each argument! - return fluid.merge(baseOptions.mergePolicy, fluid.copy(baseOptions), options); - }; - /* - * Should only be used when fluid.prefs.compositePanel.isActivatePanel cannot. - * While this implementation doesn't require an instantiated component, it may in - * the process miss some configuration provided by distribute options and demands. - */ - fluid.prefs.compositePanel.isPanel = function (type, options) { - var opts = fluid.prefs.compositePanel.prefetchComponentOptions(type, options); - return fluid.hasGrade(opts, "fluid.prefs.panel"); - }; - - fluid.prefs.compositePanel.isActivePanel = function (comp) { - return comp && fluid.hasGrade(comp.options, "fluid.prefs.panel"); - }; - - /* - * Creates a grade containing the distributeOptions rules needed for the subcomponents - */ - fluid.prefs.compositePanel.assembleDistributeOptions = function (components) { - var gradeName = "fluid.prefs.compositePanel.distributeOptions_" + fluid.allocateGuid(); - var distributeOptions = []; - var relayOption = {}; - fluid.each(components, function (componentOptions, componentName) { - if (fluid.prefs.compositePanel.isPanel(componentOptions.type, componentOptions.options)) { - distributeOptions.push({ - source: "{that}.options.subPanelOverrides", - target: "{that > " + componentName + "}.options" - }); - } - - // Construct the model relay btw the composite panel and its subpanels - var componentRelayRules = {}; - var definedOptions = fluid.prefs.compositePanel.prefetchComponentOptions(componentOptions.type, componentOptions.options); - var preferenceMap = fluid.get(definedOptions, ["preferenceMap"]); - fluid.each(preferenceMap, function (prefObj, prefKey) { - fluid.each(prefObj, function (value, prefRule) { - if (prefRule.indexOf("model.") === 0) { - fluid.set(componentRelayRules, prefRule.slice("model.".length), "{compositePanel}.model." + fluid.prefs.subPanel.safePrefKey(prefKey)); - } - }); - }); - relayOption[componentName] = componentRelayRules; - distributeOptions.push({ - source: "{that}.options.relayOption." + componentName, - target: "{that > " + componentName + "}.options.model" - }); - }); - fluid.defaults(gradeName, { - gradeNames: ["fluid.component"], - relayOption: relayOption, - distributeOptions: distributeOptions - }); - return gradeName; - }; - - fluid.prefs.compositePanel.conditionalCreateEvent = function (value, createEvent) { - if (value) { - createEvent(); - } - }; - - - fluid.prefs.compositePanel.handleRenderOnPreference = function (that, refreshViewFunc, conditionalCreateEventFunc, value, createEvent, componentNames) { - componentNames = fluid.makeArray(componentNames); - conditionalCreateEventFunc(value, createEvent); - fluid.each(componentNames, function (componentName) { - var comp = that[componentName]; - if (!value && comp) { - comp.destroy(); - } - }); - refreshViewFunc(); - }; - - fluid.prefs.compositePanel.creationEventName = function (pref) { - return "initOn_" + pref; - }; - - fluid.prefs.compositePanel.generateModelListeners = function (conditionals) { - return fluid.transform(conditionals, function (componentNames, pref) { - var eventName = fluid.prefs.compositePanel.creationEventName(pref); - return { - func: "{that}.handleRenderOnPreference", - args: ["{change}.value", "{that}.events." + eventName + ".fire", componentNames] - }; - }); - }; - - /* - * Creates a grade containing all of the lifecycle binding configuration needed for the subpanels. - * This includes the following: - * - adding events used to trigger the initialization of the subpanels - * - adding the createOnEvent configuration for the subpanels - * - binding handlers to model changed events - * - binding handlers to afterRender and onCreate - */ - fluid.prefs.compositePanel.subPanelLifecycleBindings = function (components) { - var gradeName = "fluid.prefs.compositePanel.subPanelCreationTimingDistibution_" + fluid.allocateGuid(); - var distributeOptions = []; - var subPanelCreationOpts = { - "default": "initSubPanels" - }; - var conditionals = {}; - var listeners = {}; - var events = {}; - fluid.each(components, function (componentOptions, componentName) { - if (fluid.prefs.compositePanel.isPanel(componentOptions.type, componentOptions.options)) { - var creationEventOpt = "default"; - // would have had renderOnPreference directly sourced from the componentOptions - // however, the set of configuration specified there is restricted. - var renderOnPreference = fluid.get(componentOptions, "options.renderOnPreference"); - if (renderOnPreference) { - var pref = fluid.prefs.subPanel.safePrefKey(renderOnPreference); - var onCreateListener = "onCreate." + pref; - creationEventOpt = fluid.prefs.compositePanel.creationEventName(pref); - subPanelCreationOpts[creationEventOpt] = creationEventOpt; - events[creationEventOpt] = null; - conditionals[pref] = conditionals[pref] || []; - conditionals[pref].push(componentName); - listeners[onCreateListener] = { - listener: "{that}.conditionalCreateEvent", - args: ["{that}.model." + pref, "{that}.events." + creationEventOpt + ".fire"] - }; - } - distributeOptions.push({ - source: "{that}.options.subPanelCreationOpts." + creationEventOpt, - target: "{that}.options.components." + componentName + ".createOnEvent" - }); - } - }); - - fluid.defaults(gradeName, { - gradeNames: ["fluid.component"], - events: events, - listeners: listeners, - modelListeners: fluid.prefs.compositePanel.generateModelListeners(conditionals), - subPanelCreationOpts: subPanelCreationOpts, - distributeOptions: distributeOptions - }); - return gradeName; - }; - - /* - * Used to hide the containers of inactive sub panels. - * This is necessary as the composite panel's template is the one that has their containers and - * it would be undesirable to have them visible when their associated panel has not been created. - * Also, hiding them allows for the subpanel to initialize, as it requires their container to be present. - * The subpanels need to be initialized before rendering, for the produce function to source the rendering - * information from it. - */ - fluid.prefs.compositePanel.hideInactive = function (that) { - fluid.each(that.options.components, function (componentOpts, componentName) { - if (fluid.prefs.compositePanel.isPanel(componentOpts.type, componentOpts.options) && !fluid.prefs.compositePanel.isActivePanel(that[componentName])) { - that.locate(componentName).hide(); - } - }); - }; - - /* - * Use the renderer directly to combine the templates into a single - * template to be used by the components actual rendering. - */ - fluid.prefs.compositePanel.combineTemplates = function (resources, selectors) { - var cutpoints = []; - var tree = {children: []}; - - fluid.each(resources, function (resource, resourceName) { - if (resourceName !== "template") { - tree.children.push({ - ID: resourceName, - markup: resource.resourceText - }); - cutpoints.push({ - id: resourceName, - selector: selectors[resourceName] - }); - } - }); - - var resourceSpec = { - base: { - resourceText: resources.template.resourceText, - href: ".", - resourceKey: ".", - cutpoints: cutpoints - } - }; - - var templates = fluid.parseTemplates(resourceSpec, ["base"]); - var renderer = fluid.renderer(templates, tree, {cutpoints: cutpoints, debugMode: true}); - resources.template.resourceText = renderer.renderTemplates(); - }; - - fluid.prefs.compositePanel.rebaseSelectorName = function (memberName, selectorName) { - return memberName + "_" + selectorName; - }; - - /* - * Surfaces the rendering selectors from the subpanels to the compositePanel, - * and scopes them to the subpanel's container. - * Since this is used by the cutpoint generator, which only gets run once, we need to - * surface all possible subpanel selectors, and not just the active ones. - */ - fluid.prefs.compositePanel.surfaceSubpanelRendererSelectors = function (that, components, selectors) { - fluid.each(components, function (compOpts, compName) { - if (fluid.prefs.compositePanel.isPanel(compOpts.type, compOpts.options)) { - var opts = fluid.prefs.compositePanel.prefetchComponentOptions(compOpts.type, compOpts.options); - fluid.each(opts.selectors, function (selector, selName) { - if (!opts.selectorsToIgnore || opts.selectorsToIgnore.indexOf(selName) < 0) { - fluid.set(selectors, fluid.prefs.compositePanel.rebaseSelectorName(compName, selName), selectors[compName] + " " + selector); - } - }); - } - }); - }; - - fluid.prefs.compositePanel.surfaceRepeatingSelectors = function (components) { - var repeatingSelectors = []; - fluid.each(components, function (compOpts, compName) { - if (fluid.prefs.compositePanel.isPanel(compOpts.type, compOpts.options)) { - var opts = fluid.prefs.compositePanel.prefetchComponentOptions(compOpts.type, compOpts.options); - var rebasedRepeatingSelectors = fluid.transform(opts.repeatingSelectors, function (selector) { - return fluid.prefs.compositePanel.rebaseSelectorName(compName, selector); - }); - repeatingSelectors = repeatingSelectors.concat(rebasedRepeatingSelectors); - } - }); - return repeatingSelectors; - }; - - fluid.prefs.compositePanel.cutpointGenerator = function (selectors, options) { - var opts = { - selectorsToIgnore: options.selectorsToIgnore, - repeatingSelectors: options.repeatingSelectors.concat(options.subPanelRepeatingSelectors) - }; - return fluid.renderer.selectorsToCutpoints(selectors, opts); - }; - - fluid.prefs.compositePanel.rebaseID = function (value, memberName) { - return memberName + "_" + value; - }; - - fluid.prefs.compositePanel.rebaseParentRelativeID = function (val, memberName) { - var slicePos = "..::".length; // ..:: refers to the parentRelativeID prefix used in the renderer - return val.slice(0, slicePos) + fluid.prefs.compositePanel.rebaseID(val.slice(slicePos), memberName); - }; - - fluid.prefs.compositePanel.rebaseValueBinding = function (value, modelRelayRules) { - return fluid.find(modelRelayRules, function (oldModelPath, newModelPath) { - if (value === oldModelPath) { - return newModelPath; - } else if (value.indexOf(oldModelPath) === 0) { - return value.replace(oldModelPath, newModelPath); - } - }) || value; - }; - - fluid.prefs.compositePanel.rebaseTreeComp = function (msgResolver, model, treeComp, memberName, modelRelayRules) { - var rebased = fluid.copy(treeComp); - - if (rebased.ID) { - rebased.ID = fluid.prefs.compositePanel.rebaseID(rebased.ID, memberName); - } - - if (rebased.children) { - rebased.children = fluid.prefs.compositePanel.rebaseTree(msgResolver, model, rebased.children, memberName, modelRelayRules); - } else if (rebased.selection) { - rebased.selection = fluid.prefs.compositePanel.rebaseTreeComp(msgResolver, model, rebased.selection, memberName, modelRelayRules); - } else if (rebased.messagekey) { - // converts the "UIMessage" renderer component into a "UIBound" - // and passes in the resolved message as the value. - rebased.componentType = "UIBound"; - rebased.value = msgResolver.resolve(rebased.messagekey.value, rebased.messagekey.args); - delete rebased.messagekey; - } else if (rebased.parentRelativeID) { - rebased.parentRelativeID = fluid.prefs.compositePanel.rebaseParentRelativeID(rebased.parentRelativeID, memberName); - } else if (rebased.valuebinding) { - rebased.valuebinding = fluid.prefs.compositePanel.rebaseValueBinding(rebased.valuebinding, modelRelayRules); - - if (rebased.value) { - var modelValue = fluid.get(model, rebased.valuebinding); - rebased.value = modelValue !== undefined ? modelValue : rebased.value; - } - } - - return rebased; - }; - - fluid.prefs.compositePanel.rebaseTree = function (msgResolver, model, tree, memberName, modelRelayRules) { - var rebased; - - if (fluid.isArrayable(tree)) { - rebased = fluid.transform(tree, function (treeComp) { - return fluid.prefs.compositePanel.rebaseTreeComp(msgResolver, model, treeComp, memberName, modelRelayRules); - }); - } else { - rebased = fluid.prefs.compositePanel.rebaseTreeComp(msgResolver, model, tree, memberName, modelRelayRules); - } - - return rebased; - }; - - fluid.prefs.compositePanel.produceTree = function (that) { - var produceTreeOption = that.options.produceTree; - var ownTree = produceTreeOption ? - (typeof (produceTreeOption) === "string" ? fluid.getGlobalValue(produceTreeOption) : produceTreeOption)(that) : - that.expandProtoTree(); - var subPanelTree = that.produceSubPanelTrees(); - var tree = { - children: ownTree.children.concat(subPanelTree.children) - }; - return tree; - }; - - fluid.prefs.compositePanel.expandProtoTree = function (that) { - var expanderOptions = fluid.renderer.modeliseOptions(that.options.expanderOptions, {ELstyle: "${}"}, that); - var expander = fluid.renderer.makeProtoExpander(expanderOptions, that); - return expander(that.options.protoTree || {}); - }; - - fluid.prefs.compositePanel.produceSubPanelTrees = function (that) { - var tree = {children: []}; - fluid.each(that.options.components, function (options, componentName) { - var subPanel = that[componentName]; - if (fluid.prefs.compositePanel.isActivePanel(subPanel)) { - var expanderOptions = fluid.renderer.modeliseOptions(subPanel.options.expanderOptions, {ELstyle: "${}"}, subPanel); - var expander = fluid.renderer.makeProtoExpander(expanderOptions, subPanel); - var subTree = subPanel.produceTree(); - subTree = fluid.get(subPanel.options, "rendererFnOptions.noexpand") ? subTree : expander(subTree); - var rebasedTree = fluid.prefs.compositePanel.rebaseTree(subPanel.msgResolver, that.model, subTree, componentName, subPanel.options.rules); - tree.children = tree.children.concat(rebasedTree.children); - } - }); - return tree; - }; - - /******************************************************************************** - * The grade that contains the connections between a panel and the prefs editor * - ********************************************************************************/ - - fluid.defaults("fluid.prefs.prefsEditorConnections", { - gradeNames: ["fluid.component"], - listeners: { - "{fluid.prefs.prefsEditor}.events.onPrefsEditorRefresh": "{fluid.prefs.panel}.refreshView" - }, - strings: {}, - parentBundle: "{fluid.prefs.prefsEditorLoader}.msgResolver" - }); - - /******************************** - * Preferences Editor Text Size * - ********************************/ - - /** - * A sub-component of fluid.prefs that renders the "text size" panel of the user preferences interface. - */ - fluid.defaults("fluid.prefs.panel.textSize", { - gradeNames: ["fluid.prefs.panel"], - preferenceMap: { - "fluid.prefs.textSize": { - "model.textSize": "default", - "range.min": "minimum", - "range.max": "maximum" - } - }, - // The default model values represent both the expected format as well as the setting to be applied in the absence of values passed down to the component. - // i.e. from the settings store, or specific defaults derived from schema. - // Note: Except for being passed down to its subcomponent, these default values are not contributed and shared out - range: { - min: 1, - max: 2 - }, - selectors: { - textSize: ".flc-prefsEditor-min-text-size", - label: ".flc-prefsEditor-min-text-size-label", - multiplier: ".flc-prefsEditor-multiplier", - textSizeDescr: ".flc-prefsEditor-text-size-descr" - }, - selectorsToIgnore: ["textSize"], - components: { - textfieldSlider: { - type: "fluid.textfieldSlider", - container: "{that}.dom.textSize", - createOnEvent: "afterRender", - options: { - model: { - value: "{fluid.prefs.panel.textSize}.model.textSize" - }, - range: "{fluid.prefs.panel.textSize}.options.range", - sliderOptions: "{fluid.prefs.panel.textSize}.options.sliderOptions", - ariaOptions: { - "aria-labelledby": "{textSize}.options.panelOptions.labelId" - } - } - } - }, - protoTree: { - label: { - messagekey: "textSizeLabel", - decorators: { - attrs: {id: "{that}.options.panelOptions.labelId"} - } - }, - multiplier: {messagekey: "multiplier"}, - textSizeDescr: {messagekey: "textSizeDescr"} - }, - sliderOptions: { - orientation: "horizontal", - step: 0.1, - range: "min" - }, - panelOptions: { - labelId: "textSize-label-" + fluid.allocateGuid() - } - }); - - /******************************** - * Preferences Editor Text Font * - ********************************/ - - /** - * A sub-component of fluid.prefs that renders the "text font" panel of the user preferences interface. - */ - fluid.defaults("fluid.prefs.panel.textFont", { - gradeNames: ["fluid.prefs.panel"], - preferenceMap: { - "fluid.prefs.textFont": { - "model.value": "default", - "controlValues.textFont": "enum" - } - }, - selectors: { - textFont: ".flc-prefsEditor-text-font", - label: ".flc-prefsEditor-text-font-label", - textFontDescr: ".flc-prefsEditor-text-font-descr" - }, - stringArrayIndex: { - textFont: ["textFont-default", "textFont-times", "textFont-comic", "textFont-arial", "textFont-verdana"] - }, - protoTree: { - label: {messagekey: "textFontLabel"}, - textFontDescr: {messagekey: "textFontDescr"}, - textFont: { - optionnames: "${{that}.msgLookup.textFont}", - optionlist: "${{that}.options.controlValues.textFont}", - selection: "${value}", - decorators: { - type: "fluid", - func: "fluid.prefs.selectDecorator", - options: { - styles: "{that}.options.classnameMap.textFont" - } - } - } - }, - classnameMap: null, // must be supplied by implementors - controlValues: { - textFont: ["default", "times", "comic", "arial", "verdana"] - } - }); - - /********************************* - * Preferences Editor Line Space * - *********************************/ - - /** - * A sub-component of fluid.prefs that renders the "line space" panel of the user preferences interface. - */ - fluid.defaults("fluid.prefs.panel.lineSpace", { - gradeNames: ["fluid.prefs.panel"], - preferenceMap: { - "fluid.prefs.lineSpace": { - "model.lineSpace": "default", - "range.min": "minimum", - "range.max": "maximum" - } - }, - // The default model values represent both the expected format as well as the setting to be applied in the absence of values passed down to the component. - // i.e. from the settings store, or specific defaults derived from schema. - // Note: Except for being passed down to its subcomponent, these default values are not contributed and shared out - range: { - min: 1, - max: 2 - }, - selectors: { - lineSpace: ".flc-prefsEditor-line-space", - label: ".flc-prefsEditor-line-space-label", - multiplier: ".flc-prefsEditor-multiplier", - lineSpaceDescr: ".flc-prefsEditor-line-space-descr" - }, - selectorsToIgnore: ["lineSpace"], - components: { - textfieldSlider: { - type: "fluid.textfieldSlider", - container: "{that}.dom.lineSpace", - createOnEvent: "afterRender", - options: { - model: { - value: "{fluid.prefs.panel.lineSpace}.model.lineSpace" - }, - range: "{fluid.prefs.panel.lineSpace}.options.range", - sliderOptions: "{fluid.prefs.panel.lineSpace}.options.sliderOptions", - ariaOptions: { - "aria-labelledby": "{lineSpace}.options.panelOptions.labelId" - } - } - } - }, - protoTree: { - label: { - messagekey: "lineSpaceLabel", - decorators: { - attrs: {id: "{that}.options.panelOptions.labelId"} - } - }, - multiplier: {messagekey: "multiplier"}, - lineSpaceDescr: {messagekey: "lineSpaceDescr"} - }, - sliderOptions: { - orientation: "horizontal", - step: 0.1, - range: "min" - }, - panelOptions: { - labelId: "lineSpace-label-" + fluid.allocateGuid() - } - }); - - /******************************* - * Preferences Editor Contrast * - *******************************/ - - /** - * A sub-component of fluid.prefs that renders the "contrast" panel of the user preferences interface. - */ - fluid.defaults("fluid.prefs.panel.contrast", { - gradeNames: ["fluid.prefs.panel"], - preferenceMap: { - "fluid.prefs.contrast": { - "model.value": "default", - "controlValues.theme": "enum" - } - }, - listeners: { - "afterRender.style": "{that}.style" - }, - selectors: { - themeRow: ".flc-prefsEditor-themeRow", - themeLabel: ".flc-prefsEditor-theme-label", - themeInput: ".flc-prefsEditor-themeInput", - label: ".flc-prefsEditor-contrast-label", - contrastDescr: ".flc-prefsEditor-contrast-descr" - }, - styles: { - defaultThemeLabel: "fl-prefsEditor-contrast-defaultThemeLabel" - }, - stringArrayIndex: { - theme: ["contrast-default", "contrast-bw", "contrast-wb", "contrast-by", "contrast-yb", "contrast-lgdg"] - }, - repeatingSelectors: ["themeRow"], - protoTree: { - label: {messagekey: "contrastLabel"}, - contrastDescr: {messagekey: "contrastDescr"}, - expander: { - type: "fluid.renderer.selection.inputs", - rowID: "themeRow", - labelID: "themeLabel", - inputID: "themeInput", - selectID: "theme-radio", - tree: { - optionnames: "${{that}.msgLookup.theme}", - optionlist: "${{that}.options.controlValues.theme}", - selection: "${value}" - } - } - }, - controlValues: { - theme: ["default", "bw", "wb", "by", "yb", "lgdg"] - }, - markup: { - // Aria-hidden needed on fl-preview-A and Display 'a' created as pseudo-content in css to prevent AT from reading out display 'a' on IE, Chrome, and Safari - // Aria-hidden needed on fl-crossout to prevent AT from trying to read crossout symbol in Safari - label: "%theme
" - }, - invokers: { - style: { - funcName: "fluid.prefs.panel.contrast.style", - args: [ - "{that}.dom.themeLabel", - "{that}.msgLookup.theme", - "{that}.options.markup.label", - "{that}.options.controlValues.theme", - "default", - "{that}.options.classnameMap.theme", - "{that}.options.styles.defaultThemeLabel" - ] - } - } - }); - - fluid.prefs.panel.contrast.style = function (labels, strings, markup, theme, defaultThemeName, style, defaultLabelStyle) { - fluid.each(labels, function (label, index) { - label = $(label); - - var themeValue = strings[index]; - label.html(fluid.stringTemplate(markup, { - theme: themeValue - })); - - // Aria-label set to prevent Firefox from reading out the display 'a' - label.attr("aria-label", themeValue); - - var labelTheme = theme[index]; - if (labelTheme === defaultThemeName) { - label.addClass(defaultLabelStyle); - } - label.addClass(style[labelTheme]); - }); - }; - - /************************************** - * Preferences Editor Layout Controls * - **************************************/ - - /** - * A sub-component of fluid.prefs that renders the "layout and navigation" panel of the user preferences interface. - */ - fluid.defaults("fluid.prefs.panel.layoutControls", { - gradeNames: ["fluid.prefs.panel"], - preferenceMap: { - "fluid.prefs.tableOfContents": { - "model.toc": "default" - } - }, - selectors: { - toc: ".flc-prefsEditor-toc", - label: ".flc-prefsEditor-toc-label", - tocDescr: ".flc-prefsEditor-toc-descr" - }, - protoTree: { - label: {messagekey: "tocLabel"}, - tocDescr: {messagekey: "tocDescr"}, - toc: "${toc}" - } - }); - - /************************************** - * Preferences Editor Emphasize Links * - **************************************/ - /** - * A sub-component of fluid.prefs that renders the "links and buttons" panel of the user preferences interface. - */ - fluid.defaults("fluid.prefs.panel.emphasizeLinks", { - gradeNames: ["fluid.prefs.panel"], - preferenceMap: { - "fluid.prefs.emphasizeLinks": { - "model.links": "default" - } - }, - selectors: { - links: ".flc-prefsEditor-links", - linksChoiceLabel: ".flc-prefsEditor-links-choice-label" - }, - protoTree: { - linksChoiceLabel: {messagekey: "linksChoiceLabel"}, - links: "${links}" - } - }); - - /************************************ - * Preferences Editor Inputs Larger * - ************************************/ - /** - * A sub-component of fluid.prefs that renders the "links and buttons" panel of the user preferences interface. - */ - fluid.defaults("fluid.prefs.panel.inputsLarger", { - gradeNames: ["fluid.prefs.panel"], - preferenceMap: { - "fluid.prefs.inputsLarger": { - "model.inputsLarger": "default" - } - }, - selectors: { - inputsLarger: ".flc-prefsEditor-inputs-larger", - inputsChoiceLabel: ".flc-prefsEditor-links-inputs-choice-label" - }, - protoTree: { - inputsChoiceLabel: {messagekey: "inputsChoiceLabel"}, - inputsLarger: "${inputsLarger}" - } - }); - - /************************************* - * Preferences Editor Links Controls * - *************************************/ - /** - * A sub-component of fluid.prefs that renders the "links and buttons" panel of the user preferences interface. - */ - fluid.defaults("fluid.prefs.panel.linksControls", { - gradeNames: ["fluid.prefs.compositePanel"], - selectors: { - label: ".flc-prefsEditor-linksControls-label" - }, - protoTree: { - label: {messagekey: "linksControlsLabel"} - } - }); - - /******************************************************** - * Preferences Editor Select Dropdown Options Decorator * - ********************************************************/ - - /** - * A sub-component that decorates the options on the select dropdown list box with the css style - */ - fluid.defaults("fluid.prefs.selectDecorator", { - gradeNames: ["fluid.viewComponent"], - listeners: { - "onCreate.decorateOptions": "fluid.prefs.selectDecorator.decorateOptions" - }, - styles: { - preview: "fl-preview-theme" - } - }); - - fluid.prefs.selectDecorator.decorateOptions = function (that) { - fluid.each($("option", that.container), function (option) { - var styles = that.options.styles; - $(option).addClass(styles.preview + " " + styles[fluid.value(option)]); - }); - }; - -})(jQuery, fluid_2_0_0); diff --git a/lib/infusion/src/framework/preferences/js/PrefsEditor.js b/lib/infusion/src/framework/preferences/js/PrefsEditor.js deleted file mode 100644 index 3cd9958..0000000 --- a/lib/infusion/src/framework/preferences/js/PrefsEditor.js +++ /dev/null @@ -1,473 +0,0 @@ -/* -Copyright 2009 University of Toronto -Copyright 2010-2016 OCAD University -Copyright 2011 Lucendo Development Ltd. -Copyright 2012-2014 Raising the Floor - US -Copyright 2015 Raising the Floor - International - -Licensed under the Educational Community License (ECL), Version 2.0 or the New -BSD license. You may not use this file except in compliance with one these -Licenses. - -You may obtain a copy of the ECL 2.0 License and BSD License at -https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt -*/ - -var fluid_2_0_0 = fluid_2_0_0 || {}; - -(function ($, fluid) { - "use strict"; - - /***************************** - * Preferences Editor Loader * - *****************************/ - - /** - * An Preferences Editor top-level component that reflects the collaboration between prefsEditor, templateLoader and messageLoader. - * This component is the only Preferences Editor component that is intended to be called by the outside world. - * - * @param {Object} options - */ - fluid.defaults("fluid.prefs.prefsEditorLoader", { - gradeNames: ["fluid.prefs.settingsGetter", "fluid.prefs.initialModel", "fluid.viewComponent"], - defaultLocale: "en", - members: { - settings: { - expander: { - funcName: "fluid.prefs.prefsEditorLoader.getCompleteSettings", - args: ["{that}.initialModel", "{that}.getSettings"] - } - } - }, - components: { - prefsEditor: { - priority: "last", - type: "fluid.prefs.prefsEditor", - createOnEvent: "onCreatePrefsEditorReady", - options: { - members: { - initialModel: "{prefsEditorLoader}.initialModel" - }, - invokers: { - getSettings: "{prefsEditorLoader}.getSettings" - } - } - }, - templateLoader: { - type: "fluid.resourceLoader", - options: { - events: { - onResourcesLoaded: "{prefsEditorLoader}.events.onPrefsEditorTemplatesLoaded" - } - } - }, - messageLoader: { - type: "fluid.resourceLoader", - options: { - defaultLocale: "{prefsEditorLoader}.options.defaultLocale", - locale: "{prefsEditorLoader}.settings.locale", - resourceOptions: { - dataType: "json" - }, - events: { - onResourcesLoaded: "{prefsEditorLoader}.events.onPrefsEditorMessagesLoaded" - } - } - } - }, - events: { - onPrefsEditorTemplatesLoaded: null, - onPrefsEditorMessagesLoaded: null, - onCreatePrefsEditorReady: { - events: { - templateLoaded: "onPrefsEditorTemplatesLoaded", - prefsEditorMessagesLoaded: "onPrefsEditorMessagesLoaded" - } - } - }, - distributeOptions: [{ - source: "{that}.options.templateLoader", - removeSource: true, - target: "{that > templateLoader}.options" - }, { - source: "{that}.options.messageLoader", - removeSource: true, - target: "{that > messageLoader}.options" - }, { - source: "{that}.options.terms", - target: "{that > templateLoader}.options.terms" - }, { - source: "{that}.options.terms", - target: "{that > messageLoader}.options.terms" - }, { - source: "{that}.options.prefsEditor", - removeSource: true, - target: "{that > prefsEditor}.options" - }] - }); - - fluid.prefs.prefsEditorLoader.getCompleteSettings = function (initialModel, getSettingsFunc) { - var savedSettings = getSettingsFunc(); - return $.extend(true, {}, initialModel, savedSettings); - }; - - // TODO: This mixin grade appears to be supplied manually by various test cases but no longer appears in - // the main configuration. We should remove the need for users to supply this - also the use of "defaultPanels" in fact - // refers to "starter panels" - fluid.defaults("fluid.prefs.transformDefaultPanelsOptions", { - // Do not supply "fluid.prefs.inline" here, since when this is used as a mixin for separatedPanel, it ends up displacing the - // more refined type of the prefsEditorLoader - gradeNames: ["fluid.viewComponent"], - distributeOptions: [{ - source: "{that}.options.textSize", - removeSource: true, - target: "{that textSize}.options" - }, { - source: "{that}.options.lineSpace", - removeSource: true, - target: "{that lineSpace}.options" - }, { - source: "{that}.options.textFont", - removeSource: true, - target: "{that textFont}.options" - }, { - source: "{that}.options.contrast", - removeSource: true, - target: "{that contrast}.options" - }, { - source: "{that}.options.layoutControls", - removeSource: true, - target: "{that layoutControls}.options" - }, { - source: "{that}.options.linksControls", - removeSource: true, - target: "{that linksControls}.options" - }] - }); - - /********************** - * Preferences Editor * - **********************/ - - fluid.defaults("fluid.prefs.settingsGetter", { - gradeNames: ["fluid.component"], - members: { - getSettings: "{fluid.prefs.store}.get" - } - }); - - fluid.defaults("fluid.prefs.settingsSetter", { - gradeNames: ["fluid.component"], - invokers: { - setSettings: { - funcName: "fluid.prefs.settingsSetter.setSettings", - args: ["{arguments}.0", "{fluid.prefs.store}.set"] - } - } - }); - - fluid.prefs.settingsSetter.setSettings = function (model, set) { - var userSettings = fluid.copy(model); - set(userSettings); - }; - - fluid.defaults("fluid.prefs.uiEnhancerRelay", { - gradeNames: ["fluid.modelComponent"], - listeners: { - "onCreate.addListener": "{that}.addListener", - "onDestroy.removeListener": "{that}.removeListener" - }, - events: { - updateEnhancerModel: "{fluid.prefs.prefsEditor}.events.onUpdateEnhancerModel" - }, - invokers: { - addListener: { - funcName: "fluid.prefs.uiEnhancerRelay.addListener", - args: ["{that}.events.updateEnhancerModel", "{that}.updateEnhancerModel"] - }, - removeListener: { - funcName: "fluid.prefs.uiEnhancerRelay.removeListener", - args: ["{that}.events.updateEnhancerModel", "{that}.updateEnhancerModel"] - }, - updateEnhancerModel: { - funcName: "fluid.prefs.uiEnhancerRelay.updateEnhancerModel", - args: ["{uiEnhancer}", "{fluid.prefs.prefsEditor}.model.preferences"] - } - } - }); - - fluid.prefs.uiEnhancerRelay.addListener = function (modelChanged, listener) { - modelChanged.addListener(listener); - }; - - fluid.prefs.uiEnhancerRelay.removeListener = function (modelChanged, listener) { - modelChanged.removeListener(listener); - }; - - fluid.prefs.uiEnhancerRelay.updateEnhancerModel = function (uiEnhancer, newModel) { - uiEnhancer.updateModel(newModel); - }; - - /** - * A component that works in conjunction with the UI Enhancer component - * to allow users to set personal user interface preferences. The Preferences Editor component provides a user - * interface for setting and saving personal preferences, and the UI Enhancer component carries out the - * work of applying those preferences to the user interface. - * - * @param {Object} container - * @param {Object} options - */ - fluid.defaults("fluid.prefs.prefsEditor", { - gradeNames: ["fluid.prefs.settingsGetter", "fluid.prefs.settingsSetter", "fluid.prefs.initialModel", "fluid.viewComponent"], - invokers: { - /** - * Updates the change applier and fires modelChanged on subcomponent fluid.prefs.controls - * - * @param {Object} newModel - * @param {Object} source - */ - fetch: { - funcName: "fluid.prefs.prefsEditor.fetch", - args: ["{that}", "{arguments}.0"] - }, - applyChanges: { - funcName: "fluid.prefs.prefsEditor.applyChanges", - args: ["{that}"] - }, - save: { - funcName: "fluid.prefs.prefsEditor.save", - args: ["{that}"] - }, - saveAndApply: { - funcName: "fluid.prefs.prefsEditor.saveAndApply", - args: ["{that}"] - }, - reset: { - funcName: "fluid.prefs.prefsEditor.reset", - args: ["{that}"] - }, - cancel: { - funcName: "fluid.prefs.prefsEditor.cancel", - args: ["{that}"] - } - }, - selectors: { - cancel: ".flc-prefsEditor-cancel", - reset: ".flc-prefsEditor-reset", - save: ".flc-prefsEditor-save", - previewFrame : ".flc-prefsEditor-preview-frame" - }, - events: { - onSave: null, - onCancel: null, - beforeReset: null, - afterReset: null, - onAutoSave: null, - modelChanged: null, - onPrefsEditorRefresh: null, - onUpdateEnhancerModel: null, - onPrefsEditorMarkupReady: null, - onReady: null - }, - listeners: { - "onCreate.init": "fluid.prefs.prefsEditor.init", - "onAutoSave.save": "{that}.save" - }, - modelListeners: { - "": [{ - listener: "fluid.prefs.prefsEditor.handleAutoSave", - args: ["{that}"] - }, { - listener: "{that}.events.modelChanged.fire", - args: ["{change}.value"] - }] - }, - resources: { - template: "{templateLoader}.resources.prefsEditor" - }, - autoSave: false - }); - - /** - * Refresh PrefsEditor - */ - fluid.prefs.prefsEditor.applyChanges = function (that) { - that.events.onUpdateEnhancerModel.fire(); - }; - - fluid.prefs.prefsEditor.fetch = function (that, eventName) { - var completeModel = that.getSettings(); - completeModel = $.extend(true, {}, that.initialModel, completeModel); - // TODO: This may not be completely effective if the root model is smaller than - // the current one. Given our previous discoveries re "model shrinkage" - // (http://issues.fluidproject.org/browse/FLUID-5585 ), the proper thing to do here - // is to apply a DELETE to the root before putting in the new model. And this should - // be done within a transaction in order to avoid notifying the tree more than necessary. - // However, the transactional model of the changeApplier is going to change radically - // soon (http://wiki.fluidproject.org/display/fluid/New+New+Notes+on+the+ChangeApplier) - // and this implementation doesn't seem to be causing a problem at present so we had - // just better leave it the way it is for now. - that.applier.change("", completeModel); - if (eventName) { - that.events[eventName].fire(that); - } - that.events.onPrefsEditorRefresh.fire(); - that.applyChanges(); - }; - - /** - * Sends the prefsEditor.model to the store and fires onSave - * @param that: A fluid.prefs.prefsEditor instance - * @return the saved model - */ - fluid.prefs.prefsEditor.save = function (that) { - if (!that.model) { // Don't save a reset model - return; - } - - var modelToSave = fluid.copy(that.model), - initialModel = that.initialModel, - stats = {changes: 0, unchanged: 0, changeMap: {}}, - changedPrefs = {}; - - // To address https://issues.fluidproject.org/browse/FLUID-4686 - fluid.model.diff(modelToSave.preferences, fluid.get(initialModel, ["preferences"]), stats); - - if (stats.changes === 0) { - delete modelToSave.preferences; - } else { - fluid.each(stats.changeMap, function (state, pref) { - fluid.set(changedPrefs, pref, modelToSave.preferences[pref]); - }); - modelToSave.preferences = changedPrefs; - } - - that.events.onSave.fire(modelToSave); - that.setSettings(modelToSave); - return modelToSave; - }; - - fluid.prefs.prefsEditor.saveAndApply = function (that) { - var prevSettings = that.getSettings(), - changedSelections = that.save(); - - // Only when preferences are changed, re-render panels and trigger enactors to apply changes - if (!fluid.model.diff(fluid.get(changedSelections, "preferences"), fluid.get(prevSettings, "preferences"))) { - that.events.onPrefsEditorRefresh.fire(); - that.applyChanges(); - } - }; - - /** - * Resets the selections to the integrator's defaults and fires afterReset - */ - fluid.prefs.prefsEditor.reset = function (that) { - that.events.beforeReset.fire(that); - that.applier.fireChangeRequest({path: "", type: "DELETE"}); - that.applier.change("", fluid.copy(that.initialModel)); - that.events.onPrefsEditorRefresh.fire(); - that.events.afterReset.fire(that); - }; - - /** - * Resets the selections to the last saved selections and fires onCancel - */ - fluid.prefs.prefsEditor.cancel = function (that) { - that.events.onCancel.fire(); - that.fetch(); - }; - - // called once markup is applied to the document containing tab component roots - fluid.prefs.prefsEditor.finishInit = function (that) { - var bindHandlers = function (that) { - var saveButton = that.locate("save"); - if (saveButton.length > 0) { - saveButton.click(that.saveAndApply); - var form = fluid.findForm(saveButton); - $(form).submit(function () { - that.saveAndApply(); - }); - } - that.locate("reset").click(that.reset); - that.locate("cancel").click(that.cancel); - }; - - that.container.append(that.options.resources.template.resourceText); - bindHandlers(that); - - that.fetch("onPrefsEditorMarkupReady"); - that.events.onReady.fire(that); - }; - - fluid.prefs.prefsEditor.handleAutoSave = function (that) { - if (that.options.autoSave) { - that.events.onAutoSave.fire(); - } - }; - - fluid.prefs.prefsEditor.init = function (that) { - // This setTimeout is to ensure that fetching of resources is asynchronous, - // and so that component construction does not run ahead of subcomponents for SeparatedPanel - // (FLUID-4453 - this may be a replacement for a branch removed for a FLUID-2248 fix) - setTimeout(function () { - if (!fluid.isDestroyed(that)) { - fluid.prefs.prefsEditor.finishInit(that); - } - }, 1); - }; - - /****************************** - * Preferences Editor Preview * - ******************************/ - - fluid.defaults("fluid.prefs.preview", { - gradeNames: ["fluid.viewComponent"], - components: { - enhancer: { - type: "fluid.uiEnhancer", - container: "{preview}.enhancerContainer", - createOnEvent: "onReady" - }, - templateLoader: "{templateLoader}" - }, - invokers: { - updateModel: { - funcName: "fluid.prefs.preview.updateModel", - args: [ - "{preview}", - "{prefsEditor}.model.preferences" - ] - } - }, - events: { - onReady: null - }, - listeners: { - "onCreate.startLoadingContainer": "fluid.prefs.preview.startLoadingContainer", - "{prefsEditor}.events.modelChanged": "{that}.updateModel", - "onReady.updateModel": "{that}.updateModel" - }, - templateUrl: "%prefix/PrefsEditorPreview.html" - }); - - fluid.prefs.preview.updateModel = function (that, preferences) { - /** - * SetTimeout is temp fix for http://issues.fluidproject.org/browse/FLUID-2248 - */ - setTimeout(function () { - if (that.enhancer) { - that.enhancer.updateModel(preferences); - } - }, 0); - }; - - fluid.prefs.preview.startLoadingContainer = function (that) { - var templateUrl = that.templateLoader.transformURL(that.options.templateUrl); - that.container.on("load", function () { - that.enhancerContainer = $("body", that.container.contents()); - that.events.onReady.fire(); - }); - that.container.attr("src", templateUrl); - }; - -})(jQuery, fluid_2_0_0); diff --git a/lib/infusion/src/framework/preferences/js/PrimaryBuilder.js b/lib/infusion/src/framework/preferences/js/PrimaryBuilder.js deleted file mode 100644 index 99c86ce..0000000 --- a/lib/infusion/src/framework/preferences/js/PrimaryBuilder.js +++ /dev/null @@ -1,129 +0,0 @@ -/* -Copyright 2013 OCAD University - -Licensed under the Educational Community License (ECL), Version 2.0 or the New -BSD license. You may not use this file except in compliance with one these -Licenses. - -You may obtain a copy of the ECL 2.0 License and BSD License at -https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt -*/ - -var fluid_2_0_0 = fluid_2_0_0 || {}; - -(function ($, fluid) { - "use strict"; - - fluid.registerNamespace("fluid.prefs.schemas"); - - /** - * A custom merge policy that merges primary schema blocks and - * places them in the right location (consistent with the JSON schema - * format). - * @param {JSON} target A base for merging the options. - * @param {JSON} source Options being merged. - * @return {JSON} Updated target. - */ - fluid.prefs.schemas.merge = function (target, source) { - if (!target) { - target = { - type: "object", - properties: {} - }; - } - // We can handle both schema blocks in options directly and also inside - // the |properties| field. - source = source.properties || source; - $.extend(true, target.properties, source); - return target; - }; - - /******************************************************************************* - * Primary builder grade - *******************************************************************************/ - - fluid.defaults("fluid.prefs.primaryBuilder", { - gradeNames: ["fluid.component", "{that}.buildPrimary"], - // An index of all schema grades registered with the framework. - schemaIndex: { - expander: { - func: "fluid.indexDefaults", - args: ["schemaIndex", { - gradeNames: "fluid.prefs.schemas", - indexFunc: "fluid.prefs.primaryBuilder.defaultSchemaIndexer" - }] - } - }, - primarySchema: {}, - // A list of all necessarry top level preference names. - typeFilter: [], - invokers: { - // An invoker used to generate a set of grades that comprise a - // final version of the primary schema to be used by the PrefsEditor - // builder. - buildPrimary: { - funcName: "fluid.prefs.primaryBuilder.buildPrimary", - args: [ - "{that}.options.schemaIndex", - "{that}.options.typeFilter", - "{that}.options.primarySchema" - ] - } - } - }); - - /** - * An invoker method that builds a list of grades that comprise a final - * version of the primary schema. - * @param {JSON} schemaIndex A global index of all schema grades - * registered with the framework. - * @param {Array} typeFilter A list of all necessarry top level - * preference names. - * @param {JSON} primarySchema Primary schema provided as an option to - * the primary builder. - * @return {Array} A list of schema grades. - */ - fluid.prefs.primaryBuilder.buildPrimary = function (schemaIndex, typeFilter, primarySchema) { - var suppliedPrimaryGradeName = "fluid.prefs.schemas.suppliedPrimary" + fluid.allocateGuid(); - // Create a grade that has a primary schema passed as an option inclosed. - fluid.defaults(suppliedPrimaryGradeName, { - gradeNames: ["fluid.prefs.schemas"], - schema: fluid.filterKeys(primarySchema.properties || primarySchema, - typeFilter, false) - }); - var primary = []; - // Lookup all available schema grades from the index that match the - // top level preference name. - fluid.each(typeFilter, function merge(type) { - var schemaGrades = schemaIndex[type]; - if (schemaGrades) { - primary.push.apply(primary, schemaGrades); - } - }); - primary.push(suppliedPrimaryGradeName); - return primary; - }; - - /** - * An index function that indexes all shcema grades based on their - * preference name. - * @param {JSON} defaults Registered defaults for a schema grade. - * @return {String} A preference name. - */ - fluid.prefs.primaryBuilder.defaultSchemaIndexer = function (defaults) { - if (defaults.schema) { - return fluid.keys(defaults.schema.properties); - } - }; - - /******************************************************************************* - * Base primary schema grade - *******************************************************************************/ - fluid.defaults("fluid.prefs.schemas", { - gradeNames: ["fluid.component"], - mergePolicy: { - schema: fluid.prefs.schemas.merge - } - }); - -})(jQuery, fluid_2_0_0); diff --git a/lib/infusion/src/framework/preferences/js/SelfVoicingEnactor.js b/lib/infusion/src/framework/preferences/js/SelfVoicingEnactor.js deleted file mode 100644 index fbcc42c..0000000 --- a/lib/infusion/src/framework/preferences/js/SelfVoicingEnactor.js +++ /dev/null @@ -1,135 +0,0 @@ -/* -Copyright 2013-2015 OCAD University - -Licensed under the Educational Community License (ECL), Version 2.0 or the New -BSD license. You may not use this file except in compliance with one these -Licenses. - -You may obtain a copy of the ECL 2.0 License and BSD License at -https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt -*/ - -var fluid_2_0_0 = fluid_2_0_0 || {}; - -(function ($, fluid) { - "use strict"; - - /******************************************************************************* - * speak - * - * An enactor that is capable of speaking text. - * Typically this will be used as a base grade to an enactor that supplies - * the text to be spoken. - *******************************************************************************/ - - fluid.defaults("fluid.prefs.enactor.speak", { - gradeNames: "fluid.prefs.enactor", - preferenceMap: { - "fluid.prefs.speak": { - "model.enabled": "default" - } - }, - components: { - tts: { - type: "fluid.textToSpeech", - options: { - model: "{speak}.model", - invokers: { - queueSpeech: { - funcName: "fluid.prefs.enactor.speak.queueSpeech", - args: ["{that}", "fluid.textToSpeech.queueSpeech", "{arguments}.0", "{arguments}.1", "{arguments}.2"] - } - } - } - } - } - }); - - // Accepts a speechFn (either a function or function name), which will be used to perform the - // underlying queuing of the speech. This allows the SpeechSynthesis to be replaced (e.g. for testing) - fluid.prefs.enactor.speak.queueSpeech = function (that, speechFn, text, interrupt, options) { - // force a string value - var str = text.toString(); - - // remove extra whitespace - str = str.trim(); - str.replace(/\s{2,}/gi, " "); - - if (that.model.enabled && str) { - if (typeof(speechFn) === "string") { - fluid.invokeGlobalFunction(speechFn, [that, str, interrupt, options]); - } else { - speechFn(that, str, interrupt, options); - } - } - }; - - /******************************************************************************* - * selfVoicing - * - * The enactor that enables self voicing of an entire page - *******************************************************************************/ - - fluid.defaults("fluid.prefs.enactor.selfVoicing", { - gradeNames: ["fluid.prefs.enactor.speak", "fluid.viewComponent"], - modelListeners: { - "enabled": { - listener: "{that}.handleSelfVoicing", - args: ["{change}.value"] - } - }, - invokers: { - handleSelfVoicing: { - funcName: "fluid.prefs.enactor.selfVoicing.handleSelfVoicing", - // Pass in invokers to force them to be resolved - args: ["{that}.options.strings.welcomeMsg", "{tts}.queueSpeech", "{that}.readFromDOM", "{tts}.cancel", "{arguments}.0"] - }, - readFromDOM: { - funcName: "fluid.prefs.enactor.selfVoicing.readFromDOM", - args: ["{that}", "{that}.container"] - } - }, - strings: { - welcomeMsg: "text to speech enabled" - } - }); - - fluid.prefs.enactor.selfVoicing.handleSelfVoicing = function (welcomeMsg, queueSpeech, readFromDOM, cancel, enabled) { - if (enabled) { - queueSpeech(welcomeMsg, true); - readFromDOM(); - } else { - cancel(); - } - }; - - // Constants representing DOM node types. - fluid.prefs.enactor.selfVoicing.nodeType = { - ELEMENT_NODE: 1, - TEXT_NODE: 3 - }; - - // TODO: Currently only reads text nodes and alt text. - // This should be expanded to read other text descriptors as well. - fluid.prefs.enactor.selfVoicing.readFromDOM = function (that, elm) { - elm = $(elm); - var nodes = elm.contents(); - fluid.each(nodes, function (node) { - if (node.nodeType === fluid.prefs.enactor.selfVoicing.nodeType.TEXT_NODE && node.nodeValue) { - that.tts.queueSpeech(node.nodeValue); - } - - if (node.nodeType === fluid.prefs.enactor.selfVoicing.nodeType.ELEMENT_NODE && window.getComputedStyle(node).display !== "none") { - if (node.nodeName === "IMG") { - var altText = node.getAttribute("alt"); - if (altText) { - that.tts.queueSpeech(altText); - } - } else { - fluid.prefs.enactor.selfVoicing.readFromDOM(that, node); - } - } - }); - }; - -})(jQuery, fluid_2_0_0); diff --git a/lib/infusion/src/framework/preferences/js/SelfVoicingPanel.js b/lib/infusion/src/framework/preferences/js/SelfVoicingPanel.js deleted file mode 100644 index 61fc16e..0000000 --- a/lib/infusion/src/framework/preferences/js/SelfVoicingPanel.js +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2014-2015 OCAD University - -Licensed under the Educational Community License (ECL), Version 2.0 or the New -BSD license. You may not use this file except in compliance with one these -Licenses. - -You may obtain a copy of the ECL 2.0 License and BSD License at -https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt -*/ - -var fluid_2_0_0 = fluid_2_0_0 || {}; - -(function ($, fluid) { - "use strict"; - - /********************************************************************************** - * speakPanel - **********************************************************************************/ - fluid.defaults("fluid.prefs.panel.speak", { - gradeNames: ["fluid.prefs.panel"], - preferenceMap: { - "fluid.prefs.speak": { - "model.speak": "default" - } - }, - selectors: { - speak: ".flc-prefsEditor-speak", - label: ".flc-prefsEditor-speak-label", - speakDescr: ".flc-prefsEditor-speak-descr" - }, - protoTree: { - label: {messagekey: "speakLabel"}, - speakDescr: {messagekey: "speakDescr"}, - speak: "${speak}" - } - }); - -})(jQuery, fluid_2_0_0); diff --git a/lib/infusion/src/framework/preferences/js/SelfVoicingSchemas.js b/lib/infusion/src/framework/preferences/js/SelfVoicingSchemas.js deleted file mode 100644 index 12a13ac..0000000 --- a/lib/infusion/src/framework/preferences/js/SelfVoicingSchemas.js +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright 2015 OCAD University - -Licensed under the Educational Community License (ECL), Version 2.0 or the New -BSD license. You may not use this file except in compliance with one these -Licenses. - -You may obtain a copy of the ECL 2.0 License and BSD License at -https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt -*/ - -var fluid_2_0_0 = fluid_2_0_0 || {}; - -(function (fluid) { - "use strict"; - - /******************************************************************************* - * Starter auxiliary schema grade - * - * Contains the settings for 7 preferences: text size, line space, text font, - * contrast, table of contents, inputs larger and emphasize links - *******************************************************************************/ - - // Fine-tune the starter aux schema and add speak panel - fluid.defaults("fluid.prefs.auxSchema.speak", { - gradeNames: ["fluid.prefs.auxSchema"], - auxiliarySchema: { - "namespace": "fluid.prefs.constructed", - "terms": { - "templatePrefix": "../../framework/preferences/html/", - "messagePrefix": "../../framework/preferences/messages/" - }, - "template": "%templatePrefix/SeparatedPanelPrefsEditor.html", - "message": "%messagePrefix/prefsEditor.json", - - speak: { - type: "fluid.prefs.speak", - enactor: { - type: "fluid.prefs.enactor.selfVoicing", - container: "body" - }, - panel: { - type: "fluid.prefs.panel.speak", - container: ".flc-prefsEditor-speak", - template: "%templatePrefix/PrefsEditorTemplate-speak.html", - message: "%messagePrefix/speak.json" - } - } - } - }); - - - /******************************************************************************* - * Primary Schema - *******************************************************************************/ - - // add extra prefs to the starter primary schemas - - fluid.defaults("fluid.prefs.schemas.speak", { - gradeNames: ["fluid.prefs.schemas"], - schema: { - "fluid.prefs.speak": { - "type": "boolean", - "default": false - } - } - }); - -})(fluid_2_0_0); diff --git a/lib/infusion/src/framework/preferences/js/SeparatedPanelPrefsEditor.js b/lib/infusion/src/framework/preferences/js/SeparatedPanelPrefsEditor.js deleted file mode 100644 index c985054..0000000 --- a/lib/infusion/src/framework/preferences/js/SeparatedPanelPrefsEditor.js +++ /dev/null @@ -1,461 +0,0 @@ -/* -Copyright 2011-2016 OCAD University -Copyright 2011 Lucendo Development Ltd. - -Licensed under the Educational Community License (ECL), Version 2.0 or the New -BSD license. You may not use this file except in compliance with one these -Licenses. - -You may obtain a copy of the ECL 2.0 License and BSD License at -https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt -*/ - -var fluid_2_0_0 = fluid_2_0_0 || {}; - -(function ($, fluid) { - "use strict"; - - fluid.registerNamespace("fluid.dom"); - - fluid.dom.getDocumentHeight = function (dokkument) { - var body = $("body", dokkument)[0]; - return body.offsetHeight; - }; - - /******************************************************* - * Separated Panel Preferences Editor Top Level Driver * - *******************************************************/ - - fluid.defaults("fluid.prefs.separatedPanel", { - gradeNames: ["fluid.prefs.prefsEditorLoader", "fluid.contextAware"], - events: { - afterRender: null, - onReady: null, - onCreateSlidingPanelReady: { - events: { - iframeRendered: "afterRender", - onPrefsEditorMessagesLoaded: "onPrefsEditorMessagesLoaded" - } - }, - templatesAndIframeReady: { - events: { - iframeReady: "afterRender", - templatesLoaded: "onPrefsEditorTemplatesLoaded", - messagesLoaded: "onPrefsEditorMessagesLoaded" - } - } - }, - lazyLoad: false, - contextAwareness: { - lazyLoad: { - checks: { - lazyLoad: { - contextValue: "{fluid.prefs.separatedPanel}.options.lazyLoad", - gradeNames: "fluid.prefs.separatedPanel.lazyLoad" - } - } - }, - separatedPanelPrefsWidgetType: { - checks: { - jQueryUI: { - contextValue: "{fluid.prefsWidgetType}", - equals: "jQueryUI", - gradeNames: "fluid.prefs.separatedPanel.jQueryUI" - } - }, - defaultGradeNames: "fluid.prefs.separatedPanel.nativeHTML" - } - }, - selectors: { - reset: ".flc-prefsEditor-reset", - iframe: ".flc-prefsEditor-iframe" - }, - listeners: { - "onReady.bindEvents": { - listener: "fluid.prefs.separatedPanel.bindEvents", - args: ["{separatedPanel}.prefsEditor", "{iframeRenderer}.iframeEnhancer", "{separatedPanel}"] - }, - "onCreate.hideReset": { - listener: "fluid.prefs.separatedPanel.hideReset", - args: ["{separatedPanel}"] - } - }, - invokers: { - bindReset: { - funcName: "fluid.bind", - args: ["{separatedPanel}.dom.reset", "click", "{arguments}.0"] - } - }, - components: { - slidingPanel: { - type: "fluid.slidingPanel", - container: "{separatedPanel}.container", - createOnEvent: "onCreateSlidingPanelReady", - options: { - gradeNames: ["fluid.prefs.msgLookup"], - strings: { - showText: "{that}.msgLookup.slidingPanelShowText", - hideText: "{that}.msgLookup.slidingPanelHideText", - showTextAriaLabel: "{that}.msgLookup.showTextAriaLabel", - hideTextAriaLabel: "{that}.msgLookup.hideTextAriaLabel", - panelLabel: "{that}.msgLookup.slidingPanelPanelLabel" - }, - invokers: { - operateShow: { - funcName: "fluid.prefs.separatedPanel.showPanel", - args: ["{that}.dom.panel", "{that}.events.afterPanelShow.fire"], - // override default implementation - "this": null, - "method": null - }, - operateHide: { - funcName: "fluid.prefs.separatedPanel.hidePanel", - args: ["{that}.dom.panel", "{iframeRenderer}.iframe", "{that}.events.afterPanelHide.fire"], - // override default implementation - "this": null, - "method": null - } - }, - components: { - msgResolver: { - type: "fluid.messageResolver", - options: { - messageBase: "{messageLoader}.resources.prefsEditor.resourceText" - } - } - } - } - }, - iframeRenderer: { - type: "fluid.prefs.separatedPanel.renderIframe", - container: "{separatedPanel}.dom.iframe", - options: { - events: { - afterRender: "{separatedPanel}.events.afterRender" - }, - components: { - iframeEnhancer: { - type: "fluid.uiEnhancer", - container: "{iframeRenderer}.renderPrefsEditorContainer", - createOnEvent: "afterRender", - options: { - gradeNames: ["{pageEnhancer}.uiEnhancer.options.userGrades"], - jQuery: "{iframeRenderer}.jQuery", - tocTemplate: "{pageEnhancer}.uiEnhancer.options.tocTemplate" - } - } - } - } - }, - prefsEditor: { - createOnEvent: "templatesAndIframeReady", - container: "{iframeRenderer}.renderPrefsEditorContainer", - options: { - gradeNames: ["fluid.prefs.uiEnhancerRelay"], - // ensure that model and applier are available to users at top level - model: "{separatedPanel}.model", - events: { - onSignificantDOMChange: null, - updateEnhancerModel: "{that}.events.modelChanged" - }, - listeners: { - "modelChanged.save": "{that}.save", - "onCreate.bindReset": { - listener: "{separatedPanel}.bindReset", - args: ["{that}.reset"] - }, - "afterReset.applyChanges": "{that}.applyChanges", - "onReady.boilOnReady": { - listener: "{separatedPanel}.events.onReady", - args: "{separatedPanel}" - } - } - } - } - }, - outerEnhancerOptions: "{originalEnhancerOptions}.options.originalUserOptions", - distributeOptions: [{ - source: "{that}.options.slidingPanel", - removeSource: true, - target: "{that > slidingPanel}.options" - }, { - source: "{that}.options.iframeRenderer", - removeSource: true, - target: "{that > iframeRenderer}.options" - }, { - source: "{that}.options.iframe", - removeSource: true, - target: "{that}.options.selectors.iframe" - }, { - source: "{that}.options.outerEnhancerOptions", - removeSource: true, - target: "{that iframeEnhancer}.options" - }, { - source: "{that}.options.terms", - target: "{that > iframeRenderer}.options.terms" - }] - }); - - // Used for context-awareness behaviour - fluid.defaults("fluid.prefs.separatedPanel.nativeHTML", { - components: { - iframeRenderer: { - options: { - markupProps: { - src: "%templatePrefix/SeparatedPanelPrefsEditorFrame-nativeHTML.html" - } - } - } - } - }); - - // Used for context-awareness behaviour - fluid.defaults("fluid.prefs.separatedPanel.jQueryUI", { - components: { - iframeRenderer: { - options: { - markupProps: { - src: "%templatePrefix/SeparatedPanelPrefsEditorFrame-jQueryUI.html" - } - } - } - } - }); - - fluid.prefs.separatedPanel.hideReset = function (separatedPanel) { - separatedPanel.locate("reset").hide(); - }; - /***************************************** - * fluid.prefs.separatedPanel.renderIframe * - *****************************************/ - - fluid.defaults("fluid.prefs.separatedPanel.renderIframe", { - gradeNames: ["fluid.viewComponent"], - events: { - afterRender: null - }, - styles: { - container: "fl-prefsEditor-separatedPanel-iframe" - }, - terms: { - templatePrefix: "." - }, - markupProps: { - "class": "flc-iframe", - src: "%templatePrefix/prefsEditorIframe.html" - }, - listeners: { - "onCreate.startLoadingIframe": "fluid.prefs.separatedPanel.renderIframe.startLoadingIframe" - } - }); - - fluid.prefs.separatedPanel.renderIframe.startLoadingIframe = function (that) { - var styles = that.options.styles; - // TODO: get earlier access to templateLoader, - that.options.markupProps.src = fluid.stringTemplate(that.options.markupProps.src, that.options.terms); - that.iframeSrc = that.options.markupProps.src; - - // Create iframe and append to container - that.iframe = $("