initial check-in: a copy of AFrame
authorCindy Li <cli@ocad.ca>
Mon, 26 Oct 2009 19:46:51 +0000 (19:46 -0000)
committerCindy Li <cli@ocad.ca>
Mon, 26 Oct 2009 19:46:51 +0000 (19:46 -0000)
771 files changed:
docs/documentation/frame_content.php [new file with mode: 0644]
docs/documentation/frame_header.php [new file with mode: 0644]
docs/documentation/frame_toc.php [new file with mode: 0644]
docs/documentation/handbook_footer.inc.php [new file with mode: 0644]
docs/documentation/handbook_header.inc.php [new file with mode: 0644]
docs/documentation/index.php [new file with mode: 0644]
docs/documentation/oauth_server_api.php [new file with mode: 0644]
docs/documentation/print.php [new file with mode: 0644]
docs/documentation/search.php [new file with mode: 0644]
docs/documentation/web_service_api.php [new file with mode: 0644]
docs/home/index.php [new file with mode: 0644]
docs/images/arrow-closed.png [new file with mode: 0644]
docs/images/arrow-open.png [new file with mode: 0644]
docs/images/atrclogo.gif [new file with mode: 0644]
docs/images/bad.gif [new file with mode: 0644]
docs/images/calendar.gif [new file with mode: 0644]
docs/images/check.gif [new file with mode: 0644]
docs/images/clr.gif [new file with mode: 0644]
docs/images/double.png [new file with mode: 0644]
docs/images/error.png [new file with mode: 0644]
docs/images/feedback.gif [new file with mode: 0644]
docs/images/folder.gif [new file with mode: 0644]
docs/images/header.jpg [new file with mode: 0644]
docs/images/info.png [new file with mode: 0644]
docs/images/logo.png [new file with mode: 0644]
docs/images/paper.gif [new file with mode: 0644]
docs/images/warning.png [new file with mode: 0644]
docs/include/classes/DAO/ConfigDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/DAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/LangCodesDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/LanguageTextDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/LanguagesDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/MailQueueDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/MyownPatchesDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/MyownPatchesDependentDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/MyownPatchesFilesDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/OAuthClientServersDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/OAuthClientTokensDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/OAuthServerConsumersDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/OAuthServerTokensDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/PatchesDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/PatchesFilesActionsDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/PatchesFilesDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/PrivilegesDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/ThemesDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/UserGroupPrivilegeDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/UserGroupsDAO.class.php [new file with mode: 0644]
docs/include/classes/DAO/UsersDAO.class.php [new file with mode: 0644]
docs/include/classes/Language/Language.class.php [new file with mode: 0644]
docs/include/classes/Language/LanguageEditor.class.php [new file with mode: 0644]
docs/include/classes/Language/LanguageManager.class.php [new file with mode: 0644]
docs/include/classes/Language/LanguageParser.class.php [new file with mode: 0644]
docs/include/classes/Language/LanguageUtility.class.php [new file with mode: 0644]
docs/include/classes/Language/LanguagesParser.class.php [new file with mode: 0644]
docs/include/classes/Language/RemoteLanguageManager.class.php [new file with mode: 0644]
docs/include/classes/Menu.class.php [new file with mode: 0644]
docs/include/classes/Message/Message.class.php [new file with mode: 0644]
docs/include/classes/Savant2/Savant2.php [new file with mode: 0644]
docs/include/classes/Savant2/Savant2/Compiler.php [new file with mode: 0644]
docs/include/classes/Savant2/Savant2/Error.php [new file with mode: 0644]
docs/include/classes/Savant2/Savant2/Filter.php [new file with mode: 0644]
docs/include/classes/Savant2/Savant2/Plugin.php [new file with mode: 0644]
docs/include/classes/Savant2/Savant2/Savant2_Error_exception.php [new file with mode: 0644]
docs/include/classes/Savant2/Savant2/Savant2_Error_pear.php [new file with mode: 0644]
docs/include/classes/Savant2/Savant2/Savant2_Error_stack.php [new file with mode: 0644]
docs/include/classes/Savant2/Savant2/Savant2_Plugin_cycle.php [new file with mode: 0644]
docs/include/classes/User.class.php [new file with mode: 0644]
docs/include/classes/Utility.class.php [new file with mode: 0644]
docs/include/classes/phpmailer/aframemailer.class.php [new file with mode: 0644]
docs/include/classes/phpmailer/class.phpmailer.php [new file with mode: 0644]
docs/include/classes/phpmailer/class.smtp.php [new file with mode: 0644]
docs/include/classes/phpmailer/phpmailer.lang-en.php [new file with mode: 0644]
docs/include/classes/sqlutility.class.php [new file with mode: 0644]
docs/include/classes/zipfile.class.php [new file with mode: 0644]
docs/include/config.inc.php [new file with mode: 0644]
docs/include/constants.inc.php [new file with mode: 0644]
docs/include/footer.inc.php [new file with mode: 0644]
docs/include/handbook_pages.inc.php [new file with mode: 0644]
docs/include/handleResponse.php [new file with mode: 0644]
docs/include/header.inc.php [new file with mode: 0644]
docs/include/jscripts/handleResponse.js [new file with mode: 0644]
docs/include/jscripts/infusion/InfusionAll.js [new file with mode: 0644]
docs/include/jscripts/infusion/README.txt [new file with mode: 0644]
docs/include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css [new file with mode: 0644]
docs/include/jscripts/infusion/components/inlineEdit/js/InlineEdit.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/inlineEdit/js/InlineEditIntegrations.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/pager/css/Pager.css [new file with mode: 0644]
docs/include/jscripts/infusion/components/pager/images/arrow-dn.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/pager/images/arrow-up.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/pager/js/Pager.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/progress/js/Progress.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/css/ImageReorderer.css [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/css/Reorderer.css [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/html/ImageReordererRSF.html [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/images/Banana.jpg [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/images/Blackberry.jpg [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/images/Cherry.jpg [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/images/Dragonfruit.jpg [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/images/Fig.jpg [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/images/Grapes.jpg [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/images/Kiwano.jpg [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/images/Kiwi.jpg [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/images/Kumquat.jpg [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/images/Lemon.jpg [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/images/Mangosteen.jpg [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/images/Orange.jpg [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/images/RedApple.jpg [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/images/Tamarillo.jpg [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/js/GeometricManager.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/js/ImageReorderer.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/js/LayoutReorderer.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/js/ModuleLayout.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/reorderer/js/Reorderer.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/tableOfContents/html/TableOfContents.html [new file with mode: 0644]
docs/include/jscripts/infusion/components/tableOfContents/js/TableOfContents.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/uiOptions/css/Slider.css [new file with mode: 0644]
docs/include/jscripts/infusion/components/uiOptions/css/UIOptions.css [new file with mode: 0644]
docs/include/jscripts/infusion/components/uiOptions/css/UIOptionsPreview.css [new file with mode: 0644]
docs/include/jscripts/infusion/components/uiOptions/html/UIOptions.html [new file with mode: 0644]
docs/include/jscripts/infusion/components/uiOptions/html/UIOptionsPreview.html [new file with mode: 0644]
docs/include/jscripts/infusion/components/uiOptions/images/500x327_mint_truffle.jpg [new file with mode: 0644]
docs/include/jscripts/infusion/components/uiOptions/images/border_1.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/uiOptions/images/expand_collapse.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/uiOptions/images/h1.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/uiOptions/images/main_bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/uiOptions/images/mintleaf.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/uiOptions/js/UIEnhancer.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/uiOptions/js/UIOptions.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/undo/js/Undo.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/ReadMe.txt [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/css/Uploader.css [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/html/Uploader.html [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/images/add.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/images/browse.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/images/error.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/images/gradient-file-green.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/images/gradient-file-grey.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/images/gradient-total-green.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/images/gradient-total-grey.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/images/gradient-total-yellow.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/images/remove.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/images/tick.png [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/js/DemoUploadManager.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/js/FileQueue.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/js/SWFUploadManager.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/js/Scroller.js [new file with mode: 0644]
docs/include/jscripts/infusion/components/uploader/js/Uploader.js [new file with mode: 0644]
docs/include/jscripts/infusion/framework/core/js/DataBinding.js [new file with mode: 0644]
docs/include/jscripts/infusion/framework/core/js/Fluid.js [new file with mode: 0644]
docs/include/jscripts/infusion/framework/core/js/FluidDOMUtilities.js [new file with mode: 0644]
docs/include/jscripts/infusion/framework/core/js/ProgressiveEnhancement.js [new file with mode: 0644]
docs/include/jscripts/infusion/framework/core/js/jquery.keyboard-a11y.js [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/css/fss-JSR168Bridge.css [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/css/fss-layout.css [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/css/fss-reset.css [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/css/fss-text.css [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/css/fss-theme-coal.css [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/css/fss-theme-debug.css [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/css/fss-theme-hc.css [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/css/fss-theme-hci.css [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/css/fss-theme-mist.css [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/css/fss-theme-rust.css [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/css/fss-theme-slate.css [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/exclamation.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/gripper.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/_common/exclamation.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/_common/gloss_25_repeater.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/_common/gripper.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-light-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-light-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-med-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-med-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-titlebar-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-titlebar-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/coal-icons.psd [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-menu-Delete.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-Close.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-Less.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-More.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-ShowSettings.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-gripper.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-active-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-active-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-container-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-content-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-active-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-active-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-container-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-content-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/coal/widget-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-light-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-light-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-med-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-med-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-titlebar-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-titlebar-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-menu-Delete.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-options-ListOrGrid.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-Close.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-Less.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-More.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-ShowSettings.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-gripper.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/mist-icons.psd [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-active-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-active-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-container-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-active-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-active-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-container-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/mist/widget-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/rust/gripper.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-menu-Delete.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-options-ListOrGrid.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-widget-Close.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-widget-More.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-widget-Settings.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/rust/menu-hover.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/rust/widget-earmark.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-light-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-light-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-med-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-med-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-titlebar-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-titlebar-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-Close.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-Less.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-More.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-gripper.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/slate-icons.psd [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/sprites.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-active-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-active-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-container-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-active-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-active-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-container-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/widget-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/fss/images/themes/slate/widget-earmark.png [new file with mode: 0644]
docs/include/jscripts/infusion/framework/renderer/js/fluidParser.js [new file with mode: 0644]
docs/include/jscripts/infusion/framework/renderer/js/fluidRenderer.js [new file with mode: 0644]
docs/include/jscripts/infusion/lib/fastXmlPull/js/fastXmlPull.js [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/core/js/jquery.js [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/plugins/bgiframe/js/jquery.bgiframe.js [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/plugins/delegate/js/jquery.delegate.js [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/plugins/tooltip/css/jquery.tooltip.css [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/plugins/tooltip/js/jquery.tooltip.js [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/coal.css [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_0_000000_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_75_cccccc_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_25_575757_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_55_cccccc_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_65_000000_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_333333_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_666666_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_inset-soft_95_fef1ec_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_222222_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_333333_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_a3a3a3_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cccccc_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cd0a0a_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_ffffff_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/hc.css [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_000000_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_ffffff_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_000000_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_ffffff_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/hci.css [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_000000_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_999999_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_ffffff_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_000000_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_fffff_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_ffffff_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_000000_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_2e83ff_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_75_ffffff_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_65_ffffff_1x400.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_9dcaf6_1x400.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_d9e8f7_1x400.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_highlight-soft_55_9dcaf6_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_inset-soft_95_fef1ec_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_000000_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_222222_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_2e83ff_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_454545_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_888888_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_cd0a0a_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/mist.css [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_666666_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_999999_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_cccccc_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ebebeb_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ffffff_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_glass_75_666666_1x400.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-hard_100_ebebeb_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-soft_75_999999_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_inset-hard_100_ebebeb_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_000000_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_666666_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ebebeb_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ffffff_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/slate.css [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/js/ui-FLUID-readme.txt [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/js/ui.accordion.js [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/js/ui.core.js [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/js/ui.dialog.js [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/js/ui.draggable.js [new file with mode: 0644]
docs/include/jscripts/infusion/lib/jquery/ui/js/ui.slider.js [new file with mode: 0644]
docs/include/jscripts/infusion/lib/json/js/json2.js [new file with mode: 0644]
docs/include/jscripts/infusion/lib/swfobject/js/swfobject.js [new file with mode: 0644]
docs/include/jscripts/infusion/lib/swfupload/flash/swfupload.swf [new file with mode: 0644]
docs/include/jscripts/infusion/lib/swfupload/js/swfupload.js [new file with mode: 0644]
docs/include/jscripts/infusion/licenses/Infusion-LICENSE.txt [new file with mode: 0644]
docs/include/jscripts/infusion/licenses/fastXmlPull-LICENSE.txt [new file with mode: 0644]
docs/include/jscripts/infusion/licenses/fckeditor-LICENSE.txt [new file with mode: 0644]
docs/include/jscripts/infusion/licenses/jQuery-LICENSE.txt [new file with mode: 0644]
docs/include/jscripts/infusion/licenses/swfobject-LICENSE.txt [new file with mode: 0644]
docs/include/jscripts/infusion/licenses/swfupload-LICENSE.txt [new file with mode: 0644]
docs/include/jscripts/infusion_old/InfusionAll.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/README.txt [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/inlineEdit/css/InlineEdit.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/inlineEdit/js/InlineEdit.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/inlineEdit/js/InlineEditIntegrations.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/inlineEdit/js/jquery.tinymce.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/pager/css/Pager.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/pager/images/arrow-dn.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/pager/images/arrow-up.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/pager/js/Pager.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/progress/js/Progress.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/css/ImageReorderer.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/css/Reorderer.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/html/ImageReordererRSF.html [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/images/Banana.jpg [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/images/Blackberry.jpg [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/images/Cherry.jpg [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/images/Dragonfruit.jpg [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/images/Fig.jpg [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/images/Grapes.jpg [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/images/Kiwano.jpg [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/images/Kiwi.jpg [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/images/Kumquat.jpg [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/images/Lemon.jpg [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/images/Mangosteen.jpg [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/images/Orange.jpg [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/images/RedApple.jpg [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/images/Tamarillo.jpg [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/js/GeometricManager.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/js/ImageReorderer.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/js/LayoutReorderer.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/js/ModuleLayout.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/reorderer/js/Reorderer.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/tableOfContents/html/TableOfContents.html [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/tableOfContents/js/TableOfContents.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uiOptions/css/Slider.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uiOptions/css/UIOptions.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uiOptions/css/UIOptionsPreview.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uiOptions/html/UIOptions.html [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uiOptions/html/UIOptionsPreview.html [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uiOptions/images/500x327_mint_truffle.jpg [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uiOptions/images/border_1.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uiOptions/images/expand_collapse.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uiOptions/images/h1.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uiOptions/images/main_bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uiOptions/images/mintleaf.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uiOptions/js/UIEnhancer.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uiOptions/js/UIOptions.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/undo/js/Undo.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/ReadMe.txt [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/css/Uploader.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/html/Uploader.html [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/images/add.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/images/browse.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/images/error.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/images/gradient-file-green.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/images/gradient-file-grey.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/images/gradient-total-green.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/images/gradient-total-grey.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/images/gradient-total-yellow.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/images/remove.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/images/tick.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/js/DemoUploadManager.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/js/FileQueue.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/js/SWFUploadManager.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/js/Scroller.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/components/uploader/js/Uploader.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/core/js/DataBinding.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/core/js/Fluid.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/core/js/FluidDOMUtilities.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/core/js/ProgressiveEnhancement.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/core/js/jquery.keyboard-a11y.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/css/fss-JSR168Bridge.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/css/fss-layout.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/css/fss-reset.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/css/fss-text.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-coal.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-debug.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-hc.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-hci.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-mist.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-rust.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-slate.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/exclamation.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/gripper.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/_common/exclamation.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/_common/gloss_25_repeater.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/_common/gripper.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-light-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-light-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-med-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-med-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-titlebar-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-titlebar-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/coal-icons.psd [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-menu-Delete.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-Close.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-Less.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-More.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-ShowSettings.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-gripper.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-active-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-active-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-container-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-content-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-active-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-active-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-container-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-content-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/widget-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-light-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-light-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-med-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-med-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-titlebar-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-titlebar-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-menu-Delete.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-options-ListOrGrid.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-Close.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-Less.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-More.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-ShowSettings.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-gripper.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/mist-icons.psd [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-active-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-active-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-container-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-active-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-active-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-container-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/widget-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/gripper.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-menu-Delete.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-options-ListOrGrid.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-widget-Close.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-widget-More.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-widget-Settings.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/menu-hover.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/widget-earmark.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-light-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-light-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-med-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-med-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-titlebar-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-titlebar-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-Close.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-Less.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-More.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-gripper.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/slate-icons.psd [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/sprites.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-active-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-active-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-container-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-active-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-active-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-cap.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-container-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/widget-bg.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/widget-earmark.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/renderer/js/fluidParser.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/framework/renderer/js/fluidRenderer.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/fastXmlPull/js/fastXmlPull.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/core/js/jquery.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/plugins/bgiframe/js/jquery.bgiframe.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/plugins/delegate/js/jquery.delegate.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/plugins/tooltip/css/jquery.tooltip.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/plugins/tooltip/js/jquery.tooltip.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/coal.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_0_000000_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_75_cccccc_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_25_575757_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_55_cccccc_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_65_000000_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_333333_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_666666_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_inset-soft_95_fef1ec_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_222222_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_333333_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_a3a3a3_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cccccc_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cd0a0a_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_ffffff_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/hc.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_000000_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_ffffff_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_000000_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_ffffff_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/hci.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_000000_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_999999_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_ffffff_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_000000_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_fffff_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_ffffff_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_000000_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_2e83ff_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_75_ffffff_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_65_ffffff_1x400.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_9dcaf6_1x400.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_d9e8f7_1x400.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_highlight-soft_55_9dcaf6_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_inset-soft_95_fef1ec_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_000000_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_222222_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_2e83ff_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_454545_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_888888_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_cd0a0a_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/mist.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_666666_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_999999_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_cccccc_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ebebeb_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ffffff_40x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_glass_75_666666_1x400.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-hard_100_ebebeb_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-soft_75_999999_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_inset-hard_100_ebebeb_1x100.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_000000_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_666666_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ebebeb_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ffffff_256x240.png [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/slate.css [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui-FLUID-readme.txt [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui.accordion.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui.core.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui.dialog.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui.draggable.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui.slider.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/json/js/json2.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/swfobject/js/swfobject.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/swfupload/flash/swfupload.swf [new file with mode: 0644]
docs/include/jscripts/infusion_old/lib/swfupload/js/swfupload.js [new file with mode: 0644]
docs/include/jscripts/infusion_old/licenses/Infusion-LICENSE.txt [new file with mode: 0644]
docs/include/jscripts/infusion_old/licenses/fastXmlPull-LICENSE.txt [new file with mode: 0644]
docs/include/jscripts/infusion_old/licenses/fckeditor-LICENSE.txt [new file with mode: 0644]
docs/include/jscripts/infusion_old/licenses/jQuery-LICENSE.txt [new file with mode: 0644]
docs/include/jscripts/infusion_old/licenses/swfobject-LICENSE.txt [new file with mode: 0644]
docs/include/jscripts/infusion_old/licenses/swfupload-LICENSE.txt [new file with mode: 0644]
docs/include/jscripts/sha-1factory.js [new file with mode: 0644]
docs/include/lib/mime.inc.php [new file with mode: 0644]
docs/include/lib/output.inc.php [new file with mode: 0644]
docs/include/lib/pclzip.lib.php [new file with mode: 0644]
docs/include/page_constants.inc.php [new file with mode: 0644]
docs/include/phpCache/ChangeLog [new file with mode: 0644]
docs/include/phpCache/LICENSE [new file with mode: 0644]
docs/include/phpCache/README [new file with mode: 0644]
docs/include/phpCache/gc.php [new file with mode: 0644]
docs/include/phpCache/phpCache.inc.php [new file with mode: 0644]
docs/include/securimage/LICENSE.txt [new file with mode: 0644]
docs/include/securimage/README.txt [new file with mode: 0644]
docs/include/securimage/audio/0.wav [new file with mode: 0644]
docs/include/securimage/audio/1.wav [new file with mode: 0644]
docs/include/securimage/audio/2.wav [new file with mode: 0644]
docs/include/securimage/audio/3.wav [new file with mode: 0644]
docs/include/securimage/audio/4.wav [new file with mode: 0644]
docs/include/securimage/audio/5.wav [new file with mode: 0644]
docs/include/securimage/audio/6.wav [new file with mode: 0644]
docs/include/securimage/audio/7.wav [new file with mode: 0644]
docs/include/securimage/audio/8.wav [new file with mode: 0644]
docs/include/securimage/audio/9.wav [new file with mode: 0644]
docs/include/securimage/audio/A.wav [new file with mode: 0644]
docs/include/securimage/audio/B.wav [new file with mode: 0644]
docs/include/securimage/audio/C.wav [new file with mode: 0644]
docs/include/securimage/audio/D.wav [new file with mode: 0644]
docs/include/securimage/audio/E.wav [new file with mode: 0644]
docs/include/securimage/audio/F.wav [new file with mode: 0644]
docs/include/securimage/audio/G.wav [new file with mode: 0644]
docs/include/securimage/audio/H.wav [new file with mode: 0644]
docs/include/securimage/audio/I.wav [new file with mode: 0644]
docs/include/securimage/audio/J.wav [new file with mode: 0644]
docs/include/securimage/audio/K.wav [new file with mode: 0644]
docs/include/securimage/audio/L.wav [new file with mode: 0644]
docs/include/securimage/audio/M.wav [new file with mode: 0644]
docs/include/securimage/audio/N.wav [new file with mode: 0644]
docs/include/securimage/audio/O.wav [new file with mode: 0644]
docs/include/securimage/audio/P.wav [new file with mode: 0644]
docs/include/securimage/audio/Q.wav [new file with mode: 0644]
docs/include/securimage/audio/R.wav [new file with mode: 0644]
docs/include/securimage/audio/S.wav [new file with mode: 0644]
docs/include/securimage/audio/T.wav [new file with mode: 0644]
docs/include/securimage/audio/U.wav [new file with mode: 0644]
docs/include/securimage/audio/V.wav [new file with mode: 0644]
docs/include/securimage/audio/W.wav [new file with mode: 0644]
docs/include/securimage/audio/X.wav [new file with mode: 0644]
docs/include/securimage/audio/Y.wav [new file with mode: 0644]
docs/include/securimage/audio/Z.wav [new file with mode: 0644]
docs/include/securimage/elephant.ttf [new file with mode: 0644]
docs/include/securimage/gdfonts/automatic.gdf [new file with mode: 0644]
docs/include/securimage/gdfonts/bubblebath.gdf [new file with mode: 0644]
docs/include/securimage/gdfonts/caveman.gdf [new file with mode: 0644]
docs/include/securimage/gdfonts/crass.gdf [new file with mode: 0644]
docs/include/securimage/images/audio_icon.gif [new file with mode: 0644]
docs/include/securimage/images/refresh.gif [new file with mode: 0644]
docs/include/securimage/securimage.php [new file with mode: 0644]
docs/include/securimage/securimage_play.php [new file with mode: 0644]
docs/include/securimage/securimage_show.php [new file with mode: 0644]
docs/include/vitals.inc.php [new file with mode: 0644]
docs/index.php [new file with mode: 0644]
docs/install/db/Copy of language_text.sql [new file with mode: 0644]
docs/install/db/db_schema.sql [new file with mode: 0644]
docs/install/db/language_text.sql [new file with mode: 0644]
docs/install/images/bad.gif [new file with mode: 0644]
docs/install/images/feedback.gif [new file with mode: 0644]
docs/install/images/question.gif [new file with mode: 0644]
docs/install/include/classes/sqlutility.php [new file with mode: 0644]
docs/install/include/common.inc.php [new file with mode: 0644]
docs/install/include/config_template.php [new file with mode: 0644]
docs/install/include/footer.inc.php [new file with mode: 0644]
docs/install/include/header.inc.php [new file with mode: 0644]
docs/install/include/step1.php [new file with mode: 0644]
docs/install/include/step2.php [new file with mode: 0644]
docs/install/include/step3.php [new file with mode: 0644]
docs/install/include/step4.php [new file with mode: 0644]
docs/install/include/step5.php [new file with mode: 0644]
docs/install/include/step6.php [new file with mode: 0644]
docs/install/include/step7.php [new file with mode: 0644]
docs/install/include/upgrade_header.php [new file with mode: 0644]
docs/install/include/ustep1.php [new file with mode: 0644]
docs/install/include/ustep2.php [new file with mode: 0644]
docs/install/include/ustep3.php [new file with mode: 0644]
docs/install/include/ustep4.php [new file with mode: 0644]
docs/install/include/ustep5.php [new file with mode: 0644]
docs/install/index.php [new file with mode: 0644]
docs/install/install.php [new file with mode: 0644]
docs/install/not_installed.php [new file with mode: 0644]
docs/install/stylesheet.css [new file with mode: 0644]
docs/install/upgrade.php [new file with mode: 0644]
docs/language/index.php [new file with mode: 0644]
docs/language/index_inline_editor_submit.php [new file with mode: 0644]
docs/language/language_add_edit.php [new file with mode: 0644]
docs/language/language_delete.php [new file with mode: 0644]
docs/login.php [new file with mode: 0644]
docs/logout.php [new file with mode: 0644]
docs/oauth/access_token.php [new file with mode: 0644]
docs/oauth/authorization.php [new file with mode: 0644]
docs/oauth/classes/MyOAuthServer.class.php [new file with mode: 0644]
docs/oauth/common.inc.php [new file with mode: 0644]
docs/oauth/lib/OAuth.php [new file with mode: 0644]
docs/oauth/register_consumer.php [new file with mode: 0644]
docs/oauth/request_token.php [new file with mode: 0644]
docs/oauth_client.php [new file with mode: 0644]
docs/profile/change_email.php [new file with mode: 0644]
docs/profile/change_password.php [new file with mode: 0644]
docs/profile/index.php [new file with mode: 0644]
docs/register.php [new file with mode: 0644]
docs/svn.php [new file with mode: 0644]
docs/system/index.php [new file with mode: 0644]
docs/temp/debug.log [new file with mode: 0644]
docs/temp/updater/patch.xml [new file with mode: 0644]
docs/themes/default/change_password.tmpl.php [new file with mode: 0644]
docs/themes/default/confirmmessage.tmpl.php [new file with mode: 0644]
docs/themes/default/errormessage.tmpl.php [new file with mode: 0644]
docs/themes/default/feedbackmessage.tmpl.php [new file with mode: 0644]
docs/themes/default/forms.css [new file with mode: 0644]
docs/themes/default/handbook_styles.css [new file with mode: 0644]
docs/themes/default/home/index.tmpl.php [new file with mode: 0644]
docs/themes/default/images/add.gif [new file with mode: 0644]
docs/themes/default/images/add_group.gif [new file with mode: 0644]
docs/themes/default/images/arrow.gif [new file with mode: 0644]
docs/themes/default/images/arrow_ltr.gif [new file with mode: 0644]
docs/themes/default/images/atrclogo.gif [new file with mode: 0644]
docs/themes/default/images/delete.gif [new file with mode: 0644]
docs/themes/default/images/edit.gif [new file with mode: 0644]
docs/themes/default/images/guide.gif [new file with mode: 0644]
docs/themes/default/images/guide.jpg [new file with mode: 0644]
docs/themes/default/images/logo.png [new file with mode: 0644]
docs/themes/default/images/navl.gif [new file with mode: 0644]
docs/themes/default/images/navlh.gif [new file with mode: 0644]
docs/themes/default/images/navr.gif [new file with mode: 0644]
docs/themes/default/images/navrh.gif [new file with mode: 0644]
docs/themes/default/images/sort.gif [new file with mode: 0644]
docs/themes/default/include/footer.tmpl.php [new file with mode: 0644]
docs/themes/default/include/handbook_footer.tmpl.php [new file with mode: 0644]
docs/themes/default/include/handbook_header.tmpl.php [new file with mode: 0644]
docs/themes/default/include/header.tmpl.php [new file with mode: 0644]
docs/themes/default/infomessage.tmpl.php [new file with mode: 0644]
docs/themes/default/language/index.tmpl.php [new file with mode: 0644]
docs/themes/default/language/language_add_edit.tmpl.php [new file with mode: 0644]
docs/themes/default/login.tmpl.php [new file with mode: 0644]
docs/themes/default/password_reminder.tmpl.php [new file with mode: 0644]
docs/themes/default/password_reminder_feedback.tmpl.php [new file with mode: 0644]
docs/themes/default/profile/change_email.tmpl.php [new file with mode: 0644]
docs/themes/default/profile/change_password.tmpl.php [new file with mode: 0644]
docs/themes/default/profile/index.tmpl.php [new file with mode: 0644]
docs/themes/default/readme.txt [new file with mode: 0644]
docs/themes/default/register.tmpl.php [new file with mode: 0644]
docs/themes/default/rtl.css [new file with mode: 0644]
docs/themes/default/style_popup.css [new file with mode: 0644]
docs/themes/default/styles.css [new file with mode: 0644]
docs/themes/default/system/index.tmpl.php [new file with mode: 0644]
docs/themes/default/theme.cfg.php [new file with mode: 0644]
docs/themes/default/theme_info.xml [new file with mode: 0644]
docs/themes/default/updater/index.tmpl.php [new file with mode: 0644]
docs/themes/default/updater/myown_patches.tmpl.php [new file with mode: 0644]
docs/themes/default/updater/patch_create_edit.tmpl.php [new file with mode: 0644]
docs/themes/default/user/index.tmpl.php [new file with mode: 0644]
docs/themes/default/user/user_group.tmpl.php [new file with mode: 0644]
docs/themes/default/user/user_group_create_edit.tmpl.php [new file with mode: 0644]
docs/themes/default/user/user_password.tmpl.php [new file with mode: 0644]
docs/themes/default/warningmessage.tmpl.php [new file with mode: 0644]
docs/translation/index.php [new file with mode: 0644]
docs/updater/classes/Patch.class.php [new file with mode: 0644]
docs/updater/classes/PatchCreator.class.php [new file with mode: 0644]
docs/updater/classes/PatchListParser.class.php [new file with mode: 0644]
docs/updater/classes/PatchParser.class.php [new file with mode: 0644]
docs/updater/include/common.inc.php [new file with mode: 0644]
docs/updater/include/json.inc.php [new file with mode: 0644]
docs/updater/include/patch_xml_template.inc.php [new file with mode: 0644]
docs/updater/index.php [new file with mode: 0644]
docs/updater/myown_patches.php [new file with mode: 0644]
docs/updater/myown_patches_inline_editor_submit.php [new file with mode: 0644]
docs/updater/patch_create.php [new file with mode: 0644]
docs/updater/patch_creator.php [new file with mode: 0644]
docs/updater/patch_delete.php [new file with mode: 0644]
docs/updater/patch_edit.php [new file with mode: 0644]
docs/updater/sample_patch.xml [new file with mode: 0644]
docs/updater/sample_patch_list.xml [new file with mode: 0644]
docs/updater/xml_special_chars.txt [new file with mode: 0644]
docs/user/index.php [new file with mode: 0644]
docs/user/index_inline_editor_submit.php [new file with mode: 0644]
docs/user/user_create_edit.php [new file with mode: 0644]
docs/user/user_delete.php [new file with mode: 0644]
docs/user/user_group.php [new file with mode: 0644]
docs/user/user_group_create_edit.php [new file with mode: 0644]
docs/user/user_group_delete.php [new file with mode: 0644]
docs/user/user_group_inline_editor_submit.php [new file with mode: 0644]
docs/user/user_password.php [new file with mode: 0644]

diff --git a/docs/documentation/frame_content.php b/docs/documentation/frame_content.php
new file mode 100644 (file)
index 0000000..5bcdea2
--- /dev/null
@@ -0,0 +1,30 @@
+<?php \r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+\r
+if (isset($_GET['p'])) {\r
+       $this_page = htmlentities($_GET['p']);\r
+} else {\r
+       $this_page = 'index.php';\r
+} \r
+\r
+require('handbook_header.inc.php'); \r
+\r
+if (isset($_pages[$this_page]['guide'])) \r
+{\r
+       echo _AT($_pages[$this_page]['guide']);\r
+}\r
+\r
+require('handbook_footer.inc.php');\r
+?>
\ No newline at end of file
diff --git a/docs/documentation/frame_header.php b/docs/documentation/frame_header.php
new file mode 100644 (file)
index 0000000..cd6b78c
--- /dev/null
@@ -0,0 +1,98 @@
+<?php \r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+\r
+if (isset($_GET['p'])) {\r
+       $this_page = htmlentities($_GET['p']);\r
+} else {\r
+       exit;\r
+} \r
+\r
+?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
+<html lang="<?php echo DEFAULT_LANGUAGE_CODE; ?>">\r
+<head>\r
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+       <title><?php echo _AT('AFrame_documentation'); ?></title>\r
+<style type="text/css">\r
+body { font-family: Verdana,Arial,sans-serif; font-size: x-small; margin: 0px; padding: 3px; background: #f4f4f4; color: #afafaf; }\r
+ul, ol { list-style: none; padding-left: 0px; margin-left: -15px; }\r
+li { margin-left: 19pt; padding-top: 2px; }\r
+a { text-decoration: none; }\r
+a:link, a:visited { color: #006699; }\r
+a:hover { color: #66AECC; }\r
+input { border: 0px; padding: 2px 5px 2px 5px; }\r
+input[type=submit] { background-color: #dfdfdf; padding: 1px; border:  #AAA  solid 1px; }\r
+input[type=submit]:hover { color: blue; background-color: #eee; padding: 1px; }\r
+form { padding: 0px; margin: 0px; display: inline; }\r
+</style>\r
+<script type="text/javascript">\r
+// <!--\r
+var currentPage;\r
+\r
+function showTocToggle(show, hide) {\r
+       if(document.getElementById) {\r
+               document.writeln('<a href="javascript:toggleToc(false)">' +\r
+               '<span id="showlink" style="display:none;">' + show + '</span>' +\r
+               '<span id="hidelink">' + hide + '</span>'       + '</a>');\r
+       }\r
+}\r
+function toggleToc(override) {\r
+       var showlink=document.getElementById('showlink');\r
+       var hidelink=document.getElementById('hidelink');\r
+\r
+       if (override && (hidelink.style.display == 'none')) {\r
+               top.show();\r
+               hidelink.style.display='';\r
+               showlink.style.display='none';\r
+       } else if (!override && (hidelink.style.display == 'none')) {\r
+               top.show();\r
+               hidelink.style.display='';\r
+               showlink.style.display='none';\r
+       } else if (!override) {\r
+               top.hide(); //('0, *');\r
+               hidelink.style.display='none';\r
+               showlink.style.display='';\r
+       }\r
+}\r
+// -->\r
+</script>\r
+</head>\r
+<body><form method="get" action="search.php" target="toc" onsubmit='toggleToc(true);false;'>\r
+<input type="hidden" name="p" value="<?php echo $_GET['p']; ?>">\r
+\r
+<script type="text/javascript">\r
+// <!--\r
+if (top.name == 'popup') {\r
+       document.write('<a href="javascript:top.close();"><?php echo _AT('close_popup'); ?></a> | ');\r
+}\r
+// -->\r
+</script>\r
+\r
+<input type="text" name="query" /> <input type="submit" name="search" value="<?php echo _AT('search'); ?>" /> |  \r
+<a href="print.php?p=<?php echo $this_page; ?>" target="_top"><?php echo _AT('print_version'); ?></a>\r
+\r
+<script type="text/javascript">\r
+//<!--\r
+document.writeln(' | ');\r
+showTocToggle('<?php echo _AT('show_contents'); ?>' ,'<?php echo _AT('hide_contents'); ?>');\r
+if (top.name == 'popup') {\r
+       toggleToc(true);\r
+}\r
+//-->\r
+</script>\r
+\r
+</form>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/docs/documentation/frame_toc.php b/docs/documentation/frame_toc.php
new file mode 100644 (file)
index 0000000..d0cc2d1
--- /dev/null
@@ -0,0 +1,94 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', '../include/');
+include(AF_INCLUDE_PATH.'vitals.inc.php');
+include(AF_INCLUDE_PATH.'handbook_pages.inc.php');
+
+/**
+ * handbook toc printer
+ * prints an unordered html list representation of the multidimensional array.
+ * $handbook_pages    the array of items to print.
+ * $section  the directory name of the files.
+ */
+function hb_print_toc($handbook_pages) {
+       global $_pages;
+       echo '<ul id="handbook-toc">';
+       foreach ($handbook_pages as $page_key => $page_value) {
+               echo '<li>';
+               if (is_array($page_value)) 
+               {
+                       if (isset($_pages[$page_key]))
+                       {
+                               echo '<a href="frame_content.php?p='.$page_key.'" id="id'.$page_key.'" class="tree">'._AT($_pages[$page_key]['title_var']).'</a>';
+                               hb_print_toc($page_value);
+                       }
+               } else if (isset($_pages[$page_value])){
+                       echo '<a href="frame_content.php?p='.$page_value.'" id="id'.$page_value.'" class="leaf">'._AT($_pages[$page_value]['title_var']).'</a>';
+               }
+               echo '</li>';
+       }
+       echo '</ul>';
+}
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="<?php if ($missing_lang) { echo DEFAULT_LANGUAGE_CODE; } else { echo $req_lang; } ?>">
+<head>
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+       <title><?php _AT('handbook_toc'); ?></title>
+       <base target="body" />
+<style type="text/css">
+body { font-family: Verdana,Arial,sans-serif; font-size: x-small; margin: 0px; padding: 0px; background: #f4f4f4; margin-left: -5px; }
+ul { list-style: none; padding-left: 0px; margin-left: -15px; }
+li { margin-left: 19pt; padding-top: 2px; }
+a { background-repeat: no-repeat; background-position: 0px 1px; padding-left: 12px; text-decoration: none; }
+a.tree { background-image: url('../images/folder.gif'); }
+a.leaf { background-image: url('../images/paper.gif'); }
+a:link, a:visited { color: #006699; }
+a:hover { color: #66AECC; }
+</style>
+
+<script type="text/javascript">
+// <!--
+function highlight(page) {
+       if (page == false) {
+               alert(parent.header.currentPage);
+               if (parent.header.currentPage) {
+                       var toc = parent.toc.document.getElementById(parent.header.currentPage);
+                       toc.style.color = 'blue';
+                       toc.style.fontWeight = 'bold';
+               }
+       } else {
+               if (parent.header.currentPage) {
+                       var toc = parent.toc.document.getElementById(parent.header.currentPage);
+                       toc.style.color = '';
+                       toc.style.fontWeight = '';
+               }
+       
+               var toc = parent.toc.document.getElementById(page);
+               toc.style.color = 'blue';
+               toc.style.fontWeight = 'bold';
+               parent.header.currentPage = page;
+       }
+}
+// -->
+</script>
+</head>
+<body onload="">
+<?php
+global $handbook_pages;
+
+hb_print_toc($handbook_pages);
+?>
+
+</body>
+</html>
diff --git a/docs/documentation/handbook_footer.inc.php b/docs/documentation/handbook_footer.inc.php
new file mode 100644 (file)
index 0000000..447d411
--- /dev/null
@@ -0,0 +1,22 @@
+<?php \r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+if (!defined('AF_INCLUDE_PATH')) { exit; } \r
+\r
+if (isset($prev_page)) $savant->assign('prev_page', $prev_page);\r
+if (isset($next_page)) $savant->assign('next_page', $next_page);\r
+\r
+$savant->assign('pages', $_pages);\r
+$savant->assign('base_path', AF_BASE_HREF);\r
+\r
+$savant->display('include/handbook_footer.tmpl.php');\r
+?>\r
diff --git a/docs/documentation/handbook_header.inc.php b/docs/documentation/handbook_header.inc.php
new file mode 100644 (file)
index 0000000..247e745
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; } 
+include(AF_INCLUDE_PATH.'handbook_pages.inc.php');
+
+global $handbook_pages;
+global $merged_array;
+
+$merged_array = array();
+
+// straighten multi-dimensional array $pages into one-dimension array
+function merge_page_array($pages_array)
+{
+       global $merged_array;
+       
+       if(is_array($pages_array))
+       {
+               foreach ($pages_array as $page_key => $page_value) 
+               {
+                       if (is_array($page_value))
+                       {
+                               $merged_array[] = $page_key;
+                               merge_page_array($page_value);
+                       }
+                       else 
+                       {
+                               $merged_array[] = $page_value;
+                       }
+               }
+       }
+       
+}
+merge_page_array($handbook_pages);
+
+// find previous and next page of the current page from merged_array
+if (is_array($merged_array))
+{
+       foreach ($merged_array as $key => $page)
+       {
+               if (strcmp($page, $this_page) == 0)
+               {
+                       if ($key >= 1) $prev_page = $merged_array[$key - 1];
+                       if ($key < count($merged_array) - 1) $next_page = $merged_array[$key + 1];
+                       break;
+               }
+       }
+}
+if (isset($prev_page)) $savant->assign('prev_page', $prev_page);
+if (isset($next_page)) $savant->assign('next_page', $next_page);
+
+$savant->assign('pages', $_pages);
+$savant->assign('this_page', $this_page);
+$savant->assign('base_path', AF_BASE_HREF);
+$savant->assign('theme', $_SESSION['prefs']['PREF_THEME']);
+
+$savant->display('include/handbook_header.tmpl.php');
+
+?>
\ No newline at end of file
diff --git a/docs/documentation/index.php b/docs/documentation/index.php
new file mode 100644 (file)
index 0000000..c621f8a
--- /dev/null
@@ -0,0 +1,106 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', '../include/');
+include(AF_INCLUDE_PATH.'vitals.inc.php');
+include(AF_INCLUDE_PATH.'handbook_pages.inc.php');
+
+global $handbook_pages;
+
+if (isset($_GET['p'])) {
+       $p = htmlentities($_GET['p']);
+} else {
+       // go to first handbook page defined in $handbook_pages
+       foreach ($handbook_pages as $page_key => $page_value)
+       {
+               if (is_array($page_key))
+               {
+                       if (isset($_pages[$page_key])) $display_page = $page_key;
+               }
+               else
+               {
+                       if (isset($_pages[$page_value])) $display_page = $page_value;
+               }
+               if (isset($display_page))
+               {
+                       header('Location: index.php?p='.htmlentities($page_key));
+                       exit;
+               }
+       }
+} 
+?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 TRANSITIONAL//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo DEFAULT_LANGUAGE_CODE; ?>" lang="<?php echo DEFAULT_LANGUAGE_CODE; ?>"> 
+<head>
+       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+       <title><?php echo _AT('AFrame_handbook'); ?></title>
+
+<script type="text/javascript">
+
+var i = 0;
+
+function show2() {
+       var fs = document.getElementById('frameset1');
+       if (fs) {
+               i += 5;
+               if (i > 28) {
+                       i = 28;
+               }
+               fs.cols = i + '%, *';
+       }
+       if (i < 28) {
+               window.setTimeout('show2()', 1);
+       }
+       return true;
+}
+function show() {
+       i = 0;
+       window.setTimeout('show2()', 1);
+       return true;
+}
+
+function hide2() {
+       var fs = document.getElementById('frameset1');
+       if (fs) {
+               i -= 5;
+               if (i < 0) {
+                       i =0;
+               }
+               fs.cols = i + '%, *';
+       }
+       if (i > 0) {
+               window.setTimeout('hide2()', 1);
+       }
+       return false;
+}
+
+function hide() {
+       i= 28;
+       window.setTimeout('hide2()', 1);
+       return false;
+}
+</script>
+</head>
+<frameset rows="24,*">
+       <frame src="frame_header.php?p=<?php echo $p; ?>" frameborder="0" name="header" title="header" scrolling="no" noresize="noresize">
+       <frameset cols="22%, *" id="frameset1">
+               <frame frameborder="0" scrolling="auto" marginwidth="0" marginheight="0" src="frame_toc.php" name="toc" id="toc" title="Table of Contents">
+               <frame frameborder="0" src="frame_content.php?p=<?php echo $p; ?>" name="body" id="body" title="Content">
+       </frameset>
+
+       <noframes>
+               <h1><?php echo _AT('AFrame_handbook'); ?></h1>
+               <p><a href="frame_toc.html">Table of Contents</a></p>
+        </noframes>
+</frameset>
+
+</html>
diff --git a/docs/documentation/oauth_server_api.php b/docs/documentation/oauth_server_api.php
new file mode 100644 (file)
index 0000000..8631b14
--- /dev/null
@@ -0,0 +1,268 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include(AF_INCLUDE_PATH.'header.inc.php');\r
+?>\r
+<div class="output-form" style="line-height:150%">\r
+\r
+<h1>OAuth Server API</h1>\r
+<p>AFrame implements the OAuth Core 1.0 specification.</p>\r
+<p>The <a href="http://oauth.net/documentation/getting-started" target="_blank">OAuth</a> protocol enables web services consumers to access protected resources via an API without requiring users to supply the service credentials to the consumers. It's a generic methodology for unobtrusive, wire protocol level authenticated data access over HTTP.</p>\r
+\r
+<p>AFrame exposes the following API endpoints:</p>\r
+\r
+    <div id="toc">\r
+      <ul>\r
+        <li><a href="<?php echo AF_BASE_HREF.'documentation/oauth_server_api.php'; ?>#register_consumer">Register consumer</a></li>\r
+        <li><a href="<?php echo AF_BASE_HREF.'documentation/oauth_server_api.php'; ?>#request_token">Request token</a></li>\r
+        <li><a href="<?php echo AF_BASE_HREF.'documentation/oauth_server_api.php'; ?>#authorization">Authorization</a></li>\r
+        <li><a href="<?php echo AF_BASE_HREF.'documentation/oauth_server_api.php'; ?>#access_token">Access token</a></li>\r
+      </ul>\r
+    </div>\r
+    \r
+    <p id="skip"></p>\r
+\r
+<h2 id="register_consumer">Register consumer</h2>\r
+\r
+<h3>Endpoint: </h3><p>http://server-cname/oauth/register_consumer.php</p>\r
+<h3>Parameters</h3><br />\r
+\r
+<table class="data" rules="all">\r
+<tbody><tr>\r
+<th>Parameter</th><th>Description</th><th>Default value</th>\r
+</tr>\r
+\r
+<tr>\r
+  <th>consumer</th>\r
+  <td>Required. The encoded string of consumer name.</td>\r
+  <td>None</td>\r
+</tr>\r
+\r
+<tr>\r
+  <th>expire</th>\r
+  <td>Optional. The seconds that the access token is valid. The access token expires after this number of seconds since it is assigned. When "expire" is set to 0, the access token never expires.</td>\r
+  <td>0</td>\r
+</tr>\r
+\r
+</tbody></table>\r
+<br />\r
+\r
+<h3>Example</h3><br />\r
+<span style="font-weight: bold">Request</span>\r
+<pre style="background-color:#F7F3ED;"> \r
+<?php echo AF_BASE_HREF; ?>oauth/register_consumer.php?consumer=http%3A%2F%2Flocalhost%2Faframe%2F&expire=300<br />\r
+</pre>\r
+<p>Goal: Registers consumer http://localhost/aframe/ and requests that the assigned access token expires in 5 minutes.</p>\r
+\r
+<span style="font-weight:bold">Success response</span>\r
+<pre style="background-color:#F7F3ED;"> \r
+consumer_key=8862a51faa12c1b1&consumer_secret=79d591810c803167&expire=300<br />\r
+</pre>\r
+<p>consumer_key and consumer_secret are both 16 characters long. expire_threshold confirms the access token expire duration.</p> \r
+\r
+<span style="font-weight:bold">Fail response</span>\r
+<pre style="background-color:#F7F3ED;"> \r
+error=Empty+parameter+%22consumer%22.<br />\r
+</pre>\r
+<p>A fail response returns error message.</p> \r
+\r
+<h2 id="register_consumer">Request token</h2>\r
+\r
+<h3>Endpoint: </h3><p>http://server-cname/oauth/request_token.php</p>\r
+<h3>Parameters</h3><br />\r
+<p>Both GET or POST method are supported.</p>\r
+\r
+<table class="data" rules="all">\r
+<tbody><tr>\r
+<th>Parameter</th><th>Description</th><th>Default value</th>\r
+</tr>\r
+\r
+<tr>\r
+  <th>oauth_consumer_key</th>\r
+  <td>Required. The consumer key.</td>\r
+  <td>None</td>\r
+</tr>\r
+\r
+<tr>\r
+  <th>oauth_signature_method</th>\r
+  <td>Required. The signature method the Consumer used to sign the request.</td>\r
+  <td>None. <br /> Or, One of these values: HMAC-SHA1, RSA-SHA1, and PLAINTEXT.</td>\r
+</tr>\r
+\r
+<tr>\r
+  <th>oauth_signature</th>\r
+  <td>Required. The signature as defined in <a href="http://oauth.net/core/1.0#signing_process">Signing Requests</a>.</td>\r
+  <td>None</td>\r
+</tr>\r
+\r
+<tr>\r
+  <th>oauth_timestamp</th>\r
+  <td>Required. As defined in <a href="http://oauth.net/core/1.0#nonce">Nonce and Timestamp</a>.</td>\r
+  <td>None</td>\r
+</tr>\r
+\r
+<tr>\r
+  <th>oauth_nonce</th>\r
+  <td>Required. As defined in <a href="http://oauth.net/core/1.0#nonce">Nonce and Timestamp</a>.</td>\r
+  <td>None</td>\r
+</tr>\r
+\r
+<tr>\r
+  <th>oauth_version</th>\r
+  <td>OPTIONAL. If present, value MUST be 1.0.</td>\r
+  <td>1.0</td>\r
+</tr>\r
+\r
+</tbody></table>\r
+<br />\r
+\r
+<h3>Example</h3><br />\r
+<span style="font-weight: bold">Request</span>\r
+<pre style="background-color:#F7F3ED;"> \r
+<?php echo AF_BASE_HREF; ?>oauth/request_token.php?oauth_consumer_key=8862a51faa12c1b1&<br />oauth_signature_method=HMAC-SHA1&oauth_signature=tVWpcskRSY34wxhv%2BP9NcgXuuGk%3D&<br />oauth_timestamp=1255524495&oauth_nonce=3e43dd6ce0e09614e79e2a4b53e124c8&oauth_version=1.0<br />\r
+</pre>\r
+\r
+<span style="font-weight:bold">Success response</span>\r
+<pre style="background-color:#F7F3ED;"> \r
+oauth_token=086cbfe90b41a7fdf9&oauth_token_secret=55e2bd8454b2f75a21<br />\r
+</pre>\r
+<p>oauth_token and oauth_token_secret are both 18 characters long.</p> \r
+\r
+<span style="font-weight:bold">Fail response</span>\r
+<pre style="background-color:#F7F3ED;"> \r
+error=Consumer+is+not+registered.<br />\r
+</pre>\r
+<p>A fail response returns error message.</p> \r
+\r
+<h2 id="authorization">Authorization</h2>\r
+\r
+<h3>Endpoint: </h3><p>http://server-cname/oauth/authorization.php</p>\r
+<h3>Parameters</h3><br />\r
+\r
+<table class="data" rules="all">\r
+<tbody><tr>\r
+<th>Parameter</th><th>Description</th><th>Default value</th>\r
+</tr>\r
+\r
+<tr>\r
+  <th>oauth_token</th>\r
+  <td>Required. The Request Token obtained in the previous step.</td>\r
+  <td>None</td>\r
+</tr>\r
+\r
+<tr>\r
+  <th>oauth_callback</th>\r
+  <td>Optional. The Consumer MAY specify a URL the Service Provider will use to redirect the User \r
+  back to the Consumer when <a href="http://oauth.net/core/1.0#auth_step2">Obtaining User Authorization</a> \r
+  is complete. If this parameter was not given or empty, the message "User is authenticated successfully" \r
+  will be displayed as success response.</td>\r
+  <td>0</td>\r
+</tr>\r
+\r
+</tbody></table>\r
+<br />\r
+\r
+<h3>Example</h3><br />\r
+<span style="font-weight: bold">Request</span>\r
+<pre style="background-color:#F7F3ED;"> \r
+<?php echo AF_BASE_HREF; ?>oauth/authorization.php?oauth_token=086cbfe90b41a7fdf9&oauth_callback=<?php echo urlencode(AF_BASE_HREF);?><br />\r
+</pre>\r
+\r
+<span style="font-weight:bold">Success response</span>\r
+<p>Redirect the User back to the URL specified in oauth_callback. If oauth_callback is not given or empty, the message \r
+"User is authenticated successfully" will be displayed.</p> \r
+\r
+<span style="font-weight:bold">Fail response</span>\r
+<pre style="background-color:#F7F3ED;"> \r
+error=Empty+oauth+token.<br />\r
+</pre>\r
+<p>A fail response returns error message.</p> \r
+\r
+<h2 id="register_consumer">Access token</h2>\r
+\r
+<h3>Endpoint: </h3><p>http://server-cname/oauth/access_token.php</p>\r
+<h3>Parameters</h3><br />\r
+\r
+<table class="data" rules="all">\r
+<tbody><tr>\r
+<th>Parameter</th><th>Description</th><th>Default value</th>\r
+</tr>\r
+\r
+<tr>\r
+  <th>oauth_consumer_key</th>\r
+  <td>Required. The consumer key.</td>\r
+  <td>None</td>\r
+</tr>\r
+\r
+<tr>\r
+  <th>oauth_token</th>\r
+  <td>Required. The Request Token obtained previously.</td>\r
+  <td>None.</td>\r
+</tr>\r
+\r
+<tr>\r
+  <th>oauth_signature_method</th>\r
+  <td>Required. The signature method the Consumer used to sign the request.</td>\r
+  <td>None. <br /> Or, One of these values: HMAC-SHA1, RSA-SHA1, and PLAINTEXT.</td>\r
+</tr>\r
+\r
+<tr>\r
+  <th>oauth_signature</th>\r
+  <td>Required. The signature as defined in <a href="http://oauth.net/core/1.0#signing_process">Signing Requests</a>.</td>\r
+  <td>None</td>\r
+</tr>\r
+\r
+<tr>\r
+  <th>oauth_timestamp</th>\r
+  <td>Required. As defined in <a href="http://oauth.net/core/1.0#nonce">Nonce and Timestamp</a>.</td>\r
+  <td>None</td>\r
+</tr>\r
+\r
+<tr>\r
+  <th>oauth_nonce</th>\r
+  <td>Required. As defined in <a href="http://oauth.net/core/1.0#nonce">Nonce and Timestamp</a>.</td>\r
+  <td>None</td>\r
+</tr>\r
+\r
+<tr>\r
+  <th>oauth_version</th>\r
+  <td>OPTIONAL. If present, value MUST be 1.0.</td>\r
+  <td>1.0</td>\r
+</tr>\r
+\r
+</tbody></table>\r
+<br />\r
+\r
+<h3>Example</h3><br />\r
+<span style="font-weight: bold">Request</span>\r
+<pre style="background-color:#F7F3ED;"> \r
+<?php echo AF_BASE_HREF; ?>oauth/access_token.php?oauth_consumer_key=8862a51faa12c1b1&oauth_token=086cbfe90b41a7fdf9&\r
+oauth_signature_method=HMAC-SHA1&oauth_signature=tVWpcskRSY34wxhv%2BP9NcgXuuGk%3D&oauth_timestamp=1255524495&\r
+oauth_nonce=3e43dd6ce0e09614e79e2a4b53e124c8&oauth_version=1.0<br />\r
+</pre>\r
+\r
+<span style="font-weight:bold">Success response</span>\r
+<pre style="background-color:#F7F3ED;"> \r
+oauth_token=086cbfe90b41a7fdf9&oauth_token_secret=55e2bd8454b2f75a21<br />\r
+</pre>\r
+<p>oauth_token and oauth_token_secret are both 18 characters long.</p> \r
+\r
+<span style="font-weight:bold">Fail response</span>\r
+<pre style="background-color:#F7F3ED;"> \r
+error=Invalid+oauth+request+token.<br />\r
+</pre>\r
+<p>A fail response returns error message.</p> \r
+\r
+<?php include(AF_INCLUDE_PATH.'footer.inc.php'); ?>\r
diff --git a/docs/documentation/print.php b/docs/documentation/print.php
new file mode 100644 (file)
index 0000000..b733e5d
--- /dev/null
@@ -0,0 +1,59 @@
+<?php 
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', '../include/');
+include(AF_INCLUDE_PATH.'vitals.inc.php');
+include(AF_INCLUDE_PATH.'handbook_pages.inc.php');
+
+global $handbook_pages, $_pages;
+
+if (isset($_GET['p'])) {
+       $this_page = htmlentities($_GET['p']);
+} else {
+       $this_page = 'index.php';
+} 
+
+function print_handbook($handbook_pages)
+{
+       global $_pages;
+       
+       foreach ($handbook_pages as $page_key => $page_value) 
+       {
+               if (is_array($page_value)) 
+               {
+                       if (isset($_pages[$page_key]))
+                       {
+                               echo _AT($_pages[$page_key]['guide'])."<br /><br />";
+                               print_handbook($page_value);
+                       }
+               } 
+               else if (isset($_pages[$page_value]))
+               {
+                       echo _AT($_pages[$page_value]['guide'])."<br /><br />";
+               }
+       }
+}
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="<?php echo DEFAULT_LANGUAGE_CODE; ?>">
+<head>
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+       <title><?php echo _AT('doc_title'); ?></title>
+       <link rel="stylesheet" href="styles.css" type="text/css" />
+</head>
+<body>
+
+<a href="index.php?p=<?php echo $this_page; ?>"><?php echo _AT('back_to_chapters'); ?></a><br /><br />
+
+<?php print_handbook($handbook_pages); ?>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/documentation/search.php b/docs/documentation/search.php
new file mode 100644 (file)
index 0000000..52dfccc
--- /dev/null
@@ -0,0 +1,123 @@
+<?php \r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(AF_INCLUDE_PATH.'handbook_pages.inc.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/LanguageTextDAO.class.php');\r
+\r
+?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
+<html lang="<?php if ($missing_lang) { echo DEFAULT_LANGUAGE_CODE; } else { echo $req_lang; } ?>">\r
+<head>\r
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+       <title><?php echo _AT('AFrame_documentation'); ?></title>\r
+       <base target="body" />\r
+<style>\r
+body { font-family: Verdana,Arial,sans-serif; font-size: x-small; margin: 0px; padding: 0px; background: #fafafa; margin-left: -5px; }\r
+ul, ol { list-style: none; padding-left: 0px; margin-left: -15px; }\r
+li { margin-left: 19pt; padding-top: 2px; }\r
+a { background-repeat: no-repeat; background-position: 0px 1px; padding-left: 12px; text-decoration: none; }\r
+a.tree { background-image: url('../images/folder.gif'); }\r
+a.leaf { background-image: url('../images/paper.gif'); }\r
+a:link, a:visited { color: #006699; }\r
+a:hover { color: #66AECC; }\r
+</style>\r
+</head>\r
+<body>\r
+<?php\r
+echo '<a href="frame_toc.php" target="_self">';\r
+echo _AT('back_to_contents');\r
+echo '</a>';\r
+\r
+if ($_GET['query']) {\r
+       $_GET['query'] = str_replace(',', ' ', $_GET['query']);\r
+       $_GET['query'] = str_replace('"', '', $_GET['query']);\r
+\r
+       if (strlen($_GET['query']) > 3) {\r
+               $_GET['query'] = strtolower($_GET['query']);\r
+\r
+               $search_terms = explode(' ', $_GET['query']);\r
+\r
+               $results = array();\r
+\r
+               $languageTextDAO = new LanguageTextDAO();\r
+               \r
+               $final_match_rows = array();\r
+               foreach ($search_terms as $term)\r
+               {\r
+                       $match_rows = $languageTextDAO->getHelpByMatchingText($term, $_SESSION['lang']);\r
+\r
+                       if (is_array($match_rows)) $final_match_rows = array_merge($final_match_rows, $match_rows);\r
+               }\r
+\r
+               if (is_array($final_match_rows)) \r
+               {\r
+                       foreach ($final_match_rows as $match) \r
+                       {\r
+                               if (is_array($result)) \r
+                                       $all_match_terms = array_keys($result);\r
+                               else \r
+                                       $all_match_terms = array(); \r
+\r
+                               if (!in_array($match['term'], $all_match_terms))\r
+                               { \r
+                                       $count = 0;\r
+       \r
+                                       $contents = strtolower($match['text']);\r
+       \r
+                                       foreach ($search_terms as $term) \r
+                                       {\r
+                                               $term = trim($term);\r
+                                               if ($term) {\r
+                                                       $count += substr_count($contents, $term);\r
+                                               }\r
+                                       }\r
+       \r
+                                       if ($count) \r
+                                       {\r
+                                               $results[$match['term']] = $count;\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+\r
+               // replace term in match array with script name\r
+               if ($results) \r
+               {\r
+                       arsort($results);\r
+                       \r
+                       echo '<ol>';\r
+                       foreach ($results as $term => $count) \r
+                       {\r
+                               foreach ($_pages as $this_page => $page_def)\r
+                               {\r
+                                       if (strcmp($page_def['guide'], $term) == 0)\r
+                                               echo '<li><a href="frame_content.php?p='.$this_page.'" class="leaf" target="body">'._AT($page_def['title_var']).'</a></li>';\r
+                               }\r
+\r
+                       }\r
+                       echo '</ol>';\r
+               } else {\r
+                       echo '<p style="padding: 8px;">';\r
+                       echo _AT('no_results_found');\r
+                       echo '</p>';\r
+               }\r
+       } else {\r
+               echo '<p style="padding: 8px;">';\r
+               echo _AT('search_term_longer_3_chars');\r
+               echo '</p>';\r
+       }\r
+}\r
+?>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/docs/documentation/web_service_api.php b/docs/documentation/web_service_api.php
new file mode 100644 (file)
index 0000000..25533d2
--- /dev/null
@@ -0,0 +1,23 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include(AF_INCLUDE_PATH.'header.inc.php');\r
+?>\r
+<div class="output-form" style="line-height:150%">\r
+\r
+<h1>AFrame Web Service API</h1>\r
+<p>Interface applications with the AFrame through its experimental API. This is version 0.1, dated Mar 2009.</p>\r
+<p>[Your content here.]</p>\r
+<?php include(AF_INCLUDE_PATH.'footer.inc.php'); ?>\r
diff --git a/docs/home/index.php b/docs/home/index.php
new file mode 100644 (file)
index 0000000..72d0d8f
--- /dev/null
@@ -0,0 +1,17 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+require(AF_INCLUDE_PATH.'vitals.inc.php');\r
+\r
+$savant->display('home/index.tmpl.php');\r
+?>
\ No newline at end of file
diff --git a/docs/images/arrow-closed.png b/docs/images/arrow-closed.png
new file mode 100644 (file)
index 0000000..8b76f9d
Binary files /dev/null and b/docs/images/arrow-closed.png differ
diff --git a/docs/images/arrow-open.png b/docs/images/arrow-open.png
new file mode 100644 (file)
index 0000000..d9474ca
Binary files /dev/null and b/docs/images/arrow-open.png differ
diff --git a/docs/images/atrclogo.gif b/docs/images/atrclogo.gif
new file mode 100644 (file)
index 0000000..7b811fe
Binary files /dev/null and b/docs/images/atrclogo.gif differ
diff --git a/docs/images/bad.gif b/docs/images/bad.gif
new file mode 100644 (file)
index 0000000..80a2e7b
Binary files /dev/null and b/docs/images/bad.gif differ
diff --git a/docs/images/calendar.gif b/docs/images/calendar.gif
new file mode 100644 (file)
index 0000000..dc1f31c
Binary files /dev/null and b/docs/images/calendar.gif differ
diff --git a/docs/images/check.gif b/docs/images/check.gif
new file mode 100644 (file)
index 0000000..14834e9
Binary files /dev/null and b/docs/images/check.gif differ
diff --git a/docs/images/clr.gif b/docs/images/clr.gif
new file mode 100644 (file)
index 0000000..758ed52
Binary files /dev/null and b/docs/images/clr.gif differ
diff --git a/docs/images/double.png b/docs/images/double.png
new file mode 100644 (file)
index 0000000..cc7be7a
Binary files /dev/null and b/docs/images/double.png differ
diff --git a/docs/images/error.png b/docs/images/error.png
new file mode 100644 (file)
index 0000000..0f657fb
Binary files /dev/null and b/docs/images/error.png differ
diff --git a/docs/images/feedback.gif b/docs/images/feedback.gif
new file mode 100644 (file)
index 0000000..e285230
Binary files /dev/null and b/docs/images/feedback.gif differ
diff --git a/docs/images/folder.gif b/docs/images/folder.gif
new file mode 100644 (file)
index 0000000..e4802fb
Binary files /dev/null and b/docs/images/folder.gif differ
diff --git a/docs/images/header.jpg b/docs/images/header.jpg
new file mode 100644 (file)
index 0000000..07d792c
Binary files /dev/null and b/docs/images/header.jpg differ
diff --git a/docs/images/info.png b/docs/images/info.png
new file mode 100644 (file)
index 0000000..c19fa8b
Binary files /dev/null and b/docs/images/info.png differ
diff --git a/docs/images/logo.png b/docs/images/logo.png
new file mode 100644 (file)
index 0000000..1b59298
Binary files /dev/null and b/docs/images/logo.png differ
diff --git a/docs/images/paper.gif b/docs/images/paper.gif
new file mode 100644 (file)
index 0000000..3e8a06d
Binary files /dev/null and b/docs/images/paper.gif differ
diff --git a/docs/images/warning.png b/docs/images/warning.png
new file mode 100644 (file)
index 0000000..974abf6
Binary files /dev/null and b/docs/images/warning.png differ
diff --git a/docs/include/classes/DAO/ConfigDAO.class.php b/docs/include/classes/DAO/ConfigDAO.class.php
new file mode 100644 (file)
index 0000000..f69bb6f
--- /dev/null
@@ -0,0 +1,95 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* DAO for "config" table
+* @access      public
+* @author      Cindy Qi Li
+* @package     DAO
+*/
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class ConfigDAO extends DAO {
+
+       /**
+       * Insert a new config row
+       * @access  public
+       * @param   name, value
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function Create($name, $value)
+       {
+           $sql = "INSERT INTO ".TABLE_PREFIX."config (name, value)
+                   VALUES ('".$name."', '".$value."')";
+           return $this->execute($sql);
+       }
+       
+       /**
+       * Update a config row
+       * @access  public
+       * @param   name, value
+       * @return  true or false
+       * @author  Cindy Qi Li
+       */
+       function Replace($name, $value)
+       {
+           $sql = "REPLACE INTO ".TABLE_PREFIX."config 
+                    VALUES ('".$name."', '".$value."')";
+           return $this->execute($sql);
+       }
+       
+       /**
+       * Delete a config row
+       * @access  public
+       * @param   name
+       * @return  true or false
+       * @author  Cindy Qi Li
+       */
+       function Delete($name)
+       {
+           $sql = "DELETE FROM ".TABLE_PREFIX."config 
+                    WHERE name = '".$name."'";
+           return $this->execute($sql);
+       }
+       
+       /**
+       * Return all config' information
+       * @access  public
+       * @param   none
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getAll()
+       {
+           $sql = 'SELECT * FROM '.TABLE_PREFIX.'config ORDER BY name';
+           return $this->execute($sql);
+       }
+
+       /**
+       * Return a config row by name
+       * @access  public
+       * @param   name
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function get($name)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."config WHERE name = '".$name."'";
+           $rows = $this->execute($sql);
+           return $rows[0];
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/DAO.class.php b/docs/include/classes/DAO/DAO.class.php
new file mode 100644 (file)
index 0000000..8f0123c
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* Root data access object
+* Each table has a DAO class, all inherits from this class
+* @access      public
+* @author      Cindy Qi Li
+* @package     DAO
+*/
+
+class DAO {
+
+       // private
+       static private $db;     // global database connection
+       
+       function DAO()
+       {
+               if (!isset($this->db))
+               {
+                       $this->db = @mysql_connect(DB_HOST . ':' . DB_PORT, DB_USER, DB_PASSWORD);
+                       if (!$this->db) {
+                               die('Unable to connect to db.');
+                       }
+                       if (!@mysql_select_db(DB_NAME, $this->db)) {
+                               die('DB connection established, but database "'.DB_NAME.'" cannot be selected.');
+                       }
+               }
+       }
+       
+       /**
+       * Execute SQL
+       * @access  protected
+       * @param   $sql : SQL statment to be executed
+       * @return  $rows: for 'select' sql, return retrived rows, 
+       *          true:  for non-select sql
+       *          false: if fail
+       * @author  Cindy Qi Li
+       */
+       function execute($sql)
+       {
+//             debug($sql);
+               $sql = trim($sql);
+               $result = mysql_query($sql, $this->db) or die($sql . "<br />". mysql_error());
+
+               // for 'select' SQL, return retrieved rows
+               if (strtolower(substr($sql, 0, 6)) == 'select' && mysql_num_rows($result) > 0) 
+               {
+                       for($i = 0; $i < mysql_num_rows($result); $i++) 
+                       {
+                               $rows[] = mysql_fetch_assoc($result);
+                       }
+                       mysql_free_result($result);
+                       return $rows;
+               }
+               else
+                       return true;
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/LangCodesDAO.class.php b/docs/include/classes/DAO/LangCodesDAO.class.php
new file mode 100644 (file)
index 0000000..7ac202c
--- /dev/null
@@ -0,0 +1,102 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* DAO for "lang_codes" table
+* @access      public
+* @author      Cindy Qi Li
+* @package     DAO
+*/
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class LangCodesDAO extends DAO {
+
+       /**
+       * Return all rows
+       * @access  public
+       * @param   none
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       public function GetAll()
+       {
+               $sql = "SELECT * FROM ". TABLE_PREFIX ."lang_codes ORDER BY description";
+               
+               return $this->execute($sql);
+       }
+       
+       /**
+       * Return lang code info of the given 2 letters code
+       * @access  public
+       * @param   $code : 2 letters code
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       public function GetLangCodeBy2LetterCode($code)
+       {
+               $sql = "SELECT * FROM ". TABLE_PREFIX ."lang_codes 
+                                       WHERE code_2letters = '".$code ."'";
+               
+               return $this->execute($sql);
+       }
+
+       /**
+       * Return lang code info of the given 3 letters code
+       * @access  public
+       * @param   $code : 3 letters code
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       public function GetLangCodeBy3LetterCode($code)
+       {
+               $sql = "SELECT * FROM ". TABLE_PREFIX ."lang_codes 
+                                       WHERE code_3letters = '".$code ."'";
+               
+               if ($rows = $this->execute($sql))
+               {
+                       return $rows[0];
+               }
+               else
+                       return false;
+       }
+
+       /**
+       * Return array of all the 2-letter & 3-letter language codes with given direction
+       * @access  public
+       * @param   $direction : 'rtl' or 'ltr'
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       public function GetLangCodeByDirection($direction)
+       {
+               $rtn_array = array();
+               $sql = "SELECT * FROM ". TABLE_PREFIX ."lang_codes 
+                                       WHERE direction = '".$direction ."'";
+               
+               $rows = $this->execute($sql);
+               
+               if (is_array($rows))
+               {
+                       foreach ($rows as $row)
+                       {
+                               array_push($rtn_array, $row['code_3letters']);
+                               array_push($rtn_array, $row['code_2letters']);
+                       }
+               }
+               return $rtn_array;
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/LanguageTextDAO.class.php b/docs/include/classes/DAO/LanguageTextDAO.class.php
new file mode 100644 (file)
index 0000000..d172e9b
--- /dev/null
@@ -0,0 +1,217 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* DAO for "language_text" table
+* @access      public
+* @author      Cindy Qi Li
+* @package     DAO
+*/
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class LanguageTextDAO extends DAO {
+
+       /**
+       * Create a new entry
+       * @access  public
+       * @param   $language_code : language code
+       *          $variable: '_msgs', '_template', '_check', '_guideline', '_test'
+       *          $term
+       *          $text
+       *          $context
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function Create($language_code, $variable, $term, $text, $context)
+       {
+               global $addslashes;
+               
+               $sql = "INSERT INTO ".TABLE_PREFIX."language_text
+                       (`language_code`, `variable`, `term`, `text`, `revised_date`, `context`)
+                       VALUES
+                       ('".$addslashes($language_code)."', 
+                        '".$addslashes($variable)."', 
+                        '".$addslashes($term)."', 
+                        '".$addslashes($text)."', 
+                        now(), 
+                        '".$addslashes($context)."')";
+
+               return $this->execute($sql);
+       }
+
+       /**
+       * Insert new record if not exists, replace the existing one if already exists. 
+       * Record is identified by primary key: $language_code, variable, $term
+       * @access  public
+       * @param   $language_code : language code
+       *          $variable: '_msgs', '_template', '_check', '_guideline', '_test'
+       *          $term
+       *          $text
+       *          $context
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function Replace($language_code, $variable, $term, $text, $context)
+       {
+               global $addslashes;
+               
+               $sql = "REPLACE INTO ".TABLE_PREFIX."language_text
+                       (`language_code`, `variable`, `term`, `text`, `revised_date`, `context`)
+                       VALUES
+                       ('".$addslashes($language_code)."', 
+                        '".$addslashes($variable)."', 
+                        '".$addslashes($term)."', 
+                        '".$addslashes($text)."', 
+                        now(), 
+                        '".$addslashes($context)."')";
+                       
+               return $this->execute($sql);
+       }
+       
+       /**
+       * Delete a record by $variable and $term
+       * @access  public
+       * @param   $language_code : language code
+       *          $variable: '_msgs', '_template', '_check', '_guideline', '_test'
+       *          $term
+       * @return  true / false
+       * @author  Cindy Qi Li
+       */
+       function DeleteByVarAndTerm($variable, $term)
+       {
+               global $addslashes;
+               
+               $sql = "DELETE FROM ".TABLE_PREFIX."language_text
+                       WHERE `variable` = '".$addslashes($variable)."'
+                         AND `term` = '".$addslashes($term)."'";
+                       
+               return $this->execute($sql);
+       }
+       
+       /**
+       * Return message text of given term and language
+       * @access  public
+       * @param   term : language term
+       *          lang : language code
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getMsgByTermAndLang($term, $lang)
+       {
+               $sql    = 'SELECT * FROM '.TABLE_PREFIX.'language_text 
+                                               WHERE term="' . $term . '" 
+                                               AND variable="_msgs" 
+                                               AND language_code="'.$lang.'" 
+                                               ORDER BY variable';
+
+    return $this->execute($sql);
+  }
+
+       /**
+       * Return text of given term and language
+       * @access  public
+       * @param   term : language term
+       *          lang : language code
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getByTermAndLang($term, $lang)
+       {
+               $sql    = 'SELECT * FROM '.TABLE_PREFIX.'language_text 
+                                               WHERE term="' . $term . '" 
+                                               AND language_code="'.$lang.'" 
+                                               ORDER BY variable';
+
+           return $this->execute($sql);
+       }
+
+       /**
+       * Return rows of handbook rows by matching given text and language
+       * @access  public
+       * @param   term : language term
+       *          lang : language code
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getHelpByMatchingText($text, $lang)
+       {
+               $sql    = "SELECT * FROM ".TABLE_PREFIX."language_text 
+                                               WHERE term like 'AF_HELP_%'
+                                               AND lower(cast(text as char)) like '%".strtolower($text)."%' 
+                                               AND language_code='".$lang."' 
+                                               ORDER BY variable";
+
+           return $this->execute($sql);
+       }
+
+       /**
+       * Return all template info of given language
+       * @access  public
+       * @param   lang : language code
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getAllByLang($lang)
+       {
+               $sql = "SELECT * FROM ".TABLE_PREFIX."language_text 
+                                               WHERE language_code='".$lang."' 
+                                               ORDER BY variable, term ASC";
+
+               return $this->execute($sql);
+       }
+
+       /**
+       * Return all template info of given language
+       * @access  public
+       * @param   lang : language code
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getAllTemplateByLang($lang)
+       {
+               $sql = "SELECT * FROM ".TABLE_PREFIX."language_text 
+                                               WHERE language_code='".$lang."' 
+                                               AND variable='_template' 
+                                               ORDER BY variable ASC";
+
+       return $this->execute($sql);
+       }
+
+       /**
+       * Update text based on given primary key
+       * @access  public
+       * @param   $languageCode : language_text.language_code
+       *          $variable : language_text.variable
+       *          $term : language_text.term
+       *          $text : text to update into language_text.text
+       * @return  true : if successful
+       *          false: if unsuccessful
+       * @author  Cindy Qi Li
+       */
+       function setText($languageCode, $variable, $term, $text)
+       {
+               global $addslashes;
+               
+               $sql = "UPDATE ".TABLE_PREFIX."language_text 
+                          SET text='".$addslashes($text)."',
+                              revised_date = now()
+                        WHERE language_code = '".$_SESSION['lang']."' 
+                          AND variable='".$variable."' 
+                          AND term = '".$term."'";
+
+    return $this->execute($sql);
+  }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/LanguagesDAO.class.php b/docs/include/classes/DAO/LanguagesDAO.class.php
new file mode 100644 (file)
index 0000000..57d1080
--- /dev/null
@@ -0,0 +1,221 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* DAO for "config" table
+* @access      public
+* @author      Cindy Qi Li
+* @package     DAO
+*/
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class LanguagesDAO extends DAO {
+
+       /**
+       * Insert table languages
+       * @access  public
+       * @param   $langCode, $charset, $regExp, $nativeName, $englishName, $status
+       * @return  true / false
+       * @author  Cindy Qi Li
+       */
+       function Create($langCode, $charset, $regExp, $nativeName, $englishName, $status)
+       {
+               global $languageManager, $msg;
+               
+               // check if the required fields are filled
+               if (!$this->ValidateFields($langCode, $charset, $nativeName, $englishName)) return false;
+               
+               // check if the language already exists
+               if ($languageManager->exists($langCode)) $msg->addError('LANG_EXISTS');
+               
+               if ($msg->containsErrors()) return false;
+               
+               $sql = "INSERT INTO ".TABLE_PREFIX."languages (language_code, charset, reg_exp, native_name, english_name, status) 
+                       VALUES ('".$langCode."', '".$charset."', '".$regExp."', '".$nativeName."', '".$englishName."', ".$status.")";
+               return $this->execute($sql);
+       }
+
+       /**
+       * Update a row
+       * @access  public
+       * @param   $langCode: required
+       *          $charset: required
+       * @return  true / false
+       * @author  Cindy Qi Li
+       */
+       function Update($langCode, $charset, $regExp, $nativeName, $englishName, $status)
+       {
+               // check if the required fields are filled
+               if (!$this->ValidateFields($langCode, $charset, $nativeName, $englishName)) return false;
+               
+               $sql = "UPDATE ".TABLE_PREFIX."languages 
+                          SET reg_exp='".$regExp."',
+                              native_name = '".$nativeName."',
+                              english_name = '".$englishName."',
+                              status = ".$status."
+                        WHERE language_code = '".$langCode."'
+                          AND charset = '".$charset."'";
+               return $this->execute($sql);
+       }
+
+       /**
+       * Update the given field with the given value by language_code and charset
+       * @access  public
+       * @param   $langCode
+       *          $charset
+       *          $fieldName
+       *          $fieldValue
+       * @return  true / false
+       * @author  Cindy Qi Li
+       */
+       function UpdateField($langCode, $charset, $fieldName, $fieldValue)
+       {
+               global $addslashes;
+               
+               // check if the required fields are filled
+               if ($fieldValue == '') return false;
+               
+               $sql = "UPDATE ".TABLE_PREFIX."languages 
+                          SET ".$fieldName."='".$addslashes($fieldValue)."'
+                        WHERE language_code = '".$langCode."'
+                          AND charset = '".$charset."'";
+               return $this->execute($sql);
+       }
+
+       /**
+       * Delete a row
+       * @access  public
+       * @param   $langCode
+       *          $charset
+       * @return  true / false
+       * @author  Cindy Qi Li
+       */
+       function Delete($langCode)
+       {
+               $sql = "DELETE FROM ".TABLE_PREFIX."languages 
+                        WHERE language_code = '".$langCode."'";
+               if (!$this->execute($sql)) return false;
+
+               $sql = "DELETE FROM ".TABLE_PREFIX."language_text 
+                    WHERE language_code = '".$langCode."'";
+               
+               return $this->execute($sql);
+       }
+
+       /**
+       * Return all languages
+       * @access  public
+       * @param   none
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getAll()
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."languages l
+                    ORDER BY l.native_name";
+           return $this->execute($sql);
+       }
+
+       /**
+       * Return all enabled languages
+       * @access  public
+       * @param   none
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getAllEnabled()
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."languages l
+                    WHERE status = ".AF_STATUS_ENABLED."
+                    ORDER BY l.native_name";
+           return $this->execute($sql);
+       }
+
+       /**
+       * Return language with given language code
+       * @access  public
+       * @param   $langCode
+       *          $charset
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getByLangCodeAndCharset($langCode, $charset)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."languages l
+                    WHERE l.language_code = '".$langCode."'
+                      AND l.charset='".$charset."'
+                    ORDER BY l.native_name";
+
+               if ($rows = $this->execute($sql))
+               {
+                       return $rows[0];
+               }
+       }
+
+       /**
+       * Return all languages except the ones with language code in the given string 
+       * @access  public
+       * @param   $langCode : one language codes, for example: en
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getAllExceptLangCode($langCode)
+       {
+               if (trim($langCode) == '')
+                       return $this->getAll();
+               else
+               {
+               $sql = "SELECT * FROM ".TABLE_PREFIX."languages
+                                        WHERE language_code <> '".$langCode."'
+                                ORDER BY native_name";
+                   return $this->execute($sql);
+               }
+       }
+       
+       /**
+       * Return all languages except the ones with language code in the given string 
+       * @access  public
+       * @param   $langCode : one language codes, for example: en
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function ValidateFields($langCode, $charset, $nativeName, $englishName)
+       {
+               global $msg;
+               
+               $missing_fields = array();
+
+               if ($langCode == '') {
+                       $missing_fields[] = _AT('lang_code');
+               }
+               if ($charset == '') {
+                       $missing_fields[] = _AT('charset');
+               }
+               if ($nativeName == '') {
+                       $missing_fields[] = _AT('name_in_language');
+               }
+               if ($englishName == '') {
+                       $missing_fields[] = _AT('name_in_english');
+               }
+
+               if ($missing_fields) {
+                       $missing_fields = implode(', ', $missing_fields);
+                       $msg->addError(array('EMPTY_FIELDS', $missing_fields));
+                       return false;
+               }
+               return true;
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/MailQueueDAO.class.php b/docs/include/classes/DAO/MailQueueDAO.class.php
new file mode 100644 (file)
index 0000000..53f486a
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* DAO for "mail_queue" table
+* @access      public
+* @author      Cindy Qi Li
+* @package     DAO
+*/
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class MailQueueDAO extends DAO {
+
+       /**
+       * Create a record
+       * @access  public
+       * @param   infos
+       * @return  mail_queue_id: if success
+       *          false: if unsuccess
+       * @author  Cindy Qi Li
+       */
+       function Create($to_email, $to_name, $from_email, $from_name, $subject, $body, $charset)
+       {
+               $sql = "INSERT INTO ".TABLE_PREFIX."mail_queue 
+                                               VALUES (NULL, '$to_email', '$to_name', '$from_email', '$from_name', '$charset', '$subject', '$body')";
+               
+               if ($this->execute($sql))
+               {
+                       return mysql_insert_id($this->db);
+               }
+               else
+               {
+                       return false;                   
+               }
+       }
+
+       /**
+       * Return all records
+       * @access  public
+       * @param   none
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function GetAll()
+       {
+               $sql = "SELECT * FROM ".TABLE_PREFIX."mail_queue"; 
+               
+               return $this->execute($sql);
+       }
+
+       /**
+       * Delete a record by mail ids
+       * @access  public
+       * @param   $mids : mail IDs, for example: "1, 2, 3"
+       * @return  true: if successful
+       *          false: if unsuccessful
+       * @author  Cindy Qi Li
+       */
+       function DeleteByIDs($mids)
+       {
+               $sql = "DELETE FROM ".TABLE_PREFIX."mail_queue WHERE mail_id IN (".$mids.")";
+               
+               return $this->execute($sql);
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/MyownPatchesDAO.class.php b/docs/include/classes/DAO/MyownPatchesDAO.class.php
new file mode 100644 (file)
index 0000000..8dba4a9
--- /dev/null
@@ -0,0 +1,161 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+ * DAO for "myown_patches" table
+ * @access     public
+ * @author     Cindy Qi Li
+ * @package    DAO
+ */
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class MyownPatchesDAO extends DAO {
+
+       /**
+        * Create new row
+        * @access  public
+        * @param   system_patch_id, applied_versin, description, sql_statement
+        * @return  myown_patch_id, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Create($system_patch_id, $applied_version, 
+                              $description, $sql_statement)
+       {
+               global $addslashes;
+
+               $sql = "INSERT INTO ".TABLE_PREFIX."myown_patches 
+                      (system_patch_id, 
+                       applied_version,
+                       description,
+                       sql_statement,
+                       status,
+                       last_modified)
+                       VALUES ('".$system_patch_id."', 
+                               '".$applied_version."', 
+                               '".$description."', 
+                               '".$sql_statement."', 
+                               'Created',
+                               now())";
+               
+               if (!$this->execute($sql))
+               {
+                       $msg->addError('DB_NOT_UPDATED');
+                       return false;
+               }
+               else
+               {
+                       return mysql_insert_id();
+               }
+       }
+
+       /**
+        * Update a row
+        * @access  public
+        * @param   myown_patch_id, system_patch_id, applied_versin, description, sql_statement
+        * @return  true, if successful. Otherwise, false
+        * @author  Cindy Qi Li
+        */
+       public function Update($myown_patch_id, $system_patch_id, $applied_version, 
+                              $description, $sql_statement)
+       {
+               global $addslashes;
+
+               $sql = "UPDATE ".TABLE_PREFIX."myown_patches 
+                          SET system_patch_id = '". $system_patch_id ."',
+                              applied_version = '". $applied_version ."',
+                              description = '". $description ."',
+                              sql_statement = '". $sql_statement ."',
+                              status = 'Created',
+                              last_modified = now()
+                        WHERE myown_patch_id = ". $myown_patch_id;
+       
+               return $this->execute($sql);
+       }
+
+       /**
+        * Update an existing myown_patches record
+        * @access  public
+        * @param   myownPatchID: myown_patches.myown_patch_id
+        *          fieldName: the name of the table field to update
+        *          fieldValue: the value to update
+        * @return  true if successful
+        *          error message array if failed; false if update db failed
+        * @author  Cindy Qi Li
+        */
+       public function UpdateField($myownPatchID, $fieldName, $fieldValue)
+       {
+               global $addslashes;
+
+               // check if the required fields are filled
+               if (($fieldName == 'system_patch_id' || $fieldName == 'applied_version') && $fieldValue == '')
+                       return array(_AT('AF_ERROR_EMPTY_FIELD'));
+
+               $sql = "UPDATE ".TABLE_PREFIX."myown_patches 
+                          SET ".$fieldName."='".$addslashes($fieldValue)."'
+                        WHERE myown_patch_id = ".$myownPatchID;
+               
+               return $this->execute($sql);
+       }
+       
+       /**
+        * Delete a patch
+        * @access  public
+        * @param   patchID
+        * @return  true, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Delete($patchID)
+       {
+               $sql = "DELETE FROM ".TABLE_PREFIX."myown_patches
+                        WHERE myown_patch_id = ".$patchID;
+
+               return $this->execute($sql);
+       }
+
+       /**
+        * Return all my own patches
+        * @access  public
+        * @param   none
+        * @return  all table rows
+        * @author  Cindy Qi Li
+        */
+       public function getAll()
+       {
+               $sql = "SELECT * from ".TABLE_PREFIX."myown_patches m order by last_modified desc";
+               
+               return $this->execute($sql);
+       }
+
+       /**
+        * Return the patch info with the given patch id
+        * @access  public
+        * @param   $patchID
+        * @return  patch row
+        * @author  Cindy Qi Li
+        */
+       public function getByID($patchID)
+       {
+               $sql = "SELECT * from ".TABLE_PREFIX."myown_patches where myown_patch_id=". $patchID;
+               
+               $rows = $this->execute($sql);
+               
+               if (is_array($rows)) return $rows[0];
+               else return false;
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/MyownPatchesDependentDAO.class.php b/docs/include/classes/DAO/MyownPatchesDependentDAO.class.php
new file mode 100644 (file)
index 0000000..2978925
--- /dev/null
@@ -0,0 +1,86 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+ * DAO for "myown_patches_dependent" table
+ * @access     public
+ * @author     Cindy Qi Li
+ * @package    DAO
+ */
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class MyownPatchesDependentDAO extends DAO {
+
+       /**
+        * Create new patch
+        * @access  public
+        * @param   myown_patch_id, dependent_patch_id
+        * @return  myown_patches_dependent_id, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Create($myown_patch_id, $dependent_patch_id)
+       {
+               $sql = "INSERT INTO ".TABLE_PREFIX."myown_patches_dependent 
+               (myown_patch_id, 
+                dependent_patch_id)
+               VALUES ('".$myown_patch_id."', 
+                       '".$dependent_patch_id."')";
+               
+               if (!$this->execute($sql))
+               {
+                       $msg->addError('DB_NOT_UPDATED');
+                       return false;
+               }
+               else
+               {
+                       return mysql_insert_id();
+               }
+       }
+
+       /**
+        * Delete rows by given patch id
+        * @access  public
+        * @param   patchID
+        * @return  true, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function DeleteByPatchID($patchID)
+       {
+               $sql = "DELETE FROM ".TABLE_PREFIX."myown_patches_dependent
+                        WHERE myown_patch_id = ".$patchID;
+
+               return $this->execute($sql);
+       }
+
+       /**
+        * Return the patch dependent info with the given patch id
+        * @access  public
+        * @param   $patchID
+        * @return  patch row
+        * @author  Cindy Qi Li
+        */
+       public function getByPatchID($patchID)
+       {
+               $sql = "SELECT * from ".TABLE_PREFIX."myown_patches_dependent
+                        WHERE myown_patch_id=". $patchID." 
+                        ORDER BY dependent_patch_id";
+               
+               return $this->execute($sql);
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/MyownPatchesFilesDAO.class.php b/docs/include/classes/DAO/MyownPatchesFilesDAO.class.php
new file mode 100644 (file)
index 0000000..6a8943e
--- /dev/null
@@ -0,0 +1,139 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+ * DAO for "myown_patches_files" table
+ * @access     public
+ * @author     Cindy Qi Li
+ * @package    DAO
+ */
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class MyownPatchesFilesDAO extends DAO {
+
+       /**
+        * Create new row
+        * @access  public
+        * @param   $myown_patch_id, $action, $name, $location,
+        *          $code_from, $code_to, $uploaded_file
+        * @return  myown_patches_files_id, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Create($myown_patch_id, $action, $name, $location,
+                              $code_from, $code_to, $uploaded_file)
+       {
+               global $addslashes;
+
+               $sql = "INSERT INTO ".TABLE_PREFIX."myown_patches_files
+               (myown_patch_id, 
+                       action,
+                       name,
+                       location,
+                       code_from,
+                code_to,
+                uploaded_file)
+               VALUES ('".$myown_patch_id."', 
+                       '".$action."', 
+                       '".$name."', 
+                       '".$location."', 
+                       '".$code_from."', 
+                       '".$code_to."',
+                       '".$addslashes($uploaded_file)."')";
+               
+               if (!$this->execute($sql))
+               {
+                       $msg->addError('DB_NOT_UPDATED');
+                       return false;
+               }
+               else
+               {
+                       return mysql_insert_id();
+               }
+       }
+
+       /**
+        * Create new user
+        * @access  public
+        * @param   user_group_id: user group ID (1 [admin] or 2 [user])
+        *          login: login name
+        *          pwd: password
+        *          email: email
+        *          first_name: first name
+        *          last_name: last name
+        * @return  user id, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Update($userID, $user_group_id, $login, $email, $first_name, $last_name, $status)
+       {
+               global $addslashes, $msg;
+
+               /* email check */
+               $login = $addslashes(strtolower(trim($login)));
+               $email = $addslashes(trim($email));
+               $first_name = $addslashes(str_replace('<', '', trim($first_name)));
+               $last_name = $addslashes(str_replace('<', '', trim($last_name)));
+
+               if ($this->isFieldsValid('update', $user_group_id,$login, $email,$first_name, $last_name))
+               {
+                       /* insert into the db */
+                       $sql = "UPDATE ".TABLE_PREFIX."users
+                                  SET login = '".$login."',
+                                      user_group_id = '".$user_group_id."',
+                                      first_name = '".$first_name."',
+                                      last_name = '".$last_name."',
+                                      email = '".$email."',
+                                      status = '".$status."'
+                                WHERE user_id = ".$userID;
+
+                       return $this->execute($sql);
+               }
+       }
+
+       /**
+        * Delete rows by given patch id
+        * @access  public
+        * @param   patchID
+        * @return  true, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function DeleteByPatchID($patchID)
+       {
+               $sql = "DELETE FROM ".TABLE_PREFIX."myown_patches_files
+                        WHERE myown_patch_id = ".$patchID;
+               
+               return $this->execute($sql);
+       }
+
+       /**
+        * Return the patch files info with the given patch id
+        * @access  public
+        * @param   $patchID
+        * @return  patch row
+        * @author  Cindy Qi Li
+        */
+       public function getByPatchID($patchID)
+       {
+               $sql = "SELECT * from ".TABLE_PREFIX."myown_patches_files
+                        WHERE myown_patch_id=". $patchID."
+                        ORDER BY myown_patches_files_id";
+               
+               return $this->execute($sql);
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/OAuthClientServersDAO.class.php b/docs/include/classes/DAO/OAuthClientServersDAO.class.php
new file mode 100644 (file)
index 0000000..6d07084
--- /dev/null
@@ -0,0 +1,185 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* DAO for "oauth_client_servers" table
+* @access      public
+* @author      Cindy Qi Li
+* @package     DAO
+*/
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(AF_INCLUDE_PATH. 'classes/Utility.class.php');
+
+class OAuthClientServersDAO extends DAO {
+
+       /**
+        * Create a new oauth server record
+        * @access  public
+        * @param   server
+        *          consumer key
+        *          consumer secret
+        *          expire threshold
+        * @return  server id, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Create($oauth_server, $consumer_key, $consumer_secret, $expire_threshold)
+       {
+               global $addslashes, $msg;
+
+               $missing_fields = array();
+
+               /* email check */
+               $oauth_server = $addslashes(trim($oauth_server));
+               $expire_threshold = intval($expire_threshold);
+
+               /* login name check */
+               if ($oauth_server == '')
+               {
+                       $missing_fields[] = _AT('oauth_server');
+               }
+
+               if ($missing_fields)
+               {
+                       $missing_fields = implode(', ', $missing_fields);
+                       $msg->addError(array('EMPTY_FIELDS', $missing_fields));
+               }
+
+               if (!$msg->containsErrors())
+               {
+                       /* insert into the db */
+                       $oauth_server_key = Utility::getRandomStr(16);
+                       $oauth_server_secret = Utility::getRandomStr(16);
+                       
+                       $sql = "INSERT INTO ".TABLE_PREFIX."oauth_client_servers
+                                     (oauth_server,
+                                      consumer_key,
+                                      consumer_secret,
+                                      expire_threshold,
+                                      create_date
+                                      )
+                              VALUES ('".$oauth_server."',
+                                      '".$consumer_key."',
+                                      '".$consumer_secret."',
+                                      ".$expire_threshold.",
+                                      now()
+                                     )";
+
+                       if (!$this->execute($sql))
+                       {
+                               $msg->addError('DB_NOT_UPDATED');
+                               return false;
+                       }
+                       else
+                       {
+                               return mysql_insert_id();
+                       }
+               }
+               else
+               {
+                       return false;
+               }
+       }
+
+       /**
+        * update an existing oauth server record
+        * @access  public
+        * @param   server
+        *          consumer key
+        *          consumer secret
+        *          expire threshold
+        * @return  true, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Update($oauth_server, $consumer_key, $consumer_secret, $expire_threshold)
+       {
+               global $addslashes, $msg;
+
+               $missing_fields = array();
+
+               /* email check */
+               $oauth_server = $addslashes(trim($oauth_server));
+               $expire_threshold = intval($expire_threshold);
+
+               /* login name check */
+               if ($oauth_server == '')
+               {
+                       $missing_fields[] = _AT('oauth_server');
+               }
+
+               if ($missing_fields)
+               {
+                       $missing_fields = implode(', ', $missing_fields);
+                       $msg->addError(array('EMPTY_FIELDS', $missing_fields));
+               }
+
+               if (!$msg->containsErrors())
+               {
+                       /* insert into the db */
+                       $oauth_server_key = Utility::getRandomStr(16);
+                       $oauth_server_secret = Utility::getRandomStr(16);
+                       
+                       $sql = "UPDATE ".TABLE_PREFIX."oauth_client_servers
+                                  SET consumer_key = '".$consumer_key."',
+                                      consumer_secret = '".$consumer_secret."',
+                                      expire_threshold = ".$expire_threshold."
+                                WHERE oauth_server = '".$oauth_server."'";
+
+                       if (!$this->execute($sql))
+                       {
+                               $msg->addError('DB_NOT_UPDATED');
+                               return false;
+                       }
+                       else
+                       {
+                               return true;
+                       }
+               }
+               else
+               {
+                       return false;
+               }
+       }
+
+       /**
+       * Return row by oauth server ID
+       * @access  public
+       * @param   $oauth_server_id
+       * @return  table row
+       * @author  Cindy Qi Li
+       */
+       function get($oauth_server_id)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."oauth_client_servers WHERE oauth_server_id='".$oauth_server_id."'";
+           $rows = $this->execute($sql);
+           return $rows[0];
+       }
+
+       /**
+       * Return row by oauth server name
+       * @access  public
+       * @param   $oauth_server
+       * @return  table row
+       * @author  Cindy Qi Li
+       */
+       function getByOauthServer($oauth_server)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."oauth_client_servers WHERE oauth_server='".$oauth_server."'";
+           return $this->execute($sql);
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/OAuthClientTokensDAO.class.php b/docs/include/classes/DAO/OAuthClientTokensDAO.class.php
new file mode 100644 (file)
index 0000000..74fcb12
--- /dev/null
@@ -0,0 +1,162 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* DAO for "oauth_client_tokens" table
+* @access      public
+* @author      Cindy Qi Li
+* @package     DAO
+*/
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class OAuthClientTokensDAO extends DAO {
+
+       /**
+        * Create a new token
+        * @access  public
+        * @param   token type
+        *          token
+        *          token secret
+        * @return  token id, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Create($oauth_server_id, $token, $token_type, $token_secret, $user_id)
+       {
+               global $addslashes, $msg;
+
+               $missing_fields = array();
+
+               /* token type check */
+               if ($token_type <> 'request' && $token_type <> 'access')
+               {
+                       $msg->addError('INVALID_TOKEN_TYPE');
+               }
+
+               if (!$msg->containsErrors())
+               {
+                       /* insert into the db */
+                       $sql = "INSERT INTO ".TABLE_PREFIX."oauth_client_tokens
+                                     (oauth_server_id,
+                                      token,
+                                      token_type,
+                                      token_secret,
+                                      user_id,
+                                      assign_date
+                                      )
+                              VALUES (".$oauth_server_id.",
+                                      '".$token."',
+                                      '".$token_type."',
+                                      '".$token_secret."',
+                                      ".$user_id.",
+                                      now()
+                                     )";
+
+                       if (!$this->execute($sql))
+                       {
+                               $msg->addError('DB_NOT_UPDATED');
+                               return false;
+                       }
+                       else
+                       {
+                               return true;
+                       }
+               }
+               else
+               {
+                       return false;
+               }
+       }
+
+       /**
+       * Delete token row by token, token_type
+       * @access  public
+       * @param   $token, $token_type
+       * @return  true if successful, otherwise, return false
+       * @author  Cindy Qi Li
+       */
+       function deleteByTokenAndType($token, $token_type)
+       {
+           $sql = "DELETE FROM ".TABLE_PREFIX."oauth_client_tokens 
+                    WHERE token = '".$token."'
+                      AND token_type = '".$token_type."'";
+           return $this->execute($sql);
+       }
+
+       /**
+       * Return row by consumer
+       * @access  public
+       * @param   $oauth_server_id, $token_type
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function get($oauth_server_id, $token_type)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."oauth_client_tokens 
+                    WHERE oauth_server_id='".$oauth_server_id."'
+                      AND token_type='".$token_type."'";
+           return $this->execute($sql);
+       }
+
+       /**
+       * Return token row by consumer key, token type, token
+       * @access  public
+       * @param   $consumer_key, $token_type, $token
+       * @return  table rows if successful, otherwise, return false
+       * @author  Cindy Qi Li
+       */
+       function getByToken($consumer_key, $token)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."oauth_client_servers c, ".TABLE_PREFIX."oauth_client_tokens t 
+                    WHERE c.oauth_server_id = t.oauth_server_id
+                      AND c.consumer_key='".$consumer_key."'
+                      AND t.token = '".$token."'";
+           return $this->execute($sql);
+       }
+
+       /**
+       * Return token row by token, token_type
+       * @access  public
+       * @param   $token, $token_type
+       * @return  table rows if successful, otherwise, return false
+       * @author  Cindy Qi Li
+       */
+       function getByTokenAndType($token, $token_type)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."oauth_client_tokens 
+                    WHERE token = '".$token."'
+                      AND token_type = '".$token_type."'";
+           return $this->execute($sql);
+       }
+
+       /**
+       * Return token row by consumer key, token, nounce
+       * @access  public
+       * @param   $consumer_key, $token, $nounce
+       * @return  table rows if successful, otherwise, return false
+       * @author  Cindy Qi Li
+       */
+       function getByTokenAndNounce($consumer_key, $token, $nonce)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."oauth_client_servers, c".TABLE_PREFIX."oauth_client_tokens t 
+                    WHERE c.oauth_server_id = t.oauth_server_id
+                      AND c.consumer_key='".$consumer_key."'
+                      AND t.token = '".$token."'
+                      AND t.nounce = '".$nonce."'";
+           return $this->execute($sql);
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/OAuthServerConsumersDAO.class.php b/docs/include/classes/DAO/OAuthServerConsumersDAO.class.php
new file mode 100644 (file)
index 0000000..8d9a4f6
--- /dev/null
@@ -0,0 +1,201 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* DAO for "oauth_server_consumers" table
+* @access      public
+* @author      Cindy Qi Li
+* @package     DAO
+*/
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(AF_INCLUDE_PATH. 'classes/Utility.class.php');
+
+class OAuthServerConsumersDAO extends DAO {
+
+       /**
+        * Create a new consumer record
+        * @access  public
+        * @param   consumer
+        * @return  consumer id, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Create($consumer, $expire_threshold)
+       {
+               global $addslashes, $msg;
+
+               $missing_fields = array();
+
+               /* email check */
+               $consumer = $addslashes(trim($consumer));
+
+               /* login name check */
+               if ($consumer == '')
+               {
+                       $missing_fields[] = _AT('consumer');
+               }
+
+               if ($missing_fields)
+               {
+                       $missing_fields = implode(', ', $missing_fields);
+                       $msg->addError(array('EMPTY_FIELDS', $missing_fields));
+               }
+
+               if (!$msg->containsErrors())
+               {
+                       /* insert into the db */
+                       $consumer_key = Utility::getRandomStr(16);
+                       $consumer_secret = Utility::getRandomStr(16);
+                       
+                       $sql = "INSERT INTO ".TABLE_PREFIX."oauth_server_consumers
+                                     (consumer,
+                                      consumer_key,
+                                      consumer_secret,
+                                      expire_threshold,
+                                      create_date
+                                      )
+                              VALUES ('".$consumer."',
+                                      '".$consumer_key."',
+                                      '".$consumer_secret."',
+                                      ".$expire_threshold.",
+                                      now()
+                                     )";
+
+                       if (!$this->execute($sql))
+                       {
+                               $msg->addError('DB_NOT_UPDATED');
+                               return false;
+                       }
+                       else
+                       {
+                               return mysql_insert_id();
+                       }
+               }
+               else
+               {
+                       return false;
+               }
+       }
+
+       /**
+        * Update expire threshold
+        * @access  public
+        * @param   consumer, expire threshold
+        * @return  true, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function updateExpireThreshold($consumer, $expire_threshold)
+       {
+               global $addslashes, $msg;
+
+               $missing_fields = array();
+
+               /* email check */
+               $consumer = $addslashes(trim($consumer));
+
+               /* login name check */
+               if ($consumer == '')
+               {
+                       $missing_fields[] = _AT('consumer');
+               }
+
+               if ($missing_fields)
+               {
+                       $missing_fields = implode(', ', $missing_fields);
+                       $msg->addError(array('EMPTY_FIELDS', $missing_fields));
+               }
+
+               if (!$msg->containsErrors())
+               {
+                       /* update db */
+                       $sql = "UPDATE ".TABLE_PREFIX."oauth_server_consumers
+                                  SET expire_threshold = ".$expire_threshold."
+                                WHERE consumer = '".$consumer."'";
+
+                       if (!$this->execute($sql))
+                       {
+                               $msg->addError('DB_NOT_UPDATED');
+                               return false;
+                       }
+                       else
+                       {
+                               return true;
+                       }
+               }
+               else
+               {
+                       return false;
+               }
+       }
+       
+       /**
+       * Return row by consumer ID
+       * @access  public
+       * @param   $consumer_id
+       * @return  table row
+       * @author  Cindy Qi Li
+       */
+       function get($consumer_id)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."oauth_server_consumers WHERE consumer_id='".$consumer_id."'";
+           $rows = $this->execute($sql);
+           return $rows[0];
+       }
+
+       /**
+       * Return row by consumer
+       * @access  public
+       * @param   $consumer
+       * @return  table row
+       * @author  Cindy Qi Li
+       */
+       function getByConsumer($consumer)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."oauth_server_consumers WHERE consumer='".$consumer."'";
+           return $this->execute($sql);
+       }
+
+       /**
+       * Return row by consumer key
+       * @access  public
+       * @param   $consumer_key
+       * @return  table row
+       * @author  Cindy Qi Li
+       */
+       function getByConsumerKey($consumer_key)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."oauth_server_consumers 
+                    WHERE consumer_key = '".$consumer_key."'";
+           return $this->execute($sql);
+       }
+
+       /**
+       * Return row by consumer key and secret
+       * @access  public
+       * @param   $consumer_key, $consumer_secret
+       * @return  table row
+       * @author  Cindy Qi Li
+       */
+       function getByConsumerKeyAndSecret($consumer_key, $consumer_secret)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."oauth_server_consumers 
+                    WHERE consumer_key = '".$consumer_key."'
+                      AND consumer_secret = '".$consumer_secret."'";
+           return $this->execute($sql);
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/OAuthServerTokensDAO.class.php b/docs/include/classes/DAO/OAuthServerTokensDAO.class.php
new file mode 100644 (file)
index 0000000..5d58d1c
--- /dev/null
@@ -0,0 +1,177 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* DAO for "oauth_server_tokens" table
+* @access      public
+* @author      Cindy Qi Li
+* @package     DAO
+*/
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class OAuthServerTokensDAO extends DAO {
+
+       /**
+        * Create a new token
+        * @access  public
+        * @param   token type
+        *          token
+        *          token secret
+        * @return  token id, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Create($consumer_id, $token, $token_type, $token_secret, $user_id)
+       {
+               global $addslashes, $msg;
+
+               $missing_fields = array();
+
+               /* token type check */
+               if ($token_type <> 'request' && $token_type <> 'access')
+               {
+                       $msg->addError('INVALID_TOKEN_TYPE');
+               }
+
+               if (!$msg->containsErrors())
+               {
+                       /* insert into the db */
+                       $sql = "INSERT INTO ".TABLE_PREFIX."oauth_server_tokens
+                                     (consumer_id,
+                                      token,
+                                      token_type,
+                                      token_secret,
+                                      user_id,
+                                      assign_date
+                                      )
+                              VALUES (".$consumer_id.",
+                                      '".$token."',
+                                      '".$token_type."',
+                                      '".$token_secret."',
+                                      ".$user_id.",
+                                      now()
+                                     )";
+
+                       if (!$this->execute($sql))
+                       {
+                               $msg->addError('DB_NOT_UPDATED');
+                               return false;
+                       }
+                       else
+                       {
+                               return true;
+                       }
+               }
+               else
+               {
+                       return false;
+               }
+       }
+
+       /**
+       * Update user_id by token
+       * @access  public
+       * @param   $token, $user_id
+       * @return  true if successful, otherwise, return false
+       * @author  Cindy Qi Li
+       */
+       function updateUserIDByToken($token, $user_id)
+       {
+           $sql = "UPDATE ".TABLE_PREFIX."oauth_server_tokens 
+                      SET user_id = ".$user_id."
+                    WHERE token = '".$token."'";
+           return $this->execute($sql);
+       }
+
+       /**
+       * Delete token row by token, token_type
+       * @access  public
+       * @param   $token, $token_type
+       * @return  true if successful, otherwise, return false
+       * @author  Cindy Qi Li
+       */
+       function deleteByTokenAndType($token, $token_type)
+       {
+           $sql = "DELETE FROM ".TABLE_PREFIX."oauth_server_tokens 
+                    WHERE token = '".$token."'
+                      AND token_type = '".$token_type."'";
+           return $this->execute($sql);
+       }
+
+       /**
+       * Return row by consumer
+       * @access  public
+       * @param   $consumer_id, $token_type
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function get($consumer_id, $token_type)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."oauth_server_tokens 
+                    WHERE consumer_id='".$consumer_id."'
+                      AND token_type='".$token_type."'";
+           return $this->execute($sql);
+       }
+
+       /**
+       * Return token row by consumer key, token type, token
+       * @access  public
+       * @param   $consumer_key, $token_type, $token
+       * @return  table rows if successful, otherwise, return false
+       * @author  Cindy Qi Li
+       */
+       function getByToken($consumer_key, $token)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."oauth_server_consumers c, ".TABLE_PREFIX."oauth_server_tokens t 
+                    WHERE c.consumer_id = t.consumer_id
+                      AND c.consumer_key='".$consumer_key."'
+                      AND t.token = '".$token."'";
+           return $this->execute($sql);
+       }
+
+       /**
+       * Return token row by token, token_type
+       * @access  public
+       * @param   $token, $token_type
+       * @return  table rows if successful, otherwise, return false
+       * @author  Cindy Qi Li
+       */
+       function getByTokenAndType($token, $token_type)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."oauth_server_tokens 
+                    WHERE token = '".$token."'
+                      AND token_type = '".$token_type."'";
+           return $this->execute($sql);
+       }
+
+       /**
+       * Return token row by consumer key, token, nounce
+       * @access  public
+       * @param   $consumer_key, $token, $nounce
+       * @return  table rows if successful, otherwise, return false
+       * @author  Cindy Qi Li
+       */
+       function getByTokenAndNounce($consumer_key, $token, $nonce)
+       {
+           $sql = "SELECT * FROM ".TABLE_PREFIX."oauth_server_consumers, c".TABLE_PREFIX."oauth_server_tokens t 
+                    WHERE c.consumer_id = t.consumer_id
+                      AND c.consumer_key='".$consumer_key."'
+                      AND t.token = '".$token."'
+                      AND t.nounce = '".$nonce."'";
+           return $this->execute($sql);
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/PatchesDAO.class.php b/docs/include/classes/DAO/PatchesDAO.class.php
new file mode 100644 (file)
index 0000000..0d1340c
--- /dev/null
@@ -0,0 +1,163 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+ * DAO for "patches" table
+ * @access     public
+ * @author     Cindy Qi Li
+ * @package    DAO
+ */
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class PatchesDAO extends DAO {
+
+       /**
+        * Create new patch
+        * @access  public
+        * @param   system_patch_id: atutor patch id, 
+        *          applied_version
+        *          patch_folder
+        *          description
+        *          available_to
+        *          sql_statement, 
+        *          status
+        *          remove_permission_files,
+        *          backup_files
+        *          patch_files
+        *          author
+        * @return  patch id, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Create($system_patch_id, $applied_version, 
+                              $patch_folder, $description, 
+                              $available_to, $sql_statement, 
+                              $status, $remove_permission_files,
+                              $backup_files, $patch_files, $author)
+       {
+               global $addslashes;
+
+               $sql = "INSERT INTO " . TABLE_PREFIX. "patches " .
+                                        "(system_patch_id, 
+                                          applied_version,
+                                          patch_folder,
+                                          description,
+                                          available_to,
+                                          sql_statement,
+                                          status,
+                                          remove_permission_files,
+                                          backup_files,
+                                          patch_files,
+                                          author,
+                                          installed_date)
+                                         VALUES
+                                         ('".$addslashes($system_patch_id)."',
+                                          '".$addslashes($applied_version)."',
+                                          '".$addslashes($patch_folder)."',
+                                          '".$addslashes($description)."',
+                                          '".$addslashes($available_to)."',
+                                          '".$addslashes($sql_statement)."',
+                                          '".$addslashes($status)."',
+                                          '".$addslashes($remove_permission_files)."',
+                                          '".$addslashes($backup_files)."',
+                                          '".$addslashes($patch_files)."',
+                                          '".$addslashes($author)."',
+                                          now()
+                                          )";
+
+               if (!$this->execute($sql))
+               {
+                       $msg->addError('DB_NOT_UPDATED');
+                       return false;
+               }
+               else
+               {
+                       return mysql_insert_id();
+               }
+       }
+
+       /**
+       * update table "patches" accroding to the fields/values in the given array
+       * @access  public
+       * @param   patchID, fieldArray
+       * @author  Cindy Qi Li
+       */
+       public function UpdateByArray($patchID, $fieldArray)
+       {
+               $sql_prefix = "Update ". TABLE_PREFIX. "patches set ";
+               
+               foreach ($fieldArray as $key => $value)
+               {
+                       $sql_middle .= $key . "='" . $value . "', ";
+               }
+               
+               $sql = substr($sql_prefix . $sql_middle, 0, -2) . 
+                      " WHERE patches_id = " . $patchID;
+               
+               return $this->execute($sql);
+       }
+
+       /**
+        * Return the patch info with the given patch id
+        * @access  public
+        * @param   $patchID
+        * @return  patch row
+        * @author  Cindy Qi Li
+        */
+       public function getByID($patchID)
+       {
+               $sql = "SELECT * from ".TABLE_PREFIX."patches where patches_id=". $patchID;
+               
+               $rows = $this->execute($sql);
+               
+               if (is_array($rows)) return $rows[0];
+               else return false;
+       }
+       
+       /**
+        * Return patch information by given version
+        * @access  public
+        * @param   version
+        * @return  patch row
+        * @author  Cindy Qi Li
+        */
+       public function getPatchByVersion($version)
+       {
+               $sql = "SELECT * FROM ".TABLE_PREFIX."patches 
+                        WHERE applied_version = '" . $version . "' 
+                        ORDER BY system_patch_id";
+               
+               return $this->execute($sql);
+       }
+
+       /**
+        * Return user information by given web service ID
+        * @access  public
+        * @param   web service ID
+        * @return  user row
+        * @author  Cindy Qi Li
+        */
+       public function getInstalledPatchByIDAndVersion($patchID, $version)
+       {
+               $sql = "select * from ".TABLE_PREFIX."patches " .
+                      "where system_patch_id = '" . $patchID ."'".
+                      " and applied_version = '".$version."'".
+                      " and status like '%Installed'";
+
+               return $this->execute($sql);
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/PatchesFilesActionsDAO.class.php b/docs/include/classes/DAO/PatchesFilesActionsDAO.class.php
new file mode 100644 (file)
index 0000000..7e5b2b2
--- /dev/null
@@ -0,0 +1,60 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+ * DAO for "patches_files_actions" table
+ * @access     public
+ * @author     Cindy Qi Li
+ * @package    DAO
+ */
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class PatchesFilesActionsDAO extends DAO {
+
+       /**
+        * Create new row
+        * @access  public
+        * @param   $patches_files_id, $action, $code_from, $code_to
+        * @return  patches_files_actions_id, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Create($patches_files_id, $action, $code_from, $code_to)
+       {
+               global $addslashes;
+
+               $sql = "INSERT INTO " . TABLE_PREFIX. "patches_files_actions " .
+                                        "(patches_files_id, 
+                                          action,
+                                          code_from,
+                                          code_to)
+                                         VALUES
+                                         (".$patches_files_id.",
+                                          '".$action."',
+                                          '".$addslashes($code_from)."',
+                                          '".$addslashes($code_to)."')";
+               
+               if (!$this->execute($sql))
+               {
+                       $msg->addError('DB_NOT_UPDATED');
+                       return false;
+               }
+               else
+               {
+                       return mysql_insert_id();
+               }
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/PatchesFilesDAO.class.php b/docs/include/classes/DAO/PatchesFilesDAO.class.php
new file mode 100644 (file)
index 0000000..4785235
--- /dev/null
@@ -0,0 +1,78 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+ * DAO for "patches_files" table
+ * @access     public
+ * @author     Cindy Qi Li
+ * @package    DAO
+ */
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class PatchesFilesDAO extends DAO {
+
+       /**
+        * Create new row
+        * @access  public
+        * @param   patch_id, action, $name, $location
+        * @return  patches_files_id, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Create($patch_id, $action, $name, $location)
+       {
+               global $addslashes;
+
+               $sql = "INSERT INTO " . TABLE_PREFIX. "patches_files " .
+                                        "(patches_id, 
+                                          action,
+                                          name,
+                                          location)
+                                         VALUES
+                                         (".$patch_id.",
+                                          '".$action."',
+                                          '".$addslashes($name)."',
+                                          '".$addslashes($location)."')";
+               
+               if (!$this->execute($sql))
+               {
+                       $msg->addError('DB_NOT_UPDATED');
+                       return false;
+               }
+               else
+               {
+                       return mysql_insert_id();
+               }
+       }
+
+       /**
+        * Return number of times that the given file have been updated by Updater
+        * @access  public
+        * @param   $file: file name
+        * @return  number of times
+        * @author  Cindy Qi Li
+        */
+       public function getNumOfUpdatesOnFile($file)
+       {
+               $sql = "SELECT count(*) num_of_updates FROM " . TABLE_PREFIX. "patches patches, " . TABLE_PREFIX."patches_files patches_files " .
+                              "WHERE patches.applied_version = '" . VERSION . "' ".
+                              "  AND patches.status = 'Installed' " .
+                              "  AND patches.patches_id = patches_files.patches_id " .
+                              "  AND patches_files.name = '" . $file . "'";
+               
+               return $this->execute($sql);
+       }               
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/PrivilegesDAO.class.php b/docs/include/classes/DAO/PrivilegesDAO.class.php
new file mode 100644 (file)
index 0000000..95034d5
--- /dev/null
@@ -0,0 +1,118 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* DAO for "themes" table
+* @access      public
+* @author      Cindy Qi Li
+* @package     DAO
+*/
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class PrivilegesDAO extends DAO {
+
+       /**
+       * Return privileges that are open to public
+       * @access  public
+       * @param   none
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getAll()
+       {
+               $sql = 'SELECT *
+                               FROM '.TABLE_PREFIX.'privileges p
+                               ORDER BY privilege_id';
+
+               return $this->execute($sql);
+       }
+
+       /**
+       * Return privileges that are open to public
+       * @access  public
+       * @param   none
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getPublicPrivileges()
+       {
+               $sql = 'SELECT *
+                                               FROM '.TABLE_PREFIX.'privileges p
+                                               WHERE open_to_public = 1
+                                               ORDER BY p.menu_sequence';
+
+               return $this->execute($sql);
+       }
+
+       /**
+       * Return privileges of the given user
+       * @access  public
+       * @param   $userID
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getUserPrivileges($userID)
+       {
+               $sql = 'SELECT *
+                               FROM '.TABLE_PREFIX.'users u, '.TABLE_PREFIX.'user_groups ug, '.TABLE_PREFIX.'user_group_privilege ugp, '.TABLE_PREFIX.'privileges p
+                               WHERE u.user_id = '.$userID.'
+                               AND u.user_group_id = ug.user_group_id
+                               AND ug.user_group_id = ugp.user_group_id
+                               AND ugp.privilege_id = p.privilege_id
+                               ORDER BY p.menu_sequence';
+
+           return $this->execute($sql);
+         }
+
+       /**
+       * Return privileges of the given user group
+       * @access  public
+       * @param   $userGroupID
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getUserGroupPrivileges($userGroupID)
+       {
+               $sql = 'SELECT *, ug.description user_group_desc, p.description privilege_desc
+                               FROM '.TABLE_PREFIX.'user_groups ug, '.TABLE_PREFIX.'user_group_privilege ugp, '.TABLE_PREFIX.'privileges p
+                               WHERE ug.user_group_id = '.$userGroupID.'
+                               AND ug.user_group_id = ugp.user_group_id
+                               AND ugp.privilege_id = p.privilege_id
+                               ORDER BY p.menu_sequence';
+       
+               return $this->execute($sql);
+       }
+
+       /**
+       * Return all privileges except the privilege ids in given string  
+       * @access  public
+       * @param   $privilegeIDs : a string of check ids separated by comma. for example: 1, 2, 3
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getAllPrivsExceptListed($privilegeIDs)
+       {
+               if (trim($privilegeIDs) == '')
+                       return $this->getAll();
+               else
+               {
+                       $sql = "SELECT * FROM ". TABLE_PREFIX ."privileges 
+                                WHERE privilege_id NOT IN (".$privilegeIDs.")";
+                       return $this->execute($sql);
+               }
+       }
+       
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/ThemesDAO.class.php b/docs/include/classes/DAO/ThemesDAO.class.php
new file mode 100644 (file)
index 0000000..16b0bac
--- /dev/null
@@ -0,0 +1,80 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* DAO for "themes" table
+* @access      public
+* @author      Cindy Qi Li
+* @package     DAO
+*/
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class ThemesDAO extends DAO {
+
+       /**
+       * Return all theme' information
+       * @access  public
+       * @param   none
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getAll()
+       {
+    $sql = 'SELECT * FROM '.TABLE_PREFIX.'themes ORDER BY dir_name';
+    return $this->execute($sql);
+  }
+
+       /**
+       * Return theme by theme dir name
+       * @access  public
+       * @param   dirName : theme dir name
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getByID($dirName)
+       {
+    $sql = "SELECT * FROM ".TABLE_PREFIX."themes WHERE dir_name='".$dirName."'";
+    if ($rows = $this->execute($sql))
+       return $rows[0];
+  }
+
+       /**
+       * Return all default themes
+       * @access  public
+       * @param   none
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getDefaultTheme()
+       {
+    $sql = "SELECT * FROM ".TABLE_PREFIX."themes WHERE status=".AF_STATUS_DEFAULT;
+    return $this->execute($sql);
+  }
+
+       /**
+       * Return all enabled themes
+       * @access  public
+       * @param   none
+       * @return  table rows
+       * @author  Cindy Qi Li
+       */
+       function getEnabledTheme()
+       {
+    $sql = "SELECT * FROM ".TABLE_PREFIX."themes WHERE status in (".AF_STATUS_ENABLED.", ".AF_STATUS_DEFAULT.")";
+    return $this->execute($sql);
+  }
+
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/UserGroupPrivilegeDAO.class.php b/docs/include/classes/DAO/UserGroupPrivilegeDAO.class.php
new file mode 100644 (file)
index 0000000..448ae9c
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+ * DAO for "user_groups" table
+ * @access     public
+ * @author     Cindy Qi Li
+ * @package    DAO
+ */
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class UserGroupPrivilegeDAO extends DAO {
+
+       /**
+        * Create
+        * @access  public
+        * @param   userGroupID
+        *          privilegeID
+        * @return  true, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Create($userGroupID, $privilegeID)
+       {
+               $sql = "INSERT INTO ".TABLE_PREFIX."user_group_privilege
+                             (user_group_id,
+                              privilege_id
+                              )
+                      VALUES (".$userGroupID.",
+                              ".$privilegeID."
+                             )";
+       
+               return $this->execute($sql);
+       }
+
+       /**
+        * Delete a row
+        * @access  public
+        * @param   userGroupID
+        *          privilegeID
+        * @return  true, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Delete($userGroupID, $privilegeID)
+       {
+               $sql = "DELETE FROM ".TABLE_PREFIX."user_group_privilege
+                        WHERE user_group_id = ".$userGroupID."
+                          AND privilege_id = ".$privilegeID;
+       
+               return $this->execute($sql);
+       }
+
+       /**
+        * Update an existing user group
+        * @access  public
+        * @param   userGroupID
+        * @return  true, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function DeleteByUserGroupID($userGroupID)
+       {
+               $sql = "DELETE FROM ".TABLE_PREFIX."user_group_privilege
+                        WHERE user_group_id = ".$userGroupID;
+
+               return $this->execute($sql);
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/UserGroupsDAO.class.php b/docs/include/classes/DAO/UserGroupsDAO.class.php
new file mode 100644 (file)
index 0000000..e52504f
--- /dev/null
@@ -0,0 +1,203 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+ * DAO for "user_groups" table
+ * @access     public
+ * @author     Cindy Qi Li
+ * @package    DAO
+ */
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+
+class UserGroupsDAO extends DAO {
+
+       /**
+        * Create a new user group
+        * @access  public
+        * @param   title
+        *          description
+        * @return  user id, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Create($title, $description)
+       {
+               global $addslashes, $msg;
+
+               $missing_fields = array();
+
+               /* email check */
+               $title = $addslashes(trim($title));
+
+               /* login name check */
+               if ($title == '')
+               {
+                       $missing_fields[] = _AT('title');
+               }
+
+               if ($missing_fields)
+               {
+                       $missing_fields = implode(', ', $missing_fields);
+                       $msg->addError(array('EMPTY_FIELDS', $missing_fields));
+               }
+
+               if (!$msg->containsErrors())
+               {
+                       /* insert into the db */
+                       $sql = "INSERT INTO ".TABLE_PREFIX."user_groups
+                                     (title,
+                                      description,
+                                      create_date
+                                      )
+                              VALUES ('".$title."',
+                                      '".$description."',
+                                      now()
+                                     )";
+
+                       if (!$this->execute($sql))
+                       {
+                               $msg->addError('DB_NOT_UPDATED');
+                               return false;
+                       }
+                       else
+                       {
+                               return mysql_insert_id();
+                       }
+               }
+               else
+               {
+                       return false;
+               }
+       }
+
+       /**
+        * Update an existing user group
+        * @access  public
+        * @param   user_group_id
+        *          title
+        *          description
+        * @return  user id, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Update($user_group_id, $title, $description)
+       {
+               global $addslashes, $msg;
+
+               $missing_fields = array();
+
+               /* email check */
+               $title = $addslashes(trim($title));
+
+               /* login name check */
+               if ($title == '')
+               {
+                       $missing_fields[] = _AT('title');
+               }
+
+               if ($missing_fields)
+               {
+                       $missing_fields = implode(', ', $missing_fields);
+                       $msg->addError(array('EMPTY_FIELDS', $missing_fields));
+               }
+
+               if (!$msg->containsErrors())
+               {
+                       /* insert into the db */
+                       $sql = "UPDATE ".TABLE_PREFIX."user_groups
+                                  SET title = '".$title."',
+                                      description = '".$description."',
+                                      last_update = now()
+                                WHERE user_group_id = ".$user_group_id;
+
+                       return $this->execute($sql);
+               }
+       }
+
+       /**
+        * Update an existing user group record
+        * @access  public
+        * @param   userGroupID: user group ID
+        *          fieldName: the name of the table field to update
+        *          fieldValue: the value to update
+        * @return  true if successful
+        *          error message array if failed; false if update db failed
+        * @author  Cindy Qi Li
+        */
+       public function UpdateField($userGroupID, $fieldName, $fieldValue)
+       {
+               global $addslashes;
+
+               // check if the required fields are filled
+               if ($fieldName == 'title' && $fieldValue == '') return array(_AT('AF_ERROR_EMPTY_FIELD'));
+               
+               $sql = "UPDATE ".TABLE_PREFIX."user_groups 
+                          SET ".$fieldName."='".$addslashes($fieldValue)."'
+                        WHERE user_group_id = ".$userGroupID;
+               
+               return $this->execute($sql);
+       }
+       
+       /**
+        * delete user group by given user id
+        * @access  public
+        * @param   user group id
+        * @return  true / false
+        * @author  Cindy Qi Li
+        */
+       public function Delete($userGroupID)
+       {
+               // delete user_group_privilege
+               include_once(AF_INCLUDE_PATH.'classes/DAO/UserGroupPrivilegeDAO.class.php');
+               
+               $userGroupPrivilegeDAO = new UserGroupPrivilegeDAO();
+               $userGroupPrivilegeDAO->DeleteByUserGroupID($userGroupID);
+               
+               // delete user_groups
+               $sql = 'DELETE FROM '.TABLE_PREFIX.'user_groups WHERE user_group_id = '.$userGroupID;
+               
+               return $this->execute($sql);
+       }
+       
+       /**
+        * Return all user groups' information
+        * @access  public
+        * @param   none
+        * @return  user rows
+        * @author  Cindy Qi Li
+        */
+       public function getAll()
+       {
+               $sql = 'SELECT * FROM '.TABLE_PREFIX.'user_groups ORDER BY title';
+               return $this->execute($sql);
+       }
+
+       /**
+        * Return user information by given user id
+        * @access  public
+        * @param   user group id
+        * @return  user row
+        * @author  Cindy Qi Li
+        */
+       public function getUserGroupByID($user_group_id)
+               {
+               $sql = 'SELECT * FROM '.TABLE_PREFIX.'user_groups WHERE user_group_id='.$user_group_id;
+               if ($rows = $this->execute($sql))
+               {
+                       return $rows[0];
+               }
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/DAO/UsersDAO.class.php b/docs/include/classes/DAO/UsersDAO.class.php
new file mode 100644 (file)
index 0000000..055690c
--- /dev/null
@@ -0,0 +1,578 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+ * DAO for "users" table
+ * @access     public
+ * @author     Cindy Qi Li
+ * @package    DAO
+ */
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
+require_once(AF_INCLUDE_PATH. 'classes/Utility.class.php');
+
+class UsersDAO extends DAO {
+
+       /**
+        * Validate if the given login/pwd is valid
+        * @access  public
+        * @param   login: login id or email
+        *          pwd: password
+        * @return  user id, if login/pwd is valid
+        *          false, if login/pwd is invalid
+        * @author  Cindy Qi Li
+        */
+       public function Validate($login, $pwd)
+       {
+               $sql = "SELECT user_id FROM ".TABLE_PREFIX."users 
+                        WHERE (login='".$login."' OR email='".$login."') 
+                          AND SHA1(CONCAT(password, '".$_SESSION[token]."'))='".$pwd."'";
+
+               $rows = $this->execute($sql);
+               if (is_array($rows))
+               {
+                       return $rows[0]['user_id'];
+               }
+               else
+               {
+                       return false;
+               }
+       }
+
+       /**
+        * Create new user
+        * @access  public
+        * @param   user_group_id: user group ID (1 [admin] or 2 [user])
+        *          login: login name
+        *          pwd: password
+        *          email: email
+        *          first_name: first name
+        *          last_name: last name
+        * @return  user id, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Create($user_group_id, $login, $pwd, $email, $first_name, $last_name, $status)
+       {
+               global $addslashes;
+
+               /* email check */
+               $login = $addslashes(strtolower(trim($login)));
+               $email = $addslashes(trim($email));
+               $first_name = $addslashes(str_replace('<', '', trim($first_name)));
+               $last_name = $addslashes(str_replace('<', '', trim($last_name)));
+
+               if ($this->isFieldsValid('new', $user_group_id,$login, $email,$first_name, $last_name))
+               {
+                       if ($status == "")
+                       {
+                               if (defined('AF_EMAIL_CONFIRMATION') && AF_EMAIL_CONFIRMATION)
+                               {
+                                       $status = AF_STATUS_UNCONFIRMED;
+                               } else
+                               {
+                                       $status = AF_STATUS_ENABLED;
+                               }
+                       }
+
+                       /* insert into the db */
+                       $sql = "INSERT INTO ".TABLE_PREFIX."users
+                                     (login,
+                                      password,
+                                      user_group_id,
+                                      first_name,
+                                      last_name,
+                                      email,
+                                      web_service_id,
+                                      status,
+                                      create_date
+                                      )
+                              VALUES ('".$login."',
+                                      '".$pwd."',
+                                      ".$user_group_id.",
+                                      '".$first_name."',
+                                      '".$last_name."', 
+                                      '".$email."',
+                                      '".Utility::getRandomStr()."',
+                                      ".$status.", 
+                                      now()
+                                                                               )";
+
+                       if (!$this->execute($sql))
+                       {
+                               $msg->addError('DB_NOT_UPDATED');
+                               return false;
+                       }
+                       else
+                       {
+                               return mysql_insert_id();
+                       }
+               }
+               else
+               {
+                       return false;
+               }
+       }
+
+       /**
+        * Update an existing user record
+        * @access  public
+        * @param   userID: user ID (1 [admin] or 2 [user])
+        *          login: login name
+        *          pwd: password
+        *          email: email
+        *          first_name: first name
+        *          last_name: last name
+        *          status
+        * @return  user id, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Update($userID, $user_group_id, $login, $email, $first_name, $last_name, $status)
+       {
+               global $addslashes, $msg;
+
+               /* email check */
+               $login = $addslashes(strtolower(trim($login)));
+               $email = $addslashes(trim($email));
+               $first_name = $addslashes(str_replace('<', '', trim($first_name)));
+               $last_name = $addslashes(str_replace('<', '', trim($last_name)));
+
+               if ($this->isFieldsValid('update', $user_group_id,$login, $email,$first_name, $last_name))
+               {
+                       /* insert into the db */
+                       $sql = "UPDATE ".TABLE_PREFIX."users
+                                  SET login = '".$login."',
+                                      user_group_id = '".$user_group_id."',
+                                      first_name = '".$first_name."',
+                                      last_name = '".$last_name."',
+                                      email = '".$email."',
+                                      status = '".$status."'
+                                WHERE user_id = ".$userID;
+
+                       return $this->execute($sql);
+               }
+       }
+
+       /**
+        * Update an existing user record
+        * @access  public
+        * @param   userID: user ID
+        *          fieldName: the name of the table field to update
+        *          fieldValue: the value to update
+        * @return  true if successful
+        *          error message array if failed; false if update db failed
+        * @author  Cindy Qi Li
+        */
+       public function UpdateField($userID, $fieldName, $fieldValue)
+       {
+               global $addslashes;
+               
+               // check if the required fields are filled
+               if ($fieldValue == '') return array(_AT('AF_ERROR_EMPTY_FIELD'));
+               
+               if ($fieldName == 'login')
+               {
+                       if (!$this->isLoginValid($fieldValue))
+                       {
+                               return array(_AT('AF_ERROR_LOGIN_CHARS'));
+                       }
+                       else if ($this->isLoginExists($fieldValue))
+                       {
+                               return array(_AT('AF_ERROR_LOGIN_EXISTS'));
+                       }
+               }
+                               
+               if ($fieldName == 'email')
+               {
+                       if (!$this->isEmailValid($fieldValue))
+                       {
+                               return array(_AT('AF_ERROR_EMAIL_INVALID'));
+                       }
+                       else if ($this->isEmailExists($fieldValue))
+                       {
+                               return array(_AT('AF_ERROR_EMAIL_EXISTS'));
+                       }
+               }
+                                               
+               $sql = "UPDATE ".TABLE_PREFIX."users 
+                          SET ".$fieldName."='".$addslashes($fieldValue)."'
+                        WHERE user_id = ".$userID;
+               
+               return $this->execute($sql);
+       }
+       
+       /**
+        * Delete user
+        * @access  public
+        * @param   user_id
+        * @return  true, if successful
+        *          false and add error into global var $msg, if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function Delete($userID)
+       {
+               $sql = "DELETE FROM ".TABLE_PREFIX."users
+                        WHERE user_id = ".$userID;
+
+               return $this->execute($sql);
+       }
+
+       /**
+        * Return all users' information
+        * @access  public
+        * @param   none
+        * @return  user rows
+        * @author  Cindy Qi Li
+        */
+       public function getAll()
+       {
+               $sql = 'SELECT * FROM '.TABLE_PREFIX.'users ORDER BY user_id';
+               return $this->execute($sql);
+       }
+
+       /**
+        * Return user information by given user id
+        * @access  public
+        * @param   user id
+        * @return  user row
+        * @author  Cindy Qi Li
+        */
+       public function getUserByID($userID)
+       {
+               $sql = 'SELECT * FROM '.TABLE_PREFIX.'users WHERE user_id='.$userID;
+               if ($rows = $this->execute($sql))
+               {
+                       return $rows[0];
+               }
+               else return false;
+       }
+
+       /**
+        * Return user information by given web service ID
+        * @access  public
+        * @param   web service ID
+        * @return  user row
+        * @author  Cindy Qi Li
+        */
+       public function getUserByWebServiceID($webServiceID)
+       {
+               $sql = "SELECT * FROM ".TABLE_PREFIX."users WHERE web_service_id='".$webServiceID."'";
+               if ($rows = $this->execute($sql))
+               {
+                       return $rows[0];
+               }
+               else return false;
+       }
+
+       /**
+        * Return user information by given email
+        * @access  public
+        * @param   email
+        * @return  user row : if successful
+        *          false : if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function getUserByEmail($email)
+       {
+               $sql = "SELECT * FROM ".TABLE_PREFIX."users WHERE email='".$email."'";
+
+               $rows = $this->execute($sql);
+               if (is_array($rows))
+               {
+                       return $rows[0];
+               }
+               else
+               return false;
+       }
+
+       /**
+        * Return user information by given first, last name
+        * @access  public
+        * @param   $firstName : first name
+        *          $lastName : last name
+        * @return  user row : if successful
+        *          false   if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function getUserByName($firstName, $lastName)
+       {
+               $sql = "SELECT user_id FROM ".TABLE_PREFIX."users
+                               WHERE first_name='".$firstName."' 
+                               AND last_name='".$lastName."'";
+
+               $rows = $this->execute($sql);
+               if (is_array($rows))
+               {
+                       return $rows[0];
+               }
+               else
+                       return false;
+       }
+
+       /**
+        * Based on this->userID, return (first name, last name), if first name, last name not exists, return login name
+        * @access  public
+        * @param   $userID
+        * @return  first name, last name. if not exists, return login name
+        * @author  Cindy Qi Li
+        */
+       public function getUserName($userID)
+       {
+               $row = $this->getUserByID($userID);
+               
+               if (!$row) return false;
+               
+               if ($row['first_name'] <> '' && $row['last_name'] <> '')
+               {
+                       return $row['first_name']. ' '.$row['last_name'];
+               }
+               else if ($row['first_name'] <> '')
+               {
+                       return $row['first_name'];
+               }
+               else if ($row['last_name'] <> '')
+               {
+                       return $row['last_name'];
+               }
+               else
+               {
+                       return $row['login'];
+               }
+       }
+       
+       /**
+        * Return given user's status
+        * @access  public
+        * @param   user id
+        * @return  user's status
+        * @author  Cindy Qi Li
+        */
+       public function getStatus($userID)
+       {
+               $sql = "SELECT status FROM ".TABLE_PREFIX."users WHERE user_id='".$userID."'";
+               $rows = $this->execute($sql);
+
+               if ($rows)
+               return $rows[0]['status'];
+               else
+               return false;
+       }
+
+       /**
+        * Set user's status
+        * @access  public
+        * @param   user id
+        *          status
+        * @return  true    if status is set successfully
+        *          false   if unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function setStatus($userID, $status)
+       {
+               $sql = "Update ".TABLE_PREFIX."users SET status='".$status."' WHERE user_id='".$userID."'";
+               return $this->execute($sql);
+       }
+
+       /**
+        * Update user's last login time to now()
+        * @access  public
+        * @param   user id
+        * @return  true    if update successfully
+        *          false   if update unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function setLastLogin($userID)
+       {
+               $sql = "Update ".TABLE_PREFIX."users SET last_login=now() WHERE user_id='".$userID."'";
+               return $this->execute($sql);
+       }
+
+       /**
+        * Update user's first, last name
+        * @access  public
+        * @param   $userID : user ID
+        *          $firstName : first name
+        *          $lastName : last name
+        * @return  true    if update successfully
+        *          false   if update unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function setName($userID, $firstName, $lastName)
+       {
+               $sql = "Update ".TABLE_PREFIX."users SET first_name='".$firstName."', last_name='".$lastName."' WHERE user_id='".$userID."'";
+               return $this->execute($sql);
+       }
+
+       /**
+        * Update user's password
+        * @access  public
+        * @param   $userID : user ID
+        *          $password : password
+        * @return  true    if update successfully
+        *          false   if update unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function setPassword($userID, $password)
+       {
+               $sql = "Update ".TABLE_PREFIX."users SET password='".$password."' WHERE user_id='".$userID."'";
+               return $this->execute($sql);
+       }
+
+       /**
+        * Update user's email
+        * @access  public
+        * @param   $userID : user ID
+        *          $email : email
+        * @return  true    if update successfully
+        *          false   if update unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function setEmail($userID, $email)
+       {
+               $sql = "Update ".TABLE_PREFIX."users SET email='".$email."' WHERE user_id='".$userID."'";
+               return $this->execute($sql);
+       }
+
+       /**
+        * Validate fields preparing for insert and update
+        * @access  private
+        * @param   $validate_type : new/update. When validating for update, don't check if the login, email, name are unique
+        *          $user_group_id : user ID
+        *          $login
+        *          $email
+        *          $first_name
+        *          $last_name
+        * @return  true    if update successfully
+        *          false   if update unsuccessful
+        * @author  Cindy Qi Li
+        */
+       private function isFieldsValid($validate_type, $user_group_id, $login, $email, $first_name, $last_name)
+       {
+               global $msg;
+               
+               $missing_fields = array();
+               /* login name check */
+               if ($login == '')
+               {
+                       $missing_fields[] = _AT('login_name');
+               }
+               else
+               {
+                       /* check for special characters */
+                       if (!$this->isLoginValid($login))
+                       {
+                               $msg->addError('LOGIN_CHARS');
+                       }
+                       else if ($validate_type == 'new' && $this->isLoginExists($login))
+                       {
+                               $msg->addError('LOGIN_EXISTS');
+                       }
+               }
+
+               if ($user_group_id == '' || $user_group_id <= 0)
+               {
+                       $missing_fields[] = _AT('user_group');
+               }
+               if ($email == '')
+               {
+                       $missing_fields[] = _AT('email');
+               }
+               else if (!$this->isEmailValid($email))
+               {
+                       $msg->addError('EMAIL_INVALID');
+               }
+
+               if ($validate_type == 'new' && $this->isEmailExists($email))
+               {
+                       $msg->addError('EMAIL_EXISTS');
+               }
+
+               if (!$first_name) {
+                       $missing_fields[] = _AT('first_name');
+               }
+
+               if (!$last_name) {
+                       $missing_fields[] = _AT('last_name');
+               }
+
+               if ($missing_fields)
+               {
+                       $missing_fields = implode(', ', $missing_fields);
+                       $msg->addError(array('EMPTY_FIELDS', $missing_fields));
+               }
+               
+               if (!$msg->containsErrors())
+                       return true;
+               else
+                       return false;
+       }
+
+       /**
+        * Validate if the login name is valid
+        * @access  private
+        * @param   $login
+        * @return  true    if valid
+        *          false   if not valid
+        * @author  Cindy Qi Li
+        */
+       private function isLoginValid($login)
+       {
+               return preg_match("/^[a-zA-Z0-9_.-]([a-zA-Z0-9_.-])*$/i", $login);
+       }
+
+       /**
+        * Validate if the login name already exists
+        * @access  private
+        * @param   $login
+        * @return  true    if login already exists
+        *          false   if login not exists
+        * @author  Cindy Qi Li
+        */
+       private function isLoginExists($login)
+       {
+               $sql = "SELECT * FROM ".TABLE_PREFIX."users WHERE login='".$login."'";
+
+               return is_array($this->execute($sql));
+       }
+
+       /**
+        * Validate if the email is valid
+        * @access  private
+        * @param   $email
+        * @return  true    if valid
+        *          false   if not valid
+        * @author  Cindy Qi Li
+        */
+       private function isEmailValid($email)
+       {
+               return preg_match("/^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,6}$/i", $email);
+       }
+
+       /**
+        * Validate if the email already exists
+        * @access  private
+        * @param   $login
+        * @return  true    if email already exists
+        *          false   if email not exists
+        * @author  Cindy Qi Li
+        */
+       private function isEmailExists($email)
+       {
+               $sql = "SELECT * FROM ".TABLE_PREFIX."users WHERE email='".$email."'";
+
+               return is_array($this->execute($sql));
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Language/Language.class.php b/docs/include/classes/Language/Language.class.php
new file mode 100644 (file)
index 0000000..acdb667
--- /dev/null
@@ -0,0 +1,203 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* Language
+* Class for accessing information about a single language.
+* @access      public
+* @author      Joel Kronenberg
+* @see         LanguageManager::getLanguage()
+* @see         LanguageManager::getMyLanguage()
+* @package     Language
+*/
+include_once(AF_INCLUDE_PATH.'classes/DAO/LangCodesDAO.class.php');
+
+class Language {
+       // all private
+       var $code;
+       var $characterSet;
+       var $direction;
+       var $regularExpression;
+       var $nativeName;
+       var $englishName;
+       var $status;
+       var $aframe_version;
+
+       // constructor
+       function Language($language_row) {
+
+               if (is_array($language_row)) {
+                       $this->code              = $language_row['language_code'];
+                       $this->characterSet      = $language_row['charset'];
+                       $this->regularExpression = $language_row['reg_exp'];
+                       $this->nativeName        = $language_row['native_name'];
+                       $this->englishName       = $language_row['english_name'];
+                       $this->status            = $language_row['status'];
+                       $this->aframe_version    = isset($language_row['version']) ? $language_row['version'] : VERSION;
+
+                       $langCodesDAO = new LangCodesDAO();
+                       $row_langCodes = $langCodesDAO->GetLangCodeBy3LetterCode($this->getParentCode($language_row['language_code']));
+
+                       $this->direction = $row_langCodes['direction'];
+                       
+               } else if (is_object($language_row)) {
+                       $this->cloneThis($language_row);
+               }
+       }
+
+       // private
+       // copies the properties from $from to $this Object
+       function cloneThis($from) {
+               $vars = get_object_vars($from);
+               foreach ($vars as $key => $value) {
+                       $this->$key = $value;
+               }
+       }
+
+       // returns whether or not the $search_string matches the regular expression
+       function isMatchHttpAcceptLanguage($search_string) {
+               return preg_match('/^(' . $this->regularExpression . ')(;q=[0-9]\\.[0-9])?$/i', $search_string);
+       }
+
+       // returns boolean whether or not $search_string is in HTTP_USER_AGENT
+       function isMatchHttpUserAgent($search_string) {
+               return preg_match('/(\(|\[|;[\s])(' . $this->regularExpression . ')(;|\]|\))/', $search_string);
+
+       }
+
+       function getCode() {
+               return $this->code;
+       }
+
+       function getCharacterSet() {
+               return $this->characterSet;
+       }
+
+       function getDirection() {
+               return $this->direction;
+       }
+
+       function getRegularExpression() {
+               return $this->regularExpression;
+       }
+
+       function getAFrameVersion() {
+               return $this->aframe_version;
+       }
+
+       function getTranslatedName() {
+               if ($this->code == $_SESSION['lang']) {
+                       return $this->nativeName;
+               }
+               // this code has to be translated:
+               return _AT('lang_' . str_replace('-', '_', $this->code));
+       }
+
+       function getNativeName() {
+               return $this->nativeName;
+       }
+
+       function getEnglishName() {
+               return $this->englishName;
+       }
+
+       function getStatus() {
+               return $this->status;
+       }
+
+
+       // public
+       function sendContentTypeHeader() {
+               header('Content-Type: text/html; charset=' . $this->characterSet);
+       }
+
+       // public
+       function saveToSession() {
+               $_SESSION['lang'] = $this->code;
+       }
+
+       /* 
+        * public
+        * @param       member_id or login for members and admin respectively
+        * @param       1 for admin, 0 for members, all other integers are ignored. 
+        */
+       function saveToPreferences($id, $is_admin) {
+               global $db;
+               if ($id) {
+                       if ($is_admin === 0) {
+                               $sql = "UPDATE ".TABLE_PREFIX."members SET language='".$this->code."', creation_date=creation_date, last_login=last_login WHERE member_id=$id";
+                       } elseif ($is_admin === 1) {
+                               $sql = "UPDATE ".TABLE_PREFIX."admins SET language='".$this->code."', last_login=last_login WHERE login='$id'";
+                       }
+                       mysql_query($sql,$db);
+               }
+       }
+
+       // public
+       // returns whether or not this language is right-to-left
+       // possible langues are: arabic, farsi, hebrew, urdo
+       function isRTL() {
+               if ($this->direction == 'rtl') {
+                       return true;
+               }
+
+               return false;
+       }
+
+       function getParentCode($code = '') {
+               if (!$code && isset($this)) {
+                       $code = $this->code;
+               }
+               $peices = explode(AF_LANGUAGE_LOCALE_SEP, $code, 2);
+               return $peices[0];
+       }
+
+       // public
+       // can be called staticly
+       function getLocale($code = '') {
+               if (!$code && isset($this)) {
+                       $code = $this->code;
+               }
+               $peices = explode(AF_LANGUAGE_LOCALE_SEP, $code, 2);
+               return $peices[1];
+       }
+       
+       function getXML($part=FALSE) {
+               if (!$part) {
+                       $xml = '<?xml version="1.0" encoding="iso-8859-1"?>
+                       <!-- This is an AFrame language pack -->
+
+                       <!DOCTYPE language [
+                          <!ELEMENT aframe-version (#PCDATA)>
+                          <!ELEMENT charset (#PCDATA)>
+                          <!ELEMENT reg-exp (#PCDATA)>
+                          <!ELEMENT native-name (#PCDATA)>
+                          <!ELEMENT english-name (#PCDATA)>
+                          <!ELEMENT status (#PCDATA)>
+
+                          <!ATTLIST language code ID #REQUIRED>
+                       ]>';
+               } 
+
+               $xml .= '<language code="'.$this->code.'">
+                       <aframe-version>'.VERSION.'</aframe-version>
+                       <charset>'.$this->characterSet.'</charset>
+                       <reg-exp>'.$this->regularExpression.'</reg-exp>
+                       <native-name>'.$this->nativeName.'</native-name>
+                       <english-name>'.$this->englishName.'</english-name>
+                       <status>'.$this->status.'</status>
+               </language>';
+
+               return $xml;
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Language/LanguageEditor.class.php b/docs/include/classes/Language/LanguageEditor.class.php
new file mode 100644 (file)
index 0000000..ec51912
--- /dev/null
@@ -0,0 +1,289 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* LanguageEditor
+* Class for adding/editing language.
+* @access      public
+* @author      Heidi Hazelton
+* @author      Joel Kronenberg
+* @package     Language
+*/
+include_once(AF_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');
+include_once(AF_INCLUDE_PATH.'classes/DAO/LanguageTextDAO.class.php');
+
+class LanguageEditor extends Language {
+
+       var $addslashes;
+
+       // array of missing terms
+       var $missingTerms;
+
+       // array of filters ['new', 'update']
+       var $filters;
+       
+       /**
+       * Constructor.
+       * 
+       * Initializes db and parent properties.
+       */
+       function LanguageEditor($myLang) {
+               global $db, $addslashes, $msg;
+               
+               global $savant;
+               $this->msg =& $msg;
+
+               $this->addslashes = $addslashes;
+
+               if (isset($myLang)) {
+                       $this->Language($myLang);
+               }
+               $this->missingTerms = array();
+       }
+
+       // public
+       function updateTerm($variable, $term, $text) {
+               $addslashes = $this->addslashes;
+
+               $variable = $addslashes($variable);
+               $term     = $addslashes($term);
+               $text     = $addslashes($text);
+               $code     = $addslashes($this->getCode());
+
+               $sql    = "UPDATE ".TABLE_PREFIX."language_text SET text='$text', revised_date=NOW() WHERE language_code='$code' AND variable='$variable' AND term='$term'";
+
+               /*
+               if (mysql_query($sql, $this->db)) {
+                       return TRUE;
+               } else {
+                       debug(mysql_error($this->db));
+                       return FALSE;
+               }
+               */
+       }
+
+       // public
+       function insertTerm($variable, $key, $text, $context) {
+               $addslashes = $this->addslashes;
+
+               $variable = $addslashes($variable);
+               $key      = $addslashes($key);
+               $text     = $addslashes($text);
+               $code     = $addslashes($this->getCode());
+               $context  = $addslashes($context);
+
+               $sql = "INSERT INTO ".TABLE_PREFIX."language_text VALUES('$code', '$variable', '$key', '$text', NOW(), '$context')";
+       }
+
+       // public
+       function showMissingTermsFrame(){
+               global $_base_path, $addslashes;
+               //$terms = array_slice($this->missingTerms, 0, 20);
+               $terms = $this->missingTerms;
+               $terms = serialize($terms);
+               $terms = urlencode($terms);
+
+               echo '<div align="center"><iframe src="'.$_base_path.'admin/missing_language.php?terms='.$terms.SEP.'lang='.$_SESSION['lang'].'" width="99%" height="300"></div>';
+       }
+
+       // public
+       // doesn't actually check if params is one of the possible ones.
+       // possible params should be array ('new', 'update')
+       function setFilter($params){
+               if (!is_array($params)) {
+                       return;
+               }
+
+               foreach($params as $param => $garbage) {
+                       $this->filters[$param] = true;
+               }
+       }
+
+       // private
+       function checkFilter($param) {
+               if ($this->filters[$param]) {
+                       return true;
+               }
+               return false;
+       }
+
+       // public
+       function printTerms($terms){
+               global $addslashes, $languageManager; // why won't $addslashes = $this->addslashes; work?
+
+               $counter = 0;
+
+               $terms = unserialize(stripslashes($addslashes($terms)));
+
+               natcasesort($terms);
+
+               if ($this->checkFilter('new')) {
+                       $new_check = ' checked="checked"';
+               }
+               if ($this->checkFilter('update')) {
+                       $update_check = ' checked="checked"';
+               }
+
+               $fromLanguage =& $languageManager->getLanguage(DEFAULT_LANGUAGE_CODE);
+
+               echo '<form method="post" action="'.htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES).'">';
+               echo '<table border="0" cellpadding="0" cellspacing="2">';
+               echo '<tr>';
+               echo '<td>Show: ';
+               echo '<input name="filter_new" id="n" value="1" type="checkbox" '.$new_check.' /><label for="n">New Language</label>, ';
+               echo '<input name="filter_update" id="u" value="1" type="checkbox" '.$update_check.' /><label for="u">Updated Language</label> ';
+               echo '</td>';
+               echo '</tr>';
+
+               foreach($terms as $term => $garbage) {
+                       $to_term   = $this->getTerm($term);
+                       $from_term = $fromLanguage->getTerm($term);
+
+                       $is_new = false;
+                       if ($to_term === false) {
+                               $is_new = true;
+                       }
+
+                       $is_old = false;
+                       if ($to_term['revised_date_unix'] < $from_term['revised_date_unix']) {
+                               $is_old = true;
+                       }
+
+
+                       if ($this->checkFilter('new') && !$is_new) {
+                               continue;
+                       }
+
+                       if ($this->checkFilter('update') && !$is_old) {
+                               continue;
+                       }
+
+                       if (($counter % 10) == 0) {
+                               echo '<tr>';
+                               echo '<td align="center"><input type="submit" name="submit" value="Save Changes" class="button" /></td>';
+                               echo '</tr>';
+                       }
+
+                       $style = '';
+                       if ($is_new) {
+                               $style = 'style="background-color: white; border: red 2px solid;"';
+                       } else {
+                               $style = 'style="background-color: white; border: yellow 1px solid;"';
+                       }
+
+                       echo '<tr>';
+                       echo '<td><strong>[ ' . $term . ' ] '.htmlspecialchars($from_term['text']).'</strong></td></tr>';
+                       echo '<tr><td><input type="text" name="'.$term.'" '.$style.' size="100" value="'.htmlspecialchars($to_term['text']).'" />';
+                       echo '<input type="hidden" name="old['.$term.']" '.$style.' size="100" value="'.htmlspecialchars($to_term['text']).'" /></td>';
+                       echo '</tr>';
+
+                       $counter++;
+               }
+               echo '</table>';
+               echo '</form>';
+       }
+
+       // public
+       function updateTerms($terms) {
+               global $addslashes;
+
+               foreach($terms as $term => $text) {
+                       $text = $addslashes($text);
+                       $term = $addslashes($term);
+               
+                       if (($text != '') && ($text != $_POST['old'][$term])) {
+                               $sql = "REPLACE INTO ".TABLE_PREFIX."language_text VALUES ('".$this->getCode()."', '_template', '$term', '$text', NOW(), '')";
+                               mysql_query($sql, $this->db);
+                       }
+               }
+       }
+
+       // public
+       function addMissingTerm($term) {
+               if (!isset($this->missingTerms[$term])) {
+                       $this->missingTerms[$term] = '';
+               }
+       }
+
+
+       // this method should be called staticly: LanguageEditor::import()
+       // public
+       function import($language_sql_file) {
+               // move sql import class from install/ to include/classes/
+               // store the lang def'n in a .ini file and use insertLang 
+               // after checking if it already exists
+
+               // use the sql class to insert the language into the db
+
+               // check if this language exists before calling this method
+
+               require_once(AF_INCLUDE_PATH . 'classes/sqlutility.class.php');
+               $sqlUtility = new SqlUtility();
+
+               $sqlUtility->queryFromFile($language_sql_file, TABLE_PREFIX);
+       }
+
+       // sends the generated language pack to the browser
+       // public
+       function export($filename = '') {
+//             $search  = array('"', "'", "\x00", "\x0a", "\x0d", "\x1a"); //\x08\\x09, not required
+//             $replace = array('\"', "\'", '\0', '\n', '\r', '\Z');
+
+               // use a function to generate the ini file
+               // use a diff fn to generate the sql dump
+               // use the zipfile class to package the ini file and the sql dump
+               global $addslashes;
+               
+               $sql_dump = "INSERT INTO `languages` VALUES ('$this->code', '$this->characterSet', '$this->regularExpression', '$this->nativeName', '$this->englishName', $this->status);\r\n\r\n";
+
+               $sql_dump .= "INSERT INTO `language_text` VALUES ";
+
+               $languageTextDAO = new LanguageTextDAO();
+               $rows = $languageTextDAO->getAllByLang($this->code);
+
+               if (is_array($rows)) {
+                       foreach ($rows as $row)
+                       {
+//                             $row['text']    = str_replace($search, $replace, $row['text']);
+//                             $row['context'] = str_replace($search, $replace, $row['context']);
+                               $row['text']    = $addslashes($row['text']);
+                               $row['context'] = $addslashes($row['context']);
+                               
+                               $sql_dump .= "('$this->code', '$row[variable]', '$row[term]', '$row[text]', '$row[revised_date]', '$row[context]'),\r\n";
+                       }
+               } else {
+                       $this->msg->addError('LANG_EMPTY');
+                       return;
+               }
+               $sql_dump = substr($sql_dump, 0, -3) . ";";
+
+               $readme = 'This is an AFrame language pack. Use the administrator Language section to import this language pack or manually import the contents of the SQL file into your [table_prefix]language_text table, where `table_prefix` should be replaced with your correct AFrame table prefix as defined in ./include/config.inc.php .';
+
+               require(AF_INCLUDE_PATH . 'classes/zipfile.class.php');
+               $zipfile = new zipfile();
+
+               $zipfile->add_file($sql_dump, 'language_text.sql');
+               $zipfile->add_file($readme, 'readme.txt');
+               $zipfile->add_file($this->getXML(), 'language.xml');  
+
+               if ($filename) {
+                       $fp = fopen($filename, 'wb+');
+                       fwrite($fp, $zipfile->get_file(), $zipfile->get_size());
+               } else {
+                       $version = str_replace('.','_',VERSION);
+
+                       $zipfile->send_file('AFrame_' . $version . '_' . $this->code);
+               }
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Language/LanguageManager.class.php b/docs/include/classes/Language/LanguageManager.class.php
new file mode 100644 (file)
index 0000000..edd6058
--- /dev/null
@@ -0,0 +1,347 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+require_once(dirname(__FILE__) . '/Language.class.php');
+
+//define('AF_LANG_STATUS_EMPTY',       0);
+//define('AF_LANG_STATUS_INCOMPLETE',  1);
+//define('AF_LANG_STATUS_COMPLETE',    2);
+//define('AF_LANG_STATUS_PUBLISHED',   3);
+
+/**
+* LanguageManager
+* Class for managing available languages as Language Objects.
+* @access      public
+* @author      Joel Kronenberg
+* @see         Language.class.php
+* @package     Language
+*/
+class LanguageManager {
+
+       /**
+       * This array stores references to all the Language Objects
+       * that are available in this installation.
+       * @access private
+       * @var array
+       */
+       var $allLanguages;
+       
+       /**
+       * This array stores references to the Language Objects
+       * that are available in this installation.
+       * @access private
+       * @var array
+       */
+       var $availableLanguages;
+
+       /**
+       * The number of languages that are available. Does not include
+       * character set variations.
+       * @access private
+       * @var integer
+       */
+       var $numEnabledLanguages;
+
+       /**
+       * Constructor.
+       * 
+       * Initializes availableLanguages and numLanguages.
+       */
+       function LanguageManager() {
+               require_once(AF_INCLUDE_PATH. 'classes/DAO/LanguagesDAO.class.php');
+               $languagesDAO = new LanguagesDAO();
+               
+               // initialize available lanuguages. Available languages are the ones with status "enabled"
+               $rows = $languagesDAO->getAllEnabled();
+               
+               // if there's no enabled language, set to default language and default charset
+               if (!is_array($rows))
+               {
+                       $rows = array($languagesDAO->getByLangCodeAndCharset(DEFAULT_LANGUAGE_CODE, DEFAULT_CHARSET));
+               }
+               foreach ($rows as $i => $row) {
+                       $this->availableLanguages[$row['language_code']][$row['charset']] = new Language($row);
+               }
+               $this->numEnabledLanguages = count($this->availableLanguages);
+
+                       // initialize available lanuguages. Available languages are the ones with status "enabled"
+               $rows = $languagesDAO->getAll();
+               
+               foreach ($rows as $i => $row) {
+                       $this->allLanguages[$row['language_code']][$row['charset']] = new Language($row);
+               }
+       }
+
+
+       /**
+       * Returns a valid Language Object based on the given language $code and optional
+       * $charset, FALSE if it can't be found.
+       * @access       public
+       * @param        string $code            The language code of the language to return.
+       * @param        string $charset         Optionally, the character set of the language to find.
+       * @return       boolean|Language        Returns FALSE if the requested language code and
+       *                                                               character set cannot be found. Returns a Language Object for the
+       *                                                               specified language code and character set.
+       * @see          getMyLanguage()
+       */
+       function getLanguage($code, $charset = '') {
+               if (!$charset) {
+                       if (isset($this->allLanguages[$code])) {
+                               return current($this->allLanguages[$code]);
+                       } else {
+                               return FALSE;
+                       }
+               }
+
+               foreach ($this->allLanguages[$code] as $language) {
+                       if ($language->getCharacterSet() == $charset) {
+                               return $language;
+                       }
+               }
+               return FALSE;
+       }
+
+       /**
+       * Tries to detect the user's current language preference/setting from (in order):
+       * _GET, _POST, _SESSION, HTTP_ATCEPT_LANGUAGE, HTTP_USER_AGENT. If no match can be made
+       * then it tries to detect a default setting (defined in config.inc.php) or a fallback
+       * setting, false if all else fails.
+       * @access       public
+       * @return       boolean|Language        Returns a Language Object matching the user's current session.
+       *                                                               Returns FALSE if a valid Language Object cannot be found
+       *                                                               to match the request
+       * @see          getLanguage()
+       */
+       function getMyLanguage() {
+               global $addslashes, $db; 
+
+               if (isset($_GET) && !empty($_GET['lang']) && isset($this->availableLanguages[$_GET['lang']])) {
+                       $language = $this->getLanguage($_GET['lang']);
+
+                       if ($language) {
+                               return $language;
+                       }
+
+               } 
+
+               if (isset($_POST) && !empty($_POST['lang']) && isset($this->availableLanguages[$_POST['lang']])) {
+                       $language = $this->getLanguage($_POST['lang']);
+
+                       if ($language) {
+                               return $language;
+                       }
+
+               } 
+               if (isset($_SESSION) && isset($_SESSION['lang']) && !empty($_SESSION['lang']) && isset($this->availableLanguages[$_SESSION['lang']])) {
+                       $language = $this->getLanguage($_SESSION['lang']);
+
+                       if ($language) {
+                               return $language;
+                       }
+               }
+
+               if (!empty($_SERVER['HTTP_ATCEPT_LANGUAGE'])) {
+
+                       // Language is not defined yet :
+                       // try to find out user's language by checking its HTTP_ATCEPT_LANGUAGE
+                       $accepted    = explode(',', $_SERVER['HTTP_ATCEPT_LANGUAGE']);
+                       $acceptedCnt = count($accepted);
+                       reset($accepted);
+                       for ($i = 0; $i < $acceptedCnt; $i++) {
+                               foreach ($this->availableLanguages as $codes) {
+                                       foreach ($codes as $language) {
+                                               if ($language->isMatchHttpAcceptLanguage($accepted[$i])) {
+                                                       return $language;
+                                               }
+                                       }
+                               }
+                       }
+               }
+               
+               if (!empty($_SERVER['HTTP_USER_AGENT'])) {
+
+                       // Language is not defined yet :
+                       // try to find out user's language by checking its HTTP_USER_AGENT
+                       foreach ($this->availableLanguages as $codes) {
+                               foreach ($codes as $language) {
+                                       if ($language->isMatchHttpUserAgent($_SERVER['HTTP_USER_AGENT'])) {
+                                               return $language;
+                                       }
+                               }
+                       }
+               }
+
+               // Didn't catch any valid lang : we use the default settings
+               if (isset($this->availableLanguages[DEFAULT_LANGUAGE_CODE])) {
+                       $language = $this->getLanguage(DEFAULT_LANGUAGE_CODE, DEFAULT_CHARSET);
+
+                       if ($language) {
+                               return $language;
+                       }
+               }
+               
+               // else pick one at random:
+               reset($this->availableLanguages);
+               $uknown_language = current($this->availableLanguages);
+               if ($unknown_language) {
+                       return FALSE;
+               }
+               
+               return current($uknown_language);
+       }
+
+       function getAvailableLanguages() {
+               return $this->availableLanguages;
+       }
+
+       // public
+       function printDropdown($current_language, $name, $id) {
+               echo '<select name="'.$name.'" id="'.$id.'">';
+
+               foreach ($this->availableLanguages as $codes) {
+                       $language = current($codes);
+                       if ($language->getStatus() == AF_STATUS_ENABLED) {
+                               echo '<option value="'.$language->getCode().'"';
+                               if ($language->getCode() == $current_language) {
+                                       echo ' selected="selected"';
+                               }
+                               echo '>'.$language->getNativeName().'</option>';
+                       }
+               }
+               echo '</select>';
+       }
+
+       // public
+       function printList($current_language, $name, $id, $url) {
+
+               $delim = false;
+               foreach ($this->availableLanguages as $codes) {
+                       $language = current($codes);
+
+                       if ($language->getStatus() == AF_STATUS_ENABLED) {
+
+                               if ($delim){
+                                       echo ' | ';
+                               }
+
+                               if ($language->getCode() == $current_language) {
+                                       echo '<strong>'.$language->getNativeName().'</strong>';
+                               } else {
+                                       echo '<a href="'.$url.'lang='.$language->getCode().'">'.$language->getNativeName().'</a> ';
+                               }
+
+                               $delim = true;
+                       }
+               }
+       }
+
+       // public
+       function getNumEnabledLanguages() {
+               return $this->numEnabledLanguages;
+       }
+
+       // public
+       // checks whether or not the language exists
+       function exists($code) {
+               return isset($this->allLanguages[$code]);
+       }
+
+       // public
+       // import language pack from specified file
+       function import($filename) {
+               require_once(AF_INCLUDE_PATH . 'lib/pclzip.lib.php');
+               require_once(AF_INCLUDE_PATH . 'classes/Language/LanguageParser.class.php');
+
+               global $languageManager, $msg;
+
+               $import_path = AF_TEMP_DIR . 'import/';
+
+               $archive = new PclZip($filename);
+               if ($archive->extract(PCLZIP_OPT_PATH,  $import_path) == 0) {
+                       exit('Error : ' . $archive->errorInfo(true));
+               }
+
+               $language_xml = @file_get_contents($import_path.'language.xml');
+
+               $languageParser = new LanguageParser();
+               $languageParser->parse($language_xml);
+               $languageEditor =& $languageParser->getLanguageEditor(0);
+
+               if ($languageEditor->getAFrameVersion() != VERSION) 
+               {
+                               $msg->addError('LANG_WRONG_VERSION');
+               }
+
+               if ($languageManager->exists($languageEditor->getCode())) {
+                       $msg->addError('LANG_EXISTS');
+               }
+
+               if (!$msg->containsErrors()) {
+                       $languageEditor->import($import_path . 'language_text.sql');
+                       $msg->addFeedback('IMPORT_LANG_SUCCESS');
+               }
+
+               // remove the files:
+               @unlink($import_path . 'language.xml');
+               @unlink($import_path . 'language_text.sql');
+               @unlink($import_path . 'readme.txt');
+               @unlink($filename);
+       }
+
+       // public
+       // imports LIVE language from the AFrame language database
+       function liveImport($language_code) {
+               global $db;
+
+               $tmp_lang_db = mysql_connect(AF_LANG_DB_HOST, AF_LANG_DB_USER, AF_LANG_DB_PASS);
+               // set database connection using utf8
+               mysql_query("SET NAMES 'utf8'", $tmp_lang_db);
+               
+               if (!$tmp_lang_db) {
+                       /* AF_ERROR_NO_DB_CONNECT */
+                       echo 'Unable to connect to db.';
+                       exit;
+               }
+               if (!mysql_select_db('dev_ATansformable_langs', $tmp_lang_db)) {
+                       echo 'DB connection established, but database "dev_ATansformable_langs" cannot be selected.';
+                       exit;
+               }
+
+               $sql = "SELECT * FROM languages_SVN WHERE language_code='$language_code'";
+               $result = mysql_query($sql, $tmp_lang_db);
+
+               if ($row = mysql_fetch_assoc($result)) {
+                       $row['reg_exp'] = addslashes($row['reg_exp']);
+                       $row['native_name'] = addslashes($row['native_name']);
+                       $row['english_name'] = addslashes($row['english_name']);
+
+                       $sql = "REPLACE INTO ".TABLE_PREFIX."languages VALUES ('{$row['language_code']}', '{$row['charset']}', '{$row['reg_exp']}', '{$row['native_name']}', '{$row['english_name']}', 3)";
+                       $result = mysql_query($sql, $db);
+
+                       $sql = "SELECT * FROM language_text_SVN WHERE language_code='$language_code'";
+                       $result = mysql_query($sql, $tmp_lang_db);
+
+                       $sql = "REPLACE INTO ".TABLE_PREFIX."language_text VALUES ";
+                       while ($row = mysql_fetch_assoc($result)) {
+                               $row['text'] = addslashes($row['text']);
+                               $row['context'] = addslashes($row['context']);
+                               $sql .= "('{$row['language_code']}', '{$row['variable']}', '{$row['term']}', '{$row['text']}', '{$row['revised_date']}', '{$row['context']}'),";
+                       }
+                       $sql = substr($sql, 0, -1);
+                       mysql_query($sql, $db);
+               }
+       }
+       
+}
+
+
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Language/LanguageParser.class.php b/docs/include/classes/Language/LanguageParser.class.php
new file mode 100644 (file)
index 0000000..9db3e6d
--- /dev/null
@@ -0,0 +1,110 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* LanguageParser
+* Class for parsing XML language info and returning a Language Object
+* @access      public
+* @author      Joel Kronenberg
+* @package     Language
+*/
+class LanguageParser {
+
+       // all private
+       var $parser; // the XML handler
+       var $language_rows = array(); // the language data used for creating the Language Object
+       var $character_data; // tmp variable for storing the data
+       var $element_path; // array of element paths (basically a stack)
+       var $row_num;
+
+       function LanguageParser() {
+               $this->parser = xml_parser_create(''); 
+
+               xml_set_object($this->parser, $this);
+               xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false); /* conform to W3C specs */
+               xml_set_element_handler($this->parser, 'startElement', 'endElement');
+               xml_set_character_data_handler($this->parser, 'characterData');
+       }
+
+       // public
+       function parse($xml_data) {
+               $this->element_path   = array();
+               $this->language_rows  = array();
+               $this->character_data = '';
+               $this->row_num        = 0;
+               xml_parse($this->parser, $xml_data, TRUE);
+       }
+
+       // public
+       function getLanguage($row_num) {
+               return new Language($this->language_rows[$row_num]);
+       }
+
+       // public
+       function getLanguageEditor($row_num) {
+               require_once(AF_INCLUDE_PATH.'classes/Language/LanguageEditor.class.php');
+               return new LanguageEditor($this->language_rows[$row_num]);
+       }
+
+       // private
+       function startElement($parser, $name, $attributes) {
+               array_push($this->element_path, $name);
+
+               if ($this->element_path == array('language')) {
+                       $this->language_rows[$this->row_num]['language_code'] = $attributes['code'];
+               }
+   }
+
+       // private
+       /* called when an element ends */
+       /* removed the current element from the $path */
+       function endElement($parser, $name) {
+               if ($this->element_path == array('language', 'aframe-version')) {
+                       $this->language_rows[$this->row_num]['version'] = trim($this->character_data);
+
+               } else if ($this->element_path === array('language', 'charset')) {
+                       $this->language_rows[$this->row_num]['charset'] = trim($this->character_data);
+
+               } else if ($this->element_path === array('language', 'reg-exp')) {
+                       $this->language_rows[$this->row_num]['reg_exp'] = trim($this->character_data);
+
+               } else if ($this->element_path === array('language', 'native-name')) {
+                       $this->language_rows[$this->row_num]['native_name'] = trim($this->character_data);
+
+               } else if ($this->element_path === array('language', 'english-name')) {
+                       $this->language_rows[$this->row_num]['english_name'] = trim($this->character_data);
+
+               } else if ($this->element_path === array('language', 'status')) {
+                       $this->language_rows[$this->row_num]['status'] = trim($this->character_data);
+
+               } else if ($this->element_path === array('language')) {
+                       $this->row_num++;
+               }
+
+               array_pop($this->element_path);
+               $this->character_data = '';
+       }
+
+       // private
+       function characterData($parser, $data){
+               $this->character_data .= $data;
+       }
+
+       // public
+       function getNumLanguages() {
+               return count($this->language_rows);
+       }
+}
+
+
+
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Language/LanguageUtility.class.php b/docs/include/classes/Language/LanguageUtility.class.php
new file mode 100644 (file)
index 0000000..857baf6
--- /dev/null
@@ -0,0 +1,53 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+/**\r
+* Utility functions for language \r
+* @access      public\r
+* @author      Cindy Qi Li\r
+*/\r
+\r
+if (!defined('AF_INCLUDE_PATH')) exit;\r
+\r
+class LanguageUtility {\r
+\r
+       /**\r
+       * return language code from given AFrame language code\r
+       * @access  public\r
+       * @param   $code\r
+       * @return  language code\r
+       * @author  Cindy Qi Li\r
+       */\r
+       public static function getParentCode($code = '') {\r
+               if (!$code && isset($this)) {\r
+                       $code = $this->code;\r
+               }\r
+               $peices = explode(AF_LANGUAGE_LOCALE_SEP, $code, 2);\r
+               return $peices[0];\r
+       }\r
+\r
+       /**\r
+       * return charset from given AFrame language code\r
+       * @access  public\r
+       * @param   $code\r
+       * @return  charset\r
+       * @author  Cindy Qi Li\r
+       */\r
+       public static function getLocale($code = '') {\r
+               if (!$code && isset($this)) {\r
+                       $code = $this->code;\r
+               }\r
+               $peices = explode(AF_LANGUAGE_LOCALE_SEP, $code, 2);\r
+               return $peices[1];\r
+       }\r
+}\r
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Language/LanguagesParser.class.php b/docs/include/classes/Language/LanguagesParser.class.php
new file mode 100644 (file)
index 0000000..8bc4aec
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+require_once(dirname(__FILE__) . '/LanguageParser.class.php');
+
+/**
+* LanguagesParser
+* Class for parsing XML languages info and returning a Language Objects
+* @access      public
+* @author      Joel Kronenberg
+* @package     Language
+*/
+class LanguagesParser extends LanguageParser {
+
+       // private
+       function startElement($parser, $name, $attributes) {
+               if ($name == 'languages') {
+                       // strip off the initial 'languages'
+                       $this->element_path = array();
+               } else {
+                       parent::startElement($this->parser, $name, $attributes);
+               }
+   }
+}
+
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Language/RemoteLanguageManager.class.php b/docs/include/classes/Language/RemoteLanguageManager.class.php
new file mode 100644 (file)
index 0000000..df9d8b2
--- /dev/null
@@ -0,0 +1,75 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* RemoteLanguageManager
+* Class for managing available languages as Language Objects.
+* @access      public
+* @author      Joel Kronenberg
+* @see         Language.class.php
+* @package     Language
+*/
+
+require_once(AF_INCLUDE_PATH.'classes/Language/LanguageParser.class.php');
+require_once(AF_INCLUDE_PATH.'classes/Language/LanguagesParser.class.php');
+
+class RemoteLanguageManager extends LanguageManager {
+
+       function RemoteLanguageManager() {
+               $version = str_replace('.','_',VERSION);
+               $language_xml = @file_get_contents('http://update.aframe.ca/languages/'.$version.'/languages.xml');
+               if ($language_xml === FALSE) {
+                       // fix for bug #2896
+                       $language_xml = @file_get_contents('http://update.aframe.ca/languages/1_5_3/languages.xml');
+               }
+               if ($language_xml !== FALSE) {
+
+                       $languageParser = new LanguagesParser();
+                       $languageParser->parse($language_xml);
+
+                       $this->numLanguages = $languageParser->getNumLanguages();
+
+                       for ($i = 0; $i < $this->numLanguages; $i++) {
+                               $thisLanguage = new Language($languageParser->getLanguage($i));
+
+                               $this->availableLanguages[$thisLanguage->getCode()][$thisLanguage->getCharacterSet()] =& $thisLanguage;
+                       }
+               } else {
+                       $this->numLanguages = 0;
+                       $this->availableLanguages = array();
+               }
+       }
+
+       // public
+       function fetchLanguage($language_code, $filename) {
+               $version = str_replace('.','_',VERSION);
+
+               $language_pack = @file_get_contents('http://update.aframe.ca/languages/' . $version . '/aframe_' . $version . '_' . $language_code . '.zip');
+
+               if ($language_pack) {
+                       $fp = fopen($filename, 'wb+');
+                       fwrite($fp, $language_pack, strlen($language_pack));
+
+                       return TRUE;
+               }
+               return FALSE;
+       }
+
+       function import($language_code) {
+               $filename = tempnam(AF_TEMP_DIR . 'import', $language_code);
+               if ($this->fetchLanguage($language_code, $filename)) {
+                       parent::import($filename);
+               }
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Menu.class.php b/docs/include/classes/Menu.class.php
new file mode 100644 (file)
index 0000000..d66e5d9
--- /dev/null
@@ -0,0 +1,403 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+ * Menu
+ * 1. Generate main menu items based on login user
+ * 2. Generate path in bread crumb
+ * 3. Decide the page to display (redirect) based on login user's privilege.
+ *    This page is set as current page
+ * 4. Generate sub menus of current page
+ * 5. Generate back to page of current page
+ * @access     public
+ * @author     Cindy Qi Li
+ * @package    Menu
+ */
+
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/PrivilegesDAO.class.php');
+
+class Menu {
+
+       // all private
+       var $pages;                               // top tab pages
+       var $current_page;                        // current page
+       var $root_page;                           // root page relative to current page
+       var $breadcrumb_path = array();           // array of breadcrumb path
+       var $sub_menus;                           // array of sub-menus of current page
+       var $path;                                // array of all parent pages to current page, used for breadcrumb path and generating back to page
+       var $back_to_page;                        // string of parent page to go back to
+
+       /**
+        * Constructor: Initialize top pages (tab menu), all pages accessible by current user, current page.
+        * Generate top tab menu items based on session user_id. If no user login in (public view), use public menu
+        * @access  public
+        * @param   None
+        * @author  Cindy Qi Li
+        */
+       function Menu()
+       {
+               $this->pages[AF_NAV_TOP] = array();        // top tab pages
+
+               $this->init();           // Initialize $this->pages[AF_NAV_PUBLIC] & $this->pages
+               $this->setTopPages();    // set top pages based on user id
+
+               // decide current page.
+               // if the page that user tries to access is from one of the public link
+               // but not define in user's priviledge pages, re-direct to the first $this->pages[AF_NAV_TOP]
+               $this->setCurrentPage();
+               $this->sub_menus = $this->setSubMenus($this->current_page);   // loop recursively to set $this->submenus to the top parent of $this->current_page
+               $this->root_page = $this->setRootPage($this->current_page);  
+               $this->path = $this->setPath($this->current_page);
+               $this->back_to_page = $this->setBackToPage();  
+       }
+
+       /**
+        * initialize: public accessible items ($this->pages[AF_NAV_PUBLIC]); all accessible pages ($this->pages)
+        * @access  private
+        * @param   user id
+        * @return  true
+        * @author  Cindy Qi Li
+        */
+       private function init()
+       {
+               // $_pages is defined in include/constants.inc.php
+               global $_pages, $_base_path;
+
+               // initialize $this->pages
+               $this->pages = $_pages;
+               // end of initializing $this->pages
+               
+               $priviledgesDAO = new PrivilegesDAO();
+               $rows = $priviledgesDAO->getPublicPrivileges();
+
+               if (is_array($rows))
+               {
+                       foreach ($rows as $id => $row)
+                       {
+                               $this->pages[AF_NAV_PUBLIC][] = array($row['link'] => array('title_var'=>$row['title_var'], 'parent'=>AF_NAV_TOP));
+                       }
+               }
+               // end of initializing $this->pages[AF_NAV_PUBLIC]
+
+               return true;
+       }
+
+       /**
+        * Set top pages array based on login user's priviledge. If there's no login user, use priviledges that are open to public.
+        * @access  private
+        * @param   none
+        * @return  true
+        * @author  Cindy Qi Li
+        */
+       private function setTopPages()
+       {
+               global $_base_path;
+
+               $priviledgesDAO = new PrivilegesDAO();
+
+               if (isset($_SESSION['user_id']) && $_SESSION['user_id'] <> 0)
+               {
+                       $rows = $priviledgesDAO->getUserPrivileges($_SESSION['user_id']);
+               }
+               else // public pages
+               {
+                       $rows = $priviledgesDAO->getPublicPrivileges();
+               }
+
+               if (is_array($rows))
+               {
+                       foreach ($rows as $id => $row)
+                       {
+                               $this->pages[AF_NAV_TOP][] = array('url' => $_base_path.$row['link'], 'title' => _AT($row['title_var']));
+
+                               // add section pages if it has not been defined in $this->pages
+                               if (!isset($this->pages[$row['link']]))
+                               {
+                                       $this->pages = array_merge($this->pages, 
+                                                          array($row['link'] => array('title_var'=>$row['title_var'], 'parent'=>AF_NAV_TOP)));
+                               }
+                       }
+               }
+
+               return true;
+       }
+
+       /**
+        * Decide current page.
+        * if the page that user tries to access is from one of the public link
+        * but not define in user's priviledge pages, re-direct to the first $this->pages[AF_NAV_TOP]
+        * @access  private
+        * @return  true
+        * @author  Cindy Qi Li
+        */
+       private function setCurrentPage()
+       {
+               global $_base_path, $_base_href, $msg;
+
+               $this->current_page = substr($_SERVER['PHP_SELF'], strlen($_base_path));
+
+               if (!isset($this->pages[$this->current_page]))
+               {
+                       if (!$this->isPublicLink($this->current_page))  // report error if the link is not from a public link
+                       {
+                               $msg->addError(array('PAGE_NOT_FOUND', $_base_href.$this->current_page));
+                       }
+
+                       // re-direct to first $_pages URL
+                       foreach ($this->pages[AF_NAV_TOP] as $page)
+                       {
+                               if ($_base_path.$this->current_page != $page['url'])
+                               {
+                                       header('location: '.$page['url']);
+                                               
+                                       // reset current_page after re-direction
+                                       $this->current_page = substr($_SERVER['PHP_SELF'], strlen($_base_path));
+                                               
+                                       // Note: must exit. otherwise, the rest of includeheader.inc.php proceeds and prints out all messages
+                                       // which is not going to be displayed at re-directed page.
+                                       exit;
+                               }
+                       }
+               }
+       }
+
+       /**
+       * Set sub-menus of current page by $_pages[$current_page]['children']
+       * @access  private
+       * @return  true
+       * @author  Cindy Qi Li
+       */
+       private function setSubMenus($page) {
+               global $_base_path;
+
+               if (isset($page) && defined($page)) 
+               {
+                       // reached the top
+                       return array();
+               } 
+               else if (isset($this->pages[$page]['children'])) 
+               {
+                       $sub_menus[] = array('url' => $_base_path . $page, 'title' => $this->getPageTitle($page));
+
+                       foreach ($this->pages[$page]['children'] as $child) 
+                       {
+                               $sub_menus[] = array('url' => $_base_path . $child, 
+                                                   'title' => $this->getPageTitle($child), 
+                                                   'has_children' => isset($this->pages[$child]['children']));
+                       }
+               } 
+               else if (isset($this->pages[$page]['parent'])) 
+               {
+                       // no children
+                       return $this->setSubMenus($this->pages[$page]['parent']);
+               }
+               
+               return $sub_menus;
+       }
+
+       /**
+       * Set the back to page of $this->current_page
+       * @access  private
+       * @return  true
+       * @author  Cindy Qi Li
+       */
+       private function setBackToPage() 
+       {
+               unset($this->path[0]);
+               if (isset($this->path[2]['url'], $this->sub_menus[0]['url']) && $this->path[2]['url'] == $this->sub_menus[0]['url']) {
+                       $back_to_page = $this->path[3];
+               } else if (isset($this->path[1]['url'], $this->sub_menus[0]['url']) && $this->path[1]['url'] == $this->sub_menus[0]['url']) {
+                       $back_to_page = isset($this->path[2]) ? $this->path[2] : null;
+               } else if (isset($this->path[1])) {
+                       $back_to_page = $this->path[1];
+               }
+               
+               return $back_to_page;
+       }
+       
+       /**
+        * Check if the given link is a pre-defined public link
+        * @access  private
+        * @param   $page
+        * @return  true  if is a pre-defined public link
+        *          false if not a pre-defined public link
+        * @author  Cindy Qi Li
+        */
+       private function isPublicLink($url)
+       {
+               foreach ($this->pages[AF_NAV_PUBLIC] as $page => $garbage)
+               {
+                       if ($page == $url) return true;
+               }
+
+               return false;
+       }
+
+       /**
+        * Return the page title of given page
+        * @access  private
+        * @param   $page
+        * @return  page title
+        *          empty if page is not defined
+        * @author  Cindy Qi Li
+        */
+       private function getPageTitle($page)
+       {
+               if (isset($this->pages[$page]['title'])) 
+               {
+                       $page_title = $this->pages[$page]['title'];
+               } 
+               else 
+               {
+                       $page_title = _AT($this->pages[$page]['title_var']);
+               }
+               
+               return $page_title;
+       }
+       
+       /**
+        * Return all pages array
+        * @access  public
+        * @return  all pages array
+        * @author  Cindy Qi Li
+        */
+       public function getAllPages()
+       {
+               return $this->pages;
+       }
+
+       /**
+        * Return top tab menu item array
+        * @access  public
+        * @return  top tab menu item array
+        * @author  Cindy Qi Li
+        */
+       public function getTopPages()
+       {
+               return $this->pages[AF_NAV_TOP];
+       }
+
+       /**
+        * Return top tab menu item array
+        * @access  public
+        * @return  top tab menu item array
+        * @author  Cindy Qi Li
+        */
+       public function getCurrentPage()
+       {
+               return $this->current_page;
+       }
+
+       /**
+        * Return sub menus of current page
+        * @access  public
+        * @return  top tab menu item array
+        * @author  Cindy Qi Li
+        */
+       public function getSubMenus()
+       {
+               return $this->sub_menus;
+       }
+
+       /**
+        * Return back to page of current page
+        * @access  public
+        * @return  back to page array
+        * @author  Cindy Qi Li
+        */
+       public function getBackToPage()
+       {
+               return $this->back_to_page;
+       }
+       
+       /**
+        * Set root page relative to the current page
+        * @access  public
+        * @return  root page
+        * @author  Cindy Qi Li
+        */
+       private function setRootPage($page)
+       {
+               global $_base_path;
+
+               $parent_page = $this->pages[$page]['parent'];
+
+               if (isset($parent_page) && defined($parent_page)) // check if $parent_page is
+               {
+                       return $_base_path . $page;
+               }
+               else if (isset($parent_page))
+               {
+                       return $this->getRootPage($parent_page);
+               }
+               else
+               {
+                       return $_base_path . $page;
+               }
+       }
+
+       /**
+        * Return root page relative to the current page
+        * @access  public
+        * @return  root page
+        * @author  Cindy Qi Li
+        */
+       public function getRootPage()
+       {
+               return $this->root_page;
+       }
+       
+       /**
+        * Return array of all parent items path to current page
+        * this array is used to determine back to page 
+        * @access  private
+        * @return  array of breadcrumb path
+        * @author  Cindy Qi Li
+        */
+       public function setPath($page)
+       {
+               global $_base_path;
+
+               $parent_page = $this->pages[$page]['parent'];
+
+               $page_title = $this->getPageTitle($page);
+
+               if (isset($parent_page) && defined($parent_page))
+               {
+                       $path[] = array('url' => $_base_path . $page, 'title' => $page_title);
+               }
+               else if (isset($parent_page))
+               {
+                       $path[] = array('url' => $_base_path . $page, 'title' => $page_title);
+                       $path = array_merge((array) $path, $this->setPath($parent_page));
+               } else {
+                       $path[] = array('url' => $_base_path . $page, 'title' => $page_title);
+               }
+
+               return $path;
+       }
+
+       /**
+        * Return breadcrumb path
+        * @access  public
+        * @return  root page
+        * @author  Cindy Qi Li
+        */
+       public function getPath()
+       {
+               return $this->path;
+       }
+       
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Message/Message.class.php b/docs/include/classes/Message/Message.class.php
new file mode 100644 (file)
index 0000000..715fcc6
--- /dev/null
@@ -0,0 +1,472 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* Message
+* Class acting as MessageHandler for various message types
+* @access      public
+* @author      Jacek Materna
+*/
+
+class Message {
+
+       /*
+       * Reference to savant obj.
+       * @access private
+       * @see /include/classes/Savant/Savant.php
+       * @var object   
+       */
+       var $savant;
+       
+       /*
+       * Stastic assoc. array of message types mapped to Savant template file names
+       * @access private
+       * @see /templates/
+       * @var array
+       */
+       var $tmpl = array(      'error' => 'errormessage.tmpl.php',
+                                               'feedback' => 'feedbackmessage.tmpl.php',
+                                               'warning' => 'warningmessage.tmpl.php',
+                                               'info' => 'infomessage.tmpl.php',
+                                               'confirm' => 'confirmmessage.tmpl.php'
+                               );
+       
+       /*
+       * Static assoc array of message types mapped to Language code prefixes
+       * @access private
+       * @see /include/lib/lang_constant.inc.php
+       * @var array    
+       */
+       var $prefix = array( 'error'  =>'AF_ERROR_',
+                                               'feedback' => 'AF_FEEDBACK_',
+                                               'warning' => 'AF_WARNING_',
+                                               'info' => 'AF_INFOS_',
+                                               'help' => 'AF_HELP_',
+                                               'confirm' => 'AF_CONFIRM_'
+                                 );
+       
+       /**
+       * Constructor
+       * @access  public
+       * @param   obj $savant Reference to Savant object
+       * @author  Jacek Materna
+       */
+       function Message($savant) { 
+               $this->savant = $savant;
+       } 
+               
+       /**
+       * Print message(s) of type $type. Processes stored messages in session var for type $type
+       * and translates them into language spec. Then passes processed data to savant template for display
+       * @access  public
+       * @param   string $type                                 error|warning|info|feedback|help|help_pop
+       * @author  Jacek Materna
+       */
+       function printAbstract($type) {
+               if (!isset($_SESSION['message'][$type])) return;
+
+               $_result = array();
+               
+               foreach($_SESSION['message'][$type] as $e => $item) {
+                       $result = '';
+
+                       if ($type == 'confirm') {
+                               // the confirm msg's have the hidden vars as the last element in the array
+                               $hide_button_no = array_pop($item);
+                               $button_no_text = array_pop($item);
+                               $button_yes_text = array_pop($item);
+                               $hidden_vars = array_pop($item);
+                               
+                               if (count($item) == 1) {
+                                       $item = $item[0];
+                               }
+                       }
+
+                       // $item is either just a code or an array of argument with a particular code
+                       if (is_array($item)) {
+       
+                       
+                               /* this is an array with terms to replace */
+                               $first = array_shift($item);
+                               $result = _AT($first); // lets translate the code
+                               
+                               if ($result == '') { // if the code is not in the db lets just print out the code for easier trackdown
+                                       $result = '[' . $first . ']';
+                               }
+                                                                               
+                               $terms = $item;
+                       
+                               /* replace the tokens with the terms */
+                               $result = vsprintf($result, $terms);
+                               
+                       } else {
+                               $result = _AT($item);
+                               if ($result == '') // if the code is not in the db lets just print out the code for easier trackdown
+                                       $result = '[' . $item . ']';
+                       }
+                       
+                       array_push($_result, $result); // append to array
+               }
+               
+               if (count($_result) > 0) {
+                       $this->savant->assign('item', $_result);        // pass translated payload to savant var for processing
+                       
+                       if ($type == 'confirm') {
+                               $this->savant->assign('hidden_vars', $hidden_vars);
+                               $this->savant->assign('button_yes_text', $button_yes_text);
+                               $this->savant->assign('button_no_text', $button_no_text);
+                               $this->savant->assign('hide_button_no', $hide_button_no);
+
+                       } else if ($type == 'help') { // special case for help message, we need to check a few conditions
+                               $a = (!isset($_GET['e']) && !$_SESSION['prefs']['PREF_HELP'] && !$_GET['h']);
+                               $b = ($_SESSION['prefs']['PREF_CONTENT_ICONS'] == 2);
+                               $c = isset($_GET['e']);
+                               $d = $_SESSION['course_id'];
+                               
+                               $this->savant->assign('a', $a);
+                               $this->savant->assign('b', $b);
+                               $this->savant->assign('c', $c);
+                               $this->savant->assign('d', $d);
+                       }
+               
+                       $this->savant->display($this->tmpl[$type]);
+               }
+
+               unset($_SESSION['message'][$type]);
+       }
+
+       /**
+       * Add message to be tracked by session obj
+       * @access  public
+       * @param   string $sync                                 ref to type of message
+       * @param   string|array $code                   code of the message or array(code, args...)
+       * @author  Jacek Materna
+       */
+       function addAbstract($sync, $code) {
+               $first = ''; // key value for storage
+               // Convert to strings
+               if (is_array($code)) {
+                       foreach($code as $e) {
+                               settype($e, "string");
+                       }
+
+                       $code[0] = $this->prefix[$sync] . $code[0]; // add prefix               
+
+                       $first = $code[0];
+               } else {
+                       if (!is_string($code))  
+                               settype($code, "string");
+                       
+                       $code = $this->prefix[$sync] . $code;
+                       $first = $code;         
+               }
+               
+               $payload = $code;
+               
+               if (!isset($_SESSION['message'][$sync]) || count($_SESSION['message'][$sync]) == 0) { // fresh
+                       
+                       // PHP 5 
+                       //try {
+                               $_SESSION['message'][$sync] = array($first => $payload);
+                       //} catch (Exception $e) {
+                       //      return false;
+                       //}
+               } else if (isset($_SESSION['message'][$sync][$first])) { // already data there for that code, append
+                       // existing data is either a collection or a single node
+                       if(is_array($_SESSION['message'][$sync][$first])) { // already an array there
+                               if (is_array($payload)) {
+                                       // lets ignore the code, its already there as the first element
+                                       $elem = array_shift($payload);
+                                       foreach($payload as $elem) {
+                                               array_push($_SESSION['message'][$sync][$first], $elem); // add ourselves to the chain
+                                       }
+                               } else // no array here yet
+                                       $_SESSION['message'][$sync][$first][] = $payload; // add ourselves 
+                               
+                       } else { // just a string
+                               if (is_array($payload)) {
+                                       $temp = $_SESSION['message'][$sync][$first]; // grab it
+                                       unset($_SESSION['message'][$sync][$first]); // make sure its gone
+                                       
+                                       $arr = array($temp);
+                                       
+                                       // skip first elem, we're asserting here that $first === $payload[0]
+                                       $grb = array_shift($payload);
+                                       foreach($payload as $elem) { // lets finish building the array
+                                               array_push($arr, $elem);
+                                       }
+                                       
+                                       $_SESSION['message'][$sync][$first] = $arr; // put it back 
+                               }
+                       }
+               } else {
+               
+                       // Already an array there, could be empty or have something in it, append.
+                       // Store key = value for much faster unset as needed 
+                       
+                       // PHP 5
+                       //try {
+                               $new = array($first => $payload);
+                               $final = array_merge((array) $_SESSION['message'][$sync], (array) $new);
+
+                               unset($_SESSION['message'][$sync]);
+                               $_SESSION['message'][$sync] = $final;
+                       //} catch (exception $e) {
+                       //      return false;
+                       //}
+               }
+       }
+       
+       /**
+       * Simply check is a type $type message isset in the session obj
+       * @access  public
+       * @param   string $type                                 what type of message to check for
+       * @author  Jacek Materna
+       */
+       function abstractContains($type) {
+               return (isset($_SESSION['message'][$type]));
+       }
+       
+       /**
+       * Deletes the tracked message code $code from the Session obj as well as all 
+       * if its children
+       * @access  public
+       * @param   string $type                                 what type of message to delete
+       # @param   string $code                                 The code to delete
+       * @author  Jacek Materna
+       */
+       function abstractDelete($type, $code) {
+               if (!is_string($code))
+                       settype($code, "string");
+
+               // Lets append the right prefic to this code for searching
+               $code = $this->prefix[$type] . $code;
+       
+               if(isset($_SESSION['message'][$type][$code])) {
+                       unset($_SESSION['message'][$type][$code]); // delete it and its children
+               }
+       }
+       
+       /**
+       * Add error message to be tracked by session obj
+       * @access  public
+       * @param   string|array $code                   code of the message or array(code, args...)
+       * @author  Jacek Materna
+       */
+       function addError($code) {
+               $this->addAbstract('error', $code);
+       }
+       
+       /**
+       * Print error messages using Savant template
+       * @access  public
+       * @author  Jacek Materna
+       */
+       function printErrors($optional=null) {
+               if ($optional != null)  // shortcut
+                       $this->addAbstract('error', $optional);
+
+               $this->printAbstract('error');
+       }
+       
+
+       function addConfirm($code, $hidden_vars = '', $button_yes_text='', $button_no_text='', $hide_button_no=false) {
+               $hidden_vars_string = '';
+               if (is_array($hidden_vars)) {
+                       foreach ($hidden_vars as $key => $value) {
+                               $hidden_vars_string .= '<input type="hidden" name="'.$key.'" value="'.$value.'" />';
+                       }
+               }
+               if (!is_array($code)) {
+                       $code = array($code);
+               }
+               $code[] = $hidden_vars_string;
+               $code[] = ($button_yes_text == '') ? _AT("submit_yes") : $button_yes_text;
+               $code[] = ($button_no_text == '') ? _AT("submit_no") : $button_no_text;
+               $code[] = $hide_button_no;
+               
+               $this->addAbstract('confirm', $code);
+       }
+       
+       function printConfirm($optional=null) {
+               if ($optional != null)  // shortcut
+                       $this->addAbstract('confirm', $optional);
+
+               $this->printAbstract('confirm');
+       }
+
+       /**
+       * Add warning message to be tracked by session obj
+       * @access  public
+       * @param   string|array $code                   code of the message or array(code, args...)
+       * @author  Jacek Materna
+       */
+       function addWarning($code) { 
+               $this->addAbstract('warning', $code);
+       }
+       
+       /**
+       * Print warning messages using Savant template
+       * @access  public
+       * @author  Jacek Materna
+       */
+       function printWarnings($optional=null) {
+               if ($optional != null)  // shortcut
+                       $this->addAbstract('warning', $optional);
+               
+               $this->printAbstract('warning');
+       }
+       
+       /**
+       * Add info message to be tracked by session obj
+       * @access  public
+       * @param   string|array $code                   code of the message or array(code, args...)
+       * @author  Jacek Materna
+       */
+       function addInfo($code) { 
+               $this->addAbstract('info', $code);
+       }
+       
+       /**
+       * Print info messages using Savant template
+       * @access  public
+       * @author  Jacek Materna
+       */
+       function printInfos($optional=null) { 
+               if ($optional != null)  // shortcut
+                       $this->addAbstract('info', $optional);
+
+               $this->printAbstract('info');
+       }
+       
+       /**
+       * Add feedback message to be tracked by session obj
+       * @access  public
+       * @param   string|array $code                   code of the message or array(code, args...)
+       * @author  Jacek Materna
+       */
+       function addFeedback($code) { 
+               $this->addAbstract('feedback', $code); 
+       }
+       
+       /**
+       * Print feedback messages using Savant template
+       * @access  public
+       * @author  Jacek Materna
+       */
+       function printFeedbacks($optional=null) {
+               if ($optional != null) // shortcut
+                       $this->addAbstract('feedback', $optional); 
+                       
+               $this->printAbstract('feedback');
+       }
+       
+       /**
+       * Add help message to be tracked by session obj
+       * @access  public
+       * @param   string|array $code                   code of the message or array(code, args...)
+       * @author  Jacek Materna
+       */
+       function addHelp($code) { 
+               $this->addAbstract('help', $code);
+       }
+       
+       /**
+       * Print help messages using Savant template
+       * @access  public
+       * @author  Jacek Materna
+       */
+       function printHelps($optional=null) {
+               if ($optional != null)  // shortcut
+                       $this->addAbstract('help', $optional);
+                       
+               $this->printAbstract('help');
+       }
+        
+       /**
+       * Dump all the messages in the session to the screen in the following order
+       * @access  public
+       * @author  Jacek Materna
+       */
+       function printAll() {
+               $this->printAbstract('feedback');
+               $this->printAbstract('error');
+               $this->printAbstract('warning');
+               $this->printAbstract('help');
+               $this->printAbstract('info');
+       }
+       
+       /**
+       * Print feedback message using Savant template with no Session dialog and
+       * no database dialog, straight text inside feedback box
+       * @access  public
+       * @param String String message to display inside feedback box
+       * @author  Jacek Materna
+       */
+       function printNoLookupFeedback($str) {
+               if (str != null) {
+                       $this->savant->assign('item', array($str));     // pass string to savant var for processing
+                       $this->savant->display($this->tmpl['feedback']);
+               }
+       }
+       
+       /**
+        * Method which simply check if a particular message type exists in the session obj
+        */
+       function containsErrors() {
+               return $this->abstractContains('error');
+       }
+       
+       function containsFeedbacks() {
+               return $this->abstractContains('feedback');
+       }
+       
+       function containsWarnings() {
+               return $this->abstractContains('warning');
+       }
+       
+       function containsInfos() {
+               return $this->abstractContains('info');
+       }
+       
+       function containsHelps() {
+               return $this->abstractContains('help');
+       }
+       
+       /**
+        * Method that allow deletion of individual Message codes form the Session obj
+        */
+       function deleteError($code) {
+               $this->abstractDelete('error', $code);
+       }
+       
+       function deleteFeedback($code) {
+               $this->abstractDelete('feedback', $code);
+       }
+       
+       function deleteWarning($code) {
+               $this->abstractDelete('warning', $code);
+       }
+       
+       function deleteInfo($code) {
+               $this->abstractDelete('info', $code);
+       }
+       
+       function deleteHelp($code) {
+               $this->abstractDelete('help', $code);
+       }
+       
+} // end of class
+
+
+
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Savant2/Savant2.php b/docs/include/classes/Savant2/Savant2.php
new file mode 100644 (file)
index 0000000..6e92ec5
--- /dev/null
@@ -0,0 +1,1793 @@
+<?php
+
+/**
+* 
+* Error constants.
+* 
+*/
+
+define('SAVANT2_ERROR_ASSIGN',       -1);
+define('SAVANT2_ERROR_ASSIGNREF',    -2);
+define('SAVANT2_ERROR_COMPILER',     -3);
+define('SAVANT2_ERROR_NOFILTER',     -4);
+define('SAVANT2_ERROR_NOPLUGIN',     -5);
+define('SAVANT2_ERROR_NOSCRIPT',     -6);
+define('SAVANT2_ERROR_NOTEMPLATE',   -7);
+define('SAVANT2_ERROR_COMPILE_FAIL', -8);
+
+
+/**
+* 
+* Error messages.
+* 
+*/
+
+if (! isset($GLOBALS['_SAVANT2']['error'])) {
+       $GLOBALS['_SAVANT2']['error'] = array(
+               SAVANT2_ERROR_ASSIGN       => 'assign() parameters not correct',
+               SAVANT2_ERROR_ASSIGNREF    => 'assignRef() parameters not correct',
+               SAVANT2_ERROR_COMPILER     => 'compiler not an object or has no compile() method',
+               SAVANT2_ERROR_NOFILTER     => 'filter file not found',
+               SAVANT2_ERROR_NOPLUGIN     => 'plugin file not found',
+               SAVANT2_ERROR_NOSCRIPT     => 'compiled template script file not found',
+               SAVANT2_ERROR_NOTEMPLATE   => 'template source file not found',
+               SAVANT2_ERROR_COMPILE_FAIL => 'template source failed to compile'
+       );
+}
+
+
+/**
+* 
+* Provides an object-oriented template system.
+* 
+* Savant2 helps you separate model logic from view logic using PHP as
+* the template language. By default, Savant2 does not compile templates.
+* However, you may pass an optional compiler object to compile template
+* source to include-able PHP code.
+* 
+* Please see the documentation at {@link http://phpsavant.com/}, and be
+* sure to donate! :-)
+* 
+* $Id: Savant2.php,v 1.32 2006/03/05 16:58:38 pmjones Exp $
+* 
+* @author Paul M. Jones <pmjones@ciaweb.net>
+* 
+* @package Savant2
+* 
+* @version 2.4.3 stable
+* 
+* @license LGPL http://www.gnu.org/copyleft/lesser.html
+* 
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 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
+* Lesser General Public License for more details.
+* 
+*/
+
+class Savant2 {
+       
+       
+       /**
+       * 
+       * PHP5 ONLY:  Whether or not to use __autoload().  Default is false.
+       * 
+       * @access private
+       * 
+       * @var bool
+       * 
+       */
+       
+       var $_autoload = false;
+       
+       
+       /**
+       * 
+       * PHP5 ONLY: What method __call() will alias to.
+       * 
+       * Generally 'plugin' or 'splugin' (as __call() is intended for those).
+       * 
+       * @access private
+       * 
+       * @var string
+       * 
+       */
+       
+       var $_call = 'plugin';
+       
+       
+       /**
+       * 
+       * The custom compiler (pre-processor) object, if any.
+       * 
+       * @access private
+       * 
+       * @var object
+       * 
+       */
+       
+       var $_compiler = null;
+       
+       
+       /**
+       * 
+       * The class type to use when instantiating error objects.
+       * 
+       * @access private
+       * 
+       * @var string
+       * 
+       */
+       
+       var $_error = null;
+       
+       
+       /**
+       * 
+       * Array of callbacks used to escape output.
+       * 
+       * @access private
+       * 
+       * @var array
+       * 
+       * @see setEscape()
+       * 
+       * @see addEscape()
+       * 
+       * @see escape()
+       * 
+       * @see _()
+       * 
+       */
+       
+       var $_escape = array('htmlspecialchars');
+       
+       
+       /**
+       * 
+       * Whether or not to extract assigned variables into fetch() scope.
+       * 
+       * When true, all variables and references assigned to Savant2 are
+       * extracted into the local scope of the template script at fetch()
+       * time, and may be addressed as "$varname" instead of
+       * "$this->varname".  The "$this->varname" notation will also work.
+       * 
+       * When false, you //must// use "$this->varname" in your templates to
+       * address a variable instead of "$varname".  This has three
+       * benefits: speed (no time spent extracting variables), memory use
+       * (saves RAM by not making new references to variables), and clarity
+       * (any $this->varname is obviously an assigned var, and vars created
+       * within the template are not prefixed with $this).
+       * 
+       * @access private
+       * 
+       * @var bool
+       * 
+       */
+       
+       var $_extract = false;
+       
+       
+       /**
+       * 
+       * The output of the template script.
+       * 
+       * @access private
+       * 
+       * @var string
+       * 
+       */
+       
+       var $_output = null;
+       
+       
+       /**
+       * 
+       * The set of search directories for resources (plugins/filters) and
+       * templates.
+       * 
+       * @access private
+       * 
+       * @var array
+       * 
+       */
+       
+       var $_path = array(
+               'resource' => array(),
+               'template' => array()
+       );
+       
+       
+       /**
+       * 
+       * Array of resource (plugin/filter) object instances.
+       * 
+       * @access private
+       * 
+       * @var array
+       * 
+       */
+       
+       var $_resource = array(
+               'plugin' => array(),
+               'filter' => array()
+       );
+       
+       
+       /**
+       * 
+       * Whether or not to automatically self-reference in plugins and filters.
+       * 
+       * @access private
+       * 
+       * @var bool
+       * 
+       */
+       
+       var $_reference = false;
+       
+       
+       /**
+       * 
+       * Whether or not to restrict template includes only to registered paths.
+       * 
+       * @access private
+       * 
+       * @var bool
+       * 
+       */
+       
+       var $_restrict = false;
+       
+       
+       /**
+       * 
+       * The path to the compiled template script file.
+       * 
+       * By default, the template source and template script are the same file.
+       *
+       * @access private
+       * 
+       * @var string
+       * 
+       */
+       
+       var $_script = null;
+       
+       
+       /**
+       * 
+       * The name of the default template source file.
+       * 
+       * @access private
+       * 
+       * @var string
+       * 
+       */
+       
+       var $_template = null;
+       
+       
+       // -----------------------------------------------------------------
+       //
+       // Constructor and general property setters
+       //
+       // -----------------------------------------------------------------
+       
+       
+       /**
+       * 
+       * Constructor.
+       * 
+       * @access public
+       * 
+       * @param array $conf An associative array of configuration keys for
+       * the Savant2 object.  Any, or none, of the keys may be set. The
+       * keys are:
+       * 
+       * 'template_path' => The default path string or array of directories
+       * to search for templates.
+       * 
+       * 'resource_path' => The default path string or array of directories
+       * to search for plugin and filter resources.
+       * 
+       * 'error' => The custom error class that Savant2 should use
+       * when returning errors.
+       * 
+       * 'extract' => Whether or not to extract variables into the local
+       * scope when executing a template.
+       * 
+       * 'template' => The default template source name to use.
+       * 
+       */
+       
+       function Savant2($conf = array())
+       {
+               // set the default template search dirs
+               if (isset($conf['template_path'])) {
+                       // user-defined dirs
+                       $this->setPath('template', $conf['template_path']);
+               } else {
+                       // default directory only
+                       $this->setPath('template', null);
+               }
+               
+               // set the default filter search dirs
+               if (isset($conf['resource_path'])) {
+                       // user-defined dirs
+                       $this->setPath('resource', $conf['resource_path']);
+               } else {
+                       // default directory only
+                       $this->setPath('resource', null);
+               }
+               
+               // do we allow __autoload() use?
+               if (isset($conf['autoload'])) {
+                       $this->setAutoload($conf['autoload']);
+               }
+               
+               // set the error class
+               if (isset($conf['error'])) {
+                       $this->setError($conf['error']);
+               }
+               
+               // set the extraction flag
+               if (isset($conf['extract'])) {
+                       $this->setExtract($conf['extract']);
+               }
+               
+               // set the restrict flag
+               if (isset($conf['restrict'])) {
+                       $this->setRestrict($conf['restrict']);
+               }
+               
+               // set the Savant reference flag
+               if (isset($conf['reference'])) {
+                       $this->setReference($conf['reference']);
+               }
+               
+               // set the default template
+               if (isset($conf['template'])) {
+                       $this->setTemplate($conf['template']);
+               }
+               
+               // set the output escaping callbacks
+               if (isset($config['escape'])) {
+                       call_user_func_array(
+                               array($this, 'setEscape'),
+                               (array) $config['escape']
+                       );
+               }       
+       }
+       
+       /**
+       * 
+       * Sets whether or not __autoload() is used when loading classes.
+       * 
+       * @access public
+       * 
+       * @param bool $flag True to use __autoload(), false to not use it.
+       * 
+       * @return void
+       * 
+       */
+       
+       function setAutoload($flag) {
+               $this->_autoload = (bool) $flag;
+       }
+       
+       
+       /**
+       * 
+       * Sets a custom compiler/pre-processor for template sources.
+       * 
+       * By default, Savant2 does not use a compiler; use this to set your
+       * own custom compiler (pre-processor) for template sources.
+       * 
+       * @access public
+       * 
+       * @param object $compiler The compiler object; it must have a
+       * "compile()" method.  If null or false, the current compiler object
+       * is removed from Savant2.
+       * 
+       * @return void
+       * 
+       * @throws object An error object with a SAVANT2_ERROR_COMPILER code.
+       * 
+       */
+       
+       function setCompiler(&$compiler)
+       {
+               if (! $compiler) {
+                       // nullify any current compiler
+                       $this->_compiler = null;
+               } elseif (is_object($compiler) && method_exists($compiler, 'compile')) {
+                       // refer to a compiler object
+                       $this->_compiler =& $compiler;
+               } else {
+                       // no usable compiler passed
+                       $this->_compiler = null;
+                       return $this->error(SAVANT2_ERROR_COMPILER);
+               }
+       }
+       
+       
+       /**
+       * 
+       * Sets the method that __call() will alias to.
+       * 
+       * @access public
+       * 
+       * @param string $method The Savant2 method for __call() to alias to,
+       * generally 'plugin' or 'splugin'.
+       * 
+       * @return void
+       * 
+       */
+       
+       function setCall($method = 'plugin')
+       {
+               $this->_call = $method;
+       }
+       
+       
+       /**
+       * 
+       * Sets the custom error class for Savant2 errors.
+       * 
+       * @access public
+       * 
+       * @param string $error The name of the custom error class name; if
+       * null or false, resets the error class to 'Savant2_Error'.
+       * 
+       * @return void
+       * 
+       */
+       
+       function setError($error)
+       {
+               if (! $error) {
+                       $this->_error = null;
+               } else {
+                       $this->_error = $error;
+               }
+       }
+       
+       
+       /**
+       *
+       * Turns path checking on/off.
+       * 
+       * @access public
+       *
+       * @param bool $flag True to turn on path checks, false to turn off.
+       *
+       * @return void
+       *
+       */
+       
+       function setRestrict($flag = false)
+       {
+               if ($flag) {
+                       $this->_restrict = true;
+               } else {
+                       $this->_restrict = false;
+               }
+       }
+       
+       
+       /**
+       *
+       * Turns extraction of variables on/off.
+       * 
+       * @access public
+       *
+       * @param bool $flag True to turn on extraction, false to turn off.
+       *
+       * @return void
+       *
+       */
+       
+       function setExtract($flag = true)
+       {
+               if ($flag) {
+                       $this->_extract = true;
+               } else {
+                       $this->_extract = false;
+               }
+       }
+       
+       
+       /**
+       *
+       * Sets the automated Savant reference for plugins and filters.
+       *
+       * @access public
+       *
+       * @param bool $flag Whether to reference Savant2 or not.
+       *
+       * @return void
+       *
+       */
+       
+       function setReference($flag = false)
+       {
+               $this->_reference = $flag;
+       }
+       
+       
+       /**
+       *
+       * Sets the default template name.
+       *
+       * @access public
+       *
+       * @param string $template The default template name.
+       *
+       * @return void
+       *
+       */
+       
+       function setTemplate($template)
+       {
+               $this->_template = $template;
+       }
+       
+       
+       /**
+       * 
+       * Internal version of class_exists() to allow for differing behaviors.
+       * 
+       * Under PHP4, there is only 1 param to class_exists(); in PHP5, there 
+       * are two.  However, if you pass 2 params to the PHP4 version, you get
+       * a parameter count warning; hence, this method.
+       * 
+       * Under PHP5, checks $this->_autload to see if __autoload() should be
+       * called.
+       * 
+       * @access public
+       * 
+       * @param string $class A class name.
+       * 
+       * @return bool Whether or not the class exists.
+       * 
+       */
+       
+       function _classExists($class) {
+               if (PHP_VERSION < '5') {
+                       // version 4.x
+                       return class_exists($class);
+               } else {
+                       // version 5.x
+                       return class_exists($class, $this->_autoload);
+               }
+       }
+       
+       
+       // -----------------------------------------------------------------
+       //
+       // Output escaping and management.
+       //
+       // -----------------------------------------------------------------
+       
+       
+       /**
+       * 
+       * Clears then sets the callbacks to use when calling $this->escape().
+       * 
+       * Each parameter passed to this function is treated as a separate
+       * callback.  For example:
+       * 
+       * <code>
+       * $savant->setEscape(
+       *        'stripslashes',
+       *        'htmlspecialchars',
+       *        array('StaticClass', 'method'),
+       *        array($object, $method)
+       * );
+       * </code>
+       * 
+       * @access public
+       *
+       * @return void
+       *
+       */
+       
+       function setEscape()
+       {
+               $this->_escape = func_get_args();
+       }
+       
+       
+       /**
+       * 
+       * Adds to the callbacks used when calling $this->escape().
+       * 
+       * Each parameter passed to this function is treated as a separate
+       * callback.  For example:
+       * 
+       * <code>
+       * $savant->addEscape(
+       *        'stripslashes',
+       *        'htmlspecialchars',
+       *        array('StaticClass', 'method'),
+       *        array($object, $method)
+       * );
+       * </code>
+       * 
+       * @access public
+       *
+       * @return void
+       *
+       */
+       
+       function addEscape()
+       {
+               $args = func_get_args();
+               $this->_escape = array_merge($this->_escape, $args);
+       }
+       
+       
+       /**
+       *
+       * Gets the array of output-escaping callbacks.
+       *
+       * @access public
+       *
+       * @return array The array of output-escaping callbacks.
+       *
+       */
+       
+       function getEscape()
+       {
+               return $this->_escape;
+       }
+       
+       
+       /**
+       *
+       * Applies escaping to a value.
+       * 
+       * You can override the predefined escaping callbacks by passing
+       * added parameters as replacement callbacks.
+       * 
+       * <code>
+       * // use predefined callbacks
+       * $result = $savant->escape($value);
+       * 
+       * // use replacement callbacks
+       * $result = $savant->escape(
+       *        $value,
+       *        'stripslashes',
+       *        'htmlspecialchars',
+       *        array('StaticClass', 'method'),
+       *        array($object, $method)
+       * );
+       * </code>
+       * 
+       * @access public
+       * 
+       * @param mixed $value The value to be escaped.
+       * 
+       * @return mixed
+       *
+       */
+       
+       function escape($value)
+       {
+               // were custom callbacks passed?
+               if (func_num_args() == 1) {
+               
+                       // no, only a value was passed.
+                       // loop through the predefined callbacks.
+                       foreach ($this->_escape as $func) {
+                               $value = call_user_func($func, $value);
+                       }
+                       
+               } else {
+               
+                       // yes, use the custom callbacks instead.
+                       $callbacks = func_get_args();
+                       
+                       // drop $value
+                       array_shift($callbacks);
+                       
+                       // loop through custom callbacks.
+                       foreach ($callbacks as $func) {
+                               $value = call_user_func($func, $value);
+                       }
+                       
+               }
+               
+               return $value;
+       }
+       
+       
+       /**
+       *
+       * Prints a value after escaping it for output.
+       * 
+       * You can override the predefined escaping callbacks by passing
+       * added parameters as replacement callbacks.
+       * 
+       * <code>
+       * // use predefined callbacks
+       * $this->_($value);
+       * 
+       * // use replacement callbacks
+       * $this->_(
+       *        $value,
+       *        'stripslashes',
+       *        'htmlspecialchars',
+       *        array('StaticClass', 'method'),
+       *        array($object, $method)
+       * );
+       * </code>
+       * 
+       * @access public
+       * 
+       * @param mixed $value The value to be escaped and printed.
+       * 
+       * @return void
+       *
+       */
+       
+       function eprint($value)
+       {
+               $args = func_get_args();
+               echo call_user_func_array(
+                       array($this, 'escape'),
+                       $args
+               );
+       }
+       
+       
+       /**
+       *
+       * Alias to eprint() and identical in every way.
+       * 
+       * @access public
+       * 
+       * @param mixed $value The value to be escaped and printed.
+       * 
+       * @return void
+       *
+       */
+       
+       function _($value)
+       {
+               $args = func_get_args();
+               return call_user_func_array(
+                       array($this, 'eprint'),
+                       $args
+               );
+       }
+       
+       
+       
+       // -----------------------------------------------------------------
+       //
+       // Path management and file finding
+       //
+       // -----------------------------------------------------------------
+       
+       
+       /**
+       *
+       * Sets an entire array of search paths.
+       *
+       * @access public
+       *
+       * @param string $type The type of path to set, typcially 'template'
+       * or 'resource'.
+       * 
+       * @param string|array $new The new set of search paths.  If null or
+       * false, resets to the current directory only.
+       *
+       * @return void
+       *
+       */
+       
+       function setPath($type, $new)
+       {
+               // clear out the prior search dirs
+               $this->_path[$type] = array();
+               
+               // convert from string to path
+               if (is_string($new) && ! strpos($new, '://')) {
+                       // the search config is a string, and it's not a stream
+                       // identifier (the "://" piece), add it as a path
+                       // string.
+                       $new = explode(PATH_SEPARATOR, $new);
+               } else {
+                       // force to array
+                       settype($new, 'array');
+               }
+               
+               // always add the fallback directories as last resort
+               switch (strtolower($type)) {
+               case 'template':
+                       $this->addPath($type, '.');
+                       break;
+               case 'resource':
+                       $this->addPath($type, dirname(__FILE__) . '/Savant2/');
+                       break;
+               }
+               
+               // actually add the user-specified directories
+               foreach ($new as $dir) {
+                       $this->addPath($type, $dir);
+               }
+       }
+       
+       
+       /**
+       *
+       * Adds a search directory for templates.
+       *
+       * @access public
+       *
+       * @param string $dir The directory or stream to search.
+       *
+       * @return void
+       *
+       */
+       
+       function addPath($type, $dir)
+       {
+               // no surrounding spaces allowed!
+               $dir = trim($dir);
+               
+               // add trailing separators as needed
+               if (strpos($dir, '://') && substr($dir, -1) != '/') {
+                       // stream
+                       $dir .= '/';
+               } elseif (substr($dir, -1) != DIRECTORY_SEPARATOR) {
+                       // directory
+                       $dir .= DIRECTORY_SEPARATOR;
+               }
+               
+               // add to the top of the search dirs
+               array_unshift($this->_path[$type], $dir);
+       }
+       
+       
+       /**
+       *
+       * Gets the array of search directories for template sources.
+       *
+       * @access public
+       *
+       * @return array The array of search directories for template sources.
+       *
+       */
+       
+       function getPath($type = null)
+       {
+               if (! $type) {
+                       return $this->_path;
+               } else {
+                       return $this->_path[$type];
+               }
+       }
+       
+       
+       /**
+       * 
+       * Searches a series of paths for a given file.
+       * 
+       * @param array $type The type of paths to search (template, plugin,
+       * or filter).
+       * 
+       * @param string $file The file name to look for.
+       * 
+       * @return string|bool The full path and file name for the target file,
+       * or boolean false if the file is not found in any of the paths.
+       *
+       */
+       
+       function findFile($type, $file)
+       {
+               // get the set of paths
+               $set = $this->getPath($type);
+               
+               // start looping through them
+               foreach ($set as $path) {
+                       
+                       // get the path to the file
+                       $fullname = $path . $file;
+                       
+                       // are we doing path checks?
+                       if (! $this->_restrict) {
+                       
+                               // no.  this is faster but less secure.
+                               if (file_exists($fullname) && is_readable($fullname)) {
+                                       return $fullname;
+                               }
+                               
+                       } else {
+                               
+                               // yes.  this is slower, but attempts to restrict
+                               // access only to defined paths.
+                               
+                               // is the path based on a stream?
+                               if (strpos($path, '://') === false) {
+                                       // not a stream, so do a realpath() to avoid
+                                       // directory traversal attempts on the local file
+                                       // system. Suggested by Ian Eure, initially
+                                       // rejected, but then adopted when the secure
+                                       // compiler was added.
+                                       $path = realpath($path); // needed for substr() later
+                                       $fullname = realpath($fullname);
+                               }
+                               
+                               // the substr() check added by Ian Eure to make sure
+                               // that the realpath() results in a directory registered
+                               // with Savant so that non-registered directores are not
+                               // accessible via directory traversal attempts.
+                               if (file_exists($fullname) && is_readable($fullname) &&
+                                       substr($fullname, 0, strlen($path)) == $path) {
+                                       return $fullname;
+                               }
+                       }
+               }
+               
+               // could not find the file in the set of paths
+               return false;
+       }
+       
+       
+       // -----------------------------------------------------------------
+       //
+       // Variable and reference assignment
+       //
+       // -----------------------------------------------------------------
+       
+       
+       /**
+       * 
+       * Sets variables for the template.
+       * 
+       * This method is overloaded; you can assign all the properties of
+       * an object, an associative array, or a single value by name.
+       * 
+       * You are not allowed to set variables that begin with an underscore;
+       * these are either private properties for Savant2 or private variables
+       * within the template script itself.
+       * 
+       * <code>
+       * 
+       * $Savant2 = new Savant2();
+       * 
+       * // assign directly
+       * $Savant2->var1 = 'something';
+       * $Savant2->var2 = 'else';
+       * 
+       * // assign by name and value
+       * $Savant2->assign('var1', 'something');
+       * $Savant2->assign('var2', 'else');
+       * 
+       * // assign by assoc-array
+       * $ary = array('var1' => 'something', 'var2' => 'else');
+       * $Savant2->assign($obj);
+       * 
+       * // assign by object
+       * $obj = new stdClass;
+       * $obj->var1 = 'something';
+       * $obj->var2 = 'else';
+       * $Savant2->assign($obj);
+       * 
+       * </code>
+       * 
+       * Greg Beaver came up with the idea of assigning to public class
+       * properties.
+       * 
+       * @access public
+       * 
+       * @return void
+       * 
+       * @throws object An error object with a SAVANT2_ERROR_ASSIGN code.
+       * 
+       */
+       
+       function assign()
+       {
+               // this method is overloaded.
+               $arg = func_get_args();
+               
+               // must have at least one argument. no error, just do nothing.
+               if (! isset($arg[0])) {
+                       return;
+               }
+               
+               // assign by object
+               if (is_object($arg[0])) {
+                       // assign public properties
+                       foreach (get_object_vars($arg[0]) as $key => $val) {
+                               if (substr($key, 0, 1) != '_') {
+                                       $this->$key = $val;
+                               }
+                       }
+                       return;
+               }
+               
+               // assign by associative array
+               if (is_array($arg[0])) {
+                       foreach ($arg[0] as $key => $val) {
+                               if (substr($key, 0, 1) != '_') {
+                                       $this->$key = $val;
+                               }
+                       }
+                       return;
+               }
+               
+               // assign by string name and mixed value.
+               // 
+               // we use array_key_exists() instead of isset() becuase isset()
+               // fails if the value is set to null.
+               if (is_string($arg[0]) &&
+                       substr($arg[0], 0, 1) != '_' &&
+                       array_key_exists(1, $arg)) {
+                       $this->$arg[0] = $arg[1];
+               } else {
+                       return $this->error(SAVANT2_ERROR_ASSIGN, $arg);
+               }
+       }
+       
+       
+       /**
+       * 
+       * Sets references for the template.
+       * 
+       * // assign by name and value
+       * $Savant2->assignRef('ref', $reference);
+       * 
+       * // assign directly
+       * $Savant2->ref =& $reference;
+       * 
+       * Greg Beaver came up with the idea of assigning to public class
+       * properties.
+       * 
+       * @access public
+       * 
+       * @param string $key The name for the reference in the template.
+       *
+       * @param mixed &$val The referenced variable.
+       * 
+       * @return void
+       * 
+       * @throws object An error object with a SAVANT2_ERROR_ASSIGNREF code.
+       * 
+       */
+       
+       function assignRef($key, &$val)
+       {
+               if (is_string($key) && substr($key, 0, 1) != '_') {
+                       $this->$key =& $val;
+               } else {
+                       return $this->error(
+                               SAVANT2_ERROR_ASSIGNREF,
+                               array('key' => $key, 'val' => $val)
+                       );
+               }
+       }
+       
+       
+       /**
+       *
+       * Unsets assigned variables and references.
+       * 
+       * @access public
+       * 
+       * @param mixed $var If null, clears all variables; if a string, clears
+       * the one variable named by the string; if a sequential array, clears
+       * the variables names in that array.
+       * 
+       * @return void
+       *
+       */
+       
+       function clear($var = null)
+       {
+               if (is_null($var)) {
+                       // clear all variables
+                       $var = array_keys(get_object_vars($this));
+               } else {
+                       // clear specific variables
+                       settype($var, 'array');
+               }
+               
+               // clear out the selected variables
+               foreach ($var as $name) {
+                       if (substr($name, 0, 1) != '_' && isset($this->$name)) {
+                               unset($this->$name);
+                       }
+               }
+       }
+       
+       
+       /**
+       * 
+       * Gets the current value of one, many, or all assigned variables.
+       * 
+       * Never returns variables starting with an underscore; these are
+       * reserved for internal Savant2 use.
+       * 
+       * @access public
+       * 
+       * @param mixed $key If null, returns a copy of all variables and
+       * their values; if an array, returns an only those variables named
+       * in the array; if a string, returns only that variable.
+       * 
+       * @return mixed If multiple variables were reqested, returns an
+       * associative array where the key is the variable name and the 
+       * value is the variable value; if one variable was requested,
+       * returns the variable value only.
+       * 
+       */
+       
+       function getVars($key = null)
+       {
+               if (is_null($key)) {
+                       $key = array_keys(get_object_vars($this));
+               }
+               
+               if (is_array($key)) {
+                       // return a series of vars
+                       $tmp = array();
+                       foreach ($key as $var) {
+                               if (substr($var, 0, 1) != '_' && isset($this->$var)) {
+                                       $tmp[$var] = $this->$var;
+                               }
+                       }
+                       return $tmp;
+               } else {
+                       // return a single var
+                       if (substr($key, 0, 1) != '_' && isset($this->$key)) {
+                               return $this->$key;
+                       }
+               }
+       }
+       
+       
+       // -----------------------------------------------------------------
+       //
+       // Template processing
+       //
+       // -----------------------------------------------------------------
+       
+       
+       /**
+       *
+       * Loads a template script for execution (does not execute the script).
+       * 
+       * This will optionally compile the template source into a PHP script
+       * if a compiler object has been passed into Savant2.
+       * 
+       * Also good for including templates from the template paths within
+       * another template, like so:
+       *
+       * include $this->loadTemplate('template.tpl.php');
+       * 
+       * @access public
+       *
+       * @param string $tpl The template source name to look for.
+       * 
+       * @param bool $setScript Default false; if true, sets the $this->_script
+       * property to the resulting script path (or null on error).  Normally,
+       * only $this->fetch() will need to set this to true.
+       * 
+       * @return string The full path to the compiled template script.
+       * 
+       * @throws object An error object with a SAVANT2_ERROR_NOTEMPLATE code.
+       * 
+       */
+       
+       function loadTemplate($tpl = null, $setScript = false)
+       {
+               // set to default template if none specified.
+               if (is_null($tpl)) {
+                       $tpl = $this->_template;
+               }
+               
+               // find the template source.
+               $file = $this->findFile('template', $tpl);
+               if (! $file) {
+                       return $this->error(
+                               SAVANT2_ERROR_NOTEMPLATE,
+                               array('template' => $tpl)
+                       );
+               }
+               
+               // are we compiling source into a script?
+               if (is_object($this->_compiler)) {
+                       // compile the template source and get the path to the
+                       // compiled script (will be returned instead of the
+                       // source path)
+                       $result = $this->_compiler->compile($file);
+               } else {
+                       // no compiling requested, return the source path
+                       $result = $file;
+               }
+               
+               // is there a script from the compiler?
+               if (! $result || $this->isError($result)) {
+               
+                       if ($setScript) {
+                               $this->_script = null;
+                       }
+                       
+                       // return an error, along with any error info
+                       // generated by the compiler.
+                       return $this->error(
+                               SAVANT2_ERROR_NOSCRIPT,
+                               array(
+                                       'template' => $tpl,
+                                       'compiler' => $result
+                               )
+                       );
+                       
+               } else {
+               
+                       if ($setScript) {
+                               $this->_script = $result;
+                       }
+                       
+                       return $result;
+                       
+               }
+       }
+       
+       
+       /**
+       * 
+       * This is a an alias to loadTemplate() that cannot set the script.
+       * 
+       * @access public
+       *
+       * @param string $tpl The template source name to look for.
+       * 
+       * @return string The full path to the compiled template script.
+       * 
+       * @throws object An error object with a SAVANT2_ERROR_NOTEMPLATE code.
+       * 
+       */
+       
+       function findTemplate($tpl = null)
+       {
+               return $this->loadTemplate($tpl, false);
+       }
+       
+       
+       /**
+       * 
+       * Executes a template script and returns the results as a string.
+       * 
+       * @param string $_tpl The name of the template source file ...
+       * automatically searches the template paths and compiles as needed.
+       * 
+       * @return string The output of the the template script.
+       * 
+       * @throws object An error object with a SAVANT2_ERROR_NOSCRIPT code.
+       * 
+       */
+       
+       function fetch($_tpl = null)
+       {
+               // clear prior output
+               $this->_output = null;
+               
+               // load the template script
+               $_result = $this->loadTemplate($_tpl, true);
+               
+               // is there a template script to be processed?
+               if ($this->isError($_result)) {
+                       return $_result;
+               }
+               
+               // unset so as not to introduce into template scope
+               unset($_tpl);
+               unset($_result);
+               
+               // never allow a 'this' property
+               if (isset($this->this)) {
+                       unset($this->this);
+               }
+               
+               // are we extracting variables into local scope?
+               if ($this->_extract) {
+                       // extract references to this object's public properties.
+                       // this allows variables assigned by-reference to refer all
+                       // the way back to the model logic.  variables assigned
+                       // by-copy only refer back to the property.
+                       foreach (array_keys(get_object_vars($this)) as $_prop) {
+                               if (substr($_prop, 0, 1) != '_') {
+                                       // set a variable-variable to an object property
+                                       // reference
+                                       $$_prop =& $this->$_prop;
+                               }
+                       }
+                       
+                       // unset private loop vars
+                       unset($_prop);
+               }
+               
+               // start capturing output into a buffer
+               ob_start();
+               
+               // include the requested template filename in the local scope
+               // (this will execute the view logic).
+               include $this->_script;
+               
+               // done with the requested template; get the buffer and 
+               // clear it.
+               $this->_output = ob_get_contents();
+               ob_end_clean();
+               
+               // done!
+               return $this->applyFilters();
+       }
+       
+       
+       /**
+       * 
+       * Execute and display a template script.
+       * 
+       * @param string $tpl The name of the template file to parse;
+       * automatically searches through the template paths.
+       * 
+       * @return void
+       * 
+       * @throws object An error object with a SAVANT2_ERROR_NOSCRIPT code.
+       * 
+       * @see fetch()
+       * 
+       */
+       
+       function display($tpl = null)
+       {
+               $result = $this->fetch($tpl);
+               if ($this->isError($result)) {
+                       return $result;
+               } else {
+                       echo $result;
+               }
+       }
+       
+       
+       // -----------------------------------------------------------------
+       //
+       // Plugins
+       //
+       // -----------------------------------------------------------------
+       
+       
+       /**
+       *
+       * Loads a plugin class and instantiates it within Savant2.
+       *
+       * @access public
+       *
+       * @param string $name The plugin name (not including Savant2_Plugin_
+       * prefix).
+       *
+       * @param array $conf An associative array of plugin configuration
+       * options.
+       *
+       * @param bool $savantRef Default false.  When true, sets the $Savant
+       * property of the filter to a reference to this Savant object.
+       *
+       * @return void
+       * 
+       * @throws object An error object with a SAVANT2_ERROR_NOPLUGIN code.
+       * 
+       */
+       
+       function loadPlugin($name, $conf = array(), $savantRef = null)
+       {
+               // if no $savantRef is provided, use the default.
+               if (is_null($savantRef)) {
+                       $savantRef = $this->_reference;
+               }
+               
+               // some basic information
+               $class = "Savant2_Plugin_$name";
+               $file = "$class.php";
+               
+               // is it loaded?
+               if (! $this->_classExists($class)) {
+                       
+                       $result = $this->findFile('resource', $file);
+                       if (! $result) {
+                               return $this->error(
+                                       SAVANT2_ERROR_NOPLUGIN,
+                                       array('plugin' => $name)
+                               );
+                       } else {
+                               include_once $result;
+                       }
+               }
+               
+               // is it instantiated?
+               if (! isset($this->_resource['plugin'][$name]) ||
+                       ! is_object($this->_resource['plugin'][$name]) ||
+                       ! is_a($this->_resource['plugin'][$name], $class)) {
+                       
+                       // instantiate it
+                       $this->_resource['plugin'][$name] = new $class($conf);
+                       
+                       // add a Savant reference if requested
+                       if ($savantRef) {
+                               $this->_resource['plugin'][$name]->Savant =& $this;
+                       }
+                       
+               }
+       }
+       
+       
+       /**
+       *
+       * Unloads one or more plugins from Savant2.
+       *
+       * @access public
+       *
+       * @param string|array $name The plugin name (not including Savant2_Plugin_
+       * prefix).  If null, unloads all plugins; if a string, unloads that one
+       * plugin; if an array, unloads all plugins named as values in the array.
+       *
+       * @return void
+       * 
+       */
+       
+       function unloadPlugin($name = null)
+       {
+               if (is_null($name)) {
+                       $this->_resource['plugin'] = array();
+               } else {
+                       settype($name, 'array');
+                       foreach ($name as $key) {
+                               if (isset($this->_resource['plugin'][$key])) {
+                                       unset($this->_resource['plugin'][$key]);
+                               }
+                       }
+               }
+       }
+       
+       
+       /**
+       *
+       * Executes a plugin with arbitrary parameters and returns the
+       * result.
+       * 
+       * @access public
+       * 
+       * @param string $name The plugin name (not including Savant2_Plugin_
+       * prefix).
+       *
+       * @return mixed The plugin results.
+       *
+       * @throws object An error object with a SAVANT2_ERROR_NOPLUGIN code.
+       * 
+       * @see loadPlugin()
+       * 
+       */
+       
+       function splugin($name)
+       {
+               // attempt to load the plugin
+               $result = $this->loadPlugin($name);
+               if ($this->isError($result)) {
+                       return $result;
+               }
+               
+               // call the plugin's "plugin()" method with arguments,
+               // dropping the first argument (the plugin name)
+               $args = func_get_args();
+               array_shift($args);
+               return call_user_func_array(
+                       array(&$this->_resource['plugin'][$name], 'plugin'), $args
+               );
+       }
+       
+       
+       /**
+       *
+       * Executes a plugin with arbitrary parameters and displays the
+       * result.
+       * 
+       * @access public
+       * 
+       * @param string $name The plugin name (not including Savant2_Plugin_
+       * prefix).
+       *
+       * @return void
+       * 
+       * @throws object An error object with a SAVANT2_ERROR_NOPLUGIN code.
+       * 
+       */
+       
+       function plugin($name)
+       {
+               $args = func_get_args();
+               
+               $result = call_user_func_array(
+                       array(&$this, 'splugin'),
+                       $args
+               );
+               
+               if ($this->isError($result)) {
+                       return $result;
+               } else {
+                       echo $result;
+               }
+       }
+       
+       
+       /**
+       *
+       * PHP5 ONLY: Magic method alias to plugin().
+       * 
+       * E.g., instead of $this->plugin('form', ...) you would use
+       * $this->form(...).  You can set this to use any other Savant2 method
+       * by issuing, for example, setCall('splugin') to use splugin() ... which 
+       * is really the only other sensible choice.
+       * 
+       * @access public
+       * 
+       * @param string $func The plugin name.
+       *
+       * @param array $args Arguments passed to the plugin.
+       *
+       * @return void
+       * 
+       * @throws object An error object with a SAVANT2_ERROR_NOPLUGIN code.
+       * 
+       */
+       
+       function __call($func, $args)
+       {
+               // add the plugin name to the args
+               array_unshift($args, $func);
+               
+               // call the plugin() method
+               return call_user_func_array(
+                       array(&$this, $this->_call),
+                       $args
+               );
+       }
+       
+       
+       // -----------------------------------------------------------------
+       //
+       // Filters
+       //
+       // -----------------------------------------------------------------
+       
+       
+       /**
+       *
+       * Loads a filter class and instantiates it within Savant2.
+       *
+       * @access public
+       *
+       * @param string $name The filter name (not including Savant2_Filter_
+       * prefix).
+       *
+       * @param array $conf An associative array of filter configuration
+       * options.
+       * 
+       * @param bool $savantRef Default false.  When true, sets the $Savant
+       * property of the filter to a reference to this Savant object.
+       *
+       * @return void
+       * 
+       * @throws object An error object with a SAVANT2_ERROR_NOFILTER code.
+       * 
+       */
+       
+       function loadFilter($name, $conf = array(), $savantRef = null)
+       {
+               // if no $savantRef is provided, use the default.
+               if (is_null($savantRef)) {
+                       $savantRef = $this->_reference;
+               }
+               
+               // some basic information
+               $class = "Savant2_Filter_$name";
+               $file = "$class.php";
+               
+               // is it loaded?
+               if (! $this->_classExists($class)) {
+                       
+                       $result = $this->findFile('resource', $file);
+                       if (! $result) {
+                               return $this->error(
+                                       SAVANT2_ERROR_NOFILTER,
+                                       array('filter' => $name)
+                               );
+                       } else {
+                               include_once $result;
+                       }
+               }
+               
+               // is it instantiated?
+               if (! isset($this->_resource['filter'][$name]) ||
+                       ! is_object($this->_resource['filter'][$name]) ||
+                       ! is_a($this->_resource['filter'][$name], $class)) {
+                       
+                       // instantiate it
+                       $this->_resource['filter'][$name] = new $class($conf);
+                       
+                       // add a Savant reference if requested
+                       if ($savantRef) {
+                               $this->_resource['filter'][$name]->Savant = $this;
+                       }
+                       
+               }
+       }
+       
+       
+       /**
+       *
+       * Unloads one or more filters from Savant2.
+       *
+       * @access public
+       *
+       * @param string|array $name The filter name (not including Savant2_Filter_
+       * prefix).  If null, unloads all filters; if a string, unloads that one
+       * filter; if an array, unloads all filters named as values in the array.
+       *
+       * @return void
+       * 
+       */
+       
+       function unloadFilter($name = null)
+       {
+               if (is_null($name)) {
+                       $this->_resource['filter'] = array();
+               } else {
+                       settype($name, 'array');
+                       foreach ($name as $key) {
+                               if (isset($this->_resource['filter'][$key])) {
+                                       unset($this->_resource['filter'][$key]);
+                               }
+                       }
+               }
+       }
+       
+       
+       /**
+       *
+       * Apply all loaded filters, in order, to text.
+       *
+       * @access public
+       *
+       * @param string $text The text to which filters should be applied. 
+       * If null, sets the text to $this->_output.
+       * 
+       * @return string The text after being passed through all loded
+       * filters.
+       * 
+       */
+       
+       function applyFilters($text = null)
+       {
+               // set to output text if no text specified
+               if (is_null($text)) {
+                       $text = $this->_output;
+               }
+               
+               // get the list of filter names...
+               $filter = array_keys($this->_resource['filter']);
+               
+               // ... and apply them each in turn.
+               foreach ($filter as $name) {
+                       $this->_resource['filter'][$name]->filter($text);
+               }
+               
+               // done
+               return $text;
+       }
+       
+       
+       // -----------------------------------------------------------------
+       //
+       // Error handling
+       //
+       // -----------------------------------------------------------------
+       
+       
+       /**
+       *
+       * Returns an error object.
+       * 
+       * @access public
+       * 
+       * @param int $code A SAVANT2_ERROR_* constant.
+       * 
+       * @param array $info An array of error-specific information.
+       * 
+       * @return object An error object of the type specified by
+       * $this->_error.
+       * 
+       */
+       
+       function &error($code, $info = array())
+       {
+               // the error config array
+               $conf = array(
+                       'code' => $code,
+                       'text' => 'Savant2: ',
+                       'info' => (array) $info
+               );
+               
+               // set an error message from the globals
+               if (isset($GLOBALS['_SAVANT2']['error'][$code])) {
+                       $conf['text'] .= $GLOBALS['_SAVANT2']['error'][$code];
+               } else {
+                       $conf['text'] .= '???';
+               }
+               
+               // set up the error class name
+               if ($this->_error) {
+                       $class = 'Savant2_Error_' . $this->_error;
+               } else {
+                       $class = 'Savant2_Error';
+               }
+
+               // set up the error class file name
+               $file = $class . '.php';
+               
+               // is it loaded?
+               if (! $this->_classExists($class)) {
+                       
+                       // find the error class
+                       $result = $this->findFile('resource', $file);
+                       if (! $result) {
+                               // could not find the custom error class, revert to
+                               // Savant_Error base class.
+                               $class = 'Savant2_Error';
+                               $result = dirname(__FILE__) . '/Savant2/Error.php';
+                       }
+                       
+                       // include the error class
+                       include_once $result;
+               }
+               
+               // instantiate and return the error class
+               $err = new $class($conf);
+               return $err;
+       }
+       
+       
+       /**
+       *
+       * Tests if an object is of the Savant2_Error class.
+       * 
+       * @access public
+       * 
+       * @param object &$obj The object to be tested.
+       * 
+       * @return boolean True if $obj is an error object of the type
+       * Savant2_Error, or is a subclass that Savant2_Error. False if not.
+       *
+       */
+       
+       function isError(&$obj)
+       {
+               if (is_object($obj)) {
+                       if (is_a($obj, 'Savant2_Error') ||
+                               is_subclass_of($obj, 'Savant2_Error')) {
+                               return true;
+                       }
+               }
+               
+               return false;
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Savant2/Savant2/Compiler.php b/docs/include/classes/Savant2/Savant2/Compiler.php
new file mode 100644 (file)
index 0000000..6333177
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+
+/**
+* 
+* Abstract Savant2_Compiler class.
+* 
+* You have to extend this class for it to be useful; e.g., "class
+* Savant2_Plugin_example extends Savant2_Plugin".
+* 
+* $Id: Compiler.php,v 1.5 2005/08/09 22:19:39 pmjones Exp $
+* 
+* @author Paul M. Jones <pmjones@ciaweb.net>
+* 
+* @package Savant2
+* 
+* @license LGPL http://www.gnu.org/copyleft/lesser.html
+* 
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 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
+* Lesser General Public License for more details.
+*
+*/
+
+class Savant2_Compiler {
+       
+       /**
+       * 
+       * Reference to the "parent" Savant object.
+       *
+       */
+       
+       var $Savant = null;
+       
+       
+       /**
+       * 
+       * Constructor.
+       * 
+       * @access public
+       * 
+       */
+       
+       function Savant2_Compiler($conf = array())
+       {
+               settype($conf, 'array');
+               foreach ($conf as $key => $val) {
+                       $this->$key = $val;
+               }
+       }
+       
+       
+       /**
+       * 
+       * Stub method for extended behaviors.
+       *
+       * @access public
+       * 
+       * @return void
+       *
+       */
+       
+       function compile($tpl)
+       {
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Savant2/Savant2/Error.php b/docs/include/classes/Savant2/Savant2/Error.php
new file mode 100644 (file)
index 0000000..f18da71
--- /dev/null
@@ -0,0 +1,125 @@
+<?php
+
+/**
+* 
+* Provides a simple error class for Savant.
+*
+* $Id: Error.php,v 1.2 2005/08/09 22:19:39 pmjones Exp $
+* 
+* @author Paul M. Jones <pmjones@ciaweb.net>
+* 
+* @package Savant2
+* 
+* @license LGPL http://www.gnu.org/copyleft/lesser.html
+* 
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 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
+* Lesser General Public License for more details.
+* 
+*/
+
+class Savant2_Error {
+       
+       
+       /**
+       * 
+       * The error code, typically a SAVANT_ERROR_* constant.
+       * 
+       * @access public
+       *
+       * @var int
+       *
+       */
+       
+       var $code = null;
+       
+       
+       /**
+       * 
+       * An array of error-specific information.
+       * 
+       * @access public
+       *
+       * @var array
+       *
+       */
+       
+       var $info = array();
+       
+       
+       /**
+       * 
+       * The error message text.
+       *
+       * @access public
+       *
+       * @var string
+       *
+       */
+       
+       var $text = null;
+       
+       
+       /**
+       * 
+       * A debug backtrace for the error, if any.
+       *
+       * @access public
+       *
+       * @var array
+       *
+       */
+       
+       var $backtrace = null;
+       
+       
+       /**
+       * 
+       * Constructor.
+       *
+       * @access public
+       *
+       * @param array $conf An associative array where the key is a
+       * Savant2_Error property and the value is the value for that
+       * property.
+       *
+       */
+       
+       function Savant2_Error($conf = array())
+       {
+               // set public properties
+               foreach ($conf as $key => $val) {
+                       $this->$key = $val;
+               }
+               
+               // generate a backtrace
+               if (function_exists('debug_backtrace')) {
+                       $this->backtrace = debug_backtrace();
+               }
+               
+               // extended behaviors
+               $this->error();
+       }
+       
+       
+       /**
+       * 
+       * Stub method for extended behaviors.
+       *
+       * @access public
+       * 
+       * @return void
+       *
+       */
+       
+       function error()
+       {
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Savant2/Savant2/Filter.php b/docs/include/classes/Savant2/Savant2/Filter.php
new file mode 100644 (file)
index 0000000..6adb652
--- /dev/null
@@ -0,0 +1,76 @@
+<?php
+
+/**
+* 
+* Abstract Savant2_Filter class.
+* 
+* You have to extend this class for it to be useful; e.g., "class
+* Savant2_Filter_example extends Savant2_Filter".
+* 
+* $Id: Filter.php,v 1.2 2005/08/09 22:19:39 pmjones Exp $
+* 
+* @author Paul M. Jones <pmjones@ciaweb.net>
+* 
+* @package Savant2
+* 
+* @license LGPL http://www.gnu.org/copyleft/lesser.html
+* 
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 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
+* Lesser General Public License for more details.
+*
+*/
+
+class Savant2_Filter {
+       
+       /**
+       * 
+       * Optional reference to the calling Savant object.
+       * 
+       * @var object
+       * 
+       */
+       
+       var $Savant = null;
+       
+       
+       /**
+       * 
+       * Constructor.
+       * 
+       * @access public
+       * 
+       */
+       
+       function Savant2_Filter($conf = array())
+       {
+               settype($conf, 'array');
+               foreach ($conf as $key => $val) {
+                       $this->$key = $val;
+               }
+       }
+       
+       
+       /**
+       * 
+       * Stub method for extended behaviors.
+       *
+       * @access public
+       * 
+       * @param string &$text The text to filter.
+       *
+       * @return void
+       *
+       */
+       
+       function filter(&$text)
+       {
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Savant2/Savant2/Plugin.php b/docs/include/classes/Savant2/Savant2/Plugin.php
new file mode 100644 (file)
index 0000000..835e22d
--- /dev/null
@@ -0,0 +1,74 @@
+<?php
+
+/**
+* 
+* Abstract Savant2_Plugin class.
+* 
+* You have to extend this class for it to be useful; e.g., "class
+* Savant2_Plugin_example extends Savant2_Plugin".
+* 
+* $Id: Plugin.php,v 1.2 2005/08/09 22:19:39 pmjones Exp $
+* 
+* @author Paul M. Jones <pmjones@ciaweb.net>
+* 
+* @package Savant2
+* 
+* @license LGPL http://www.gnu.org/copyleft/lesser.html
+* 
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 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
+* Lesser General Public License for more details.
+*
+*/
+
+class Savant2_Plugin {
+       
+       /**
+       * 
+       * Optional reference to the calling Savant object.
+       * 
+       * @var object
+       * 
+       */
+       
+       var $Savant = null;
+       
+       
+       /**
+       * 
+       * Constructor.
+       * 
+       * @access public
+       * 
+       */
+       
+       function Savant2_Plugin($conf = array())
+       {
+               settype($conf, 'array');
+               foreach ($conf as $key => $val) {
+                       $this->$key = $val;
+               }
+       }
+       
+       
+       /**
+       * 
+       * Stub method for extended behaviors.
+       *
+       * @access public
+       * 
+       * @return void
+       *
+       */
+       
+       function plugin()
+       {
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Savant2/Savant2/Savant2_Error_exception.php b/docs/include/classes/Savant2/Savant2/Savant2_Error_exception.php
new file mode 100644 (file)
index 0000000..48e01ad
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+
+/**
+* The base Savant2_Error class.
+*/
+require_once 'Savant2/Error.php';
+
+/**
+* A simple Savant2_Exception class.
+*/
+class Savant2_Exception extends Exception { };
+
+/**
+* 
+* Throws PHP5 exceptions for Savant.
+*
+* $Id: Savant2_Error_exception.php,v 1.4 2005/08/09 22:19:39 pmjones Exp $
+* 
+* @author Paul M. Jones <pmjones@ciaweb.net>
+* 
+* @package Savant2
+* 
+* @license LGPL http://www.gnu.org/copyleft/lesser.html
+* 
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 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
+* Lesser General Public License for more details.
+* 
+*/
+
+class Savant2_Error_exception extends Savant2_Error {
+       
+       
+       /**
+       * 
+       * Throws an Savant2_Exception in PHP5.
+       * 
+       * @return void
+       * 
+       */
+       
+       function error()
+       {
+               throw new Savant2_Exception($this->text, $this->code);
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Savant2/Savant2/Savant2_Error_pear.php b/docs/include/classes/Savant2/Savant2/Savant2_Error_pear.php
new file mode 100644 (file)
index 0000000..1963122
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+
+/**
+* The base Savant2_Error class.
+*/
+require_once 'Savant2/Error.php';
+
+/**
+* The PEAR_Error class.
+*/
+require_once 'PEAR.php';
+
+/**
+* 
+* Provides an interface to PEAR_ErrorStack class for Savant.
+*
+* $Id: Savant2_Error_pear.php,v 1.2 2005/08/09 22:19:39 pmjones Exp $
+* 
+* @author Paul M. Jones <pmjones@ciaweb.net>
+* 
+* @package Savant2
+* 
+* @license LGPL http://www.gnu.org/copyleft/lesser.html
+* 
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 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
+* Lesser General Public License for more details.
+* 
+*/
+
+class Savant2_Error_pear extends Savant2_Error {
+       
+       
+       /**
+       * 
+       * Extended behavior for PEAR_Error.
+       *
+       * @access public
+       *
+       * @return void
+       *
+       */
+       
+       function error()
+       {
+               // throw a PEAR_Error
+               PEAR::throwError($this->text, $this->code, $this->info);
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Savant2/Savant2/Savant2_Error_stack.php b/docs/include/classes/Savant2/Savant2/Savant2_Error_stack.php
new file mode 100644 (file)
index 0000000..e532891
--- /dev/null
@@ -0,0 +1,60 @@
+<?php
+
+/**
+* The base Savant2_Error class.
+*/
+require_once 'Savant2/Error.php';
+
+/**
+* The PEAR_ErrorStack class.
+*/
+require_once 'PEAR/ErrorStack.php';
+
+/**
+* 
+* Provides an interface to PEAR_ErrorStack class for Savant.
+*
+* $Id: Savant2_Error_stack.php,v 1.2 2005/08/09 22:19:39 pmjones Exp $
+* 
+* @author Paul M. Jones <pmjones@ciaweb.net>
+* 
+* @package Savant2
+* 
+* @license LGPL http://www.gnu.org/copyleft/lesser.html
+* 
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 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
+* Lesser General Public License for more details.
+* 
+*/
+
+class Savant2_Error_stack extends Savant2_Error {
+       
+       
+       /**
+       * 
+       * Pushes an error onto the PEAR_ErrorStack.
+       * 
+       * @return void
+       * 
+       */
+       
+       function error()
+       {
+               // push an error onto the stack
+               PEAR_ErrorStack::staticPush(
+                       'Savant2',       // package name
+                       $this->code,    // error code
+                       null,           // error level
+                       $this->info,    // user info
+                       $this->text     // error message
+               );
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Savant2/Savant2/Savant2_Plugin_cycle.php b/docs/include/classes/Savant2/Savant2/Savant2_Plugin_cycle.php
new file mode 100644 (file)
index 0000000..5244033
--- /dev/null
@@ -0,0 +1,97 @@
+<?php
+
+/**
+* Base plugin class.
+*/
+require_once 'Savant2/Plugin.php';
+
+/**
+* 
+* Cycles through a series of values.
+* 
+* $Id: Savant2_Plugin_cycle.php,v 1.2 2005/08/09 22:19:39 pmjones Exp $
+* 
+* @author Paul M. Jones <pmjones@ciaweb.net>
+* 
+* @package Savant2
+* 
+* @license LGPL http://www.gnu.org/copyleft/lesser.html
+* 
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 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
+* Lesser General Public License for more details.
+* 
+*/
+
+class Savant2_Plugin_cycle extends Savant2_Plugin {
+       
+       /**
+       * 
+       * An associative array of predefined cycle value sets.
+       * 
+       * You can preset cycle values via Savant::loadPlugin().
+       * 
+       * $conf = array(
+       *     'values' => array(
+       *         'lightdark' => array('light', 'dark'),
+       *         'threesome' => array('one', 'two', 'three')
+       *     )
+       * );
+       * 
+       * $Savant->loadPlugin('cycle', $conf);
+       * 
+       * ... and in your template you can call:
+       * 
+       * $this->plugin('cycle', 'lightdark', $iteration);
+       * 
+       * @access public
+       * 
+       * @var array
+       * 
+       */
+       
+       var $values = array();
+       
+       
+       /**
+       * 
+       * Cycles through a series of values.
+       * 
+       * @access public
+       * 
+       * @param string|array $cycle If a string, the preset cycle value key to use
+       * from $this->cycles; if an array, use the array as the cycle values.
+       * 
+       * @param int $iteration The iteration number for the cycle.
+       * 
+       * @param int $repeat The number of times to repeat each cycle value.
+       * 
+       * @return mixed The value of the cycle iteration.
+       * 
+       */
+       
+       function plugin($cycle, $iteration, $repeat = 1)
+       {
+               // get the proper value set as an array
+               if (is_string($cycle) && isset($this->values[$cycle])) {
+                       $values = (array) $this->values[$cycle];
+               } else {
+                       $values = (array) $cycle;
+               }
+               
+               // prevent divide-by-zero errors
+               if ($repeat == 0) {
+                       $repeat = 1;
+               }
+               
+               // return the perper value for iteration and repetition
+               return $values[($iteration / $repeat) % count($values)];
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/User.class.php b/docs/include/classes/User.class.php
new file mode 100644 (file)
index 0000000..f1a86dc
--- /dev/null
@@ -0,0 +1,125 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+ * User
+ * @access     public
+ * @author     Cindy Qi Li
+ * @package    User
+ */
+
+define('AF_INCLUDE_PATH', '../../include/');
+require_once(AF_INCLUDE_PATH. 'classes/DAO/UsersDAO.class.php');
+
+class User {
+
+       // all private
+       var $userID;                               // set by setUserID
+       var $userDAO;                              // DAO for this user
+
+       /**
+        * Constructor
+        * doing nothing
+        * @access  public
+        * @param   None
+        * @author  Cindy Qi Li
+        */
+       function User($user_id)
+       {
+               $this->userID = $user_id;
+
+               $this->userDAO = new UsersDAO();
+       }
+
+       /**
+        * Based on this->userID, return (first name, last name), if first name, last name not exists, return login name
+        * @access  public
+        * @param   none
+        * @return  first name, last name. if not exists, return login name
+        * @author  Cindy Qi Li
+        */
+       public function getUserName()
+       {
+               return $this->userDAO->getUserName($this->userID);
+       }
+
+       /**
+        * Return all info of this->userID 
+        * @access  public
+        * @param   none
+        * @return  table row
+        * @author  Cindy Qi Li
+        */
+       public function getInfo()
+       {
+               return $this->userDAO->getUserByID($this->userID);
+       }
+
+       /**
+        * Check if user is admin 
+        * @access  public
+        * @param   none
+        * @return  true : if is an admin
+        *          false : if not an admin
+        * @author  Cindy Qi Li
+        */
+       public function isAdmin()
+       {
+               $row = $this->userDAO->getUserByID($this->userID);
+               
+               if ($row['user_group_id'] == AF_USER_GROUP_ADMIN)
+                       return true;
+               else
+                       return false;
+       }
+
+       /**
+        * Update user's first, last name
+        * @access  public
+        * @param   $firstName : first name
+        *          $lastName : last name
+        * @return  true    if update successfully
+        *          false   if update unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function setName($firstName, $lastName)
+       {
+               return $this->userDAO->setName($this->userID, $firstName, $lastName);
+       }
+
+       /**
+        * Update user's password
+        * @access  public
+        * @param   $password
+        * @return  true    if update successfully
+        *          false   if update unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function setPassword($password)
+       {
+               return $this->userDAO->setPassword($this->userID, $password);
+       }
+
+       /**
+        * Update user's email
+        * @access  public
+        * @param   $email
+        * @return  true    if update successfully
+        *          false   if update unsuccessful
+        * @author  Cindy Qi Li
+        */
+       public function setEmail($email)
+       {
+               return $this->userDAO->setEmail($this->userID, $email);
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/Utility.class.php b/docs/include/classes/Utility.class.php
new file mode 100644 (file)
index 0000000..44126f2
--- /dev/null
@@ -0,0 +1,122 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+/**\r
+* Utility functions \r
+* @access      public\r
+* @author      Cindy Qi Li\r
+*/\r
+\r
+if (!defined('AF_INCLUDE_PATH')) exit;\r
+\r
+class Utility {\r
+\r
+       /**\r
+       * return a unique random string based on the given length\r
+       * @access  public\r
+       * @param   none\r
+       * @return  a random string\r
+       * @author  Cindy Qi Li\r
+       */\r
+       public static function getRandomStr($length = "")\r
+       {\r
+               $code = md5(uniqid(rand(), true));\r
+               if ($length != "") return substr($code, 0, $length);\r
+               else return $code;\r
+       }\r
+\r
+       /**\r
+       * This function deletes $dir recrusively without deleting $dir itself.\r
+       * @access  public\r
+       * @param   string $charsets_array       The name of the directory where all files and folders under needs to be deleted\r
+       * @author  Cindy Qi Li\r
+       */\r
+       public static function clearDir($dir) {\r
+               if(!$opendir = @opendir($dir)) {\r
+                       return false;\r
+               }\r
+               \r
+               while(($readdir=readdir($opendir)) !== false) {\r
+                       if (($readdir !== '..') && ($readdir !== '.')) {\r
+                               $readdir = trim($readdir);\r
+       \r
+                               clearstatcache(); /* especially needed for Windows machines: */\r
+       \r
+                               if (is_file($dir.'/'.$readdir)) {\r
+                                       if(!@unlink($dir.'/'.$readdir)) {\r
+                                               return false;\r
+                                       }\r
+                               } else if (is_dir($dir.'/'.$readdir)) {\r
+                                       /* calls lib function to clear subdirectories recrusively */\r
+                                       if(!Utility::clrDir($dir.'/'.$readdir)) {\r
+                                               return false;\r
+                                       }\r
+                               }\r
+                       }\r
+               } /* end while */\r
+       \r
+               @closedir($opendir);\r
+               \r
+               return true;\r
+       }\r
+\r
+       /**\r
+       * Enables deletion of directory if not empty\r
+       * @access  public\r
+       * @param   string $dir          the directory to delete\r
+       * @return  boolean                      whether the deletion was successful\r
+       * @author  Joel Kronenberg\r
+       */\r
+       public static function clrDir($dir) {\r
+               if(!$opendir = @opendir($dir)) {\r
+                       return false;\r
+               }\r
+               \r
+               while(($readdir=readdir($opendir)) !== false) {\r
+                       if (($readdir !== '..') && ($readdir !== '.')) {\r
+                               $readdir = trim($readdir);\r
+       \r
+                               clearstatcache(); /* especially needed for Windows machines: */\r
+       \r
+                               if (is_file($dir.'/'.$readdir)) {\r
+                                       if(!@unlink($dir.'/'.$readdir)) {\r
+                                               return false;\r
+                                       }\r
+                               } else if (is_dir($dir.'/'.$readdir)) {\r
+                                       /* calls itself to clear subdirectories */\r
+                                       if(!Utility::clrDir($dir.'/'.$readdir)) {\r
+                                               return false;\r
+                                       }\r
+                               }\r
+                       }\r
+               } /* end while */\r
+       \r
+               @closedir($opendir);\r
+               \r
+               if(!@rmdir($dir)) {\r
+                       return false;\r
+               }\r
+               return true;\r
+       }\r
+\r
+       /* takes the array of valid prefs and assigns them to the current session */\r
+       public static function assign_session_prefs($prefs) {\r
+               unset($_SESSION['prefs']);\r
+               \r
+               if (is_array($prefs)) {\r
+                       foreach($prefs as $pref_name => $value) {\r
+                               $_SESSION['prefs'][$pref_name] = $value;\r
+                       }\r
+               }\r
+       }\r
+}\r
+?>
\ No newline at end of file
diff --git a/docs/include/classes/phpmailer/aframemailer.class.php b/docs/include/classes/phpmailer/aframemailer.class.php
new file mode 100644 (file)
index 0000000..ec00e62
--- /dev/null
@@ -0,0 +1,142 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+require(dirname(__FILE__) . '/class.phpmailer.php');
+
+/**
+* AFrameMailer is modified from AFrameMailer
+*
+* AFrameMailer extends PHPMailer and sets all the default values
+* that are common for AFrame.
+* @access  public
+* @see     include/classes/phpmailer/class.phpmailer.php
+* @since   AFrame 0.1
+* @author  Cindy Li
+*/
+class AFrameMailer extends PHPMailer {
+
+       /**
+       * The constructor sets whether to use SMTP or Sendmail depending
+       * on the value of MAIL_USE_SMTP defined in the config.inc.php file.
+       * @access  public
+       * @since   AFrame 0.2
+       * @author  Joel Kronenberg
+       */
+       function AFrameMailer() {
+               if (MAIL_USE_SMTP) {
+                       $this->IsSMTP(); // set mailer to use SMTP
+                       $this->Host = ini_get('SMTP');  // specify main and backup server
+               } else {
+                       $this->IsSendmail(); // use sendmail
+                       $this->Sendmail = ini_get('sendmail_path');
+               }
+
+               $this->SMTPAuth = false;  // turn on SMTP authentication
+               $this->IsHTML(false);
+
+               // send the email in the current encoding:
+               global $myLang;
+               $this->CharSet = $myLang->getCharacterSet();
+       }
+
+       /**
+       * Appends a custom AFrame footer to all outgoing email then sends the email.
+       * If mail_queue is enabled then instead of sending the mail out right away, it 
+       * places it in the database and waits for the cron to send it using SendQueue().
+       * The mail queue does not support reply-to, or attachments, and converts all BCCs
+       * to regular To emails.
+       * @access  public
+       * @return  boolean      whether or not the mail was sent (or queued) successfully.
+       * @see     parent::send()
+       * @since   AFrame 0.1
+       * @author  Joel Kronenberg
+       */
+       function Send() {
+               global $_config;
+
+               // attach the AFrame footer to the body first:
+               $this->Body .=  "\n\n".'----------------------------------------------'."\n";
+               $this->Body .= _AT('sent_via_AFrame', AF_BASE_HREF);
+
+               $this->Body .= "\n"._AT('home').': http://atutor.ca';
+
+               // if this email has been queued then don't send it. instead insert it in the db
+               // for each bcc or to or cc
+               if ($_config['enable_mail_queue'] && !$this->attachment) 
+               {
+                       require_once(AF_INCLUDE_PATH.'classes/DAO/MailQueueDAO.class.php');
+                       $mailQueueDAO = new MailQueueDAO();
+                       
+                       for ($i = 0; $i < count($this->to); $i++) {
+                               $mailQueueDAO->Create(addslashes($this->to[$i][0]), addslashes($this->to[$i][1]), addslashes($this->From), addslashes($this->FromName), addslashes($this->Subject), addslashes($this->Body), addslashes($this->CharSet));
+                       }
+                       for($i = 0; $i < count($this->cc); $i++) {
+                               $mailQueueDAO->Create(addslashes($this->cc[$i][0]), addslashes($this->cc[$i][1]), addslashes($this->From), addslashes($this->FromName), addslashes($this->Subject), addslashes($this->Body), addslashes($this->CharSet));
+                       }
+                       for($i = 0; $i < count($this->bcc); $i++) {
+                               $mailQueueDAO->Create(addslashes($this->bcc[$i][0]), addslashes($this->bcc[$i][1]), addslashes($this->From), addslashes($this->FromName), addslashes($this->Subject), addslashes($this->Body), addslashes($this->CharSet));
+                       }
+                       return true;
+               } else {
+                       return parent::Send();
+               }
+       }
+
+       /**
+       * Sends all the queued mail. Called by ./admin/cron.php.
+       * @access public
+       * @return void
+       * @since AFrame 0.2
+       * @author Joel Kronenberg
+       */
+       function SendQueue() {
+               global $db;
+
+               require_once(AF_INCLUDE_PATH.'classes/DAO/MailQueueDAO.class.php');
+               $mailQueueDAO = new MailQueueDAO();
+               $rows = $mailQueueDAO->getAll();
+
+               $mail_ids = '';
+               
+               if (is_array($rows))
+               {
+                       foreach ($rows as $id => $row) 
+                       {
+                               $this->ClearAllRecipients();
+       
+                               $this->AddAddress($row['to_email'], $row['to_name']);
+                               $this->From     = $row['from_email'];
+                               $this->FromName = $row['from_name'];
+                               $this->CharSet  = $row['char_set'];
+                               $this->Subject  = $row['subject'];
+                               $this->Body     = $row['body'];
+       
+                               parent::Send();
+       
+                               $mail_ids .= $row['mail_id'].',';
+                       }
+                       if ($mail_ids) 
+                       {
+                               include(AF_INCLUDE_PATH.'classes/DAO/MailQueueDAO.class.php');
+                               $mailQueueDAO = new MailQueueDAO();
+       
+                               $mail_ids = substr($mail_ids, 0, -1); // remove the last comma
+                               $mailQueueDAO->DeleteByIDs($mail_ids);
+                       }
+               }
+       }
+
+}
+
+?>
diff --git a/docs/include/classes/phpmailer/class.phpmailer.php b/docs/include/classes/phpmailer/class.phpmailer.php
new file mode 100644 (file)
index 0000000..b0e1446
--- /dev/null
@@ -0,0 +1,1499 @@
+<?php\r
+////////////////////////////////////////////////////\r
+// PHPMailer - PHP email class\r
+//\r
+// Class for sending email using either\r
+// sendmail, PHP mail(), or SMTP.  Methods are\r
+// based upon the standard AspEmail(tm) classes.\r
+//\r
+// Copyright (C) 2001 - 2003  Brent R. Matzelle\r
+//\r
+// License: LGPL, see LICENSE\r
+////////////////////////////////////////////////////\r
+\r
+/**\r
+ * PHPMailer - PHP email transport class\r
+ * @package PHPMailer\r
+ * @author Brent R. Matzelle\r
+ * @copyright 2001 - 2003 Brent R. Matzelle\r
+ */\r
+class PHPMailer\r
+{\r
+    /////////////////////////////////////////////////\r
+    // PUBLIC VARIABLES\r
+    /////////////////////////////////////////////////\r
+\r
+    /**\r
+     * Email priority (1 = High, 3 = Normal, 5 = low).\r
+     * @var int\r
+     */\r
+    var $Priority          = 3;\r
+\r
+    /**\r
+     * Sets the CharSet of the message.\r
+     * @var string\r
+     */\r
+    var $CharSet           = "iso-8859-1";\r
+\r
+    /**\r
+     * Sets the Content-type of the message.\r
+     * @var string\r
+     */\r
+    var $ContentType        = "text/plain";\r
+\r
+    /**\r
+     * Sets the Encoding of the message. Options for this are "8bit",\r
+     * "7bit", "binary", "base64", and "quoted-printable".\r
+     * @var string\r
+     */\r
+    var $Encoding          = "8bit";\r
+\r
+    /**\r
+     * Holds the most recent mailer error message.\r
+     * @var string\r
+     */\r
+    var $ErrorInfo         = "";\r
+\r
+    /**\r
+     * Sets the From email address for the message.\r
+     * @var string\r
+     */\r
+    var $From               = "";\r
+\r
+    /**\r
+     * Sets the From name of the message.\r
+     * @var string\r
+     */\r
+    var $FromName           = "";\r
+\r
+    /**\r
+     * Sets the Sender email (Return-Path) of the message.  If not empty,\r
+     * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.\r
+     * @var string\r
+     */\r
+    var $Sender            = "";\r
+\r
+    /**\r
+     * Sets the Subject of the message.\r
+     * @var string\r
+     */\r
+    var $Subject           = "";\r
+\r
+    /**\r
+     * Sets the Body of the message.  This can be either an HTML or text body.\r
+     * If HTML then run IsHTML(true).\r
+     * @var string\r
+     */\r
+    var $Body               = "";\r
+\r
+    /**\r
+     * Sets the text-only body of the message.  This automatically sets the\r
+     * email to multipart/alternative.  This body can be read by mail\r
+     * clients that do not have HTML email capability such as mutt. Clients\r
+     * that can read HTML will view the normal Body.\r
+     * @var string\r
+     */\r
+    var $AltBody           = "";\r
+\r
+    /**\r
+     * Sets word wrapping on the body of the message to a given number of \r
+     * characters.\r
+     * @var int\r
+     */\r
+    var $WordWrap          = 0;\r
+\r
+    /**\r
+     * Method to send mail: ("mail", "sendmail", or "smtp").\r
+     * @var string\r
+     */\r
+    var $Mailer            = "mail";\r
+\r
+    /**\r
+     * Sets the path of the sendmail program.\r
+     * @var string\r
+     */\r
+    var $Sendmail          = "/usr/sbin/sendmail";\r
+    \r
+    /**\r
+     * Path to PHPMailer plugins.  This is now only useful if the SMTP class \r
+     * is in a different directory than the PHP include path.  \r
+     * @var string\r
+     */\r
+    var $PluginDir         = "";\r
+\r
+    /**\r
+     *  Holds PHPMailer version.\r
+     *  @var string\r
+     */\r
+    var $Version           = "1.73";\r
+\r
+    /**\r
+     * Sets the email address that a reading confirmation will be sent.\r
+     * @var string\r
+     */\r
+    var $ConfirmReadingTo  = "";\r
+\r
+    /**\r
+     *  Sets the hostname to use in Message-Id and Received headers\r
+     *  and as default HELO string. If empty, the value returned\r
+     *  by SERVER_NAME is used or 'localhost.localdomain'.\r
+     *  @var string\r
+     */\r
+    var $Hostname          = "";\r
+\r
+    /////////////////////////////////////////////////\r
+    // SMTP VARIABLES\r
+    /////////////////////////////////////////////////\r
+\r
+    /**\r
+     *  Sets the SMTP hosts.  All hosts must be separated by a\r
+     *  semicolon.  You can also specify a different port\r
+     *  for each host by using this format: [hostname:port]\r
+     *  (e.g. "smtp1.example.com:25;smtp2.example.com").\r
+     *  Hosts will be tried in order.\r
+     *  @var string\r
+     */\r
+    var $Host        = "localhost";\r
+\r
+    /**\r
+     *  Sets the default SMTP server port.\r
+     *  @var int\r
+     */\r
+    var $Port        = 25;\r
+\r
+    /**\r
+     *  Sets the SMTP HELO of the message (Default is $Hostname).\r
+     *  @var string\r
+     */\r
+    var $Helo        = "";\r
+\r
+    /**\r
+     *  Sets SMTP authentication. Utilizes the Username and Password variables.\r
+     *  @var bool\r
+     */\r
+    var $SMTPAuth     = false;\r
+\r
+    /**\r
+     *  Sets SMTP username.\r
+     *  @var string\r
+     */\r
+    var $Username     = "";\r
+\r
+    /**\r
+     *  Sets SMTP password.\r
+     *  @var string\r
+     */\r
+    var $Password     = "";\r
+\r
+    /**\r
+     *  Sets the SMTP server timeout in seconds. This function will not \r
+     *  work with the win32 version.\r
+     *  @var int\r
+     */\r
+    var $Timeout      = 10;\r
+\r
+    /**\r
+     *  Sets SMTP class debugging on or off.\r
+     *  @var bool\r
+     */\r
+    var $SMTPDebug    = false;\r
+\r
+    /**\r
+     * Prevents the SMTP connection from being closed after each mail \r
+     * sending.  If this is set to true then to close the connection \r
+     * requires an explicit call to SmtpClose(). \r
+     * @var bool\r
+     */\r
+    var $SMTPKeepAlive = false;\r
+\r
+    /**#@+\r
+     * @access private\r
+     */\r
+    var $smtp            = NULL;\r
+    var $to              = array();\r
+    var $cc              = array();\r
+    var $bcc             = array();\r
+    var $ReplyTo         = array();\r
+    var $attachment      = array();\r
+    var $CustomHeader    = array();\r
+    var $message_type    = "";\r
+    var $boundary        = array();\r
+    var $language        = array();\r
+    var $error_count     = 0;\r
+    var $LE              = "\n";\r
+    /**#@-*/\r
+    \r
+    /////////////////////////////////////////////////\r
+    // VARIABLE METHODS\r
+    /////////////////////////////////////////////////\r
+\r
+    /**\r
+     * Sets message type to HTML.  \r
+     * @param bool $bool\r
+     * @return void\r
+     */\r
+    function IsHTML($bool) {\r
+        if($bool == true)\r
+            $this->ContentType = "text/html";\r
+        else\r
+            $this->ContentType = "text/plain";\r
+    }\r
+\r
+    /**\r
+     * Sets Mailer to send message using SMTP.\r
+     * @return void\r
+     */\r
+    function IsSMTP() {\r
+        $this->Mailer = "smtp";\r
+    }\r
+\r
+    /**\r
+     * Sets Mailer to send message using PHP mail() function.\r
+     * @return void\r
+     */\r
+    function IsMail() {\r
+        $this->Mailer = "mail";\r
+    }\r
+\r
+    /**\r
+     * Sets Mailer to send message using the $Sendmail program.\r
+     * @return void\r
+     */\r
+    function IsSendmail() {\r
+        $this->Mailer = "sendmail";\r
+    }\r
+\r
+    /**\r
+     * Sets Mailer to send message using the qmail MTA. \r
+     * @return void\r
+     */\r
+    function IsQmail() {\r
+        $this->Sendmail = "/var/qmail/bin/sendmail";\r
+        $this->Mailer = "sendmail";\r
+    }\r
+\r
+\r
+    /////////////////////////////////////////////////\r
+    // RECIPIENT METHODS\r
+    /////////////////////////////////////////////////\r
+\r
+    /**\r
+     * Adds a "To" address.  \r
+     * @param string $address\r
+     * @param string $name\r
+     * @return void\r
+     */\r
+    function AddAddress($address, $name = "") {\r
+        $cur = count($this->to);\r
+        $this->to[$cur][0] = trim($address);\r
+        $this->to[$cur][1] = $name;\r
+    }\r
+\r
+    /**\r
+     * Adds a "Cc" address. Note: this function works\r
+     * with the SMTP mailer on win32, not with the "mail"\r
+     * mailer.  \r
+     * @param string $address\r
+     * @param string $name\r
+     * @return void\r
+    */\r
+    function AddCC($address, $name = "") {\r
+        $cur = count($this->cc);\r
+        $this->cc[$cur][0] = trim($address);\r
+        $this->cc[$cur][1] = $name;\r
+    }\r
+\r
+    /**\r
+     * Adds a "Bcc" address. Note: this function works\r
+     * with the SMTP mailer on win32, not with the "mail"\r
+     * mailer.  \r
+     * @param string $address\r
+     * @param string $name\r
+     * @return void\r
+     */\r
+    function AddBCC($address, $name = "") {\r
+        $cur = count($this->bcc);\r
+        $this->bcc[$cur][0] = trim($address);\r
+        $this->bcc[$cur][1] = $name;\r
+    }\r
+\r
+    /**\r
+     * Adds a "Reply-to" address.  \r
+     * @param string $address\r
+     * @param string $name\r
+     * @return void\r
+     */\r
+    function AddReplyTo($address, $name = "") {\r
+        $cur = count($this->ReplyTo);\r
+        $this->ReplyTo[$cur][0] = trim($address);\r
+        $this->ReplyTo[$cur][1] = $name;\r
+    }\r
+\r
+\r
+    /////////////////////////////////////////////////\r
+    // MAIL SENDING METHODS\r
+    /////////////////////////////////////////////////\r
+\r
+    /**\r
+     * Creates message and assigns Mailer. If the message is\r
+     * not sent successfully then it returns false.  Use the ErrorInfo\r
+     * variable to view description of the error.  \r
+     * @return bool\r
+     */\r
+    function Send() {\r
+        $header = "";\r
+        $body = "";\r
+        $result = true;\r
+\r
+        if((count($this->to) + count($this->cc) + count($this->bcc)) < 1)\r
+        {\r
+            $this->SetError($this->Lang("provide_address"));\r
+            return false;\r
+        }\r
+\r
+        // Set whether the message is multipart/alternative\r
+        if(!empty($this->AltBody))\r
+            $this->ContentType = "multipart/alternative";\r
+\r
+        $this->error_count = 0; // reset errors\r
+        $this->SetMessageType();\r
+        $header .= $this->CreateHeader();\r
+        $body = $this->CreateBody();\r
+\r
+        if($body == "") { return false; }\r
+\r
+        // Choose the mailer\r
+        switch($this->Mailer)\r
+        {\r
+            case "sendmail":\r
+                $result = $this->SendmailSend($header, $body);\r
+                break;\r
+            case "mail":\r
+                $result = $this->MailSend($header, $body);\r
+                break;\r
+            case "smtp":\r
+                $result = $this->SmtpSend($header, $body);\r
+                break;\r
+            default:\r
+            $this->SetError($this->Mailer . $this->Lang("mailer_not_supported"));\r
+                $result = false;\r
+                break;\r
+        }\r
+\r
+        return $result;\r
+    }\r
+    \r
+    /**\r
+     * Sends mail using the $Sendmail program.  \r
+     * @access private\r
+     * @return bool\r
+     */\r
+    function SendmailSend($header, $body) {\r
+        if ($this->Sender != "")\r
+            $sendmail = sprintf("%s -oi -f %s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));\r
+        else\r
+            $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail));\r
+\r
+        if(!@$mail = popen($sendmail, "w"))\r
+        {\r
+            $this->SetError($this->Lang("execute") . $this->Sendmail);\r
+            return false;\r
+        }\r
+\r
+        fputs($mail, $header);\r
+        fputs($mail, $body);\r
+        \r
+        $result = pclose($mail) >> 8 & 0xFF;\r
+        if($result != 0)\r
+        {\r
+            $this->SetError($this->Lang("execute") . $this->Sendmail);\r
+            return false;\r
+        }\r
+\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Sends mail using the PHP mail() function.  \r
+     * @access private\r
+     * @return bool\r
+     */\r
+    function MailSend($header, $body) {\r
+        $to = "";\r
+        for($i = 0; $i < count($this->to); $i++)\r
+        {\r
+            if($i != 0) { $to .= ", "; }\r
+            $to .= $this->to[$i][0];\r
+        }\r
+\r
+        if ($this->Sender != "" && strlen(ini_get("safe_mode"))< 1)\r
+        {\r
+            $old_from = ini_get("sendmail_from");\r
+            ini_set("sendmail_from", $this->Sender);\r
+            $params = sprintf("-oi -f %s", $this->Sender);\r
+            $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, \r
+                        $header, $params);\r
+        }\r
+        else\r
+            $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header);\r
+\r
+        if (isset($old_from))\r
+            ini_set("sendmail_from", $old_from);\r
+\r
+        if(!$rt)\r
+        {\r
+            $this->SetError($this->Lang("instantiate"));\r
+            return false;\r
+        }\r
+\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Sends mail via SMTP using PhpSMTP (Author:\r
+     * Chris Ryan).  Returns bool.  Returns false if there is a\r
+     * bad MAIL FROM, RCPT, or DATA input.\r
+     * @access private\r
+     * @return bool\r
+     */\r
+    function SmtpSend($header, $body) {\r
+        include_once($this->PluginDir . "class.smtp.php");\r
+        $error = "";\r
+        $bad_rcpt = array();\r
+\r
+        if(!$this->SmtpConnect())\r
+            return false;\r
+\r
+        $smtp_from = ($this->Sender == "") ? $this->From : $this->Sender;\r
+        if(!$this->smtp->Mail($smtp_from))\r
+        {\r
+            $error = $this->Lang("from_failed") . $smtp_from;\r
+            $this->SetError($error);\r
+            $this->smtp->Reset();\r
+            return false;\r
+        }\r
+\r
+        // Attempt to send attach all recipients\r
+        for($i = 0; $i < count($this->to); $i++)\r
+        {\r
+            if(!$this->smtp->Recipient($this->to[$i][0]))\r
+                $bad_rcpt[] = $this->to[$i][0];\r
+        }\r
+        for($i = 0; $i < count($this->cc); $i++)\r
+        {\r
+            if(!$this->smtp->Recipient($this->cc[$i][0]))\r
+                $bad_rcpt[] = $this->cc[$i][0];\r
+        }\r
+        for($i = 0; $i < count($this->bcc); $i++)\r
+        {\r
+            if(!$this->smtp->Recipient($this->bcc[$i][0]))\r
+                $bad_rcpt[] = $this->bcc[$i][0];\r
+        }\r
+\r
+        if(count($bad_rcpt) > 0) // Create error message\r
+        {\r
+            for($i = 0; $i < count($bad_rcpt); $i++)\r
+            {\r
+                if($i != 0) { $error .= ", "; }\r
+                $error .= $bad_rcpt[$i];\r
+            }\r
+            $error = $this->Lang("recipients_failed") . $error;\r
+            $this->SetError($error);\r
+            $this->smtp->Reset();\r
+            return false;\r
+        }\r
+\r
+        if(!$this->smtp->Data($header . $body))\r
+        {\r
+            $this->SetError($this->Lang("data_not_ATcepted"));\r
+            $this->smtp->Reset();\r
+            return false;\r
+        }\r
+        if($this->SMTPKeepAlive == true)\r
+            $this->smtp->Reset();\r
+        else\r
+            $this->SmtpClose();\r
+\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Initiates a connection to an SMTP server.  Returns false if the \r
+     * operation failed.\r
+     * @access private\r
+     * @return bool\r
+     */\r
+    function SmtpConnect() {\r
+        if($this->smtp == NULL) { $this->smtp = new SMTP(); }\r
+\r
+        $this->smtp->do_debug = $this->SMTPDebug;\r
+        $hosts = explode(";", $this->Host);\r
+        $index = 0;\r
+        $connection = ($this->smtp->Connected()); \r
+\r
+        // Retry while there is no connection\r
+        while($index < count($hosts) && $connection == false)\r
+        {\r
+            if(strstr($hosts[$index], ":"))\r
+                list($host, $port) = explode(":", $hosts[$index]);\r
+            else\r
+            {\r
+                $host = $hosts[$index];\r
+                $port = $this->Port;\r
+            }\r
+\r
+            if($this->smtp->Connect($host, $port, $this->Timeout))\r
+            {\r
+                if ($this->Helo != '')\r
+                    $this->smtp->Hello($this->Helo);\r
+                else\r
+                    $this->smtp->Hello($this->ServerHostname());\r
+        \r
+                if($this->SMTPAuth)\r
+                {\r
+                    if(!$this->smtp->Authenticate($this->Username, \r
+                                                  $this->Password))\r
+                    {\r
+                        $this->SetError($this->Lang("authenticate"));\r
+                        $this->smtp->Reset();\r
+                        $connection = false;\r
+                    }\r
+                }\r
+                $connection = true;\r
+            }\r
+            $index++;\r
+        }\r
+        if(!$connection)\r
+            $this->SetError($this->Lang("connect_host"));\r
+\r
+        return $connection;\r
+    }\r
+\r
+    /**\r
+     * Closes the active SMTP session if one exists.\r
+     * @return void\r
+     */\r
+    function SmtpClose() {\r
+        if($this->smtp != NULL)\r
+        {\r
+            if($this->smtp->Connected())\r
+            {\r
+                $this->smtp->Quit();\r
+                $this->smtp->Close();\r
+            }\r
+        }\r
+    }\r
+\r
+    /**\r
+     * Sets the language for all class error messages.  Returns false \r
+     * if it cannot load the language file.  The default language type\r
+     * is English.\r
+     * @param string $lang_type Type of language (e.g. Portuguese: "br")\r
+     * @param string $lang_path Path to the language file directory\r
+     * @access public\r
+     * @return bool\r
+     */\r
+    function SetLanguage($lang_type, $lang_path = "language/") {\r
+        if(file_exists($lang_path.'phpmailer.lang-'.$lang_type.'.php'))\r
+            include($lang_path.'phpmailer.lang-'.$lang_type.'.php');\r
+        else if(file_exists($lang_path.'phpmailer.lang-en.php'))\r
+            include($lang_path.'phpmailer.lang-en.php');\r
+        else\r
+        {\r
+            $this->SetError("Could not load language file");\r
+            return false;\r
+        }\r
+        $this->language = $PHPMAILER_LANG;\r
+    \r
+        return true;\r
+    }\r
+\r
+    /////////////////////////////////////////////////\r
+    // MESSAGE CREATION METHODS\r
+    /////////////////////////////////////////////////\r
+\r
+    /**\r
+     * Creates recipient headers.  \r
+     * @access private\r
+     * @return string\r
+     */\r
+    function AddrAppend($type, $addr) {\r
+        $addr_str = $type . ": ";\r
+        $addr_str .= $this->AddrFormat($addr[0]);\r
+        if(count($addr) > 1)\r
+        {\r
+            for($i = 1; $i < count($addr); $i++)\r
+                $addr_str .= ", " . $this->AddrFormat($addr[$i]);\r
+        }\r
+        $addr_str .= $this->LE;\r
+\r
+        return $addr_str;\r
+    }\r
+    \r
+    /**\r
+     * Formats an address correctly. \r
+     * @access private\r
+     * @return string\r
+     */\r
+    function AddrFormat($addr) {\r
+        if(empty($addr[1]))\r
+            $formatted = $addr[0];\r
+        else\r
+        {\r
+            $formatted = $this->EncodeHeader($addr[1], 'phrase') . " <" . \r
+                         $addr[0] . ">";\r
+        }\r
+\r
+        return $formatted;\r
+    }\r
+\r
+    /**\r
+     * Wraps message for use with mailers that do not\r
+     * automatically perform wrapping and for quoted-printable.\r
+     * Original written by philippe.  \r
+     * @access private\r
+     * @return string\r
+     */\r
+    function WrapText($message, $length, $qp_mode = false) {\r
+        $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE;\r
+\r
+        $message = $this->FixEOL($message);\r
+        if (substr($message, -1) == $this->LE)\r
+            $message = substr($message, 0, -1);\r
+\r
+        $line = explode($this->LE, $message);\r
+        $message = "";\r
+        for ($i=0 ;$i < count($line); $i++)\r
+        {\r
+          $line_part = explode(" ", $line[$i]);\r
+          $buf = "";\r
+          for ($e = 0; $e<count($line_part); $e++)\r
+          {\r
+              $word = $line_part[$e];\r
+              if ($qp_mode and (strlen($word) > $length))\r
+              {\r
+                $space_left = $length - strlen($buf) - 1;\r
+                if ($e != 0)\r
+                {\r
+                    if ($space_left > 20)\r
+                    {\r
+                        $len = $space_left;\r
+                        if (substr($word, $len - 1, 1) == "=")\r
+                          $len--;\r
+                        elseif (substr($word, $len - 2, 1) == "=")\r
+                          $len -= 2;\r
+                        $part = substr($word, 0, $len);\r
+                        $word = substr($word, $len);\r
+                        $buf .= " " . $part;\r
+                        $message .= $buf . sprintf("=%s", $this->LE);\r
+                    }\r
+                    else\r
+                    {\r
+                        $message .= $buf . $soft_break;\r
+                    }\r
+                    $buf = "";\r
+                }\r
+                while (strlen($word) > 0)\r
+                {\r
+                    $len = $length;\r
+                    if (substr($word, $len - 1, 1) == "=")\r
+                        $len--;\r
+                    elseif (substr($word, $len - 2, 1) == "=")\r
+                        $len -= 2;\r
+                    $part = substr($word, 0, $len);\r
+                    $word = substr($word, $len);\r
+\r
+                    if (strlen($word) > 0)\r
+                        $message .= $part . sprintf("=%s", $this->LE);\r
+                    else\r
+                        $buf = $part;\r
+                }\r
+              }\r
+              else\r
+              {\r
+                $buf_o = $buf;\r
+                $buf .= ($e == 0) ? $word : (" " . $word); \r
+\r
+                if (strlen($buf) > $length and $buf_o != "")\r
+                {\r
+                    $message .= $buf_o . $soft_break;\r
+                    $buf = $word;\r
+                }\r
+              }\r
+          }\r
+          $message .= $buf . $this->LE;\r
+        }\r
+\r
+        return $message;\r
+    }\r
+    \r
+    /**\r
+     * Set the body wrapping.\r
+     * @access private\r
+     * @return void\r
+     */\r
+    function SetWordWrap() {\r
+        if($this->WordWrap < 1)\r
+            return;\r
+            \r
+        switch($this->message_type)\r
+        {\r
+           case "alt":\r
+              // fall through\r
+           case "alt_attachments":\r
+              $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap);\r
+              break;\r
+           default:\r
+              $this->Body = $this->WrapText($this->Body, $this->WordWrap);\r
+              break;\r
+        }\r
+    }\r
+\r
+    /**\r
+     * Assembles message header.  \r
+     * @access private\r
+     * @return string\r
+     */\r
+    function CreateHeader() {\r
+        $result = "";\r
+        \r
+        // Set the boundaries\r
+        $uniq_id = md5(uniqid(time()));\r
+        $this->boundary[1] = "b1_" . $uniq_id;\r
+        $this->boundary[2] = "b2_" . $uniq_id;\r
+\r
+        $result .= $this->HeaderLine("Date", $this->RFCDate());\r
+        if($this->Sender == "")\r
+            $result .= $this->HeaderLine("Return-Path", trim($this->From));\r
+        else\r
+            $result .= $this->HeaderLine("Return-Path", trim($this->Sender));\r
+        \r
+        // To be created automatically by mail()\r
+        if($this->Mailer != "mail")\r
+        {\r
+            if(count($this->to) > 0)\r
+                $result .= $this->AddrAppend("To", $this->to);\r
+            else if (count($this->cc) == 0)\r
+                $result .= $this->HeaderLine("To", "undisclosed-recipients:;");\r
+            if(count($this->cc) > 0)\r
+                $result .= $this->AddrAppend("Cc", $this->cc);\r
+        }\r
+\r
+        $from = array();\r
+        $from[0][0] = trim($this->From);\r
+        $from[0][1] = $this->FromName;\r
+        $result .= $this->AddrAppend("From", $from); \r
+\r
+        // sendmail and mail() extract Bcc from the header before sending\r
+        if((($this->Mailer == "sendmail") || ($this->Mailer == "mail")) && (count($this->bcc) > 0))\r
+            $result .= $this->AddrAppend("Bcc", $this->bcc);\r
+\r
+        if(count($this->ReplyTo) > 0)\r
+            $result .= $this->AddrAppend("Reply-to", $this->ReplyTo);\r
+\r
+        // mail() sets the subject itself\r
+        if($this->Mailer != "mail")\r
+            $result .= $this->HeaderLine("Subject", $this->EncodeHeader(trim($this->Subject)));\r
+\r
+        $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE);\r
+        $result .= $this->HeaderLine("X-Priority", $this->Priority);\r
+        $result .= $this->HeaderLine("X-Mailer", "PHPMailer [version " . $this->Version . "]");\r
+        \r
+        if($this->ConfirmReadingTo != "")\r
+        {\r
+            $result .= $this->HeaderLine("Disposition-Notification-To", \r
+                       "<" . trim($this->ConfirmReadingTo) . ">");\r
+        }\r
+\r
+        // Add custom headers\r
+        for($index = 0; $index < count($this->CustomHeader); $index++)\r
+        {\r
+            $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), \r
+                       $this->EncodeHeader(trim($this->CustomHeader[$index][1])));\r
+        }\r
+        $result .= $this->HeaderLine("MIME-Version", "1.0");\r
+\r
+        switch($this->message_type)\r
+        {\r
+            case "plain":\r
+                $result .= $this->HeaderLine("Content-Transfer-Encoding", $this->Encoding);\r
+                $result .= sprintf("Content-Type: %s; charset=\"%s\"",\r
+                                    $this->ContentType, $this->CharSet);\r
+                break;\r
+            case "attachments":\r
+                // fall through\r
+            case "alt_attachments":\r
+                if($this->InlineImageExists())\r
+                {\r
+                    $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s", \r
+                                    "multipart/related", $this->LE, $this->LE, \r
+                                    $this->boundary[1], $this->LE);\r
+                }\r
+                else\r
+                {\r
+                    $result .= $this->HeaderLine("Content-Type", "multipart/mixed;");\r
+                    $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');\r
+                }\r
+                break;\r
+            case "alt":\r
+                $result .= $this->HeaderLine("Content-Type", "multipart/alternative;");\r
+                $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');\r
+                break;\r
+        }\r
+\r
+        if($this->Mailer != "mail")\r
+            $result .= $this->LE.$this->LE;\r
+\r
+        return $result;\r
+    }\r
+\r
+    /**\r
+     * Assembles the message body.  Returns an empty string on failure.\r
+     * @access private\r
+     * @return string\r
+     */\r
+    function CreateBody() {\r
+        $result = "";\r
+\r
+        $this->SetWordWrap();\r
+\r
+        switch($this->message_type)\r
+        {\r
+            case "alt":\r
+                $result .= $this->GetBoundary($this->boundary[1], "", \r
+                                              "text/plain", "");\r
+                $result .= $this->EncodeString($this->AltBody, $this->Encoding);\r
+                $result .= $this->LE.$this->LE;\r
+                $result .= $this->GetBoundary($this->boundary[1], "", \r
+                                              "text/html", "");\r
+                \r
+                $result .= $this->EncodeString($this->Body, $this->Encoding);\r
+                $result .= $this->LE.$this->LE;\r
+    \r
+                $result .= $this->EndBoundary($this->boundary[1]);\r
+                break;\r
+            case "plain":\r
+                $result .= $this->EncodeString($this->Body, $this->Encoding);\r
+                break;\r
+            case "attachments":\r
+                $result .= $this->GetBoundary($this->boundary[1], "", "", "");\r
+                $result .= $this->EncodeString($this->Body, $this->Encoding);\r
+                $result .= $this->LE;\r
+     \r
+                $result .= $this->AttachAll();\r
+                break;\r
+            case "alt_attachments":\r
+                $result .= sprintf("--%s%s", $this->boundary[1], $this->LE);\r
+                $result .= sprintf("Content-Type: %s;%s" .\r
+                                   "\tboundary=\"%s\"%s",\r
+                                   "multipart/alternative", $this->LE, \r
+                                   $this->boundary[2], $this->LE.$this->LE);\r
+    \r
+                // Create text body\r
+                $result .= $this->GetBoundary($this->boundary[2], "", \r
+                                              "text/plain", "") . $this->LE;\r
+\r
+                $result .= $this->EncodeString($this->AltBody, $this->Encoding);\r
+                $result .= $this->LE.$this->LE;\r
+    \r
+                // Create the HTML body\r
+                $result .= $this->GetBoundary($this->boundary[2], "", \r
+                                              "text/html", "") . $this->LE;\r
+    \r
+                $result .= $this->EncodeString($this->Body, $this->Encoding);\r
+                $result .= $this->LE.$this->LE;\r
+\r
+                $result .= $this->EndBoundary($this->boundary[2]);\r
+                \r
+                $result .= $this->AttachAll();\r
+                break;\r
+        }\r
+        if($this->IsError())\r
+            $result = "";\r
+\r
+        return $result;\r
+    }\r
+\r
+    /**\r
+     * Returns the start of a message boundary.\r
+     * @access private\r
+     */\r
+    function GetBoundary($boundary, $charSet, $contentType, $encoding) {\r
+        $result = "";\r
+        if($charSet == "") { $charSet = $this->CharSet; }\r
+        if($contentType == "") { $contentType = $this->ContentType; }\r
+        if($encoding == "") { $encoding = $this->Encoding; }\r
+\r
+        $result .= $this->TextLine("--" . $boundary);\r
+        $result .= sprintf("Content-Type: %s; charset = \"%s\"", \r
+                            $contentType, $charSet);\r
+        $result .= $this->LE;\r
+        $result .= $this->HeaderLine("Content-Transfer-Encoding", $encoding);\r
+        $result .= $this->LE;\r
+       \r
+        return $result;\r
+    }\r
+    \r
+    /**\r
+     * Returns the end of a message boundary.\r
+     * @access private\r
+     */\r
+    function EndBoundary($boundary) {\r
+        return $this->LE . "--" . $boundary . "--" . $this->LE; \r
+    }\r
+    \r
+    /**\r
+     * Sets the message type.\r
+     * @access private\r
+     * @return void\r
+     */\r
+    function SetMessageType() {\r
+        if(count($this->attachment) < 1 && strlen($this->AltBody) < 1)\r
+            $this->message_type = "plain";\r
+        else\r
+        {\r
+            if(count($this->attachment) > 0)\r
+                $this->message_type = "attachments";\r
+            if(strlen($this->AltBody) > 0 && count($this->attachment) < 1)\r
+                $this->message_type = "alt";\r
+            if(strlen($this->AltBody) > 0 && count($this->attachment) > 0)\r
+                $this->message_type = "alt_attachments";\r
+        }\r
+    }\r
+\r
+    /**\r
+     * Returns a formatted header line.\r
+     * @access private\r
+     * @return string\r
+     */\r
+    function HeaderLine($name, $value) {\r
+        return $name . ": " . $value . $this->LE;\r
+    }\r
+\r
+    /**\r
+     * Returns a formatted mail line.\r
+     * @access private\r
+     * @return string\r
+     */\r
+    function TextLine($value) {\r
+        return $value . $this->LE;\r
+    }\r
+\r
+    /////////////////////////////////////////////////\r
+    // ATTACHMENT METHODS\r
+    /////////////////////////////////////////////////\r
+\r
+    /**\r
+     * Adds an attachment from a path on the filesystem.\r
+     * Returns false if the file could not be found\r
+     * or accessed.\r
+     * @param string $path Path to the attachment.\r
+     * @param string $name Overrides the attachment name.\r
+     * @param string $encoding File encoding (see $Encoding).\r
+     * @param string $type File extension (MIME) type.\r
+     * @return bool\r
+     */\r
+    function AddAttachment($path, $name = "", $encoding = "base64", \r
+                           $type = "application/octet-stream") {\r
+        if(!@is_file($path))\r
+        {\r
+            $this->SetError($this->Lang("file_ATcess") . $path);\r
+            return false;\r
+        }\r
+\r
+        $filename = basename($path);\r
+        if($name == "")\r
+            $name = $filename;\r
+\r
+        $cur = count($this->attachment);\r
+        $this->attachment[$cur][0] = $path;\r
+        $this->attachment[$cur][1] = $filename;\r
+        $this->attachment[$cur][2] = $name;\r
+        $this->attachment[$cur][3] = $encoding;\r
+        $this->attachment[$cur][4] = $type;\r
+        $this->attachment[$cur][5] = false; // isStringAttachment\r
+        $this->attachment[$cur][6] = "attachment";\r
+        $this->attachment[$cur][7] = 0;\r
+\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Attaches all fs, string, and binary attachments to the message.\r
+     * Returns an empty string on failure.\r
+     * @access private\r
+     * @return string\r
+     */\r
+    function AttachAll() {\r
+        // Return text of body\r
+        $mime = array();\r
+\r
+        // Add all attachments\r
+        for($i = 0; $i < count($this->attachment); $i++)\r
+        {\r
+            // Check for string attachment\r
+            $bString = $this->attachment[$i][5];\r
+            if ($bString)\r
+                $string = $this->attachment[$i][0];\r
+            else\r
+                $path = $this->attachment[$i][0];\r
+\r
+            $filename    = $this->attachment[$i][1];\r
+            $name        = $this->attachment[$i][2];\r
+            $encoding    = $this->attachment[$i][3];\r
+            $type        = $this->attachment[$i][4];\r
+            $disposition = $this->attachment[$i][6];\r
+            $cid         = $this->attachment[$i][7];\r
+            \r
+            $mime[] = sprintf("--%s%s", $this->boundary[1], $this->LE);\r
+            $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $name, $this->LE);\r
+            $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE);\r
+\r
+            if($disposition == "inline")\r
+                $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE);\r
+\r
+            $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", \r
+                              $disposition, $name, $this->LE.$this->LE);\r
+\r
+            // Encode as string attachment\r
+            if($bString)\r
+            {\r
+                $mime[] = $this->EncodeString($string, $encoding);\r
+                if($this->IsError()) { return ""; }\r
+                $mime[] = $this->LE.$this->LE;\r
+            }\r
+            else\r
+            {\r
+                $mime[] = $this->EncodeFile($path, $encoding);                \r
+                if($this->IsError()) { return ""; }\r
+                $mime[] = $this->LE.$this->LE;\r
+            }\r
+        }\r
+\r
+        $mime[] = sprintf("--%s--%s", $this->boundary[1], $this->LE);\r
+\r
+        return join("", $mime);\r
+    }\r
+    \r
+    /**\r
+     * Encodes attachment in requested format.  Returns an\r
+     * empty string on failure.\r
+     * @access private\r
+     * @return string\r
+     */\r
+    function EncodeFile ($path, $encoding = "base64") {\r
+        if(!@$fd = fopen($path, "rb"))\r
+        {\r
+            $this->SetError($this->Lang("file_open") . $path);\r
+            return "";\r
+        }\r
+        $magic_quotes = get_magic_quotes_runtime();\r
+        set_magic_quotes_runtime(0);\r
+        $file_buffer = fread($fd, filesize($path));\r
+        $file_buffer = $this->EncodeString($file_buffer, $encoding);\r
+        fclose($fd);\r
+        set_magic_quotes_runtime($magic_quotes);\r
+\r
+        return $file_buffer;\r
+    }\r
+\r
+    /**\r
+     * Encodes string to requested format. Returns an\r
+     * empty string on failure.\r
+     * @access private\r
+     * @return string\r
+     */\r
+    function EncodeString ($str, $encoding = "base64") {\r
+        $encoded = "";\r
+        switch(strtolower($encoding)) {\r
+          case "base64":\r
+              // chunk_split is found in PHP >= 3.0.6\r
+              $encoded = chunk_split(base64_encode($str), 76, $this->LE);\r
+              break;\r
+          case "7bit":\r
+          case "8bit":\r
+              $encoded = $this->FixEOL($str);\r
+              if (substr($encoded, -(strlen($this->LE))) != $this->LE)\r
+                $encoded .= $this->LE;\r
+              break;\r
+          case "binary":\r
+              $encoded = $str;\r
+              break;\r
+          case "quoted-printable":\r
+              $encoded = $this->EncodeQP($str);\r
+              break;\r
+          default:\r
+              $this->SetError($this->Lang("encoding") . $encoding);\r
+              break;\r
+        }\r
+        return $encoded;\r
+    }\r
+\r
+    /**\r
+     * Encode a header string to best of Q, B, quoted or none.  \r
+     * @access private\r
+     * @return string\r
+     */\r
+    function EncodeHeader ($str, $position = 'text') {\r
+      $x = 0;\r
+      \r
+      switch (strtolower($position)) {\r
+        case 'phrase':\r
+          if (!preg_match('/[\200-\377]/', $str)) {\r
+            // Can't use addslashes as we don't know what value has magic_quotes_sybase.\r
+            $encoded = addcslashes($str, "\0..\37\177\\\"");\r
+\r
+            if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str))\r
+              return ($encoded);\r
+            else\r
+              return ("\"$encoded\"");\r
+          }\r
+          $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches);\r
+          break;\r
+        case 'comment':\r
+          $x = preg_match_all('/[()"]/', $str, $matches);\r
+          // Fall-through\r
+        case 'text':\r
+        default:\r
+          $x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches);\r
+          break;\r
+      }\r
+\r
+      if ($x == 0)\r
+        return ($str);\r
+\r
+      $maxlen = 75 - 7 - strlen($this->CharSet);\r
+      // Try to select the encoding which should produce the shortest output\r
+      if (strlen($str)/3 < $x) {\r
+        $encoding = 'B';\r
+        $encoded = base64_encode($str);\r
+        $maxlen -= $maxlen % 4;\r
+        $encoded = trim(chunk_split($encoded, $maxlen, "\n"));\r
+      } else {\r
+        $encoding = 'Q';\r
+        $encoded = $this->EncodeQ($str, $position);\r
+        $encoded = $this->WrapText($encoded, $maxlen, true);\r
+        $encoded = str_replace("=".$this->LE, "\n", trim($encoded));\r
+      }\r
+\r
+      $encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded);\r
+      $encoded = trim(str_replace("\n", $this->LE, $encoded));\r
+      \r
+      return $encoded;\r
+    }\r
+    \r
+    /**\r
+     * Encode string to quoted-printable.  \r
+     * @access private\r
+     * @return string\r
+     */\r
+    function EncodeQP ($str) {\r
+        $encoded = $this->FixEOL($str);\r
+        if (substr($encoded, -(strlen($this->LE))) != $this->LE)\r
+            $encoded .= $this->LE;\r
+\r
+        // Replace every high ascii, control and = characters\r
+        $encoded = preg_replace('/([\000-\010\013\014\016-\037\075\177-\377])/e',\r
+                  "'='.sprintf('%02X', ord('\\1'))", $encoded);\r
+        // Replace every spaces and tabs when it's the last character on a line\r
+        $encoded = preg_replace("/([\011\040])".$this->LE."/e",\r
+                  "'='.sprintf('%02X', ord('\\1')).'".$this->LE."'", $encoded);\r
+\r
+        // Maximum line length of 76 characters before CRLF (74 + space + '=')\r
+        $encoded = $this->WrapText($encoded, 74, true);\r
+\r
+        return $encoded;\r
+    }\r
+\r
+    /**\r
+     * Encode string to q encoding.  \r
+     * @access private\r
+     * @return string\r
+     */\r
+    function EncodeQ ($str, $position = "text") {\r
+        // There should not be any EOL in the string\r
+        $encoded = preg_replace("[\r\n]", "", $str);\r
+\r
+        switch (strtolower($position)) {\r
+          case "phrase":\r
+            $encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);\r
+            break;\r
+          case "comment":\r
+            $encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);\r
+          case "text":\r
+          default:\r
+            // Replace every high ascii, control =, ? and _ characters\r
+            $encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e',\r
+                  "'='.sprintf('%02X', ord('\\1'))", $encoded);\r
+            break;\r
+        }\r
+        \r
+        // Replace every spaces to _ (more readable than =20)\r
+        $encoded = str_replace(" ", "_", $encoded);\r
+\r
+        return $encoded;\r
+    }\r
+\r
+    /**\r
+     * Adds a string or binary attachment (non-filesystem) to the list.\r
+     * This method can be used to attach ascii or binary data,\r
+     * such as a BLOB record from a database.\r
+     * @param string $string String attachment data.\r
+     * @param string $filename Name of the attachment.\r
+     * @param string $encoding File encoding (see $Encoding).\r
+     * @param string $type File extension (MIME) type.\r
+     * @return void\r
+     */\r
+    function AddStringAttachment($string, $filename, $encoding = "base64", \r
+                                 $type = "application/octet-stream") {\r
+        // Append to $attachment array\r
+        $cur = count($this->attachment);\r
+        $this->attachment[$cur][0] = $string;\r
+        $this->attachment[$cur][1] = $filename;\r
+        $this->attachment[$cur][2] = $filename;\r
+        $this->attachment[$cur][3] = $encoding;\r
+        $this->attachment[$cur][4] = $type;\r
+        $this->attachment[$cur][5] = true; // isString\r
+        $this->attachment[$cur][6] = "attachment";\r
+        $this->attachment[$cur][7] = 0;\r
+    }\r
+    \r
+    /**\r
+     * Adds an embedded attachment.  This can include images, sounds, and \r
+     * just about any other document.  Make sure to set the $type to an \r
+     * image type.  For JPEG images use "image/jpeg" and for GIF images \r
+     * use "image/gif".\r
+     * @param string $path Path to the attachment.\r
+     * @param string $cid Content ID of the attachment.  Use this to identify \r
+     *        the Id for accessing the image in an HTML form.\r
+     * @param string $name Overrides the attachment name.\r
+     * @param string $encoding File encoding (see $Encoding).\r
+     * @param string $type File extension (MIME) type.  \r
+     * @return bool\r
+     */\r
+    function AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64", \r
+                              $type = "application/octet-stream") {\r
+    \r
+        if(!@is_file($path))\r
+        {\r
+            $this->SetError($this->Lang("file_ATcess") . $path);\r
+            return false;\r
+        }\r
+\r
+        $filename = basename($path);\r
+        if($name == "")\r
+            $name = $filename;\r
+\r
+        // Append to $attachment array\r
+        $cur = count($this->attachment);\r
+        $this->attachment[$cur][0] = $path;\r
+        $this->attachment[$cur][1] = $filename;\r
+        $this->attachment[$cur][2] = $name;\r
+        $this->attachment[$cur][3] = $encoding;\r
+        $this->attachment[$cur][4] = $type;\r
+        $this->attachment[$cur][5] = false; // isStringAttachment\r
+        $this->attachment[$cur][6] = "inline";\r
+        $this->attachment[$cur][7] = $cid;\r
+    \r
+        return true;\r
+    }\r
+    \r
+    /**\r
+     * Returns true if an inline attachment is present.\r
+     * @access private\r
+     * @return bool\r
+     */\r
+    function InlineImageExists() {\r
+        $result = false;\r
+        for($i = 0; $i < count($this->attachment); $i++)\r
+        {\r
+            if($this->attachment[$i][6] == "inline")\r
+            {\r
+                $result = true;\r
+                break;\r
+            }\r
+        }\r
+        \r
+        return $result;\r
+    }\r
+\r
+    /////////////////////////////////////////////////\r
+    // MESSAGE RESET METHODS\r
+    /////////////////////////////////////////////////\r
+\r
+    /**\r
+     * Clears all recipients assigned in the TO array.  Returns void.\r
+     * @return void\r
+     */\r
+    function ClearAddresses() {\r
+        $this->to = array();\r
+    }\r
+\r
+    /**\r
+     * Clears all recipients assigned in the CC array.  Returns void.\r
+     * @return void\r
+     */\r
+    function ClearCCs() {\r
+        $this->cc = array();\r
+    }\r
+\r
+    /**\r
+     * Clears all recipients assigned in the BCC array.  Returns void.\r
+     * @return void\r
+     */\r
+    function ClearBCCs() {\r
+        $this->bcc = array();\r
+    }\r
+\r
+    /**\r
+     * Clears all recipients assigned in the ReplyTo array.  Returns void.\r
+     * @return void\r
+     */\r
+    function ClearReplyTos() {\r
+        $this->ReplyTo = array();\r
+    }\r
+\r
+    /**\r
+     * Clears all recipients assigned in the TO, CC and BCC\r
+     * array.  Returns void.\r
+     * @return void\r
+     */\r
+    function ClearAllRecipients() {\r
+        $this->to = array();\r
+        $this->cc = array();\r
+        $this->bcc = array();\r
+    }\r
+\r
+    /**\r
+     * Clears all previously set filesystem, string, and binary\r
+     * attachments.  Returns void.\r
+     * @return void\r
+     */\r
+    function ClearAttachments() {\r
+        $this->attachment = array();\r
+    }\r
+\r
+    /**\r
+     * Clears all custom headers.  Returns void.\r
+     * @return void\r
+     */\r
+    function ClearCustomHeaders() {\r
+        $this->CustomHeader = array();\r
+    }\r
+\r
+\r
+    /////////////////////////////////////////////////\r
+    // MISCELLANEOUS METHODS\r
+    /////////////////////////////////////////////////\r
+\r
+    /**\r
+     * Adds the error message to the error container.\r
+     * Returns void.\r
+     * @access private\r
+     * @return void\r
+     */\r
+    function SetError($msg) {\r
+        $this->error_count++;\r
+        $this->ErrorInfo = $msg;\r
+    }\r
+\r
+    /**\r
+     * Returns the proper RFC 822 formatted date. \r
+     * @access private\r
+     * @return string\r
+     */\r
+    function RFCDate() {\r
+        $tz = date("Z");\r
+        $tzs = ($tz < 0) ? "-" : "+";\r
+        $tz = abs($tz);\r
+        $tz = ($tz/3600)*100 + ($tz%3600)/60;\r
+        $result = sprintf("%s %s%04d", date("D, j M Y H:i:s"), $tzs, $tz);\r
+\r
+        return $result;\r
+    }\r
+    \r
+    /**\r
+     * Returns the appropriate server variable.  Should work with both \r
+     * PHP 4.1.0+ as well as older versions.  Returns an empty string \r
+     * if nothing is found.\r
+     * @access private\r
+     * @return mixed\r
+     */\r
+    function ServerVar($varName) {\r
+        global $HTTP_SERVER_VARS;\r
+        global $HTTP_ENV_VARS;\r
+\r
+        if(!isset($_SERVER))\r
+        {\r
+            $_SERVER = $HTTP_SERVER_VARS;\r
+            if(!isset($_SERVER["REMOTE_ADDR"]))\r
+                $_SERVER = $HTTP_ENV_VARS; // must be Apache\r
+        }\r
+        \r
+        if(isset($_SERVER[$varName]))\r
+            return $_SERVER[$varName];\r
+        else\r
+            return "";\r
+    }\r
+\r
+    /**\r
+     * Returns the server hostname or 'localhost.localdomain' if unknown.\r
+     * @access private\r
+     * @return string\r
+     */\r
+    function ServerHostname() {\r
+        if ($this->Hostname != "")\r
+            $result = $this->Hostname;\r
+        elseif ($this->ServerVar('SERVER_NAME') != "")\r
+            $result = $this->ServerVar('SERVER_NAME');\r
+        else\r
+            $result = "localhost.localdomain";\r
+\r
+        return $result;\r
+    }\r
+\r
+    /**\r
+     * Returns a message in the appropriate language.\r
+     * @access private\r
+     * @return string\r
+     */\r
+    function Lang($key) {\r
+        if(count($this->language) < 1)\r
+            $this->SetLanguage("en"); // set the default language\r
+    \r
+        if(isset($this->language[$key]))\r
+            return $this->language[$key];\r
+        else\r
+            return "Language string failed to load: " . $key;\r
+    }\r
+    \r
+    /**\r
+     * Returns true if an error occurred.\r
+     * @return bool\r
+     */\r
+    function IsError() {\r
+        return ($this->error_count > 0);\r
+    }\r
+\r
+    /**\r
+     * Changes every end of line from CR or LF to CRLF.  \r
+     * @access private\r
+     * @return string\r
+     */\r
+    function FixEOL($str) {\r
+        $str = str_replace("\r\n", "\n", $str);\r
+        $str = str_replace("\r", "\n", $str);\r
+        $str = str_replace("\n", $this->LE, $str);\r
+        return $str;\r
+    }\r
+\r
+    /**\r
+     * Adds a custom header. \r
+     * @return void\r
+     */\r
+    function AddCustomHeader($custom_header) {\r
+        $this->CustomHeader[] = explode(":", $custom_header, 2);\r
+    }\r
+}\r
+\r
+?>
\ No newline at end of file
diff --git a/docs/include/classes/phpmailer/class.smtp.php b/docs/include/classes/phpmailer/class.smtp.php
new file mode 100644 (file)
index 0000000..ad0fb52
--- /dev/null
@@ -0,0 +1,1045 @@
+<?php\r
+////////////////////////////////////////////////////\r
+// SMTP - PHP SMTP class\r
+//\r
+// Version 1.02\r
+//\r
+// Define an SMTP class that can be used to connect\r
+// and communicate with any SMTP server. It implements\r
+// all the SMTP functions defined in RFC821 except TURN.\r
+//\r
+// Author: Chris Ryan\r
+//\r
+// License: LGPL, see LICENSE\r
+////////////////////////////////////////////////////\r
+\r
+/**\r
+ * SMTP is rfc 821 compliant and implements all the rfc 821 SMTP\r
+ * commands except TURN which will always return a not implemented\r
+ * error. SMTP also provides some utility methods for sending mail\r
+ * to an SMTP server.\r
+ * @package PHPMailer\r
+ * @author Chris Ryan\r
+ */\r
+class SMTP\r
+{\r
+    /**\r
+     *  SMTP server port\r
+     *  @var int\r
+     */\r
+    var $SMTP_PORT = 25;\r
+    \r
+    /**\r
+     *  SMTP reply line ending\r
+     *  @var string\r
+     */\r
+    var $CRLF = "\r\n";\r
+    \r
+    /**\r
+     *  Sets whether debugging is turned on\r
+     *  @var bool\r
+     */\r
+    var $do_debug;       # the level of debug to perform\r
+\r
+    /**#@+\r
+     * @access private\r
+     */\r
+    var $smtp_conn;      # the socket to the server\r
+    var $error;          # error if any on the last call\r
+    var $helo_rply;      # the reply the server sent to us for HELO\r
+    /**#@-*/\r
+\r
+    /**\r
+     * Initialize the class so that the data is in a known state.\r
+     * @access public\r
+     * @return void\r
+     */\r
+    function SMTP() {\r
+        $this->smtp_conn = 0;\r
+        $this->error = null;\r
+        $this->helo_rply = null;\r
+\r
+        $this->do_debug = 0;\r
+    }\r
+\r
+    /*************************************************************\r
+     *                    CONNECTION FUNCTIONS                  *\r
+     ***********************************************************/\r
+\r
+    /**\r
+     * Connect to the server specified on the port specified.\r
+     * If the port is not specified use the default SMTP_PORT.\r
+     * If tval is specified then a connection will try and be\r
+     * established with the server for that number of seconds.\r
+     * If tval is not specified the default is 30 seconds to\r
+     * try on the connection.\r
+     *\r
+     * SMTP CODE SUCCESS: 220\r
+     * SMTP CODE FAILURE: 421\r
+     * @access public\r
+     * @return bool\r
+     */\r
+    function Connect($host,$port=0,$tval=30) {\r
+        # set the error val to null so there is no confusion\r
+        $this->error = null;\r
+\r
+        # make sure we are __not__ connected\r
+        if($this->connected()) {\r
+            # ok we are connected! what should we do?\r
+            # for now we will just give an error saying we\r
+            # are already connected\r
+            $this->error =\r
+                array("error" => "Already connected to a server");\r
+            return false;\r
+        }\r
+\r
+        if(empty($port)) {\r
+            $port = $this->SMTP_PORT;\r
+        }\r
+\r
+        #connect to the smtp server\r
+        $this->smtp_conn = @fsockopen($host,    # the host of the server\r
+                                     $port,    # the port to use\r
+                                     $errno,   # error number if any\r
+                                     $errstr,  # error message if any\r
+                                     $tval);   # give up after ? secs\r
+        # verify we connected properly\r
+        if(empty($this->smtp_conn)) {\r
+            $this->error = array("error" => "Failed to connect to server",\r
+                                 "errno" => $errno,\r
+                                 "errstr" => $errstr);\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": $errstr ($errno)" . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+\r
+        # sometimes the SMTP server takes a little longer to respond\r
+        # so we will give it a longer timeout for the first read\r
+        // Windows still does not have support for this timeout function\r
+        if(substr(PHP_OS, 0, 3) != "WIN")\r
+           socket_set_timeout($this->smtp_conn, $tval, 0);\r
+\r
+        # get any announcement stuff\r
+        $announce = $this->get_lines();\r
+\r
+        # set the timeout  of any socket functions at 1/10 of a second\r
+        //if(function_exists("socket_set_timeout"))\r
+        //   socket_set_timeout($this->smtp_conn, 0, 100000);\r
+\r
+        if($this->do_debug >= 2) {\r
+            echo "SMTP -> FROM SERVER:" . $this->CRLF . $announce;\r
+        }\r
+\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Performs SMTP authentication.  Must be run after running the\r
+     * Hello() method.  Returns true if successfully authenticated.\r
+     * @access public\r
+     * @return bool\r
+     */\r
+    function Authenticate($username, $password) {\r
+        // Start authentication\r
+        fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($code != 334) {\r
+            $this->error =\r
+                array("error" => "AUTH not accepted from server",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+\r
+        // Send encoded username\r
+        fputs($this->smtp_conn, base64_encode($username) . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($code != 334) {\r
+            $this->error =\r
+                array("error" => "Username not accepted from server",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+\r
+        // Send encoded password\r
+        fputs($this->smtp_conn, base64_encode($password) . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($code != 235) {\r
+            $this->error =\r
+                array("error" => "Password not accepted from server",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Returns true if connected to a server otherwise false\r
+     * @access private\r
+     * @return bool\r
+     */\r
+    function Connected() {\r
+        if(!empty($this->smtp_conn)) {\r
+            $sock_status = socket_get_status($this->smtp_conn);\r
+            if($sock_status["eof"]) {\r
+                # hmm this is an odd situation... the socket is\r
+                # valid but we aren't connected anymore\r
+                if($this->do_debug >= 1) {\r
+                    echo "SMTP -> NOTICE:" . $this->CRLF .\r
+                         "EOF caught while checking if connected";\r
+                }\r
+                $this->Close();\r
+                return false;\r
+            }\r
+            return true; # everything looks good\r
+        }\r
+        return false;\r
+    }\r
+\r
+    /**\r
+     * Closes the socket and cleans up the state of the class.\r
+     * It is not considered good to use this function without\r
+     * first trying to use QUIT.\r
+     * @access public\r
+     * @return void\r
+     */\r
+    function Close() {\r
+        $this->error = null; # so there is no confusion\r
+        $this->helo_rply = null;\r
+        if(!empty($this->smtp_conn)) {\r
+            # close the connection and cleanup\r
+            fclose($this->smtp_conn);\r
+            $this->smtp_conn = 0;\r
+        }\r
+    }\r
+\r
+\r
+    /***************************************************************\r
+     *                        SMTP COMMANDS                       *\r
+     *************************************************************/\r
+\r
+    /**\r
+     * Issues a data command and sends the msg_data to the server\r
+     * finializing the mail transaction. $msg_data is the message\r
+     * that is to be send with the headers. Each header needs to be\r
+     * on a single line followed by a <CRLF> with the message headers\r
+     * and the message body being seperated by and additional <CRLF>.\r
+     *\r
+     * Implements rfc 821: DATA <CRLF>\r
+     *\r
+     * SMTP CODE INTERMEDIATE: 354\r
+     *     [data]\r
+     *     <CRLF>.<CRLF>\r
+     *     SMTP CODE SUCCESS: 250\r
+     *     SMTP CODE FAILURE: 552,554,451,452\r
+     * SMTP CODE FAILURE: 451,554\r
+     * SMTP CODE ERROR  : 500,501,503,421\r
+     * @access public\r
+     * @return bool\r
+     */\r
+    function Data($msg_data) {\r
+        $this->error = null; # so no confusion is caused\r
+\r
+        if(!$this->connected()) {\r
+            $this->error = array(\r
+                    "error" => "Called Data() without being connected");\r
+            return false;\r
+        }\r
+\r
+        fputs($this->smtp_conn,"DATA" . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($this->do_debug >= 2) {\r
+            echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;\r
+        }\r
+\r
+        if($code != 354) {\r
+            $this->error =\r
+                array("error" => "DATA command not accepted from server",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+\r
+        # the server is ready to accept data!\r
+        # according to rfc 821 we should not send more than 1000\r
+        # including the CRLF\r
+        # characters on a single line so we will break the data up\r
+        # into lines by \r and/or \n then if needed we will break\r
+        # each of those into smaller lines to fit within the limit.\r
+        # in addition we will be looking for lines that start with\r
+        # a period '.' and append and additional period '.' to that\r
+        # line. NOTE: this does not count towards are limit.\r
+\r
+        # normalize the line breaks so we know the explode works\r
+        $msg_data = str_replace("\r\n","\n",$msg_data);\r
+        $msg_data = str_replace("\r","\n",$msg_data);\r
+        $lines = explode("\n",$msg_data);\r
+\r
+        # we need to find a good way to determine is headers are\r
+        # in the msg_data or if it is a straight msg body\r
+        # currently I'm assuming rfc 822 definitions of msg headers\r
+        # and if the first field of the first line (':' sperated)\r
+        # does not contain a space then it _should_ be a header\r
+        # and we can process all lines before a blank "" line as\r
+        # headers.\r
+        $field = substr($lines[0],0,strpos($lines[0],":"));\r
+        $in_headers = false;\r
+        if(!empty($field) && !strstr($field," ")) {\r
+            $in_headers = true;\r
+        }\r
+\r
+        $max_line_length = 998; # used below; set here for ease in change\r
+\r
+        while(list(,$line) = @each($lines)) {\r
+            $lines_out = null;\r
+            if($line == "" && $in_headers) {\r
+                $in_headers = false;\r
+            }\r
+            # ok we need to break this line up into several\r
+            # smaller lines\r
+            while(strlen($line) > $max_line_length) {\r
+                $pos = strrpos(substr($line,0,$max_line_length)," ");\r
+\r
+                # Patch to fix DOS attack\r
+                if(!$pos) {\r
+                    $pos = $max_line_length - 1;\r
+                }\r
+\r
+                $lines_out[] = substr($line,0,$pos);\r
+                $line = substr($line,$pos + 1);\r
+                # if we are processing headers we need to\r
+                # add a LWSP-char to the front of the new line\r
+                # rfc 822 on long msg headers\r
+                if($in_headers) {\r
+                    $line = "\t" . $line;\r
+                }\r
+            }\r
+            $lines_out[] = $line;\r
+\r
+            # now send the lines to the server\r
+            while(list(,$line_out) = @each($lines_out)) {\r
+                if(strlen($line_out) > 0)\r
+                {\r
+                    if(substr($line_out, 0, 1) == ".") {\r
+                        $line_out = "." . $line_out;\r
+                    }\r
+                }\r
+                fputs($this->smtp_conn,$line_out . $this->CRLF);\r
+            }\r
+        }\r
+\r
+        # ok all the message data has been sent so lets get this\r
+        # over with aleady\r
+        fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($this->do_debug >= 2) {\r
+            echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;\r
+        }\r
+\r
+        if($code != 250) {\r
+            $this->error =\r
+                array("error" => "DATA not accepted from server",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Expand takes the name and asks the server to list all the\r
+     * people who are members of the _list_. Expand will return\r
+     * back and array of the result or false if an error occurs.\r
+     * Each value in the array returned has the format of:\r
+     *     [ <full-name> <sp> ] <path>\r
+     * The definition of <path> is defined in rfc 821\r
+     *\r
+     * Implements rfc 821: EXPN <SP> <string> <CRLF>\r
+     *\r
+     * SMTP CODE SUCCESS: 250\r
+     * SMTP CODE FAILURE: 550\r
+     * SMTP CODE ERROR  : 500,501,502,504,421\r
+     * @access public\r
+     * @return string array\r
+     */\r
+    function Expand($name) {\r
+        $this->error = null; # so no confusion is caused\r
+\r
+        if(!$this->connected()) {\r
+            $this->error = array(\r
+                    "error" => "Called Expand() without being connected");\r
+            return false;\r
+        }\r
+\r
+        fputs($this->smtp_conn,"EXPN " . $name . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($this->do_debug >= 2) {\r
+            echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;\r
+        }\r
+\r
+        if($code != 250) {\r
+            $this->error =\r
+                array("error" => "EXPN not accepted from server",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+\r
+        # parse the reply and place in our array to return to user\r
+        $entries = explode($this->CRLF,$rply);\r
+        while(list(,$l) = @each($entries)) {\r
+            $list[] = substr($l,4);\r
+        }\r
+\r
+        return $list;\r
+    }\r
+\r
+    /**\r
+     * Sends the HELO command to the smtp server.\r
+     * This makes sure that we and the server are in\r
+     * the same known state.\r
+     *\r
+     * Implements from rfc 821: HELO <SP> <domain> <CRLF>\r
+     *\r
+     * SMTP CODE SUCCESS: 250\r
+     * SMTP CODE ERROR  : 500, 501, 504, 421\r
+     * @access public\r
+     * @return bool\r
+     */\r
+    function Hello($host="") {\r
+        $this->error = null; # so no confusion is caused\r
+\r
+        if(!$this->connected()) {\r
+            $this->error = array(\r
+                    "error" => "Called Hello() without being connected");\r
+            return false;\r
+        }\r
+\r
+        # if a hostname for the HELO wasn't specified determine\r
+        # a suitable one to send\r
+        if(empty($host)) {\r
+            # we need to determine some sort of appopiate default\r
+            # to send to the server\r
+            $host = "localhost";\r
+        }\r
+\r
+        // Send extended hello first (RFC 2821)\r
+        if(!$this->SendHello("EHLO", $host))\r
+        {\r
+            if(!$this->SendHello("HELO", $host))\r
+                return false;\r
+        }\r
+\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Sends a HELO/EHLO command.\r
+     * @access private\r
+     * @return bool\r
+     */\r
+    function SendHello($hello, $host) {\r
+        fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($this->do_debug >= 2) {\r
+            echo "SMTP -> FROM SERVER: " . $this->CRLF . $rply;\r
+        }\r
+\r
+        if($code != 250) {\r
+            $this->error =\r
+                array("error" => $hello . " not accepted from server",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+\r
+        $this->helo_rply = $rply;\r
+        \r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Gets help information on the keyword specified. If the keyword\r
+     * is not specified then returns generic help, ussually contianing\r
+     * A list of keywords that help is available on. This function\r
+     * returns the results back to the user. It is up to the user to\r
+     * handle the returned data. If an error occurs then false is\r
+     * returned with $this->error set appropiately.\r
+     *\r
+     * Implements rfc 821: HELP [ <SP> <string> ] <CRLF>\r
+     *\r
+     * SMTP CODE SUCCESS: 211,214\r
+     * SMTP CODE ERROR  : 500,501,502,504,421\r
+     * @access public\r
+     * @return string\r
+     */\r
+    function Help($keyword="") {\r
+        $this->error = null; # to avoid confusion\r
+\r
+        if(!$this->connected()) {\r
+            $this->error = array(\r
+                    "error" => "Called Help() without being connected");\r
+            return false;\r
+        }\r
+\r
+        $extra = "";\r
+        if(!empty($keyword)) {\r
+            $extra = " " . $keyword;\r
+        }\r
+\r
+        fputs($this->smtp_conn,"HELP" . $extra . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($this->do_debug >= 2) {\r
+            echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;\r
+        }\r
+\r
+        if($code != 211 && $code != 214) {\r
+            $this->error =\r
+                array("error" => "HELP not accepted from server",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+\r
+        return $rply;\r
+    }\r
+\r
+    /**\r
+     * Starts a mail transaction from the email address specified in\r
+     * $from. Returns true if successful or false otherwise. If True\r
+     * the mail transaction is started and then one or more Recipient\r
+     * commands may be called followed by a Data command.\r
+     *\r
+     * Implements rfc 821: MAIL <SP> FROM:<reverse-path> <CRLF>\r
+     *\r
+     * SMTP CODE SUCCESS: 250\r
+     * SMTP CODE SUCCESS: 552,451,452\r
+     * SMTP CODE SUCCESS: 500,501,421\r
+     * @access public\r
+     * @return bool\r
+     */\r
+    function Mail($from) {\r
+        $this->error = null; # so no confusion is caused\r
+\r
+        if(!$this->connected()) {\r
+            $this->error = array(\r
+                    "error" => "Called Mail() without being connected");\r
+            return false;\r
+        }\r
+\r
+        fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($this->do_debug >= 2) {\r
+            echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;\r
+        }\r
+\r
+        if($code != 250) {\r
+            $this->error =\r
+                array("error" => "MAIL not accepted from server",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Sends the command NOOP to the SMTP server.\r
+     *\r
+     * Implements from rfc 821: NOOP <CRLF>\r
+     *\r
+     * SMTP CODE SUCCESS: 250\r
+     * SMTP CODE ERROR  : 500, 421\r
+     * @access public\r
+     * @return bool\r
+     */\r
+    function Noop() {\r
+        $this->error = null; # so no confusion is caused\r
+\r
+        if(!$this->connected()) {\r
+            $this->error = array(\r
+                    "error" => "Called Noop() without being connected");\r
+            return false;\r
+        }\r
+\r
+        fputs($this->smtp_conn,"NOOP" . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($this->do_debug >= 2) {\r
+            echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;\r
+        }\r
+\r
+        if($code != 250) {\r
+            $this->error =\r
+                array("error" => "NOOP not accepted from server",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Sends the quit command to the server and then closes the socket\r
+     * if there is no error or the $close_on_error argument is true.\r
+     *\r
+     * Implements from rfc 821: QUIT <CRLF>\r
+     *\r
+     * SMTP CODE SUCCESS: 221\r
+     * SMTP CODE ERROR  : 500\r
+     * @access public\r
+     * @return bool\r
+     */\r
+    function Quit($close_on_error=true) {\r
+        $this->error = null; # so there is no confusion\r
+\r
+        if(!$this->connected()) {\r
+            $this->error = array(\r
+                    "error" => "Called Quit() without being connected");\r
+            return false;\r
+        }\r
+\r
+        # send the quit command to the server\r
+        fputs($this->smtp_conn,"quit" . $this->CRLF);\r
+\r
+        # get any good-bye messages\r
+        $byemsg = $this->get_lines();\r
+\r
+        if($this->do_debug >= 2) {\r
+            echo "SMTP -> FROM SERVER:" . $this->CRLF . $byemsg;\r
+        }\r
+\r
+        $rval = true;\r
+        $e = null;\r
+\r
+        $code = substr($byemsg,0,3);\r
+        if($code != 221) {\r
+            # use e as a tmp var cause Close will overwrite $this->error\r
+            $e = array("error" => "SMTP server rejected quit command",\r
+                       "smtp_code" => $code,\r
+                       "smtp_rply" => substr($byemsg,4));\r
+            $rval = false;\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $e["error"] . ": " .\r
+                         $byemsg . $this->CRLF;\r
+            }\r
+        }\r
+\r
+        if(empty($e) || $close_on_error) {\r
+            $this->Close();\r
+        }\r
+\r
+        return $rval;\r
+    }\r
+\r
+    /**\r
+     * Sends the command RCPT to the SMTP server with the TO: argument of $to.\r
+     * Returns true if the recipient was accepted false if it was rejected.\r
+     *\r
+     * Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF>\r
+     *\r
+     * SMTP CODE SUCCESS: 250,251\r
+     * SMTP CODE FAILURE: 550,551,552,553,450,451,452\r
+     * SMTP CODE ERROR  : 500,501,503,421\r
+     * @access public\r
+     * @return bool\r
+     */\r
+    function Recipient($to) {\r
+        $this->error = null; # so no confusion is caused\r
+\r
+        if(!$this->connected()) {\r
+            $this->error = array(\r
+                    "error" => "Called Recipient() without being connected");\r
+            return false;\r
+        }\r
+\r
+        fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($this->do_debug >= 2) {\r
+            echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;\r
+        }\r
+\r
+        if($code != 250 && $code != 251) {\r
+            $this->error =\r
+                array("error" => "RCPT not accepted from server",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Sends the RSET command to abort and transaction that is\r
+     * currently in progress. Returns true if successful false\r
+     * otherwise.\r
+     *\r
+     * Implements rfc 821: RSET <CRLF>\r
+     *\r
+     * SMTP CODE SUCCESS: 250\r
+     * SMTP CODE ERROR  : 500,501,504,421\r
+     * @access public\r
+     * @return bool\r
+     */\r
+    function Reset() {\r
+        $this->error = null; # so no confusion is caused\r
+\r
+        if(!$this->connected()) {\r
+            $this->error = array(\r
+                    "error" => "Called Reset() without being connected");\r
+            return false;\r
+        }\r
+\r
+        fputs($this->smtp_conn,"RSET" . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($this->do_debug >= 2) {\r
+            echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;\r
+        }\r
+\r
+        if($code != 250) {\r
+            $this->error =\r
+                array("error" => "RSET failed",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Starts a mail transaction from the email address specified in\r
+     * $from. Returns true if successful or false otherwise. If True\r
+     * the mail transaction is started and then one or more Recipient\r
+     * commands may be called followed by a Data command. This command\r
+     * will send the message to the users terminal if they are logged\r
+     * in.\r
+     *\r
+     * Implements rfc 821: SEND <SP> FROM:<reverse-path> <CRLF>\r
+     *\r
+     * SMTP CODE SUCCESS: 250\r
+     * SMTP CODE SUCCESS: 552,451,452\r
+     * SMTP CODE SUCCESS: 500,501,502,421\r
+     * @access public\r
+     * @return bool\r
+     */\r
+    function Send($from) {\r
+        $this->error = null; # so no confusion is caused\r
+\r
+        if(!$this->connected()) {\r
+            $this->error = array(\r
+                    "error" => "Called Send() without being connected");\r
+            return false;\r
+        }\r
+\r
+        fputs($this->smtp_conn,"SEND FROM:" . $from . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($this->do_debug >= 2) {\r
+            echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;\r
+        }\r
+\r
+        if($code != 250) {\r
+            $this->error =\r
+                array("error" => "SEND not accepted from server",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Starts a mail transaction from the email address specified in\r
+     * $from. Returns true if successful or false otherwise. If True\r
+     * the mail transaction is started and then one or more Recipient\r
+     * commands may be called followed by a Data command. This command\r
+     * will send the message to the users terminal if they are logged\r
+     * in and send them an email.\r
+     *\r
+     * Implements rfc 821: SAML <SP> FROM:<reverse-path> <CRLF>\r
+     *\r
+     * SMTP CODE SUCCESS: 250\r
+     * SMTP CODE SUCCESS: 552,451,452\r
+     * SMTP CODE SUCCESS: 500,501,502,421\r
+     * @access public\r
+     * @return bool\r
+     */\r
+    function SendAndMail($from) {\r
+        $this->error = null; # so no confusion is caused\r
+\r
+        if(!$this->connected()) {\r
+            $this->error = array(\r
+                "error" => "Called SendAndMail() without being connected");\r
+            return false;\r
+        }\r
+\r
+        fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($this->do_debug >= 2) {\r
+            echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;\r
+        }\r
+\r
+        if($code != 250) {\r
+            $this->error =\r
+                array("error" => "SAML not accepted from server",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Starts a mail transaction from the email address specified in\r
+     * $from. Returns true if successful or false otherwise. If True\r
+     * the mail transaction is started and then one or more Recipient\r
+     * commands may be called followed by a Data command. This command\r
+     * will send the message to the users terminal if they are logged\r
+     * in or mail it to them if they are not.\r
+     *\r
+     * Implements rfc 821: SOML <SP> FROM:<reverse-path> <CRLF>\r
+     *\r
+     * SMTP CODE SUCCESS: 250\r
+     * SMTP CODE SUCCESS: 552,451,452\r
+     * SMTP CODE SUCCESS: 500,501,502,421\r
+     * @access public\r
+     * @return bool\r
+     */\r
+    function SendOrMail($from) {\r
+        $this->error = null; # so no confusion is caused\r
+\r
+        if(!$this->connected()) {\r
+            $this->error = array(\r
+                "error" => "Called SendOrMail() without being connected");\r
+            return false;\r
+        }\r
+\r
+        fputs($this->smtp_conn,"SOML FROM:" . $from . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($this->do_debug >= 2) {\r
+            echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;\r
+        }\r
+\r
+        if($code != 250) {\r
+            $this->error =\r
+                array("error" => "SOML not accepted from server",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * This is an optional command for SMTP that this class does not\r
+     * support. This method is here to make the RFC821 Definition\r
+     * complete for this class and __may__ be implimented in the future\r
+     *\r
+     * Implements from rfc 821: TURN <CRLF>\r
+     *\r
+     * SMTP CODE SUCCESS: 250\r
+     * SMTP CODE FAILURE: 502\r
+     * SMTP CODE ERROR  : 500, 503\r
+     * @access public\r
+     * @return bool\r
+     */\r
+    function Turn() {\r
+        $this->error = array("error" => "This method, TURN, of the SMTP ".\r
+                                        "is not implemented");\r
+        if($this->do_debug >= 1) {\r
+            echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF;\r
+        }\r
+        return false;\r
+    }\r
+\r
+    /**\r
+     * Verifies that the name is recognized by the server.\r
+     * Returns false if the name could not be verified otherwise\r
+     * the response from the server is returned.\r
+     *\r
+     * Implements rfc 821: VRFY <SP> <string> <CRLF>\r
+     *\r
+     * SMTP CODE SUCCESS: 250,251\r
+     * SMTP CODE FAILURE: 550,551,553\r
+     * SMTP CODE ERROR  : 500,501,502,421\r
+     * @access public\r
+     * @return int\r
+     */\r
+    function Verify($name) {\r
+        $this->error = null; # so no confusion is caused\r
+\r
+        if(!$this->connected()) {\r
+            $this->error = array(\r
+                    "error" => "Called Verify() without being connected");\r
+            return false;\r
+        }\r
+\r
+        fputs($this->smtp_conn,"VRFY " . $name . $this->CRLF);\r
+\r
+        $rply = $this->get_lines();\r
+        $code = substr($rply,0,3);\r
+\r
+        if($this->do_debug >= 2) {\r
+            echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;\r
+        }\r
+\r
+        if($code != 250 && $code != 251) {\r
+            $this->error =\r
+                array("error" => "VRFY failed on name '$name'",\r
+                      "smtp_code" => $code,\r
+                      "smtp_msg" => substr($rply,4));\r
+            if($this->do_debug >= 1) {\r
+                echo "SMTP -> ERROR: " . $this->error["error"] .\r
+                         ": " . $rply . $this->CRLF;\r
+            }\r
+            return false;\r
+        }\r
+        return $rply;\r
+    }\r
+\r
+    /*******************************************************************\r
+     *                       INTERNAL FUNCTIONS                       *\r
+     ******************************************************************/\r
+\r
+    /**\r
+     * Read in as many lines as possible\r
+     * either before eof or socket timeout occurs on the operation.\r
+     * With SMTP we can tell if we have more lines to read if the\r
+     * 4th character is '-' symbol. If it is a space then we don't\r
+     * need to read anything else.\r
+     * @access private\r
+     * @return string\r
+     */\r
+    function get_lines() {\r
+        $data = "";\r
+        while($str = fgets($this->smtp_conn,515)) {\r
+            if($this->do_debug >= 4) {\r
+                echo "SMTP -> get_lines(): \$data was \"$data\"" .\r
+                         $this->CRLF;\r
+                echo "SMTP -> get_lines(): \$str is \"$str\"" .\r
+                         $this->CRLF;\r
+            }\r
+            $data .= $str;\r
+            if($this->do_debug >= 4) {\r
+                echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF;\r
+            }\r
+            # if the 4th character is a space then we are done reading\r
+            # so just break the loop\r
+            if(substr($str,3,1) == " ") { break; }\r
+        }\r
+        return $data;\r
+    }\r
+\r
+}\r
+\r
+\r
+ ?>\r
diff --git a/docs/include/classes/phpmailer/phpmailer.lang-en.php b/docs/include/classes/phpmailer/phpmailer.lang-en.php
new file mode 100644 (file)
index 0000000..f4fe9bb
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+/**
+ * PHPMailer language file.  
+ * English Version
+ */
+
+$PHPMAILER_LANG = array();
+
+$PHPMAILER_LANG["provide_address"] = 'You must provide at least one ' .
+                                     'recipient email address.';
+$PHPMAILER_LANG["mailer_not_supported"] = ' mailer is not supported.';
+$PHPMAILER_LANG["execute"] = 'Could not execute: ';
+$PHPMAILER_LANG["instantiate"] = 'Could not instantiate mail function.';
+$PHPMAILER_LANG["authenticate"] = 'SMTP Error: Could not authenticate.';
+$PHPMAILER_LANG["from_failed"] = 'The following From address failed: ';
+$PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: The following ' .
+                                       'recipients failed: ';
+$PHPMAILER_LANG["data_not_ATcepted"] = 'SMTP Error: Data not accepted.';
+$PHPMAILER_LANG["connect_host"] = 'SMTP Error: Could not connect to SMTP host.';
+$PHPMAILER_LANG["file_ATcess"] = 'Could not access file: ';
+$PHPMAILER_LANG["file_open"] = 'File Error: Could not open file: ';
+$PHPMAILER_LANG["encoding"] = 'Unknown encoding: ';
+?>
diff --git a/docs/include/classes/sqlutility.class.php b/docs/include/classes/sqlutility.class.php
new file mode 100644 (file)
index 0000000..c2e239b
--- /dev/null
@@ -0,0 +1,200 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+class SqlUtility
+{
+       /**
+       * Function from phpMyAdmin (http://phpwizard.net/projects/phpMyAdmin/)
+       *
+       * Removes comment and splits large sql files into individual queries
+       *
+       * Last revision: September 23, 2001 - gandon
+       *
+       * @param   array    the splitted sql commands
+       * @param   string   the sql commands
+       * @return  boolean  always true
+       * @access  public
+       */
+       function splitSqlFile(&$ret, $sql)
+       {
+               $sql               = trim($sql);
+               $sql_len           = strlen($sql);
+               $char              = '';
+       $string_start      = '';
+       $in_string         = false;
+
+       for ($i = 0; $i < $sql_len; ++$i) {
+               $char = $sql[$i];
+
+           // We are in a string, check for not escaped end of
+                  // strings except for backquotes that can't be escaped
+           if ($in_string) {
+                       for (;;) {
+                               $i         = strpos($sql, $string_start, $i);
+                                       // No end of string found -> add the current
+                                       // substring to the returned array
+                       if (!$i) {
+                                               $ret[] = $sql;
+                       return true;
+                       }
+                                       // Backquotes or no backslashes before 
+                                       // quotes: it's indeed the end of the 
+                                       // string -> exit the loop
+                       else if ($string_start == '`' || $sql[$i-1] != '\\') {
+                                               $string_start      = '';
+                               $in_string         = false;
+                       break;
+                       }
+                       // one or more Backslashes before the presumed 
+                                       // end of string...
+                       else {
+                                               // first checks for escaped backslashes
+                       $j                     = 2;
+                       $escaped_backslash     = false;
+                                               while ($i-$j > 0 && $sql[$i-$j] == '\\') {
+                                                       $escaped_backslash = !$escaped_backslash;
+                               $j++;
+                       }
+                       // ... if escaped backslashes: it's really the 
+                                               // end of the string -> exit the loop
+                       if ($escaped_backslash) {
+                                                       $string_start  = '';
+                               $in_string     = false;
+                                                       break;
+                       }
+                       // ... else loop
+                       else {
+                                                       $i++;
+                       }
+                       } // end if...elseif...else
+               } // end for
+               } // end if (in string)
+               // We are not in a string, first check for delimiter...
+               else if ($char == ';') {
+                               // if delimiter found, add the parsed part to the returned array
+               $ret[]    = substr($sql, 0, $i);
+               $sql      = ltrim(substr($sql, min($i + 1, $sql_len)));
+                       $sql_len  = strlen($sql);
+               if ($sql_len) {
+                                       $i      = -1;
+               } else {
+                       // The submited statement(s) end(s) here
+                       return true;
+                               }
+               } // end else if (is delimiter)
+               // ... then check for start of a string,...
+               else if (($char == '"') || ($char == '\'') || ($char == '`')) {
+                               $in_string    = true;
+                               $string_start = $char;
+               } // end else if (is start of string)
+
+               // for start of a comment (and remove this comment if found)...
+               else if ($char == '#' || ($i > 1 && $sql[$i-2] . $sql[$i-1] == '--')) {
+               // starting position of the comment depends on the comment type
+                       $start_of_comment = (($sql[$i] == '#') ? $i : $i-2);
+               // if no "\n" exits in the remaining string, checks for "\r"
+               // (Mac eol style)
+                       $end_of_comment   = (strpos(' ' . $sql, "\012", $i+2))
+                              ? strpos(' ' . $sql, "\012", $i+2)
+                              : strpos(' ' . $sql, "\015", $i+2);
+                       if (!$end_of_comment) {
+                // no eol found after '#', add the parsed part to the returned
+                // array and exit
+                               $ret[]   = trim(substr($sql, 0, $i-1));
+                               return true;
+                               } else {
+                       $sql     = substr($sql, 0, $start_of_comment) . ltrim(substr($sql, $end_of_comment));
+                       $sql_len = strlen($sql);
+                       $i--;
+               } // end if...else
+               } // end else if (is comment)
+       } // end for
+
+       // add any rest to the returned array
+       if (!empty($sql) && trim($sql) != '') {
+                       $ret[] = $sql;
+       }
+       return true;
+       }
+
+       /**
+        * add a prefix.'_' to all tablenames in a query
+     * 
+     * @param   string  $query  valid MySQL query string
+     * @param   string  $prefix prefix to add to all table names
+        * @return  mixed   FALSE on failure
+        */
+       function prefixQuery($query, $prefix)
+       {
+               $pattern = "/^(INSERT INTO|CREATE TABLE|ALTER TABLE|UPDATE)(\s)+([`]?)([^`\s]+)\\3(\s)+/siU";
+               $pattern2 = "/^(DROP TABLE)(\s)+([`]?)([^`\s]+)\\3(\s)?$/siU";
+               if (preg_match($pattern, $query, $matches) || preg_match($pattern2, $query, $matches)) {
+                       $replace = "\\1 ".$prefix."\\4\\5";
+                       $matches[0] = preg_replace($pattern, $replace, $query);
+                       return $matches;
+               }
+               return false;
+       }
+
+       function queryFromFile($sql_file_path, $table_prefix){
+               global $db, $progress, $errors;
+               
+               include_once(AF_INCLUDE_PATH.'classes/DAO/DAO.class.php');
+               $dao = new DAO();
+               
+               $tables = array();
+
+        if (!file_exists($sql_file_path)) {
+            return false;
+        }
+
+        $sql_query = trim(fread(fopen($sql_file_path, 'r'), filesize($sql_file_path)));
+        SqlUtility::splitSqlFile($pieces, $sql_query);
+
+           foreach ($pieces as $piece) {
+               $piece = trim($piece);
+            // [0] contains the prefixed query
+            // [4] contains unprefixed table name
+
+                       if ($table_prefix || ($table_prefix == '')) {
+                   $prefixed_query = SqlUtility::prefixQuery($piece, $table_prefix);
+                       } else {
+                               $prefixed_query = $piece;
+                       }
+       
+                       if ($prefixed_query != false ) {
+                $table = $table_prefix.$prefixed_query[4];
+                $prefixed_query[1] = strtoupper($prefixed_query[1]);
+                
+                if(strtoupper($prefixed_query[1]) == 'CREATE TABLE'){
+                    if ($dao->execute($prefixed_query[0]) !== false) {
+                                               $progress[] = 'Table <b>'.$table . '</b> created successfully.';
+                    } else {
+                                               if (mysql_errno($db) == 1050) {
+                                                       $progress[] = 'Table <b>'.$table . '</b> already exists. Skipping.';
+                                               } else {
+                                                       $errors[] = 'Table <b>' . $table . '</b> creation failed.';
+                                               }
+                    }
+                }
+                elseif($prefixed_query[1] == 'INSERT INTO' ||
+                       $prefixed_query[1] == 'ALTER TABLE' ||
+                       $prefixed_query[1] == 'DROP TABLE' ||
+                       $prefixed_query[1] == 'UPDATE'){
+                                       $dao->execute($prefixed_query[0]);
+                }
+            }
+               }
+        return TRUE;
+    }
+}
+?>
\ No newline at end of file
diff --git a/docs/include/classes/zipfile.class.php b/docs/include/classes/zipfile.class.php
new file mode 100644 (file)
index 0000000..b258efb
--- /dev/null
@@ -0,0 +1,365 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* Class for creating and accessing an archive zip file
+* @access      public
+* @link                http://www.pkware.com/products/enterprise/white_papers/appnote.html     for the specs
+* @author      Joel Kronenberg
+*/
+class zipfile {
+
+       /**
+       * string $files_data - stores file information like the header and description 
+       * @access  public 
+       */
+       var $files_data;
+
+       /**
+       * string $central_directory_headers - headers necessary for including file in central record
+       * @access  public 
+       */
+       var $central_directory_headers; 
+
+       /**
+       * int $num_entries - a counter for the number of entries in the archive
+       * @access  public 
+       */
+       var $num_entries = 0;
+
+       /**
+       * string $zip_file - complete contents of file
+       * @access  public 
+       */
+       var $zip_file;
+
+       /**
+       * boolean $is_closed - flag set to true if file is closed, false if still open
+       * @access  private
+       */
+       var $is_closed; 
+
+
+       /**
+       * Constructor method.  Initialises variables.
+       * @access       public
+       * @author       Joel Kronenberg
+       */
+       function zipfile() {
+               $this->files_data = '';
+               $this->central_directory_headers = '';
+               $this->num_entries = 0;
+               $this->is_closed = false;
+       }
+
+       /**
+       * Public interface for adding a dir and its contents recursively to zip file
+       * @access  public
+       * @param   string $dir                          the real system directory that contains the files to add to the zip              
+       * @param   string $zip_prefix_dir       the zip dir where the contents of $dir will be put in
+       * @param   string $pre_pend_dir         used during the recursion to keep track of the path, default=''
+       * @see     $_base_path                          in include/vitals.inc.php
+       * @see     priv_add_dir()                       in include/classes/zipfile.class.php
+       * @see     add_file()                           in include/classes/zipfile.class.php
+       * @author  Joel Kronenberg
+       */
+       function add_dir($dir, $zip_prefix_dir, $pre_pend_dir='') {
+               if (!($dh = @opendir($dir.$pre_pend_dir))) {
+                       echo 'cant open dir: '.$dir.$pre_pend_dir;
+                       exit;
+               }
+
+               while (($file = readdir($dh)) !== false) {
+                       /* skip directories */
+                       if ($file == '.' || $file == '..') {
+                               continue;
+                       }
+                       /* skip potential harmful files/directories */
+                       if ( (strpos($file, '..') !== false) || (strpos($file, '/') !== false)) {
+                               continue;
+                       }
+
+                       $file_info = stat( $dir . $pre_pend_dir . $file );
+
+                       if (is_dir( $dir . $pre_pend_dir . $file )) {
+                               /* create this dir in the zip */
+                               $this->priv_add_dir( $zip_prefix_dir . $pre_pend_dir . $file . '/',
+                                                                        $file_info['mtime'] );
+
+                               /* continue recursion, going down this dir */
+                               $this->add_dir( $dir,
+                                                               $zip_prefix_dir,
+                                                               $pre_pend_dir . $file . '/' );
+
+                       } else {
+                               /* add this file to the zip */
+                               $this-> add_file( file_get_contents($dir . $pre_pend_dir . $file),
+                                                                 $zip_prefix_dir . $pre_pend_dir . $file,
+                                                                 $file_info['mtime'] );
+                       }
+               }
+               closedir($dh);
+       }
+
+       /**
+       * Adding a dir to the archive 
+       * @access  private
+       * @param   string $name                         directory name
+       * @param   string $timestamp            time, default=''
+       * @author  Joel Kronenberg
+       */
+    function priv_add_dir($name, $timestamp = '') {   
+        $name = str_replace("\\", "/", $name);   
+               $old_offset = strlen($this->files_data);
+
+        $local_file_header  = "\x50\x4b\x03\x04";                                                                                              // local file header signature 4 bytes (0x04034b50) 
+        $local_file_header .= "\x0a\x00";    // ver needed to extract                                                  // version needed to extract 2 bytes
+        $local_file_header .= "\x00\x00";    // gen purpose bit flag                                                   // general purpose bit flag 2 bytes
+        $local_file_header .= "\x00\x00";    // compression method                                                             // compression method 2 bytes
+        $local_file_header .= "\x00\x00\x00\x00"; // last mod time and date                                    // last mod file time 2 bytes & last mod file date 2 bytes 
+        $local_file_header .= pack("V",0); // crc32                                                                                    // crc-32 4 bytes
+        $local_file_header .= pack("V",0); //compressed filesize                                                               // compressed size 4 bytes 
+        $local_file_header .= pack("V",0); //uncompressed filesize                                                             // uncompressed size 4 bytes
+        $local_file_header .= pack("v", strlen($name) ); //length of pathname                                  // file name length 2 bytes 
+        $local_file_header .= pack("v", 0 ); //extra field length                                                              // extra field length 2 bytes           
+        $local_file_header .= $name;                                                                                                                   // file name (variable size)  & extra field (variable size)
+        // end of "local file header" segment 
+
+        // no "file data" segment for path 
+
+        // add this entry to array 
+        $this->files_data .= $local_file_header;
+
+        // ext. file attributes mirrors MS-DOS directory attr byte, detailed 
+        // at http://support.microsoft.com/support/kb/articles/Q125/0/19.asp 
+
+               if ($timestamp) {
+                       $v_date = getdate($timestamp);
+               } else {
+                       $v_date = getdate();
+               }
+               $time = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2;
+               $date = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday'];
+
+        // now add to central record 
+        $central_directory = "\x50\x4b\x01\x02";                                                                                       // central file header signature 4 bytes (0x02014b50)
+        $central_directory .="\x14\x00";    // version made by                                                         // version made by 2 bytes
+        $central_directory .="\x14\x00";    // version needed to extract                                       // version needed to extract 2 bytes
+        $central_directory .="\x00\x00";    // gen purpose bit flag                                                    // general purpose bit flag 2 bytes
+        $central_directory .="\x00\x00";    // compression method                                                      // compression method 2 bytes
+               $central_directory .= pack("v",$time); // time                                                                          // last mod file time 2 bytes
+        $central_directory .= pack("v",$date); // date                                                                         // last mod file date 2 bytes
+        $central_directory .= pack("V", 0); // crc32                                                                           // crc-32 4 bytes
+        $central_directory .= pack("V", 0); // compressed filesize                                                     // compressed size 4 bytes
+        $central_directory .= pack("V", 0); // uncompressed filesize                                           // uncompressed size 4 bytes
+        $central_directory .= pack("v", strlen($name) ); //length of filename                          // file name length 2 bytes
+        $central_directory .= pack("v", 0); // extra field length                                                      // extra field length 2 bytes
+        $central_directory .= pack("v", 0); // file comment length                                                     // file comment length 2 bytes 
+        $central_directory .= pack("v", 0); // disk number start                                                       // disk number start 2 bytes
+        $central_directory .= pack("v", 0); // internal file attributes                                                // internal file attributes 2 bytes
+        $central_directory .= pack("V", 16+32); //external file attributes  - 'directory' 'archive' bit set // external file attributes 4 bytes
+        $central_directory .= pack("V", $old_offset); //relative offset of local header // relative offset of local header 4 bytes
+        $central_directory .= $name;                                                                                                           // file name (variable size)
+
+       $this->central_directory_headers .= $central_directory;
+
+               $this->num_entries++;
+    } 
+       
+       /**
+       * Public interface to create a directory in the archive.
+       * @access  public
+       * @param   string $name                         directory name
+       * @param   string $timestamp            time of creation, default=''
+       * @see     $_base_path                          in include/vitals.inc.php
+       * @see     priv_add_dir()                       in include/zipfile.class.php
+       * @author  Joel Kronenberg
+       */
+       function create_dir($name, $timestamp='') {
+               $name = trim($name);
+
+               if (substr($name, -1) != '/') {
+                       /* add the trailing slash */
+                       $name .= '/';
+               }
+
+               $this->priv_add_dir($name, $timestamp = '');
+       }
+
+       /**
+       * Adds a file to the archive.
+       * @access  public
+       * @param   string $file_data            file contents
+       * @param   string $name                         name of file in archive (add path if your want)
+       * @param   string $timestamp            time of creation, default=''
+       * @see     $_base_path                          in include/vitals.inc.php
+       * @see     priv_add_dir()                       in include/zipfile.class.php
+       * @author  Joel Kronenberg
+       */
+    function add_file($file_data, $name, $timestamp = '') {
+        $name = str_replace("\\", "/", $name);   
+        $crc = crc32($file_data);
+        $uncompressed_size = strlen($file_data);
+               $file_data = substr(gzcompress($file_data, 9), 2, -4);
+        $compressed_size = strlen($file_data);
+               $old_offset = strlen($this->files_data);
+
+               /* local file header */
+        $local_file_header = "\x50\x4b\x03\x04";                                                               // local file header signature 4 bytes (0x04034b50) 
+        $local_file_header .= "\x14\x00";    // ver needed to extract                  // version needed to extract 2 bytes 
+        $local_file_header .= "\x00\x00";    // gen purpose bit flag                   // general purpose bit flag 2 bytes 
+        $local_file_header .= "\x08\x00";    // compression method                             // compression method 2 bytes 
+        $local_file_header .= "\x00\x00\x00\x00"; // last mod time and date    // last mod file time 2 bytes & last mod file date 2 bytes 
+        $local_file_header .= pack("V",$crc); // crc32                                                 // crc-32 4 bytes 
+        $local_file_header .= pack("V",$compressed_size); //compressed filesize                        // compressed size 4 bytes 
+        $local_file_header .= pack("V",$uncompressed_size); //uncompressed filesize            // uncompressed size 4 bytes 
+        $local_file_header .= pack("v", strlen($name) ); //length of filename  // file name length 2 bytes 
+        $local_file_header .= "\x00\x00"; //extra field length                         // extra field length 2 bytes 
+        $local_file_header .= $name;                                                                                   // file name (variable size)  & extra field (variable size) 
+               /* end of local file header */
+          
+               $this->files_data .= $local_file_header . $file_data; // . $data_descriptor;;
+
+               /* create the central directory */
+               $central_directory = '';
+               if ($timestamp) {
+                       $v_date = getdate($timestamp);
+               } else {
+                       $v_date = getdate();
+               }
+               $time = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2;
+               $date = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday'];
+
+        // now add to central directory record 
+        $central_directory = "\x50\x4b\x01\x02";                                                                                       // central file header signature 4 bytes (0x02014b50)
+        $central_directory .="\x14\x00";    // version made by                                                         // version made by 2 bytes 
+        $central_directory .="\x14\x00";    // version needed to extract                                       // version needed to extract 2 bytes 
+        $central_directory .="\x00\x00";    // gen purpose bit flag                                                    // general purpose bit flag 2 bytes 
+        $central_directory .="\x08\x00";    // compression method                                                      // compression method 2 bytes         
+        $central_directory .= pack("v",$time); // time                                                                         // last mod file time 2 bytes 
+               $central_directory .= pack("v",$date); // date                                                                          // last mod file date 2 bytes 
+               $central_directory .= pack("V",$crc); // crc32                                                                          // crc-32 4 bytes 
+        $central_directory .= pack("V",$compressed_size); //compressed filesize                                                // compressed size 4 bytes 
+        $central_directory .= pack("V",$uncompressed_size); //uncompressed filesize                                    // uncompressed size 4 bytes 
+        $central_directory .= pack("v", strlen($name) ); //length of filename                          // file name length 2 bytes 
+        $central_directory .= "\x00\x00"; //extra field length                                                 // extra field length 2 bytes 
+        $central_directory .= "\x00\x00"; //file comment length                                                        // file comment length 2 bytes 
+        $central_directory .= "\x00\x00"; //disk number start                                                  // disk number start 2 bytes 
+        $central_directory .= "\x00\x00"; //internal file attributes                                           // internal file attributes 2 bytes 
+        $central_directory .= pack("V", 32); //external file attributes - 'archive' bit set // external file attributes 4 bytes 
+               $central_directory .= pack("V", $old_offset);
+
+        $central_directory .= $name;                                                                                                           // file name (variable size)
+
+               $this->central_directory_headers .= $central_directory;
+       
+               $this->num_entries++;
+    } 
+
+       /**
+       * Closes archive, sets $is_closed to true
+       * @access  public
+       * @param   none
+       * @author  Joel Kronenberg
+       */
+       function close() {
+               $this->files_data .= $this->central_directory_headers . "\x50\x4b\x05\x06\x00\x00\x00\x00" .   
+            pack("v", $this->num_entries).     // total # of entries "on this disk" 
+            pack("v", $this->num_entries).     // total # of entries overall 
+            pack("V", strlen($this->central_directory_headers)).             // size of central dir 
+            pack("V", strlen($this->files_data)).                 // offset to start of central dir 
+            "\x00\x00"; 
+
+               unset($this->central_directory_headers);
+               unset($this->num_entries);
+
+               $this->zip_file =& $this->files_data;
+               $this->is_closed = true;
+       }
+
+    /**
+       * Gets size of new archive
+       * Only call this after calling close() - will return false if the zip wasn't close()d yet
+       * @access  public
+       * @return  int  size of file
+       * @author  Joel Kronenberg
+       */
+       function get_size() {
+               if (!$this->is_closed) {
+                       return false;
+               }
+               return strlen($this->zip_file);
+       }
+
+
+    /**
+       * Returns binary file
+       * @access       public
+       * @see          get_size()              in include/classes/zipfile.class.php
+       * @author  Joel Kronenberg
+       */      
+       function get_file() {
+               if (!$this->is_closed) {
+                       $this->close();
+               }
+               return $this->zip_file;
+    }
+
+       /**
+       * Writes the file to disk.
+       * Similar to get_file(), but instead of returning the file, it saves it to disk.
+       * @access  public
+       * @author  Joel Kronenberg
+       * @param  $file The full path and file name of the destination file.
+       */
+       function write_file($file) {
+               if (!$this->is_closed) {
+                       $this->close();
+               }
+               if (function_exists('file_put_contents')) {
+                       file_put_contents($file, $this->zip_file);
+               } else {
+                       $fp = fopen($file, 'wb+');
+                       fwrite($fp, $this->zip_file);
+                       fclose($fp);
+               }
+       }
+
+
+    /**
+       * Outputs the file - sends headers to browser to force download
+       * Only call this after calling close() - will return false if the zip wasn't close()d yet
+       * @access       public
+       * @see          get_size()              in include/classes/zipfile.class.php
+       * @author  Joel Kronenberg
+       */
+       function send_file($file_name) {
+               if (!$this->is_closed) {
+                       $this->close();
+               }
+               $file_name = str_replace(array('"', '<', '>', '|', '?', '*', ':', '/', '\\'), '', $file_name);
+
+               header('Content-Type: application/x-zip');
+               header('Content-transfer-encoding: binary'); 
+               header('Content-Disposition: attachment; filename="'.htmlspecialchars($file_name).'.zip"');
+               header('Expires: 0');
+               header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+               header('Pragma: public');
+               header('Content-Length: '.$this->get_size());
+
+               echo $this->get_file();
+
+               exit;
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/docs/include/config.inc.php b/docs/include/config.inc.php
new file mode 100644 (file)
index 0000000..3928767
--- /dev/null
@@ -0,0 +1,44 @@
+<?php 
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+/* This file was generated by the AFrame 0.1 installation script.       */
+/* File generated 2009-10-07 09:10:45                                   */
+/************************************************************************/
+/************************************************************************/
+/* the database user name                                               */
+define('DB_USER',                      'root');
+
+/* the database password                                                */
+define('DB_PASSWORD',                  '');
+
+/* the database host                                                    */
+define('DB_HOST',                      'localhost');
+
+/* the database tcp/ip port                                             */
+define('DB_PORT',                      '3306');
+
+/* the database name                                                    */
+define('DB_NAME',                      'aframe');
+
+/* The prefix to add to table names to avoid conflicts with existing    */
+/* tables. Default: AF_                                                 */
+define('TABLE_PREFIX',                 'AF_');
+
+/* Where the temporary files are located.  This includes all file       */
+/* manager and imported files.  If security is a concern, it is         */
+/* recommended that the temporary directory be moved outside of the web        */
+/* accessible area.                                                                                                            */
+define('AF_TEMP_DIR', 'C:\\Development\\aframe\\temp\\');
+
+/* DO NOT ALTER THIS LAST LINE                                          */
+define('AF_INSTALL', TRUE);
+
+?>
\ No newline at end of file
diff --git a/docs/include/constants.inc.php b/docs/include/constants.inc.php
new file mode 100644 (file)
index 0000000..6fe03ab
--- /dev/null
@@ -0,0 +1,104 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+/**
+ * constants, some more constants are loaded from table 'config' @ include/vitals.inc.php
+ **/
+
+/* config variables. if they're not in the db then it uses the installation default values: */
+$_config_defaults = array();
+$_config_defaults['site_name']          = '';
+$_config_defaults['contact_email']      = '';
+$_config_defaults['max_file_size']      = 1048576;  // 1MB
+$_config_defaults['illegal_extentions'] = 'exe|asp|php|php3|bat|cgi|pl|com|vbs|reg|pcd|pif|scr|bas|inf|vb|vbe|wsc|wsf|wsh';
+$_config_defaults['default_language']   = 'eng';
+$_config_defaults['use_captcha']               = 0;    //use captcha?
+$_config_defaults['latex_server']       = 'http://www.atutor.ca/cgi/mimetex.cgi?'; // the full URL to an external LaTeX parse
+$_config_defaults['pref_defaults']      = 'a:1:{s:10:"PREF_THEME";s:7:"default";}';
+$_config = $_config_defaults;
+
+define('VERSION',              '0.1');
+define('UPDATE_SERVER', 'http://update.atutor.ca');
+define('SVN_TAG_FOLDER', 'http://atutorsvn.atrc.utoronto.ca/repos/atutor/tags/');
+
+// language constants
+define('DEFAULT_LANGUAGE_CODE', 'eng');
+define('DEFAULT_CHARSET', 'utf-8');
+define('AF_LANGUAGE_LOCALE_SEP', '-');
+//$_config['default_language'] = DEFAULT_LANGUAGE_CODE;
+
+/* User group type */
+define('AF_USER_GROUP_ADMIN', 1);
+define('AF_USER_GROUP_USER', 2);
+
+/* User status */
+define('AF_STATUS_DISABLED', 0);
+define('AF_STATUS_ENABLED', 1);
+define('AF_STATUS_DEFAULT', 2);
+define('AF_STATUS_UNCONFIRMED', 3);
+
+function get_status_by_code($status_code)
+{
+       if ($status_code == AF_STATUS_DISABLED)
+                return _AT('disabled');
+       else if ($status_code == AF_STATUS_ENABLED)
+                return _AT('enabled');
+       else if ($status_code == AF_STATUS_DEFAULT)
+                return _AT('default');
+       else if ($status_code == AF_STATUS_UNCONFIRMED)
+                return _AT('unconfirmed');
+       else
+               return '';
+}
+
+/* User status */
+/* how many days until the password reminder link expires */
+define('AF_PASSWORD_REMINDER_EXPIRY', 2);
+
+/* how long cache objects can persist  */
+/* in seconds. should be low initially, but doesn't really matter. */
+/* in practice should be 0 (ie. INF)    */
+define('CACHE_TIME_OUT',       60);
+
+// separator used in composing URL
+if (strpos(@ini_get('arg_separator.input'), ';') !== false) {
+       define('SEP', ';');
+} else {
+       define('SEP', '&');
+}
+
+/* get the base url    */
+if (isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on')) {
+       $server_protocol = 'https://';
+} else {
+       $server_protocol = 'http://';
+}
+
+$dir_deep       = substr_count(AF_INCLUDE_PATH, '..');
+$url_parts      = explode('/', $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']);
+$_base_href     = array_slice($url_parts, 0, count($url_parts) - $dir_deep-1);
+$_base_href     = $server_protocol . implode('/', $_base_href).'/';
+
+$endpos = strlen($_base_href); 
+
+$_base_href     = substr($_base_href, 0, $endpos);
+$_base_path  = substr($_base_href, strlen($server_protocol . $_SERVER['HTTP_HOST']));
+
+define('AF_BASE_HREF', $_base_href);
+define('AF_GUIDES_PATH', $_base_path . 'documentation/');
+
+/* relative uri */
+$_rel_url = '/'.implode('/', array_slice($url_parts, count($url_parts) - $dir_deep-1));
+
+?>
diff --git a/docs/include/footer.inc.php b/docs/include/footer.inc.php
new file mode 100644 (file)
index 0000000..60efbf6
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+global $savant;
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+$savant->display('include/footer.tmpl.php');
+?>
diff --git a/docs/include/handbook_pages.inc.php b/docs/include/handbook_pages.inc.php
new file mode 100644 (file)
index 0000000..152a433
--- /dev/null
@@ -0,0 +1,34 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+$handbook_pages = array(\r
+               'register.php',\r
+               'login.php',\r
+               'password_reminder.php',\r
+               'user/index.php' =>      array(\r
+                                        'user/user_create_edit.php',\r
+                                        'user/user_password.php',\r
+                                        'user/user_group.php',\r
+                                        'user/user_group_create_edit.php'   \r
+                                        ),\r
+               'language/index.php' =>  array(\r
+                                        'language/language_add_edit.php'\r
+                                        ),\r
+               'translation/index.php' => array(),\r
+               'profile/index.php' =>   array(\r
+                                        'profile/change_password.php',\r
+                                        'profile/change_email.php'\r
+                                        ),\r
+               'updater/index.php' => array('updater/patch_create.php')\r
+);\r
+\r
+?>
\ No newline at end of file
diff --git a/docs/include/handleResponse.php b/docs/include/handleResponse.php
new file mode 100644 (file)
index 0000000..9800d80
--- /dev/null
@@ -0,0 +1,40 @@
+//************************************************************************/\r
+//* AFrame                                                               */\r
+//************************************************************************/\r
+//* Copyright (c) 2009                                                   */\r
+//* Adaptive Technology Resource Centre / University of Toronto          */\r
+//*                                                                      */\r
+//* This program is free software. You can redistribute it and/or        */\r
+//* modify it under the terms of the GNU General Public License          */\r
+//* as published by the Free Software Foundation.                        */\r
+//************************************************************************/\r
+\r
+function handleResponse(data)\r
+{\r
+       if (data.status != "fail") return;\r
+       \r
+       if (data.num_of_errors > 0)\r
+       {\r
+               for(i==0; i<data.error.length; i++)\r
+               {\r
+                       alert(i);\r
+               }\r
+       }\r
+}\r
+\r
+// templates for message boxes\r
+var template_error_prefix = '\\r
+       <div id="error"> \\r
+       <h4><?php echo _AT('the_follow_errors_occurred'); ?></h4> \\r
+';\r
+\r
+var template_warning_prefix = '\\r
+       <div id="warning"> \\r
+';\r
+\r
+var template_feedback_prefix = '\\r
+       <div id="feedback"> \\r
+';\r
+\r
+\r
+var template_suffix = '        </div>';
\ No newline at end of file
diff --git a/docs/include/header.inc.php b/docs/include/header.inc.php
new file mode 100644 (file)
index 0000000..aef6526
--- /dev/null
@@ -0,0 +1,111 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+//Timer, to display "Time Spent" in footer, debug information
+$mtime = microtime(); 
+$mtime = explode(' ', $mtime); 
+$mtime = $mtime[1] + $mtime[0]; 
+$starttime = $mtime; 
+//Timer Ends
+
+global $myLang;
+global $savant;
+global $onload;
+global $_custom_css;
+global $_custom_head;
+global $_base_path;
+global $_pages;
+global $_current_user;
+global $validate_content;
+
+include_once(AF_INCLUDE_PATH.'classes/Menu.class.php');
+
+$menu =new Menu();
+$_top_level_pages = $menu->getTopPages();
+
+$_all_pages =  $menu->getAllPages();
+
+$_current_root_page = $menu->getRootPage();
+
+//$_breadcrumb_path = $menu->getPath();
+
+$current_page = $menu->getCurrentPage();
+
+$_sub_menus = $menu->getSubMenus();
+$back_to_page = $menu->getBackToPage();
+
+//debug($_base_path.$current_page);
+//debug($_sub_menus);
+//exit;
+
+//debug($_top_level_pages);
+//debug($_all_pages);
+//debug($_current_root_page);
+//debug($_current_page);
+
+//$savant->assign('path', $_breadcrumb_path);
+$savant->assign('top_level_pages', $_top_level_pages);
+$savant->assign('current_top_level_page', $_current_root_page);
+$savant->assign('sub_menus', $_sub_menus);
+$savant->assign('back_to_page', $back_to_page);
+$savant->assign('current_page', $_base_path.$current_page);
+
+$savant->assign('page_title', _AT($_all_pages[$current_page]['title_var']));
+
+if (isset($_current_user))
+{
+  $savant->assign('user_name', $_current_user->getUserName());
+}
+
+if ($myLang->isRTL()) {
+       $savant->assign('rtl_css', '<link rel="stylesheet" href="'.$_base_path.'themes/'.$_SESSION['prefs']['PREF_THEME'].'/rtl.css" type="text/css" />');
+} else {
+       $savant->assign('rtl_css', '');
+}
+
+$savant->assign('lang_code', $_SESSION['lang']);
+$savant->assign('lang_charset', $myLang->getCharacterSet());
+$savant->assign('base_path', AF_BASE_HREF);
+$savant->assign('theme', $_SESSION['prefs']['PREF_THEME']);
+
+$theme_img  = $_base_path . 'themes/'. $_SESSION['prefs']['PREF_THEME'] . '/images/';
+$savant->assign('img', $theme_img);
+
+if (isset($validate_content))
+{
+       $savant->assign('show_jump_to_report', 1);
+}
+
+if (isset($_custom_css)) {
+       $custom_head = '<link rel="stylesheet" href="'.$_custom_css.'" type="text/css" />';
+}
+
+if (isset($_custom_head)) {
+       $custom_head .= '
+' . $_custom_head;
+}
+
+if (isset($_pages[$current_page]['guide'])) 
+{
+       $script_name = substr($_SERVER['PHP_SELF'], strlen($_base_path));
+       $savant->assign('guide', AF_GUIDES_PATH .'index.php?p='. htmlentities($script_name));
+}
+
+$savant->assign('custom_head', $custom_head);
+
+if ($onload)   $savant->assign('onload', $onload);
+
+$savant->display('include/header.tmpl.php');
+
+?>
diff --git a/docs/include/jscripts/handleResponse.js b/docs/include/jscripts/handleResponse.js
new file mode 100644 (file)
index 0000000..1d7604d
--- /dev/null
@@ -0,0 +1,104 @@
+//************************************************************************/\r
+//* AFrame                                                               */\r
+//************************************************************************/\r
+//* Copyright (c) 2009                                                   */\r
+//* Adaptive Technology Resource Centre / University of Toronto          */\r
+//*                                                                      */\r
+//* This program is free software. You can redistribute it and/or        */\r
+//* modify it under the terms of the GNU General Public License          */\r
+//* as published by the Free Software Foundation.                        */\r
+//************************************************************************/\r
+\r
+// Parse returned data from ajax php script and display messages in div\r
+// with id "rtn-msg".\r
+// @parameter: data   - array\r
+//  data array structure\r
+//  data['status'] = 'fail';  // fail or success\r
+//  data['num_of_errors'] = 3;\r
+//  data['num_of_feedbacks'] = 2;\r
+//  data['num_of_warnings'] = 1;\r
+//  data['error'][] = 'error 1';\r
+//  data['error'][] = 'error 2';\r
+//  data['error'][] = 'error 3';\r
+//\r
+//  data['feedback'][] = 'feedback 1';\r
+//  data['feedback'][] = 'feedback 2';\r
+//\r
+//  data['warning'][] = 'warning 1';\r
+function handleResponse(data)\r
+{\r
+       var msg='';\r
+       \r
+       if (data == null) return;\r
+       \r
+       if (typeof(data.status) == "undefined" || data.status == "success") \r
+       {\r
+               jQuery('#rtn-msg').empty();\r
+               return;\r
+       }\r
+       \r
+       // data.status == "fail", handle messages\r
+       if (typeof(data.error) != "undefined")\r
+       {\r
+               msg += template_error_prefix;\r
+               for(i=0; i<data.error.length; i++)\r
+               {\r
+                       if (data.error[i] != "") msg += "<li>"+data.error[i]+"</li>";\r
+               }\r
+               msg += template_suffix;\r
+       }\r
+\r
+       if (typeof(data.feedback) != "undefined")\r
+       {\r
+               msg += template_feedback_prefix;\r
+               for(i=0; i<data.feedback.length; i++)\r
+               {\r
+                       if (data.feedback[i] != "") msg += "<li>"+data.feedback[i]+"</li>";\r
+               }\r
+               msg += template_suffix;\r
+       }\r
+       \r
+       if (typeof(data.warning) != "undefined")\r
+       {\r
+               msg += template_warning_prefix;\r
+               for(i=0; i<data.warning.length; i++)\r
+               {\r
+                       if (data.warning[i] != "") msg += "<li>"+data.warning[i]+"</li>";\r
+               }\r
+               msg += template_suffix;\r
+       }\r
+       \r
+       jQuery('#rtn-msg').html(msg);\r
+}\r
+\r
+function addslashes(str)\r
+{\r
+       str=str.replace(/\\/g,'\\\\');\r
+       str=str.replace(/\'/g,'\\\'');\r
+       str=str.replace(/\"/g,'\\"');\r
+       str=str.replace(/\0/g,'\\0');\r
+       str=str.replace(/\|/g,'\\|');\r
+       \r
+       return str;\r
+}\r
+// templates for message boxes\r
+var template_error_prefix = '\\r
+       <div id="error"> \\r
+       <h4>The following errors occurred:</h4> \\r
+       <ul> \\r
+';\r
+\r
+var template_warning_prefix = '\\r
+       <div id="warning"> \\r
+       <ul> \\r
+';\r
+\r
+var template_feedback_prefix = '\\r
+       <div id="feedback"> \\r
+       <ul> \\r
+';\r
+\r
+\r
+var template_suffix = '        </ul>\\r
+       </div> \\r
+';
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/InfusionAll.js b/docs/include/jscripts/infusion/InfusionAll.js
new file mode 100644 (file)
index 0000000..5043501
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * jQuery JavaScript Library v1.3.2
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
+ * Revision: 6246
+ */
+(function(){var window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context)},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this}if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context)}else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3]){return jQuery().find(selector)}var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret}}else{return jQuery(context).find(selector)}}else{if(jQuery.isFunction(selector)){return jQuery(document).ready(selector)}}if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context}return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(num){return num===undefined?Array.prototype.slice.call(this):this[num]},pushStack:function(elems,name,selector){var ret=jQuery(elems);ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector}else{if(name){ret.selector=this.selector+"."+name+"("+selector+")"}}return ret},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this},each:function(callback,args){return jQuery.each(this,callback,args)},index:function(elem){return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this)},attr:function(name,value,type){var options=name;if(typeof name==="string"){if(value===undefined){return this[0]&&jQuery[type||"attr"](this[0],name)}else{options={};options[name]=value}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name))}})},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined}return this.attr(key,value,"curCSS")},text:function(text){if(typeof text!=="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text))}var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this])}})});return ret},wrapAll:function(html){if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).clone();if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstChild){elem=elem.firstChild}return elem}).append(this)}return this},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html)})},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html)})},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling)})},end:function(){return this.prevObject||jQuery([])},push:[].push,sort:[].sort,splice:[].splice,find:function(selector){if(this.length===1){var ret=this.pushStack([],"find",selector);ret.length=0;jQuery.find(selector,this[0],ret);return ret}else{return this.pushStack(jQuery.unique(jQuery.map(this,function(elem){return jQuery.find(selector,elem)})),"find",selector)}},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML;if(!html){var div=this.ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML}return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(events===true){var orig=this.find("*").andSelf(),i=0;ret.find("*").andSelf().each(function(){if(this.nodeName!==orig[i].nodeName){return }var events=jQuery.data(orig[i],"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data)}}i++})}return ret},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i)})||jQuery.multiFilter(selector,jQuery.grep(this,function(elem){return elem.nodeType===1})),"filter",selector)},closest:function(selector){var pos=jQuery.expr.match.POS.test(selector)?jQuery(selector):null,closer=0;return this.map(function(){var cur=this;while(cur&&cur.ownerDocument){if(pos?pos.index(cur)>-1:jQuery(cur).is(selector)){jQuery.data(cur,"closest",closer);return cur}cur=cur.parentNode;closer++}})},not:function(selector){if(typeof selector==="string"){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true),"not",selector)}else{selector=jQuery.multiFilter(selector,this)}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector})},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector==="string"?jQuery(selector):jQuery.makeArray(selector))))},is:function(selector){return !!selector&&jQuery.multiFilter(selector,this).length>0},hasClass:function(selector){return !!selector&&this.is("."+selector)},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,"option")){return(elem.attributes.value||{}).specified?elem.value:elem.text}if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0){return null}for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery(option).val();if(one){return value}values.push(value)}}return values}return(elem.value||"").replace(/\r/g,"")}return undefined}if(typeof value==="number"){value+=""}return this.each(function(){if(this.nodeType!=1){return }if(jQuery.isArray(value)&&/radio|checkbox/.test(this.type)){this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0)}else{if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0)});if(!values.length){this.selectedIndex=-1}}else{this.value=value}}})},html:function(value){return value===undefined?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(value)},replaceWith:function(value){return this.after(value).remove()},eq:function(i){return this.slice(i,+i+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(args,table,callback){if(this[0]){var fragment=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(args,(this[0].ownerDocument||this[0]),fragment),first=fragment.firstChild;if(first){for(var i=0,l=this.length;i<l;i++){callback.call(root(this[i],first),this.length>1||i>0?fragment.cloneNode(true):fragment)}}if(scripts){jQuery.each(scripts,evalScript)}}return this;function root(elem,cur){return table&&jQuery.nodeName(elem,"table")&&jQuery.nodeName(cur,"tr")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem}}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"})}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"")}if(elem.parentNode){elem.parentNode.removeChild(elem)}}function now(){return +new Date}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2}if(typeof target!=="object"&&!jQuery.isFunction(target)){target={}}if(length==i){target=this;--i}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){var src=target[name],copy=options[name];if(target===copy){continue}if(deep&&copy&&typeof copy==="object"&&!copy.nodeType){target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy)}else{if(copy!==undefined){target[name]=copy}}}}}return target};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{},toString=Object.prototype.toString;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery}return jQuery},isFunction:function(obj){return toString.call(obj)==="[object Function]"},isArray:function(obj){return toString.call(obj)==="[object Array]"},isXMLDoc:function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&jQuery.isXMLDoc(elem.ownerDocument)},globalEval:function(data){if(data&&/\S/.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval){script.appendChild(document.createTextNode(data))}else{script.text=data}head.insertBefore(script,head.firstChild);head.removeChild(script)}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase()},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length===undefined){for(name in object){if(callback.apply(object[name],args)===false){break}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break}}}}else{if(length===undefined){for(name in object){if(callback.call(object[name],name,object[name])===false){break}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}return object},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value)){value=value.call(elem,i)}return typeof value==="number"&&type=="curCSS"&&!exclude.test(name)?value+"px":value},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)){elem.className+=(elem.className?" ":"")+className}})},remove:function(elem,classNames){if(elem.nodeType==1){elem.className=classNames!==undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return !jQuery.className.has(classNames,className)}).join(" "):""}},has:function(elem,className){return elem&&jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name]}callback.call(elem);for(var name in options){elem.style[name]=old[name]}},css:function(elem,name,force,extra){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return }jQuery.each(which,function(){if(!extra){val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0}if(extra==="margin"){val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0}else{val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0}})}if(elem.offsetWidth!==0){getWH()}else{jQuery.swap(elem,props,getWH)}return Math.max(0,Math.round(val))}return jQuery.curCSS(elem,name,force)},curCSS:function(elem,name,force){var ret,style=elem.style;if(name=="opacity"&&!jQuery.support.opacity){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret}if(name.match(/float/i)){name=styleFloat}if(!force&&style&&style[name]){ret=style[name]}else{if(defaultView.getComputedStyle){if(name.match(/float/i)){name="float"}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle){ret=computedStyle.getPropertyValue(name)}if(name=="opacity"&&ret==""){ret="1"}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase()});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft}}}}return ret},clean:function(elems,context,fragment){context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document}if(!fragment&&elems.length===1&&typeof elems[0]==="string"){var match=/^<(\w+)\s*\/?>$/.exec(elems[0]);if(match){return[context.createElement(match[1])]}}var ret=[],scripts=[],div=context.createElement("div");jQuery.each(elems,function(i,elem){if(typeof elem==="number"){elem+=""}if(!elem){return }if(typeof elem==="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">"});var tags=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!jQuery.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--){div=div.lastChild}if(!jQuery.support.tbody){var hasBody=/<tbody/i.test(elem),tbody=!tags.indexOf("<table")&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j])}}}if(!jQuery.support.leadingWhitespace&&/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild)}elem=jQuery.makeArray(div.childNodes)}if(elem.nodeType){ret.push(elem)}else{ret=jQuery.merge(ret,elem)}});if(fragment){for(var i=0;ret[i];i++){if(jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i])}else{if(ret[i].nodeType===1){ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))))}fragment.appendChild(ret[i])}}return scripts}return ret},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&elem.parentNode){elem.parentNode.selectedIndex}if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed"}elem[name]=value}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue}if(name=="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:elem.nodeName.match(/(button|input|object|select|textarea)/i)?0:elem.nodeName.match(/^(a|area)$/i)&&elem.href?0:undefined}return elem[name]}if(!jQuery.support.style&&notxml&&name=="style"){return jQuery.attr(elem.style,"cssText",value)}if(set){elem.setAttribute(name,""+value)}var attr=!jQuery.support.hrefNormalized&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr}if(!jQuery.support.opacity&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+""=="NaN"?"":"alpha(opacity="+value*100+")")}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase()});if(set){elem[name]=value}return elem[name]},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"")},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||typeof array==="string"||jQuery.isFunction(array)||array.setInterval){ret[0]=array}else{while(i){ret[--i]=array[i]}}}return ret},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i}}return -1},merge:function(first,second){var i=0,elem,pos=first.length;if(!jQuery.support.getAll){while((elem=second[i++])!=null){if(elem.nodeType!=8){first[pos++]=elem}}}else{while((elem=second[i++])!=null){first[pos++]=elem}}return first},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i])}}}catch(e){ret=array}return ret},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv!=!callback(elems[i],i)){ret.push(elems[i])}}return ret},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null){ret[ret.length]=value}}return ret.concat.apply([],ret)}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};jQuery.each({parent:function(elem){return elem.parentNode},parents:function(elem){return jQuery.dir(elem,"parentNode")},next:function(elem){return jQuery.nth(elem,2,"nextSibling")},prev:function(elem){return jQuery.nth(elem,2,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string"){ret=jQuery.multiFilter(selector,ret)}return this.pushStack(jQuery.unique(ret),name,selector)}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector);for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems)}return this.pushStack(ret,name,selector)}});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1){this.removeAttribute(name)}},addClass:function(classNames){jQuery.className.add(this,classNames)},removeClass:function(classNames){jQuery.className.remove(this,classNames)},toggleClass:function(classNames,state){if(typeof state!=="boolean"){state=!jQuery.className.has(this,classNames)}jQuery.className[state?"add":"remove"](this,classNames)},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).length){jQuery("*",this).add([this]).each(function(){jQuery.event.remove(this);jQuery.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){jQuery(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments)}});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0}var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id){id=elem[expando]=++uuid}if(name&&!jQuery.cache[id]){jQuery.cache[id]={}}if(data!==undefined){jQuery.cache[id][name]=data}return name?jQuery.cache[id][name]:id},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id]){break}if(!name){jQuery.removeData(elem)}}}else{try{delete elem[expando]}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando)}}delete jQuery.cache[id]}},queue:function(elem,type,data){if(elem){type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!q||jQuery.isArray(data)){q=jQuery.data(elem,type,jQuery.makeArray(data))}else{if(data){q.push(data)}}}return q},dequeue:function(elem,type){var queue=jQuery.queue(elem,type),fn=queue.shift();if(!type||type==="fx"){fn=queue[0]}if(fn!==undefined){fn.call(elem)}}});jQuery.fn.extend({data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key)}return data===undefined&&parts[1]?this.data(parts[0]):data}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value)})}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})},queue:function(type,data){if(typeof type!=="string"){data=type;type="fx"}if(data===undefined){return jQuery.queue(this[0],type)}return this.each(function(){var queue=jQuery.queue(this,type,data);if(type=="fx"&&queue.length==1){queue[0].call(this)}})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})}});
+/*
+ * Sizzle CSS Selector Engine - v0.9.3
+ *  Copyright 2009, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString;var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[]}if(!selector||typeof selector!=="string"){return results}var parts=[],m,set,checkSet,check,mode,extra,prune=true;chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break}}if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context)}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift()}set=posProcess(selector,set)}}}else{var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&context.parentNode?context.parentNode:context,isXML(context));set=Sizzle.filter(ret.expr,ret.set);if(parts.length>0){checkSet=makeArray(set)}else{prune=false}while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur=""}else{pop=parts.pop()}if(pop==null){pop=context}Expr.relative[cur](checkSet,pop,isXML(context))}}if(!checkSet){checkSet=set}if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector)}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet)}else{if(context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i])}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i])}}}}}else{makeArray(checkSet,results)}if(extra){Sizzle(extra,context,results,seed);if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1)}}}}}return results};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set)};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[]}for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.match[type].exec(expr))){var left=RegExp.leftContext;if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break}}}}if(!set){set=context.getElementsByTagName("*")}return{set:set,expr:expr}};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[]}if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true}else{if(match===true){continue}}}if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true}else{curLoop[i]=false}}else{if(pass){result.push(item);anyFound=true}}}}}if(found!==undefined){if(!inplace){curLoop=result}expr=expr.replace(Expr.match[type],"");if(!anyFound){return[]}break}}}if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr}else{break}}old=expr}return curLoop};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href")}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase()}for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part}}if(isPartStrNotTag){Sizzle.filter(part,checkSet,true)}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part}}if(isPartStr){Sizzle.filter(part,checkSet,true)}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML)},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML)}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[]}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i])}}return ret.length===0?null:ret}},TAG:function(match,context){return context.getElementsByTagName(match[1])}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match}for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace){result.push(elem)}}else{if(inplace){curLoop[i]=false}}}}return false},ID:function(match){return match[1].replace(/\\/g,"")},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase()},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0}match[0]=done++;return match},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name]}if(match[2]==="~="){match[4]=" "+match[4]+" "}return match},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop)}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret)}return false}}else{if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true}}return match},POS:function(match){match.unshift(true);return match}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden"},disabled:function(elem){return elem.disabled===true},checked:function(elem){return elem.checked===true},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true},parent:function(elem){return !!elem.firstChild},empty:function(elem){return !elem.firstChild},has:function(elem,i,match){return !!Sizzle(match[3],elem).length},header:function(elem){return/h\d/i.test(elem.nodeName)},text:function(elem){return"text"===elem.type},radio:function(elem){return"radio"===elem.type},checkbox:function(elem){return"checkbox"===elem.type},file:function(elem){return"file"===elem.type},password:function(elem){return"password"===elem.type},submit:function(elem){return"submit"===elem.type},image:function(elem){return"image"===elem.type},reset:function(elem){return"reset"===elem.type},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON"},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName)}},setFilters:{first:function(elem,i){return i===0},last:function(elem,i,match,array){return i===array.length-1},even:function(elem,i){return i%2===0},odd:function(elem,i){return i%2===1},lt:function(elem,i,match){return i<match[3]-0},gt:function(elem,i,match){return i>match[3]-0},nth:function(elem,i,match){return match[3]-0==i},eq:function(elem,i,match){return match[3]-0==i}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array)}else{if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0}else{if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false}}return true}}}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case"only":case"first":while(node=node.previousSibling){if(node.nodeType===1){return false}}if(type=="first"){return true}node=elem;case"last":while(node=node.nextSibling){if(node.nodeType===1){return false}}return true;case"nth":var first=match[2],last=match[3];if(first==1&&last==0){return true}var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count}}parent.sizcache=doneName}var diff=elem.nodeIndex-last;if(first==0){return diff==0}else{return(diff%first==0&&diff/first>=0)}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array)}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results}return array};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array)}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i])}}else{for(var i=0;array[i];i++){ret.push(array[i])}}}return ret}}var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true}return ret}}else{if("sourceIndex" in document.documentElement){sortOrder=function(a,b){var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true}return ret}}else{if(document.createRange){sortOrder=function(a,b){var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.selectNode(a);aRange.collapse(true);bRange.selectNode(b);bRange.collapse(true);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true}return ret}}}}(function(){var form=document.createElement("form"),id="script"+(new Date).getTime();form.innerHTML="<input name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[]}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match}}root.removeChild(form)})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i])}}results=tmp}return results}}div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return }Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra)}catch(e){}}return oldSizzle(query,context,extra,seed)};Sizzle.find=oldSizzle.find;Sizzle.filter=oldSizzle.filter;Sizzle.selectors=oldSizzle.selectors;Sizzle.matches=oldSizzle.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0){return }div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return }Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1])}}})()}function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i}if(elem.nodeName===cur){match=elem;break}elem=elem[dir]}checkSet[i]=match}}}function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i}if(typeof cur!=="string"){if(elem===cur){match=true;break}}else{if(Sizzle.filter(cur,[elem]).length>0){match=elem;break}}}elem=elem[dir]}checkSet[i]=match}}}var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&isXML(elem.ownerDocument)};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"")}selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet)}return Sizzle.filter(later,tmpSet)};jQuery.find=Sizzle;jQuery.filter=Sizzle.filter;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;Sizzle.selectors.filters.hidden=function(elem){return elem.offsetWidth===0||elem.offsetHeight===0};Sizzle.selectors.filters.visible=function(elem){return elem.offsetWidth>0||elem.offsetHeight>0};Sizzle.selectors.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};jQuery.multiFilter=function(expr,elems,not){if(not){expr=":not("+expr+")"}return Sizzle.matches(expr,elems)};jQuery.dir=function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur)}cur=cur[dir]}return matched};jQuery.nth=function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1&&++num==result){break}}return cur};jQuery.sibling=function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem){r.push(n)}}return r};return ;window.Sizzle=Sizzle})();jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return }if(elem.setInterval&&elem!=window){elem=window}if(!handler.guid){handler.guid=this.guid++}if(data!==undefined){var fn=handler;handler=this.proxy(fn);handler.data=data}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(arguments.callee.elem,arguments):undefined});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();handler.type=namespaces.slice().sort().join(".");var handlers=events[type];if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].setup.call(elem,data,namespaces)}if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem,data,namespaces)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false)}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle)}}}}handlers[handler.guid]=handler;jQuery.event.global[type]=true});elem=null},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return }var events=jQuery.data(elem,"events"),ret,index;if(events){if(types===undefined||(typeof types==="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""))}}else{if(types.type){handler=types.handler;types=types.type}jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");if(events[type]){if(handler){delete events[type][handler.guid]}else{for(var handle in events[type]){if(namespace.test(events[type][handle].type)){delete events[type][handle]}}}if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].teardown.call(elem,namespaces)}for(ret in events[type]){break}if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem,namespaces)===false){if(elem.removeEventListener){elem.removeEventListener(type,jQuery.data(elem,"handle"),false)}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"))}}}ret=null;delete events[type]}}})}for(ret in events){break}if(!ret){var handle=jQuery.data(elem,"handle");if(handle){handle.elem=null}jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle")}}},trigger:function(event,data,elem,bubbling){var type=event.type||event;if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true}if(!elem){event.stopPropagation();if(this.global[type]){jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type]){jQuery.event.trigger(event,data,this.handle.elem)}})}}if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event)}event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle){handle.apply(elem,data)}if((!elem[type]||(jQuery.nodeName(elem,"a")&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){event.result=false}if(!bubbling&&elem[type]&&!event.isDefaultPrevented()&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;try{elem[type]()}catch(e){}}this.triggered=false;if(!event.isPropagationStopped()){var parent=elem.parentNode||elem.ownerDocument;if(parent){jQuery.event.trigger(event,data,parent,true)}}},handle:function(event){var all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;var namespaces=event.type.split(".");event.type=namespaces.shift();all=!namespaces.length&&!event.exclusive;var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||namespace.test(handler.type)){event.handler=handler;event.data=handler.data;var ret=handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation()}}if(event.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando]){return event}var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop]}if(!event.target){event.target=event.srcElement||document}if(event.target.nodeType==3){event.target=event.target.parentNode}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0)}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)))}return event},proxy:function(fn,proxy){proxy=proxy||function(){return fn.apply(this,arguments)};proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy},special:{ready:{setup:bindReady,teardown:function(){}}},specialAll:{live:{setup:function(selector,namespaces){jQuery.event.add(this,namespaces[0],liveHandler)},teardown:function(namespaces){if(namespaces.length){var remove=0,name=RegExp("(^|\\.)"+namespaces[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type)){remove++}});if(remove<1){jQuery.event.remove(this,namespaces[0],liveHandler)}}}}}};jQuery.Event=function(src){if(!this.preventDefault){return new jQuery.Event(src)}if(src&&src.type){this.originalEvent=src;this.type=src.type}else{this.type=src}this.timeStamp=now();this[expando]=true};function returnFalse(){return false}function returnTrue(){return true}jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return }if(e.preventDefault){e.preventDefault()}e.returnValue=false},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return }if(e.stopPropagation){e.stopPropagation()}e.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation()},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;while(parent&&parent!=this){try{parent=parent.parentNode}catch(e){parent=this}}if(parent!=this){event.type=event.data;jQuery.event.handle.apply(this,arguments)}};jQuery.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(orig,fix){jQuery.event.special[fix]={setup:function(){jQuery.event.add(this,orig,withinElement,fix)},teardown:function(){jQuery.event.remove(this,orig,withinElement)}}});jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data)})},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments)});return this.each(function(){jQuery.event.add(this,type,one,fn&&data)})},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn)})},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result}},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jQuery.event.proxy(fn,args[i++])}return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false}))},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut)},ready:function(fn){bindReady();if(jQuery.isReady){fn.call(document,jQuery)}else{jQuery.readyList.push(fn)}return this},live:function(type,fn){var proxy=jQuery.event.proxy(fn);proxy.guid+=this.selector+type;jQuery(document).bind(liveConvert(type,this.selector),this.selector,proxy);return this},die:function(type,fn){jQuery(document).unbind(liveConvert(type,this.selector),fn?{guid:fn.guid+this.selector+type}:null);return this}});function liveHandler(event){var check=RegExp("(^|\\.)"+event.type+"(\\.|$)"),stop=true,elems=[];jQuery.each(jQuery.data(this,"events").live||[],function(i,fn){if(check.test(fn.type)){var elem=jQuery(event.target).closest(fn.data)[0];if(elem){elems.push({elem:elem,fn:fn})}}});elems.sort(function(a,b){return jQuery.data(a.elem,"closest")-jQuery.data(b.elem,"closest")});jQuery.each(elems,function(){if(this.fn.call(this.elem,event,this.fn.data)===false){return(stop=false)}});return stop}function liveConvert(type,selector){return["live",type,selector.replace(/\./g,"`").replace(/ /g,"|")].join(".")}jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document,jQuery)});jQuery.readyList=null}jQuery(document).triggerHandler("ready")}}});var readyBound=false;function bindReady(){if(readyBound){return }readyBound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);jQuery.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);jQuery.ready()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(jQuery.isReady){return }try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return }jQuery.ready()})()}}}jQuery.event.add(window,"load",jQuery.ready)}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name)}});jQuery(window).bind("unload",function(){for(var id in jQuery.cache){if(id!=1&&jQuery.cache[id].handle){jQuery.event.remove(jQuery.cache[id].handle.elem)}}});(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+(new Date).getTime();div.style.display="none";div.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return }jQuery.support={leadingWhitespace:div.firstChild.nodeType==3,tbody:!div.getElementsByTagName("tbody").length,objectAll:!!div.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"))}catch(e){}root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id]}root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",arguments.callee)});div.cloneNode(true).fireEvent("onclick")}jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display="none"})})();var styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat";jQuery.props={"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!=="string"){return this._load(url)}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off)}var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null}else{if(typeof params==="object"){params=jQuery.param(params);type="POST"}}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified"){self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText)}if(callback){self.each(callback,[res.responseText,status,res])}}});return this},serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val}}):{name:elem.name,value:val}}).get()}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f)}});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type})},getScript:function(url,callback){return jQuery.get(url,null,callback,"script")},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={}}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type})},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data)}if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?"}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?"}}s.dataType="json"}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1")}s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp]}catch(e){}if(head){head.removeChild(script)}}}if(s.dataType=="script"&&s.cache==null){s.cache=false}if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"")}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=location.host)){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();script.onload=script.onreadystatechange=null;head.removeChild(script)}}}head.appendChild(script);return undefined}var requestDone=false;var xhr=s.xhr();if(s.username){xhr.open(type,s.url,s.async,s.username,s.password)}else{xhr.open(type,s.url,s.async)}try{if(s.data){xhr.setRequestHeader("Content-Type",s.contentType)}if(s.ifModified){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default)}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}xhr.abort();return false}if(s.global){jQuery.event.trigger("ajaxSend",[xhr,s])}var onreadystatechange=function(isTimeout){if(xhr.readyState==0){if(ival){clearInterval(ival);ival=null;if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}}else{if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null}status=isTimeout=="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s)}catch(e){status="parsererror"}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes}if(!jsonp){success()}}else{jQuery.handleError(s,xhr,status)}complete();if(isTimeout){xhr.abort()}if(s.async){xhr=null}}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xhr&&!requestDone){onreadystatechange("timeout")}},s.timeout)}}try{xhr.send(s.data)}catch(e){jQuery.handleError(s,xhr,null,e)}if(!s.async){onreadystatechange()}function success(){if(s.success){s.success(data,status)}if(s.global){jQuery.event.trigger("ajaxSuccess",[xhr,s])}}function complete(){if(s.complete){s.complete(xhr,status)}if(s.global){jQuery.event.trigger("ajaxComplete",[xhr,s])}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}return xhr},handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e)}if(s.global){jQuery.event.trigger("ajaxError",[xhr,s,e])}},active:0,httpSuccess:function(xhr){try{return !xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223}catch(e){}return false},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]}catch(e){}return false},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror"}if(s&&s.dataFilter){data=s.dataFilter(data,type)}if(typeof data==="string"){if(type=="script"){jQuery.globalEval(data)}if(type=="json"){data=window.eval("("+data+")")}}return data},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)}if(jQuery.isArray(a)||a.jquery){jQuery.each(a,function(){add(this.name,this.value)})}else{for(var j in a){if(jQuery.isArray(a[j])){jQuery.each(a[j],function(){add(j,this)})}else{add(j,jQuery.isFunction(a[j])?a[j]():a[j])}}}return s.join("&").replace(/%20/g,"+")}});var elemdisplay={},timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type});return obj}jQuery.fn.extend({show:function(speed,callback){if(speed){return this.animate(genFx("show",3),speed,callback)}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var tagName=this[i].tagName,display;if(elemdisplay[tagName]){display=elemdisplay[tagName]}else{var elem=jQuery("<"+tagName+" />").appendTo("body");display=elem.css("display");if(display==="none"){display="block"}elem.remove();elemdisplay[tagName]=display}jQuery.data(this[i],"olddisplay",display)}}for(var i=0,l=this.length;i<l;i++){this[i].style.display=jQuery.data(this[i],"olddisplay")||""}return this}},hide:function(speed,callback){if(speed){return this.animate(genFx("hide",3),speed,callback)}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none"){jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"))}}for(var i=0,l=this.length;i<l;i++){this[i].style.display="none"}return this}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn==null||bool?this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]()}):this.animate(genFx("toggle",3),fn,fn2)},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback)},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType==1&&jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return opt.complete.call(this)}if((p=="height"||p=="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow}}if(opt.overflow!=null){this.style.overflow="hidden"}opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val)){e[val=="toggle"?hidden?"show":"hide":val](prop)}else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit}if(parts[1]){end=((parts[1]=="-="?-1:1)*end)+start}e.custom(start,end,unit)}else{e.custom(start,val,"")}}});return true})},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([])}this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true)}timers.splice(i,1)}}});if(!gotoEnd){this.dequeue()}return this}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback)}});jQuery.extend({speed:function(speed,easing,fn){var opt=typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue()}if(jQuery.isFunction(opt.old)){opt.old.call(this)}};return opt},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={}}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd)}t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1)}}if(!timers.length){clearInterval(timerId);timerId=undefined}},13)}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());jQuery(this.elem).show()},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(gotoEnd){var t=now();if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){jQuery(this.elem).hide()}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p])}}this.options.complete.call(this.elem)}return false}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now)},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null){fx.elem.style[fx.prop]=fx.now+fx.unit}else{fx.elem[fx.prop]=fx.now}}}});if(document.documentElement.getBoundingClientRect){jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0])}var box=this[0].getBoundingClientRect(),doc=this[0].ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left}}}else{jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0])}jQuery.offset.initialized||jQuery.offset.initialize();var elem=this[0],offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView.getComputedStyle(elem,null),top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){computedStyle=defaultView.getComputedStyle(elem,null);top-=elem.scrollTop,left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop,left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.tagName))){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0}prevOffsetParent=offsetParent,offsetParent=elem.offsetParent}if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0}prevComputedStyle=computedStyle}if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop,left+=body.offsetLeft}if(prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop),left+=Math.max(docElem.scrollLeft,body.scrollLeft)}return{top:top,left:left}}}jQuery.offset={initialize:function(){if(this.initialized){return }var body=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,rules,prop,bodyMarginTop=body.style.marginTop,html='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';rules={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(prop in rules){container.style[prop]=rules[prop]}container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild,checkDiv=innerDiv.firstChild,td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);innerDiv.style.overflow="hidden",innerDiv.style.position="relative";this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);body.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(body.offsetTop===0);body.style.marginTop=bodyMarginTop;body.removeChild(container);this.initialized=true},bodyOffset:function(body){jQuery.offset.initialized||jQuery.offset.initialize();var top=body.offsetTop,left=body.offsetLeft;if(jQuery.offset.doesNotIncludeMarginInBodyOffset){top+=parseInt(jQuery.curCSS(body,"marginTop",true),10)||0,left+=parseInt(jQuery.curCSS(body,"marginLeft",true),10)||0}return{top:top,left:left}}};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}return results},offsetParent:function(){var offsetParent=this[0].offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent}return jQuery(offsetParent)}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){if(!this[0]){return null}return val!==undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val}):this[0]==window||this[0]==document?self[i?"pageYOffset":"pageXOffset"]||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method]}});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom",lower=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],lower,false,"padding"):null};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],lower,false,margin?"margin":"border"):null};var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(document.documentElement["client"+name],document.body["scroll"+name],document.documentElement["scroll"+name],document.body["offset"+name],document.documentElement["offset"+name]):size===undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,typeof size==="string"?size:size+"px")}})})();jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]])}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return }for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args)}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(el,a){if($(el).css("overflow")=="hidden"){return false}var scroll=(a&&a=="left")?"scrollLeft":"scrollTop",has=false;if(el[scroll]>0){return true}el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size))},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=="role"?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)))};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""))}):removeAttr.call(this,name))}}$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove")});return _remove.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,"position",1))&&(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!scrollParent.length?$(document):scrollParent}});$.extend($.expr[":"],{data:function(elem,i,match){return !!$.data(elem,match[3])},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,"tabindex");return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"==nodeName||"area"==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)["area"==nodeName?"parents":"closest"](":hidden").length},tabbable:function(element){var tabIndex=$.attr(element,"tabindex");return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(":focusable")}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=="string"?methods.split(/,?\s+/):methods)}var methods=getMethods("getter");if(args.length==1&&typeof args[0]=="string"){methods=methods.concat(getMethods("getterSetter"))}return($.inArray(method,methods)!=-1)}$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=="string"),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=="_"){return this}if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined)}return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options))._init());(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args))})};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+"-"+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind("setData."+name,function(event,key,value){if(event.target==element){return self._setData(key,value)}}).bind("getData."+name,function(event,key){if(event.target==element){return self._getData(key)}}).bind("remove",function(){return self.destroy()})};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter="option"};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key)}options={};options[key]=value}$.each(options,function(key,value){self._setData(key,value)})},_getData:function(key){return this.options[key]},_setData:function(key,value){this.options[key]=value;if(key=="disabled"){this.element[value?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",value)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop]}}this.element.trigger(event,data);return !($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented())}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(event){return self._mouseDown(event)}).bind("click."+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false}});if($.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);($.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return }(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true}}this._mouseMoveDelegate=function(event){return self._mouseMove(event)};this._mouseUpDelegate=function(event){return self._mouseUp(event)};$(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event)}if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault()}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event))}return !this._mouseStarted},_mouseUp:function(event){$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event)}return false},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance)},_mouseDelayMet:function(event){return this.mouseDelayMet},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function($){$.each({focus:"focusin",blur:"focusout"},function(original,fix){$.event.special[fix]={setup:function(){if($.browser.msie){return false}this.addEventListener(original,$.event.special[fix].handler,true)},teardown:function(){if($.browser.msie){return false}this.removeEventListener(original,$.event.special[fix].handler,true)},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments)}}});$.extend($.fn,{delegate:function(type,delegate,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments)}})},triggerEvent:function(type,target){return this.triggerHandler(type,[jQuery.event.fix({type:type,target:target})])}})})(jQuery);var fluid_1_1=fluid_1_1||{};var fluid=fluid||fluid_1_1;(function($,fluid){fluid.version="Infusion 1.1.1";fluid.fail=function(message){fluid.setLogging(true);fluid.log(message.message?message.message:message);throw new Error(message)};fluid.wrap=function(obj){return((!obj||obj.jquery)?obj:$(obj))};fluid.unwrap=function(obj){return obj&&obj.jquery&&obj.length===1?obj[0]:obj};fluid.keyForValue=function(obj,value){for(var key in obj){if(obj[key]===value){return key}}return null};fluid.findKeyInObject=fluid.keyForValue;fluid.clear=function(target){if(target instanceof Array){target.length=0}else{for(var i in target){delete target[i]}}};fluid.container=function(containerSpec){var container=containerSpec;if(typeof containerSpec==="string"||containerSpec.nodeType&&(containerSpec.nodeType===1||containerSpec.nodeType===9)){container=$(containerSpec)}if(!container||!container.jquery||container.length!==1){if(typeof (containerSpec)!=="string"){containerSpec=container.selector}fluid.fail({name:"NotOne",message:"A single container element was not found for selector "+containerSpec})}return container};var defaultsStore={};var globalDefaultsStore={};fluid.defaults=function(){var offset=0;var store=defaultsStore;if(typeof arguments[0]==="boolean"){store=globalDefaultsStore;offset=1}var componentName=arguments[offset];var defaultsObject=arguments[offset+1];if(defaultsObject!==undefined){store[componentName]=defaultsObject;return defaultsObject}return store[componentName]};fluid.createDomBinder=function(container,selectors){var cache={},that={};function cacheKey(name,thisContainer){return $.data(fluid.unwrap(thisContainer))+"-"+name}function record(name,thisContainer,result){cache[cacheKey(name,thisContainer)]=result}that.locate=function(name,localContainer){var selector,thisContainer,togo;selector=selectors[name];thisContainer=localContainer?localContainer:container;if(!thisContainer){fluid.fail("DOM binder invoked for selector "+name+" without container")}if(!selector){return thisContainer}if(typeof (selector)==="function"){togo=$(selector.call(null,fluid.unwrap(thisContainer)))}else{togo=$(selector,thisContainer)}if(togo.get(0)===document){togo=[]}if(!togo.selector){togo.selector=selector;togo.context=thisContainer}togo.selectorName=name;record(name,thisContainer,togo);return togo};that.fastLocate=function(name,localContainer){var thisContainer=localContainer?localContainer:container;var key=cacheKey(name,thisContainer);var togo=cache[key];return togo?togo:that.locate(name,localContainer)};that.clear=function(){cache={}};that.refresh=function(names,localContainer){var thisContainer=localContainer?localContainer:container;if(typeof names==="string"){names=[names]}if(thisContainer.length===undefined){thisContainer=[thisContainer]}for(var i=0;i<names.length;++i){for(var j=0;j<thisContainer.length;++j){that.locate(names[i],thisContainer[j])}}};return that};fluid.mergeListeners=function(events,listeners){if(listeners){for(var key in listeners){var value=listeners[key];var keydot=key.indexOf(".");var namespace;if(keydot!==-1){namespace=key.substring(keydot+1);key=key.substring(0,keydot)}if(!events[key]){events[key]=fluid.event.getEventFirer()}var firer=events[key];if(typeof (value)==="function"){firer.addListener(value,namespace)}else{if(value&&typeof value.length==="number"){for(var i=0;i<value.length;++i){firer.addListener(value[i],namespace)}}}}}};fluid.instantiateFirers=function(that,options){that.events={};if(options.events){for(var event in options.events){var eventType=options.events[event];that.events[event]=fluid.event.getEventFirer(eventType==="unicast",eventType==="preventable")}}fluid.mergeListeners(that.events,options.listeners)};fluid.mergeComponentOptions=function(that,componentName,userOptions){var defaults=fluid.defaults(componentName);that.options=fluid.merge(defaults?defaults.mergePolicy:null,{},defaults,userOptions)};fluid.expectFilledSelector=function(result,message){if(result&&result.length===0&&result.jquery){fluid.fail(message+': selector "'+result.selector+'" with name '+result.selectorName+" returned no results in context "+fluid.dumpEl(result.context))}};fluid.initView=function(componentName,container,userOptions){var that={};fluid.expectFilledSelector(container,'Error instantiating component with name "'+componentName);fluid.mergeComponentOptions(that,componentName,userOptions);if(container){that.container=fluid.container(container);fluid.initDomBinder(that)}fluid.instantiateFirers(that,that.options);return that};fluid.COMPONENT_OPTIONS={};fluid.VALUE={};fluid.emptySubcomponent=function(options){var that={};options=$.makeArray(options);for(var i=0;i<options.length;++i){that[options[i]]=function(){}}return that};fluid.initSubcomponent=function(that,className,args){return fluid.initSubcomponents(that,className,args)[0]};fluid.initSubcomponents=function(that,className,args){var entry=that.options[className];if(!entry){return }var entries=$.makeArray(entry);var optindex=-1;var togo=[];args=$.makeArray(args);for(var i=0;i<args.length;++i){if(args[i]===fluid.COMPONENT_OPTIONS){optindex=i}}for(i=0;i<entries.length;++i){entry=entries[i];if(optindex!==-1&&entry.options){args[optindex]=entry.options}if(typeof (entry)!=="function"){var entryType=typeof (entry)==="string"?entry:entry.type;var globDef=fluid.defaults(true,entryType);fluid.merge("reverse",that.options,globDef);togo[i]=entryType==="fluid.emptySubcomponent"?fluid.emptySubcomponent(entry.options):fluid.invokeGlobalFunction(entryType,args,{fluid:fluid})}else{togo[i]=entry.apply(null,args)}var returnedOptions=togo[i]?togo[i].returnedOptions:null;if(returnedOptions){fluid.merge(that.options.mergePolicy,that.options,returnedOptions);if(returnedOptions.listeners){fluid.mergeListeners(that.events,returnedOptions.listeners)}}}return togo};fluid.initDomBinder=function(that){that.dom=fluid.createDomBinder(that.container,that.options.selectors);that.locate=that.dom.locate};fluid.isPrimitive=function(value){var valueType=typeof (value);return !value||valueType==="string"||valueType==="boolean"||valueType==="number"};function mergeImpl(policy,basePath,target,source){var thisPolicy=policy&&typeof (policy)!=="string"?policy[basePath]:policy;if(typeof (thisPolicy)==="function"){thisPolicy.apply(null,target,source);return target}if(thisPolicy==="replace"){fluid.clear(target)}for(var name in source){var path=(basePath?basePath+".":"")+name;var thisTarget=target[name];var thisSource=source[name];var primitiveTarget=fluid.isPrimitive(thisTarget);if(thisSource!==undefined){if(thisSource!==null&&typeof thisSource==="object"&&!thisSource.nodeType&&!thisSource.jquery&&thisSource!==fluid.VALUE){if(primitiveTarget){target[name]=thisTarget=thisSource instanceof Array?[]:{}}mergeImpl(policy,path,thisTarget,thisSource)}else{if(thisTarget===null||thisTarget===undefined||thisPolicy!=="reverse"){target[name]=thisSource}}}}return target}fluid.merge=function(policy,target){var path="";for(var i=2;i<arguments.length;++i){var source=arguments[i];if(source!==null&&source!==undefined){mergeImpl(policy,path,target,source)}}if(policy&&typeof (policy)!=="string"){for(var key in policy){var elrh=policy[key];if(typeof (elrh)==="string"&&elrh!=="replace"){var oldValue=fluid.model.getBeanValue(target,key);if(oldValue===null||oldValue===undefined){var value=fluid.model.getBeanValue(target,elrh);fluid.model.setBeanValue(target,key,value)}}}}return target};fluid.copy=function(tocopy){if(fluid.isPrimitive(tocopy)){return tocopy}return $.extend(true,typeof (tocopy.length)==="number"?[]:{},tocopy)};fluid.invokeGlobalFunction=function(functionPath,args,environment){var func=fluid.model.getBeanValue(window,functionPath,environment);if(!func){fluid.fail("Error invoking global function: "+functionPath+" could not be located")}else{return func.apply(null,args)}};fluid.event={};var fluid_guid=1;fluid.event.getEventFirer=function(unicast,preventable){var log=fluid.log;var listeners={};return{addListener:function(listener,namespace,predicate){if(!listener){return }if(unicast){namespace="unicast"}if(!namespace){if(!listener.$$guid){listener.$$guid=fluid_guid++}namespace=listener.$$guid}listeners[namespace]={listener:listener,predicate:predicate}},removeListener:function(listener){if(typeof (listener)==="string"){delete listeners[listener]}else{if(typeof (listener)==="object"&&listener.$$guid){delete listeners[listener.$$guid]}}},fire:function(){for(var i in listeners){var lisrec=listeners[i];var listener=lisrec.listener;if(lisrec.predicate&&!lisrec.predicate(listener,arguments)){continue}try{var ret=listener.apply(null,arguments);if(preventable&&ret===false){return false}}catch(e){log("FireEvent received exception "+e.message+" e "+e+" firing to listener "+i);throw (e)}}}}};fluid.model={};fluid.model.copyModel=function(target,source){fluid.clear(target);$.extend(true,target,source)};fluid.model.parseEL=function(EL){return EL.toString().split(".")};fluid.model.composePath=function(prefix,suffix){return prefix===""?suffix:prefix+"."+suffix};fluid.model.setBeanValue=function(root,EL,newValue){var segs=fluid.model.parseEL(EL);for(var i=0;i<segs.length-1;i+=1){if(!root[segs[i]]){root[segs[i]]={}}root=root[segs[i]]}root[segs[segs.length-1]]=newValue};fluid.model.getBeanValue=function(root,EL,environment){if(EL===""||EL===null||EL===undefined){return root}var segs=fluid.model.parseEL(EL);for(var i=0;i<segs.length;++i){if(!root){return root}var segment=segs[i];if(environment&&environment[segment]){root=environment[segment];environment=null}else{root=root[segment]}}return root};var logging;fluid.setLogging=function(enabled){if(typeof enabled==="boolean"){logging=enabled}else{logging=false}};fluid.log=function(str){if(logging){str=new Date().toTimeString()+":  "+str;if(typeof (console)!=="undefined"){if(console.debug){console.debug(str)}else{console.log(str)}}else{if(typeof (YAHOO)!=="undefined"){YAHOO.log(str)}else{if(typeof (opera)!=="undefined"){opera.postError(str)}}}}};fluid.dumpEl=function(element){var togo;if(!element){return"null"}if(element.nodeType===3||element.nodeType===8){return"[data: "+element.data+"]"}if(element.nodeType===9){return"[document: location "+element.location+"]"}if(!element.nodeType&&typeof element.length==="number"){togo="[";for(var i=0;i<element.length;++i){togo+=fluid.dumpEl(element[i]);if(i<element.length-1){togo+=", "}}return togo+"]"}element=$(element);togo=element.get(0).tagName;if(element.attr("id")){togo+="#"+element.attr("id")}if(element.attr("class")){togo+="."+element.attr("class")}return togo};fluid.findAncestor=function(element,test){element=fluid.unwrap(element);while(element){if(test(element)){return element}element=element.parentNode}};fluid.jById=function(id,dokkument){dokkument=dokkument&&dokkument.nodeType===9?dokkument:document;var element=fluid.byId(id,dokkument);var togo=element?$(element):[];togo.selector="#"+id;togo.context=dokkument;return togo};fluid.byId=function(id,dokkument){dokkument=dokkument&&dokkument.nodeType===9?dokkument:document;var el=dokkument.getElementById(id);if(el){if(el.getAttribute("id")!==id){fluid.fail("Problem in document structure - picked up element "+fluid.dumpEl(el)+" for id "+id+" without this id - most likely the element has a name which conflicts with this id")}return el}else{return null}};fluid.getId=function(element){return fluid.unwrap(element).getAttribute("id")};fluid.allocateSimpleId=function(element){element=fluid.unwrap(element);if(!element.id){element.id="fluid-id-"+(fluid_guid++)}return element.id};fluid.transform=function(list){var togo=[];for(var i=0;i<list.length;++i){var transit=list[i];for(var j=0;j<arguments.length-1;++j){transit=arguments[j+1](transit,i)}togo[togo.length]=transit}return togo};fluid.find=function(list,fn,deflt){for(var i=0;i<list.length;++i){var transit=fn(list[i],i);if(transit!==null&&transit!==undefined){return transit}}return deflt};fluid.accumulate=function(list,fn,arg){for(var i=0;i<list.length;++i){arg=fn(list[i],arg,i)}return arg};fluid.remove_if=function(list,fn){for(var i=0;i<list.length;++i){if(fn(list[i],i)){list.splice(i,1);--i}}return list};fluid.formatMessage=function(messageString,args){if(!args){return messageString}if(typeof (args)==="string"){args=[args]}for(var i=0;i<args.length;++i){messageString=messageString.replace("{"+i+"}",args[i])}return messageString};fluid.messageLocator=function(messageBase){return function(messagecodes,args){if(typeof (messagecodes)==="string"){messagecodes=[messagecodes]}for(var i=0;i<messagecodes.length;++i){var code=messagecodes[i];var message=messageBase[code];if(message===undefined){continue}return fluid.formatMessage(message,args)}return"[Message string for key "+messagecodes[0]+" not found]"}};fluid.stringTemplate=function(template,values){var newString=template;for(var key in values){if(values.hasOwnProperty(key)){var searchStr="%"+key;newString=newString.replace(searchStr,values[key])}}return newString}})(jQuery,fluid_1_1);var fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.dom=fluid.dom||{};var getNextNode=function(iterator){if(iterator.node.firstChild){iterator.node=iterator.node.firstChild;iterator.depth+=1;return iterator}while(iterator.node){if(iterator.node.nextSibling){iterator.node=iterator.node.nextSibling;return iterator}iterator.node=iterator.node.parentNode;iterator.depth-=1}return iterator};fluid.dom.iterateDom=function(node,acceptor,allNodes){var currentNode={node:node,depth:0};var prevNode=node;var condition;while(currentNode.node!==null&&currentNode.depth>=0&&currentNode.depth<fluid.dom.iterateDom.DOM_BAIL_DEPTH){condition=null;if(currentNode.node.nodeType===1||allNodes){condition=acceptor(currentNode.node,currentNode.depth)}if(condition){if(condition==="delete"){currentNode.node.parentNode.removeChild(currentNode.node);currentNode.node=prevNode}else{if(condition==="stop"){return currentNode.node}}}prevNode=currentNode.node;currentNode=getNextNode(currentNode)}};fluid.dom.iterateDom.DOM_BAIL_DEPTH=256;fluid.dom.computeAbsolutePosition=function(element){var curleft=0,curtop=0;if(element.offsetParent){do{curleft+=element.offsetLeft;curtop+=element.offsetTop;element=element.offsetParent}while(element);return[curleft,curtop]}};fluid.dom.isContainer=function(container,containee){for(;containee;containee=containee.parentNode){if(container===containee){return true}}return false};fluid.dom.insertAfter=function(newChild,refChild){var nextSib=refChild.nextSibling;if(!nextSib){refChild.parentNode.appendChild(newChild)}else{refChild.parentNode.insertBefore(newChild,nextSib)}};fluid.dom.isWhitespaceNode=function(node){return !(/[^\t\n\r ]/.test(node.data))};fluid.dom.isIgnorableNode=function(node){return(node.nodeType===8)||((node.nodeType===3)&&fluid.dom.isWhitespaceNode(node))};fluid.dom.getElementText=function(element){var nodes=element.childNodes;var text="";for(var i=0;i<nodes.length;++i){var child=nodes[i];if(child.nodeType==3){text=text+child.nodeValue}}return text};fluid.dom.cleanseScripts=function(element){var cleansed=$.data(element,fluid.dom.cleanseScripts.MARKER);if(!cleansed){fluid.dom.iterateDom(element,function(node){return node.tagName.toLowerCase()==="script"?"delete":null});$.data(element,fluid.dom.cleanseScripts.MARKER,true)}};fluid.dom.cleanseScripts.MARKER="fluid-scripts-cleansed"})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.VALUE={};fluid.BINDING_ROOT_KEY="fluid-binding-root";fluid.findData=function(elem,name){while(elem){var data=$.data(elem,name);if(data){return data}elem=elem.parentNode}};fluid.bindFossils=function(node,data,fossils){$.data(node,fluid.BINDING_ROOT_KEY,{data:data,fossils:fossils})};fluid.findForm=function(node){return fluid.findAncestor(node,function(element){return element.nodeName.toLowerCase()==="form"})};fluid.value=function(nodeIn,newValue){var node=fluid.unwrap(nodeIn);var multiple=false;if(node.nodeType===undefined&&node.length>1){node=node[0];multiple=true}var jNode=$(node);if("input"!==node.nodeName.toLowerCase()||!/radio|checkbox/.test(node.type)){return $(node).val(newValue)}var name=node.name;if(name===undefined){fluid.fail("Cannot acquire value from node "+fluid.dumpEl(node)+" which does not have name attribute set")}var elements;if(multiple){elements=nodeIn}else{var elements=document.getElementsByName(name);var scope=fluid.findForm(node);elements=$.grep(elements,function(element){if(element.name!==name){return false}return !scope||fluid.dom.isContainer(scope,element)})}if(newValue!==undefined){if(typeof (newValue)==="boolean"){newValue=(newValue?"true":"false")}$.each(elements,function(){this.checked=(newValue instanceof Array?$.inArray(this.value,newValue)!==-1:newValue===this.value)})}else{var checked=$.map(elements,function(element){return element.checked?element.value:null});return node.type==="radio"?checked[0]:checked}};fluid.applyChange=function(node,newValue,applier){node=fluid.unwrap(node);if(newValue===undefined){newValue=fluid.value(node)}if(node.nodeType===undefined&&node.length>0){node=node[0]}var root=fluid.findData(node,fluid.BINDING_ROOT_KEY);if(!root){fluid.fail("Bound data could not be discovered in any node above "+fluid.dumpEl(node))}var name=node.name;var fossil=root.fossils[name];if(!fossil){fluid.fail("No fossil discovered for name "+name+" in fossil record above "+fluid.dumpEl(node))}if(typeof (fossil.oldvalue)==="boolean"){newValue=newValue[0]?true:false}var EL=root.fossils[name].EL;if(applier){applier.fireChangeRequest({path:EL,value:newValue,source:node.id})}else{fluid.model.setBeanValue(root.data,EL,newValue)}};fluid.pathUtil={};var getPathSegmentImpl=function(accept,path,i){var segment=null;if(accept){segment=""}var escaped=false;var limit=path.length;for(;i<limit;++i){var c=path.charAt(i);if(!escaped){if(c==="."){break}else{if(c==="\\"){escaped=true}else{if(segment!==null){segment+=c}}}}else{escaped=false;if(segment!==null){accept+=c}}}if(segment!==null){accept[0]=segment}return i};var globalAccept=[];fluid.pathUtil.getPathSegment=function(path,i){getPathSegmentImpl(globalAccept,path,i);return globalAccept[0]};fluid.pathUtil.getHeadPath=function(path){return fluid.pathUtil.getPathSegment(path,0)};fluid.pathUtil.getFromHeadPath=function(path){var firstdot=getPathSegmentImpl(null,path,0);return firstdot===path.length?null:path.substring(firstdot+1)};function lastDotIndex(path){return path.lastIndexOf(".")}fluid.pathUtil.getToTailPath=function(path){var lastdot=lastDotIndex(path);return lastdot==-1?null:path.substring(0,lastdot)};fluid.pathUtil.getTailPath=function(path){var lastdot=lastDotIndex(path);return fluid.pathUtil.getPathSegment(path,lastdot+1)};var composeSegment=function(prefix,toappend){for(var i=0;i<toappend.length;++i){var c=toappend.charAt(i);if(c==="."||c==="\\"||c==="}"){prefix+="\\"}prefix+=c}return prefix};fluid.pathUtil.composePath=function(prefix,suffix){if(prefix.length!==0){prefix+="."}return composeSegment(prefix,suffix)};fluid.pathUtil.matchPath=function(spec,path){var togo="";while(true){if(!spec){break}if(!path){return null}var spechead=fluid.pathUtil.getHeadPath(spec);var pathhead=fluid.pathUtil.getHeadPath(path);if(spechead!=="*"&&spechead!==pathhead){return null}togo=fluid.pathUtil.composePath(togo,pathhead);spec=fluid.pathUtil.getFromHeadPath(spec);path=fluid.pathUtil.getFromHeadPath(path)}return togo};fluid.model.applyChangeRequest=function(model,request){if(request.type==="ADD"){fluid.model.setBeanValue(model,request.path,request.value)}else{if(request.type==="DELETE"){var totail=fluid.pathUtil.getToTailPath(request.path);var tail=fluid.pathUtil.getTailPath(request.path);var penult=fluid.model.getBeanValue(model,penult);delete penult[tail]}}};fluid.makeChangeApplier=function(model){var baseEvents={guards:fluid.event.getEventFirer(false,true),modelChanged:fluid.event.getEventFirer(false,false)};var that={model:model};function makePredicate(listenerMember,requestIndex){return function(listener,args){var changeRequest=args[requestIndex];return fluid.pathUtil.matchPath(listener[listenerMember],changeRequest.path)}}function adaptListener(that,name,listenerMember,requestIndex){var predicate=makePredicate(listenerMember,requestIndex);that[name]={addListener:function(pathSpec,listener,namespace){listener[listenerMember]=pathSpec;baseEvents[name].addListener(listener,namespace,predicate)},removeListener:function(listener){baseEvents[name].removeListener(listener)}}}adaptListener(that,"guards","guardedPathSpec",1);adaptListener(that,"modelChanged","triggerPathSpec",2);that.fireChangeRequest=function(changeRequest){if(!changeRequest.type){changeRequest.type="ADD"}var prevent=baseEvents.guards.fire(model,changeRequest);if(prevent===false){return }var oldModel={};fluid.model.copyModel(oldModel,model);fluid.model.applyChangeRequest(model,changeRequest);baseEvents.modelChanged.fire(model,oldModel,changeRequest)};that.requestChange=function(path,value,type){var changeRequest={path:path,value:value,type:type};that.fireChangeRequest(changeRequest)};return that};fluid.makeSuperApplier=function(){var subAppliers=[];var that={};that.addSubApplier=function(path,subApplier){subAppliers.push({path:path,subApplier:subApplier})};that.fireChangeRequest=function(request){for(var i=0;i<subAppliers.length;++i){var path=subAppliers[i].path;if(request.path.indexOf(path)===0){var subpath=request.path.substring(path.length+1);var subRequest=fluid.copy(request);subRequest.path=subpath;subAppliers[i].subApplier.fireChangeRequest(subRequest)}}};return that};fluid.attachModel=function(baseModel,path,model){var segs=fluid.model.parseEL(path);for(var i=0;i<segs.length-1;++i){var seg=segs[i];var subModel=baseModel[seg];if(!subModel){baseModel[seg]=subModel={}}baseModel=subModel}baseModel[segs[segs.length-1]]=model};fluid.assembleModel=function(modelSpec){var model={};var superApplier=fluid.makeSuperApplier();var togo={model:model,applier:superApplier};for(path in modelSpec){var rec=modelSpec[path];fluid.attachModel(model,path,rec.model);if(rec.applier){superApplier.addSubApplier(path,rec.applier)}}return togo}})(jQuery,fluid_1_1);var fluid_1_1=fluid_1_1||{};var fluid=fluid||fluid_1_1;(function($,fluid){fluid.thatistBridge=function(name,peer){var togo=function(funcname){var segs=funcname.split(".");var move=peer;for(var i=0;i<segs.length;++i){move=move[segs[i]]}var args=[this];if(arguments.length===2){args=args.concat($.makeArray(arguments[1]))}var ret=move.apply(null,args);this.that=function(){return ret};var type=typeof (ret);return !ret||type==="string"||type==="number"||type==="boolean"||ret&&ret.length!==undefined?ret:this};$.fn[name]=togo;return togo};fluid.thatistBridge("fluid",fluid);fluid.thatistBridge("fluid_1_1",fluid_1_1);var NAMESPACE_KEY="fluid-keyboard-a11y";var getData=function(target,key){var data=$(target).data(NAMESPACE_KEY);return data?data[key]:undefined};var setData=function(target,key,value){$(target).each(function(){var data=$.data(this,NAMESPACE_KEY)||{};data[key]=value;$.data(this,NAMESPACE_KEY,data)})};var lastFocusedElement="disabled";if($.event.special.focusin){lastFocusedElement=null;$(document).bind("focusin",function(event){lastFocusedElement=event.target})}fluid.getLastFocusedElement=function(){if(lastFocusedElement==="disabled"){fluid.fail("Focus manager not enabled - please include jquery.delegate.js or equivalent for support of 'focusin' event")}return lastFocusedElement};var normalizeTabindexName=function(){return $.browser.msie?"tabIndex":"tabindex"};var canHaveDefaultTabindex=function(elements){if(elements.length<=0){return false}return $(elements[0]).is("a, input, button, select, area, textarea, object")};var getValue=function(elements){if(elements.length<=0){return undefined}if(!fluid.tabindex.hasAttr(elements)){return canHaveDefaultTabindex(elements)?Number(0):undefined}var value=elements.attr(normalizeTabindexName());return Number(value)};var setValue=function(elements,toIndex){return elements.each(function(i,item){$(item).attr(normalizeTabindexName(),toIndex)})};fluid.tabindex=function(target,toIndex){target=$(target);if(toIndex!==null&&toIndex!==undefined){return setValue(target,toIndex)}else{return getValue(target)}};fluid.tabindex.remove=function(target){target=$(target);return target.each(function(i,item){$(item).removeAttr(normalizeTabindexName())})};fluid.tabindex.hasAttr=function(target){target=$(target);if(target.length<=0){return false}var togo=target.map(function(){var attributeNode=this.getAttributeNode(normalizeTabindexName());return attributeNode?attributeNode.specified:false});return togo.length===1?togo[0]:togo};fluid.tabindex.has=function(target){target=$(target);return fluid.tabindex.hasAttr(target)||canHaveDefaultTabindex(target)};var ENABLEMENT_KEY="enablement";fluid.enabled=function(target,state){target=$(target);if(state===undefined){return getData(target,ENABLEMENT_KEY)!==false}else{$("*",target).each(function(){if(getData(this,ENABLEMENT_KEY)!==undefined){setData(this,ENABLEMENT_KEY,state)}else{if(/select|textarea|input/i.test(this.nodeName)){$(this).attr("disabled",!state)}}});setData(target,ENABLEMENT_KEY,state)}};fluid.a11y=$.a11y||{};fluid.a11y.orientation={HORIZONTAL:0,VERTICAL:1,BOTH:2};var UP_DOWN_KEYMAP={next:$.ui.keyCode.DOWN,previous:$.ui.keyCode.UP};var LEFT_RIGHT_KEYMAP={next:$.ui.keyCode.RIGHT,previous:$.ui.keyCode.LEFT};var unwrap=function(element){return element.jquery?element[0]:element};var makeElementsTabFocussable=function(elements){elements.each(function(idx,item){item=$(item);if(!item.fluid("tabindex.has")||item.fluid("tabindex")<0){item.fluid("tabindex",0)}})};fluid.tabbable=function(target){target=$(target);makeElementsTabFocussable(target)};var CONTEXT_KEY="selectionContext";var NO_SELECTION=-32768;var cleanUpWhenLeavingContainer=function(selectionContext){if(selectionContext.options.onLeaveContainer){selectionContext.options.onLeaveContainer(selectionContext.selectables[selectionContext.activeItemIndex])}else{if(selectionContext.options.onUnselect){selectionContext.options.onUnselect(selectionContext.selectables[selectionContext.activeItemIndex])}}if(!selectionContext.options.rememberSelectionState){selectionContext.activeItemIndex=NO_SELECTION}};var drawSelection=function(elementToSelect,handler){if(handler){handler(elementToSelect)}};var eraseSelection=function(selectedElement,handler){if(handler&&selectedElement){handler(selectedElement)}};var unselectElement=function(selectedElement,selectionContext){eraseSelection(selectedElement,selectionContext.options.onUnselect)};var selectElement=function(elementToSelect,selectionContext){unselectElement(selectionContext.selectedElement(),selectionContext);elementToSelect=unwrap(elementToSelect);var newIndex=selectionContext.selectables.index(elementToSelect);if(newIndex===-1){return }selectionContext.activeItemIndex=newIndex;drawSelection(elementToSelect,selectionContext.options.onSelect)};var selectableFocusHandler=function(selectionContext){return function(evt){selectElement(evt.target,selectionContext);return evt.stopPropagation()}};var selectableBlurHandler=function(selectionContext){return function(evt){unselectElement(evt.target,selectionContext);return evt.stopPropagation()}};var reifyIndex=function(sc_that){var elements=sc_that.selectables;if(sc_that.activeItemIndex>=elements.length){sc_that.activeItemIndex=0}if(sc_that.activeItemIndex<0&&sc_that.activeItemIndex!==NO_SELECTION){sc_that.activeItemIndex=elements.length-1}if(sc_that.activeItemIndex>=0){$(elements[sc_that.activeItemIndex]).focus()}};var prepareShift=function(selectionContext){unselectElement(selectionContext.selectedElement(),selectionContext);if(selectionContext.activeItemIndex===NO_SELECTION){selectionContext.activeItemIndex=-1}};var focusNextElement=function(selectionContext){prepareShift(selectionContext);++selectionContext.activeItemIndex;reifyIndex(selectionContext)};var focusPreviousElement=function(selectionContext){prepareShift(selectionContext);--selectionContext.activeItemIndex;reifyIndex(selectionContext)};var arrowKeyHandler=function(selectionContext,keyMap,userHandlers){return function(evt){if(evt.which===keyMap.next){focusNextElement(selectionContext);evt.preventDefault()}else{if(evt.which===keyMap.previous){focusPreviousElement(selectionContext);evt.preventDefault()}}}};var getKeyMapForDirection=function(direction){var keyMap;if(direction===fluid.a11y.orientation.HORIZONTAL){keyMap=LEFT_RIGHT_KEYMAP}else{if(direction===fluid.a11y.orientation.VERTICAL){keyMap=UP_DOWN_KEYMAP}}return keyMap};var tabKeyHandler=function(selectionContext){return function(evt){if(evt.which!==$.ui.keyCode.TAB){return }cleanUpWhenLeavingContainer(selectionContext);if(evt.shiftKey){selectionContext.focusIsLeavingContainer=true}}};var containerFocusHandler=function(selectionContext){return function(evt){var shouldOrig=selectionContext.options.autoSelectFirstItem;var shouldSelect=typeof (shouldOrig)==="function"?shouldOrig():shouldOrig;if(selectionContext.focusIsLeavingContainer){shouldSelect=false}if(shouldSelect&&evt.target===selectionContext.container.get(0)){if(selectionContext.activeItemIndex===NO_SELECTION){selectionContext.activeItemIndex=0}$(selectionContext.selectables[selectionContext.activeItemIndex]).focus()}return evt.stopPropagation()}};var containerBlurHandler=function(selectionContext){return function(evt){selectionContext.focusIsLeavingContainer=false;return evt.stopPropagation()}};var makeElementsSelectable=function(container,defaults,userOptions){var options=$.extend(true,{},defaults,userOptions);var keyMap=getKeyMapForDirection(options.direction);var selectableElements=options.selectableElements?options.selectableElements:container.find(options.selectableSelector);var that={container:container,activeItemIndex:NO_SELECTION,selectables:selectableElements,focusIsLeavingContainer:false,options:options};that.selectablesUpdated=function(focusedItem){if(typeof (that.options.selectablesTabindex)==="number"){that.selectables.fluid("tabindex",that.options.selectablesTabindex)}that.selectables.unbind("focus."+NAMESPACE_KEY);that.selectables.unbind("blur."+NAMESPACE_KEY);that.selectables.bind("focus."+NAMESPACE_KEY,selectableFocusHandler(that));that.selectables.bind("blur."+NAMESPACE_KEY,selectableBlurHandler(that));if(focusedItem){selectElement(focusedItem,that)}else{reifyIndex(that)}};that.refresh=function(){if(!that.options.selectableSelector){throw ("Cannot refresh selectable context which was not initialised by a selector")}that.selectables=container.find(options.selectableSelector);that.selectablesUpdated()};that.selectedElement=function(){return that.activeItemIndex<0?null:that.selectables[that.activeItemIndex]};if(keyMap){container.keydown(arrowKeyHandler(that,keyMap))}container.keydown(tabKeyHandler(that));container.focus(containerFocusHandler(that));container.blur(containerBlurHandler(that));that.selectablesUpdated();return that};fluid.selectable=function(target,options){target=$(target);var that=makeElementsSelectable(target,fluid.selectable.defaults,options);setData(target,CONTEXT_KEY,that);return that};fluid.selectable.select=function(target,toSelect){$(toSelect).focus()};fluid.selectable.selectNext=function(target){target=$(target);focusNextElement(getData(target,CONTEXT_KEY))};fluid.selectable.selectPrevious=function(target){target=$(target);focusPreviousElement(getData(target,CONTEXT_KEY))};fluid.selectable.currentSelection=function(target){target=$(target);var that=getData(target,CONTEXT_KEY);return $(that.selectedElement())};fluid.selectable.defaults={direction:fluid.a11y.orientation.VERTICAL,selectablesTabindex:-1,autoSelectFirstItem:true,rememberSelectionState:true,selectableSelector:".selectable",selectableElements:null,onSelect:null,onUnselect:null,onLeaveContainer:null};var checkForModifier=function(binding,evt){if(!binding.modifier){return true}var modifierKey=binding.modifier;var isCtrlKeyPresent=modifierKey&&evt.ctrlKey;var isAltKeyPresent=modifierKey&&evt.altKey;var isShiftKeyPresent=modifierKey&&evt.shiftKey;return isCtrlKeyPresent||isAltKeyPresent||isShiftKeyPresent};var makeActivationHandler=function(binding){return function(evt){var target=evt.target;if(!fluid.enabled(evt.target)){return }var code=evt.which?evt.which:evt.keyCode;if(code===binding.key&&binding.activateHandler&&checkForModifier(binding,evt)){var event=$.Event("fluid-activate");$(evt.target).trigger(event,[binding.activateHandler]);if(event.isDefaultPrevented()){evt.preventDefault()}}}};var makeElementsActivatable=function(elements,onActivateHandler,defaultKeys,options){var bindings=[];$(defaultKeys).each(function(index,key){bindings.push({modifier:null,key:key,activateHandler:onActivateHandler})});if(options&&options.additionalBindings){bindings=bindings.concat(options.additionalBindings)}setData(elements,ENABLEMENT_KEY,true);for(var i=0;i<bindings.length;++i){var binding=bindings[i];elements.keydown(makeActivationHandler(binding))}elements.bind("fluid-activate",function(evt,handler){handler=handler||onActivateHandler;return handler?handler(evt):null})};fluid.activatable=function(target,fn,options){target=$(target);makeElementsActivatable(target,fn,fluid.activatable.defaults.keys,options)};fluid.activate=function(target){$(target).trigger("fluid-activate")};fluid.activatable.defaults={keys:[$.ui.keyCode.ENTER,$.ui.keyCode.SPACE]}})(jQuery,fluid_1_1);var whitespace="\n\r\t ";var closedTags={abbr:true,br:true,col:true,img:true,input:true,link:true,meta:true,param:true,hr:true,area:true,embed:true};XMLP=function(strXML){this.m_xml=strXML;this.m_iP=0;this.m_iState=XMLP._STATE_PROLOG;this.m_stack=[];this.m_attributes={};this.m_emitSynthetic=false};XMLP._NONE=0;XMLP._ELM_B=1;XMLP._ELM_E=2;XMLP._ELM_EMP=3;XMLP._ATT=4;XMLP._TEXT=5;XMLP._ENTITY=6;XMLP._PI=7;XMLP._CDATA=8;XMLP._COMMENT=9;XMLP._DTD=10;XMLP._ERROR=11;XMLP._CONT_XML=0;XMLP._CONT_ALT=1;XMLP._ATT_NAME=0;XMLP._ATT_VAL=1;XMLP._STATE_PROLOG=1;XMLP._STATE_DOCUMENT=2;XMLP._STATE_MISC=3;XMLP._errs=[];XMLP._errs[XMLP.ERR_CLOSE_PI=0]="PI: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_DTD=1]="DTD: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_COMMENT=2]="Comment: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_CDATA=3]="CDATA: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_ELM=4]="Element: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_ENTITY=5]="Entity: missing closing sequence";XMLP._errs[XMLP.ERR_PI_TARGET=6]="PI: target is required";XMLP._errs[XMLP.ERR_ELM_EMPTY=7]="Element: cannot be both empty and closing";XMLP._errs[XMLP.ERR_ELM_NAME=8]='Element: name must immediatly follow "<"';XMLP._errs[XMLP.ERR_ELM_LT_NAME=9]='Element: "<" not allowed in element names';XMLP._errs[XMLP.ERR_ATT_VALUES=10]="Attribute: values are required and must be in quotes";XMLP._errs[XMLP.ERR_ATT_LT_NAME=11]='Element: "<" not allowed in attribute names';XMLP._errs[XMLP.ERR_ATT_LT_VALUE=12]='Attribute: "<" not allowed in attribute values';XMLP._errs[XMLP.ERR_ATT_DUP=13]="Attribute: duplicate attributes not allowed";XMLP._errs[XMLP.ERR_ENTITY_UNKNOWN=14]="Entity: unknown entity";XMLP._errs[XMLP.ERR_INFINITELOOP=15]="Infinite loop";XMLP._errs[XMLP.ERR_DOC_STRUCTURE=16]="Document: only comments, processing instructions, or whitespace allowed outside of document element";XMLP._errs[XMLP.ERR_ELM_NESTING=17]="Element: must be nested correctly";XMLP.prototype._checkStructure=function(iEvent){var stack=this.m_stack;if(XMLP._STATE_PROLOG==this.m_iState){this.m_iState=XMLP._STATE_DOCUMENT}if(XMLP._STATE_DOCUMENT===this.m_iState){if((XMLP._ELM_B==iEvent)||(XMLP._ELM_EMP==iEvent)){this.m_stack[stack.length]=this.getName()}if((XMLP._ELM_E==iEvent)||(XMLP._ELM_EMP==iEvent)){if(stack.length===0){return XMLP._NONE}var strTop=stack[stack.length-1];this.m_stack.length--;if(strTop===null||strTop!==this.getName()){return this._setErr(XMLP.ERR_ELM_NESTING)}}}return iEvent};XMLP.prototype.getColumnNumber=function(){return SAXStrings.getColumnNumber(this.m_xml,this.m_iP)};XMLP.prototype.getContent=function(){return(this.m_cSrc==XMLP._CONT_XML)?this.m_xml:this.m_cAlt};XMLP.prototype.getContentBegin=function(){return this.m_cB};XMLP.prototype.getContentEnd=function(){return this.m_cE};XMLP.prototype.getLineNumber=function(){return SAXStrings.getLineNumber(this.m_xml,this.m_iP)};XMLP.prototype.getName=function(){return this.m_name};XMLP.prototype.next=function(){return this._checkStructure(this._parse())};XMLP.prototype._parse=function(){var iP=this.m_iP;var xml=this.m_xml;if(iP===xml.length){return XMLP._NONE}var c=xml.charAt(iP);if(c==="<"){var c2=xml.charAt(iP+1);if(c2==="?"){return this._parsePI(iP+2)}else{if(c2==="!"){if(iP===xml.indexOf("<!DOCTYPE",iP)){return this._parseDTD(iP+9)}else{if(iP===xml.indexOf("<!--",iP)){return this._parseComment(iP+4)}else{if(iP===xml.indexOf("<![CDATA[",iP)){return this._parseCDATA(iP+9)}}}}else{return this._parseElement(iP+1)}}}else{return this._parseText(iP)}};var nameRegex=/([^\s>]+)/g;var attrStartRegex=/\s*([\w:]+)/gm;var attrValRegex=/\"([^\"]*)\"\s*/gm;var attrValIERegex=/([^\>\s]+)\s*/gm;var closeRegex=/\s*<\//g;XMLP.prototype._parseElement=function(iB){var iE,iDE,iRet;var iType,strN,iLast;iDE=iE=this.m_xml.indexOf(">",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_ELM)}if(this.m_xml.charAt(iB)=="/"){iType=XMLP._ELM_E;iB++}else{iType=XMLP._ELM_B}if(this.m_xml.charAt(iE-1)=="/"){if(iType==XMLP._ELM_E){return this._setErr(XMLP.ERR_ELM_EMPTY)}iType=XMLP._ELM_EMP;iDE--}nameRegex.lastIndex=iB;var nameMatch=nameRegex.exec(this.m_xml);if(!nameMatch){return this._setErr(XMLP.ERR_ELM_NAME)}strN=nameMatch[1].toLowerCase();if("li"===strN&&iType!==XMLP._ELM_E&&this.m_stack.length>0&&this.m_stack[this.m_stack.length-1]==="li"&&!this.m_emitSynthetic){this.m_name="li";this.m_emitSynthetic=true;return XMLP._ELM_E}this.m_attributes={};this.m_cAlt="";if(nameRegex.lastIndex<iDE){this.m_iP=nameRegex.lastIndex;while(this.m_iP<iDE){attrStartRegex.lastIndex=this.m_iP;var attrMatch=attrStartRegex.exec(this.m_xml);if(!attrMatch){return this._setErr(XMLP.ERR_ATT_VALUES)}var attrname=attrMatch[1].toLowerCase();var attrval;if(this.m_xml.charCodeAt(attrStartRegex.lastIndex)===61){var valRegex=this.m_xml.charCodeAt(attrStartRegex.lastIndex+1)===34?attrValRegex:attrValIERegex;valRegex.lastIndex=attrStartRegex.lastIndex+1;attrMatch=valRegex.exec(this.m_xml);if(!attrMatch){return this._setErr(XMLP.ERR_ATT_VALUES)}attrval=attrMatch[1]}else{attrval=attrname;valRegex=attrStartRegex}if(!this.m_attributes[attrname]){this.m_attributes[attrname]=attrval}else{return this._setErr(XMLP.ERR_ATT_DUP)}this.m_iP=valRegex.lastIndex}}if(strN.indexOf("<")!=-1){return this._setErr(XMLP.ERR_ELM_LT_NAME)}this.m_name=strN;this.m_iP=iE+1;if(closedTags[strN]){closeRegex.lastIndex=iE+1;var closeMatch=closeRegex.exec;if(closeMatch){var matchclose=this.m_xml.indexOf(strN,closeMatch.lastIndex);if(matchclose===closeMatch.lastIndex){return iType}else{return XMLP._ELM_EMP}}}this.m_emitSynthetic=false;return iType};XMLP.prototype._parseCDATA=function(iB){var iE=this.m_xml.indexOf("]]>",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_CDATA)}this._setContent(XMLP._CONT_XML,iB,iE);this.m_iP=iE+3;return XMLP._CDATA};XMLP.prototype._parseComment=function(iB){var iE=this.m_xml.indexOf("-->",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_COMMENT)}this._setContent(XMLP._CONT_XML,iB-4,iE+3);this.m_iP=iE+3;return XMLP._COMMENT};XMLP.prototype._parseDTD=function(iB){var iE,strClose,iInt,iLast;iE=this.m_xml.indexOf(">",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_DTD)}iInt=this.m_xml.indexOf("[",iB);strClose=((iInt!=-1)&&(iInt<iE))?"]>":">";while(true){if(iE==iLast){return this._setErr(XMLP.ERR_INFINITELOOP)}iLast=iE;iE=this.m_xml.indexOf(strClose,iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_DTD)}if(this.m_xml.substring(iE-1,iE+2)!="]]>"){break}}this.m_iP=iE+strClose.length;return XMLP._DTD};XMLP.prototype._parsePI=function(iB){var iE,iTB,iTE,iCB,iCE;iE=this.m_xml.indexOf("?>",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_PI)}iTB=SAXStrings.indexOfNonWhitespace(this.m_xml,iB,iE);if(iTB==-1){return this._setErr(XMLP.ERR_PI_TARGET)}iTE=SAXStrings.indexOfWhitespace(this.m_xml,iTB,iE);if(iTE==-1){iTE=iE}iCB=SAXStrings.indexOfNonWhitespace(this.m_xml,iTE,iE);if(iCB==-1){iCB=iE}iCE=SAXStrings.lastIndexOfNonWhitespace(this.m_xml,iCB,iE);if(iCE==-1){iCE=iE-1}this.m_name=this.m_xml.substring(iTB,iTE);this._setContent(XMLP._CONT_XML,iCB,iCE+1);this.m_iP=iE+2;return XMLP._PI};XMLP.prototype._parseText=function(iB){var iE=this.m_xml.indexOf("<",iB);if(iE==-1){iE=this.m_xml.length}this._setContent(XMLP._CONT_XML,iB,iE);this.m_iP=iE;return XMLP._TEXT};XMLP.prototype._setContent=function(iSrc){var args=arguments;if(XMLP._CONT_XML==iSrc){this.m_cAlt=null;this.m_cB=args[1];this.m_cE=args[2]}else{this.m_cAlt=args[1];this.m_cB=0;this.m_cE=args[1].length}this.m_cSrc=iSrc};XMLP.prototype._setErr=function(iErr){var strErr=XMLP._errs[iErr];this.m_cAlt=strErr;this.m_cB=0;this.m_cE=strErr.length;this.m_cSrc=XMLP._CONT_ALT;return XMLP._ERROR};SAXStrings={};SAXStrings.WHITESPACE=" \t\n\r";SAXStrings.QUOTES="\"'";SAXStrings.getColumnNumber=function(strD,iP){if(!strD){return -1}iP=iP||strD.length;var arrD=strD.substring(0,iP).split("\n");arrD.length--;var iLinePos=arrD.join("\n").length;return iP-iLinePos};SAXStrings.getLineNumber=function(strD,iP){if(!strD){return -1}iP=iP||strD.length;return strD.substring(0,iP).split("\n").length};SAXStrings.indexOfNonWhitespace=function(strD,iB,iE){if(!strD){return -1}iB=iB||0;iE=iE||strD.length;for(var i=iB;i<iE;++i){var c=strD.charAt(i);if(c!==" "&&c!=="\t"&&c!=="\n"&&c!=="\r"){return i}}return -1};SAXStrings.indexOfWhitespace=function(strD,iB,iE){if(!strD){return -1}iB=iB||0;iE=iE||strD.length;for(var i=iB;i<iE;i++){if(SAXStrings.WHITESPACE.indexOf(strD.charAt(i))!=-1){return i}}return -1};SAXStrings.lastIndexOfNonWhitespace=function(strD,iB,iE){if(!strD){return -1}iB=iB||0;iE=iE||strD.length;for(var i=iE-1;i>=iB;i--){if(SAXStrings.WHITESPACE.indexOf(strD.charAt(i))==-1){return i}}return -1};SAXStrings.replace=function(strD,iB,iE,strF,strR){if(!strD){return""}iB=iB||0;iE=iE||strD.length;return strD.substring(iB,iE).split(strF).join(strR)};function __unescapeString(str){return str.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&apos;/g,"'")}function __escapeString(str){var escAmpRegEx=/&/g;var escLtRegEx=/</g;var escGtRegEx=/>/g;var quotRegEx=/"/g;var aposRegEx=/'/g;str=str.replace(escAmpRegEx,"&amp;");str=str.replace(escLtRegEx,"&lt;");str=str.replace(escGtRegEx,"&gt;");str=str.replace(quotRegEx,"&quot;");str=str.replace(aposRegEx,"&apos;");return str}fluid_1_1=fluid_1_1||{};(function($,fluid){var t;var parser;var tagstack;var lumpindex=0;var nestingdepth=0;var justended=false;var defstart=-1;var defend=-1;var baseURL;var debugMode=false;var cutpoints=[];var cutstatus=[];function init(baseURLin,debugModeIn,cutpointsIn){t.rootlump=fluid.XMLLump(0,-1);tagstack=[t.rootlump];lumpindex=0;nestingdepth=0;justended=false;defstart=-1;defend=-1;baseURL=baseURLin;debugMode=debugModeIn;cutpoints=cutpointsIn;if(cutpoints){for(var i=0;i<cutpoints.length;++i){cutstatus[i]=[];cutpoints[i].tree=fluid.parseSelector(cutpoints[i].selector)}}}function findTopContainer(){for(var i=tagstack.length-1;i>=0;--i){var lump=tagstack[i];if(lump.rsfID!==undefined){return lump}}return t.rootlump}function newLump(){var togo=fluid.XMLLump(lumpindex,nestingdepth);if(debugMode){togo.line=parser.getLineNumber();togo.column=parser.getColumnNumber()}t.lumps[lumpindex]=togo;++lumpindex;return togo}function addLump(mmap,ID,lump){var list=mmap[ID];if(!list){list=[];mmap[ID]=list}list[list.length]=lump}function checkContribute(ID,lump){if(ID.indexOf("scr=contribute-")!==-1){var scr=ID.substring("scr=contribute-".length);addLump(t.collectmap,scr,lump)}}var parseUri=function(source){var o=parseUri.options,value=o.parser[o.strictMode?"strict":"loose"].exec(source);for(var i=0,uri={};i<14;i++){uri[o.key[i]]=value[i]||""}uri[o.q.name]={};uri[o.key[12]].replace(o.q.parser,function($0,$1,$2){if($1){uri[o.q.name][$1]=$2}});return uri};parseUri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function rewriteUrl(url){var po=parseUri(url);if(po.protocol||url.charAt(0)==="/"){return url}else{return baseURL+url}}fluid.debugLump=function(lump){var togo=lump.text;togo+=" at ";togo+="lump line "+lump.line+" column "+lump.column+" index "+lump.lumpindex;togo+=parent.href===null?"":" in file "+parent.href;return togo};function debugLump(lump){return"<"+lump.tagname+">"}function hasCssClass(clazz,totest){if(!totest){return false}return(" "+totest+" ").indexOf(" "+clazz+" ")!==-1}function matchNode(term,headlump){if(term.predList){for(var i=0;i<term.predList.length;++i){var pred=term.predList[i];if(pred.id&&headlump.attributemap.id!==pred.id){return false}if(pred.clazz&&!hasCssClass(pred.clazz,headlump.attributemap["class"])){return false}if(pred.tag&&headlump.tagname!==pred.tag){return false}}return true}}function tagStartCut(headlump){var togo=undefined;if(cutpoints){for(var i=0;i<cutpoints.length;++i){var cut=cutpoints[i];var cutstat=cutstatus[i];var nextterm=cutstat.length;if(nextterm<cut.tree.length){var term=cut.tree[nextterm];if(nextterm>0){if(cut.tree[nextterm-1].child&&cutstat[nextterm-1]!==headlump.nestingdepth-1){continue}}var isMatch=matchNode(term,headlump);if(isMatch){cutstat[cutstat.length]=headlump.nestingdepth;if(cutstat.length===cut.tree.length){if(togo!==undefined){fluid.fail("Cutpoint specification error - node "+debugLump(headlump)+" has already matched with rsf:id of "+togo)}if(cut.id===undefined||cut.id===null){fluid.fail("Error in cutpoints list - entry at position "+i+" does not have an id set")}togo=cut.id}}}}}return togo}function tagEndCut(){if(cutpoints){for(var i=0;i<cutpoints.length;++i){var cutstat=cutstatus[i];if(cutstat.length>0&&cutstat[cutstat.length-1]===nestingdepth){cutstat.length--}}}}function processTagStart(isempty,text){++nestingdepth;if(justended){justended=false;var backlump=newLump();backlump.nestingdepth--}if(t.firstdocumentindex===-1){t.firstdocumentindex=lumpindex}var headlump=newLump();var stacktop=tagstack[tagstack.length-1];headlump.uplump=stacktop;var tagname=parser.getName();headlump.tagname=tagname;var attrs=headlump.attributemap=parser.m_attributes;var ID=attrs[fluid.ID_ATTRIBUTE];if(ID===undefined){ID=tagStartCut(headlump)}for(var attrname in attrs){var attrval=attrs[attrname];if(/href|src|codebase|action/.test(attrname)){attrval=rewriteUrl(attrval);attrs[attrname]=attrval}else{if(ID===undefined&&/for|headers/.test(attrname)){ID=attrs[fluid.ID_ATTRIBUTE]="scr=null"}}}if(ID){if(ID.charCodeAt(0)===126){ID=ID.substring(1);headlump.elide=true}checkContribute(ID,headlump);headlump.rsfID=ID;var downreg=findTopContainer();if(!downreg.downmap){downreg.downmap={}}addLump(downreg.downmap,ID,headlump);addLump(t.globalmap,ID,headlump);var colpos=ID.indexOf(":");if(colpos!==-1){var prefix=ID.substring(0,colpos);if(!stacktop.finallump){stacktop.finallump={}}stacktop.finallump[prefix]=headlump}}headlump.text="<"+tagname+fluid.dumpAttributes(attrs)+">";tagstack[tagstack.length]=headlump;if(isempty){processTagEnd()}}function processTagEnd(){tagEndCut();var endlump=newLump();--nestingdepth;endlump.text="</"+parser.getName()+">";var oldtop=tagstack[tagstack.length-1];oldtop.close_tag=t.lumps[lumpindex-1];tagstack.length--;justended=true}function processDefaultTag(){if(defstart!==-1){if(t.firstdocumentindex===-1){t.firstdocumentindex=lumpindex}var text=parser.getContent().substr(defstart,defend-defstart);justended=false;var newlump=newLump();newlump.text=text;defstart=-1}}fluid.ID_ATTRIBUTE="rsf:id";fluid.getPrefix=function(id){var colpos=id.indexOf(":");return colpos===-1?id:id.substring(0,colpos)};fluid.SplitID=function(id){var that={};var colpos=id.indexOf(":");if(colpos===-1){that.prefix=id}else{that.prefix=id.substring(0,colpos);that.suffix=id.substring(colpos+1)}return that};fluid.XMLLump=function(lumpindex,nestingdepth){return{nestingdepth:nestingdepth,lumpindex:lumpindex,parent:t}};fluid.XMLViewTemplate=function(){return{globalmap:{},collectmap:{},lumps:[],firstdocumentindex:-1}};fluid.fetchResources=function(resourceSpecs,callback){var resourceCallback=function(thisSpec){return{success:function(response){thisSpec.resourceText=response;thisSpec.resourceKey=thisSpec.href;thisSpec.queued=false;fluid.fetchResources(resourceSpecs,callback)},error:function(response,textStatus,errorThrown){thisSpec.fetchError={status:response.status,textStatus:response.textStatus,errorThrown:errorThrown};thisSpec.queued=false;fluid.fetchResources(resourceSpecs,callback)}}};var complete=true;for(var key in resourceSpecs){var resourceSpec=resourceSpecs[key];if(resourceSpec.href&&!(resourceSpec.resourceKey||resourceSpec.fetchError)){if(!resourceSpec.queued){var thisCallback=resourceCallback(resourceSpec);var options={url:resourceSpec.href,success:thisCallback.success,error:thisCallback.error};$.extend(true,options,resourceSpec.options);resourceSpec.queued=true;$.ajax(options)}if(resourceSpec.queued){complete=false}}else{if(resourceSpec.nodeId&&!resourceSpec.resourceText){var node=document.getElementById(resourceSpec.nodeId);resourceSpec.resourceText=fluid.dom.getElementText(node);resourceSpec.resourceKey=resourceSpec.nodeId}}}if(complete){if($.browser.mozilla){setTimeout(function(){callback(resourceSpecs)},1)}else{callback(resourceSpecs)}}};fluid.XMLEncode=function(text){return text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};fluid.dumpAttributes=function(attrcopy){var togo="";for(var attrname in attrcopy){var attrvalue=attrcopy[attrname];if(attrvalue!==null&&attrvalue!==undefined){togo+=" "+attrname+'="'+attrvalue+'"'}}return togo};fluid.aggregateMMap=function(target,source){for(var key in source){var targhas=target[key];if(!targhas){target[key]=[]}target[key]=target[key].concat(source[key])}};var unUnicode=/(\\u[\dabcdef]{4}|\\x[\dabcdef]{2})/g;fluid.unescapeProperties=function(string){string=string.replace(unUnicode,function(match){var code=match.substring(2);var parsed=parseInt(code,16);return String.fromCharCode(parsed)});var pos=0;while(true){var backpos=string.indexOf("\\",pos);if(backpos===-1){break}if(backpos===string.length-1){return[string.substring(0,string.length-1),true]}var replace=string.charAt(backpos+1);if(replace==="n"){replace="\n"}if(replace==="r"){replace="\r"}if(replace==="t"){replace="\t"}string=string.substring(0,backpos)+replace+string.substring(backpos+2);pos=backpos+1}return[string,false]};var breakPos=/[^\\][\s:=]/;fluid.parseJavaProperties=function(text){var togo={};text=text.replace(/\r\n/g,"\n");text=text.replace(/\r/g,"\n");lines=text.split("\n");var contin,key,valueComp,valueRaw,valueEsc;for(var i=0;i<lines.length;++i){var line=$.trim(lines[i]);if(!line||line.charAt(0)==="#"||line.charAt(0)==="!"){continue}if(!contin){valueComp="";var breakpos=line.search(breakPos);if(breakpos===-1){key=line;valueRaw=""}else{key=$.trim(line.substring(0,breakpos+1));valueRaw=$.trim(line.substring(breakpos+2));if(valueRaw.charAt(0)===":"||valueRaw.charAt(0)==="="){valueRaw=$.trim(valueRaw.substring(1))}}key=fluid.unescapeProperties(key)[0];valueEsc=fluid.unescapeProperties(valueRaw)}else{valueEsc=fluid.unescapeProperties(line)}contin=valueEsc[1];if(!valueEsc[1]){togo[key]=valueComp+valueEsc[0]}else{valueComp+=valueEsc[0]}}return togo};fluid.parseTemplates=function(resourceSpec,templateList,opts){var togo=[];togo.globalmap={};for(var i=0;i<templateList.length;++i){var resource=resourceSpec[templateList[i]];var lastslash=resource.href.lastIndexOf("/");var baseURL=lastslash===-1?"":resource.href.substring(0,lastslash+1);var template=fluid.parseTemplate(resource.resourceText,baseURL,opts.scanStart&&i===0,resource.cutpoints,opts);if(i===0){fluid.aggregateMMap(togo.globalmap,template.globalmap)}template.href=resource.href;template.baseURL=baseURL;template.resourceKey=resource.resourceKey;togo[i]=template;fluid.aggregateMMap(togo.globalmap,template.rootlump.downmap)}return togo};fluid.parseTemplate=function(template,baseURL,scanStart,cutpoints_in,opts){t=fluid.XMLViewTemplate();opts=opts||{};init(baseURL,opts.debugMode,cutpoints_in);var idpos=template.indexOf(fluid.ID_ATTRIBUTE);if(scanStart){var brackpos=template.indexOf(">",idpos);parser=new XMLP(template.substring(brackpos+1))}else{parser=new XMLP(template)}parseloop:while(true){var iEvent=parser.next();switch(iEvent){case XMLP._ELM_B:processDefaultTag();processTagStart(false,"");break;case XMLP._ELM_E:processDefaultTag();processTagEnd();break;case XMLP._ELM_EMP:processDefaultTag();processTagStart(true,"");break;case XMLP._PI:case XMLP._DTD:defstart=-1;continue;case XMLP._TEXT:case XMLP._ENTITY:case XMLP._CDATA:case XMLP._COMMENT:if(defstart===-1){defstart=parser.m_cB}defend=parser.m_cE;break;case XMLP._ERROR:fluid.setLogging(true);var message="Error parsing template: "+parser.m_cAlt+" at line "+parser.getLineNumber();fluid.log(message);fluid.log("Just read: "+parser.m_xml.substring(parser.m_iP-30,parser.m_iP));fluid.log("Still to read: "+parser.m_xml.substring(parser.m_iP,parser.m_iP+30));fluid.fail(message);break parseloop;case XMLP._NONE:break parseloop}}return t};var chars="(?:[\\w\u0128-\uFFFF*_-]|\\\\.)";var quickChild=new RegExp("^>\\s*("+chars+"+)");var quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)");var selSeg=new RegExp("^s*([#.]?)("+chars+"*)");var quickClass=new RegExp("([#.]?)("+chars+"+)","g");var childSeg=new RegExp("\\s*(>)?\\s*","g");var whiteSpace=new RegExp("^\\w*$");fluid.parseSelector=function(selstring){var togo=[];selstring=$.trim(selstring);quickClass.lastIndex=0;var lastIndex=0;while(true){var atNode=[];while(true){var segMatch=quickClass.exec(selstring);if(!segMatch||segMatch.index!==lastIndex){break}var thisNode={};var text=segMatch[2];if(segMatch[1]===""){thisNode.tag=text}else{if(segMatch[1]==="#"){thisNode.id=text}else{if(segMatch[1]==="."){thisNode.clazz=text}}}atNode[atNode.length]=thisNode;lastIndex=quickClass.lastIndex}childSeg.lastIndex=lastIndex;var fullAtNode={predList:atNode};var childMatch=childSeg.exec(selstring);if(!childMatch||childMatch.index!==lastIndex){var remainder=selstring.substring(lastIndex);fluid.fail("Error in selector string - can not match child selector expression at "+remainder)}if(childMatch[1]===">"){fullAtNode.child=true}togo[togo.length]=fullAtNode;if(childSeg.lastIndex>=selstring.length){break}lastIndex=childSeg.lastIndex;quickClass.lastIndex=childSeg.lastIndex}return togo}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){function debugPosition(component){return"as child of "+(component.parent.fullID?"component with full ID "+component.parent.fullID:"root")}function computeFullID(component){var togo="";var move=component;if(component.children===undefined){togo=component.ID+(component.localID!==undefined?component.localID:"");move=component.parent}while(move.parent){var parent=move.parent;if(move.fullID!==undefined){togo=move.fullID+togo;return togo}if(move.noID===undefined){var ID=move.ID;if(ID===undefined){fluid.fail("Error in component tree - component found with no ID "+debugPosition(parent)+": please check structure")}var colpos=ID.indexOf(":");var prefix=colpos===-1?ID:ID.substring(0,colpos);togo=prefix+":"+(move.localID===undefined?"":move.localID)+":"+togo}move=parent}return togo}function isBoundPrimitive(value){return fluid.isPrimitive(value)||value instanceof Array&&(value.length===0||typeof (value[0])==="string")}function processChild(value,key){if(isBoundPrimitive(value)){return{componentType:"UIBound",value:value,ID:key}}else{var unzip=unzipComponent(value);if(unzip.ID){return{ID:key,componentType:"UIContainer",children:[unzip]}}else{unzip.ID=key;return unzip}}}function fixChildren(children){if(!(children instanceof Array)){var togo=[];for(var key in children){var value=children[key];if(value instanceof Array){for(var i=0;i<value.length;++i){var processed=processChild(value[i],key);togo[togo.length]=processed}}else{togo[togo.length]=processChild(value,key)}}return togo}else{return children}}function fixupValue(uibound,model){if(uibound.value===undefined&&uibound.valuebinding!==undefined){if(!model){fluid.fail("Cannot perform value fixup for valuebinding "+uibound.valuebinding+" since no model was supplied to rendering")}uibound.value=fluid.model.getBeanValue(model,uibound.valuebinding)}}function upgradeBound(holder,property,model){if(holder[property]!==undefined){if(isBoundPrimitive(holder[property])){holder[property]={value:holder[property]}}}else{holder[property]={value:null}}fixupValue(holder[property],model)}var duckMap={children:"UIContainer",value:"UIBound",valuebinding:"UIBound",messagekey:"UIMessage",markup:"UIVerbatim",selection:"UISelect",target:"UILink",choiceindex:"UISelectChoice",functionname:"UIInitBlock"};function unzipComponent(component,model){if(component){for(var key in duckMap){if(component[key]!==undefined){component.componentType=duckMap[key];break}}if(component.componentType===undefined&&component.ID!==undefined){component.componentType="UIBound"}}if(!component||component.componentType===undefined){var decorators=component.decorators;if(decorators){delete component.decorators}component={componentType:"UIContainer",children:component};component.decorators=decorators}var cType=component.componentType;if(cType==="UIContainer"){component.children=fixChildren(component.children)}else{if(cType==="UISelect"){upgradeBound(component,"selection",model);upgradeBound(component,"optionlist",model);upgradeBound(component,"optionnames",model)}else{if(cType==="UILink"){upgradeBound(component,"target",model);upgradeBound(component,"linktext",model)}}}return component}function assignSubmittingName(component,defaultname){if(component.submittingname===undefined&&component.willinput!==false){component.submittingname=defaultname?defaultname:component.fullID}return component.submittingname}function fixupTree(tree,model){if(tree.componentType===undefined){tree=unzipComponent(tree,model)}if(tree.componentType!=="UIContainer"&&!tree.parent){tree={children:[tree]}}if(tree.children){tree.childmap={};for(var i=0;i<tree.children.length;++i){var child=tree.children[i];if(child.componentType===undefined){child=unzipComponent(child,model);tree.children[i]=child}child.parent=tree;if(child.ID===undefined){fluid.fail("Error in component tree: component found with no ID "+debugPosition(child))}tree.childmap[child.ID]=child;var colpos=child.ID.indexOf(":");if(colpos===-1){}else{var prefix=child.ID.substring(0,colpos);var childlist=tree.childmap[prefix];if(!childlist){childlist=[];tree.childmap[prefix]=childlist}if(child.localID===undefined&&childlist.length!==0){child.localID=childlist.length}childlist[childlist.length]=child}child.fullID=computeFullID(child);var componentType=child.componentType;if(componentType=="UISelect"){child.selection.fullID=child.fullID+"-selection"}else{if(componentType=="UIInitBlock"){var call=child.functionname+"(";for(var j=0;j<child.arguments.length;++j){if(child.arguments[j] instanceof fluid.ComponentReference){child.arguments[j]=child.parent.fullID+child.arguments[j].reference}call+='"'+child.arguments[j]+'"';if(j<child.arguments.length-1){call+=", "}}child.markup=call+")\n";child.componentType="UIVerbatim"}else{if(componentType=="UIBound"){fixupValue(child,model)}}}fixupTree(child,model)}}return tree}var globalmap={};var branchmap={};var rewritemap={};var seenset={};var collected={};var out="";var debugMode=false;var directFossils={};var renderOptions={};var decoratorQueue=[];var renderedbindings={};function getRewriteKey(template,parent,id){return template.resourceKey+parent.fullID+id}function resolveInScope(searchID,defprefix,scope,child){var deflump;var scopelook=scope?scope[searchID]:null;if(scopelook){for(var i=0;i<scopelook.length;++i){var scopelump=scopelook[i];if(!deflump&&scopelump.rsfID==defprefix){deflump=scopelump}if(scopelump.rsfID==searchID){return scopelump}}}return deflump}function resolveCall(sourcescope,child){var searchID=child.jointID?child.jointID:child.ID;var split=fluid.SplitID(searchID);var defprefix=split.prefix+":";var match=resolveInScope(searchID,defprefix,sourcescope.downmap,child);if(match){return match}if(child.children){match=resolveInScope(searchID,defprefix,globalmap,child);if(match){return match}}return null}function noteCollected(template){if(!seenset[template.href]){fluid.aggregateMMap(collected,template.collectmap);seenset[template.href]=true}}function resolveRecurse(basecontainer,parentlump){for(var i=0;i<basecontainer.children.length;++i){var branch=basecontainer.children[i];if(branch.children){var resolved=resolveCall(parentlump,branch);if(resolved){branchmap[branch.fullID]=resolved;var id=resolved.attributemap.id;if(id!==undefined){rewritemap[getRewriteKey(parentlump.parent,basecontainer,id)]=branch.fullID}noteCollected(resolved.parent);resolveRecurse(branch,resolved)}}}if(parentlump.downmap){for(var id in parentlump.downmap){var lumps=parentlump.downmap[id];for(var i=0;i<lumps.length;++i){var lump=lumps[i];var lumpid=lump.attributemap.id;if(lumpid!==undefined&&lump.rsfID!==undefined){var resolved=fetchComponent(basecontainer,lump.rsfID);if(resolved!==null){var resolveID=resolved.fullID;if(resolved.componentType==="UISelect"){resolveID=resolveID+"-selection"}rewritemap[getRewriteKey(parentlump.parent,basecontainer,lumpid)]=resolveID}}}}}}function resolveBranches(globalmapp,basecontainer,parentlump){branchmap={};rewritemap={};seenset={};collected={};globalmap=globalmapp;branchmap[basecontainer.fullID]=parentlump;resolveRecurse(basecontainer,parentlump)}function dumpBranchHead(branch,targetlump){if(targetlump.elide){return }var attrcopy={};$.extend(true,attrcopy,targetlump.attributemap);adjustForID(attrcopy,branch);outDecorators(branch,attrcopy);out+="<"+targetlump.tagname+" ";out+=fluid.dumpAttributes(attrcopy);out+=">"}function dumpTillLump(lumps,start,limit){for(;start<limit;++start){var text=lumps[start].text;if(text){out+=lumps[start].text}}}function dumpScan(lumps,renderindex,basedepth,closeparent,insideleaf){var start=renderindex;while(true){if(renderindex===lumps.length){break}var lump=lumps[renderindex];if(lump.nestingdepth<basedepth){break}if(lump.rsfID!==undefined){if(!insideleaf){break}if(insideleaf&&lump.nestingdepth>basedepth+(closeparent?0:1)){fluid.log("Error in component tree - leaf component found to contain further components - at "+lump.toString())}else{break}}++renderindex}if(!closeparent&&(renderindex==lumps.length||!lumps[renderindex].rsfID)){--renderindex}dumpTillLump(lumps,start,renderindex);return renderindex}var trc={};function openTag(){if(!trc.iselide){out+="<"+trc.uselump.tagname}}function closeTag(){if(!trc.iselide){out+="</"+trc.uselump.tagname+">"}}function renderUnchanged(){dumpTillLump(trc.uselump.parent.lumps,trc.uselump.lumpindex+1,trc.close.lumpindex+(trc.iselide?0:1))}function replaceAttributes(){if(!trc.iselide){out+=fluid.dumpAttributes(trc.attrcopy)}dumpTemplateBody()}function replaceAttributesOpen(){if(trc.iselide){replaceAttributes()}else{out+=fluid.dumpAttributes(trc.attrcopy);out+=">";trc.nextpos=trc.endopen.lumpindex}}function dumpTemplateBody(){if(trc.endopen.lumpindex===trc.close.lumpindex){if(!trc.iselide){out+="/>"}}else{if(!trc.iselide){out+=">"}dumpTillLump(trc.uselump.parent.lumps,trc.endopen.lumpindex,trc.close.lumpindex+(trc.iselide?0:1))}}function rewriteLeaf(value){if(isValue(value)){replaceBody(value)}else{replaceAttributes()}}function rewriteLeafOpen(value){if(trc.iselide){rewriteLeaf(trc.value)}else{if(isValue(value)){replaceBody(value)}else{replaceAttributesOpen()}}}function replaceBody(value){out+=fluid.dumpAttributes(trc.attrcopy);if(!trc.iselide){out+=">"}out+=fluid.XMLEncode(value.toString());closeTag()}function isValue(value){return value!==null&&value!==undefined&&!isPlaceholder(value)}function isPlaceholder(value){return false}function rewriteURL(template,URL){return URL}function dumpHiddenField(todump){out+='<input type="hidden" ';var isvirtual=todump.virtual;var outattrs={};outattrs[isvirtual?"id":"name"]=todump.name;outattrs.value=todump.value;out+=fluid.dumpAttributes(outattrs);out+=" />\n"}function applyAutoBind(torender,finalID){var tagname=trc.uselump.tagname;var applier=renderOptions.applier;function applyFunc(){fluid.applyChange(fluid.byId(finalID),undefined,applier)}if(renderOptions.autoBind&&/input|select|textarea/.test(tagname)&&!renderedbindings[finalID]){var decorators=[{jQuery:["change",applyFunc]}];if($.browser.msie&&tagname==="input"&&/radio|checkbox/.test(trc.attrcopy.type)){decorators.push({jQuery:["click",applyFunc]})}outDecoratorsImpl(torender,decorators,trc.attrcopy,finalID)}}function dumpBoundFields(torender,parent){if(torender){var holder=parent?parent:torender;if(directFossils&&holder.submittingname&&holder.valuebinding){directFossils[holder.submittingname]={name:holder.submittingname,EL:holder.valuebinding,oldvalue:holder.value};applyAutoBind(torender,torender.fullID)}if(torender.fossilizedbinding){dumpHiddenField(torender.fossilizedbinding)}if(torender.fossilizedshaper){dumpHiddenField(torender.fossilizedshaper)}}}function dumpSelectionBindings(uiselect){if(!renderedbindings[uiselect.selection.fullID]){renderedbindings[uiselect.selection.fullID]=true;dumpBoundFields(uiselect.selection);dumpBoundFields(uiselect.optionlist);dumpBoundFields(uiselect.optionnames)}}fluid.NULL_STRING="\u25a9null\u25a9";var LINK_ATTRIBUTES={a:"href",link:"href",img:"src",frame:"src",script:"src",style:"src",input:"src",embed:"src",form:"action",applet:"codebase",object:"codebase"};function isSelectedValue(torender,value){var selection=torender.selection;return selection.value&&typeof (selection.value)!=="string"&&typeof (selection.value.length)==="number"?$.inArray(value,selection.value,value)!==-1:selection.value===value}function getRelativeComponent(component,relativeID){component=component.parent;if(relativeID.indexOf("..::")===0){relativeID=relativeID.substring(4);component=component.parent}return component.childmap[relativeID]}function explodeDecorators(decorators){var togo=[];if(decorators.type){togo[0]=decorators}else{for(var key in decorators){if(key==="$"){key="jQuery"}var value=decorators[key];var decorator={type:key};if(key==="jQuery"){decorator.func=value[0];decorator.args=value.slice(1)}else{if(key==="addClass"||key==="removeClass"){decorator.classes=value}else{if(key==="attrs"){decorator.attributes=value}else{if(key==="identify"){decorator.key=value}}}}togo[togo.length]=decorator}}return togo}function outDecoratorsImpl(torender,decorators,attrcopy,finalID){renderOptions.idMap=renderOptions.idMap||{};for(var i=0;i<decorators.length;++i){var decorator=decorators[i];var type=decorator.type;if(!type){var explodedDecorators=explodeDecorators(decorator);outDecoratorsImpl(torender,explodedDecorators,attrcopy,finalID);continue}if(type==="$"){type=decorator.type="jQuery"}if(type==="jQuery"||type==="event"||type==="fluid"){var id=adjustForID(attrcopy,torender,true,finalID);decorator.id=id;decoratorQueue[decoratorQueue.length]=decorator}else{if(type==="attrs"){$.extend(true,attrcopy,decorator.attributes)}else{if(type==="addClass"||type==="removeClass"){var fakeNode={nodeType:1,className:attrcopy["class"]||""};$(fakeNode)[type](decorator.classes);attrcopy["class"]=fakeNode.className}else{if(type==="identify"){var id=adjustForID(attrcopy,torender,true,finalID);renderOptions.idMap[decorator.key]=id}}}}}}function outDecorators(torender,attrcopy){if(!torender.decorators){return }if(torender.decorators.length===undefined){torender.decorators=explodeDecorators(torender.decorators)}outDecoratorsImpl(torender,torender.decorators,attrcopy)}function renderComponent(torender){var attrcopy=trc.attrcopy;var lumps=trc.uselump.parent.lumps;var lumpindex=trc.uselump.lumpindex;var componentType=torender.componentType;var tagname=trc.uselump.tagname;outDecorators(torender,attrcopy);if(componentType==="UIMessage"){componentType="UIBound";if(!renderOptions.messageLocator){torender.value="[No messageLocator is configured in options - please consult documentation on options.messageSource]"}else{torender.value=renderOptions.messageLocator(torender.messagekey,torender.args)}}function makeFail(torender,end){fluid.fail("Error in component tree - UISelectChoice with id "+torender.fullID+end)}if(componentType==="UIBound"||componentType==="UISelectChoice"){var parent;if(torender.choiceindex!==undefined){if(torender.parentFullID){parent=getAbsoluteComponent(view,torender.parentFullID);if(!parent){makeFail(torender," has parentFullID of "+torender.parentFullID+" which cannot be resolved")}}else{if(torender.parentRelativeID!==undefined){parent=getRelativeComponent(torender,torender.parentRelativeID);if(!parent){makeFail(torender," has parentRelativeID of "+torender.parentRelativeID+" which cannot be resolved")}}else{makeFail(torender," does not have either parentFullID or parentRelativeID set")}}assignSubmittingName(parent.selection);dumpSelectionBindings(parent)}var submittingname=parent?parent.selection.submittingname:torender.submittingname;if(tagname==="input"||tagname==="textarea"){if(!parent){submittingname=assignSubmittingName(torender)}if(submittingname!==undefined){attrcopy.name=submittingname}}dumpBoundFields(torender,parent?parent.selection:null);if(typeof (torender.value)==="boolean"||attrcopy.type==="radio"||attrcopy.type==="checkbox"){var underlyingValue;var directValue=torender.value;if(torender.choiceindex!==undefined){if(!parent.optionlist.value){fluid.fail("Error in component tree - selection control with full ID "+parent.fullID+" has no values")}underlyingValue=parent.optionlist.value[torender.choiceindex];directValue=isSelectedValue(parent,underlyingValue)}if(isValue(directValue)){if(directValue){attrcopy.checked="checked"}else{delete attrcopy.checked}}attrcopy.value=underlyingValue?underlyingValue:"true";rewriteLeaf(null)}else{if(torender.value instanceof Array){renderUnchanged()}else{var value=parent?parent[tagname==="textarea"||tagname==="input"?"optionlist":"optionnames"].value[torender.choiceindex]:torender.value;if(tagname==="textarea"){if(isPlaceholder(value)&&torender.willinput){value=""}rewriteLeaf(value)}else{if(tagname==="input"){if(torender.willinput||isValue(value)){attrcopy.value=value}rewriteLeaf(null)}else{delete attrcopy.name;rewriteLeafOpen(value)}}}}}else{if(componentType==="UISelect"){applyAutoBind(torender,torender.selection.fullID);var ishtmlselect=tagname==="select";var ismultiple=false;if(torender.selection.value instanceof Array){ismultiple=true;if(ishtmlselect){attrcopy.multiple="multiple"}}assignSubmittingName(torender.selection,attrcopy.id);if(ishtmlselect){if(torender.selection.willinput!==false){attrcopy.name=torender.selection.submittingname}}out+=fluid.dumpAttributes(attrcopy);if(ishtmlselect){out+=">";var values=torender.optionlist.value;var names=torender.optionnames===null||torender.optionnames===undefined||!torender.optionnames.value?values:torender.optionnames.value;if(!names||!names.length){fluid.fail("Error in component tree - UISelect component with fullID "+torender.fullID+" does not have optionnames set")}for(var i=0;i<names.length;++i){out+='<option value="';var value=values[i];if(value===null){value=fluid.NULL_STRING}out+=fluid.XMLEncode(value);if(isSelectedValue(torender,value)){out+='" selected="selected'}out+='">';out+=fluid.XMLEncode(names[i]);out+="</option>\n"}closeTag()}else{dumpTemplateBody()}dumpSelectionBindings(torender)}else{if(componentType==="UILink"){var attrname=LINK_ATTRIBUTES[tagname];if(attrname){var target=torender.target.value;if(!isValue(target)){target=attrcopy[attname]}else{target=rewriteURL(trc.uselump.parent,target)}attrcopy[attrname]=target}var value=torender.linktext.value;if(!isValue(value)){replaceAttributesOpen()}else{rewriteLeaf(value)}}else{if(torender.markup!==undefined){var rendered=torender.markup;if(rendered===null){out+=fluid.dumpAttributes(attrcopy);out+=">";renderUnchanged()}else{if(!trc.iselide){out+=fluid.dumpAttributes(attrcopy);out+=">"}out+=rendered;closeTag()}}else{}}}}}function adjustForID(attrcopy,component,late,forceID){if(!late){delete attrcopy["rsf:id"]}if(forceID!==undefined){attrcopy.id=forceID}else{if(attrcopy.id||late){attrcopy.id=component.fullID}}var count=1;var baseid=attrcopy.id;while(renderOptions.document.getElementById(attrcopy.id)){attrcopy.id=baseid+"-"+(count++)}return attrcopy.id}function rewriteIDRelation(context){var attrname;var attrval=trc.attrcopy["for"];if(attrval!==undefined){attrname="for"}else{attrval=trc.attrcopy.headers;if(attrval!==undefined){attrname="headers"}}if(!attrname){return }var tagname=trc.uselump.tagname;if(attrname==="for"&&tagname!=="label"){return }if(attrname==="headers"&&tagname!=="td"&&tagname!=="th"){return }var rewritten=rewritemap[getRewriteKey(trc.uselump.parent,context,attrval)];if(rewritten!==undefined){trc.attrcopy[attrname]=rewritten}}function renderComment(message){out+=("<!-- "+fluid.XMLEncode(message)+"-->")}function renderDebugMessage(message){out+='<span style="background-color:#FF466B;color:white;padding:1px;">';out+=message;out+="</span><br/>"}function reportPath(branch){var path=branch.fullID;return !path?"component tree root":"full path "+path}function renderComponentSystem(context,torendero,lump){var lumpindex=lump.lumpindex;var lumps=lump.parent.lumps;var nextpos=-1;var outerendopen=lumps[lumpindex+1];var outerclose=lump.close_tag;nextpos=outerclose.lumpindex+1;var payloadlist=lump.downmap?lump.downmap["payload-component"]:null;var payload=payloadlist?payloadlist[0]:null;var iselide=lump.rsfID.charCodeAt(0)===126;var endopen=outerendopen;var close=outerclose;var uselump=lump;var attrcopy={};$.extend(true,attrcopy,(payload===null?lump:payload).attributemap);trc.attrcopy=attrcopy;trc.uselump=uselump;trc.endopen=endopen;trc.close=close;trc.nextpos=nextpos;trc.iselide=iselide;rewriteIDRelation(context);if(torendero===null){if(lump.rsfID.indexOf("scr=")===(iselide?1:0)){var scrname=lump.rsfID.substring(4+(iselide?1:0));if(scrname==="ignore"){nextpos=trc.close.lumpindex+1}else{openTag();replaceAttributesOpen();nextpos=trc.endopen.lumpindex}}}else{if(payload){trc.endopen=lumps[payload.lumpindex+1];trc.close=payload.close_tag;trc.uselump=payload;dumpTillLump(lumps,lumpindex,payload.lumpindex);lumpindex=payload.lumpindex}adjustForID(attrcopy,torendero);openTag();renderComponent(torendero);if(payload!==null){if(trc.nextpos===nextpos){dumpTillLump(lumps,trc.close.lumpindex+1,outerclose.lumpindex+1)}}nextpos=trc.nextpos}return nextpos}function renderContainer(child,targetlump){var t2=targetlump.parent;var firstchild=t2.lumps[targetlump.lumpindex+1];if(child.children!==undefined){dumpBranchHead(child,targetlump)}else{renderComponentSystem(child.parent,child,targetlump)}renderRecurse(child,targetlump,firstchild)}function fetchComponent(basecontainer,id,lump){if(id.indexOf("msg=")===0){var key=id.substring(4);return{componentType:"UIMessage",messagekey:key}}while(basecontainer){var togo=basecontainer.childmap[id];if(togo){return togo}basecontainer=basecontainer.parent}return null}function fetchComponents(basecontainer,id){var togo;while(basecontainer){togo=basecontainer.childmap[id];if(togo){break}basecontainer=basecontainer.parent}return togo}function findChild(sourcescope,child){var split=fluid.SplitID(child.ID);var headlumps=sourcescope.downmap[child.ID];if(headlumps===null){headlumps=sourcescope.downmap[split.prefix+":"]}return headlumps===null?null:headlumps[0]}function renderRecurse(basecontainer,parentlump,baselump){var renderindex=baselump.lumpindex;var basedepth=parentlump.nestingdepth;var t1=parentlump.parent;if(debugMode){var rendered={}}while(true){renderindex=dumpScan(t1.lumps,renderindex,basedepth,!parentlump.elide,false);if(renderindex===t1.lumps.length){break}var lump=t1.lumps[renderindex];var id=lump.rsfID;if(lump.nestingdepth<basedepth||id===undefined){break}if(id.charCodeAt(0)===126){id=id.substring(1)}if(id.indexOf(":")!==-1){var prefix=fluid.getPrefix(id);var children=fetchComponents(basecontainer,prefix);var finallump=lump.uplump.finallump[prefix];var closefinal=finallump.close_tag;if(children){for(var i=0;i<children.length;++i){var child=children[i];if(child.children){var targetlump=branchmap[child.fullID];if(targetlump){if(debugMode){renderComment("Branching for "+child.fullID+" from "+fluid.debugLump(lump)+" to "+fluid.debugLump(targetlump))}renderContainer(child,targetlump);if(debugMode){renderComment("Branch returned for "+child.fullID+fluid.debugLump(lump)+" to "+fluid.debugLump(targetlump))}}else{if(debugMode){renderDebugMessage("No matching template branch found for branch container with full ID "+child.fullID+" rendering from parent template branch "+fluid.debugLump(baselump))}}}else{var targetlump=findChild(parentlump,child);if(!targetlump){if(debugMode){renderDebugMessage("Repetitive leaf with full ID "+child.fullID+" could not be rendered from parent template branch "+fluid.debugLump(baselump))}continue}var renderend=renderComponentSystem(basecontainer,child,targetlump);var wasopentag=renderend<t1.lumps.lengtn&&t1.lumps[renderend].nestingdepth>=targetlump.nestingdepth;var newbase=child.children?child:basecontainer;if(wasopentag){renderRecurse(newbase,targetlump,t1.lumps[renderend]);renderend=targetlump.close_tag.lumpindex+1}if(i!==children.length-1){if(renderend<closefinal.lumpindex){dumpScan(t1.lumps,renderend,targetlump.nestingdepth-1,false,false)}}else{dumpScan(t1.lumps,renderend,targetlump.nestingdepth,true,false)}}}}else{if(debugMode){renderDebugMessage("No branch container with prefix "+prefix+": found in container "+reportPath(basecontainer)+" rendering at template position "+fluid.debugLump(baselump)+", skipping")}}renderindex=closefinal.lumpindex+1;if(debugMode){renderComment("Stack returned from branch for ID "+id+" to "+fluid.debugLump(baselump)+": skipping from "+fluid.debugLump(lump)+" to "+fluid.debugLump(closefinal))}}else{var component;if(id){if(debugMode){rendered[id]=true}component=fetchComponent(basecontainer,id,lump)}if(component&&component.children!==undefined){renderContainer(component);renderindex=lump.close_tag.lumpindex+1}else{renderindex=renderComponentSystem(basecontainer,component,lump)}}if(renderindex===t1.lumps.length){break}}if(debugMode){var children=basecontainer.children;for(var key=0;key<children.length;++key){var child=children[key];if(!(child.ID.indexOf(":")!==-1)&&!rendered[child.ID]){renderDebugMessage("Leaf child component "+child.componentType+" with full ID "+child.fullID+" could not be found within template "+fluid.debugLump(baselump))}}}}function renderCollect(collump){dumpTillLump(collump.parent.lumps,collump.lumpindex,collump.close_tag.lumpindex+1)}function renderCollects(){for(var key in collected){var collist=collected[key];for(var i=0;i<collist.length;++i){renderCollect(collist[i])}}}function processDecoratorQueue(){for(var i=0;i<decoratorQueue.length;++i){var decorator=decoratorQueue[i];var node=fluid.byId(decorator.id);if(!node){fluid.fail("Error during rendering - component with id "+decorator.id+" which has a queued decorator was not found in the output markup")}if(decorator.type==="jQuery"){var jnode=$(node);jnode[decorator.func].apply(jnode,$.makeArray(decorator.args))}else{if(decorator.type==="fluid"){var args=decorator.args;if(!args){if(!decorator.container){decorator.container=node}args=[decorator.container,decorator.options]}var that=fluid.invokeGlobalFunction(decorator.func,args,fluid);decorator.that=that}else{if(decorator.type==="event"){node[decorator.event]=decorator.handler}}}}}fluid.ComponentReference=function(reference){this.reference=reference};fluid.explode=function(hash,basepath){var togo=[];for(var key in hash){var binding=basepath===undefined?key:basepath+"."+key;togo[togo.length]={ID:key,value:hash[key],valuebinding:binding}}return togo};fluid.explodeSelectionToInputs=function(optionlist,opts){return fluid.transform(optionlist,function(option,index){return{ID:opts.rowID,children:[{ID:opts.inputID,parentRelativeID:"..::"+opts.selectID,choiceindex:index},{ID:opts.labelID,parentRelativeID:"..::"+opts.selectID,choiceindex:index}]}})};fluid.resolveMessageSource=function(messageSource){if(messageSource.type==="data"){if(messageSource.url===undefined){return fluid.messageLocator(messageSource.messages)}else{}}};fluid.makeBranches=function(){var firstBranch;var thisBranch;for(var i=0;i<arguments.length;++i){var thisarg=arguments[i];var nextBranch;if(typeof (thisarg)==="string"){nextBranch={ID:thisarg}}else{if(thisarg instanceof Array){nextBranch={ID:thisarg[0],jointID:thisarg[1]}}else{$.extend(true,thisBranch,thisarg);nextBranch=thisBranch}}if(thisBranch&&nextBranch!==thisBranch){if(!thisBranch.children){thisBranch.children=[]}thisBranch.children[thisBranch.children.length]=nextBranch}thisBranch=nextBranch;if(!firstBranch){firstBranch=nextBranch}}return firstBranch};fluid.renderTemplates=function(templates,tree,options,fossilsIn){options=options||{};tree=tree||{};debugMode=options.debugMode;if(!options.messageLocator&&options.messageSource){options.messageLocator=fluid.resolveMessageSource(options.messageSource)}options.document=options.document||document;directFossils=fossilsIn;decoratorQueue=[];tree=fixupTree(tree,options.model);var template=templates[0];resolveBranches(templates.globalmap,tree,template.rootlump);out="";renderedbindings={};renderOptions=options;renderCollects();renderRecurse(tree,template.rootlump,template.lumps[template.firstdocumentindex]);return out};fluid.reRender=function(templates,node,tree,options){options=options||{};node=fluid.unwrap(node);var lastFocusedElement=fluid.getLastFocusedElement?fluid.getLastFocusedElement():null;var lastId;if(lastFocusedElement&&fluid.dom.isContainer(node,lastFocusedElement)){lastId=lastFocusedElement.id}if($.browser.msie){$(node).empty()}else{node.innerHTML=""}var fossils={};var rendered=fluid.renderTemplates(templates,tree,options,fossils);if(options.renderRaw){rendered=fluid.XMLEncode(rendered);rendered=rendered.replace(/\n/g,"<br/>")}if(options.model){fluid.bindFossils(node,options.model,fossils)}if($.browser.msie){$(node).html(rendered)}else{node.innerHTML=rendered}processDecoratorQueue();if(lastId){var element=fluid.byId(lastId);if(element){$(element).focus()}}return templates};function findNodeValue(rootNode){var node=fluid.dom.iterateDom(rootNode,function(node){return node.nodeType===8||node.nodeType===4?"stop":null},true);var value=node.nodeValue;if(value.indexOf("[CDATA[")===0){return value.substring(6,value.length-2)}else{return value}}fluid.extractTemplate=function(node,armouring){if(!armouring){return node.innerHTML}else{return findNodeValue(node)}};fluid.selfRender=function(node,tree,options){options=options||{};node=fluid.unwrap(node);var resourceSpec={base:{resourceText:fluid.extractTemplate(node,options.armouring),href:".",resourceKey:".",cutpoints:options.cutpoints}};var templates=fluid.parseTemplates(resourceSpec,["base"],options);return fluid.reRender(templates,node,tree,options)}})(jQuery,fluid_1_1);(function($){var setDataSwitch={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},uiDialogClasses="ui-dialog ui-widget ui-widget-content ui-corner-all ";$.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var self=this,options=this.options,title=options.title||this.originalTitle||"&nbsp;",titleId=$.ui.dialog.getTitleId(this.element),uiDialog=(this.uiDialog=$("<div/>")).appendTo(document.body).hide().addClass(uiDialogClasses+options.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:options.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(event){(options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&self.close(event))}).attr({role:"dialog","aria-labelledby":titleId}).mousedown(function(event){self.moveToTop(false,event)}),uiDialogContent=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(uiDialog),uiDialogTitlebar=(this.uiDialogTitlebar=$("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(uiDialog),uiDialogTitlebarClose=$('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){uiDialogTitlebarClose.addClass("ui-state-hover")},function(){uiDialogTitlebarClose.removeClass("ui-state-hover")}).focus(function(){uiDialogTitlebarClose.addClass("ui-state-focus")}).blur(function(){uiDialogTitlebarClose.removeClass("ui-state-focus")}).mousedown(function(ev){ev.stopPropagation()}).click(function(event){self.close(event);return false}).appendTo(uiDialogTitlebar),uiDialogTitlebarCloseText=(this.uiDialogTitlebarCloseText=$("<span/>")).addClass("ui-icon ui-icon-closethick").text(options.closeText).appendTo(uiDialogTitlebarClose),uiDialogTitle=$("<span/>").addClass("ui-dialog-title").attr("id",titleId).html(title).prependTo(uiDialogTitlebar);uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();(options.draggable&&$.fn.draggable&&this._makeDraggable());(options.resizable&&$.fn.resizable&&this._makeResizable());this._createButtons(options.buttons);this._isOpen=false;(options.bgiframe&&$.fn.bgiframe&&uiDialog.bgiframe());(options.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(event){var self=this;if(false===self._trigger("beforeclose",event)){return }(self.overlay&&self.overlay.destroy());self.uiDialog.unbind("keypress.ui-dialog");(self.options.hide?self.uiDialog.hide(self.options.hide,function(){self._trigger("close",event)}):self.uiDialog.hide()&&self._trigger("close",event));$.ui.dialog.overlay.resize();self._isOpen=false},isOpen:function(){return this._isOpen},moveToTop:function(force,event){if((this.options.modal&&!force)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",event)}if(this.options.zIndex>$.ui.dialog.maxZ){$.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",$.ui.dialog.overlay.maxZ=++$.ui.dialog.maxZ));var saveScroll={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++$.ui.dialog.maxZ);this.element.attr(saveScroll);this._trigger("focus",event)},open:function(){if(this._isOpen){return }var options=this.options,uiDialog=this.uiDialog;this.overlay=options.modal?new $.ui.dialog.overlay(this):null;(uiDialog.next().length&&uiDialog.appendTo("body"));this._size();this._position(options.position);uiDialog.show(options.show);this.moveToTop(true);(options.modal&&uiDialog.bind("keypress.ui-dialog",function(event){if(event.keyCode!=$.ui.keyCode.TAB){return }var tabbables=$(":tabbable",this),first=tabbables.filter(":first")[0],last=tabbables.filter(":last")[0];if(event.target==last&&!event.shiftKey){setTimeout(function(){first.focus()},1)}else{if(event.target==first&&event.shiftKey){setTimeout(function(){last.focus()},1)}}}));$([]).add(uiDialog.find(".ui-dialog-content :tabbable:first")).add(uiDialog.find(".ui-dialog-buttonpane :tabbable:first")).add(uiDialog).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(buttons){var self=this,hasButtons=false,uiDialogButtonPane=$("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof buttons=="object"&&buttons!==null&&$.each(buttons,function(){return !(hasButtons=true)}));if(hasButtons){$.each(buttons,function(name,fn){$('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(name).click(function(){fn.apply(self.element[0],arguments)}).hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")}).appendTo(uiDialogButtonPane)});uiDialogButtonPane.appendTo(this.uiDialog)}},_makeDraggable:function(){var self=this,options=this.options,heightBeforeDrag;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){heightBeforeDrag=options.height;$(this).height($(this).height()).addClass("ui-dialog-dragging");(options.dragStart&&options.dragStart.apply(self.element[0],arguments))},drag:function(){(options.drag&&options.drag.apply(self.element[0],arguments))},stop:function(){$(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);(options.dragStop&&options.dragStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize()}})},_makeResizable:function(handles){handles=(handles===undefined?this.options.resizable:handles);var self=this,options=this.options,resizeHandles=typeof handles=="string"?handles:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:options.minHeight,start:function(){$(this).addClass("ui-dialog-resizing");(options.resizeStart&&options.resizeStart.apply(self.element[0],arguments))},resize:function(){(options.resize&&options.resize.apply(self.element[0],arguments))},handles:resizeHandles,stop:function(){$(this).removeClass("ui-dialog-resizing");options.height=$(this).height();options.width=$(this).width();(options.resizeStop&&options.resizeStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(pos){var wnd=$(window),doc=$(document),pTop=doc.scrollTop(),pLeft=doc.scrollLeft(),minTop=pTop;if($.inArray(pos,["center","top","right","bottom","left"])>=0){pos=[pos=="right"||pos=="left"?pos:"center",pos=="top"||pos=="bottom"?pos:"middle"]}if(pos.constructor!=Array){pos=["center","middle"]}if(pos[0].constructor==Number){pLeft+=pos[0]}else{switch(pos[0]){case"left":pLeft+=0;break;case"right":pLeft+=wnd.width()-this.uiDialog.outerWidth();break;default:case"center":pLeft+=(wnd.width()-this.uiDialog.outerWidth())/2}}if(pos[1].constructor==Number){pTop+=pos[1]}else{switch(pos[1]){case"top":pTop+=0;break;case"bottom":pTop+=wnd.height()-this.uiDialog.outerHeight();break;default:case"middle":pTop+=(wnd.height()-this.uiDialog.outerHeight())/2}}pTop=Math.max(pTop,minTop);this.uiDialog.css({top:pTop,left:pLeft})},_setData:function(key,value){(setDataSwitch[key]&&this.uiDialog.data(setDataSwitch[key],value));switch(key){case"buttons":this._createButtons(value);break;case"closeText":this.uiDialogTitlebarCloseText.text(value);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(uiDialogClasses+value);break;case"draggable":(value?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(value);break;case"position":this._position(value);break;case"resizable":var uiDialog=this.uiDialog,isResizable=this.uiDialog.is(":data(resizable)");(isResizable&&!value&&uiDialog.resizable("destroy"));(isResizable&&typeof value=="string"&&uiDialog.resizable("option","handles",value));(isResizable||this._makeResizable(value));break;case"title":$(".ui-dialog-title",this.uiDialogTitlebar).html(value||"&nbsp;");break;case"width":this.uiDialog.width(value);break}$.widget.prototype._setData.apply(this,arguments)},_size:function(){var options=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var nonContentHeight=this.uiDialog.css({height:"auto",width:options.width}).height();this.element.css({minHeight:Math.max(options.minHeight-nonContentHeight,0),height:options.height=="auto"?"auto":Math.max(options.height-nonContentHeight,0)})}});$.extend($.ui.dialog,{version:"1.7",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function($el){return"ui-dialog-title-"+($el.attr("id")||++this.uuid)},overlay:function(dialog){this.$el=$.ui.dialog.overlay.create(dialog)}});$.extend($.ui.dialog.overlay,{instances:[],maxZ:0,events:$.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(event){return event+".dialog-overlay"}).join(" "),create:function(dialog){if(this.instances.length===0){setTimeout(function(){$(document).bind($.ui.dialog.overlay.events,function(event){var dialogZ=$(event.target).parents(".ui-dialog").css("zIndex")||0;return(dialogZ>$.ui.dialog.overlay.maxZ)})},1);$(document).bind("keydown.dialog-overlay",function(event){(dialog.options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&dialog.close(event))});$(window).bind("resize.dialog-overlay",$.ui.dialog.overlay.resize)}var $el=$("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(dialog.options.bgiframe&&$.fn.bgiframe&&$el.bgiframe());this.instances.push($el);return $el},destroy:function($el){this.instances.splice($.inArray(this.instances,$el),1);if(this.instances.length===0){$([document,window]).unbind(".dialog-overlay")}$el.remove()},height:function(){if($.browser.msie&&$.browser.version<7){var scrollHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var offsetHeight=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(scrollHeight<offsetHeight){return $(window).height()+"px"}else{return scrollHeight+"px"}}else{return $(document).height()+"px"}},width:function(){if($.browser.msie&&$.browser.version<7){var scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(scrollWidth<offsetWidth){return $(window).width()+"px"}else{return scrollWidth+"px"}}else{return $(document).width()+"px"}},resize:function(){var $overlays=$([]);$.each($.ui.dialog.overlay.instances,function(){$overlays=$overlays.add(this)});$overlays.css({width:0,height:0}).css({width:$.ui.dialog.overlay.width(),height:$.ui.dialog.overlay.height()})}});$.extend($.ui.dialog.overlay.prototype,{destroy:function(){$.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function($){$.widget("ui.draggable",$.extend({},$.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(event);if(!this.handle){return false}return true},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this._cacheHelperProportions();if($.ui.ddmanager){$.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt){this._adjustOffsetFromHelper(o.cursorAt)}if(o.containment){this._setContainment()}this._trigger("start",event);this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(event,true);return true},_mouseDrag:function(event,noPropagation){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();this._trigger("drag",event,ui);this.position=ui.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if($.ui.ddmanager){$.ui.ddmanager.drag(this,event)}return false},_mouseStop:function(event){var dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour){dropped=$.ui.ddmanager.drop(this,event)}if(this.dropped){dropped=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){var self=this;$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){self._trigger("stop",event);self._clear()})}else{this._trigger("stop",event);this._clear()}return false},_getHandle:function(event){var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;$(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==event.target){handle=true}});return handle},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event])):(o.helper=="clone"?this.element.clone():this.element);if(!helper.parents("body").length){helper.appendTo((o.appendTo=="parent"?this.element[0].parentNode:o.appendTo))}if(helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position"))){helper.css("position","absolute")}return helper},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined){this.offset.click.left=obj.left+this.margins.left}if(obj.right!=undefined){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left}if(obj.top!=undefined){this.offset.click.top=obj.top+this.margins.top}if(obj.bottom!=undefined){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&$.browser.msie)){po={top:0,left:0}}return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.element.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var o=this.options;if(o.containment=="parent"){o.containment=this.helper[0].parentNode}if(o.containment=="document"||o.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(o.containment)&&o.containment.constructor!=Array){var ce=$(o.containment)[0];if(!ce){return }var co=$(o.containment).offset();var over=($(ce).css("overflow")!="hidden");this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(o.containment.constructor==Array){this.containment=o.containment}}},_convertPositionTo:function(d,pos){if(!pos){pos=this.position}var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))}},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0]){pageX=this.containment[0]+this.offset.click.left}if(event.pageY-this.offset.click.top<this.containment[1]){pageY=this.containment[1]+this.offset.click.top}if(event.pageX-this.offset.click.left>this.containment[2]){pageX=this.containment[2]+this.offset.click.left}if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top}}if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left}}return{top:(pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(type,event,ui){ui=ui||this._uiHash();$.ui.plugin.call(this,type,[event,ui]);if(type=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return $.widget.prototype._trigger.call(this,type,event,ui)},plugins:{},_uiHash:function(event){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));$.extend($.ui.draggable,{version:"1.7",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui){var inst=$(this).data("draggable"),o=inst.options,uiSortable=$.extend({},ui,{item:inst.element});inst.sortables=[];$(o.connectToSortable).each(function(){var sortable=$.data(this,"sortable");if(sortable&&!sortable.options.disabled){inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable._refreshItems();sortable._trigger("activate",event,uiSortable)}})},stop:function(event,ui){var inst=$(this).data("draggable"),uiSortable=$.extend({},ui,{item:inst.element});$.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(event);this.instance.options.helper=this.instance.options._helper;if(inst.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",event,uiSortable)}})},drag:function(event,ui){var inst=$(this).data("draggable"),self=this;var checkPos=function(o){var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var helperTop=this.positionAbs.top,helperLeft=this.positionAbs.left;var itemHeight=o.height,itemWidth=o.width;var itemTop=o.top,itemLeft=o.left;return $.ui.isOver(helperTop+dyClick,helperLeft+dxClick,itemTop,itemLeft,itemHeight,itemWidth)};$.each(inst.sortables,function(i){this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click=inst.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=$(self).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return ui.helper[0]};event.target=this.instance.currentItem[0];this.instance._mouseCapture(event,true);this.instance._mouseStart(event,true,true);this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst._trigger("toSortable",event);inst.dropped=this.instance.element;inst.currentItem=inst.element;this.instance.fromOutside=inst}if(this.instance.currentItem){this.instance._mouseDrag(event)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",event,this.instance._uiHash(this.instance));this.instance._mouseStop(event,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}inst._trigger("fromSortable",event);inst.dropped=false}}})}});$.ui.plugin.add("draggable","cursor",{start:function(event,ui){var t=$("body"),o=$(this).data("draggable").options;if(t.css("cursor")){o._cursor=t.css("cursor")}t.css("cursor",o.cursor)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._cursor){$("body").css("cursor",o._cursor)}}});$.ui.plugin.add("draggable","iframeFix",{start:function(event,ui){var o=$(this).data("draggable").options;$(o.iframeFix===true?"iframe":o.iframeFix).each(function(){$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body")})},stop:function(event,ui){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});$.ui.plugin.add("draggable","opacity",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("opacity")){o._opacity=t.css("opacity")}t.css("opacity",o.opacity)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._opacity){$(ui.helper).css("opacity",o._opacity)}}});$.ui.plugin.add("draggable","scroll",{start:function(event,ui){var i=$(this).data("draggable");if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){i.overflowOffset=i.scrollParent.offset()}},drag:function(event,ui){var i=$(this).data("draggable"),o=i.options,scrolled=false;if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){if(!o.axis||o.axis!="x"){if((i.overflowOffset.top+i.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop+o.scrollSpeed}else{if(event.pageY-i.overflowOffset.top<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop-o.scrollSpeed}}}if(!o.axis||o.axis!="y"){if((i.overflowOffset.left+i.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft+o.scrollSpeed}else{if(event.pageX-i.overflowOffset.left<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft-o.scrollSpeed}}}}else{if(!o.axis||o.axis!="x"){if(event.pageY-$(document).scrollTop()<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed)}else{if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed)}}}if(!o.axis||o.axis!="y"){if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed)}else{if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed)}}}}if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(i,event)}}});$.ui.plugin.add("draggable","snap",{start:function(event,ui){var i=$(this).data("draggable"),o=i.options;i.snapElements=[];$(o.snap.constructor!=String?(o.snap.items||":data(draggable)"):o.snap).each(function(){var $t=$(this);var $o=$t.offset();if(this!=i.element[0]){i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left})}})},drag:function(event,ui){var inst=$(this).data("draggable"),o=inst.options;var d=o.snapTolerance;var x1=ui.offset.left,x2=x1+inst.helperProportions.width,y1=ui.offset.top,y2=y1+inst.helperProportions.height;for(var i=inst.snapElements.length-1;i>=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d)||(l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d)||(l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d)||(l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d))){if(inst.snapElements[i].snapping){(inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})))}inst.snapElements[i].snapping=false;continue}if(o.snapMode!="inner"){var ts=Math.abs(t-y2)<=d;var bs=Math.abs(b-y1)<=d;var ls=Math.abs(l-x2)<=d;var rs=Math.abs(r-x1)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top-inst.margins.top}if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top-inst.margins.top}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left-inst.margins.left}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r}).left-inst.margins.left}}var first=(ts||bs||ls||rs);if(o.snapMode!="outer"){var ts=Math.abs(t-y1)<=d;var bs=Math.abs(b-y2)<=d;var ls=Math.abs(l-x1)<=d;var rs=Math.abs(r-x2)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top-inst.margins.top}if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top-inst.margins.top}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left-inst.margins.left}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left-inst.margins.left}}if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first)){(inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})))}inst.snapElements[i].snapping=(ts||bs||ls||rs||first)}}});$.ui.plugin.add("draggable","stack",{start:function(event,ui){var o=$(this).data("draggable").options;var group=$.makeArray($(o.stack.group)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||o.stack.min)-(parseInt($(b).css("zIndex"),10)||o.stack.min)});$(group).each(function(i){this.style.zIndex=o.stack.min+i});this[0].style.zIndex=o.stack.min+group.length}});$.ui.plugin.add("draggable","zIndex",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("zIndex")){o._zIndex=t.css("zIndex")}t.css("zIndex",o.zIndex)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._zIndex){$(ui.helper).css("zIndex",o._zIndex)}}})})(jQuery);(function($){$.widget("ui.accordion",{_init:function(){var o=this.options,self=this;this.running=0;if(o.collapsible==$.ui.accordion.defaults.collapsible&&o.alwaysOpen!=$.ui.accordion.defaults.alwaysOpen){o.collapsible=!o.alwaysOpen}if(o.navigation){var current=this.element.find("a").filter(o.navigationFilter);if(current.length){if(current.filter(o.header).length){this.active=current}else{this.active=current.parent().parent().prev();current.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){$(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){$(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){$(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){$(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||o.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");$("<span/>").addClass("ui-icon "+o.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected);if($.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(event){return self._keydown(event)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!$.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(o.event){this.headers.bind((o.event)+".accordion",function(event){return self._clickHandler.call(self,event,this)})}},destroy:function(){var o=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var contents=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(o.autoHeight||o.fillHeight){contents.css("height","")}},_setData:function(key,value){if(key=="alwaysOpen"){key="collapsible";value=!value}$.widget.prototype._setData.apply(this,arguments)},_keydown:function(event){var o=this.options,keyCode=$.ui.keyCode;if(o.disabled||event.altKey||event.ctrlKey){return }var length=this.headers.length;var currentIndex=this.headers.index(event.target);var toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:return this._clickHandler({target:event.target},event.target)}if(toFocus){$(event.target).attr("tabIndex","-1");$(toFocus).attr("tabIndex","0");toFocus.focus();return false}return true},resize:function(){var o=this.options,maxHeight;if(o.fillSpace){if($.browser.msie){var defOverflow=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}maxHeight=this.element.parent().height();if($.browser.msie){this.element.parent().css("overflow",defOverflow)}this.headers.each(function(){maxHeight-=$(this).outerHeight()});var maxPadding=0;this.headers.next().each(function(){maxPadding=Math.max(maxPadding,$(this).innerHeight()-$(this).height())}).height(Math.max(0,maxHeight-maxPadding)).css("overflow","auto")}else{if(o.autoHeight){maxHeight=0;this.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).outerHeight())}).height(maxHeight)}}},activate:function(index){var active=this._findActive(index)[0];this._clickHandler({target:active},active)},_findActive:function(selector){return selector?typeof selector=="number"?this.headers.filter(":eq("+selector+")"):this.headers.not(this.headers.not(selector)):selector===false?$([]):this.headers.filter(":eq(0)")},_clickHandler:function(event,target){var o=this.options;if(o.disabled){return false}if(!event.target&&o.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");var toHide=this.active.next(),data={options:o,newHeader:$([]),oldHeader:o.active,newContent:$([]),oldContent:toHide},toShow=(this.active=$([]));this._toggle(toShow,toHide,data);return false}var clicked=$(event.currentTarget||target);var clickedIsActive=clicked[0]==this.active[0];if(this.running||(!o.collapsible&&clickedIsActive)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!clickedIsActive){clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected);clicked.next().addClass("ui-accordion-content-active")}var toShow=clicked.next(),toHide=this.active.next(),data={options:o,newHeader:clickedIsActive&&o.collapsible?$([]):clicked,oldHeader:this.active,newContent:clickedIsActive&&o.collapsible?$([]):toShow.find("> *"),oldContent:toHide.find("> *")},down=this.headers.index(this.active[0])>this.headers.index(clicked[0]);this.active=clickedIsActive?$([]):clicked;this._toggle(toShow,toHide,data,clickedIsActive,down);return false},_toggle:function(toShow,toHide,data,clickedIsActive,down){var o=this.options,self=this;this.toShow=toShow;this.toHide=toHide;this.data=data;var complete=function(){if(!self){return }return self._completed.apply(self,arguments)};this._trigger("changestart",null,this.data);this.running=toHide.size()===0?toShow.size():toHide.size();if(o.animated){var animOptions={};if(o.collapsible&&clickedIsActive){animOptions={toShow:$([]),toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace}}else{animOptions={toShow:toShow,toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace}}if(!o.proxied){o.proxied=o.animated}if(!o.proxiedDuration){o.proxiedDuration=o.duration}o.animated=$.isFunction(o.proxied)?o.proxied(animOptions):o.proxied;o.duration=$.isFunction(o.proxiedDuration)?o.proxiedDuration(animOptions):o.proxiedDuration;var animations=$.ui.accordion.animations,duration=o.duration,easing=o.animated;if(!animations[easing]){animations[easing]=function(options){this.slide(options,{easing:easing,duration:duration||700})}}animations[easing](animOptions)}else{if(o.collapsible&&clickedIsActive){toShow.toggle()}else{toHide.hide();toShow.show()}complete(true)}toHide.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();toShow.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(cancel){var o=this.options;this.running=cancel?0:--this.running;if(this.running){return }if(o.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});$.extend($.ui.accordion,{version:"1.7",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return }if(!options.toShow.size()){options.toHide.animate({height:"hide"},options);return }var overflow=options.toShow.css("overflow"),percentDone,showProps={},hideProps={},fxAttrs=["height","paddingTop","paddingBottom"],originalWidth;var s=options.toShow;originalWidth=s[0].style.width;s.width(parseInt(s.parent().width(),10)-parseInt(s.css("paddingLeft"),10)-parseInt(s.css("paddingRight"),10)-parseInt(s.css("borderLeftWidth"),10)-parseInt(s.css("borderRightWidth"),10));$.each(fxAttrs,function(i,prop){hideProps[prop]="hide";var parts=(""+$.css(options.toShow[0],prop)).match(/^([\d+-.]+)(.*)$/);showProps[prop]={value:parts[1],unit:parts[2]||"px"}});options.toShow.css({height:0,overflow:"hidden"}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{step:function(now,settings){if(settings.prop=="height"){percentDone=(settings.now-settings.start)/(settings.end-settings.start)}options.toShow[0].style[settings.prop]=(percentDone*showProps[settings.prop].value)+showProps[settings.prop].unit},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoHeight){options.toShow.css("height","")}options.toShow.css("width",originalWidth);options.toShow.css({overflow:overflow});options.complete()}})},bounceslide:function(options){this.slide(options,{easing:options.down?"easeOutBounce":"swing",duration:options.down?1000:200})},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700})}}})})(jQuery);(function($){$.widget("ui.slider",$.extend({},$.ui.mouse,{_init:function(){var self=this,o=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=$([]);if(o.range){if(o.range===true){this.range=$("<div></div>");if(!o.values){o.values=[this._valueMin(),this._valueMin()]}if(o.values.length&&o.values.length!=2){o.values=[o.values[0],o.values[0]]}}else{this.range=$("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(o.range=="min"||o.range=="max"){this.range.addClass("ui-slider-range-"+o.range)}this.range.addClass("ui-widget-header")}if($(".ui-slider-handle",this.element).length==0){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(o.values&&o.values.length){while($(".ui-slider-handle",this.element).length<o.values.length){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=$(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(event){event.preventDefault()}).hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(".ui-slider .ui-state-focus").removeClass("ui-state-focus");$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")});this.handles.each(function(i){$(this).data("index.ui-slider-handle",i)});this.handles.keydown(function(event){var ret=true;var index=$(this).data("index.ui-slider-handle");if(self.options.disabled){return }switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:ret=false;if(!self._keySliding){self._keySliding=true;$(this).addClass("ui-state-active");self._start(event,index)}break}var curVal,newVal,step=self._step();if(self.options.values&&self.options.values.length){curVal=newVal=self.values(index)}else{curVal=newVal=self.value()}switch(event.keyCode){case $.ui.keyCode.HOME:newVal=self._valueMin();break;case $.ui.keyCode.END:newVal=self._valueMax();break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal==self._valueMax()){return }newVal=curVal+step;break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal==self._valueMin()){return }newVal=curVal-step;break}self._slide(event,index,newVal);return ret}).keyup(function(event){var index=$(this).data("index.ui-slider-handle");if(self._keySliding){self._stop(event,index);self._change(event,index);self._keySliding=false;$(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(o.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);var distance=this._valueMax()+1,closestHandle;var self=this,index;this.handles.each(function(i){var thisDistance=Math.abs(normValue-self.values(i));if(distance>thisDistance){distance=thisDistance;closestHandle=$(this);index=i}});if(o.range==true&&this.values(1)==o.min){closestHandle=$(this.handles[++index])}this._start(event,index);self._handleIndex=index;closestHandle.addClass("ui-state-active").focus();var offset=closestHandle.offset();var mouseOverHandle=!$(event.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top-(closestHandle.height()/2)-(parseInt(closestHandle.css("borderTopWidth"),10)||0)-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+(parseInt(closestHandle.css("marginTop"),10)||0)};normValue=this._normValueFromMouse(position);this._slide(event,index,normValue);return true},_mouseStart:function(event){return true},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false},_mouseStop:function(event){this.handles.removeClass("ui-state-active");this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(position){var pixelTotal,pixelMouse;if("horizontal"==this.orientation){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1){percentMouse=1}if(percentMouse<0){percentMouse=0}if("vertical"==this.orientation){percentMouse=1-percentMouse}var valueTotal=this._valueMax()-this._valueMin(),valueMouse=percentMouse*valueTotal,valueMouseModStep=valueMouse%this.options.step,normValue=this._valueMin()+valueMouse-valueMouseModStep;if(valueMouseModStep>(this.options.step/2)){normValue+=this.options.step}return parseFloat(normValue.toFixed(5))},_start:function(event,index){this._trigger("start",event,this._uiHash(index))},_slide:function(event,index,newVal){var handle=this.handles[index];if(this.options.values&&this.options.values.length){var otherVal=this.values(index?0:1);if((index==0&&newVal>=otherVal)||(index==1&&newVal<=otherVal)){newVal=otherVal}if(newVal!=this.values(index)){var newValues=this.values();newValues[index]=newVal;var allowed=this._trigger("slide",event,this._uiHash(index,newVal,newValues));var otherVal=this.values(index?0:1);if(allowed!==false){this.values(index,newVal,(event.type=="mousedown"&&this.options.animate),true)}}}else{if(newVal!=this.value()){var allowed=this._trigger("slide",event,this._uiHash(index,newVal));if(allowed!==false){this._setData("value",newVal,(event.type=="mousedown"&&this.options.animate))}}}},_stop:function(event,index){this._trigger("stop",event,this._uiHash(index))},_change:function(event,index){this._trigger("change",event,this._uiHash(index))},value:function(newValue){if(arguments.length){this._setData("value",newValue);this._change(null,0)}return this._value()},values:function(index,newValue,animated,noPropagation){if(arguments.length>1){this.options.values[index]=newValue;this._refreshValue(animated);if(!noPropagation){this._change(null,index)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(index)}else{return this.value()}}else{return this._values()}},_setData:function(key,value,animated){$.widget.prototype._setData.apply(this,arguments);switch(key){case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(animated);break;case"value":this._refreshValue(animated);break}},_step:function(){var step=this.options.step;return step},_value:function(){var val=this.options.value;if(val<this._valueMin()){val=this._valueMin()}if(val>this._valueMax()){val=this._valueMax()}return val},_values:function(index){if(arguments.length){var val=this.options.values[index];if(val<this._valueMin()){val=this._valueMin()}if(val>this._valueMax()){val=this._valueMax()}return val}else{return this.options.values}},_valueMin:function(){var valueMin=this.options.min;return valueMin},_valueMax:function(){var valueMax=this.options.max;return valueMax},_refreshValue:function(animate){var oRange=this.options.range,o=this.options,self=this;if(this.options.values&&this.options.values.length){var vp0,vp1;this.handles.each(function(i,j){var valPercent=(self.values(i)-self._valueMin())/(self._valueMax()-self._valueMin())*100;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);if(self.options.range===true){if(self.orientation=="horizontal"){(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({width:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}else{(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({bottom:(valPercent)+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({height:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}}lastValPercent=valPercent})}else{var value=this.value(),valueMin=this._valueMin(),valueMax=this._valueMax(),valPercent=valueMax!=valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);(oRange=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="horizontal")&&this.range[animate?"animate":"css"]({width:(100-valPercent)+"%"},{queue:false,duration:o.animate});(oRange=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="vertical")&&this.range[animate?"animate":"css"]({height:(100-valPercent)+"%"},{queue:false,duration:o.animate})}},_uiHash:function(index,value,values){var multiple=this.options.values&&this.options.values.length;return{handle:this.handles[index],value:value||(multiple?this.values(index):this.value()),values:values||(multiple&&this.values())}}}));$.extend($.ui.slider,{getter:"value values",version:"1.7",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);fluid_1_1=fluid_1_1||{};(function($,fluid){var insertAnchor=function(el){var a=$("<a name='"+el.text()+"' />",el[0].ownerDocument);el.before(a)};var createNode=function(id){var node={ID:id,children:[]};return node};var createTree=function(headings,levels){var generateTree=function(nodes,items,level){if(items.length===0){return }var item=items[0];if(level===item.level){nodes[nodes.length-1].push(item.leaf);items.shift();return generateTree(nodes,items,level)}if(level<item.level){var prefix=level>-1?"level"+(level+1)+":":"";var postfix=level===-1?"s:":"s";var name=prefix+"level"+(level+2)+postfix;var myNode=createNode(name);nodes[nodes.length-1].push(myNode);nodes.push(myNode.children);return generateTree(nodes,items,level+1)}if(level>item.level){nodes.pop();return generateTree(nodes,items,level-1)}};var tree={children:[]};var items=fluid.transform(headings,function(heading){var level=$.inArray(heading.tagName,levels);var text=$(heading).text();return{level:level,leaf:{ID:"level"+(level+1)+":item",children:[{ID:"link",linktext:text,target:"#"+text}]}}});generateTree([tree.children],items,-1);return tree};var buildTOC=function(container,headings,levels,templateURL,afterRender){headings.each(function(i,el){insertAnchor($(el))});var resources={toc:{href:templateURL}};fluid.fetchResources(resources,function(){var templates=fluid.parseTemplates(resources,["toc"],{});var node=$("<div></div>",container[0].ownerDocument);fluid.reRender(templates,node,createTree(headings,levels),{});container.prepend(node);afterRender.fire(node)})};fluid.tableOfContents=function(container,options){var that=fluid.initView("fluid.tableOfContents",container,options);that.events.afterRender.addListener(function(node){that.tocNode=$(node)});buildTOC(that.container,that.locate("headings"),that.options.levels,that.options.templateUrl,that.events.afterRender);that.hide=function(){if(that.tocNode){that.tocNode.hide()}};that.show=function(){if(that.tocNode){that.tocNode.show()}};return that};fluid.defaults("fluid.tableOfContents",{selectors:{headings:":header"},events:{afterRender:null},templateUrl:"../html/TableOfContents.html",levels:["H1","H2","H3","H4","H5","H6"]})})(jQuery,fluid_1_1);if(!this.JSON){JSON=function(){function f(n){return n<10?"0"+n:n}Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function stringify(value,whitelist){var a,i,k,l,r=/["\\\x00-\x1f\x7f-\x9f]/g,v;switch(typeof value){case"string":return r.test(value)?'"'+value.replace(r,function(a){var c=m[a];if(c){return c}c=a.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"':'"'+value+'"';case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}if(typeof value.toJSON==="function"){return stringify(value.toJSON())}a=[];if(typeof value.length==="number"&&!(value.propertyIsEnumerable("length"))){l=value.length;for(i=0;i<l;i+=1){a.push(stringify(value[i],whitelist)||"null")}return"["+a.join(",")+"]"}if(whitelist){l=whitelist.length;for(i=0;i<l;i+=1){k=whitelist[i];if(typeof k==="string"){v=stringify(value[k],whitelist);if(v){a.push(stringify(k)+":"+v)}}}}else{for(k in value){if(typeof k==="string"){v=stringify(value[k],whitelist);if(v){a.push(stringify(k)+":"+v)}}}}return"{"+a.join(",")+"}"}}return{stringify:stringify,parse:function(text,filter){var j;function walk(k,v){var i,n;if(v&&typeof v==="object"){for(i in v){if(Object.prototype.hasOwnProperty.apply(v,[i])){n=walk(i,v[i]);if(n!==undefined){v[i]=n}}}}return filter(k,v)}if(/^[\],:{}\s]*$/.test(text.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof filter==="function"?walk("",j):j}throw new SyntaxError("parseJSON")}}}()}fluid_1_1=fluid_1_1||{};(function($,fluid){var replaceClass=function(container,selector,regExp,newVal){newVal=newVal||"";$(selector,container).andSelf().each(function(i){var attr=($.browser.msie===false)?"class":"className";if(this.getAttribute(attr)){this.setAttribute(attr,this.getAttribute(attr).replace(regExp,newVal))}})};var addClassForSetting=function(element,settingName,value,classnameMap){var settingValues=classnameMap[settingName]||{};var className=settingValues[value];if(className){element.addClass(className)}};var isTrue=function(val){return val&&(val===true||val==="true")};var setToc=function(that,tocSetting){if(isTrue(tocSetting)){if(that.tableOfContents){that.tableOfContents.show()}else{that.tableOfContents=fluid.initSubcomponent(that,"tableOfContents",[that.container,fluid.COMPONENT_OPTIONS])}}else{if(that.tableOfContents){that.tableOfContents.hide()}}};var setLineSpacing=function(container,spacing){spacing=spacing&&spacing>0?spacing:1;container.css("line-height",spacing+"em")};var setMinSize=function(container,size){if(size&&size>0){container.css("font-size",size+"pt");replaceClass(container,"[class*=fl-font-size-]",/\bfl-font-size-[0-9]{1,2}\s+/g,"fl-font-size-100")}else{container.css("font-size","")}};var addStyles=function(container,settings,classnameMap){addClassForSetting(container,"textFont",settings.textFont,classnameMap);addClassForSetting(container,"textSpacing",settings.textSpacing,classnameMap);addClassForSetting(container,"theme",settings.theme,classnameMap);addClassForSetting(container,"layout",settings.layout,classnameMap)};var styleElements=function(elements,setting,classname){if(setting){elements.addClass(classname)}else{elements.removeClass(classname)}};var styleLinks=function(container,settings,classnameMap){var links=$("a",container);styleElements(links,settings.linksUnderline,classnameMap.linksUnderline);styleElements(links,settings.linksBold,classnameMap.linksBold);styleElements(links,settings.linksLarger,classnameMap.linksLarger)};var styleInputs=function(container,settings,classnameMap){styleElements($("input",container),settings.inputsLarger,classnameMap.inputsLarger)};var initModel=function(that){if(that.options.savedSettings){that.model=that.options.savedSettings;return }that.model=that.settingsStore.fetch()||fluid.copy(that.defaultSiteSettings)};var clearClashingClasses=function(container,classnameMap){var settingsWhichMayClash=["textFont","textSpacing","theme","layout"];var classesToRemove="fl-noBackgroundImages";var selector=".fl-noBackgroundImages";for(var i=0;i<settingsWhichMayClash.length;i++){var settingValues=classnameMap[settingsWhichMayClash[i]];for(var val in settingValues){var classname=settingValues[val];if(classname){classesToRemove=classesToRemove+" "+classname;selector=selector+",."+classname}}}$(selector,container).removeClass(classesToRemove);return classesToRemove};var setupUIEnhancer=function(that){that.settingsStore=fluid.initSubcomponent(that,"settingsStore",[fluid.COMPONENT_OPTIONS]);initModel(that);that.refreshView()};fluid.uiEnhancer=function(doc,options){doc=doc||document;var that=fluid.initView("fluid.uiEnhancer",doc,options);$(doc).data("uiEnhancer",that);that.container=$("body",doc);that.defaultSiteSettings=that.options.defaultSiteSettings;var clashingClassnames;that.refreshView=function(){that.container.removeClass(clashingClassnames);addStyles(that.container,that.model,that.options.classnameMap);styleElements(that.container,!isTrue(that.model.backgroundImages),that.options.classnameMap.noBackgroundImages);setMinSize(that.container,that.model.textSize);setLineSpacing(that.container,that.model.lineSpacing);setToc(that,that.model.toc);styleLinks(that.container,that.model,that.options.classnameMap);styleInputs(that.container,that.model,that.options.classnameMap)};that.updateModel=function(newModel,source){that.events.modelChanged.fire(newModel,that.model,source);fluid.clear(that.model);fluid.model.copyModel(that.model,newModel);that.settingsStore.save(that.model);that.refreshView()};clashingClassnames=clearClashingClasses(that.container,that.options.classnameMap);setupUIEnhancer(that);return that};fluid.defaults("fluid.uiEnhancer",{tableOfContents:{type:"fluid.tableOfContents",options:{templateUrl:"../../tableOfContents/html/TableOfContents.html"}},settingsStore:{type:"fluid.uiEnhancer.cookieStore"},events:{modelChanged:null},classnameMap:{textFont:{serif:"fl-font-serif",sansSerif:"fl-font-sans",arial:"fl-font-arial",verdana:"fl-font-verdana",monospace:"fl-font-monospace",courier:"fl-font-courier",times:"fl-font-times"},textSpacing:{"default":"",wide0:"fl-font-spacing-0",wide1:"fl-font-spacing-1",wide2:"fl-font-spacing-2",wide3:"fl-font-spacing-3",wide4:"fl-font-spacing-4",wide5:"fl-font-spacing-5",wide6:"fl-font-spacing-6"},theme:{mist:"fl-theme-mist",rust:"fl-theme-rust",highContrast:"fl-theme-hc",highContrastInverted:"fl-theme-hci",lowContrast:"fl-theme-slate",mediumContrast:"fl-theme-coal","default":""},layout:{simple:"fl-layout-linear","default":""},noBackgroundImages:"fl-noBackgroundImages",linksUnderline:"fl-text-underline",linksBold:"fl-text-bold",linksLarger:"fl-text-larger",inputsLarger:"fl-text-larger"},defaultSiteSettings:{textFont:"",textSpacing:"",theme:"default",layout:"default",textSize:"",lineSpacing:"",backgroundImages:true,toc:false,linksUnderline:false,linksBold:false,linksLarger:false,inputsLarger:false}});fluid.uiEnhancer.cookieStore=function(options){var that={};fluid.mergeComponentOptions(that,"fluid.uiEnhancer.cookieStore",options);that.fetch=function(){var cookie=document.cookie;var cookiePrefix=that.options.cookieName+"=";var retObj,startIndex,endIndex;if(cookie.length>0){startIndex=cookie.indexOf(cookiePrefix);if(startIndex>-1){startIndex=startIndex+cookiePrefix.length;endIndex=cookie.indexOf(";",startIndex);if(endIndex<startIndex){endIndex=cookie.length}retObj=JSON.parse(decodeURIComponent(cookie.substring(startIndex,endIndex)))}}return retObj};that.save=function(settings){document.cookie=that.options.cookieName+"="+encodeURIComponent(JSON.stringify(settings))};return that};fluid.defaults("fluid.uiEnhancer.cookieStore",{cookieName:"fluid-ui-settings"});fluid.uiEnhancer.tempStore=function(options){var that={};that.model=null;that.fetch=function(){return that.model};that.save=function(settings){that.model=settings};return that}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var initSliderAria=function(thumb,opts){var ariaDefaults={role:"slider","aria-valuenow":opts.value,"aria-valuemin":opts.min,"aria-valuemax":opts.max};thumb.attr(ariaDefaults)};var initTextfieldSlider=function(that){var textfield=that.locate("textfield");textfield.val(that.model);var sliderOptions=that.options.sliderOptions;sliderOptions.value=that.model;sliderOptions.min=that.options.min;sliderOptions.max=that.options.max;var slider=that.locate("slider").slider(sliderOptions);initSliderAria(that.locate("thumb"),sliderOptions);textfield.change(function(){if(that.isValid(this.value)){if(!that.isInRange(this.value)){this.value=(this.value<that.min)?that.min:that.max}slider.slider("value",this.value);that.updateModel(this.value,this)}else{this.value=that.model}});textfield.keypress(function(evt){if(evt.keyCode!==$.ui.keyCode.ENTER){return true}else{$(evt.target).change();$(fluid.findForm(evt.target)).submit();return false}});slider.bind("slide",function(e,ui){textfield.val(ui.value);that.updateModel(ui.value,slider)})};fluid.textfieldSlider=function(container,options){var that=fluid.initView("fluid.textfieldSlider",container,options);that.model=that.options.value||that.locate("textfield").val();that.min=that.options.min;that.max=that.options.max;initTextfieldSlider(that);that.isInRange=function(value){return(value>=that.min&&value<=that.max)};that.isValid=function(value){return !(isNaN(parseInt(value,10))||isNaN(value))};that.updateModel=function(model,source){if(that.isInRange(model)){that.events.modelChanged.fire(model,that.model,source);that.model=model;that.locate("thumb").attr("aria-valuenow",that.model)}};return that};fluid.defaults("fluid.textfieldSlider",{selectors:{textfield:".flc-textfieldSlider-field",slider:".flc-textfieldSlider-slider",thumb:".ui-slider-handle"},events:{modelChanged:null},sliderOptions:{orientation:"horizontal"},min:0,max:100,value:null})})(jQuery,fluid_1_1);(function($,fluid){var createSelectNode=function(id,selection,list,names){return{ID:id,selection:{valuebinding:selection},optionlist:{valuebinding:list},optionnames:{valuebinding:names}}};var createSimpleBindingNode=function(id,binding){return{ID:id,valuebinding:binding}};var generateTree=function(that,rendererModel){var children=[];children.push(createSelectNode("text-font","selections.textFont","labelMap.textFont.values","labelMap.textFont.names"));children.push(createSelectNode("text-spacing","selections.textSpacing","labelMap.textSpacing.values","labelMap.textSpacing.names"));children.push(createSelectNode("theme","selections.theme","labelMap.theme.values","labelMap.theme.names"));var bgiExplodeOpts={selectID:"background-images",rowID:"background-images-row:",inputID:"background-images-choice",labelID:"background-images-label"};children.push(createSelectNode("background-images","selections.backgroundImages","labelMap.backgroundImages.values","labelMap.backgroundImages.names"));children=children.concat(fluid.explodeSelectionToInputs(that.options.controlValues.backgroundImages,bgiExplodeOpts));var layoutExplodeOpts={selectID:"layout",rowID:"layout-row:",inputID:"layout-choice",labelID:"layout-label"};children.push(createSelectNode("layout","selections.layout","labelMap.layout.values","labelMap.layout.names"));children=children.concat(fluid.explodeSelectionToInputs(that.options.controlValues.layout,layoutExplodeOpts));var tocExplodeOpts={selectID:"toc",rowID:"toc-row:",inputID:"toc-choice",labelID:"toc-label"};children.push(createSelectNode("toc","selections.toc","labelMap.toc.values","labelMap.toc.names"));children=children.concat(fluid.explodeSelectionToInputs(that.options.controlValues.layout,tocExplodeOpts));children.push(createSimpleBindingNode("links-underline","selections.linksUnderline"));children.push(createSimpleBindingNode("links-bold","selections.linksBold"));children.push(createSimpleBindingNode("links-larger","selections.linksLarger"));children.push(createSimpleBindingNode("inputs-larger","selections.inputsLarger"));return{children:children}};var bindHandlers=function(that){var saveButton=that.locate("save");saveButton.click(that.save);that.locate("reset").click(that.reset);that.locate("cancel").click(that.cancel);var form=fluid.findForm(saveButton);$(form).submit(function(){that.save()})};var initPreview=function(that){var previewFrame=that.locate("previewFrame");var previewEnhancer;that.events.modelChanged.addListener(function(model){setTimeout(function(){if(previewEnhancer){previewEnhancer.updateModel(model)}},0)});previewFrame.load(function(){var previewFrameContents=previewFrame.contents();var options={savedSettings:that.model,tableOfContents:that.uiEnhancer.options.tableOfContents,settingsStore:{type:"fluid.uiEnhancer.tempStore"}};previewEnhancer=fluid.uiEnhancer(previewFrameContents,options)})};var createLabelMap=function(options){var labelMap={};for(var item in options.controlValues){labelMap[item]={names:options.strings[item],values:options.controlValues[item]}}return labelMap};var createRenderOptions=function(that){that.model.toc=String(that.model.toc);that.model.backgroundImages=String(that.model.backgroundImages);var aggregateModel=fluid.assembleModel({selections:{model:that.model,applier:that.applier},labelMap:{model:createLabelMap(that.options)}});return{model:aggregateModel.model,applier:aggregateModel.applier,autoBind:true}};var initSliders=function(that){var createOptions=function(settingName){return{listeners:{modelChanged:function(value){that.applier.requestChange(settingName,value)}},value:that.model[settingName]}};var options=createOptions("textSize");fluid.merge(null,options,that.options.textMinSize.options);fluid.initSubcomponents(that,"textMinSize",[that.options.selectors.textMinSizeCtrl,options]);options=createOptions("lineSpacing");fluid.merge(null,options,that.options.lineSpacing.options);fluid.initSubcomponents(that,"lineSpacing",[that.options.selectors.lineSpacingCtrl,options])};var mergeSiteDefaults=function(options,siteDefaults){for(var settingName in options.controlValues){var setting=String(siteDefaults[settingName]);var settingValues=options.controlValues[settingName];if(setting){var index=$.inArray(setting,settingValues);if(index===-1){var defaultIndex=$.inArray("default",settingValues);if(defaultIndex===-1){settingValues.push(setting)}else{settingValues[defaultIndex]=setting}}}}};var setupUIOptions=function(that){that.applier.modelChanged.addListener("*",function(newModel,oldModel,changeRequest){that.events.modelChanged.fire(newModel,oldModel,changeRequest.source)});mergeSiteDefaults(that.options,that.uiEnhancer.defaultSiteSettings);that.events.afterRender.addListener(function(){initSliders(that);bindHandlers(that);initPreview(that)});var rendererOptions=createRenderOptions(that);var template=fluid.selfRender(that.container,generateTree(that,rendererOptions.model),rendererOptions);that.events.afterRender.fire();return template};fluid.uiOptions=function(container,options){var that=fluid.initView("fluid.uiOptions",container,options);that.uiEnhancer=$(document).data("uiEnhancer");that.model=fluid.copy(that.uiEnhancer.model);that.applier=fluid.makeChangeApplier(that.model);var savedModel=that.uiEnhancer.model;var template;that.save=function(){that.events.onSave.fire(that.model);savedModel=fluid.copy(that.model);that.uiEnhancer.updateModel(savedModel)};that.reset=function(){that.events.onReset.fire();that.updateModel(fluid.copy(that.uiEnhancer.defaultSiteSettings),that);that.refreshView()};that.cancel=function(){that.events.onCancel.fire();that.updateModel(fluid.copy(savedModel),that);that.refreshView()};that.refreshView=function(){var rendererOptions=createRenderOptions(that);fluid.reRender(template,that.container,generateTree(that,rendererOptions.model),rendererOptions);that.events.afterRender.fire()};that.updateModel=function(newModel,source){that.events.modelChanged.fire(newModel,that.model,source);fluid.clear(that.model);fluid.model.copyModel(that.model,newModel)};template=setupUIOptions(that);return that};fluid.defaults("fluid.uiOptions",{textMinSize:{type:"fluid.textfieldSlider",options:{min:6,max:30}},lineSpacing:{type:"fluid.textfieldSlider",options:{min:1,max:10}},selectors:{controls:".flc-uiOptions-control",textMinSizeCtrl:".flc-uiOptions-min-text-size",lineSpacingCtrl:".flc-uiOptions-line-spacing",cancel:".flc-uiOptions-cancel",reset:".flc-uiOptions-reset",save:".flc-uiOptions-save",previewFrame:".flc-uiOptions-preview-frame"},events:{modelChanged:null,onSave:null,onCancel:null,onReset:null,afterRender:null},strings:{textFont:["Serif","Sans-Serif","Arial","Verdana","Courier","Times"],textSpacing:["Regular","Wide","Wider","Widest"],theme:["Low Contrast","Medium Contrast","Medium Contrast Grey Scale","High Contrast","High Contrast Inverted"],backgroundImages:["Yes","No"],layout:["Yes","No"],toc:["Yes","No"]},controlValues:{textFont:["serif","sansSerif","arial","verdana","courier","times"],textSpacing:["default","wide1","wide2","wide3"],theme:["lowContrast","default","mediumContrast","highContrast","highContrastInverted"],backgroundImages:["true","false"],layout:["simple","default"],toc:["true","false"]}})})(jQuery,fluid_1_1);
+/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
+       Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
+       This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],objIdArr=[],listenersArr=[],script,timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7")}catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always"}catch(e){if(playerVersion[0]==6){fp6Crash=true}}if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX)}catch(e){}}}if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)]}}catch(e){}}}}var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u);
+/*@cc_on
+                       ie = true;
+                       @if (@_win32)
+                               windows = true;
+                       @elif (@_mac)
+                               mac = true;
+                       @end
+               @*/
+return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac}}();var onDomLoad=function(){if(!ua.w3cdom){return }addDomLoadEvent(main);if(ua.ie&&ua.win){try{doc.write("<script id=__ie_ondomload defer=true src=//:><\/script>");script=getElementById("__ie_ondomload");if(script){addListener(script,"onreadystatechange",checkReadyState)}}catch(e){}}if(ua.webkit&&typeof doc.readyState!=UNDEF){timer=setInterval(function(){if(/loaded|complete/.test(doc.readyState)){callDomLoadFunctions()}},10)}if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null)}addLoadEvent(callDomLoadFunctions)}();function checkReadyState(){if(script.readyState=="complete"){script.parentNode.removeChild(script);callDomLoadFunctions()}}function callDomLoadFunctions(){if(isDomLoaded){return }if(ua.ie&&ua.win){var s=createElement("span");try{var t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t)}catch(e){return }}isDomLoaded=true;if(timer){clearInterval(timer);timer=null}var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]()}}function addDomLoadEvent(fn){if(isDomLoaded){fn()}else{domLoadFnArr[domLoadFnArr.length]=fn}}function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false)}else{if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false)}else{if(typeof win.attachEvent!=UNDEF){addListener(win,"onload",fn)}else{if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn()}}else{win.onload=fn}}}}}function main(){var rl=regObjArr.length;for(var i=0;i<rl;i++){var id=regObjArr[i].id;if(ua.pv[0]>0){var obj=getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312){fixParams(obj)}setVisibility(id,true)}else{if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i])}else{displayAltContent(obj)}}}}else{setVisibility(id,true)}}}function fixParams(obj){var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i<al;i++){if(a[i].nodeName=="DATA"){e.setAttribute("src",a[i].nodeValue)}else{e.setAttribute(a[i].nodeName,a[i].nodeValue)}}}var c=nestedObj.childNodes;if(c){var cl=c.length;for(var j=0;j<cl;j++){if(c[j].nodeType==1&&c[j].nodeName=="PARAM"){e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"))}}}obj.parentNode.replaceChild(e,obj)}}function showExpressInstall(regObj){isExpressInstallActive=true;var obj=getElementById(regObj.id);if(obj){if(regObj.altContentId){var ac=getElementById(regObj.altContentId);if(ac){storedAltContent=ac;storedAltContentId=regObj.altContentId}}else{storedAltContent=abstractAltContent(obj)}if(!(/%$/.test(regObj.width))&&parseInt(regObj.width,10)<310){regObj.width="310"}if(!(/%$/.test(regObj.height))&&parseInt(regObj.height,10)<137){regObj.height="137"}doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",dt=doc.title,fv="MMredirectURL="+win.location+"&MMplayerType="+pt+"&MMdoctitle="+dt,replaceId=regObj.id;if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceId+="SWFObjectNew";newObj.setAttribute("id",replaceId);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addListener(win,"onload",fn)}createSWF({data:regObj.expressInstall,id:EXPRESS_INSTALL_ID,width:regObj.width,height:regObj.height},{flashvars:fv},replaceId)}}function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addListener(win,"onload",fn)}else{obj.parentNode.replaceChild(abstractAltContent(obj),obj)}}function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML}else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName=="PARAM")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true))}}}}}return ac}function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(el){if(typeof attObj.id==UNDEF){attObj.id=id}if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){parObj.movie=attObj[i]}else{if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"'}else{if(i.toLowerCase()!="classid"){att+=" "+i+'="'+attObj[i]+'"'}}}}}var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />'}}el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+">"+par+"</object>";objIdArr[objIdArr.length]=attObj.id;r=getElementById(attObj.id)}else{if(ua.webkit&&ua.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if(attObj[k]!=Object.prototype[k]){if(k.toLowerCase()=="data"){e.setAttribute("src",attObj[k])}else{if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj[k])}else{if(k.toLowerCase()!="classid"){e.setAttribute(k,attObj[k])}}}}}for(var l in parObj){if(parObj[l]!=Object.prototype[l]){if(l.toLowerCase()!="movie"){e.setAttribute(l,parObj[l])}}}el.parentNode.replaceChild(e,el);r=e}else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m])}else{if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj[m])}}}}for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,parObj[n])}}el.parentNode.replaceChild(o,el);r=o}}}return r}function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p)}function removeSWF(id){var obj=getElementById(id);if(obj&&(obj.nodeName=="OBJECT"||obj.nodeName=="EMBED")){if(ua.ie&&ua.win){if(obj.readyState==4){removeObjectInIE(id)}else{win.attachEvent("onload",function(){removeObjectInIE(id)})}}else{obj.parentNode.removeChild(obj)}}}function removeObjectInIE(id){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null}}obj.parentNode.removeChild(obj)}}function getElementById(id){var el=null;try{el=doc.getElementById(id)}catch(e){}return el}function createElement(el){return doc.createElement(el)}function addListener(target,eventType,fn){target.attachEvent(eventType,fn);listenersArr[listenersArr.length]=[target,eventType,fn]}function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false}function createCSS(sel,decl){if(ua.ie&&ua.mac){return }var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.createTextNode(sel+" {"+decl+"}"))}h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl)}}}function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded&&getElementById(id)){getElementById(id).style.visibility=v}else{createCSS("#"+id,"visibility:"+v)}}function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBadChars=regex.exec(s)!=null;return hasBadChars?encodeURIComponent(s):s}var cleanup=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var ll=listenersArr.length;for(var i=0;i<ll;i++){listenersArr[i][0].detachEvent(listenersArr[i][1],listenersArr[i][2])}var il=objIdArr.length;for(var j=0;j<il;j++){removeSWF(objIdArr[j])}for(var k in ua){ua[k]=null}ua=null;for(var l in swfobject){swfobject[l]=null}swfobject=null})}}();return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr){if(!ua.w3cdom||!objectIdStr||!swfVersionStr){return }var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr?xiSwfUrlStr:false;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false)},getObjectById:function(objectIdStr){var r=null;if(ua.w3cdom){var o=getElementById(objectIdStr);if(o){var n=o.getElementsByTagName(OBJECT)[0];if(!n||(n&&typeof o.SetVariable!=UNDEF)){r=o}else{if(typeof n.SetVariable!=UNDEF){r=n}}}}return r},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj){if(!ua.w3cdom||!swfUrlStr||!replaceElemIdStr||!widthStr||!heightStr||!swfVersionStr){return }widthStr+="";heightStr+="";if(hasPlayerVersion(swfVersionStr)){setVisibility(replaceElemIdStr,false);var att={};if(attObj&&typeof attObj===OBJECT){for(var i in attObj){if(attObj[i]!=Object.prototype[i]){att[i]=attObj[i]}}}att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par={};if(parObj&&typeof parObj===OBJECT){for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par[j]=parObj[j]}}}if(flashvarsObj&&typeof flashvarsObj===OBJECT){for(var k in flashvarsObj){if(flashvarsObj[k]!=Object.prototype[k]){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+k+"="+flashvarsObj[k]}else{par.flashvars=k+"="+flashvarsObj[k]}}}}addDomLoadEvent(function(){createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true)}})}else{if(xiSwfUrlStr&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){isExpressInstallActive=true;setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){var regObj={};regObj.id=regObj.altContentId=replaceElemIdStr;regObj.width=widthStr;regObj.height=heightStr;regObj.expressInstall=xiSwfUrlStr;showExpressInstall(regObj)})}}},getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]}},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3cdom){return createSWF(attObj,parObj,replaceElemIdStr)}else{return undefined}},removeSWF:function(objElemIdStr){if(ua.w3cdom){removeSWF(objElemIdStr)}},createCSS:function(sel,decl){if(ua.w3cdom){createCSS(sel,decl)}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(param==null){return urlEncodeIfNecessary(q)}if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(isExpressInstallActive&&storedAltContent){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block"}}storedAltContent=null;storedAltContentId=null;isExpressInstallActive=false}}}}}();var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(settings){this.initSWFUpload(settings)}}SWFUpload.prototype.initSWFUpload=function(settings){try{this.customSettings={};this.settings=settings;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(ex){delete SWFUpload.instances[this.movieName];throw ex}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 2009-03-25";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.completeURL=function(url){if(typeof (url)!=="string"||url.match(/^https?:\/\//i)||url.match(/^\//)){return url}var currentURL=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");var indexSlash=window.location.pathname.lastIndexOf("/");if(indexSlash<=0){path="/"}else{path=window.location.pathname.substr(0,indexSlash)+"/"}return path+url};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(settingName,defaultValue){this.settings[settingName]=(this.settings[settingName]==undefined)?defaultValue:this.settings[settingName]};this.ensureDefault("upload_url","");this.ensureDefault("preserve_relative_urls",false);this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",false);this.ensureDefault("requeue_on_error",false);this.ensureDefault("http_success",[]);this.ensureDefault("assume_success_timeout",0);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",true);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",false);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_placeholder",null);this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+new Date().getTime()}if(!this.settings.preserve_relative_urls){this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url)}delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){var targetElement,tempParent;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added"}targetElement=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;if(targetElement==undefined){throw"Could not find the placeholder element: "+this.settings.button_placeholder_id}tempParent=document.createElement("div");tempParent.innerHTML=this.getFlashHTML();targetElement.parentNode.replaceChild(tempParent.firstChild,targetElement);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement()}};SWFUpload.prototype.getFlashHTML=function(){return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.settings.flash_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload">','<param name="wmode" value="',this.settings.button_window_mode,'" />','<param name="movie" value="',this.settings.flash_url,'" />','<param name="quality" value="high" />','<param name="menu" value="false" />','<param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+this.getFlashVars()+'" />',"</object>"].join("")};SWFUpload.prototype.getFlashVars=function(){var paramString=this.buildParamString();var httpSuccessString=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;useQueryString=",encodeURIComponent(this.settings.use_query_string),"&amp;requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&amp;httpSuccess=",encodeURIComponent(httpSuccessString),"&amp;assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&amp;params=",encodeURIComponent(paramString),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),"&amp;fileTypes=",encodeURIComponent(this.settings.file_types),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&amp;fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonText=",encodeURIComponent(this.settings.button_text),"&amp;buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&amp;buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&amp;buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&amp;buttonAction=",encodeURIComponent(this.settings.button_action),"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&amp;buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("")};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName)}if(this.movieElement===null){throw"Could not find Flash element"}return this.movieElement};SWFUpload.prototype.buildParamString=function(){var postParams=this.settings.post_params;var paramStringPairs=[];if(typeof (postParams)==="object"){for(var name in postParams){if(postParams.hasOwnProperty(name)){paramStringPairs.push(encodeURIComponent(name.toString())+"="+encodeURIComponent(postParams[name].toString()))}}}return paramStringPairs.join("&amp;")};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var movieElement=null;movieElement=this.getMovieElement();if(movieElement&&typeof (movieElement.CallFunction)==="unknown"){for(var i in movieElement){try{if(typeof (movieElement[i])==="function"){movieElement[i]=null}}catch(ex1){}}try{movieElement.parentNode.removeChild(movieElement)}catch(ex){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true}catch(ex2){return false}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url:               ",this.settings.upload_url,"\n","\t","flash_url:                ",this.settings.flash_url,"\n","\t","use_query_string:         ",this.settings.use_query_string.toString(),"\n","\t","requeue_on_error:         ",this.settings.requeue_on_error.toString(),"\n","\t","http_success:             ",this.settings.http_success.join(", "),"\n","\t","assume_success_timeout:   ",this.settings.assume_success_timeout,"\n","\t","file_post_name:           ",this.settings.file_post_name,"\n","\t","post_params:              ",this.settings.post_params.toString(),"\n","\t","file_types:               ",this.settings.file_types,"\n","\t","file_types_description:   ",this.settings.file_types_description,"\n","\t","file_size_limit:          ",this.settings.file_size_limit,"\n","\t","file_upload_limit:        ",this.settings.file_upload_limit,"\n","\t","file_queue_limit:         ",this.settings.file_queue_limit,"\n","\t","debug:                    ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching:      ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id:    ",this.settings.button_placeholder_id.toString(),"\n","\t","button_placeholder:       ",(this.settings.button_placeholder?"Set":"Not Set"),"\n","\t","button_image_url:         ",this.settings.button_image_url.toString(),"\n","\t","button_width:             ",this.settings.button_width.toString(),"\n","\t","button_height:            ",this.settings.button_height.toString(),"\n","\t","button_text:              ",this.settings.button_text.toString(),"\n","\t","button_text_style:        ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding:  ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action:            ",this.settings.button_action.toString(),"\n","\t","button_disabled:          ",this.settings.button_disabled.toString(),"\n","\t","custom_settings:          ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned:  ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n","\t","file_queued_handler assigned:       ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","file_queue_error_handler assigned:  ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n","\t","upload_start_handler assigned:      ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned:   ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned:      ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned:    ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned:   ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","debug_handler assigned:             ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""))};SWFUpload.prototype.addSetting=function(name,value,default_value){if(value==undefined){return(this.settings[name]=default_value)}else{return(this.settings[name]=value)}};SWFUpload.prototype.getSetting=function(name){if(this.settings[name]!=undefined){return this.settings[name]}return""};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction('<invoke name="'+functionName+'" returntype="javascript">'+__flash__argumentsToXML(argumentArray,0)+"</invoke>");returnValue=eval(returnString)}catch(ex){throw"Call to "+functionName+" failed"}if(returnValue!=undefined&&typeof returnValue.post==="object"){returnValue=this.unescapeFilePostParams(returnValue)}return returnValue};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")};SWFUpload.prototype.startUpload=function(fileID){this.callFlash("StartUpload",[fileID])};SWFUpload.prototype.cancelUpload=function(fileID,triggerErrorEvent){if(triggerErrorEvent!==false){triggerErrorEvent=true}this.callFlash("CancelUpload",[fileID,triggerErrorEvent])};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")};SWFUpload.prototype.setStats=function(statsObject){this.callFlash("SetStats",[statsObject])};SWFUpload.prototype.getFile=function(fileID){if(typeof (fileID)==="number"){return this.callFlash("GetFileByIndex",[fileID])}else{return this.callFlash("GetFile",[fileID])}};SWFUpload.prototype.addFileParam=function(fileID,name,value){return this.callFlash("AddFileParam",[fileID,name,value])};SWFUpload.prototype.removeFileParam=function(fileID,name){this.callFlash("RemoveFileParam",[fileID,name])};SWFUpload.prototype.setUploadURL=function(url){this.settings.upload_url=url.toString();this.callFlash("SetUploadURL",[url])};SWFUpload.prototype.setPostParams=function(paramsObject){this.settings.post_params=paramsObject;this.callFlash("SetPostParams",[paramsObject])};SWFUpload.prototype.addPostParam=function(name,value){this.settings.post_params[name]=value;this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(name){delete this.settings.post_params[name];this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(types,description){this.settings.file_types=types;this.settings.file_types_description=description;this.callFlash("SetFileTypes",[types,description])};SWFUpload.prototype.setFileSizeLimit=function(fileSizeLimit){this.settings.file_size_limit=fileSizeLimit;this.callFlash("SetFileSizeLimit",[fileSizeLimit])};SWFUpload.prototype.setFileUploadLimit=function(fileUploadLimit){this.settings.file_upload_limit=fileUploadLimit;this.callFlash("SetFileUploadLimit",[fileUploadLimit])};SWFUpload.prototype.setFileQueueLimit=function(fileQueueLimit){this.settings.file_queue_limit=fileQueueLimit;this.callFlash("SetFileQueueLimit",[fileQueueLimit])};SWFUpload.prototype.setFilePostName=function(filePostName){this.settings.file_post_name=filePostName;this.callFlash("SetFilePostName",[filePostName])};SWFUpload.prototype.setUseQueryString=function(useQueryString){this.settings.use_query_string=useQueryString;this.callFlash("SetUseQueryString",[useQueryString])};SWFUpload.prototype.setRequeueOnError=function(requeueOnError){this.settings.requeue_on_error=requeueOnError;this.callFlash("SetRequeueOnError",[requeueOnError])};SWFUpload.prototype.setHTTPSuccess=function(http_status_codes){if(typeof http_status_codes==="string"){http_status_codes=http_status_codes.replace(" ","").split(",")}this.settings.http_success=http_status_codes;this.callFlash("SetHTTPSuccess",[http_status_codes])};SWFUpload.prototype.setAssumeSuccessTimeout=function(timeout_seconds){this.settings.assume_success_timeout=timeout_seconds;this.callFlash("SetAssumeSuccessTimeout",[timeout_seconds])};SWFUpload.prototype.setDebugEnabled=function(debugEnabled){this.settings.debug_enabled=debugEnabled;this.callFlash("SetDebugEnabled",[debugEnabled])};SWFUpload.prototype.setButtonImageURL=function(buttonImageURL){if(buttonImageURL==undefined){buttonImageURL=""}this.settings.button_image_url=buttonImageURL;this.callFlash("SetButtonImageURL",[buttonImageURL])};SWFUpload.prototype.setButtonDimensions=function(width,height){this.settings.button_width=width;this.settings.button_height=height;var movie=this.getMovieElement();if(movie!=undefined){movie.style.width=width+"px";movie.style.height=height+"px"}this.callFlash("SetButtonDimensions",[width,height])};SWFUpload.prototype.setButtonText=function(html){this.settings.button_text=html;this.callFlash("SetButtonText",[html])};SWFUpload.prototype.setButtonTextPadding=function(left,top){this.settings.button_text_top_padding=top;this.settings.button_text_left_padding=left;this.callFlash("SetButtonTextPadding",[left,top])};SWFUpload.prototype.setButtonTextStyle=function(css){this.settings.button_text_style=css;this.callFlash("SetButtonTextStyle",[css])};SWFUpload.prototype.setButtonDisabled=function(isDisabled){this.settings.button_disabled=isDisabled;this.callFlash("SetButtonDisabled",[isDisabled])};SWFUpload.prototype.setButtonAction=function(buttonAction){this.settings.button_action=buttonAction;this.callFlash("SetButtonAction",[buttonAction])};SWFUpload.prototype.setButtonCursor=function(cursor){this.settings.button_cursor=cursor;this.callFlash("SetButtonCursor",[cursor])};SWFUpload.prototype.queueEvent=function(handlerName,argumentArray){if(argumentArray==undefined){argumentArray=[]}else{if(!(argumentArray instanceof Array)){argumentArray=[argumentArray]}}var self=this;if(typeof this.settings[handlerName]==="function"){this.eventQueue.push(function(){this.settings[handlerName].apply(this,argumentArray)});setTimeout(function(){self.executeNextEvent()},0)}else{if(this.settings[handlerName]!==null){throw"Event handler "+handlerName+" is unknown or is not a function"}}};SWFUpload.prototype.executeNextEvent=function(){var f=this.eventQueue?this.eventQueue.shift():null;if(typeof (f)==="function"){f.apply(this)}};SWFUpload.prototype.unescapeFilePostParams=function(file){var reg=/[$]([0-9a-f]{4})/i;var unescapedPost={};var uk;if(file!=undefined){for(var k in file.post){if(file.post.hasOwnProperty(k)){uk=k;var match;while((match=reg.exec(uk))!==null){uk=uk.replace(match[0],String.fromCharCode(parseInt("0x"+match[1],16)))}unescapedPost[uk]=file.post[k]}}file.post=unescapedPost}return file};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface")}catch(ex){return false}};SWFUpload.prototype.flashReady=function(){var movieElement=this.getMovieElement();if(!movieElement){this.debug("Flash called back ready but the flash movie can't be found.");return }this.cleanUp(movieElement);this.queueEvent("swfupload_loaded_handler")};SWFUpload.prototype.cleanUp=function(movieElement){try{if(this.movieElement&&typeof (movieElement.CallFunction)==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var key in movieElement){try{if(typeof (movieElement[key])==="function"){movieElement[key]=null}}catch(ex){}}}}catch(ex1){}window.__flash__removeCallback=function(instance,name){try{if(instance){instance[name]=null}}catch(flashEx){}}};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")};SWFUpload.prototype.fileQueued=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("file_queued_handler",file)};SWFUpload.prototype.fileQueueError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("file_queue_error_handler",[file,errorCode,message])};SWFUpload.prototype.fileDialogComplete=function(numFilesSelected,numFilesQueued,numFilesInQueue){this.queueEvent("file_dialog_complete_handler",[numFilesSelected,numFilesQueued,numFilesInQueue])};SWFUpload.prototype.uploadStart=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("return_upload_start_handler",file)};SWFUpload.prototype.returnUploadStart=function(file){var returnValue;if(typeof this.settings.upload_start_handler==="function"){file=this.unescapeFilePostParams(file);returnValue=this.settings.upload_start_handler.call(this,file)}else{if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function"}}if(returnValue===undefined){returnValue=true}returnValue=!!returnValue;this.callFlash("ReturnUploadStart",[returnValue])};SWFUpload.prototype.uploadProgress=function(file,bytesComplete,bytesTotal){file=this.unescapeFilePostParams(file);this.queueEvent("upload_progress_handler",[file,bytesComplete,bytesTotal])};SWFUpload.prototype.uploadError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("upload_error_handler",[file,errorCode,message])};SWFUpload.prototype.uploadSuccess=function(file,serverData,responseReceived){file=this.unescapeFilePostParams(file);this.queueEvent("upload_success_handler",[file,serverData,responseReceived])};SWFUpload.prototype.uploadComplete=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("upload_complete_handler",file)};SWFUpload.prototype.debug=function(message){this.queueEvent("debug_handler",message)};SWFUpload.prototype.debugMessage=function(message){if(this.settings.debug){var exceptionMessage,exceptionValues=[];if(typeof message==="object"&&typeof message.name==="string"&&typeof message.message==="string"){for(var key in message){if(message.hasOwnProperty(key)){exceptionValues.push(key+": "+message[key])}}exceptionMessage=exceptionValues.join("\n")||"";exceptionValues=exceptionMessage.split("\n");exceptionMessage="EXCEPTION: "+exceptionValues.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(exceptionMessage)}else{SWFUpload.Console.writeLine(message)}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(message){var console,documentForm;try{console=document.getElementById("SWFUpload_Console");if(!console){documentForm=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(documentForm);console=document.createElement("textarea");console.id="SWFUpload_Console";console.style.fontFamily="monospace";console.setAttribute("wrap","off");console.wrap="off";console.style.overflow="auto";console.style.width="700px";console.style.height="350px";console.style.margin="5px";documentForm.appendChild(console)}console.value+=message+"\n";console.scrollTop=console.scrollHeight-console.clientHeight}catch(ex){alert("Exception: "+ex.name+" Message: "+ex.message)}};fluid_1_1=fluid_1_1||{};(function($,fluid){var animateDisplay=function(elm,animation,defaultAnimation){animation=(animation)?animation:defaultAnimation;elm.animate(animation.params,animation.duration,animation.callback)};var animateProgress=function(elm,width,speed){elm.queue("fx",[]);elm.animate({width:width,queue:false},speed)};var showProgress=function(that,animation){if(animation===false){that.displayElement.show()}else{animateDisplay(that.displayElement,animation,that.options.showAnimation)}};var hideProgress=function(that,delay,animation){delay=(delay===null||isNaN(delay))?that.options.delay:delay;if(delay){var timeOut=setTimeout(function(){hideProgress(that,0,animation)},delay)}else{if(animation===false){that.displayElement.hide()}else{animateDisplay(that.displayElement,animation,that.options.hideAnimation)}}};var updateWidth=function(that,newWidth,dontAnimate){dontAnimate=dontAnimate||false;var currWidth=that.indicator.width();var direction=that.options.animate;if((newWidth>currWidth)&&(direction==="both"||direction==="forward")&&!dontAnimate){animateProgress(that.indicator,newWidth,that.options.speed)}else{if((newWidth<currWidth)&&(direction==="both"||direction==="backward")&&!dontAnimate){animateProgress(that.indicator,newWidth,that.options.speed)}else{that.indicator.width(newWidth)}}};var percentToPixels=function(that,percent){return Math.round((Math.min(percent,100)*that.progressBar.width())/100)};var refreshRelativeWidth=function(that){var pixels=Math.max(percentToPixels(that,parseFloat(that.storedPercent)),that.options.minWidth);updateWidth(that,pixels,true)};var initARIA=function(ariaElement){ariaElement.attr("role","progressbar");ariaElement.attr("aria-valuemin","0");ariaElement.attr("aria-valuemax","100");ariaElement.attr("aria-live","assertive");ariaElement.attr("aria-busy","false");ariaElement.attr("aria-valuenow","0");ariaElement.attr("aria-valuetext","")};var updateARIA=function(that,percent){var busy=percent<100&&percent>0;that.ariaElement.attr("aria-busy",busy);that.ariaElement.attr("aria-valuenow",percent);if(busy){var busyString=fluid.stringTemplate(that.options.ariaBusyText,{percentComplete:percent});that.ariaElement.attr("aria-valuetext",busyString)}else{if(percent===100){that.ariaElement.attr("aria-valuetext",that.options.ariaDoneText)}}};var updateText=function(label,value){label.html(value)};var repositionIndicator=function(that){that.indicator.css("top",that.progressBar.position().top).css("left",0).height(that.progressBar.height());refreshRelativeWidth(that)};var updateProgress=function(that,percent,labelText,animationForShow){showProgress(that,animationForShow);if(percent!==null){that.storedPercent=percent;var pixels=Math.max(percentToPixels(that,parseFloat(percent)),that.options.minWidth);updateWidth(that,pixels)}if(labelText!==null){updateText(that.label,labelText)}if(that.ariaElement){updateARIA(that,percent)}};var setupProgress=function(that){that.displayElement=that.locate("displayElement");if(that.options.initiallyHidden){that.displayElement.hide()}that.progressBar=that.locate("progressBar");that.label=that.locate("label");that.indicator=that.locate("indicator");that.ariaElement=that.locate("ariaElement");that.indicator.width(that.options.minWidth);that.storedPercent=0;if(that.ariaElement){initARIA(that.ariaElement)}};fluid.progress=function(container,options){var that=fluid.initView("fluid.progress",container,options);setupProgress(that);that.show=function(animation){showProgress(that,animation)};that.hide=function(delay,animation){hideProgress(that,delay,animation)};that.update=function(percentage,labelValue,animationForShow){updateProgress(that,percentage,labelValue,animationForShow)};that.refreshView=function(){repositionIndicator(that)};return that};fluid.defaults("fluid.progress",{selectors:{displayElement:".flc-progress",progressBar:".flc-progress-bar",indicator:".flc-progress-indicator",label:".flc-progress-label",ariaElement:".flc-progress-bar"},showAnimation:{params:{opacity:"show"},duration:"slow",callback:null},hideAnimation:{params:{opacity:"hide"},duration:"slow",callback:null},minWidth:5,delay:0,speed:200,animate:"forward",initiallyHidden:true,updatePosition:false,ariaBusyText:"Progress is %percentComplete percent complete",ariaDoneText:"Progress is complete."})})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var updateProgress=function(file,events,demoState,isUploading){if(!isUploading){return }var chunk=Math.min(demoState.chunkSize,file.size);demoState.bytesUploaded=Math.min(demoState.bytesUploaded+chunk,file.size);events.onFileProgress.fire(file,demoState.bytesUploaded,file.size)};var fireAfterFileComplete=function(that,file){if(that.swfUploadSettings){that.swfUploadSettings.upload_complete_handler(file)}else{that.events.afterFileComplete.fire(file)}};var finishAndContinueOrCleanup=function(that,file){that.queueManager.finishFile(file);if(that.queueManager.shouldUploadNextFile()){startUploading(that)}else{that.queueManager.complete()}};var finishUploading=function(that){if(!that.queue.isUploading){return }var file=that.demoState.currentFile;file.filestatus=fluid.uploader.fileStatusConstants.COMPLETE;that.events.onFileSuccess.fire(file);that.demoState.fileIdx++;finishAndContinueOrCleanup(that,file)};var simulateUpload=function(that){if(!that.queue.isUploading){return }var file=that.demoState.currentFile;if(that.demoState.bytesUploaded<file.size){that.invokeAfterRandomDelay(function(){updateProgress(file,that.events,that.demoState,that.queue.isUploading);simulateUpload(that)})}else{finishUploading(that)}};var startUploading=function(that){that.demoState.currentFile=that.queue.files[that.demoState.fileIdx];that.demoState.chunksForCurrentFile=Math.ceil(that.demoState.currentFile/that.demoState.chunkSize);that.demoState.bytesUploaded=0;that.queue.isUploading=true;that.events.onFileStart.fire(that.demoState.currentFile);that.demoState.currentFile.filestatus=fluid.uploader.fileStatusConstants.IN_PROGRESS;simulateUpload(that)};var stopDemo=function(that){var file=that.demoState.currentFile;file.filestatus=fluid.uploader.fileStatusConstants.CANCELLED;that.queue.shouldStop=true;that.events.onFileError.fire(file,fluid.uploader.errorConstants.UPLOAD_STOPPED,"The demo upload was paused by the user.");finishAndContinueOrCleanup(that,file);that.events.onUploadStop.fire()};var setupDemoUploadManager=function(that){if(that.options.simulateDelay===undefined||that.options.simulateDelay===null){that.options.simulateDelay=true}that.demoState={fileIdx:0,chunkSize:200000};return that};fluid.demoUploadManager=function(uploadManager){var that=uploadManager;that.start=function(){that.queueManager.start();startUploading(that)};that.stop=function(){stopDemo(that)};that.invokeAfterRandomDelay=function(fn){var delay;if(that.options.simulateDelay){delay=Math.floor(Math.random()*1000+100);setTimeout(fn,delay)}else{fn()}};setupDemoUploadManager(that);return that}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var filterFiles=function(files,filterFn){var filteredFiles=[];for(var i=0;i<files.length;i++){var file=files[i];if(filterFn(file)===true){filteredFiles.push(file)}}return filteredFiles};var getUploadedFiles=function(that){return filterFiles(that.files,function(file){return(file.filestatus===fluid.uploader.fileStatusConstants.COMPLETE)})};var getReadyFiles=function(that){return filterFiles(that.files,function(file){return(file.filestatus===fluid.uploader.fileStatusConstants.QUEUED||file.filestatus===fluid.uploader.fileStatusConstants.CANCELLED)})};var getErroredFiles=function(that){return filterFiles(that.files,function(file){return(file.filestatus===fluid.uploader.fileStatusConstants.ERROR)})};var removeFile=function(that,file){var idx=$.inArray(file,that.files);that.files.splice(idx,1)};var clearCurrentBatch=function(that){that.currentBatch={fileIdx:-1,files:[],totalBytes:0,numFilesCompleted:0,numFilesErrored:0,bytesUploadedForFile:0,previousBytesUploadedForFile:0,totalBytesUploaded:0}};var updateCurrentBatch=function(that){var readyFiles=that.getReadyFiles();that.currentBatch.files=readyFiles;that.currentBatch.totalBytes=fluid.fileQueue.sizeOfFiles(readyFiles)};var setupCurrentBatch=function(that){clearCurrentBatch(that);updateCurrentBatch(that)};fluid.fileQueue=function(){var that={};that.files=[];that.isUploading=false;that.addFile=function(file){that.files.push(file)};that.removeFile=function(file){removeFile(that,file)};that.totalBytes=function(){return fluid.fileQueue.sizeOfFiles(that.files)};that.getReadyFiles=function(){return getReadyFiles(that)};that.getErroredFiles=function(){return getErroredFiles(that)};that.sizeOfReadyFiles=function(){return fluid.fileQueue.sizeOfFiles(that.getReadyFiles())};that.getUploadedFiles=function(){return getUploadedFiles(that)};that.sizeOfUploadedFiles=function(){return fluid.fileQueue.sizeOfFiles(that.getUploadedFiles())};that.setupCurrentBatch=function(){setupCurrentBatch(that)};that.clearCurrentBatch=function(){clearCurrentBatch(that)};that.updateCurrentBatch=function(){updateCurrentBatch(that)};return that};fluid.fileQueue.sizeOfFiles=function(files){var totalBytes=0;for(var i=0;i<files.length;i++){var file=files[i];totalBytes+=file.size}return totalBytes};fluid.fileQueue.manager=function(queue,events){var that={};that.queue=queue;that.events=events;that.start=function(){that.queue.setupCurrentBatch();that.queue.isUploading=true;that.queue.shouldStop=false;that.events.onUploadStart.fire(that.queue.currentBatch.files)};that.startFile=function(){that.queue.currentBatch.fileIdx++;that.queue.currentBatch.bytesUploadedForFile=0;that.queue.currentBatch.previousBytesUploadedForFile=0};that.finishFile=function(file){var batch=that.queue.currentBatch;batch.numFilesCompleted++;that.events.afterFileComplete.fire(file)};that.shouldUploadNextFile=function(){return !that.queue.shouldStop&&that.queue.isUploading&&that.queue.currentBatch.numFilesCompleted<that.queue.currentBatch.files.length};that.complete=function(){that.events.afterUploadComplete.fire(that.queue.currentBatch.files);that.queue.clearCurrentBatch()};return that}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var refreshView=function(that){var maxHeight=that.options.maxHeight;var isOverMaxHeight=(that.scrollingElm.children().eq(0).height()>maxHeight);var setHeight=(isOverMaxHeight)?maxHeight:"";that.scrollingElm.height(setHeight)};var scrollBottom=function(that){that.scrollingElm[0].scrollTop=that.scrollingElm[0].scrollHeight};var scrollTo=function(that,element){if(!element||element.length<1){return }var padTop=0;var padBottom=0;var elmPosTop=element[0].offsetTop;var elmHeight=element.height();var containerScrollTop=that.scrollingElm[0].scrollTop;var containerHeight=that.scrollingElm.height();if(that.options.padScroll){var prevElmHeight=element.prev().height();padTop=(prevElmHeight+elmHeight<=containerHeight)?prevElmHeight:0;var nextElmHeight=element.next().height();padBottom=(nextElmHeight+elmHeight<=containerHeight)?nextElmHeight:0}if((elmPosTop-padTop)<containerScrollTop){that.scrollingElm[0].scrollTop=elmPosTop-padTop}if(((elmPosTop+elmHeight)+padBottom)>(containerScrollTop+containerHeight)){elmHeight=(elmHeight<containerHeight)?elmHeight:containerHeight;that.scrollingElm[0].scrollTop=(elmPosTop-containerHeight+elmHeight+padBottom)}};var setupScroller=function(that){that.scrollingElm=that.container.parents(that.options.selectors.wrapper);if(!that.scrollingElm.length){fluid.fail({name:"Missing Scroller",message:"The scroller wrapper element was not found."})}if(!$.browser.msie||$.browser.version>6){that.scrollingElm.css("max-height",that.options.maxHeight)}};fluid.scroller=function(container,options){var that=fluid.initView("fluid.scroller",container,options);setupScroller(that);that.scrollTo=function(element){scrollTo(that,element)};that.scrollBottom=function(){scrollBottom(that)};that.refreshView=function(){if($.browser.msie&&$.browser.version<7){refreshView(that)}};that.refreshView();return that};fluid.defaults("fluid.scroller",{selectors:{wrapper:".flc-scroller"},maxHeight:180,padScroll:true})})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var unbindSelectFiles=function(){var emptyFunction=function(){};SWFUpload.prototype.selectFile=emptyFunction;SWFUpload.prototype.selectFiles=emptyFunction};var prepareUpstreamOptions=function(that,uploader){that.returnedOptions={uploadManager:{type:uploader.options.uploadManager.type||uploader.options.uploadManager}}};var createAfterReadyHandler=function(that,uploader){return function(){var flashMovie=$("#"+uploader.uploadManager.swfUploader.movieName,uploader.container);var browseButton=uploader.locate("browseButton");fluid.tabindex(flashMovie,0);flashMovie.attr("role","button");flashMovie.attr("alt","Browse files button");if(that.isTransparent){flashMovie.addClass(that.options.styles.browseButtonOverlay);flashMovie.css("top",browseButton.position().top);flashMovie.css("left",browseButton.position().left)}}};var createFlash9MovieContainer=function(){var container=$("<div class='fl-uploader-flash9-container'></div>");var placeholder=$("<span></span>");var placeholderId=fluid.allocateSimpleId(placeholder);container.append(placeholder);$("body").append(container);return placeholderId};var setupForFlash9=function(that,uploader){that.returnedOptions.uploadManager.options={flashURL:that.options.flash9URL||undefined,flashButtonPeerId:createFlash9MovieContainer()}};var createEmptyPlaceholder=function(){var placeholder=$("<span></span>");fluid.allocateSimpleId(placeholder);return placeholder};var createButtonPlaceholder=function(browseButton){var placeholder=$("<span></span>");var placeholderId=fluid.allocateSimpleId(placeholder);browseButton.before(placeholder);unbindSelectFiles();return placeholderId};var setupForFlash10=function(that,uploader){var browseButton=uploader.locate("browseButton");fluid.tabindex(browseButton,-1);that.isTransparent=that.options.flashButtonAlwaysVisible?false:(!$.browser.msie||that.options.transparentEvenInIE);var peerId=that.isTransparent?createButtonPlaceholder(browseButton):fluid.allocateSimpleId(browseButton);that.returnedOptions.uploadManager.options={flashURL:that.options.flash10URL||undefined,flashButtonImageURL:that.isTransparent?undefined:that.options.flashButtonImageURL,flashButtonPeerId:peerId,flashButtonHeight:that.isTransparent?browseButton.outerHeight():that.options.flashButtonHeight,flashButtonWidth:that.isTransparent?browseButton.outerWidth():that.options.flashButtonWidth,flashButtonWindowMode:that.isTransparent?SWFUpload.WINDOW_MODE.TRANSPARENT:SWFUpload.WINDOW_MODE.OPAQUE,flashButtonCursorEffect:SWFUpload.CURSOR.HAND,listeners:{afterReady:createAfterReadyHandler(that,uploader),onUploadStart:function(){uploader.uploadManager.swfUploader.setButtonDisabled(true)},afterUploadComplete:function(){uploader.uploadManager.swfUploader.setButtonDisabled(false)}}}};fluid.swfUploadSetupDecorator=function(uploader,options){var that={};fluid.mergeComponentOptions(that,"fluid.swfUploadSetupDecorator",options);that.flashVersion=swfobject.getFlashPlayerVersion().major;prepareUpstreamOptions(that,uploader);if(that.flashVersion===9){setupForFlash9(that,uploader)}else{setupForFlash10(that,uploader)}return that};fluid.defaults("fluid.swfUploadSetupDecorator",{flashButtonAlwaysVisible:true,transparentEvenInIE:false,flashButtonImageURL:"../images/browse.png",flashButtonHeight:22,flashButtonWidth:106,styles:{browseButtonOverlay:"fl-uploader-browse-overlay"}});var swfUploadOptionsMap={uploadURL:"upload_url",flashURL:"flash_url",postParams:"post_params",fileSizeLimit:"file_size_limit",fileTypes:"file_types",fileTypesDescription:"file_types_description",fileUploadLimit:"file_upload_limit",fileQueueLimit:"file_queue_limit",flashButtonPeerId:"button_placeholder_id",flashButtonImageURL:"button_image_url",flashButtonHeight:"button_height",flashButtonWidth:"button_width",flashButtonWindowMode:"button_window_mode",flashButtonCursorEffect:"button_cursor",debug:"debug"};var swfUploadEventMap={afterReady:"swfupload_loaded_handler",onFileDialog:"file_dialog_start_handler",afterFileQueued:"file_queued_handler",onQueueError:"file_queue_error_handler",afterFileDialog:"file_dialog_complete_handler",onFileStart:"upload_start_handler",onFileProgress:"upload_progress_handler",onFileError:"upload_error_handler",onFileSuccess:"upload_success_handler"};var mapNames=function(nameMap,source,target){var result=target||{};for(var key in source){var mappedKey=nameMap[key];if(mappedKey){result[mappedKey]=source[key]}}return result};var mapEvents=function(that,nameMap,target){var result=target||{};for(var eventType in that.events){var fireFn=that.events[eventType].fire;var mappedName=nameMap[eventType];if(mappedName){result[mappedName]=fireFn}}result.upload_complete_handler=function(file){that.queueManager.finishFile(file);if(that.queueManager.shouldUploadNextFile()){that.swfUploader.startUpload()}else{if(that.queueManager.queue.shouldStop){that.swfUploader.stopUpload()}that.queueManager.complete()}};return result};var browse=function(that){if(that.queue.isUploading){return }if(that.options.fileQueueLimit===1){that.swfUploader.selectFile()}else{that.swfUploader.selectFiles()}};var stopUpload=function(that){that.queue.shouldStop=true;that.events.onUploadStop.fire()};var bindEvents=function(that){var fileStatusUpdater=function(file){fluid.find(that.queue.files,function(potentialMatch){if(potentialMatch.id===file.id){potentialMatch.filestatus=file.filestatus;return true}})};that.events.afterFileQueued.addListener(function(file){that.queue.addFile(file)});that.events.onFileStart.addListener(function(file){that.queueManager.startFile();fileStatusUpdater(file)});that.events.onFileProgress.addListener(function(file,currentBytes,totalBytes){var currentBatch=that.queue.currentBatch;var byteIncrement=currentBytes-currentBatch.previousBytesUploadedForFile;currentBatch.totalBytesUploaded+=byteIncrement;currentBatch.bytesUploadedForFile+=byteIncrement;currentBatch.previousBytesUploadedForFile=currentBytes;fileStatusUpdater(file)});that.events.onFileError.addListener(function(file,error){if(error===fluid.uploader.errorConstants.UPLOAD_STOPPED){that.queue.isUploading=false}else{if(that.queue.isUploading){that.queue.currentBatch.totalBytesUploaded+=file.size;that.queue.currentBatch.numFilesErrored++}}fileStatusUpdater(file)});that.events.onFileSuccess.addListener(function(file){if(that.queue.currentBatch.bytesUploadedForFile===0){that.queue.currentBatch.totalBytesUploaded+=file.size}fileStatusUpdater(file)});that.events.afterUploadComplete.addListener(function(){that.queue.isUploading=false})};var removeFile=function(that,file){that.queue.removeFile(file);that.swfUploader.cancelUpload(file.id);that.events.afterFileRemoved.fire(file)};var setupSwfUploadManager=function(that,events){that.events=events;that.queue=fluid.fileQueue();that.queueManager=fluid.fileQueue.manager(that.queue,that.events);that.swfUploadSettings=mapNames(swfUploadOptionsMap,that.options);mapEvents(that,swfUploadEventMap,that.swfUploadSettings);that.swfUploader=new SWFUpload(that.swfUploadSettings);bindEvents(that)};fluid.swfUploadManager=function(events,options){var that={};fluid.mergeComponentOptions(that,"fluid.swfUploadManager",options);fluid.mergeListeners(events,that.options.listeners);that.browseForFiles=function(){browse(that)};that.removeFile=function(file){removeFile(that,file)};that.start=function(){that.queueManager.start();that.swfUploader.startUpload()};that.stop=function(){stopUpload(that)};setupSwfUploadManager(that,events);return that};fluid.defaults("fluid.swfUploadManager",{uploadURL:"",flashURL:"../../../lib/swfupload/flash/swfupload.swf",flashButtonPeerId:"",postParams:{},fileSizeLimit:"20480",fileTypes:"*",fileTypesDescription:null,fileUploadLimit:0,fileQueueLimit:0,debug:false})})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var rowForFile=function(that,file){return that.locate("fileQueue").find("#"+file.id)};var errorRowForFile=function(that,file){return $("#"+file.id+"_error",that.container)};var fileForRow=function(that,row){var files=that.uploadManager.queue.files;for(var i=0;i<files.length;i++){var file=files[i];if(file.id.toString()===row.attr("id")){return file}}return null};var progressorForFile=function(that,file){var progressId=file.id+"_progress";return that.fileProgressors[progressId]};var startFileProgress=function(that,file){var fileRowElm=rowForFile(that,file);that.scroller.scrollTo(fileRowElm);var fileProgressor=progressorForFile(that,file);fileProgressor.refreshView();fileProgressor.show()};var updateFileProgress=function(that,file,fileBytesComplete,fileTotalBytes){var filePercent=fluid.uploader.derivePercent(fileBytesComplete,fileTotalBytes);var filePercentStr=filePercent+"%";progressorForFile(that,file).update(filePercent,filePercentStr)};var hideFileProgress=function(that,file){var fileRowElm=rowForFile(that,file);progressorForFile(that,file).hide();if(file.filestatus===fluid.uploader.fileStatusConstants.COMPLETE){that.locate("fileIconBtn",fileRowElm).removeClass(that.options.styles.dim)}};var removeFileProgress=function(that,file){var fileProgressor=progressorForFile(that,file);if(!fileProgressor){return }var rowProgressor=fileProgressor.displayElement;rowProgressor.remove()};var animateRowRemoval=function(that,row){row.fadeOut("fast",function(){row.remove();that.refreshView()})};var removeFileErrorRow=function(that,file){if(file.filestatus===fluid.uploader.fileStatusConstants.ERROR){animateRowRemoval(that,errorRowForFile(that,file))}};var removeFileAndRow=function(that,file,row){removeFileProgress(that,file);removeFileErrorRow(that,file);that.uploadManager.removeFile(file);animateRowRemoval(that,row)};var removeFileForRow=function(that,row){var file=fileForRow(that,row);if(!file||file.filestatus===fluid.uploader.fileStatusConstants.COMPLETE){return }removeFileAndRow(that,file,row)};var removeRowForFile=function(that,file){var row=rowForFile(that,file);removeFileAndRow(that,file,row)};var bindHover=function(row,styles){var over=function(){if(row.hasClass(styles.ready)&&!row.hasClass(styles.uploading)){row.addClass(styles.hover)}};var out=function(){if(row.hasClass(styles.ready)&&!row.hasClass(styles.uploading)){row.removeClass(styles.hover)}};row.hover(over,out)};var bindDeleteKey=function(that,row){var deleteHandler=function(){removeFileForRow(that,row)};fluid.activatable(row,null,{additionalBindings:[{key:$.ui.keyCode.DELETE,activateHandler:deleteHandler}]})};var bindRowHandlers=function(that,row){if($.browser.msie&&$.browser.version<7){bindHover(row,that.options.styles)}that.locate("fileIconBtn",row).click(function(){removeFileForRow(that,row)});bindDeleteKey(that,row)};var renderRowFromTemplate=function(that,file){var row=that.rowTemplate.clone();that.locate("fileName",row).text(file.name);that.locate("fileSize",row).text(fluid.uploader.formatFileSize(file.size));that.locate("fileIconBtn",row).addClass(that.options.styles.remove);row.attr("id",file.id);row.addClass(that.options.styles.ready);bindRowHandlers(that,row);return row};var createProgressorFromTemplate=function(that,row){var rowProgressor=that.rowProgressorTemplate.clone();var rowId=row.attr("id");var progressId=rowId+"_progress";rowProgressor.attr("id",progressId);rowProgressor.css("top",row.position().top);rowProgressor.height(row.height()).width(5);that.container.after(rowProgressor);that.fileProgressors[progressId]=fluid.progress(that.uploadContainer,{selectors:{progressBar:"#"+rowId,displayElement:"#"+progressId,label:"#"+progressId+" .fl-uploader-file-progress-text",indicator:"#"+progressId}})};var addFile=function(that,file){var row=renderRowFromTemplate(that,file);if(!($.browser.msie&&($.browser.version>=8))){row.hide()}that.container.append(row);row.fadeIn("slow");that.scroller.scrollBottom();createProgressorFromTemplate(that,row);that.refreshView()};var prepareForUpload=function(that){var rowButtons=that.locate("fileIconBtn",that.locate("fileRows"));rowButtons.attr("disabled","disabled");rowButtons.addClass(that.options.styles.dim)};var refreshAfterUpload=function(that){var rowButtons=that.locate("fileIconBtn",that.locate("fileRows"));rowButtons.removeAttr("disabled");rowButtons.removeClass(that.options.styles.dim)};var changeRowState=function(that,row,newState){row.removeClass(that.options.styles.ready).removeClass(that.options.styles.error).addClass(newState)};var markRowAsComplete=function(that,file){var row=rowForFile(that,file);changeRowState(that,row,that.options.styles.uploaded);row.attr("title",that.options.strings.status.success);fluid.enabled(row,false);var removeRowBtn=that.locate("fileIconBtn",row);removeRowBtn.unbind("click");removeRowBtn.removeClass(that.options.styles.remove);removeRowBtn.attr("title",that.options.strings.status.success)};var renderErrorInfoRowFromTemplate=function(that,fileRow,error){var errorRow=that.errorInfoRowTemplate.clone();errorRow.attr("id",fileRow.attr("id")+"_error");var errorType=fluid.keyForValue(fluid.uploader.errorConstants,error);var errorMsg=that.options.strings.errors[errorType];that.locate("errorText",errorRow).text(errorMsg);fileRow.after(errorRow);that.scroller.scrollTo(errorRow)};var showErrorForFile=function(that,file,error){hideFileProgress(that,file);if(file.filestatus===fluid.uploader.fileStatusConstants.ERROR){var fileRowElm=rowForFile(that,file);changeRowState(that,fileRowElm,that.options.styles.error);renderErrorInfoRowFromTemplate(that,fileRowElm,error)}};var bindModelEvents=function(that){that.returnedOptions={listeners:{afterFileQueued:that.addFile,onUploadStart:that.prepareForUpload,onFileStart:that.showFileProgress,onFileProgress:that.updateFileProgress,onFileSuccess:that.markFileComplete,onFileError:that.showErrorForFile,afterFileComplete:that.hideFileProgress,afterUploadComplete:that.refreshAfterUpload}}};var addKeyboardNavigation=function(that){fluid.tabbable(that.container);that.selectableContext=fluid.selectable(that.container,{selectableSelector:that.options.selectors.fileRows,onSelect:function(itemToSelect){$(itemToSelect).addClass(that.options.styles.selected)},onUnselect:function(selectedItem){$(selectedItem).removeClass(that.options.styles.selected)}})};var prepareTemplateElements=function(that){that.rowTemplate=that.locate("rowTemplate").remove();if($.browser.msie&&($.browser.version>=8)){that.rowTemplate.removeClass(that.options.styles.hiddenTemplate)}that.errorInfoRowTemplate=that.locate("errorInfoRowTemplate").remove();that.errorInfoRowTemplate.removeClass(that.options.styles.hiddenTemplate);that.rowProgressorTemplate=that.locate("rowProgressorTemplate",that.uploadContainer).remove()};var setupFileQueue=function(that,uploadManager){that.uploadManager=uploadManager;that.scroller=fluid.scroller(that.container);prepareTemplateElements(that);addKeyboardNavigation(that);bindModelEvents(that)};fluid.fileQueueView=function(container,parentContainer,uploadManager,options){var that=fluid.initView("fluid.fileQueueView",container,options);that.uploadContainer=parentContainer;that.fileProgressors={};that.addFile=function(file){addFile(that,file)};that.removeFile=function(file){removeRowForFile(that,file)};that.prepareForUpload=function(){prepareForUpload(that)};that.refreshAfterUpload=function(){refreshAfterUpload(that)};that.showFileProgress=function(file){startFileProgress(that,file)};that.updateFileProgress=function(file,fileBytesComplete,fileTotalBytes){updateFileProgress(that,file,fileBytesComplete,fileTotalBytes)};that.markFileComplete=function(file){progressorForFile(that,file).update(100,"100%");markRowAsComplete(that,file)};that.showErrorForFile=function(file,error){showErrorForFile(that,file,error)};that.hideFileProgress=function(file){hideFileProgress(that,file)};that.refreshView=function(){that.scroller.refreshView();that.selectableContext.refresh()};setupFileQueue(that,uploadManager);return that};fluid.defaults("fluid.fileQueueView",{selectors:{fileRows:".flc-uploader-file",fileName:".flc-uploader-file-name",fileSize:".flc-uploader-file-size",fileIconBtn:".flc-uploader-file-action",errorText:".flc-uploader-file-error",rowTemplate:".flc-uploader-file-tmplt",errorInfoRowTemplate:".flc-uploader-file-error-tmplt",rowProgressorTemplate:".flc-uploader-file-progressor-tmplt"},styles:{hover:"fl-uploader-file-hover",selected:"fl-uploader-file-focus",ready:"fl-uploader-file-state-ready",uploading:"fl-uploader-file-state-uploading",uploaded:"fl-uploader-file-state-uploaded",error:"fl-uploader-file-state-error",remove:"fl-uploader-file-action-remove",dim:"fl-uploader-dim",hiddenTemplate:"fl-uploader-hidden-templates"},strings:{progress:{toUploadLabel:"To upload: %fileCount %fileLabel (%totalBytes)",singleFile:"file",pluralFiles:"files"},status:{success:"File Uploaded",error:"File Upload Error"},errors:{HTTP_ERROR:"File upload error: a network error occured or the file was rejected (reason unknown).",IO_ERROR:"File upload error: a network error occured.",UPLOAD_LIMIT_EXCEEDED:"File upload error: you have uploaded as many files as you are allowed during this session",UPLOAD_FAILED:"File upload error: the upload failed for an unknown reason.",QUEUE_LIMIT_EXCEEDED:"You have as many files in the queue as can be added at one time. Removing files from the queue may allow you to add different files.",FILE_EXCEEDS_SIZE_LIMIT:"One or more of the files that you attempted to add to the queue exceeded the limit of %fileSizeLimit.",ZERO_BYTE_FILE:"One or more of the files that you attempted to add contained no data.",INVALID_FILETYPE:"One or more files were not added to the queue because they were of the wrong type."}}})})(jQuery,fluid_1_1);(function($,fluid){var fileOrFiles=function(that,numFiles){return(numFiles===1)?that.options.strings.progress.singleFile:that.options.strings.progress.pluralFiles};var enableElement=function(that,elm){elm.removeAttr("disabled");elm.removeClass(that.options.styles.dim)};var disableElement=function(that,elm){elm.attr("disabled","disabled");elm.addClass(that.options.styles.dim)};var showElement=function(that,elm){elm.removeClass(that.options.styles.hidden)};var hideElement=function(that,elm){elm.addClass(that.options.styles.hidden)};var setTotalProgressStyle=function(that,didError){didError=didError||false;var indicator=that.totalProgress.indicator;indicator.toggleClass(that.options.styles.totalProgress,!didError);indicator.toggleClass(that.options.styles.totalProgressError,didError)};var setStateEmpty=function(that){disableElement(that,that.locate("uploadButton"));if(that.uploadManager.queue.files.length===0){that.locate("browseButton").text(that.options.strings.buttons.browse);showElement(that,that.locate("instructions"))}};var setStateDone=function(that){disableElement(that,that.locate("uploadButton"));enableElement(that,that.locate("browseButton"));hideElement(that,that.locate("pauseButton"));showElement(that,that.locate("uploadButton"))};var setStateLoaded=function(that){that.locate("browseButton").text(that.options.strings.buttons.addMore);hideElement(that,that.locate("pauseButton"));showElement(that,that.locate("uploadButton"));enableElement(that,that.locate("uploadButton"));enableElement(that,that.locate("browseButton"));hideElement(that,that.locate("instructions"));that.totalProgress.hide()};var setStateUploading=function(that){that.totalProgress.hide(false,false);setTotalProgressStyle(that);hideElement(that,that.locate("uploadButton"));disableElement(that,that.locate("browseButton"));enableElement(that,that.locate("pauseButton"));showElement(that,that.locate("pauseButton"));that.locate(that.options.focusWithEvent.afterUploadStart).focus()};var renderUploadTotalMessage=function(that){var numReadyFiles=that.uploadManager.queue.getReadyFiles().length;var bytesReadyFiles=that.uploadManager.queue.sizeOfReadyFiles();var fileLabelStr=fileOrFiles(that,numReadyFiles);var totalStateStr=fluid.stringTemplate(that.options.strings.progress.toUploadLabel,{fileCount:numReadyFiles,fileLabel:fileLabelStr,totalBytes:fluid.uploader.formatFileSize(bytesReadyFiles)});that.locate("totalFileStatusText").html(totalStateStr)};var updateTotalProgress=function(that){var batch=that.uploadManager.queue.currentBatch;var totalPercent=fluid.uploader.derivePercent(batch.totalBytesUploaded,batch.totalBytes);var numFilesInBatch=batch.files.length;var fileLabelStr=fileOrFiles(that,numFilesInBatch);var totalProgressStr=fluid.stringTemplate(that.options.strings.progress.totalProgressLabel,{curFileN:batch.fileIdx+1,totalFilesN:numFilesInBatch,fileLabel:fileLabelStr,currBytes:fluid.uploader.formatFileSize(batch.totalBytesUploaded),totalBytes:fluid.uploader.formatFileSize(batch.totalBytes)});that.totalProgress.update(totalPercent,totalProgressStr)};var updateTotalAtCompletion=function(that){var numErroredFiles=that.uploadManager.queue.getErroredFiles().length;var numTotalFiles=that.uploadManager.queue.files.length;var fileLabelStr=fileOrFiles(that,numTotalFiles);var errorStr="";if(numErroredFiles>0){var errorLabelString=(numErroredFiles===1)?that.options.strings.progress.singleError:that.options.strings.progress.pluralErrors;setTotalProgressStyle(that,true);errorStr=fluid.stringTemplate(that.options.strings.progress.numberOfErrors,{errorsN:numErroredFiles,errorLabel:errorLabelString})}var totalProgressStr=fluid.stringTemplate(that.options.strings.progress.completedLabel,{curFileN:that.uploadManager.queue.getUploadedFiles().length,totalFilesN:numTotalFiles,errorString:errorStr,fileLabel:fileLabelStr,totalCurrBytes:fluid.uploader.formatFileSize(that.uploadManager.queue.sizeOfUploadedFiles())});that.totalProgress.update(100,totalProgressStr)};var bindDOMEvents=function(that){that.locate("browseButton").click(function(evnt){that.uploadManager.browseForFiles();evnt.preventDefault()});that.locate("uploadButton").click(function(){that.uploadManager.start()});that.locate("pauseButton").click(function(){that.uploadManager.stop()})};var updateStateAfterFileDialog=function(that){if(that.uploadManager.queue.getReadyFiles().length>0){setStateLoaded(that);renderUploadTotalMessage(that);that.locate(that.options.focusWithEvent.afterFileDialog).focus()}};var updateStateAfterFileRemoval=function(that){if(that.uploadManager.queue.getReadyFiles().length===0){setStateEmpty(that)}renderUploadTotalMessage(that)};var updateStateAfterPause=function(that){};var updateStateAfterCompletion=function(that){var userPaused=that.uploadManager.queue.shouldStop;if(that.uploadManager.queue.getReadyFiles().length===0){setStateDone(that)}else{setStateLoaded(that)}updateTotalAtCompletion(that)};var bindModelEvents=function(that){that.events.afterFileDialog.addListener(function(){updateStateAfterFileDialog(that)});that.events.afterFileRemoved.addListener(function(){updateStateAfterFileRemoval(that)});that.events.onUploadStart.addListener(function(){setStateUploading(that)});that.events.onUploadStop.addListener(function(){that.locate(that.options.focusWithEvent.afterUploadStop).focus()});that.events.onFileProgress.addListener(function(){updateTotalProgress(that)});that.events.onFileSuccess.addListener(function(){updateTotalProgress(that)});that.events.onFileError.addListener(function(file,error,message){if(error===fluid.uploader.errorConstants.UPLOAD_STOPPED){updateStateAfterPause(that)}});that.events.afterUploadComplete.addListener(function(){updateStateAfterCompletion(that)})};var initUploadManager=function(that){var manager=fluid.initSubcomponent(that,"uploadManager",[that.events,fluid.COMPONENT_OPTIONS]);return that.options.demo?fluid.demoUploadManager(manager):manager};var setupUploader=function(that){that.decorators=fluid.initSubcomponents(that,"decorators",[that,fluid.COMPONENT_OPTIONS]);that.uploadManager=initUploadManager(that);that.fileQueueView=fluid.initSubcomponent(that,"fileQueueView",[that.locate("fileQueue"),that.container,that.uploadManager,fluid.COMPONENT_OPTIONS]);that.totalProgress=fluid.initSubcomponent(that,"totalProgressBar",[that.container,fluid.COMPONENT_OPTIONS]);disableElement(that,that.locate("uploadButton"));bindDOMEvents(that);bindModelEvents(that)};fluid.uploader=function(container,options){var that=fluid.initView("fluid.uploader",container,options);setupUploader(that);return that};fluid.progressiveEnhanceableUploader=function(container,enhanceable,options){enhanceable=fluid.container(enhanceable);container=fluid.container(container);if(swfobject.getFlashPlayerVersion().major<9){enhanceable.show()}else{container.show();return fluid.uploader(container,options)}};fluid.uploader.formatFileSize=function(bytes){if(typeof bytes==="number"){if(bytes===0){return"0.0 KB"}else{if(bytes>0){if(bytes<1048576){return(Math.ceil(bytes/1024*10)/10).toFixed(1)+" KB"}else{return(Math.ceil(bytes/1048576*10)/10).toFixed(1)+" MB"}}}}return""};fluid.uploader.derivePercent=function(num,total){return Math.round((num*100)/total)};fluid.defaults("fluid.uploader",{demo:false,decorators:[{type:"fluid.swfUploadSetupDecorator"},{type:"fluid.manuallyDegrade",options:{selectors:{enhanceable:".fl-uploader.fl-progEnhance-basic"}}}],uploadManager:{type:"fluid.swfUploadManager"},fileQueueView:{type:"fluid.fileQueueView"},totalProgressBar:{type:"fluid.progress",options:{selectors:{progressBar:".flc-uploader-queue-footer",displayElement:".flc-uploader-total-progress",label:".flc-uploader-total-progress-text",indicator:".flc-uploader-total-progress",ariaElement:".flc-uploader-total-progress"}}},selectors:{fileQueue:".flc-uploader-queue",browseButton:".flc-uploader-button-browse",uploadButton:".flc-uploader-button-upload",pauseButton:".flc-uploader-button-pause",totalFileStatusText:".flc-uploader-total-progress-text",instructions:".flc-uploader-browse-instructions"},focusWithEvent:{afterFileDialog:"uploadButton",afterUploadStart:"pauseButton",afterUploadStop:"uploadButton"},styles:{disabled:"fl-uploader-disabled",hidden:"fl-uploader-hidden",dim:"fl-uploader-dim",totalProgress:"fl-uploader-total-progress-okay",totalProgressError:"fl-uploader-total-progress-errored"},events:{afterReady:null,onFileDialog:null,afterFileQueued:null,afterFileRemoved:null,onQueueError:null,afterFileDialog:null,onUploadStart:null,onUploadStop:null,onFileStart:null,onFileProgress:null,onFileError:null,onFileSuccess:null,afterFileComplete:null,afterUploadComplete:null},strings:{progress:{toUploadLabel:"To upload: %fileCount %fileLabel (%totalBytes)",totalProgressLabel:"Uploading: %curFileN of %totalFilesN %fileLabel (%currBytes of %totalBytes)",completedLabel:"Uploaded: %curFileN of %totalFilesN %fileLabel (%totalCurrBytes)%errorString",numberOfErrors:", %errorsN %errorLabel",singleFile:"file",pluralFiles:"files",singleError:"error",pluralErrors:"errors"},buttons:{browse:"Browse Files",addMore:"Add More",stopUpload:"Stop Upload",cancelRemaning:"Cancel remaining Uploads",resumeUpload:"Resume Upload"}}});fluid.uploader.errorConstants={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};fluid.uploader.fileStatusConstants={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};var renderLink=function(renderLocation,text,classes,appendBeside){var link=$("<a href='#'>"+text+"</a>");link.addClass(classes);if(renderLocation==="before"){appendBeside.before(link)}else{appendBeside.after(link)}return link};var toggleVisibility=function(toShow,toHide){if(window.opera){toShow.show().removeClass("hideUploaderForOpera");toHide.show().addClass("hideUploaderForOpera")}else{toShow.show();toHide.hide()}};var defaultControlRenderer=function(that){var degradeLink=renderLink(that.options.defaultRenderLocation,that.options.strings.degradeLinkText,that.options.styles.degradeLinkClass,that.enhancedContainer);degradeLink.addClass("flc-manuallyDegrade-degrade");var enhanceLink=renderLink(that.options.defaultRenderLocation,that.options.strings.enhanceLinkText,that.options.styles.enhanceLinkClass,that.degradedContainer);enhanceLink.addClass("flc-manuallyDegrade-enhance")};var fetchControls=function(that){that.degradeControl=that.locate("degradeControl");that.enhanceControl=that.locate("enhanceControl")};var setupManuallyDegrade=function(that){if(!that.degradedContainer.length){return }fetchControls(that);if(!that.degradeControl.length&&!that.enhanceControl.length){that.options.controlRenderer(that);fetchControls(that)}that.degradeControl.click(that.degrade);that.enhanceControl.click(that.enhance);that.enhanceControl.hide()};var determineContainer=function(options){var defaults=fluid.defaults("fluid.manuallyDegrade");return(options&&options.container)?options.container:defaults.container};fluid.manuallyDegrade=function(component,options){var container=determineContainer(options);var that=fluid.initView("fluid.manuallyDegrade",container,options);var isDegraded=false;that.enhancedContainer=component.container;that.degradedContainer=that.locate("enhanceable");that.degrade=function(){toggleVisibility(that.enhanceControl,that.degradeControl);toggleVisibility(that.degradedContainer,that.enhancedContainer);isDegraded=true};that.enhance=function(){toggleVisibility(that.degradeControl,that.enhanceControl);toggleVisibility(that.enhancedContainer,that.degradedContainer);isDegraded=false};that.isDegraded=function(){return isDegraded};setupManuallyDegrade(that);return that};fluid.defaults("fluid.manuallyDegrade",{container:"body",controlRenderer:defaultControlRenderer,defaultRenderLocation:"before",strings:{degradeLinkText:"Switch to the standard single-file Uploader",enhanceLinkText:"Switch to the Flash-based multi-file Uploader"},selectors:{enhanceable:".fl-ProgEnhance-basic",degradeControl:".flc-manuallyDegrade-degrade",enhanceControl:".flc-manuallyDegrade-enhance"},styles:{degradeLinkClass:"fl-uploader-manually-degrade",enhanceLinkClass:"fl-uploader-manually-enhance"}})})(jQuery,fluid_1_1);(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&parseInt($.browser.version)<=6){s=$.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},s||{});var prop=function(n){return n&&n.constructor==Number?n+"px":n},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(s.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":prop(s.top))+";left:"+(s.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":prop(s.left))+";width:"+(s.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":prop(s.width))+";height:"+(s.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":prop(s.height))+';"/>';return this.each(function(){if($("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(html),this.firstChild)}})}return this};if(!$.browser.version){$.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1]}})(jQuery);(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip-settings",settings);this.tooltipText=this.title;$(this).removeAttr("title");this.alt=""}).hover(save,hide).click(hide)},fixPNG:IE?function(){return this.each(function(){var image=$(this).css("backgroundImage");if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css("position");if(position!="absolute"&&position!="relative"){$(this).css("position","relative")}})}})}:function(){return this},unfixPNG:IE?function(){return this.each(function(){$(this).css({filter:"",backgroundImage:""})})}:function(){return this},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]()})},url:function(){return this.attr("href")||this.attr("src")}});function createHelper(settings){if(helper.parent){return }helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe){helper.parent.bgiframe()}helper.title=$("h3",helper.parent);helper.body=$("div.body",helper.parent);helper.url=$("div.url",helper.parent)}function settings(element){return $.data(element,"tooltip-settings")}function handle(event){if(settings(this).delay){tID=setTimeout(show,settings(this).delay)}else{show()}track=!!settings(this).track;$(document.body).bind("mousemove",update);update(event)}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler)){return }current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent)}helper.body.show()}else{if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;part=parts[i];i++){if(i>0){helper.body.append("<br/>")}helper.body.append(part)}helper.body.hideWhenEmpty()}else{helper.title.html(title).show();helper.body.hide()}}if(settings(this).showURL&&$(this).url()){helper.url.html($(this).url().replace("http://","")).show()}else{helper.url.hide()}helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG){helper.parent.fixPNG()}handle.apply(this,arguments)}function show(){tID=null;helper.parent.show();update()}function update(event){if($.tooltip.blocked){return }if(!track&&helper.parent.is(":visible")){$(document.body).unbind("mousemove",update)}if(current==null||!settings(current)){return }helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;helper.parent.css({left:left+"px",top:top+"px"})}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+"px"}).addClass("viewport-right")}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+"px"}).addClass("viewport-bottom")}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()}}function hide(event){if($.tooltip.blocked){return }if(tID){clearTimeout(tID)}current=null;helper.parent.hide().removeClass(settings(this).extraClass);if(settings(this).fixPNG){helper.parent.unfixPNG()}}$.fn.Tooltip=$.fn.tooltip})(jQuery);fluid_1_1=fluid_1_1||{};(function($,fluid){var STATE_INITIAL="state_initial",STATE_CHANGED="state_changed",STATE_REVERTED="state_reverted";function defaultRenderer(that,targetContainer){var markup="<span class='flc-undo'><span class='flc-undo-undoContainer'>[<a href='#' class='flc-undo-undoControl'>undo</a>]</span><span class='flc-undo-redoContainer'>[<a href='#' class='flc-undo-redoControl'>redo</a>]</span></span>";var markupNode=$(markup);targetContainer.append(markupNode);return markupNode}function refreshView(that){if(that.state===STATE_INITIAL){that.locate("undoContainer").hide();that.locate("redoContainer").hide()}else{if(that.state===STATE_CHANGED){that.locate("undoContainer").show();that.locate("redoContainer").hide()}else{if(that.state===STATE_REVERTED){that.locate("undoContainer").hide();that.locate("redoContainer").show()}}}}var bindHandlers=function(that){that.locate("undoControl").click(function(){if(that.state!==STATE_REVERTED){fluid.model.copyModel(that.extremalModel,that.component.model);that.component.updateModel(that.initialModel,that);that.state=STATE_REVERTED;refreshView(that);that.locate("redoControl").focus()}return false});that.locate("redoControl").click(function(){if(that.state!==STATE_CHANGED){that.component.updateModel(that.extremalModel,that);that.state=STATE_CHANGED;refreshView(that);that.locate("undoControl").focus()}return false});return{modelChanged:function(newModel,oldModel,source){if(source!==that){that.state=STATE_CHANGED;fluid.model.copyModel(that.initialModel,oldModel);refreshView(that)}}}};fluid.undoDecorator=function(component,userOptions){var that=fluid.initView("undo",null,userOptions);that.container=that.options.renderer(that,component.container);fluid.initDomBinder(that);fluid.tabindex(that.locate("undoControl"),0);fluid.tabindex(that.locate("redoControl"),0);that.component=component;that.initialModel={};that.extremalModel={};fluid.model.copyModel(that.initialModel,component.model);fluid.model.copyModel(that.extremalModel,component.model);that.state=STATE_INITIAL;refreshView(that);var listeners=bindHandlers(that);that.returnedOptions={listeners:listeners};return that};fluid.defaults("undo",{selectors:{undoContainer:".flc-undo-undoContainer",undoControl:".flc-undo-undoControl",redoContainer:".flc-undo-redoContainer",redoControl:".flc-undo-redoControl"},renderer:defaultRenderer})})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){function sendKey(control,event,virtualCode,charCode){var kE=document.createEvent("KeyEvents");kE.initKeyEvent(event,1,1,null,0,0,0,0,virtualCode,charCode);control.dispatchEvent(kE)}fluid.setCaretToEnd=function(control,value){var pos=value?value.length:0;try{control.focus();if(control.setSelectionRange){control.setSelectionRange(pos,pos);if($.browser.mozilla&&pos>0){sendKey(control,"keypress",92,92);sendKey(control,"keydown",8,0);sendKey(control,"keypress",8,0)}}else{if(control.createTextRange){var range=control.createTextRange();range.move("character",pos);range.select()}}}catch(e){}};fluid.deadMansBlur=function(control,exclusions,handler){var blurPending=false;$(control).blur(function(){blurPending=true;setTimeout(function(){if(blurPending){handler(control)}},150)});var canceller=function(){blurPending=false};exclusions.focus(canceller);exclusions.click(canceller)};var renderEditContainer=function(that,really){that.editContainer=that.locate("editContainer");that.editField=that.locate("edit");if(that.editContainer.length!==1){if(that.editField.length===1){that.editContainer=that.editField}else{if(that.editContainer.length>1){fluid.fail("InlineEdit did not find a unique container for selector "+that.options.selectors.editContainer+": "+fluid.dumpEl(that.editContainer))}}}if(that.editContainer.length===1&&!that.editField){that.editField=that.locate("edit",that.editContainer)}if(!really){return }var editElms=that.options.editModeRenderer(that);if(editElms){that.editContainer=editElms.container;that.editField=editElms.field}if(that.editField.length===0){fluid.fail("InlineEdit improperly initialised - editField could not be located (selector "+that.options.selectors.edit+")")}};var switchToViewMode=function(that){that.editContainer.hide();that.viewEl.show()};var cancel=function(that){if(that.isEditing()){setTimeout(function(){that.editView.value(that.model.value)},1);switchToViewMode(that);that.events.afterFinishEdit.fire(that.model.value,that.model.value,that.editField[0],that.viewEl[0])}};var finish=function(that){var newValue=that.editView.value();var oldValue=that.model.value;var viewNode=that.viewEl[0];var editNode=that.editField[0];var ret=that.events.onFinishEdit.fire(newValue,oldValue,editNode,viewNode);if(ret===false){return }that.updateModelValue(newValue);that.events.afterFinishEdit.fire(newValue,oldValue,editNode,viewNode);switchToViewMode(that)};var bindEditFinish=function(that){if(that.options.submitOnEnter===undefined){that.options.submitOnEnter="textarea"!==fluid.unwrap(that.editField).nodeName.toLowerCase()}function keyCode(evt){return evt.keyCode?evt.keyCode:(evt.which?evt.which:0)}var escHandler=function(evt){var code=keyCode(evt);if(code===$.ui.keyCode.ESCAPE){cancel(that);return false}};var finishHandler=function(evt){var code=keyCode(evt);if(code!==$.ui.keyCode.ENTER){return true}finish(that);that.viewEl.focus();return false};if(that.options.submitOnEnter){that.editContainer.keypress(finishHandler)}that.editContainer.keydown(escHandler)};var bindBlurHandler=function(that){if(that.options.blurHandlerBinder){that.options.blurHandlerBinder(that)}else{var blurHandler=function(evt){if(that.isEditing()){finish(that)}return false};that.editField.blur(blurHandler)}};var initializeEditView=function(that,initial){if(!that.editInitialized){renderEditContainer(that,!that.options.lazyEditView||!initial);if(!that.options.lazyEditView||!initial){that.editView=fluid.initSubcomponent(that,"editView",that.editField);$.extend(true,that.editView,fluid.initSubcomponent(that,"editAccessor",that.editField));bindEditFinish(that);bindBlurHandler(that);that.editView.refreshView(that);that.editInitialized=true}}};var edit=function(that){initializeEditView(that,false);var viewEl=that.viewEl;var displayText=that.displayView.value();that.updateModelValue(that.model.value===""?"":displayText);if(that.options.applyEditPadding){that.editField.width(Math.max(viewEl.width()+that.options.paddings.edit,that.options.paddings.minimumEdit))}viewEl.removeClass(that.options.styles.invitation);viewEl.removeClass(that.options.styles.focus);viewEl.hide();that.editContainer.show();if(that.tooltipEnabled()){$("#"+that.options.tooltipId).hide()}setTimeout(function(){that.editField.focus();fluid.setCaretToEnd(that.editField[0],that.editView.value());if(that.options.selectOnEdit){that.editField[0].select()}},0);that.events.afterBeginEdit.fire()};var clearEmptyViewStyles=function(textEl,defaultViewStyle,originalViewPadding){textEl.removeClass(defaultViewStyle);textEl.css("padding-right",originalViewPadding)};var showDefaultViewText=function(that){that.displayView.value(that.options.defaultViewText);that.viewEl.css("padding-right",that.existingPadding);that.viewEl.addClass(that.options.styles.defaultViewStyle)};var showNothing=function(that){that.displayView.value("");if($.browser.msie){if(that.viewEl.css("display")==="inline"){that.viewEl.css("display","inline-block")}}};var showEditedText=function(that){that.displayView.value(that.model.value);clearEmptyViewStyles(that.viewEl,that.options.styles.defaultViewStyle,that.existingPadding)};var refreshView=function(that,source){that.displayView.refreshView(that,source);if(that.editView){that.editView.refreshView(that,source)}};var initModel=function(that,value){that.model.value=value;that.refreshView()};var updateModelValue=function(that,newValue,source){var comparator=that.options.modelComparator;var unchanged=comparator?comparator(that.model.value,newValue):that.model.value===newValue;if(!unchanged){var oldModel=$.extend(true,{},that.model);that.model.value=newValue;that.events.modelChanged.fire(that.model,oldModel,source);that.refreshView(source)}};var bindHoverHandlers=function(viewEl,invitationStyle){var over=function(evt){viewEl.addClass(invitationStyle)};var out=function(evt){viewEl.removeClass(invitationStyle)};viewEl.hover(over,out)};var makeEditHandler=function(that){return function(){var prevent=that.events.onBeginEdit.fire();if(prevent===false){return false}edit(that);return true}};function makeEditTriggerGuard(that){var viewEl=fluid.unwrap(that.viewEl);return function(event){var outer=fluid.findAncestor(event.target,function(elem){if(/input|select|textarea|button|a/i.test(elem.nodeName)||elem===viewEl){return true}});if(outer===viewEl){that.edit();return false}}}var bindMouseHandlers=function(that){bindHoverHandlers(that.viewEl,that.options.styles.invitation);that.viewEl.click(makeEditTriggerGuard(that))};var bindHighlightHandler=function(viewEl,focusStyle,invitationStyle){var focusOn=function(){viewEl.addClass(focusStyle);viewEl.addClass(invitationStyle)};var focusOff=function(){viewEl.removeClass(focusStyle);viewEl.removeClass(invitationStyle)};viewEl.focus(focusOn);viewEl.blur(focusOff)};var bindKeyboardHandlers=function(that){fluid.tabbable(that.viewEl);var guard=makeEditTriggerGuard(that);fluid.activatable(that.viewEl,function(event){return guard(event)})};var aria=function(viewEl,editContainer){viewEl.attr("role","button")};var defaultEditModeRenderer=function(that){if(that.editContainer.length>0&&that.editField.length>0){return{container:that.editContainer,field:that.editField}}var editModeTemplate="<span><input type='text' class='flc-inlineEdit-edit fl-inlineEdit-edit'/></span>";var editContainer=$(editModeTemplate);var editField=$("input",editContainer);var componentContainerId=that.container.attr("id");if(componentContainerId){var editContainerId=componentContainerId+"-edit-container";var editFieldId=componentContainerId+"-edit";editContainer.attr("id",editContainerId);editField.attr("id",editFieldId)}that.viewEl.after(editContainer);return{container:editContainer,field:editField}};var makeIsEditing=function(that){var isEditing=false;that.events.onBeginEdit.addListener(function(){isEditing=true});that.events.afterFinishEdit.addListener(function(){isEditing=false});return function(){return isEditing}};var setupInlineEdit=function(componentContainer,that){var padding=that.viewEl.css("padding-right");that.existingPadding=padding?parseFloat(padding):0;initModel(that,that.displayView.value());bindMouseHandlers(that);bindKeyboardHandlers(that);bindHighlightHandler(that.viewEl,that.options.styles.focus,that.options.styles.invitation);aria(that.viewEl);if(that.editContainer){that.editContainer.hide()}var initTooltip=function(){if(that.tooltipEnabled()){that.viewEl.tooltip({delay:that.options.tooltipDelay,extraClass:that.options.styles.tooltip,bodyHandler:function(){return that.options.tooltipText},id:that.options.tooltipId})}};$(initTooltip);that.decorators=fluid.initSubcomponents(that,"componentDecorators",[that,fluid.COMPONENT_OPTIONS])};var setupInlineEdits=function(editables,options){var editors=[];editables.each(function(idx,editable){editors.push(fluid.inlineEdit($(editable),options))});return editors};fluid.inlineEdit=function(componentContainer,userOptions){var that=fluid.initView("inlineEdit",componentContainer,userOptions);that.viewEl=that.locate("text");that.displayView=fluid.initSubcomponent(that,"displayView",that.viewEl);$.extend(true,that.displayView,fluid.initSubcomponent(that,"displayAccessor",that.viewEl));that.model={value:""};that.edit=makeEditHandler(that);that.isEditing=makeIsEditing(that);that.finish=function(){finish(that)};that.cancel=function(){cancel(that)};that.tooltipEnabled=function(){return that.options.useTooltip&&$.fn.tooltip};that.refreshView=function(source){refreshView(that,source)};that.updateModelValue=function(newValue,source){updateModelValue(that,newValue,source)};that.updateModel=function(newModel,source){updateModelValue(that,newModel.value,source)};initializeEditView(that,true);setupInlineEdit(componentContainer,that);return that};fluid.inlineEdit.standardAccessor=function(element){var nodeName=element.nodeName.toLowerCase();var func="input"===nodeName||"textarea"===nodeName?"val":"text";return{value:function(newValue){return $(element)[func](newValue)}}};fluid.inlineEdit.richTextViewAccessor=function(element){return{value:function(newValue){return $(element).html(newValue)}}};fluid.inlineEdit.standardDisplayView=function(viewEl){var that={refreshView:function(componentThat,source){if(componentThat.model.value){showEditedText(componentThat)}else{if(componentThat.options.defaultViewText){showDefaultViewText(componentThat)}else{showNothing(componentThat)}}if(($.trim(componentThat.viewEl.text()).length===0)&&(componentThat.existingPadding<componentThat.options.paddings.minimumView)){componentThat.viewEl.css("padding-right",componentThat.options.paddings.minimumView)}}};return that};fluid.inlineEdit.standardEditView=function(editField){var that={refreshView:function(componentThat,source){if(componentThat.editField&&componentThat.editField.index(source)===-1){componentThat.editView.value(componentThat.model.value)}}};$.extend(true,that,fluid.inlineEdit.standardAccessor(editField));return that};fluid.inlineEdits=function(componentContainer,options){options=options||{};var selectors=$.extend({},fluid.defaults("inlineEdits").selectors,options.selectors);var container=fluid.container(componentContainer);var editables=$(selectors.editables,container);return setupInlineEdits(editables,options)};fluid.defaults("inlineEdit",{selectors:{text:".flc-inlineEdit-text",editContainer:".flc-inlineEdit-editContainer",edit:".flc-inlineEdit-edit"},styles:{text:"fl-inlineEdit-text",edit:"fl-inlineEdit-edit",invitation:"fl-inlineEdit-invitation",defaultViewStyle:"fl-inlineEdit-invitation-text",tooltip:"fl-inlineEdit-tooltip",focus:"fl-inlineEdit-focus"},events:{modelChanged:null,onBeginEdit:"preventable",afterBeginEdit:null,onFinishEdit:"preventable",afterFinishEdit:null,afterInitEdit:null},paddings:{edit:10,minimumEdit:80,minimumView:60},applyEditPadding:true,blurHandlerBinder:null,submitOnEnter:undefined,modelComparator:null,displayAccessor:{type:"fluid.inlineEdit.standardAccessor"},displayView:{type:"fluid.inlineEdit.standardDisplayView"},editAccessor:{type:"fluid.inlineEdit.standardAccessor"},editView:{type:"fluid.inlineEdit.standardEditView"},editModeRenderer:defaultEditModeRenderer,lazyEditView:false,defaultViewText:"Click here to edit",tooltipText:"Click item to edit",tooltipId:"tooltip",useTooltip:false,tooltipDelay:1000,selectOnEdit:false});fluid.defaults("inlineEdits",{selectors:{editables:".flc-inlineEditable"}})})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var configureInlineEdit=function(configurationName,container,options){var defaults=fluid.defaults(configurationName);var assembleOptions=fluid.merge(defaults?defaults.mergePolicy:null,{},defaults,options);return fluid.inlineEdit(container,assembleOptions)};fluid.inlineEdit.normalizeHTML=function(value){var togo=$.trim(value.replace(/\s+/g," "));togo=togo.replace(/\s+<\//g,"</");togo=togo.replace(/\<(\S+)[^\>\s]*\>/g,function(match){return match.toLowerCase()});return togo};fluid.inlineEdit.htmlComparator=function(el1,el2){return fluid.inlineEdit.normalizeHTML(el1)===fluid.inlineEdit.normalizeHTML(el2)};fluid.inlineEdit.tinyMCE=function(container,options){var inlineEditor=configureInlineEdit("fluid.inlineEdit.tinyMCE",container,options);tinyMCE.init(inlineEditor.options.tinyMCE);return inlineEditor};fluid.inlineEdit.tinyMCE.viewAccessor=function(editField){return{value:function(newValue){var editor=tinyMCE.get(editField.id);if(!editor){return""}if(newValue){$(editField).val(newValue);editor.setContent(newValue,{format:"raw"})}else{return editor.getContent()}}}};fluid.inlineEdit.tinyMCE.blurHandlerBinder=function(that){function focusEditor(editor){setTimeout(function(){tinyMCE.execCommand("mceFocus",false,that.editField[0].id);if($.browser.mozilla&&$.browser.version.substring(0,3)==="1.8"){return }editor.selection.select(editor.getBody(),1);editor.selection.collapse(0)},10)}that.events.afterInitEdit.addListener(function(editor){focusEditor(editor);var editorBody=editor.getBody();fluid.deadMansBlur(that.editField,$(editorBody),function(){that.cancel()})});that.events.afterBeginEdit.addListener(function(){var editor=tinyMCE.get(that.editField[0].id);if(editor){focusEditor(editor)}})};fluid.inlineEdit.tinyMCE.editModeRenderer=function(that){var options=that.options.tinyMCE;options.elements=fluid.allocateSimpleId(that.editField);var oldinit=options.init_instance_callback;options.init_instance_callback=function(instance){that.events.afterInitEdit.fire(instance);if(oldinit){oldinit()}};tinyMCE.init(options)};fluid.defaults("fluid.inlineEdit.tinyMCE",{tinyMCE:{mode:"exact",theme:"simple"},useTooltip:true,selectors:{edit:"textarea"},styles:{invitation:"fl-inlineEdit-richText-invitation"},displayAccessor:{type:"fluid.inlineEdit.richTextViewAccessor"},editAccessor:{type:"fluid.inlineEdit.tinyMCE.viewAccessor"},lazyEditView:true,modelComparator:fluid.inlineEdit.htmlComparator,blurHandlerBinder:fluid.inlineEdit.tinyMCE.blurHandlerBinder,editModeRenderer:fluid.inlineEdit.tinyMCE.editModeRenderer});fluid.inlineEdit.FCKEditor=function(container,options){return configureInlineEdit("fluid.inlineEdit.FCKEditor",container,options)};fluid.inlineEdit.FCKEditor.complete=fluid.event.getEventFirer();fluid.inlineEdit.FCKEditor.complete.addListener(function(editor){var editField=editor.LinkedField;var that=$.data(editField,"fluid.inlineEdit.FCKEditor");that.events.afterInitEdit.fire(editor)});fluid.inlineEdit.FCKEditor.blurHandlerBinder=function(that){function focusEditor(editor){editor.Focus()}that.events.afterInitEdit.addListener(function(editor){focusEditor(editor);var editorBody=editor.EditingArea.TargetElement});that.events.afterBeginEdit.addListener(function(){var editor=fluid.inlineEdit.FCKEditor.byId(that.editField[0].id);if(editor){focusEditor(editor)}})};fluid.inlineEdit.FCKEditor.byId=function(id){var editor=typeof (FCKeditorAPI)==="undefined"?null:FCKeditorAPI.GetInstance(id);return editor};fluid.inlineEdit.FCKEditor.editModeRenderer=function(that){var id=fluid.allocateSimpleId(that.editField);$.data(fluid.unwrap(that.editField),"fluid.inlineEdit.FCKEditor",that);var oFCKeditor=new FCKeditor(id);var opcopy=fluid.copy(that.options.FCKEditor);opcopy.BasePath=opcopy.BasePath+"editor/";$.extend(true,oFCKeditor.Config,opcopy);$.extend(true,oFCKeditor,that.options.FCKEditor);oFCKeditor.Config.fluidInstance=that;oFCKeditor.ReplaceTextarea()};fluid.inlineEdit.FCKEditor.viewAccessor=function(editField){return{value:function(newValue){var editor=fluid.inlineEdit.FCKEditor.byId(editField.id);if(!editor){if(newValue){$(editField).val(newValue)}return""}if(newValue){editor.SetHTML(newValue)}else{return editor.GetHTML()}}}};fluid.defaults("fluid.inlineEdit.FCKEditor",{selectors:{edit:"textarea"},styles:{invitation:"fl-inlineEdit-richText-invitation"},displayAccessor:{type:"fluid.inlineEdit.richTextViewAccessor"},editAccessor:{type:"fluid.inlineEdit.FCKEditor.viewAccessor"},lazyEditView:true,modelComparator:fluid.inlineEdit.htmlComparator,blurHandlerBinder:fluid.inlineEdit.FCKEditor.blurHandlerBinder,editModeRenderer:fluid.inlineEdit.FCKEditor.editModeRenderer,FCKEditor:{BasePath:"fckeditor/"}});fluid.inlineEdit.dropdown=function(container,options){return configureInlineEdit("fluid.inlineEdit.dropdown",container,options)};fluid.inlineEdit.dropdown.editModeRenderer=function(that){var id=fluid.allocateSimpleId(that.editField);that.editField.selectbox({finishHandler:function(){that.finish()}});return{container:that.editContainer,field:$("input.selectbox",that.editContainer)}};fluid.inlineEdit.dropdown.blurHandlerBinder=function(that){fluid.deadMansBlur(that.editField,$("div.selectbox-wrapper li",that.editContainer),function(){that.cancel()})};fluid.defaults("fluid.inlineEdit.dropdown",{applyEditPadding:false,blurHandlerBinder:fluid.inlineEdit.dropdown.blurHandlerBinder,editModeRenderer:fluid.inlineEdit.dropdown.editModeRenderer})})(jQuery,fluid_1_1);function FCKeditor_OnComplete(editorInstance){fluid.inlineEdit.FCKEditor.complete.fire(editorInstance)}var fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.orientation={HORIZONTAL:4,VERTICAL:1};fluid.rectSides={4:["left","right"],1:["top","bottom"],8:"top",12:"bottom",2:"left",3:"right"};fluid.position={BEFORE:-1,AFTER:1,INSIDE:2,REPLACE:3};fluid.direction={NEXT:1,PREVIOUS:-1,UP:8,DOWN:12,LEFT:2,RIGHT:3};fluid.directionSign=function(direction){return direction===fluid.direction.UP||direction===fluid.direction.LEFT?fluid.direction.PREVIOUS:fluid.direction.NEXT};fluid.directionAxis=function(direction){return direction===fluid.direction.LEFT||direction===fluid.direction.RIGHT?0:1};fluid.directionOrientation=function(direction){return fluid.directionAxis(direction)?fluid.orientation.VERTICAL:fluid.orientation.HORIZONTAL};fluid.keycodeDirection={up:fluid.direction.UP,down:fluid.direction.DOWN,left:fluid.direction.LEFT,right:fluid.direction.RIGHT};fluid.moveDom=function(source,target,position){source=fluid.unwrap(source);target=fluid.unwrap(target);var scan;if(position===fluid.position.INSIDE){target.appendChild(source)}else{if(position===fluid.position.BEFORE){for(scan=target.previousSibling;;scan=scan.previousSibling){if(!scan||!fluid.dom.isIgnorableNode(scan)){if(scan!==source){fluid.dom.cleanseScripts(source);target.parentNode.insertBefore(source,target)}break}}}else{if(position===fluid.position.AFTER){for(scan=target.nextSibling;;scan=scan.nextSibling){if(!scan||!fluid.dom.isIgnorableNode(scan)){if(scan!==source){fluid.dom.cleanseScripts(source);fluid.dom.insertAfter(source,target)}break}}}else{fluid.fail("Unrecognised position supplied to fluid.moveDom: "+position)}}}};fluid.normalisePosition=function(position,samespan,targeti,sourcei){if(position===fluid.position.REPLACE){position=samespan&&targeti>=sourcei?fluid.position.AFTER:fluid.position.BEFORE}return position};fluid.permuteDom=function(element,target,position,sourceelements,targetelements){element=fluid.unwrap(element);target=fluid.unwrap(target);var sourcei=$.inArray(element,sourceelements);if(sourcei===-1){fluid.fail("Error in permuteDom: source element "+fluid.dumpEl(element)+" not found in source list "+fluid.dumpEl(sourceelements))}var targeti=$.inArray(target,targetelements);if(targeti===-1){fluid.fail("Error in permuteDom: target element "+fluid.dumpEl(target)+" not found in source list "+fluid.dumpEl(targetelements))}var samespan=sourceelements===targetelements;position=fluid.normalisePosition(position,samespan,targeti,sourcei);var oldn={};oldn[fluid.position.AFTER]=element.nextSibling;oldn[fluid.position.BEFORE]=element.previousSibling;fluid.moveDom(sourceelements[sourcei],targetelements[targeti],position);var frontlimit=samespan?targeti-1:sourceelements.length-2;var i;if(position===fluid.position.BEFORE&&samespan){frontlimit--}if(!samespan||targeti>sourcei){for(i=frontlimit;i>sourcei;--i){fluid.moveDom(sourceelements[i+1],sourceelements[i],fluid.position.AFTER)}if(sourcei+1<sourceelements.length){fluid.moveDom(sourceelements[sourcei+1],oldn[fluid.position.AFTER],fluid.position.BEFORE)}}var backlimit=samespan?sourcei-1:targetelements.length-1;if(position===fluid.position.AFTER){targeti++}if(!samespan||targeti<sourcei){for(i=targeti;i<backlimit;++i){fluid.moveDom(targetelements[i],targetelements[i+1],fluid.position.BEFORE)}if(backlimit>=0&&backlimit<targetelements.length-1){fluid.moveDom(targetelements[backlimit],oldn[fluid.position.BEFORE],fluid.position.AFTER)}}};var curCss=function(a,name){return window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(name):a.currentStyle[name]};var isAttached=function(node){while(node&&node.nodeName){if(node.nodeName==="BODY"){return true}node=node.parentNode}return false};var generalHidden=function(a){return"hidden"===a.type||curCss(a,"display")==="none"||curCss(a,"visibility")==="hidden"||!isAttached(a)};var computeGeometry=function(element,orientation,disposition){var elem={};elem.element=element;elem.orientation=orientation;if(disposition===fluid.position.INSIDE){elem.position=disposition}if(generalHidden(element)){elem.clazz="hidden"}var pos=fluid.dom.computeAbsolutePosition(element)||[0,0];var width=element.offsetWidth;var height=element.offsetHeight;elem.rect={left:pos[0],top:pos[1]};elem.rect.right=pos[0]+width;elem.rect.bottom=pos[1]+height;return elem};var SENTINEL_DIMENSION=10000;function dumprect(rect){return"Rect top: "+rect.top+" left: "+rect.left+" bottom: "+rect.bottom+" right: "+rect.right}function dumpelem(cacheelem){if(!cacheelem||!cacheelem.rect){return"null"}else{return dumprect(cacheelem.rect)+" position: "+cacheelem.position+" for "+fluid.dumpEl(cacheelem.element)}}fluid.dropManager=function(){var targets=[];var cache={};var that={};var lastClosest;function cacheKey(element){return $(element).data("")}function sentinelizeElement(targets,sides,cacheelem,fc,disposition,clazz){var elemCopy=$.extend(true,{},cacheelem);elemCopy.rect[sides[fc]]=elemCopy.rect[sides[1-fc]]+(fc?1:-1);elemCopy.rect[sides[1-fc]]=(fc?-1:1)*SENTINEL_DIMENSION;elemCopy.position=disposition===fluid.position.INSIDE?disposition:(fc?fluid.position.BEFORE:fluid.position.AFTER);elemCopy.clazz=clazz;targets[targets.length]=elemCopy}function splitElement(targets,sides,cacheelem,disposition,clazz1,clazz2){var elem1=$.extend(true,{},cacheelem);var elem2=$.extend(true,{},cacheelem);var midpoint=(elem1.rect[sides[0]]+elem1.rect[sides[1]])/2;elem1.rect[sides[1]]=midpoint;elem1.position=fluid.position.BEFORE;elem2.rect[sides[0]]=midpoint;elem2.position=fluid.position.AFTER;elem1.clazz=clazz1;elem2.clazz=clazz2;targets[targets.length]=elem1;targets[targets.length]=elem2}function getRelativeClass(thisElements,index,relative,thisclazz,mapper){index+=relative;if(index<0&&thisclazz==="locked"){return"locked"}if(index>=thisElements.length||mapper===null){return null}else{relative=thisElements[index];return mapper(relative)==="locked"&&thisclazz==="locked"?"locked":null}}var lastGeometry;var displacementX,displacementY;that.updateGeometry=function(geometricInfo){lastGeometry=geometricInfo;targets=[];cache={};var mapper=geometricInfo.elementMapper;for(var i=0;i<geometricInfo.extents.length;++i){var thisInfo=geometricInfo.extents[i];var orientation=thisInfo.orientation;var sides=fluid.rectSides[orientation];var processElement=function(element,sentB,sentF,disposition,j){var cacheelem=computeGeometry(element,orientation,disposition);cacheelem.owner=thisInfo;if(cacheelem.clazz!=="hidden"&&mapper){cacheelem.clazz=mapper(element)}cache[$.data(element)]=cacheelem;var backClass=getRelativeClass(thisInfo.elements,j,fluid.position.BEFORE,cacheelem.clazz,mapper);var frontClass=getRelativeClass(thisInfo.elements,j,fluid.position.AFTER,cacheelem.clazz,mapper);if(disposition===fluid.position.INSIDE){targets[targets.length]=cacheelem}else{splitElement(targets,sides,cacheelem,disposition,backClass,frontClass)}if(sentB&&geometricInfo.sentinelize){sentinelizeElement(targets,sides,cacheelem,1,disposition,backClass)}if(sentF&&geometricInfo.sentinelize){sentinelizeElement(targets,sides,cacheelem,0,disposition,frontClass)}return cacheelem};var allHidden=true;for(var j=0;j<thisInfo.elements.length;++j){var element=thisInfo.elements[j];var cacheelem=processElement(element,j===0,j===thisInfo.elements.length-1,fluid.position.INTERLEAVED,j);if(cacheelem.clazz!=="hidden"){allHidden=false}}if(allHidden&&thisInfo.parentElement){processElement(thisInfo.parentElement,true,true,fluid.position.INSIDE)}}};that.startDrag=function(event,handlePos,handleWidth,handleHeight){var handleMidX=handlePos[0]+handleWidth/2;var handleMidY=handlePos[1]+handleHeight/2;var dX=handleMidX-event.pageX;var dY=handleMidY-event.pageY;that.updateGeometry(lastGeometry);lastClosest=null;displacementX=dX;displacementY=dY;$("").bind("mousemove.fluid-dropManager",that.mouseMove)};that.lastPosition=function(){return lastClosest};that.endDrag=function(){$("").unbind("mousemove.fluid-dropManager")};that.mouseMove=function(evt){var x=evt.pageX+displacementX;var y=evt.pageY+displacementY;var closestTarget=that.closestTarget(x,y,lastClosest);if(closestTarget&&closestTarget!==fluid.dropManager.NO_CHANGE){lastClosest=closestTarget;that.dropChangeFirer.fire(closestTarget)}};that.dropChangeFirer=fluid.event.getEventFirer();var blankHolder={element:null};that.closestTarget=function(x,y,lastClosest){var mindistance=Number.MAX_VALUE;var minelem=blankHolder;var minlockeddistance=Number.MAX_VALUE;var minlockedelem=blankHolder;for(var i=0;i<targets.length;++i){var cacheelem=targets[i];if(cacheelem.clazz==="hidden"){continue}var distance=fluid.geom.minPointRectangle(x,y,cacheelem.rect);if(cacheelem.clazz==="locked"){if(distance<minlockeddistance){minlockeddistance=distance;minlockedelem=cacheelem}}else{if(distance<mindistance){mindistance=distance;minelem=cacheelem}if(distance===0){break}}}if(!minelem){return minelem}if(minlockeddistance>=mindistance){minlockedelem=blankHolder}if(lastClosest&&lastClosest.position===minelem.position&&fluid.unwrap(lastClosest.element)===fluid.unwrap(minelem.element)&&fluid.unwrap(lastClosest.lockedelem)===fluid.unwrap(minlockedelem.element)){return fluid.dropManager.NO_CHANGE}return{position:minelem.position,element:minelem.element,lockedelem:minlockedelem.element}};that.shuffleProjectFrom=function(element,direction,includeLocked){var togo=that.projectFrom(element,direction,includeLocked);togo.position=fluid.position.REPLACE;return togo};that.projectFrom=function(element,direction,includeLocked){that.updateGeometry(lastGeometry);var cacheelem=cache[cacheKey(element)];var projected=fluid.geom.projectFrom(cacheelem.rect,direction,targets,includeLocked);if(!projected.cacheelem){return null}var retpos=projected.cacheelem.position;return{element:projected.cacheelem.element,position:retpos?retpos:fluid.position.BEFORE}};function getRelativeElement(element,direction,elements){var folded=fluid.directionSign(direction);var index=$(elements).index(element)+folded;if(index<0){index+=elements.length}index%=elements.length;return elements[index]}that.logicalFrom=function(element,direction,includeLocked){var orderables=that.getOwningSpan(element,fluid.position.INTERLEAVED,includeLocked);return{element:getRelativeElement(element,direction,orderables),position:fluid.position.REPLACE}};that.lockedWrapFrom=function(element,direction,includeLocked){var base=that.logicalFrom(element,direction,includeLocked);var selectables=that.getOwningSpan(element,fluid.position.INTERLEAVED,includeLocked);var allElements=cache[cacheKey(element)].owner.elements;if(includeLocked||selectables[0]===allElements[0]){return base}var directElement=getRelativeElement(element,direction,allElements);if(lastGeometry.elementMapper(directElement)==="locked"){base.element=null;base.clazz="locked"}return base};that.getOwningSpan=function(element,position,includeLocked){var owner=cache[cacheKey(element)].owner;var elements=position===fluid.position.INSIDE?[owner.parentElement]:owner.elements;if(!includeLocked&&lastGeometry.elementMapper){elements=$.makeArray(elements);fluid.remove_if(elements,function(element){return lastGeometry.elementMapper(element)==="locked"})}return elements};that.geometricMove=function(element,target,position){var sourceElements=that.getOwningSpan(element,null,true);var targetElements=that.getOwningSpan(target,position,true);fluid.permuteDom(element,target,position,sourceElements,targetElements)};return that};fluid.dropManager.NO_CHANGE="no change";fluid.geom=fluid.geom||{};fluid.geom.minPointRectangle=function(x,y,rectangle){var dx=x<rectangle.left?(rectangle.left-x):(x>rectangle.right?(x-rectangle.right):0);var dy=y<rectangle.top?(rectangle.top-y):(y>rectangle.bottom?(y-rectangle.bottom):0);return dx*dx+dy*dy};fluid.geom.minRectRect=function(rect1,rect2){var dx=rect1.right<rect2.left?rect2.left-rect1.right:rect2.right<rect1.left?rect1.left-rect2.right:0;var dy=rect1.bottom<rect2.top?rect2.top-rect1.bottom:rect2.bottom<rect1.top?rect1.top-rect2.bottom:0;return dx*dx+dy*dy};var makePenCollect=function(){return{mindist:Number.MAX_VALUE,minrdist:Number.MAX_VALUE}};fluid.geom.projectFrom=function(baserect,direction,targets,forSelection){var axis=fluid.directionAxis(direction);var frontSide=fluid.rectSides[direction];var backSide=fluid.rectSides[axis*15+5-direction];var dirSign=fluid.directionSign(direction);var penrect={left:(7*baserect.left+1*baserect.right)/8,right:(5*baserect.left+3*baserect.right)/8,top:(7*baserect.top+1*baserect.bottom)/8,bottom:(5*baserect.top+3*baserect.bottom)/8};penrect[frontSide]=dirSign*SENTINEL_DIMENSION;penrect[backSide]=-penrect[frontSide];function accPen(collect,cacheelem,backSign){var thisrect=cacheelem.rect;var pdist=fluid.geom.minRectRect(penrect,thisrect);var rdist=-dirSign*backSign*(baserect[backSign===1?frontSide:backSide]-thisrect[backSign===1?backSide:frontSide]);if(pdist<=collect.mindist&&rdist>=0){if(pdist===collect.mindist&&rdist*backSign>collect.minrdist){return }collect.minrdist=rdist*backSign;collect.mindist=pdist;collect.minelem=cacheelem}}var collect=makePenCollect();var backcollect=makePenCollect();var lockedcollect=makePenCollect();for(var i=0;i<targets.length;++i){var elem=targets[i];var isPure=elem.owner&&elem.element===elem.owner.parentElement;if(elem.clazz==="hidden"||forSelection&&isPure){continue}else{if(!forSelection&&elem.clazz==="locked"){accPen(lockedcollect,elem,1)}else{accPen(collect,elem,1);accPen(backcollect,elem,-1)}}}var wrap=!collect.minelem||backcollect.mindist<collect.mindist;var mincollect=wrap?backcollect:collect;var togo={wrapped:wrap,cacheelem:mincollect.minelem};if(lockedcollect.mindist<mincollect.mindist){togo.lockedelem=lockedcollect.minelem}return togo}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var defaultAvatarCreator=function(item,cssClass,dropWarning){var avatar=$(item).clone();fluid.dom.iterateDom(avatar.get(0),function(node){if(node.tagName.toLowerCase()==="script"){return"delete"}node.removeAttribute("id");if(node.tagName.toLowerCase()==="input"){node.setAttribute("disabled","disabled")}});avatar.removeAttr("id");avatar.removeClass("ui-droppable");avatar.addClass(cssClass);if(dropWarning){var avatarContainer=$(document.createElement("div"));avatarContainer.append(avatar);avatarContainer.append(dropWarning);avatar=avatarContainer}$("body").append(avatar);if(!$.browser.safari){avatar.css("display","block").width(item.offsetWidth).height(item.offsetHeight)}if($.browser.opera){avatar.hide()}return avatar};function firstSelectable(that){var selectables=that.dom.fastLocate("selectables");if(selectables.length<=0){return null}return selectables[0]}function bindHandlersToContainer(container,keyDownHandler,keyUpHandler,mouseMoveHandler){var actualKeyDown=keyDownHandler;var advancedPrevention=false;if($.browser.opera){container.keypress(function(evt){if(advancedPrevention){advancedPrevention=false;evt.preventDefault();return false}});actualKeyDown=function(evt){var oldret=keyDownHandler(evt);if(oldret===false){advancedPrevention=true}}}container.keydown(actualKeyDown);container.keyup(keyUpHandler)}function addRolesToContainer(that){var first=that.dom.fastLocate("selectables")[0];that.container.attr("role",that.options.containerRole.container);that.container.attr("aria-multiselectable","false");that.container.attr("aria-readonly","false");that.container.attr("aria-disabled","false")}function createAvatarId(parentId){return parentId+"_avatar"}var adaptKeysets=function(options){if(options.keysets&&!(options.keysets instanceof Array)){options.keysets=[options.keysets]}};fluid.reorderer=function(container,options){if(!container){fluid.fail("Reorderer initialised with no container")}var thatReorderer=fluid.initView("fluid.reorderer",container,options);options=thatReorderer.options;var dropManager=fluid.dropManager();thatReorderer.layoutHandler=fluid.initSubcomponent(thatReorderer,"layoutHandler",[container,options,dropManager,thatReorderer.dom]);thatReorderer.activeItem=undefined;adaptKeysets(options);var kbDropWarning=thatReorderer.locate("dropWarning");var mouseDropWarning;if(kbDropWarning){mouseDropWarning=kbDropWarning.clone()}var isMove=function(evt){var keysets=options.keysets;for(var i=0;i<keysets.length;i++){if(keysets[i].modifier(evt)){return true}}return false};var isActiveItemMovable=function(){return $.inArray(thatReorderer.activeItem,thatReorderer.dom.fastLocate("movables"))>=0};var setDropEffects=function(value){thatReorderer.dom.fastLocate("dropTargets").attr("aria-dropeffect",value)};var styles=options.styles;var noModifier=function(evt){return(!evt.ctrlKey&&!evt.altKey&&!evt.shiftKey&&!evt.metaKey)};var handleDirectionKeyDown=function(evt){var item=thatReorderer.activeItem;if(!item){return true}var keysets=options.keysets;for(var i=0;i<keysets.length;i++){var keyset=keysets[i];var didProcessKey=false;var keydir=fluid.keyForValue(keyset,evt.keyCode);if(!keydir){continue}var isMovement=keyset.modifier(evt);var dirnum=fluid.keycodeDirection[keydir];var relativeItem=thatReorderer.layoutHandler.getRelativePosition(item,dirnum,!isMovement);if(!relativeItem){continue}if(isMovement){var prevent=thatReorderer.events.onBeginMove.fire(item);if(prevent===false){return false}if(kbDropWarning.length>0){if(relativeItem.clazz==="locked"){thatReorderer.events.onShowKeyboardDropWarning.fire(item,kbDropWarning);kbDropWarning.show()}else{kbDropWarning.hide()}}if(relativeItem.element){thatReorderer.requestMovement(relativeItem,item)}}else{if(noModifier(evt)){$(relativeItem.element).focus()}}return false}return true};thatReorderer.handleKeyDown=function(evt){if(!thatReorderer.activeItem||thatReorderer.activeItem!==evt.target){return true}var jActiveItem=$(thatReorderer.activeItem);if(!jActiveItem.hasClass(styles.dragging)&&isMove(evt)){if(isActiveItemMovable()){jActiveItem.removeClass(styles.selected);jActiveItem.addClass(styles.dragging);jActiveItem.attr("aria-grabbed","true");setDropEffects("move")}return false}return handleDirectionKeyDown(evt)};thatReorderer.handleKeyUp=function(evt){if(!thatReorderer.activeItem||thatReorderer.activeItem!==evt.target){return true}var jActiveItem=$(thatReorderer.activeItem);if(jActiveItem.hasClass(styles.dragging)&&!isMove(evt)){if(kbDropWarning){kbDropWarning.hide()}jActiveItem.removeClass(styles.dragging);jActiveItem.addClass(styles.selected);jActiveItem.attr("aria-grabbed","false");setDropEffects("none");return false}return false};var dropMarker;var createDropMarker=function(tagName){var dropMarker=$(document.createElement(tagName));dropMarker.addClass(options.styles.dropMarker);dropMarker.hide();return dropMarker};fluid.logEnabled=true;thatReorderer.requestMovement=function(requestedPosition,item){if(!requestedPosition||fluid.unwrap(requestedPosition.element)===fluid.unwrap(item)){return }thatReorderer.events.onMove.fire(item,requestedPosition);dropManager.geometricMove(item,requestedPosition.element,requestedPosition.position);$(thatReorderer.activeItem).focus();thatReorderer.refresh();dropManager.updateGeometry(thatReorderer.layoutHandler.getGeometricInfo());thatReorderer.events.afterMove.fire(item,requestedPosition,thatReorderer.dom.fastLocate("movables"))};var hoverStyleHandler=function(item,state){thatReorderer.dom.fastLocate("grabHandle",item)[state?"addClass":"removeClass"](styles.hover)};function initMovable(item){var styles=options.styles;item.attr("aria-grabbed","false");item.mouseover(function(){thatReorderer.events.onHover.fire(item,true)});item.mouseout(function(){thatReorderer.events.onHover.fire(item,false)});var avatar;thatReorderer.dom.fastLocate("grabHandle",item).draggable({refreshPositions:false,scroll:true,helper:function(){var dropWarningEl;if(mouseDropWarning){dropWarningEl=mouseDropWarning[0]}avatar=$(options.avatarCreator(item[0],styles.avatar,dropWarningEl));avatar.attr("id",createAvatarId(thatReorderer.container.id));return avatar},start:function(e,ui){var prevent=thatReorderer.events.onBeginMove.fire(item);if(prevent===false){return false}var handle=thatReorderer.dom.fastLocate("grabHandle",item)[0];var handlePos=fluid.dom.computeAbsolutePosition(handle);var handleWidth=handle.offsetWidth;var handleHeight=handle.offsetHeight;item.focus();item.removeClass(options.styles.selected);item.addClass(options.styles.mouseDrag);item.attr("aria-grabbed","true");setDropEffects("move");dropManager.startDrag(e,handlePos,handleWidth,handleHeight);avatar.show()},stop:function(e,ui){item.removeClass(options.styles.mouseDrag);item.addClass(options.styles.selected);$(thatReorderer.activeItem).attr("aria-grabbed","false");var markerNode=fluid.unwrap(dropMarker);if(markerNode.parentNode){markerNode.parentNode.removeChild(markerNode)}avatar.hide();ui.helper=null;setDropEffects("none");dropManager.endDrag();thatReorderer.requestMovement(dropManager.lastPosition(),item);thatReorderer.activeItem.focus()},handle:thatReorderer.dom.fastLocate("grabHandle",item)})}function changeSelectedToDefault(jItem,styles){jItem.removeClass(styles.selected);jItem.removeClass(styles.dragging);jItem.addClass(styles.defaultStyle);jItem.attr("aria-selected","false")}var selectItem=function(anItem){thatReorderer.events.onSelect.fire(anItem);var styles=options.styles;if(thatReorderer.activeItem&&thatReorderer.activeItem!==anItem){changeSelectedToDefault($(thatReorderer.activeItem),styles)}thatReorderer.activeItem=anItem;var jItem=$(anItem);jItem.removeClass(styles.defaultStyle);jItem.addClass(styles.selected);jItem.attr("aria-selected","true")};var initSelectables=function(){var handleBlur=function(evt){changeSelectedToDefault($(this),options.styles);return evt.stopPropagation()};var handleFocus=function(evt){selectItem(this);return evt.stopPropagation()};var selectables=thatReorderer.dom.fastLocate("selectables");for(var i=0;i<selectables.length;++i){var selectable=$(selectables[i]);if(!$.data(selectable[0],"fluid.reorderer.selectable-initialised")){selectable.addClass(styles.defaultStyle);selectables.blur(handleBlur);selectables.focus(handleFocus);selectables.click(function(evt){var handle=fluid.unwrap(thatReorderer.dom.fastLocate("grabHandle",this));if(fluid.dom.isContainer(handle,evt.target)){$(this).focus()}});selectables.attr("role",options.containerRole.item);selectables.attr("aria-selected","false");selectables.attr("aria-disabled","false");$.data(selectable[0],"fluid.reorderer.selectable-initialised",true)}}if(!thatReorderer.selectableContext){thatReorderer.selectableContext=fluid.selectable(thatReorderer.container,{selectableElements:selectables,selectablesTabindex:thatReorderer.options.selectablesTabindex,direction:null})}};var dropChangeListener=function(dropTarget){fluid.moveDom(dropMarker,dropTarget.element,dropTarget.position);dropMarker.css("display","");if(mouseDropWarning){if(dropTarget.lockedelem){mouseDropWarning.show()}else{mouseDropWarning.hide()}}};var initItems=function(){var movables=thatReorderer.dom.fastLocate("movables");var dropTargets=thatReorderer.dom.fastLocate("dropTargets");initSelectables();for(var i=0;i<movables.length;i++){var item=movables[i];if(!$.data(item,"fluid.reorderer.movable-initialised")){initMovable($(item));$.data(item,"fluid.reorderer.movable-initialised",true)}}if(movables.length>0&&!dropMarker){dropMarker=createDropMarker(movables[0].tagName)}dropManager.updateGeometry(thatReorderer.layoutHandler.getGeometricInfo());dropManager.dropChangeFirer.addListener(dropChangeListener,"fluid.Reorderer");dropTargets.attr("aria-dropeffect","none")};if(thatReorderer.container){bindHandlersToContainer(thatReorderer.container,thatReorderer.handleKeyDown,thatReorderer.handleKeyUp);addRolesToContainer(thatReorderer);fluid.tabbable(thatReorderer.container);initItems()}if(options.afterMoveCallbackUrl){thatReorderer.events.afterMove.addListener(function(){var layoutHandler=thatReorderer.layoutHandler;var model=layoutHandler.getModel?layoutHandler.getModel():options.acquireModel(thatReorderer);$.post(options.afterMoveCallbackUrl,JSON.stringify(model))},"postModel")}thatReorderer.events.onHover.addListener(hoverStyleHandler,"style");thatReorderer.refresh=function(){thatReorderer.dom.refresh("movables");thatReorderer.dom.refresh("selectables");thatReorderer.dom.refresh("grabHandle",thatReorderer.dom.fastLocate("movables"));thatReorderer.dom.refresh("stylisticOffset",thatReorderer.dom.fastLocate("movables"));thatReorderer.dom.refresh("dropTargets");thatReorderer.events.onRefresh.fire();initItems();thatReorderer.selectableContext.selectables=thatReorderer.dom.fastLocate("selectables");thatReorderer.selectableContext.selectablesUpdated(thatReorderer.activeItem)};thatReorderer.refresh();return thatReorderer};fluid.reorderer.keys={TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:19,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,i:73,j:74,k:75,m:77};fluid.reorderer.defaultKeysets=[{modifier:function(evt){return evt.ctrlKey},up:fluid.reorderer.keys.UP,down:fluid.reorderer.keys.DOWN,right:fluid.reorderer.keys.RIGHT,left:fluid.reorderer.keys.LEFT},{modifier:function(evt){return evt.ctrlKey},up:fluid.reorderer.keys.i,down:fluid.reorderer.keys.m,right:fluid.reorderer.keys.k,left:fluid.reorderer.keys.j}];fluid.reorderer.roles={GRID:{container:"grid",item:"gridcell"},LIST:{container:"list",item:"listitem"},REGIONS:{container:"main",item:"article"}};var simpleInit=function(container,layoutHandler,options){options=options||{};options.layoutHandler=layoutHandler;return fluid.reorderer(container,options)};fluid.reorderList=function(container,options){return simpleInit(container,"fluid.listLayoutHandler",options)};fluid.reorderGrid=function(container,options){return simpleInit(container,"fluid.gridLayoutHandler",options)};fluid.reorderer.SHUFFLE_GEOMETRIC_STRATEGY="shuffleProjectFrom";fluid.reorderer.GEOMETRIC_STRATEGY="projectFrom";fluid.reorderer.LOGICAL_STRATEGY="logicalFrom";fluid.reorderer.WRAP_LOCKED_STRATEGY="lockedWrapFrom";fluid.reorderer.NO_STRATEGY=null;fluid.reorderer.relativeInfoGetter=function(orientation,coStrategy,contraStrategy,dropManager,dom){return function(item,direction,forSelection){var dirorient=fluid.directionOrientation(direction);var strategy=dirorient===orientation?coStrategy:contraStrategy;return strategy!==null?dropManager[strategy](item,direction,forSelection):null}};fluid.defaults("fluid.reorderer",{styles:{defaultStyle:"fl-reorderer-movable-default",selected:"fl-reorderer-movable-selected",dragging:"fl-reorderer-movable-dragging",mouseDrag:"fl-reorderer-movable-dragging",hover:"fl-reorderer-movable-hover",dropMarker:"fl-reorderer-dropMarker",avatar:"fl-reorderer-avatar"},selectors:{dropWarning:".flc-reorderer-dropWarning",movables:".flc-reorderer-movable",grabHandle:"",stylisticOffset:""},avatarCreator:defaultAvatarCreator,keysets:fluid.reorderer.defaultKeysets,layoutHandler:{type:"fluid.listLayoutHandler"},events:{onShowKeyboardDropWarning:null,onSelect:null,onBeginMove:"preventable",onMove:null,afterMove:null,onHover:null,onRefresh:null},mergePolicy:{keysets:"replace","selectors.selectables":"selectors.movables","selectors.dropTargets":"selectors.movables"}});function geometricInfoGetter(orientation,sentinelize,dom){return function(){return{sentinelize:sentinelize,extents:[{orientation:orientation,elements:dom.fastLocate("dropTargets")}],elementMapper:function(element){return $.inArray(element,dom.fastLocate("movables"))===-1?"locked":null}}}}fluid.defaults(true,"fluid.listLayoutHandler",{orientation:fluid.orientation.VERTICAL,containerRole:fluid.reorderer.roles.LIST,selectablesTabindex:-1,sentinelize:true});fluid.listLayoutHandler=function(container,options,dropManager,dom){var that={};that.getRelativePosition=fluid.reorderer.relativeInfoGetter(options.orientation,fluid.reorderer.LOGICAL_STRATEGY,null,dropManager,dom);that.getGeometricInfo=geometricInfoGetter(options.orientation,options.sentinelize,dom);return that};fluid.defaults(true,"fluid.gridLayoutHandler",{orientation:fluid.orientation.HORIZONTAL,containerRole:fluid.reorderer.roles.GRID,selectablesTabindex:-1,sentinelize:false});fluid.gridLayoutHandler=function(container,options,dropManager,dom){var that={};that.getRelativePosition=fluid.reorderer.relativeInfoGetter(options.orientation,fluid.reorderer.LOGICAL_STRATEGY,fluid.reorderer.SHUFFLE_GEOMETRIC_STRATEGY,dropManager,dom);that.getGeometricInfo=geometricInfoGetter(options.orientation,options.sentinelize,dom);return that}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var deriveLightboxCellBase=function(namebase,index){return namebase+"lightbox-cell:"+index+":"};var addThumbnailActivateHandler=function(lightboxContainer){var enterKeyHandler=function(evt){if(evt.which===fluid.reorderer.keys.ENTER){var thumbnailAnchors=$("a",evt.target);document.location=thumbnailAnchors.attr("href")}};$(lightboxContainer).keypress(enterKeyHandler)};var seekNodesById=function(rootnode,tagname,idmatch){var inputs=rootnode.getElementsByTagName(tagname);var togo=[];for(var i=0;i<inputs.length;i+=1){var input=inputs[i];var id=input.id;if(id&&id.match(idmatch)){togo.push(input)}}return togo};var createItemFinder=function(parentNode,containerId){var lightboxCellNamePattern="^"+deriveLightboxCellBase(containerId,"[0-9]+")+"$";return function(){return seekNodesById(parentNode,"div",lightboxCellNamePattern)}};var findForm=function(element){while(element){if(element.nodeName.toLowerCase()==="form"){return element}element=element.parentNode}};var defaultAfterMoveCallback=function(lightboxContainer){var reorderform=findForm(lightboxContainer);return function(){var inputs,i;inputs=seekNodesById(reorderform,"input","^"+deriveLightboxCellBase(lightboxContainer.id,"[^:]*")+"reorder-index$");for(i=0;i<inputs.length;i+=1){inputs[i].value=i}if(reorderform&&reorderform.action){$.post(reorderform.action,$(reorderform).serialize(),function(type,data,evt){})}}};fluid.defaults("fluid.reorderImages",{layoutHandler:"fluid.gridLayoutHandler",selectors:{imageTitle:".flc-reorderer-imageTitle"}});fluid.reorderImages=function(container,options){var that=fluid.initView("fluid.reorderImages",container,options);var containerEl=fluid.unwrap(that.container);if(!that.options.afterMoveCallback){that.options.afterMoveCallback=defaultAfterMoveCallback(containerEl)}if(!that.options.selectors.movables){that.options.selectors.movables=createItemFinder(containerEl,containerEl.id)}var reorderer=fluid.reorderer(container,that.options);var movables=reorderer.locate("movables");fluid.transform(movables,function(cell){fluid.reorderImages.addAriaRoles(that.options.selectors.imageTitle,cell)});fluid.tabindex($("a",container),-1);addThumbnailActivateHandler(container);return reorderer};fluid.reorderImages.addAriaRoles=function(imageTitle,cell){cell=$(cell);cell.attr("role","img");var title=$(imageTitle,cell);if(title[0]===cell[0]||title[0]===document){fluid.fail("Could not locate cell title using selector "+imageTitle+" in context "+fluid.dumpEl(cell))}var titleId=fluid.allocateSimpleId(title);cell.attr("aria-labelledby",titleId);var image=$("img",cell);image.attr("role","presentation");image.attr("alt","")};fluid.lightbox=fluid.reorderImages})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.moduleLayout=fluid.moduleLayout||{};var findColumnAndItemIndices=function(item,layout){return fluid.find(layout.columns,function(column,colIndex){var index=$.inArray(item,column.elements);return index===-1?null:{columnIndex:colIndex,itemIndex:index}},{columnIndex:-1,itemIndex:-1})};var findColIndex=function(item,layout){return fluid.find(layout.columns,function(column,colIndex){return item===column.container?colIndex:null},-1)};fluid.moduleLayout.updateLayout=function(item,target,position,layout){item=fluid.unwrap(item);target=fluid.unwrap(target);var itemIndices=findColumnAndItemIndices(item,layout);layout.columns[itemIndices.columnIndex].elements.splice(itemIndices.itemIndex,1);var targetCol;if(position===fluid.position.INSIDE){targetCol=layout.columns[findColIndex(target,layout)].elements;targetCol.splice(targetCol.length,0,item)}else{var relativeItemIndices=findColumnAndItemIndices(target,layout);targetCol=layout.columns[relativeItemIndices.columnIndex].elements;position=fluid.normalisePosition(position,itemIndices.columnIndex===relativeItemIndices.columnIndex,relativeItemIndices.itemIndex,itemIndices.itemIndex);var relative=position===fluid.position.BEFORE?0:1;targetCol.splice(relativeItemIndices.itemIndex+relative,0,item)}};fluid.moduleLayout.layoutFromFlat=function(container,columns,portlets){var layout={};layout.container=container;layout.columns=fluid.transform(columns,function(column){return{container:column,elements:$.makeArray(portlets.filter(function(){return fluid.dom.isContainer(column,this)}))}});return layout};fluid.moduleLayout.layoutFromIds=function(idLayout){return{container:fluid.byId(idLayout.id),columns:fluid.transform(idLayout.columns,function(column){return{container:fluid.byId(column.id),elements:fluid.transform(column.children,fluid.byId)}})}};fluid.moduleLayout.layoutToIds=function(idLayout){return{id:fluid.getId(idLayout.container),columns:fluid.transform(idLayout.columns,function(column){return{id:fluid.getId(column.container),children:fluid.transform(column.elements,fluid.getId)}})}};var defaultOnShowKeyboardDropWarning=function(item,dropWarning){if(dropWarning){var offset=$(item).offset();dropWarning=$(dropWarning);dropWarning.css("position","absolute");dropWarning.css("top",offset.top);dropWarning.css("left",offset.left)}};fluid.defaults(true,"fluid.moduleLayoutHandler",{orientation:fluid.orientation.VERTICAL,containerRole:fluid.reorderer.roles.REGIONS,selectablesTabindex:0,sentinelize:true});fluid.moduleLayoutHandler=function(container,options,dropManager,dom){var that={};function computeLayout(){var togo;if(options.selectors.modules){togo=fluid.moduleLayout.layoutFromFlat(container,dom.locate("columns"),dom.locate("modules"))}if(!togo){var idLayout=fluid.model.getBeanValue(options,"moduleLayout.layout");fluid.moduleLayout.layoutFromIds(idLayout)}return togo}var layout=computeLayout();that.layout=layout;function isLocked(item){var lockedModules=options.selectors.lockedModules?dom.fastLocate("lockedModules"):[];return $.inArray(item,lockedModules)!==-1}that.getRelativePosition=fluid.reorderer.relativeInfoGetter(options.orientation,fluid.reorderer.WRAP_LOCKED_STRATEGY,fluid.reorderer.GEOMETRIC_STRATEGY,dropManager,dom);that.getGeometricInfo=function(){var extents=[];var togo={extents:extents,sentinelize:options.sentinelize};togo.elementMapper=function(element){return isLocked(element)?"locked":null};for(var col=0;col<layout.columns.length;col++){var column=layout.columns[col];var thisEls={orientation:options.orientation,elements:$.makeArray(column.elements),parentElement:column.container};extents.push(thisEls)}return togo};function computeModules(all){return function(){var modules=fluid.accumulate(layout.columns,function(column,list){return list.concat(column.elements)},[]);if(!all){fluid.remove_if(modules,isLocked)}return modules}}that.returnedOptions={selectors:{movables:computeModules(false),dropTargets:computeModules(false),selectables:computeModules(true)},listeners:{onMove:function(item,requestedPosition){fluid.moduleLayout.updateLayout(item,requestedPosition.element,requestedPosition.position,layout)},onRefresh:function(){layout=computeLayout();that.layout=layout},"onShowKeyboardDropWarning.setPosition":defaultOnShowKeyboardDropWarning}};that.getModel=function(){return fluid.moduleLayout.layoutToIds(layout)};return that}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.reorderLayout=function(container,userOptions){var assembleOptions={layoutHandler:"fluid.moduleLayoutHandler",selectors:{columns:".flc-reorderer-column",modules:".flc-reorderer-module"}};var options=$.extend(true,assembleOptions,userOptions);return fluid.reorderer(container,options)}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){function updateStyles(pageListThat,newModel,oldModel){if(!pageListThat.pageLinks){return }if(oldModel.pageIndex!==undefined){var oldLink=pageListThat.pageLinks.eq(oldModel.pageIndex);oldLink.removeClass(pageListThat.options.styles.currentPage)}var pageLink=pageListThat.pageLinks.eq(newModel.pageIndex);pageLink.addClass(pageListThat.options.styles.currentPage)}function bindLinkClick(link,events,eventArg){link.unbind("click.fluid.pager");link.bind("click.fluid.pager",function(){events.initiatePageChange.fire(eventArg)})}function computePageCount(model){model.pageCount=Math.max(1,Math.floor((model.totalRange-1)/model.pageSize)+1)}function computePageLimit(model){return Math.min(model.totalRange,(model.pageIndex+1)*model.pageSize)}fluid.pager=function(){return fluid.pagerImpl.apply(null,arguments)};fluid.pager.directPageList=function(container,events,options){var that=fluid.initView("fluid.pager.directPageList",container,options);that.pageLinks=that.locate("pageLinks");for(var i=0;i<that.pageLinks.length;++i){var pageLink=that.pageLinks.eq(i);bindLinkClick(pageLink,events,{pageIndex:i})}events.onModelChange.addListener(function(newModel,oldModel){updateStyles(that,newModel,oldModel)});that.defaultModel={pageIndex:undefined,pageSize:1,totalRange:that.pageLinks.length};return that};fluid.iota=function(count,first){first=first||0;var togo=[];for(var i=0;i<count;++i){togo[togo.length]=first++}return togo};fluid.pager.everyPageStrategy=fluid.iota;fluid.pager.gappedPageStrategy=function(locality,midLocality){if(!locality){locality=3}if(!midLocality){midLocality=locality}return function(count,first,mid){var togo=[];var j=0;var lastSkip=false;for(var i=0;i<count;++i){if(i<locality||(count-i-1)<locality||(i>=mid-midLocality&&i<=mid+midLocality)){togo[j++]=i;lastSkip=false}else{if(!lastSkip){togo[j++]=-1;lastSkip=true}}}return togo}};fluid.pager.renderedPageList=function(container,events,pagerBarOptions,options,strings){options=$.extend(true,pagerBarOptions,options);var that=fluid.initView("fluid.pager.renderedPageList",container,options);options=that.options;var renderOptions={cutpoints:[{id:"page-link:link",selector:pagerBarOptions.selectors.pageLinks},{id:"page-link:skip",selector:pagerBarOptions.selectors.pageLinkSkip},{id:"page-link:disabled",selector:pagerBarOptions.selectors.pageLinkDisabled}]};if(options.linkBody){renderOptions.cutpoints[renderOptions.cutpoints.length]={id:"payload-component",selector:options.linkBody}}function pageToComponent(current){return function(page){return page===-1?{ID:"page-link:skip"}:{ID:page===current?"page-link:link":"page-link:link",localID:page+1,value:page+1,pageIndex:page,decorators:[{type:"jQuery",func:"click",args:function(){events.initiatePageChange.fire({pageIndex:page})}},{type:page===current?"addClass":"",classes:that.options.styles.currentPage}]}}}var root=that.locate("root");fluid.expectFilledSelector(root,"Error finding root template for fluid.pager.renderedPageList");var template=fluid.selfRender(root,{},renderOptions);events.onModelChange.addListener(function(newModel,oldModel){var pages=that.options.pageStrategy(newModel.pageCount,0,newModel.pageIndex);var pageTree=fluid.transform(pages,pageToComponent(newModel.pageIndex));pageTree[pageTree.length-1].value=pageTree[pageTree.length-1].value+strings.last;events.onRenderPageLinks.fire(pageTree,newModel);fluid.reRender(template,root,pageTree,renderOptions);updateStyles(that,newModel,oldModel)});return that};fluid.defaults("fluid.pager.renderedPageList",{selectors:{root:".flc-pager-links"},linkBody:"a",pageStrategy:fluid.pager.everyPageStrategy});var updatePreviousNext=function(that,options,newModel){if(newModel.pageIndex===0){that.previous.addClass(options.styles.disabled)}else{that.previous.removeClass(options.styles.disabled)}if(newModel.pageIndex===newModel.pageCount-1){that.next.addClass(options.styles.disabled)}else{that.next.removeClass(options.styles.disabled)}};fluid.pager.previousNext=function(container,events,options){var that=fluid.initView("fluid.pager.previousNext",container,options);that.previous=that.locate("previous");bindLinkClick(that.previous,events,{relativePage:-1});that.next=that.locate("next");bindLinkClick(that.next,events,{relativePage:+1});events.onModelChange.addListener(function(newModel,oldModel,overallThat){updatePreviousNext(that,options,newModel)});return that};fluid.pager.pagerBar=function(events,container,options,strings){var that=fluid.initView("fluid.pager.pagerBar",container,options);that.pageList=fluid.initSubcomponent(that,"pageList",[container,events,that.options,fluid.COMPONENT_OPTIONS,strings]);that.previousNext=fluid.initSubcomponent(that,"previousNext",[container,events,that.options,fluid.COMPONENT_OPTIONS,strings]);return that};fluid.defaults("fluid.pager.pagerBar",{previousNext:{type:"fluid.pager.previousNext"},pageList:{type:"fluid.pager.directPageList"},selectors:{pageLinks:".flc-pager-pageLink",pageLinkSkip:".flc-pager-pageLink-skip",pageLinkDisabled:".flc-pager-pageLink-disabled",previous:".flc-pager-previous",next:".flc-pager-next"},styles:{currentPage:"fl-pager-currentPage",disabled:"fl-pager-disabled"}});function getColumnDefs(that){return that.options.columnDefs}fluid.pager.findColumnDef=function(columnDefs,key){var columnDef=$.grep(columnDefs,function(def){return def.key===key})[0];return columnDef};function getRoots(target,overallThat,index){var cellRoot=(overallThat.options.dataOffset?overallThat.options.dataOffset+".":"");target.shortRoot=index;target.longRoot=cellRoot+target.shortRoot}function expandPath(EL,shortRoot,longRoot){if(EL.charAt(0)==="*"){return longRoot+EL.substring(1)}else{return EL.replace("*",shortRoot)}}fluid.pager.fetchValue=function(that,dataModel,index,valuebinding,roots){getRoots(roots,that,index);var path=expandPath(valuebinding,roots.shortRoot,roots.longRoot);return fluid.model.getBeanValue(dataModel,path)};fluid.pager.basicSorter=function(overallThat,model){var dataModel=overallThat.options.dataModel;var roots={};var columnDefs=getColumnDefs(overallThat);var columnDef=fluid.pager.findColumnDef(columnDefs,model.sortKey);var sortrecs=[];for(var i=0;i<model.totalRange;++i){sortrecs[i]={index:i,value:fluid.pager.fetchValue(overallThat,dataModel,i,columnDef.valuebinding,roots)}}var columnType=typeof sortrecs[0].value;function sortfunc(arec,brec){var a=arec.value;var b=brec.value;return a===b?0:(a>b?model.sortDir:-model.sortDir)}sortrecs.sort(sortfunc);return fluid.transform(sortrecs,function(row){return row.index})};fluid.pager.directModelFilter=function(model,pagerModel,perm){var togo=[];var limit=computePageLimit(pagerModel);for(var i=pagerModel.pageIndex*pagerModel.pageSize;i<limit;++i){var index=perm?perm[i]:i;togo[togo.length]={index:index,row:model[index]}}return togo};function expandVariables(value,opts){var togo="";var index=0;while(true){var nextindex=value.indexOf("${",index);if(nextindex===-1){togo+=value.substring(index);break}else{togo+=value.substring(index,nextindex);var endi=value.indexOf("}",nextindex+2);var EL=value.substring(nextindex+2,endi);if(EL==="VALUE"){EL=opts.EL}else{EL=expandPath(EL,opts.shortRoot,opts.longRoot)}var val=fluid.model.getBeanValue(opts.dataModel,EL);togo+=val;index=endi+1}}return togo}function expandPaths(target,tree,opts){for(var i in tree){var val=tree[i];if(val===fluid.VALUE){if(i==="valuebinding"){target[i]=opts.EL}else{target[i]={valuebinding:opts.EL}}}else{if(i==="valuebinding"){target[i]=expandPath(tree[i],opts)}else{if(typeof (val)==="object"){target[i]=val.length!==undefined?[]:{};expandPaths(target[i],val,opts)}else{if(typeof (val)==="string"){target[i]=expandVariables(val,opts)}else{target[i]=tree[i]}}}}}return target}function iDforColumn(columnDef,opts){var options=opts.options;var EL=columnDef.valuebinding;var key=columnDef.key;if(!EL){fluid.fail("Error in definition for column with key "+key+": valuebinding is not set")}opts.EL=expandPath(EL,opts.shortRoot,opts.longRoot);if(!key){var segs=fluid.model.parseEL(EL);key=segs[segs.length-1]}var ID=(options.keyPrefix?options.keyPrefix:"")+key;return ID}function expandColumnDefs(filteredRow,opts){var tree=fluid.transform(opts.columnDefs,function(columnDef){var ID=iDforColumn(columnDef,opts);var togo;if(!columnDef.components){return{ID:ID,valuebinding:opts.EL}}else{if(typeof columnDef.components==="function"){togo=columnDef.components(filteredRow.row,filteredRow.index)}else{togo=columnDef.components}}togo=expandPaths({},togo,opts);togo.ID=ID;return togo});return tree}function fetchModel(overallThat){return fluid.model.getBeanValue(overallThat.options.dataModel,overallThat.options.dataOffset)}function bigHeaderForKey(key,opts){var id=opts.options.renderOptions.idMap["header:"+key];var smallHeader=fluid.jById(id);if(smallHeader.length===0){return null}var headerSortStylisticOffset=opts.overallOptions.selectors.headerSortStylisticOffset;var bigHeader=fluid.findAncestor(smallHeader,function(element){return $(element).is(headerSortStylisticOffset)});return bigHeader}function setSortHeaderClass(styles,element,sort){element=$(element);element.removeClass(styles.ascendingHeader);element.removeClass(styles.descendingHeader);if(sort!==0){element.addClass(sort===1?styles.ascendingHeader:styles.descendingHeader)}}function isCurrentColumnSortable(columnDefs,model){var columnDef=model.sortKey?fluid.pager.findColumnDef(columnDefs,model.sortKey):null;return columnDef?columnDef.sortable:false}function setModelSortHeaderClass(newModel,opts){var styles=opts.overallOptions.styles;var sort=isCurrentColumnSortable(opts.columnDefs,newModel)?newModel.sortDir:0;setSortHeaderClass(styles,bigHeaderForKey(newModel.sortKey,opts),sort)}function fireModelChange(that,newModel,forceUpdate){computePageCount(newModel);if(newModel.pageIndex>=newModel.pageCount){newModel.pageIndex=newModel.pageCount-1}if(forceUpdate||newModel.pageIndex!==that.model.pageIndex||newModel.pageSize!==that.model.pageSize||newModel.sortKey!==that.model.sortKey||newModel.sortDir!==that.model.sortDir){var sorted=isCurrentColumnSortable(getColumnDefs(that),newModel)?that.options.sorter(that,newModel):null;that.permutation=sorted;that.events.onModelChange.fire(newModel,that.model,that);fluid.model.copyModel(that.model,newModel)}}function generateColumnClick(overallThat,columnDef,opts){return function(){if(columnDef.sortable===true){var model=overallThat.model;var newModel=fluid.copy(model);var styles=overallThat.options.styles;var oldKey=model.sortKey;if(columnDef.key!==model.sortKey){newModel.sortKey=columnDef.key;newModel.sortDir=1;var oldBig=bigHeaderForKey(oldKey,opts);if(oldBig){setSortHeaderClass(styles,oldBig,0)}}else{if(newModel.sortKey===columnDef.key){newModel.sortDir=-1*newModel.sortDir}else{return false}}newModel.pageIndex=0;fireModelChange(overallThat,newModel,true);setModelSortHeaderClass(newModel,opts)}return false}}function fetchHeaderDecorators(decorators,columnDef){return decorators[columnDef.sortable?"sortableHeader":"unsortableHeader"]}function generateHeader(overallThat,newModel,columnDefs,opts){return{children:fluid.transform(columnDefs,function(columnDef){return{ID:iDforColumn(columnDef,opts),value:columnDef.label,decorators:[{jQuery:["click",generateColumnClick(overallThat,columnDef,opts)]},{identify:"header:"+columnDef.key}].concat(fetchHeaderDecorators(opts.overallOptions.decorators,columnDef))}})}}fluid.pager.selfRender=function(overallThat,inOptions){var that=fluid.initView("fluid.pager.selfRender",overallThat.container,inOptions);var options=that.options;options.renderOptions.idMap=options.renderOptions.idMap||{};var idMap=options.renderOptions.idMap;var root=that.locate("root");var template=fluid.selfRender(root,{},options.renderOptions);root.addClass(options.styles.root);var columnDefs=getColumnDefs(overallThat);var expOpts={options:options,columnDefs:columnDefs,overallOptions:overallThat.options,dataModel:overallThat.options.dataModel,idMap:idMap};var directModel=fetchModel(overallThat);return{returnedOptions:{listeners:{onModelChange:function(newModel,oldModel){var filtered=overallThat.options.modelFilter(directModel,newModel,overallThat.permutation);var tree=fluid.transform(filtered,function(filteredRow){var roots=getRoots(expOpts,overallThat,filteredRow.index);if(columnDefs==="explode"){return fluid.explode(filteredRow.row,root)}else{if(columnDefs.length){return expandColumnDefs(filteredRow,expOpts)}}});var fullTree={};fullTree[options.row]=tree;if(typeof (columnDefs)==="object"){fullTree[options.header]=generateHeader(overallThat,newModel,columnDefs,expOpts)}options.renderOptions=options.renderOptions||{};options.renderOptions.model=expOpts.dataModel;fluid.reRender(template,root,fullTree,options.renderOptions);setModelSortHeaderClass(newModel,expOpts)}}}}};fluid.defaults("fluid.pager.selfRender",{selectors:{root:".flc-pager-body-template"},styles:{root:"fl-pager"},keyStrategy:"id",keyPrefix:"",row:"row:",header:"header:",renderOptions:{}});fluid.pager.summary=function(dom,options){var node=dom.locate("summary");return{returnedOptions:{listeners:{onModelChange:function(newModel,oldModel){var text=fluid.stringTemplate(options.message,{first:newModel.pageIndex*newModel.pageSize+1,last:computePageLimit(newModel),total:newModel.totalRange});if(node.length>0){node.text(text)}}}}}};fluid.pager.directPageSize=function(that){var node=that.locate("pageSize");if(node.length>0){that.events.onModelChange.addListener(function(newModel,oldModel){if(node.val()!==newModel.pageSize){node.val(newModel.pageSize)}});node.change(function(){that.events.initiatePageSizeChange.fire(node.val())})}return that};fluid.pager.rangeAnnotator=function(that,options){var roots={};that.events.onRenderPageLinks.addListener(function(tree,newModel){var column=that.options.annotateColumnRange;var dataModel=that.options.dataModel;var columnDefs=getColumnDefs(that);if(!column||!dataModel||!columnDefs){return }var columnDef=fluid.pager.findColumnDef(columnDefs,column);function fetchValue(index){index=that.permutation?that.permutation[index]:index;return fluid.pager.fetchValue(that,dataModel,index,columnDef.valuebinding,roots)}var tModel={};fluid.model.copyModel(tModel,newModel);fluid.transform(tree,function(cell){if(cell.ID==="page-link:link"){var page=cell.pageIndex;var start=page*tModel.pageSize;tModel.pageIndex=page;var limit=computePageLimit(tModel);var iValue=fetchValue(start);var lValue=fetchValue(limit-1);var text="<b>"+iValue+"</b><br/>&mdash;<br/><b>"+lValue+"</b>";var decorator={type:"jQuery",func:"tooltip",args:{delay:that.options.tooltipDelay,extraClass:that.options.styles.tooltip,bodyHandler:function(){return text},showURL:false,id:that.options.tooltipId}};cell.decorators.push(decorator)}})})};fluid.pagerImpl=function(container,options){var that=fluid.initView("fluid.pager",container,options);var pageIndexConformer=function(model,changeRequest){if(changeRequest.value<0){changeRequest.value=0}};that.events.initiatePageChange.addListener(function(arg){var newModel=fluid.copy(that.model);if(arg.relativePage!==undefined){newModel.pageIndex=that.model.pageIndex+arg.relativePage}else{newModel.pageIndex=arg.pageIndex}if(newModel.pageIndex===undefined||newModel.pageIndex<0){newModel.pageIndex=0}fireModelChange(that,newModel,arg.forceUpdate)});that.events.initiatePageSizeChange.addListener(function(arg){var newModel=fluid.copy(that.model);newModel.pageSize=arg;fireModelChange(that,newModel)});var pagerBarElement=that.locate("pagerBar");if(pagerBarElement.length>0){that.pagerBar=fluid.initSubcomponent(that,"pagerBar",[that.events,pagerBarElement,fluid.COMPONENT_OPTIONS,that.options.strings])}var pagerBarSecondaryElement=that.locate("pagerBarSecondary");if(pagerBarSecondaryElement.length>0){that.pagerBarSecondary=fluid.initSubcomponent(that,"pagerBar",[that.events,pagerBarSecondaryElement,fluid.COMPONENT_OPTIONS,that.options.strings])}that.bodyRenderer=fluid.initSubcomponent(that,"bodyRenderer",[that,fluid.COMPONENT_OPTIONS]);that.summary=fluid.initSubcomponent(that,"summary",[that.dom,fluid.COMPONENT_OPTIONS]);that.pageSize=fluid.initSubcomponent(that,"pageSize",[that]);that.rangeAnnotator=fluid.initSubcomponent(that,"rangeAnnotator",[that,fluid.COMPONENT_OPTIONS]);that.model=fluid.copy(that.options.model);var dataModel=fetchModel(that);if(dataModel){that.model.totalRange=dataModel.length}if(that.model.totalRange===undefined){if(!that.pagerBar){fluid.fail("Error in Pager configuration - cannot determine total range,  since not configured in model.totalRange and no PagerBar is configured")}that.model=that.pagerBar.pageList.defaultModel}that.applier=fluid.makeChangeApplier(that.model);that.events.initiatePageChange.fire({pageIndex:that.model.pageIndex?that.model.pageIndex:0,forceUpdate:true});return that};fluid.defaults("fluid.pager",{pagerBar:{type:"fluid.pager.pagerBar",options:null},summary:{type:"fluid.pager.summary",options:{message:"%first-%last of %total items"}},pageSize:{type:"fluid.pager.directPageSize"},modelFilter:fluid.pager.directModelFilter,sorter:fluid.pager.basicSorter,bodyRenderer:{type:"fluid.emptySubcomponent"},model:{pageIndex:undefined,pageSize:10,totalRange:undefined},dataModel:undefined,dataOffset:"",columnDefs:"explode",annotateColumnRange:undefined,tooltipDelay:300,tooltipId:"tooltip",rangeAnnotator:{type:"fluid.pager.rangeAnnotator"},selectors:{pagerBar:".flc-pager-top",pagerBarSecondary:".flc-pager-bottom",summary:".flc-pager-summary",pageSize:".flc-pager-page-size",headerSortStylisticOffset:".flc-pager-sort-header"},styles:{tooltip:"fl-pager-tooltip",ascendingHeader:"fl-pager-asc",descendingHeader:"fl-pager-desc"},decorators:{sortableHeader:[],unsortableHeader:[]},strings:{last:" (last)"},events:{initiatePageChange:null,initiatePageSizeChange:null,onModelChange:null,onRenderPageLinks:null}})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/README.txt b/docs/include/jscripts/infusion/README.txt
new file mode 100644 (file)
index 0000000..4196328
--- /dev/null
@@ -0,0 +1,239 @@
+Fluid Infusion 1.1.1
+==================
+Main Project Site:  http://fluidproject.org
+Documentation:      http://wiki.fluidproject.org/display/fluid/Infusion+Documentation
+
+What's New in 1.1.1
+=================
+
+This release:
+
+    * This is a maintenance release, so no new features were addded. Instead, the following bugs were fixed:
+    * FLUID-3077 : Text inside inline editor is being lost after canceling the text edit.
+    * FLUID-2967 : Item will drop to the right of an element when it should have dropped at the left.
+    * FLUID-2590 : flc-reorderer-dropWarning used for both DOM selection and styling.
+    * FLUID-2277 : Can't select text: using IE.
+    * FLUID-1625 : [Image Reorderer] drop target can be left but image drops right.
+    * FLUID-3054 : tiny_mce Inline Edit text editor fails when used with advanced theme.
+    * FLUID-2940 : fluid.moduleLayout = fluid.moduleLayout || {}; is in the wrong location in moduleLayout.js
+    * FLUID-2935 : fluid.fetchResources method does not call specified function after receiving a 404 error.
+    * FLUID-2934 : Requesting a blank page via fluid.fetchResources triggers an infinite http request loop.
+    * FLUID-2792 : Saving rich text content, without making changes, will still render the undo control.
+    * FLUID-2638 : Invitation style causes Rich Text Inline Edit to misbehave
+    * FLUID-1320 : Typing "Click here to edit" is equivalent to erasing all the text
+
+What's in this Release
+======================
+
+This release is available in two forms:
+    Deployment Bundle - infusion-1.1.1.zip 
+    Source Code Bundle - infusion-1.1.1-src.zip
+
+In addition to source code, samples and tests, both bundles include at the top level a single JavaScript file
+
+    InfusionAll.js
+
+that is a combination of all other source files. Developers can include this single file in their
+pages to provide all the necessary support for the Infusion component Library. In the Deployment Bundle,
+this script is compressed and suitable for production use.
+
+The Deployment Bundle also includes a WAR file suitable for deployment in Java-based containers: 
+        fluid-components-1.1.1.war
+
+Source Code
+-----------
+The organization of the full source code for the Infusion library is as follows:
+
+        components/
+             inlineEdit/
+             pager/
+             progress/
+             reorderer/
+             tableOfContents/
+             uiOptions/
+             undo/
+             uploader/
+        framework/
+             core/
+             fss/
+             renderer/
+        lib/
+             fastXmlPull/
+             jquery/
+             json/
+             swfobject/
+             swfupload/
+
+In the Deployment Bundle, the JavaScript source has been minified: comments and whitespace have
+been removed. 
+
+Developers wishing to learn about the Fluid Infusion code, or debug their applications, should use
+the Source Code Bundle.
+
+Examples and Sample Code
+------------------------
+Sample code illustrating how Infusion components can be used:
+
+        integration-demos/
+             bspace/    (showcases: Inline Edit)
+             sakai/     (showcases: Inline Edit, Pager, UI Options, FSS)
+             uportal/   (showcases: Reorderer, UI Options, FSS)
+        standalone-demos/
+             keyboard-a11y/
+             lib/
+             pager/
+             progress/
+             quick-start-examples/
+                  fss/
+                  inlineEdit/
+                  reorderer/
+             renderer/
+             reorderer/
+             table-of-contents/
+
+Tests
+-----
+        tests/
+            component-tests/
+            escalated-tests/
+            framework-tests/
+            lib/
+            manual-tests/
+            test-core/
+
+License
+-------
+Fluid Infusion code is licensed under a dual ECL 2.0 / BSD license. The specific licenses can be
+found in the license file:
+        licenses/Infusion-LICENSE.txt
+
+Infusion also depends upon some third party open source modules. These are contained in their own
+folders, and their licenses are also present in
+        licenses/
+
+Third Party Software in Infusion
+--------------------------------
+This is a list of publicly available software that is included in the Fluid Infusion bundle, along
+with their licensing terms.
+
+    * jQuery javascript library v1.3.2: http://jquery.com/ (MIT and GPL licensed http://docs.jquery.com/Licensing)
+    * jQuery UI javascript widget library v1.7: http://ui.jquery.com/ (MIT and GPL licensed http://docs.jquery.com/Licensing)
+    * jQuery QUnit testrunner r6173: http://docs.jquery.com/QUnit (MIT and GPL licensed http://docs.jquery.com/Licensing)
+    * Douglas Crockford's JSON parsing and stringifying methods (from 2007-11-06): http://www.json.org/ (Public Domain)
+    * SWFUpload v2.2.0.1: http://swfupload.org/ (MIT licensed http://www.opensource.org/licenses/mit-license.php)
+    * SWFObject v2.1: http://code.google.com/p/swfobject/ (MIT licensed http://www.opensource.org/licenses/mit-license.php)
+    * Sample markup and stylesheets from Sakai v2.5 (http://sakaiproject.org) and uPortal v2.6 (http://www.uportal.org/)
+    * FCKeditor v2.6, HTML text editor (LGPL licensed http://www.fckeditor.net/license)
+    
+Other third party software
+
+    * fastXmlPull is based on XML for Script's Fast Pull Parser v3.1
+      (see: http://wiki.fluidproject.org/display/fluid/Licensing+for+fastXmlPull.js )
+    * fluid.reset.css is based on YUI's CSS reset styling v2.5.2
+      see: http://developer.yahoo.com/yui/reset/ (BSD licensed http://developer.yahoo.com/yui/license.html)
+    
+Readme
+------
+This file.
+        README.txt
+
+
+Documentation
+=============
+
+    http://wiki.fluidproject.org/display/fluid/Infusion+Documentation
+
+The Fluid Project uses a wiki for documentation and project collaboration: http://wiki.fluidproject.org.
+
+The documentation for Infusion consists of a number of information pages stored in the Fluid Wiki.
+The pages include tutorials, API descriptions, testing procedures, and data-gathering approaches. To make the 
+manual pages easy to navigate we have added the following guides:
+
+    * A landing page is provided for the reader, with links to all of our documenation.
+    * A link to the documentation appears at the top of the left-side wiki navigation
+      bar with the name "Infusion Documentation".
+
+
+Supported Browsers
+==================
+Firefox 2.x, 3.x: full support
+Internet Explorer 6.x, 7.x: full support
+Safari 3.1, Opera 9.6: full support (except keyboard interaction, which is not supported by these browsers)
+
+Internet Explorer 8: preliminary support
+
+For more information on Fluid Infusion browser support, please see:
+    http://wiki.fluidproject.org/display/fluid/Browser+Support
+
+
+Status of Components and Framework Features
+===========================================
+
+Production: supports A-Grade browsers, stable for production usage across a wide range of
+applications and use cases
+    * Fluid Skinning System 
+    * Infusion Framework Core
+    * Inline Edit: Simple Text
+    * Reorderer: List, Grid, Layout, Image
+    * Undo
+
+Preview: still growing, but with broad browser support. Expect new features in upcoming releases
+    * Pager
+    * Progress
+    * UI Options
+    * Uploader
+    * Renderer
+
+Sneak Peek: in development; APIs will change. Share your feedback, ideas, and code
+    * Inline Edit: Dropdown
+    * Inline Edit: Rich Text
+    * Table of Contents
+
+
+Known Issues
+============
+
+The Fluid Project uses a JIRA website to track bugs: http://issues.fluidproject.org.
+Some of the known issues in this release are described here:
+
+FSS:
+    FLUID-2504: Flexible columns don't maintain proper alignment under certain conditions
+    FLUID-2434: In IE, major font size changes break text positioning within form controls
+    FLUID-2397: Opera doesn't seem to repaint certain css changes on the fly, requiring a refresh to see them
+
+Framework:
+    FLUID-2577 Renderer performance can be slow on IE 6 and 7 in some contexts.
+
+Inline Edit: 
+    FLUID-1600 Pressing the "Tab" key to exit edit mode places focus on the wrong item
+    FLUID-2536 Inline Edit test fails using IE 8
+  
+Uploader: 
+    FLUID-2582 Uploader is dependent on ProgressiveEnhancement.js, which is not included in InfusionAll.js
+    FLUID-2895 The browse files button displays as a white box in IE 7 when running off the local system in Flash 10
+    FLUID-2052 Cannot tab away from the "Browse Files" button with Flash 10; using FF3*
+    FLUID-2032 Cannot Tab to the 'Browse More" button with Flash 10, using FF2*
+    * For information related to known issues with Flash 10 compatibility, 
+      see http://wiki.fluidproject.org/x/kwZo
+
+Layout Reorderer: 
+    FLUID-1540 Can't use keyboard reordering to move a nested reorderer to the right column, using IE6
+    FLUID-2171 In IE, can't reorderer portlets containing Google components
+    FLUID-858  Portlet Columns load with no padding between them in IE7
+
+Pager:
+    FLUID-2880 The Pager will be refactored. Note that as a result of this, there will be significant changes to the Pager API
+    FLUID-2329 The self-rendering mode of the Pager is not the default mode
+    FLUID-2486 Double clicking or clicking fast on "next/previous" links in pager does not cause advance of 2 pages in IE
+
+Reorderer: 
+    FLUID-539 Can't use the "Tab" key to navigate out of reorderable tabs
+    FLUID-148 Edge case: visual position of drop target when droppable is at beginning or end of a row
+    FLUID-118 Dragging an image offscreen or out of the frame has some unexpected results.
+
+UI Options: 
+    FLUID-2398 Minimum font size control changes the text size even when the base size is larger then the minimum.
+    FLUID-2481 "Links" selection does not work correctly in UIOptions
+    FLUID-2506 Keyboard navigation inside the dialog breaks in simple layout mode: using FF
+    FLUID-2524 scrolling the screen while the UI Options dialog is open, will cause it's contents to appear distorted: using IE
+    
diff --git a/docs/include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css b/docs/include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css
new file mode 100644 (file)
index 0000000..b4b4ae7
--- /dev/null
@@ -0,0 +1,4 @@
+.fl-inlineEdit-edit{margin:-2px;padding:0;}
+.fl-inlineEdit-tooltip{position:absolute;background:#CCC;border:1px solid #999;font:normal 75% sans-serif;padding:3px 5px;}
+.fl-inlineEdit-invitation{border:1px solid #999;background:lightyellow;cursor:pointer;}
+.fl-inlineEdit-richText-invitation{background:lightyellow;cursor:pointer;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/inlineEdit/js/InlineEdit.js b/docs/include/jscripts/infusion/components/inlineEdit/js/InlineEdit.js
new file mode 100644 (file)
index 0000000..476316f
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){function sendKey(control,event,virtualCode,charCode){var kE=document.createEvent("KeyEvents");kE.initKeyEvent(event,1,1,null,0,0,0,0,virtualCode,charCode);control.dispatchEvent(kE)}fluid.setCaretToEnd=function(control,value){var pos=value?value.length:0;try{control.focus();if(control.setSelectionRange){control.setSelectionRange(pos,pos);if($.browser.mozilla&&pos>0){sendKey(control,"keypress",92,92);sendKey(control,"keydown",8,0);sendKey(control,"keypress",8,0)}}else{if(control.createTextRange){var range=control.createTextRange();range.move("character",pos);range.select()}}}catch(e){}};fluid.deadMansBlur=function(control,exclusions,handler){var blurPending=false;$(control).blur(function(){blurPending=true;setTimeout(function(){if(blurPending){handler(control)}},150)});var canceller=function(){blurPending=false};exclusions.focus(canceller);exclusions.click(canceller)};var renderEditContainer=function(that,really){that.editContainer=that.locate("editContainer");that.editField=that.locate("edit");if(that.editContainer.length!==1){if(that.editField.length===1){that.editContainer=that.editField}else{if(that.editContainer.length>1){fluid.fail("InlineEdit did not find a unique container for selector "+that.options.selectors.editContainer+": "+fluid.dumpEl(that.editContainer))}}}if(that.editContainer.length===1&&!that.editField){that.editField=that.locate("edit",that.editContainer)}if(!really){return }var editElms=that.options.editModeRenderer(that);if(editElms){that.editContainer=editElms.container;that.editField=editElms.field}if(that.editField.length===0){fluid.fail("InlineEdit improperly initialised - editField could not be located (selector "+that.options.selectors.edit+")")}};var switchToViewMode=function(that){that.editContainer.hide();that.viewEl.show()};var cancel=function(that){if(that.isEditing()){setTimeout(function(){that.editView.value(that.model.value)},1);switchToViewMode(that);that.events.afterFinishEdit.fire(that.model.value,that.model.value,that.editField[0],that.viewEl[0])}};var finish=function(that){var newValue=that.editView.value();var oldValue=that.model.value;var viewNode=that.viewEl[0];var editNode=that.editField[0];var ret=that.events.onFinishEdit.fire(newValue,oldValue,editNode,viewNode);if(ret===false){return }that.updateModelValue(newValue);that.events.afterFinishEdit.fire(newValue,oldValue,editNode,viewNode);switchToViewMode(that)};var bindEditFinish=function(that){if(that.options.submitOnEnter===undefined){that.options.submitOnEnter="textarea"!==fluid.unwrap(that.editField).nodeName.toLowerCase()}function keyCode(evt){return evt.keyCode?evt.keyCode:(evt.which?evt.which:0)}var escHandler=function(evt){var code=keyCode(evt);if(code===$.ui.keyCode.ESCAPE){cancel(that);return false}};var finishHandler=function(evt){var code=keyCode(evt);if(code!==$.ui.keyCode.ENTER){return true}finish(that);that.viewEl.focus();return false};if(that.options.submitOnEnter){that.editContainer.keypress(finishHandler)}that.editContainer.keydown(escHandler)};var bindBlurHandler=function(that){if(that.options.blurHandlerBinder){that.options.blurHandlerBinder(that)}else{var blurHandler=function(evt){if(that.isEditing()){finish(that)}return false};that.editField.blur(blurHandler)}};var initializeEditView=function(that,initial){if(!that.editInitialized){renderEditContainer(that,!that.options.lazyEditView||!initial);if(!that.options.lazyEditView||!initial){that.editView=fluid.initSubcomponent(that,"editView",that.editField);$.extend(true,that.editView,fluid.initSubcomponent(that,"editAccessor",that.editField));bindEditFinish(that);bindBlurHandler(that);that.editView.refreshView(that);that.editInitialized=true}}};var edit=function(that){initializeEditView(that,false);var viewEl=that.viewEl;var displayText=that.displayView.value();that.updateModelValue(that.model.value===""?"":displayText);if(that.options.applyEditPadding){that.editField.width(Math.max(viewEl.width()+that.options.paddings.edit,that.options.paddings.minimumEdit))}viewEl.removeClass(that.options.styles.invitation);viewEl.removeClass(that.options.styles.focus);viewEl.hide();that.editContainer.show();if(that.tooltipEnabled()){$("#"+that.options.tooltipId).hide()}setTimeout(function(){that.editField.focus();fluid.setCaretToEnd(that.editField[0],that.editView.value());if(that.options.selectOnEdit){that.editField[0].select()}},0);that.events.afterBeginEdit.fire()};var clearEmptyViewStyles=function(textEl,defaultViewStyle,originalViewPadding){textEl.removeClass(defaultViewStyle);textEl.css("padding-right",originalViewPadding)};var showDefaultViewText=function(that){that.displayView.value(that.options.defaultViewText);that.viewEl.css("padding-right",that.existingPadding);that.viewEl.addClass(that.options.styles.defaultViewStyle)};var showNothing=function(that){that.displayView.value("");if($.browser.msie){if(that.viewEl.css("display")==="inline"){that.viewEl.css("display","inline-block")}}};var showEditedText=function(that){that.displayView.value(that.model.value);clearEmptyViewStyles(that.viewEl,that.options.styles.defaultViewStyle,that.existingPadding)};var refreshView=function(that,source){that.displayView.refreshView(that,source);if(that.editView){that.editView.refreshView(that,source)}};var initModel=function(that,value){that.model.value=value;that.refreshView()};var updateModelValue=function(that,newValue,source){var comparator=that.options.modelComparator;var unchanged=comparator?comparator(that.model.value,newValue):that.model.value===newValue;if(!unchanged){var oldModel=$.extend(true,{},that.model);that.model.value=newValue;that.events.modelChanged.fire(that.model,oldModel,source);that.refreshView(source)}};var bindHoverHandlers=function(viewEl,invitationStyle){var over=function(evt){viewEl.addClass(invitationStyle)};var out=function(evt){viewEl.removeClass(invitationStyle)};viewEl.hover(over,out)};var makeEditHandler=function(that){return function(){var prevent=that.events.onBeginEdit.fire();if(prevent===false){return false}edit(that);return true}};function makeEditTriggerGuard(that){var viewEl=fluid.unwrap(that.viewEl);return function(event){var outer=fluid.findAncestor(event.target,function(elem){if(/input|select|textarea|button|a/i.test(elem.nodeName)||elem===viewEl){return true}});if(outer===viewEl){that.edit();return false}}}var bindMouseHandlers=function(that){bindHoverHandlers(that.viewEl,that.options.styles.invitation);that.viewEl.click(makeEditTriggerGuard(that))};var bindHighlightHandler=function(viewEl,focusStyle,invitationStyle){var focusOn=function(){viewEl.addClass(focusStyle);viewEl.addClass(invitationStyle)};var focusOff=function(){viewEl.removeClass(focusStyle);viewEl.removeClass(invitationStyle)};viewEl.focus(focusOn);viewEl.blur(focusOff)};var bindKeyboardHandlers=function(that){fluid.tabbable(that.viewEl);var guard=makeEditTriggerGuard(that);fluid.activatable(that.viewEl,function(event){return guard(event)})};var aria=function(viewEl,editContainer){viewEl.attr("role","button")};var defaultEditModeRenderer=function(that){if(that.editContainer.length>0&&that.editField.length>0){return{container:that.editContainer,field:that.editField}}var editModeTemplate="<span><input type='text' class='flc-inlineEdit-edit fl-inlineEdit-edit'/></span>";var editContainer=$(editModeTemplate);var editField=$("input",editContainer);var componentContainerId=that.container.attr("id");if(componentContainerId){var editContainerId=componentContainerId+"-edit-container";var editFieldId=componentContainerId+"-edit";editContainer.attr("id",editContainerId);editField.attr("id",editFieldId)}that.viewEl.after(editContainer);return{container:editContainer,field:editField}};var makeIsEditing=function(that){var isEditing=false;that.events.onBeginEdit.addListener(function(){isEditing=true});that.events.afterFinishEdit.addListener(function(){isEditing=false});return function(){return isEditing}};var setupInlineEdit=function(componentContainer,that){var padding=that.viewEl.css("padding-right");that.existingPadding=padding?parseFloat(padding):0;initModel(that,that.displayView.value());bindMouseHandlers(that);bindKeyboardHandlers(that);bindHighlightHandler(that.viewEl,that.options.styles.focus,that.options.styles.invitation);aria(that.viewEl);if(that.editContainer){that.editContainer.hide()}var initTooltip=function(){if(that.tooltipEnabled()){that.viewEl.tooltip({delay:that.options.tooltipDelay,extraClass:that.options.styles.tooltip,bodyHandler:function(){return that.options.tooltipText},id:that.options.tooltipId})}};$(initTooltip);that.decorators=fluid.initSubcomponents(that,"componentDecorators",[that,fluid.COMPONENT_OPTIONS])};var setupInlineEdits=function(editables,options){var editors=[];editables.each(function(idx,editable){editors.push(fluid.inlineEdit($(editable),options))});return editors};fluid.inlineEdit=function(componentContainer,userOptions){var that=fluid.initView("inlineEdit",componentContainer,userOptions);that.viewEl=that.locate("text");that.displayView=fluid.initSubcomponent(that,"displayView",that.viewEl);$.extend(true,that.displayView,fluid.initSubcomponent(that,"displayAccessor",that.viewEl));that.model={value:""};that.edit=makeEditHandler(that);that.isEditing=makeIsEditing(that);that.finish=function(){finish(that)};that.cancel=function(){cancel(that)};that.tooltipEnabled=function(){return that.options.useTooltip&&$.fn.tooltip};that.refreshView=function(source){refreshView(that,source)};that.updateModelValue=function(newValue,source){updateModelValue(that,newValue,source)};that.updateModel=function(newModel,source){updateModelValue(that,newModel.value,source)};initializeEditView(that,true);setupInlineEdit(componentContainer,that);return that};fluid.inlineEdit.standardAccessor=function(element){var nodeName=element.nodeName.toLowerCase();var func="input"===nodeName||"textarea"===nodeName?"val":"text";return{value:function(newValue){return $(element)[func](newValue)}}};fluid.inlineEdit.richTextViewAccessor=function(element){return{value:function(newValue){return $(element).html(newValue)}}};fluid.inlineEdit.standardDisplayView=function(viewEl){var that={refreshView:function(componentThat,source){if(componentThat.model.value){showEditedText(componentThat)}else{if(componentThat.options.defaultViewText){showDefaultViewText(componentThat)}else{showNothing(componentThat)}}if(($.trim(componentThat.viewEl.text()).length===0)&&(componentThat.existingPadding<componentThat.options.paddings.minimumView)){componentThat.viewEl.css("padding-right",componentThat.options.paddings.minimumView)}}};return that};fluid.inlineEdit.standardEditView=function(editField){var that={refreshView:function(componentThat,source){if(componentThat.editField&&componentThat.editField.index(source)===-1){componentThat.editView.value(componentThat.model.value)}}};$.extend(true,that,fluid.inlineEdit.standardAccessor(editField));return that};fluid.inlineEdits=function(componentContainer,options){options=options||{};var selectors=$.extend({},fluid.defaults("inlineEdits").selectors,options.selectors);var container=fluid.container(componentContainer);var editables=$(selectors.editables,container);return setupInlineEdits(editables,options)};fluid.defaults("inlineEdit",{selectors:{text:".flc-inlineEdit-text",editContainer:".flc-inlineEdit-editContainer",edit:".flc-inlineEdit-edit"},styles:{text:"fl-inlineEdit-text",edit:"fl-inlineEdit-edit",invitation:"fl-inlineEdit-invitation",defaultViewStyle:"fl-inlineEdit-invitation-text",tooltip:"fl-inlineEdit-tooltip",focus:"fl-inlineEdit-focus"},events:{modelChanged:null,onBeginEdit:"preventable",afterBeginEdit:null,onFinishEdit:"preventable",afterFinishEdit:null,afterInitEdit:null},paddings:{edit:10,minimumEdit:80,minimumView:60},applyEditPadding:true,blurHandlerBinder:null,submitOnEnter:undefined,modelComparator:null,displayAccessor:{type:"fluid.inlineEdit.standardAccessor"},displayView:{type:"fluid.inlineEdit.standardDisplayView"},editAccessor:{type:"fluid.inlineEdit.standardAccessor"},editView:{type:"fluid.inlineEdit.standardEditView"},editModeRenderer:defaultEditModeRenderer,lazyEditView:false,defaultViewText:"Click here to edit",tooltipText:"Click item to edit",tooltipId:"tooltip",useTooltip:false,tooltipDelay:1000,selectOnEdit:false});fluid.defaults("inlineEdits",{selectors:{editables:".flc-inlineEditable"}})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/inlineEdit/js/InlineEditIntegrations.js b/docs/include/jscripts/infusion/components/inlineEdit/js/InlineEditIntegrations.js
new file mode 100644 (file)
index 0000000..b38d531
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var configureInlineEdit=function(configurationName,container,options){var defaults=fluid.defaults(configurationName);var assembleOptions=fluid.merge(defaults?defaults.mergePolicy:null,{},defaults,options);return fluid.inlineEdit(container,assembleOptions)};fluid.inlineEdit.normalizeHTML=function(value){var togo=$.trim(value.replace(/\s+/g," "));togo=togo.replace(/\s+<\//g,"</");togo=togo.replace(/\<(\S+)[^\>\s]*\>/g,function(match){return match.toLowerCase()});return togo};fluid.inlineEdit.htmlComparator=function(el1,el2){return fluid.inlineEdit.normalizeHTML(el1)===fluid.inlineEdit.normalizeHTML(el2)};fluid.inlineEdit.tinyMCE=function(container,options){var inlineEditor=configureInlineEdit("fluid.inlineEdit.tinyMCE",container,options);tinyMCE.init(inlineEditor.options.tinyMCE);return inlineEditor};fluid.inlineEdit.tinyMCE.viewAccessor=function(editField){return{value:function(newValue){var editor=tinyMCE.get(editField.id);if(!editor){return""}if(newValue){$(editField).val(newValue);editor.setContent(newValue,{format:"raw"})}else{return editor.getContent()}}}};fluid.inlineEdit.tinyMCE.blurHandlerBinder=function(that){function focusEditor(editor){setTimeout(function(){tinyMCE.execCommand("mceFocus",false,that.editField[0].id);if($.browser.mozilla&&$.browser.version.substring(0,3)==="1.8"){return }editor.selection.select(editor.getBody(),1);editor.selection.collapse(0)},10)}that.events.afterInitEdit.addListener(function(editor){focusEditor(editor);var editorBody=editor.getBody();fluid.deadMansBlur(that.editField,$(editorBody),function(){that.cancel()})});that.events.afterBeginEdit.addListener(function(){var editor=tinyMCE.get(that.editField[0].id);if(editor){focusEditor(editor)}})};fluid.inlineEdit.tinyMCE.editModeRenderer=function(that){var options=that.options.tinyMCE;options.elements=fluid.allocateSimpleId(that.editField);var oldinit=options.init_instance_callback;options.init_instance_callback=function(instance){that.events.afterInitEdit.fire(instance);if(oldinit){oldinit()}};tinyMCE.init(options)};fluid.defaults("fluid.inlineEdit.tinyMCE",{tinyMCE:{mode:"exact",theme:"simple"},useTooltip:true,selectors:{edit:"textarea"},styles:{invitation:"fl-inlineEdit-richText-invitation"},displayAccessor:{type:"fluid.inlineEdit.richTextViewAccessor"},editAccessor:{type:"fluid.inlineEdit.tinyMCE.viewAccessor"},lazyEditView:true,modelComparator:fluid.inlineEdit.htmlComparator,blurHandlerBinder:fluid.inlineEdit.tinyMCE.blurHandlerBinder,editModeRenderer:fluid.inlineEdit.tinyMCE.editModeRenderer});fluid.inlineEdit.FCKEditor=function(container,options){return configureInlineEdit("fluid.inlineEdit.FCKEditor",container,options)};fluid.inlineEdit.FCKEditor.complete=fluid.event.getEventFirer();fluid.inlineEdit.FCKEditor.complete.addListener(function(editor){var editField=editor.LinkedField;var that=$.data(editField,"fluid.inlineEdit.FCKEditor");that.events.afterInitEdit.fire(editor)});fluid.inlineEdit.FCKEditor.blurHandlerBinder=function(that){function focusEditor(editor){editor.Focus()}that.events.afterInitEdit.addListener(function(editor){focusEditor(editor);var editorBody=editor.EditingArea.TargetElement});that.events.afterBeginEdit.addListener(function(){var editor=fluid.inlineEdit.FCKEditor.byId(that.editField[0].id);if(editor){focusEditor(editor)}})};fluid.inlineEdit.FCKEditor.byId=function(id){var editor=typeof (FCKeditorAPI)==="undefined"?null:FCKeditorAPI.GetInstance(id);return editor};fluid.inlineEdit.FCKEditor.editModeRenderer=function(that){var id=fluid.allocateSimpleId(that.editField);$.data(fluid.unwrap(that.editField),"fluid.inlineEdit.FCKEditor",that);var oFCKeditor=new FCKeditor(id);var opcopy=fluid.copy(that.options.FCKEditor);opcopy.BasePath=opcopy.BasePath+"editor/";$.extend(true,oFCKeditor.Config,opcopy);$.extend(true,oFCKeditor,that.options.FCKEditor);oFCKeditor.Config.fluidInstance=that;oFCKeditor.ReplaceTextarea()};fluid.inlineEdit.FCKEditor.viewAccessor=function(editField){return{value:function(newValue){var editor=fluid.inlineEdit.FCKEditor.byId(editField.id);if(!editor){if(newValue){$(editField).val(newValue)}return""}if(newValue){editor.SetHTML(newValue)}else{return editor.GetHTML()}}}};fluid.defaults("fluid.inlineEdit.FCKEditor",{selectors:{edit:"textarea"},styles:{invitation:"fl-inlineEdit-richText-invitation"},displayAccessor:{type:"fluid.inlineEdit.richTextViewAccessor"},editAccessor:{type:"fluid.inlineEdit.FCKEditor.viewAccessor"},lazyEditView:true,modelComparator:fluid.inlineEdit.htmlComparator,blurHandlerBinder:fluid.inlineEdit.FCKEditor.blurHandlerBinder,editModeRenderer:fluid.inlineEdit.FCKEditor.editModeRenderer,FCKEditor:{BasePath:"fckeditor/"}});fluid.inlineEdit.dropdown=function(container,options){return configureInlineEdit("fluid.inlineEdit.dropdown",container,options)};fluid.inlineEdit.dropdown.editModeRenderer=function(that){var id=fluid.allocateSimpleId(that.editField);that.editField.selectbox({finishHandler:function(){that.finish()}});return{container:that.editContainer,field:$("input.selectbox",that.editContainer)}};fluid.inlineEdit.dropdown.blurHandlerBinder=function(that){fluid.deadMansBlur(that.editField,$("div.selectbox-wrapper li",that.editContainer),function(){that.cancel()})};fluid.defaults("fluid.inlineEdit.dropdown",{applyEditPadding:false,blurHandlerBinder:fluid.inlineEdit.dropdown.blurHandlerBinder,editModeRenderer:fluid.inlineEdit.dropdown.editModeRenderer})})(jQuery,fluid_1_1);function FCKeditor_OnComplete(editorInstance){fluid.inlineEdit.FCKEditor.complete.fire(editorInstance)};
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/pager/css/Pager.css b/docs/include/jscripts/infusion/components/pager/css/Pager.css
new file mode 100644 (file)
index 0000000..bb1bca8
--- /dev/null
@@ -0,0 +1,11 @@
+.fl-pager .fl-pager-data .fl-pager-desc{background:url(../images/arrow-up.png) no-repeat right;}
+.fl-pager .fl-pager-data .fl-pager-asc{background:url(../images/arrow-dn.png) no-repeat right;}
+.fl-pager .fl-pager-ui{margin:0;padding:0;}
+.fl-pager .fl-pager-ui li{list-style-type:none;display:inline;}
+.fl-pager .fl-pager-ui a{padding:0 3px;margin:0 2px;}
+.fl-pager .fl-pager-ui .fl-pager-links a{border:1px solid #ccc;background-color:#fff;zoom:1;}
+.fl-pager .fl-pager-ui .fl-pager-disabled,.fl-pager .fl-pager-ui .fl-pager-links .fl-pager-currentPage{color:#000;border:none;background-color:transparent;text-decoration:none;}
+.fl-pager .fl-pager-ui .fl-pager-links a:hover{background-color:#0287C5;color:#fff;text-decoration:none;}
+.fl-pager .fl-pager-ui .fl-pager-disabled:hover,.fl-pager .fl-pager-ui .fl-pager-links .fl-pager-currentPage:hover{background-color:transparent;color:#000;text-decoration:none;cursor:default;}
+.fl-theme-hc .fl-pager .fl-pager-data .fl-pager-desc{background:url(../images/arrow-up.png) no-repeat right;}
+.fl-theme-hc .fl-pager .fl-pager-data .fl-pager-asc{background:url(../images/arrow-dn.png) no-repeat right;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/pager/images/arrow-dn.png b/docs/include/jscripts/infusion/components/pager/images/arrow-dn.png
new file mode 100644 (file)
index 0000000..85fda0b
Binary files /dev/null and b/docs/include/jscripts/infusion/components/pager/images/arrow-dn.png differ
diff --git a/docs/include/jscripts/infusion/components/pager/images/arrow-up.png b/docs/include/jscripts/infusion/components/pager/images/arrow-up.png
new file mode 100644 (file)
index 0000000..1c67431
Binary files /dev/null and b/docs/include/jscripts/infusion/components/pager/images/arrow-up.png differ
diff --git a/docs/include/jscripts/infusion/components/pager/js/Pager.js b/docs/include/jscripts/infusion/components/pager/js/Pager.js
new file mode 100644 (file)
index 0000000..e0010c9
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){function updateStyles(pageListThat,newModel,oldModel){if(!pageListThat.pageLinks){return }if(oldModel.pageIndex!==undefined){var oldLink=pageListThat.pageLinks.eq(oldModel.pageIndex);oldLink.removeClass(pageListThat.options.styles.currentPage)}var pageLink=pageListThat.pageLinks.eq(newModel.pageIndex);pageLink.addClass(pageListThat.options.styles.currentPage)}function bindLinkClick(link,events,eventArg){link.unbind("click.fluid.pager");link.bind("click.fluid.pager",function(){events.initiatePageChange.fire(eventArg)})}function computePageCount(model){model.pageCount=Math.max(1,Math.floor((model.totalRange-1)/model.pageSize)+1)}function computePageLimit(model){return Math.min(model.totalRange,(model.pageIndex+1)*model.pageSize)}fluid.pager=function(){return fluid.pagerImpl.apply(null,arguments)};fluid.pager.directPageList=function(container,events,options){var that=fluid.initView("fluid.pager.directPageList",container,options);that.pageLinks=that.locate("pageLinks");for(var i=0;i<that.pageLinks.length;++i){var pageLink=that.pageLinks.eq(i);bindLinkClick(pageLink,events,{pageIndex:i})}events.onModelChange.addListener(function(newModel,oldModel){updateStyles(that,newModel,oldModel)});that.defaultModel={pageIndex:undefined,pageSize:1,totalRange:that.pageLinks.length};return that};fluid.iota=function(count,first){first=first||0;var togo=[];for(var i=0;i<count;++i){togo[togo.length]=first++}return togo};fluid.pager.everyPageStrategy=fluid.iota;fluid.pager.gappedPageStrategy=function(locality,midLocality){if(!locality){locality=3}if(!midLocality){midLocality=locality}return function(count,first,mid){var togo=[];var j=0;var lastSkip=false;for(var i=0;i<count;++i){if(i<locality||(count-i-1)<locality||(i>=mid-midLocality&&i<=mid+midLocality)){togo[j++]=i;lastSkip=false}else{if(!lastSkip){togo[j++]=-1;lastSkip=true}}}return togo}};fluid.pager.renderedPageList=function(container,events,pagerBarOptions,options,strings){options=$.extend(true,pagerBarOptions,options);var that=fluid.initView("fluid.pager.renderedPageList",container,options);options=that.options;var renderOptions={cutpoints:[{id:"page-link:link",selector:pagerBarOptions.selectors.pageLinks},{id:"page-link:skip",selector:pagerBarOptions.selectors.pageLinkSkip},{id:"page-link:disabled",selector:pagerBarOptions.selectors.pageLinkDisabled}]};if(options.linkBody){renderOptions.cutpoints[renderOptions.cutpoints.length]={id:"payload-component",selector:options.linkBody}}function pageToComponent(current){return function(page){return page===-1?{ID:"page-link:skip"}:{ID:page===current?"page-link:link":"page-link:link",localID:page+1,value:page+1,pageIndex:page,decorators:[{type:"jQuery",func:"click",args:function(){events.initiatePageChange.fire({pageIndex:page})}},{type:page===current?"addClass":"",classes:that.options.styles.currentPage}]}}}var root=that.locate("root");fluid.expectFilledSelector(root,"Error finding root template for fluid.pager.renderedPageList");var template=fluid.selfRender(root,{},renderOptions);events.onModelChange.addListener(function(newModel,oldModel){var pages=that.options.pageStrategy(newModel.pageCount,0,newModel.pageIndex);var pageTree=fluid.transform(pages,pageToComponent(newModel.pageIndex));pageTree[pageTree.length-1].value=pageTree[pageTree.length-1].value+strings.last;events.onRenderPageLinks.fire(pageTree,newModel);fluid.reRender(template,root,pageTree,renderOptions);updateStyles(that,newModel,oldModel)});return that};fluid.defaults("fluid.pager.renderedPageList",{selectors:{root:".flc-pager-links"},linkBody:"a",pageStrategy:fluid.pager.everyPageStrategy});var updatePreviousNext=function(that,options,newModel){if(newModel.pageIndex===0){that.previous.addClass(options.styles.disabled)}else{that.previous.removeClass(options.styles.disabled)}if(newModel.pageIndex===newModel.pageCount-1){that.next.addClass(options.styles.disabled)}else{that.next.removeClass(options.styles.disabled)}};fluid.pager.previousNext=function(container,events,options){var that=fluid.initView("fluid.pager.previousNext",container,options);that.previous=that.locate("previous");bindLinkClick(that.previous,events,{relativePage:-1});that.next=that.locate("next");bindLinkClick(that.next,events,{relativePage:+1});events.onModelChange.addListener(function(newModel,oldModel,overallThat){updatePreviousNext(that,options,newModel)});return that};fluid.pager.pagerBar=function(events,container,options,strings){var that=fluid.initView("fluid.pager.pagerBar",container,options);that.pageList=fluid.initSubcomponent(that,"pageList",[container,events,that.options,fluid.COMPONENT_OPTIONS,strings]);that.previousNext=fluid.initSubcomponent(that,"previousNext",[container,events,that.options,fluid.COMPONENT_OPTIONS,strings]);return that};fluid.defaults("fluid.pager.pagerBar",{previousNext:{type:"fluid.pager.previousNext"},pageList:{type:"fluid.pager.directPageList"},selectors:{pageLinks:".flc-pager-pageLink",pageLinkSkip:".flc-pager-pageLink-skip",pageLinkDisabled:".flc-pager-pageLink-disabled",previous:".flc-pager-previous",next:".flc-pager-next"},styles:{currentPage:"fl-pager-currentPage",disabled:"fl-pager-disabled"}});function getColumnDefs(that){return that.options.columnDefs}fluid.pager.findColumnDef=function(columnDefs,key){var columnDef=$.grep(columnDefs,function(def){return def.key===key})[0];return columnDef};function getRoots(target,overallThat,index){var cellRoot=(overallThat.options.dataOffset?overallThat.options.dataOffset+".":"");target.shortRoot=index;target.longRoot=cellRoot+target.shortRoot}function expandPath(EL,shortRoot,longRoot){if(EL.charAt(0)==="*"){return longRoot+EL.substring(1)}else{return EL.replace("*",shortRoot)}}fluid.pager.fetchValue=function(that,dataModel,index,valuebinding,roots){getRoots(roots,that,index);var path=expandPath(valuebinding,roots.shortRoot,roots.longRoot);return fluid.model.getBeanValue(dataModel,path)};fluid.pager.basicSorter=function(overallThat,model){var dataModel=overallThat.options.dataModel;var roots={};var columnDefs=getColumnDefs(overallThat);var columnDef=fluid.pager.findColumnDef(columnDefs,model.sortKey);var sortrecs=[];for(var i=0;i<model.totalRange;++i){sortrecs[i]={index:i,value:fluid.pager.fetchValue(overallThat,dataModel,i,columnDef.valuebinding,roots)}}var columnType=typeof sortrecs[0].value;function sortfunc(arec,brec){var a=arec.value;var b=brec.value;return a===b?0:(a>b?model.sortDir:-model.sortDir)}sortrecs.sort(sortfunc);return fluid.transform(sortrecs,function(row){return row.index})};fluid.pager.directModelFilter=function(model,pagerModel,perm){var togo=[];var limit=computePageLimit(pagerModel);for(var i=pagerModel.pageIndex*pagerModel.pageSize;i<limit;++i){var index=perm?perm[i]:i;togo[togo.length]={index:index,row:model[index]}}return togo};function expandVariables(value,opts){var togo="";var index=0;while(true){var nextindex=value.indexOf("${",index);if(nextindex===-1){togo+=value.substring(index);break}else{togo+=value.substring(index,nextindex);var endi=value.indexOf("}",nextindex+2);var EL=value.substring(nextindex+2,endi);if(EL==="VALUE"){EL=opts.EL}else{EL=expandPath(EL,opts.shortRoot,opts.longRoot)}var val=fluid.model.getBeanValue(opts.dataModel,EL);togo+=val;index=endi+1}}return togo}function expandPaths(target,tree,opts){for(var i in tree){var val=tree[i];if(val===fluid.VALUE){if(i==="valuebinding"){target[i]=opts.EL}else{target[i]={valuebinding:opts.EL}}}else{if(i==="valuebinding"){target[i]=expandPath(tree[i],opts)}else{if(typeof (val)==="object"){target[i]=val.length!==undefined?[]:{};expandPaths(target[i],val,opts)}else{if(typeof (val)==="string"){target[i]=expandVariables(val,opts)}else{target[i]=tree[i]}}}}}return target}function iDforColumn(columnDef,opts){var options=opts.options;var EL=columnDef.valuebinding;var key=columnDef.key;if(!EL){fluid.fail("Error in definition for column with key "+key+": valuebinding is not set")}opts.EL=expandPath(EL,opts.shortRoot,opts.longRoot);if(!key){var segs=fluid.model.parseEL(EL);key=segs[segs.length-1]}var ID=(options.keyPrefix?options.keyPrefix:"")+key;return ID}function expandColumnDefs(filteredRow,opts){var tree=fluid.transform(opts.columnDefs,function(columnDef){var ID=iDforColumn(columnDef,opts);var togo;if(!columnDef.components){return{ID:ID,valuebinding:opts.EL}}else{if(typeof columnDef.components==="function"){togo=columnDef.components(filteredRow.row,filteredRow.index)}else{togo=columnDef.components}}togo=expandPaths({},togo,opts);togo.ID=ID;return togo});return tree}function fetchModel(overallThat){return fluid.model.getBeanValue(overallThat.options.dataModel,overallThat.options.dataOffset)}function bigHeaderForKey(key,opts){var id=opts.options.renderOptions.idMap["header:"+key];var smallHeader=fluid.jById(id);if(smallHeader.length===0){return null}var headerSortStylisticOffset=opts.overallOptions.selectors.headerSortStylisticOffset;var bigHeader=fluid.findAncestor(smallHeader,function(element){return $(element).is(headerSortStylisticOffset)});return bigHeader}function setSortHeaderClass(styles,element,sort){element=$(element);element.removeClass(styles.ascendingHeader);element.removeClass(styles.descendingHeader);if(sort!==0){element.addClass(sort===1?styles.ascendingHeader:styles.descendingHeader)}}function isCurrentColumnSortable(columnDefs,model){var columnDef=model.sortKey?fluid.pager.findColumnDef(columnDefs,model.sortKey):null;return columnDef?columnDef.sortable:false}function setModelSortHeaderClass(newModel,opts){var styles=opts.overallOptions.styles;var sort=isCurrentColumnSortable(opts.columnDefs,newModel)?newModel.sortDir:0;setSortHeaderClass(styles,bigHeaderForKey(newModel.sortKey,opts),sort)}function fireModelChange(that,newModel,forceUpdate){computePageCount(newModel);if(newModel.pageIndex>=newModel.pageCount){newModel.pageIndex=newModel.pageCount-1}if(forceUpdate||newModel.pageIndex!==that.model.pageIndex||newModel.pageSize!==that.model.pageSize||newModel.sortKey!==that.model.sortKey||newModel.sortDir!==that.model.sortDir){var sorted=isCurrentColumnSortable(getColumnDefs(that),newModel)?that.options.sorter(that,newModel):null;that.permutation=sorted;that.events.onModelChange.fire(newModel,that.model,that);fluid.model.copyModel(that.model,newModel)}}function generateColumnClick(overallThat,columnDef,opts){return function(){if(columnDef.sortable===true){var model=overallThat.model;var newModel=fluid.copy(model);var styles=overallThat.options.styles;var oldKey=model.sortKey;if(columnDef.key!==model.sortKey){newModel.sortKey=columnDef.key;newModel.sortDir=1;var oldBig=bigHeaderForKey(oldKey,opts);if(oldBig){setSortHeaderClass(styles,oldBig,0)}}else{if(newModel.sortKey===columnDef.key){newModel.sortDir=-1*newModel.sortDir}else{return false}}newModel.pageIndex=0;fireModelChange(overallThat,newModel,true);setModelSortHeaderClass(newModel,opts)}return false}}function fetchHeaderDecorators(decorators,columnDef){return decorators[columnDef.sortable?"sortableHeader":"unsortableHeader"]}function generateHeader(overallThat,newModel,columnDefs,opts){return{children:fluid.transform(columnDefs,function(columnDef){return{ID:iDforColumn(columnDef,opts),value:columnDef.label,decorators:[{jQuery:["click",generateColumnClick(overallThat,columnDef,opts)]},{identify:"header:"+columnDef.key}].concat(fetchHeaderDecorators(opts.overallOptions.decorators,columnDef))}})}}fluid.pager.selfRender=function(overallThat,inOptions){var that=fluid.initView("fluid.pager.selfRender",overallThat.container,inOptions);var options=that.options;options.renderOptions.idMap=options.renderOptions.idMap||{};var idMap=options.renderOptions.idMap;var root=that.locate("root");var template=fluid.selfRender(root,{},options.renderOptions);root.addClass(options.styles.root);var columnDefs=getColumnDefs(overallThat);var expOpts={options:options,columnDefs:columnDefs,overallOptions:overallThat.options,dataModel:overallThat.options.dataModel,idMap:idMap};var directModel=fetchModel(overallThat);return{returnedOptions:{listeners:{onModelChange:function(newModel,oldModel){var filtered=overallThat.options.modelFilter(directModel,newModel,overallThat.permutation);var tree=fluid.transform(filtered,function(filteredRow){var roots=getRoots(expOpts,overallThat,filteredRow.index);if(columnDefs==="explode"){return fluid.explode(filteredRow.row,root)}else{if(columnDefs.length){return expandColumnDefs(filteredRow,expOpts)}}});var fullTree={};fullTree[options.row]=tree;if(typeof (columnDefs)==="object"){fullTree[options.header]=generateHeader(overallThat,newModel,columnDefs,expOpts)}options.renderOptions=options.renderOptions||{};options.renderOptions.model=expOpts.dataModel;fluid.reRender(template,root,fullTree,options.renderOptions);setModelSortHeaderClass(newModel,expOpts)}}}}};fluid.defaults("fluid.pager.selfRender",{selectors:{root:".flc-pager-body-template"},styles:{root:"fl-pager"},keyStrategy:"id",keyPrefix:"",row:"row:",header:"header:",renderOptions:{}});fluid.pager.summary=function(dom,options){var node=dom.locate("summary");return{returnedOptions:{listeners:{onModelChange:function(newModel,oldModel){var text=fluid.stringTemplate(options.message,{first:newModel.pageIndex*newModel.pageSize+1,last:computePageLimit(newModel),total:newModel.totalRange});if(node.length>0){node.text(text)}}}}}};fluid.pager.directPageSize=function(that){var node=that.locate("pageSize");if(node.length>0){that.events.onModelChange.addListener(function(newModel,oldModel){if(node.val()!==newModel.pageSize){node.val(newModel.pageSize)}});node.change(function(){that.events.initiatePageSizeChange.fire(node.val())})}return that};fluid.pager.rangeAnnotator=function(that,options){var roots={};that.events.onRenderPageLinks.addListener(function(tree,newModel){var column=that.options.annotateColumnRange;var dataModel=that.options.dataModel;var columnDefs=getColumnDefs(that);if(!column||!dataModel||!columnDefs){return }var columnDef=fluid.pager.findColumnDef(columnDefs,column);function fetchValue(index){index=that.permutation?that.permutation[index]:index;return fluid.pager.fetchValue(that,dataModel,index,columnDef.valuebinding,roots)}var tModel={};fluid.model.copyModel(tModel,newModel);fluid.transform(tree,function(cell){if(cell.ID==="page-link:link"){var page=cell.pageIndex;var start=page*tModel.pageSize;tModel.pageIndex=page;var limit=computePageLimit(tModel);var iValue=fetchValue(start);var lValue=fetchValue(limit-1);var text="<b>"+iValue+"</b><br/>&mdash;<br/><b>"+lValue+"</b>";var decorator={type:"jQuery",func:"tooltip",args:{delay:that.options.tooltipDelay,extraClass:that.options.styles.tooltip,bodyHandler:function(){return text},showURL:false,id:that.options.tooltipId}};cell.decorators.push(decorator)}})})};fluid.pagerImpl=function(container,options){var that=fluid.initView("fluid.pager",container,options);var pageIndexConformer=function(model,changeRequest){if(changeRequest.value<0){changeRequest.value=0}};that.events.initiatePageChange.addListener(function(arg){var newModel=fluid.copy(that.model);if(arg.relativePage!==undefined){newModel.pageIndex=that.model.pageIndex+arg.relativePage}else{newModel.pageIndex=arg.pageIndex}if(newModel.pageIndex===undefined||newModel.pageIndex<0){newModel.pageIndex=0}fireModelChange(that,newModel,arg.forceUpdate)});that.events.initiatePageSizeChange.addListener(function(arg){var newModel=fluid.copy(that.model);newModel.pageSize=arg;fireModelChange(that,newModel)});var pagerBarElement=that.locate("pagerBar");if(pagerBarElement.length>0){that.pagerBar=fluid.initSubcomponent(that,"pagerBar",[that.events,pagerBarElement,fluid.COMPONENT_OPTIONS,that.options.strings])}var pagerBarSecondaryElement=that.locate("pagerBarSecondary");if(pagerBarSecondaryElement.length>0){that.pagerBarSecondary=fluid.initSubcomponent(that,"pagerBar",[that.events,pagerBarSecondaryElement,fluid.COMPONENT_OPTIONS,that.options.strings])}that.bodyRenderer=fluid.initSubcomponent(that,"bodyRenderer",[that,fluid.COMPONENT_OPTIONS]);that.summary=fluid.initSubcomponent(that,"summary",[that.dom,fluid.COMPONENT_OPTIONS]);that.pageSize=fluid.initSubcomponent(that,"pageSize",[that]);that.rangeAnnotator=fluid.initSubcomponent(that,"rangeAnnotator",[that,fluid.COMPONENT_OPTIONS]);that.model=fluid.copy(that.options.model);var dataModel=fetchModel(that);if(dataModel){that.model.totalRange=dataModel.length}if(that.model.totalRange===undefined){if(!that.pagerBar){fluid.fail("Error in Pager configuration - cannot determine total range,  since not configured in model.totalRange and no PagerBar is configured")}that.model=that.pagerBar.pageList.defaultModel}that.applier=fluid.makeChangeApplier(that.model);that.events.initiatePageChange.fire({pageIndex:that.model.pageIndex?that.model.pageIndex:0,forceUpdate:true});return that};fluid.defaults("fluid.pager",{pagerBar:{type:"fluid.pager.pagerBar",options:null},summary:{type:"fluid.pager.summary",options:{message:"%first-%last of %total items"}},pageSize:{type:"fluid.pager.directPageSize"},modelFilter:fluid.pager.directModelFilter,sorter:fluid.pager.basicSorter,bodyRenderer:{type:"fluid.emptySubcomponent"},model:{pageIndex:undefined,pageSize:10,totalRange:undefined},dataModel:undefined,dataOffset:"",columnDefs:"explode",annotateColumnRange:undefined,tooltipDelay:300,tooltipId:"tooltip",rangeAnnotator:{type:"fluid.pager.rangeAnnotator"},selectors:{pagerBar:".flc-pager-top",pagerBarSecondary:".flc-pager-bottom",summary:".flc-pager-summary",pageSize:".flc-pager-page-size",headerSortStylisticOffset:".flc-pager-sort-header"},styles:{tooltip:"fl-pager-tooltip",ascendingHeader:"fl-pager-asc",descendingHeader:"fl-pager-desc"},decorators:{sortableHeader:[],unsortableHeader:[]},strings:{last:" (last)"},events:{initiatePageChange:null,initiatePageSizeChange:null,onModelChange:null,onRenderPageLinks:null}})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/progress/js/Progress.js b/docs/include/jscripts/infusion/components/progress/js/Progress.js
new file mode 100644 (file)
index 0000000..c1989c2
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var animateDisplay=function(elm,animation,defaultAnimation){animation=(animation)?animation:defaultAnimation;elm.animate(animation.params,animation.duration,animation.callback)};var animateProgress=function(elm,width,speed){elm.queue("fx",[]);elm.animate({width:width,queue:false},speed)};var showProgress=function(that,animation){if(animation===false){that.displayElement.show()}else{animateDisplay(that.displayElement,animation,that.options.showAnimation)}};var hideProgress=function(that,delay,animation){delay=(delay===null||isNaN(delay))?that.options.delay:delay;if(delay){var timeOut=setTimeout(function(){hideProgress(that,0,animation)},delay)}else{if(animation===false){that.displayElement.hide()}else{animateDisplay(that.displayElement,animation,that.options.hideAnimation)}}};var updateWidth=function(that,newWidth,dontAnimate){dontAnimate=dontAnimate||false;var currWidth=that.indicator.width();var direction=that.options.animate;if((newWidth>currWidth)&&(direction==="both"||direction==="forward")&&!dontAnimate){animateProgress(that.indicator,newWidth,that.options.speed)}else{if((newWidth<currWidth)&&(direction==="both"||direction==="backward")&&!dontAnimate){animateProgress(that.indicator,newWidth,that.options.speed)}else{that.indicator.width(newWidth)}}};var percentToPixels=function(that,percent){return Math.round((Math.min(percent,100)*that.progressBar.width())/100)};var refreshRelativeWidth=function(that){var pixels=Math.max(percentToPixels(that,parseFloat(that.storedPercent)),that.options.minWidth);updateWidth(that,pixels,true)};var initARIA=function(ariaElement){ariaElement.attr("role","progressbar");ariaElement.attr("aria-valuemin","0");ariaElement.attr("aria-valuemax","100");ariaElement.attr("aria-live","assertive");ariaElement.attr("aria-busy","false");ariaElement.attr("aria-valuenow","0");ariaElement.attr("aria-valuetext","")};var updateARIA=function(that,percent){var busy=percent<100&&percent>0;that.ariaElement.attr("aria-busy",busy);that.ariaElement.attr("aria-valuenow",percent);if(busy){var busyString=fluid.stringTemplate(that.options.ariaBusyText,{percentComplete:percent});that.ariaElement.attr("aria-valuetext",busyString)}else{if(percent===100){that.ariaElement.attr("aria-valuetext",that.options.ariaDoneText)}}};var updateText=function(label,value){label.html(value)};var repositionIndicator=function(that){that.indicator.css("top",that.progressBar.position().top).css("left",0).height(that.progressBar.height());refreshRelativeWidth(that)};var updateProgress=function(that,percent,labelText,animationForShow){showProgress(that,animationForShow);if(percent!==null){that.storedPercent=percent;var pixels=Math.max(percentToPixels(that,parseFloat(percent)),that.options.minWidth);updateWidth(that,pixels)}if(labelText!==null){updateText(that.label,labelText)}if(that.ariaElement){updateARIA(that,percent)}};var setupProgress=function(that){that.displayElement=that.locate("displayElement");if(that.options.initiallyHidden){that.displayElement.hide()}that.progressBar=that.locate("progressBar");that.label=that.locate("label");that.indicator=that.locate("indicator");that.ariaElement=that.locate("ariaElement");that.indicator.width(that.options.minWidth);that.storedPercent=0;if(that.ariaElement){initARIA(that.ariaElement)}};fluid.progress=function(container,options){var that=fluid.initView("fluid.progress",container,options);setupProgress(that);that.show=function(animation){showProgress(that,animation)};that.hide=function(delay,animation){hideProgress(that,delay,animation)};that.update=function(percentage,labelValue,animationForShow){updateProgress(that,percentage,labelValue,animationForShow)};that.refreshView=function(){repositionIndicator(that)};return that};fluid.defaults("fluid.progress",{selectors:{displayElement:".flc-progress",progressBar:".flc-progress-bar",indicator:".flc-progress-indicator",label:".flc-progress-label",ariaElement:".flc-progress-bar"},showAnimation:{params:{opacity:"show"},duration:"slow",callback:null},hideAnimation:{params:{opacity:"hide"},duration:"slow",callback:null},minWidth:5,delay:0,speed:200,animate:"forward",initiallyHidden:true,updatePosition:false,ariaBusyText:"Progress is %percentComplete percent complete",ariaDoneText:"Progress is complete."})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/reorderer/css/ImageReorderer.css b/docs/include/jscripts/infusion/components/reorderer/css/ImageReorderer.css
new file mode 100644 (file)
index 0000000..ce2b2d6
--- /dev/null
@@ -0,0 +1,16 @@
+.fl-reorderer-image-container{overflow:hidden;width:100%;margin-top:50px;}
+.fl-reorderer-image-container img{border:0;}
+.fl-reorderer-image-inner-container{height:100px;width:140px;background-color:#eee;overflow:hidden;margin:0 auto 3px auto;}
+.fl-reorderer-image-inner-container img{width:150px;}
+.fl-reorderer-movable-default,.fl-reorderer-movable-selected{height:150px!important;width:150px;border:2px solid #ddd;float:left;margin:5px!important;text-align:center;padding-top:10px;}
+.fl-reorderer-movable-hover{border-color:#666;}
+.fl-reorderer-movable-selected{border-color:#666;background-color:#ddd;cursor:move;}
+.fl-reorderer-movable-selected img{border:1px solid #eee;}
+.fl-reorderer-movable-dragging{height:150px!important;width:150px;border:2px solid #666;background-color:#eee;float:left;margin:5px!important;text-align:center;opacity:.2;filter:alpha(opacity=20);padding-top:10px;}
+.fl-reorderer-imageTitle{margin-top:5px;height:40px;overflow:hidden;}
+.fl-reorderer-imageTitle a{text-decoration:none;}
+.fl-reorderer-imageTitle a:hover{text-decoration:underline;}
+div .fl-reorderer-dropMarker{height:160px!important;margin:0 -2px;padding:0 2px;background-color:red;float:left;}
+.fl-reorderer-instructions{color:#666;background-color:lightyellow;padding:3px;border:2px solid #ddd;font-size:.9em;position:absolute;top:0;right:0;width:340px;}
+.fl-reorderer-downarrow{font-size:0;line-height:0;width:0;margin:5px 8px 30px 0;float:left;border-top:10px solid red;border-left:10px solid lightyellow;border-right:10px solid lightyellow;}
+.fl-reorderer-screen-reader-instructions{position:absolute;left:0;top:-500px;width:1px;height:1px;overflow:hidden;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/reorderer/css/Reorderer.css b/docs/include/jscripts/infusion/components/reorderer/css/Reorderer.css
new file mode 100644 (file)
index 0000000..ff343ce
--- /dev/null
@@ -0,0 +1,8 @@
+.fl-reorderer-movable-default{cursor:move;}
+.fl-reorderer-movable-selected{background-color:lightyellow!important;}
+.fl-reorderer-movable-hover{background-color:lightyellow;}
+.fl-reorderer-movable-dragging{background:#ccc!important;}
+.fl-reorderer-avatar{cursor:move;list-style-type:none;filter:alpha(opacity=75);opacity:.75;}
+.flc-reorderer-dropWarning,.fl-reorderer-dropWarning{display:none;padding:5px 25px;color:#fff;opacity:1;filter:alpha(opacity=100);background:#900 url('../images/themes/_common/exclamation.png') no-repeat 5px center;}
+.fluid-vertical-order .fl-reorderer-dropMarker{background-color:#F00!important;height:0;padding:2px 0 0 0;border-width:0;margin:-2px 0 0 0;list-style-type:none;font-size:0;line-height:0;overflow:hidden;}
+.fluid-horizontal-order .fl-reorderer-dropMarker{background-color:#F00!important;padding:0 3px;border-width:0;margin:0 -3px!important;list-style-type:none;overflow:hidden;width:0!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/reorderer/html/ImageReordererRSF.html b/docs/include/jscripts/infusion/components/reorderer/html/ImageReordererRSF.html
new file mode 100644 (file)
index 0000000..4162030
--- /dev/null
@@ -0,0 +1,285 @@
+<!DOCTYPE html      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\r
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+
+<!--  This is a multi purpose file used for:
+        1. as a stand alone example of the Lightbox 
+        2. as the RSF template for the image gallery tool 
+      Note that the RSF ids throughout this template are used by the gallery tool and are only necessary when using RSF.-->
+      \r
+<html xmlns="http://www.w3.org/1999/xhtml" \r
+  xmlns:rsf="http://ponder.org.uk/rsf">\r
+  \r
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+    <title>Fluid Image Reorderer</title>\r
+    <link href="../../../framework/fss/css/fss-reset.css" type="text/css" rel="stylesheet" media="all" />\r
+    <link href="../css/Reorderer.css" rsf:id="scr=contribute-style" type="text/css" rel="stylesheet" media="all" />\r
+    <link href="../css/ImageReorderer.css" rsf:id="scr=contribute-style" type="text/css" rel="stylesheet" media="all" />
+    
+    <!--  Required javascript modules for the Image Reorderer which can be replaced with the build generated file Fluid-all.js -->
+    <script type="text/javascript" src="../../../lib/jquery/core/js/jquery.js" rsf:id="scr=contribute-script"></script>\r
+    <script type="text/javascript" src="../../../lib/jquery/ui/js/ui.core.js" rsf:id="scr=contribute-script"></script>\r
+    <script type="text/javascript" src="../../../lib/jquery/ui/js/ui.draggable.js" rsf:id="scr=contribute-script"></script>\r
+    <script type="text/javascript" src="../../../framework/core/js/jquery.keyboard-a11y.js" rsf:id="scr=contribute-script"></script>
+    <script type="text/javascript" src="../../../framework/core/js/Fluid.js" rsf:id="scr=contribute-script"></script>\r
+    <script type="text/javascript" src="../../../framework/core/js/FluidDOMUtilities.js" rsf:id="scr=contribute-script"></script>\r
+    <script type="text/javascript" src="../../reorderer/js/GeometricManager.js" rsf:id="scr=contribute-script"></script>\r
+    <script type="text/javascript" src="../../reorderer/js/Reorderer.js" rsf:id="scr=contribute-script"></script>\r
+    <script type="text/javascript" src="../../reorderer/js/ImageReorderer.js" rsf:id="scr=contribute-script"></script>\r
+    
+    <!--  Ensure jQuery plays nice with other toolkits - must be called after all the javascript is loaded. --> 
+    <script type="text/javascript" rsf:id="scr=contribute-script">
+      jQuery.noConflict();
+    </script> 
+  </head>\r
+  <body>\r
+    <p id="para1">This is the Image Reorderer demo page.</p>\r
+
+    <!--  
+      The Lightbox uses hidden inputs as the strategy for posting the item order back 
+      to the server, therefore the orderables need to be enclosed in a form.
+    -->\r
+    <form id="reorder-form">\r
+
+      <!-- lightbox-parent is used for testing setup and teardown -->
+      <div rsf:id="lightbox:" id="lightbox-parent" >\r
+        <div rsf:id="lightbox-temp-container:" id="gallery:::gallery-thumbs:::" class="fl-reorderer-image-container" tabindex="2">\r
+         
+          <!--  
+            Orderable items are divs denoted by ids in the following form.
+            [lightbox-container-id] + lightbox-cell: + [index] + :  
+            The createLightboxFromId() function expects this format when attaching the javascript behaviour of the Lightbox. 
+          -->
+          <div rsf:id="lightbox-cell:" id="gallery:::gallery-thumbs:::lightbox-cell:0:">\r
+        \r
+            <div rsf:id="lightbox-client-cell:">
+            
+              <!--  The RSF gallery contains the markup for this inner div in another template. -->\r
+              <div class="fl-reorderer-image-inner-container">\r
+              \r
+                <a id="focus-element1" href="../images/Dragonfruit.jpg">\r
+                  <img id="fluid.img.first" src="../images/Dragonfruit.jpg" alt="Dragonfruit"/>\r
+                </a>\r
+              </div>\r
+              <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                <a href="../images/Dragonfruit.jpg" >Dragonfruit</a>\r
+              </div>\r
+            </div>
+          \r
+            <!--  \r
+              This input is used for posting the new order back to the server.\r
+              The value is the index of the thumbnail in a virtual array of thumbnails.\r
+              That is, 'value="0"' denotes the 0'th thumbnail; 'value="1"' the 1st,\r
+              and so on.\r
+            -->\r
+            <input rsf:id="reorder-index" id="gallery:::gallery-thumbs:::lightbox-cell:0:reorder-index" value="0" type="hidden"/>\r
+          </div>\r
+    
+          <!--  The remainder of the lightbox cells are used for the stand alone lightbox and the tests, not the RSF gallery -->\r
+          <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:1:">\r
+            <div>\r
+              <div class="fl-reorderer-image-inner-container">\r
+                <a href="../images/Kiwano.jpg" >\r
+                  <img id="fluid.img.second" src="../images/Kiwano.jpg" alt="Kiwano"/>\r
+                </a>\r
+              </div>\r
+              <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                <a href="../images/Kiwano.jpg" >Kiwano</a>\r
+              </div>\r
+            </div>\r
+            <input id="gallery:::gallery-thumbs:::lightbox-cell:1:reorder-index" value="1" type="hidden"/>      \r
+          </div>\r
+              \r
+          <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:2:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Blackberry.jpg" >\r
+                             <img id="fluid.img.3" src="../images/Blackberry.jpg" alt="Blackberry"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Blackberry.jpg" >Blackberry</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:2:reorder-index" value="2" type="hidden"/>\r
+                     </div>\r
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:3:">\r
+                 <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Cherry.jpg">\r
+                             <img id="fluid.img.4" src="../images/Cherry.jpg" alt="Cherry"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Cherry.jpg" >Cherry</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:3:reorder-index" value="3" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:4:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Fig.jpg">\r
+                             <img id="fluid.img.5" src="../images/Fig.jpg" alt="Fig"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Fig.jpg" >Fig</a>\r
+                         </div>\r
+                       </div>\r
+                 <input id="gallery:::gallery-thumbs:::lightbox-cell:4:reorder-index" value="4" type="hidden"/>        \r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:5:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Grapes.jpg">\r
+                             <img id="fluid.img.6" src="../images/Grapes.jpg" alt="Grapes"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Grapes.jpg" >Grapes</a>\r
+                         </div>\r
+                       </div>\r
+                 <input id="gallery:::gallery-thumbs:::lightbox-cell:5:reorder-index" value="5" type="hidden"/>\r
+                     </div>
+      
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:6:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Kiwi.jpg" >\r
+                             <img id="fluid.img.7" src="../images/Kiwi.jpg" alt="Kiwi"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Kiwi.jpg" >Kiwi</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:6:reorder-index" value="6" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:7:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Kumquat.jpg">\r
+                             <img id="fluid.img.8" src="../images/Kumquat.jpg" alt="Kumquat"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Kumquat.jpg" >Kumquat</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:7:reorder-index" value="7" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:8:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Lemon.jpg">\r
+                             <img id="fluid.img.9" src="../images/Lemon.jpg" alt="Lemon"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Lemon.jpg" >Lemon</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:8:reorder-index" value="8" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:9:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Orange.jpg">\r
+                             <img id="fluid.img.10" src="../images/Orange.jpg" alt="Orange"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Orange.jpg" >Orange</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:9:reorder-index" value="9" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:10:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/RedApple.jpg">\r
+                             <img id="fluid.img.11" src="../images/RedApple.jpg" alt="RedApple"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/RedApple.jpg" >RedApple</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:10:reorder-index" value="10" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:11:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Tamarillo.jpg">\r
+                             <img id="fluid.img.12" src="../images/Tamarillo.jpg" alt="Tamarillo"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Tamarillo.jpg" >Tamarillo</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:11:reorder-index" value="11" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:12:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Mangosteen.jpg">\r
+                             <img id="fluid.img.secondLast" src="../images/Mangosteen.jpg" alt="Mangosteen"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Mangosteen.jpg" >Mangosteen</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:12:reorder-index" value="12" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:13:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Banana.jpg">\r
+                             <img id="fluid.img.last" src="../images/Banana.jpg" alt="Banana"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Banana.jpg" >Banana</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:13:reorder-index" value="13" type="hidden"/>\r
+                     </div>\r
+                   </div>
+        
+        <!--  Attach the javascript functionality to the markup by using createLightboxFromId() -->\r
+        <script type="text/javascript"  rsf:id="init-script">\r
+          fluid.reorderImages("[id='gallery:::gallery-thumbs:::']");\r
+        </script>\r
+      </div>
+      \r
+      <!-- Sample instruction message. In the RSF gallery, this is supplied by the server. -->\r
+      <div class="fl-reorderer-instructions">\r
+        <div class="fl-reorderer-screen-reader-instructions" tabindex="1">Image Reorderer: To use the keyboard:\r
+                  Screen reader users turn off virtual cursor (insert + z).\r
+                  Select an image using i, k, m or j.\r
+                  Move an image using CTRL + i, k, m or j.\r
+                  View an image by pressing Enter.</div>\r
+        <div class="fl-reorderer-downarrow"></div>\r
+        <div tabindex="-1">\r
+          To use the keyboard:<br/>\r
+            Select an image using i, k, m or j, or the arrow keys.<br/>\r
+            View an image by pressing Enter.<br/>\r
+            Move an image using CTRL + a direction key. 
+        </div>\r
+      </div>\r
+    </form>\r
+  </body>\r
+</html>\r
diff --git a/docs/include/jscripts/infusion/components/reorderer/images/Banana.jpg b/docs/include/jscripts/infusion/components/reorderer/images/Banana.jpg
new file mode 100644 (file)
index 0000000..7967d44
Binary files /dev/null and b/docs/include/jscripts/infusion/components/reorderer/images/Banana.jpg differ
diff --git a/docs/include/jscripts/infusion/components/reorderer/images/Blackberry.jpg b/docs/include/jscripts/infusion/components/reorderer/images/Blackberry.jpg
new file mode 100644 (file)
index 0000000..159da7d
Binary files /dev/null and b/docs/include/jscripts/infusion/components/reorderer/images/Blackberry.jpg differ
diff --git a/docs/include/jscripts/infusion/components/reorderer/images/Cherry.jpg b/docs/include/jscripts/infusion/components/reorderer/images/Cherry.jpg
new file mode 100644 (file)
index 0000000..d89e4dd
Binary files /dev/null and b/docs/include/jscripts/infusion/components/reorderer/images/Cherry.jpg differ
diff --git a/docs/include/jscripts/infusion/components/reorderer/images/Dragonfruit.jpg b/docs/include/jscripts/infusion/components/reorderer/images/Dragonfruit.jpg
new file mode 100644 (file)
index 0000000..0845cf6
Binary files /dev/null and b/docs/include/jscripts/infusion/components/reorderer/images/Dragonfruit.jpg differ
diff --git a/docs/include/jscripts/infusion/components/reorderer/images/Fig.jpg b/docs/include/jscripts/infusion/components/reorderer/images/Fig.jpg
new file mode 100644 (file)
index 0000000..a6f6366
Binary files /dev/null and b/docs/include/jscripts/infusion/components/reorderer/images/Fig.jpg differ
diff --git a/docs/include/jscripts/infusion/components/reorderer/images/Grapes.jpg b/docs/include/jscripts/infusion/components/reorderer/images/Grapes.jpg
new file mode 100644 (file)
index 0000000..eb940e0
Binary files /dev/null and b/docs/include/jscripts/infusion/components/reorderer/images/Grapes.jpg differ
diff --git a/docs/include/jscripts/infusion/components/reorderer/images/Kiwano.jpg b/docs/include/jscripts/infusion/components/reorderer/images/Kiwano.jpg
new file mode 100644 (file)
index 0000000..a45b187
Binary files /dev/null and b/docs/include/jscripts/infusion/components/reorderer/images/Kiwano.jpg differ
diff --git a/docs/include/jscripts/infusion/components/reorderer/images/Kiwi.jpg b/docs/include/jscripts/infusion/components/reorderer/images/Kiwi.jpg
new file mode 100644 (file)
index 0000000..3df27b8
Binary files /dev/null and b/docs/include/jscripts/infusion/components/reorderer/images/Kiwi.jpg differ
diff --git a/docs/include/jscripts/infusion/components/reorderer/images/Kumquat.jpg b/docs/include/jscripts/infusion/components/reorderer/images/Kumquat.jpg
new file mode 100644 (file)
index 0000000..96db6fa
Binary files /dev/null and b/docs/include/jscripts/infusion/components/reorderer/images/Kumquat.jpg differ
diff --git a/docs/include/jscripts/infusion/components/reorderer/images/Lemon.jpg b/docs/include/jscripts/infusion/components/reorderer/images/Lemon.jpg
new file mode 100644 (file)
index 0000000..d0bd7c7
Binary files /dev/null and b/docs/include/jscripts/infusion/components/reorderer/images/Lemon.jpg differ
diff --git a/docs/include/jscripts/infusion/components/reorderer/images/Mangosteen.jpg b/docs/include/jscripts/infusion/components/reorderer/images/Mangosteen.jpg
new file mode 100644 (file)
index 0000000..e416ac9
Binary files /dev/null and b/docs/include/jscripts/infusion/components/reorderer/images/Mangosteen.jpg differ
diff --git a/docs/include/jscripts/infusion/components/reorderer/images/Orange.jpg b/docs/include/jscripts/infusion/components/reorderer/images/Orange.jpg
new file mode 100644 (file)
index 0000000..35ce31a
Binary files /dev/null and b/docs/include/jscripts/infusion/components/reorderer/images/Orange.jpg differ
diff --git a/docs/include/jscripts/infusion/components/reorderer/images/RedApple.jpg b/docs/include/jscripts/infusion/components/reorderer/images/RedApple.jpg
new file mode 100644 (file)
index 0000000..17368bf
Binary files /dev/null and b/docs/include/jscripts/infusion/components/reorderer/images/RedApple.jpg differ
diff --git a/docs/include/jscripts/infusion/components/reorderer/images/Tamarillo.jpg b/docs/include/jscripts/infusion/components/reorderer/images/Tamarillo.jpg
new file mode 100644 (file)
index 0000000..59ce319
Binary files /dev/null and b/docs/include/jscripts/infusion/components/reorderer/images/Tamarillo.jpg differ
diff --git a/docs/include/jscripts/infusion/components/reorderer/js/GeometricManager.js b/docs/include/jscripts/infusion/components/reorderer/js/GeometricManager.js
new file mode 100644 (file)
index 0000000..54a2269
--- /dev/null
@@ -0,0 +1 @@
+var fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.orientation={HORIZONTAL:4,VERTICAL:1};fluid.rectSides={4:["left","right"],1:["top","bottom"],8:"top",12:"bottom",2:"left",3:"right"};fluid.position={BEFORE:-1,AFTER:1,INSIDE:2,REPLACE:3};fluid.direction={NEXT:1,PREVIOUS:-1,UP:8,DOWN:12,LEFT:2,RIGHT:3};fluid.directionSign=function(direction){return direction===fluid.direction.UP||direction===fluid.direction.LEFT?fluid.direction.PREVIOUS:fluid.direction.NEXT};fluid.directionAxis=function(direction){return direction===fluid.direction.LEFT||direction===fluid.direction.RIGHT?0:1};fluid.directionOrientation=function(direction){return fluid.directionAxis(direction)?fluid.orientation.VERTICAL:fluid.orientation.HORIZONTAL};fluid.keycodeDirection={up:fluid.direction.UP,down:fluid.direction.DOWN,left:fluid.direction.LEFT,right:fluid.direction.RIGHT};fluid.moveDom=function(source,target,position){source=fluid.unwrap(source);target=fluid.unwrap(target);var scan;if(position===fluid.position.INSIDE){target.appendChild(source)}else{if(position===fluid.position.BEFORE){for(scan=target.previousSibling;;scan=scan.previousSibling){if(!scan||!fluid.dom.isIgnorableNode(scan)){if(scan!==source){fluid.dom.cleanseScripts(source);target.parentNode.insertBefore(source,target)}break}}}else{if(position===fluid.position.AFTER){for(scan=target.nextSibling;;scan=scan.nextSibling){if(!scan||!fluid.dom.isIgnorableNode(scan)){if(scan!==source){fluid.dom.cleanseScripts(source);fluid.dom.insertAfter(source,target)}break}}}else{fluid.fail("Unrecognised position supplied to fluid.moveDom: "+position)}}}};fluid.normalisePosition=function(position,samespan,targeti,sourcei){if(position===fluid.position.REPLACE){position=samespan&&targeti>=sourcei?fluid.position.AFTER:fluid.position.BEFORE}return position};fluid.permuteDom=function(element,target,position,sourceelements,targetelements){element=fluid.unwrap(element);target=fluid.unwrap(target);var sourcei=$.inArray(element,sourceelements);if(sourcei===-1){fluid.fail("Error in permuteDom: source element "+fluid.dumpEl(element)+" not found in source list "+fluid.dumpEl(sourceelements))}var targeti=$.inArray(target,targetelements);if(targeti===-1){fluid.fail("Error in permuteDom: target element "+fluid.dumpEl(target)+" not found in source list "+fluid.dumpEl(targetelements))}var samespan=sourceelements===targetelements;position=fluid.normalisePosition(position,samespan,targeti,sourcei);var oldn={};oldn[fluid.position.AFTER]=element.nextSibling;oldn[fluid.position.BEFORE]=element.previousSibling;fluid.moveDom(sourceelements[sourcei],targetelements[targeti],position);var frontlimit=samespan?targeti-1:sourceelements.length-2;var i;if(position===fluid.position.BEFORE&&samespan){frontlimit--}if(!samespan||targeti>sourcei){for(i=frontlimit;i>sourcei;--i){fluid.moveDom(sourceelements[i+1],sourceelements[i],fluid.position.AFTER)}if(sourcei+1<sourceelements.length){fluid.moveDom(sourceelements[sourcei+1],oldn[fluid.position.AFTER],fluid.position.BEFORE)}}var backlimit=samespan?sourcei-1:targetelements.length-1;if(position===fluid.position.AFTER){targeti++}if(!samespan||targeti<sourcei){for(i=targeti;i<backlimit;++i){fluid.moveDom(targetelements[i],targetelements[i+1],fluid.position.BEFORE)}if(backlimit>=0&&backlimit<targetelements.length-1){fluid.moveDom(targetelements[backlimit],oldn[fluid.position.BEFORE],fluid.position.AFTER)}}};var curCss=function(a,name){return window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(name):a.currentStyle[name]};var isAttached=function(node){while(node&&node.nodeName){if(node.nodeName==="BODY"){return true}node=node.parentNode}return false};var generalHidden=function(a){return"hidden"===a.type||curCss(a,"display")==="none"||curCss(a,"visibility")==="hidden"||!isAttached(a)};var computeGeometry=function(element,orientation,disposition){var elem={};elem.element=element;elem.orientation=orientation;if(disposition===fluid.position.INSIDE){elem.position=disposition}if(generalHidden(element)){elem.clazz="hidden"}var pos=fluid.dom.computeAbsolutePosition(element)||[0,0];var width=element.offsetWidth;var height=element.offsetHeight;elem.rect={left:pos[0],top:pos[1]};elem.rect.right=pos[0]+width;elem.rect.bottom=pos[1]+height;return elem};var SENTINEL_DIMENSION=10000;function dumprect(rect){return"Rect top: "+rect.top+" left: "+rect.left+" bottom: "+rect.bottom+" right: "+rect.right}function dumpelem(cacheelem){if(!cacheelem||!cacheelem.rect){return"null"}else{return dumprect(cacheelem.rect)+" position: "+cacheelem.position+" for "+fluid.dumpEl(cacheelem.element)}}fluid.dropManager=function(){var targets=[];var cache={};var that={};var lastClosest;function cacheKey(element){return $(element).data("")}function sentinelizeElement(targets,sides,cacheelem,fc,disposition,clazz){var elemCopy=$.extend(true,{},cacheelem);elemCopy.rect[sides[fc]]=elemCopy.rect[sides[1-fc]]+(fc?1:-1);elemCopy.rect[sides[1-fc]]=(fc?-1:1)*SENTINEL_DIMENSION;elemCopy.position=disposition===fluid.position.INSIDE?disposition:(fc?fluid.position.BEFORE:fluid.position.AFTER);elemCopy.clazz=clazz;targets[targets.length]=elemCopy}function splitElement(targets,sides,cacheelem,disposition,clazz1,clazz2){var elem1=$.extend(true,{},cacheelem);var elem2=$.extend(true,{},cacheelem);var midpoint=(elem1.rect[sides[0]]+elem1.rect[sides[1]])/2;elem1.rect[sides[1]]=midpoint;elem1.position=fluid.position.BEFORE;elem2.rect[sides[0]]=midpoint;elem2.position=fluid.position.AFTER;elem1.clazz=clazz1;elem2.clazz=clazz2;targets[targets.length]=elem1;targets[targets.length]=elem2}function getRelativeClass(thisElements,index,relative,thisclazz,mapper){index+=relative;if(index<0&&thisclazz==="locked"){return"locked"}if(index>=thisElements.length||mapper===null){return null}else{relative=thisElements[index];return mapper(relative)==="locked"&&thisclazz==="locked"?"locked":null}}var lastGeometry;var displacementX,displacementY;that.updateGeometry=function(geometricInfo){lastGeometry=geometricInfo;targets=[];cache={};var mapper=geometricInfo.elementMapper;for(var i=0;i<geometricInfo.extents.length;++i){var thisInfo=geometricInfo.extents[i];var orientation=thisInfo.orientation;var sides=fluid.rectSides[orientation];var processElement=function(element,sentB,sentF,disposition,j){var cacheelem=computeGeometry(element,orientation,disposition);cacheelem.owner=thisInfo;if(cacheelem.clazz!=="hidden"&&mapper){cacheelem.clazz=mapper(element)}cache[$.data(element)]=cacheelem;var backClass=getRelativeClass(thisInfo.elements,j,fluid.position.BEFORE,cacheelem.clazz,mapper);var frontClass=getRelativeClass(thisInfo.elements,j,fluid.position.AFTER,cacheelem.clazz,mapper);if(disposition===fluid.position.INSIDE){targets[targets.length]=cacheelem}else{splitElement(targets,sides,cacheelem,disposition,backClass,frontClass)}if(sentB&&geometricInfo.sentinelize){sentinelizeElement(targets,sides,cacheelem,1,disposition,backClass)}if(sentF&&geometricInfo.sentinelize){sentinelizeElement(targets,sides,cacheelem,0,disposition,frontClass)}return cacheelem};var allHidden=true;for(var j=0;j<thisInfo.elements.length;++j){var element=thisInfo.elements[j];var cacheelem=processElement(element,j===0,j===thisInfo.elements.length-1,fluid.position.INTERLEAVED,j);if(cacheelem.clazz!=="hidden"){allHidden=false}}if(allHidden&&thisInfo.parentElement){processElement(thisInfo.parentElement,true,true,fluid.position.INSIDE)}}};that.startDrag=function(event,handlePos,handleWidth,handleHeight){var handleMidX=handlePos[0]+handleWidth/2;var handleMidY=handlePos[1]+handleHeight/2;var dX=handleMidX-event.pageX;var dY=handleMidY-event.pageY;that.updateGeometry(lastGeometry);lastClosest=null;displacementX=dX;displacementY=dY;$("").bind("mousemove.fluid-dropManager",that.mouseMove)};that.lastPosition=function(){return lastClosest};that.endDrag=function(){$("").unbind("mousemove.fluid-dropManager")};that.mouseMove=function(evt){var x=evt.pageX+displacementX;var y=evt.pageY+displacementY;var closestTarget=that.closestTarget(x,y,lastClosest);if(closestTarget&&closestTarget!==fluid.dropManager.NO_CHANGE){lastClosest=closestTarget;that.dropChangeFirer.fire(closestTarget)}};that.dropChangeFirer=fluid.event.getEventFirer();var blankHolder={element:null};that.closestTarget=function(x,y,lastClosest){var mindistance=Number.MAX_VALUE;var minelem=blankHolder;var minlockeddistance=Number.MAX_VALUE;var minlockedelem=blankHolder;for(var i=0;i<targets.length;++i){var cacheelem=targets[i];if(cacheelem.clazz==="hidden"){continue}var distance=fluid.geom.minPointRectangle(x,y,cacheelem.rect);if(cacheelem.clazz==="locked"){if(distance<minlockeddistance){minlockeddistance=distance;minlockedelem=cacheelem}}else{if(distance<mindistance){mindistance=distance;minelem=cacheelem}if(distance===0){break}}}if(!minelem){return minelem}if(minlockeddistance>=mindistance){minlockedelem=blankHolder}if(lastClosest&&lastClosest.position===minelem.position&&fluid.unwrap(lastClosest.element)===fluid.unwrap(minelem.element)&&fluid.unwrap(lastClosest.lockedelem)===fluid.unwrap(minlockedelem.element)){return fluid.dropManager.NO_CHANGE}return{position:minelem.position,element:minelem.element,lockedelem:minlockedelem.element}};that.shuffleProjectFrom=function(element,direction,includeLocked){var togo=that.projectFrom(element,direction,includeLocked);togo.position=fluid.position.REPLACE;return togo};that.projectFrom=function(element,direction,includeLocked){that.updateGeometry(lastGeometry);var cacheelem=cache[cacheKey(element)];var projected=fluid.geom.projectFrom(cacheelem.rect,direction,targets,includeLocked);if(!projected.cacheelem){return null}var retpos=projected.cacheelem.position;return{element:projected.cacheelem.element,position:retpos?retpos:fluid.position.BEFORE}};function getRelativeElement(element,direction,elements){var folded=fluid.directionSign(direction);var index=$(elements).index(element)+folded;if(index<0){index+=elements.length}index%=elements.length;return elements[index]}that.logicalFrom=function(element,direction,includeLocked){var orderables=that.getOwningSpan(element,fluid.position.INTERLEAVED,includeLocked);return{element:getRelativeElement(element,direction,orderables),position:fluid.position.REPLACE}};that.lockedWrapFrom=function(element,direction,includeLocked){var base=that.logicalFrom(element,direction,includeLocked);var selectables=that.getOwningSpan(element,fluid.position.INTERLEAVED,includeLocked);var allElements=cache[cacheKey(element)].owner.elements;if(includeLocked||selectables[0]===allElements[0]){return base}var directElement=getRelativeElement(element,direction,allElements);if(lastGeometry.elementMapper(directElement)==="locked"){base.element=null;base.clazz="locked"}return base};that.getOwningSpan=function(element,position,includeLocked){var owner=cache[cacheKey(element)].owner;var elements=position===fluid.position.INSIDE?[owner.parentElement]:owner.elements;if(!includeLocked&&lastGeometry.elementMapper){elements=$.makeArray(elements);fluid.remove_if(elements,function(element){return lastGeometry.elementMapper(element)==="locked"})}return elements};that.geometricMove=function(element,target,position){var sourceElements=that.getOwningSpan(element,null,true);var targetElements=that.getOwningSpan(target,position,true);fluid.permuteDom(element,target,position,sourceElements,targetElements)};return that};fluid.dropManager.NO_CHANGE="no change";fluid.geom=fluid.geom||{};fluid.geom.minPointRectangle=function(x,y,rectangle){var dx=x<rectangle.left?(rectangle.left-x):(x>rectangle.right?(x-rectangle.right):0);var dy=y<rectangle.top?(rectangle.top-y):(y>rectangle.bottom?(y-rectangle.bottom):0);return dx*dx+dy*dy};fluid.geom.minRectRect=function(rect1,rect2){var dx=rect1.right<rect2.left?rect2.left-rect1.right:rect2.right<rect1.left?rect1.left-rect2.right:0;var dy=rect1.bottom<rect2.top?rect2.top-rect1.bottom:rect2.bottom<rect1.top?rect1.top-rect2.bottom:0;return dx*dx+dy*dy};var makePenCollect=function(){return{mindist:Number.MAX_VALUE,minrdist:Number.MAX_VALUE}};fluid.geom.projectFrom=function(baserect,direction,targets,forSelection){var axis=fluid.directionAxis(direction);var frontSide=fluid.rectSides[direction];var backSide=fluid.rectSides[axis*15+5-direction];var dirSign=fluid.directionSign(direction);var penrect={left:(7*baserect.left+1*baserect.right)/8,right:(5*baserect.left+3*baserect.right)/8,top:(7*baserect.top+1*baserect.bottom)/8,bottom:(5*baserect.top+3*baserect.bottom)/8};penrect[frontSide]=dirSign*SENTINEL_DIMENSION;penrect[backSide]=-penrect[frontSide];function accPen(collect,cacheelem,backSign){var thisrect=cacheelem.rect;var pdist=fluid.geom.minRectRect(penrect,thisrect);var rdist=-dirSign*backSign*(baserect[backSign===1?frontSide:backSide]-thisrect[backSign===1?backSide:frontSide]);if(pdist<=collect.mindist&&rdist>=0){if(pdist===collect.mindist&&rdist*backSign>collect.minrdist){return }collect.minrdist=rdist*backSign;collect.mindist=pdist;collect.minelem=cacheelem}}var collect=makePenCollect();var backcollect=makePenCollect();var lockedcollect=makePenCollect();for(var i=0;i<targets.length;++i){var elem=targets[i];var isPure=elem.owner&&elem.element===elem.owner.parentElement;if(elem.clazz==="hidden"||forSelection&&isPure){continue}else{if(!forSelection&&elem.clazz==="locked"){accPen(lockedcollect,elem,1)}else{accPen(collect,elem,1);accPen(backcollect,elem,-1)}}}var wrap=!collect.minelem||backcollect.mindist<collect.mindist;var mincollect=wrap?backcollect:collect;var togo={wrapped:wrap,cacheelem:mincollect.minelem};if(lockedcollect.mindist<mincollect.mindist){togo.lockedelem=lockedcollect.minelem}return togo}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/reorderer/js/ImageReorderer.js b/docs/include/jscripts/infusion/components/reorderer/js/ImageReorderer.js
new file mode 100644 (file)
index 0000000..5504818
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var deriveLightboxCellBase=function(namebase,index){return namebase+"lightbox-cell:"+index+":"};var addThumbnailActivateHandler=function(lightboxContainer){var enterKeyHandler=function(evt){if(evt.which===fluid.reorderer.keys.ENTER){var thumbnailAnchors=$("a",evt.target);document.location=thumbnailAnchors.attr("href")}};$(lightboxContainer).keypress(enterKeyHandler)};var seekNodesById=function(rootnode,tagname,idmatch){var inputs=rootnode.getElementsByTagName(tagname);var togo=[];for(var i=0;i<inputs.length;i+=1){var input=inputs[i];var id=input.id;if(id&&id.match(idmatch)){togo.push(input)}}return togo};var createItemFinder=function(parentNode,containerId){var lightboxCellNamePattern="^"+deriveLightboxCellBase(containerId,"[0-9]+")+"$";return function(){return seekNodesById(parentNode,"div",lightboxCellNamePattern)}};var findForm=function(element){while(element){if(element.nodeName.toLowerCase()==="form"){return element}element=element.parentNode}};var defaultAfterMoveCallback=function(lightboxContainer){var reorderform=findForm(lightboxContainer);return function(){var inputs,i;inputs=seekNodesById(reorderform,"input","^"+deriveLightboxCellBase(lightboxContainer.id,"[^:]*")+"reorder-index$");for(i=0;i<inputs.length;i+=1){inputs[i].value=i}if(reorderform&&reorderform.action){$.post(reorderform.action,$(reorderform).serialize(),function(type,data,evt){})}}};fluid.defaults("fluid.reorderImages",{layoutHandler:"fluid.gridLayoutHandler",selectors:{imageTitle:".flc-reorderer-imageTitle"}});fluid.reorderImages=function(container,options){var that=fluid.initView("fluid.reorderImages",container,options);var containerEl=fluid.unwrap(that.container);if(!that.options.afterMoveCallback){that.options.afterMoveCallback=defaultAfterMoveCallback(containerEl)}if(!that.options.selectors.movables){that.options.selectors.movables=createItemFinder(containerEl,containerEl.id)}var reorderer=fluid.reorderer(container,that.options);var movables=reorderer.locate("movables");fluid.transform(movables,function(cell){fluid.reorderImages.addAriaRoles(that.options.selectors.imageTitle,cell)});fluid.tabindex($("a",container),-1);addThumbnailActivateHandler(container);return reorderer};fluid.reorderImages.addAriaRoles=function(imageTitle,cell){cell=$(cell);cell.attr("role","img");var title=$(imageTitle,cell);if(title[0]===cell[0]||title[0]===document){fluid.fail("Could not locate cell title using selector "+imageTitle+" in context "+fluid.dumpEl(cell))}var titleId=fluid.allocateSimpleId(title);cell.attr("aria-labelledby",titleId);var image=$("img",cell);image.attr("role","presentation");image.attr("alt","")};fluid.lightbox=fluid.reorderImages})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/reorderer/js/LayoutReorderer.js b/docs/include/jscripts/infusion/components/reorderer/js/LayoutReorderer.js
new file mode 100644 (file)
index 0000000..b0676e0
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.reorderLayout=function(container,userOptions){var assembleOptions={layoutHandler:"fluid.moduleLayoutHandler",selectors:{columns:".flc-reorderer-column",modules:".flc-reorderer-module"}};var options=$.extend(true,assembleOptions,userOptions);return fluid.reorderer(container,options)}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/reorderer/js/ModuleLayout.js b/docs/include/jscripts/infusion/components/reorderer/js/ModuleLayout.js
new file mode 100644 (file)
index 0000000..785e7dc
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.moduleLayout=fluid.moduleLayout||{};var findColumnAndItemIndices=function(item,layout){return fluid.find(layout.columns,function(column,colIndex){var index=$.inArray(item,column.elements);return index===-1?null:{columnIndex:colIndex,itemIndex:index}},{columnIndex:-1,itemIndex:-1})};var findColIndex=function(item,layout){return fluid.find(layout.columns,function(column,colIndex){return item===column.container?colIndex:null},-1)};fluid.moduleLayout.updateLayout=function(item,target,position,layout){item=fluid.unwrap(item);target=fluid.unwrap(target);var itemIndices=findColumnAndItemIndices(item,layout);layout.columns[itemIndices.columnIndex].elements.splice(itemIndices.itemIndex,1);var targetCol;if(position===fluid.position.INSIDE){targetCol=layout.columns[findColIndex(target,layout)].elements;targetCol.splice(targetCol.length,0,item)}else{var relativeItemIndices=findColumnAndItemIndices(target,layout);targetCol=layout.columns[relativeItemIndices.columnIndex].elements;position=fluid.normalisePosition(position,itemIndices.columnIndex===relativeItemIndices.columnIndex,relativeItemIndices.itemIndex,itemIndices.itemIndex);var relative=position===fluid.position.BEFORE?0:1;targetCol.splice(relativeItemIndices.itemIndex+relative,0,item)}};fluid.moduleLayout.layoutFromFlat=function(container,columns,portlets){var layout={};layout.container=container;layout.columns=fluid.transform(columns,function(column){return{container:column,elements:$.makeArray(portlets.filter(function(){return fluid.dom.isContainer(column,this)}))}});return layout};fluid.moduleLayout.layoutFromIds=function(idLayout){return{container:fluid.byId(idLayout.id),columns:fluid.transform(idLayout.columns,function(column){return{container:fluid.byId(column.id),elements:fluid.transform(column.children,fluid.byId)}})}};fluid.moduleLayout.layoutToIds=function(idLayout){return{id:fluid.getId(idLayout.container),columns:fluid.transform(idLayout.columns,function(column){return{id:fluid.getId(column.container),children:fluid.transform(column.elements,fluid.getId)}})}};var defaultOnShowKeyboardDropWarning=function(item,dropWarning){if(dropWarning){var offset=$(item).offset();dropWarning=$(dropWarning);dropWarning.css("position","absolute");dropWarning.css("top",offset.top);dropWarning.css("left",offset.left)}};fluid.defaults(true,"fluid.moduleLayoutHandler",{orientation:fluid.orientation.VERTICAL,containerRole:fluid.reorderer.roles.REGIONS,selectablesTabindex:0,sentinelize:true});fluid.moduleLayoutHandler=function(container,options,dropManager,dom){var that={};function computeLayout(){var togo;if(options.selectors.modules){togo=fluid.moduleLayout.layoutFromFlat(container,dom.locate("columns"),dom.locate("modules"))}if(!togo){var idLayout=fluid.model.getBeanValue(options,"moduleLayout.layout");fluid.moduleLayout.layoutFromIds(idLayout)}return togo}var layout=computeLayout();that.layout=layout;function isLocked(item){var lockedModules=options.selectors.lockedModules?dom.fastLocate("lockedModules"):[];return $.inArray(item,lockedModules)!==-1}that.getRelativePosition=fluid.reorderer.relativeInfoGetter(options.orientation,fluid.reorderer.WRAP_LOCKED_STRATEGY,fluid.reorderer.GEOMETRIC_STRATEGY,dropManager,dom);that.getGeometricInfo=function(){var extents=[];var togo={extents:extents,sentinelize:options.sentinelize};togo.elementMapper=function(element){return isLocked(element)?"locked":null};for(var col=0;col<layout.columns.length;col++){var column=layout.columns[col];var thisEls={orientation:options.orientation,elements:$.makeArray(column.elements),parentElement:column.container};extents.push(thisEls)}return togo};function computeModules(all){return function(){var modules=fluid.accumulate(layout.columns,function(column,list){return list.concat(column.elements)},[]);if(!all){fluid.remove_if(modules,isLocked)}return modules}}that.returnedOptions={selectors:{movables:computeModules(false),dropTargets:computeModules(false),selectables:computeModules(true)},listeners:{onMove:function(item,requestedPosition){fluid.moduleLayout.updateLayout(item,requestedPosition.element,requestedPosition.position,layout)},onRefresh:function(){layout=computeLayout();that.layout=layout},"onShowKeyboardDropWarning.setPosition":defaultOnShowKeyboardDropWarning}};that.getModel=function(){return fluid.moduleLayout.layoutToIds(layout)};return that}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/reorderer/js/Reorderer.js b/docs/include/jscripts/infusion/components/reorderer/js/Reorderer.js
new file mode 100644 (file)
index 0000000..4122d9c
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var defaultAvatarCreator=function(item,cssClass,dropWarning){var avatar=$(item).clone();fluid.dom.iterateDom(avatar.get(0),function(node){if(node.tagName.toLowerCase()==="script"){return"delete"}node.removeAttribute("id");if(node.tagName.toLowerCase()==="input"){node.setAttribute("disabled","disabled")}});avatar.removeAttr("id");avatar.removeClass("ui-droppable");avatar.addClass(cssClass);if(dropWarning){var avatarContainer=$(document.createElement("div"));avatarContainer.append(avatar);avatarContainer.append(dropWarning);avatar=avatarContainer}$("body").append(avatar);if(!$.browser.safari){avatar.css("display","block").width(item.offsetWidth).height(item.offsetHeight)}if($.browser.opera){avatar.hide()}return avatar};function firstSelectable(that){var selectables=that.dom.fastLocate("selectables");if(selectables.length<=0){return null}return selectables[0]}function bindHandlersToContainer(container,keyDownHandler,keyUpHandler,mouseMoveHandler){var actualKeyDown=keyDownHandler;var advancedPrevention=false;if($.browser.opera){container.keypress(function(evt){if(advancedPrevention){advancedPrevention=false;evt.preventDefault();return false}});actualKeyDown=function(evt){var oldret=keyDownHandler(evt);if(oldret===false){advancedPrevention=true}}}container.keydown(actualKeyDown);container.keyup(keyUpHandler)}function addRolesToContainer(that){var first=that.dom.fastLocate("selectables")[0];that.container.attr("role",that.options.containerRole.container);that.container.attr("aria-multiselectable","false");that.container.attr("aria-readonly","false");that.container.attr("aria-disabled","false")}function createAvatarId(parentId){return parentId+"_avatar"}var adaptKeysets=function(options){if(options.keysets&&!(options.keysets instanceof Array)){options.keysets=[options.keysets]}};fluid.reorderer=function(container,options){if(!container){fluid.fail("Reorderer initialised with no container")}var thatReorderer=fluid.initView("fluid.reorderer",container,options);options=thatReorderer.options;var dropManager=fluid.dropManager();thatReorderer.layoutHandler=fluid.initSubcomponent(thatReorderer,"layoutHandler",[container,options,dropManager,thatReorderer.dom]);thatReorderer.activeItem=undefined;adaptKeysets(options);var kbDropWarning=thatReorderer.locate("dropWarning");var mouseDropWarning;if(kbDropWarning){mouseDropWarning=kbDropWarning.clone()}var isMove=function(evt){var keysets=options.keysets;for(var i=0;i<keysets.length;i++){if(keysets[i].modifier(evt)){return true}}return false};var isActiveItemMovable=function(){return $.inArray(thatReorderer.activeItem,thatReorderer.dom.fastLocate("movables"))>=0};var setDropEffects=function(value){thatReorderer.dom.fastLocate("dropTargets").attr("aria-dropeffect",value)};var styles=options.styles;var noModifier=function(evt){return(!evt.ctrlKey&&!evt.altKey&&!evt.shiftKey&&!evt.metaKey)};var handleDirectionKeyDown=function(evt){var item=thatReorderer.activeItem;if(!item){return true}var keysets=options.keysets;for(var i=0;i<keysets.length;i++){var keyset=keysets[i];var didProcessKey=false;var keydir=fluid.keyForValue(keyset,evt.keyCode);if(!keydir){continue}var isMovement=keyset.modifier(evt);var dirnum=fluid.keycodeDirection[keydir];var relativeItem=thatReorderer.layoutHandler.getRelativePosition(item,dirnum,!isMovement);if(!relativeItem){continue}if(isMovement){var prevent=thatReorderer.events.onBeginMove.fire(item);if(prevent===false){return false}if(kbDropWarning.length>0){if(relativeItem.clazz==="locked"){thatReorderer.events.onShowKeyboardDropWarning.fire(item,kbDropWarning);kbDropWarning.show()}else{kbDropWarning.hide()}}if(relativeItem.element){thatReorderer.requestMovement(relativeItem,item)}}else{if(noModifier(evt)){$(relativeItem.element).focus()}}return false}return true};thatReorderer.handleKeyDown=function(evt){if(!thatReorderer.activeItem||thatReorderer.activeItem!==evt.target){return true}var jActiveItem=$(thatReorderer.activeItem);if(!jActiveItem.hasClass(styles.dragging)&&isMove(evt)){if(isActiveItemMovable()){jActiveItem.removeClass(styles.selected);jActiveItem.addClass(styles.dragging);jActiveItem.attr("aria-grabbed","true");setDropEffects("move")}return false}return handleDirectionKeyDown(evt)};thatReorderer.handleKeyUp=function(evt){if(!thatReorderer.activeItem||thatReorderer.activeItem!==evt.target){return true}var jActiveItem=$(thatReorderer.activeItem);if(jActiveItem.hasClass(styles.dragging)&&!isMove(evt)){if(kbDropWarning){kbDropWarning.hide()}jActiveItem.removeClass(styles.dragging);jActiveItem.addClass(styles.selected);jActiveItem.attr("aria-grabbed","false");setDropEffects("none");return false}return false};var dropMarker;var createDropMarker=function(tagName){var dropMarker=$(document.createElement(tagName));dropMarker.addClass(options.styles.dropMarker);dropMarker.hide();return dropMarker};fluid.logEnabled=true;thatReorderer.requestMovement=function(requestedPosition,item){if(!requestedPosition||fluid.unwrap(requestedPosition.element)===fluid.unwrap(item)){return }thatReorderer.events.onMove.fire(item,requestedPosition);dropManager.geometricMove(item,requestedPosition.element,requestedPosition.position);$(thatReorderer.activeItem).focus();thatReorderer.refresh();dropManager.updateGeometry(thatReorderer.layoutHandler.getGeometricInfo());thatReorderer.events.afterMove.fire(item,requestedPosition,thatReorderer.dom.fastLocate("movables"))};var hoverStyleHandler=function(item,state){thatReorderer.dom.fastLocate("grabHandle",item)[state?"addClass":"removeClass"](styles.hover)};function initMovable(item){var styles=options.styles;item.attr("aria-grabbed","false");item.mouseover(function(){thatReorderer.events.onHover.fire(item,true)});item.mouseout(function(){thatReorderer.events.onHover.fire(item,false)});var avatar;thatReorderer.dom.fastLocate("grabHandle",item).draggable({refreshPositions:false,scroll:true,helper:function(){var dropWarningEl;if(mouseDropWarning){dropWarningEl=mouseDropWarning[0]}avatar=$(options.avatarCreator(item[0],styles.avatar,dropWarningEl));avatar.attr("id",createAvatarId(thatReorderer.container.id));return avatar},start:function(e,ui){var prevent=thatReorderer.events.onBeginMove.fire(item);if(prevent===false){return false}var handle=thatReorderer.dom.fastLocate("grabHandle",item)[0];var handlePos=fluid.dom.computeAbsolutePosition(handle);var handleWidth=handle.offsetWidth;var handleHeight=handle.offsetHeight;item.focus();item.removeClass(options.styles.selected);item.addClass(options.styles.mouseDrag);item.attr("aria-grabbed","true");setDropEffects("move");dropManager.startDrag(e,handlePos,handleWidth,handleHeight);avatar.show()},stop:function(e,ui){item.removeClass(options.styles.mouseDrag);item.addClass(options.styles.selected);$(thatReorderer.activeItem).attr("aria-grabbed","false");var markerNode=fluid.unwrap(dropMarker);if(markerNode.parentNode){markerNode.parentNode.removeChild(markerNode)}avatar.hide();ui.helper=null;setDropEffects("none");dropManager.endDrag();thatReorderer.requestMovement(dropManager.lastPosition(),item);thatReorderer.activeItem.focus()},handle:thatReorderer.dom.fastLocate("grabHandle",item)})}function changeSelectedToDefault(jItem,styles){jItem.removeClass(styles.selected);jItem.removeClass(styles.dragging);jItem.addClass(styles.defaultStyle);jItem.attr("aria-selected","false")}var selectItem=function(anItem){thatReorderer.events.onSelect.fire(anItem);var styles=options.styles;if(thatReorderer.activeItem&&thatReorderer.activeItem!==anItem){changeSelectedToDefault($(thatReorderer.activeItem),styles)}thatReorderer.activeItem=anItem;var jItem=$(anItem);jItem.removeClass(styles.defaultStyle);jItem.addClass(styles.selected);jItem.attr("aria-selected","true")};var initSelectables=function(){var handleBlur=function(evt){changeSelectedToDefault($(this),options.styles);return evt.stopPropagation()};var handleFocus=function(evt){selectItem(this);return evt.stopPropagation()};var selectables=thatReorderer.dom.fastLocate("selectables");for(var i=0;i<selectables.length;++i){var selectable=$(selectables[i]);if(!$.data(selectable[0],"fluid.reorderer.selectable-initialised")){selectable.addClass(styles.defaultStyle);selectables.blur(handleBlur);selectables.focus(handleFocus);selectables.click(function(evt){var handle=fluid.unwrap(thatReorderer.dom.fastLocate("grabHandle",this));if(fluid.dom.isContainer(handle,evt.target)){$(this).focus()}});selectables.attr("role",options.containerRole.item);selectables.attr("aria-selected","false");selectables.attr("aria-disabled","false");$.data(selectable[0],"fluid.reorderer.selectable-initialised",true)}}if(!thatReorderer.selectableContext){thatReorderer.selectableContext=fluid.selectable(thatReorderer.container,{selectableElements:selectables,selectablesTabindex:thatReorderer.options.selectablesTabindex,direction:null})}};var dropChangeListener=function(dropTarget){fluid.moveDom(dropMarker,dropTarget.element,dropTarget.position);dropMarker.css("display","");if(mouseDropWarning){if(dropTarget.lockedelem){mouseDropWarning.show()}else{mouseDropWarning.hide()}}};var initItems=function(){var movables=thatReorderer.dom.fastLocate("movables");var dropTargets=thatReorderer.dom.fastLocate("dropTargets");initSelectables();for(var i=0;i<movables.length;i++){var item=movables[i];if(!$.data(item,"fluid.reorderer.movable-initialised")){initMovable($(item));$.data(item,"fluid.reorderer.movable-initialised",true)}}if(movables.length>0&&!dropMarker){dropMarker=createDropMarker(movables[0].tagName)}dropManager.updateGeometry(thatReorderer.layoutHandler.getGeometricInfo());dropManager.dropChangeFirer.addListener(dropChangeListener,"fluid.Reorderer");dropTargets.attr("aria-dropeffect","none")};if(thatReorderer.container){bindHandlersToContainer(thatReorderer.container,thatReorderer.handleKeyDown,thatReorderer.handleKeyUp);addRolesToContainer(thatReorderer);fluid.tabbable(thatReorderer.container);initItems()}if(options.afterMoveCallbackUrl){thatReorderer.events.afterMove.addListener(function(){var layoutHandler=thatReorderer.layoutHandler;var model=layoutHandler.getModel?layoutHandler.getModel():options.acquireModel(thatReorderer);$.post(options.afterMoveCallbackUrl,JSON.stringify(model))},"postModel")}thatReorderer.events.onHover.addListener(hoverStyleHandler,"style");thatReorderer.refresh=function(){thatReorderer.dom.refresh("movables");thatReorderer.dom.refresh("selectables");thatReorderer.dom.refresh("grabHandle",thatReorderer.dom.fastLocate("movables"));thatReorderer.dom.refresh("stylisticOffset",thatReorderer.dom.fastLocate("movables"));thatReorderer.dom.refresh("dropTargets");thatReorderer.events.onRefresh.fire();initItems();thatReorderer.selectableContext.selectables=thatReorderer.dom.fastLocate("selectables");thatReorderer.selectableContext.selectablesUpdated(thatReorderer.activeItem)};thatReorderer.refresh();return thatReorderer};fluid.reorderer.keys={TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:19,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,i:73,j:74,k:75,m:77};fluid.reorderer.defaultKeysets=[{modifier:function(evt){return evt.ctrlKey},up:fluid.reorderer.keys.UP,down:fluid.reorderer.keys.DOWN,right:fluid.reorderer.keys.RIGHT,left:fluid.reorderer.keys.LEFT},{modifier:function(evt){return evt.ctrlKey},up:fluid.reorderer.keys.i,down:fluid.reorderer.keys.m,right:fluid.reorderer.keys.k,left:fluid.reorderer.keys.j}];fluid.reorderer.roles={GRID:{container:"grid",item:"gridcell"},LIST:{container:"list",item:"listitem"},REGIONS:{container:"main",item:"article"}};var simpleInit=function(container,layoutHandler,options){options=options||{};options.layoutHandler=layoutHandler;return fluid.reorderer(container,options)};fluid.reorderList=function(container,options){return simpleInit(container,"fluid.listLayoutHandler",options)};fluid.reorderGrid=function(container,options){return simpleInit(container,"fluid.gridLayoutHandler",options)};fluid.reorderer.SHUFFLE_GEOMETRIC_STRATEGY="shuffleProjectFrom";fluid.reorderer.GEOMETRIC_STRATEGY="projectFrom";fluid.reorderer.LOGICAL_STRATEGY="logicalFrom";fluid.reorderer.WRAP_LOCKED_STRATEGY="lockedWrapFrom";fluid.reorderer.NO_STRATEGY=null;fluid.reorderer.relativeInfoGetter=function(orientation,coStrategy,contraStrategy,dropManager,dom){return function(item,direction,forSelection){var dirorient=fluid.directionOrientation(direction);var strategy=dirorient===orientation?coStrategy:contraStrategy;return strategy!==null?dropManager[strategy](item,direction,forSelection):null}};fluid.defaults("fluid.reorderer",{styles:{defaultStyle:"fl-reorderer-movable-default",selected:"fl-reorderer-movable-selected",dragging:"fl-reorderer-movable-dragging",mouseDrag:"fl-reorderer-movable-dragging",hover:"fl-reorderer-movable-hover",dropMarker:"fl-reorderer-dropMarker",avatar:"fl-reorderer-avatar"},selectors:{dropWarning:".flc-reorderer-dropWarning",movables:".flc-reorderer-movable",grabHandle:"",stylisticOffset:""},avatarCreator:defaultAvatarCreator,keysets:fluid.reorderer.defaultKeysets,layoutHandler:{type:"fluid.listLayoutHandler"},events:{onShowKeyboardDropWarning:null,onSelect:null,onBeginMove:"preventable",onMove:null,afterMove:null,onHover:null,onRefresh:null},mergePolicy:{keysets:"replace","selectors.selectables":"selectors.movables","selectors.dropTargets":"selectors.movables"}});function geometricInfoGetter(orientation,sentinelize,dom){return function(){return{sentinelize:sentinelize,extents:[{orientation:orientation,elements:dom.fastLocate("dropTargets")}],elementMapper:function(element){return $.inArray(element,dom.fastLocate("movables"))===-1?"locked":null}}}}fluid.defaults(true,"fluid.listLayoutHandler",{orientation:fluid.orientation.VERTICAL,containerRole:fluid.reorderer.roles.LIST,selectablesTabindex:-1,sentinelize:true});fluid.listLayoutHandler=function(container,options,dropManager,dom){var that={};that.getRelativePosition=fluid.reorderer.relativeInfoGetter(options.orientation,fluid.reorderer.LOGICAL_STRATEGY,null,dropManager,dom);that.getGeometricInfo=geometricInfoGetter(options.orientation,options.sentinelize,dom);return that};fluid.defaults(true,"fluid.gridLayoutHandler",{orientation:fluid.orientation.HORIZONTAL,containerRole:fluid.reorderer.roles.GRID,selectablesTabindex:-1,sentinelize:false});fluid.gridLayoutHandler=function(container,options,dropManager,dom){var that={};that.getRelativePosition=fluid.reorderer.relativeInfoGetter(options.orientation,fluid.reorderer.LOGICAL_STRATEGY,fluid.reorderer.SHUFFLE_GEOMETRIC_STRATEGY,dropManager,dom);that.getGeometricInfo=geometricInfoGetter(options.orientation,options.sentinelize,dom);return that}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/tableOfContents/html/TableOfContents.html b/docs/include/jscripts/infusion/components/tableOfContents/html/TableOfContents.html
new file mode 100644 (file)
index 0000000..f43e866
--- /dev/null
@@ -0,0 +1,33 @@
+       <!-- Table of contents template -->
+        <div id="toc">
+            <ul rsf:id="level1s:">
+                <li rsf:id="level1:item">
+                    <a rsf:id="link" href="">1</a>
+                </li>
+                <ul rsf:id="level1:level2s">
+                    <li rsf:id="level2:item">
+                        <a rsf:id="link" href="">2</a>
+                    </li>
+                    <ul rsf:id="level2:level3s">
+                        <li rsf:id="level3:item">
+                            <a rsf:id="link" href="">3</a>
+                        </li>
+                        <ul rsf:id="level3:level4s">
+                            <li rsf:id="level4:item">
+                                <a rsf:id="link" href="">4</a>
+                            </li>
+                            <ul rsf:id="level4:level5s">
+                                <li rsf:id="level5:item">
+                                    <a rsf:id="link" href="">5</a>
+                                </li>
+                                <ul rsf:id="level5:level6s">
+                                    <li rsf:id="level6:item">
+                                        <a rsf:id="link" href="">6</a>
+                                    </li>
+                                </ul>
+                            </ul>
+                        </ul>
+                    </ul>
+                </ul>
+            </ul>
+        </div>
diff --git a/docs/include/jscripts/infusion/components/tableOfContents/js/TableOfContents.js b/docs/include/jscripts/infusion/components/tableOfContents/js/TableOfContents.js
new file mode 100644 (file)
index 0000000..2b8012c
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var insertAnchor=function(el){var a=$("<a name='"+el.text()+"' />",el[0].ownerDocument);el.before(a)};var createNode=function(id){var node={ID:id,children:[]};return node};var createTree=function(headings,levels){var generateTree=function(nodes,items,level){if(items.length===0){return }var item=items[0];if(level===item.level){nodes[nodes.length-1].push(item.leaf);items.shift();return generateTree(nodes,items,level)}if(level<item.level){var prefix=level>-1?"level"+(level+1)+":":"";var postfix=level===-1?"s:":"s";var name=prefix+"level"+(level+2)+postfix;var myNode=createNode(name);nodes[nodes.length-1].push(myNode);nodes.push(myNode.children);return generateTree(nodes,items,level+1)}if(level>item.level){nodes.pop();return generateTree(nodes,items,level-1)}};var tree={children:[]};var items=fluid.transform(headings,function(heading){var level=$.inArray(heading.tagName,levels);var text=$(heading).text();return{level:level,leaf:{ID:"level"+(level+1)+":item",children:[{ID:"link",linktext:text,target:"#"+text}]}}});generateTree([tree.children],items,-1);return tree};var buildTOC=function(container,headings,levels,templateURL,afterRender){headings.each(function(i,el){insertAnchor($(el))});var resources={toc:{href:templateURL}};fluid.fetchResources(resources,function(){var templates=fluid.parseTemplates(resources,["toc"],{});var node=$("<div></div>",container[0].ownerDocument);fluid.reRender(templates,node,createTree(headings,levels),{});container.prepend(node);afterRender.fire(node)})};fluid.tableOfContents=function(container,options){var that=fluid.initView("fluid.tableOfContents",container,options);that.events.afterRender.addListener(function(node){that.tocNode=$(node)});buildTOC(that.container,that.locate("headings"),that.options.levels,that.options.templateUrl,that.events.afterRender);that.hide=function(){if(that.tocNode){that.tocNode.hide()}};that.show=function(){if(that.tocNode){that.tocNode.show()}};return that};fluid.defaults("fluid.tableOfContents",{selectors:{headings:":header"},events:{afterRender:null},templateUrl:"../html/TableOfContents.html",levels:["H1","H2","H3","H4","H5","H6"]})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/uiOptions/css/Slider.css b/docs/include/jscripts/infusion/components/uiOptions/css/Slider.css
new file mode 100644 (file)
index 0000000..414e376
--- /dev/null
@@ -0,0 +1,14 @@
+.fl-slider-vert{height:10em;width:.8em;}
+.fl-slider-horz{width:10em;height:.8em;}
+.fl-slider{position:relative;background-color:#ebebeb;padding:0;}
+.fl-slider .fl-handle,.fl-slider a{position:absolute;display:block;background-color:#ccc;height:1.2em;width:1.2em;top:0;left:0;}
+.fl-slider-vert .fl-handle,.fl-slider-vert a{margin-left:-0.2em;margin-top:-0.5em;}
+.fl-slider-horz .fl-handle,.fl-slider-horz a{margin-top:-0.2em;margin-left:-0.5em;}
+.fl-theme-hc .fl-slider{background-color:#000;}
+.fl-theme-hc .fl-slider .fl-handle,.fl-theme-hc .fl-slider a,.fl-theme-hc .fl-slider a:hover{border:1px solid #000!important;background-color:#fff!important;}
+.fl-theme-hci .fl-slider{background-color:#fff;}
+.fl-theme-hci .fl-slider .fl-handle,.fl-theme-hci .fl-slider a,.fl-theme-hci .fl-slider a:hover{border:1px solid #fff!important;background-color:#000!important;}
+.fl-theme-slate .fl-slider{background-color:#ccc;}
+.fl-theme-slate .fl-slider .fl-handle,.fl-theme-slate .fl-slider a,.fl-theme-slate .fl-slider a:hover{border:1px solid #000;background-color:#999;}
+.fl-theme-coal .fl-slider{background-color:#ccc;}
+.fl-theme-coal .fl-slider .fl-handle,.fl-theme-coal .fl-slider a,.fl-theme-coal .fl-slider a:hover{border:1px solid #000;background-color:#999;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/uiOptions/css/UIOptions.css b/docs/include/jscripts/infusion/components/uiOptions/css/UIOptions.css
new file mode 100644 (file)
index 0000000..cb26be1
--- /dev/null
@@ -0,0 +1,36 @@
+.fl-uiOptions{background-color:#fff;}
+.fl-uiOptions .ui-accordion-content{border:1px solid;}
+.fl-uiOptions h2{cursor:pointer;margin:0;padding:5px 5px 5px 24px;background-color:#f5f5f5;}
+.fl-uiOptions h2:hover{background-color:#ccc;}
+.fl-uiOptions h2.ui-state-focus{background-color:#ccc;}
+.fl-uiOptions h2.ui-helper-reset{padding:5px 5px 5px 24px!important;}
+.fl-uiOptions fieldset{margin:0;padding:0;}
+.fl-uiOptions ol{margin:0;padding:15px 0 0 0;}
+.fl-uiOptions li{padding:6px 0;clear:both;list-style-type:none;line-height:1.6em;}
+.fl-uiOptions legend{text-indent:-500%;margin-bottom:-1.6em;visibility:hidden;}
+.fl-uiOptions .fl-uiOptions-buttons-refresher-5{width:5em;}
+.fl-uiOptions .fl-uiOptions-buttons-refresher-10{width:10em;}
+.fl-uiOptions .fl-accordion-content{zoom:1;}
+.fl-uiOptions .fl-accordion-content fieldset,.fl-uiOptions .fl-accordion-content span{display:inline;}
+.fl-uiOptions .fl-formLabels{text-align:right;padding-right:5px;}
+.fl-uiOptions .fl-uiOptions-min-text-size .fl-textfield,.fl-uiOptions .fl-uiOptions-line-spacing .fl-textfield{width:1.85em;height:1.2em;padding:.1em;}
+.fl-uiOptions .fl-slider{margin-bottom:0;margin-top:5px;}
+.fl-uiOptions .fl-subcomp-preview{padding:0;border:3px solid;}
+.fl-uiOptions .fl-subcomp-preview h2{font-weight:normal;margin:0;padding:5px;}
+.fl-uiOptions .fl-subcomp-preview iframe{width:100%;height:300px;}
+.fl-theme-mist .fl-uiOptions h2{background-color:#ebebeb;}
+.fl-theme-mist .fl-uiOptions .ui-accordion-content{border-color:#ebebeb;}
+.fl-theme-mist .fl-uiOptions .fl-subcomp-preview{border-color:#ebebeb;}
+.fl-theme-slate .fl-uiOptions h2{background-color:#666;}
+.fl-theme-slate .fl-uiOptions .ui-accordion-content{border-color:#666;}
+.fl-theme-slate .fl-uiOptions .fl-subcomp-preview{border-color:#666;}
+.fl-theme-coal .fl-uiOptions h2{background-color:#666;color:#fff;}
+.fl-theme-coal .fl-uiOptions .ui-accordion-content{border-color:#666;}
+.fl-theme-coal .fl-uiOptions .fl-subcomp-preview{border-color:#666;}
+.fl-theme-hc .fl-uiOptions h2{background-color:#666;color:#fff;}
+.fl-theme-hc .fl-uiOptions h2.ui-state-default{color:#fff!important;}
+.fl-theme-hc .fl-uiOptions h2.ui-state-hover{color:#000!important;}
+.fl-theme-hc .fl-uiOptions h2.ui-state-focus{color:#000!important;}
+.fl-theme-hci .fl-uiOptions h2.ui-state-default{color:#000!important;}
+.fl-theme-hci .fl-uiOptions h2.ui-state-hover{color:#fff!important;}
+.fl-theme-hci .fl-uiOptions h2.ui-state-focus{color:#fff!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/uiOptions/css/UIOptionsPreview.css b/docs/include/jscripts/infusion/components/uiOptions/css/UIOptionsPreview.css
new file mode 100644 (file)
index 0000000..f6a1005
--- /dev/null
@@ -0,0 +1,5 @@
+.fl-uiOptions-previewContent{font-size:13px;background:#e8ffea url(../images/main_bg.png) no-repeat fixed 0 0;padding:0 10px;}
+.fl-uiOptions-previewContent h1{margin:0;padding:5px 0 5px 0;}
+.fl-uiOptions-previewContent p{padding:5px;}
+.fl-uiOptions-previewContent img{float:right;margin:10px 0;}
+.fl-uiOptions-previewContent table thead th{background-color:#fff;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/uiOptions/html/UIOptions.html b/docs/include/jscripts/infusion/components/uiOptions/html/UIOptions.html
new file mode 100644 (file)
index 0000000..af73eb4
--- /dev/null
@@ -0,0 +1,178 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+\r
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:rsf="http://ponder.org.uk/rsf">\r
+    <head>\r
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-reset.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-layout.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-text.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-hc.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-hci.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-slate.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-coal.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-mist.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-rust.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../lib/jquery/ui/css/fl-theme-coal/coal.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../lib/jquery/ui/css/fl-theme-mist/mist.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../lib/jquery/ui/css/fl-theme-slate/slate.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../lib/jquery/ui/css/fl-theme-hc/hc.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../lib/jquery/ui/css/fl-theme-hci/hci.css" />\r
+        <link rel="stylesheet" type="text/css" href="../css/UIOptions.css" />\r
+        <link rel="stylesheet" type="text/css" href="../css/Slider.css" />\r
+\r
+        <title>UI Options</title>\r
+        <script type="text/javascript" src="../../../lib/jquery/core/js/jquery.js"></script>\r
+        <script type="text/javascript" src="../../../lib/jquery/ui/js/ui.core.js"></script>\r
+        <script type="text/javascript" src="../../../lib/jquery/ui/js/ui.accordion.js"></script>        \r
+        <script type="text/javascript" src="../../../lib/jquery/ui/js/ui.slider.js"></script>        \r
+        <script type="text/javascript" src="../../../lib/json/js/json2.js"></script>\r
+        <script type="text/javascript" src="../../../lib/jquery/plugins/delegate/js/jquery.delegate.js"></script>\r
+\r
+        <script type="text/javascript" src="../../../framework/core/js/jquery.keyboard-a11y.js"></script>        \r
+        <script type="text/javascript" src="../../../framework/core/js/Fluid.js"></script>\r
+        <script type="text/javascript" src="../../../framework/core/js/FluidDOMUtilities.js"></script>\r
+        <script type="text/javascript" src="../../../framework/core/js/DataBinding.js"></script>\r
+        <script type="text/javascript" src="../../../lib/fastXmlPull/js/fastXmlPull.js"></script>\r
+        <script type="text/javascript" src="../../../framework/renderer/js/fluidParser.js"></script>\r
+        <script type="text/javascript" src="../../../framework/renderer/js/fluidRenderer.js"></script>\r
+\r
+        <script type="text/javascript" src="../js/UIEnhancer.js"></script>\r
+        <script type="text/javascript" src="../js/UIOptions.js"></script>\r
+        <script type="text/javascript" src="../../tableOfContents/js/TableOfContents.js"></script>\r
+        <script type="text/javascript" src="../../undo/js/Undo.js"></script>\r
+        \r
+        <script type="text/javascript">\r
+            $().ready(function () {\r
+                fluid.uiEnhancer();\r
+                \r
+                var options = {\r
+                    listeners: {\r
+                        afterRender: function () {\r
+                            $('.fl-uiOptions .fl-col:eq(0)').accordion({header: 'h2', clearStyle: true, autoHeight: false});\r
+                        }\r
+                    }\r
+                };\r
+                fluid.uiOptions(".uiOptions", options);\r
+            });\r
+        </script>\r
+    </head>\r
+\r
+    <body>\r
+\r
+        <h1>User Interface Options</h1>\r
+        <form id="options" action="" class="fl-col-flex2 fl-uiOptions uiOptions">\r
+            \r
+            <!-- column 1, options -->\r
+            <div class="fl-col">\r
+                    <h2>Easier to see</h2>\r
+                    <div class="fl-accordion-content">\r
+                        <ol class="fl-controls-right">\r
+                            <li>\r
+                                <label for="text-font" class="fl-label">Font style:</label>\r
+                                <select rsf:id="text-font" id="text-font" class="flc-uiOptions-control" >\r
+                                </select>\r
+                            </li>\r
+                            \r
+                            <li class="flc-uiOptions-min-text-size fl-uiOptions-min-text-size">\r
+                                <label for="min-text-size" class="fl-label">Minimum text size:</label>\r
+                                <p class="fl-slider fl-force-right fl-slider-horz flc-textfieldSlider-slider flc-uiOptions-control"> </p>\r
+                                <input id="min-text-size" class="fl-textfield flc-textfieldSlider-field flc-uiOptions-control" type="text" />pt                                \r
+                            </li>\r
+        \r
+                            <li>\r
+                                <label for="text-spacing" class="fl-label">Text Spacing:</label>\r
+                                <select rsf:id="text-spacing" id="text-spacing" class="flc-uiOptions-control" >\r
+                                    <option>text-spacing here</option>\r
+                                </select>\r
+                            </li>\r
+                            <li class="flc-uiOptions-line-spacing fl-uiOptions-line-spacing">\r
+                                <label for="line-spacing" class="fl-label">Line Spacing:</label>\r
+                                <p class="fl-slider fl-force-right fl-slider-horz flc-textfieldSlider-slider flc-uiOptions-control"> </p>\r
+                                <input id="line-spacing" class="fl-textfield flc-textfieldSlider-field flc-uiOptions-control" type="text" />                             \r
+                            </li>\r
+                            <li>\r
+                                <label class="fl-label" for="theme">Contrast:</label>\r
+                                <select rsf:id="theme" id="theme" class="flc-uiOptions-control" >\r
+                                    <option>contrast here</option>\r
+                                </select>\r
+                            </li>\r
+        \r
+                            <li>\r
+                                <span class="fl-label">Background Images:</span>\r
+                                <fieldset>\r
+                                    <legend>Background Images</legend>\r
+                                    <span rsf:id="background-images-row:">\r
+                                        <input rsf:id="background-images-choice" id="background-images-choice" class="flc-uiOptions-control" type="radio" />\r
+                                        <label rsf:id="background-images-label" for="background-images-choice">choice</label>\r
+                                    </span>\r
+                                </fieldset>\r
+                            </li>\r
+        \r
+                            <li>                             \r
+                                <span class="fl-label">Simplified Layout:</span>\r
+                                <fieldset>\r
+                                    <legend>Simplified Layout</legend>\r
+                                    <span rsf:id="layout-row:">\r
+                                        <input rsf:id="layout-choice" id="layout-choice" class="flc-uiOptions-control" type="radio" />\r
+                                        <label rsf:id="layout-label" for="layout-choice">choice</label>\r
+                                    </span>\r
+                                </fieldset>\r
+                            </li>\r
+                        </ol>\r
+                    </div>\r
+                \r
+                    <h2>Easier to find</h2>\r
+                    <div class="fl-accordion-content">\r
+                        <ol class="fl-controls-right">\r
+                            <li>\r
+                                <span class="fl-label">Table of Contents:</span>\r
+                                <fieldset>\r
+                                    <legend>Table of Contents</legend>\r
+                                    <span rsf:id="toc-row:">\r
+                                        <input rsf:id="toc-choice" id="toc-choice" class="fl-textfield flc-uiOptions-control" type="radio"/>\r
+                                        <label rsf:id="toc-label" for="toc-choice">choice</label>\r
+                                    </span>\r
+                                </fieldset>\r
+                            </li>                            \r
+                            <li>\r
+                                <span class="fl-label">Links:</span>\r
+                               <fieldset>\r
+                                   <legend>Links</legend>\r
+                                    <input rsf:id="links-underline" id="links-underline" class="flc-uiOptions-control" type="checkbox"/>\r
+                                    <label for="links-underline">Underline</label><br />\r
+                                    <input rsf:id="links-bold" id="links-bold" class="flc-uiOptions-control" type="checkbox"/>\r
+                                    <label for="links-bold">Bold</label><br />\r
+                                    <input rsf:id="links-larger" id="links-larger" class="flc-uiOptions-control" type="checkbox"/>\r
+                                    <label for="links-larger">Larger</label>\r
+                                </fieldset>\r
+                            </li>\r
+                            <li>\r
+                                <span class="fl-label">Inputs:</span>\r
+                               <fieldset>\r
+                                   <legend>Inputs</legend>\r
+                                    <input rsf:id="inputs-larger" id="inputs-larger" class="flc-uiOptions-control" type="checkbox"/>\r
+                                    <label for="inputs-larger">Larger</label>\r
+                                </fieldset>                                   \r
+                            </li>\r
+                        </ol>\r
+                    </div>\r
+                \r
+            </div>\r
+            <!-- column 2, preview -->\r
+            <div class="fl-col">\r
+                <div class="fl-subcomp-preview">\r
+                    <h2><strong>Preview window</strong> (updates automatically)</h2>\r
+                    <iframe class="flc-uiOptions-preview-frame" src="UIOptionsPreview.html" frameborder="0"></iframe>\r
+                </div>\r
+                <div class="fl-text-align-center fl-subcomp-buttons">\r
+                    <input class="flc-uiOptions-reset" type="button" value="Reset" />\r
+                    <input class="flc-uiOptions-save" type="button" value="Save and apply" />\r
+                    <input class="flc-uiOptions-cancel" type="button" value="Cancel" />\r
+                </div>                \r
+            </div>\r
+            \r
+        </form>                \r
+    </body>\r
+</html>\r
+\r
diff --git a/docs/include/jscripts/infusion/components/uiOptions/html/UIOptionsPreview.html b/docs/include/jscripts/infusion/components/uiOptions/html/UIOptionsPreview.html
new file mode 100644 (file)
index 0000000..b50caec
--- /dev/null
@@ -0,0 +1,85 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+       <head>\r
+               <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+               <title>UI Options Preview Content</title>\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-reset.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-layout.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-text.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-hc.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-hci.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-slate.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-coal.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-mist.css" />\r
+        <link rel="stylesheet" type="text/css" href="../css/UIOptionsPreview.css" />\r
+\r
+       </head>\r
+       <body class="fl-uiOptions-previewContent">\r
+        <h1>Web Pages</h1>\r
+        <img src="../images/mintleaf.png" alt="Mint Leaf" title="This is a mint leaf" />\r
+        <p>A <b>web page</b> or <b>webpage</b> is a <em>resource of information</em> that is suitable for the World Wide Web and can be accessed through a web browser. This information is usually in HTML or XHTML format, and may provide navigation to other web pages via hypertext links.</p>\r
+        <h2>Color, typography, illustration and interaction</h2>\r
+        <p><a href="#">Web pages</a> usually include instructions as to the colors of text and backgrounds and very often also contain links to images and sometimes other media to be included in the final view.</p>\r
+        <h2>Elements of a webpage</h2>\r
+        <ol>\r
+            <li>Textual\r
+                <ul>\r
+                    <li><a href="#">content with a textual representaion</a></li>\r
+                </ul>\r
+            </li>\r
+            <li>Non-textual\r
+                <ul>\r
+                    <li>Static and Animated imagery</li>\r
+                    <li>Audio</li>\r
+                    <li>Video</li>\r
+                </ul>\r
+            </li>\r
+            <li>Interactive\r
+                <ul>\r
+                    <li>Forms</li>\r
+                    <li><a href="#">Hyperlinks</a></li>\r
+                </ul>\r
+            </li>\r
+            <li>Hidden</li>\r
+        </ol>\r
+        <h3>Breakdown of webpage markup</h3>\r
+        <table>\r
+            <thead>\r
+                <tr>\r
+                    <th>Tag</th>\r
+                    <th>Meaning</th>\r
+                    <th>Deprecated</th>\r
+                </tr>\r
+            </thead>\r
+            <tbody>\r
+                <tr>\r
+                    <td><pre>&lt;B&gt;</pre></td>\r
+                    <td>Make an element as BOLD</td>\r
+                    <td><input type="checkbox" checked="checked" disabled="disabled" /></td>\r
+                </tr>\r
+                <tr>\r
+                    <td><pre>&lt;I&gt;</pre></td>\r
+                    <td>Show an element in ITALICS</td>\r
+                    <td><input type="checkbox" checked="checked" /></td>\r
+                </tr>\r
+                <tr>\r
+                    <td><pre>&lt;EM&gt;</pre></td>\r
+                    <td>EMPHASIZE an element</td>\r
+                    <td><input type="checkbox" disabled="disabled" /></td>\r
+                </tr>\r
+                <tr>\r
+                    <td><pre>&lt;STRONG&gt;</pre></td>\r
+                    <td>Use STRONG EMPHASIS for an element</td>\r
+                    <td><input type="checkbox" /></td>\r
+                </tr>\r
+            </tbody>\r
+            <tfoot>\r
+                <tr>\r
+                    <th>Tag</th>\r
+                    <th>Meaning</th>\r
+                    <th>Deprecated</th>\r
+                </tr>\r
+            </tfoot>\r
+        </table>\r
+       </body>\r
+</html>\r
diff --git a/docs/include/jscripts/infusion/components/uiOptions/images/500x327_mint_truffle.jpg b/docs/include/jscripts/infusion/components/uiOptions/images/500x327_mint_truffle.jpg
new file mode 100644 (file)
index 0000000..50e0acd
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uiOptions/images/500x327_mint_truffle.jpg differ
diff --git a/docs/include/jscripts/infusion/components/uiOptions/images/border_1.png b/docs/include/jscripts/infusion/components/uiOptions/images/border_1.png
new file mode 100644 (file)
index 0000000..7764c61
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uiOptions/images/border_1.png differ
diff --git a/docs/include/jscripts/infusion/components/uiOptions/images/expand_collapse.png b/docs/include/jscripts/infusion/components/uiOptions/images/expand_collapse.png
new file mode 100644 (file)
index 0000000..909a6e4
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uiOptions/images/expand_collapse.png differ
diff --git a/docs/include/jscripts/infusion/components/uiOptions/images/h1.png b/docs/include/jscripts/infusion/components/uiOptions/images/h1.png
new file mode 100644 (file)
index 0000000..a1e35fc
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uiOptions/images/h1.png differ
diff --git a/docs/include/jscripts/infusion/components/uiOptions/images/main_bg.png b/docs/include/jscripts/infusion/components/uiOptions/images/main_bg.png
new file mode 100644 (file)
index 0000000..3948c79
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uiOptions/images/main_bg.png differ
diff --git a/docs/include/jscripts/infusion/components/uiOptions/images/mintleaf.png b/docs/include/jscripts/infusion/components/uiOptions/images/mintleaf.png
new file mode 100644 (file)
index 0000000..2d5e678
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uiOptions/images/mintleaf.png differ
diff --git a/docs/include/jscripts/infusion/components/uiOptions/js/UIEnhancer.js b/docs/include/jscripts/infusion/components/uiOptions/js/UIEnhancer.js
new file mode 100644 (file)
index 0000000..803a53e
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var replaceClass=function(container,selector,regExp,newVal){newVal=newVal||"";$(selector,container).andSelf().each(function(i){var attr=($.browser.msie===false)?"class":"className";if(this.getAttribute(attr)){this.setAttribute(attr,this.getAttribute(attr).replace(regExp,newVal))}})};var addClassForSetting=function(element,settingName,value,classnameMap){var settingValues=classnameMap[settingName]||{};var className=settingValues[value];if(className){element.addClass(className)}};var isTrue=function(val){return val&&(val===true||val==="true")};var setToc=function(that,tocSetting){if(isTrue(tocSetting)){if(that.tableOfContents){that.tableOfContents.show()}else{that.tableOfContents=fluid.initSubcomponent(that,"tableOfContents",[that.container,fluid.COMPONENT_OPTIONS])}}else{if(that.tableOfContents){that.tableOfContents.hide()}}};var setLineSpacing=function(container,spacing){spacing=spacing&&spacing>0?spacing:1;container.css("line-height",spacing+"em")};var setMinSize=function(container,size){if(size&&size>0){container.css("font-size",size+"pt");replaceClass(container,"[class*=fl-font-size-]",/\bfl-font-size-[0-9]{1,2}\s+/g,"fl-font-size-100")}else{container.css("font-size","")}};var addStyles=function(container,settings,classnameMap){addClassForSetting(container,"textFont",settings.textFont,classnameMap);addClassForSetting(container,"textSpacing",settings.textSpacing,classnameMap);addClassForSetting(container,"theme",settings.theme,classnameMap);addClassForSetting(container,"layout",settings.layout,classnameMap)};var styleElements=function(elements,setting,classname){if(setting){elements.addClass(classname)}else{elements.removeClass(classname)}};var styleLinks=function(container,settings,classnameMap){var links=$("a",container);styleElements(links,settings.linksUnderline,classnameMap.linksUnderline);styleElements(links,settings.linksBold,classnameMap.linksBold);styleElements(links,settings.linksLarger,classnameMap.linksLarger)};var styleInputs=function(container,settings,classnameMap){styleElements($("input",container),settings.inputsLarger,classnameMap.inputsLarger)};var initModel=function(that){if(that.options.savedSettings){that.model=that.options.savedSettings;return }that.model=that.settingsStore.fetch()||fluid.copy(that.defaultSiteSettings)};var clearClashingClasses=function(container,classnameMap){var settingsWhichMayClash=["textFont","textSpacing","theme","layout"];var classesToRemove="fl-noBackgroundImages";var selector=".fl-noBackgroundImages";for(var i=0;i<settingsWhichMayClash.length;i++){var settingValues=classnameMap[settingsWhichMayClash[i]];for(var val in settingValues){var classname=settingValues[val];if(classname){classesToRemove=classesToRemove+" "+classname;selector=selector+",."+classname}}}$(selector,container).removeClass(classesToRemove);return classesToRemove};var setupUIEnhancer=function(that){that.settingsStore=fluid.initSubcomponent(that,"settingsStore",[fluid.COMPONENT_OPTIONS]);initModel(that);that.refreshView()};fluid.uiEnhancer=function(doc,options){doc=doc||document;var that=fluid.initView("fluid.uiEnhancer",doc,options);$(doc).data("uiEnhancer",that);that.container=$("body",doc);that.defaultSiteSettings=that.options.defaultSiteSettings;var clashingClassnames;that.refreshView=function(){that.container.removeClass(clashingClassnames);addStyles(that.container,that.model,that.options.classnameMap);styleElements(that.container,!isTrue(that.model.backgroundImages),that.options.classnameMap.noBackgroundImages);setMinSize(that.container,that.model.textSize);setLineSpacing(that.container,that.model.lineSpacing);setToc(that,that.model.toc);styleLinks(that.container,that.model,that.options.classnameMap);styleInputs(that.container,that.model,that.options.classnameMap)};that.updateModel=function(newModel,source){that.events.modelChanged.fire(newModel,that.model,source);fluid.clear(that.model);fluid.model.copyModel(that.model,newModel);that.settingsStore.save(that.model);that.refreshView()};clashingClassnames=clearClashingClasses(that.container,that.options.classnameMap);setupUIEnhancer(that);return that};fluid.defaults("fluid.uiEnhancer",{tableOfContents:{type:"fluid.tableOfContents",options:{templateUrl:"../../tableOfContents/html/TableOfContents.html"}},settingsStore:{type:"fluid.uiEnhancer.cookieStore"},events:{modelChanged:null},classnameMap:{textFont:{serif:"fl-font-serif",sansSerif:"fl-font-sans",arial:"fl-font-arial",verdana:"fl-font-verdana",monospace:"fl-font-monospace",courier:"fl-font-courier",times:"fl-font-times"},textSpacing:{"default":"",wide0:"fl-font-spacing-0",wide1:"fl-font-spacing-1",wide2:"fl-font-spacing-2",wide3:"fl-font-spacing-3",wide4:"fl-font-spacing-4",wide5:"fl-font-spacing-5",wide6:"fl-font-spacing-6"},theme:{mist:"fl-theme-mist",rust:"fl-theme-rust",highContrast:"fl-theme-hc",highContrastInverted:"fl-theme-hci",lowContrast:"fl-theme-slate",mediumContrast:"fl-theme-coal","default":""},layout:{simple:"fl-layout-linear","default":""},noBackgroundImages:"fl-noBackgroundImages",linksUnderline:"fl-text-underline",linksBold:"fl-text-bold",linksLarger:"fl-text-larger",inputsLarger:"fl-text-larger"},defaultSiteSettings:{textFont:"",textSpacing:"",theme:"default",layout:"default",textSize:"",lineSpacing:"",backgroundImages:true,toc:false,linksUnderline:false,linksBold:false,linksLarger:false,inputsLarger:false}});fluid.uiEnhancer.cookieStore=function(options){var that={};fluid.mergeComponentOptions(that,"fluid.uiEnhancer.cookieStore",options);that.fetch=function(){var cookie=document.cookie;var cookiePrefix=that.options.cookieName+"=";var retObj,startIndex,endIndex;if(cookie.length>0){startIndex=cookie.indexOf(cookiePrefix);if(startIndex>-1){startIndex=startIndex+cookiePrefix.length;endIndex=cookie.indexOf(";",startIndex);if(endIndex<startIndex){endIndex=cookie.length}retObj=JSON.parse(decodeURIComponent(cookie.substring(startIndex,endIndex)))}}return retObj};that.save=function(settings){document.cookie=that.options.cookieName+"="+encodeURIComponent(JSON.stringify(settings))};return that};fluid.defaults("fluid.uiEnhancer.cookieStore",{cookieName:"fluid-ui-settings"});fluid.uiEnhancer.tempStore=function(options){var that={};that.model=null;that.fetch=function(){return that.model};that.save=function(settings){that.model=settings};return that}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/uiOptions/js/UIOptions.js b/docs/include/jscripts/infusion/components/uiOptions/js/UIOptions.js
new file mode 100644 (file)
index 0000000..2e0768f
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var initSliderAria=function(thumb,opts){var ariaDefaults={role:"slider","aria-valuenow":opts.value,"aria-valuemin":opts.min,"aria-valuemax":opts.max};thumb.attr(ariaDefaults)};var initTextfieldSlider=function(that){var textfield=that.locate("textfield");textfield.val(that.model);var sliderOptions=that.options.sliderOptions;sliderOptions.value=that.model;sliderOptions.min=that.options.min;sliderOptions.max=that.options.max;var slider=that.locate("slider").slider(sliderOptions);initSliderAria(that.locate("thumb"),sliderOptions);textfield.change(function(){if(that.isValid(this.value)){if(!that.isInRange(this.value)){this.value=(this.value<that.min)?that.min:that.max}slider.slider("value",this.value);that.updateModel(this.value,this)}else{this.value=that.model}});textfield.keypress(function(evt){if(evt.keyCode!==$.ui.keyCode.ENTER){return true}else{$(evt.target).change();$(fluid.findForm(evt.target)).submit();return false}});slider.bind("slide",function(e,ui){textfield.val(ui.value);that.updateModel(ui.value,slider)})};fluid.textfieldSlider=function(container,options){var that=fluid.initView("fluid.textfieldSlider",container,options);that.model=that.options.value||that.locate("textfield").val();that.min=that.options.min;that.max=that.options.max;initTextfieldSlider(that);that.isInRange=function(value){return(value>=that.min&&value<=that.max)};that.isValid=function(value){return !(isNaN(parseInt(value,10))||isNaN(value))};that.updateModel=function(model,source){if(that.isInRange(model)){that.events.modelChanged.fire(model,that.model,source);that.model=model;that.locate("thumb").attr("aria-valuenow",that.model)}};return that};fluid.defaults("fluid.textfieldSlider",{selectors:{textfield:".flc-textfieldSlider-field",slider:".flc-textfieldSlider-slider",thumb:".ui-slider-handle"},events:{modelChanged:null},sliderOptions:{orientation:"horizontal"},min:0,max:100,value:null})})(jQuery,fluid_1_1);(function($,fluid){var createSelectNode=function(id,selection,list,names){return{ID:id,selection:{valuebinding:selection},optionlist:{valuebinding:list},optionnames:{valuebinding:names}}};var createSimpleBindingNode=function(id,binding){return{ID:id,valuebinding:binding}};var generateTree=function(that,rendererModel){var children=[];children.push(createSelectNode("text-font","selections.textFont","labelMap.textFont.values","labelMap.textFont.names"));children.push(createSelectNode("text-spacing","selections.textSpacing","labelMap.textSpacing.values","labelMap.textSpacing.names"));children.push(createSelectNode("theme","selections.theme","labelMap.theme.values","labelMap.theme.names"));var bgiExplodeOpts={selectID:"background-images",rowID:"background-images-row:",inputID:"background-images-choice",labelID:"background-images-label"};children.push(createSelectNode("background-images","selections.backgroundImages","labelMap.backgroundImages.values","labelMap.backgroundImages.names"));children=children.concat(fluid.explodeSelectionToInputs(that.options.controlValues.backgroundImages,bgiExplodeOpts));var layoutExplodeOpts={selectID:"layout",rowID:"layout-row:",inputID:"layout-choice",labelID:"layout-label"};children.push(createSelectNode("layout","selections.layout","labelMap.layout.values","labelMap.layout.names"));children=children.concat(fluid.explodeSelectionToInputs(that.options.controlValues.layout,layoutExplodeOpts));var tocExplodeOpts={selectID:"toc",rowID:"toc-row:",inputID:"toc-choice",labelID:"toc-label"};children.push(createSelectNode("toc","selections.toc","labelMap.toc.values","labelMap.toc.names"));children=children.concat(fluid.explodeSelectionToInputs(that.options.controlValues.layout,tocExplodeOpts));children.push(createSimpleBindingNode("links-underline","selections.linksUnderline"));children.push(createSimpleBindingNode("links-bold","selections.linksBold"));children.push(createSimpleBindingNode("links-larger","selections.linksLarger"));children.push(createSimpleBindingNode("inputs-larger","selections.inputsLarger"));return{children:children}};var bindHandlers=function(that){var saveButton=that.locate("save");saveButton.click(that.save);that.locate("reset").click(that.reset);that.locate("cancel").click(that.cancel);var form=fluid.findForm(saveButton);$(form).submit(function(){that.save()})};var initPreview=function(that){var previewFrame=that.locate("previewFrame");var previewEnhancer;that.events.modelChanged.addListener(function(model){setTimeout(function(){if(previewEnhancer){previewEnhancer.updateModel(model)}},0)});previewFrame.load(function(){var previewFrameContents=previewFrame.contents();var options={savedSettings:that.model,tableOfContents:that.uiEnhancer.options.tableOfContents,settingsStore:{type:"fluid.uiEnhancer.tempStore"}};previewEnhancer=fluid.uiEnhancer(previewFrameContents,options)})};var createLabelMap=function(options){var labelMap={};for(var item in options.controlValues){labelMap[item]={names:options.strings[item],values:options.controlValues[item]}}return labelMap};var createRenderOptions=function(that){that.model.toc=String(that.model.toc);that.model.backgroundImages=String(that.model.backgroundImages);var aggregateModel=fluid.assembleModel({selections:{model:that.model,applier:that.applier},labelMap:{model:createLabelMap(that.options)}});return{model:aggregateModel.model,applier:aggregateModel.applier,autoBind:true}};var initSliders=function(that){var createOptions=function(settingName){return{listeners:{modelChanged:function(value){that.applier.requestChange(settingName,value)}},value:that.model[settingName]}};var options=createOptions("textSize");fluid.merge(null,options,that.options.textMinSize.options);fluid.initSubcomponents(that,"textMinSize",[that.options.selectors.textMinSizeCtrl,options]);options=createOptions("lineSpacing");fluid.merge(null,options,that.options.lineSpacing.options);fluid.initSubcomponents(that,"lineSpacing",[that.options.selectors.lineSpacingCtrl,options])};var mergeSiteDefaults=function(options,siteDefaults){for(var settingName in options.controlValues){var setting=String(siteDefaults[settingName]);var settingValues=options.controlValues[settingName];if(setting){var index=$.inArray(setting,settingValues);if(index===-1){var defaultIndex=$.inArray("default",settingValues);if(defaultIndex===-1){settingValues.push(setting)}else{settingValues[defaultIndex]=setting}}}}};var setupUIOptions=function(that){that.applier.modelChanged.addListener("*",function(newModel,oldModel,changeRequest){that.events.modelChanged.fire(newModel,oldModel,changeRequest.source)});mergeSiteDefaults(that.options,that.uiEnhancer.defaultSiteSettings);that.events.afterRender.addListener(function(){initSliders(that);bindHandlers(that);initPreview(that)});var rendererOptions=createRenderOptions(that);var template=fluid.selfRender(that.container,generateTree(that,rendererOptions.model),rendererOptions);that.events.afterRender.fire();return template};fluid.uiOptions=function(container,options){var that=fluid.initView("fluid.uiOptions",container,options);that.uiEnhancer=$(document).data("uiEnhancer");that.model=fluid.copy(that.uiEnhancer.model);that.applier=fluid.makeChangeApplier(that.model);var savedModel=that.uiEnhancer.model;var template;that.save=function(){that.events.onSave.fire(that.model);savedModel=fluid.copy(that.model);that.uiEnhancer.updateModel(savedModel)};that.reset=function(){that.events.onReset.fire();that.updateModel(fluid.copy(that.uiEnhancer.defaultSiteSettings),that);that.refreshView()};that.cancel=function(){that.events.onCancel.fire();that.updateModel(fluid.copy(savedModel),that);that.refreshView()};that.refreshView=function(){var rendererOptions=createRenderOptions(that);fluid.reRender(template,that.container,generateTree(that,rendererOptions.model),rendererOptions);that.events.afterRender.fire()};that.updateModel=function(newModel,source){that.events.modelChanged.fire(newModel,that.model,source);fluid.clear(that.model);fluid.model.copyModel(that.model,newModel)};template=setupUIOptions(that);return that};fluid.defaults("fluid.uiOptions",{textMinSize:{type:"fluid.textfieldSlider",options:{min:6,max:30}},lineSpacing:{type:"fluid.textfieldSlider",options:{min:1,max:10}},selectors:{controls:".flc-uiOptions-control",textMinSizeCtrl:".flc-uiOptions-min-text-size",lineSpacingCtrl:".flc-uiOptions-line-spacing",cancel:".flc-uiOptions-cancel",reset:".flc-uiOptions-reset",save:".flc-uiOptions-save",previewFrame:".flc-uiOptions-preview-frame"},events:{modelChanged:null,onSave:null,onCancel:null,onReset:null,afterRender:null},strings:{textFont:["Serif","Sans-Serif","Arial","Verdana","Courier","Times"],textSpacing:["Regular","Wide","Wider","Widest"],theme:["Low Contrast","Medium Contrast","Medium Contrast Grey Scale","High Contrast","High Contrast Inverted"],backgroundImages:["Yes","No"],layout:["Yes","No"],toc:["Yes","No"]},controlValues:{textFont:["serif","sansSerif","arial","verdana","courier","times"],textSpacing:["default","wide1","wide2","wide3"],theme:["lowContrast","default","mediumContrast","highContrast","highContrastInverted"],backgroundImages:["true","false"],layout:["simple","default"],toc:["true","false"]}})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/undo/js/Undo.js b/docs/include/jscripts/infusion/components/undo/js/Undo.js
new file mode 100644 (file)
index 0000000..4a44792
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var STATE_INITIAL="state_initial",STATE_CHANGED="state_changed",STATE_REVERTED="state_reverted";function defaultRenderer(that,targetContainer){var markup="<span class='flc-undo'><span class='flc-undo-undoContainer'>[<a href='#' class='flc-undo-undoControl'>undo</a>]</span><span class='flc-undo-redoContainer'>[<a href='#' class='flc-undo-redoControl'>redo</a>]</span></span>";var markupNode=$(markup);targetContainer.append(markupNode);return markupNode}function refreshView(that){if(that.state===STATE_INITIAL){that.locate("undoContainer").hide();that.locate("redoContainer").hide()}else{if(that.state===STATE_CHANGED){that.locate("undoContainer").show();that.locate("redoContainer").hide()}else{if(that.state===STATE_REVERTED){that.locate("undoContainer").hide();that.locate("redoContainer").show()}}}}var bindHandlers=function(that){that.locate("undoControl").click(function(){if(that.state!==STATE_REVERTED){fluid.model.copyModel(that.extremalModel,that.component.model);that.component.updateModel(that.initialModel,that);that.state=STATE_REVERTED;refreshView(that);that.locate("redoControl").focus()}return false});that.locate("redoControl").click(function(){if(that.state!==STATE_CHANGED){that.component.updateModel(that.extremalModel,that);that.state=STATE_CHANGED;refreshView(that);that.locate("undoControl").focus()}return false});return{modelChanged:function(newModel,oldModel,source){if(source!==that){that.state=STATE_CHANGED;fluid.model.copyModel(that.initialModel,oldModel);refreshView(that)}}}};fluid.undoDecorator=function(component,userOptions){var that=fluid.initView("undo",null,userOptions);that.container=that.options.renderer(that,component.container);fluid.initDomBinder(that);fluid.tabindex(that.locate("undoControl"),0);fluid.tabindex(that.locate("redoControl"),0);that.component=component;that.initialModel={};that.extremalModel={};fluid.model.copyModel(that.initialModel,component.model);fluid.model.copyModel(that.extremalModel,component.model);that.state=STATE_INITIAL;refreshView(that);var listeners=bindHandlers(that);that.returnedOptions={listeners:listeners};return that};fluid.defaults("undo",{selectors:{undoContainer:".flc-undo-undoContainer",undoControl:".flc-undo-undoControl",redoContainer:".flc-undo-redoContainer",redoControl:".flc-undo-redoControl"},renderer:defaultRenderer})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/uploader/ReadMe.txt b/docs/include/jscripts/infusion/components/uploader/ReadMe.txt
new file mode 100644 (file)
index 0000000..d306f8f
--- /dev/null
@@ -0,0 +1,103 @@
+Infusion Uploader Read Me\r
+\r
+1) Upgrading\r
+2) Known Issues\r
+3) Troubleshooting\r
+4) Running the Uploader with out a Server\r
+\r
+--------------------------------------\r
+\r
+UPGRADING from previous versions:\r
+\r
+Before upgrading from Infusion 0.5 or earlier, please refer to the Uploader API documentation and the \r
+latest example code. The Fluid Uploader was extensively refactored in the 0.6 release, and a fresh new \r
+API has been introduced.\r
+\r
+Please refer to the Uploader API documentation on the Fluid Wiki and the \r
+Infusion 1.0 example code before using the Uploader with an existing integration. \r
+http://wiki.fluidproject.org/display/fluid/Uploader+API\r
+\r
+--------------------------------------\r
+\r
+KNOWN ISSUES: \r
+\r
+* To support Flash 10 (released on 9/26/2008), the Uploader required a new version of the SWFUpload \r
+  Flash component (2.2.0 beta 3). This new version, still in beta, still has numerous bugs. We have \r
+  worked around many of the bugs and inconsistencies in the SWFUpload code, but there are still \r
+  significant compromises and issues in this release. For this reason we do not consider this version \r
+  of the Uploader to be production-ready. \r
+\r
+  In the previous version of the Uploader, the Flash component worked completely "behind the scenes". \r
+  To support Flash 10, the Uploader displays a Flash-based "Browse files..." button in place of a \r
+  HTML button. The Flash-based button presents the following quirks:\r
+  \r
+      In Firefox and IE, the Flash-based Browse button does not size correctly when the text/page \r
+      is resized or zoomed.\r
+\r
+      In Firefox (FF):\r
+      - The AIRA role for the Browse button is read correctly as "button" but the text of the button, \r
+        "Browse Files", is ignored.\r
+      - The Flash-based Browse button traps keyboard navigation, refusing to give up focus without a \r
+        mouse click. \r
+      \r
+      In Internet Explorer (IE):\r
+      - AIRA is not supported by Internet Explorer.\r
+\r
+    We are exploring work-arounds for most of these issues, and will have a patch out as soon \r
+    as possible to fix them.\r
+\r
+* In previous versions of the Uploader the upload process would stop immediately at the moment that \r
+  the Stop Upload button was clicked.\r
+   \r
+  With Infusion 0.8, we wait for the current file to complete or to error before we stop the upload \r
+  process. This avoids a serious bug in the SWFUploader where the Upload process could get stuck when \r
+  the Upload process as resumed.\r
+\r
+\r
+--------------------------------------\r
+\r
+TROUBLE SHOOTING:\r
+\r
+* When running the Uploader sample code on a local system without a server, check to make \r
+  sure that you have followed the instructions below under "RUNNING THE UPLOADER ON A \r
+  LOCAL SYSTEM WITHOUT A SERVER". \r
+\r
+* If you see this error in your console: \r
+  [Exception... "'Invalid function name' when calling method: [nsIDOMEventListener::handleEvent]" \r
+  nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]\r
+\r
+  The flashUrl option is probably wrong. Check that first. \r
+\r
+\r
+--------------------------------------\r
+\r
+RUNNING THE UPLOADER ON A LOCAL SYSTEM WITHOUT A SERVER\r
+\r
+Running the Uploader locally without a server is intended for basic testing purposes only. The \r
+DemoUploadManager provides a simulated conversation with the server, but it doesn't represent a\r
+fully accurate picture of the component's behaviour when used in a real deployment environment.\r
+\r
+So see the Uploader in action with a real server, have a look at Fluid's Image Gallery demo:\r
+\r
+http://build.fluidproject.org:8080/sakai-imagegallery2-web/site/AddImages/\r
+\r
+\r
+Additionally, you may need to modify some of your Flash settings to allow the local SWFUpload \r
+object to access your file system. To do so, follow these directions:\r
+\r
+1. Open your browser\r
+2. Browse to:\r
+   http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html\r
+3. In the Flash Settings panel, click "Edit locations..."\r
+4. Select "Add location..."\r
+5. Click "Browse for folder..."\r
+6. Select the local /src/webapp/lib/swfupload/flash/ directory that contains the swfupload.swf file\r
+7. Restart your browser\r
+\r
+You should be good to go! \r
+\r
+However, if you move your installation, you'll need to do this all over again. There are settings \r
+that will allow the file to be run from any location on your local machine but these instructions \r
+are the minimum settings and therefor pose the least security risk.\r
+\r
+These settings are global and do not need to repeated for every browser on a given system. \r
diff --git a/docs/include/jscripts/infusion/components/uploader/css/Uploader.css b/docs/include/jscripts/infusion/components/uploader/css/Uploader.css
new file mode 100644 (file)
index 0000000..90dfc48
--- /dev/null
@@ -0,0 +1,76 @@
+.fl-uploader{width:434px;position:relative;display:block;clear:both;padding:1em 2em;}
+.fl-uploader-manually-degrade,.fl-uploader-manually-enhance{display:block;width:434px;clear:both;float:none;text-align:center;padding:1em;}
+.fl-ProgEnhance-basic div input{margin-top:.6em;}
+.fl-ProgEnhance-enhanced{display:none;}
+.fl-progEnhance-basic div input{margin-top:.6em;}
+.fl-progEnhance-enhanced{display:none;}
+.fl-uploader td,.fl-uploader th{border:none;}
+.fl-uploader table{border-collapse:separate;margin:0;}
+.fl-uploader form{height:auto!important;}
+.fl-uploader button{background-color:#4F99D3;border-color:#2A3990;border-width:1px;border-style:solid;font-weight:bolder;font-size:1.06em;color:#FFF;height:32px;padding-left:2em;padding-right:2em;margin-right:1em;outline:none;cursor:pointer;}
+.fl-uploader button:focus,.fl-uploader button.focus{outline:2px solid #142B8C;}
+.fl-uploader button:hover{background-color:#115F8F;}
+.fl-uploader button.fl-uploader-button-default{background-color:#74B74A;border-color:#006838;}
+.fl-uploader button.fl-uploader-button-default:hover{background-color:#519325;border-color:#142B8C;}
+.fl-uploader button.fl-uploader-button-cancel{background-color:#D03E4F;border-color:#BF1E2D;}
+.fl-uploader button.fl-uploader-button-cancel:hover{background-color:#9E182B;border-color:#142B8C;}
+.fl-uploader button.fl-uploader-dim{background-color:#999;border-color:#666;}
+.fl-uploader button.fl-uploader-dim:hover{background-color:#999;border-color:#666;}
+.fl-uploader button span.text-description{display:none;}
+.fl-uploader a.fl-uploader-browse{background-image:url(../images/add.png);background-attachment:scroll;background-repeat:no-repeat;background-position:5px center;padding:4px 7px 4px 26px;border:none;white-space:nowrap;color:#427ABE;font-weight:normal;cursor:pointer;}
+html>body .fl-uploader a.fl-uploader-browse{padding:3px 6px 3px 25px;border:1px solid transparent;}
+.fl-uploader a.fl-uploader-browse:hover{border:1px solid #CCC;background-color:#FFF;}
+.fl-uploader a.fl-uploader-browse:focus,.fl-uploader a.fl-uploader-browse.focus{outline:2px solid #142B8C;background-color:#FFF;}
+.fl-uploader .fl-uploader-browse-overlay{position:absolute;z-index:1;}
+.fl-uploader-queue-wrapper caption{display:none;}
+.fl-uploader-queue-header{background-color:transparent;color:#666;}
+.fl-uploader-queue-header th{text-align:left;font-size:.94em;font-weight:normal;padding:6px;}
+.fl-uploader-queue-footer{position:relative;background-color:#E6E6E6;border:1px solid #999;}
+.fl-uploader-queue-footer table{width:100%;position:relative;z-index:6;}
+.fl-uploader-queue-footer td{padding:8px 6px;vertical-align:middle;font-size:1.07em;font-weight:bolder;color:#666;}
+.fl-uploader-footer-buttons{text-align:right;}
+.fl-scroller{display:block;position:relative;background-color:white;overflow:auto;overflow-x:hidden;overflow-y:auto;border-width:1px 1px 0;border-style:solid;border-color:#999;}
+.fl-scroller .fl-scroller-inner{position:relative;overflow:hidden;}
+.fl-uploader-queue{position:relative;font-size:.9em;color:#333;z-index:6;}
+html>body .fl-uploader-queue{width:100%;}
+.fl-uploader-queue:focus{border:1px solid #142B8C;}
+.fl-uploader-queue tr:focus,.fl-uploader-queue tr.fl-uploader-file-focus{background-color:#FFF9DC;}
+.fl-uploader-queue tr{background-color:transparent;}
+.fl-uploader-queue tr.fl-uploader-file-state-ready:hover,.fl-uploader-queue tr.fl-uploader-file-hover{background-color:#FFF9DC;}
+.fl-uploader-queue tr.fl-uploader-dim{color:#666;}
+.fl-uploader-queue td,.fl-uploader-queue th{text-align:left;padding:3px 6px;border-bottom:1px solid #BBCFDC;}
+.fl-uploader-queue-wrapper .fl-uploader-file-name{width:322px;overflow:hidden;}
+.fl-uploader-queue-wrapper .fl-uploader-file-size{text-align:right;width:4em;white-space:nowrap;}
+.fl-uploader-queue .fl-uploader-file-action{border:1px solid transparent;height:20px;width:20px;overflow:hidden;background-color:transparent;background-attachment:scroll;background-repeat:no-repeat;background-position:1px 1px;outline:0;padding:0;margin:0;outline:none;}
+.fl-uploader-queue .fl-uploader-file-action:hover{border:1px solid transparent;background-color:transparent;cursor:auto;}
+.fl-uploader-queue .fl-uploader-file-actions .fl-uploader-dim{border:1px solid transparent;background-color:transparent;cursor:auto;}
+.fl-uploader-queue .fl-uploader-file-action-remove{background-image:url(../images/remove.png);cursor:pointer!important;}
+.fl-uploader-queue .fl-uploader-file-action-remove:hover,.fl-uploader-queue tr.fl-uploader-file-state-ready:focus .fl-uploader-file-action-remove,.fl-uploader-queue tr.focus .fl-uploader-file-action-remove{border:1px solid #CCC;background-color:#FFF;}
+.fl-uploader-queue .fl-uploader-file-action-remove:focus,.fl-uploader-queue .fl-uploader-file-action-remove.focus{background-color:#4F99D3;outline:none;}
+.fl-uploader-queue .fl-uploader-file-state-uploaded th,.fl-uploader-queue tr.fl-uploader-file-state-uploaded th,.fl-uploader-queue tr.focus th{border-left:4px solid #74B74A;color:#5E7A5E;}
+.fl-uploader-queue .fl-uploader-file-state-uploaded td{color:#5E7A5E;}
+.fl-uploader-queue .fl-uploader-file-state-uploaded .fl-uploader-file-action{background-image:url(../images/tick.png);}
+.fl-uploader-queue .fl-uploader-file-state-error th{border-left:4px solid #F5E392;background-color:#FCFBE6;border-bottom-width:0;}
+.fl-uploader-queue .fl-uploader-file-state-error td{background-color:#FCFBE6;border-bottom-width:0;}
+.fl-uploader-queue .fl-uploader-file-error td{background-color:#FCFBE6;border-left:4px solid #F5E392;background-image:url(../images/error.png);background-position:8px 2px;background-repeat:no-repeat;padding-bottom:8px;padding-left:32px;}
+.fl-uploader-queue-wrapper td.fl-uploader-file-actions,.fl-uploader-queue-wrapper th.fl-uploader-file-actions{white-space:nowrap;text-align:center;}
+.fl-uploader-queue td.fileStatus{white-space:nowrap;}
+.fl-uploader-queue-wrapper .fl-uploader-browse-instructions{background-color:#F0F9FF;color:#666;text-align:center;border-left:1px solid #999;border-right:1px solid #999;padding:6px;}
+.fl-uploader-btns{margin-top:1em;}
+.fl-uploader-btns .fl-uploader-upload,.fl-uploader-btns .fl-uploader-resume,.fl-uploader-btns .fl-uploader-pause{width:8.4em;}
+.fl-uploader-btns .fl-uploader-done,.fl-uploader-btns .fl-uploader-cancel{width:7.6em;}
+.fl-uploader-btns button{float:right;padding:0;}
+button span.fl-uploader-button-text-hidden{display:none;}
+.fl-uploader-disabled,.fl-uploader-dim{cursor:auto;}
+.fl-uploader-disabled{background-color:#CCC!important;border-color:#999!important;}
+.fl-uploader-dim{opacity:.4;filter:alpha(opacity=40);}
+.fl-uploader-hidden{display:none;}
+.fl-uploader-hidden-templates{display:none;}
+.fl-uploader-file-progress,.fl-uploader-total-progress-okay,.fl-uploader-total-progress-errored{position:absolute;display:none;background-attachment:scroll;background-position:bottom left;background-repeat:repeat-x;overflow:hidden;left:0;z-index:4;}
+.fl-uploader-file-progress{background-image:url('../images/gradient-file-green.png');background-color:#D1D6DD;border-right:1px solid #9FCE7F;width:76%;}
+.fl-uploader-file-progress .fl-uploader-file-progress-text{display:none;}
+.fl-uploader-total-progress-okay,.fl-uploader-total-progress-errored{top:0;height:100%;width:76%;}
+.fl-uploader-total-progress-okay{background-image:url('../images/gradient-total-green.png');border-right:1px solid #9FCE7F;background-color:#BDBFC1;}
+.fl-uploader-total-progress-errored{background-image:url('../images/gradient-total-yellow.png');border-right:1px solid #E8C81C;background-color:#F6ECA0;}
+.fl-uploader-flash9-container{overflow:hidden;width:1px;height:1px;}
+.hideUploaderForOpera{visibility:hidden;overflow:hidden;height:0;width:0;padding:0;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/uploader/html/Uploader.html b/docs/include/jscripts/infusion/components/uploader/html/Uploader.html
new file mode 100644 (file)
index 0000000..c4e6ca4
--- /dev/null
@@ -0,0 +1,127 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+    <head>\r
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
+        <title>Uploader Template</title>\r
+  \r
+        <link href="../../../framework/fss/css/fss-reset.css" rel="stylesheet" type="text/css" />\r
+        <link href="../../../framework/fss/css/fss-layout.css" rel="stylesheet" type="text/css" />\r
+        <link href="../css/Uploader.css" rel="stylesheet" type="text/css" />\r
+        \r
+        <!-- Fluid and jQuery Dependencies -->\r
+        <script src="../../../lib/jquery/core/js/jquery.js" type="text/javascript"></script>\r
+        <script src="../../../lib/jquery/ui/js/ui.core.js" type="text/javascript"></script>\r
+        <script src="../../../framework/core/js/jquery.keyboard-a11y.js" type="text/javascript"></script>\r
+        <script src="../../../lib/swfobject/js/swfobject.js" type="text/javascript"></script>\r
+        <script src="../../../lib/swfupload/js/swfupload.js" type="text/javascript"></script>\r
+        <script src="../../../framework/core/js/Fluid.js" type="text/javascript"></script>\r
+        <script src="../../../framework/core/js/ProgressiveEnhancement.js" type="text/javascript"></script>\r
+        \r
+        <!-- Uploader dependencies; these will be merged into a new Uploader.js at the end -->\r
+        <script src="../js/FileQueue.js" type="text/javascript"></script>\r
+        <script src="../js/DemoUploadManager.js" type="text/javascript"></script>\r
+        <script src="../js/SWFUploadManager.js" type="text/javascript"></script>\r
+        <script src="../js/Scroller.js" type="text/javascript"></script>\r
+        <script src="../../progress/js/Progress.js" type="text/javascript"></script>\r
+        <script src="../js/Uploader.js" type="text/javascript"></script>\r
+    </head>\r
+    \r
+    <body>\r
+        <div id="uploader-contents">\r
+            \r
+            <!-- This form will be progressively enhanced by the Fluid Uploader component. -->\r
+            <form method="post" enctype="multipart/form-data" class="fl-uploader fl-progEnhance-basic">\r
+                <p>Browse to upload a file.</p>\r
+                <input name="fileData" type="file" />\r
+                <div><input type="submit" value="Save"/></div>\r
+            </form>\r
+            \r
+            <!-- This is the markup for the Fluid Uploader component itself. -->\r
+            <form class="flc-uploader fl-uploader fl-progEnhance-enhanced" \r
+                  method="get" \r
+                  enctype="multipart/form-data">\r
+                      \r
+                <!-- The file queue -->\r
+                <div class="fl-uploader-queue-wrapper">\r
+                    \r
+                    <!-- Top of the queue -->\r
+                    <div class="fl-uploader-queue-header">\r
+                        <table cellspacing="0" cellpadding="0" summary="Headers for the file queue.">\r
+                            <caption>File Upload Queue:</caption>\r
+\r
+                                <tr>\r
+                                    <th scope="col" class="fl-uploader-file-name">File Name</th>\r
+                                    <th scope="col" class="fl-uploader-file-size">Size&nbsp;&nbsp;</th>\r
+                                    <th scope="col" class="fl-uploader-file-actions">&nbsp;</th>\r
+                                </tr>\r
+\r
+                        </table>\r
+                    </div>\r
+                    \r
+                    <!-- Scrollable view -->\r
+                    <div class="flc-scroller fl-scroller">\r
+                        <div class="fl-scroller-inner">\r
+                            <table cellspacing="0" class="flc-uploader-queue fl-uploader-queue" summary="Queue of files to upload.">\r
+                                <tbody>\r
+                                    <!-- Rows will be rendered in here. -->\r
+                                    \r
+                                    <!-- Template markup for the file queue rows -->\r
+                                    <tr class="flc-uploader-file-tmplt flc-uploader-file fl-uploader-hidden-templates">\r
+                                        <th class="flc-uploader-file-name fl-uploader-file-name" scope="row">File Name Placeholder</th>\r
+                                        <td class="flc-uploader-file-size fl-uploader-file-size">0 KB</td>\r
+                                        <td class="fl-uploader-file-actions">\r
+                                            <button type="button" class="flc-uploader-file-action fl-uploader-file-action" title="Remove File" tabindex="-1">\r
+                                                <span class="fl-uploader-button-text fl-uploader-hidden">Remove file from queue</span>\r
+                                            </button>\r
+                                        </td>\r
+                                    </tr>\r
+                                    \r
+                                    <!-- Template for the file error info rows -->\r
+                                    <tr class="flc-uploader-file-error-tmplt fl-uploader-file-error fl-uploader-hidden-templates">\r
+                                        <td colspan="3" class="flc-uploader-file-error"></td>\r
+                                    </tr>\r
+                                </tbody>\r
+                            </table>\r
+                            <div class="flc-uploader-file-progressor-tmplt fl-uploader-file-progress"><span class="fl-uploader-file-progress-text fl-uploader-hidden">76%</span></div>\r
+                        </div>\r
+                    </div>\r
+                    \r
+                    <div class="flc-uploader-browse-instructions fl-uploader-browse-instructions">\r
+                        Choose <em>Browse files</em> to add files to the queue \r
+                    </div>\r
+        \r
+                    <!-- Foot of the queue -->\r
+                    <div class="flc-uploader-queue-footer fl-uploader-queue-footer">\r
+                        <table cellspacing="0" cellpadding="0" summary="Status of file queue.">\r
+\r
+                                <tr>\r
+                                    <td class="flc-uploader-total-progress-text">\r
+                                        Total: <span class="fl-uploader-totalFiles">0</span> files \r
+                                        (<span class="fl-uploader-totalBytes">0 KB</span>)\r
+                                    </td>\r
+                                    <td class=".fl-uploader-footer-buttons" align="right" >\r
+                                        <a href="#" class="flc-uploader-button-browse fl-uploader-browse">Browse files</a>\r
+                                    </td>\r
+                                </tr>\r
+\r
+                        </table>\r
+                        <div class="flc-uploader-total-progress fl-uploader-total-progress-okay">&nbsp;</div>\r
+                    </div>\r
+                </div>\r
+                \r
+                <!-- Action buttons -->\r
+                <div class="fl-uploader-btns">\r
+                    <button type="button" class="flc-uploader-button-pause fl-uploader-pause fl-uploader-hidden">Stop Upload</button><button type="button" class="flc-uploader-button-upload fl-uploader-upload fl-uploader-button-default fl-uploader-dim" disabled="disabled">Upload</button>\r
+                </div>\r
+            </form>\r
+        \r
+        </div>\r
+            \r
+        <script type="text/javascript">\r
+            var myUploader = fluid.progressiveEnhanceableUploader(".flc-uploader", ".fl-progEnhance-basic", {\r
+                demo: true,\r
+                uploadManager: "fluid.swfUploadManager"\r
+            });\r
+        </script> \r
+    </body>\r
+</html>\r
diff --git a/docs/include/jscripts/infusion/components/uploader/images/add.png b/docs/include/jscripts/infusion/components/uploader/images/add.png
new file mode 100644 (file)
index 0000000..6332fef
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uploader/images/add.png differ
diff --git a/docs/include/jscripts/infusion/components/uploader/images/browse.png b/docs/include/jscripts/infusion/components/uploader/images/browse.png
new file mode 100644 (file)
index 0000000..dd3927c
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uploader/images/browse.png differ
diff --git a/docs/include/jscripts/infusion/components/uploader/images/error.png b/docs/include/jscripts/infusion/components/uploader/images/error.png
new file mode 100644 (file)
index 0000000..628cf2d
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uploader/images/error.png differ
diff --git a/docs/include/jscripts/infusion/components/uploader/images/gradient-file-green.png b/docs/include/jscripts/infusion/components/uploader/images/gradient-file-green.png
new file mode 100644 (file)
index 0000000..95374c8
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uploader/images/gradient-file-green.png differ
diff --git a/docs/include/jscripts/infusion/components/uploader/images/gradient-file-grey.png b/docs/include/jscripts/infusion/components/uploader/images/gradient-file-grey.png
new file mode 100644 (file)
index 0000000..7da71fe
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uploader/images/gradient-file-grey.png differ
diff --git a/docs/include/jscripts/infusion/components/uploader/images/gradient-total-green.png b/docs/include/jscripts/infusion/components/uploader/images/gradient-total-green.png
new file mode 100644 (file)
index 0000000..cc999e5
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uploader/images/gradient-total-green.png differ
diff --git a/docs/include/jscripts/infusion/components/uploader/images/gradient-total-grey.png b/docs/include/jscripts/infusion/components/uploader/images/gradient-total-grey.png
new file mode 100644 (file)
index 0000000..0246eca
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uploader/images/gradient-total-grey.png differ
diff --git a/docs/include/jscripts/infusion/components/uploader/images/gradient-total-yellow.png b/docs/include/jscripts/infusion/components/uploader/images/gradient-total-yellow.png
new file mode 100644 (file)
index 0000000..98a4db6
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uploader/images/gradient-total-yellow.png differ
diff --git a/docs/include/jscripts/infusion/components/uploader/images/remove.png b/docs/include/jscripts/infusion/components/uploader/images/remove.png
new file mode 100644 (file)
index 0000000..8409ecf
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uploader/images/remove.png differ
diff --git a/docs/include/jscripts/infusion/components/uploader/images/tick.png b/docs/include/jscripts/infusion/components/uploader/images/tick.png
new file mode 100644 (file)
index 0000000..a9925a0
Binary files /dev/null and b/docs/include/jscripts/infusion/components/uploader/images/tick.png differ
diff --git a/docs/include/jscripts/infusion/components/uploader/js/DemoUploadManager.js b/docs/include/jscripts/infusion/components/uploader/js/DemoUploadManager.js
new file mode 100644 (file)
index 0000000..d9020ba
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var updateProgress=function(file,events,demoState,isUploading){if(!isUploading){return }var chunk=Math.min(demoState.chunkSize,file.size);demoState.bytesUploaded=Math.min(demoState.bytesUploaded+chunk,file.size);events.onFileProgress.fire(file,demoState.bytesUploaded,file.size)};var fireAfterFileComplete=function(that,file){if(that.swfUploadSettings){that.swfUploadSettings.upload_complete_handler(file)}else{that.events.afterFileComplete.fire(file)}};var finishAndContinueOrCleanup=function(that,file){that.queueManager.finishFile(file);if(that.queueManager.shouldUploadNextFile()){startUploading(that)}else{that.queueManager.complete()}};var finishUploading=function(that){if(!that.queue.isUploading){return }var file=that.demoState.currentFile;file.filestatus=fluid.uploader.fileStatusConstants.COMPLETE;that.events.onFileSuccess.fire(file);that.demoState.fileIdx++;finishAndContinueOrCleanup(that,file)};var simulateUpload=function(that){if(!that.queue.isUploading){return }var file=that.demoState.currentFile;if(that.demoState.bytesUploaded<file.size){that.invokeAfterRandomDelay(function(){updateProgress(file,that.events,that.demoState,that.queue.isUploading);simulateUpload(that)})}else{finishUploading(that)}};var startUploading=function(that){that.demoState.currentFile=that.queue.files[that.demoState.fileIdx];that.demoState.chunksForCurrentFile=Math.ceil(that.demoState.currentFile/that.demoState.chunkSize);that.demoState.bytesUploaded=0;that.queue.isUploading=true;that.events.onFileStart.fire(that.demoState.currentFile);that.demoState.currentFile.filestatus=fluid.uploader.fileStatusConstants.IN_PROGRESS;simulateUpload(that)};var stopDemo=function(that){var file=that.demoState.currentFile;file.filestatus=fluid.uploader.fileStatusConstants.CANCELLED;that.queue.shouldStop=true;that.events.onFileError.fire(file,fluid.uploader.errorConstants.UPLOAD_STOPPED,"The demo upload was paused by the user.");finishAndContinueOrCleanup(that,file);that.events.onUploadStop.fire()};var setupDemoUploadManager=function(that){if(that.options.simulateDelay===undefined||that.options.simulateDelay===null){that.options.simulateDelay=true}that.demoState={fileIdx:0,chunkSize:200000};return that};fluid.demoUploadManager=function(uploadManager){var that=uploadManager;that.start=function(){that.queueManager.start();startUploading(that)};that.stop=function(){stopDemo(that)};that.invokeAfterRandomDelay=function(fn){var delay;if(that.options.simulateDelay){delay=Math.floor(Math.random()*1000+100);setTimeout(fn,delay)}else{fn()}};setupDemoUploadManager(that);return that}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/uploader/js/FileQueue.js b/docs/include/jscripts/infusion/components/uploader/js/FileQueue.js
new file mode 100644 (file)
index 0000000..f91ea08
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var filterFiles=function(files,filterFn){var filteredFiles=[];for(var i=0;i<files.length;i++){var file=files[i];if(filterFn(file)===true){filteredFiles.push(file)}}return filteredFiles};var getUploadedFiles=function(that){return filterFiles(that.files,function(file){return(file.filestatus===fluid.uploader.fileStatusConstants.COMPLETE)})};var getReadyFiles=function(that){return filterFiles(that.files,function(file){return(file.filestatus===fluid.uploader.fileStatusConstants.QUEUED||file.filestatus===fluid.uploader.fileStatusConstants.CANCELLED)})};var getErroredFiles=function(that){return filterFiles(that.files,function(file){return(file.filestatus===fluid.uploader.fileStatusConstants.ERROR)})};var removeFile=function(that,file){var idx=$.inArray(file,that.files);that.files.splice(idx,1)};var clearCurrentBatch=function(that){that.currentBatch={fileIdx:-1,files:[],totalBytes:0,numFilesCompleted:0,numFilesErrored:0,bytesUploadedForFile:0,previousBytesUploadedForFile:0,totalBytesUploaded:0}};var updateCurrentBatch=function(that){var readyFiles=that.getReadyFiles();that.currentBatch.files=readyFiles;that.currentBatch.totalBytes=fluid.fileQueue.sizeOfFiles(readyFiles)};var setupCurrentBatch=function(that){clearCurrentBatch(that);updateCurrentBatch(that)};fluid.fileQueue=function(){var that={};that.files=[];that.isUploading=false;that.addFile=function(file){that.files.push(file)};that.removeFile=function(file){removeFile(that,file)};that.totalBytes=function(){return fluid.fileQueue.sizeOfFiles(that.files)};that.getReadyFiles=function(){return getReadyFiles(that)};that.getErroredFiles=function(){return getErroredFiles(that)};that.sizeOfReadyFiles=function(){return fluid.fileQueue.sizeOfFiles(that.getReadyFiles())};that.getUploadedFiles=function(){return getUploadedFiles(that)};that.sizeOfUploadedFiles=function(){return fluid.fileQueue.sizeOfFiles(that.getUploadedFiles())};that.setupCurrentBatch=function(){setupCurrentBatch(that)};that.clearCurrentBatch=function(){clearCurrentBatch(that)};that.updateCurrentBatch=function(){updateCurrentBatch(that)};return that};fluid.fileQueue.sizeOfFiles=function(files){var totalBytes=0;for(var i=0;i<files.length;i++){var file=files[i];totalBytes+=file.size}return totalBytes};fluid.fileQueue.manager=function(queue,events){var that={};that.queue=queue;that.events=events;that.start=function(){that.queue.setupCurrentBatch();that.queue.isUploading=true;that.queue.shouldStop=false;that.events.onUploadStart.fire(that.queue.currentBatch.files)};that.startFile=function(){that.queue.currentBatch.fileIdx++;that.queue.currentBatch.bytesUploadedForFile=0;that.queue.currentBatch.previousBytesUploadedForFile=0};that.finishFile=function(file){var batch=that.queue.currentBatch;batch.numFilesCompleted++;that.events.afterFileComplete.fire(file)};that.shouldUploadNextFile=function(){return !that.queue.shouldStop&&that.queue.isUploading&&that.queue.currentBatch.numFilesCompleted<that.queue.currentBatch.files.length};that.complete=function(){that.events.afterUploadComplete.fire(that.queue.currentBatch.files);that.queue.clearCurrentBatch()};return that}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/uploader/js/SWFUploadManager.js b/docs/include/jscripts/infusion/components/uploader/js/SWFUploadManager.js
new file mode 100644 (file)
index 0000000..81c272d
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var unbindSelectFiles=function(){var emptyFunction=function(){};SWFUpload.prototype.selectFile=emptyFunction;SWFUpload.prototype.selectFiles=emptyFunction};var prepareUpstreamOptions=function(that,uploader){that.returnedOptions={uploadManager:{type:uploader.options.uploadManager.type||uploader.options.uploadManager}}};var createAfterReadyHandler=function(that,uploader){return function(){var flashMovie=$("#"+uploader.uploadManager.swfUploader.movieName,uploader.container);var browseButton=uploader.locate("browseButton");fluid.tabindex(flashMovie,0);flashMovie.attr("role","button");flashMovie.attr("alt","Browse files button");if(that.isTransparent){flashMovie.addClass(that.options.styles.browseButtonOverlay);flashMovie.css("top",browseButton.position().top);flashMovie.css("left",browseButton.position().left)}}};var createFlash9MovieContainer=function(){var container=$("<div class='fl-uploader-flash9-container'></div>");var placeholder=$("<span></span>");var placeholderId=fluid.allocateSimpleId(placeholder);container.append(placeholder);$("body").append(container);return placeholderId};var setupForFlash9=function(that,uploader){that.returnedOptions.uploadManager.options={flashURL:that.options.flash9URL||undefined,flashButtonPeerId:createFlash9MovieContainer()}};var createEmptyPlaceholder=function(){var placeholder=$("<span></span>");fluid.allocateSimpleId(placeholder);return placeholder};var createButtonPlaceholder=function(browseButton){var placeholder=$("<span></span>");var placeholderId=fluid.allocateSimpleId(placeholder);browseButton.before(placeholder);unbindSelectFiles();return placeholderId};var setupForFlash10=function(that,uploader){var browseButton=uploader.locate("browseButton");fluid.tabindex(browseButton,-1);that.isTransparent=that.options.flashButtonAlwaysVisible?false:(!$.browser.msie||that.options.transparentEvenInIE);var peerId=that.isTransparent?createButtonPlaceholder(browseButton):fluid.allocateSimpleId(browseButton);that.returnedOptions.uploadManager.options={flashURL:that.options.flash10URL||undefined,flashButtonImageURL:that.isTransparent?undefined:that.options.flashButtonImageURL,flashButtonPeerId:peerId,flashButtonHeight:that.isTransparent?browseButton.outerHeight():that.options.flashButtonHeight,flashButtonWidth:that.isTransparent?browseButton.outerWidth():that.options.flashButtonWidth,flashButtonWindowMode:that.isTransparent?SWFUpload.WINDOW_MODE.TRANSPARENT:SWFUpload.WINDOW_MODE.OPAQUE,flashButtonCursorEffect:SWFUpload.CURSOR.HAND,listeners:{afterReady:createAfterReadyHandler(that,uploader),onUploadStart:function(){uploader.uploadManager.swfUploader.setButtonDisabled(true)},afterUploadComplete:function(){uploader.uploadManager.swfUploader.setButtonDisabled(false)}}}};fluid.swfUploadSetupDecorator=function(uploader,options){var that={};fluid.mergeComponentOptions(that,"fluid.swfUploadSetupDecorator",options);that.flashVersion=swfobject.getFlashPlayerVersion().major;prepareUpstreamOptions(that,uploader);if(that.flashVersion===9){setupForFlash9(that,uploader)}else{setupForFlash10(that,uploader)}return that};fluid.defaults("fluid.swfUploadSetupDecorator",{flashButtonAlwaysVisible:true,transparentEvenInIE:false,flashButtonImageURL:"../images/browse.png",flashButtonHeight:22,flashButtonWidth:106,styles:{browseButtonOverlay:"fl-uploader-browse-overlay"}});var swfUploadOptionsMap={uploadURL:"upload_url",flashURL:"flash_url",postParams:"post_params",fileSizeLimit:"file_size_limit",fileTypes:"file_types",fileTypesDescription:"file_types_description",fileUploadLimit:"file_upload_limit",fileQueueLimit:"file_queue_limit",flashButtonPeerId:"button_placeholder_id",flashButtonImageURL:"button_image_url",flashButtonHeight:"button_height",flashButtonWidth:"button_width",flashButtonWindowMode:"button_window_mode",flashButtonCursorEffect:"button_cursor",debug:"debug"};var swfUploadEventMap={afterReady:"swfupload_loaded_handler",onFileDialog:"file_dialog_start_handler",afterFileQueued:"file_queued_handler",onQueueError:"file_queue_error_handler",afterFileDialog:"file_dialog_complete_handler",onFileStart:"upload_start_handler",onFileProgress:"upload_progress_handler",onFileError:"upload_error_handler",onFileSuccess:"upload_success_handler"};var mapNames=function(nameMap,source,target){var result=target||{};for(var key in source){var mappedKey=nameMap[key];if(mappedKey){result[mappedKey]=source[key]}}return result};var mapEvents=function(that,nameMap,target){var result=target||{};for(var eventType in that.events){var fireFn=that.events[eventType].fire;var mappedName=nameMap[eventType];if(mappedName){result[mappedName]=fireFn}}result.upload_complete_handler=function(file){that.queueManager.finishFile(file);if(that.queueManager.shouldUploadNextFile()){that.swfUploader.startUpload()}else{if(that.queueManager.queue.shouldStop){that.swfUploader.stopUpload()}that.queueManager.complete()}};return result};var browse=function(that){if(that.queue.isUploading){return }if(that.options.fileQueueLimit===1){that.swfUploader.selectFile()}else{that.swfUploader.selectFiles()}};var stopUpload=function(that){that.queue.shouldStop=true;that.events.onUploadStop.fire()};var bindEvents=function(that){var fileStatusUpdater=function(file){fluid.find(that.queue.files,function(potentialMatch){if(potentialMatch.id===file.id){potentialMatch.filestatus=file.filestatus;return true}})};that.events.afterFileQueued.addListener(function(file){that.queue.addFile(file)});that.events.onFileStart.addListener(function(file){that.queueManager.startFile();fileStatusUpdater(file)});that.events.onFileProgress.addListener(function(file,currentBytes,totalBytes){var currentBatch=that.queue.currentBatch;var byteIncrement=currentBytes-currentBatch.previousBytesUploadedForFile;currentBatch.totalBytesUploaded+=byteIncrement;currentBatch.bytesUploadedForFile+=byteIncrement;currentBatch.previousBytesUploadedForFile=currentBytes;fileStatusUpdater(file)});that.events.onFileError.addListener(function(file,error){if(error===fluid.uploader.errorConstants.UPLOAD_STOPPED){that.queue.isUploading=false}else{if(that.queue.isUploading){that.queue.currentBatch.totalBytesUploaded+=file.size;that.queue.currentBatch.numFilesErrored++}}fileStatusUpdater(file)});that.events.onFileSuccess.addListener(function(file){if(that.queue.currentBatch.bytesUploadedForFile===0){that.queue.currentBatch.totalBytesUploaded+=file.size}fileStatusUpdater(file)});that.events.afterUploadComplete.addListener(function(){that.queue.isUploading=false})};var removeFile=function(that,file){that.queue.removeFile(file);that.swfUploader.cancelUpload(file.id);that.events.afterFileRemoved.fire(file)};var setupSwfUploadManager=function(that,events){that.events=events;that.queue=fluid.fileQueue();that.queueManager=fluid.fileQueue.manager(that.queue,that.events);that.swfUploadSettings=mapNames(swfUploadOptionsMap,that.options);mapEvents(that,swfUploadEventMap,that.swfUploadSettings);that.swfUploader=new SWFUpload(that.swfUploadSettings);bindEvents(that)};fluid.swfUploadManager=function(events,options){var that={};fluid.mergeComponentOptions(that,"fluid.swfUploadManager",options);fluid.mergeListeners(events,that.options.listeners);that.browseForFiles=function(){browse(that)};that.removeFile=function(file){removeFile(that,file)};that.start=function(){that.queueManager.start();that.swfUploader.startUpload()};that.stop=function(){stopUpload(that)};setupSwfUploadManager(that,events);return that};fluid.defaults("fluid.swfUploadManager",{uploadURL:"",flashURL:"../../../lib/swfupload/flash/swfupload.swf",flashButtonPeerId:"",postParams:{},fileSizeLimit:"20480",fileTypes:"*",fileTypesDescription:null,fileUploadLimit:0,fileQueueLimit:0,debug:false})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/uploader/js/Scroller.js b/docs/include/jscripts/infusion/components/uploader/js/Scroller.js
new file mode 100644 (file)
index 0000000..156a473
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var refreshView=function(that){var maxHeight=that.options.maxHeight;var isOverMaxHeight=(that.scrollingElm.children().eq(0).height()>maxHeight);var setHeight=(isOverMaxHeight)?maxHeight:"";that.scrollingElm.height(setHeight)};var scrollBottom=function(that){that.scrollingElm[0].scrollTop=that.scrollingElm[0].scrollHeight};var scrollTo=function(that,element){if(!element||element.length<1){return }var padTop=0;var padBottom=0;var elmPosTop=element[0].offsetTop;var elmHeight=element.height();var containerScrollTop=that.scrollingElm[0].scrollTop;var containerHeight=that.scrollingElm.height();if(that.options.padScroll){var prevElmHeight=element.prev().height();padTop=(prevElmHeight+elmHeight<=containerHeight)?prevElmHeight:0;var nextElmHeight=element.next().height();padBottom=(nextElmHeight+elmHeight<=containerHeight)?nextElmHeight:0}if((elmPosTop-padTop)<containerScrollTop){that.scrollingElm[0].scrollTop=elmPosTop-padTop}if(((elmPosTop+elmHeight)+padBottom)>(containerScrollTop+containerHeight)){elmHeight=(elmHeight<containerHeight)?elmHeight:containerHeight;that.scrollingElm[0].scrollTop=(elmPosTop-containerHeight+elmHeight+padBottom)}};var setupScroller=function(that){that.scrollingElm=that.container.parents(that.options.selectors.wrapper);if(!that.scrollingElm.length){fluid.fail({name:"Missing Scroller",message:"The scroller wrapper element was not found."})}if(!$.browser.msie||$.browser.version>6){that.scrollingElm.css("max-height",that.options.maxHeight)}};fluid.scroller=function(container,options){var that=fluid.initView("fluid.scroller",container,options);setupScroller(that);that.scrollTo=function(element){scrollTo(that,element)};that.scrollBottom=function(){scrollBottom(that)};that.refreshView=function(){if($.browser.msie&&$.browser.version<7){refreshView(that)}};that.refreshView();return that};fluid.defaults("fluid.scroller",{selectors:{wrapper:".flc-scroller"},maxHeight:180,padScroll:true})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/components/uploader/js/Uploader.js b/docs/include/jscripts/infusion/components/uploader/js/Uploader.js
new file mode 100644 (file)
index 0000000..640f2b1
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var rowForFile=function(that,file){return that.locate("fileQueue").find("#"+file.id)};var errorRowForFile=function(that,file){return $("#"+file.id+"_error",that.container)};var fileForRow=function(that,row){var files=that.uploadManager.queue.files;for(var i=0;i<files.length;i++){var file=files[i];if(file.id.toString()===row.attr("id")){return file}}return null};var progressorForFile=function(that,file){var progressId=file.id+"_progress";return that.fileProgressors[progressId]};var startFileProgress=function(that,file){var fileRowElm=rowForFile(that,file);that.scroller.scrollTo(fileRowElm);var fileProgressor=progressorForFile(that,file);fileProgressor.refreshView();fileProgressor.show()};var updateFileProgress=function(that,file,fileBytesComplete,fileTotalBytes){var filePercent=fluid.uploader.derivePercent(fileBytesComplete,fileTotalBytes);var filePercentStr=filePercent+"%";progressorForFile(that,file).update(filePercent,filePercentStr)};var hideFileProgress=function(that,file){var fileRowElm=rowForFile(that,file);progressorForFile(that,file).hide();if(file.filestatus===fluid.uploader.fileStatusConstants.COMPLETE){that.locate("fileIconBtn",fileRowElm).removeClass(that.options.styles.dim)}};var removeFileProgress=function(that,file){var fileProgressor=progressorForFile(that,file);if(!fileProgressor){return }var rowProgressor=fileProgressor.displayElement;rowProgressor.remove()};var animateRowRemoval=function(that,row){row.fadeOut("fast",function(){row.remove();that.refreshView()})};var removeFileErrorRow=function(that,file){if(file.filestatus===fluid.uploader.fileStatusConstants.ERROR){animateRowRemoval(that,errorRowForFile(that,file))}};var removeFileAndRow=function(that,file,row){removeFileProgress(that,file);removeFileErrorRow(that,file);that.uploadManager.removeFile(file);animateRowRemoval(that,row)};var removeFileForRow=function(that,row){var file=fileForRow(that,row);if(!file||file.filestatus===fluid.uploader.fileStatusConstants.COMPLETE){return }removeFileAndRow(that,file,row)};var removeRowForFile=function(that,file){var row=rowForFile(that,file);removeFileAndRow(that,file,row)};var bindHover=function(row,styles){var over=function(){if(row.hasClass(styles.ready)&&!row.hasClass(styles.uploading)){row.addClass(styles.hover)}};var out=function(){if(row.hasClass(styles.ready)&&!row.hasClass(styles.uploading)){row.removeClass(styles.hover)}};row.hover(over,out)};var bindDeleteKey=function(that,row){var deleteHandler=function(){removeFileForRow(that,row)};fluid.activatable(row,null,{additionalBindings:[{key:$.ui.keyCode.DELETE,activateHandler:deleteHandler}]})};var bindRowHandlers=function(that,row){if($.browser.msie&&$.browser.version<7){bindHover(row,that.options.styles)}that.locate("fileIconBtn",row).click(function(){removeFileForRow(that,row)});bindDeleteKey(that,row)};var renderRowFromTemplate=function(that,file){var row=that.rowTemplate.clone();that.locate("fileName",row).text(file.name);that.locate("fileSize",row).text(fluid.uploader.formatFileSize(file.size));that.locate("fileIconBtn",row).addClass(that.options.styles.remove);row.attr("id",file.id);row.addClass(that.options.styles.ready);bindRowHandlers(that,row);return row};var createProgressorFromTemplate=function(that,row){var rowProgressor=that.rowProgressorTemplate.clone();var rowId=row.attr("id");var progressId=rowId+"_progress";rowProgressor.attr("id",progressId);rowProgressor.css("top",row.position().top);rowProgressor.height(row.height()).width(5);that.container.after(rowProgressor);that.fileProgressors[progressId]=fluid.progress(that.uploadContainer,{selectors:{progressBar:"#"+rowId,displayElement:"#"+progressId,label:"#"+progressId+" .fl-uploader-file-progress-text",indicator:"#"+progressId}})};var addFile=function(that,file){var row=renderRowFromTemplate(that,file);if(!($.browser.msie&&($.browser.version>=8))){row.hide()}that.container.append(row);row.fadeIn("slow");that.scroller.scrollBottom();createProgressorFromTemplate(that,row);that.refreshView()};var prepareForUpload=function(that){var rowButtons=that.locate("fileIconBtn",that.locate("fileRows"));rowButtons.attr("disabled","disabled");rowButtons.addClass(that.options.styles.dim)};var refreshAfterUpload=function(that){var rowButtons=that.locate("fileIconBtn",that.locate("fileRows"));rowButtons.removeAttr("disabled");rowButtons.removeClass(that.options.styles.dim)};var changeRowState=function(that,row,newState){row.removeClass(that.options.styles.ready).removeClass(that.options.styles.error).addClass(newState)};var markRowAsComplete=function(that,file){var row=rowForFile(that,file);changeRowState(that,row,that.options.styles.uploaded);row.attr("title",that.options.strings.status.success);fluid.enabled(row,false);var removeRowBtn=that.locate("fileIconBtn",row);removeRowBtn.unbind("click");removeRowBtn.removeClass(that.options.styles.remove);removeRowBtn.attr("title",that.options.strings.status.success)};var renderErrorInfoRowFromTemplate=function(that,fileRow,error){var errorRow=that.errorInfoRowTemplate.clone();errorRow.attr("id",fileRow.attr("id")+"_error");var errorType=fluid.keyForValue(fluid.uploader.errorConstants,error);var errorMsg=that.options.strings.errors[errorType];that.locate("errorText",errorRow).text(errorMsg);fileRow.after(errorRow);that.scroller.scrollTo(errorRow)};var showErrorForFile=function(that,file,error){hideFileProgress(that,file);if(file.filestatus===fluid.uploader.fileStatusConstants.ERROR){var fileRowElm=rowForFile(that,file);changeRowState(that,fileRowElm,that.options.styles.error);renderErrorInfoRowFromTemplate(that,fileRowElm,error)}};var bindModelEvents=function(that){that.returnedOptions={listeners:{afterFileQueued:that.addFile,onUploadStart:that.prepareForUpload,onFileStart:that.showFileProgress,onFileProgress:that.updateFileProgress,onFileSuccess:that.markFileComplete,onFileError:that.showErrorForFile,afterFileComplete:that.hideFileProgress,afterUploadComplete:that.refreshAfterUpload}}};var addKeyboardNavigation=function(that){fluid.tabbable(that.container);that.selectableContext=fluid.selectable(that.container,{selectableSelector:that.options.selectors.fileRows,onSelect:function(itemToSelect){$(itemToSelect).addClass(that.options.styles.selected)},onUnselect:function(selectedItem){$(selectedItem).removeClass(that.options.styles.selected)}})};var prepareTemplateElements=function(that){that.rowTemplate=that.locate("rowTemplate").remove();if($.browser.msie&&($.browser.version>=8)){that.rowTemplate.removeClass(that.options.styles.hiddenTemplate)}that.errorInfoRowTemplate=that.locate("errorInfoRowTemplate").remove();that.errorInfoRowTemplate.removeClass(that.options.styles.hiddenTemplate);that.rowProgressorTemplate=that.locate("rowProgressorTemplate",that.uploadContainer).remove()};var setupFileQueue=function(that,uploadManager){that.uploadManager=uploadManager;that.scroller=fluid.scroller(that.container);prepareTemplateElements(that);addKeyboardNavigation(that);bindModelEvents(that)};fluid.fileQueueView=function(container,parentContainer,uploadManager,options){var that=fluid.initView("fluid.fileQueueView",container,options);that.uploadContainer=parentContainer;that.fileProgressors={};that.addFile=function(file){addFile(that,file)};that.removeFile=function(file){removeRowForFile(that,file)};that.prepareForUpload=function(){prepareForUpload(that)};that.refreshAfterUpload=function(){refreshAfterUpload(that)};that.showFileProgress=function(file){startFileProgress(that,file)};that.updateFileProgress=function(file,fileBytesComplete,fileTotalBytes){updateFileProgress(that,file,fileBytesComplete,fileTotalBytes)};that.markFileComplete=function(file){progressorForFile(that,file).update(100,"100%");markRowAsComplete(that,file)};that.showErrorForFile=function(file,error){showErrorForFile(that,file,error)};that.hideFileProgress=function(file){hideFileProgress(that,file)};that.refreshView=function(){that.scroller.refreshView();that.selectableContext.refresh()};setupFileQueue(that,uploadManager);return that};fluid.defaults("fluid.fileQueueView",{selectors:{fileRows:".flc-uploader-file",fileName:".flc-uploader-file-name",fileSize:".flc-uploader-file-size",fileIconBtn:".flc-uploader-file-action",errorText:".flc-uploader-file-error",rowTemplate:".flc-uploader-file-tmplt",errorInfoRowTemplate:".flc-uploader-file-error-tmplt",rowProgressorTemplate:".flc-uploader-file-progressor-tmplt"},styles:{hover:"fl-uploader-file-hover",selected:"fl-uploader-file-focus",ready:"fl-uploader-file-state-ready",uploading:"fl-uploader-file-state-uploading",uploaded:"fl-uploader-file-state-uploaded",error:"fl-uploader-file-state-error",remove:"fl-uploader-file-action-remove",dim:"fl-uploader-dim",hiddenTemplate:"fl-uploader-hidden-templates"},strings:{progress:{toUploadLabel:"To upload: %fileCount %fileLabel (%totalBytes)",singleFile:"file",pluralFiles:"files"},status:{success:"File Uploaded",error:"File Upload Error"},errors:{HTTP_ERROR:"File upload error: a network error occured or the file was rejected (reason unknown).",IO_ERROR:"File upload error: a network error occured.",UPLOAD_LIMIT_EXCEEDED:"File upload error: you have uploaded as many files as you are allowed during this session",UPLOAD_FAILED:"File upload error: the upload failed for an unknown reason.",QUEUE_LIMIT_EXCEEDED:"You have as many files in the queue as can be added at one time. Removing files from the queue may allow you to add different files.",FILE_EXCEEDS_SIZE_LIMIT:"One or more of the files that you attempted to add to the queue exceeded the limit of %fileSizeLimit.",ZERO_BYTE_FILE:"One or more of the files that you attempted to add contained no data.",INVALID_FILETYPE:"One or more files were not added to the queue because they were of the wrong type."}}})})(jQuery,fluid_1_1);(function($,fluid){var fileOrFiles=function(that,numFiles){return(numFiles===1)?that.options.strings.progress.singleFile:that.options.strings.progress.pluralFiles};var enableElement=function(that,elm){elm.removeAttr("disabled");elm.removeClass(that.options.styles.dim)};var disableElement=function(that,elm){elm.attr("disabled","disabled");elm.addClass(that.options.styles.dim)};var showElement=function(that,elm){elm.removeClass(that.options.styles.hidden)};var hideElement=function(that,elm){elm.addClass(that.options.styles.hidden)};var setTotalProgressStyle=function(that,didError){didError=didError||false;var indicator=that.totalProgress.indicator;indicator.toggleClass(that.options.styles.totalProgress,!didError);indicator.toggleClass(that.options.styles.totalProgressError,didError)};var setStateEmpty=function(that){disableElement(that,that.locate("uploadButton"));if(that.uploadManager.queue.files.length===0){that.locate("browseButton").text(that.options.strings.buttons.browse);showElement(that,that.locate("instructions"))}};var setStateDone=function(that){disableElement(that,that.locate("uploadButton"));enableElement(that,that.locate("browseButton"));hideElement(that,that.locate("pauseButton"));showElement(that,that.locate("uploadButton"))};var setStateLoaded=function(that){that.locate("browseButton").text(that.options.strings.buttons.addMore);hideElement(that,that.locate("pauseButton"));showElement(that,that.locate("uploadButton"));enableElement(that,that.locate("uploadButton"));enableElement(that,that.locate("browseButton"));hideElement(that,that.locate("instructions"));that.totalProgress.hide()};var setStateUploading=function(that){that.totalProgress.hide(false,false);setTotalProgressStyle(that);hideElement(that,that.locate("uploadButton"));disableElement(that,that.locate("browseButton"));enableElement(that,that.locate("pauseButton"));showElement(that,that.locate("pauseButton"));that.locate(that.options.focusWithEvent.afterUploadStart).focus()};var renderUploadTotalMessage=function(that){var numReadyFiles=that.uploadManager.queue.getReadyFiles().length;var bytesReadyFiles=that.uploadManager.queue.sizeOfReadyFiles();var fileLabelStr=fileOrFiles(that,numReadyFiles);var totalStateStr=fluid.stringTemplate(that.options.strings.progress.toUploadLabel,{fileCount:numReadyFiles,fileLabel:fileLabelStr,totalBytes:fluid.uploader.formatFileSize(bytesReadyFiles)});that.locate("totalFileStatusText").html(totalStateStr)};var updateTotalProgress=function(that){var batch=that.uploadManager.queue.currentBatch;var totalPercent=fluid.uploader.derivePercent(batch.totalBytesUploaded,batch.totalBytes);var numFilesInBatch=batch.files.length;var fileLabelStr=fileOrFiles(that,numFilesInBatch);var totalProgressStr=fluid.stringTemplate(that.options.strings.progress.totalProgressLabel,{curFileN:batch.fileIdx+1,totalFilesN:numFilesInBatch,fileLabel:fileLabelStr,currBytes:fluid.uploader.formatFileSize(batch.totalBytesUploaded),totalBytes:fluid.uploader.formatFileSize(batch.totalBytes)});that.totalProgress.update(totalPercent,totalProgressStr)};var updateTotalAtCompletion=function(that){var numErroredFiles=that.uploadManager.queue.getErroredFiles().length;var numTotalFiles=that.uploadManager.queue.files.length;var fileLabelStr=fileOrFiles(that,numTotalFiles);var errorStr="";if(numErroredFiles>0){var errorLabelString=(numErroredFiles===1)?that.options.strings.progress.singleError:that.options.strings.progress.pluralErrors;setTotalProgressStyle(that,true);errorStr=fluid.stringTemplate(that.options.strings.progress.numberOfErrors,{errorsN:numErroredFiles,errorLabel:errorLabelString})}var totalProgressStr=fluid.stringTemplate(that.options.strings.progress.completedLabel,{curFileN:that.uploadManager.queue.getUploadedFiles().length,totalFilesN:numTotalFiles,errorString:errorStr,fileLabel:fileLabelStr,totalCurrBytes:fluid.uploader.formatFileSize(that.uploadManager.queue.sizeOfUploadedFiles())});that.totalProgress.update(100,totalProgressStr)};var bindDOMEvents=function(that){that.locate("browseButton").click(function(evnt){that.uploadManager.browseForFiles();evnt.preventDefault()});that.locate("uploadButton").click(function(){that.uploadManager.start()});that.locate("pauseButton").click(function(){that.uploadManager.stop()})};var updateStateAfterFileDialog=function(that){if(that.uploadManager.queue.getReadyFiles().length>0){setStateLoaded(that);renderUploadTotalMessage(that);that.locate(that.options.focusWithEvent.afterFileDialog).focus()}};var updateStateAfterFileRemoval=function(that){if(that.uploadManager.queue.getReadyFiles().length===0){setStateEmpty(that)}renderUploadTotalMessage(that)};var updateStateAfterPause=function(that){};var updateStateAfterCompletion=function(that){var userPaused=that.uploadManager.queue.shouldStop;if(that.uploadManager.queue.getReadyFiles().length===0){setStateDone(that)}else{setStateLoaded(that)}updateTotalAtCompletion(that)};var bindModelEvents=function(that){that.events.afterFileDialog.addListener(function(){updateStateAfterFileDialog(that)});that.events.afterFileRemoved.addListener(function(){updateStateAfterFileRemoval(that)});that.events.onUploadStart.addListener(function(){setStateUploading(that)});that.events.onUploadStop.addListener(function(){that.locate(that.options.focusWithEvent.afterUploadStop).focus()});that.events.onFileProgress.addListener(function(){updateTotalProgress(that)});that.events.onFileSuccess.addListener(function(){updateTotalProgress(that)});that.events.onFileError.addListener(function(file,error,message){if(error===fluid.uploader.errorConstants.UPLOAD_STOPPED){updateStateAfterPause(that)}});that.events.afterUploadComplete.addListener(function(){updateStateAfterCompletion(that)})};var initUploadManager=function(that){var manager=fluid.initSubcomponent(that,"uploadManager",[that.events,fluid.COMPONENT_OPTIONS]);return that.options.demo?fluid.demoUploadManager(manager):manager};var setupUploader=function(that){that.decorators=fluid.initSubcomponents(that,"decorators",[that,fluid.COMPONENT_OPTIONS]);that.uploadManager=initUploadManager(that);that.fileQueueView=fluid.initSubcomponent(that,"fileQueueView",[that.locate("fileQueue"),that.container,that.uploadManager,fluid.COMPONENT_OPTIONS]);that.totalProgress=fluid.initSubcomponent(that,"totalProgressBar",[that.container,fluid.COMPONENT_OPTIONS]);disableElement(that,that.locate("uploadButton"));bindDOMEvents(that);bindModelEvents(that)};fluid.uploader=function(container,options){var that=fluid.initView("fluid.uploader",container,options);setupUploader(that);return that};fluid.progressiveEnhanceableUploader=function(container,enhanceable,options){enhanceable=fluid.container(enhanceable);container=fluid.container(container);if(swfobject.getFlashPlayerVersion().major<9){enhanceable.show()}else{container.show();return fluid.uploader(container,options)}};fluid.uploader.formatFileSize=function(bytes){if(typeof bytes==="number"){if(bytes===0){return"0.0 KB"}else{if(bytes>0){if(bytes<1048576){return(Math.ceil(bytes/1024*10)/10).toFixed(1)+" KB"}else{return(Math.ceil(bytes/1048576*10)/10).toFixed(1)+" MB"}}}}return""};fluid.uploader.derivePercent=function(num,total){return Math.round((num*100)/total)};fluid.defaults("fluid.uploader",{demo:false,decorators:[{type:"fluid.swfUploadSetupDecorator"},{type:"fluid.manuallyDegrade",options:{selectors:{enhanceable:".fl-uploader.fl-progEnhance-basic"}}}],uploadManager:{type:"fluid.swfUploadManager"},fileQueueView:{type:"fluid.fileQueueView"},totalProgressBar:{type:"fluid.progress",options:{selectors:{progressBar:".flc-uploader-queue-footer",displayElement:".flc-uploader-total-progress",label:".flc-uploader-total-progress-text",indicator:".flc-uploader-total-progress",ariaElement:".flc-uploader-total-progress"}}},selectors:{fileQueue:".flc-uploader-queue",browseButton:".flc-uploader-button-browse",uploadButton:".flc-uploader-button-upload",pauseButton:".flc-uploader-button-pause",totalFileStatusText:".flc-uploader-total-progress-text",instructions:".flc-uploader-browse-instructions"},focusWithEvent:{afterFileDialog:"uploadButton",afterUploadStart:"pauseButton",afterUploadStop:"uploadButton"},styles:{disabled:"fl-uploader-disabled",hidden:"fl-uploader-hidden",dim:"fl-uploader-dim",totalProgress:"fl-uploader-total-progress-okay",totalProgressError:"fl-uploader-total-progress-errored"},events:{afterReady:null,onFileDialog:null,afterFileQueued:null,afterFileRemoved:null,onQueueError:null,afterFileDialog:null,onUploadStart:null,onUploadStop:null,onFileStart:null,onFileProgress:null,onFileError:null,onFileSuccess:null,afterFileComplete:null,afterUploadComplete:null},strings:{progress:{toUploadLabel:"To upload: %fileCount %fileLabel (%totalBytes)",totalProgressLabel:"Uploading: %curFileN of %totalFilesN %fileLabel (%currBytes of %totalBytes)",completedLabel:"Uploaded: %curFileN of %totalFilesN %fileLabel (%totalCurrBytes)%errorString",numberOfErrors:", %errorsN %errorLabel",singleFile:"file",pluralFiles:"files",singleError:"error",pluralErrors:"errors"},buttons:{browse:"Browse Files",addMore:"Add More",stopUpload:"Stop Upload",cancelRemaning:"Cancel remaining Uploads",resumeUpload:"Resume Upload"}}});fluid.uploader.errorConstants={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};fluid.uploader.fileStatusConstants={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};var renderLink=function(renderLocation,text,classes,appendBeside){var link=$("<a href='#'>"+text+"</a>");link.addClass(classes);if(renderLocation==="before"){appendBeside.before(link)}else{appendBeside.after(link)}return link};var toggleVisibility=function(toShow,toHide){if(window.opera){toShow.show().removeClass("hideUploaderForOpera");toHide.show().addClass("hideUploaderForOpera")}else{toShow.show();toHide.hide()}};var defaultControlRenderer=function(that){var degradeLink=renderLink(that.options.defaultRenderLocation,that.options.strings.degradeLinkText,that.options.styles.degradeLinkClass,that.enhancedContainer);degradeLink.addClass("flc-manuallyDegrade-degrade");var enhanceLink=renderLink(that.options.defaultRenderLocation,that.options.strings.enhanceLinkText,that.options.styles.enhanceLinkClass,that.degradedContainer);enhanceLink.addClass("flc-manuallyDegrade-enhance")};var fetchControls=function(that){that.degradeControl=that.locate("degradeControl");that.enhanceControl=that.locate("enhanceControl")};var setupManuallyDegrade=function(that){if(!that.degradedContainer.length){return }fetchControls(that);if(!that.degradeControl.length&&!that.enhanceControl.length){that.options.controlRenderer(that);fetchControls(that)}that.degradeControl.click(that.degrade);that.enhanceControl.click(that.enhance);that.enhanceControl.hide()};var determineContainer=function(options){var defaults=fluid.defaults("fluid.manuallyDegrade");return(options&&options.container)?options.container:defaults.container};fluid.manuallyDegrade=function(component,options){var container=determineContainer(options);var that=fluid.initView("fluid.manuallyDegrade",container,options);var isDegraded=false;that.enhancedContainer=component.container;that.degradedContainer=that.locate("enhanceable");that.degrade=function(){toggleVisibility(that.enhanceControl,that.degradeControl);toggleVisibility(that.degradedContainer,that.enhancedContainer);isDegraded=true};that.enhance=function(){toggleVisibility(that.degradeControl,that.enhanceControl);toggleVisibility(that.enhancedContainer,that.degradedContainer);isDegraded=false};that.isDegraded=function(){return isDegraded};setupManuallyDegrade(that);return that};fluid.defaults("fluid.manuallyDegrade",{container:"body",controlRenderer:defaultControlRenderer,defaultRenderLocation:"before",strings:{degradeLinkText:"Switch to the standard single-file Uploader",enhanceLinkText:"Switch to the Flash-based multi-file Uploader"},selectors:{enhanceable:".fl-ProgEnhance-basic",degradeControl:".flc-manuallyDegrade-degrade",enhanceControl:".flc-manuallyDegrade-enhance"},styles:{degradeLinkClass:"fl-uploader-manually-degrade",enhanceLinkClass:"fl-uploader-manually-enhance"}})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/core/js/DataBinding.js b/docs/include/jscripts/infusion/framework/core/js/DataBinding.js
new file mode 100644 (file)
index 0000000..94a515f
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.VALUE={};fluid.BINDING_ROOT_KEY="fluid-binding-root";fluid.findData=function(elem,name){while(elem){var data=$.data(elem,name);if(data){return data}elem=elem.parentNode}};fluid.bindFossils=function(node,data,fossils){$.data(node,fluid.BINDING_ROOT_KEY,{data:data,fossils:fossils})};fluid.findForm=function(node){return fluid.findAncestor(node,function(element){return element.nodeName.toLowerCase()==="form"})};fluid.value=function(nodeIn,newValue){var node=fluid.unwrap(nodeIn);var multiple=false;if(node.nodeType===undefined&&node.length>1){node=node[0];multiple=true}var jNode=$(node);if("input"!==node.nodeName.toLowerCase()||!/radio|checkbox/.test(node.type)){return $(node).val(newValue)}var name=node.name;if(name===undefined){fluid.fail("Cannot acquire value from node "+fluid.dumpEl(node)+" which does not have name attribute set")}var elements;if(multiple){elements=nodeIn}else{var elements=document.getElementsByName(name);var scope=fluid.findForm(node);elements=$.grep(elements,function(element){if(element.name!==name){return false}return !scope||fluid.dom.isContainer(scope,element)})}if(newValue!==undefined){if(typeof (newValue)==="boolean"){newValue=(newValue?"true":"false")}$.each(elements,function(){this.checked=(newValue instanceof Array?$.inArray(this.value,newValue)!==-1:newValue===this.value)})}else{var checked=$.map(elements,function(element){return element.checked?element.value:null});return node.type==="radio"?checked[0]:checked}};fluid.applyChange=function(node,newValue,applier){node=fluid.unwrap(node);if(newValue===undefined){newValue=fluid.value(node)}if(node.nodeType===undefined&&node.length>0){node=node[0]}var root=fluid.findData(node,fluid.BINDING_ROOT_KEY);if(!root){fluid.fail("Bound data could not be discovered in any node above "+fluid.dumpEl(node))}var name=node.name;var fossil=root.fossils[name];if(!fossil){fluid.fail("No fossil discovered for name "+name+" in fossil record above "+fluid.dumpEl(node))}if(typeof (fossil.oldvalue)==="boolean"){newValue=newValue[0]?true:false}var EL=root.fossils[name].EL;if(applier){applier.fireChangeRequest({path:EL,value:newValue,source:node.id})}else{fluid.model.setBeanValue(root.data,EL,newValue)}};fluid.pathUtil={};var getPathSegmentImpl=function(accept,path,i){var segment=null;if(accept){segment=""}var escaped=false;var limit=path.length;for(;i<limit;++i){var c=path.charAt(i);if(!escaped){if(c==="."){break}else{if(c==="\\"){escaped=true}else{if(segment!==null){segment+=c}}}}else{escaped=false;if(segment!==null){accept+=c}}}if(segment!==null){accept[0]=segment}return i};var globalAccept=[];fluid.pathUtil.getPathSegment=function(path,i){getPathSegmentImpl(globalAccept,path,i);return globalAccept[0]};fluid.pathUtil.getHeadPath=function(path){return fluid.pathUtil.getPathSegment(path,0)};fluid.pathUtil.getFromHeadPath=function(path){var firstdot=getPathSegmentImpl(null,path,0);return firstdot===path.length?null:path.substring(firstdot+1)};function lastDotIndex(path){return path.lastIndexOf(".")}fluid.pathUtil.getToTailPath=function(path){var lastdot=lastDotIndex(path);return lastdot==-1?null:path.substring(0,lastdot)};fluid.pathUtil.getTailPath=function(path){var lastdot=lastDotIndex(path);return fluid.pathUtil.getPathSegment(path,lastdot+1)};var composeSegment=function(prefix,toappend){for(var i=0;i<toappend.length;++i){var c=toappend.charAt(i);if(c==="."||c==="\\"||c==="}"){prefix+="\\"}prefix+=c}return prefix};fluid.pathUtil.composePath=function(prefix,suffix){if(prefix.length!==0){prefix+="."}return composeSegment(prefix,suffix)};fluid.pathUtil.matchPath=function(spec,path){var togo="";while(true){if(!spec){break}if(!path){return null}var spechead=fluid.pathUtil.getHeadPath(spec);var pathhead=fluid.pathUtil.getHeadPath(path);if(spechead!=="*"&&spechead!==pathhead){return null}togo=fluid.pathUtil.composePath(togo,pathhead);spec=fluid.pathUtil.getFromHeadPath(spec);path=fluid.pathUtil.getFromHeadPath(path)}return togo};fluid.model.applyChangeRequest=function(model,request){if(request.type==="ADD"){fluid.model.setBeanValue(model,request.path,request.value)}else{if(request.type==="DELETE"){var totail=fluid.pathUtil.getToTailPath(request.path);var tail=fluid.pathUtil.getTailPath(request.path);var penult=fluid.model.getBeanValue(model,penult);delete penult[tail]}}};fluid.makeChangeApplier=function(model){var baseEvents={guards:fluid.event.getEventFirer(false,true),modelChanged:fluid.event.getEventFirer(false,false)};var that={model:model};function makePredicate(listenerMember,requestIndex){return function(listener,args){var changeRequest=args[requestIndex];return fluid.pathUtil.matchPath(listener[listenerMember],changeRequest.path)}}function adaptListener(that,name,listenerMember,requestIndex){var predicate=makePredicate(listenerMember,requestIndex);that[name]={addListener:function(pathSpec,listener,namespace){listener[listenerMember]=pathSpec;baseEvents[name].addListener(listener,namespace,predicate)},removeListener:function(listener){baseEvents[name].removeListener(listener)}}}adaptListener(that,"guards","guardedPathSpec",1);adaptListener(that,"modelChanged","triggerPathSpec",2);that.fireChangeRequest=function(changeRequest){if(!changeRequest.type){changeRequest.type="ADD"}var prevent=baseEvents.guards.fire(model,changeRequest);if(prevent===false){return }var oldModel={};fluid.model.copyModel(oldModel,model);fluid.model.applyChangeRequest(model,changeRequest);baseEvents.modelChanged.fire(model,oldModel,changeRequest)};that.requestChange=function(path,value,type){var changeRequest={path:path,value:value,type:type};that.fireChangeRequest(changeRequest)};return that};fluid.makeSuperApplier=function(){var subAppliers=[];var that={};that.addSubApplier=function(path,subApplier){subAppliers.push({path:path,subApplier:subApplier})};that.fireChangeRequest=function(request){for(var i=0;i<subAppliers.length;++i){var path=subAppliers[i].path;if(request.path.indexOf(path)===0){var subpath=request.path.substring(path.length+1);var subRequest=fluid.copy(request);subRequest.path=subpath;subAppliers[i].subApplier.fireChangeRequest(subRequest)}}};return that};fluid.attachModel=function(baseModel,path,model){var segs=fluid.model.parseEL(path);for(var i=0;i<segs.length-1;++i){var seg=segs[i];var subModel=baseModel[seg];if(!subModel){baseModel[seg]=subModel={}}baseModel=subModel}baseModel[segs[segs.length-1]]=model};fluid.assembleModel=function(modelSpec){var model={};var superApplier=fluid.makeSuperApplier();var togo={model:model,applier:superApplier};for(path in modelSpec){var rec=modelSpec[path];fluid.attachModel(model,path,rec.model);if(rec.applier){superApplier.addSubApplier(path,rec.applier)}}return togo}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/core/js/Fluid.js b/docs/include/jscripts/infusion/framework/core/js/Fluid.js
new file mode 100644 (file)
index 0000000..955b7da
--- /dev/null
@@ -0,0 +1 @@
+var fluid_1_1=fluid_1_1||{};var fluid=fluid||fluid_1_1;(function($,fluid){fluid.version="Infusion 1.1.1";fluid.fail=function(message){fluid.setLogging(true);fluid.log(message.message?message.message:message);throw new Error(message)};fluid.wrap=function(obj){return((!obj||obj.jquery)?obj:$(obj))};fluid.unwrap=function(obj){return obj&&obj.jquery&&obj.length===1?obj[0]:obj};fluid.keyForValue=function(obj,value){for(var key in obj){if(obj[key]===value){return key}}return null};fluid.findKeyInObject=fluid.keyForValue;fluid.clear=function(target){if(target instanceof Array){target.length=0}else{for(var i in target){delete target[i]}}};fluid.container=function(containerSpec){var container=containerSpec;if(typeof containerSpec==="string"||containerSpec.nodeType&&(containerSpec.nodeType===1||containerSpec.nodeType===9)){container=$(containerSpec)}if(!container||!container.jquery||container.length!==1){if(typeof (containerSpec)!=="string"){containerSpec=container.selector}fluid.fail({name:"NotOne",message:"A single container element was not found for selector "+containerSpec})}return container};var defaultsStore={};var globalDefaultsStore={};fluid.defaults=function(){var offset=0;var store=defaultsStore;if(typeof arguments[0]==="boolean"){store=globalDefaultsStore;offset=1}var componentName=arguments[offset];var defaultsObject=arguments[offset+1];if(defaultsObject!==undefined){store[componentName]=defaultsObject;return defaultsObject}return store[componentName]};fluid.createDomBinder=function(container,selectors){var cache={},that={};function cacheKey(name,thisContainer){return $.data(fluid.unwrap(thisContainer))+"-"+name}function record(name,thisContainer,result){cache[cacheKey(name,thisContainer)]=result}that.locate=function(name,localContainer){var selector,thisContainer,togo;selector=selectors[name];thisContainer=localContainer?localContainer:container;if(!thisContainer){fluid.fail("DOM binder invoked for selector "+name+" without container")}if(!selector){return thisContainer}if(typeof (selector)==="function"){togo=$(selector.call(null,fluid.unwrap(thisContainer)))}else{togo=$(selector,thisContainer)}if(togo.get(0)===document){togo=[]}if(!togo.selector){togo.selector=selector;togo.context=thisContainer}togo.selectorName=name;record(name,thisContainer,togo);return togo};that.fastLocate=function(name,localContainer){var thisContainer=localContainer?localContainer:container;var key=cacheKey(name,thisContainer);var togo=cache[key];return togo?togo:that.locate(name,localContainer)};that.clear=function(){cache={}};that.refresh=function(names,localContainer){var thisContainer=localContainer?localContainer:container;if(typeof names==="string"){names=[names]}if(thisContainer.length===undefined){thisContainer=[thisContainer]}for(var i=0;i<names.length;++i){for(var j=0;j<thisContainer.length;++j){that.locate(names[i],thisContainer[j])}}};return that};fluid.mergeListeners=function(events,listeners){if(listeners){for(var key in listeners){var value=listeners[key];var keydot=key.indexOf(".");var namespace;if(keydot!==-1){namespace=key.substring(keydot+1);key=key.substring(0,keydot)}if(!events[key]){events[key]=fluid.event.getEventFirer()}var firer=events[key];if(typeof (value)==="function"){firer.addListener(value,namespace)}else{if(value&&typeof value.length==="number"){for(var i=0;i<value.length;++i){firer.addListener(value[i],namespace)}}}}}};fluid.instantiateFirers=function(that,options){that.events={};if(options.events){for(var event in options.events){var eventType=options.events[event];that.events[event]=fluid.event.getEventFirer(eventType==="unicast",eventType==="preventable")}}fluid.mergeListeners(that.events,options.listeners)};fluid.mergeComponentOptions=function(that,componentName,userOptions){var defaults=fluid.defaults(componentName);that.options=fluid.merge(defaults?defaults.mergePolicy:null,{},defaults,userOptions)};fluid.expectFilledSelector=function(result,message){if(result&&result.length===0&&result.jquery){fluid.fail(message+': selector "'+result.selector+'" with name '+result.selectorName+" returned no results in context "+fluid.dumpEl(result.context))}};fluid.initView=function(componentName,container,userOptions){var that={};fluid.expectFilledSelector(container,'Error instantiating component with name "'+componentName);fluid.mergeComponentOptions(that,componentName,userOptions);if(container){that.container=fluid.container(container);fluid.initDomBinder(that)}fluid.instantiateFirers(that,that.options);return that};fluid.COMPONENT_OPTIONS={};fluid.VALUE={};fluid.emptySubcomponent=function(options){var that={};options=$.makeArray(options);for(var i=0;i<options.length;++i){that[options[i]]=function(){}}return that};fluid.initSubcomponent=function(that,className,args){return fluid.initSubcomponents(that,className,args)[0]};fluid.initSubcomponents=function(that,className,args){var entry=that.options[className];if(!entry){return }var entries=$.makeArray(entry);var optindex=-1;var togo=[];args=$.makeArray(args);for(var i=0;i<args.length;++i){if(args[i]===fluid.COMPONENT_OPTIONS){optindex=i}}for(i=0;i<entries.length;++i){entry=entries[i];if(optindex!==-1&&entry.options){args[optindex]=entry.options}if(typeof (entry)!=="function"){var entryType=typeof (entry)==="string"?entry:entry.type;var globDef=fluid.defaults(true,entryType);fluid.merge("reverse",that.options,globDef);togo[i]=entryType==="fluid.emptySubcomponent"?fluid.emptySubcomponent(entry.options):fluid.invokeGlobalFunction(entryType,args,{fluid:fluid})}else{togo[i]=entry.apply(null,args)}var returnedOptions=togo[i]?togo[i].returnedOptions:null;if(returnedOptions){fluid.merge(that.options.mergePolicy,that.options,returnedOptions);if(returnedOptions.listeners){fluid.mergeListeners(that.events,returnedOptions.listeners)}}}return togo};fluid.initDomBinder=function(that){that.dom=fluid.createDomBinder(that.container,that.options.selectors);that.locate=that.dom.locate};fluid.isPrimitive=function(value){var valueType=typeof (value);return !value||valueType==="string"||valueType==="boolean"||valueType==="number"};function mergeImpl(policy,basePath,target,source){var thisPolicy=policy&&typeof (policy)!=="string"?policy[basePath]:policy;if(typeof (thisPolicy)==="function"){thisPolicy.apply(null,target,source);return target}if(thisPolicy==="replace"){fluid.clear(target)}for(var name in source){var path=(basePath?basePath+".":"")+name;var thisTarget=target[name];var thisSource=source[name];var primitiveTarget=fluid.isPrimitive(thisTarget);if(thisSource!==undefined){if(thisSource!==null&&typeof thisSource==="object"&&!thisSource.nodeType&&!thisSource.jquery&&thisSource!==fluid.VALUE){if(primitiveTarget){target[name]=thisTarget=thisSource instanceof Array?[]:{}}mergeImpl(policy,path,thisTarget,thisSource)}else{if(thisTarget===null||thisTarget===undefined||thisPolicy!=="reverse"){target[name]=thisSource}}}}return target}fluid.merge=function(policy,target){var path="";for(var i=2;i<arguments.length;++i){var source=arguments[i];if(source!==null&&source!==undefined){mergeImpl(policy,path,target,source)}}if(policy&&typeof (policy)!=="string"){for(var key in policy){var elrh=policy[key];if(typeof (elrh)==="string"&&elrh!=="replace"){var oldValue=fluid.model.getBeanValue(target,key);if(oldValue===null||oldValue===undefined){var value=fluid.model.getBeanValue(target,elrh);fluid.model.setBeanValue(target,key,value)}}}}return target};fluid.copy=function(tocopy){if(fluid.isPrimitive(tocopy)){return tocopy}return $.extend(true,typeof (tocopy.length)==="number"?[]:{},tocopy)};fluid.invokeGlobalFunction=function(functionPath,args,environment){var func=fluid.model.getBeanValue(window,functionPath,environment);if(!func){fluid.fail("Error invoking global function: "+functionPath+" could not be located")}else{return func.apply(null,args)}};fluid.event={};var fluid_guid=1;fluid.event.getEventFirer=function(unicast,preventable){var log=fluid.log;var listeners={};return{addListener:function(listener,namespace,predicate){if(!listener){return }if(unicast){namespace="unicast"}if(!namespace){if(!listener.$$guid){listener.$$guid=fluid_guid++}namespace=listener.$$guid}listeners[namespace]={listener:listener,predicate:predicate}},removeListener:function(listener){if(typeof (listener)==="string"){delete listeners[listener]}else{if(typeof (listener)==="object"&&listener.$$guid){delete listeners[listener.$$guid]}}},fire:function(){for(var i in listeners){var lisrec=listeners[i];var listener=lisrec.listener;if(lisrec.predicate&&!lisrec.predicate(listener,arguments)){continue}try{var ret=listener.apply(null,arguments);if(preventable&&ret===false){return false}}catch(e){log("FireEvent received exception "+e.message+" e "+e+" firing to listener "+i);throw (e)}}}}};fluid.model={};fluid.model.copyModel=function(target,source){fluid.clear(target);$.extend(true,target,source)};fluid.model.parseEL=function(EL){return EL.toString().split(".")};fluid.model.composePath=function(prefix,suffix){return prefix===""?suffix:prefix+"."+suffix};fluid.model.setBeanValue=function(root,EL,newValue){var segs=fluid.model.parseEL(EL);for(var i=0;i<segs.length-1;i+=1){if(!root[segs[i]]){root[segs[i]]={}}root=root[segs[i]]}root[segs[segs.length-1]]=newValue};fluid.model.getBeanValue=function(root,EL,environment){if(EL===""||EL===null||EL===undefined){return root}var segs=fluid.model.parseEL(EL);for(var i=0;i<segs.length;++i){if(!root){return root}var segment=segs[i];if(environment&&environment[segment]){root=environment[segment];environment=null}else{root=root[segment]}}return root};var logging;fluid.setLogging=function(enabled){if(typeof enabled==="boolean"){logging=enabled}else{logging=false}};fluid.log=function(str){if(logging){str=new Date().toTimeString()+":  "+str;if(typeof (console)!=="undefined"){if(console.debug){console.debug(str)}else{console.log(str)}}else{if(typeof (YAHOO)!=="undefined"){YAHOO.log(str)}else{if(typeof (opera)!=="undefined"){opera.postError(str)}}}}};fluid.dumpEl=function(element){var togo;if(!element){return"null"}if(element.nodeType===3||element.nodeType===8){return"[data: "+element.data+"]"}if(element.nodeType===9){return"[document: location "+element.location+"]"}if(!element.nodeType&&typeof element.length==="number"){togo="[";for(var i=0;i<element.length;++i){togo+=fluid.dumpEl(element[i]);if(i<element.length-1){togo+=", "}}return togo+"]"}element=$(element);togo=element.get(0).tagName;if(element.attr("id")){togo+="#"+element.attr("id")}if(element.attr("class")){togo+="."+element.attr("class")}return togo};fluid.findAncestor=function(element,test){element=fluid.unwrap(element);while(element){if(test(element)){return element}element=element.parentNode}};fluid.jById=function(id,dokkument){dokkument=dokkument&&dokkument.nodeType===9?dokkument:document;var element=fluid.byId(id,dokkument);var togo=element?$(element):[];togo.selector="#"+id;togo.context=dokkument;return togo};fluid.byId=function(id,dokkument){dokkument=dokkument&&dokkument.nodeType===9?dokkument:document;var el=dokkument.getElementById(id);if(el){if(el.getAttribute("id")!==id){fluid.fail("Problem in document structure - picked up element "+fluid.dumpEl(el)+" for id "+id+" without this id - most likely the element has a name which conflicts with this id")}return el}else{return null}};fluid.getId=function(element){return fluid.unwrap(element).getAttribute("id")};fluid.allocateSimpleId=function(element){element=fluid.unwrap(element);if(!element.id){element.id="fluid-id-"+(fluid_guid++)}return element.id};fluid.transform=function(list){var togo=[];for(var i=0;i<list.length;++i){var transit=list[i];for(var j=0;j<arguments.length-1;++j){transit=arguments[j+1](transit,i)}togo[togo.length]=transit}return togo};fluid.find=function(list,fn,deflt){for(var i=0;i<list.length;++i){var transit=fn(list[i],i);if(transit!==null&&transit!==undefined){return transit}}return deflt};fluid.accumulate=function(list,fn,arg){for(var i=0;i<list.length;++i){arg=fn(list[i],arg,i)}return arg};fluid.remove_if=function(list,fn){for(var i=0;i<list.length;++i){if(fn(list[i],i)){list.splice(i,1);--i}}return list};fluid.formatMessage=function(messageString,args){if(!args){return messageString}if(typeof (args)==="string"){args=[args]}for(var i=0;i<args.length;++i){messageString=messageString.replace("{"+i+"}",args[i])}return messageString};fluid.messageLocator=function(messageBase){return function(messagecodes,args){if(typeof (messagecodes)==="string"){messagecodes=[messagecodes]}for(var i=0;i<messagecodes.length;++i){var code=messagecodes[i];var message=messageBase[code];if(message===undefined){continue}return fluid.formatMessage(message,args)}return"[Message string for key "+messagecodes[0]+" not found]"}};fluid.stringTemplate=function(template,values){var newString=template;for(var key in values){if(values.hasOwnProperty(key)){var searchStr="%"+key;newString=newString.replace(searchStr,values[key])}}return newString}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/core/js/FluidDOMUtilities.js b/docs/include/jscripts/infusion/framework/core/js/FluidDOMUtilities.js
new file mode 100644 (file)
index 0000000..61b0567
--- /dev/null
@@ -0,0 +1 @@
+var fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.dom=fluid.dom||{};var getNextNode=function(iterator){if(iterator.node.firstChild){iterator.node=iterator.node.firstChild;iterator.depth+=1;return iterator}while(iterator.node){if(iterator.node.nextSibling){iterator.node=iterator.node.nextSibling;return iterator}iterator.node=iterator.node.parentNode;iterator.depth-=1}return iterator};fluid.dom.iterateDom=function(node,acceptor,allNodes){var currentNode={node:node,depth:0};var prevNode=node;var condition;while(currentNode.node!==null&&currentNode.depth>=0&&currentNode.depth<fluid.dom.iterateDom.DOM_BAIL_DEPTH){condition=null;if(currentNode.node.nodeType===1||allNodes){condition=acceptor(currentNode.node,currentNode.depth)}if(condition){if(condition==="delete"){currentNode.node.parentNode.removeChild(currentNode.node);currentNode.node=prevNode}else{if(condition==="stop"){return currentNode.node}}}prevNode=currentNode.node;currentNode=getNextNode(currentNode)}};fluid.dom.iterateDom.DOM_BAIL_DEPTH=256;fluid.dom.computeAbsolutePosition=function(element){var curleft=0,curtop=0;if(element.offsetParent){do{curleft+=element.offsetLeft;curtop+=element.offsetTop;element=element.offsetParent}while(element);return[curleft,curtop]}};fluid.dom.isContainer=function(container,containee){for(;containee;containee=containee.parentNode){if(container===containee){return true}}return false};fluid.dom.insertAfter=function(newChild,refChild){var nextSib=refChild.nextSibling;if(!nextSib){refChild.parentNode.appendChild(newChild)}else{refChild.parentNode.insertBefore(newChild,nextSib)}};fluid.dom.isWhitespaceNode=function(node){return !(/[^\t\n\r ]/.test(node.data))};fluid.dom.isIgnorableNode=function(node){return(node.nodeType===8)||((node.nodeType===3)&&fluid.dom.isWhitespaceNode(node))};fluid.dom.getElementText=function(element){var nodes=element.childNodes;var text="";for(var i=0;i<nodes.length;++i){var child=nodes[i];if(child.nodeType==3){text=text+child.nodeValue}}return text};fluid.dom.cleanseScripts=function(element){var cleansed=$.data(element,fluid.dom.cleanseScripts.MARKER);if(!cleansed){fluid.dom.iterateDom(element,function(node){return node.tagName.toLowerCase()==="script"?"delete":null});$.data(element,fluid.dom.cleanseScripts.MARKER,true)}};fluid.dom.cleanseScripts.MARKER="fluid-scripts-cleansed"})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/core/js/ProgressiveEnhancement.js b/docs/include/jscripts/infusion/framework/core/js/ProgressiveEnhancement.js
new file mode 100644 (file)
index 0000000..f3fac5c
--- /dev/null
@@ -0,0 +1 @@
+(function($){$("head").append("<style type='text/css'>.fl-progEnhance-basic, .fl-ProgEnhance-basic { display: none; }</style>")})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/core/js/jquery.keyboard-a11y.js b/docs/include/jscripts/infusion/framework/core/js/jquery.keyboard-a11y.js
new file mode 100644 (file)
index 0000000..105f33c
--- /dev/null
@@ -0,0 +1 @@
+var fluid_1_1=fluid_1_1||{};var fluid=fluid||fluid_1_1;(function($,fluid){fluid.thatistBridge=function(name,peer){var togo=function(funcname){var segs=funcname.split(".");var move=peer;for(var i=0;i<segs.length;++i){move=move[segs[i]]}var args=[this];if(arguments.length===2){args=args.concat($.makeArray(arguments[1]))}var ret=move.apply(null,args);this.that=function(){return ret};var type=typeof (ret);return !ret||type==="string"||type==="number"||type==="boolean"||ret&&ret.length!==undefined?ret:this};$.fn[name]=togo;return togo};fluid.thatistBridge("fluid",fluid);fluid.thatistBridge("fluid_1_1",fluid_1_1);var NAMESPACE_KEY="fluid-keyboard-a11y";var getData=function(target,key){var data=$(target).data(NAMESPACE_KEY);return data?data[key]:undefined};var setData=function(target,key,value){$(target).each(function(){var data=$.data(this,NAMESPACE_KEY)||{};data[key]=value;$.data(this,NAMESPACE_KEY,data)})};var lastFocusedElement="disabled";if($.event.special.focusin){lastFocusedElement=null;$(document).bind("focusin",function(event){lastFocusedElement=event.target})}fluid.getLastFocusedElement=function(){if(lastFocusedElement==="disabled"){fluid.fail("Focus manager not enabled - please include jquery.delegate.js or equivalent for support of 'focusin' event")}return lastFocusedElement};var normalizeTabindexName=function(){return $.browser.msie?"tabIndex":"tabindex"};var canHaveDefaultTabindex=function(elements){if(elements.length<=0){return false}return $(elements[0]).is("a, input, button, select, area, textarea, object")};var getValue=function(elements){if(elements.length<=0){return undefined}if(!fluid.tabindex.hasAttr(elements)){return canHaveDefaultTabindex(elements)?Number(0):undefined}var value=elements.attr(normalizeTabindexName());return Number(value)};var setValue=function(elements,toIndex){return elements.each(function(i,item){$(item).attr(normalizeTabindexName(),toIndex)})};fluid.tabindex=function(target,toIndex){target=$(target);if(toIndex!==null&&toIndex!==undefined){return setValue(target,toIndex)}else{return getValue(target)}};fluid.tabindex.remove=function(target){target=$(target);return target.each(function(i,item){$(item).removeAttr(normalizeTabindexName())})};fluid.tabindex.hasAttr=function(target){target=$(target);if(target.length<=0){return false}var togo=target.map(function(){var attributeNode=this.getAttributeNode(normalizeTabindexName());return attributeNode?attributeNode.specified:false});return togo.length===1?togo[0]:togo};fluid.tabindex.has=function(target){target=$(target);return fluid.tabindex.hasAttr(target)||canHaveDefaultTabindex(target)};var ENABLEMENT_KEY="enablement";fluid.enabled=function(target,state){target=$(target);if(state===undefined){return getData(target,ENABLEMENT_KEY)!==false}else{$("*",target).each(function(){if(getData(this,ENABLEMENT_KEY)!==undefined){setData(this,ENABLEMENT_KEY,state)}else{if(/select|textarea|input/i.test(this.nodeName)){$(this).attr("disabled",!state)}}});setData(target,ENABLEMENT_KEY,state)}};fluid.a11y=$.a11y||{};fluid.a11y.orientation={HORIZONTAL:0,VERTICAL:1,BOTH:2};var UP_DOWN_KEYMAP={next:$.ui.keyCode.DOWN,previous:$.ui.keyCode.UP};var LEFT_RIGHT_KEYMAP={next:$.ui.keyCode.RIGHT,previous:$.ui.keyCode.LEFT};var unwrap=function(element){return element.jquery?element[0]:element};var makeElementsTabFocussable=function(elements){elements.each(function(idx,item){item=$(item);if(!item.fluid("tabindex.has")||item.fluid("tabindex")<0){item.fluid("tabindex",0)}})};fluid.tabbable=function(target){target=$(target);makeElementsTabFocussable(target)};var CONTEXT_KEY="selectionContext";var NO_SELECTION=-32768;var cleanUpWhenLeavingContainer=function(selectionContext){if(selectionContext.options.onLeaveContainer){selectionContext.options.onLeaveContainer(selectionContext.selectables[selectionContext.activeItemIndex])}else{if(selectionContext.options.onUnselect){selectionContext.options.onUnselect(selectionContext.selectables[selectionContext.activeItemIndex])}}if(!selectionContext.options.rememberSelectionState){selectionContext.activeItemIndex=NO_SELECTION}};var drawSelection=function(elementToSelect,handler){if(handler){handler(elementToSelect)}};var eraseSelection=function(selectedElement,handler){if(handler&&selectedElement){handler(selectedElement)}};var unselectElement=function(selectedElement,selectionContext){eraseSelection(selectedElement,selectionContext.options.onUnselect)};var selectElement=function(elementToSelect,selectionContext){unselectElement(selectionContext.selectedElement(),selectionContext);elementToSelect=unwrap(elementToSelect);var newIndex=selectionContext.selectables.index(elementToSelect);if(newIndex===-1){return }selectionContext.activeItemIndex=newIndex;drawSelection(elementToSelect,selectionContext.options.onSelect)};var selectableFocusHandler=function(selectionContext){return function(evt){selectElement(evt.target,selectionContext);return evt.stopPropagation()}};var selectableBlurHandler=function(selectionContext){return function(evt){unselectElement(evt.target,selectionContext);return evt.stopPropagation()}};var reifyIndex=function(sc_that){var elements=sc_that.selectables;if(sc_that.activeItemIndex>=elements.length){sc_that.activeItemIndex=0}if(sc_that.activeItemIndex<0&&sc_that.activeItemIndex!==NO_SELECTION){sc_that.activeItemIndex=elements.length-1}if(sc_that.activeItemIndex>=0){$(elements[sc_that.activeItemIndex]).focus()}};var prepareShift=function(selectionContext){unselectElement(selectionContext.selectedElement(),selectionContext);if(selectionContext.activeItemIndex===NO_SELECTION){selectionContext.activeItemIndex=-1}};var focusNextElement=function(selectionContext){prepareShift(selectionContext);++selectionContext.activeItemIndex;reifyIndex(selectionContext)};var focusPreviousElement=function(selectionContext){prepareShift(selectionContext);--selectionContext.activeItemIndex;reifyIndex(selectionContext)};var arrowKeyHandler=function(selectionContext,keyMap,userHandlers){return function(evt){if(evt.which===keyMap.next){focusNextElement(selectionContext);evt.preventDefault()}else{if(evt.which===keyMap.previous){focusPreviousElement(selectionContext);evt.preventDefault()}}}};var getKeyMapForDirection=function(direction){var keyMap;if(direction===fluid.a11y.orientation.HORIZONTAL){keyMap=LEFT_RIGHT_KEYMAP}else{if(direction===fluid.a11y.orientation.VERTICAL){keyMap=UP_DOWN_KEYMAP}}return keyMap};var tabKeyHandler=function(selectionContext){return function(evt){if(evt.which!==$.ui.keyCode.TAB){return }cleanUpWhenLeavingContainer(selectionContext);if(evt.shiftKey){selectionContext.focusIsLeavingContainer=true}}};var containerFocusHandler=function(selectionContext){return function(evt){var shouldOrig=selectionContext.options.autoSelectFirstItem;var shouldSelect=typeof (shouldOrig)==="function"?shouldOrig():shouldOrig;if(selectionContext.focusIsLeavingContainer){shouldSelect=false}if(shouldSelect&&evt.target===selectionContext.container.get(0)){if(selectionContext.activeItemIndex===NO_SELECTION){selectionContext.activeItemIndex=0}$(selectionContext.selectables[selectionContext.activeItemIndex]).focus()}return evt.stopPropagation()}};var containerBlurHandler=function(selectionContext){return function(evt){selectionContext.focusIsLeavingContainer=false;return evt.stopPropagation()}};var makeElementsSelectable=function(container,defaults,userOptions){var options=$.extend(true,{},defaults,userOptions);var keyMap=getKeyMapForDirection(options.direction);var selectableElements=options.selectableElements?options.selectableElements:container.find(options.selectableSelector);var that={container:container,activeItemIndex:NO_SELECTION,selectables:selectableElements,focusIsLeavingContainer:false,options:options};that.selectablesUpdated=function(focusedItem){if(typeof (that.options.selectablesTabindex)==="number"){that.selectables.fluid("tabindex",that.options.selectablesTabindex)}that.selectables.unbind("focus."+NAMESPACE_KEY);that.selectables.unbind("blur."+NAMESPACE_KEY);that.selectables.bind("focus."+NAMESPACE_KEY,selectableFocusHandler(that));that.selectables.bind("blur."+NAMESPACE_KEY,selectableBlurHandler(that));if(focusedItem){selectElement(focusedItem,that)}else{reifyIndex(that)}};that.refresh=function(){if(!that.options.selectableSelector){throw ("Cannot refresh selectable context which was not initialised by a selector")}that.selectables=container.find(options.selectableSelector);that.selectablesUpdated()};that.selectedElement=function(){return that.activeItemIndex<0?null:that.selectables[that.activeItemIndex]};if(keyMap){container.keydown(arrowKeyHandler(that,keyMap))}container.keydown(tabKeyHandler(that));container.focus(containerFocusHandler(that));container.blur(containerBlurHandler(that));that.selectablesUpdated();return that};fluid.selectable=function(target,options){target=$(target);var that=makeElementsSelectable(target,fluid.selectable.defaults,options);setData(target,CONTEXT_KEY,that);return that};fluid.selectable.select=function(target,toSelect){$(toSelect).focus()};fluid.selectable.selectNext=function(target){target=$(target);focusNextElement(getData(target,CONTEXT_KEY))};fluid.selectable.selectPrevious=function(target){target=$(target);focusPreviousElement(getData(target,CONTEXT_KEY))};fluid.selectable.currentSelection=function(target){target=$(target);var that=getData(target,CONTEXT_KEY);return $(that.selectedElement())};fluid.selectable.defaults={direction:fluid.a11y.orientation.VERTICAL,selectablesTabindex:-1,autoSelectFirstItem:true,rememberSelectionState:true,selectableSelector:".selectable",selectableElements:null,onSelect:null,onUnselect:null,onLeaveContainer:null};var checkForModifier=function(binding,evt){if(!binding.modifier){return true}var modifierKey=binding.modifier;var isCtrlKeyPresent=modifierKey&&evt.ctrlKey;var isAltKeyPresent=modifierKey&&evt.altKey;var isShiftKeyPresent=modifierKey&&evt.shiftKey;return isCtrlKeyPresent||isAltKeyPresent||isShiftKeyPresent};var makeActivationHandler=function(binding){return function(evt){var target=evt.target;if(!fluid.enabled(evt.target)){return }var code=evt.which?evt.which:evt.keyCode;if(code===binding.key&&binding.activateHandler&&checkForModifier(binding,evt)){var event=$.Event("fluid-activate");$(evt.target).trigger(event,[binding.activateHandler]);if(event.isDefaultPrevented()){evt.preventDefault()}}}};var makeElementsActivatable=function(elements,onActivateHandler,defaultKeys,options){var bindings=[];$(defaultKeys).each(function(index,key){bindings.push({modifier:null,key:key,activateHandler:onActivateHandler})});if(options&&options.additionalBindings){bindings=bindings.concat(options.additionalBindings)}setData(elements,ENABLEMENT_KEY,true);for(var i=0;i<bindings.length;++i){var binding=bindings[i];elements.keydown(makeActivationHandler(binding))}elements.bind("fluid-activate",function(evt,handler){handler=handler||onActivateHandler;return handler?handler(evt):null})};fluid.activatable=function(target,fn,options){target=$(target);makeElementsActivatable(target,fn,fluid.activatable.defaults.keys,options)};fluid.activate=function(target){$(target).trigger("fluid-activate")};fluid.activatable.defaults={keys:[$.ui.keyCode.ENTER,$.ui.keyCode.SPACE]}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/fss/css/fss-JSR168Bridge.css b/docs/include/jscripts/infusion/framework/fss/css/fss-JSR168Bridge.css
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/include/jscripts/infusion/framework/fss/css/fss-layout.css b/docs/include/jscripts/infusion/framework/fss/css/fss-layout.css
new file mode 100644 (file)
index 0000000..0595663
--- /dev/null
@@ -0,0 +1,115 @@
+.fl-fix{overflow:auto;zoom:1;}
+.fl-push{clear:both;}
+.fl-force-right{float:right;display:inline;}
+.fl-force-left{float:left;display:inline;}
+.fl-centered{margin-left:auto;margin-right:auto;display:block;}
+.fl-container-50{width:50px;}
+.fl-container-100{width:100px;}
+.fl-container-150{width:150px;}
+.fl-container-200{width:200px;}
+.fl-container-250{width:250px;}
+.fl-container-300{width:300px;}
+.fl-container-350{width:350px;}
+.fl-container-400{width:400px;}
+.fl-container-450{width:450px;}
+.fl-container-500{width:500px;}
+.fl-container-550{width:550px;}
+.fl-container-600{width:600px;}
+.fl-container-650{width:650px;}
+.fl-container-700{width:700px;}
+.fl-container-750{width:750px;}
+.fl-container-800{width:800px;}
+.fl-container-850{width:850px;}
+.fl-container-900{width:900px;}
+.fl-container-950{width:950px;}
+.fl-container-1000{width:1000px;}
+.fl-container-auto{width:auto;}
+.fl-container-flex{width:100%;clear:both;}
+.fl-container-flex10{width:10%;}
+.fl-container-flex20{width:20%;}
+.fl-container-flex25{width:25%;}
+.fl-container-flex30{width:30%;}
+.fl-container-flex33{width:33%;}
+.fl-container-flex40{width:40%;}
+.fl-container-flex50{width:50%;}
+.fl-container-flex60{width:60%;}
+.fl-container-flex66{width:66%;}
+.fl-container-flex75{width:75%;}
+.fl-layout-linear *,.fl-layout-linear .fl-linearEnabled{overflow:visible!important;clear:both!important;float:none!important;margin-left:0!important;margin-right:0!important;}
+.fl-layout-linear .fl-container,.fl-layout-linear .fl-container-100,.fl-layout-linear .fl-container-150,.fl-layout-linear .fl-container-200,.fl-layout-linear .fl-container-250,.fl-layout-linear .fl-container-300,.fl-layout-linear .fl-container-400,.fl-layout-linear .fl-container-750,.fl-layout-linear .fl-container-950,.fl-layout-linear .fl-container-auto,.fl-layout-linear .fl-container-flex25,.fl-layout-linear .fl-container-flex30,.fl-layout-linear .fl-container-flex33,.fl-layout-linear .fl-container-flex50,.fl-layout-linear .fl-col,.fl-layout-linear .fl-col-side,.fl-layout-linear .fl-col-flex,.fl-layout-linear .fl-col-main,.fl-layout-linear .fl-col-fixed,.fl-layout-linear .fl-col-justified{width:100%!important;margin:auto;padding:0!important;}
+.fl-layout-linear .fl-force-left,.fl-layout-linear .fl-force-right,.fl-layout-linear li{display:block!important;float:none!important;}
+.fl-layout-linear .fl-linearEnabled{width:100%!important;display:block;}
+.fl-layout-linear .fl-button-left,.fl-layout-linear .fl-button-right{padding:1em;}
+.fl-col-justified{float:left;display:inline;overflow:auto;text-align:justify;}
+.fl-col-flex2,.fl-col-flex3,.fl-col-flex4,.fl-col-flex5{overflow:auto;zoom:1;}
+.fl-col{float:left;display:inline;}
+.fl-col-flex5 .fl-col{width:18.95%;margin-left:.25%;margin-right:.25%;padding-left:.25%;padding-right:.25%;}
+.fl-col-flex4 .fl-col{width:24%;margin-left:.25%;margin-right:.25%;padding-left:.25%;padding-right:.25%;}
+.fl-col-flex3 .fl-col{width:32.33%;margin-left:.25%;margin-right:.25%;padding-left:.25%;padding-right:.25%;}
+.fl-col-flex2 .fl-col{width:48.85%;margin-left:.25%;margin-right:.25%;padding-left:.25%;padding-right:.25%;}
+.fl-col-mixed,.fl-col-mixed2,.fl-col-mixed3{overflow:auto;zoom:1;}
+.fl-col-mixed .fl-col-side{width:200px;}
+.fl-col-mixed .fl-col-side,.fl-col-mixed .fl-col-main{padding:0 10px;}
+.fl-col-mixed2 .fl-col-side{width:200px;padding:0 10px;float:left;}
+.fl-col-mixed2 .fl-col-main{margin-left:220px;padding:0 10px;}
+.fl-col-mixed3 .fl-col-main{margin:0 220px;}
+.fl-col-fixed,.fl-col-flex{padding:0 10px;}
+.fl-col-mixed .fl-col-fixed{width:200px;padding:0 10px;}
+.fl-col-mixed .fl-col-flex{margin-left:220px;padding:0 10px;}
+.fl-col-mixed-100 .fl-col-fixed{width:100px;}
+.fl-col-mixed-100 .fl-col-flex{margin-left:120px;}
+.fl-col-mixed-150 .fl-col-fixed{width:150px;}
+.fl-col-mixed-150 .fl-col-flex{margin-left:170px;}
+.fl-col-mixed-200 .fl-col-fixed{width:200px;}
+.fl-col-mixed-200 .fl-col-flex{margin-left:220px;}
+.fl-col-mixed-250 .fl-col-fixed{width:250px;}
+.fl-col-mixed-250 .fl-col-flex{margin-left:270px;}
+.fl-col-mixed-300 .fl-col-fixed{width:300px;}
+.fl-col-mixed-300 .fl-col-flex{margin-left:320px;}
+.fl-tabs{margin:.75em 0 0 0;border-bottom:1px solid #000;text-align:center;padding-bottom:.2em;}
+.fl-tabs li{list-style-type:none;display:inline;}
+.fl-tabs li a{padding:.25em 1.25em .2em;background-color:#fff;margin-left:-5px;*margin-bottom:-7px;zoom:1;border:1px solid #000;color:#999;}
+.fl-tabs-center{text-align:center;}
+.fl-tabs-left{text-align:left;padding-left:10px;}
+.fl-tabs-right{text-align:right;padding-right:15px;}
+.fl-tabs .fl-reorderer-dropMarker{padding:0 3px;background-color:#c00;margin:0 5px 0 -5px;zoom:1;}
+.fl-tabs .fl-tabs-active a{padding:.25em 1.25em;border-bottom:none;color:#000;}
+.fl-tabs-content{padding:5px;}
+.fl-listmenu{padding:0;margin:0;border-bottom-width:1px;border-bottom-style:solid;}
+.fl-listmenu li{margin:0;padding:0;list-style-type:none;border-width:1px;border-style:solid;border-bottom:none;}
+.fl-listmenu a{padding:5px 5px;display:block;zoom:1;}
+ul.fl-grid,.fl-grid ul{padding:0;margin:0;}
+.fl-grid li{list-style-type:none;display:inline;}
+.fl-grid li{float:left;width:19%;margin:.5%;height:150px;overflow:hidden;position:relative;display:inline;}
+.fl-grid li img{display:block;margin:5px auto;}
+.fl-grid li .caption{position:absolute;left:0;bottom:0;width:100%;text-align:center;height:1em;padding:3px 0;}
+.fl-icon{text-indent:-5000px;overflow:hidden;cursor:pointer;display:block;height:16px;width:16px;margin-left:5px;margin-right:5px;background-position:center center;background-repeat:no-repeat;}
+input.fl-icon{padding-left:16px;}
+.fl-button-left{float:left;margin-right:10px;padding:0 0 0 16px;background-position:left center;background-repeat:no-repeat;}
+.fl-button-right{float:right;margin-left:10px;padding:0 0 0 16px;background-position:left center;background-repeat:no-repeat;}
+.fl-button-inner{float:left;padding:5px 16px 5px 0;cursor:pointer;background-position:right center;background-repeat:no-repeat;}
+.fl-widget{padding:5px;margin-bottom:10px;}
+.fl-widget .button{margin:0 5px;}
+.fl-grabbable .fl-widget-titlebar{background-position:center top;background-repeat:no-repeat;cursor:move;}
+.fl-widget .fl-widget-titlebar h2{padding:0;margin:0;font-size:105%;}
+.fl-widget .fl-widget-titlebar .fl-button-inner{font-size:.8em;padding-bottom:.2em;padding-top:.2em;}
+.fl-widget .fl-widget-controls{margin:-1.3em 0 1.5em 0;}
+.fl-widget .fl-widget-options{margin-top:5px;padding:0 10px;}
+.fl-widget .fl-widget-options ul{margin:0;padding:0;overflow:hidden;zoom:1;}
+.fl-widget .fl-widget-options li{list-style-type:none;float:left;display:inline;padding:0 5px 0 5px;margin-left:-5px;}
+.fl-widget .fl-widget-options a{margin-right:5px;}
+.fl-widget .fl-widget-content{zoom:1;margin:5px 0 0 0;overflow:auto;}
+.fl-widget .empty *{padding-top:10px;margin-left:auto;margin-right:auto;text-align:center;}
+.fl-widget .menu{margin:0;}
+.fl-widget .toggle{width:32px;}
+.fl-widget .on{background-position:left top;}
+.fl-widget .off{background-position:left bottom;}
+.fl-controls-left li{list-style-type:none;text-align:left;}
+.fl-controls-left .fl-label{float:left;text-align:left;width:50%;margin-right:5px;}
+.fl-controls-right li{list-style-type:none;display:block;text-align:left;}
+.fl-controls-right .fl-label{float:left;text-align:right;width:50%;margin-right:5px;}
+.fl-controls-centered li{list-style-type:none;display:block;text-align:left;}
+.fl-controls-centered .fl-label{float:left;text-align:center;width:50%;margin-right:5px;}
+.fl-noBackgroundImages,.fl-noBackgroundImages *{background-image:none!important;}
+.fl-noBackgroundImages .fl-icon{text-indent:0!important;width:auto!important;background-color:transparent!important;}
+.fl-ProgEnhance-enhanced,.fl-progEnhance-enhanced{display:none;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/fss/css/fss-reset.css b/docs/include/jscripts/infusion/framework/fss/css/fss-reset.css
new file mode 100644 (file)
index 0000000..ccef1d8
--- /dev/null
@@ -0,0 +1,37 @@
+table{font-size:inherit;font:100%;}
+pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
+html{color:#000;background:#FFF;}
+body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}
+table{border-collapse:collapse;border-spacing:0;}
+fieldset,img{border:0;}
+address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}
+li{list-style:none;}
+caption,th{text-align:left;}
+h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
+q:before,q:after{content:'';}
+abbr,acronym{border:0;font-variant:normal;}
+sup{vertical-align:text-top;}
+sub{vertical-align:text-bottom;}
+legend{color:#000;}
+h1{font-size:138.5%;}
+h2{font-size:123.1%;}
+h3{font-size:108%;}
+h1,h2,h3{margin:1em 0;}
+h1,h2,h3,h4,h5,h6,strong{font-weight:bold;}
+abbr,acronym{border-bottom:1px dotted #000;cursor:help;}
+em{font-style:italic;}
+blockquote,ul,ol,dl{margin:1em;}
+ol,ul,dl{margin-left:2em;}
+ol li{list-style:decimal outside;}
+ul li{list-style:disc outside;}
+dl dd{margin-left:1em;}
+th,td{border:1px solid #000;padding:.5em;}
+th{font-weight:bold;text-align:center;}
+caption{margin-bottom:.5em;text-align:center;}
+p,fieldset,table,pre{margin-bottom:1em;}
+input[type=text],input[type=password],textarea{width:12.25em;*width:11.9em;}
+input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}
+html{overflow:auto;font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;}
+input,textarea,select{*font-size:100%;*font-family:sans-serif;}
+input{*overflow:visible;*padding:0 1em;}
+:focus{outline:2px solid black;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/fss/css/fss-text.css b/docs/include/jscripts/infusion/framework/fss/css/fss-text.css
new file mode 100644 (file)
index 0000000..ef3f4b0
--- /dev/null
@@ -0,0 +1,61 @@
+.fl-font-size-70,.fl-font-size-70 body,.fl-font-size-70 input,.fl-font-size-70 select,.fl-font-size-70 textarea{font-size:.7em!important;line-height:1em!important;}
+.fl-font-size-80,.fl-font-size-80 body,.fl-font-size-80 input,.fl-font-size-80 select,.fl-font-size-80 textarea{font-size:.8em!important;line-height:1.1em!important;}
+.fl-font-size-90,.fl-font-size-90 body,.fl-font-size-90 input,.fl-font-size-90 select,.fl-font-size-90 textarea{font-size:.9em!important;line-height:1.2em!important;}
+.fl-font-size-100,.fl-font-size-100 body,.fl-font-size-100 input,.fl-font-size-100 select,.fl-font-size-100 textarea{font-size:1em!important;line-height:1.3em!important;}
+.fl-font-size-110,.fl-font-size-110 body,.fl-font-size-110 input,.fl-font-size-110 select,.fl-font-size-110 textarea{font-size:1.1em!important;line-height:1.4em!important;}
+.fl-font-size-120,.fl-font-size-120 body,.fl-font-size-120 input,.fl-font-size-120 select,.fl-font-size-120 textarea{font-size:1.2em!important;line-height:1.5em!important;}
+.fl-font-size-130,.fl-font-size-130 body,.fl-font-size-130 input,.fl-font-size-130 select,.fl-font-size-130 textarea{font-size:1.3em!important;line-height:1.6em!important;}
+.fl-font-size-140,.fl-font-size-140 body,.fl-font-size-140 input,.fl-font-size-140 select,.fl-font-size-140 textarea{font-size:1.4em!important;line-height:1.7em!important;}
+.fl-font-size-150,.fl-font-size-150 body,.fl-font-size-150 input,.fl-font-size-150 select,.fl-font-size-150 textarea{font-size:1.5em!important;line-height:1.8em!important;}
+@media screen and(-webkit-min-device-pixel-ratio:0){[class~='fl-font-size-70'] input[type=submit],[class~='fl-font-size-70'] input[type=button]{padding:0 1em;}
+[class~='fl-font-size-80'] input[type=submit],[class~='fl-font-size-80'] input[type=button]{font-size:.8em!important;padding:0 1em;}
+[class~='fl-font-size-90'] input[type=submit],[class~='fl-font-size-90'] input[type=button]{font-size:.9em!important;padding:0 1em;}
+[class~='fl-font-size-100'] input[type=submit],[class~='fl-font-size-100'] input[type=button]{font-size:1em!important;padding:0 1em;}
+[class~='fl-font-size-110'] input[type=submit],input[type=submit][class~='fl-font-size-110'],[class~='fl-font-size-110'] input[type=button]{background-color:#fff;font-size:1.1em!important;padding:0 1em;}
+[class~='fl-font-size-120'] input[type=submit],input[type=submit][class~='fl-font-size-120'],[class~='fl-font-size-120'] input[type=button]{background-color:#fff;font-size:1.2em!important;padding:0 1em;}
+[class~='fl-font-size-130'] input[type=submit],input[type=submit][class~='fl-font-size-130'],[class~='fl-font-size-130'] input[type=button]{background-color:#fff;font-size:1.3em!important;padding:0 1em;}
+[class~='fl-font-size-140'] input[type=submit],input[type=submit][class~='fl-font-size-140'],[class~='fl-font-size-140'] input[type=button]{background-color:#fff;font-size:1.4em!important;padding:0 1em;}
+[class~='fl-font-size-150'] input[type=submit],input[type=submit][class~='fl-font-size-150'],[class~='fl-font-size-150'] input[type=button]{background-color:#fff;font-size:1.5em!important;padding:0 1em;}
+[class~='fl-font-serif'] input[type=submit],[class~='fl-font-sans'] input[type=submit],[class~='fl-font-monospace'] input[type=submit],[class~='fl-font-arial'] input[type=submit],[class~='fl-font-verdana'] input[type=submit],[class~='fl-font-times'] input[type=submit],[class~='fl-font-courier'] input[type=submit]{background-color:#fff;padding:0 1em;}
+}
+.fl-font-serif,.fl-font-serif *{font-family:Georgia,Times,"Times New Roman","Book Antiqua",serif!important;}
+.fl-font-sans,.fl-font-sans *{font-family:Tahoma,Verdana,Helvetica,sans-serif!important;}
+.fl-font-monospace,.fl-font-monospace *{font-family:"Courier New,Courier",monospace!important;}
+.fl-font-arial,.fl-font-arial *{font-family:"Arial"!important;}
+.fl-font-verdana,.fl-font-verdana *{font-family:"Verdana"!important;}
+.fl-font-times,.fl-font-times *{font-family:Georgia,Times,"Times New Roman",serif!important;}
+.fl-font-courier,.fl-font-courier *{font-family:"Courier New",Courier,monospace!important;}
+.fl-text-align-left{text-align:left;}
+.fl-text-align-right{text-align:right;}
+.fl-text-align-center{text-align:center;}
+.fl-text-align-justify{text-align:justify;}
+.fl-font-spacing-0,.fl-font-spacing-0 body,.fl-font-spacing-0 input,.fl-font-spacing-0 select,.fl-font-spacing-0 textarea{letter-spacing:0;}
+.fl-font-spacing-1,.fl-font-spacing-1 body,.fl-font-spacing-1 input,.fl-font-spacing-1 select,.fl-font-spacing-1 textarea{letter-spacing:.1em;}
+.fl-font-spacing-2,.fl-font-spacing-2 body,.fl-font-spacing-2 input,.fl-font-spacing-2 select,.fl-font-spacing-2 textarea{letter-spacing:.2em;}
+.fl-font-spacing-3,.fl-font-spacing-3 body,.fl-font-spacing-3 input,.fl-font-spacing-3 select,.fl-font-spacing-3 textarea{letter-spacing:.3em;}
+.fl-font-spacing-4,.fl-font-spacing-4 body,.fl-font-spacing-4 input,.fl-font-spacing-4 select,.fl-font-spacing-4 textarea{letter-spacing:.4em;}
+.fl-font-spacing-5,.fl-font-spacing-5 body,.fl-font-spacing-5 input,.fl-font-spacing-5 select,.fl-font-spacing-5 textarea{letter-spacing:.5em;}
+.fl-font-spacing-6,.fl-font-spacing-6 body,.fl-font-spacing-6 input,.fl-font-spacing-6 select,.fl-font-spacing-6 textarea{letter-spacing:.6em;}
+.fl-text-aqua{color:aqua!important;}
+.fl-text-black{color:black!important;}
+.fl-text-blue{color:blue!important;}
+.fl-text-fuchsia{color:fuchsia!important;}
+.fl-text-gray{color:gray!important;}
+.fl-text-green{color:green!important;}
+.fl-text-lime{color:lime!important;}
+.fl-text-maroon{color:maroon!important;}
+.fl-text-navy{color:navy!important;}
+.fl-text-olive{color:olive!important;}
+.fl-text-purple{color:purple!important;}
+.fl-text-red{color:red!important;}
+.fl-text-silver{color:silver!important;}
+.fl-text-teal{color:teal!important;}
+.fl-text-white{color:white!important;}
+.fl-text-yellow{color:yellow!important;}
+.fl-text-underline{text-decoration:underline!important;}
+.fl-text-bold{font-weight:bold!important;}
+.fl-text-larger{font-size:125%!important;}
+.fl-input-outline{border:2px solid;}
+.fl-highlight-yellow,.fl-highlight-hover-yellow:hover,.fl-highlight-focus-yellow:focus{background-color:#FF0!important;background-image:none!important;}
+.fl-highlight-green,.fl-highlight-hover-green:hover,.fl-highlight-focus-green:focus{background-color:#0F0!important;background-image:none!important;}
+.fl-highlight-blue,.fl-highlight-hover-blue:hover,.fl-highlight-focus-blue:focus{background-color:#00F!important;background-image:none!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/fss/css/fss-theme-coal.css b/docs/include/jscripts/infusion/framework/fss/css/fss-theme-coal.css
new file mode 100644 (file)
index 0000000..94cc6cf
--- /dev/null
@@ -0,0 +1,57 @@
+.fl-theme-coal :focus,.fl-theme-coal .selectable{outline:.1em solid #000;}
+.fl-theme-coal{color:#000!important;background-color:#ebebeb!important;border-color:#000;}
+.fl-theme-coal a{color:#333!important;font-weight:bold;}
+.fl-theme-coal a:hover{color:#999!important;}
+.fl-theme-coal h1{color:#000;border-bottom-width:.2em;border-bottom-style:solid;}
+.fl-theme-coal h2{color:#666;}
+.fl-theme-coal th{border:.1em solid #fff;background-color:#dfefff!important;}
+.fl-theme-coal td{border:.1em solid #999!important;}
+.fl-theme-coal .fl-textfield,.fl-theme-coal .fl-textarea{background-color:#fff;border:1px solid #000;}
+.fl-theme-coal .fl-icon{background-color:#666;}
+.fl-theme-coal .fl-inlineEdit-edit{background-color:#ebebeb!important;border:.1em solid #fff;margin:-0.1em;}
+.fl-theme-coal .fl-button-left,.fl-theme-coal .fl-button-right{color:#FFF!important;background-color:#333!important;}
+.fl-theme-coal .fl-button-left{background-image:url(../images/themes/coal/buttons-med-cap.png);}
+.fl-theme-coal .fl-button-right{background-image:url(../images/themes/coal/buttons-med-cap.png);}
+.fl-theme-coal .fl-button-inner{background-image:url(../images/themes/coal/buttons-med-bg.png);}
+.fl-theme-coal a.fl-button-left:hover,.fl-theme-coal a.fl-button-right:hover{color:#fff!important;}
+.fl-theme-coal .fl-tabs{border-bottom-color:#333;}
+.fl-theme-coal .fl-tabs li,.fl-theme-coal .fl-tabs li a{font-weight:bold;color:#fff!important;border-color:#333;border-bottom-color:#333;background-color:#666;text-decoration:none;}
+.fl-theme-coal .fl-tabs li a:hover{background-color:#333;color:#fff!important;}
+.fl-theme-coal .fl-tabs li.fl-activeTab,.fl-theme-coal .fl-tabs li.fl-activeTab:hover,.fl-theme-coal .fl-tabs li.fl-activeTab a,.fl-theme-coal .fl-tabs li.fl-activeTab a:hover,.fl-theme-coal .fl-tabs li.fl-tabs-active,.fl-theme-coal .fl-tabs li.fl-tabs-active a,.fl-theme-coal .fl-tabs li.fl-tabs-active a:hover{background-color:#ebebeb;border-bottom-color:#ebebeb;color:#000!important;}
+.fl-theme-coal .fl-tabs-content{background-color:#ebebeb;color:#000;border:1px solid #999;border-top:none;}
+.fl-theme-coal .fl-listmenu{border:1px solid #333;border-bottom-width:2px;background-color:#ebebeb;}
+.fl-theme-coal .fl-listmenu li,.fl-theme-coal .fl-listmenu li a{font-weight:bold;background-color:#ebebeb;border-color:#333;text-decoration:none;}
+.fl-theme-coal .fl-listmenu a:hover{background-color:#fff;color:#333!important;}
+.fl-theme-coal .fl-listmenu .fl-activemenu,.fl-theme-coal .fl-listmenu .fl-activemenu:hover{background-color:#fff;border-bottom-color:#999;color:#d9d9d9;}
+.fl-theme-coal .fl-grid{border:2px solid #000;background-color:#ccc;}
+.fl-theme-coal .fl-grid li{background-color:#dfefff;border:1px solid #000;}
+.fl-theme-coal .fl-grid .caption{background-color:#dfefff;color:#fff;}
+.fl-theme-coal .fl-widget{background:#333 url(../images/themes/coal/widget-bg.png) repeat-x top left;border:1px solid #000;}
+.fl-theme-coal .fl-widget h2{color:#fff;}
+.fl-theme-coal .fl-widget .fl-icon-more{background-image:url('../images/themes/coal/icon-widget-More.png');margin-left:0;}
+.fl-theme-coal .fl-widget .fl-icon-close{background-image:url('../images/themes/coal/icon-widget-Close.png');margin-right:0;}
+.fl-theme-coal .fl-grabbable .fl-widget-titlebar{background-image:url('../images/themes/coal/icon-widget-gripper.png');}
+.fl-theme-coal .fl-widget-titlebar{background-position:center top;background-repeat:no-repeat;}
+.fl-theme-coal .fl-widget-titlebar .icon{background-position:center center;}
+.fl-theme-coal .fl-widget-titlebar .fl-button-right,.fl-theme-coal .fl-widget-titlebar .fl-button-left{background-image:url(../images/themes/coal/buttons-titlebar-cap.png);text-decoration:none;}
+.fl-theme-coal .fl-widget-titlebar .fl-button-inner{background-image:url(../images/themes/coal/buttons-titlebar-bg.png);padding-bottom:.3em;padding-top:0;}
+.fl-theme-coal .fl-widget-options li{border-left:1px solid #ccc;}
+.fl-theme-coal .fl-widget-options li a{color:#ebebeb!important;}
+.fl-theme-coal .fl-widget-options li a:hover{color:#fff!important;}
+.fl-theme-coal .fl-widget-options a.icon:hover{background-color:#fff;border-color:#000;}
+.fl-theme-coal .fl-widget-content{background-color:#fff;}
+.fl-theme-coal .fl-progress-bounds{border-color:#333;background-color:#ebebeb;}
+.fl-theme-coal .fl-progress-fill{color:#fff;background-color:#999;}
+.fl-theme-coal .fl-reorderer-dropMarker{background-color:#f00!important;}
+.fl-theme-coal .fl-tabs-content-enhanced{background:#ebebeb url(../images/themes/coal/tabs-med-content-bg.png) repeat-x left top;border:none;}
+.fl-theme-coal .fl-tabs-enhanced{background:url(../images/themes/coal/tabs-med-container-bg.png) repeat-x left bottom;border-bottom:none;margin:10px 0 0;padding:5px 0 6px;*padding:0;}
+.fl-theme-coal .fl-tabs-enhanced li{background:transparent url(../images/themes/coal/tabs-med-cap.png) no-repeat left top;padding:4px 0 6px 16px;*padding-top:0;}
+.fl-theme-coal .fl-tabs-enhanced li a{background:transparent url(../images/themes/coal/tabs-med-bg.png) no-repeat right top;border:none;margin:0;padding:4px 16px 6px 0;color:#ebebeb!important;*padding-bottom:4px;}
+.fl-theme-coal .fl-tabs-enhanced li.fl-tabs-active{background:transparent url(../images/themes/coal/tabs-med-active-cap.png) no-repeat scroll left top;}
+.fl-theme-coal .fl-tabs-enhanced li.fl-tabs-active a{background:transparent url(../images/themes/coal/tabs-med-active-bg.png) no-repeat scroll right top;color:#fff!important;}
+.fl-theme-coal .fl-widget-content .fl-tabs-content-enhanced{background:#ebebeb url(../images/themes/coal/tabs-light-content-bg.png) repeat-x left top;border:none;}
+.fl-theme-coal .fl-widget-content .fl-tabs-enhanced{background:url(../images/themes/coal/tabs-light-container-bg.png) repeat-x left bottom;border-bottom:none;margin:10px 0 0;padding:5px 0 6px;*padding:0;}
+.fl-theme-coal .fl-widget-content .fl-tabs-enhanced li{background:transparent url(../images/themes/coal/tabs-light-cap.png) no-repeat left top;padding:4px 0 6px 16px;*padding-top:0;}
+.fl-theme-coal .fl-widget-content .fl-tabs-enhanced li a{background:transparent url(../images/themes/coal/tabs-light-bg.png) no-repeat right top;border:none;margin:0;padding:4px 16px 6px 0;color:#ebebeb!important;*padding-bottom:4px;}
+.fl-theme-coal .fl-widget-content .fl-tabs-enhanced li.fl-tabs-active{background:transparent url(../images/themes/coal/tabs-light-active-cap.png) no-repeat scroll left top;}
+.fl-theme-coal .fl-widget-content .fl-tabs-enhanced li.fl-tabs-active a{background:transparent url(../images/themes/coal/tabs-light-active-bg.png) no-repeat scroll right top;color:#fff!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/fss/css/fss-theme-debug.css b/docs/include/jscripts/infusion/framework/fss/css/fss-theme-debug.css
new file mode 100644 (file)
index 0000000..7e658bd
--- /dev/null
@@ -0,0 +1,18 @@
+.fl-theme-debug{color:#fff;background-color:#000;}
+.fl-theme-debug a{color:#F00;}
+.outline *{outline:1px solid #f00;}
+.fl-theme-debug div{background-color:#292929;}
+.fl-theme-debug div div{background-color:#525252;}
+.fl-theme-debug div div div{background-color:#7b7b7b;}
+.fl-theme-debug div div div div{background-color:#a4a4a4;}
+.fl-theme-debug div div div div div{background-color:#cdcdcd;}
+.fl-theme-debug div div div div div div{background-color:#f6f6f6;}
+.fl-theme-debug div div div div div div div{background-color:#fafafa;}
+.fl-theme-debug div div div div div div div div{background-color:#f5f5f5;}
+.fl-theme-debug div div div div div div div div div{background-color:#f0f0f0;}
+.fl-theme-debug div div div div div div div div div div{background-color:#ebebeb;}
+.fl-theme-debug div div div div div div div div div div div{background-color:#e6e6e6;}
+.fl-theme-debug div div div div div div div div div div div div{background-color:#e1e1e1;}
+.fl-theme-debug div div div div div div div div div div div div div{background-color:#dcdcdc;}
+.fl-theme-debug div div div div div div div div div div div div div div{background-color:#d7d7d7;}
+.fl-theme-debug div div div div div div div div div div div div div div div{background-color:#d2d2d2;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/fss/css/fss-theme-hc.css b/docs/include/jscripts/infusion/framework/fss/css/fss-theme-hc.css
new file mode 100644 (file)
index 0000000..e6cc0e4
--- /dev/null
@@ -0,0 +1,35 @@
+.fl-theme-hc :focus,.fl-theme-hc .selectable{outline:.2em solid #F00;}
+.fl-theme-hc{color:#000!important;background-color:#fff!important;}
+.fl-theme-hc div,.fl-theme-hc input{color:#000;background-color:#fff;border-color:#000;}
+.fl-theme-hc .fl-knockout{background:transparent!important;color:#000;}
+.fl-theme-hc a{color:#000!important;font-weight:bold;background-color:#fff!important;}
+.fl-theme-hc a:hover{color:#fff!important;background-color:#000!important;}
+.fl-theme-hc a:hover *{color:#fff!important;background-color:#000!important;}
+.fl-theme-hc h1,.fl-theme-hc h2,.fl-theme-hc h3,.fl-theme-hc h4,.fl-theme-hc h5,.fl-theme-hc h6{color:#000!important;background-color:#fff!important;border-color:#000!important;border-bottom:.1em dashed #000!important;}
+.fl-theme-hc th{border:.1em solid #000;background-color:#000!important;color:#fff!important;}
+.fl-theme-hc td{border:.1em solid #000;}
+.fl-theme-hc .fl-inlineEdit-edit{background-color:#000!important;color:#fff!important;border:.1em solid #fff;padding:.1em;margin:-0.1em;}
+.fl-theme-hc .fl-tabs{border-bottom-color:#000;}
+.fl-theme-hc .fl-tabs li,.fl-theme-hc .fl-tabs li *{border-color:#000;border-bottom-color:#000;}
+.fl-theme-hc .fl-tabs li{background-color:#000;}
+.fl-theme-hc .fl-tabs li *{color:#fff!important;font-weight:bold;background-color:#000!important;text-decoration:none;}
+.fl-theme-hc .fl-tabs li:hover,.fl-theme-hc .fl-tabs li:hover *,.fl-theme-hc .fl-tabs li a:hover{color:#000!important;background-color:#fff!important;}
+.fl-theme-hc .fl-tabs li.fl-tabs-active,.fl-theme-hc .fl-tabs li.fl-tabs-active a,.fl-theme-hc .fl-tabs li.fl-tabs-active a:hover,.fl-theme-hc .fl-tabs li.fl-activeTab,.fl-theme-hc .fl-tabs li.fl-activeTab:hover,.fl-theme-hc .fl-tabs li.fl-activeTab a,.fl-theme-hc .fl-tabs li.fl-activeTab a:hover{background-color:#fff!important;border-bottom-color:#fff;color:#000!important;}
+.fl-theme-hc .fl-tab-content{background-color:#fff;color:#000;}
+.fl-theme-hc .fl-listmenu{border:1px solid #000;border-bottom-width:2px;background-color:#fff;}
+.fl-theme-hc .fl-listmenu li,.fl-theme-hc .fl-listmenu li a{font-weight:bold;color:#000;background-color:#fff;border-color:#000;text-decoration:none;}
+.fl-theme-hc .fl-listmenu a:hover{background-color:#fff;color:#fff;}
+.fl-theme-hc .fl-listmenu .fl-activemenu,.fl-theme-hc .fl-listmenu .fl-activemenu:hover{background-color:#fff;border-bottom-color:#fff;color:#508cc9;}
+.fl-theme-hc .fl-button-right,.fl-theme-hc .fl-button-left,.fl-theme-hc .fl-button-inner{padding:0;}
+.fl-theme-hc .fl-widget{background-color:#000;border:1px solid #fff;}
+.fl-theme-hc .fl-widget h2{color:#fff;}
+.fl-theme-hc .fl-widget a{color:#000;}
+.fl-theme-hc .fl-widget .fl-icon{color:#000;background-image:none;background-color:#fff;text-indent:0;width:auto;height:auto;margin-left:0;padding:0 2px;display:inline;font-weight:bold;}
+.fl-theme-hc .fl-widget .fl-widget-titlebar{margin-bottom:3px;}
+.fl-theme-hc .fl-widget .fl-widget-options{padding:0;}
+.fl-theme-hc .fl-widget .fl-widget-options li{border-left:1px solid #fff;}
+.fl-theme-hc .fl-widget .fl-widget-options a{color:#fff;}
+.fl-theme-hc .fl-widget .fl-widget-content{background-color:#fff;}
+.fl-theme-hc .fl-progress-bounds{border-color:#000;background-color:#fff;}
+.fl-theme-hc .fl-progress-fill{color:#fff;background-color:#000;}
+.fl-theme-hc .fl-reorderer-dropMarker{background-color:#f00!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/fss/css/fss-theme-hci.css b/docs/include/jscripts/infusion/framework/fss/css/fss-theme-hci.css
new file mode 100644 (file)
index 0000000..7a3a932
--- /dev/null
@@ -0,0 +1,35 @@
+.fl-theme-hci :focus,.fl-theme-hci .selectable{outline:.2em solid #F00;}
+.fl-theme-hci{color:#fff!important;background-color:#000!important;}
+.fl-theme-hci div,.fl-theme-hci input{color:#fff!important;background-color:#000!important;}
+.fl-theme-hci .fl-knockout{background:transparent!important;color:#fff;}
+.fl-theme-hci a{color:#fff!important;font-weight:bold;background-color:#000!important;}
+.fl-theme-hci a:hover{color:#000!important;background-color:#fff!important;}
+.fl-theme-hci a:hover *{color:#000!important;background-color:#fff!important;}
+.fl-theme-hci h1,.fl-theme-hci h2,.fl-theme-hci h3,.fl-theme-hci h4,.fl-theme-hci h5,.fl-theme-hci h6{color:#fff;background-color:#000;border-color:#fff;border-bottom:.1em dashed #fff;}
+.fl-theme-hci th{border:.1em solid #fff;background-color:#fff!important;color:#000!important;}
+.fl-theme-hci td{border:.1em solid #fff;}
+.fl-theme-hci .fl-inlineEdit-edit{background-color:#fff!important;color:#000!important;border:.1em solid #000;padding:.1em;margin:-0.1em;}
+.fl-theme-hci .fl-tabs{border-bottom-color:#fff;}
+.fl-theme-hci .fl-tabs li,.fl-theme-hci .fl-tabs li *{border-color:#fff;border-bottom-color:#fff;}
+.fl-theme-hci .fl-tabs li{background-color:#fff;}
+.fl-theme-hci .fl-tabs li *{color:#000!important;font-weight:bold;background-color:#fff!important;text-decoration:none;}
+.fl-theme-hci .fl-tabs li:hover,.fl-theme-hci .fl-tabs li:hover *,.fl-theme-hci .fl-tabs li a:hover{color:#fff!important;background-color:#000!important;}
+.fl-theme-hci .fl-tabs li.fl-tabs-active,.fl-theme-hci .fl-tabs li.fl-tabs-active a,.fl-theme-hci .fl-tabs li.fl-tabs-active a:hover,.fl-theme-hci .fl-tabs li.fl-activeTab,.fl-theme-hci .fl-tabs li.fl-activeTab:hover,.fl-theme-hci .fl-tabs li.fl-activeTab a,.fl-theme-hci .fl-tabs li.fl-activeTab a:hover{background-color:#000!important;border-bottom-color:#000;color:#fff!important;}
+.fl-theme-hci .fl-tab-content{background-color:#000;border:1px solid #fff;border-top:none;color:#fff;}
+.fl-theme-hci .fl-listmenu{border:1px solid #fff;border-bottom-width:2px;background-color:#000;}
+.fl-theme-hci .fl-listmenu li,.fl-theme-hci .fl-listmenu li a{font-weight:bold;color:#fff;background-color:#dfefff;border-color:#fff;text-decoration:none;}
+.fl-theme-hci .fl-listmenu a:hover{background-color:#5a95cf;color:#000;}
+.fl-theme-hci .fl-listmenu .fl-activemenu,.fl-theme-hci .fl-listmenu .fl-activemenu:hover{background-color:#000;border-bottom-color:#000;color:#508cc9;}
+.fl-theme-hci .fl-button-right,.fl-theme-hci .fl-button-left,.fl-theme-hci .fl-button-inner{padding:0;}
+.fl-theme-hci .fl-widget{background-color:#fff!important;border:1px solid #000;}
+.fl-theme-hci .fl-widget h2{color:#000;background-color:#fff;}
+.fl-theme-hci .fl-widget a{color:#fff;}
+.fl-theme-hci .fl-widget .fl-icon{color:#fff;background-image:none;background-color:#000;text-indent:0;width:auto;height:auto;margin-left:0;padding:0 2px;display:inline;font-weight:bold;}
+.fl-theme-hci .fl-widget .fl-widget-titlebar{margin-bottom:3px;}
+.fl-theme-hci .fl-widget .fl-widget-options{padding:0;}
+.fl-theme-hci .fl-widget .fl-widget-options li{border-left:1px solid #000;}
+.fl-theme-hci .fl-widget .fl-widget-options a{color:#000;}
+.fl-theme-hci .fl-widget .fl-widget-content{background-color:#000;}
+.fl-theme-hci .fl-progress-bounds{border-color:#fff;background-color:#000;}
+.fl-theme-hci .fl-progress-fill{color:#000;background-color:#fff;}
+.fl-theme-hci .fl-reorderer-dropMarker{background-color:#f00!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/fss/css/fss-theme-mist.css b/docs/include/jscripts/infusion/framework/fss/css/fss-theme-mist.css
new file mode 100644 (file)
index 0000000..ec71b2f
--- /dev/null
@@ -0,0 +1,50 @@
+.fl-theme-mist :focus,.fl-theme-mist .selectable{outline:.1em solid #F00;}
+.fl-theme-mist{color:#000!important;background-color:#f4f4f4!important;border-color:#4070a1;}
+.fl-theme-mist a{color:#5a95cf!important;font-weight:bold;}
+.fl-theme-mist a:hover{color:#6DB5FB!important;}
+.fl-theme-mist h1{color:#4070a1;border-bottom-width:.2em;border-bottom-style:solid;}
+.fl-theme-mist h2{color:#5a95cf;}
+.fl-theme-mist th{border:.1em solid #5a95cf;background-color:#dfefff!important;}
+.fl-theme-mist td{border:.1em solid #999!important;}
+.fl-theme-mist .fl-textfield,.fl-theme-mist .fl-textarea{border:1px solid #5a95cf;border-bottom-color:#5a95cf;border-right-color:#5a95cf;background-color:#dfefff;}
+.fl-theme-mist .fl-icon{background-color:#5a95cf;}
+.fl-theme-mist .fl-inlineEdit-edit{background-color:#dfefff!important;border:.1em solid #5a95cf;margin:-0.1em;}
+.fl-theme-mist .fl-button-left{background-image:url(../images/themes/mist/buttons-med-cap.png);}
+.fl-theme-mist .fl-button-right{background-image:url(../images/themes/mist/buttons-med-cap.png);}
+.fl-theme-mist .fl-button-inner{background-image:url(../images/themes/mist/buttons-med-bg.png);}
+.fl-theme-mist .fl-tabs{border-bottom-color:#4070a1;}
+.fl-theme-mist .fl-tabs li,.fl-theme-mist .fl-tabs li a{font-weight:bold;color:#4070a1;border-color:#4070a1;border-bottom-color:#4070a1;text-decoration:none;background-color:#dfefff;}
+.fl-theme-mist .fl-tabs li a:hover{background-color:#5a95cf;color:#fff!important;}
+.fl-theme-mist .fl-tabs li.fl-activeTab,.fl-theme-mist .fl-tabs li.fl-activeTab:hover,.fl-theme-mist .fl-tabs li.fl-activeTab a,.fl-theme-mist .fl-tabs li.fl-activeTab a:hover .fl-theme-mist .fl-tabs li.fl-tabs-active,.fl-theme-mist .fl-tabs li.fl-tabs-active a,.fl-theme-mist .fl-tabs li.fl-tabs-active a:hover{background-color:#f4f4f4;border-bottom-color:#f4f4f4;color:#508cc9!important;}
+.fl-theme-mist .fl-tabs-content{background-color:#f4f4f4;color:#000;border:1px solid #61c5ff;border-top:none;margin-top:-4px;}
+.fl-theme-mist .fl-listmenu{border:1px solid #4070a1;border-bottom-width:2px;background-color:#fff;}
+.fl-theme-mist .fl-listmenu li,.fl-theme-mist .fl-listmenu li a{font-weight:bold;color:#4070a1;background-color:#dfefff;border-color:#4070a1;text-decoration:none;}
+.fl-theme-mist .fl-listmenu li a:hover{background-color:#5a95cf;color:#fff!important;}
+.fl-theme-mist .fl-listmenu .fl-activemenu,.fl-theme-mist .fl-listmenu .fl-activemenu:hover{background-color:#fff;border-bottom-color:#fff;color:#508cc9;}
+.fl-theme-mist .fl-grid{border:2px solid #4070a1;background-color:#fff;}
+.fl-theme-mist .fl-grid li{background-color:#dfefff;border:1px solid #4070a1;}
+.fl-theme-mist .fl-grid .caption{background-color:#dfefff;color:#5a95cf;}
+.fl-theme-mist .fl-widget{background:#efefef url(../images/themes/mist/widget-bg.png) repeat-x top left;border:1px solid #CCC;}
+.fl-theme-mist .fl-widget h2{color:#000;}
+.fl-theme-mist .fl-widget .fl-icon-more{background-image:url('../images/themes/mist/icon-widget-More.png');margin-left:0;}
+.fl-theme-mist .fl-widget .fl-icon-close{background-image:url('../images/themes/mist/icon-widget-Close.png');margin-right:0;}
+.fl-theme-mist .fl-grabbable .fl-widget-titlebar{background-image:url('../images/themes/mist/icon-widget-gripper.png');}
+.fl-theme-mist .fl-widget-titlebar .icon{background-position:center center;}
+.fl-theme-mist .fl-widget-titlebar .fl-button-right,.fl-theme-mist .fl-widget-titlebar .fl-button-left{color:#4070a1!important;background-image:url(../images/themes/mist/buttons-titlebar-cap.png);text-decoration:none;}
+.fl-theme-mist .fl-widget-titlebar .fl-button-inner{background-image:url(../images/themes/mist/buttons-titlebar-bg.png);}
+.fl-theme-mist .fl-widget-options li{border-left:1px solid #ccc;}
+.fl-theme-mist .fl-widget-options a.icon:hover{background-color:#5a95cf;border-color:#000;}
+.fl-theme-mist .fl-widget-content{background-color:#fff;}
+.fl-theme-mist .fl-progress-bounds{border-color:#999;background-color:#fff;}
+.fl-theme-mist .fl-progress-fill{color:#4070a1;background-color:#000;}
+.fl-theme-mist .fl-reorderer-dropMarker{background-color:#f00!important;}
+.fl-theme-mist .fl-tabs-enhanced{background:url(../images/themes/mist/tabs-med-container-bg.png) repeat-x left bottom;border-bottom:none;margin:10px 1px 0;padding:5px 0 6px;*padding:2px 0;}
+.fl-theme-mist .fl-tabs-enhanced li{background:transparent url(../images/themes/mist/tabs-med-cap.png) no-repeat left top;padding:4px 0 6px 16px;*padding-top:0;}
+.fl-theme-mist .fl-tabs-enhanced li a{background:transparent url(../images/themes/mist/tabs-med-bg.png) no-repeat right top;border:none;margin:0;padding:4px 16px 6px 0;color:#666!important;*padding-bottom:4px;}
+.fl-theme-mist .fl-tabs-enhanced li.fl-tabs-active{background:transparent url(../images/themes/mist/tabs-med-active-cap.png) no-repeat scroll left top;}
+.fl-theme-mist .fl-tabs-enhanced li.fl-tabs-active a{background:transparent url(../images/themes/mist/tabs-med-active-bg.png) no-repeat scroll right top;color:#000!important;}
+.fl-theme-mist .fl-widget-content .fl-tabs-enhanced{background:url(../images/themes/mist/tabs-light-container-bg.png) repeat-x left bottom;border-bottom:none;margin:10px 1px 0;padding:5px 0 6px;*padding:2px 0;}
+.fl-theme-mist .fl-widget-content .fl-tabs-enhanced li{background:transparent url(../images/themes/mist/tabs-light-cap.png) no-repeat left top;padding:4px 0 6px 16px;*padding-top:0;}
+.fl-theme-mist .fl-widget-content .fl-tabs-enhanced li a{background:transparent url(../images/themes/mist/tabs-light-bg.png) no-repeat right top;border:none;margin:0;padding:4px 16px 6px 0;color:#666!important;*padding-bottom:4px;}
+.fl-theme-mist .fl-widget-content .fl-tabs-enhanced li.fl-tabs-active{background:transparent url(../images/themes/mist/tabs-light-active-cap.png) no-repeat scroll left top;}
+.fl-theme-mist .fl-widget-content .fl-tabs-enhanced li.fl-tabs-active a{background:transparent url(../images/themes/mist/tabs-light-active-bg.png) no-repeat scroll right top;color:#000!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/fss/css/fss-theme-rust.css b/docs/include/jscripts/infusion/framework/fss/css/fss-theme-rust.css
new file mode 100644 (file)
index 0000000..855b388
--- /dev/null
@@ -0,0 +1,30 @@
+.fl-theme-rust :focus,.fl-theme-rust .selectable{outline:.2em solid #662e0f;}
+.fl-theme-rust{color:#000!important;background-color:#F2E0B6!important;border-color:#916535;}
+.fl-theme-rust .fl-knockout{background:transparent;color:#000;}
+.fl-theme-rust a{color:#916535!important;}
+.fl-theme-rust a:hover{color:#914E38!important;}
+.fl-theme-rust h1{color:#000;border-bottom-width:1px;border-bottom-style:dotted;}
+.fl-theme-rust h2{color:#453A2E;}
+.fl-theme-rust th{border:.1em solid #453A2E;background-color:#917A61!important;color:#fff!important;}
+.fl-theme-rust td{border:.1em solid #453A2E!important;}
+.fl-theme-rust .fl-inlineEdit-edit{background-color:#dfefff;border:1px solid #5a95cf;margin:-1px;}
+.fl-theme-rust .fl-wrapper-widget{border:3px solid #dfefff;background-color:#333;color:#fff;}
+.fl-theme-rust .fl-wrapper-callout{border-color:#999;background-color:#dfefff;}
+.fl-theme-rust .fl-tabs{border-bottom-color:#916535;}
+.fl-theme-rust .fl-tabs li{background-color:#F2E0B6;}
+.fl-theme-rust .fl-tabs li,.fl-theme-rust .fl-tabs li a{font-weight:bold;border-color:#916535;border-bottom-color:#916535;text-decoration:none;}
+.fl-theme-rust .fl-tabs li:hover,.fl-theme-rust .fl-tabs li:hover a,.fl-theme-rust .fl-tabs li a:hover{background-color:#662e0f;color:#fff!important;}
+.fl-theme-rust .fl-tabs li.fl-tabs-active,.fl-theme-rust .fl-tabs li.fl-tabs-active a,.fl-theme-rust .fl-tabs li.fl-tabs-active a:hover,.fl-theme-rust .fl-tabs li.fl-activeTab,.fl-theme-rust .fl-tabs li.fl-activeTab:hover,.fl-theme-rust .fl-tabs li.fl-activeTab a,.fl-theme-rust .fl-tabs li.fl-activeTab a:hover{background-color:#FFFBC2;border-bottom-color:#FFFBC2;color:#916535!important;}
+.fl-theme-rust .fl-tab-content{background-color:#FFFBC2;color:#000;border:1px solid #916535;border-top:none;}
+.fl-theme-rust .fl-listmenu{border:1px solid #4070a1;background-color:#fff;}
+.fl-theme-rust .fl-listmenu li,.fl-theme-rust .fl-listmenu li a{font-weight:bold;color:#4070a1;background-color:#fff;border-color:#4070a1;text-decoration:none;}
+.fl-theme-rust .fl-listmenu a:hover{background-color:#5a95cf;color:#fff;}
+.fl-theme-rust .fl-listmenu .fl-activemenu,.fl-theme-rust .fl-listmenu .fl-activemenu:hover{background-color:#fff;border-bottom-color:#fff;color:#508cc9;}
+.fl-theme-rust .fl-widget{background:#662e0f url(../images/themes/rust/widget-earmark.png) no-repeat top left;}
+.fl-theme-rust .fl-widget h2{color:#FFFBC2;}
+.fl-theme-rust .grabbable{background-image:url('../images/themes/rust/gripper.png');}
+.fl-theme-rust .fl-widget-titlebar .icon{background-position:center center;}
+.fl-theme-rust .fl-widget-options li{border-left:1px solid #cf923e;}
+.fl-theme-rust .fl-widget-options a{color:#cf923e!important;}
+.fl-theme-rust .fl-widget-options a.icon:hover{background-color:#cf923e;border-color:#fffbc2;}
+.fl-theme-rust .fl-widget-content{background-color:#FFFBC2!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/fss/css/fss-theme-slate.css b/docs/include/jscripts/infusion/framework/fss/css/fss-theme-slate.css
new file mode 100644 (file)
index 0000000..da88d04
--- /dev/null
@@ -0,0 +1,51 @@
+.fl-theme-slate :focus,.fl-theme-slate .selectable{outline:.1em solid #000;}
+.fl-theme-slate{color:#000!important;background-color:#ccc!important;border-color:#999;}
+.fl-theme-slate a{color:#ebebeb!important;font-weight:bold;}
+.fl-theme-slate a:hover{color:#fff!important;}
+.fl-theme-slate h1{color:#999;border-bottom-width:.2em;border-bottom-style:solid;}
+.fl-theme-slate h2{color:#fff;}
+.fl-theme-slate th{border:.1em solid #fff;background-color:#dfefff!important;}
+.fl-theme-slate td{border:.1em solid #999!important;}
+.fl-theme-slate .fl-textfield,.fl-theme-slate .fl-textarea{background-color:#ccc;border:1px solid #666;}
+.fl-theme-slate .fl-icon{background-color:#ebebeb;}
+.fl-theme-slate .fl-inlineEdit-edit{background-color:#dfefff!important;border:.1em solid #fff;margin:-0.1em;}
+.fl-theme-slate .fl-button-left,.fl-theme-slate .fl-button-right{color:#FFF!important;background-color:#999!important;}
+.fl-theme-slate .fl-button-left{background-image:url(../images/themes/slate/buttons-med-cap.png);}
+.fl-theme-slate .fl-button-right{background-image:url(../images/themes/slate/buttons-med-cap.png);}
+.fl-theme-slate .fl-button-inner{background-image:url(../images/themes/slate/buttons-med-bg.png);}
+.fl-theme-slate .fl-tabs{border-bottom-color:#999;}
+.fl-theme-slate .fl-tabs li,.fl-theme-slate .fl-tabs li a{font-weight:bold;color:#999;border-color:#999;border-bottom-color:#999;background-color:#666;text-decoration:none;}
+.fl-theme-slate .fl-tabs li a:hover{background-color:#999;color:#fff!important;}
+.fl-theme-slate .fl-tabs li.fl-activeTab,.fl-theme-slate .fl-tabs li.fl-activeTab:hover,.fl-theme-slate .fl-tabs li.fl-activeTab a,.fl-theme-slate .fl-tabs li.fl-activeTab a:hover,.fl-theme-slate .fl-tabs li.fl-tabs-active,.fl-theme-slate .fl-tabs li.fl-tabs-active a,.fl-theme-slate .fl-tabs li.fl-tabs-active a:hover{background-color:#ebebeb;border-bottom-color:#ccc;color:#000!important;}
+.fl-theme-slate .fl-tabs-content{background-color:#ebebeb;color:#000;border:1px solid #999;border-top:none;}
+.fl-theme-slate .fl-listmenu{border:1px solid #999;border-bottom-width:2px;background-color:#ccc;}
+.fl-theme-slate .fl-listmenu li,.fl-theme-slate .fl-listmenu li a{font-weight:bold;background-color:#999;border-color:#ccc;text-decoration:none;}
+.fl-theme-slate .fl-listmenu a:hover{background-color:#ebebeb;color:#000!important;}
+.fl-theme-slate .fl-listmenu .fl-activemenu,.fl-theme-slate .fl-listmenu .fl-activemenu:hover{background-color:#ccc;border-bottom-color:#ccc;color:#d9d9d9;}
+.fl-theme-slate .fl-grid{border:2px solid #999;background-color:#ccc;}
+.fl-theme-slate .fl-grid li{background-color:#dfefff;border:1px solid #999;}
+.fl-theme-slate .fl-grid .caption{background-color:#dfefff;color:#fff;}
+.fl-theme-slate .fl-widget{background:#ccc url(../images/themes/slate/widget-bg.png) repeat-x top left;border:1px solid #666;}
+.fl-theme-slate .fl-widget h2{color:#ccc;}
+.fl-theme-slate .fl-widget .fl-icon-more{background-image:url('../images/themes/slate/icon-widget-More.png');margin-left:0;}
+.fl-theme-slate .fl-widget .fl-icon-close{background-image:url('../images/themes/slate/icon-widget-Close.png');margin-right:0;}
+.fl-theme-slate .fl-grabbable .fl-widget-titlebar{background-image:url('../images/themes/slate/icon-widget-gripper.png');}
+.fl-theme-slate .fl-widget-titlebar .icon{background-position:center center;}
+.fl-theme-slate .fl-widget-titlebar .fl-button-right,.fl-theme-slate .fl-widget-titlebar .fl-button-left{color:#333!important;background-image:url(../images/themes/slate/buttons-titlebar-cap.png);text-decoration:none;}
+.fl-theme-slate .fl-widget-titlebar .fl-button-inner{background-image:url(../images/themes/slate/buttons-titlebar-bg.png);padding-bottom:.3em;padding-top:0;}
+.fl-theme-slate .fl-widget-options li{border-left:1px solid #ccc;}
+.fl-theme-slate .fl-widget-options a.icon:hover{background-color:#fff;border-color:#000;}
+.fl-theme-slate .fl-widget-content{background-color:#bfbfbf;}
+.fl-theme-slate .fl-progress-bounds{border-color:#999;background-color:#ccc;}
+.fl-theme-slate .fl-progress-fill{color:#999;background-color:#000;}
+.fl-theme-slate .fl-reorderer-dropMarker{background-color:#f00!important;}
+.fl-theme-slate .fl-tabs-enhanced{background:url(../images/themes/slate/tabs-light-container-bg.png) repeat-x left bottom;border-bottom:none;margin:10px 1px 0;padding:5px 0 6px;*padding:0;}
+.fl-theme-slate .fl-tabs-enhanced li{background:transparent url(../images/themes/slate/tabs-light-cap.png) no-repeat left top;padding:4px 0 6px 16px;*padding-top:0;}
+.fl-theme-slate .fl-tabs-enhanced li a{background:transparent url(../images/themes/slate/tabs-light-bg.png) no-repeat right top;border:none;margin:0;padding:4px 16px 6px 0;color:#666!important;*padding-bottom:4px;}
+.fl-theme-slate .fl-tabs-enhanced li.fl-tabs-active{background:transparent url(../images/themes/slate/tabs-light-active-cap.png) no-repeat scroll left top;}
+.fl-theme-slate .fl-tabs-enhanced li.fl-tabs-active a{background:transparent url(../images/themes/slate/tabs-light-active-bg.png) no-repeat scroll right top;color:#000!important;}
+.fl-theme-slate .fl-widget-content .fl-tabs-enhanced{background:url(../images/themes/slate/tabs-med-container-bg.png) repeat-x left bottom;border-bottom:none;margin:10px 1px 0;padding:5px 0 6px;*padding:0;}
+.fl-theme-slate .fl-widget-content .fl-tabs-enhanced li{background:transparent url(../images/themes/slate/tabs-med-cap.png) no-repeat left top;padding:4px 0 6px 16px;*padding-top:0;}
+.fl-theme-slate .fl-widget-content .fl-tabs-enhanced li a{background:transparent url(../images/themes/slate/tabs-med-bg.png) no-repeat right top;border:none;margin:0;padding:4px 16px 6px 0;color:#666!important;*padding-bottom:4px;}
+.fl-theme-slate .fl-widget-content .fl-tabs-enhanced li.fl-tabs-active{background:transparent url(../images/themes/slate/tabs-med-active-cap.png) no-repeat scroll left top;}
+.fl-theme-slate .fl-widget-content .fl-tabs-enhanced li.fl-tabs-active a{background:transparent url(../images/themes/slate/tabs-med-active-bg.png) no-repeat scroll right top;color:#000!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/fss/images/exclamation.png b/docs/include/jscripts/infusion/framework/fss/images/exclamation.png
new file mode 100644 (file)
index 0000000..056f680
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/exclamation.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/gripper.png b/docs/include/jscripts/infusion/framework/fss/images/gripper.png
new file mode 100644 (file)
index 0000000..5e7cc70
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/gripper.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/_common/exclamation.png b/docs/include/jscripts/infusion/framework/fss/images/themes/_common/exclamation.png
new file mode 100644 (file)
index 0000000..056f680
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/_common/exclamation.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/_common/gloss_25_repeater.png b/docs/include/jscripts/infusion/framework/fss/images/themes/_common/gloss_25_repeater.png
new file mode 100644 (file)
index 0000000..5e7c7a7
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/_common/gloss_25_repeater.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/_common/gripper.png b/docs/include/jscripts/infusion/framework/fss/images/themes/_common/gripper.png
new file mode 100644 (file)
index 0000000..5e7cc70
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/_common/gripper.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-light-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-light-bg.png
new file mode 100644 (file)
index 0000000..606c730
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-light-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-light-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-light-cap.png
new file mode 100644 (file)
index 0000000..4b43a2e
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-light-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-med-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-med-bg.png
new file mode 100644 (file)
index 0000000..08adba5
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-med-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-med-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-med-cap.png
new file mode 100644 (file)
index 0000000..d5b284b
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-med-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-titlebar-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-titlebar-bg.png
new file mode 100644 (file)
index 0000000..4979328
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-titlebar-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-titlebar-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-titlebar-cap.png
new file mode 100644 (file)
index 0000000..20acddc
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/buttons-titlebar-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/coal-icons.psd b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/coal-icons.psd
new file mode 100644 (file)
index 0000000..795b414
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/coal-icons.psd differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-menu-Delete.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-menu-Delete.png
new file mode 100644 (file)
index 0000000..85e3070
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-menu-Delete.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-Close.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-Close.png
new file mode 100644 (file)
index 0000000..1d8bab3
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-Close.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-Less.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-Less.png
new file mode 100644 (file)
index 0000000..395067b
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-Less.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-More.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-More.png
new file mode 100644 (file)
index 0000000..6ed2263
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-More.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-ShowSettings.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-ShowSettings.png
new file mode 100644 (file)
index 0000000..7f43e1d
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-ShowSettings.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-gripper.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-gripper.png
new file mode 100644 (file)
index 0000000..ce26271
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/icon-widget-gripper.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-active-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-active-bg.png
new file mode 100644 (file)
index 0000000..636b637
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-active-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-active-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-active-cap.png
new file mode 100644 (file)
index 0000000..3099399
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-active-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-bg.png
new file mode 100644 (file)
index 0000000..70c3025
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-cap.png
new file mode 100644 (file)
index 0000000..55b6167
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-container-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-container-bg.png
new file mode 100644 (file)
index 0000000..1fe4dd0
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-container-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-content-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-content-bg.png
new file mode 100644 (file)
index 0000000..6feba9c
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-light-content-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-active-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-active-bg.png
new file mode 100644 (file)
index 0000000..742fe13
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-active-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-active-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-active-cap.png
new file mode 100644 (file)
index 0000000..4df34a5
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-active-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-bg.png
new file mode 100644 (file)
index 0000000..9dfff09
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-cap.png
new file mode 100644 (file)
index 0000000..2d22070
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-container-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-container-bg.png
new file mode 100644 (file)
index 0000000..112a5b7
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-container-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-content-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-content-bg.png
new file mode 100644 (file)
index 0000000..6feba9c
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/tabs-med-content-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/coal/widget-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/widget-bg.png
new file mode 100644 (file)
index 0000000..4579055
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/coal/widget-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-light-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-light-bg.png
new file mode 100644 (file)
index 0000000..e617b68
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-light-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-light-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-light-cap.png
new file mode 100644 (file)
index 0000000..42e7286
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-light-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-med-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-med-bg.png
new file mode 100644 (file)
index 0000000..6704779
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-med-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-med-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-med-cap.png
new file mode 100644 (file)
index 0000000..8313382
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-med-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-titlebar-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-titlebar-bg.png
new file mode 100644 (file)
index 0000000..50cd421
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-titlebar-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-titlebar-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-titlebar-cap.png
new file mode 100644 (file)
index 0000000..8730c71
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/buttons-titlebar-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-menu-Delete.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-menu-Delete.png
new file mode 100644 (file)
index 0000000..85e3070
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-menu-Delete.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-options-ListOrGrid.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-options-ListOrGrid.png
new file mode 100644 (file)
index 0000000..b39267f
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-options-ListOrGrid.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-Close.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-Close.png
new file mode 100644 (file)
index 0000000..347e288
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-Close.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-Less.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-Less.png
new file mode 100644 (file)
index 0000000..fdd1a3d
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-Less.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-More.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-More.png
new file mode 100644 (file)
index 0000000..164ee2b
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-More.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-ShowSettings.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-ShowSettings.png
new file mode 100644 (file)
index 0000000..7f43e1d
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-ShowSettings.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-gripper.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-gripper.png
new file mode 100644 (file)
index 0000000..c0b6b97
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/icon-widget-gripper.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/mist-icons.psd b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/mist-icons.psd
new file mode 100644 (file)
index 0000000..8c8472e
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/mist-icons.psd differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-active-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-active-bg.png
new file mode 100644 (file)
index 0000000..96036b2
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-active-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-active-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-active-cap.png
new file mode 100644 (file)
index 0000000..29adc21
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-active-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-bg.png
new file mode 100644 (file)
index 0000000..ca91cc1
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-cap.png
new file mode 100644 (file)
index 0000000..6bbcd54
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-container-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-container-bg.png
new file mode 100644 (file)
index 0000000..eda424e
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-light-container-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-active-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-active-bg.png
new file mode 100644 (file)
index 0000000..ab495c6
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-active-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-active-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-active-cap.png
new file mode 100644 (file)
index 0000000..218603a
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-active-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-bg.png
new file mode 100644 (file)
index 0000000..907e1ec
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-cap.png
new file mode 100644 (file)
index 0000000..15524c4
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-container-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-container-bg.png
new file mode 100644 (file)
index 0000000..888fb86
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/tabs-med-container-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/mist/widget-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/widget-bg.png
new file mode 100644 (file)
index 0000000..a7beb3d
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/mist/widget-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/rust/gripper.png b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/gripper.png
new file mode 100644 (file)
index 0000000..84d3710
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/gripper.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-menu-Delete.png b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-menu-Delete.png
new file mode 100644 (file)
index 0000000..b1ec1ca
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-menu-Delete.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-options-ListOrGrid.png b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-options-ListOrGrid.png
new file mode 100644 (file)
index 0000000..b39267f
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-options-ListOrGrid.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-widget-Close.png b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-widget-Close.png
new file mode 100644 (file)
index 0000000..9c12532
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-widget-Close.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-widget-More.png b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-widget-More.png
new file mode 100644 (file)
index 0000000..21d40de
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-widget-More.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-widget-Settings.png b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-widget-Settings.png
new file mode 100644 (file)
index 0000000..1dbedbb
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/icon-widget-Settings.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/rust/menu-hover.png b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/menu-hover.png
new file mode 100644 (file)
index 0000000..e398151
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/menu-hover.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/rust/widget-earmark.png b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/widget-earmark.png
new file mode 100644 (file)
index 0000000..3f2b612
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/rust/widget-earmark.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-light-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-light-bg.png
new file mode 100644 (file)
index 0000000..7a49729
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-light-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-light-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-light-cap.png
new file mode 100644 (file)
index 0000000..1b61357
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-light-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-med-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-med-bg.png
new file mode 100644 (file)
index 0000000..011549f
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-med-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-med-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-med-cap.png
new file mode 100644 (file)
index 0000000..af12703
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-med-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-titlebar-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-titlebar-bg.png
new file mode 100644 (file)
index 0000000..299b57e
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-titlebar-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-titlebar-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-titlebar-cap.png
new file mode 100644 (file)
index 0000000..f17f7f6
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/buttons-titlebar-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-Close.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-Close.png
new file mode 100644 (file)
index 0000000..df8ba52
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-Close.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-Less.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-Less.png
new file mode 100644 (file)
index 0000000..afb4355
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-Less.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-More.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-More.png
new file mode 100644 (file)
index 0000000..7eaf519
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-More.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-gripper.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-gripper.png
new file mode 100644 (file)
index 0000000..d944f44
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/icon-widget-gripper.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/slate-icons.psd b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/slate-icons.psd
new file mode 100644 (file)
index 0000000..874d755
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/slate-icons.psd differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/sprites.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/sprites.png
new file mode 100644 (file)
index 0000000..45b5a94
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/sprites.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-active-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-active-bg.png
new file mode 100644 (file)
index 0000000..e1a3e64
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-active-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-active-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-active-cap.png
new file mode 100644 (file)
index 0000000..a150b58
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-active-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-bg.png
new file mode 100644 (file)
index 0000000..132027f
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-cap.png
new file mode 100644 (file)
index 0000000..ee50821
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-container-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-container-bg.png
new file mode 100644 (file)
index 0000000..2ad596e
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-light-container-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-active-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-active-bg.png
new file mode 100644 (file)
index 0000000..0d87fcc
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-active-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-active-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-active-cap.png
new file mode 100644 (file)
index 0000000..c49b497
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-active-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-bg.png
new file mode 100644 (file)
index 0000000..1d35340
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-cap.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-cap.png
new file mode 100644 (file)
index 0000000..27bb1d4
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-cap.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-container-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-container-bg.png
new file mode 100644 (file)
index 0000000..a64706d
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/tabs-med-container-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/widget-bg.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/widget-bg.png
new file mode 100644 (file)
index 0000000..1f60b14
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/widget-bg.png differ
diff --git a/docs/include/jscripts/infusion/framework/fss/images/themes/slate/widget-earmark.png b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/widget-earmark.png
new file mode 100644 (file)
index 0000000..f286c20
Binary files /dev/null and b/docs/include/jscripts/infusion/framework/fss/images/themes/slate/widget-earmark.png differ
diff --git a/docs/include/jscripts/infusion/framework/renderer/js/fluidParser.js b/docs/include/jscripts/infusion/framework/renderer/js/fluidParser.js
new file mode 100644 (file)
index 0000000..df85d4c
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var t;var parser;var tagstack;var lumpindex=0;var nestingdepth=0;var justended=false;var defstart=-1;var defend=-1;var baseURL;var debugMode=false;var cutpoints=[];var cutstatus=[];function init(baseURLin,debugModeIn,cutpointsIn){t.rootlump=fluid.XMLLump(0,-1);tagstack=[t.rootlump];lumpindex=0;nestingdepth=0;justended=false;defstart=-1;defend=-1;baseURL=baseURLin;debugMode=debugModeIn;cutpoints=cutpointsIn;if(cutpoints){for(var i=0;i<cutpoints.length;++i){cutstatus[i]=[];cutpoints[i].tree=fluid.parseSelector(cutpoints[i].selector)}}}function findTopContainer(){for(var i=tagstack.length-1;i>=0;--i){var lump=tagstack[i];if(lump.rsfID!==undefined){return lump}}return t.rootlump}function newLump(){var togo=fluid.XMLLump(lumpindex,nestingdepth);if(debugMode){togo.line=parser.getLineNumber();togo.column=parser.getColumnNumber()}t.lumps[lumpindex]=togo;++lumpindex;return togo}function addLump(mmap,ID,lump){var list=mmap[ID];if(!list){list=[];mmap[ID]=list}list[list.length]=lump}function checkContribute(ID,lump){if(ID.indexOf("scr=contribute-")!==-1){var scr=ID.substring("scr=contribute-".length);addLump(t.collectmap,scr,lump)}}var parseUri=function(source){var o=parseUri.options,value=o.parser[o.strictMode?"strict":"loose"].exec(source);for(var i=0,uri={};i<14;i++){uri[o.key[i]]=value[i]||""}uri[o.q.name]={};uri[o.key[12]].replace(o.q.parser,function($0,$1,$2){if($1){uri[o.q.name][$1]=$2}});return uri};parseUri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function rewriteUrl(url){var po=parseUri(url);if(po.protocol||url.charAt(0)==="/"){return url}else{return baseURL+url}}fluid.debugLump=function(lump){var togo=lump.text;togo+=" at ";togo+="lump line "+lump.line+" column "+lump.column+" index "+lump.lumpindex;togo+=parent.href===null?"":" in file "+parent.href;return togo};function debugLump(lump){return"<"+lump.tagname+">"}function hasCssClass(clazz,totest){if(!totest){return false}return(" "+totest+" ").indexOf(" "+clazz+" ")!==-1}function matchNode(term,headlump){if(term.predList){for(var i=0;i<term.predList.length;++i){var pred=term.predList[i];if(pred.id&&headlump.attributemap.id!==pred.id){return false}if(pred.clazz&&!hasCssClass(pred.clazz,headlump.attributemap["class"])){return false}if(pred.tag&&headlump.tagname!==pred.tag){return false}}return true}}function tagStartCut(headlump){var togo=undefined;if(cutpoints){for(var i=0;i<cutpoints.length;++i){var cut=cutpoints[i];var cutstat=cutstatus[i];var nextterm=cutstat.length;if(nextterm<cut.tree.length){var term=cut.tree[nextterm];if(nextterm>0){if(cut.tree[nextterm-1].child&&cutstat[nextterm-1]!==headlump.nestingdepth-1){continue}}var isMatch=matchNode(term,headlump);if(isMatch){cutstat[cutstat.length]=headlump.nestingdepth;if(cutstat.length===cut.tree.length){if(togo!==undefined){fluid.fail("Cutpoint specification error - node "+debugLump(headlump)+" has already matched with rsf:id of "+togo)}if(cut.id===undefined||cut.id===null){fluid.fail("Error in cutpoints list - entry at position "+i+" does not have an id set")}togo=cut.id}}}}}return togo}function tagEndCut(){if(cutpoints){for(var i=0;i<cutpoints.length;++i){var cutstat=cutstatus[i];if(cutstat.length>0&&cutstat[cutstat.length-1]===nestingdepth){cutstat.length--}}}}function processTagStart(isempty,text){++nestingdepth;if(justended){justended=false;var backlump=newLump();backlump.nestingdepth--}if(t.firstdocumentindex===-1){t.firstdocumentindex=lumpindex}var headlump=newLump();var stacktop=tagstack[tagstack.length-1];headlump.uplump=stacktop;var tagname=parser.getName();headlump.tagname=tagname;var attrs=headlump.attributemap=parser.m_attributes;var ID=attrs[fluid.ID_ATTRIBUTE];if(ID===undefined){ID=tagStartCut(headlump)}for(var attrname in attrs){var attrval=attrs[attrname];if(/href|src|codebase|action/.test(attrname)){attrval=rewriteUrl(attrval);attrs[attrname]=attrval}else{if(ID===undefined&&/for|headers/.test(attrname)){ID=attrs[fluid.ID_ATTRIBUTE]="scr=null"}}}if(ID){if(ID.charCodeAt(0)===126){ID=ID.substring(1);headlump.elide=true}checkContribute(ID,headlump);headlump.rsfID=ID;var downreg=findTopContainer();if(!downreg.downmap){downreg.downmap={}}addLump(downreg.downmap,ID,headlump);addLump(t.globalmap,ID,headlump);var colpos=ID.indexOf(":");if(colpos!==-1){var prefix=ID.substring(0,colpos);if(!stacktop.finallump){stacktop.finallump={}}stacktop.finallump[prefix]=headlump}}headlump.text="<"+tagname+fluid.dumpAttributes(attrs)+">";tagstack[tagstack.length]=headlump;if(isempty){processTagEnd()}}function processTagEnd(){tagEndCut();var endlump=newLump();--nestingdepth;endlump.text="</"+parser.getName()+">";var oldtop=tagstack[tagstack.length-1];oldtop.close_tag=t.lumps[lumpindex-1];tagstack.length--;justended=true}function processDefaultTag(){if(defstart!==-1){if(t.firstdocumentindex===-1){t.firstdocumentindex=lumpindex}var text=parser.getContent().substr(defstart,defend-defstart);justended=false;var newlump=newLump();newlump.text=text;defstart=-1}}fluid.ID_ATTRIBUTE="rsf:id";fluid.getPrefix=function(id){var colpos=id.indexOf(":");return colpos===-1?id:id.substring(0,colpos)};fluid.SplitID=function(id){var that={};var colpos=id.indexOf(":");if(colpos===-1){that.prefix=id}else{that.prefix=id.substring(0,colpos);that.suffix=id.substring(colpos+1)}return that};fluid.XMLLump=function(lumpindex,nestingdepth){return{nestingdepth:nestingdepth,lumpindex:lumpindex,parent:t}};fluid.XMLViewTemplate=function(){return{globalmap:{},collectmap:{},lumps:[],firstdocumentindex:-1}};fluid.fetchResources=function(resourceSpecs,callback){var resourceCallback=function(thisSpec){return{success:function(response){thisSpec.resourceText=response;thisSpec.resourceKey=thisSpec.href;thisSpec.queued=false;fluid.fetchResources(resourceSpecs,callback)},error:function(response,textStatus,errorThrown){thisSpec.fetchError={status:response.status,textStatus:response.textStatus,errorThrown:errorThrown};thisSpec.queued=false;fluid.fetchResources(resourceSpecs,callback)}}};var complete=true;for(var key in resourceSpecs){var resourceSpec=resourceSpecs[key];if(resourceSpec.href&&!(resourceSpec.resourceKey||resourceSpec.fetchError)){if(!resourceSpec.queued){var thisCallback=resourceCallback(resourceSpec);var options={url:resourceSpec.href,success:thisCallback.success,error:thisCallback.error};$.extend(true,options,resourceSpec.options);resourceSpec.queued=true;$.ajax(options)}if(resourceSpec.queued){complete=false}}else{if(resourceSpec.nodeId&&!resourceSpec.resourceText){var node=document.getElementById(resourceSpec.nodeId);resourceSpec.resourceText=fluid.dom.getElementText(node);resourceSpec.resourceKey=resourceSpec.nodeId}}}if(complete){if($.browser.mozilla){setTimeout(function(){callback(resourceSpecs)},1)}else{callback(resourceSpecs)}}};fluid.XMLEncode=function(text){return text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};fluid.dumpAttributes=function(attrcopy){var togo="";for(var attrname in attrcopy){var attrvalue=attrcopy[attrname];if(attrvalue!==null&&attrvalue!==undefined){togo+=" "+attrname+'="'+attrvalue+'"'}}return togo};fluid.aggregateMMap=function(target,source){for(var key in source){var targhas=target[key];if(!targhas){target[key]=[]}target[key]=target[key].concat(source[key])}};var unUnicode=/(\\u[\dabcdef]{4}|\\x[\dabcdef]{2})/g;fluid.unescapeProperties=function(string){string=string.replace(unUnicode,function(match){var code=match.substring(2);var parsed=parseInt(code,16);return String.fromCharCode(parsed)});var pos=0;while(true){var backpos=string.indexOf("\\",pos);if(backpos===-1){break}if(backpos===string.length-1){return[string.substring(0,string.length-1),true]}var replace=string.charAt(backpos+1);if(replace==="n"){replace="\n"}if(replace==="r"){replace="\r"}if(replace==="t"){replace="\t"}string=string.substring(0,backpos)+replace+string.substring(backpos+2);pos=backpos+1}return[string,false]};var breakPos=/[^\\][\s:=]/;fluid.parseJavaProperties=function(text){var togo={};text=text.replace(/\r\n/g,"\n");text=text.replace(/\r/g,"\n");lines=text.split("\n");var contin,key,valueComp,valueRaw,valueEsc;for(var i=0;i<lines.length;++i){var line=$.trim(lines[i]);if(!line||line.charAt(0)==="#"||line.charAt(0)==="!"){continue}if(!contin){valueComp="";var breakpos=line.search(breakPos);if(breakpos===-1){key=line;valueRaw=""}else{key=$.trim(line.substring(0,breakpos+1));valueRaw=$.trim(line.substring(breakpos+2));if(valueRaw.charAt(0)===":"||valueRaw.charAt(0)==="="){valueRaw=$.trim(valueRaw.substring(1))}}key=fluid.unescapeProperties(key)[0];valueEsc=fluid.unescapeProperties(valueRaw)}else{valueEsc=fluid.unescapeProperties(line)}contin=valueEsc[1];if(!valueEsc[1]){togo[key]=valueComp+valueEsc[0]}else{valueComp+=valueEsc[0]}}return togo};fluid.parseTemplates=function(resourceSpec,templateList,opts){var togo=[];togo.globalmap={};for(var i=0;i<templateList.length;++i){var resource=resourceSpec[templateList[i]];var lastslash=resource.href.lastIndexOf("/");var baseURL=lastslash===-1?"":resource.href.substring(0,lastslash+1);var template=fluid.parseTemplate(resource.resourceText,baseURL,opts.scanStart&&i===0,resource.cutpoints,opts);if(i===0){fluid.aggregateMMap(togo.globalmap,template.globalmap)}template.href=resource.href;template.baseURL=baseURL;template.resourceKey=resource.resourceKey;togo[i]=template;fluid.aggregateMMap(togo.globalmap,template.rootlump.downmap)}return togo};fluid.parseTemplate=function(template,baseURL,scanStart,cutpoints_in,opts){t=fluid.XMLViewTemplate();opts=opts||{};init(baseURL,opts.debugMode,cutpoints_in);var idpos=template.indexOf(fluid.ID_ATTRIBUTE);if(scanStart){var brackpos=template.indexOf(">",idpos);parser=new XMLP(template.substring(brackpos+1))}else{parser=new XMLP(template)}parseloop:while(true){var iEvent=parser.next();switch(iEvent){case XMLP._ELM_B:processDefaultTag();processTagStart(false,"");break;case XMLP._ELM_E:processDefaultTag();processTagEnd();break;case XMLP._ELM_EMP:processDefaultTag();processTagStart(true,"");break;case XMLP._PI:case XMLP._DTD:defstart=-1;continue;case XMLP._TEXT:case XMLP._ENTITY:case XMLP._CDATA:case XMLP._COMMENT:if(defstart===-1){defstart=parser.m_cB}defend=parser.m_cE;break;case XMLP._ERROR:fluid.setLogging(true);var message="Error parsing template: "+parser.m_cAlt+" at line "+parser.getLineNumber();fluid.log(message);fluid.log("Just read: "+parser.m_xml.substring(parser.m_iP-30,parser.m_iP));fluid.log("Still to read: "+parser.m_xml.substring(parser.m_iP,parser.m_iP+30));fluid.fail(message);break parseloop;case XMLP._NONE:break parseloop}}return t};var chars="(?:[\\w\u0128-\uFFFF*_-]|\\\\.)";var quickChild=new RegExp("^>\\s*("+chars+"+)");var quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)");var selSeg=new RegExp("^s*([#.]?)("+chars+"*)");var quickClass=new RegExp("([#.]?)("+chars+"+)","g");var childSeg=new RegExp("\\s*(>)?\\s*","g");var whiteSpace=new RegExp("^\\w*$");fluid.parseSelector=function(selstring){var togo=[];selstring=$.trim(selstring);quickClass.lastIndex=0;var lastIndex=0;while(true){var atNode=[];while(true){var segMatch=quickClass.exec(selstring);if(!segMatch||segMatch.index!==lastIndex){break}var thisNode={};var text=segMatch[2];if(segMatch[1]===""){thisNode.tag=text}else{if(segMatch[1]==="#"){thisNode.id=text}else{if(segMatch[1]==="."){thisNode.clazz=text}}}atNode[atNode.length]=thisNode;lastIndex=quickClass.lastIndex}childSeg.lastIndex=lastIndex;var fullAtNode={predList:atNode};var childMatch=childSeg.exec(selstring);if(!childMatch||childMatch.index!==lastIndex){var remainder=selstring.substring(lastIndex);fluid.fail("Error in selector string - can not match child selector expression at "+remainder)}if(childMatch[1]===">"){fullAtNode.child=true}togo[togo.length]=fullAtNode;if(childSeg.lastIndex>=selstring.length){break}lastIndex=childSeg.lastIndex;quickClass.lastIndex=childSeg.lastIndex}return togo}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/framework/renderer/js/fluidRenderer.js b/docs/include/jscripts/infusion/framework/renderer/js/fluidRenderer.js
new file mode 100644 (file)
index 0000000..0536055
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){function debugPosition(component){return"as child of "+(component.parent.fullID?"component with full ID "+component.parent.fullID:"root")}function computeFullID(component){var togo="";var move=component;if(component.children===undefined){togo=component.ID+(component.localID!==undefined?component.localID:"");move=component.parent}while(move.parent){var parent=move.parent;if(move.fullID!==undefined){togo=move.fullID+togo;return togo}if(move.noID===undefined){var ID=move.ID;if(ID===undefined){fluid.fail("Error in component tree - component found with no ID "+debugPosition(parent)+": please check structure")}var colpos=ID.indexOf(":");var prefix=colpos===-1?ID:ID.substring(0,colpos);togo=prefix+":"+(move.localID===undefined?"":move.localID)+":"+togo}move=parent}return togo}function isBoundPrimitive(value){return fluid.isPrimitive(value)||value instanceof Array&&(value.length===0||typeof (value[0])==="string")}function processChild(value,key){if(isBoundPrimitive(value)){return{componentType:"UIBound",value:value,ID:key}}else{var unzip=unzipComponent(value);if(unzip.ID){return{ID:key,componentType:"UIContainer",children:[unzip]}}else{unzip.ID=key;return unzip}}}function fixChildren(children){if(!(children instanceof Array)){var togo=[];for(var key in children){var value=children[key];if(value instanceof Array){for(var i=0;i<value.length;++i){var processed=processChild(value[i],key);togo[togo.length]=processed}}else{togo[togo.length]=processChild(value,key)}}return togo}else{return children}}function fixupValue(uibound,model){if(uibound.value===undefined&&uibound.valuebinding!==undefined){if(!model){fluid.fail("Cannot perform value fixup for valuebinding "+uibound.valuebinding+" since no model was supplied to rendering")}uibound.value=fluid.model.getBeanValue(model,uibound.valuebinding)}}function upgradeBound(holder,property,model){if(holder[property]!==undefined){if(isBoundPrimitive(holder[property])){holder[property]={value:holder[property]}}}else{holder[property]={value:null}}fixupValue(holder[property],model)}var duckMap={children:"UIContainer",value:"UIBound",valuebinding:"UIBound",messagekey:"UIMessage",markup:"UIVerbatim",selection:"UISelect",target:"UILink",choiceindex:"UISelectChoice",functionname:"UIInitBlock"};function unzipComponent(component,model){if(component){for(var key in duckMap){if(component[key]!==undefined){component.componentType=duckMap[key];break}}if(component.componentType===undefined&&component.ID!==undefined){component.componentType="UIBound"}}if(!component||component.componentType===undefined){var decorators=component.decorators;if(decorators){delete component.decorators}component={componentType:"UIContainer",children:component};component.decorators=decorators}var cType=component.componentType;if(cType==="UIContainer"){component.children=fixChildren(component.children)}else{if(cType==="UISelect"){upgradeBound(component,"selection",model);upgradeBound(component,"optionlist",model);upgradeBound(component,"optionnames",model)}else{if(cType==="UILink"){upgradeBound(component,"target",model);upgradeBound(component,"linktext",model)}}}return component}function assignSubmittingName(component,defaultname){if(component.submittingname===undefined&&component.willinput!==false){component.submittingname=defaultname?defaultname:component.fullID}return component.submittingname}function fixupTree(tree,model){if(tree.componentType===undefined){tree=unzipComponent(tree,model)}if(tree.componentType!=="UIContainer"&&!tree.parent){tree={children:[tree]}}if(tree.children){tree.childmap={};for(var i=0;i<tree.children.length;++i){var child=tree.children[i];if(child.componentType===undefined){child=unzipComponent(child,model);tree.children[i]=child}child.parent=tree;if(child.ID===undefined){fluid.fail("Error in component tree: component found with no ID "+debugPosition(child))}tree.childmap[child.ID]=child;var colpos=child.ID.indexOf(":");if(colpos===-1){}else{var prefix=child.ID.substring(0,colpos);var childlist=tree.childmap[prefix];if(!childlist){childlist=[];tree.childmap[prefix]=childlist}if(child.localID===undefined&&childlist.length!==0){child.localID=childlist.length}childlist[childlist.length]=child}child.fullID=computeFullID(child);var componentType=child.componentType;if(componentType=="UISelect"){child.selection.fullID=child.fullID+"-selection"}else{if(componentType=="UIInitBlock"){var call=child.functionname+"(";for(var j=0;j<child.arguments.length;++j){if(child.arguments[j] instanceof fluid.ComponentReference){child.arguments[j]=child.parent.fullID+child.arguments[j].reference}call+='"'+child.arguments[j]+'"';if(j<child.arguments.length-1){call+=", "}}child.markup=call+")\n";child.componentType="UIVerbatim"}else{if(componentType=="UIBound"){fixupValue(child,model)}}}fixupTree(child,model)}}return tree}var globalmap={};var branchmap={};var rewritemap={};var seenset={};var collected={};var out="";var debugMode=false;var directFossils={};var renderOptions={};var decoratorQueue=[];var renderedbindings={};function getRewriteKey(template,parent,id){return template.resourceKey+parent.fullID+id}function resolveInScope(searchID,defprefix,scope,child){var deflump;var scopelook=scope?scope[searchID]:null;if(scopelook){for(var i=0;i<scopelook.length;++i){var scopelump=scopelook[i];if(!deflump&&scopelump.rsfID==defprefix){deflump=scopelump}if(scopelump.rsfID==searchID){return scopelump}}}return deflump}function resolveCall(sourcescope,child){var searchID=child.jointID?child.jointID:child.ID;var split=fluid.SplitID(searchID);var defprefix=split.prefix+":";var match=resolveInScope(searchID,defprefix,sourcescope.downmap,child);if(match){return match}if(child.children){match=resolveInScope(searchID,defprefix,globalmap,child);if(match){return match}}return null}function noteCollected(template){if(!seenset[template.href]){fluid.aggregateMMap(collected,template.collectmap);seenset[template.href]=true}}function resolveRecurse(basecontainer,parentlump){for(var i=0;i<basecontainer.children.length;++i){var branch=basecontainer.children[i];if(branch.children){var resolved=resolveCall(parentlump,branch);if(resolved){branchmap[branch.fullID]=resolved;var id=resolved.attributemap.id;if(id!==undefined){rewritemap[getRewriteKey(parentlump.parent,basecontainer,id)]=branch.fullID}noteCollected(resolved.parent);resolveRecurse(branch,resolved)}}}if(parentlump.downmap){for(var id in parentlump.downmap){var lumps=parentlump.downmap[id];for(var i=0;i<lumps.length;++i){var lump=lumps[i];var lumpid=lump.attributemap.id;if(lumpid!==undefined&&lump.rsfID!==undefined){var resolved=fetchComponent(basecontainer,lump.rsfID);if(resolved!==null){var resolveID=resolved.fullID;if(resolved.componentType==="UISelect"){resolveID=resolveID+"-selection"}rewritemap[getRewriteKey(parentlump.parent,basecontainer,lumpid)]=resolveID}}}}}}function resolveBranches(globalmapp,basecontainer,parentlump){branchmap={};rewritemap={};seenset={};collected={};globalmap=globalmapp;branchmap[basecontainer.fullID]=parentlump;resolveRecurse(basecontainer,parentlump)}function dumpBranchHead(branch,targetlump){if(targetlump.elide){return }var attrcopy={};$.extend(true,attrcopy,targetlump.attributemap);adjustForID(attrcopy,branch);outDecorators(branch,attrcopy);out+="<"+targetlump.tagname+" ";out+=fluid.dumpAttributes(attrcopy);out+=">"}function dumpTillLump(lumps,start,limit){for(;start<limit;++start){var text=lumps[start].text;if(text){out+=lumps[start].text}}}function dumpScan(lumps,renderindex,basedepth,closeparent,insideleaf){var start=renderindex;while(true){if(renderindex===lumps.length){break}var lump=lumps[renderindex];if(lump.nestingdepth<basedepth){break}if(lump.rsfID!==undefined){if(!insideleaf){break}if(insideleaf&&lump.nestingdepth>basedepth+(closeparent?0:1)){fluid.log("Error in component tree - leaf component found to contain further components - at "+lump.toString())}else{break}}++renderindex}if(!closeparent&&(renderindex==lumps.length||!lumps[renderindex].rsfID)){--renderindex}dumpTillLump(lumps,start,renderindex);return renderindex}var trc={};function openTag(){if(!trc.iselide){out+="<"+trc.uselump.tagname}}function closeTag(){if(!trc.iselide){out+="</"+trc.uselump.tagname+">"}}function renderUnchanged(){dumpTillLump(trc.uselump.parent.lumps,trc.uselump.lumpindex+1,trc.close.lumpindex+(trc.iselide?0:1))}function replaceAttributes(){if(!trc.iselide){out+=fluid.dumpAttributes(trc.attrcopy)}dumpTemplateBody()}function replaceAttributesOpen(){if(trc.iselide){replaceAttributes()}else{out+=fluid.dumpAttributes(trc.attrcopy);out+=">";trc.nextpos=trc.endopen.lumpindex}}function dumpTemplateBody(){if(trc.endopen.lumpindex===trc.close.lumpindex){if(!trc.iselide){out+="/>"}}else{if(!trc.iselide){out+=">"}dumpTillLump(trc.uselump.parent.lumps,trc.endopen.lumpindex,trc.close.lumpindex+(trc.iselide?0:1))}}function rewriteLeaf(value){if(isValue(value)){replaceBody(value)}else{replaceAttributes()}}function rewriteLeafOpen(value){if(trc.iselide){rewriteLeaf(trc.value)}else{if(isValue(value)){replaceBody(value)}else{replaceAttributesOpen()}}}function replaceBody(value){out+=fluid.dumpAttributes(trc.attrcopy);if(!trc.iselide){out+=">"}out+=fluid.XMLEncode(value.toString());closeTag()}function isValue(value){return value!==null&&value!==undefined&&!isPlaceholder(value)}function isPlaceholder(value){return false}function rewriteURL(template,URL){return URL}function dumpHiddenField(todump){out+='<input type="hidden" ';var isvirtual=todump.virtual;var outattrs={};outattrs[isvirtual?"id":"name"]=todump.name;outattrs.value=todump.value;out+=fluid.dumpAttributes(outattrs);out+=" />\n"}function applyAutoBind(torender,finalID){var tagname=trc.uselump.tagname;var applier=renderOptions.applier;function applyFunc(){fluid.applyChange(fluid.byId(finalID),undefined,applier)}if(renderOptions.autoBind&&/input|select|textarea/.test(tagname)&&!renderedbindings[finalID]){var decorators=[{jQuery:["change",applyFunc]}];if($.browser.msie&&tagname==="input"&&/radio|checkbox/.test(trc.attrcopy.type)){decorators.push({jQuery:["click",applyFunc]})}outDecoratorsImpl(torender,decorators,trc.attrcopy,finalID)}}function dumpBoundFields(torender,parent){if(torender){var holder=parent?parent:torender;if(directFossils&&holder.submittingname&&holder.valuebinding){directFossils[holder.submittingname]={name:holder.submittingname,EL:holder.valuebinding,oldvalue:holder.value};applyAutoBind(torender,torender.fullID)}if(torender.fossilizedbinding){dumpHiddenField(torender.fossilizedbinding)}if(torender.fossilizedshaper){dumpHiddenField(torender.fossilizedshaper)}}}function dumpSelectionBindings(uiselect){if(!renderedbindings[uiselect.selection.fullID]){renderedbindings[uiselect.selection.fullID]=true;dumpBoundFields(uiselect.selection);dumpBoundFields(uiselect.optionlist);dumpBoundFields(uiselect.optionnames)}}fluid.NULL_STRING="\u25a9null\u25a9";var LINK_ATTRIBUTES={a:"href",link:"href",img:"src",frame:"src",script:"src",style:"src",input:"src",embed:"src",form:"action",applet:"codebase",object:"codebase"};function isSelectedValue(torender,value){var selection=torender.selection;return selection.value&&typeof (selection.value)!=="string"&&typeof (selection.value.length)==="number"?$.inArray(value,selection.value,value)!==-1:selection.value===value}function getRelativeComponent(component,relativeID){component=component.parent;if(relativeID.indexOf("..::")===0){relativeID=relativeID.substring(4);component=component.parent}return component.childmap[relativeID]}function explodeDecorators(decorators){var togo=[];if(decorators.type){togo[0]=decorators}else{for(var key in decorators){if(key==="$"){key="jQuery"}var value=decorators[key];var decorator={type:key};if(key==="jQuery"){decorator.func=value[0];decorator.args=value.slice(1)}else{if(key==="addClass"||key==="removeClass"){decorator.classes=value}else{if(key==="attrs"){decorator.attributes=value}else{if(key==="identify"){decorator.key=value}}}}togo[togo.length]=decorator}}return togo}function outDecoratorsImpl(torender,decorators,attrcopy,finalID){renderOptions.idMap=renderOptions.idMap||{};for(var i=0;i<decorators.length;++i){var decorator=decorators[i];var type=decorator.type;if(!type){var explodedDecorators=explodeDecorators(decorator);outDecoratorsImpl(torender,explodedDecorators,attrcopy,finalID);continue}if(type==="$"){type=decorator.type="jQuery"}if(type==="jQuery"||type==="event"||type==="fluid"){var id=adjustForID(attrcopy,torender,true,finalID);decorator.id=id;decoratorQueue[decoratorQueue.length]=decorator}else{if(type==="attrs"){$.extend(true,attrcopy,decorator.attributes)}else{if(type==="addClass"||type==="removeClass"){var fakeNode={nodeType:1,className:attrcopy["class"]||""};$(fakeNode)[type](decorator.classes);attrcopy["class"]=fakeNode.className}else{if(type==="identify"){var id=adjustForID(attrcopy,torender,true,finalID);renderOptions.idMap[decorator.key]=id}}}}}}function outDecorators(torender,attrcopy){if(!torender.decorators){return }if(torender.decorators.length===undefined){torender.decorators=explodeDecorators(torender.decorators)}outDecoratorsImpl(torender,torender.decorators,attrcopy)}function renderComponent(torender){var attrcopy=trc.attrcopy;var lumps=trc.uselump.parent.lumps;var lumpindex=trc.uselump.lumpindex;var componentType=torender.componentType;var tagname=trc.uselump.tagname;outDecorators(torender,attrcopy);if(componentType==="UIMessage"){componentType="UIBound";if(!renderOptions.messageLocator){torender.value="[No messageLocator is configured in options - please consult documentation on options.messageSource]"}else{torender.value=renderOptions.messageLocator(torender.messagekey,torender.args)}}function makeFail(torender,end){fluid.fail("Error in component tree - UISelectChoice with id "+torender.fullID+end)}if(componentType==="UIBound"||componentType==="UISelectChoice"){var parent;if(torender.choiceindex!==undefined){if(torender.parentFullID){parent=getAbsoluteComponent(view,torender.parentFullID);if(!parent){makeFail(torender," has parentFullID of "+torender.parentFullID+" which cannot be resolved")}}else{if(torender.parentRelativeID!==undefined){parent=getRelativeComponent(torender,torender.parentRelativeID);if(!parent){makeFail(torender," has parentRelativeID of "+torender.parentRelativeID+" which cannot be resolved")}}else{makeFail(torender," does not have either parentFullID or parentRelativeID set")}}assignSubmittingName(parent.selection);dumpSelectionBindings(parent)}var submittingname=parent?parent.selection.submittingname:torender.submittingname;if(tagname==="input"||tagname==="textarea"){if(!parent){submittingname=assignSubmittingName(torender)}if(submittingname!==undefined){attrcopy.name=submittingname}}dumpBoundFields(torender,parent?parent.selection:null);if(typeof (torender.value)==="boolean"||attrcopy.type==="radio"||attrcopy.type==="checkbox"){var underlyingValue;var directValue=torender.value;if(torender.choiceindex!==undefined){if(!parent.optionlist.value){fluid.fail("Error in component tree - selection control with full ID "+parent.fullID+" has no values")}underlyingValue=parent.optionlist.value[torender.choiceindex];directValue=isSelectedValue(parent,underlyingValue)}if(isValue(directValue)){if(directValue){attrcopy.checked="checked"}else{delete attrcopy.checked}}attrcopy.value=underlyingValue?underlyingValue:"true";rewriteLeaf(null)}else{if(torender.value instanceof Array){renderUnchanged()}else{var value=parent?parent[tagname==="textarea"||tagname==="input"?"optionlist":"optionnames"].value[torender.choiceindex]:torender.value;if(tagname==="textarea"){if(isPlaceholder(value)&&torender.willinput){value=""}rewriteLeaf(value)}else{if(tagname==="input"){if(torender.willinput||isValue(value)){attrcopy.value=value}rewriteLeaf(null)}else{delete attrcopy.name;rewriteLeafOpen(value)}}}}}else{if(componentType==="UISelect"){applyAutoBind(torender,torender.selection.fullID);var ishtmlselect=tagname==="select";var ismultiple=false;if(torender.selection.value instanceof Array){ismultiple=true;if(ishtmlselect){attrcopy.multiple="multiple"}}assignSubmittingName(torender.selection,attrcopy.id);if(ishtmlselect){if(torender.selection.willinput!==false){attrcopy.name=torender.selection.submittingname}}out+=fluid.dumpAttributes(attrcopy);if(ishtmlselect){out+=">";var values=torender.optionlist.value;var names=torender.optionnames===null||torender.optionnames===undefined||!torender.optionnames.value?values:torender.optionnames.value;if(!names||!names.length){fluid.fail("Error in component tree - UISelect component with fullID "+torender.fullID+" does not have optionnames set")}for(var i=0;i<names.length;++i){out+='<option value="';var value=values[i];if(value===null){value=fluid.NULL_STRING}out+=fluid.XMLEncode(value);if(isSelectedValue(torender,value)){out+='" selected="selected'}out+='">';out+=fluid.XMLEncode(names[i]);out+="</option>\n"}closeTag()}else{dumpTemplateBody()}dumpSelectionBindings(torender)}else{if(componentType==="UILink"){var attrname=LINK_ATTRIBUTES[tagname];if(attrname){var target=torender.target.value;if(!isValue(target)){target=attrcopy[attname]}else{target=rewriteURL(trc.uselump.parent,target)}attrcopy[attrname]=target}var value=torender.linktext.value;if(!isValue(value)){replaceAttributesOpen()}else{rewriteLeaf(value)}}else{if(torender.markup!==undefined){var rendered=torender.markup;if(rendered===null){out+=fluid.dumpAttributes(attrcopy);out+=">";renderUnchanged()}else{if(!trc.iselide){out+=fluid.dumpAttributes(attrcopy);out+=">"}out+=rendered;closeTag()}}else{}}}}}function adjustForID(attrcopy,component,late,forceID){if(!late){delete attrcopy["rsf:id"]}if(forceID!==undefined){attrcopy.id=forceID}else{if(attrcopy.id||late){attrcopy.id=component.fullID}}var count=1;var baseid=attrcopy.id;while(renderOptions.document.getElementById(attrcopy.id)){attrcopy.id=baseid+"-"+(count++)}return attrcopy.id}function rewriteIDRelation(context){var attrname;var attrval=trc.attrcopy["for"];if(attrval!==undefined){attrname="for"}else{attrval=trc.attrcopy.headers;if(attrval!==undefined){attrname="headers"}}if(!attrname){return }var tagname=trc.uselump.tagname;if(attrname==="for"&&tagname!=="label"){return }if(attrname==="headers"&&tagname!=="td"&&tagname!=="th"){return }var rewritten=rewritemap[getRewriteKey(trc.uselump.parent,context,attrval)];if(rewritten!==undefined){trc.attrcopy[attrname]=rewritten}}function renderComment(message){out+=("<!-- "+fluid.XMLEncode(message)+"-->")}function renderDebugMessage(message){out+='<span style="background-color:#FF466B;color:white;padding:1px;">';out+=message;out+="</span><br/>"}function reportPath(branch){var path=branch.fullID;return !path?"component tree root":"full path "+path}function renderComponentSystem(context,torendero,lump){var lumpindex=lump.lumpindex;var lumps=lump.parent.lumps;var nextpos=-1;var outerendopen=lumps[lumpindex+1];var outerclose=lump.close_tag;nextpos=outerclose.lumpindex+1;var payloadlist=lump.downmap?lump.downmap["payload-component"]:null;var payload=payloadlist?payloadlist[0]:null;var iselide=lump.rsfID.charCodeAt(0)===126;var endopen=outerendopen;var close=outerclose;var uselump=lump;var attrcopy={};$.extend(true,attrcopy,(payload===null?lump:payload).attributemap);trc.attrcopy=attrcopy;trc.uselump=uselump;trc.endopen=endopen;trc.close=close;trc.nextpos=nextpos;trc.iselide=iselide;rewriteIDRelation(context);if(torendero===null){if(lump.rsfID.indexOf("scr=")===(iselide?1:0)){var scrname=lump.rsfID.substring(4+(iselide?1:0));if(scrname==="ignore"){nextpos=trc.close.lumpindex+1}else{openTag();replaceAttributesOpen();nextpos=trc.endopen.lumpindex}}}else{if(payload){trc.endopen=lumps[payload.lumpindex+1];trc.close=payload.close_tag;trc.uselump=payload;dumpTillLump(lumps,lumpindex,payload.lumpindex);lumpindex=payload.lumpindex}adjustForID(attrcopy,torendero);openTag();renderComponent(torendero);if(payload!==null){if(trc.nextpos===nextpos){dumpTillLump(lumps,trc.close.lumpindex+1,outerclose.lumpindex+1)}}nextpos=trc.nextpos}return nextpos}function renderContainer(child,targetlump){var t2=targetlump.parent;var firstchild=t2.lumps[targetlump.lumpindex+1];if(child.children!==undefined){dumpBranchHead(child,targetlump)}else{renderComponentSystem(child.parent,child,targetlump)}renderRecurse(child,targetlump,firstchild)}function fetchComponent(basecontainer,id,lump){if(id.indexOf("msg=")===0){var key=id.substring(4);return{componentType:"UIMessage",messagekey:key}}while(basecontainer){var togo=basecontainer.childmap[id];if(togo){return togo}basecontainer=basecontainer.parent}return null}function fetchComponents(basecontainer,id){var togo;while(basecontainer){togo=basecontainer.childmap[id];if(togo){break}basecontainer=basecontainer.parent}return togo}function findChild(sourcescope,child){var split=fluid.SplitID(child.ID);var headlumps=sourcescope.downmap[child.ID];if(headlumps===null){headlumps=sourcescope.downmap[split.prefix+":"]}return headlumps===null?null:headlumps[0]}function renderRecurse(basecontainer,parentlump,baselump){var renderindex=baselump.lumpindex;var basedepth=parentlump.nestingdepth;var t1=parentlump.parent;if(debugMode){var rendered={}}while(true){renderindex=dumpScan(t1.lumps,renderindex,basedepth,!parentlump.elide,false);if(renderindex===t1.lumps.length){break}var lump=t1.lumps[renderindex];var id=lump.rsfID;if(lump.nestingdepth<basedepth||id===undefined){break}if(id.charCodeAt(0)===126){id=id.substring(1)}if(id.indexOf(":")!==-1){var prefix=fluid.getPrefix(id);var children=fetchComponents(basecontainer,prefix);var finallump=lump.uplump.finallump[prefix];var closefinal=finallump.close_tag;if(children){for(var i=0;i<children.length;++i){var child=children[i];if(child.children){var targetlump=branchmap[child.fullID];if(targetlump){if(debugMode){renderComment("Branching for "+child.fullID+" from "+fluid.debugLump(lump)+" to "+fluid.debugLump(targetlump))}renderContainer(child,targetlump);if(debugMode){renderComment("Branch returned for "+child.fullID+fluid.debugLump(lump)+" to "+fluid.debugLump(targetlump))}}else{if(debugMode){renderDebugMessage("No matching template branch found for branch container with full ID "+child.fullID+" rendering from parent template branch "+fluid.debugLump(baselump))}}}else{var targetlump=findChild(parentlump,child);if(!targetlump){if(debugMode){renderDebugMessage("Repetitive leaf with full ID "+child.fullID+" could not be rendered from parent template branch "+fluid.debugLump(baselump))}continue}var renderend=renderComponentSystem(basecontainer,child,targetlump);var wasopentag=renderend<t1.lumps.lengtn&&t1.lumps[renderend].nestingdepth>=targetlump.nestingdepth;var newbase=child.children?child:basecontainer;if(wasopentag){renderRecurse(newbase,targetlump,t1.lumps[renderend]);renderend=targetlump.close_tag.lumpindex+1}if(i!==children.length-1){if(renderend<closefinal.lumpindex){dumpScan(t1.lumps,renderend,targetlump.nestingdepth-1,false,false)}}else{dumpScan(t1.lumps,renderend,targetlump.nestingdepth,true,false)}}}}else{if(debugMode){renderDebugMessage("No branch container with prefix "+prefix+": found in container "+reportPath(basecontainer)+" rendering at template position "+fluid.debugLump(baselump)+", skipping")}}renderindex=closefinal.lumpindex+1;if(debugMode){renderComment("Stack returned from branch for ID "+id+" to "+fluid.debugLump(baselump)+": skipping from "+fluid.debugLump(lump)+" to "+fluid.debugLump(closefinal))}}else{var component;if(id){if(debugMode){rendered[id]=true}component=fetchComponent(basecontainer,id,lump)}if(component&&component.children!==undefined){renderContainer(component);renderindex=lump.close_tag.lumpindex+1}else{renderindex=renderComponentSystem(basecontainer,component,lump)}}if(renderindex===t1.lumps.length){break}}if(debugMode){var children=basecontainer.children;for(var key=0;key<children.length;++key){var child=children[key];if(!(child.ID.indexOf(":")!==-1)&&!rendered[child.ID]){renderDebugMessage("Leaf child component "+child.componentType+" with full ID "+child.fullID+" could not be found within template "+fluid.debugLump(baselump))}}}}function renderCollect(collump){dumpTillLump(collump.parent.lumps,collump.lumpindex,collump.close_tag.lumpindex+1)}function renderCollects(){for(var key in collected){var collist=collected[key];for(var i=0;i<collist.length;++i){renderCollect(collist[i])}}}function processDecoratorQueue(){for(var i=0;i<decoratorQueue.length;++i){var decorator=decoratorQueue[i];var node=fluid.byId(decorator.id);if(!node){fluid.fail("Error during rendering - component with id "+decorator.id+" which has a queued decorator was not found in the output markup")}if(decorator.type==="jQuery"){var jnode=$(node);jnode[decorator.func].apply(jnode,$.makeArray(decorator.args))}else{if(decorator.type==="fluid"){var args=decorator.args;if(!args){if(!decorator.container){decorator.container=node}args=[decorator.container,decorator.options]}var that=fluid.invokeGlobalFunction(decorator.func,args,fluid);decorator.that=that}else{if(decorator.type==="event"){node[decorator.event]=decorator.handler}}}}}fluid.ComponentReference=function(reference){this.reference=reference};fluid.explode=function(hash,basepath){var togo=[];for(var key in hash){var binding=basepath===undefined?key:basepath+"."+key;togo[togo.length]={ID:key,value:hash[key],valuebinding:binding}}return togo};fluid.explodeSelectionToInputs=function(optionlist,opts){return fluid.transform(optionlist,function(option,index){return{ID:opts.rowID,children:[{ID:opts.inputID,parentRelativeID:"..::"+opts.selectID,choiceindex:index},{ID:opts.labelID,parentRelativeID:"..::"+opts.selectID,choiceindex:index}]}})};fluid.resolveMessageSource=function(messageSource){if(messageSource.type==="data"){if(messageSource.url===undefined){return fluid.messageLocator(messageSource.messages)}else{}}};fluid.makeBranches=function(){var firstBranch;var thisBranch;for(var i=0;i<arguments.length;++i){var thisarg=arguments[i];var nextBranch;if(typeof (thisarg)==="string"){nextBranch={ID:thisarg}}else{if(thisarg instanceof Array){nextBranch={ID:thisarg[0],jointID:thisarg[1]}}else{$.extend(true,thisBranch,thisarg);nextBranch=thisBranch}}if(thisBranch&&nextBranch!==thisBranch){if(!thisBranch.children){thisBranch.children=[]}thisBranch.children[thisBranch.children.length]=nextBranch}thisBranch=nextBranch;if(!firstBranch){firstBranch=nextBranch}}return firstBranch};fluid.renderTemplates=function(templates,tree,options,fossilsIn){options=options||{};tree=tree||{};debugMode=options.debugMode;if(!options.messageLocator&&options.messageSource){options.messageLocator=fluid.resolveMessageSource(options.messageSource)}options.document=options.document||document;directFossils=fossilsIn;decoratorQueue=[];tree=fixupTree(tree,options.model);var template=templates[0];resolveBranches(templates.globalmap,tree,template.rootlump);out="";renderedbindings={};renderOptions=options;renderCollects();renderRecurse(tree,template.rootlump,template.lumps[template.firstdocumentindex]);return out};fluid.reRender=function(templates,node,tree,options){options=options||{};node=fluid.unwrap(node);var lastFocusedElement=fluid.getLastFocusedElement?fluid.getLastFocusedElement():null;var lastId;if(lastFocusedElement&&fluid.dom.isContainer(node,lastFocusedElement)){lastId=lastFocusedElement.id}if($.browser.msie){$(node).empty()}else{node.innerHTML=""}var fossils={};var rendered=fluid.renderTemplates(templates,tree,options,fossils);if(options.renderRaw){rendered=fluid.XMLEncode(rendered);rendered=rendered.replace(/\n/g,"<br/>")}if(options.model){fluid.bindFossils(node,options.model,fossils)}if($.browser.msie){$(node).html(rendered)}else{node.innerHTML=rendered}processDecoratorQueue();if(lastId){var element=fluid.byId(lastId);if(element){$(element).focus()}}return templates};function findNodeValue(rootNode){var node=fluid.dom.iterateDom(rootNode,function(node){return node.nodeType===8||node.nodeType===4?"stop":null},true);var value=node.nodeValue;if(value.indexOf("[CDATA[")===0){return value.substring(6,value.length-2)}else{return value}}fluid.extractTemplate=function(node,armouring){if(!armouring){return node.innerHTML}else{return findNodeValue(node)}};fluid.selfRender=function(node,tree,options){options=options||{};node=fluid.unwrap(node);var resourceSpec={base:{resourceText:fluid.extractTemplate(node,options.armouring),href:".",resourceKey:".",cutpoints:options.cutpoints}};var templates=fluid.parseTemplates(resourceSpec,["base"],options);return fluid.reRender(templates,node,tree,options)}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/fastXmlPull/js/fastXmlPull.js b/docs/include/jscripts/infusion/lib/fastXmlPull/js/fastXmlPull.js
new file mode 100644 (file)
index 0000000..3f7f1fe
--- /dev/null
@@ -0,0 +1 @@
+var whitespace="\n\r\t ";var closedTags={abbr:true,br:true,col:true,img:true,input:true,link:true,meta:true,param:true,hr:true,area:true,embed:true};XMLP=function(strXML){this.m_xml=strXML;this.m_iP=0;this.m_iState=XMLP._STATE_PROLOG;this.m_stack=[];this.m_attributes={};this.m_emitSynthetic=false};XMLP._NONE=0;XMLP._ELM_B=1;XMLP._ELM_E=2;XMLP._ELM_EMP=3;XMLP._ATT=4;XMLP._TEXT=5;XMLP._ENTITY=6;XMLP._PI=7;XMLP._CDATA=8;XMLP._COMMENT=9;XMLP._DTD=10;XMLP._ERROR=11;XMLP._CONT_XML=0;XMLP._CONT_ALT=1;XMLP._ATT_NAME=0;XMLP._ATT_VAL=1;XMLP._STATE_PROLOG=1;XMLP._STATE_DOCUMENT=2;XMLP._STATE_MISC=3;XMLP._errs=[];XMLP._errs[XMLP.ERR_CLOSE_PI=0]="PI: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_DTD=1]="DTD: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_COMMENT=2]="Comment: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_CDATA=3]="CDATA: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_ELM=4]="Element: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_ENTITY=5]="Entity: missing closing sequence";XMLP._errs[XMLP.ERR_PI_TARGET=6]="PI: target is required";XMLP._errs[XMLP.ERR_ELM_EMPTY=7]="Element: cannot be both empty and closing";XMLP._errs[XMLP.ERR_ELM_NAME=8]='Element: name must immediatly follow "<"';XMLP._errs[XMLP.ERR_ELM_LT_NAME=9]='Element: "<" not allowed in element names';XMLP._errs[XMLP.ERR_ATT_VALUES=10]="Attribute: values are required and must be in quotes";XMLP._errs[XMLP.ERR_ATT_LT_NAME=11]='Element: "<" not allowed in attribute names';XMLP._errs[XMLP.ERR_ATT_LT_VALUE=12]='Attribute: "<" not allowed in attribute values';XMLP._errs[XMLP.ERR_ATT_DUP=13]="Attribute: duplicate attributes not allowed";XMLP._errs[XMLP.ERR_ENTITY_UNKNOWN=14]="Entity: unknown entity";XMLP._errs[XMLP.ERR_INFINITELOOP=15]="Infinite loop";XMLP._errs[XMLP.ERR_DOC_STRUCTURE=16]="Document: only comments, processing instructions, or whitespace allowed outside of document element";XMLP._errs[XMLP.ERR_ELM_NESTING=17]="Element: must be nested correctly";XMLP.prototype._checkStructure=function(iEvent){var stack=this.m_stack;if(XMLP._STATE_PROLOG==this.m_iState){this.m_iState=XMLP._STATE_DOCUMENT}if(XMLP._STATE_DOCUMENT===this.m_iState){if((XMLP._ELM_B==iEvent)||(XMLP._ELM_EMP==iEvent)){this.m_stack[stack.length]=this.getName()}if((XMLP._ELM_E==iEvent)||(XMLP._ELM_EMP==iEvent)){if(stack.length===0){return XMLP._NONE}var strTop=stack[stack.length-1];this.m_stack.length--;if(strTop===null||strTop!==this.getName()){return this._setErr(XMLP.ERR_ELM_NESTING)}}}return iEvent};XMLP.prototype.getColumnNumber=function(){return SAXStrings.getColumnNumber(this.m_xml,this.m_iP)};XMLP.prototype.getContent=function(){return(this.m_cSrc==XMLP._CONT_XML)?this.m_xml:this.m_cAlt};XMLP.prototype.getContentBegin=function(){return this.m_cB};XMLP.prototype.getContentEnd=function(){return this.m_cE};XMLP.prototype.getLineNumber=function(){return SAXStrings.getLineNumber(this.m_xml,this.m_iP)};XMLP.prototype.getName=function(){return this.m_name};XMLP.prototype.next=function(){return this._checkStructure(this._parse())};XMLP.prototype._parse=function(){var iP=this.m_iP;var xml=this.m_xml;if(iP===xml.length){return XMLP._NONE}var c=xml.charAt(iP);if(c==="<"){var c2=xml.charAt(iP+1);if(c2==="?"){return this._parsePI(iP+2)}else{if(c2==="!"){if(iP===xml.indexOf("<!DOCTYPE",iP)){return this._parseDTD(iP+9)}else{if(iP===xml.indexOf("<!--",iP)){return this._parseComment(iP+4)}else{if(iP===xml.indexOf("<![CDATA[",iP)){return this._parseCDATA(iP+9)}}}}else{return this._parseElement(iP+1)}}}else{return this._parseText(iP)}};var nameRegex=/([^\s>]+)/g;var attrStartRegex=/\s*([\w:]+)/gm;var attrValRegex=/\"([^\"]*)\"\s*/gm;var attrValIERegex=/([^\>\s]+)\s*/gm;var closeRegex=/\s*<\//g;XMLP.prototype._parseElement=function(iB){var iE,iDE,iRet;var iType,strN,iLast;iDE=iE=this.m_xml.indexOf(">",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_ELM)}if(this.m_xml.charAt(iB)=="/"){iType=XMLP._ELM_E;iB++}else{iType=XMLP._ELM_B}if(this.m_xml.charAt(iE-1)=="/"){if(iType==XMLP._ELM_E){return this._setErr(XMLP.ERR_ELM_EMPTY)}iType=XMLP._ELM_EMP;iDE--}nameRegex.lastIndex=iB;var nameMatch=nameRegex.exec(this.m_xml);if(!nameMatch){return this._setErr(XMLP.ERR_ELM_NAME)}strN=nameMatch[1].toLowerCase();if("li"===strN&&iType!==XMLP._ELM_E&&this.m_stack.length>0&&this.m_stack[this.m_stack.length-1]==="li"&&!this.m_emitSynthetic){this.m_name="li";this.m_emitSynthetic=true;return XMLP._ELM_E}this.m_attributes={};this.m_cAlt="";if(nameRegex.lastIndex<iDE){this.m_iP=nameRegex.lastIndex;while(this.m_iP<iDE){attrStartRegex.lastIndex=this.m_iP;var attrMatch=attrStartRegex.exec(this.m_xml);if(!attrMatch){return this._setErr(XMLP.ERR_ATT_VALUES)}var attrname=attrMatch[1].toLowerCase();var attrval;if(this.m_xml.charCodeAt(attrStartRegex.lastIndex)===61){var valRegex=this.m_xml.charCodeAt(attrStartRegex.lastIndex+1)===34?attrValRegex:attrValIERegex;valRegex.lastIndex=attrStartRegex.lastIndex+1;attrMatch=valRegex.exec(this.m_xml);if(!attrMatch){return this._setErr(XMLP.ERR_ATT_VALUES)}attrval=attrMatch[1]}else{attrval=attrname;valRegex=attrStartRegex}if(!this.m_attributes[attrname]){this.m_attributes[attrname]=attrval}else{return this._setErr(XMLP.ERR_ATT_DUP)}this.m_iP=valRegex.lastIndex}}if(strN.indexOf("<")!=-1){return this._setErr(XMLP.ERR_ELM_LT_NAME)}this.m_name=strN;this.m_iP=iE+1;if(closedTags[strN]){closeRegex.lastIndex=iE+1;var closeMatch=closeRegex.exec;if(closeMatch){var matchclose=this.m_xml.indexOf(strN,closeMatch.lastIndex);if(matchclose===closeMatch.lastIndex){return iType}else{return XMLP._ELM_EMP}}}this.m_emitSynthetic=false;return iType};XMLP.prototype._parseCDATA=function(iB){var iE=this.m_xml.indexOf("]]>",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_CDATA)}this._setContent(XMLP._CONT_XML,iB,iE);this.m_iP=iE+3;return XMLP._CDATA};XMLP.prototype._parseComment=function(iB){var iE=this.m_xml.indexOf("-->",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_COMMENT)}this._setContent(XMLP._CONT_XML,iB-4,iE+3);this.m_iP=iE+3;return XMLP._COMMENT};XMLP.prototype._parseDTD=function(iB){var iE,strClose,iInt,iLast;iE=this.m_xml.indexOf(">",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_DTD)}iInt=this.m_xml.indexOf("[",iB);strClose=((iInt!=-1)&&(iInt<iE))?"]>":">";while(true){if(iE==iLast){return this._setErr(XMLP.ERR_INFINITELOOP)}iLast=iE;iE=this.m_xml.indexOf(strClose,iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_DTD)}if(this.m_xml.substring(iE-1,iE+2)!="]]>"){break}}this.m_iP=iE+strClose.length;return XMLP._DTD};XMLP.prototype._parsePI=function(iB){var iE,iTB,iTE,iCB,iCE;iE=this.m_xml.indexOf("?>",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_PI)}iTB=SAXStrings.indexOfNonWhitespace(this.m_xml,iB,iE);if(iTB==-1){return this._setErr(XMLP.ERR_PI_TARGET)}iTE=SAXStrings.indexOfWhitespace(this.m_xml,iTB,iE);if(iTE==-1){iTE=iE}iCB=SAXStrings.indexOfNonWhitespace(this.m_xml,iTE,iE);if(iCB==-1){iCB=iE}iCE=SAXStrings.lastIndexOfNonWhitespace(this.m_xml,iCB,iE);if(iCE==-1){iCE=iE-1}this.m_name=this.m_xml.substring(iTB,iTE);this._setContent(XMLP._CONT_XML,iCB,iCE+1);this.m_iP=iE+2;return XMLP._PI};XMLP.prototype._parseText=function(iB){var iE=this.m_xml.indexOf("<",iB);if(iE==-1){iE=this.m_xml.length}this._setContent(XMLP._CONT_XML,iB,iE);this.m_iP=iE;return XMLP._TEXT};XMLP.prototype._setContent=function(iSrc){var args=arguments;if(XMLP._CONT_XML==iSrc){this.m_cAlt=null;this.m_cB=args[1];this.m_cE=args[2]}else{this.m_cAlt=args[1];this.m_cB=0;this.m_cE=args[1].length}this.m_cSrc=iSrc};XMLP.prototype._setErr=function(iErr){var strErr=XMLP._errs[iErr];this.m_cAlt=strErr;this.m_cB=0;this.m_cE=strErr.length;this.m_cSrc=XMLP._CONT_ALT;return XMLP._ERROR};SAXStrings={};SAXStrings.WHITESPACE=" \t\n\r";SAXStrings.QUOTES="\"'";SAXStrings.getColumnNumber=function(strD,iP){if(!strD){return -1}iP=iP||strD.length;var arrD=strD.substring(0,iP).split("\n");arrD.length--;var iLinePos=arrD.join("\n").length;return iP-iLinePos};SAXStrings.getLineNumber=function(strD,iP){if(!strD){return -1}iP=iP||strD.length;return strD.substring(0,iP).split("\n").length};SAXStrings.indexOfNonWhitespace=function(strD,iB,iE){if(!strD){return -1}iB=iB||0;iE=iE||strD.length;for(var i=iB;i<iE;++i){var c=strD.charAt(i);if(c!==" "&&c!=="\t"&&c!=="\n"&&c!=="\r"){return i}}return -1};SAXStrings.indexOfWhitespace=function(strD,iB,iE){if(!strD){return -1}iB=iB||0;iE=iE||strD.length;for(var i=iB;i<iE;i++){if(SAXStrings.WHITESPACE.indexOf(strD.charAt(i))!=-1){return i}}return -1};SAXStrings.lastIndexOfNonWhitespace=function(strD,iB,iE){if(!strD){return -1}iB=iB||0;iE=iE||strD.length;for(var i=iE-1;i>=iB;i--){if(SAXStrings.WHITESPACE.indexOf(strD.charAt(i))==-1){return i}}return -1};SAXStrings.replace=function(strD,iB,iE,strF,strR){if(!strD){return""}iB=iB||0;iE=iE||strD.length;return strD.substring(iB,iE).split(strF).join(strR)};function __unescapeString(str){return str.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&apos;/g,"'")}function __escapeString(str){var escAmpRegEx=/&/g;var escLtRegEx=/</g;var escGtRegEx=/>/g;var quotRegEx=/"/g;var aposRegEx=/'/g;str=str.replace(escAmpRegEx,"&amp;");str=str.replace(escLtRegEx,"&lt;");str=str.replace(escGtRegEx,"&gt;");str=str.replace(quotRegEx,"&quot;");str=str.replace(aposRegEx,"&apos;");return str};
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/jquery/core/js/jquery.js b/docs/include/jscripts/infusion/lib/jquery/core/js/jquery.js
new file mode 100644 (file)
index 0000000..0de899d
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * jQuery JavaScript Library v1.3.2
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
+ * Revision: 6246
+ */
+(function(){var window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context)},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this}if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context)}else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3]){return jQuery().find(selector)}var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret}}else{return jQuery(context).find(selector)}}else{if(jQuery.isFunction(selector)){return jQuery(document).ready(selector)}}if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context}return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(num){return num===undefined?Array.prototype.slice.call(this):this[num]},pushStack:function(elems,name,selector){var ret=jQuery(elems);ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector}else{if(name){ret.selector=this.selector+"."+name+"("+selector+")"}}return ret},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this},each:function(callback,args){return jQuery.each(this,callback,args)},index:function(elem){return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this)},attr:function(name,value,type){var options=name;if(typeof name==="string"){if(value===undefined){return this[0]&&jQuery[type||"attr"](this[0],name)}else{options={};options[name]=value}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name))}})},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined}return this.attr(key,value,"curCSS")},text:function(text){if(typeof text!=="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text))}var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this])}})});return ret},wrapAll:function(html){if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).clone();if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstChild){elem=elem.firstChild}return elem}).append(this)}return this},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html)})},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html)})},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling)})},end:function(){return this.prevObject||jQuery([])},push:[].push,sort:[].sort,splice:[].splice,find:function(selector){if(this.length===1){var ret=this.pushStack([],"find",selector);ret.length=0;jQuery.find(selector,this[0],ret);return ret}else{return this.pushStack(jQuery.unique(jQuery.map(this,function(elem){return jQuery.find(selector,elem)})),"find",selector)}},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML;if(!html){var div=this.ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML}return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(events===true){var orig=this.find("*").andSelf(),i=0;ret.find("*").andSelf().each(function(){if(this.nodeName!==orig[i].nodeName){return }var events=jQuery.data(orig[i],"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data)}}i++})}return ret},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i)})||jQuery.multiFilter(selector,jQuery.grep(this,function(elem){return elem.nodeType===1})),"filter",selector)},closest:function(selector){var pos=jQuery.expr.match.POS.test(selector)?jQuery(selector):null,closer=0;return this.map(function(){var cur=this;while(cur&&cur.ownerDocument){if(pos?pos.index(cur)>-1:jQuery(cur).is(selector)){jQuery.data(cur,"closest",closer);return cur}cur=cur.parentNode;closer++}})},not:function(selector){if(typeof selector==="string"){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true),"not",selector)}else{selector=jQuery.multiFilter(selector,this)}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector})},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector==="string"?jQuery(selector):jQuery.makeArray(selector))))},is:function(selector){return !!selector&&jQuery.multiFilter(selector,this).length>0},hasClass:function(selector){return !!selector&&this.is("."+selector)},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,"option")){return(elem.attributes.value||{}).specified?elem.value:elem.text}if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0){return null}for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery(option).val();if(one){return value}values.push(value)}}return values}return(elem.value||"").replace(/\r/g,"")}return undefined}if(typeof value==="number"){value+=""}return this.each(function(){if(this.nodeType!=1){return }if(jQuery.isArray(value)&&/radio|checkbox/.test(this.type)){this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0)}else{if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0)});if(!values.length){this.selectedIndex=-1}}else{this.value=value}}})},html:function(value){return value===undefined?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(value)},replaceWith:function(value){return this.after(value).remove()},eq:function(i){return this.slice(i,+i+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(args,table,callback){if(this[0]){var fragment=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(args,(this[0].ownerDocument||this[0]),fragment),first=fragment.firstChild;if(first){for(var i=0,l=this.length;i<l;i++){callback.call(root(this[i],first),this.length>1||i>0?fragment.cloneNode(true):fragment)}}if(scripts){jQuery.each(scripts,evalScript)}}return this;function root(elem,cur){return table&&jQuery.nodeName(elem,"table")&&jQuery.nodeName(cur,"tr")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem}}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"})}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"")}if(elem.parentNode){elem.parentNode.removeChild(elem)}}function now(){return +new Date}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2}if(typeof target!=="object"&&!jQuery.isFunction(target)){target={}}if(length==i){target=this;--i}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){var src=target[name],copy=options[name];if(target===copy){continue}if(deep&&copy&&typeof copy==="object"&&!copy.nodeType){target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy)}else{if(copy!==undefined){target[name]=copy}}}}}return target};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{},toString=Object.prototype.toString;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery}return jQuery},isFunction:function(obj){return toString.call(obj)==="[object Function]"},isArray:function(obj){return toString.call(obj)==="[object Array]"},isXMLDoc:function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&jQuery.isXMLDoc(elem.ownerDocument)},globalEval:function(data){if(data&&/\S/.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval){script.appendChild(document.createTextNode(data))}else{script.text=data}head.insertBefore(script,head.firstChild);head.removeChild(script)}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase()},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length===undefined){for(name in object){if(callback.apply(object[name],args)===false){break}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break}}}}else{if(length===undefined){for(name in object){if(callback.call(object[name],name,object[name])===false){break}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}return object},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value)){value=value.call(elem,i)}return typeof value==="number"&&type=="curCSS"&&!exclude.test(name)?value+"px":value},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)){elem.className+=(elem.className?" ":"")+className}})},remove:function(elem,classNames){if(elem.nodeType==1){elem.className=classNames!==undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return !jQuery.className.has(classNames,className)}).join(" "):""}},has:function(elem,className){return elem&&jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name]}callback.call(elem);for(var name in options){elem.style[name]=old[name]}},css:function(elem,name,force,extra){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return }jQuery.each(which,function(){if(!extra){val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0}if(extra==="margin"){val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0}else{val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0}})}if(elem.offsetWidth!==0){getWH()}else{jQuery.swap(elem,props,getWH)}return Math.max(0,Math.round(val))}return jQuery.curCSS(elem,name,force)},curCSS:function(elem,name,force){var ret,style=elem.style;if(name=="opacity"&&!jQuery.support.opacity){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret}if(name.match(/float/i)){name=styleFloat}if(!force&&style&&style[name]){ret=style[name]}else{if(defaultView.getComputedStyle){if(name.match(/float/i)){name="float"}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle){ret=computedStyle.getPropertyValue(name)}if(name=="opacity"&&ret==""){ret="1"}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase()});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft}}}}return ret},clean:function(elems,context,fragment){context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document}if(!fragment&&elems.length===1&&typeof elems[0]==="string"){var match=/^<(\w+)\s*\/?>$/.exec(elems[0]);if(match){return[context.createElement(match[1])]}}var ret=[],scripts=[],div=context.createElement("div");jQuery.each(elems,function(i,elem){if(typeof elem==="number"){elem+=""}if(!elem){return }if(typeof elem==="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">"});var tags=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!jQuery.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--){div=div.lastChild}if(!jQuery.support.tbody){var hasBody=/<tbody/i.test(elem),tbody=!tags.indexOf("<table")&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j])}}}if(!jQuery.support.leadingWhitespace&&/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild)}elem=jQuery.makeArray(div.childNodes)}if(elem.nodeType){ret.push(elem)}else{ret=jQuery.merge(ret,elem)}});if(fragment){for(var i=0;ret[i];i++){if(jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i])}else{if(ret[i].nodeType===1){ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))))}fragment.appendChild(ret[i])}}return scripts}return ret},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&elem.parentNode){elem.parentNode.selectedIndex}if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed"}elem[name]=value}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue}if(name=="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:elem.nodeName.match(/(button|input|object|select|textarea)/i)?0:elem.nodeName.match(/^(a|area)$/i)&&elem.href?0:undefined}return elem[name]}if(!jQuery.support.style&&notxml&&name=="style"){return jQuery.attr(elem.style,"cssText",value)}if(set){elem.setAttribute(name,""+value)}var attr=!jQuery.support.hrefNormalized&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr}if(!jQuery.support.opacity&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+""=="NaN"?"":"alpha(opacity="+value*100+")")}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase()});if(set){elem[name]=value}return elem[name]},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"")},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||typeof array==="string"||jQuery.isFunction(array)||array.setInterval){ret[0]=array}else{while(i){ret[--i]=array[i]}}}return ret},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i}}return -1},merge:function(first,second){var i=0,elem,pos=first.length;if(!jQuery.support.getAll){while((elem=second[i++])!=null){if(elem.nodeType!=8){first[pos++]=elem}}}else{while((elem=second[i++])!=null){first[pos++]=elem}}return first},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i])}}}catch(e){ret=array}return ret},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv!=!callback(elems[i],i)){ret.push(elems[i])}}return ret},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null){ret[ret.length]=value}}return ret.concat.apply([],ret)}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};jQuery.each({parent:function(elem){return elem.parentNode},parents:function(elem){return jQuery.dir(elem,"parentNode")},next:function(elem){return jQuery.nth(elem,2,"nextSibling")},prev:function(elem){return jQuery.nth(elem,2,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string"){ret=jQuery.multiFilter(selector,ret)}return this.pushStack(jQuery.unique(ret),name,selector)}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector);for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems)}return this.pushStack(ret,name,selector)}});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1){this.removeAttribute(name)}},addClass:function(classNames){jQuery.className.add(this,classNames)},removeClass:function(classNames){jQuery.className.remove(this,classNames)},toggleClass:function(classNames,state){if(typeof state!=="boolean"){state=!jQuery.className.has(this,classNames)}jQuery.className[state?"add":"remove"](this,classNames)},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).length){jQuery("*",this).add([this]).each(function(){jQuery.event.remove(this);jQuery.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){jQuery(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments)}});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0}var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id){id=elem[expando]=++uuid}if(name&&!jQuery.cache[id]){jQuery.cache[id]={}}if(data!==undefined){jQuery.cache[id][name]=data}return name?jQuery.cache[id][name]:id},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id]){break}if(!name){jQuery.removeData(elem)}}}else{try{delete elem[expando]}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando)}}delete jQuery.cache[id]}},queue:function(elem,type,data){if(elem){type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!q||jQuery.isArray(data)){q=jQuery.data(elem,type,jQuery.makeArray(data))}else{if(data){q.push(data)}}}return q},dequeue:function(elem,type){var queue=jQuery.queue(elem,type),fn=queue.shift();if(!type||type==="fx"){fn=queue[0]}if(fn!==undefined){fn.call(elem)}}});jQuery.fn.extend({data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key)}return data===undefined&&parts[1]?this.data(parts[0]):data}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value)})}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})},queue:function(type,data){if(typeof type!=="string"){data=type;type="fx"}if(data===undefined){return jQuery.queue(this[0],type)}return this.each(function(){var queue=jQuery.queue(this,type,data);if(type=="fx"&&queue.length==1){queue[0].call(this)}})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})}});
+/*
+ * Sizzle CSS Selector Engine - v0.9.3
+ *  Copyright 2009, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString;var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[]}if(!selector||typeof selector!=="string"){return results}var parts=[],m,set,checkSet,check,mode,extra,prune=true;chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break}}if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context)}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift()}set=posProcess(selector,set)}}}else{var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&context.parentNode?context.parentNode:context,isXML(context));set=Sizzle.filter(ret.expr,ret.set);if(parts.length>0){checkSet=makeArray(set)}else{prune=false}while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur=""}else{pop=parts.pop()}if(pop==null){pop=context}Expr.relative[cur](checkSet,pop,isXML(context))}}if(!checkSet){checkSet=set}if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector)}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet)}else{if(context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i])}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i])}}}}}else{makeArray(checkSet,results)}if(extra){Sizzle(extra,context,results,seed);if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1)}}}}}return results};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set)};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[]}for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.match[type].exec(expr))){var left=RegExp.leftContext;if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break}}}}if(!set){set=context.getElementsByTagName("*")}return{set:set,expr:expr}};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[]}if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true}else{if(match===true){continue}}}if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true}else{curLoop[i]=false}}else{if(pass){result.push(item);anyFound=true}}}}}if(found!==undefined){if(!inplace){curLoop=result}expr=expr.replace(Expr.match[type],"");if(!anyFound){return[]}break}}}if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr}else{break}}old=expr}return curLoop};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href")}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase()}for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part}}if(isPartStrNotTag){Sizzle.filter(part,checkSet,true)}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part}}if(isPartStr){Sizzle.filter(part,checkSet,true)}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML)},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML)}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[]}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i])}}return ret.length===0?null:ret}},TAG:function(match,context){return context.getElementsByTagName(match[1])}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match}for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace){result.push(elem)}}else{if(inplace){curLoop[i]=false}}}}return false},ID:function(match){return match[1].replace(/\\/g,"")},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase()},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0}match[0]=done++;return match},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name]}if(match[2]==="~="){match[4]=" "+match[4]+" "}return match},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop)}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret)}return false}}else{if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true}}return match},POS:function(match){match.unshift(true);return match}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden"},disabled:function(elem){return elem.disabled===true},checked:function(elem){return elem.checked===true},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true},parent:function(elem){return !!elem.firstChild},empty:function(elem){return !elem.firstChild},has:function(elem,i,match){return !!Sizzle(match[3],elem).length},header:function(elem){return/h\d/i.test(elem.nodeName)},text:function(elem){return"text"===elem.type},radio:function(elem){return"radio"===elem.type},checkbox:function(elem){return"checkbox"===elem.type},file:function(elem){return"file"===elem.type},password:function(elem){return"password"===elem.type},submit:function(elem){return"submit"===elem.type},image:function(elem){return"image"===elem.type},reset:function(elem){return"reset"===elem.type},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON"},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName)}},setFilters:{first:function(elem,i){return i===0},last:function(elem,i,match,array){return i===array.length-1},even:function(elem,i){return i%2===0},odd:function(elem,i){return i%2===1},lt:function(elem,i,match){return i<match[3]-0},gt:function(elem,i,match){return i>match[3]-0},nth:function(elem,i,match){return match[3]-0==i},eq:function(elem,i,match){return match[3]-0==i}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array)}else{if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0}else{if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false}}return true}}}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case"only":case"first":while(node=node.previousSibling){if(node.nodeType===1){return false}}if(type=="first"){return true}node=elem;case"last":while(node=node.nextSibling){if(node.nodeType===1){return false}}return true;case"nth":var first=match[2],last=match[3];if(first==1&&last==0){return true}var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count}}parent.sizcache=doneName}var diff=elem.nodeIndex-last;if(first==0){return diff==0}else{return(diff%first==0&&diff/first>=0)}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array)}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results}return array};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array)}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i])}}else{for(var i=0;array[i];i++){ret.push(array[i])}}}return ret}}var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true}return ret}}else{if("sourceIndex" in document.documentElement){sortOrder=function(a,b){var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true}return ret}}else{if(document.createRange){sortOrder=function(a,b){var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.selectNode(a);aRange.collapse(true);bRange.selectNode(b);bRange.collapse(true);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true}return ret}}}}(function(){var form=document.createElement("form"),id="script"+(new Date).getTime();form.innerHTML="<input name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[]}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match}}root.removeChild(form)})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i])}}results=tmp}return results}}div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return }Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra)}catch(e){}}return oldSizzle(query,context,extra,seed)};Sizzle.find=oldSizzle.find;Sizzle.filter=oldSizzle.filter;Sizzle.selectors=oldSizzle.selectors;Sizzle.matches=oldSizzle.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0){return }div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return }Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1])}}})()}function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i}if(elem.nodeName===cur){match=elem;break}elem=elem[dir]}checkSet[i]=match}}}function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i}if(typeof cur!=="string"){if(elem===cur){match=true;break}}else{if(Sizzle.filter(cur,[elem]).length>0){match=elem;break}}}elem=elem[dir]}checkSet[i]=match}}}var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&isXML(elem.ownerDocument)};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"")}selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet)}return Sizzle.filter(later,tmpSet)};jQuery.find=Sizzle;jQuery.filter=Sizzle.filter;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;Sizzle.selectors.filters.hidden=function(elem){return elem.offsetWidth===0||elem.offsetHeight===0};Sizzle.selectors.filters.visible=function(elem){return elem.offsetWidth>0||elem.offsetHeight>0};Sizzle.selectors.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};jQuery.multiFilter=function(expr,elems,not){if(not){expr=":not("+expr+")"}return Sizzle.matches(expr,elems)};jQuery.dir=function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur)}cur=cur[dir]}return matched};jQuery.nth=function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1&&++num==result){break}}return cur};jQuery.sibling=function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem){r.push(n)}}return r};return ;window.Sizzle=Sizzle})();jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return }if(elem.setInterval&&elem!=window){elem=window}if(!handler.guid){handler.guid=this.guid++}if(data!==undefined){var fn=handler;handler=this.proxy(fn);handler.data=data}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(arguments.callee.elem,arguments):undefined});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();handler.type=namespaces.slice().sort().join(".");var handlers=events[type];if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].setup.call(elem,data,namespaces)}if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem,data,namespaces)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false)}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle)}}}}handlers[handler.guid]=handler;jQuery.event.global[type]=true});elem=null},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return }var events=jQuery.data(elem,"events"),ret,index;if(events){if(types===undefined||(typeof types==="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""))}}else{if(types.type){handler=types.handler;types=types.type}jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");if(events[type]){if(handler){delete events[type][handler.guid]}else{for(var handle in events[type]){if(namespace.test(events[type][handle].type)){delete events[type][handle]}}}if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].teardown.call(elem,namespaces)}for(ret in events[type]){break}if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem,namespaces)===false){if(elem.removeEventListener){elem.removeEventListener(type,jQuery.data(elem,"handle"),false)}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"))}}}ret=null;delete events[type]}}})}for(ret in events){break}if(!ret){var handle=jQuery.data(elem,"handle");if(handle){handle.elem=null}jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle")}}},trigger:function(event,data,elem,bubbling){var type=event.type||event;if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true}if(!elem){event.stopPropagation();if(this.global[type]){jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type]){jQuery.event.trigger(event,data,this.handle.elem)}})}}if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event)}event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle){handle.apply(elem,data)}if((!elem[type]||(jQuery.nodeName(elem,"a")&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){event.result=false}if(!bubbling&&elem[type]&&!event.isDefaultPrevented()&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;try{elem[type]()}catch(e){}}this.triggered=false;if(!event.isPropagationStopped()){var parent=elem.parentNode||elem.ownerDocument;if(parent){jQuery.event.trigger(event,data,parent,true)}}},handle:function(event){var all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;var namespaces=event.type.split(".");event.type=namespaces.shift();all=!namespaces.length&&!event.exclusive;var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||namespace.test(handler.type)){event.handler=handler;event.data=handler.data;var ret=handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation()}}if(event.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando]){return event}var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop]}if(!event.target){event.target=event.srcElement||document}if(event.target.nodeType==3){event.target=event.target.parentNode}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0)}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)))}return event},proxy:function(fn,proxy){proxy=proxy||function(){return fn.apply(this,arguments)};proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy},special:{ready:{setup:bindReady,teardown:function(){}}},specialAll:{live:{setup:function(selector,namespaces){jQuery.event.add(this,namespaces[0],liveHandler)},teardown:function(namespaces){if(namespaces.length){var remove=0,name=RegExp("(^|\\.)"+namespaces[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type)){remove++}});if(remove<1){jQuery.event.remove(this,namespaces[0],liveHandler)}}}}}};jQuery.Event=function(src){if(!this.preventDefault){return new jQuery.Event(src)}if(src&&src.type){this.originalEvent=src;this.type=src.type}else{this.type=src}this.timeStamp=now();this[expando]=true};function returnFalse(){return false}function returnTrue(){return true}jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return }if(e.preventDefault){e.preventDefault()}e.returnValue=false},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return }if(e.stopPropagation){e.stopPropagation()}e.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation()},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;while(parent&&parent!=this){try{parent=parent.parentNode}catch(e){parent=this}}if(parent!=this){event.type=event.data;jQuery.event.handle.apply(this,arguments)}};jQuery.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(orig,fix){jQuery.event.special[fix]={setup:function(){jQuery.event.add(this,orig,withinElement,fix)},teardown:function(){jQuery.event.remove(this,orig,withinElement)}}});jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data)})},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments)});return this.each(function(){jQuery.event.add(this,type,one,fn&&data)})},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn)})},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result}},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jQuery.event.proxy(fn,args[i++])}return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false}))},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut)},ready:function(fn){bindReady();if(jQuery.isReady){fn.call(document,jQuery)}else{jQuery.readyList.push(fn)}return this},live:function(type,fn){var proxy=jQuery.event.proxy(fn);proxy.guid+=this.selector+type;jQuery(document).bind(liveConvert(type,this.selector),this.selector,proxy);return this},die:function(type,fn){jQuery(document).unbind(liveConvert(type,this.selector),fn?{guid:fn.guid+this.selector+type}:null);return this}});function liveHandler(event){var check=RegExp("(^|\\.)"+event.type+"(\\.|$)"),stop=true,elems=[];jQuery.each(jQuery.data(this,"events").live||[],function(i,fn){if(check.test(fn.type)){var elem=jQuery(event.target).closest(fn.data)[0];if(elem){elems.push({elem:elem,fn:fn})}}});elems.sort(function(a,b){return jQuery.data(a.elem,"closest")-jQuery.data(b.elem,"closest")});jQuery.each(elems,function(){if(this.fn.call(this.elem,event,this.fn.data)===false){return(stop=false)}});return stop}function liveConvert(type,selector){return["live",type,selector.replace(/\./g,"`").replace(/ /g,"|")].join(".")}jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document,jQuery)});jQuery.readyList=null}jQuery(document).triggerHandler("ready")}}});var readyBound=false;function bindReady(){if(readyBound){return }readyBound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);jQuery.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);jQuery.ready()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(jQuery.isReady){return }try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return }jQuery.ready()})()}}}jQuery.event.add(window,"load",jQuery.ready)}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name)}});jQuery(window).bind("unload",function(){for(var id in jQuery.cache){if(id!=1&&jQuery.cache[id].handle){jQuery.event.remove(jQuery.cache[id].handle.elem)}}});(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+(new Date).getTime();div.style.display="none";div.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return }jQuery.support={leadingWhitespace:div.firstChild.nodeType==3,tbody:!div.getElementsByTagName("tbody").length,objectAll:!!div.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"))}catch(e){}root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id]}root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",arguments.callee)});div.cloneNode(true).fireEvent("onclick")}jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display="none"})})();var styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat";jQuery.props={"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!=="string"){return this._load(url)}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off)}var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null}else{if(typeof params==="object"){params=jQuery.param(params);type="POST"}}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified"){self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText)}if(callback){self.each(callback,[res.responseText,status,res])}}});return this},serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val}}):{name:elem.name,value:val}}).get()}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f)}});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type})},getScript:function(url,callback){return jQuery.get(url,null,callback,"script")},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={}}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type})},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data)}if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?"}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?"}}s.dataType="json"}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1")}s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp]}catch(e){}if(head){head.removeChild(script)}}}if(s.dataType=="script"&&s.cache==null){s.cache=false}if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"")}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=location.host)){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();script.onload=script.onreadystatechange=null;head.removeChild(script)}}}head.appendChild(script);return undefined}var requestDone=false;var xhr=s.xhr();if(s.username){xhr.open(type,s.url,s.async,s.username,s.password)}else{xhr.open(type,s.url,s.async)}try{if(s.data){xhr.setRequestHeader("Content-Type",s.contentType)}if(s.ifModified){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default)}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}xhr.abort();return false}if(s.global){jQuery.event.trigger("ajaxSend",[xhr,s])}var onreadystatechange=function(isTimeout){if(xhr.readyState==0){if(ival){clearInterval(ival);ival=null;if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}}else{if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null}status=isTimeout=="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s)}catch(e){status="parsererror"}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes}if(!jsonp){success()}}else{jQuery.handleError(s,xhr,status)}complete();if(isTimeout){xhr.abort()}if(s.async){xhr=null}}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xhr&&!requestDone){onreadystatechange("timeout")}},s.timeout)}}try{xhr.send(s.data)}catch(e){jQuery.handleError(s,xhr,null,e)}if(!s.async){onreadystatechange()}function success(){if(s.success){s.success(data,status)}if(s.global){jQuery.event.trigger("ajaxSuccess",[xhr,s])}}function complete(){if(s.complete){s.complete(xhr,status)}if(s.global){jQuery.event.trigger("ajaxComplete",[xhr,s])}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}return xhr},handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e)}if(s.global){jQuery.event.trigger("ajaxError",[xhr,s,e])}},active:0,httpSuccess:function(xhr){try{return !xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223}catch(e){}return false},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]}catch(e){}return false},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror"}if(s&&s.dataFilter){data=s.dataFilter(data,type)}if(typeof data==="string"){if(type=="script"){jQuery.globalEval(data)}if(type=="json"){data=window.eval("("+data+")")}}return data},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)}if(jQuery.isArray(a)||a.jquery){jQuery.each(a,function(){add(this.name,this.value)})}else{for(var j in a){if(jQuery.isArray(a[j])){jQuery.each(a[j],function(){add(j,this)})}else{add(j,jQuery.isFunction(a[j])?a[j]():a[j])}}}return s.join("&").replace(/%20/g,"+")}});var elemdisplay={},timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type});return obj}jQuery.fn.extend({show:function(speed,callback){if(speed){return this.animate(genFx("show",3),speed,callback)}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var tagName=this[i].tagName,display;if(elemdisplay[tagName]){display=elemdisplay[tagName]}else{var elem=jQuery("<"+tagName+" />").appendTo("body");display=elem.css("display");if(display==="none"){display="block"}elem.remove();elemdisplay[tagName]=display}jQuery.data(this[i],"olddisplay",display)}}for(var i=0,l=this.length;i<l;i++){this[i].style.display=jQuery.data(this[i],"olddisplay")||""}return this}},hide:function(speed,callback){if(speed){return this.animate(genFx("hide",3),speed,callback)}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none"){jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"))}}for(var i=0,l=this.length;i<l;i++){this[i].style.display="none"}return this}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn==null||bool?this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]()}):this.animate(genFx("toggle",3),fn,fn2)},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback)},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType==1&&jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return opt.complete.call(this)}if((p=="height"||p=="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow}}if(opt.overflow!=null){this.style.overflow="hidden"}opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val)){e[val=="toggle"?hidden?"show":"hide":val](prop)}else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit}if(parts[1]){end=((parts[1]=="-="?-1:1)*end)+start}e.custom(start,end,unit)}else{e.custom(start,val,"")}}});return true})},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([])}this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true)}timers.splice(i,1)}}});if(!gotoEnd){this.dequeue()}return this}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback)}});jQuery.extend({speed:function(speed,easing,fn){var opt=typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue()}if(jQuery.isFunction(opt.old)){opt.old.call(this)}};return opt},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={}}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd)}t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1)}}if(!timers.length){clearInterval(timerId);timerId=undefined}},13)}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());jQuery(this.elem).show()},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(gotoEnd){var t=now();if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){jQuery(this.elem).hide()}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p])}}this.options.complete.call(this.elem)}return false}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now)},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null){fx.elem.style[fx.prop]=fx.now+fx.unit}else{fx.elem[fx.prop]=fx.now}}}});if(document.documentElement.getBoundingClientRect){jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0])}var box=this[0].getBoundingClientRect(),doc=this[0].ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left}}}else{jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0])}jQuery.offset.initialized||jQuery.offset.initialize();var elem=this[0],offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView.getComputedStyle(elem,null),top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){computedStyle=defaultView.getComputedStyle(elem,null);top-=elem.scrollTop,left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop,left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.tagName))){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0}prevOffsetParent=offsetParent,offsetParent=elem.offsetParent}if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0}prevComputedStyle=computedStyle}if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop,left+=body.offsetLeft}if(prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop),left+=Math.max(docElem.scrollLeft,body.scrollLeft)}return{top:top,left:left}}}jQuery.offset={initialize:function(){if(this.initialized){return }var body=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,rules,prop,bodyMarginTop=body.style.marginTop,html='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';rules={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(prop in rules){container.style[prop]=rules[prop]}container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild,checkDiv=innerDiv.firstChild,td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);innerDiv.style.overflow="hidden",innerDiv.style.position="relative";this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);body.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(body.offsetTop===0);body.style.marginTop=bodyMarginTop;body.removeChild(container);this.initialized=true},bodyOffset:function(body){jQuery.offset.initialized||jQuery.offset.initialize();var top=body.offsetTop,left=body.offsetLeft;if(jQuery.offset.doesNotIncludeMarginInBodyOffset){top+=parseInt(jQuery.curCSS(body,"marginTop",true),10)||0,left+=parseInt(jQuery.curCSS(body,"marginLeft",true),10)||0}return{top:top,left:left}}};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}return results},offsetParent:function(){var offsetParent=this[0].offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent}return jQuery(offsetParent)}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){if(!this[0]){return null}return val!==undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val}):this[0]==window||this[0]==document?self[i?"pageYOffset":"pageXOffset"]||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method]}});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom",lower=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],lower,false,"padding"):null};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],lower,false,margin?"margin":"border"):null};var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(document.documentElement["client"+name],document.body["scroll"+name],document.documentElement["scroll"+name],document.body["offset"+name],document.documentElement["offset"+name]):size===undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,typeof size==="string"?size:size+"px")}})})();
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/jquery/plugins/bgiframe/js/jquery.bgiframe.js b/docs/include/jscripts/infusion/lib/jquery/plugins/bgiframe/js/jquery.bgiframe.js
new file mode 100644 (file)
index 0000000..b3f2969
--- /dev/null
@@ -0,0 +1 @@
+(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&parseInt($.browser.version)<=6){s=$.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},s||{});var prop=function(n){return n&&n.constructor==Number?n+"px":n},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(s.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":prop(s.top))+";left:"+(s.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":prop(s.left))+";width:"+(s.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":prop(s.width))+";height:"+(s.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":prop(s.height))+';"/>';return this.each(function(){if($("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(html),this.firstChild)}})}return this};if(!$.browser.version){$.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1]}})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/jquery/plugins/delegate/js/jquery.delegate.js b/docs/include/jscripts/infusion/lib/jquery/plugins/delegate/js/jquery.delegate.js
new file mode 100644 (file)
index 0000000..690a03a
--- /dev/null
@@ -0,0 +1 @@
+(function($){$.each({focus:"focusin",blur:"focusout"},function(original,fix){$.event.special[fix]={setup:function(){if($.browser.msie){return false}this.addEventListener(original,$.event.special[fix].handler,true)},teardown:function(){if($.browser.msie){return false}this.removeEventListener(original,$.event.special[fix].handler,true)},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments)}}});$.extend($.fn,{delegate:function(type,delegate,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments)}})},triggerEvent:function(type,target){return this.triggerHandler(type,[jQuery.event.fix({type:type,target:target})])}})})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/jquery/plugins/tooltip/css/jquery.tooltip.css b/docs/include/jscripts/infusion/lib/jquery/plugins/tooltip/css/jquery.tooltip.css
new file mode 100644 (file)
index 0000000..7594ab2
--- /dev/null
@@ -0,0 +1,2 @@
+#tooltip{position:absolute;z-index:3000;border:1px solid #111;background-color:#ffffe1;padding:2px;}
+#tooltip h3,#tooltip div{margin:0;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/jquery/plugins/tooltip/js/jquery.tooltip.js b/docs/include/jscripts/infusion/lib/jquery/plugins/tooltip/js/jquery.tooltip.js
new file mode 100644 (file)
index 0000000..9933928
--- /dev/null
@@ -0,0 +1 @@
+(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip-settings",settings);this.tooltipText=this.title;$(this).removeAttr("title");this.alt=""}).hover(save,hide).click(hide)},fixPNG:IE?function(){return this.each(function(){var image=$(this).css("backgroundImage");if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css("position");if(position!="absolute"&&position!="relative"){$(this).css("position","relative")}})}})}:function(){return this},unfixPNG:IE?function(){return this.each(function(){$(this).css({filter:"",backgroundImage:""})})}:function(){return this},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]()})},url:function(){return this.attr("href")||this.attr("src")}});function createHelper(settings){if(helper.parent){return }helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe){helper.parent.bgiframe()}helper.title=$("h3",helper.parent);helper.body=$("div.body",helper.parent);helper.url=$("div.url",helper.parent)}function settings(element){return $.data(element,"tooltip-settings")}function handle(event){if(settings(this).delay){tID=setTimeout(show,settings(this).delay)}else{show()}track=!!settings(this).track;$(document.body).bind("mousemove",update);update(event)}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler)){return }current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent)}helper.body.show()}else{if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;part=parts[i];i++){if(i>0){helper.body.append("<br/>")}helper.body.append(part)}helper.body.hideWhenEmpty()}else{helper.title.html(title).show();helper.body.hide()}}if(settings(this).showURL&&$(this).url()){helper.url.html($(this).url().replace("http://","")).show()}else{helper.url.hide()}helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG){helper.parent.fixPNG()}handle.apply(this,arguments)}function show(){tID=null;helper.parent.show();update()}function update(event){if($.tooltip.blocked){return }if(!track&&helper.parent.is(":visible")){$(document.body).unbind("mousemove",update)}if(current==null||!settings(current)){return }helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;helper.parent.css({left:left+"px",top:top+"px"})}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+"px"}).addClass("viewport-right")}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+"px"}).addClass("viewport-bottom")}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()}}function hide(event){if($.tooltip.blocked){return }if(tID){clearTimeout(tID)}current=null;helper.parent.hide().removeClass(settings(this).extraClass);if(settings(this).fixPNG){helper.parent.unfixPNG()}}$.fn.Tooltip=$.fn.tooltip})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/coal.css b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/coal.css
new file mode 100644 (file)
index 0000000..e6b95ef
--- /dev/null
@@ -0,0 +1,319 @@
+.fl-theme-coal .ui-helper-hidden{display:none;}
+.fl-theme-coal .ui-helper-hidden-accessible{position:absolute;left:-99999999px;}
+.fl-theme-coal .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none;}
+.fl-theme-coal .ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
+.fl-theme-coal .ui-helper-clearfix{display:inline-block;}
+/* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix{height:1%;}
+.fl-theme-coal .ui-helper-clearfix{display:block;}
+/* end clearfix */ .fl-theme-coal .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0);}
+.fl-theme-coal .ui-state-disabled{cursor:default!important;}
+.fl-theme-coal .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;}
+.fl-theme-coal .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
+.fl-theme-coal .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-coal .ui-widget input,.fl-theme-coal .ui-widget select,.fl-theme-coal .ui-widget textarea,.fl-theme-coal .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-coal .ui-widget-content{border:1px solid #ccc;background:#ccc url(images/ui-bg_flat_75_cccccc_40x100.png) 50% 50% repeat-x;color:#222;}
+.fl-theme-coal .ui-widget-content a{color:#222;}
+.fl-theme-coal .ui-widget-header{border:1px solid #00000;background:#575757 url(images/ui-bg_highlight-soft_25_575757_1x100.png) 50% 50% repeat-x;color:#ccc;font-weight:bold;}
+.fl-theme-coal .ui-widget-header a{color:#ccc;}
+.fl-theme-coal .ui-state-default,.fl-theme-coal .ui-widget-content .ui-state-default{border:1px solid #000;background:#333 url(images/ui-bg_highlight-soft_75_333333_1x100.png) 50% 50% repeat-x;font-weight:normal;color:#a3a3a3;outline:none;}
+.fl-theme-coal .ui-state-default a,.fl-theme-coal .ui-state-default a:link,.fl-theme-coal .ui-state-default a:visited{color:#a3a3a3;text-decoration:none;outline:none;}
+.fl-theme-coal .ui-state-hover,.fl-theme-coal .ui-widget-content .ui-state-hover,.fl-theme-coal .ui-state-focus,.fl-theme-coal .ui-widget-content .ui-state-focus{border:1px solid #000;background:#666 url(images/ui-bg_highlight-soft_75_666666_1x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
+.fl-theme-coal .ui-state-hover a,.fl-theme-coal .ui-state-hover a:hover{color:#fff;text-decoration:none;outline:none;}
+.fl-theme-coal .ui-state-active,.fl-theme-coal .ui-widget-content .ui-state-active{border:1px solid #000;background:#000 url(images/ui-bg_highlight-soft_65_000000_1x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
+.fl-theme-coal .ui-state-active a,.fl-theme-coal .ui-state-active a:link,.fl-theme-coal .ui-state-active a:visited{color:#fff;outline:none;text-decoration:none;}
+.fl-theme-coal .ui-state-highlight,.fl-theme-coal .ui-widget-content .ui-state-highlight{border:1px solid #666;background:#ccc url(images/ui-bg_highlight-soft_55_cccccc_1x100.png) 50% top repeat-x;color:#000;}
+.fl-theme-coal .ui-state-highlight a,.fl-theme-coal .ui-widget-content .ui-state-highlight a{color:#000;}
+.fl-theme-coal .ui-state-error,.fl-theme-coal .ui-widget-content .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_inset-soft_95_fef1ec_1x100.png) 50% bottom repeat-x;color:#cd0a0a;}
+.fl-theme-coal .ui-state-error a,.fl-theme-coal .ui-widget-content .ui-state-error a{color:#cd0a0a;}
+.fl-theme-coal .ui-state-error-text,.fl-theme-coal .ui-widget-content .ui-state-error-text{color:#cd0a0a;}
+.fl-theme-coal .ui-state-disabled,.fl-theme-coal .ui-widget-content .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none;}
+.fl-theme-coal .ui-priority-primary,.fl-theme-coal .ui-widget-content .ui-priority-primary{font-weight:bold;}
+.fl-theme-coal .ui-priority-secondary,.fl-theme-coal .ui-widget-content .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal;}
+.fl-theme-coal .ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_222222_256x240.png);}
+.fl-theme-coal .ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png);}
+.fl-theme-coal .ui-widget-header .ui-icon{background-image:url(images/ui-icons_cccccc_256x240.png);}
+.fl-theme-coal .ui-state-default .ui-icon{background-image:url(images/ui-icons_a3a3a3_256x240.png);}
+.fl-theme-coal .ui-state-hover .ui-icon,.fl-theme-coal .ui-state-focus .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-coal .ui-state-active .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-coal .ui-state-highlight .ui-icon{background-image:url(images/ui-icons_333333_256x240.png);}
+.fl-theme-coal .ui-state-error .ui-icon,.fl-theme-coal .ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png);}
+.fl-theme-coal .ui-icon-carat-1-n{background-position:0 0;}
+.fl-theme-coal .ui-icon-carat-1-ne{background-position:-16px 0;}
+.fl-theme-coal .ui-icon-carat-1-e{background-position:-32px 0;}
+.fl-theme-coal .ui-icon-carat-1-se{background-position:-48px 0;}
+.fl-theme-coal .ui-icon-carat-1-s{background-position:-64px 0;}
+.fl-theme-coal .ui-icon-carat-1-sw{background-position:-80px 0;}
+.fl-theme-coal .ui-icon-carat-1-w{background-position:-96px 0;}
+.fl-theme-coal .ui-icon-carat-1-nw{background-position:-112px 0;}
+.fl-theme-coal .ui-icon-carat-2-n-s{background-position:-128px 0;}
+.fl-theme-coal .ui-icon-carat-2-e-w{background-position:-144px 0;}
+.fl-theme-coal .ui-icon-triangle-1-n{background-position:0 -16px;}
+.fl-theme-coal .ui-icon-triangle-1-ne{background-position:-16px -16px;}
+.fl-theme-coal .ui-icon-triangle-1-e{background-position:-32px -16px;}
+.fl-theme-coal .ui-icon-triangle-1-se{background-position:-48px -16px;}
+.fl-theme-coal .ui-icon-triangle-1-s{background-position:-64px -16px;}
+.fl-theme-coal .ui-icon-triangle-1-sw{background-position:-80px -16px;}
+.fl-theme-coal .ui-icon-triangle-1-w{background-position:-96px -16px;}
+.fl-theme-coal .ui-icon-triangle-1-nw{background-position:-112px -16px;}
+.fl-theme-coal .ui-icon-triangle-2-n-s{background-position:-128px -16px;}
+.fl-theme-coal .ui-icon-triangle-2-e-w{background-position:-144px -16px;}
+.fl-theme-coal .ui-icon-arrow-1-n{background-position:0 -32px;}
+.fl-theme-coal .ui-icon-arrow-1-ne{background-position:-16px -32px;}
+.fl-theme-coal .ui-icon-arrow-1-e{background-position:-32px -32px;}
+.fl-theme-coal .ui-icon-arrow-1-se{background-position:-48px -32px;}
+.fl-theme-coal .ui-icon-arrow-1-s{background-position:-64px -32px;}
+.fl-theme-coal .ui-icon-arrow-1-sw{background-position:-80px -32px;}
+.fl-theme-coal .ui-icon-arrow-1-w{background-position:-96px -32px;}
+.fl-theme-coal .ui-icon-arrow-1-nw{background-position:-112px -32px;}
+.fl-theme-coal .ui-icon-arrow-2-n-s{background-position:-128px -32px;}
+.fl-theme-coal .ui-icon-arrow-2-ne-sw{background-position:-144px -32px;}
+.fl-theme-coal .ui-icon-arrow-2-e-w{background-position:-160px -32px;}
+.fl-theme-coal .ui-icon-arrow-2-se-nw{background-position:-176px -32px;}
+.fl-theme-coal .ui-icon-arrowstop-1-n{background-position:-192px -32px;}
+.fl-theme-coal .ui-icon-arrowstop-1-e{background-position:-208px -32px;}
+.fl-theme-coal .ui-icon-arrowstop-1-s{background-position:-224px -32px;}
+.fl-theme-coal .ui-icon-arrowstop-1-w{background-position:-240px -32px;}
+.fl-theme-coal .ui-icon-arrowthick-1-n{background-position:0 -48px;}
+.fl-theme-coal .ui-icon-arrowthick-1-ne{background-position:-16px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-1-e{background-position:-32px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-1-se{background-position:-48px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-1-s{background-position:-64px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-1-sw{background-position:-80px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-1-w{background-position:-96px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-1-nw{background-position:-112px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-2-n-s{background-position:-128px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-2-e-w{background-position:-160px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-2-se-nw{background-position:-176px -48px;}
+.fl-theme-coal .ui-icon-arrowthickstop-1-n{background-position:-192px -48px;}
+.fl-theme-coal .ui-icon-arrowthickstop-1-e{background-position:-208px -48px;}
+.fl-theme-coal .ui-icon-arrowthickstop-1-s{background-position:-224px -48px;}
+.fl-theme-coal .ui-icon-arrowthickstop-1-w{background-position:-240px -48px;}
+.fl-theme-coal .ui-icon-arrowreturnthick-1-w{background-position:0 -64px;}
+.fl-theme-coal .ui-icon-arrowreturnthick-1-n{background-position:-16px -64px;}
+.fl-theme-coal .ui-icon-arrowreturnthick-1-e{background-position:-32px -64px;}
+.fl-theme-coal .ui-icon-arrowreturnthick-1-s{background-position:-48px -64px;}
+.fl-theme-coal .ui-icon-arrowreturn-1-w{background-position:-64px -64px;}
+.fl-theme-coal .ui-icon-arrowreturn-1-n{background-position:-80px -64px;}
+.fl-theme-coal .ui-icon-arrowreturn-1-e{background-position:-96px -64px;}
+.fl-theme-coal .ui-icon-arrowreturn-1-s{background-position:-112px -64px;}
+.fl-theme-coal .ui-icon-arrowrefresh-1-w{background-position:-128px -64px;}
+.fl-theme-coal .ui-icon-arrowrefresh-1-n{background-position:-144px -64px;}
+.fl-theme-coal .ui-icon-arrowrefresh-1-e{background-position:-160px -64px;}
+.fl-theme-coal .ui-icon-arrowrefresh-1-s{background-position:-176px -64px;}
+.fl-theme-coal .ui-icon-arrow-4{background-position:0 -80px;}
+.fl-theme-coal .ui-icon-arrow-4-diag{background-position:-16px -80px;}
+.fl-theme-coal .ui-icon-extlink{background-position:-32px -80px;}
+.fl-theme-coal .ui-icon-newwin{background-position:-48px -80px;}
+.fl-theme-coal .ui-icon-refresh{background-position:-64px -80px;}
+.fl-theme-coal .ui-icon-shuffle{background-position:-80px -80px;}
+.fl-theme-coal .ui-icon-transfer-e-w{background-position:-96px -80px;}
+.fl-theme-coal .ui-icon-transferthick-e-w{background-position:-112px -80px;}
+.fl-theme-coal .ui-icon-folder-collapsed{background-position:0 -96px;}
+.fl-theme-coal .ui-icon-folder-open{background-position:-16px -96px;}
+.fl-theme-coal .ui-icon-document{background-position:-32px -96px;}
+.fl-theme-coal .ui-icon-document-b{background-position:-48px -96px;}
+.fl-theme-coal .ui-icon-note{background-position:-64px -96px;}
+.fl-theme-coal .ui-icon-mail-closed{background-position:-80px -96px;}
+.fl-theme-coal .ui-icon-mail-open{background-position:-96px -96px;}
+.fl-theme-coal .ui-icon-suitcase{background-position:-112px -96px;}
+.fl-theme-coal .ui-icon-comment{background-position:-128px -96px;}
+.fl-theme-coal .ui-icon-person{background-position:-144px -96px;}
+.fl-theme-coal .ui-icon-print{background-position:-160px -96px;}
+.fl-theme-coal .ui-icon-trash{background-position:-176px -96px;}
+.fl-theme-coal .ui-icon-locked{background-position:-192px -96px;}
+.fl-theme-coal .ui-icon-unlocked{background-position:-208px -96px;}
+.fl-theme-coal .ui-icon-bookmark{background-position:-224px -96px;}
+.fl-theme-coal .ui-icon-tag{background-position:-240px -96px;}
+.fl-theme-coal .ui-icon-home{background-position:0 -112px;}
+.fl-theme-coal .ui-icon-flag{background-position:-16px -112px;}
+.fl-theme-coal .ui-icon-calendar{background-position:-32px -112px;}
+.fl-theme-coal .ui-icon-cart{background-position:-48px -112px;}
+.fl-theme-coal .ui-icon-pencil{background-position:-64px -112px;}
+.fl-theme-coal .ui-icon-clock{background-position:-80px -112px;}
+.fl-theme-coal .ui-icon-disk{background-position:-96px -112px;}
+.fl-theme-coal .ui-icon-calculator{background-position:-112px -112px;}
+.fl-theme-coal .ui-icon-zoomin{background-position:-128px -112px;}
+.fl-theme-coal .ui-icon-zoomout{background-position:-144px -112px;}
+.fl-theme-coal .ui-icon-search{background-position:-160px -112px;}
+.fl-theme-coal .ui-icon-wrench{background-position:-176px -112px;}
+.fl-theme-coal .ui-icon-gear{background-position:-192px -112px;}
+.fl-theme-coal .ui-icon-heart{background-position:-208px -112px;}
+.fl-theme-coal .ui-icon-star{background-position:-224px -112px;}
+.fl-theme-coal .ui-icon-link{background-position:-240px -112px;}
+.fl-theme-coal .ui-icon-cancel{background-position:0 -128px;}
+.fl-theme-coal .ui-icon-plus{background-position:-16px -128px;}
+.fl-theme-coal .ui-icon-plusthick{background-position:-32px -128px;}
+.fl-theme-coal .ui-icon-minus{background-position:-48px -128px;}
+.fl-theme-coal .ui-icon-minusthick{background-position:-64px -128px;}
+.fl-theme-coal .ui-icon-close{background-position:-80px -128px;}
+.fl-theme-coal .ui-icon-closethick{background-position:-96px -128px;}
+.fl-theme-coal .ui-icon-key{background-position:-112px -128px;}
+.fl-theme-coal .ui-icon-lightbulb{background-position:-128px -128px;}
+.fl-theme-coal .ui-icon-scissors{background-position:-144px -128px;}
+.fl-theme-coal .ui-icon-clipboard{background-position:-160px -128px;}
+.fl-theme-coal .ui-icon-copy{background-position:-176px -128px;}
+.fl-theme-coal .ui-icon-contact{background-position:-192px -128px;}
+.fl-theme-coal .ui-icon-image{background-position:-208px -128px;}
+.fl-theme-coal .ui-icon-video{background-position:-224px -128px;}
+.fl-theme-coal .ui-icon-script{background-position:-240px -128px;}
+.fl-theme-coal .ui-icon-alert{background-position:0 -144px;}
+.fl-theme-coal .ui-icon-info{background-position:-16px -144px;}
+.fl-theme-coal .ui-icon-notice{background-position:-32px -144px;}
+.fl-theme-coal .ui-icon-help{background-position:-48px -144px;}
+.fl-theme-coal .ui-icon-check{background-position:-64px -144px;}
+.fl-theme-coal .ui-icon-bullet{background-position:-80px -144px;}
+.fl-theme-coal .ui-icon-radio-off{background-position:-96px -144px;}
+.fl-theme-coal .ui-icon-radio-on{background-position:-112px -144px;}
+.fl-theme-coal .ui-icon-pin-w{background-position:-128px -144px;}
+.fl-theme-coal .ui-icon-pin-s{background-position:-144px -144px;}
+.fl-theme-coal .ui-icon-play{background-position:0 -160px;}
+.fl-theme-coal .ui-icon-pause{background-position:-16px -160px;}
+.fl-theme-coal .ui-icon-seek-next{background-position:-32px -160px;}
+.fl-theme-coal .ui-icon-seek-prev{background-position:-48px -160px;}
+.fl-theme-coal .ui-icon-seek-end{background-position:-64px -160px;}
+.fl-theme-coal .ui-icon-seek-first{background-position:-80px -160px;}
+.fl-theme-coal .ui-icon-stop{background-position:-96px -160px;}
+.fl-theme-coal .ui-icon-eject{background-position:-112px -160px;}
+.fl-theme-coal .ui-icon-volume-off{background-position:-128px -160px;}
+.fl-theme-coal .ui-icon-volume-on{background-position:-144px -160px;}
+.fl-theme-coal .ui-icon-power{background-position:0 -176px;}
+.fl-theme-coal .ui-icon-signal-diag{background-position:-16px -176px;}
+.fl-theme-coal .ui-icon-signal{background-position:-32px -176px;}
+.fl-theme-coal .ui-icon-battery-0{background-position:-48px -176px;}
+.fl-theme-coal .ui-icon-battery-1{background-position:-64px -176px;}
+.fl-theme-coal .ui-icon-battery-2{background-position:-80px -176px;}
+.fl-theme-coal .ui-icon-battery-3{background-position:-96px -176px;}
+.fl-theme-coal .ui-icon-circle-plus{background-position:0 -192px;}
+.fl-theme-coal .ui-icon-circle-minus{background-position:-16px -192px;}
+.fl-theme-coal .ui-icon-circle-close{background-position:-32px -192px;}
+.fl-theme-coal .ui-icon-circle-triangle-e{background-position:-48px -192px;}
+.fl-theme-coal .ui-icon-circle-triangle-s{background-position:-64px -192px;}
+.fl-theme-coal .ui-icon-circle-triangle-w{background-position:-80px -192px;}
+.fl-theme-coal .ui-icon-circle-triangle-n{background-position:-96px -192px;}
+.fl-theme-coal .ui-icon-circle-arrow-e{background-position:-112px -192px;}
+.fl-theme-coal .ui-icon-circle-arrow-s{background-position:-128px -192px;}
+.fl-theme-coal .ui-icon-circle-arrow-w{background-position:-144px -192px;}
+.fl-theme-coal .ui-icon-circle-arrow-n{background-position:-160px -192px;}
+.fl-theme-coal .ui-icon-circle-zoomin{background-position:-176px -192px;}
+.fl-theme-coal .ui-icon-circle-zoomout{background-position:-192px -192px;}
+.fl-theme-coal .ui-icon-circle-check{background-position:-208px -192px;}
+.fl-theme-coal .ui-icon-circlesmall-plus{background-position:0 -208px;}
+.fl-theme-coal .ui-icon-circlesmall-minus{background-position:-16px -208px;}
+.fl-theme-coal .ui-icon-circlesmall-close{background-position:-32px -208px;}
+.fl-theme-coal .ui-icon-squaresmall-plus{background-position:-48px -208px;}
+.fl-theme-coal .ui-icon-squaresmall-minus{background-position:-64px -208px;}
+.fl-theme-coal .ui-icon-squaresmall-close{background-position:-80px -208px;}
+.fl-theme-coal .ui-icon-grip-dotted-vertical{background-position:0 -224px;}
+.fl-theme-coal .ui-icon-grip-dotted-horizontal{background-position:-16px -224px;}
+.fl-theme-coal .ui-icon-grip-solid-vertical{background-position:-32px -224px;}
+.fl-theme-coal .ui-icon-grip-solid-horizontal{background-position:-48px -224px;}
+.fl-theme-coal .ui-icon-gripsmall-diagonal-se{background-position:-64px -224px;}
+.fl-theme-coal .ui-icon-grip-diagonal-se{background-position:-80px -224px;}
+.fl-theme-coal .ui-corner-tl{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;}
+.fl-theme-coal .ui-corner-tr{-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;}
+.fl-theme-coal .ui-corner-bl{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;}
+.fl-theme-coal .ui-corner-br{-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;}
+.fl-theme-coal .ui-corner-top{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;}
+.fl-theme-coal .ui-corner-bottom{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;}
+.fl-theme-coal .ui-corner-right{-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;}
+.fl-theme-coal .ui-corner-left{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;}
+.fl-theme-coal .ui-corner-all{-moz-border-radius:0;-webkit-border-radius:0;}
+.fl-theme-coal .ui-widget-overlay{background:#000 url(images/ui-bg_flat_0_000000_40x100.png) 50% 50% repeat-x;opacity:.40;filter:Alpha(Opacity=40);}
+.fl-theme-coal .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flat_0_000000_40x100.png) 50% 50% repeat-x;opacity:.50;filter:Alpha(Opacity=50);-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-coal .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}
+.fl-theme-coal .ui-accordion .ui-accordion-li-fix{display:inline;}
+.fl-theme-coal .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}
+.fl-theme-coal .ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em 2.2em;}
+.fl-theme-coal .ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px;}
+.fl-theme-coal .ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;}
+.fl-theme-coal .ui-accordion .ui-accordion-content-active{display:block;}
+.fl-theme-coal .ui-datepicker{width:17em;padding:.2em .2em 0;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-prev,.fl-theme-coal .ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-prev-hover,.fl-theme-coal .ui-datepicker .ui-datepicker-next-hover{top:1px;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-prev{left:2px;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-next{right:2px;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-prev-hover{left:1px;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-next-hover{right:1px;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-prev span,.fl-theme-coal .ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-title select{float:left;font-size:1em;margin:1px 0;}
+.fl-theme-coal .ui-datepicker select.ui-datepicker-month-year{width:100%;}
+.fl-theme-coal .ui-datepicker select.ui-datepicker-month,.fl-theme-coal .ui-datepicker select.ui-datepicker-year{width:49%;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-title select.ui-datepicker-year{float:right;}
+.fl-theme-coal .ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em;}
+.fl-theme-coal .ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0;}
+.fl-theme-coal .ui-datepicker td{border:0;padding:1px;}
+.fl-theme-coal .ui-datepicker td span,.fl-theme-coal .ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left;}
+.fl-theme-coal .ui-datepicker.ui-datepicker-multi{width:auto;}
+.fl-theme-coal .ui-datepicker-multi .ui-datepicker-group{float:left;}
+.fl-theme-coal .ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em;}
+.fl-theme-coal .ui-datepicker-multi-2 .ui-datepicker-group{width:50%;}
+.fl-theme-coal .ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%;}
+.fl-theme-coal .ui-datepicker-multi-4 .ui-datepicker-group{width:25%;}
+.fl-theme-coal .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0;}
+.fl-theme-coal .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0;}
+.fl-theme-coal .ui-datepicker-multi .ui-datepicker-buttonpane{clear:left;}
+.fl-theme-coal .ui-datepicker-row-break{clear:both;width:100%;}
+.fl-theme-coal .ui-datepicker-rtl{direction:rtl;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-group{float:right;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-coal .ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px;}
+.fl-theme-coal .ui-dialog{position:relative;padding:.2em;width:300px;}
+.fl-theme-coal .ui-dialog .ui-dialog-titlebar{padding:.5em .3em .3em 1em;position:relative;}
+.fl-theme-coal .ui-dialog .ui-dialog-title{float:left;margin:.1em 0 .2em;}
+.fl-theme-coal .ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px;}
+.fl-theme-coal .ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px;}
+.fl-theme-coal .ui-dialog .ui-dialog-titlebar-close:hover,.fl-theme-coal .ui-dialog .ui-dialog-titlebar-close:focus{padding:0;}
+.fl-theme-coal .ui-dialog .ui-dialog-content{border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1;}
+.fl-theme-coal .ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em;}
+.fl-theme-coal .ui-dialog .ui-dialog-buttonpane button{float:right;margin:.5em .4em .5em 0;cursor:pointer;padding:.2em .6em .3em .6em;line-height:1.4em;width:auto;overflow:visible;}
+.fl-theme-coal .ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px;}
+.fl-theme-coal .ui-draggable .ui-dialog-titlebar{cursor:move;}
+.fl-theme-coal .ui-progressbar{height:2em;text-align:left;}
+.fl-theme-coal .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%;}
+.fl-theme-coal .ui-resizable{position:relative;}
+.fl-theme-coal .ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block;}
+.fl-theme-coal .ui-resizable-disabled .ui-resizable-handle,.fl-theme-coal .ui-resizable-autohide .ui-resizable-handle{display:none;}
+.fl-theme-coal .ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0;}
+.fl-theme-coal .ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0;}
+.fl-theme-coal .ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%;}
+.fl-theme-coal .ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%;}
+.fl-theme-coal .ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px;}
+.fl-theme-coal .ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px;}
+.fl-theme-coal .ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px;}
+.fl-theme-coal .ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px;}
+.fl-theme-coal .ui-slider{position:relative;text-align:left;}
+.fl-theme-coal .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;}
+.fl-theme-coal .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;}
+.fl-theme-coal .ui-slider-horizontal{height:.8em;}
+.fl-theme-coal .ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em;}
+.fl-theme-coal .ui-slider-horizontal .ui-slider-range{top:0;height:100%;}
+.fl-theme-coal .ui-slider-horizontal .ui-slider-range-min{left:0;}
+.fl-theme-coal .ui-slider-horizontal .ui-slider-range-max{right:0;}
+.fl-theme-coal .ui-slider-vertical{width:.8em;height:100px;}
+.fl-theme-coal .ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em;}
+.fl-theme-coal .ui-slider-vertical .ui-slider-range{left:0;width:100%;}
+.fl-theme-coal .ui-slider-vertical .ui-slider-range-min{bottom:0;}
+.fl-theme-coal .ui-slider-vertical .ui-slider-range-max{top:0;}
+.fl-theme-coal .ui-tabs{padding:.2em;zoom:1;}
+.fl-theme-coal .ui-tabs .ui-tabs-nav{list-style:none;position:relative;padding:.2em .2em 0;}
+.fl-theme-coal .ui-tabs .ui-tabs-nav li{position:relative;float:left;border-bottom-width:0!important;margin:0 .2em -1px 0;padding:0;}
+.fl-theme-coal .ui-tabs .ui-tabs-nav li a{float:left;text-decoration:none;padding:.5em 1em;}
+.fl-theme-coal .ui-tabs .ui-tabs-nav li.ui-tabs-selected{padding-bottom:1px;border-bottom-width:0;}
+.fl-theme-coal .ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.fl-theme-coal .ui-tabs .ui-tabs-nav li.ui-state-disabled a,.fl-theme-coal .ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text;}
+.fl-theme-coal .ui-tabs .ui-tabs-nav li a,.fl-theme-coal .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer;}
+.fl-theme-coal .ui-tabs .ui-tabs-panel{padding:1em 1.4em;display:block;border-width:0;background:none;}
+.fl-theme-coal .ui-tabs .ui-tabs-hide{display:none!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_0_000000_40x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_0_000000_40x100.png
new file mode 100644 (file)
index 0000000..abdc010
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_0_000000_40x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_75_cccccc_40x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_75_cccccc_40x100.png
new file mode 100644 (file)
index 0000000..5473aff
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_75_cccccc_40x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_25_575757_1x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_25_575757_1x100.png
new file mode 100644 (file)
index 0000000..3a8f50c
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_25_575757_1x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_55_cccccc_1x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_55_cccccc_1x100.png
new file mode 100644 (file)
index 0000000..13e421b
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_55_cccccc_1x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_65_000000_1x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_65_000000_1x100.png
new file mode 100644 (file)
index 0000000..f07ec5f
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_65_000000_1x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_333333_1x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_333333_1x100.png
new file mode 100644 (file)
index 0000000..b932638
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_333333_1x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_666666_1x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_666666_1x100.png
new file mode 100644 (file)
index 0000000..053c7aa
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_666666_1x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_inset-soft_95_fef1ec_1x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_inset-soft_95_fef1ec_1x100.png
new file mode 100644 (file)
index 0000000..0e05810
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_inset-soft_95_fef1ec_1x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_222222_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_222222_256x240.png
new file mode 100644 (file)
index 0000000..67560da
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_222222_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_333333_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_333333_256x240.png
new file mode 100644 (file)
index 0000000..4d44b9b
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_333333_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_a3a3a3_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_a3a3a3_256x240.png
new file mode 100644 (file)
index 0000000..6ef54f5
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_a3a3a3_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cccccc_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cccccc_256x240.png
new file mode 100644 (file)
index 0000000..bdb3cf2
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cccccc_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cd0a0a_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cd0a0a_256x240.png
new file mode 100644 (file)
index 0000000..2db88b7
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cd0a0a_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_ffffff_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_ffffff_256x240.png
new file mode 100644 (file)
index 0000000..746e6fa
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_ffffff_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/hc.css b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/hc.css
new file mode 100644 (file)
index 0000000..7a509ab
--- /dev/null
@@ -0,0 +1,319 @@
+.fl-theme-hc .ui-helper-hidden{display:none;}
+.fl-theme-hc .ui-helper-hidden-accessible{position:absolute;left:-99999999px;}
+.fl-theme-hc .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none;}
+.fl-theme-hc .ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
+.fl-theme-hc .ui-helper-clearfix{display:inline-block;}
+/* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix{height:1%;}
+.fl-theme-hc .ui-helper-clearfix{display:block;}
+/* end clearfix */ .fl-theme-hc .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0);}
+.fl-theme-hc .ui-state-disabled{cursor:default!important;}
+.fl-theme-hc .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;}
+.fl-theme-hc .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
+.fl-theme-hc .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-hc .ui-widget input,.fl-theme-hc .ui-widget select,.fl-theme-hc .ui-widget textarea,.fl-theme-hc .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-hc .ui-widget-content{border:1px solid #000;background:#fff url(images/ui-bg_flat_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;}
+.fl-theme-hc .ui-widget-content a{color:#000;}
+.fl-theme-hc .ui-widget-header{border:1px solid #000;background:#fff url(images/ui-bg_flat_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;font-weight:bold;}
+.fl-theme-hc .ui-widget-header a{color:#000;}
+.fl-theme-hc .ui-state-default,.fl-theme-hc .ui-widget-content .ui-state-default{border:1px solid #000;background:#000 url(images/ui-bg_flat_0_000000_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
+.fl-theme-hc .ui-state-default a,.fl-theme-hc .ui-state-default a:link,.fl-theme-hc .ui-state-default a:visited{color:#fff;text-decoration:none;outline:none;}
+.fl-theme-hc .ui-state-hover,.fl-theme-hc .ui-widget-content .ui-state-hover,.fl-theme-hc .ui-state-focus,.fl-theme-hc .ui-widget-content .ui-state-focus{border:1px solid #000;background:#fff url(images/ui-bg_flat_0_ffffff_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
+.fl-theme-hc .ui-state-hover a,.fl-theme-hc .ui-state-hover a:hover{color:#000;text-decoration:none;outline:none;}
+.fl-theme-hc .ui-state-active,.fl-theme-hc .ui-widget-content .ui-state-active{border:1px solid #000;background:#fff url(images/ui-bg_flat_0_ffffff_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
+.fl-theme-hc .ui-state-active a,.fl-theme-hc .ui-state-active a:link,.fl-theme-hc .ui-state-active a:visited{color:#000;outline:none;text-decoration:none;}
+.fl-theme-hc .ui-state-highlight,.fl-theme-hc .ui-widget-content .ui-state-highlight{border:1px solid #000;background:#fff url(images/ui-bg_flat_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;}
+.fl-theme-hc .ui-state-highlight a,.fl-theme-hc .ui-widget-content .ui-state-highlight a{color:#000;}
+.fl-theme-hc .ui-state-error,.fl-theme-hc .ui-widget-content .ui-state-error{border:1px solid #fff;background:#000 url(images/ui-bg_flat_0_000000_40x100.png) 50% 50% repeat-x;color:#fff;}
+.fl-theme-hc .ui-state-error a,.fl-theme-hc .ui-widget-content .ui-state-error a{color:#fff;}
+.fl-theme-hc .ui-state-error-text,.fl-theme-hc .ui-widget-content .ui-state-error-text{color:#fff;}
+.fl-theme-hc .ui-state-disabled,.fl-theme-hc .ui-widget-content .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none;}
+.fl-theme-hc .ui-priority-primary,.fl-theme-hc .ui-widget-content .ui-priority-primary{font-weight:bold;}
+.fl-theme-hc .ui-priority-secondary,.fl-theme-hc .ui-widget-content .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal;}
+.fl-theme-hc .ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hc .ui-widget-content .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hc .ui-widget-header .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hc .ui-state-default .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-hc .ui-state-hover .ui-icon,.fl-theme-hc .ui-state-focus .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hc .ui-state-active .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hc .ui-state-highlight .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hc .ui-state-error .ui-icon,.fl-theme-hc .ui-state-error-text .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-hc .ui-icon-carat-1-n{background-position:0 0;}
+.fl-theme-hc .ui-icon-carat-1-ne{background-position:-16px 0;}
+.fl-theme-hc .ui-icon-carat-1-e{background-position:-32px 0;}
+.fl-theme-hc .ui-icon-carat-1-se{background-position:-48px 0;}
+.fl-theme-hc .ui-icon-carat-1-s{background-position:-64px 0;}
+.fl-theme-hc .ui-icon-carat-1-sw{background-position:-80px 0;}
+.fl-theme-hc .ui-icon-carat-1-w{background-position:-96px 0;}
+.fl-theme-hc .ui-icon-carat-1-nw{background-position:-112px 0;}
+.fl-theme-hc .ui-icon-carat-2-n-s{background-position:-128px 0;}
+.fl-theme-hc .ui-icon-carat-2-e-w{background-position:-144px 0;}
+.fl-theme-hc .ui-icon-triangle-1-n{background-position:0 -16px;}
+.fl-theme-hc .ui-icon-triangle-1-ne{background-position:-16px -16px;}
+.fl-theme-hc .ui-icon-triangle-1-e{background-position:-32px -16px;}
+.fl-theme-hc .ui-icon-triangle-1-se{background-position:-48px -16px;}
+.fl-theme-hc .ui-icon-triangle-1-s{background-position:-64px -16px;}
+.fl-theme-hc .ui-icon-triangle-1-sw{background-position:-80px -16px;}
+.fl-theme-hc .ui-icon-triangle-1-w{background-position:-96px -16px;}
+.fl-theme-hc .ui-icon-triangle-1-nw{background-position:-112px -16px;}
+.fl-theme-hc .ui-icon-triangle-2-n-s{background-position:-128px -16px;}
+.fl-theme-hc .ui-icon-triangle-2-e-w{background-position:-144px -16px;}
+.fl-theme-hc .ui-icon-arrow-1-n{background-position:0 -32px;}
+.fl-theme-hc .ui-icon-arrow-1-ne{background-position:-16px -32px;}
+.fl-theme-hc .ui-icon-arrow-1-e{background-position:-32px -32px;}
+.fl-theme-hc .ui-icon-arrow-1-se{background-position:-48px -32px;}
+.fl-theme-hc .ui-icon-arrow-1-s{background-position:-64px -32px;}
+.fl-theme-hc .ui-icon-arrow-1-sw{background-position:-80px -32px;}
+.fl-theme-hc .ui-icon-arrow-1-w{background-position:-96px -32px;}
+.fl-theme-hc .ui-icon-arrow-1-nw{background-position:-112px -32px;}
+.fl-theme-hc .ui-icon-arrow-2-n-s{background-position:-128px -32px;}
+.fl-theme-hc .ui-icon-arrow-2-ne-sw{background-position:-144px -32px;}
+.fl-theme-hc .ui-icon-arrow-2-e-w{background-position:-160px -32px;}
+.fl-theme-hc .ui-icon-arrow-2-se-nw{background-position:-176px -32px;}
+.fl-theme-hc .ui-icon-arrowstop-1-n{background-position:-192px -32px;}
+.fl-theme-hc .ui-icon-arrowstop-1-e{background-position:-208px -32px;}
+.fl-theme-hc .ui-icon-arrowstop-1-s{background-position:-224px -32px;}
+.fl-theme-hc .ui-icon-arrowstop-1-w{background-position:-240px -32px;}
+.fl-theme-hc .ui-icon-arrowthick-1-n{background-position:0 -48px;}
+.fl-theme-hc .ui-icon-arrowthick-1-ne{background-position:-16px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-1-e{background-position:-32px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-1-se{background-position:-48px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-1-s{background-position:-64px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-1-sw{background-position:-80px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-1-w{background-position:-96px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-1-nw{background-position:-112px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-2-n-s{background-position:-128px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-2-e-w{background-position:-160px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-2-se-nw{background-position:-176px -48px;}
+.fl-theme-hc .ui-icon-arrowthickstop-1-n{background-position:-192px -48px;}
+.fl-theme-hc .ui-icon-arrowthickstop-1-e{background-position:-208px -48px;}
+.fl-theme-hc .ui-icon-arrowthickstop-1-s{background-position:-224px -48px;}
+.fl-theme-hc .ui-icon-arrowthickstop-1-w{background-position:-240px -48px;}
+.fl-theme-hc .ui-icon-arrowreturnthick-1-w{background-position:0 -64px;}
+.fl-theme-hc .ui-icon-arrowreturnthick-1-n{background-position:-16px -64px;}
+.fl-theme-hc .ui-icon-arrowreturnthick-1-e{background-position:-32px -64px;}
+.fl-theme-hc .ui-icon-arrowreturnthick-1-s{background-position:-48px -64px;}
+.fl-theme-hc .ui-icon-arrowreturn-1-w{background-position:-64px -64px;}
+.fl-theme-hc .ui-icon-arrowreturn-1-n{background-position:-80px -64px;}
+.fl-theme-hc .ui-icon-arrowreturn-1-e{background-position:-96px -64px;}
+.fl-theme-hc .ui-icon-arrowreturn-1-s{background-position:-112px -64px;}
+.fl-theme-hc .ui-icon-arrowrefresh-1-w{background-position:-128px -64px;}
+.fl-theme-hc .ui-icon-arrowrefresh-1-n{background-position:-144px -64px;}
+.fl-theme-hc .ui-icon-arrowrefresh-1-e{background-position:-160px -64px;}
+.fl-theme-hc .ui-icon-arrowrefresh-1-s{background-position:-176px -64px;}
+.fl-theme-hc .ui-icon-arrow-4{background-position:0 -80px;}
+.fl-theme-hc .ui-icon-arrow-4-diag{background-position:-16px -80px;}
+.fl-theme-hc .ui-icon-extlink{background-position:-32px -80px;}
+.fl-theme-hc .ui-icon-newwin{background-position:-48px -80px;}
+.fl-theme-hc .ui-icon-refresh{background-position:-64px -80px;}
+.fl-theme-hc .ui-icon-shuffle{background-position:-80px -80px;}
+.fl-theme-hc .ui-icon-transfer-e-w{background-position:-96px -80px;}
+.fl-theme-hc .ui-icon-transferthick-e-w{background-position:-112px -80px;}
+.fl-theme-hc .ui-icon-folder-collapsed{background-position:0 -96px;}
+.fl-theme-hc .ui-icon-folder-open{background-position:-16px -96px;}
+.fl-theme-hc .ui-icon-document{background-position:-32px -96px;}
+.fl-theme-hc .ui-icon-document-b{background-position:-48px -96px;}
+.fl-theme-hc .ui-icon-note{background-position:-64px -96px;}
+.fl-theme-hc .ui-icon-mail-closed{background-position:-80px -96px;}
+.fl-theme-hc .ui-icon-mail-open{background-position:-96px -96px;}
+.fl-theme-hc .ui-icon-suitcase{background-position:-112px -96px;}
+.fl-theme-hc .ui-icon-comment{background-position:-128px -96px;}
+.fl-theme-hc .ui-icon-person{background-position:-144px -96px;}
+.fl-theme-hc .ui-icon-print{background-position:-160px -96px;}
+.fl-theme-hc .ui-icon-trash{background-position:-176px -96px;}
+.fl-theme-hc .ui-icon-locked{background-position:-192px -96px;}
+.fl-theme-hc .ui-icon-unlocked{background-position:-208px -96px;}
+.fl-theme-hc .ui-icon-bookmark{background-position:-224px -96px;}
+.fl-theme-hc .ui-icon-tag{background-position:-240px -96px;}
+.fl-theme-hc .ui-icon-home{background-position:0 -112px;}
+.fl-theme-hc .ui-icon-flag{background-position:-16px -112px;}
+.fl-theme-hc .ui-icon-calendar{background-position:-32px -112px;}
+.fl-theme-hc .ui-icon-cart{background-position:-48px -112px;}
+.fl-theme-hc .ui-icon-pencil{background-position:-64px -112px;}
+.fl-theme-hc .ui-icon-clock{background-position:-80px -112px;}
+.fl-theme-hc .ui-icon-disk{background-position:-96px -112px;}
+.fl-theme-hc .ui-icon-calculator{background-position:-112px -112px;}
+.fl-theme-hc .ui-icon-zoomin{background-position:-128px -112px;}
+.fl-theme-hc .ui-icon-zoomout{background-position:-144px -112px;}
+.fl-theme-hc .ui-icon-search{background-position:-160px -112px;}
+.fl-theme-hc .ui-icon-wrench{background-position:-176px -112px;}
+.fl-theme-hc .ui-icon-gear{background-position:-192px -112px;}
+.fl-theme-hc .ui-icon-heart{background-position:-208px -112px;}
+.fl-theme-hc .ui-icon-star{background-position:-224px -112px;}
+.fl-theme-hc .ui-icon-link{background-position:-240px -112px;}
+.fl-theme-hc .ui-icon-cancel{background-position:0 -128px;}
+.fl-theme-hc .ui-icon-plus{background-position:-16px -128px;}
+.fl-theme-hc .ui-icon-plusthick{background-position:-32px -128px;}
+.fl-theme-hc .ui-icon-minus{background-position:-48px -128px;}
+.fl-theme-hc .ui-icon-minusthick{background-position:-64px -128px;}
+.fl-theme-hc .ui-icon-close{background-position:-80px -128px;}
+.fl-theme-hc .ui-icon-closethick{background-position:-96px -128px;}
+.fl-theme-hc .ui-icon-key{background-position:-112px -128px;}
+.fl-theme-hc .ui-icon-lightbulb{background-position:-128px -128px;}
+.fl-theme-hc .ui-icon-scissors{background-position:-144px -128px;}
+.fl-theme-hc .ui-icon-clipboard{background-position:-160px -128px;}
+.fl-theme-hc .ui-icon-copy{background-position:-176px -128px;}
+.fl-theme-hc .ui-icon-contact{background-position:-192px -128px;}
+.fl-theme-hc .ui-icon-image{background-position:-208px -128px;}
+.fl-theme-hc .ui-icon-video{background-position:-224px -128px;}
+.fl-theme-hc .ui-icon-script{background-position:-240px -128px;}
+.fl-theme-hc .ui-icon-alert{background-position:0 -144px;}
+.fl-theme-hc .ui-icon-info{background-position:-16px -144px;}
+.fl-theme-hc .ui-icon-notice{background-position:-32px -144px;}
+.fl-theme-hc .ui-icon-help{background-position:-48px -144px;}
+.fl-theme-hc .ui-icon-check{background-position:-64px -144px;}
+.fl-theme-hc .ui-icon-bullet{background-position:-80px -144px;}
+.fl-theme-hc .ui-icon-radio-off{background-position:-96px -144px;}
+.fl-theme-hc .ui-icon-radio-on{background-position:-112px -144px;}
+.fl-theme-hc .ui-icon-pin-w{background-position:-128px -144px;}
+.fl-theme-hc .ui-icon-pin-s{background-position:-144px -144px;}
+.fl-theme-hc .ui-icon-play{background-position:0 -160px;}
+.fl-theme-hc .ui-icon-pause{background-position:-16px -160px;}
+.fl-theme-hc .ui-icon-seek-next{background-position:-32px -160px;}
+.fl-theme-hc .ui-icon-seek-prev{background-position:-48px -160px;}
+.fl-theme-hc .ui-icon-seek-end{background-position:-64px -160px;}
+.fl-theme-hc .ui-icon-seek-first{background-position:-80px -160px;}
+.fl-theme-hc .ui-icon-stop{background-position:-96px -160px;}
+.fl-theme-hc .ui-icon-eject{background-position:-112px -160px;}
+.fl-theme-hc .ui-icon-volume-off{background-position:-128px -160px;}
+.fl-theme-hc .ui-icon-volume-on{background-position:-144px -160px;}
+.fl-theme-hc .ui-icon-power{background-position:0 -176px;}
+.fl-theme-hc .ui-icon-signal-diag{background-position:-16px -176px;}
+.fl-theme-hc .ui-icon-signal{background-position:-32px -176px;}
+.fl-theme-hc .ui-icon-battery-0{background-position:-48px -176px;}
+.fl-theme-hc .ui-icon-battery-1{background-position:-64px -176px;}
+.fl-theme-hc .ui-icon-battery-2{background-position:-80px -176px;}
+.fl-theme-hc .ui-icon-battery-3{background-position:-96px -176px;}
+.fl-theme-hc .ui-icon-circle-plus{background-position:0 -192px;}
+.fl-theme-hc .ui-icon-circle-minus{background-position:-16px -192px;}
+.fl-theme-hc .ui-icon-circle-close{background-position:-32px -192px;}
+.fl-theme-hc .ui-icon-circle-triangle-e{background-position:-48px -192px;}
+.fl-theme-hc .ui-icon-circle-triangle-s{background-position:-64px -192px;}
+.fl-theme-hc .ui-icon-circle-triangle-w{background-position:-80px -192px;}
+.fl-theme-hc .ui-icon-circle-triangle-n{background-position:-96px -192px;}
+.fl-theme-hc .ui-icon-circle-arrow-e{background-position:-112px -192px;}
+.fl-theme-hc .ui-icon-circle-arrow-s{background-position:-128px -192px;}
+.fl-theme-hc .ui-icon-circle-arrow-w{background-position:-144px -192px;}
+.fl-theme-hc .ui-icon-circle-arrow-n{background-position:-160px -192px;}
+.fl-theme-hc .ui-icon-circle-zoomin{background-position:-176px -192px;}
+.fl-theme-hc .ui-icon-circle-zoomout{background-position:-192px -192px;}
+.fl-theme-hc .ui-icon-circle-check{background-position:-208px -192px;}
+.fl-theme-hc .ui-icon-circlesmall-plus{background-position:0 -208px;}
+.fl-theme-hc .ui-icon-circlesmall-minus{background-position:-16px -208px;}
+.fl-theme-hc .ui-icon-circlesmall-close{background-position:-32px -208px;}
+.fl-theme-hc .ui-icon-squaresmall-plus{background-position:-48px -208px;}
+.fl-theme-hc .ui-icon-squaresmall-minus{background-position:-64px -208px;}
+.fl-theme-hc .ui-icon-squaresmall-close{background-position:-80px -208px;}
+.fl-theme-hc .ui-icon-grip-dotted-vertical{background-position:0 -224px;}
+.fl-theme-hc .ui-icon-grip-dotted-horizontal{background-position:-16px -224px;}
+.fl-theme-hc .ui-icon-grip-solid-vertical{background-position:-32px -224px;}
+.fl-theme-hc .ui-icon-grip-solid-horizontal{background-position:-48px -224px;}
+.fl-theme-hc .ui-icon-gripsmall-diagonal-se{background-position:-64px -224px;}
+.fl-theme-hc .ui-icon-grip-diagonal-se{background-position:-80px -224px;}
+.fl-theme-hc .ui-corner-tl{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;}
+.fl-theme-hc .ui-corner-tr{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;}
+.fl-theme-hc .ui-corner-bl{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;}
+.fl-theme-hc .ui-corner-br{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-hc .ui-corner-top{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;}
+.fl-theme-hc .ui-corner-bottom{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-hc .ui-corner-right{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-hc .ui-corner-left{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;}
+.fl-theme-hc .ui-corner-all{-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-hc .ui-widget-overlay{background:#fff url(images/ui-bg_flat_0_ffffff_40x100.png) 50% 50% repeat-x;opacity:.75;filter:Alpha(Opacity=75);}
+.fl-theme-hc .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flat_0_000000_40x100.png) 50% 50% repeat-x;opacity:100;filter:Alpha(Opacity=100);-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-hc .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}
+.fl-theme-hc .ui-accordion .ui-accordion-li-fix{display:inline;}
+.fl-theme-hc .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}
+.fl-theme-hc .ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em 2.2em;}
+.fl-theme-hc .ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px;}
+.fl-theme-hc .ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;}
+.fl-theme-hc .ui-accordion .ui-accordion-content-active{display:block;}
+.fl-theme-hc .ui-datepicker{width:17em;padding:.2em .2em 0;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-prev,.fl-theme-hc .ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-prev-hover,.fl-theme-hc .ui-datepicker .ui-datepicker-next-hover{top:1px;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-prev{left:2px;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-next{right:2px;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-prev-hover{left:1px;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-next-hover{right:1px;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-prev span,.fl-theme-hc .ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-title select{float:left;font-size:1em;margin:1px 0;}
+.fl-theme-hc .ui-datepicker select.ui-datepicker-month-year{width:100%;}
+.fl-theme-hc .ui-datepicker select.ui-datepicker-month,.fl-theme-hc .ui-datepicker select.ui-datepicker-year{width:49%;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-title select.ui-datepicker-year{float:right;}
+.fl-theme-hc .ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em;}
+.fl-theme-hc .ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0;}
+.fl-theme-hc .ui-datepicker td{border:0;padding:1px;}
+.fl-theme-hc .ui-datepicker td span,.fl-theme-hc .ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left;}
+.fl-theme-hc .ui-datepicker.ui-datepicker-multi{width:auto;}
+.fl-theme-hc .ui-datepicker-multi .ui-datepicker-group{float:left;}
+.fl-theme-hc .ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em;}
+.fl-theme-hc .ui-datepicker-multi-2 .ui-datepicker-group{width:50%;}
+.fl-theme-hc .ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%;}
+.fl-theme-hc .ui-datepicker-multi-4 .ui-datepicker-group{width:25%;}
+.fl-theme-hc .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0;}
+.fl-theme-hc .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0;}
+.fl-theme-hc .ui-datepicker-multi .ui-datepicker-buttonpane{clear:left;}
+.fl-theme-hc .ui-datepicker-row-break{clear:both;width:100%;}
+.fl-theme-hc .ui-datepicker-rtl{direction:rtl;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-group{float:right;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-hc .ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px;}
+.fl-theme-hc .ui-dialog{position:relative;padding:.2em;width:300px;}
+.fl-theme-hc .ui-dialog .ui-dialog-titlebar{padding:.5em .3em .3em 1em;position:relative;}
+.fl-theme-hc .ui-dialog .ui-dialog-title{float:left;margin:.1em 0 .2em;}
+.fl-theme-hc .ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px;}
+.fl-theme-hc .ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px;}
+.fl-theme-hc .ui-dialog .ui-dialog-titlebar-close:hover,.fl-theme-hc .ui-dialog .ui-dialog-titlebar-close:focus{padding:0;}
+.fl-theme-hc .ui-dialog .ui-dialog-content{border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1;}
+.fl-theme-hc .ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em;}
+.fl-theme-hc .ui-dialog .ui-dialog-buttonpane button{float:right;margin:.5em .4em .5em 0;cursor:pointer;padding:.2em .6em .3em .6em;line-height:1.4em;width:auto;overflow:visible;}
+.fl-theme-hc .ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px;}
+.fl-theme-hc .ui-draggable .ui-dialog-titlebar{cursor:move;}
+.fl-theme-hc .ui-progressbar{height:2em;text-align:left;}
+.fl-theme-hc .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%;}
+.fl-theme-hc .ui-resizable{position:relative;}
+.fl-theme-hc .ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block;}
+.fl-theme-hc .ui-resizable-disabled .ui-resizable-handle,.fl-theme-hc .ui-resizable-autohide .ui-resizable-handle{display:none;}
+.fl-theme-hc .ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0;}
+.fl-theme-hc .ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0;}
+.fl-theme-hc .ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%;}
+.fl-theme-hc .ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%;}
+.fl-theme-hc .ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px;}
+.fl-theme-hc .ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px;}
+.fl-theme-hc .ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px;}
+.fl-theme-hc .ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px;}
+.fl-theme-hc .ui-slider{position:relative;text-align:left;}
+.fl-theme-hc .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;}
+.fl-theme-hc .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;}
+.fl-theme-hc .ui-slider-horizontal{height:.8em;}
+.fl-theme-hc .ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em;}
+.fl-theme-hc .ui-slider-horizontal .ui-slider-range{top:0;height:100%;}
+.fl-theme-hc .ui-slider-horizontal .ui-slider-range-min{left:0;}
+.fl-theme-hc .ui-slider-horizontal .ui-slider-range-max{right:0;}
+.fl-theme-hc .ui-slider-vertical{width:.8em;height:100px;}
+.fl-theme-hc .ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em;}
+.fl-theme-hc .ui-slider-vertical .ui-slider-range{left:0;width:100%;}
+.fl-theme-hc .ui-slider-vertical .ui-slider-range-min{bottom:0;}
+.fl-theme-hc .ui-slider-vertical .ui-slider-range-max{top:0;}
+.fl-theme-hc .ui-tabs{padding:.2em;zoom:1;}
+.fl-theme-hc .ui-tabs .ui-tabs-nav{list-style:none;position:relative;padding:.2em .2em 0;}
+.fl-theme-hc .ui-tabs .ui-tabs-nav li{position:relative;float:left;border-bottom-width:0!important;margin:0 .2em -1px 0;padding:0;}
+.fl-theme-hc .ui-tabs .ui-tabs-nav li a{float:left;text-decoration:none;padding:.5em 1em;}
+.fl-theme-hc .ui-tabs .ui-tabs-nav li.ui-tabs-selected{padding-bottom:1px;border-bottom-width:0;}
+.fl-theme-hc .ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.fl-theme-hc .ui-tabs .ui-tabs-nav li.ui-state-disabled a,.fl-theme-hc .ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text;}
+.fl-theme-hc .ui-tabs .ui-tabs-nav li a,.fl-theme-hc .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer;}
+.fl-theme-hc .ui-tabs .ui-tabs-panel{padding:1em 1.4em;display:block;border-width:0;background:none;}
+.fl-theme-hc .ui-tabs .ui-tabs-hide{display:none!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_000000_40x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_000000_40x100.png
new file mode 100644 (file)
index 0000000..abdc010
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_000000_40x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_ffffff_40x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_ffffff_40x100.png
new file mode 100644 (file)
index 0000000..ac8b229
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_ffffff_40x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_000000_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_000000_256x240.png
new file mode 100644 (file)
index 0000000..842156d
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_000000_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_ffffff_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_ffffff_256x240.png
new file mode 100644 (file)
index 0000000..746e6fa
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_ffffff_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/hci.css b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/hci.css
new file mode 100644 (file)
index 0000000..1400375
--- /dev/null
@@ -0,0 +1,319 @@
+.fl-theme-hci .ui-helper-hidden{display:none;}
+.fl-theme-hci .ui-helper-hidden-accessible{position:absolute;left:-99999999px;}
+.fl-theme-hci .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none;}
+.fl-theme-hci .ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
+.fl-theme-hci .ui-helper-clearfix{display:inline-block;}
+/* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix{height:1%;}
+.fl-theme-hci .ui-helper-clearfix{display:block;}
+/* end clearfix */ .fl-theme-hci .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0);}
+.fl-theme-hci .ui-state-disabled{cursor:default!important;}
+.fl-theme-hci .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;}
+.fl-theme-hci .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
+.fl-theme-hci .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-hci .ui-widget input,.fl-theme-hci .ui-widget select,.fl-theme-hci .ui-widget textarea,.fl-theme-hci .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-hci .ui-widget-content{border:1px solid #fff;background:#000 url(images/ui-bg_flat_0_000000_40x100.png) 50% 50% repeat-x;color:#fff;}
+.fl-theme-hci .ui-widget-content a{color:#fff;}
+.fl-theme-hci .ui-widget-header{border:1px solid #fff;background:#999 url(images/ui-bg_flat_0_999999_40x100.png) 50% 50% repeat-x;color:#fff;font-weight:bold;}
+.fl-theme-hci .ui-widget-header a{color:#fff;}
+.fl-theme-hci .ui-state-default,.fl-theme-hci .ui-widget-content .ui-state-default{border:1px solid #000;background:#fff url(images/ui-bg_flat_0_ffffff_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
+.fl-theme-hci .ui-state-default a,.fl-theme-hci .ui-state-default a:link,.fl-theme-hci .ui-state-default a:visited{color:#000;text-decoration:none;outline:none;}
+.fl-theme-hci .ui-state-hover,.fl-theme-hci .ui-widget-content .ui-state-hover,.fl-theme-hci .ui-state-focus,.fl-theme-hci .ui-widget-content .ui-state-focus{border:1px solid #fff;background:#000 url(images/ui-bg_flat_0_000000_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
+.fl-theme-hci .ui-state-hover a,.fl-theme-hci .ui-state-hover a:hover{color:#fff;text-decoration:none;outline:none;}
+.fl-theme-hci .ui-state-active,.fl-theme-hci .ui-widget-content .ui-state-active{border:1px solid #fff;background:#000 url(images/ui-bg_flat_0_000000_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
+.fl-theme-hci .ui-state-active a,.fl-theme-hci .ui-state-active a:link,.fl-theme-hci .ui-state-active a:visited{color:#fff;outline:none;text-decoration:none;}
+.fl-theme-hci .ui-state-highlight,.fl-theme-hci .ui-widget-content .ui-state-highlight{border:1px solid #fff;background:#000 url(images/ui-bg_flat_0_000000_40x100.png) 50% 50% repeat-x;color:#fff;}
+.fl-theme-hci .ui-state-highlight a,.fl-theme-hci .ui-widget-content .ui-state-highlight a{color:#fff;}
+.fl-theme-hci .ui-state-error,.fl-theme-hci .ui-widget-content .ui-state-error{border:1px solid #000;background:#fff url(images/ui-bg_flat_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;}
+.fl-theme-hci .ui-state-error a,.fl-theme-hci .ui-widget-content .ui-state-error a{color:#000;}
+.fl-theme-hci .ui-state-error-text,.fl-theme-hci .ui-widget-content .ui-state-error-text{color:#000;}
+.fl-theme-hci .ui-state-disabled,.fl-theme-hci .ui-widget-content .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none;}
+.fl-theme-hci .ui-priority-primary,.fl-theme-hci .ui-widget-content .ui-priority-primary{font-weight:bold;}
+.fl-theme-hci .ui-priority-secondary,.fl-theme-hci .ui-widget-content .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal;}
+.fl-theme-hci .ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-hci .ui-widget-content .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-hci .ui-widget-header .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-hci .ui-state-default .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hci .ui-state-hover .ui-icon,.fl-theme-hci .ui-state-focus .ui-icon{background-image:url(images/ui-icons_fffff_256x240.png);}
+.fl-theme-hci .ui-state-active .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-hci .ui-state-highlight .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-hci .ui-state-error .ui-icon,.fl-theme-hci .ui-state-error-text .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hci .ui-icon-carat-1-n{background-position:0 0;}
+.fl-theme-hci .ui-icon-carat-1-ne{background-position:-16px 0;}
+.fl-theme-hci .ui-icon-carat-1-e{background-position:-32px 0;}
+.fl-theme-hci .ui-icon-carat-1-se{background-position:-48px 0;}
+.fl-theme-hci .ui-icon-carat-1-s{background-position:-64px 0;}
+.fl-theme-hci .ui-icon-carat-1-sw{background-position:-80px 0;}
+.fl-theme-hci .ui-icon-carat-1-w{background-position:-96px 0;}
+.fl-theme-hci .ui-icon-carat-1-nw{background-position:-112px 0;}
+.fl-theme-hci .ui-icon-carat-2-n-s{background-position:-128px 0;}
+.fl-theme-hci .ui-icon-carat-2-e-w{background-position:-144px 0;}
+.fl-theme-hci .ui-icon-triangle-1-n{background-position:0 -16px;}
+.fl-theme-hci .ui-icon-triangle-1-ne{background-position:-16px -16px;}
+.fl-theme-hci .ui-icon-triangle-1-e{background-position:-32px -16px;}
+.fl-theme-hci .ui-icon-triangle-1-se{background-position:-48px -16px;}
+.fl-theme-hci .ui-icon-triangle-1-s{background-position:-64px -16px;}
+.fl-theme-hci .ui-icon-triangle-1-sw{background-position:-80px -16px;}
+.fl-theme-hci .ui-icon-triangle-1-w{background-position:-96px -16px;}
+.fl-theme-hci .ui-icon-triangle-1-nw{background-position:-112px -16px;}
+.fl-theme-hci .ui-icon-triangle-2-n-s{background-position:-128px -16px;}
+.fl-theme-hci .ui-icon-triangle-2-e-w{background-position:-144px -16px;}
+.fl-theme-hci .ui-icon-arrow-1-n{background-position:0 -32px;}
+.fl-theme-hci .ui-icon-arrow-1-ne{background-position:-16px -32px;}
+.fl-theme-hci .ui-icon-arrow-1-e{background-position:-32px -32px;}
+.fl-theme-hci .ui-icon-arrow-1-se{background-position:-48px -32px;}
+.fl-theme-hci .ui-icon-arrow-1-s{background-position:-64px -32px;}
+.fl-theme-hci .ui-icon-arrow-1-sw{background-position:-80px -32px;}
+.fl-theme-hci .ui-icon-arrow-1-w{background-position:-96px -32px;}
+.fl-theme-hci .ui-icon-arrow-1-nw{background-position:-112px -32px;}
+.fl-theme-hci .ui-icon-arrow-2-n-s{background-position:-128px -32px;}
+.fl-theme-hci .ui-icon-arrow-2-ne-sw{background-position:-144px -32px;}
+.fl-theme-hci .ui-icon-arrow-2-e-w{background-position:-160px -32px;}
+.fl-theme-hci .ui-icon-arrow-2-se-nw{background-position:-176px -32px;}
+.fl-theme-hci .ui-icon-arrowstop-1-n{background-position:-192px -32px;}
+.fl-theme-hci .ui-icon-arrowstop-1-e{background-position:-208px -32px;}
+.fl-theme-hci .ui-icon-arrowstop-1-s{background-position:-224px -32px;}
+.fl-theme-hci .ui-icon-arrowstop-1-w{background-position:-240px -32px;}
+.fl-theme-hci .ui-icon-arrowthick-1-n{background-position:0 -48px;}
+.fl-theme-hci .ui-icon-arrowthick-1-ne{background-position:-16px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-1-e{background-position:-32px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-1-se{background-position:-48px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-1-s{background-position:-64px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-1-sw{background-position:-80px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-1-w{background-position:-96px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-1-nw{background-position:-112px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-2-n-s{background-position:-128px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-2-e-w{background-position:-160px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-2-se-nw{background-position:-176px -48px;}
+.fl-theme-hci .ui-icon-arrowthickstop-1-n{background-position:-192px -48px;}
+.fl-theme-hci .ui-icon-arrowthickstop-1-e{background-position:-208px -48px;}
+.fl-theme-hci .ui-icon-arrowthickstop-1-s{background-position:-224px -48px;}
+.fl-theme-hci .ui-icon-arrowthickstop-1-w{background-position:-240px -48px;}
+.fl-theme-hci .ui-icon-arrowreturnthick-1-w{background-position:0 -64px;}
+.fl-theme-hci .ui-icon-arrowreturnthick-1-n{background-position:-16px -64px;}
+.fl-theme-hci .ui-icon-arrowreturnthick-1-e{background-position:-32px -64px;}
+.fl-theme-hci .ui-icon-arrowreturnthick-1-s{background-position:-48px -64px;}
+.fl-theme-hci .ui-icon-arrowreturn-1-w{background-position:-64px -64px;}
+.fl-theme-hci .ui-icon-arrowreturn-1-n{background-position:-80px -64px;}
+.fl-theme-hci .ui-icon-arrowreturn-1-e{background-position:-96px -64px;}
+.fl-theme-hci .ui-icon-arrowreturn-1-s{background-position:-112px -64px;}
+.fl-theme-hci .ui-icon-arrowrefresh-1-w{background-position:-128px -64px;}
+.fl-theme-hci .ui-icon-arrowrefresh-1-n{background-position:-144px -64px;}
+.fl-theme-hci .ui-icon-arrowrefresh-1-e{background-position:-160px -64px;}
+.fl-theme-hci .ui-icon-arrowrefresh-1-s{background-position:-176px -64px;}
+.fl-theme-hci .ui-icon-arrow-4{background-position:0 -80px;}
+.fl-theme-hci .ui-icon-arrow-4-diag{background-position:-16px -80px;}
+.fl-theme-hci .ui-icon-extlink{background-position:-32px -80px;}
+.fl-theme-hci .ui-icon-newwin{background-position:-48px -80px;}
+.fl-theme-hci .ui-icon-refresh{background-position:-64px -80px;}
+.fl-theme-hci .ui-icon-shuffle{background-position:-80px -80px;}
+.fl-theme-hci .ui-icon-transfer-e-w{background-position:-96px -80px;}
+.fl-theme-hci .ui-icon-transferthick-e-w{background-position:-112px -80px;}
+.fl-theme-hci .ui-icon-folder-collapsed{background-position:0 -96px;}
+.fl-theme-hci .ui-icon-folder-open{background-position:-16px -96px;}
+.fl-theme-hci .ui-icon-document{background-position:-32px -96px;}
+.fl-theme-hci .ui-icon-document-b{background-position:-48px -96px;}
+.fl-theme-hci .ui-icon-note{background-position:-64px -96px;}
+.fl-theme-hci .ui-icon-mail-closed{background-position:-80px -96px;}
+.fl-theme-hci .ui-icon-mail-open{background-position:-96px -96px;}
+.fl-theme-hci .ui-icon-suitcase{background-position:-112px -96px;}
+.fl-theme-hci .ui-icon-comment{background-position:-128px -96px;}
+.fl-theme-hci .ui-icon-person{background-position:-144px -96px;}
+.fl-theme-hci .ui-icon-print{background-position:-160px -96px;}
+.fl-theme-hci .ui-icon-trash{background-position:-176px -96px;}
+.fl-theme-hci .ui-icon-locked{background-position:-192px -96px;}
+.fl-theme-hci .ui-icon-unlocked{background-position:-208px -96px;}
+.fl-theme-hci .ui-icon-bookmark{background-position:-224px -96px;}
+.fl-theme-hci .ui-icon-tag{background-position:-240px -96px;}
+.fl-theme-hci .ui-icon-home{background-position:0 -112px;}
+.fl-theme-hci .ui-icon-flag{background-position:-16px -112px;}
+.fl-theme-hci .ui-icon-calendar{background-position:-32px -112px;}
+.fl-theme-hci .ui-icon-cart{background-position:-48px -112px;}
+.fl-theme-hci .ui-icon-pencil{background-position:-64px -112px;}
+.fl-theme-hci .ui-icon-clock{background-position:-80px -112px;}
+.fl-theme-hci .ui-icon-disk{background-position:-96px -112px;}
+.fl-theme-hci .ui-icon-calculator{background-position:-112px -112px;}
+.fl-theme-hci .ui-icon-zoomin{background-position:-128px -112px;}
+.fl-theme-hci .ui-icon-zoomout{background-position:-144px -112px;}
+.fl-theme-hci .ui-icon-search{background-position:-160px -112px;}
+.fl-theme-hci .ui-icon-wrench{background-position:-176px -112px;}
+.fl-theme-hci .ui-icon-gear{background-position:-192px -112px;}
+.fl-theme-hci .ui-icon-heart{background-position:-208px -112px;}
+.fl-theme-hci .ui-icon-star{background-position:-224px -112px;}
+.fl-theme-hci .ui-icon-link{background-position:-240px -112px;}
+.fl-theme-hci .ui-icon-cancel{background-position:0 -128px;}
+.fl-theme-hci .ui-icon-plus{background-position:-16px -128px;}
+.fl-theme-hci .ui-icon-plusthick{background-position:-32px -128px;}
+.fl-theme-hci .ui-icon-minus{background-position:-48px -128px;}
+.fl-theme-hci .ui-icon-minusthick{background-position:-64px -128px;}
+.fl-theme-hci .ui-icon-close{background-position:-80px -128px;}
+.fl-theme-hci .ui-icon-closethick{background-position:-96px -128px;}
+.fl-theme-hci .ui-icon-key{background-position:-112px -128px;}
+.fl-theme-hci .ui-icon-lightbulb{background-position:-128px -128px;}
+.fl-theme-hci .ui-icon-scissors{background-position:-144px -128px;}
+.fl-theme-hci .ui-icon-clipboard{background-position:-160px -128px;}
+.fl-theme-hci .ui-icon-copy{background-position:-176px -128px;}
+.fl-theme-hci .ui-icon-contact{background-position:-192px -128px;}
+.fl-theme-hci .ui-icon-image{background-position:-208px -128px;}
+.fl-theme-hci .ui-icon-video{background-position:-224px -128px;}
+.fl-theme-hci .ui-icon-script{background-position:-240px -128px;}
+.fl-theme-hci .ui-icon-alert{background-position:0 -144px;}
+.fl-theme-hci .ui-icon-info{background-position:-16px -144px;}
+.fl-theme-hci .ui-icon-notice{background-position:-32px -144px;}
+.fl-theme-hci .ui-icon-help{background-position:-48px -144px;}
+.fl-theme-hci .ui-icon-check{background-position:-64px -144px;}
+.fl-theme-hci .ui-icon-bullet{background-position:-80px -144px;}
+.fl-theme-hci .ui-icon-radio-off{background-position:-96px -144px;}
+.fl-theme-hci .ui-icon-radio-on{background-position:-112px -144px;}
+.fl-theme-hci .ui-icon-pin-w{background-position:-128px -144px;}
+.fl-theme-hci .ui-icon-pin-s{background-position:-144px -144px;}
+.fl-theme-hci .ui-icon-play{background-position:0 -160px;}
+.fl-theme-hci .ui-icon-pause{background-position:-16px -160px;}
+.fl-theme-hci .ui-icon-seek-next{background-position:-32px -160px;}
+.fl-theme-hci .ui-icon-seek-prev{background-position:-48px -160px;}
+.fl-theme-hci .ui-icon-seek-end{background-position:-64px -160px;}
+.fl-theme-hci .ui-icon-seek-first{background-position:-80px -160px;}
+.fl-theme-hci .ui-icon-stop{background-position:-96px -160px;}
+.fl-theme-hci .ui-icon-eject{background-position:-112px -160px;}
+.fl-theme-hci .ui-icon-volume-off{background-position:-128px -160px;}
+.fl-theme-hci .ui-icon-volume-on{background-position:-144px -160px;}
+.fl-theme-hci .ui-icon-power{background-position:0 -176px;}
+.fl-theme-hci .ui-icon-signal-diag{background-position:-16px -176px;}
+.fl-theme-hci .ui-icon-signal{background-position:-32px -176px;}
+.fl-theme-hci .ui-icon-battery-0{background-position:-48px -176px;}
+.fl-theme-hci .ui-icon-battery-1{background-position:-64px -176px;}
+.fl-theme-hci .ui-icon-battery-2{background-position:-80px -176px;}
+.fl-theme-hci .ui-icon-battery-3{background-position:-96px -176px;}
+.fl-theme-hci .ui-icon-circle-plus{background-position:0 -192px;}
+.fl-theme-hci .ui-icon-circle-minus{background-position:-16px -192px;}
+.fl-theme-hci .ui-icon-circle-close{background-position:-32px -192px;}
+.fl-theme-hci .ui-icon-circle-triangle-e{background-position:-48px -192px;}
+.fl-theme-hci .ui-icon-circle-triangle-s{background-position:-64px -192px;}
+.fl-theme-hci .ui-icon-circle-triangle-w{background-position:-80px -192px;}
+.fl-theme-hci .ui-icon-circle-triangle-n{background-position:-96px -192px;}
+.fl-theme-hci .ui-icon-circle-arrow-e{background-position:-112px -192px;}
+.fl-theme-hci .ui-icon-circle-arrow-s{background-position:-128px -192px;}
+.fl-theme-hci .ui-icon-circle-arrow-w{background-position:-144px -192px;}
+.fl-theme-hci .ui-icon-circle-arrow-n{background-position:-160px -192px;}
+.fl-theme-hci .ui-icon-circle-zoomin{background-position:-176px -192px;}
+.fl-theme-hci .ui-icon-circle-zoomout{background-position:-192px -192px;}
+.fl-theme-hci .ui-icon-circle-check{background-position:-208px -192px;}
+.fl-theme-hci .ui-icon-circlesmall-plus{background-position:0 -208px;}
+.fl-theme-hci .ui-icon-circlesmall-minus{background-position:-16px -208px;}
+.fl-theme-hci .ui-icon-circlesmall-close{background-position:-32px -208px;}
+.fl-theme-hci .ui-icon-squaresmall-plus{background-position:-48px -208px;}
+.fl-theme-hci .ui-icon-squaresmall-minus{background-position:-64px -208px;}
+.fl-theme-hci .ui-icon-squaresmall-close{background-position:-80px -208px;}
+.fl-theme-hci .ui-icon-grip-dotted-vertical{background-position:0 -224px;}
+.fl-theme-hci .ui-icon-grip-dotted-horizontal{background-position:-16px -224px;}
+.fl-theme-hci .ui-icon-grip-solid-vertical{background-position:-32px -224px;}
+.fl-theme-hci .ui-icon-grip-solid-horizontal{background-position:-48px -224px;}
+.fl-theme-hci .ui-icon-gripsmall-diagonal-se{background-position:-64px -224px;}
+.fl-theme-hci .ui-icon-grip-diagonal-se{background-position:-80px -224px;}
+.fl-theme-hci .ui-corner-tl{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;}
+.fl-theme-hci .ui-corner-tr{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;}
+.fl-theme-hci .ui-corner-bl{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;}
+.fl-theme-hci .ui-corner-br{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-hci .ui-corner-top{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;}
+.fl-theme-hci .ui-corner-bottom{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-hci .ui-corner-right{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-hci .ui-corner-left{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;}
+.fl-theme-hci .ui-corner-all{-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-hci .ui-widget-overlay{background:#000 url(images/ui-bg_flat_0_000000_40x100.png) 50% 50% repeat-x;opacity:.75;filter:Alpha(Opacity=75);}
+.fl-theme-hci .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#fff url(images/ui-bg_flat_0_ffffff_40x100.png) 50% 50% repeat-x;opacity:100;filter:Alpha(Opacity=100);-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-hci .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}
+.fl-theme-hci .ui-accordion .ui-accordion-li-fix{display:inline;}
+.fl-theme-hci .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}
+.fl-theme-hci .ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em 2.2em;}
+.fl-theme-hci .ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px;}
+.fl-theme-hci .ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;}
+.fl-theme-hci .ui-accordion .ui-accordion-content-active{display:block;}
+.fl-theme-hci .ui-datepicker{width:17em;padding:.2em .2em 0;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-prev,.fl-theme-hci .ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-prev-hover,.fl-theme-hci .ui-datepicker .ui-datepicker-next-hover{top:1px;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-prev{left:2px;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-next{right:2px;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-prev-hover{left:1px;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-next-hover{right:1px;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-prev span,.fl-theme-hci .ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-title select{float:left;font-size:1em;margin:1px 0;}
+.fl-theme-hci .ui-datepicker select.ui-datepicker-month-year{width:100%;}
+.fl-theme-hci .ui-datepicker select.ui-datepicker-month,.fl-theme-hci .ui-datepicker select.ui-datepicker-year{width:49%;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-title select.ui-datepicker-year{float:right;}
+.fl-theme-hci .ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em;}
+.fl-theme-hci .ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0;}
+.fl-theme-hci .ui-datepicker td{border:0;padding:1px;}
+.fl-theme-hci .ui-datepicker td span,.fl-theme-hci .ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left;}
+.fl-theme-hci .ui-datepicker.ui-datepicker-multi{width:auto;}
+.fl-theme-hci .ui-datepicker-multi .ui-datepicker-group{float:left;}
+.fl-theme-hci .ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em;}
+.fl-theme-hci .ui-datepicker-multi-2 .ui-datepicker-group{width:50%;}
+.fl-theme-hci .ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%;}
+.fl-theme-hci .ui-datepicker-multi-4 .ui-datepicker-group{width:25%;}
+.fl-theme-hci .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0;}
+.fl-theme-hci .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0;}
+.fl-theme-hci .ui-datepicker-multi .ui-datepicker-buttonpane{clear:left;}
+.fl-theme-hci .ui-datepicker-row-break{clear:both;width:100%;}
+.fl-theme-hci .ui-datepicker-rtl{direction:rtl;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-group{float:right;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-hci .ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px;}
+.fl-theme-hci .ui-dialog{position:relative;padding:.2em;width:300px;}
+.fl-theme-hci .ui-dialog .ui-dialog-titlebar{padding:.5em .3em .3em 1em;position:relative;}
+.fl-theme-hci .ui-dialog .ui-dialog-title{float:left;margin:.1em 0 .2em;}
+.fl-theme-hci .ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px;}
+.fl-theme-hci .ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px;}
+.fl-theme-hci .ui-dialog .ui-dialog-titlebar-close:hover,.fl-theme-hci .ui-dialog .ui-dialog-titlebar-close:focus{padding:0;}
+.fl-theme-hci .ui-dialog .ui-dialog-content{border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1;}
+.fl-theme-hci .ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em;}
+.fl-theme-hci .ui-dialog .ui-dialog-buttonpane button{float:right;margin:.5em .4em .5em 0;cursor:pointer;padding:.2em .6em .3em .6em;line-height:1.4em;width:auto;overflow:visible;}
+.fl-theme-hci .ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px;}
+.fl-theme-hci .ui-draggable .ui-dialog-titlebar{cursor:move;}
+.fl-theme-hci .ui-progressbar{height:2em;text-align:left;}
+.fl-theme-hci .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%;}
+.fl-theme-hci .ui-resizable{position:relative;}
+.fl-theme-hci .ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block;}
+.fl-theme-hci .ui-resizable-disabled .ui-resizable-handle,.fl-theme-hci .ui-resizable-autohide .ui-resizable-handle{display:none;}
+.fl-theme-hci .ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0;}
+.fl-theme-hci .ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0;}
+.fl-theme-hci .ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%;}
+.fl-theme-hci .ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%;}
+.fl-theme-hci .ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px;}
+.fl-theme-hci .ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px;}
+.fl-theme-hci .ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px;}
+.fl-theme-hci .ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px;}
+.fl-theme-hci .ui-slider{position:relative;text-align:left;}
+.fl-theme-hci .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;}
+.fl-theme-hci .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;}
+.fl-theme-hci .ui-slider-horizontal{height:.8em;}
+.fl-theme-hci .ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em;}
+.fl-theme-hci .ui-slider-horizontal .ui-slider-range{top:0;height:100%;}
+.fl-theme-hci .ui-slider-horizontal .ui-slider-range-min{left:0;}
+.fl-theme-hci .ui-slider-horizontal .ui-slider-range-max{right:0;}
+.fl-theme-hci .ui-slider-vertical{width:.8em;height:100px;}
+.fl-theme-hci .ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em;}
+.fl-theme-hci .ui-slider-vertical .ui-slider-range{left:0;width:100%;}
+.fl-theme-hci .ui-slider-vertical .ui-slider-range-min{bottom:0;}
+.fl-theme-hci .ui-slider-vertical .ui-slider-range-max{top:0;}
+.fl-theme-hci .ui-tabs{padding:.2em;zoom:1;}
+.fl-theme-hci .ui-tabs .ui-tabs-nav{list-style:none;position:relative;padding:.2em .2em 0;}
+.fl-theme-hci .ui-tabs .ui-tabs-nav li{position:relative;float:left;border-bottom-width:0!important;margin:0 .2em -1px 0;padding:0;}
+.fl-theme-hci .ui-tabs .ui-tabs-nav li a{float:left;text-decoration:none;padding:.5em 1em;}
+.fl-theme-hci .ui-tabs .ui-tabs-nav li.ui-tabs-selected{padding-bottom:1px;border-bottom-width:0;}
+.fl-theme-hci .ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.fl-theme-hci .ui-tabs .ui-tabs-nav li.ui-state-disabled a,.fl-theme-hci .ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text;}
+.fl-theme-hci .ui-tabs .ui-tabs-nav li a,.fl-theme-hci .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer;}
+.fl-theme-hci .ui-tabs .ui-tabs-panel{padding:1em 1.4em;display:block;border-width:0;background:none;}
+.fl-theme-hci .ui-tabs .ui-tabs-hide{display:none!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_000000_40x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_000000_40x100.png
new file mode 100644 (file)
index 0000000..abdc010
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_000000_40x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_999999_40x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_999999_40x100.png
new file mode 100644 (file)
index 0000000..6b6de7d
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_999999_40x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_ffffff_40x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_ffffff_40x100.png
new file mode 100644 (file)
index 0000000..ac8b229
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_ffffff_40x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_000000_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_000000_256x240.png
new file mode 100644 (file)
index 0000000..842156d
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_000000_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_fffff_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_fffff_256x240.png
new file mode 100644 (file)
index 0000000..746e6fa
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_fffff_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_ffffff_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_ffffff_256x240.png
new file mode 100644 (file)
index 0000000..746e6fa
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_ffffff_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_000000_40x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_000000_40x100.png
new file mode 100644 (file)
index 0000000..abdc010
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_000000_40x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_2e83ff_40x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_2e83ff_40x100.png
new file mode 100644 (file)
index 0000000..54b690f
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_2e83ff_40x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_75_ffffff_40x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_75_ffffff_40x100.png
new file mode 100644 (file)
index 0000000..ac8b229
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_75_ffffff_40x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_65_ffffff_1x400.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_65_ffffff_1x400.png
new file mode 100644 (file)
index 0000000..42ccba2
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_65_ffffff_1x400.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_9dcaf6_1x400.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_9dcaf6_1x400.png
new file mode 100644 (file)
index 0000000..9ac3e31
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_9dcaf6_1x400.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_d9e8f7_1x400.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_d9e8f7_1x400.png
new file mode 100644 (file)
index 0000000..c7db55a
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_d9e8f7_1x400.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_highlight-soft_55_9dcaf6_1x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_highlight-soft_55_9dcaf6_1x100.png
new file mode 100644 (file)
index 0000000..370050f
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_highlight-soft_55_9dcaf6_1x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_inset-soft_95_fef1ec_1x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_inset-soft_95_fef1ec_1x100.png
new file mode 100644 (file)
index 0000000..0e05810
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_inset-soft_95_fef1ec_1x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_000000_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_000000_256x240.png
new file mode 100644 (file)
index 0000000..842156d
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_000000_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_222222_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_222222_256x240.png
new file mode 100644 (file)
index 0000000..67560da
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_222222_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_2e83ff_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_2e83ff_256x240.png
new file mode 100644 (file)
index 0000000..b425c44
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_2e83ff_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_454545_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_454545_256x240.png
new file mode 100644 (file)
index 0000000..0cd64a2
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_454545_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_888888_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_888888_256x240.png
new file mode 100644 (file)
index 0000000..2e5180e
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_888888_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_cd0a0a_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_cd0a0a_256x240.png
new file mode 100644 (file)
index 0000000..2db88b7
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_cd0a0a_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/mist.css b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-mist/mist.css
new file mode 100644 (file)
index 0000000..c7406e1
--- /dev/null
@@ -0,0 +1,319 @@
+.fl-theme-mist .ui-helper-hidden{display:none;}
+.fl-theme-mist .ui-helper-hidden-accessible{position:absolute;left:-99999999px;}
+.fl-theme-mist .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none;}
+.fl-theme-mist .ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
+.fl-theme-mist .ui-helper-clearfix{display:inline-block;}
+/* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix{height:1%;}
+.fl-theme-mist .ui-helper-clearfix{display:block;}
+/* end clearfix */ .fl-theme-mist .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0);}
+.fl-theme-mist .ui-state-disabled{cursor:default!important;}
+.fl-theme-mist .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;}
+.fl-theme-mist .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
+.fl-theme-mist .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-mist .ui-widget input,.fl-theme-mist .ui-widget select,.fl-theme-mist .ui-widget textarea,.fl-theme-mist .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-mist .ui-widget-content{border:1px solid #ccc;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222;}
+.fl-theme-mist .ui-widget-content a{color:#222;}
+.fl-theme-mist .ui-widget-header{border:1px solid #5A95CF;background:#9dcaf6 url(images/ui-bg_glass_75_9dcaf6_1x400.png) 50% 50% repeat-x;color:#222;font-weight:bold;}
+.fl-theme-mist .ui-widget-header a{color:#222;}
+.fl-theme-mist .ui-state-default,.fl-theme-mist .ui-widget-content .ui-state-default{border:1px solid #d3d3d3;background:#d9e8f7 url(images/ui-bg_glass_75_d9e8f7_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#555;outline:none;}
+.fl-theme-mist .ui-state-default a,.fl-theme-mist .ui-state-default a:link,.fl-theme-mist .ui-state-default a:visited{color:#555;text-decoration:none;outline:none;}
+.fl-theme-mist .ui-state-hover,.fl-theme-mist .ui-widget-content .ui-state-hover,.fl-theme-mist .ui-state-focus,.fl-theme-mist .ui-widget-content .ui-state-focus{border:1px solid #999;background:#9dcaf6 url(images/ui-bg_glass_75_9dcaf6_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121;outline:none;}
+.fl-theme-mist .ui-state-hover a,.fl-theme-mist .ui-state-hover a:hover{color:#212121;text-decoration:none;outline:none;}
+.fl-theme-mist .ui-state-active,.fl-theme-mist .ui-widget-content .ui-state-active{border:1px solid #5A95CF;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
+.fl-theme-mist .ui-state-active a,.fl-theme-mist .ui-state-active a:link,.fl-theme-mist .ui-state-active a:visited{color:#000;outline:none;text-decoration:none;}
+.fl-theme-mist .ui-state-highlight,.fl-theme-mist .ui-widget-content .ui-state-highlight{border:1px solid #2e83ff;background:#9dcaf6 url(images/ui-bg_highlight-soft_55_9dcaf6_1x100.png) 50% top repeat-x;color:#363636;}
+.fl-theme-mist .ui-state-highlight a,.fl-theme-mist .ui-widget-content .ui-state-highlight a{color:#363636;}
+.fl-theme-mist .ui-state-error,.fl-theme-mist .ui-widget-content .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_inset-soft_95_fef1ec_1x100.png) 50% bottom repeat-x;color:#cd0a0a;}
+.fl-theme-mist .ui-state-error a,.fl-theme-mist .ui-widget-content .ui-state-error a{color:#cd0a0a;}
+.fl-theme-mist .ui-state-error-text,.fl-theme-mist .ui-widget-content .ui-state-error-text{color:#cd0a0a;}
+.fl-theme-mist .ui-state-disabled,.fl-theme-mist .ui-widget-content .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none;}
+.fl-theme-mist .ui-priority-primary,.fl-theme-mist .ui-widget-content .ui-priority-primary{font-weight:bold;}
+.fl-theme-mist .ui-priority-secondary,.fl-theme-mist .ui-widget-content .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal;}
+.fl-theme-mist .ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_222222_256x240.png);}
+.fl-theme-mist .ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png);}
+.fl-theme-mist .ui-widget-header .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-mist .ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png);}
+.fl-theme-mist .ui-state-hover .ui-icon,.fl-theme-mist .ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png);}
+.fl-theme-mist .ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png);}
+.fl-theme-mist .ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png);}
+.fl-theme-mist .ui-state-error .ui-icon,.fl-theme-mist .ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png);}
+.fl-theme-mist .ui-icon-carat-1-n{background-position:0 0;}
+.fl-theme-mist .ui-icon-carat-1-ne{background-position:-16px 0;}
+.fl-theme-mist .ui-icon-carat-1-e{background-position:-32px 0;}
+.fl-theme-mist .ui-icon-carat-1-se{background-position:-48px 0;}
+.fl-theme-mist .ui-icon-carat-1-s{background-position:-64px 0;}
+.fl-theme-mist .ui-icon-carat-1-sw{background-position:-80px 0;}
+.fl-theme-mist .ui-icon-carat-1-w{background-position:-96px 0;}
+.fl-theme-mist .ui-icon-carat-1-nw{background-position:-112px 0;}
+.fl-theme-mist .ui-icon-carat-2-n-s{background-position:-128px 0;}
+.fl-theme-mist .ui-icon-carat-2-e-w{background-position:-144px 0;}
+.fl-theme-mist .ui-icon-triangle-1-n{background-position:0 -16px;}
+.fl-theme-mist .ui-icon-triangle-1-ne{background-position:-16px -16px;}
+.fl-theme-mist .ui-icon-triangle-1-e{background-position:-32px -16px;}
+.fl-theme-mist .ui-icon-triangle-1-se{background-position:-48px -16px;}
+.fl-theme-mist .ui-icon-triangle-1-s{background-position:-64px -16px;}
+.fl-theme-mist .ui-icon-triangle-1-sw{background-position:-80px -16px;}
+.fl-theme-mist .ui-icon-triangle-1-w{background-position:-96px -16px;}
+.fl-theme-mist .ui-icon-triangle-1-nw{background-position:-112px -16px;}
+.fl-theme-mist .ui-icon-triangle-2-n-s{background-position:-128px -16px;}
+.fl-theme-mist .ui-icon-triangle-2-e-w{background-position:-144px -16px;}
+.fl-theme-mist .ui-icon-arrow-1-n{background-position:0 -32px;}
+.fl-theme-mist .ui-icon-arrow-1-ne{background-position:-16px -32px;}
+.fl-theme-mist .ui-icon-arrow-1-e{background-position:-32px -32px;}
+.fl-theme-mist .ui-icon-arrow-1-se{background-position:-48px -32px;}
+.fl-theme-mist .ui-icon-arrow-1-s{background-position:-64px -32px;}
+.fl-theme-mist .ui-icon-arrow-1-sw{background-position:-80px -32px;}
+.fl-theme-mist .ui-icon-arrow-1-w{background-position:-96px -32px;}
+.fl-theme-mist .ui-icon-arrow-1-nw{background-position:-112px -32px;}
+.fl-theme-mist .ui-icon-arrow-2-n-s{background-position:-128px -32px;}
+.fl-theme-mist .ui-icon-arrow-2-ne-sw{background-position:-144px -32px;}
+.fl-theme-mist .ui-icon-arrow-2-e-w{background-position:-160px -32px;}
+.fl-theme-mist .ui-icon-arrow-2-se-nw{background-position:-176px -32px;}
+.fl-theme-mist .ui-icon-arrowstop-1-n{background-position:-192px -32px;}
+.fl-theme-mist .ui-icon-arrowstop-1-e{background-position:-208px -32px;}
+.fl-theme-mist .ui-icon-arrowstop-1-s{background-position:-224px -32px;}
+.fl-theme-mist .ui-icon-arrowstop-1-w{background-position:-240px -32px;}
+.fl-theme-mist .ui-icon-arrowthick-1-n{background-position:0 -48px;}
+.fl-theme-mist .ui-icon-arrowthick-1-ne{background-position:-16px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-1-e{background-position:-32px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-1-se{background-position:-48px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-1-s{background-position:-64px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-1-sw{background-position:-80px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-1-w{background-position:-96px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-1-nw{background-position:-112px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-2-n-s{background-position:-128px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-2-e-w{background-position:-160px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-2-se-nw{background-position:-176px -48px;}
+.fl-theme-mist .ui-icon-arrowthickstop-1-n{background-position:-192px -48px;}
+.fl-theme-mist .ui-icon-arrowthickstop-1-e{background-position:-208px -48px;}
+.fl-theme-mist .ui-icon-arrowthickstop-1-s{background-position:-224px -48px;}
+.fl-theme-mist .ui-icon-arrowthickstop-1-w{background-position:-240px -48px;}
+.fl-theme-mist .ui-icon-arrowreturnthick-1-w{background-position:0 -64px;}
+.fl-theme-mist .ui-icon-arrowreturnthick-1-n{background-position:-16px -64px;}
+.fl-theme-mist .ui-icon-arrowreturnthick-1-e{background-position:-32px -64px;}
+.fl-theme-mist .ui-icon-arrowreturnthick-1-s{background-position:-48px -64px;}
+.fl-theme-mist .ui-icon-arrowreturn-1-w{background-position:-64px -64px;}
+.fl-theme-mist .ui-icon-arrowreturn-1-n{background-position:-80px -64px;}
+.fl-theme-mist .ui-icon-arrowreturn-1-e{background-position:-96px -64px;}
+.fl-theme-mist .ui-icon-arrowreturn-1-s{background-position:-112px -64px;}
+.fl-theme-mist .ui-icon-arrowrefresh-1-w{background-position:-128px -64px;}
+.fl-theme-mist .ui-icon-arrowrefresh-1-n{background-position:-144px -64px;}
+.fl-theme-mist .ui-icon-arrowrefresh-1-e{background-position:-160px -64px;}
+.fl-theme-mist .ui-icon-arrowrefresh-1-s{background-position:-176px -64px;}
+.fl-theme-mist .ui-icon-arrow-4{background-position:0 -80px;}
+.fl-theme-mist .ui-icon-arrow-4-diag{background-position:-16px -80px;}
+.fl-theme-mist .ui-icon-extlink{background-position:-32px -80px;}
+.fl-theme-mist .ui-icon-newwin{background-position:-48px -80px;}
+.fl-theme-mist .ui-icon-refresh{background-position:-64px -80px;}
+.fl-theme-mist .ui-icon-shuffle{background-position:-80px -80px;}
+.fl-theme-mist .ui-icon-transfer-e-w{background-position:-96px -80px;}
+.fl-theme-mist .ui-icon-transferthick-e-w{background-position:-112px -80px;}
+.fl-theme-mist .ui-icon-folder-collapsed{background-position:0 -96px;}
+.fl-theme-mist .ui-icon-folder-open{background-position:-16px -96px;}
+.fl-theme-mist .ui-icon-document{background-position:-32px -96px;}
+.fl-theme-mist .ui-icon-document-b{background-position:-48px -96px;}
+.fl-theme-mist .ui-icon-note{background-position:-64px -96px;}
+.fl-theme-mist .ui-icon-mail-closed{background-position:-80px -96px;}
+.fl-theme-mist .ui-icon-mail-open{background-position:-96px -96px;}
+.fl-theme-mist .ui-icon-suitcase{background-position:-112px -96px;}
+.fl-theme-mist .ui-icon-comment{background-position:-128px -96px;}
+.fl-theme-mist .ui-icon-person{background-position:-144px -96px;}
+.fl-theme-mist .ui-icon-print{background-position:-160px -96px;}
+.fl-theme-mist .ui-icon-trash{background-position:-176px -96px;}
+.fl-theme-mist .ui-icon-locked{background-position:-192px -96px;}
+.fl-theme-mist .ui-icon-unlocked{background-position:-208px -96px;}
+.fl-theme-mist .ui-icon-bookmark{background-position:-224px -96px;}
+.fl-theme-mist .ui-icon-tag{background-position:-240px -96px;}
+.fl-theme-mist .ui-icon-home{background-position:0 -112px;}
+.fl-theme-mist .ui-icon-flag{background-position:-16px -112px;}
+.fl-theme-mist .ui-icon-calendar{background-position:-32px -112px;}
+.fl-theme-mist .ui-icon-cart{background-position:-48px -112px;}
+.fl-theme-mist .ui-icon-pencil{background-position:-64px -112px;}
+.fl-theme-mist .ui-icon-clock{background-position:-80px -112px;}
+.fl-theme-mist .ui-icon-disk{background-position:-96px -112px;}
+.fl-theme-mist .ui-icon-calculator{background-position:-112px -112px;}
+.fl-theme-mist .ui-icon-zoomin{background-position:-128px -112px;}
+.fl-theme-mist .ui-icon-zoomout{background-position:-144px -112px;}
+.fl-theme-mist .ui-icon-search{background-position:-160px -112px;}
+.fl-theme-mist .ui-icon-wrench{background-position:-176px -112px;}
+.fl-theme-mist .ui-icon-gear{background-position:-192px -112px;}
+.fl-theme-mist .ui-icon-heart{background-position:-208px -112px;}
+.fl-theme-mist .ui-icon-star{background-position:-224px -112px;}
+.fl-theme-mist .ui-icon-link{background-position:-240px -112px;}
+.fl-theme-mist .ui-icon-cancel{background-position:0 -128px;}
+.fl-theme-mist .ui-icon-plus{background-position:-16px -128px;}
+.fl-theme-mist .ui-icon-plusthick{background-position:-32px -128px;}
+.fl-theme-mist .ui-icon-minus{background-position:-48px -128px;}
+.fl-theme-mist .ui-icon-minusthick{background-position:-64px -128px;}
+.fl-theme-mist .ui-icon-close{background-position:-80px -128px;}
+.fl-theme-mist .ui-icon-closethick{background-position:-96px -128px;}
+.fl-theme-mist .ui-icon-key{background-position:-112px -128px;}
+.fl-theme-mist .ui-icon-lightbulb{background-position:-128px -128px;}
+.fl-theme-mist .ui-icon-scissors{background-position:-144px -128px;}
+.fl-theme-mist .ui-icon-clipboard{background-position:-160px -128px;}
+.fl-theme-mist .ui-icon-copy{background-position:-176px -128px;}
+.fl-theme-mist .ui-icon-contact{background-position:-192px -128px;}
+.fl-theme-mist .ui-icon-image{background-position:-208px -128px;}
+.fl-theme-mist .ui-icon-video{background-position:-224px -128px;}
+.fl-theme-mist .ui-icon-script{background-position:-240px -128px;}
+.fl-theme-mist .ui-icon-alert{background-position:0 -144px;}
+.fl-theme-mist .ui-icon-info{background-position:-16px -144px;}
+.fl-theme-mist .ui-icon-notice{background-position:-32px -144px;}
+.fl-theme-mist .ui-icon-help{background-position:-48px -144px;}
+.fl-theme-mist .ui-icon-check{background-position:-64px -144px;}
+.fl-theme-mist .ui-icon-bullet{background-position:-80px -144px;}
+.fl-theme-mist .ui-icon-radio-off{background-position:-96px -144px;}
+.fl-theme-mist .ui-icon-radio-on{background-position:-112px -144px;}
+.fl-theme-mist .ui-icon-pin-w{background-position:-128px -144px;}
+.fl-theme-mist .ui-icon-pin-s{background-position:-144px -144px;}
+.fl-theme-mist .ui-icon-play{background-position:0 -160px;}
+.fl-theme-mist .ui-icon-pause{background-position:-16px -160px;}
+.fl-theme-mist .ui-icon-seek-next{background-position:-32px -160px;}
+.fl-theme-mist .ui-icon-seek-prev{background-position:-48px -160px;}
+.fl-theme-mist .ui-icon-seek-end{background-position:-64px -160px;}
+.fl-theme-mist .ui-icon-seek-first{background-position:-80px -160px;}
+.fl-theme-mist .ui-icon-stop{background-position:-96px -160px;}
+.fl-theme-mist .ui-icon-eject{background-position:-112px -160px;}
+.fl-theme-mist .ui-icon-volume-off{background-position:-128px -160px;}
+.fl-theme-mist .ui-icon-volume-on{background-position:-144px -160px;}
+.fl-theme-mist .ui-icon-power{background-position:0 -176px;}
+.fl-theme-mist .ui-icon-signal-diag{background-position:-16px -176px;}
+.fl-theme-mist .ui-icon-signal{background-position:-32px -176px;}
+.fl-theme-mist .ui-icon-battery-0{background-position:-48px -176px;}
+.fl-theme-mist .ui-icon-battery-1{background-position:-64px -176px;}
+.fl-theme-mist .ui-icon-battery-2{background-position:-80px -176px;}
+.fl-theme-mist .ui-icon-battery-3{background-position:-96px -176px;}
+.fl-theme-mist .ui-icon-circle-plus{background-position:0 -192px;}
+.fl-theme-mist .ui-icon-circle-minus{background-position:-16px -192px;}
+.fl-theme-mist .ui-icon-circle-close{background-position:-32px -192px;}
+.fl-theme-mist .ui-icon-circle-triangle-e{background-position:-48px -192px;}
+.fl-theme-mist .ui-icon-circle-triangle-s{background-position:-64px -192px;}
+.fl-theme-mist .ui-icon-circle-triangle-w{background-position:-80px -192px;}
+.fl-theme-mist .ui-icon-circle-triangle-n{background-position:-96px -192px;}
+.fl-theme-mist .ui-icon-circle-arrow-e{background-position:-112px -192px;}
+.fl-theme-mist .ui-icon-circle-arrow-s{background-position:-128px -192px;}
+.fl-theme-mist .ui-icon-circle-arrow-w{background-position:-144px -192px;}
+.fl-theme-mist .ui-icon-circle-arrow-n{background-position:-160px -192px;}
+.fl-theme-mist .ui-icon-circle-zoomin{background-position:-176px -192px;}
+.fl-theme-mist .ui-icon-circle-zoomout{background-position:-192px -192px;}
+.fl-theme-mist .ui-icon-circle-check{background-position:-208px -192px;}
+.fl-theme-mist .ui-icon-circlesmall-plus{background-position:0 -208px;}
+.fl-theme-mist .ui-icon-circlesmall-minus{background-position:-16px -208px;}
+.fl-theme-mist .ui-icon-circlesmall-close{background-position:-32px -208px;}
+.fl-theme-mist .ui-icon-squaresmall-plus{background-position:-48px -208px;}
+.fl-theme-mist .ui-icon-squaresmall-minus{background-position:-64px -208px;}
+.fl-theme-mist .ui-icon-squaresmall-close{background-position:-80px -208px;}
+.fl-theme-mist .ui-icon-grip-dotted-vertical{background-position:0 -224px;}
+.fl-theme-mist .ui-icon-grip-dotted-horizontal{background-position:-16px -224px;}
+.fl-theme-mist .ui-icon-grip-solid-vertical{background-position:-32px -224px;}
+.fl-theme-mist .ui-icon-grip-solid-horizontal{background-position:-48px -224px;}
+.fl-theme-mist .ui-icon-gripsmall-diagonal-se{background-position:-64px -224px;}
+.fl-theme-mist .ui-icon-grip-diagonal-se{background-position:-80px -224px;}
+.fl-theme-mist .ui-corner-tl{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;}
+.fl-theme-mist .ui-corner-tr{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;}
+.fl-theme-mist .ui-corner-bl{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;}
+.fl-theme-mist .ui-corner-br{-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;}
+.fl-theme-mist .ui-corner-top{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;}
+.fl-theme-mist .ui-corner-bottom{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;}
+.fl-theme-mist .ui-corner-right{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;}
+.fl-theme-mist .ui-corner-left{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;}
+.fl-theme-mist .ui-corner-all{-moz-border-radius:4px;-webkit-border-radius:4px;}
+.fl-theme-mist .ui-widget-overlay{background:#2e83ff url(images/ui-bg_flat_0_2e83ff_40x100.png) 50% 50% repeat-x;opacity:.20;filter:Alpha(Opacity=20);}
+.fl-theme-mist .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flat_0_000000_40x100.png) 50% 50% repeat-x;opacity:.30;filter:Alpha(Opacity=30);-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-mist .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}
+.fl-theme-mist .ui-accordion .ui-accordion-li-fix{display:inline;}
+.fl-theme-mist .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}
+.fl-theme-mist .ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em 2.2em;}
+.fl-theme-mist .ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px;}
+.fl-theme-mist .ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;}
+.fl-theme-mist .ui-accordion .ui-accordion-content-active{display:block;}
+.fl-theme-mist .ui-datepicker{width:17em;padding:.2em .2em 0;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-prev,.fl-theme-mist .ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-prev-hover,.fl-theme-mist .ui-datepicker .ui-datepicker-next-hover{top:1px;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-prev{left:2px;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-next{right:2px;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-prev-hover{left:1px;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-next-hover{right:1px;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-prev span,.fl-theme-mist .ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-title select{float:left;font-size:1em;margin:1px 0;}
+.fl-theme-mist .ui-datepicker select.ui-datepicker-month-year{width:100%;}
+.fl-theme-mist .ui-datepicker select.ui-datepicker-month,.fl-theme-mist .ui-datepicker select.ui-datepicker-year{width:49%;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-title select.ui-datepicker-year{float:right;}
+.fl-theme-mist .ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em;}
+.fl-theme-mist .ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0;}
+.fl-theme-mist .ui-datepicker td{border:0;padding:1px;}
+.fl-theme-mist .ui-datepicker td span,.fl-theme-mist .ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left;}
+.fl-theme-mist .ui-datepicker.ui-datepicker-multi{width:auto;}
+.fl-theme-mist .ui-datepicker-multi .ui-datepicker-group{float:left;}
+.fl-theme-mist .ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em;}
+.fl-theme-mist .ui-datepicker-multi-2 .ui-datepicker-group{width:50%;}
+.fl-theme-mist .ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%;}
+.fl-theme-mist .ui-datepicker-multi-4 .ui-datepicker-group{width:25%;}
+.fl-theme-mist .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0;}
+.fl-theme-mist .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0;}
+.fl-theme-mist .ui-datepicker-multi .ui-datepicker-buttonpane{clear:left;}
+.fl-theme-mist .ui-datepicker-row-break{clear:both;width:100%;}
+.fl-theme-mist .ui-datepicker-rtl{direction:rtl;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-group{float:right;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-mist .ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px;}
+.fl-theme-mist .ui-dialog{position:relative;padding:.2em;width:300px;}
+.fl-theme-mist .ui-dialog .ui-dialog-titlebar{padding:.5em .3em .3em 1em;position:relative;}
+.fl-theme-mist .ui-dialog .ui-dialog-title{float:left;margin:.1em 0 .2em;}
+.fl-theme-mist .ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px;}
+.fl-theme-mist .ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px;}
+.fl-theme-mist .ui-dialog .ui-dialog-titlebar-close:hover,.fl-theme-mist .ui-dialog .ui-dialog-titlebar-close:focus{padding:0;}
+.fl-theme-mist .ui-dialog .ui-dialog-content{border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1;}
+.fl-theme-mist .ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em;}
+.fl-theme-mist .ui-dialog .ui-dialog-buttonpane button{float:right;margin:.5em .4em .5em 0;cursor:pointer;padding:.2em .6em .3em .6em;line-height:1.4em;width:auto;overflow:visible;}
+.fl-theme-mist .ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px;}
+.fl-theme-mist .ui-draggable .ui-dialog-titlebar{cursor:move;}
+.fl-theme-mist .ui-progressbar{height:2em;text-align:left;}
+.fl-theme-mist .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%;}
+.fl-theme-mist .ui-resizable{position:relative;}
+.fl-theme-mist .ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block;}
+.fl-theme-mist .ui-resizable-disabled .ui-resizable-handle,.fl-theme-mist .ui-resizable-autohide .ui-resizable-handle{display:none;}
+.fl-theme-mist .ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0;}
+.fl-theme-mist .ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0;}
+.fl-theme-mist .ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%;}
+.fl-theme-mist .ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%;}
+.fl-theme-mist .ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px;}
+.fl-theme-mist .ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px;}
+.fl-theme-mist .ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px;}
+.fl-theme-mist .ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px;}
+.fl-theme-mist .ui-slider{position:relative;text-align:left;}
+.fl-theme-mist .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;}
+.fl-theme-mist .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;}
+.fl-theme-mist .ui-slider-horizontal{height:.8em;}
+.fl-theme-mist .ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em;}
+.fl-theme-mist .ui-slider-horizontal .ui-slider-range{top:0;height:100%;}
+.fl-theme-mist .ui-slider-horizontal .ui-slider-range-min{left:0;}
+.fl-theme-mist .ui-slider-horizontal .ui-slider-range-max{right:0;}
+.fl-theme-mist .ui-slider-vertical{width:.8em;height:100px;}
+.fl-theme-mist .ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em;}
+.fl-theme-mist .ui-slider-vertical .ui-slider-range{left:0;width:100%;}
+.fl-theme-mist .ui-slider-vertical .ui-slider-range-min{bottom:0;}
+.fl-theme-mist .ui-slider-vertical .ui-slider-range-max{top:0;}
+.fl-theme-mist .ui-tabs{padding:.2em;zoom:1;}
+.fl-theme-mist .ui-tabs .ui-tabs-nav{list-style:none;position:relative;padding:.2em .2em 0;}
+.fl-theme-mist .ui-tabs .ui-tabs-nav li{position:relative;float:left;border-bottom-width:0!important;margin:0 .2em -1px 0;padding:0;}
+.fl-theme-mist .ui-tabs .ui-tabs-nav li a{float:left;text-decoration:none;padding:.5em 1em;}
+.fl-theme-mist .ui-tabs .ui-tabs-nav li.ui-tabs-selected{padding-bottom:1px;border-bottom-width:0;}
+.fl-theme-mist .ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.fl-theme-mist .ui-tabs .ui-tabs-nav li.ui-state-disabled a,.fl-theme-mist .ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text;}
+.fl-theme-mist .ui-tabs .ui-tabs-nav li a,.fl-theme-mist .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer;}
+.fl-theme-mist .ui-tabs .ui-tabs-panel{padding:1em 1.4em;display:block;border-width:0;background:none;}
+.fl-theme-mist .ui-tabs .ui-tabs-hide{display:none!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_666666_40x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_666666_40x100.png
new file mode 100644 (file)
index 0000000..b3dc88e
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_666666_40x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_999999_40x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_999999_40x100.png
new file mode 100644 (file)
index 0000000..6b6de7d
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_999999_40x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_cccccc_40x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_cccccc_40x100.png
new file mode 100644 (file)
index 0000000..5473aff
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_cccccc_40x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ebebeb_40x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ebebeb_40x100.png
new file mode 100644 (file)
index 0000000..1d773f9
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ebebeb_40x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ffffff_40x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ffffff_40x100.png
new file mode 100644 (file)
index 0000000..ac8b229
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ffffff_40x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_glass_75_666666_1x400.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_glass_75_666666_1x400.png
new file mode 100644 (file)
index 0000000..f7b1655
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_glass_75_666666_1x400.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-hard_100_ebebeb_1x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-hard_100_ebebeb_1x100.png
new file mode 100644 (file)
index 0000000..f182c8b
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-hard_100_ebebeb_1x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-soft_75_999999_1x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-soft_75_999999_1x100.png
new file mode 100644 (file)
index 0000000..0721365
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-soft_75_999999_1x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_inset-hard_100_ebebeb_1x100.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_inset-hard_100_ebebeb_1x100.png
new file mode 100644 (file)
index 0000000..9926860
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_inset-hard_100_ebebeb_1x100.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_000000_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_000000_256x240.png
new file mode 100644 (file)
index 0000000..842156d
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_000000_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_666666_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_666666_256x240.png
new file mode 100644 (file)
index 0000000..ba04b08
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_666666_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ebebeb_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ebebeb_256x240.png
new file mode 100644 (file)
index 0000000..c3a2a91
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ebebeb_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ffffff_256x240.png b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ffffff_256x240.png
new file mode 100644 (file)
index 0000000..746e6fa
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ffffff_256x240.png differ
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/slate.css b/docs/include/jscripts/infusion/lib/jquery/ui/css/fl-theme-slate/slate.css
new file mode 100644 (file)
index 0000000..30b7684
--- /dev/null
@@ -0,0 +1,319 @@
+.fl-theme-slate .ui-helper-hidden{display:none;}
+.fl-theme-slate .ui-helper-hidden-accessible{position:absolute;left:-99999999px;}
+.fl-theme-slate .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none;}
+.fl-theme-slate .ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
+.fl-theme-slate .ui-helper-clearfix{display:inline-block;}
+/* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix{height:1%;}
+.fl-theme-slate .ui-helper-clearfix{display:block;}
+/* end clearfix */ .fl-theme-slate .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0);}
+.fl-theme-slate .ui-state-disabled{cursor:default!important;}
+.fl-theme-slate .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;}
+.fl-theme-slate .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
+.fl-theme-slate .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-slate .ui-widget input,.fl-theme-slate .ui-widget select,.fl-theme-slate .ui-widget textarea,.fl-theme-slate .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-slate .ui-widget-content{border:1px solid #999;background:#ebebeb url(images/ui-bg_flat_0_ebebeb_40x100.png) 50% 50% repeat-x;color:#000;}
+.fl-theme-slate .ui-widget-content a{color:#000;}
+.fl-theme-slate .ui-widget-header{border:1px solid #666;background:#666 url(images/ui-bg_glass_75_666666_1x400.png) 50% 50% repeat-x;color:#fff;font-weight:bold;}
+.fl-theme-slate .ui-widget-header a{color:#fff;}
+.fl-theme-slate .ui-state-default,.fl-theme-slate .ui-widget-content .ui-state-default{border:1px solid #ccc;background:#ebebeb url(images/ui-bg_inset-hard_100_ebebeb_1x100.png) 50% 50% repeat-x;font-weight:normal;color:#666;outline:none;}
+.fl-theme-slate .ui-state-default a,.fl-theme-slate .ui-state-default a:link,.fl-theme-slate .ui-state-default a:visited{color:#666;text-decoration:none;outline:none;}
+.fl-theme-slate .ui-state-hover,.fl-theme-slate .ui-widget-content .ui-state-hover,.fl-theme-slate .ui-state-focus,.fl-theme-slate .ui-widget-content .ui-state-focus{border:1px solid #999;background:#999 url(images/ui-bg_highlight-soft_75_999999_1x100.png) 50% 50% repeat-x;font-weight:normal;color:#ebebeb;outline:none;}
+.fl-theme-slate .ui-state-hover a,.fl-theme-slate .ui-state-hover a:hover{color:#ebebeb;text-decoration:none;outline:none;}
+.fl-theme-slate .ui-state-active,.fl-theme-slate .ui-widget-content .ui-state-active{border:1px solid #ccc;background:#ebebeb url(images/ui-bg_highlight-hard_100_ebebeb_1x100.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
+.fl-theme-slate .ui-state-active a,.fl-theme-slate .ui-state-active a:link,.fl-theme-slate .ui-state-active a:visited{color:#000;outline:none;text-decoration:none;}
+.fl-theme-slate .ui-state-highlight,.fl-theme-slate .ui-widget-content .ui-state-highlight{border:1px solid #ccc;background:#fff url(images/ui-bg_flat_0_ffffff_40x100.png) 50% 50% repeat-x;color:#666;}
+.fl-theme-slate .ui-state-highlight a,.fl-theme-slate .ui-widget-content .ui-state-highlight a{color:#666;}
+.fl-theme-slate .ui-state-error,.fl-theme-slate .ui-widget-content .ui-state-error{border:1px solid #000;background:#666 url(images/ui-bg_flat_0_666666_40x100.png) 50% 50% repeat-x;color:#fff;}
+.fl-theme-slate .ui-state-error a,.fl-theme-slate .ui-widget-content .ui-state-error a{color:#fff;}
+.fl-theme-slate .ui-state-error-text,.fl-theme-slate .ui-widget-content .ui-state-error-text{color:#fff;}
+.fl-theme-slate .ui-state-disabled,.fl-theme-slate .ui-widget-content .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none;}
+.fl-theme-slate .ui-priority-primary,.fl-theme-slate .ui-widget-content .ui-priority-primary{font-weight:bold;}
+.fl-theme-slate .ui-priority-secondary,.fl-theme-slate .ui-widget-content .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal;}
+.fl-theme-slate .ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-slate .ui-widget-content .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-slate .ui-widget-header .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-slate .ui-state-default .ui-icon{background-image:url(images/ui-icons_666666_256x240.png);}
+.fl-theme-slate .ui-state-hover .ui-icon,.fl-theme-slate .ui-state-focus .ui-icon{background-image:url(images/ui-icons_ebebeb_256x240.png);}
+.fl-theme-slate .ui-state-active .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-slate .ui-state-highlight .ui-icon{background-image:url(images/ui-icons_666666_256x240.png);}
+.fl-theme-slate .ui-state-error .ui-icon,.fl-theme-slate .ui-state-error-text .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-slate .ui-icon-carat-1-n{background-position:0 0;}
+.fl-theme-slate .ui-icon-carat-1-ne{background-position:-16px 0;}
+.fl-theme-slate .ui-icon-carat-1-e{background-position:-32px 0;}
+.fl-theme-slate .ui-icon-carat-1-se{background-position:-48px 0;}
+.fl-theme-slate .ui-icon-carat-1-s{background-position:-64px 0;}
+.fl-theme-slate .ui-icon-carat-1-sw{background-position:-80px 0;}
+.fl-theme-slate .ui-icon-carat-1-w{background-position:-96px 0;}
+.fl-theme-slate .ui-icon-carat-1-nw{background-position:-112px 0;}
+.fl-theme-slate .ui-icon-carat-2-n-s{background-position:-128px 0;}
+.fl-theme-slate .ui-icon-carat-2-e-w{background-position:-144px 0;}
+.fl-theme-slate .ui-icon-triangle-1-n{background-position:0 -16px;}
+.fl-theme-slate .ui-icon-triangle-1-ne{background-position:-16px -16px;}
+.fl-theme-slate .ui-icon-triangle-1-e{background-position:-32px -16px;}
+.fl-theme-slate .ui-icon-triangle-1-se{background-position:-48px -16px;}
+.fl-theme-slate .ui-icon-triangle-1-s{background-position:-64px -16px;}
+.fl-theme-slate .ui-icon-triangle-1-sw{background-position:-80px -16px;}
+.fl-theme-slate .ui-icon-triangle-1-w{background-position:-96px -16px;}
+.fl-theme-slate .ui-icon-triangle-1-nw{background-position:-112px -16px;}
+.fl-theme-slate .ui-icon-triangle-2-n-s{background-position:-128px -16px;}
+.fl-theme-slate .ui-icon-triangle-2-e-w{background-position:-144px -16px;}
+.fl-theme-slate .ui-icon-arrow-1-n{background-position:0 -32px;}
+.fl-theme-slate .ui-icon-arrow-1-ne{background-position:-16px -32px;}
+.fl-theme-slate .ui-icon-arrow-1-e{background-position:-32px -32px;}
+.fl-theme-slate .ui-icon-arrow-1-se{background-position:-48px -32px;}
+.fl-theme-slate .ui-icon-arrow-1-s{background-position:-64px -32px;}
+.fl-theme-slate .ui-icon-arrow-1-sw{background-position:-80px -32px;}
+.fl-theme-slate .ui-icon-arrow-1-w{background-position:-96px -32px;}
+.fl-theme-slate .ui-icon-arrow-1-nw{background-position:-112px -32px;}
+.fl-theme-slate .ui-icon-arrow-2-n-s{background-position:-128px -32px;}
+.fl-theme-slate .ui-icon-arrow-2-ne-sw{background-position:-144px -32px;}
+.fl-theme-slate .ui-icon-arrow-2-e-w{background-position:-160px -32px;}
+.fl-theme-slate .ui-icon-arrow-2-se-nw{background-position:-176px -32px;}
+.fl-theme-slate .ui-icon-arrowstop-1-n{background-position:-192px -32px;}
+.fl-theme-slate .ui-icon-arrowstop-1-e{background-position:-208px -32px;}
+.fl-theme-slate .ui-icon-arrowstop-1-s{background-position:-224px -32px;}
+.fl-theme-slate .ui-icon-arrowstop-1-w{background-position:-240px -32px;}
+.fl-theme-slate .ui-icon-arrowthick-1-n{background-position:0 -48px;}
+.fl-theme-slate .ui-icon-arrowthick-1-ne{background-position:-16px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-1-e{background-position:-32px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-1-se{background-position:-48px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-1-s{background-position:-64px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-1-sw{background-position:-80px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-1-w{background-position:-96px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-1-nw{background-position:-112px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-2-n-s{background-position:-128px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-2-e-w{background-position:-160px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-2-se-nw{background-position:-176px -48px;}
+.fl-theme-slate .ui-icon-arrowthickstop-1-n{background-position:-192px -48px;}
+.fl-theme-slate .ui-icon-arrowthickstop-1-e{background-position:-208px -48px;}
+.fl-theme-slate .ui-icon-arrowthickstop-1-s{background-position:-224px -48px;}
+.fl-theme-slate .ui-icon-arrowthickstop-1-w{background-position:-240px -48px;}
+.fl-theme-slate .ui-icon-arrowreturnthick-1-w{background-position:0 -64px;}
+.fl-theme-slate .ui-icon-arrowreturnthick-1-n{background-position:-16px -64px;}
+.fl-theme-slate .ui-icon-arrowreturnthick-1-e{background-position:-32px -64px;}
+.fl-theme-slate .ui-icon-arrowreturnthick-1-s{background-position:-48px -64px;}
+.fl-theme-slate .ui-icon-arrowreturn-1-w{background-position:-64px -64px;}
+.fl-theme-slate .ui-icon-arrowreturn-1-n{background-position:-80px -64px;}
+.fl-theme-slate .ui-icon-arrowreturn-1-e{background-position:-96px -64px;}
+.fl-theme-slate .ui-icon-arrowreturn-1-s{background-position:-112px -64px;}
+.fl-theme-slate .ui-icon-arrowrefresh-1-w{background-position:-128px -64px;}
+.fl-theme-slate .ui-icon-arrowrefresh-1-n{background-position:-144px -64px;}
+.fl-theme-slate .ui-icon-arrowrefresh-1-e{background-position:-160px -64px;}
+.fl-theme-slate .ui-icon-arrowrefresh-1-s{background-position:-176px -64px;}
+.fl-theme-slate .ui-icon-arrow-4{background-position:0 -80px;}
+.fl-theme-slate .ui-icon-arrow-4-diag{background-position:-16px -80px;}
+.fl-theme-slate .ui-icon-extlink{background-position:-32px -80px;}
+.fl-theme-slate .ui-icon-newwin{background-position:-48px -80px;}
+.fl-theme-slate .ui-icon-refresh{background-position:-64px -80px;}
+.fl-theme-slate .ui-icon-shuffle{background-position:-80px -80px;}
+.fl-theme-slate .ui-icon-transfer-e-w{background-position:-96px -80px;}
+.fl-theme-slate .ui-icon-transferthick-e-w{background-position:-112px -80px;}
+.fl-theme-slate .ui-icon-folder-collapsed{background-position:0 -96px;}
+.fl-theme-slate .ui-icon-folder-open{background-position:-16px -96px;}
+.fl-theme-slate .ui-icon-document{background-position:-32px -96px;}
+.fl-theme-slate .ui-icon-document-b{background-position:-48px -96px;}
+.fl-theme-slate .ui-icon-note{background-position:-64px -96px;}
+.fl-theme-slate .ui-icon-mail-closed{background-position:-80px -96px;}
+.fl-theme-slate .ui-icon-mail-open{background-position:-96px -96px;}
+.fl-theme-slate .ui-icon-suitcase{background-position:-112px -96px;}
+.fl-theme-slate .ui-icon-comment{background-position:-128px -96px;}
+.fl-theme-slate .ui-icon-person{background-position:-144px -96px;}
+.fl-theme-slate .ui-icon-print{background-position:-160px -96px;}
+.fl-theme-slate .ui-icon-trash{background-position:-176px -96px;}
+.fl-theme-slate .ui-icon-locked{background-position:-192px -96px;}
+.fl-theme-slate .ui-icon-unlocked{background-position:-208px -96px;}
+.fl-theme-slate .ui-icon-bookmark{background-position:-224px -96px;}
+.fl-theme-slate .ui-icon-tag{background-position:-240px -96px;}
+.fl-theme-slate .ui-icon-home{background-position:0 -112px;}
+.fl-theme-slate .ui-icon-flag{background-position:-16px -112px;}
+.fl-theme-slate .ui-icon-calendar{background-position:-32px -112px;}
+.fl-theme-slate .ui-icon-cart{background-position:-48px -112px;}
+.fl-theme-slate .ui-icon-pencil{background-position:-64px -112px;}
+.fl-theme-slate .ui-icon-clock{background-position:-80px -112px;}
+.fl-theme-slate .ui-icon-disk{background-position:-96px -112px;}
+.fl-theme-slate .ui-icon-calculator{background-position:-112px -112px;}
+.fl-theme-slate .ui-icon-zoomin{background-position:-128px -112px;}
+.fl-theme-slate .ui-icon-zoomout{background-position:-144px -112px;}
+.fl-theme-slate .ui-icon-search{background-position:-160px -112px;}
+.fl-theme-slate .ui-icon-wrench{background-position:-176px -112px;}
+.fl-theme-slate .ui-icon-gear{background-position:-192px -112px;}
+.fl-theme-slate .ui-icon-heart{background-position:-208px -112px;}
+.fl-theme-slate .ui-icon-star{background-position:-224px -112px;}
+.fl-theme-slate .ui-icon-link{background-position:-240px -112px;}
+.fl-theme-slate .ui-icon-cancel{background-position:0 -128px;}
+.fl-theme-slate .ui-icon-plus{background-position:-16px -128px;}
+.fl-theme-slate .ui-icon-plusthick{background-position:-32px -128px;}
+.fl-theme-slate .ui-icon-minus{background-position:-48px -128px;}
+.fl-theme-slate .ui-icon-minusthick{background-position:-64px -128px;}
+.fl-theme-slate .ui-icon-close{background-position:-80px -128px;}
+.fl-theme-slate .ui-icon-closethick{background-position:-96px -128px;}
+.fl-theme-slate .ui-icon-key{background-position:-112px -128px;}
+.fl-theme-slate .ui-icon-lightbulb{background-position:-128px -128px;}
+.fl-theme-slate .ui-icon-scissors{background-position:-144px -128px;}
+.fl-theme-slate .ui-icon-clipboard{background-position:-160px -128px;}
+.fl-theme-slate .ui-icon-copy{background-position:-176px -128px;}
+.fl-theme-slate .ui-icon-contact{background-position:-192px -128px;}
+.fl-theme-slate .ui-icon-image{background-position:-208px -128px;}
+.fl-theme-slate .ui-icon-video{background-position:-224px -128px;}
+.fl-theme-slate .ui-icon-script{background-position:-240px -128px;}
+.fl-theme-slate .ui-icon-alert{background-position:0 -144px;}
+.fl-theme-slate .ui-icon-info{background-position:-16px -144px;}
+.fl-theme-slate .ui-icon-notice{background-position:-32px -144px;}
+.fl-theme-slate .ui-icon-help{background-position:-48px -144px;}
+.fl-theme-slate .ui-icon-check{background-position:-64px -144px;}
+.fl-theme-slate .ui-icon-bullet{background-position:-80px -144px;}
+.fl-theme-slate .ui-icon-radio-off{background-position:-96px -144px;}
+.fl-theme-slate .ui-icon-radio-on{background-position:-112px -144px;}
+.fl-theme-slate .ui-icon-pin-w{background-position:-128px -144px;}
+.fl-theme-slate .ui-icon-pin-s{background-position:-144px -144px;}
+.fl-theme-slate .ui-icon-play{background-position:0 -160px;}
+.fl-theme-slate .ui-icon-pause{background-position:-16px -160px;}
+.fl-theme-slate .ui-icon-seek-next{background-position:-32px -160px;}
+.fl-theme-slate .ui-icon-seek-prev{background-position:-48px -160px;}
+.fl-theme-slate .ui-icon-seek-end{background-position:-64px -160px;}
+.fl-theme-slate .ui-icon-seek-first{background-position:-80px -160px;}
+.fl-theme-slate .ui-icon-stop{background-position:-96px -160px;}
+.fl-theme-slate .ui-icon-eject{background-position:-112px -160px;}
+.fl-theme-slate .ui-icon-volume-off{background-position:-128px -160px;}
+.fl-theme-slate .ui-icon-volume-on{background-position:-144px -160px;}
+.fl-theme-slate .ui-icon-power{background-position:0 -176px;}
+.fl-theme-slate .ui-icon-signal-diag{background-position:-16px -176px;}
+.fl-theme-slate .ui-icon-signal{background-position:-32px -176px;}
+.fl-theme-slate .ui-icon-battery-0{background-position:-48px -176px;}
+.fl-theme-slate .ui-icon-battery-1{background-position:-64px -176px;}
+.fl-theme-slate .ui-icon-battery-2{background-position:-80px -176px;}
+.fl-theme-slate .ui-icon-battery-3{background-position:-96px -176px;}
+.fl-theme-slate .ui-icon-circle-plus{background-position:0 -192px;}
+.fl-theme-slate .ui-icon-circle-minus{background-position:-16px -192px;}
+.fl-theme-slate .ui-icon-circle-close{background-position:-32px -192px;}
+.fl-theme-slate .ui-icon-circle-triangle-e{background-position:-48px -192px;}
+.fl-theme-slate .ui-icon-circle-triangle-s{background-position:-64px -192px;}
+.fl-theme-slate .ui-icon-circle-triangle-w{background-position:-80px -192px;}
+.fl-theme-slate .ui-icon-circle-triangle-n{background-position:-96px -192px;}
+.fl-theme-slate .ui-icon-circle-arrow-e{background-position:-112px -192px;}
+.fl-theme-slate .ui-icon-circle-arrow-s{background-position:-128px -192px;}
+.fl-theme-slate .ui-icon-circle-arrow-w{background-position:-144px -192px;}
+.fl-theme-slate .ui-icon-circle-arrow-n{background-position:-160px -192px;}
+.fl-theme-slate .ui-icon-circle-zoomin{background-position:-176px -192px;}
+.fl-theme-slate .ui-icon-circle-zoomout{background-position:-192px -192px;}
+.fl-theme-slate .ui-icon-circle-check{background-position:-208px -192px;}
+.fl-theme-slate .ui-icon-circlesmall-plus{background-position:0 -208px;}
+.fl-theme-slate .ui-icon-circlesmall-minus{background-position:-16px -208px;}
+.fl-theme-slate .ui-icon-circlesmall-close{background-position:-32px -208px;}
+.fl-theme-slate .ui-icon-squaresmall-plus{background-position:-48px -208px;}
+.fl-theme-slate .ui-icon-squaresmall-minus{background-position:-64px -208px;}
+.fl-theme-slate .ui-icon-squaresmall-close{background-position:-80px -208px;}
+.fl-theme-slate .ui-icon-grip-dotted-vertical{background-position:0 -224px;}
+.fl-theme-slate .ui-icon-grip-dotted-horizontal{background-position:-16px -224px;}
+.fl-theme-slate .ui-icon-grip-solid-vertical{background-position:-32px -224px;}
+.fl-theme-slate .ui-icon-grip-solid-horizontal{background-position:-48px -224px;}
+.fl-theme-slate .ui-icon-gripsmall-diagonal-se{background-position:-64px -224px;}
+.fl-theme-slate .ui-icon-grip-diagonal-se{background-position:-80px -224px;}
+.fl-theme-slate .ui-corner-tl{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;}
+.fl-theme-slate .ui-corner-tr{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;}
+.fl-theme-slate .ui-corner-bl{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;}
+.fl-theme-slate .ui-corner-br{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-slate .ui-corner-top{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;}
+.fl-theme-slate .ui-corner-bottom{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-slate .ui-corner-right{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-slate .ui-corner-left{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;}
+.fl-theme-slate .ui-corner-all{-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-slate .ui-widget-overlay{background:#ccc url(images/ui-bg_flat_0_cccccc_40x100.png) 50% 50% repeat-x;opacity:.50;filter:Alpha(Opacity=50);}
+.fl-theme-slate .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#999 url(images/ui-bg_flat_0_999999_40x100.png) 50% 50% repeat-x;opacity:.50;filter:Alpha(Opacity=50);-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-slate .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}
+.fl-theme-slate .ui-accordion .ui-accordion-li-fix{display:inline;}
+.fl-theme-slate .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}
+.fl-theme-slate .ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em 2.2em;}
+.fl-theme-slate .ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px;}
+.fl-theme-slate .ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;}
+.fl-theme-slate .ui-accordion .ui-accordion-content-active{display:block;}
+.fl-theme-slate .ui-datepicker{width:17em;padding:.2em .2em 0;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-prev,.fl-theme-slate .ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-prev-hover,.fl-theme-slate .ui-datepicker .ui-datepicker-next-hover{top:1px;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-prev{left:2px;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-next{right:2px;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-prev-hover{left:1px;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-next-hover{right:1px;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-prev span,.fl-theme-slate .ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-title select{float:left;font-size:1em;margin:1px 0;}
+.fl-theme-slate .ui-datepicker select.ui-datepicker-month-year{width:100%;}
+.fl-theme-slate .ui-datepicker select.ui-datepicker-month,.fl-theme-slate .ui-datepicker select.ui-datepicker-year{width:49%;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-title select.ui-datepicker-year{float:right;}
+.fl-theme-slate .ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em;}
+.fl-theme-slate .ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0;}
+.fl-theme-slate .ui-datepicker td{border:0;padding:1px;}
+.fl-theme-slate .ui-datepicker td span,.fl-theme-slate .ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left;}
+.fl-theme-slate .ui-datepicker.ui-datepicker-multi{width:auto;}
+.fl-theme-slate .ui-datepicker-multi .ui-datepicker-group{float:left;}
+.fl-theme-slate .ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em;}
+.fl-theme-slate .ui-datepicker-multi-2 .ui-datepicker-group{width:50%;}
+.fl-theme-slate .ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%;}
+.fl-theme-slate .ui-datepicker-multi-4 .ui-datepicker-group{width:25%;}
+.fl-theme-slate .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0;}
+.fl-theme-slate .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0;}
+.fl-theme-slate .ui-datepicker-multi .ui-datepicker-buttonpane{clear:left;}
+.fl-theme-slate .ui-datepicker-row-break{clear:both;width:100%;}
+.fl-theme-slate .ui-datepicker-rtl{direction:rtl;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-group{float:right;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-slate .ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px;}
+.fl-theme-slate .ui-dialog{position:relative;padding:.2em;width:300px;}
+.fl-theme-slate .ui-dialog .ui-dialog-titlebar{padding:.5em .3em .3em 1em;position:relative;}
+.fl-theme-slate .ui-dialog .ui-dialog-title{float:left;margin:.1em 0 .2em;}
+.fl-theme-slate .ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px;}
+.fl-theme-slate .ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px;}
+.fl-theme-slate .ui-dialog .ui-dialog-titlebar-close:hover,.fl-theme-slate .ui-dialog .ui-dialog-titlebar-close:focus{padding:0;}
+.fl-theme-slate .ui-dialog .ui-dialog-content{border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1;}
+.fl-theme-slate .ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em;}
+.fl-theme-slate .ui-dialog .ui-dialog-buttonpane button{float:right;margin:.5em .4em .5em 0;cursor:pointer;padding:.2em .6em .3em .6em;line-height:1.4em;width:auto;overflow:visible;}
+.fl-theme-slate .ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px;}
+.fl-theme-slate .ui-draggable .ui-dialog-titlebar{cursor:move;}
+.fl-theme-slate .ui-progressbar{height:2em;text-align:left;}
+.fl-theme-slate .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%;}
+.fl-theme-slate .ui-resizable{position:relative;}
+.fl-theme-slate .ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block;}
+.fl-theme-slate .ui-resizable-disabled .ui-resizable-handle,.fl-theme-slate .ui-resizable-autohide .ui-resizable-handle{display:none;}
+.fl-theme-slate .ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0;}
+.fl-theme-slate .ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0;}
+.fl-theme-slate .ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%;}
+.fl-theme-slate .ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%;}
+.fl-theme-slate .ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px;}
+.fl-theme-slate .ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px;}
+.fl-theme-slate .ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px;}
+.fl-theme-slate .ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px;}
+.fl-theme-slate .ui-slider{position:relative;text-align:left;}
+.fl-theme-slate .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;}
+.fl-theme-slate .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;}
+.fl-theme-slate .ui-slider-horizontal{height:.8em;}
+.fl-theme-slate .ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em;}
+.fl-theme-slate .ui-slider-horizontal .ui-slider-range{top:0;height:100%;}
+.fl-theme-slate .ui-slider-horizontal .ui-slider-range-min{left:0;}
+.fl-theme-slate .ui-slider-horizontal .ui-slider-range-max{right:0;}
+.fl-theme-slate .ui-slider-vertical{width:.8em;height:100px;}
+.fl-theme-slate .ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em;}
+.fl-theme-slate .ui-slider-vertical .ui-slider-range{left:0;width:100%;}
+.fl-theme-slate .ui-slider-vertical .ui-slider-range-min{bottom:0;}
+.fl-theme-slate .ui-slider-vertical .ui-slider-range-max{top:0;}
+.fl-theme-slate .ui-tabs{padding:.2em;zoom:1;}
+.fl-theme-slate .ui-tabs .ui-tabs-nav{list-style:none;position:relative;padding:.2em .2em 0;}
+.fl-theme-slate .ui-tabs .ui-tabs-nav li{position:relative;float:left;border-bottom-width:0!important;margin:0 .2em -1px 0;padding:0;}
+.fl-theme-slate .ui-tabs .ui-tabs-nav li a{float:left;text-decoration:none;padding:.5em 1em;}
+.fl-theme-slate .ui-tabs .ui-tabs-nav li.ui-tabs-selected{padding-bottom:1px;border-bottom-width:0;}
+.fl-theme-slate .ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.fl-theme-slate .ui-tabs .ui-tabs-nav li.ui-state-disabled a,.fl-theme-slate .ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text;}
+.fl-theme-slate .ui-tabs .ui-tabs-nav li a,.fl-theme-slate .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer;}
+.fl-theme-slate .ui-tabs .ui-tabs-panel{padding:1em 1.4em;display:block;border-width:0;background:none;}
+.fl-theme-slate .ui-tabs .ui-tabs-hide{display:none!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/js/ui-FLUID-readme.txt b/docs/include/jscripts/infusion/lib/jquery/ui/js/ui-FLUID-readme.txt
new file mode 100644 (file)
index 0000000..8caa071
--- /dev/null
@@ -0,0 +1 @@
+The ui.*.js files in this folder were taken from the 1.7 bundle, downloaded Mar. 11, 2009
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/js/ui.accordion.js b/docs/include/jscripts/infusion/lib/jquery/ui/js/ui.accordion.js
new file mode 100644 (file)
index 0000000..271b612
--- /dev/null
@@ -0,0 +1 @@
+(function($){$.widget("ui.accordion",{_init:function(){var o=this.options,self=this;this.running=0;if(o.collapsible==$.ui.accordion.defaults.collapsible&&o.alwaysOpen!=$.ui.accordion.defaults.alwaysOpen){o.collapsible=!o.alwaysOpen}if(o.navigation){var current=this.element.find("a").filter(o.navigationFilter);if(current.length){if(current.filter(o.header).length){this.active=current}else{this.active=current.parent().parent().prev();current.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){$(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){$(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){$(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){$(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||o.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");$("<span/>").addClass("ui-icon "+o.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected);if($.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(event){return self._keydown(event)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!$.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(o.event){this.headers.bind((o.event)+".accordion",function(event){return self._clickHandler.call(self,event,this)})}},destroy:function(){var o=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var contents=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(o.autoHeight||o.fillHeight){contents.css("height","")}},_setData:function(key,value){if(key=="alwaysOpen"){key="collapsible";value=!value}$.widget.prototype._setData.apply(this,arguments)},_keydown:function(event){var o=this.options,keyCode=$.ui.keyCode;if(o.disabled||event.altKey||event.ctrlKey){return }var length=this.headers.length;var currentIndex=this.headers.index(event.target);var toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:return this._clickHandler({target:event.target},event.target)}if(toFocus){$(event.target).attr("tabIndex","-1");$(toFocus).attr("tabIndex","0");toFocus.focus();return false}return true},resize:function(){var o=this.options,maxHeight;if(o.fillSpace){if($.browser.msie){var defOverflow=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}maxHeight=this.element.parent().height();if($.browser.msie){this.element.parent().css("overflow",defOverflow)}this.headers.each(function(){maxHeight-=$(this).outerHeight()});var maxPadding=0;this.headers.next().each(function(){maxPadding=Math.max(maxPadding,$(this).innerHeight()-$(this).height())}).height(Math.max(0,maxHeight-maxPadding)).css("overflow","auto")}else{if(o.autoHeight){maxHeight=0;this.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).outerHeight())}).height(maxHeight)}}},activate:function(index){var active=this._findActive(index)[0];this._clickHandler({target:active},active)},_findActive:function(selector){return selector?typeof selector=="number"?this.headers.filter(":eq("+selector+")"):this.headers.not(this.headers.not(selector)):selector===false?$([]):this.headers.filter(":eq(0)")},_clickHandler:function(event,target){var o=this.options;if(o.disabled){return false}if(!event.target&&o.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");var toHide=this.active.next(),data={options:o,newHeader:$([]),oldHeader:o.active,newContent:$([]),oldContent:toHide},toShow=(this.active=$([]));this._toggle(toShow,toHide,data);return false}var clicked=$(event.currentTarget||target);var clickedIsActive=clicked[0]==this.active[0];if(this.running||(!o.collapsible&&clickedIsActive)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!clickedIsActive){clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected);clicked.next().addClass("ui-accordion-content-active")}var toShow=clicked.next(),toHide=this.active.next(),data={options:o,newHeader:clickedIsActive&&o.collapsible?$([]):clicked,oldHeader:this.active,newContent:clickedIsActive&&o.collapsible?$([]):toShow.find("> *"),oldContent:toHide.find("> *")},down=this.headers.index(this.active[0])>this.headers.index(clicked[0]);this.active=clickedIsActive?$([]):clicked;this._toggle(toShow,toHide,data,clickedIsActive,down);return false},_toggle:function(toShow,toHide,data,clickedIsActive,down){var o=this.options,self=this;this.toShow=toShow;this.toHide=toHide;this.data=data;var complete=function(){if(!self){return }return self._completed.apply(self,arguments)};this._trigger("changestart",null,this.data);this.running=toHide.size()===0?toShow.size():toHide.size();if(o.animated){var animOptions={};if(o.collapsible&&clickedIsActive){animOptions={toShow:$([]),toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace}}else{animOptions={toShow:toShow,toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace}}if(!o.proxied){o.proxied=o.animated}if(!o.proxiedDuration){o.proxiedDuration=o.duration}o.animated=$.isFunction(o.proxied)?o.proxied(animOptions):o.proxied;o.duration=$.isFunction(o.proxiedDuration)?o.proxiedDuration(animOptions):o.proxiedDuration;var animations=$.ui.accordion.animations,duration=o.duration,easing=o.animated;if(!animations[easing]){animations[easing]=function(options){this.slide(options,{easing:easing,duration:duration||700})}}animations[easing](animOptions)}else{if(o.collapsible&&clickedIsActive){toShow.toggle()}else{toHide.hide();toShow.show()}complete(true)}toHide.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();toShow.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(cancel){var o=this.options;this.running=cancel?0:--this.running;if(this.running){return }if(o.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});$.extend($.ui.accordion,{version:"1.7",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return }if(!options.toShow.size()){options.toHide.animate({height:"hide"},options);return }var overflow=options.toShow.css("overflow"),percentDone,showProps={},hideProps={},fxAttrs=["height","paddingTop","paddingBottom"],originalWidth;var s=options.toShow;originalWidth=s[0].style.width;s.width(parseInt(s.parent().width(),10)-parseInt(s.css("paddingLeft"),10)-parseInt(s.css("paddingRight"),10)-parseInt(s.css("borderLeftWidth"),10)-parseInt(s.css("borderRightWidth"),10));$.each(fxAttrs,function(i,prop){hideProps[prop]="hide";var parts=(""+$.css(options.toShow[0],prop)).match(/^([\d+-.]+)(.*)$/);showProps[prop]={value:parts[1],unit:parts[2]||"px"}});options.toShow.css({height:0,overflow:"hidden"}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{step:function(now,settings){if(settings.prop=="height"){percentDone=(settings.now-settings.start)/(settings.end-settings.start)}options.toShow[0].style[settings.prop]=(percentDone*showProps[settings.prop].value)+showProps[settings.prop].unit},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoHeight){options.toShow.css("height","")}options.toShow.css("width",originalWidth);options.toShow.css({overflow:overflow});options.complete()}})},bounceslide:function(options){this.slide(options,{easing:options.down?"easeOutBounce":"swing",duration:options.down?1000:200})},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700})}}})})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/js/ui.core.js b/docs/include/jscripts/infusion/lib/jquery/ui/js/ui.core.js
new file mode 100644 (file)
index 0000000..d2f33c8
--- /dev/null
@@ -0,0 +1 @@
+jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]])}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return }for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args)}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(el,a){if($(el).css("overflow")=="hidden"){return false}var scroll=(a&&a=="left")?"scrollLeft":"scrollTop",has=false;if(el[scroll]>0){return true}el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size))},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=="role"?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)))};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""))}):removeAttr.call(this,name))}}$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove")});return _remove.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,"position",1))&&(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!scrollParent.length?$(document):scrollParent}});$.extend($.expr[":"],{data:function(elem,i,match){return !!$.data(elem,match[3])},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,"tabindex");return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"==nodeName||"area"==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)["area"==nodeName?"parents":"closest"](":hidden").length},tabbable:function(element){var tabIndex=$.attr(element,"tabindex");return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(":focusable")}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=="string"?methods.split(/,?\s+/):methods)}var methods=getMethods("getter");if(args.length==1&&typeof args[0]=="string"){methods=methods.concat(getMethods("getterSetter"))}return($.inArray(method,methods)!=-1)}$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=="string"),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=="_"){return this}if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined)}return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options))._init());(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args))})};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+"-"+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind("setData."+name,function(event,key,value){if(event.target==element){return self._setData(key,value)}}).bind("getData."+name,function(event,key){if(event.target==element){return self._getData(key)}}).bind("remove",function(){return self.destroy()})};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter="option"};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key)}options={};options[key]=value}$.each(options,function(key,value){self._setData(key,value)})},_getData:function(key){return this.options[key]},_setData:function(key,value){this.options[key]=value;if(key=="disabled"){this.element[value?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",value)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop]}}this.element.trigger(event,data);return !($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented())}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(event){return self._mouseDown(event)}).bind("click."+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false}});if($.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);($.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return }(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true}}this._mouseMoveDelegate=function(event){return self._mouseMove(event)};this._mouseUpDelegate=function(event){return self._mouseUp(event)};$(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event)}if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault()}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event))}return !this._mouseStarted},_mouseUp:function(event){$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event)}return false},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance)},_mouseDelayMet:function(event){return this.mouseDelayMet},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/js/ui.dialog.js b/docs/include/jscripts/infusion/lib/jquery/ui/js/ui.dialog.js
new file mode 100644 (file)
index 0000000..c61006e
--- /dev/null
@@ -0,0 +1 @@
+(function($){var setDataSwitch={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},uiDialogClasses="ui-dialog ui-widget ui-widget-content ui-corner-all ";$.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var self=this,options=this.options,title=options.title||this.originalTitle||"&nbsp;",titleId=$.ui.dialog.getTitleId(this.element),uiDialog=(this.uiDialog=$("<div/>")).appendTo(document.body).hide().addClass(uiDialogClasses+options.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:options.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(event){(options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&self.close(event))}).attr({role:"dialog","aria-labelledby":titleId}).mousedown(function(event){self.moveToTop(false,event)}),uiDialogContent=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(uiDialog),uiDialogTitlebar=(this.uiDialogTitlebar=$("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(uiDialog),uiDialogTitlebarClose=$('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){uiDialogTitlebarClose.addClass("ui-state-hover")},function(){uiDialogTitlebarClose.removeClass("ui-state-hover")}).focus(function(){uiDialogTitlebarClose.addClass("ui-state-focus")}).blur(function(){uiDialogTitlebarClose.removeClass("ui-state-focus")}).mousedown(function(ev){ev.stopPropagation()}).click(function(event){self.close(event);return false}).appendTo(uiDialogTitlebar),uiDialogTitlebarCloseText=(this.uiDialogTitlebarCloseText=$("<span/>")).addClass("ui-icon ui-icon-closethick").text(options.closeText).appendTo(uiDialogTitlebarClose),uiDialogTitle=$("<span/>").addClass("ui-dialog-title").attr("id",titleId).html(title).prependTo(uiDialogTitlebar);uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();(options.draggable&&$.fn.draggable&&this._makeDraggable());(options.resizable&&$.fn.resizable&&this._makeResizable());this._createButtons(options.buttons);this._isOpen=false;(options.bgiframe&&$.fn.bgiframe&&uiDialog.bgiframe());(options.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(event){var self=this;if(false===self._trigger("beforeclose",event)){return }(self.overlay&&self.overlay.destroy());self.uiDialog.unbind("keypress.ui-dialog");(self.options.hide?self.uiDialog.hide(self.options.hide,function(){self._trigger("close",event)}):self.uiDialog.hide()&&self._trigger("close",event));$.ui.dialog.overlay.resize();self._isOpen=false},isOpen:function(){return this._isOpen},moveToTop:function(force,event){if((this.options.modal&&!force)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",event)}if(this.options.zIndex>$.ui.dialog.maxZ){$.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",$.ui.dialog.overlay.maxZ=++$.ui.dialog.maxZ));var saveScroll={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++$.ui.dialog.maxZ);this.element.attr(saveScroll);this._trigger("focus",event)},open:function(){if(this._isOpen){return }var options=this.options,uiDialog=this.uiDialog;this.overlay=options.modal?new $.ui.dialog.overlay(this):null;(uiDialog.next().length&&uiDialog.appendTo("body"));this._size();this._position(options.position);uiDialog.show(options.show);this.moveToTop(true);(options.modal&&uiDialog.bind("keypress.ui-dialog",function(event){if(event.keyCode!=$.ui.keyCode.TAB){return }var tabbables=$(":tabbable",this),first=tabbables.filter(":first")[0],last=tabbables.filter(":last")[0];if(event.target==last&&!event.shiftKey){setTimeout(function(){first.focus()},1)}else{if(event.target==first&&event.shiftKey){setTimeout(function(){last.focus()},1)}}}));$([]).add(uiDialog.find(".ui-dialog-content :tabbable:first")).add(uiDialog.find(".ui-dialog-buttonpane :tabbable:first")).add(uiDialog).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(buttons){var self=this,hasButtons=false,uiDialogButtonPane=$("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof buttons=="object"&&buttons!==null&&$.each(buttons,function(){return !(hasButtons=true)}));if(hasButtons){$.each(buttons,function(name,fn){$('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(name).click(function(){fn.apply(self.element[0],arguments)}).hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")}).appendTo(uiDialogButtonPane)});uiDialogButtonPane.appendTo(this.uiDialog)}},_makeDraggable:function(){var self=this,options=this.options,heightBeforeDrag;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){heightBeforeDrag=options.height;$(this).height($(this).height()).addClass("ui-dialog-dragging");(options.dragStart&&options.dragStart.apply(self.element[0],arguments))},drag:function(){(options.drag&&options.drag.apply(self.element[0],arguments))},stop:function(){$(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);(options.dragStop&&options.dragStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize()}})},_makeResizable:function(handles){handles=(handles===undefined?this.options.resizable:handles);var self=this,options=this.options,resizeHandles=typeof handles=="string"?handles:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:options.minHeight,start:function(){$(this).addClass("ui-dialog-resizing");(options.resizeStart&&options.resizeStart.apply(self.element[0],arguments))},resize:function(){(options.resize&&options.resize.apply(self.element[0],arguments))},handles:resizeHandles,stop:function(){$(this).removeClass("ui-dialog-resizing");options.height=$(this).height();options.width=$(this).width();(options.resizeStop&&options.resizeStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(pos){var wnd=$(window),doc=$(document),pTop=doc.scrollTop(),pLeft=doc.scrollLeft(),minTop=pTop;if($.inArray(pos,["center","top","right","bottom","left"])>=0){pos=[pos=="right"||pos=="left"?pos:"center",pos=="top"||pos=="bottom"?pos:"middle"]}if(pos.constructor!=Array){pos=["center","middle"]}if(pos[0].constructor==Number){pLeft+=pos[0]}else{switch(pos[0]){case"left":pLeft+=0;break;case"right":pLeft+=wnd.width()-this.uiDialog.outerWidth();break;default:case"center":pLeft+=(wnd.width()-this.uiDialog.outerWidth())/2}}if(pos[1].constructor==Number){pTop+=pos[1]}else{switch(pos[1]){case"top":pTop+=0;break;case"bottom":pTop+=wnd.height()-this.uiDialog.outerHeight();break;default:case"middle":pTop+=(wnd.height()-this.uiDialog.outerHeight())/2}}pTop=Math.max(pTop,minTop);this.uiDialog.css({top:pTop,left:pLeft})},_setData:function(key,value){(setDataSwitch[key]&&this.uiDialog.data(setDataSwitch[key],value));switch(key){case"buttons":this._createButtons(value);break;case"closeText":this.uiDialogTitlebarCloseText.text(value);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(uiDialogClasses+value);break;case"draggable":(value?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(value);break;case"position":this._position(value);break;case"resizable":var uiDialog=this.uiDialog,isResizable=this.uiDialog.is(":data(resizable)");(isResizable&&!value&&uiDialog.resizable("destroy"));(isResizable&&typeof value=="string"&&uiDialog.resizable("option","handles",value));(isResizable||this._makeResizable(value));break;case"title":$(".ui-dialog-title",this.uiDialogTitlebar).html(value||"&nbsp;");break;case"width":this.uiDialog.width(value);break}$.widget.prototype._setData.apply(this,arguments)},_size:function(){var options=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var nonContentHeight=this.uiDialog.css({height:"auto",width:options.width}).height();this.element.css({minHeight:Math.max(options.minHeight-nonContentHeight,0),height:options.height=="auto"?"auto":Math.max(options.height-nonContentHeight,0)})}});$.extend($.ui.dialog,{version:"1.7",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function($el){return"ui-dialog-title-"+($el.attr("id")||++this.uuid)},overlay:function(dialog){this.$el=$.ui.dialog.overlay.create(dialog)}});$.extend($.ui.dialog.overlay,{instances:[],maxZ:0,events:$.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(event){return event+".dialog-overlay"}).join(" "),create:function(dialog){if(this.instances.length===0){setTimeout(function(){$(document).bind($.ui.dialog.overlay.events,function(event){var dialogZ=$(event.target).parents(".ui-dialog").css("zIndex")||0;return(dialogZ>$.ui.dialog.overlay.maxZ)})},1);$(document).bind("keydown.dialog-overlay",function(event){(dialog.options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&dialog.close(event))});$(window).bind("resize.dialog-overlay",$.ui.dialog.overlay.resize)}var $el=$("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(dialog.options.bgiframe&&$.fn.bgiframe&&$el.bgiframe());this.instances.push($el);return $el},destroy:function($el){this.instances.splice($.inArray(this.instances,$el),1);if(this.instances.length===0){$([document,window]).unbind(".dialog-overlay")}$el.remove()},height:function(){if($.browser.msie&&$.browser.version<7){var scrollHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var offsetHeight=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(scrollHeight<offsetHeight){return $(window).height()+"px"}else{return scrollHeight+"px"}}else{return $(document).height()+"px"}},width:function(){if($.browser.msie&&$.browser.version<7){var scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(scrollWidth<offsetWidth){return $(window).width()+"px"}else{return scrollWidth+"px"}}else{return $(document).width()+"px"}},resize:function(){var $overlays=$([]);$.each($.ui.dialog.overlay.instances,function(){$overlays=$overlays.add(this)});$overlays.css({width:0,height:0}).css({width:$.ui.dialog.overlay.width(),height:$.ui.dialog.overlay.height()})}});$.extend($.ui.dialog.overlay.prototype,{destroy:function(){$.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/js/ui.draggable.js b/docs/include/jscripts/infusion/lib/jquery/ui/js/ui.draggable.js
new file mode 100644 (file)
index 0000000..9682b2b
--- /dev/null
@@ -0,0 +1 @@
+(function($){$.widget("ui.draggable",$.extend({},$.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(event);if(!this.handle){return false}return true},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this._cacheHelperProportions();if($.ui.ddmanager){$.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt){this._adjustOffsetFromHelper(o.cursorAt)}if(o.containment){this._setContainment()}this._trigger("start",event);this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(event,true);return true},_mouseDrag:function(event,noPropagation){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();this._trigger("drag",event,ui);this.position=ui.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if($.ui.ddmanager){$.ui.ddmanager.drag(this,event)}return false},_mouseStop:function(event){var dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour){dropped=$.ui.ddmanager.drop(this,event)}if(this.dropped){dropped=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){var self=this;$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){self._trigger("stop",event);self._clear()})}else{this._trigger("stop",event);this._clear()}return false},_getHandle:function(event){var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;$(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==event.target){handle=true}});return handle},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event])):(o.helper=="clone"?this.element.clone():this.element);if(!helper.parents("body").length){helper.appendTo((o.appendTo=="parent"?this.element[0].parentNode:o.appendTo))}if(helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position"))){helper.css("position","absolute")}return helper},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined){this.offset.click.left=obj.left+this.margins.left}if(obj.right!=undefined){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left}if(obj.top!=undefined){this.offset.click.top=obj.top+this.margins.top}if(obj.bottom!=undefined){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&$.browser.msie)){po={top:0,left:0}}return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.element.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var o=this.options;if(o.containment=="parent"){o.containment=this.helper[0].parentNode}if(o.containment=="document"||o.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(o.containment)&&o.containment.constructor!=Array){var ce=$(o.containment)[0];if(!ce){return }var co=$(o.containment).offset();var over=($(ce).css("overflow")!="hidden");this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(o.containment.constructor==Array){this.containment=o.containment}}},_convertPositionTo:function(d,pos){if(!pos){pos=this.position}var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))}},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0]){pageX=this.containment[0]+this.offset.click.left}if(event.pageY-this.offset.click.top<this.containment[1]){pageY=this.containment[1]+this.offset.click.top}if(event.pageX-this.offset.click.left>this.containment[2]){pageX=this.containment[2]+this.offset.click.left}if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top}}if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left}}return{top:(pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(type,event,ui){ui=ui||this._uiHash();$.ui.plugin.call(this,type,[event,ui]);if(type=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return $.widget.prototype._trigger.call(this,type,event,ui)},plugins:{},_uiHash:function(event){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));$.extend($.ui.draggable,{version:"1.7",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui){var inst=$(this).data("draggable"),o=inst.options,uiSortable=$.extend({},ui,{item:inst.element});inst.sortables=[];$(o.connectToSortable).each(function(){var sortable=$.data(this,"sortable");if(sortable&&!sortable.options.disabled){inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable._refreshItems();sortable._trigger("activate",event,uiSortable)}})},stop:function(event,ui){var inst=$(this).data("draggable"),uiSortable=$.extend({},ui,{item:inst.element});$.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(event);this.instance.options.helper=this.instance.options._helper;if(inst.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",event,uiSortable)}})},drag:function(event,ui){var inst=$(this).data("draggable"),self=this;var checkPos=function(o){var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var helperTop=this.positionAbs.top,helperLeft=this.positionAbs.left;var itemHeight=o.height,itemWidth=o.width;var itemTop=o.top,itemLeft=o.left;return $.ui.isOver(helperTop+dyClick,helperLeft+dxClick,itemTop,itemLeft,itemHeight,itemWidth)};$.each(inst.sortables,function(i){this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click=inst.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=$(self).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return ui.helper[0]};event.target=this.instance.currentItem[0];this.instance._mouseCapture(event,true);this.instance._mouseStart(event,true,true);this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst._trigger("toSortable",event);inst.dropped=this.instance.element;inst.currentItem=inst.element;this.instance.fromOutside=inst}if(this.instance.currentItem){this.instance._mouseDrag(event)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",event,this.instance._uiHash(this.instance));this.instance._mouseStop(event,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}inst._trigger("fromSortable",event);inst.dropped=false}}})}});$.ui.plugin.add("draggable","cursor",{start:function(event,ui){var t=$("body"),o=$(this).data("draggable").options;if(t.css("cursor")){o._cursor=t.css("cursor")}t.css("cursor",o.cursor)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._cursor){$("body").css("cursor",o._cursor)}}});$.ui.plugin.add("draggable","iframeFix",{start:function(event,ui){var o=$(this).data("draggable").options;$(o.iframeFix===true?"iframe":o.iframeFix).each(function(){$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body")})},stop:function(event,ui){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});$.ui.plugin.add("draggable","opacity",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("opacity")){o._opacity=t.css("opacity")}t.css("opacity",o.opacity)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._opacity){$(ui.helper).css("opacity",o._opacity)}}});$.ui.plugin.add("draggable","scroll",{start:function(event,ui){var i=$(this).data("draggable");if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){i.overflowOffset=i.scrollParent.offset()}},drag:function(event,ui){var i=$(this).data("draggable"),o=i.options,scrolled=false;if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){if(!o.axis||o.axis!="x"){if((i.overflowOffset.top+i.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop+o.scrollSpeed}else{if(event.pageY-i.overflowOffset.top<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop-o.scrollSpeed}}}if(!o.axis||o.axis!="y"){if((i.overflowOffset.left+i.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft+o.scrollSpeed}else{if(event.pageX-i.overflowOffset.left<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft-o.scrollSpeed}}}}else{if(!o.axis||o.axis!="x"){if(event.pageY-$(document).scrollTop()<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed)}else{if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed)}}}if(!o.axis||o.axis!="y"){if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed)}else{if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed)}}}}if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(i,event)}}});$.ui.plugin.add("draggable","snap",{start:function(event,ui){var i=$(this).data("draggable"),o=i.options;i.snapElements=[];$(o.snap.constructor!=String?(o.snap.items||":data(draggable)"):o.snap).each(function(){var $t=$(this);var $o=$t.offset();if(this!=i.element[0]){i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left})}})},drag:function(event,ui){var inst=$(this).data("draggable"),o=inst.options;var d=o.snapTolerance;var x1=ui.offset.left,x2=x1+inst.helperProportions.width,y1=ui.offset.top,y2=y1+inst.helperProportions.height;for(var i=inst.snapElements.length-1;i>=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d)||(l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d)||(l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d)||(l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d))){if(inst.snapElements[i].snapping){(inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})))}inst.snapElements[i].snapping=false;continue}if(o.snapMode!="inner"){var ts=Math.abs(t-y2)<=d;var bs=Math.abs(b-y1)<=d;var ls=Math.abs(l-x2)<=d;var rs=Math.abs(r-x1)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top-inst.margins.top}if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top-inst.margins.top}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left-inst.margins.left}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r}).left-inst.margins.left}}var first=(ts||bs||ls||rs);if(o.snapMode!="outer"){var ts=Math.abs(t-y1)<=d;var bs=Math.abs(b-y2)<=d;var ls=Math.abs(l-x1)<=d;var rs=Math.abs(r-x2)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top-inst.margins.top}if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top-inst.margins.top}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left-inst.margins.left}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left-inst.margins.left}}if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first)){(inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})))}inst.snapElements[i].snapping=(ts||bs||ls||rs||first)}}});$.ui.plugin.add("draggable","stack",{start:function(event,ui){var o=$(this).data("draggable").options;var group=$.makeArray($(o.stack.group)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||o.stack.min)-(parseInt($(b).css("zIndex"),10)||o.stack.min)});$(group).each(function(i){this.style.zIndex=o.stack.min+i});this[0].style.zIndex=o.stack.min+group.length}});$.ui.plugin.add("draggable","zIndex",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("zIndex")){o._zIndex=t.css("zIndex")}t.css("zIndex",o.zIndex)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._zIndex){$(ui.helper).css("zIndex",o._zIndex)}}})})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/jquery/ui/js/ui.slider.js b/docs/include/jscripts/infusion/lib/jquery/ui/js/ui.slider.js
new file mode 100644 (file)
index 0000000..10129eb
--- /dev/null
@@ -0,0 +1 @@
+(function($){$.widget("ui.slider",$.extend({},$.ui.mouse,{_init:function(){var self=this,o=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=$([]);if(o.range){if(o.range===true){this.range=$("<div></div>");if(!o.values){o.values=[this._valueMin(),this._valueMin()]}if(o.values.length&&o.values.length!=2){o.values=[o.values[0],o.values[0]]}}else{this.range=$("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(o.range=="min"||o.range=="max"){this.range.addClass("ui-slider-range-"+o.range)}this.range.addClass("ui-widget-header")}if($(".ui-slider-handle",this.element).length==0){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(o.values&&o.values.length){while($(".ui-slider-handle",this.element).length<o.values.length){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=$(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(event){event.preventDefault()}).hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(".ui-slider .ui-state-focus").removeClass("ui-state-focus");$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")});this.handles.each(function(i){$(this).data("index.ui-slider-handle",i)});this.handles.keydown(function(event){var ret=true;var index=$(this).data("index.ui-slider-handle");if(self.options.disabled){return }switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:ret=false;if(!self._keySliding){self._keySliding=true;$(this).addClass("ui-state-active");self._start(event,index)}break}var curVal,newVal,step=self._step();if(self.options.values&&self.options.values.length){curVal=newVal=self.values(index)}else{curVal=newVal=self.value()}switch(event.keyCode){case $.ui.keyCode.HOME:newVal=self._valueMin();break;case $.ui.keyCode.END:newVal=self._valueMax();break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal==self._valueMax()){return }newVal=curVal+step;break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal==self._valueMin()){return }newVal=curVal-step;break}self._slide(event,index,newVal);return ret}).keyup(function(event){var index=$(this).data("index.ui-slider-handle");if(self._keySliding){self._stop(event,index);self._change(event,index);self._keySliding=false;$(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(o.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);var distance=this._valueMax()+1,closestHandle;var self=this,index;this.handles.each(function(i){var thisDistance=Math.abs(normValue-self.values(i));if(distance>thisDistance){distance=thisDistance;closestHandle=$(this);index=i}});if(o.range==true&&this.values(1)==o.min){closestHandle=$(this.handles[++index])}this._start(event,index);self._handleIndex=index;closestHandle.addClass("ui-state-active").focus();var offset=closestHandle.offset();var mouseOverHandle=!$(event.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top-(closestHandle.height()/2)-(parseInt(closestHandle.css("borderTopWidth"),10)||0)-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+(parseInt(closestHandle.css("marginTop"),10)||0)};normValue=this._normValueFromMouse(position);this._slide(event,index,normValue);return true},_mouseStart:function(event){return true},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false},_mouseStop:function(event){this.handles.removeClass("ui-state-active");this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(position){var pixelTotal,pixelMouse;if("horizontal"==this.orientation){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1){percentMouse=1}if(percentMouse<0){percentMouse=0}if("vertical"==this.orientation){percentMouse=1-percentMouse}var valueTotal=this._valueMax()-this._valueMin(),valueMouse=percentMouse*valueTotal,valueMouseModStep=valueMouse%this.options.step,normValue=this._valueMin()+valueMouse-valueMouseModStep;if(valueMouseModStep>(this.options.step/2)){normValue+=this.options.step}return parseFloat(normValue.toFixed(5))},_start:function(event,index){this._trigger("start",event,this._uiHash(index))},_slide:function(event,index,newVal){var handle=this.handles[index];if(this.options.values&&this.options.values.length){var otherVal=this.values(index?0:1);if((index==0&&newVal>=otherVal)||(index==1&&newVal<=otherVal)){newVal=otherVal}if(newVal!=this.values(index)){var newValues=this.values();newValues[index]=newVal;var allowed=this._trigger("slide",event,this._uiHash(index,newVal,newValues));var otherVal=this.values(index?0:1);if(allowed!==false){this.values(index,newVal,(event.type=="mousedown"&&this.options.animate),true)}}}else{if(newVal!=this.value()){var allowed=this._trigger("slide",event,this._uiHash(index,newVal));if(allowed!==false){this._setData("value",newVal,(event.type=="mousedown"&&this.options.animate))}}}},_stop:function(event,index){this._trigger("stop",event,this._uiHash(index))},_change:function(event,index){this._trigger("change",event,this._uiHash(index))},value:function(newValue){if(arguments.length){this._setData("value",newValue);this._change(null,0)}return this._value()},values:function(index,newValue,animated,noPropagation){if(arguments.length>1){this.options.values[index]=newValue;this._refreshValue(animated);if(!noPropagation){this._change(null,index)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(index)}else{return this.value()}}else{return this._values()}},_setData:function(key,value,animated){$.widget.prototype._setData.apply(this,arguments);switch(key){case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(animated);break;case"value":this._refreshValue(animated);break}},_step:function(){var step=this.options.step;return step},_value:function(){var val=this.options.value;if(val<this._valueMin()){val=this._valueMin()}if(val>this._valueMax()){val=this._valueMax()}return val},_values:function(index){if(arguments.length){var val=this.options.values[index];if(val<this._valueMin()){val=this._valueMin()}if(val>this._valueMax()){val=this._valueMax()}return val}else{return this.options.values}},_valueMin:function(){var valueMin=this.options.min;return valueMin},_valueMax:function(){var valueMax=this.options.max;return valueMax},_refreshValue:function(animate){var oRange=this.options.range,o=this.options,self=this;if(this.options.values&&this.options.values.length){var vp0,vp1;this.handles.each(function(i,j){var valPercent=(self.values(i)-self._valueMin())/(self._valueMax()-self._valueMin())*100;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);if(self.options.range===true){if(self.orientation=="horizontal"){(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({width:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}else{(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({bottom:(valPercent)+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({height:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}}lastValPercent=valPercent})}else{var value=this.value(),valueMin=this._valueMin(),valueMax=this._valueMax(),valPercent=valueMax!=valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);(oRange=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="horizontal")&&this.range[animate?"animate":"css"]({width:(100-valPercent)+"%"},{queue:false,duration:o.animate});(oRange=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="vertical")&&this.range[animate?"animate":"css"]({height:(100-valPercent)+"%"},{queue:false,duration:o.animate})}},_uiHash:function(index,value,values){var multiple=this.options.values&&this.options.values.length;return{handle:this.handles[index],value:value||(multiple?this.values(index):this.value()),values:values||(multiple&&this.values())}}}));$.extend($.ui.slider,{getter:"value values",version:"1.7",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/json/js/json2.js b/docs/include/jscripts/infusion/lib/json/js/json2.js
new file mode 100644 (file)
index 0000000..4e7f7bd
--- /dev/null
@@ -0,0 +1 @@
+if(!this.JSON){JSON=function(){function f(n){return n<10?"0"+n:n}Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function stringify(value,whitelist){var a,i,k,l,r=/["\\\x00-\x1f\x7f-\x9f]/g,v;switch(typeof value){case"string":return r.test(value)?'"'+value.replace(r,function(a){var c=m[a];if(c){return c}c=a.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"':'"'+value+'"';case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}if(typeof value.toJSON==="function"){return stringify(value.toJSON())}a=[];if(typeof value.length==="number"&&!(value.propertyIsEnumerable("length"))){l=value.length;for(i=0;i<l;i+=1){a.push(stringify(value[i],whitelist)||"null")}return"["+a.join(",")+"]"}if(whitelist){l=whitelist.length;for(i=0;i<l;i+=1){k=whitelist[i];if(typeof k==="string"){v=stringify(value[k],whitelist);if(v){a.push(stringify(k)+":"+v)}}}}else{for(k in value){if(typeof k==="string"){v=stringify(value[k],whitelist);if(v){a.push(stringify(k)+":"+v)}}}}return"{"+a.join(",")+"}"}}return{stringify:stringify,parse:function(text,filter){var j;function walk(k,v){var i,n;if(v&&typeof v==="object"){for(i in v){if(Object.prototype.hasOwnProperty.apply(v,[i])){n=walk(i,v[i]);if(n!==undefined){v[i]=n}}}}return filter(k,v)}if(/^[\],:{}\s]*$/.test(text.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof filter==="function"?walk("",j):j}throw new SyntaxError("parseJSON")}}}()};
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/swfobject/js/swfobject.js b/docs/include/jscripts/infusion/lib/swfobject/js/swfobject.js
new file mode 100644 (file)
index 0000000..c5a8164
--- /dev/null
@@ -0,0 +1,14 @@
+/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
+       Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
+       This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],objIdArr=[],listenersArr=[],script,timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7")}catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always"}catch(e){if(playerVersion[0]==6){fp6Crash=true}}if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX)}catch(e){}}}if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)]}}catch(e){}}}}var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u);
+/*@cc_on
+                       ie = true;
+                       @if (@_win32)
+                               windows = true;
+                       @elif (@_mac)
+                               mac = true;
+                       @end
+               @*/
+return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac}}();var onDomLoad=function(){if(!ua.w3cdom){return }addDomLoadEvent(main);if(ua.ie&&ua.win){try{doc.write("<script id=__ie_ondomload defer=true src=//:><\/script>");script=getElementById("__ie_ondomload");if(script){addListener(script,"onreadystatechange",checkReadyState)}}catch(e){}}if(ua.webkit&&typeof doc.readyState!=UNDEF){timer=setInterval(function(){if(/loaded|complete/.test(doc.readyState)){callDomLoadFunctions()}},10)}if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null)}addLoadEvent(callDomLoadFunctions)}();function checkReadyState(){if(script.readyState=="complete"){script.parentNode.removeChild(script);callDomLoadFunctions()}}function callDomLoadFunctions(){if(isDomLoaded){return }if(ua.ie&&ua.win){var s=createElement("span");try{var t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t)}catch(e){return }}isDomLoaded=true;if(timer){clearInterval(timer);timer=null}var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]()}}function addDomLoadEvent(fn){if(isDomLoaded){fn()}else{domLoadFnArr[domLoadFnArr.length]=fn}}function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false)}else{if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false)}else{if(typeof win.attachEvent!=UNDEF){addListener(win,"onload",fn)}else{if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn()}}else{win.onload=fn}}}}}function main(){var rl=regObjArr.length;for(var i=0;i<rl;i++){var id=regObjArr[i].id;if(ua.pv[0]>0){var obj=getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312){fixParams(obj)}setVisibility(id,true)}else{if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i])}else{displayAltContent(obj)}}}}else{setVisibility(id,true)}}}function fixParams(obj){var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i<al;i++){if(a[i].nodeName=="DATA"){e.setAttribute("src",a[i].nodeValue)}else{e.setAttribute(a[i].nodeName,a[i].nodeValue)}}}var c=nestedObj.childNodes;if(c){var cl=c.length;for(var j=0;j<cl;j++){if(c[j].nodeType==1&&c[j].nodeName=="PARAM"){e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"))}}}obj.parentNode.replaceChild(e,obj)}}function showExpressInstall(regObj){isExpressInstallActive=true;var obj=getElementById(regObj.id);if(obj){if(regObj.altContentId){var ac=getElementById(regObj.altContentId);if(ac){storedAltContent=ac;storedAltContentId=regObj.altContentId}}else{storedAltContent=abstractAltContent(obj)}if(!(/%$/.test(regObj.width))&&parseInt(regObj.width,10)<310){regObj.width="310"}if(!(/%$/.test(regObj.height))&&parseInt(regObj.height,10)<137){regObj.height="137"}doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",dt=doc.title,fv="MMredirectURL="+win.location+"&MMplayerType="+pt+"&MMdoctitle="+dt,replaceId=regObj.id;if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceId+="SWFObjectNew";newObj.setAttribute("id",replaceId);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addListener(win,"onload",fn)}createSWF({data:regObj.expressInstall,id:EXPRESS_INSTALL_ID,width:regObj.width,height:regObj.height},{flashvars:fv},replaceId)}}function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addListener(win,"onload",fn)}else{obj.parentNode.replaceChild(abstractAltContent(obj),obj)}}function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML}else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName=="PARAM")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true))}}}}}return ac}function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(el){if(typeof attObj.id==UNDEF){attObj.id=id}if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){parObj.movie=attObj[i]}else{if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"'}else{if(i.toLowerCase()!="classid"){att+=" "+i+'="'+attObj[i]+'"'}}}}}var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />'}}el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+">"+par+"</object>";objIdArr[objIdArr.length]=attObj.id;r=getElementById(attObj.id)}else{if(ua.webkit&&ua.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if(attObj[k]!=Object.prototype[k]){if(k.toLowerCase()=="data"){e.setAttribute("src",attObj[k])}else{if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj[k])}else{if(k.toLowerCase()!="classid"){e.setAttribute(k,attObj[k])}}}}}for(var l in parObj){if(parObj[l]!=Object.prototype[l]){if(l.toLowerCase()!="movie"){e.setAttribute(l,parObj[l])}}}el.parentNode.replaceChild(e,el);r=e}else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m])}else{if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj[m])}}}}for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,parObj[n])}}el.parentNode.replaceChild(o,el);r=o}}}return r}function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p)}function removeSWF(id){var obj=getElementById(id);if(obj&&(obj.nodeName=="OBJECT"||obj.nodeName=="EMBED")){if(ua.ie&&ua.win){if(obj.readyState==4){removeObjectInIE(id)}else{win.attachEvent("onload",function(){removeObjectInIE(id)})}}else{obj.parentNode.removeChild(obj)}}}function removeObjectInIE(id){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null}}obj.parentNode.removeChild(obj)}}function getElementById(id){var el=null;try{el=doc.getElementById(id)}catch(e){}return el}function createElement(el){return doc.createElement(el)}function addListener(target,eventType,fn){target.attachEvent(eventType,fn);listenersArr[listenersArr.length]=[target,eventType,fn]}function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false}function createCSS(sel,decl){if(ua.ie&&ua.mac){return }var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.createTextNode(sel+" {"+decl+"}"))}h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl)}}}function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded&&getElementById(id)){getElementById(id).style.visibility=v}else{createCSS("#"+id,"visibility:"+v)}}function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBadChars=regex.exec(s)!=null;return hasBadChars?encodeURIComponent(s):s}var cleanup=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var ll=listenersArr.length;for(var i=0;i<ll;i++){listenersArr[i][0].detachEvent(listenersArr[i][1],listenersArr[i][2])}var il=objIdArr.length;for(var j=0;j<il;j++){removeSWF(objIdArr[j])}for(var k in ua){ua[k]=null}ua=null;for(var l in swfobject){swfobject[l]=null}swfobject=null})}}();return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr){if(!ua.w3cdom||!objectIdStr||!swfVersionStr){return }var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr?xiSwfUrlStr:false;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false)},getObjectById:function(objectIdStr){var r=null;if(ua.w3cdom){var o=getElementById(objectIdStr);if(o){var n=o.getElementsByTagName(OBJECT)[0];if(!n||(n&&typeof o.SetVariable!=UNDEF)){r=o}else{if(typeof n.SetVariable!=UNDEF){r=n}}}}return r},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj){if(!ua.w3cdom||!swfUrlStr||!replaceElemIdStr||!widthStr||!heightStr||!swfVersionStr){return }widthStr+="";heightStr+="";if(hasPlayerVersion(swfVersionStr)){setVisibility(replaceElemIdStr,false);var att={};if(attObj&&typeof attObj===OBJECT){for(var i in attObj){if(attObj[i]!=Object.prototype[i]){att[i]=attObj[i]}}}att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par={};if(parObj&&typeof parObj===OBJECT){for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par[j]=parObj[j]}}}if(flashvarsObj&&typeof flashvarsObj===OBJECT){for(var k in flashvarsObj){if(flashvarsObj[k]!=Object.prototype[k]){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+k+"="+flashvarsObj[k]}else{par.flashvars=k+"="+flashvarsObj[k]}}}}addDomLoadEvent(function(){createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true)}})}else{if(xiSwfUrlStr&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){isExpressInstallActive=true;setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){var regObj={};regObj.id=regObj.altContentId=replaceElemIdStr;regObj.width=widthStr;regObj.height=heightStr;regObj.expressInstall=xiSwfUrlStr;showExpressInstall(regObj)})}}},getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]}},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3cdom){return createSWF(attObj,parObj,replaceElemIdStr)}else{return undefined}},removeSWF:function(objElemIdStr){if(ua.w3cdom){removeSWF(objElemIdStr)}},createCSS:function(sel,decl){if(ua.w3cdom){createCSS(sel,decl)}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(param==null){return urlEncodeIfNecessary(q)}if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(isExpressInstallActive&&storedAltContent){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block"}}storedAltContent=null;storedAltContentId=null;isExpressInstallActive=false}}}}}();
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/lib/swfupload/flash/swfupload.swf b/docs/include/jscripts/infusion/lib/swfupload/flash/swfupload.swf
new file mode 100644 (file)
index 0000000..e3f7670
Binary files /dev/null and b/docs/include/jscripts/infusion/lib/swfupload/flash/swfupload.swf differ
diff --git a/docs/include/jscripts/infusion/lib/swfupload/js/swfupload.js b/docs/include/jscripts/infusion/lib/swfupload/js/swfupload.js
new file mode 100644 (file)
index 0000000..6a76188
--- /dev/null
@@ -0,0 +1 @@
+var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(settings){this.initSWFUpload(settings)}}SWFUpload.prototype.initSWFUpload=function(settings){try{this.customSettings={};this.settings=settings;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(ex){delete SWFUpload.instances[this.movieName];throw ex}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 2009-03-25";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.completeURL=function(url){if(typeof (url)!=="string"||url.match(/^https?:\/\//i)||url.match(/^\//)){return url}var currentURL=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");var indexSlash=window.location.pathname.lastIndexOf("/");if(indexSlash<=0){path="/"}else{path=window.location.pathname.substr(0,indexSlash)+"/"}return path+url};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(settingName,defaultValue){this.settings[settingName]=(this.settings[settingName]==undefined)?defaultValue:this.settings[settingName]};this.ensureDefault("upload_url","");this.ensureDefault("preserve_relative_urls",false);this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",false);this.ensureDefault("requeue_on_error",false);this.ensureDefault("http_success",[]);this.ensureDefault("assume_success_timeout",0);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",true);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",false);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_placeholder",null);this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+new Date().getTime()}if(!this.settings.preserve_relative_urls){this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url)}delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){var targetElement,tempParent;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added"}targetElement=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;if(targetElement==undefined){throw"Could not find the placeholder element: "+this.settings.button_placeholder_id}tempParent=document.createElement("div");tempParent.innerHTML=this.getFlashHTML();targetElement.parentNode.replaceChild(tempParent.firstChild,targetElement);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement()}};SWFUpload.prototype.getFlashHTML=function(){return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.settings.flash_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload">','<param name="wmode" value="',this.settings.button_window_mode,'" />','<param name="movie" value="',this.settings.flash_url,'" />','<param name="quality" value="high" />','<param name="menu" value="false" />','<param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+this.getFlashVars()+'" />',"</object>"].join("")};SWFUpload.prototype.getFlashVars=function(){var paramString=this.buildParamString();var httpSuccessString=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;useQueryString=",encodeURIComponent(this.settings.use_query_string),"&amp;requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&amp;httpSuccess=",encodeURIComponent(httpSuccessString),"&amp;assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&amp;params=",encodeURIComponent(paramString),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),"&amp;fileTypes=",encodeURIComponent(this.settings.file_types),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&amp;fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonText=",encodeURIComponent(this.settings.button_text),"&amp;buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&amp;buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&amp;buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&amp;buttonAction=",encodeURIComponent(this.settings.button_action),"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&amp;buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("")};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName)}if(this.movieElement===null){throw"Could not find Flash element"}return this.movieElement};SWFUpload.prototype.buildParamString=function(){var postParams=this.settings.post_params;var paramStringPairs=[];if(typeof (postParams)==="object"){for(var name in postParams){if(postParams.hasOwnProperty(name)){paramStringPairs.push(encodeURIComponent(name.toString())+"="+encodeURIComponent(postParams[name].toString()))}}}return paramStringPairs.join("&amp;")};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var movieElement=null;movieElement=this.getMovieElement();if(movieElement&&typeof (movieElement.CallFunction)==="unknown"){for(var i in movieElement){try{if(typeof (movieElement[i])==="function"){movieElement[i]=null}}catch(ex1){}}try{movieElement.parentNode.removeChild(movieElement)}catch(ex){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true}catch(ex2){return false}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url:               ",this.settings.upload_url,"\n","\t","flash_url:                ",this.settings.flash_url,"\n","\t","use_query_string:         ",this.settings.use_query_string.toString(),"\n","\t","requeue_on_error:         ",this.settings.requeue_on_error.toString(),"\n","\t","http_success:             ",this.settings.http_success.join(", "),"\n","\t","assume_success_timeout:   ",this.settings.assume_success_timeout,"\n","\t","file_post_name:           ",this.settings.file_post_name,"\n","\t","post_params:              ",this.settings.post_params.toString(),"\n","\t","file_types:               ",this.settings.file_types,"\n","\t","file_types_description:   ",this.settings.file_types_description,"\n","\t","file_size_limit:          ",this.settings.file_size_limit,"\n","\t","file_upload_limit:        ",this.settings.file_upload_limit,"\n","\t","file_queue_limit:         ",this.settings.file_queue_limit,"\n","\t","debug:                    ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching:      ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id:    ",this.settings.button_placeholder_id.toString(),"\n","\t","button_placeholder:       ",(this.settings.button_placeholder?"Set":"Not Set"),"\n","\t","button_image_url:         ",this.settings.button_image_url.toString(),"\n","\t","button_width:             ",this.settings.button_width.toString(),"\n","\t","button_height:            ",this.settings.button_height.toString(),"\n","\t","button_text:              ",this.settings.button_text.toString(),"\n","\t","button_text_style:        ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding:  ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action:            ",this.settings.button_action.toString(),"\n","\t","button_disabled:          ",this.settings.button_disabled.toString(),"\n","\t","custom_settings:          ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned:  ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n","\t","file_queued_handler assigned:       ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","file_queue_error_handler assigned:  ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n","\t","upload_start_handler assigned:      ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned:   ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned:      ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned:    ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned:   ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","debug_handler assigned:             ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""))};SWFUpload.prototype.addSetting=function(name,value,default_value){if(value==undefined){return(this.settings[name]=default_value)}else{return(this.settings[name]=value)}};SWFUpload.prototype.getSetting=function(name){if(this.settings[name]!=undefined){return this.settings[name]}return""};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction('<invoke name="'+functionName+'" returntype="javascript">'+__flash__argumentsToXML(argumentArray,0)+"</invoke>");returnValue=eval(returnString)}catch(ex){throw"Call to "+functionName+" failed"}if(returnValue!=undefined&&typeof returnValue.post==="object"){returnValue=this.unescapeFilePostParams(returnValue)}return returnValue};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")};SWFUpload.prototype.startUpload=function(fileID){this.callFlash("StartUpload",[fileID])};SWFUpload.prototype.cancelUpload=function(fileID,triggerErrorEvent){if(triggerErrorEvent!==false){triggerErrorEvent=true}this.callFlash("CancelUpload",[fileID,triggerErrorEvent])};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")};SWFUpload.prototype.setStats=function(statsObject){this.callFlash("SetStats",[statsObject])};SWFUpload.prototype.getFile=function(fileID){if(typeof (fileID)==="number"){return this.callFlash("GetFileByIndex",[fileID])}else{return this.callFlash("GetFile",[fileID])}};SWFUpload.prototype.addFileParam=function(fileID,name,value){return this.callFlash("AddFileParam",[fileID,name,value])};SWFUpload.prototype.removeFileParam=function(fileID,name){this.callFlash("RemoveFileParam",[fileID,name])};SWFUpload.prototype.setUploadURL=function(url){this.settings.upload_url=url.toString();this.callFlash("SetUploadURL",[url])};SWFUpload.prototype.setPostParams=function(paramsObject){this.settings.post_params=paramsObject;this.callFlash("SetPostParams",[paramsObject])};SWFUpload.prototype.addPostParam=function(name,value){this.settings.post_params[name]=value;this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(name){delete this.settings.post_params[name];this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(types,description){this.settings.file_types=types;this.settings.file_types_description=description;this.callFlash("SetFileTypes",[types,description])};SWFUpload.prototype.setFileSizeLimit=function(fileSizeLimit){this.settings.file_size_limit=fileSizeLimit;this.callFlash("SetFileSizeLimit",[fileSizeLimit])};SWFUpload.prototype.setFileUploadLimit=function(fileUploadLimit){this.settings.file_upload_limit=fileUploadLimit;this.callFlash("SetFileUploadLimit",[fileUploadLimit])};SWFUpload.prototype.setFileQueueLimit=function(fileQueueLimit){this.settings.file_queue_limit=fileQueueLimit;this.callFlash("SetFileQueueLimit",[fileQueueLimit])};SWFUpload.prototype.setFilePostName=function(filePostName){this.settings.file_post_name=filePostName;this.callFlash("SetFilePostName",[filePostName])};SWFUpload.prototype.setUseQueryString=function(useQueryString){this.settings.use_query_string=useQueryString;this.callFlash("SetUseQueryString",[useQueryString])};SWFUpload.prototype.setRequeueOnError=function(requeueOnError){this.settings.requeue_on_error=requeueOnError;this.callFlash("SetRequeueOnError",[requeueOnError])};SWFUpload.prototype.setHTTPSuccess=function(http_status_codes){if(typeof http_status_codes==="string"){http_status_codes=http_status_codes.replace(" ","").split(",")}this.settings.http_success=http_status_codes;this.callFlash("SetHTTPSuccess",[http_status_codes])};SWFUpload.prototype.setAssumeSuccessTimeout=function(timeout_seconds){this.settings.assume_success_timeout=timeout_seconds;this.callFlash("SetAssumeSuccessTimeout",[timeout_seconds])};SWFUpload.prototype.setDebugEnabled=function(debugEnabled){this.settings.debug_enabled=debugEnabled;this.callFlash("SetDebugEnabled",[debugEnabled])};SWFUpload.prototype.setButtonImageURL=function(buttonImageURL){if(buttonImageURL==undefined){buttonImageURL=""}this.settings.button_image_url=buttonImageURL;this.callFlash("SetButtonImageURL",[buttonImageURL])};SWFUpload.prototype.setButtonDimensions=function(width,height){this.settings.button_width=width;this.settings.button_height=height;var movie=this.getMovieElement();if(movie!=undefined){movie.style.width=width+"px";movie.style.height=height+"px"}this.callFlash("SetButtonDimensions",[width,height])};SWFUpload.prototype.setButtonText=function(html){this.settings.button_text=html;this.callFlash("SetButtonText",[html])};SWFUpload.prototype.setButtonTextPadding=function(left,top){this.settings.button_text_top_padding=top;this.settings.button_text_left_padding=left;this.callFlash("SetButtonTextPadding",[left,top])};SWFUpload.prototype.setButtonTextStyle=function(css){this.settings.button_text_style=css;this.callFlash("SetButtonTextStyle",[css])};SWFUpload.prototype.setButtonDisabled=function(isDisabled){this.settings.button_disabled=isDisabled;this.callFlash("SetButtonDisabled",[isDisabled])};SWFUpload.prototype.setButtonAction=function(buttonAction){this.settings.button_action=buttonAction;this.callFlash("SetButtonAction",[buttonAction])};SWFUpload.prototype.setButtonCursor=function(cursor){this.settings.button_cursor=cursor;this.callFlash("SetButtonCursor",[cursor])};SWFUpload.prototype.queueEvent=function(handlerName,argumentArray){if(argumentArray==undefined){argumentArray=[]}else{if(!(argumentArray instanceof Array)){argumentArray=[argumentArray]}}var self=this;if(typeof this.settings[handlerName]==="function"){this.eventQueue.push(function(){this.settings[handlerName].apply(this,argumentArray)});setTimeout(function(){self.executeNextEvent()},0)}else{if(this.settings[handlerName]!==null){throw"Event handler "+handlerName+" is unknown or is not a function"}}};SWFUpload.prototype.executeNextEvent=function(){var f=this.eventQueue?this.eventQueue.shift():null;if(typeof (f)==="function"){f.apply(this)}};SWFUpload.prototype.unescapeFilePostParams=function(file){var reg=/[$]([0-9a-f]{4})/i;var unescapedPost={};var uk;if(file!=undefined){for(var k in file.post){if(file.post.hasOwnProperty(k)){uk=k;var match;while((match=reg.exec(uk))!==null){uk=uk.replace(match[0],String.fromCharCode(parseInt("0x"+match[1],16)))}unescapedPost[uk]=file.post[k]}}file.post=unescapedPost}return file};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface")}catch(ex){return false}};SWFUpload.prototype.flashReady=function(){var movieElement=this.getMovieElement();if(!movieElement){this.debug("Flash called back ready but the flash movie can't be found.");return }this.cleanUp(movieElement);this.queueEvent("swfupload_loaded_handler")};SWFUpload.prototype.cleanUp=function(movieElement){try{if(this.movieElement&&typeof (movieElement.CallFunction)==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var key in movieElement){try{if(typeof (movieElement[key])==="function"){movieElement[key]=null}}catch(ex){}}}}catch(ex1){}window.__flash__removeCallback=function(instance,name){try{if(instance){instance[name]=null}}catch(flashEx){}}};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")};SWFUpload.prototype.fileQueued=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("file_queued_handler",file)};SWFUpload.prototype.fileQueueError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("file_queue_error_handler",[file,errorCode,message])};SWFUpload.prototype.fileDialogComplete=function(numFilesSelected,numFilesQueued,numFilesInQueue){this.queueEvent("file_dialog_complete_handler",[numFilesSelected,numFilesQueued,numFilesInQueue])};SWFUpload.prototype.uploadStart=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("return_upload_start_handler",file)};SWFUpload.prototype.returnUploadStart=function(file){var returnValue;if(typeof this.settings.upload_start_handler==="function"){file=this.unescapeFilePostParams(file);returnValue=this.settings.upload_start_handler.call(this,file)}else{if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function"}}if(returnValue===undefined){returnValue=true}returnValue=!!returnValue;this.callFlash("ReturnUploadStart",[returnValue])};SWFUpload.prototype.uploadProgress=function(file,bytesComplete,bytesTotal){file=this.unescapeFilePostParams(file);this.queueEvent("upload_progress_handler",[file,bytesComplete,bytesTotal])};SWFUpload.prototype.uploadError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("upload_error_handler",[file,errorCode,message])};SWFUpload.prototype.uploadSuccess=function(file,serverData,responseReceived){file=this.unescapeFilePostParams(file);this.queueEvent("upload_success_handler",[file,serverData,responseReceived])};SWFUpload.prototype.uploadComplete=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("upload_complete_handler",file)};SWFUpload.prototype.debug=function(message){this.queueEvent("debug_handler",message)};SWFUpload.prototype.debugMessage=function(message){if(this.settings.debug){var exceptionMessage,exceptionValues=[];if(typeof message==="object"&&typeof message.name==="string"&&typeof message.message==="string"){for(var key in message){if(message.hasOwnProperty(key)){exceptionValues.push(key+": "+message[key])}}exceptionMessage=exceptionValues.join("\n")||"";exceptionValues=exceptionMessage.split("\n");exceptionMessage="EXCEPTION: "+exceptionValues.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(exceptionMessage)}else{SWFUpload.Console.writeLine(message)}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(message){var console,documentForm;try{console=document.getElementById("SWFUpload_Console");if(!console){documentForm=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(documentForm);console=document.createElement("textarea");console.id="SWFUpload_Console";console.style.fontFamily="monospace";console.setAttribute("wrap","off");console.wrap="off";console.style.overflow="auto";console.style.width="700px";console.style.height="350px";console.style.margin="5px";documentForm.appendChild(console)}console.value+=message+"\n";console.scrollTop=console.scrollHeight-console.clientHeight}catch(ex){alert("Exception: "+ex.name+" Message: "+ex.message)}};
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/licenses/Infusion-LICENSE.txt b/docs/include/jscripts/infusion/licenses/Infusion-LICENSE.txt
new file mode 100644 (file)
index 0000000..7de827b
--- /dev/null
@@ -0,0 +1,227 @@
+Fluid is available under either the terms of the New BSD license or the
+Educational Community License, Version 2.0. As a recipient of Fluid, you may
+choose which license to receive this code under (except as noted in per-module
+LICENSE files). All modules are Copyright 2007 University of Toronto except
+where noted otherwise in the code itself, or if the modules reside in a separate
+directory, they may contain explicit declarations of copyright in both the
+LICENSE file in the directory in which they reside and in the code itself. No
+external contributions are allowed under licenses which are fundamentally
+incompatible with the ECL or BSD licenses that Fluid is distributed under.
+
+The text of the ECL and BSD licenses is reproduced below.
+
+Educational Community License, Version 2.0
+*************************************
+Copyright 2007 University of Toronto
+
+Educational Community License, Version 2.0, April 2007
+
+The Educational Community License version 2.0 ("ECL") consists of the Apache 2.0
+license, modified to change the scope of the patent grant in section 3 to be
+specific to the needs of the education communities using this license. The
+original Apache 2.0 license can be found at:
+http://www.apache.org/licenses/LICENSE-2.0
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and
+distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright
+owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities
+that control, are controlled by, or are under common control with that entity.
+For the purposes of this definition, "control" means (i) the power, direct or
+indirect, to cause the direction or management of such entity, whether by
+contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
+outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including
+but not limited to software source code, documentation source, and configuration
+files.
+
+"Object" form shall mean any form resulting from mechanical transformation or
+translation of a Source form, including but not limited to compiled object code,
+generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made
+available under the License, as indicated by a copyright notice that is included
+in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that
+is based on (or derived from) the Work and for which the editorial revisions,
+annotations, elaborations, or other modifications represent, as a whole, an
+original work of authorship. For the purposes of this License, Derivative Works
+shall not include works that remain separable from, or merely link (or bind by
+name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version
+of the Work and any modifications or additions to that Work or Derivative Works
+thereof, that is intentionally submitted to Licensor for inclusion in the Work
+by the copyright owner or by an individual or Legal Entity authorized to submit
+on behalf of the copyright owner. For the purposes of this definition,
+"submitted" means any form of electronic, verbal, or written communication sent
+to the Licensor or its representatives, including but not limited to
+communication on electronic mailing lists, source code control systems, and
+issue tracking systems that are managed by, or on behalf of, the Licensor for
+the purpose of discussing and improving the Work, but excluding communication
+that is conspicuously marked or otherwise designated in writing by the copyright
+owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
+of whom a Contribution has been received by Licensor and subsequently
+incorporated within the Work.
+
+2. Grant of Copyright License.
+
+Subject to the terms and conditions of this License, each Contributor hereby
+grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+irrevocable copyright license to reproduce, prepare Derivative Works of,
+publicly display, publicly perform, sublicense, and distribute the Work and such
+Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+
+Subject to the terms and conditions of this License, each Contributor hereby
+grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+irrevocable (except as stated in this section) patent license to make, have
+made, use, offer to sell, sell, import, and otherwise transfer the Work, where
+such license applies only to those patent claims licensable by such Contributor
+that are necessarily infringed by their Contribution(s) alone or by combination
+of their Contribution(s) with the Work to which such Contribution(s) was
+submitted. If You institute patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that the Work or a
+Contribution incorporated within the Work constitutes direct or contributory
+patent infringement, then any patent licenses granted to You under this License
+for that Work shall terminate as of the date such litigation is filed. Any
+patent license granted hereby with respect to contributions by an individual
+employed by an institution or organization is limited to patent claims where the
+individual that is the author of the Work is also the inventor of the patent
+claims licensed, and where the organization or institution has the right to
+grant such license under applicable grant and research funding agreements. No
+other express or implied licenses are granted.
+
+4. Redistribution.
+
+You may reproduce and distribute copies of the Work or Derivative Works thereof
+in any medium, with or without modifications, and in Source or Object form,
+provided that You meet the following conditions:
+
+   1. You must give any other recipients of the Work or Derivative Works a copy
+of this License; and
+   2. You must cause any modified files to carry prominent notices stating that
+You changed the files; and
+   3. You must retain, in the Source form of any Derivative Works that You
+distribute, all copyright, patent, trademark, and attribution notices from
+the Source form of the Work, excluding those notices that do not pertain to
+any part of the Derivative Works; and
+   4. If the Work includes a "NOTICE" text file as part of its distribution,
+then any Derivative Works that You distribute must include a readable copy of
+the attribution notices contained within such NOTICE file, excluding those
+notices that do not pertain to any part of the Derivative Works, in at least
+one of the following places: within a NOTICE text file distributed as part of
+the Derivative Works; within the Source form or documentation, if provided
+along with the Derivative Works; or, within a display generated by the
+Derivative Works, if and wherever such third-party notices normally appear.
+The contents of the NOTICE file are for informational purposes only and do
+not modify the License. You may add Your own attribution notices within
+Derivative Works that You distribute, alongside or as an addendum to the
+NOTICE text from the Work, provided that such additional attribution notices
+cannot be construed as modifying the License.
+
+You may add Your own copyright statement to Your modifications and may provide
+additional or different license terms and conditions for use, reproduction, or
+distribution of Your modifications, or for any such Derivative Works as a whole,
+provided Your use, reproduction, and distribution of the Work otherwise complies
+with the conditions stated in this License.
+
+5. Submission of Contributions.
+
+Unless You explicitly state otherwise, any Contribution intentionally submitted
+for inclusion in the Work by You to the Licensor shall be under the terms and
+conditions of this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify the terms of
+any separate license agreement you may have executed with Licensor regarding
+such Contributions.
+
+6. Trademarks.
+
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+
+Unless required by applicable law or agreed to in writing, Licensor provides the
+Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
+including, without limitation, any warranties or conditions of TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
+solely responsible for determining the appropriateness of using or
+redistributing the Work and assume any risks associated with Your exercise of
+permissions under this License.
+
+8. Limitation of Liability.
+
+In no event and under no legal theory, whether in tort (including negligence),
+contract, or otherwise, unless required by applicable law (such as deliberate
+and grossly negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special, incidental,
+or consequential damages of any character arising as a result of this License or
+out of the use or inability to use the Work (including but not limited to
+damages for loss of goodwill, work stoppage, computer failure or malfunction, or
+any and all other commercial damages or losses), even if such Contributor has
+been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+
+While redistributing the Work or Derivative Works thereof, You may choose to
+offer, and charge a fee for, acceptance of support, warranty, indemnity, or
+other liability obligations and/or rights consistent with this License. However,
+in accepting such obligations, You may act only on Your own behalf and on Your
+sole responsibility, not on behalf of any other Contributor, and only if You
+agree to indemnify, defend, and hold each Contributor harmless for any liability
+incurred by, or claims asserted against, such Contributor by reason of your
+accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS FOR ECL 2.0
+
+The New BSD license
+**********************
+
+Copyright 2007 University of Toronto.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+    * Neither the name of the University of Toronto nor the names of its
+contributors may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+OF SUCH DAMAGE.
+
+END OF TERMS AND CONDITIONS FOR THE NEW BSD LICENSE
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/licenses/fastXmlPull-LICENSE.txt b/docs/include/jscripts/infusion/licenses/fastXmlPull-LICENSE.txt
new file mode 100644 (file)
index 0000000..585d49e
--- /dev/null
@@ -0,0 +1,525 @@
+
+The code inside the file
+    fastXmlPull.js
+in this folder is based on code taken from XML for <SCRIPT> (http://xmljs.sourceforge.net/),
+which is distributed under the terms of the GNU Lesser General Public Licence (LGPL) 
+(http://www.gnu.org/copyleft/lesser.html#TOC1) and the zlib/libpng License (http://www.opensource.org/licenses/zlib-license.php). 
+
+The text of these licenses is reproduced below.
+
+========================================================================
+The zlib/libpng License
+
+Copyright (c) 2000 - 2002, 2003 Michael Houghton (mike@idle.org), Raymond Irving and David Joham (djoham@yahoo.com)
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+    1. The origin of this software must not be misrepresented; you must not
+    claim that you wrote the original software. If you use this software
+    in a product, an acknowledgment in the product documentation would be
+    appreciated but is not required.
+
+    2. Altered source versions must be plainly marked as such, and must not be
+    misrepresented as being the original software.
+
+    3. This notice may not be removed or altered from any source
+    distribution.
+    
+========================================================================
+                 GNU LIBRARY GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+                   59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL.  It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it.  You can use it for
+your libraries, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library.  If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, 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 companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software.  To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+  Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs.  This
+license, the GNU Library General Public License, applies to certain
+designated libraries.  This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+  The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it.  Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program.  However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+  Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries.  We
+concluded that weaker conditions might promote sharing better.
+
+  However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves.  This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them.  (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.)  The hope is that this
+will lead to faster development of free libraries.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+  Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+
+                 GNU LIBRARY GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License").  Each licensee is
+addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+
+  6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    c) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    d) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the 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.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                           NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  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.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library 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
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public
+    License along with this library; if not, write to the 
+    Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
+    Boston, MA  02111-1307  USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/docs/include/jscripts/infusion/licenses/fckeditor-LICENSE.txt b/docs/include/jscripts/infusion/licenses/fckeditor-LICENSE.txt
new file mode 100644 (file)
index 0000000..43ac59d
--- /dev/null
@@ -0,0 +1,1246 @@
+FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
+Copyright (C) 2003-2008 Frederico Caldeira Knabben\r
+\r
+Licensed under the terms of any of the following licenses at your\r
+choice:\r
+\r
+ - GNU General Public License Version 2 or later (the "GPL")\r
+   http://www.gnu.org/licenses/gpl.html\r
+   (See Appendix A)\r
+\r
+ - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
+   http://www.gnu.org/licenses/lgpl.html\r
+   (See Appendix B)\r
+\r
+ - Mozilla Public License Version 1.1 or later (the "MPL")\r
+   http://www.mozilla.org/MPL/MPL-1.1.html\r
+   (See Appendix C)\r
+\r
+You are not required to, but if you want to explicitly declare the\r
+license you have chosen to be bound to when using, reproducing,\r
+modifying and distributing this software, just include a text file\r
+titled "legal.txt" in your version of this software, indicating your\r
+license choice. In any case, your choice will not restrict any\r
+recipient of your version of this software to use, reproduce, modify\r
+and distribute this software under any of the above licenses.\r
+\r
+Appendix A: The GPL License\r
+===========================\r
+\r
+                   GNU GENERAL PUBLIC LICENSE\r
+                      Version 2, June 1991\r
+\r
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\r
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+                           Preamble\r
+\r
+  The licenses for most software are designed to take away your\r
+freedom to share and change it.  By contrast, the GNU General Public\r
+License is intended to guarantee your freedom to share and change free\r
+software--to make sure the software is free for all its users.  This\r
+General Public License applies to most of the Free Software\r
+Foundation's software and to any other program whose authors commit to\r
+using it.  (Some other Free Software Foundation software is covered by\r
+the GNU Lesser General Public License instead.)  You can apply it to\r
+your programs, too.\r
+\r
+  When we speak of free software, we are referring to freedom, not\r
+price.  Our General Public Licenses are designed to make sure that you\r
+have the freedom to distribute copies of free software (and charge for\r
+this service if you wish), that you receive source code or can get it\r
+if you want it, that you can change the software or use pieces of it\r
+in new free programs; and that you know you can do these things.\r
+\r
+  To protect your rights, we need to make restrictions that forbid\r
+anyone to deny you these rights or to ask you to surrender the rights.\r
+These restrictions translate to certain responsibilities for you if you\r
+distribute copies of the software, or if you modify it.\r
+\r
+  For example, if you distribute copies of such a program, whether\r
+gratis or for a fee, you must give the recipients all the rights that\r
+you have.  You must make sure that they, too, receive or can get the\r
+source code.  And you must show them these terms so they know their\r
+rights.\r
+\r
+  We protect your rights with two steps: (1) copyright the software, and\r
+(2) offer you this license which gives you legal permission to copy,\r
+distribute and/or modify the software.\r
+\r
+  Also, for each author's protection and ours, we want to make certain\r
+that everyone understands that there is no warranty for this free\r
+software.  If the software is modified by someone else and passed on, we\r
+want its recipients to know that what they have is not the original, so\r
+that any problems introduced by others will not reflect on the original\r
+authors' reputations.\r
+\r
+  Finally, any free program is threatened constantly by software\r
+patents.  We wish to avoid the danger that redistributors of a free\r
+program will individually obtain patent licenses, in effect making the\r
+program proprietary.  To prevent this, we have made it clear that any\r
+patent must be licensed for everyone's free use or not licensed at all.\r
+\r
+  The precise terms and conditions for copying, distribution and\r
+modification follow.\r
+\r
+                   GNU GENERAL PUBLIC LICENSE\r
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
+\r
+  0. This License applies to any program or other work which contains\r
+a notice placed by the copyright holder saying it may be distributed\r
+under the terms of this General Public License.  The "Program", below,\r
+refers to any such program or work, and a "work based on the Program"\r
+means either the Program or any derivative work under copyright law:\r
+that is to say, a work containing the Program or a portion of it,\r
+either verbatim or with modifications and/or translated into another\r
+language.  (Hereinafter, translation is included without limitation in\r
+the term "modification".)  Each licensee is addressed as "you".\r
+\r
+Activities other than copying, distribution and modification are not\r
+covered by this License; they are outside its scope.  The act of\r
+running the Program is not restricted, and the output from the Program\r
+is covered only if its contents constitute a work based on the\r
+Program (independent of having been made by running the Program).\r
+Whether that is true depends on what the Program does.\r
+\r
+  1. You may copy and distribute verbatim copies of the Program's\r
+source code as you receive it, in any medium, provided that you\r
+conspicuously and appropriately publish on each copy an appropriate\r
+copyright notice and disclaimer of warranty; keep intact all the\r
+notices that refer to this License and to the absence of any warranty;\r
+and give any other recipients of the Program a copy of this License\r
+along with the Program.\r
+\r
+You may charge a fee for the physical act of transferring a copy, and\r
+you may at your option offer warranty protection in exchange for a fee.\r
+\r
+  2. You may modify your copy or copies of the Program or any portion\r
+of it, thus forming a work based on the Program, and copy and\r
+distribute such modifications or work under the terms of Section 1\r
+above, provided that you also meet all of these conditions:\r
+\r
+    a) You must cause the modified files to carry prominent notices\r
+    stating that you changed the files and the date of any change.\r
+\r
+    b) You must cause any work that you distribute or publish, that in\r
+    whole or in part contains or is derived from the Program or any\r
+    part thereof, to be licensed as a whole at no charge to all third\r
+    parties under the terms of this License.\r
+\r
+    c) If the modified program normally reads commands interactively\r
+    when run, you must cause it, when started running for such\r
+    interactive use in the most ordinary way, to print or display an\r
+    announcement including an appropriate copyright notice and a\r
+    notice that there is no warranty (or else, saying that you provide\r
+    a warranty) and that users may redistribute the program under\r
+    these conditions, and telling the user how to view a copy of this\r
+    License.  (Exception: if the Program itself is interactive but\r
+    does not normally print such an announcement, your work based on\r
+    the Program is not required to print an announcement.)\r
+\r
+These requirements apply to the modified work as a whole.  If\r
+identifiable sections of that work are not derived from the Program,\r
+and can be reasonably considered independent and separate works in\r
+themselves, then this License, and its terms, do not apply to those\r
+sections when you distribute them as separate works.  But when you\r
+distribute the same sections as part of a whole which is a work based\r
+on the Program, the distribution of the whole must be on the terms of\r
+this License, whose permissions for other licensees extend to the\r
+entire whole, and thus to each and every part regardless of who wrote it.\r
+\r
+Thus, it is not the intent of this section to claim rights or contest\r
+your rights to work written entirely by you; rather, the intent is to\r
+exercise the right to control the distribution of derivative or\r
+collective works based on the Program.\r
+\r
+In addition, mere aggregation of another work not based on the Program\r
+with the Program (or with a work based on the Program) on a volume of\r
+a storage or distribution medium does not bring the other work under\r
+the scope of this License.\r
+\r
+  3. You may copy and distribute the Program (or a work based on it,\r
+under Section 2) in object code or executable form under the terms of\r
+Sections 1 and 2 above provided that you also do one of the following:\r
+\r
+    a) Accompany it with the complete corresponding machine-readable\r
+    source code, which must be distributed under the terms of Sections\r
+    1 and 2 above on a medium customarily used for software interchange; or,\r
+\r
+    b) Accompany it with a written offer, valid for at least three\r
+    years, to give any third party, for a charge no more than your\r
+    cost of physically performing source distribution, a complete\r
+    machine-readable copy of the corresponding source code, to be\r
+    distributed under the terms of Sections 1 and 2 above on a medium\r
+    customarily used for software interchange; or,\r
+\r
+    c) Accompany it with the information you received as to the offer\r
+    to distribute corresponding source code.  (This alternative is\r
+    allowed only for noncommercial distribution and only if you\r
+    received the program in object code or executable form with such\r
+    an offer, in accord with Subsection b above.)\r
+\r
+The source code for a work means the preferred form of the work for\r
+making modifications to it.  For an executable work, complete source\r
+code means all the source code for all modules it contains, plus any\r
+associated interface definition files, plus the scripts used to\r
+control compilation and installation of the executable.  However, as a\r
+special exception, the source code distributed need not include\r
+anything that is normally distributed (in either source or binary\r
+form) with the major components (compiler, kernel, and so on) of the\r
+operating system on which the executable runs, unless that component\r
+itself accompanies the executable.\r
+\r
+If distribution of executable or object code is made by offering\r
+access to copy from a designated place, then offering equivalent\r
+access to copy the source code from the same place counts as\r
+distribution of the source code, even though third parties are not\r
+compelled to copy the source along with the object code.\r
+\r
+  4. You may not copy, modify, sublicense, or distribute the Program\r
+except as expressly provided under this License.  Any attempt\r
+otherwise to copy, modify, sublicense or distribute the Program is\r
+void, and will automatically terminate your rights under this License.\r
+However, parties who have received copies, or rights, from you under\r
+this License will not have their licenses terminated so long as such\r
+parties remain in full compliance.\r
+\r
+  5. You are not required to accept this License, since you have not\r
+signed it.  However, nothing else grants you permission to modify or\r
+distribute the Program or its derivative works.  These actions are\r
+prohibited by law if you do not accept this License.  Therefore, by\r
+modifying or distributing the Program (or any work based on the\r
+Program), you indicate your acceptance of this License to do so, and\r
+all its terms and conditions for copying, distributing or modifying\r
+the Program or works based on it.\r
+\r
+  6. Each time you redistribute the Program (or any work based on the\r
+Program), the recipient automatically receives a license from the\r
+original licensor to copy, distribute or modify the Program subject to\r
+these terms and conditions.  You may not impose any further\r
+restrictions on the recipients' exercise of the rights granted herein.\r
+You are not responsible for enforcing compliance by third parties to\r
+this License.\r
+\r
+  7. If, as a consequence of a court judgment or allegation of patent\r
+infringement or for any other reason (not limited to patent issues),\r
+conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License.  If you cannot\r
+distribute so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you\r
+may not distribute the Program at all.  For example, if a patent\r
+license would not permit royalty-free redistribution of the Program by\r
+all those who receive copies directly or indirectly through you, then\r
+the only way you could satisfy both it and this License would be to\r
+refrain entirely from distribution of the Program.\r
+\r
+If any portion of this section is held invalid or unenforceable under\r
+any particular circumstance, the balance of the section is intended to\r
+apply and the section as a whole is intended to apply in other\r
+circumstances.\r
+\r
+It is not the purpose of this section to induce you to infringe any\r
+patents or other property right claims or to contest validity of any\r
+such claims; this section has the sole purpose of protecting the\r
+integrity of the free software distribution system, which is\r
+implemented by public license practices.  Many people have made\r
+generous contributions to the wide range of software distributed\r
+through that system in reliance on consistent application of that\r
+system; it is up to the author/donor to decide if he or she is willing\r
+to distribute software through any other system and a licensee cannot\r
+impose that choice.\r
+\r
+This section is intended to make thoroughly clear what is believed to\r
+be a consequence of the rest of this License.\r
+\r
+  8. If the distribution and/or use of the Program is restricted in\r
+certain countries either by patents or by copyrighted interfaces, the\r
+original copyright holder who places the Program under this License\r
+may add an explicit geographical distribution limitation excluding\r
+those countries, so that distribution is permitted only in or among\r
+countries not thus excluded.  In such case, this License incorporates\r
+the limitation as if written in the body of this License.\r
+\r
+  9. The Free Software Foundation may publish revised and/or new versions\r
+of the General Public License from time to time.  Such new versions will\r
+be similar in spirit to the present version, but may differ in detail to\r
+address new problems or concerns.\r
+\r
+Each version is given a distinguishing version number.  If the Program\r
+specifies a version number of this License which applies to it and "any\r
+later version", you have the option of following the terms and conditions\r
+either of that version or of any later version published by the Free\r
+Software Foundation.  If the Program does not specify a version number of\r
+this License, you may choose any version ever published by the Free Software\r
+Foundation.\r
+\r
+  10. If you wish to incorporate parts of the Program into other free\r
+programs whose distribution conditions are different, write to the author\r
+to ask for permission.  For software which is copyrighted by the Free\r
+Software Foundation, write to the Free Software Foundation; we sometimes\r
+make exceptions for this.  Our decision will be guided by the two goals\r
+of preserving the free status of all derivatives of our free software and\r
+of promoting the sharing and reuse of software generally.\r
+\r
+                           NO WARRANTY\r
+\r
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\r
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\r
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\r
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\r
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\r
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\r
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\r
+REPAIR OR CORRECTION.\r
+\r
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\r
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\r
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\r
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\r
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\r
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\r
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\r
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\r
+POSSIBILITY OF SUCH DAMAGES.\r
+\r
+                    END OF TERMS AND CONDITIONS\r
+\r
+\r
+Appendix B: The LGPL License\r
+============================\r
+\r
+                 GNU LESSER GENERAL PUBLIC LICENSE\r
+                      Version 2.1, February 1999\r
+\r
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.\r
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+[This is the first released version of the Lesser GPL.  It also counts\r
+ as the successor of the GNU Library Public License, version 2, hence\r
+ the version number 2.1.]\r
+\r
+                           Preamble\r
+\r
+  The licenses for most software are designed to take away your\r
+freedom to share and change it.  By contrast, the GNU General Public\r
+Licenses are intended to guarantee your freedom to share and change\r
+free software--to make sure the software is free for all its users.\r
+\r
+  This license, the Lesser General Public License, applies to some\r
+specially designated software packages--typically libraries--of the\r
+Free Software Foundation and other authors who decide to use it.  You\r
+can use it too, but we suggest you first think carefully about whether\r
+this license or the ordinary General Public License is the better\r
+strategy to use in any particular case, based on the explanations below.\r
+\r
+  When we speak of free software, we are referring to freedom of use,\r
+not price.  Our General Public Licenses are designed to make sure that\r
+you have the freedom to distribute copies of free software (and charge\r
+for this service if you wish); that you receive source code or can get\r
+it if you want it; that you can change the software and use pieces of\r
+it in new free programs; and that you are informed that you can do\r
+these things.\r
+\r
+  To protect your rights, we need to make restrictions that forbid\r
+distributors to deny you these rights or to ask you to surrender these\r
+rights.  These restrictions translate to certain responsibilities for\r
+you if you distribute copies of the library or if you modify it.\r
+\r
+  For example, if you distribute copies of the library, whether gratis\r
+or for a fee, you must give the recipients all the rights that we gave\r
+you.  You must make sure that they, too, receive or can get the source\r
+code.  If you link other code with the library, you must provide\r
+complete object files to the recipients, so that they can relink them\r
+with the library after making changes to the library and recompiling\r
+it.  And you must show them these terms so they know their rights.\r
+\r
+  We protect your rights with a two-step method: (1) we copyright the\r
+library, and (2) we offer you this license, which gives you legal\r
+permission to copy, distribute and/or modify the library.\r
+\r
+  To protect each distributor, we want to make it very clear that\r
+there is no warranty for the free library.  Also, if the library is\r
+modified by someone else and passed on, the recipients should know\r
+that what they have is not the original version, so that the original\r
+author's reputation will not be affected by problems that might be\r
+introduced by others.\r
+\r
+  Finally, software patents pose a constant threat to the existence of\r
+any free program.  We wish to make sure that a company cannot\r
+effectively restrict the users of a free program by obtaining a\r
+restrictive license from a patent holder.  Therefore, we insist that\r
+any patent license obtained for a version of the library must be\r
+consistent with the full freedom of use specified in this license.\r
+\r
+  Most GNU software, including some libraries, is covered by the\r
+ordinary GNU General Public License.  This license, the GNU Lesser\r
+General Public License, applies to certain designated libraries, and\r
+is quite different from the ordinary General Public License.  We use\r
+this license for certain libraries in order to permit linking those\r
+libraries into non-free programs.\r
+\r
+  When a program is linked with a library, whether statically or using\r
+a shared library, the combination of the two is legally speaking a\r
+combined work, a derivative of the original library.  The ordinary\r
+General Public License therefore permits such linking only if the\r
+entire combination fits its criteria of freedom.  The Lesser General\r
+Public License permits more lax criteria for linking other code with\r
+the library.\r
+\r
+  We call this license the "Lesser" General Public License because it\r
+does Less to protect the user's freedom than the ordinary General\r
+Public License.  It also provides other free software developers Less\r
+of an advantage over competing non-free programs.  These disadvantages\r
+are the reason we use the ordinary General Public License for many\r
+libraries.  However, the Lesser license provides advantages in certain\r
+special circumstances.\r
+\r
+  For example, on rare occasions, there may be a special need to\r
+encourage the widest possible use of a certain library, so that it becomes\r
+a de-facto standard.  To achieve this, non-free programs must be\r
+allowed to use the library.  A more frequent case is that a free\r
+library does the same job as widely used non-free libraries.  In this\r
+case, there is little to gain by limiting the free library to free\r
+software only, so we use the Lesser General Public License.\r
+\r
+  In other cases, permission to use a particular library in non-free\r
+programs enables a greater number of people to use a large body of\r
+free software.  For example, permission to use the GNU C Library in\r
+non-free programs enables many more people to use the whole GNU\r
+operating system, as well as its variant, the GNU/Linux operating\r
+system.\r
+\r
+  Although the Lesser General Public License is Less protective of the\r
+users' freedom, it does ensure that the user of a program that is\r
+linked with the Library has the freedom and the wherewithal to run\r
+that program using a modified version of the Library.\r
+\r
+  The precise terms and conditions for copying, distribution and\r
+modification follow.  Pay close attention to the difference between a\r
+"work based on the library" and a "work that uses the library".  The\r
+former contains code derived from the library, whereas the latter must\r
+be combined with the library in order to run.\r
+\r
+                 GNU LESSER GENERAL PUBLIC LICENSE\r
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
+\r
+  0. This License Agreement applies to any software library or other\r
+program which contains a notice placed by the copyright holder or\r
+other authorized party saying it may be distributed under the terms of\r
+this Lesser General Public License (also called "this License").\r
+Each licensee is addressed as "you".\r
+\r
+  A "library" means a collection of software functions and/or data\r
+prepared so as to be conveniently linked with application programs\r
+(which use some of those functions and data) to form executables.\r
+\r
+  The "Library", below, refers to any such software library or work\r
+which has been distributed under these terms.  A "work based on the\r
+Library" means either the Library or any derivative work under\r
+copyright law: that is to say, a work containing the Library or a\r
+portion of it, either verbatim or with modifications and/or translated\r
+straightforwardly into another language.  (Hereinafter, translation is\r
+included without limitation in the term "modification".)\r
+\r
+  "Source code" for a work means the preferred form of the work for\r
+making modifications to it.  For a library, complete source code means\r
+all the source code for all modules it contains, plus any associated\r
+interface definition files, plus the scripts used to control compilation\r
+and installation of the library.\r
+\r
+  Activities other than copying, distribution and modification are not\r
+covered by this License; they are outside its scope.  The act of\r
+running a program using the Library is not restricted, and output from\r
+such a program is covered only if its contents constitute a work based\r
+on the Library (independent of the use of the Library in a tool for\r
+writing it).  Whether that is true depends on what the Library does\r
+and what the program that uses the Library does.\r
+\r
+  1. You may copy and distribute verbatim copies of the Library's\r
+complete source code as you receive it, in any medium, provided that\r
+you conspicuously and appropriately publish on each copy an\r
+appropriate copyright notice and disclaimer of warranty; keep intact\r
+all the notices that refer to this License and to the absence of any\r
+warranty; and distribute a copy of this License along with the\r
+Library.\r
+\r
+  You may charge a fee for the physical act of transferring a copy,\r
+and you may at your option offer warranty protection in exchange for a\r
+fee.\r
+\r
+  2. You may modify your copy or copies of the Library or any portion\r
+of it, thus forming a work based on the Library, and copy and\r
+distribute such modifications or work under the terms of Section 1\r
+above, provided that you also meet all of these conditions:\r
+\r
+    a) The modified work must itself be a software library.\r
+\r
+    b) You must cause the files modified to carry prominent notices\r
+    stating that you changed the files and the date of any change.\r
+\r
+    c) You must cause the whole of the work to be licensed at no\r
+    charge to all third parties under the terms of this License.\r
+\r
+    d) If a facility in the modified Library refers to a function or a\r
+    table of data to be supplied by an application program that uses\r
+    the facility, other than as an argument passed when the facility\r
+    is invoked, then you must make a good faith effort to ensure that,\r
+    in the event an application does not supply such function or\r
+    table, the facility still operates, and performs whatever part of\r
+    its purpose remains meaningful.\r
+\r
+    (For example, a function in a library to compute square roots has\r
+    a purpose that is entirely well-defined independent of the\r
+    application.  Therefore, Subsection 2d requires that any\r
+    application-supplied function or table used by this function must\r
+    be optional: if the application does not supply it, the square\r
+    root function must still compute square roots.)\r
+\r
+These requirements apply to the modified work as a whole.  If\r
+identifiable sections of that work are not derived from the Library,\r
+and can be reasonably considered independent and separate works in\r
+themselves, then this License, and its terms, do not apply to those\r
+sections when you distribute them as separate works.  But when you\r
+distribute the same sections as part of a whole which is a work based\r
+on the Library, the distribution of the whole must be on the terms of\r
+this License, whose permissions for other licensees extend to the\r
+entire whole, and thus to each and every part regardless of who wrote\r
+it.\r
+\r
+Thus, it is not the intent of this section to claim rights or contest\r
+your rights to work written entirely by you; rather, the intent is to\r
+exercise the right to control the distribution of derivative or\r
+collective works based on the Library.\r
+\r
+In addition, mere aggregation of another work not based on the Library\r
+with the Library (or with a work based on the Library) on a volume of\r
+a storage or distribution medium does not bring the other work under\r
+the scope of this License.\r
+\r
+  3. You may opt to apply the terms of the ordinary GNU General Public\r
+License instead of this License to a given copy of the Library.  To do\r
+this, you must alter all the notices that refer to this License, so\r
+that they refer to the ordinary GNU General Public License, version 2,\r
+instead of to this License.  (If a newer version than version 2 of the\r
+ordinary GNU General Public License has appeared, then you can specify\r
+that version instead if you wish.)  Do not make any other change in\r
+these notices.\r
+\r
+  Once this change is made in a given copy, it is irreversible for\r
+that copy, so the ordinary GNU General Public License applies to all\r
+subsequent copies and derivative works made from that copy.\r
+\r
+  This option is useful when you wish to copy part of the code of\r
+the Library into a program that is not a library.\r
+\r
+  4. You may copy and distribute the Library (or a portion or\r
+derivative of it, under Section 2) in object code or executable form\r
+under the terms of Sections 1 and 2 above provided that you accompany\r
+it with the complete corresponding machine-readable source code, which\r
+must be distributed under the terms of Sections 1 and 2 above on a\r
+medium customarily used for software interchange.\r
+\r
+  If distribution of object code is made by offering access to copy\r
+from a designated place, then offering equivalent access to copy the\r
+source code from the same place satisfies the requirement to\r
+distribute the source code, even though third parties are not\r
+compelled to copy the source along with the object code.\r
+\r
+  5. A program that contains no derivative of any portion of the\r
+Library, but is designed to work with the Library by being compiled or\r
+linked with it, is called a "work that uses the Library".  Such a\r
+work, in isolation, is not a derivative work of the Library, and\r
+therefore falls outside the scope of this License.\r
+\r
+  However, linking a "work that uses the Library" with the Library\r
+creates an executable that is a derivative of the Library (because it\r
+contains portions of the Library), rather than a "work that uses the\r
+library".  The executable is therefore covered by this License.\r
+Section 6 states terms for distribution of such executables.\r
+\r
+  When a "work that uses the Library" uses material from a header file\r
+that is part of the Library, the object code for the work may be a\r
+derivative work of the Library even though the source code is not.\r
+Whether this is true is especially significant if the work can be\r
+linked without the Library, or if the work is itself a library.  The\r
+threshold for this to be true is not precisely defined by law.\r
+\r
+  If such an object file uses only numerical parameters, data\r
+structure layouts and accessors, and small macros and small inline\r
+functions (ten lines or less in length), then the use of the object\r
+file is unrestricted, regardless of whether it is legally a derivative\r
+work.  (Executables containing this object code plus portions of the\r
+Library will still fall under Section 6.)\r
+\r
+  Otherwise, if the work is a derivative of the Library, you may\r
+distribute the object code for the work under the terms of Section 6.\r
+Any executables containing that work also fall under Section 6,\r
+whether or not they are linked directly with the Library itself.\r
+\r
+  6. As an exception to the Sections above, you may also combine or\r
+link a "work that uses the Library" with the Library to produce a\r
+work containing portions of the Library, and distribute that work\r
+under terms of your choice, provided that the terms permit\r
+modification of the work for the customer's own use and reverse\r
+engineering for debugging such modifications.\r
+\r
+  You must give prominent notice with each copy of the work that the\r
+Library is used in it and that the Library and its use are covered by\r
+this License.  You must supply a copy of this License.  If the work\r
+during execution displays copyright notices, you must include the\r
+copyright notice for the Library among them, as well as a reference\r
+directing the user to the copy of this License.  Also, you must do one\r
+of these things:\r
+\r
+    a) Accompany the work with the complete corresponding\r
+    machine-readable source code for the Library including whatever\r
+    changes were used in the work (which must be distributed under\r
+    Sections 1 and 2 above); and, if the work is an executable linked\r
+    with the Library, with the complete machine-readable "work that\r
+    uses the Library", as object code and/or source code, so that the\r
+    user can modify the Library and then relink to produce a modified\r
+    executable containing the modified Library.  (It is understood\r
+    that the user who changes the contents of definitions files in the\r
+    Library will not necessarily be able to recompile the application\r
+    to use the modified definitions.)\r
+\r
+    b) Use a suitable shared library mechanism for linking with the\r
+    Library.  A suitable mechanism is one that (1) uses at run time a\r
+    copy of the library already present on the user's computer system,\r
+    rather than copying library functions into the executable, and (2)\r
+    will operate properly with a modified version of the library, if\r
+    the user installs one, as long as the modified version is\r
+    interface-compatible with the version that the work was made with.\r
+\r
+    c) Accompany the work with a written offer, valid for at\r
+    least three years, to give the same user the materials\r
+    specified in Subsection 6a, above, for a charge no more\r
+    than the cost of performing this distribution.\r
+\r
+    d) If distribution of the work is made by offering access to copy\r
+    from a designated place, offer equivalent access to copy the above\r
+    specified materials from the same place.\r
+\r
+    e) Verify that the user has already received a copy of these\r
+    materials or that you have already sent this user a copy.\r
+\r
+  For an executable, the required form of the "work that uses the\r
+Library" must include any data and utility programs needed for\r
+reproducing the executable from it.  However, as a special exception,\r
+the materials to be distributed need not include anything that is\r
+normally distributed (in either source or binary form) with the major\r
+components (compiler, kernel, and so on) of the operating system on\r
+which the executable runs, unless that component itself accompanies\r
+the executable.\r
+\r
+  It may happen that this requirement contradicts the license\r
+restrictions of other proprietary libraries that do not normally\r
+accompany the operating system.  Such a contradiction means you cannot\r
+use both them and the Library together in an executable that you\r
+distribute.\r
+\r
+  7. You may place library facilities that are a work based on the\r
+Library side-by-side in a single library together with other library\r
+facilities not covered by this License, and distribute such a combined\r
+library, provided that the separate distribution of the work based on\r
+the Library and of the other library facilities is otherwise\r
+permitted, and provided that you do these two things:\r
+\r
+    a) Accompany the combined library with a copy of the same work\r
+    based on the Library, uncombined with any other library\r
+    facilities.  This must be distributed under the terms of the\r
+    Sections above.\r
+\r
+    b) Give prominent notice with the combined library of the fact\r
+    that part of it is a work based on the Library, and explaining\r
+    where to find the accompanying uncombined form of the same work.\r
+\r
+  8. You may not copy, modify, sublicense, link with, or distribute\r
+the Library except as expressly provided under this License.  Any\r
+attempt otherwise to copy, modify, sublicense, link with, or\r
+distribute the Library is void, and will automatically terminate your\r
+rights under this License.  However, parties who have received copies,\r
+or rights, from you under this License will not have their licenses\r
+terminated so long as such parties remain in full compliance.\r
+\r
+  9. You are not required to accept this License, since you have not\r
+signed it.  However, nothing else grants you permission to modify or\r
+distribute the Library or its derivative works.  These actions are\r
+prohibited by law if you do not accept this License.  Therefore, by\r
+modifying or distributing the Library (or any work based on the\r
+Library), you indicate your acceptance of this License to do so, and\r
+all its terms and conditions for copying, distributing or modifying\r
+the Library or works based on it.\r
+\r
+  10. Each time you redistribute the Library (or any work based on the\r
+Library), the recipient automatically receives a license from the\r
+original licensor to copy, distribute, link with or modify the Library\r
+subject to these terms and conditions.  You may not impose any further\r
+restrictions on the recipients' exercise of the rights granted herein.\r
+You are not responsible for enforcing compliance by third parties with\r
+this License.\r
+\r
+  11. If, as a consequence of a court judgment or allegation of patent\r
+infringement or for any other reason (not limited to patent issues),\r
+conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License.  If you cannot\r
+distribute so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you\r
+may not distribute the Library at all.  For example, if a patent\r
+license would not permit royalty-free redistribution of the Library by\r
+all those who receive copies directly or indirectly through you, then\r
+the only way you could satisfy both it and this License would be to\r
+refrain entirely from distribution of the Library.\r
+\r
+If any portion of this section is held invalid or unenforceable under any\r
+particular circumstance, the balance of the section is intended to apply,\r
+and the section as a whole is intended to apply in other circumstances.\r
+\r
+It is not the purpose of this section to induce you to infringe any\r
+patents or other property right claims or to contest validity of any\r
+such claims; this section has the sole purpose of protecting the\r
+integrity of the free software distribution system which is\r
+implemented by public license practices.  Many people have made\r
+generous contributions to the wide range of software distributed\r
+through that system in reliance on consistent application of that\r
+system; it is up to the author/donor to decide if he or she is willing\r
+to distribute software through any other system and a licensee cannot\r
+impose that choice.\r
+\r
+This section is intended to make thoroughly clear what is believed to\r
+be a consequence of the rest of this License.\r
+\r
+  12. If the distribution and/or use of the Library is restricted in\r
+certain countries either by patents or by copyrighted interfaces, the\r
+original copyright holder who places the Library under this License may add\r
+an explicit geographical distribution limitation excluding those countries,\r
+so that distribution is permitted only in or among countries not thus\r
+excluded.  In such case, this License incorporates the limitation as if\r
+written in the body of this License.\r
+\r
+  13. The Free Software Foundation may publish revised and/or new\r
+versions of the Lesser General Public License from time to time.\r
+Such new versions will be similar in spirit to the present version,\r
+but may differ in detail to address new problems or concerns.\r
+\r
+Each version is given a distinguishing version number.  If the Library\r
+specifies a version number of this License which applies to it and\r
+"any later version", you have the option of following the terms and\r
+conditions either of that version or of any later version published by\r
+the Free Software Foundation.  If the Library does not specify a\r
+license version number, you may choose any version ever published by\r
+the Free Software Foundation.\r
+\r
+  14. If you wish to incorporate parts of the Library into other free\r
+programs whose distribution conditions are incompatible with these,\r
+write to the author to ask for permission.  For software which is\r
+copyrighted by the Free Software Foundation, write to the Free\r
+Software Foundation; we sometimes make exceptions for this.  Our\r
+decision will be guided by the two goals of preserving the free status\r
+of all derivatives of our free software and of promoting the sharing\r
+and reuse of software generally.\r
+\r
+                           NO WARRANTY\r
+\r
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\r
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\r
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\r
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY\r
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\r
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\r
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r
+\r
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\r
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\r
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\r
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\r
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\r
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\r
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\r
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\r
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\r
+DAMAGES.\r
+\r
+                    END OF TERMS AND CONDITIONS\r
+\r
+\r
+Appendix C: The MPL License\r
+===========================\r
+\r
+                          MOZILLA PUBLIC LICENSE\r
+                                Version 1.1\r
+\r
+                              ---------------\r
+\r
+1. Definitions.\r
+\r
+     1.0.1. "Commercial Use" means distribution or otherwise making the\r
+     Covered Code available to a third party.\r
+\r
+     1.1. "Contributor" means each entity that creates or contributes to\r
+     the creation of Modifications.\r
+\r
+     1.2. "Contributor Version" means the combination of the Original\r
+     Code, prior Modifications used by a Contributor, and the Modifications\r
+     made by that particular Contributor.\r
+\r
+     1.3. "Covered Code" means the Original Code or Modifications or the\r
+     combination of the Original Code and Modifications, in each case\r
+     including portions thereof.\r
+\r
+     1.4. "Electronic Distribution Mechanism" means a mechanism generally\r
+     accepted in the software development community for the electronic\r
+     transfer of data.\r
+\r
+     1.5. "Executable" means Covered Code in any form other than Source\r
+     Code.\r
+\r
+     1.6. "Initial Developer" means the individual or entity identified\r
+     as the Initial Developer in the Source Code notice required by Exhibit\r
+     A.\r
+\r
+     1.7. "Larger Work" means a work which combines Covered Code or\r
+     portions thereof with code not governed by the terms of this License.\r
+\r
+     1.8. "License" means this document.\r
+\r
+     1.8.1. "Licensable" means having the right to grant, to the maximum\r
+     extent possible, whether at the time of the initial grant or\r
+     subsequently acquired, any and all of the rights conveyed herein.\r
+\r
+     1.9. "Modifications" means any addition to or deletion from the\r
+     substance or structure of either the Original Code or any previous\r
+     Modifications. When Covered Code is released as a series of files, a\r
+     Modification is:\r
+          A. Any addition to or deletion from the contents of a file\r
+          containing Original Code or previous Modifications.\r
+\r
+          B. Any new file that contains any part of the Original Code or\r
+          previous Modifications.\r
+\r
+     1.10. "Original Code" means Source Code of computer software code\r
+     which is described in the Source Code notice required by Exhibit A as\r
+     Original Code, and which, at the time of its release under this\r
+     License is not already Covered Code governed by this License.\r
+\r
+     1.10.1. "Patent Claims" means any patent claim(s), now owned or\r
+     hereafter acquired, including without limitation,  method, process,\r
+     and apparatus claims, in any patent Licensable by grantor.\r
+\r
+     1.11. "Source Code" means the preferred form of the Covered Code for\r
+     making modifications to it, including all modules it contains, plus\r
+     any associated interface definition files, scripts used to control\r
+     compilation and installation of an Executable, or source code\r
+     differential comparisons against either the Original Code or another\r
+     well known, available Covered Code of the Contributor's choice. The\r
+     Source Code can be in a compressed or archival form, provided the\r
+     appropriate decompression or de-archiving software is widely available\r
+     for no charge.\r
+\r
+     1.12. "You" (or "Your")  means an individual or a legal entity\r
+     exercising rights under, and complying with all of the terms of, this\r
+     License or a future version of this License issued under Section 6.1.\r
+     For legal entities, "You" includes any entity which controls, is\r
+     controlled by, or is under common control with You. For purposes of\r
+     this definition, "control" means (a) the power, direct or indirect,\r
+     to cause the direction or management of such entity, whether by\r
+     contract or otherwise, or (b) ownership of more than fifty percent\r
+     (50%) of the outstanding shares or beneficial ownership of such\r
+     entity.\r
+\r
+2. Source Code License.\r
+\r
+     2.1. The Initial Developer Grant.\r
+     The Initial Developer hereby grants You a world-wide, royalty-free,\r
+     non-exclusive license, subject to third party intellectual property\r
+     claims:\r
+          (a)  under intellectual property rights (other than patent or\r
+          trademark) Licensable by Initial Developer to use, reproduce,\r
+          modify, display, perform, sublicense and distribute the Original\r
+          Code (or portions thereof) with or without Modifications, and/or\r
+          as part of a Larger Work; and\r
+\r
+          (b) under Patents Claims infringed by the making, using or\r
+          selling of Original Code, to make, have made, use, practice,\r
+          sell, and offer for sale, and/or otherwise dispose of the\r
+          Original Code (or portions thereof).\r
+\r
+          (c) the licenses granted in this Section 2.1(a) and (b) are\r
+          effective on the date Initial Developer first distributes\r
+          Original Code under the terms of this License.\r
+\r
+          (d) Notwithstanding Section 2.1(b) above, no patent license is\r
+          granted: 1) for code that You delete from the Original Code; 2)\r
+          separate from the Original Code;  or 3) for infringements caused\r
+          by: i) the modification of the Original Code or ii) the\r
+          combination of the Original Code with other software or devices.\r
+\r
+     2.2. Contributor Grant.\r
+     Subject to third party intellectual property claims, each Contributor\r
+     hereby grants You a world-wide, royalty-free, non-exclusive license\r
+\r
+          (a)  under intellectual property rights (other than patent or\r
+          trademark) Licensable by Contributor, to use, reproduce, modify,\r
+          display, perform, sublicense and distribute the Modifications\r
+          created by such Contributor (or portions thereof) either on an\r
+          unmodified basis, with other Modifications, as Covered Code\r
+          and/or as part of a Larger Work; and\r
+\r
+          (b) under Patent Claims infringed by the making, using, or\r
+          selling of  Modifications made by that Contributor either alone\r
+          and/or in combination with its Contributor Version (or portions\r
+          of such combination), to make, use, sell, offer for sale, have\r
+          made, and/or otherwise dispose of: 1) Modifications made by that\r
+          Contributor (or portions thereof); and 2) the combination of\r
+          Modifications made by that Contributor with its Contributor\r
+          Version (or portions of such combination).\r
+\r
+          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are\r
+          effective on the date Contributor first makes Commercial Use of\r
+          the Covered Code.\r
+\r
+          (d)    Notwithstanding Section 2.2(b) above, no patent license is\r
+          granted: 1) for any code that Contributor has deleted from the\r
+          Contributor Version; 2)  separate from the Contributor Version;\r
+          3)  for infringements caused by: i) third party modifications of\r
+          Contributor Version or ii)  the combination of Modifications made\r
+          by that Contributor with other software  (except as part of the\r
+          Contributor Version) or other devices; or 4) under Patent Claims\r
+          infringed by Covered Code in the absence of Modifications made by\r
+          that Contributor.\r
+\r
+3. Distribution Obligations.\r
+\r
+     3.1. Application of License.\r
+     The Modifications which You create or to which You contribute are\r
+     governed by the terms of this License, including without limitation\r
+     Section 2.2. The Source Code version of Covered Code may be\r
+     distributed only under the terms of this License or a future version\r
+     of this License released under Section 6.1, and You must include a\r
+     copy of this License with every copy of the Source Code You\r
+     distribute. You may not offer or impose any terms on any Source Code\r
+     version that alters or restricts the applicable version of this\r
+     License or the recipients' rights hereunder. However, You may include\r
+     an additional document offering the additional rights described in\r
+     Section 3.5.\r
+\r
+     3.2. Availability of Source Code.\r
+     Any Modification which You create or to which You contribute must be\r
+     made available in Source Code form under the terms of this License\r
+     either on the same media as an Executable version or via an accepted\r
+     Electronic Distribution Mechanism to anyone to whom you made an\r
+     Executable version available; and if made available via Electronic\r
+     Distribution Mechanism, must remain available for at least twelve (12)\r
+     months after the date it initially became available, or at least six\r
+     (6) months after a subsequent version of that particular Modification\r
+     has been made available to such recipients. You are responsible for\r
+     ensuring that the Source Code version remains available even if the\r
+     Electronic Distribution Mechanism is maintained by a third party.\r
+\r
+     3.3. Description of Modifications.\r
+     You must cause all Covered Code to which You contribute to contain a\r
+     file documenting the changes You made to create that Covered Code and\r
+     the date of any change. You must include a prominent statement that\r
+     the Modification is derived, directly or indirectly, from Original\r
+     Code provided by the Initial Developer and including the name of the\r
+     Initial Developer in (a) the Source Code, and (b) in any notice in an\r
+     Executable version or related documentation in which You describe the\r
+     origin or ownership of the Covered Code.\r
+\r
+     3.4. Intellectual Property Matters\r
+          (a) Third Party Claims.\r
+          If Contributor has knowledge that a license under a third party's\r
+          intellectual property rights is required to exercise the rights\r
+          granted by such Contributor under Sections 2.1 or 2.2,\r
+          Contributor must include a text file with the Source Code\r
+          distribution titled "LEGAL" which describes the claim and the\r
+          party making the claim in sufficient detail that a recipient will\r
+          know whom to contact. If Contributor obtains such knowledge after\r
+          the Modification is made available as described in Section 3.2,\r
+          Contributor shall promptly modify the LEGAL file in all copies\r
+          Contributor makes available thereafter and shall take other steps\r
+          (such as notifying appropriate mailing lists or newsgroups)\r
+          reasonably calculated to inform those who received the Covered\r
+          Code that new knowledge has been obtained.\r
+\r
+          (b) Contributor APIs.\r
+          If Contributor's Modifications include an application programming\r
+          interface and Contributor has knowledge of patent licenses which\r
+          are reasonably necessary to implement that API, Contributor must\r
+          also include this information in the LEGAL file.\r
+\r
+               (c)    Representations.\r
+          Contributor represents that, except as disclosed pursuant to\r
+          Section 3.4(a) above, Contributor believes that Contributor's\r
+          Modifications are Contributor's original creation(s) and/or\r
+          Contributor has sufficient rights to grant the rights conveyed by\r
+          this License.\r
+\r
+     3.5. Required Notices.\r
+     You must duplicate the notice in Exhibit A in each file of the Source\r
+     Code.  If it is not possible to put such notice in a particular Source\r
+     Code file due to its structure, then You must include such notice in a\r
+     location (such as a relevant directory) where a user would be likely\r
+     to look for such a notice.  If You created one or more Modification(s)\r
+     You may add your name as a Contributor to the notice described in\r
+     Exhibit A.  You must also duplicate this License in any documentation\r
+     for the Source Code where You describe recipients' rights or ownership\r
+     rights relating to Covered Code.  You may choose to offer, and to\r
+     charge a fee for, warranty, support, indemnity or liability\r
+     obligations to one or more recipients of Covered Code. However, You\r
+     may do so only on Your own behalf, and not on behalf of the Initial\r
+     Developer or any Contributor. You must make it absolutely clear than\r
+     any such warranty, support, indemnity or liability obligation is\r
+     offered by You alone, and You hereby agree to indemnify the Initial\r
+     Developer and every Contributor for any liability incurred by the\r
+     Initial Developer or such Contributor as a result of warranty,\r
+     support, indemnity or liability terms You offer.\r
+\r
+     3.6. Distribution of Executable Versions.\r
+     You may distribute Covered Code in Executable form only if the\r
+     requirements of Section 3.1-3.5 have been met for that Covered Code,\r
+     and if You include a notice stating that the Source Code version of\r
+     the Covered Code is available under the terms of this License,\r
+     including a description of how and where You have fulfilled the\r
+     obligations of Section 3.2. The notice must be conspicuously included\r
+     in any notice in an Executable version, related documentation or\r
+     collateral in which You describe recipients' rights relating to the\r
+     Covered Code. You may distribute the Executable version of Covered\r
+     Code or ownership rights under a license of Your choice, which may\r
+     contain terms different from this License, provided that You are in\r
+     compliance with the terms of this License and that the license for the\r
+     Executable version does not attempt to limit or alter the recipient's\r
+     rights in the Source Code version from the rights set forth in this\r
+     License. If You distribute the Executable version under a different\r
+     license You must make it absolutely clear that any terms which differ\r
+     from this License are offered by You alone, not by the Initial\r
+     Developer or any Contributor. You hereby agree to indemnify the\r
+     Initial Developer and every Contributor for any liability incurred by\r
+     the Initial Developer or such Contributor as a result of any such\r
+     terms You offer.\r
+\r
+     3.7. Larger Works.\r
+     You may create a Larger Work by combining Covered Code with other code\r
+     not governed by the terms of this License and distribute the Larger\r
+     Work as a single product. In such a case, You must make sure the\r
+     requirements of this License are fulfilled for the Covered Code.\r
+\r
+4. Inability to Comply Due to Statute or Regulation.\r
+\r
+     If it is impossible for You to comply with any of the terms of this\r
+     License with respect to some or all of the Covered Code due to\r
+     statute, judicial order, or regulation then You must: (a) comply with\r
+     the terms of this License to the maximum extent possible; and (b)\r
+     describe the limitations and the code they affect. Such description\r
+     must be included in the LEGAL file described in Section 3.4 and must\r
+     be included with all distributions of the Source Code. Except to the\r
+     extent prohibited by statute or regulation, such description must be\r
+     sufficiently detailed for a recipient of ordinary skill to be able to\r
+     understand it.\r
+\r
+5. Application of this License.\r
+\r
+     This License applies to code to which the Initial Developer has\r
+     attached the notice in Exhibit A and to related Covered Code.\r
+\r
+6. Versions of the License.\r
+\r
+     6.1. New Versions.\r
+     Netscape Communications Corporation ("Netscape") may publish revised\r
+     and/or new versions of the License from time to time. Each version\r
+     will be given a distinguishing version number.\r
+\r
+     6.2. Effect of New Versions.\r
+     Once Covered Code has been published under a particular version of the\r
+     License, You may always continue to use it under the terms of that\r
+     version. You may also choose to use such Covered Code under the terms\r
+     of any subsequent version of the License published by Netscape. No one\r
+     other than Netscape has the right to modify the terms applicable to\r
+     Covered Code created under this License.\r
+\r
+     6.3. Derivative Works.\r
+     If You create or use a modified version of this License (which you may\r
+     only do in order to apply it to code which is not already Covered Code\r
+     governed by this License), You must (a) rename Your license so that\r
+     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",\r
+     "MPL", "NPL" or any confusingly similar phrase do not appear in your\r
+     license (except to note that your license differs from this License)\r
+     and (b) otherwise make it clear that Your version of the license\r
+     contains terms which differ from the Mozilla Public License and\r
+     Netscape Public License. (Filling in the name of the Initial\r
+     Developer, Original Code or Contributor in the notice described in\r
+     Exhibit A shall not of themselves be deemed to be modifications of\r
+     this License.)\r
+\r
+7. DISCLAIMER OF WARRANTY.\r
+\r
+     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,\r
+     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,\r
+     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF\r
+     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.\r
+     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE\r
+     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,\r
+     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE\r
+     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER\r
+     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF\r
+     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.\r
+\r
+8. TERMINATION.\r
+\r
+     8.1.  This License and the rights granted hereunder will terminate\r
+     automatically if You fail to comply with terms herein and fail to cure\r
+     such breach within 30 days of becoming aware of the breach. All\r
+     sublicenses to the Covered Code which are properly granted shall\r
+     survive any termination of this License. Provisions which, by their\r
+     nature, must remain in effect beyond the termination of this License\r
+     shall survive.\r
+\r
+     8.2.  If You initiate litigation by asserting a patent infringement\r
+     claim (excluding declatory judgment actions) against Initial Developer\r
+     or a Contributor (the Initial Developer or Contributor against whom\r
+     You file such action is referred to as "Participant")  alleging that:\r
+\r
+     (a)  such Participant's Contributor Version directly or indirectly\r
+     infringes any patent, then any and all rights granted by such\r
+     Participant to You under Sections 2.1 and/or 2.2 of this License\r
+     shall, upon 60 days notice from Participant terminate prospectively,\r
+     unless if within 60 days after receipt of notice You either: (i)\r
+     agree in writing to pay Participant a mutually agreeable reasonable\r
+     royalty for Your past and future use of Modifications made by such\r
+     Participant, or (ii) withdraw Your litigation claim with respect to\r
+     the Contributor Version against such Participant.  If within 60 days\r
+     of notice, a reasonable royalty and payment arrangement are not\r
+     mutually agreed upon in writing by the parties or the litigation claim\r
+     is not withdrawn, the rights granted by Participant to You under\r
+     Sections 2.1 and/or 2.2 automatically terminate at the expiration of\r
+     the 60 day notice period specified above.\r
+\r
+     (b)  any software, hardware, or device, other than such Participant's\r
+     Contributor Version, directly or indirectly infringes any patent, then\r
+     any rights granted to You by such Participant under Sections 2.1(b)\r
+     and 2.2(b) are revoked effective as of the date You first made, used,\r
+     sold, distributed, or had made, Modifications made by that\r
+     Participant.\r
+\r
+     8.3.  If You assert a patent infringement claim against Participant\r
+     alleging that such Participant's Contributor Version directly or\r
+     indirectly infringes any patent where such claim is resolved (such as\r
+     by license or settlement) prior to the initiation of patent\r
+     infringement litigation, then the reasonable value of the licenses\r
+     granted by such Participant under Sections 2.1 or 2.2 shall be taken\r
+     into account in determining the amount or value of any payment or\r
+     license.\r
+\r
+     8.4.  In the event of termination under Sections 8.1 or 8.2 above,\r
+     all end user license agreements (excluding distributors and resellers)\r
+     which have been validly granted by You or any distributor hereunder\r
+     prior to termination shall survive termination.\r
+\r
+9. LIMITATION OF LIABILITY.\r
+\r
+     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT\r
+     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL\r
+     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,\r
+     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR\r
+     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY\r
+     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,\r
+     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER\r
+     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN\r
+     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF\r
+     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY\r
+     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW\r
+     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE\r
+     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO\r
+     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.\r
+\r
+10. U.S. GOVERNMENT END USERS.\r
+\r
+     The Covered Code is a "commercial item," as that term is defined in\r
+     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer\r
+     software" and "commercial computer software documentation," as such\r
+     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48\r
+     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),\r
+     all U.S. Government End Users acquire Covered Code with only those\r
+     rights set forth herein.\r
+\r
+11. MISCELLANEOUS.\r
+\r
+     This License represents the complete agreement concerning subject\r
+     matter hereof. If any provision of this License is held to be\r
+     unenforceable, such provision shall be reformed only to the extent\r
+     necessary to make it enforceable. This License shall be governed by\r
+     California law provisions (except to the extent applicable law, if\r
+     any, provides otherwise), excluding its conflict-of-law provisions.\r
+     With respect to disputes in which at least one party is a citizen of,\r
+     or an entity chartered or registered to do business in the United\r
+     States of America, any litigation relating to this License shall be\r
+     subject to the jurisdiction of the Federal Courts of the Northern\r
+     District of California, with venue lying in Santa Clara County,\r
+     California, with the losing party responsible for costs, including\r
+     without limitation, court costs and reasonable attorneys' fees and\r
+     expenses. The application of the United Nations Convention on\r
+     Contracts for the International Sale of Goods is expressly excluded.\r
+     Any law or regulation which provides that the language of a contract\r
+     shall be construed against the drafter shall not apply to this\r
+     License.\r
+\r
+12. RESPONSIBILITY FOR CLAIMS.\r
+\r
+     As between Initial Developer and the Contributors, each party is\r
+     responsible for claims and damages arising, directly or indirectly,\r
+     out of its utilization of rights under this License and You agree to\r
+     work with Initial Developer and Contributors to distribute such\r
+     responsibility on an equitable basis. Nothing herein is intended or\r
+     shall be deemed to constitute any admission of liability.\r
+\r
+13. MULTIPLE-LICENSED CODE.\r
+\r
+     Initial Developer may designate portions of the Covered Code as\r
+     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial\r
+     Developer permits you to utilize portions of the Covered Code under\r
+     Your choice of the NPL or the alternative licenses, if any, specified\r
+     by the Initial Developer in the file described in Exhibit A.\r
+\r
+EXHIBIT A -Mozilla Public License.\r
+\r
+     ``The contents of this file are subject to the Mozilla Public License\r
+     Version 1.1 (the "License"); you may not use this file except in\r
+     compliance with the License. You may obtain a copy of the License at\r
+     http://www.mozilla.org/MPL/\r
+\r
+     Software distributed under the License is distributed on an "AS IS"\r
+     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\r
+     License for the specific language governing rights and limitations\r
+     under the License.\r
+\r
+     The Original Code is ______________________________________.\r
+\r
+     The Initial Developer of the Original Code is ________________________.\r
+     Portions created by ______________________ are Copyright (C) ______\r
+     _______________________. All Rights Reserved.\r
+\r
+     Contributor(s): ______________________________________.\r
+\r
+     Alternatively, the contents of this file may be used under the terms\r
+     of the _____ license (the  "[___] License"), in which case the\r
+     provisions of [______] License are applicable instead of those\r
+     above.  If you wish to allow use of your version of this file only\r
+     under the terms of the [____] License and not to allow others to use\r
+     your version of this file under the MPL, indicate your decision by\r
+     deleting  the provisions above and replace  them with the notice and\r
+     other provisions required by the [___] License.  If you do not delete\r
+     the provisions above, a recipient may use your version of this file\r
+     under either the MPL or the [___] License."\r
+\r
+     [NOTE: The text of this Exhibit A may differ slightly from the text of\r
+     the notices in the Source Code files of the Original Code. You should\r
+     use the text of this Exhibit A rather than the text found in the\r
+     Original Code Source Code for Your Modifications.]\r
diff --git a/docs/include/jscripts/infusion/licenses/jQuery-LICENSE.txt b/docs/include/jscripts/infusion/licenses/jQuery-LICENSE.txt
new file mode 100644 (file)
index 0000000..b857d46
--- /dev/null
@@ -0,0 +1,299 @@
+The MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+        GNU GENERAL PUBLIC LICENSE
+           Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+          Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+        GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+          NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
diff --git a/docs/include/jscripts/infusion/licenses/swfobject-LICENSE.txt b/docs/include/jscripts/infusion/licenses/swfobject-LICENSE.txt
new file mode 100644 (file)
index 0000000..bb35985
--- /dev/null
@@ -0,0 +1,4 @@
+SWFObject v2.1 <http://code.google.com/p/swfobject/>
+       Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
+       This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+       
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion/licenses/swfupload-LICENSE.txt b/docs/include/jscripts/infusion/licenses/swfupload-LICENSE.txt
new file mode 100644 (file)
index 0000000..e3b1883
--- /dev/null
@@ -0,0 +1,22 @@
+
+The MIT License
+
+Copyright (c) 2006-2007 Lars Huring, Olov NilzÈn and Mammon Media
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/docs/include/jscripts/infusion_old/InfusionAll.js b/docs/include/jscripts/infusion_old/InfusionAll.js
new file mode 100644 (file)
index 0000000..1497083
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * jQuery JavaScript Library v1.3.2
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
+ * Revision: 6246
+ */
+(function(){var window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context)},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this}if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context)}else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3]){return jQuery().find(selector)}var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret}}else{return jQuery(context).find(selector)}}else{if(jQuery.isFunction(selector)){return jQuery(document).ready(selector)}}if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context}return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(num){return num===undefined?Array.prototype.slice.call(this):this[num]},pushStack:function(elems,name,selector){var ret=jQuery(elems);ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector}else{if(name){ret.selector=this.selector+"."+name+"("+selector+")"}}return ret},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this},each:function(callback,args){return jQuery.each(this,callback,args)},index:function(elem){return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this)},attr:function(name,value,type){var options=name;if(typeof name==="string"){if(value===undefined){return this[0]&&jQuery[type||"attr"](this[0],name)}else{options={};options[name]=value}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name))}})},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined}return this.attr(key,value,"curCSS")},text:function(text){if(typeof text!=="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text))}var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this])}})});return ret},wrapAll:function(html){if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).clone();if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstChild){elem=elem.firstChild}return elem}).append(this)}return this},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html)})},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html)})},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling)})},end:function(){return this.prevObject||jQuery([])},push:[].push,sort:[].sort,splice:[].splice,find:function(selector){if(this.length===1){var ret=this.pushStack([],"find",selector);ret.length=0;jQuery.find(selector,this[0],ret);return ret}else{return this.pushStack(jQuery.unique(jQuery.map(this,function(elem){return jQuery.find(selector,elem)})),"find",selector)}},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML;if(!html){var div=this.ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML}return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(events===true){var orig=this.find("*").andSelf(),i=0;ret.find("*").andSelf().each(function(){if(this.nodeName!==orig[i].nodeName){return }var events=jQuery.data(orig[i],"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data)}}i++})}return ret},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i)})||jQuery.multiFilter(selector,jQuery.grep(this,function(elem){return elem.nodeType===1})),"filter",selector)},closest:function(selector){var pos=jQuery.expr.match.POS.test(selector)?jQuery(selector):null,closer=0;return this.map(function(){var cur=this;while(cur&&cur.ownerDocument){if(pos?pos.index(cur)>-1:jQuery(cur).is(selector)){jQuery.data(cur,"closest",closer);return cur}cur=cur.parentNode;closer++}})},not:function(selector){if(typeof selector==="string"){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true),"not",selector)}else{selector=jQuery.multiFilter(selector,this)}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector})},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector==="string"?jQuery(selector):jQuery.makeArray(selector))))},is:function(selector){return !!selector&&jQuery.multiFilter(selector,this).length>0},hasClass:function(selector){return !!selector&&this.is("."+selector)},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,"option")){return(elem.attributes.value||{}).specified?elem.value:elem.text}if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0){return null}for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery(option).val();if(one){return value}values.push(value)}}return values}return(elem.value||"").replace(/\r/g,"")}return undefined}if(typeof value==="number"){value+=""}return this.each(function(){if(this.nodeType!=1){return }if(jQuery.isArray(value)&&/radio|checkbox/.test(this.type)){this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0)}else{if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0)});if(!values.length){this.selectedIndex=-1}}else{this.value=value}}})},html:function(value){return value===undefined?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(value)},replaceWith:function(value){return this.after(value).remove()},eq:function(i){return this.slice(i,+i+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(args,table,callback){if(this[0]){var fragment=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(args,(this[0].ownerDocument||this[0]),fragment),first=fragment.firstChild;if(first){for(var i=0,l=this.length;i<l;i++){callback.call(root(this[i],first),this.length>1||i>0?fragment.cloneNode(true):fragment)}}if(scripts){jQuery.each(scripts,evalScript)}}return this;function root(elem,cur){return table&&jQuery.nodeName(elem,"table")&&jQuery.nodeName(cur,"tr")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem}}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"})}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"")}if(elem.parentNode){elem.parentNode.removeChild(elem)}}function now(){return +new Date}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2}if(typeof target!=="object"&&!jQuery.isFunction(target)){target={}}if(length==i){target=this;--i}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){var src=target[name],copy=options[name];if(target===copy){continue}if(deep&&copy&&typeof copy==="object"&&!copy.nodeType){target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy)}else{if(copy!==undefined){target[name]=copy}}}}}return target};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{},toString=Object.prototype.toString;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery}return jQuery},isFunction:function(obj){return toString.call(obj)==="[object Function]"},isArray:function(obj){return toString.call(obj)==="[object Array]"},isXMLDoc:function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&jQuery.isXMLDoc(elem.ownerDocument)},globalEval:function(data){if(data&&/\S/.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval){script.appendChild(document.createTextNode(data))}else{script.text=data}head.insertBefore(script,head.firstChild);head.removeChild(script)}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase()},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length===undefined){for(name in object){if(callback.apply(object[name],args)===false){break}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break}}}}else{if(length===undefined){for(name in object){if(callback.call(object[name],name,object[name])===false){break}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}return object},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value)){value=value.call(elem,i)}return typeof value==="number"&&type=="curCSS"&&!exclude.test(name)?value+"px":value},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)){elem.className+=(elem.className?" ":"")+className}})},remove:function(elem,classNames){if(elem.nodeType==1){elem.className=classNames!==undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return !jQuery.className.has(classNames,className)}).join(" "):""}},has:function(elem,className){return elem&&jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name]}callback.call(elem);for(var name in options){elem.style[name]=old[name]}},css:function(elem,name,force,extra){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return }jQuery.each(which,function(){if(!extra){val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0}if(extra==="margin"){val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0}else{val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0}})}if(elem.offsetWidth!==0){getWH()}else{jQuery.swap(elem,props,getWH)}return Math.max(0,Math.round(val))}return jQuery.curCSS(elem,name,force)},curCSS:function(elem,name,force){var ret,style=elem.style;if(name=="opacity"&&!jQuery.support.opacity){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret}if(name.match(/float/i)){name=styleFloat}if(!force&&style&&style[name]){ret=style[name]}else{if(defaultView.getComputedStyle){if(name.match(/float/i)){name="float"}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle){ret=computedStyle.getPropertyValue(name)}if(name=="opacity"&&ret==""){ret="1"}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase()});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft}}}}return ret},clean:function(elems,context,fragment){context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document}if(!fragment&&elems.length===1&&typeof elems[0]==="string"){var match=/^<(\w+)\s*\/?>$/.exec(elems[0]);if(match){return[context.createElement(match[1])]}}var ret=[],scripts=[],div=context.createElement("div");jQuery.each(elems,function(i,elem){if(typeof elem==="number"){elem+=""}if(!elem){return }if(typeof elem==="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">"});var tags=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!jQuery.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--){div=div.lastChild}if(!jQuery.support.tbody){var hasBody=/<tbody/i.test(elem),tbody=!tags.indexOf("<table")&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j])}}}if(!jQuery.support.leadingWhitespace&&/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild)}elem=jQuery.makeArray(div.childNodes)}if(elem.nodeType){ret.push(elem)}else{ret=jQuery.merge(ret,elem)}});if(fragment){for(var i=0;ret[i];i++){if(jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i])}else{if(ret[i].nodeType===1){ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))))}fragment.appendChild(ret[i])}}return scripts}return ret},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&elem.parentNode){elem.parentNode.selectedIndex}if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed"}elem[name]=value}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue}if(name=="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:elem.nodeName.match(/(button|input|object|select|textarea)/i)?0:elem.nodeName.match(/^(a|area)$/i)&&elem.href?0:undefined}return elem[name]}if(!jQuery.support.style&&notxml&&name=="style"){return jQuery.attr(elem.style,"cssText",value)}if(set){elem.setAttribute(name,""+value)}var attr=!jQuery.support.hrefNormalized&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr}if(!jQuery.support.opacity&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+""=="NaN"?"":"alpha(opacity="+value*100+")")}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase()});if(set){elem[name]=value}return elem[name]},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"")},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||typeof array==="string"||jQuery.isFunction(array)||array.setInterval){ret[0]=array}else{while(i){ret[--i]=array[i]}}}return ret},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i}}return -1},merge:function(first,second){var i=0,elem,pos=first.length;if(!jQuery.support.getAll){while((elem=second[i++])!=null){if(elem.nodeType!=8){first[pos++]=elem}}}else{while((elem=second[i++])!=null){first[pos++]=elem}}return first},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i])}}}catch(e){ret=array}return ret},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv!=!callback(elems[i],i)){ret.push(elems[i])}}return ret},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null){ret[ret.length]=value}}return ret.concat.apply([],ret)}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};jQuery.each({parent:function(elem){return elem.parentNode},parents:function(elem){return jQuery.dir(elem,"parentNode")},next:function(elem){return jQuery.nth(elem,2,"nextSibling")},prev:function(elem){return jQuery.nth(elem,2,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string"){ret=jQuery.multiFilter(selector,ret)}return this.pushStack(jQuery.unique(ret),name,selector)}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector);for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems)}return this.pushStack(ret,name,selector)}});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1){this.removeAttribute(name)}},addClass:function(classNames){jQuery.className.add(this,classNames)},removeClass:function(classNames){jQuery.className.remove(this,classNames)},toggleClass:function(classNames,state){if(typeof state!=="boolean"){state=!jQuery.className.has(this,classNames)}jQuery.className[state?"add":"remove"](this,classNames)},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).length){jQuery("*",this).add([this]).each(function(){jQuery.event.remove(this);jQuery.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){jQuery(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments)}});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0}var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id){id=elem[expando]=++uuid}if(name&&!jQuery.cache[id]){jQuery.cache[id]={}}if(data!==undefined){jQuery.cache[id][name]=data}return name?jQuery.cache[id][name]:id},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id]){break}if(!name){jQuery.removeData(elem)}}}else{try{delete elem[expando]}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando)}}delete jQuery.cache[id]}},queue:function(elem,type,data){if(elem){type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!q||jQuery.isArray(data)){q=jQuery.data(elem,type,jQuery.makeArray(data))}else{if(data){q.push(data)}}}return q},dequeue:function(elem,type){var queue=jQuery.queue(elem,type),fn=queue.shift();if(!type||type==="fx"){fn=queue[0]}if(fn!==undefined){fn.call(elem)}}});jQuery.fn.extend({data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key)}return data===undefined&&parts[1]?this.data(parts[0]):data}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value)})}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})},queue:function(type,data){if(typeof type!=="string"){data=type;type="fx"}if(data===undefined){return jQuery.queue(this[0],type)}return this.each(function(){var queue=jQuery.queue(this,type,data);if(type=="fx"&&queue.length==1){queue[0].call(this)}})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})}});
+/*
+ * Sizzle CSS Selector Engine - v0.9.3
+ *  Copyright 2009, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString;var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[]}if(!selector||typeof selector!=="string"){return results}var parts=[],m,set,checkSet,check,mode,extra,prune=true;chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break}}if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context)}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift()}set=posProcess(selector,set)}}}else{var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&context.parentNode?context.parentNode:context,isXML(context));set=Sizzle.filter(ret.expr,ret.set);if(parts.length>0){checkSet=makeArray(set)}else{prune=false}while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur=""}else{pop=parts.pop()}if(pop==null){pop=context}Expr.relative[cur](checkSet,pop,isXML(context))}}if(!checkSet){checkSet=set}if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector)}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet)}else{if(context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i])}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i])}}}}}else{makeArray(checkSet,results)}if(extra){Sizzle(extra,context,results,seed);if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1)}}}}}return results};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set)};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[]}for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.match[type].exec(expr))){var left=RegExp.leftContext;if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break}}}}if(!set){set=context.getElementsByTagName("*")}return{set:set,expr:expr}};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[]}if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true}else{if(match===true){continue}}}if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true}else{curLoop[i]=false}}else{if(pass){result.push(item);anyFound=true}}}}}if(found!==undefined){if(!inplace){curLoop=result}expr=expr.replace(Expr.match[type],"");if(!anyFound){return[]}break}}}if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr}else{break}}old=expr}return curLoop};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href")}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase()}for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part}}if(isPartStrNotTag){Sizzle.filter(part,checkSet,true)}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part}}if(isPartStr){Sizzle.filter(part,checkSet,true)}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML)},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML)}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[]}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i])}}return ret.length===0?null:ret}},TAG:function(match,context){return context.getElementsByTagName(match[1])}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match}for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace){result.push(elem)}}else{if(inplace){curLoop[i]=false}}}}return false},ID:function(match){return match[1].replace(/\\/g,"")},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase()},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0}match[0]=done++;return match},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name]}if(match[2]==="~="){match[4]=" "+match[4]+" "}return match},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop)}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret)}return false}}else{if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true}}return match},POS:function(match){match.unshift(true);return match}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden"},disabled:function(elem){return elem.disabled===true},checked:function(elem){return elem.checked===true},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true},parent:function(elem){return !!elem.firstChild},empty:function(elem){return !elem.firstChild},has:function(elem,i,match){return !!Sizzle(match[3],elem).length},header:function(elem){return/h\d/i.test(elem.nodeName)},text:function(elem){return"text"===elem.type},radio:function(elem){return"radio"===elem.type},checkbox:function(elem){return"checkbox"===elem.type},file:function(elem){return"file"===elem.type},password:function(elem){return"password"===elem.type},submit:function(elem){return"submit"===elem.type},image:function(elem){return"image"===elem.type},reset:function(elem){return"reset"===elem.type},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON"},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName)}},setFilters:{first:function(elem,i){return i===0},last:function(elem,i,match,array){return i===array.length-1},even:function(elem,i){return i%2===0},odd:function(elem,i){return i%2===1},lt:function(elem,i,match){return i<match[3]-0},gt:function(elem,i,match){return i>match[3]-0},nth:function(elem,i,match){return match[3]-0==i},eq:function(elem,i,match){return match[3]-0==i}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array)}else{if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0}else{if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false}}return true}}}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case"only":case"first":while(node=node.previousSibling){if(node.nodeType===1){return false}}if(type=="first"){return true}node=elem;case"last":while(node=node.nextSibling){if(node.nodeType===1){return false}}return true;case"nth":var first=match[2],last=match[3];if(first==1&&last==0){return true}var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count}}parent.sizcache=doneName}var diff=elem.nodeIndex-last;if(first==0){return diff==0}else{return(diff%first==0&&diff/first>=0)}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array)}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results}return array};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array)}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i])}}else{for(var i=0;array[i];i++){ret.push(array[i])}}}return ret}}var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true}return ret}}else{if("sourceIndex" in document.documentElement){sortOrder=function(a,b){var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true}return ret}}else{if(document.createRange){sortOrder=function(a,b){var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.selectNode(a);aRange.collapse(true);bRange.selectNode(b);bRange.collapse(true);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true}return ret}}}}(function(){var form=document.createElement("form"),id="script"+(new Date).getTime();form.innerHTML="<input name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[]}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match}}root.removeChild(form)})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i])}}results=tmp}return results}}div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return }Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra)}catch(e){}}return oldSizzle(query,context,extra,seed)};Sizzle.find=oldSizzle.find;Sizzle.filter=oldSizzle.filter;Sizzle.selectors=oldSizzle.selectors;Sizzle.matches=oldSizzle.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0){return }div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return }Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1])}}})()}function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i}if(elem.nodeName===cur){match=elem;break}elem=elem[dir]}checkSet[i]=match}}}function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i}if(typeof cur!=="string"){if(elem===cur){match=true;break}}else{if(Sizzle.filter(cur,[elem]).length>0){match=elem;break}}}elem=elem[dir]}checkSet[i]=match}}}var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&isXML(elem.ownerDocument)};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"")}selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet)}return Sizzle.filter(later,tmpSet)};jQuery.find=Sizzle;jQuery.filter=Sizzle.filter;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;Sizzle.selectors.filters.hidden=function(elem){return elem.offsetWidth===0||elem.offsetHeight===0};Sizzle.selectors.filters.visible=function(elem){return elem.offsetWidth>0||elem.offsetHeight>0};Sizzle.selectors.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};jQuery.multiFilter=function(expr,elems,not){if(not){expr=":not("+expr+")"}return Sizzle.matches(expr,elems)};jQuery.dir=function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur)}cur=cur[dir]}return matched};jQuery.nth=function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1&&++num==result){break}}return cur};jQuery.sibling=function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem){r.push(n)}}return r};return ;window.Sizzle=Sizzle})();jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return }if(elem.setInterval&&elem!=window){elem=window}if(!handler.guid){handler.guid=this.guid++}if(data!==undefined){var fn=handler;handler=this.proxy(fn);handler.data=data}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(arguments.callee.elem,arguments):undefined});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();handler.type=namespaces.slice().sort().join(".");var handlers=events[type];if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].setup.call(elem,data,namespaces)}if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem,data,namespaces)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false)}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle)}}}}handlers[handler.guid]=handler;jQuery.event.global[type]=true});elem=null},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return }var events=jQuery.data(elem,"events"),ret,index;if(events){if(types===undefined||(typeof types==="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""))}}else{if(types.type){handler=types.handler;types=types.type}jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");if(events[type]){if(handler){delete events[type][handler.guid]}else{for(var handle in events[type]){if(namespace.test(events[type][handle].type)){delete events[type][handle]}}}if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].teardown.call(elem,namespaces)}for(ret in events[type]){break}if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem,namespaces)===false){if(elem.removeEventListener){elem.removeEventListener(type,jQuery.data(elem,"handle"),false)}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"))}}}ret=null;delete events[type]}}})}for(ret in events){break}if(!ret){var handle=jQuery.data(elem,"handle");if(handle){handle.elem=null}jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle")}}},trigger:function(event,data,elem,bubbling){var type=event.type||event;if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true}if(!elem){event.stopPropagation();if(this.global[type]){jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type]){jQuery.event.trigger(event,data,this.handle.elem)}})}}if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event)}event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle){handle.apply(elem,data)}if((!elem[type]||(jQuery.nodeName(elem,"a")&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){event.result=false}if(!bubbling&&elem[type]&&!event.isDefaultPrevented()&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;try{elem[type]()}catch(e){}}this.triggered=false;if(!event.isPropagationStopped()){var parent=elem.parentNode||elem.ownerDocument;if(parent){jQuery.event.trigger(event,data,parent,true)}}},handle:function(event){var all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;var namespaces=event.type.split(".");event.type=namespaces.shift();all=!namespaces.length&&!event.exclusive;var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||namespace.test(handler.type)){event.handler=handler;event.data=handler.data;var ret=handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation()}}if(event.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando]){return event}var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop]}if(!event.target){event.target=event.srcElement||document}if(event.target.nodeType==3){event.target=event.target.parentNode}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0)}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)))}return event},proxy:function(fn,proxy){proxy=proxy||function(){return fn.apply(this,arguments)};proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy},special:{ready:{setup:bindReady,teardown:function(){}}},specialAll:{live:{setup:function(selector,namespaces){jQuery.event.add(this,namespaces[0],liveHandler)},teardown:function(namespaces){if(namespaces.length){var remove=0,name=RegExp("(^|\\.)"+namespaces[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type)){remove++}});if(remove<1){jQuery.event.remove(this,namespaces[0],liveHandler)}}}}}};jQuery.Event=function(src){if(!this.preventDefault){return new jQuery.Event(src)}if(src&&src.type){this.originalEvent=src;this.type=src.type}else{this.type=src}this.timeStamp=now();this[expando]=true};function returnFalse(){return false}function returnTrue(){return true}jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return }if(e.preventDefault){e.preventDefault()}e.returnValue=false},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return }if(e.stopPropagation){e.stopPropagation()}e.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation()},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;while(parent&&parent!=this){try{parent=parent.parentNode}catch(e){parent=this}}if(parent!=this){event.type=event.data;jQuery.event.handle.apply(this,arguments)}};jQuery.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(orig,fix){jQuery.event.special[fix]={setup:function(){jQuery.event.add(this,orig,withinElement,fix)},teardown:function(){jQuery.event.remove(this,orig,withinElement)}}});jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data)})},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments)});return this.each(function(){jQuery.event.add(this,type,one,fn&&data)})},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn)})},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result}},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jQuery.event.proxy(fn,args[i++])}return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false}))},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut)},ready:function(fn){bindReady();if(jQuery.isReady){fn.call(document,jQuery)}else{jQuery.readyList.push(fn)}return this},live:function(type,fn){var proxy=jQuery.event.proxy(fn);proxy.guid+=this.selector+type;jQuery(document).bind(liveConvert(type,this.selector),this.selector,proxy);return this},die:function(type,fn){jQuery(document).unbind(liveConvert(type,this.selector),fn?{guid:fn.guid+this.selector+type}:null);return this}});function liveHandler(event){var check=RegExp("(^|\\.)"+event.type+"(\\.|$)"),stop=true,elems=[];jQuery.each(jQuery.data(this,"events").live||[],function(i,fn){if(check.test(fn.type)){var elem=jQuery(event.target).closest(fn.data)[0];if(elem){elems.push({elem:elem,fn:fn})}}});elems.sort(function(a,b){return jQuery.data(a.elem,"closest")-jQuery.data(b.elem,"closest")});jQuery.each(elems,function(){if(this.fn.call(this.elem,event,this.fn.data)===false){return(stop=false)}});return stop}function liveConvert(type,selector){return["live",type,selector.replace(/\./g,"`").replace(/ /g,"|")].join(".")}jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document,jQuery)});jQuery.readyList=null}jQuery(document).triggerHandler("ready")}}});var readyBound=false;function bindReady(){if(readyBound){return }readyBound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);jQuery.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);jQuery.ready()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(jQuery.isReady){return }try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return }jQuery.ready()})()}}}jQuery.event.add(window,"load",jQuery.ready)}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name)}});jQuery(window).bind("unload",function(){for(var id in jQuery.cache){if(id!=1&&jQuery.cache[id].handle){jQuery.event.remove(jQuery.cache[id].handle.elem)}}});(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+(new Date).getTime();div.style.display="none";div.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return }jQuery.support={leadingWhitespace:div.firstChild.nodeType==3,tbody:!div.getElementsByTagName("tbody").length,objectAll:!!div.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"))}catch(e){}root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id]}root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",arguments.callee)});div.cloneNode(true).fireEvent("onclick")}jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display="none"})})();var styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat";jQuery.props={"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!=="string"){return this._load(url)}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off)}var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null}else{if(typeof params==="object"){params=jQuery.param(params);type="POST"}}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified"){self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText)}if(callback){self.each(callback,[res.responseText,status,res])}}});return this},serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val}}):{name:elem.name,value:val}}).get()}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f)}});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type})},getScript:function(url,callback){return jQuery.get(url,null,callback,"script")},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={}}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type})},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data)}if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?"}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?"}}s.dataType="json"}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1")}s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp]}catch(e){}if(head){head.removeChild(script)}}}if(s.dataType=="script"&&s.cache==null){s.cache=false}if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"")}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=location.host)){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();script.onload=script.onreadystatechange=null;head.removeChild(script)}}}head.appendChild(script);return undefined}var requestDone=false;var xhr=s.xhr();if(s.username){xhr.open(type,s.url,s.async,s.username,s.password)}else{xhr.open(type,s.url,s.async)}try{if(s.data){xhr.setRequestHeader("Content-Type",s.contentType)}if(s.ifModified){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default)}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}xhr.abort();return false}if(s.global){jQuery.event.trigger("ajaxSend",[xhr,s])}var onreadystatechange=function(isTimeout){if(xhr.readyState==0){if(ival){clearInterval(ival);ival=null;if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}}else{if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null}status=isTimeout=="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s)}catch(e){status="parsererror"}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes}if(!jsonp){success()}}else{jQuery.handleError(s,xhr,status)}complete();if(isTimeout){xhr.abort()}if(s.async){xhr=null}}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xhr&&!requestDone){onreadystatechange("timeout")}},s.timeout)}}try{xhr.send(s.data)}catch(e){jQuery.handleError(s,xhr,null,e)}if(!s.async){onreadystatechange()}function success(){if(s.success){s.success(data,status)}if(s.global){jQuery.event.trigger("ajaxSuccess",[xhr,s])}}function complete(){if(s.complete){s.complete(xhr,status)}if(s.global){jQuery.event.trigger("ajaxComplete",[xhr,s])}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}return xhr},handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e)}if(s.global){jQuery.event.trigger("ajaxError",[xhr,s,e])}},active:0,httpSuccess:function(xhr){try{return !xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223}catch(e){}return false},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]}catch(e){}return false},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror"}if(s&&s.dataFilter){data=s.dataFilter(data,type)}if(typeof data==="string"){if(type=="script"){jQuery.globalEval(data)}if(type=="json"){data=window.eval("("+data+")")}}return data},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)}if(jQuery.isArray(a)||a.jquery){jQuery.each(a,function(){add(this.name,this.value)})}else{for(var j in a){if(jQuery.isArray(a[j])){jQuery.each(a[j],function(){add(j,this)})}else{add(j,jQuery.isFunction(a[j])?a[j]():a[j])}}}return s.join("&").replace(/%20/g,"+")}});var elemdisplay={},timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type});return obj}jQuery.fn.extend({show:function(speed,callback){if(speed){return this.animate(genFx("show",3),speed,callback)}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var tagName=this[i].tagName,display;if(elemdisplay[tagName]){display=elemdisplay[tagName]}else{var elem=jQuery("<"+tagName+" />").appendTo("body");display=elem.css("display");if(display==="none"){display="block"}elem.remove();elemdisplay[tagName]=display}jQuery.data(this[i],"olddisplay",display)}}for(var i=0,l=this.length;i<l;i++){this[i].style.display=jQuery.data(this[i],"olddisplay")||""}return this}},hide:function(speed,callback){if(speed){return this.animate(genFx("hide",3),speed,callback)}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none"){jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"))}}for(var i=0,l=this.length;i<l;i++){this[i].style.display="none"}return this}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn==null||bool?this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]()}):this.animate(genFx("toggle",3),fn,fn2)},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback)},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType==1&&jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return opt.complete.call(this)}if((p=="height"||p=="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow}}if(opt.overflow!=null){this.style.overflow="hidden"}opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val)){e[val=="toggle"?hidden?"show":"hide":val](prop)}else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit}if(parts[1]){end=((parts[1]=="-="?-1:1)*end)+start}e.custom(start,end,unit)}else{e.custom(start,val,"")}}});return true})},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([])}this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true)}timers.splice(i,1)}}});if(!gotoEnd){this.dequeue()}return this}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback)}});jQuery.extend({speed:function(speed,easing,fn){var opt=typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue()}if(jQuery.isFunction(opt.old)){opt.old.call(this)}};return opt},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={}}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd)}t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1)}}if(!timers.length){clearInterval(timerId);timerId=undefined}},13)}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());jQuery(this.elem).show()},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(gotoEnd){var t=now();if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){jQuery(this.elem).hide()}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p])}}this.options.complete.call(this.elem)}return false}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now)},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null){fx.elem.style[fx.prop]=fx.now+fx.unit}else{fx.elem[fx.prop]=fx.now}}}});if(document.documentElement.getBoundingClientRect){jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0])}var box=this[0].getBoundingClientRect(),doc=this[0].ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left}}}else{jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0])}jQuery.offset.initialized||jQuery.offset.initialize();var elem=this[0],offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView.getComputedStyle(elem,null),top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){computedStyle=defaultView.getComputedStyle(elem,null);top-=elem.scrollTop,left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop,left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.tagName))){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0}prevOffsetParent=offsetParent,offsetParent=elem.offsetParent}if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0}prevComputedStyle=computedStyle}if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop,left+=body.offsetLeft}if(prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop),left+=Math.max(docElem.scrollLeft,body.scrollLeft)}return{top:top,left:left}}}jQuery.offset={initialize:function(){if(this.initialized){return }var body=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,rules,prop,bodyMarginTop=body.style.marginTop,html='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';rules={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(prop in rules){container.style[prop]=rules[prop]}container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild,checkDiv=innerDiv.firstChild,td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);innerDiv.style.overflow="hidden",innerDiv.style.position="relative";this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);body.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(body.offsetTop===0);body.style.marginTop=bodyMarginTop;body.removeChild(container);this.initialized=true},bodyOffset:function(body){jQuery.offset.initialized||jQuery.offset.initialize();var top=body.offsetTop,left=body.offsetLeft;if(jQuery.offset.doesNotIncludeMarginInBodyOffset){top+=parseInt(jQuery.curCSS(body,"marginTop",true),10)||0,left+=parseInt(jQuery.curCSS(body,"marginLeft",true),10)||0}return{top:top,left:left}}};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}return results},offsetParent:function(){var offsetParent=this[0].offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent}return jQuery(offsetParent)}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){if(!this[0]){return null}return val!==undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val}):this[0]==window||this[0]==document?self[i?"pageYOffset":"pageXOffset"]||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method]}});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom",lower=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],lower,false,"padding"):null};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],lower,false,margin?"margin":"border"):null};var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(document.documentElement["client"+name],document.body["scroll"+name],document.documentElement["scroll"+name],document.body["offset"+name],document.documentElement["offset"+name]):size===undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,typeof size==="string"?size:size+"px")}})})();jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]])}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return }for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args)}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(el,a){if($(el).css("overflow")=="hidden"){return false}var scroll=(a&&a=="left")?"scrollLeft":"scrollTop",has=false;if(el[scroll]>0){return true}el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size))},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=="role"?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)))};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""))}):removeAttr.call(this,name))}}$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove")});return _remove.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,"position",1))&&(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!scrollParent.length?$(document):scrollParent}});$.extend($.expr[":"],{data:function(elem,i,match){return !!$.data(elem,match[3])},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,"tabindex");return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"==nodeName||"area"==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)["area"==nodeName?"parents":"closest"](":hidden").length},tabbable:function(element){var tabIndex=$.attr(element,"tabindex");return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(":focusable")}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=="string"?methods.split(/,?\s+/):methods)}var methods=getMethods("getter");if(args.length==1&&typeof args[0]=="string"){methods=methods.concat(getMethods("getterSetter"))}return($.inArray(method,methods)!=-1)}$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=="string"),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=="_"){return this}if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined)}return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options))._init());(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args))})};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+"-"+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind("setData."+name,function(event,key,value){if(event.target==element){return self._setData(key,value)}}).bind("getData."+name,function(event,key){if(event.target==element){return self._getData(key)}}).bind("remove",function(){return self.destroy()})};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter="option"};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key)}options={};options[key]=value}$.each(options,function(key,value){self._setData(key,value)})},_getData:function(key){return this.options[key]},_setData:function(key,value){this.options[key]=value;if(key=="disabled"){this.element[value?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",value)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop]}}this.element.trigger(event,data);return !($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented())}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(event){return self._mouseDown(event)}).bind("click."+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false}});if($.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);($.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return }(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true}}this._mouseMoveDelegate=function(event){return self._mouseMove(event)};this._mouseUpDelegate=function(event){return self._mouseUp(event)};$(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event)}if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault()}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event))}return !this._mouseStarted},_mouseUp:function(event){$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event)}return false},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance)},_mouseDelayMet:function(event){return this.mouseDelayMet},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&parseInt($.browser.version)<=6){s=$.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},s||{});var prop=function(n){return n&&n.constructor==Number?n+"px":n},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(s.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":prop(s.top))+";left:"+(s.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":prop(s.left))+";width:"+(s.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":prop(s.width))+";height:"+(s.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":prop(s.height))+';"/>';return this.each(function(){if($("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(html),this.firstChild)}})}return this};if(!$.browser.version){$.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1]}})(jQuery);(function($){var setDataSwitch={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},uiDialogClasses="ui-dialog ui-widget ui-widget-content ui-corner-all ";$.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var self=this,options=this.options,title=options.title||this.originalTitle||"&nbsp;",titleId=$.ui.dialog.getTitleId(this.element),uiDialog=(this.uiDialog=$("<div/>")).appendTo(document.body).hide().addClass(uiDialogClasses+options.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:options.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(event){(options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&self.close(event))}).attr({role:"dialog","aria-labelledby":titleId}).mousedown(function(event){self.moveToTop(false,event)}),uiDialogContent=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(uiDialog),uiDialogTitlebar=(this.uiDialogTitlebar=$("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(uiDialog),uiDialogTitlebarClose=$('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){uiDialogTitlebarClose.addClass("ui-state-hover")},function(){uiDialogTitlebarClose.removeClass("ui-state-hover")}).focus(function(){uiDialogTitlebarClose.addClass("ui-state-focus")}).blur(function(){uiDialogTitlebarClose.removeClass("ui-state-focus")}).mousedown(function(ev){ev.stopPropagation()}).click(function(event){self.close(event);return false}).appendTo(uiDialogTitlebar),uiDialogTitlebarCloseText=(this.uiDialogTitlebarCloseText=$("<span/>")).addClass("ui-icon ui-icon-closethick").text(options.closeText).appendTo(uiDialogTitlebarClose),uiDialogTitle=$("<span/>").addClass("ui-dialog-title").attr("id",titleId).html(title).prependTo(uiDialogTitlebar);uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();(options.draggable&&$.fn.draggable&&this._makeDraggable());(options.resizable&&$.fn.resizable&&this._makeResizable());this._createButtons(options.buttons);this._isOpen=false;(options.bgiframe&&$.fn.bgiframe&&uiDialog.bgiframe());(options.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(event){var self=this;if(false===self._trigger("beforeclose",event)){return }(self.overlay&&self.overlay.destroy());self.uiDialog.unbind("keypress.ui-dialog");(self.options.hide?self.uiDialog.hide(self.options.hide,function(){self._trigger("close",event)}):self.uiDialog.hide()&&self._trigger("close",event));$.ui.dialog.overlay.resize();self._isOpen=false},isOpen:function(){return this._isOpen},moveToTop:function(force,event){if((this.options.modal&&!force)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",event)}if(this.options.zIndex>$.ui.dialog.maxZ){$.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",$.ui.dialog.overlay.maxZ=++$.ui.dialog.maxZ));var saveScroll={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++$.ui.dialog.maxZ);this.element.attr(saveScroll);this._trigger("focus",event)},open:function(){if(this._isOpen){return }var options=this.options,uiDialog=this.uiDialog;this.overlay=options.modal?new $.ui.dialog.overlay(this):null;(uiDialog.next().length&&uiDialog.appendTo("body"));this._size();this._position(options.position);uiDialog.show(options.show);this.moveToTop(true);(options.modal&&uiDialog.bind("keypress.ui-dialog",function(event){if(event.keyCode!=$.ui.keyCode.TAB){return }var tabbables=$(":tabbable",this),first=tabbables.filter(":first")[0],last=tabbables.filter(":last")[0];if(event.target==last&&!event.shiftKey){setTimeout(function(){first.focus()},1)}else{if(event.target==first&&event.shiftKey){setTimeout(function(){last.focus()},1)}}}));$([]).add(uiDialog.find(".ui-dialog-content :tabbable:first")).add(uiDialog.find(".ui-dialog-buttonpane :tabbable:first")).add(uiDialog).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(buttons){var self=this,hasButtons=false,uiDialogButtonPane=$("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof buttons=="object"&&buttons!==null&&$.each(buttons,function(){return !(hasButtons=true)}));if(hasButtons){$.each(buttons,function(name,fn){$('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(name).click(function(){fn.apply(self.element[0],arguments)}).hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")}).appendTo(uiDialogButtonPane)});uiDialogButtonPane.appendTo(this.uiDialog)}},_makeDraggable:function(){var self=this,options=this.options,heightBeforeDrag;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){heightBeforeDrag=options.height;$(this).height($(this).height()).addClass("ui-dialog-dragging");(options.dragStart&&options.dragStart.apply(self.element[0],arguments))},drag:function(){(options.drag&&options.drag.apply(self.element[0],arguments))},stop:function(){$(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);(options.dragStop&&options.dragStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize()}})},_makeResizable:function(handles){handles=(handles===undefined?this.options.resizable:handles);var self=this,options=this.options,resizeHandles=typeof handles=="string"?handles:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:options.minHeight,start:function(){$(this).addClass("ui-dialog-resizing");(options.resizeStart&&options.resizeStart.apply(self.element[0],arguments))},resize:function(){(options.resize&&options.resize.apply(self.element[0],arguments))},handles:resizeHandles,stop:function(){$(this).removeClass("ui-dialog-resizing");options.height=$(this).height();options.width=$(this).width();(options.resizeStop&&options.resizeStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(pos){var wnd=$(window),doc=$(document),pTop=doc.scrollTop(),pLeft=doc.scrollLeft(),minTop=pTop;if($.inArray(pos,["center","top","right","bottom","left"])>=0){pos=[pos=="right"||pos=="left"?pos:"center",pos=="top"||pos=="bottom"?pos:"middle"]}if(pos.constructor!=Array){pos=["center","middle"]}if(pos[0].constructor==Number){pLeft+=pos[0]}else{switch(pos[0]){case"left":pLeft+=0;break;case"right":pLeft+=wnd.width()-this.uiDialog.outerWidth();break;default:case"center":pLeft+=(wnd.width()-this.uiDialog.outerWidth())/2}}if(pos[1].constructor==Number){pTop+=pos[1]}else{switch(pos[1]){case"top":pTop+=0;break;case"bottom":pTop+=wnd.height()-this.uiDialog.outerHeight();break;default:case"middle":pTop+=(wnd.height()-this.uiDialog.outerHeight())/2}}pTop=Math.max(pTop,minTop);this.uiDialog.css({top:pTop,left:pLeft})},_setData:function(key,value){(setDataSwitch[key]&&this.uiDialog.data(setDataSwitch[key],value));switch(key){case"buttons":this._createButtons(value);break;case"closeText":this.uiDialogTitlebarCloseText.text(value);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(uiDialogClasses+value);break;case"draggable":(value?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(value);break;case"position":this._position(value);break;case"resizable":var uiDialog=this.uiDialog,isResizable=this.uiDialog.is(":data(resizable)");(isResizable&&!value&&uiDialog.resizable("destroy"));(isResizable&&typeof value=="string"&&uiDialog.resizable("option","handles",value));(isResizable||this._makeResizable(value));break;case"title":$(".ui-dialog-title",this.uiDialogTitlebar).html(value||"&nbsp;");break;case"width":this.uiDialog.width(value);break}$.widget.prototype._setData.apply(this,arguments)},_size:function(){var options=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var nonContentHeight=this.uiDialog.css({height:"auto",width:options.width}).height();this.element.css({minHeight:Math.max(options.minHeight-nonContentHeight,0),height:options.height=="auto"?"auto":Math.max(options.height-nonContentHeight,0)})}});$.extend($.ui.dialog,{version:"1.7",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function($el){return"ui-dialog-title-"+($el.attr("id")||++this.uuid)},overlay:function(dialog){this.$el=$.ui.dialog.overlay.create(dialog)}});$.extend($.ui.dialog.overlay,{instances:[],maxZ:0,events:$.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(event){return event+".dialog-overlay"}).join(" "),create:function(dialog){if(this.instances.length===0){setTimeout(function(){$(document).bind($.ui.dialog.overlay.events,function(event){var dialogZ=$(event.target).parents(".ui-dialog").css("zIndex")||0;return(dialogZ>$.ui.dialog.overlay.maxZ)})},1);$(document).bind("keydown.dialog-overlay",function(event){(dialog.options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&dialog.close(event))});$(window).bind("resize.dialog-overlay",$.ui.dialog.overlay.resize)}var $el=$("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(dialog.options.bgiframe&&$.fn.bgiframe&&$el.bgiframe());this.instances.push($el);return $el},destroy:function($el){this.instances.splice($.inArray(this.instances,$el),1);if(this.instances.length===0){$([document,window]).unbind(".dialog-overlay")}$el.remove()},height:function(){if($.browser.msie&&$.browser.version<7){var scrollHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var offsetHeight=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(scrollHeight<offsetHeight){return $(window).height()+"px"}else{return scrollHeight+"px"}}else{return $(document).height()+"px"}},width:function(){if($.browser.msie&&$.browser.version<7){var scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(scrollWidth<offsetWidth){return $(window).width()+"px"}else{return scrollWidth+"px"}}else{return $(document).width()+"px"}},resize:function(){var $overlays=$([]);$.each($.ui.dialog.overlay.instances,function(){$overlays=$overlays.add(this)});$overlays.css({width:0,height:0}).css({width:$.ui.dialog.overlay.width(),height:$.ui.dialog.overlay.height()})}});$.extend($.ui.dialog.overlay.prototype,{destroy:function(){$.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function($){$.widget("ui.draggable",$.extend({},$.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(event);if(!this.handle){return false}return true},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this._cacheHelperProportions();if($.ui.ddmanager){$.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt){this._adjustOffsetFromHelper(o.cursorAt)}if(o.containment){this._setContainment()}this._trigger("start",event);this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(event,true);return true},_mouseDrag:function(event,noPropagation){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();this._trigger("drag",event,ui);this.position=ui.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if($.ui.ddmanager){$.ui.ddmanager.drag(this,event)}return false},_mouseStop:function(event){var dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour){dropped=$.ui.ddmanager.drop(this,event)}if(this.dropped){dropped=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){var self=this;$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){self._trigger("stop",event);self._clear()})}else{this._trigger("stop",event);this._clear()}return false},_getHandle:function(event){var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;$(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==event.target){handle=true}});return handle},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event])):(o.helper=="clone"?this.element.clone():this.element);if(!helper.parents("body").length){helper.appendTo((o.appendTo=="parent"?this.element[0].parentNode:o.appendTo))}if(helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position"))){helper.css("position","absolute")}return helper},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined){this.offset.click.left=obj.left+this.margins.left}if(obj.right!=undefined){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left}if(obj.top!=undefined){this.offset.click.top=obj.top+this.margins.top}if(obj.bottom!=undefined){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&$.browser.msie)){po={top:0,left:0}}return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.element.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var o=this.options;if(o.containment=="parent"){o.containment=this.helper[0].parentNode}if(o.containment=="document"||o.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(o.containment)&&o.containment.constructor!=Array){var ce=$(o.containment)[0];if(!ce){return }var co=$(o.containment).offset();var over=($(ce).css("overflow")!="hidden");this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(o.containment.constructor==Array){this.containment=o.containment}}},_convertPositionTo:function(d,pos){if(!pos){pos=this.position}var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))}},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0]){pageX=this.containment[0]+this.offset.click.left}if(event.pageY-this.offset.click.top<this.containment[1]){pageY=this.containment[1]+this.offset.click.top}if(event.pageX-this.offset.click.left>this.containment[2]){pageX=this.containment[2]+this.offset.click.left}if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top}}if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left}}return{top:(pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(type,event,ui){ui=ui||this._uiHash();$.ui.plugin.call(this,type,[event,ui]);if(type=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return $.widget.prototype._trigger.call(this,type,event,ui)},plugins:{},_uiHash:function(event){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));$.extend($.ui.draggable,{version:"1.7",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui){var inst=$(this).data("draggable"),o=inst.options,uiSortable=$.extend({},ui,{item:inst.element});inst.sortables=[];$(o.connectToSortable).each(function(){var sortable=$.data(this,"sortable");if(sortable&&!sortable.options.disabled){inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable._refreshItems();sortable._trigger("activate",event,uiSortable)}})},stop:function(event,ui){var inst=$(this).data("draggable"),uiSortable=$.extend({},ui,{item:inst.element});$.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(event);this.instance.options.helper=this.instance.options._helper;if(inst.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",event,uiSortable)}})},drag:function(event,ui){var inst=$(this).data("draggable"),self=this;var checkPos=function(o){var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var helperTop=this.positionAbs.top,helperLeft=this.positionAbs.left;var itemHeight=o.height,itemWidth=o.width;var itemTop=o.top,itemLeft=o.left;return $.ui.isOver(helperTop+dyClick,helperLeft+dxClick,itemTop,itemLeft,itemHeight,itemWidth)};$.each(inst.sortables,function(i){this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click=inst.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=$(self).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return ui.helper[0]};event.target=this.instance.currentItem[0];this.instance._mouseCapture(event,true);this.instance._mouseStart(event,true,true);this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst._trigger("toSortable",event);inst.dropped=this.instance.element;inst.currentItem=inst.element;this.instance.fromOutside=inst}if(this.instance.currentItem){this.instance._mouseDrag(event)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",event,this.instance._uiHash(this.instance));this.instance._mouseStop(event,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}inst._trigger("fromSortable",event);inst.dropped=false}}})}});$.ui.plugin.add("draggable","cursor",{start:function(event,ui){var t=$("body"),o=$(this).data("draggable").options;if(t.css("cursor")){o._cursor=t.css("cursor")}t.css("cursor",o.cursor)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._cursor){$("body").css("cursor",o._cursor)}}});$.ui.plugin.add("draggable","iframeFix",{start:function(event,ui){var o=$(this).data("draggable").options;$(o.iframeFix===true?"iframe":o.iframeFix).each(function(){$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body")})},stop:function(event,ui){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});$.ui.plugin.add("draggable","opacity",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("opacity")){o._opacity=t.css("opacity")}t.css("opacity",o.opacity)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._opacity){$(ui.helper).css("opacity",o._opacity)}}});$.ui.plugin.add("draggable","scroll",{start:function(event,ui){var i=$(this).data("draggable");if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){i.overflowOffset=i.scrollParent.offset()}},drag:function(event,ui){var i=$(this).data("draggable"),o=i.options,scrolled=false;if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){if(!o.axis||o.axis!="x"){if((i.overflowOffset.top+i.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop+o.scrollSpeed}else{if(event.pageY-i.overflowOffset.top<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop-o.scrollSpeed}}}if(!o.axis||o.axis!="y"){if((i.overflowOffset.left+i.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft+o.scrollSpeed}else{if(event.pageX-i.overflowOffset.left<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft-o.scrollSpeed}}}}else{if(!o.axis||o.axis!="x"){if(event.pageY-$(document).scrollTop()<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed)}else{if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed)}}}if(!o.axis||o.axis!="y"){if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed)}else{if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed)}}}}if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(i,event)}}});$.ui.plugin.add("draggable","snap",{start:function(event,ui){var i=$(this).data("draggable"),o=i.options;i.snapElements=[];$(o.snap.constructor!=String?(o.snap.items||":data(draggable)"):o.snap).each(function(){var $t=$(this);var $o=$t.offset();if(this!=i.element[0]){i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left})}})},drag:function(event,ui){var inst=$(this).data("draggable"),o=inst.options;var d=o.snapTolerance;var x1=ui.offset.left,x2=x1+inst.helperProportions.width,y1=ui.offset.top,y2=y1+inst.helperProportions.height;for(var i=inst.snapElements.length-1;i>=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d)||(l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d)||(l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d)||(l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d))){if(inst.snapElements[i].snapping){(inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})))}inst.snapElements[i].snapping=false;continue}if(o.snapMode!="inner"){var ts=Math.abs(t-y2)<=d;var bs=Math.abs(b-y1)<=d;var ls=Math.abs(l-x2)<=d;var rs=Math.abs(r-x1)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top-inst.margins.top}if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top-inst.margins.top}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left-inst.margins.left}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r}).left-inst.margins.left}}var first=(ts||bs||ls||rs);if(o.snapMode!="outer"){var ts=Math.abs(t-y1)<=d;var bs=Math.abs(b-y2)<=d;var ls=Math.abs(l-x1)<=d;var rs=Math.abs(r-x2)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top-inst.margins.top}if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top-inst.margins.top}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left-inst.margins.left}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left-inst.margins.left}}if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first)){(inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})))}inst.snapElements[i].snapping=(ts||bs||ls||rs||first)}}});$.ui.plugin.add("draggable","stack",{start:function(event,ui){var o=$(this).data("draggable").options;var group=$.makeArray($(o.stack.group)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||o.stack.min)-(parseInt($(b).css("zIndex"),10)||o.stack.min)});$(group).each(function(i){this.style.zIndex=o.stack.min+i});this[0].style.zIndex=o.stack.min+group.length}});$.ui.plugin.add("draggable","zIndex",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("zIndex")){o._zIndex=t.css("zIndex")}t.css("zIndex",o.zIndex)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._zIndex){$(ui.helper).css("zIndex",o._zIndex)}}})})(jQuery);(function($){$.widget("ui.accordion",{_init:function(){var o=this.options,self=this;this.running=0;if(o.collapsible==$.ui.accordion.defaults.collapsible&&o.alwaysOpen!=$.ui.accordion.defaults.alwaysOpen){o.collapsible=!o.alwaysOpen}if(o.navigation){var current=this.element.find("a").filter(o.navigationFilter);if(current.length){if(current.filter(o.header).length){this.active=current}else{this.active=current.parent().parent().prev();current.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){$(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){$(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){$(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){$(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||o.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");$("<span/>").addClass("ui-icon "+o.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected);if($.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(event){return self._keydown(event)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!$.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(o.event){this.headers.bind((o.event)+".accordion",function(event){return self._clickHandler.call(self,event,this)})}},destroy:function(){var o=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var contents=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(o.autoHeight||o.fillHeight){contents.css("height","")}},_setData:function(key,value){if(key=="alwaysOpen"){key="collapsible";value=!value}$.widget.prototype._setData.apply(this,arguments)},_keydown:function(event){var o=this.options,keyCode=$.ui.keyCode;if(o.disabled||event.altKey||event.ctrlKey){return }var length=this.headers.length;var currentIndex=this.headers.index(event.target);var toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:return this._clickHandler({target:event.target},event.target)}if(toFocus){$(event.target).attr("tabIndex","-1");$(toFocus).attr("tabIndex","0");toFocus.focus();return false}return true},resize:function(){var o=this.options,maxHeight;if(o.fillSpace){if($.browser.msie){var defOverflow=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}maxHeight=this.element.parent().height();if($.browser.msie){this.element.parent().css("overflow",defOverflow)}this.headers.each(function(){maxHeight-=$(this).outerHeight()});var maxPadding=0;this.headers.next().each(function(){maxPadding=Math.max(maxPadding,$(this).innerHeight()-$(this).height())}).height(Math.max(0,maxHeight-maxPadding)).css("overflow","auto")}else{if(o.autoHeight){maxHeight=0;this.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).outerHeight())}).height(maxHeight)}}},activate:function(index){var active=this._findActive(index)[0];this._clickHandler({target:active},active)},_findActive:function(selector){return selector?typeof selector=="number"?this.headers.filter(":eq("+selector+")"):this.headers.not(this.headers.not(selector)):selector===false?$([]):this.headers.filter(":eq(0)")},_clickHandler:function(event,target){var o=this.options;if(o.disabled){return false}if(!event.target&&o.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");var toHide=this.active.next(),data={options:o,newHeader:$([]),oldHeader:o.active,newContent:$([]),oldContent:toHide},toShow=(this.active=$([]));this._toggle(toShow,toHide,data);return false}var clicked=$(event.currentTarget||target);var clickedIsActive=clicked[0]==this.active[0];if(this.running||(!o.collapsible&&clickedIsActive)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!clickedIsActive){clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected);clicked.next().addClass("ui-accordion-content-active")}var toShow=clicked.next(),toHide=this.active.next(),data={options:o,newHeader:clickedIsActive&&o.collapsible?$([]):clicked,oldHeader:this.active,newContent:clickedIsActive&&o.collapsible?$([]):toShow.find("> *"),oldContent:toHide.find("> *")},down=this.headers.index(this.active[0])>this.headers.index(clicked[0]);this.active=clickedIsActive?$([]):clicked;this._toggle(toShow,toHide,data,clickedIsActive,down);return false},_toggle:function(toShow,toHide,data,clickedIsActive,down){var o=this.options,self=this;this.toShow=toShow;this.toHide=toHide;this.data=data;var complete=function(){if(!self){return }return self._completed.apply(self,arguments)};this._trigger("changestart",null,this.data);this.running=toHide.size()===0?toShow.size():toHide.size();if(o.animated){var animOptions={};if(o.collapsible&&clickedIsActive){animOptions={toShow:$([]),toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace}}else{animOptions={toShow:toShow,toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace}}if(!o.proxied){o.proxied=o.animated}if(!o.proxiedDuration){o.proxiedDuration=o.duration}o.animated=$.isFunction(o.proxied)?o.proxied(animOptions):o.proxied;o.duration=$.isFunction(o.proxiedDuration)?o.proxiedDuration(animOptions):o.proxiedDuration;var animations=$.ui.accordion.animations,duration=o.duration,easing=o.animated;if(!animations[easing]){animations[easing]=function(options){this.slide(options,{easing:easing,duration:duration||700})}}animations[easing](animOptions)}else{if(o.collapsible&&clickedIsActive){toShow.toggle()}else{toHide.hide();toShow.show()}complete(true)}toHide.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();toShow.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(cancel){var o=this.options;this.running=cancel?0:--this.running;if(this.running){return }if(o.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});$.extend($.ui.accordion,{version:"1.7",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return }if(!options.toShow.size()){options.toHide.animate({height:"hide"},options);return }var overflow=options.toShow.css("overflow"),percentDone,showProps={},hideProps={},fxAttrs=["height","paddingTop","paddingBottom"],originalWidth;var s=options.toShow;originalWidth=s[0].style.width;s.width(parseInt(s.parent().width(),10)-parseInt(s.css("paddingLeft"),10)-parseInt(s.css("paddingRight"),10)-parseInt(s.css("borderLeftWidth"),10)-parseInt(s.css("borderRightWidth"),10));$.each(fxAttrs,function(i,prop){hideProps[prop]="hide";var parts=(""+$.css(options.toShow[0],prop)).match(/^([\d+-.]+)(.*)$/);showProps[prop]={value:parts[1],unit:parts[2]||"px"}});options.toShow.css({height:0,overflow:"hidden"}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{step:function(now,settings){if(settings.prop=="height"){percentDone=(settings.now-settings.start)/(settings.end-settings.start)}options.toShow[0].style[settings.prop]=(percentDone*showProps[settings.prop].value)+showProps[settings.prop].unit},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoHeight){options.toShow.css("height","")}options.toShow.css("width",originalWidth);options.toShow.css({overflow:overflow});options.complete()}})},bounceslide:function(options){this.slide(options,{easing:options.down?"easeOutBounce":"swing",duration:options.down?1000:200})},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700})}}})})(jQuery);(function($){$.widget("ui.slider",$.extend({},$.ui.mouse,{_init:function(){var self=this,o=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=$([]);if(o.range){if(o.range===true){this.range=$("<div></div>");if(!o.values){o.values=[this._valueMin(),this._valueMin()]}if(o.values.length&&o.values.length!=2){o.values=[o.values[0],o.values[0]]}}else{this.range=$("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(o.range=="min"||o.range=="max"){this.range.addClass("ui-slider-range-"+o.range)}this.range.addClass("ui-widget-header")}if($(".ui-slider-handle",this.element).length==0){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(o.values&&o.values.length){while($(".ui-slider-handle",this.element).length<o.values.length){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=$(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(event){event.preventDefault()}).hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(".ui-slider .ui-state-focus").removeClass("ui-state-focus");$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")});this.handles.each(function(i){$(this).data("index.ui-slider-handle",i)});this.handles.keydown(function(event){var ret=true;var index=$(this).data("index.ui-slider-handle");if(self.options.disabled){return }switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:ret=false;if(!self._keySliding){self._keySliding=true;$(this).addClass("ui-state-active");self._start(event,index)}break}var curVal,newVal,step=self._step();if(self.options.values&&self.options.values.length){curVal=newVal=self.values(index)}else{curVal=newVal=self.value()}switch(event.keyCode){case $.ui.keyCode.HOME:newVal=self._valueMin();break;case $.ui.keyCode.END:newVal=self._valueMax();break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal==self._valueMax()){return }newVal=curVal+step;break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal==self._valueMin()){return }newVal=curVal-step;break}self._slide(event,index,newVal);return ret}).keyup(function(event){var index=$(this).data("index.ui-slider-handle");if(self._keySliding){self._stop(event,index);self._change(event,index);self._keySliding=false;$(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(o.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);var distance=this._valueMax()+1,closestHandle;var self=this,index;this.handles.each(function(i){var thisDistance=Math.abs(normValue-self.values(i));if(distance>thisDistance){distance=thisDistance;closestHandle=$(this);index=i}});if(o.range==true&&this.values(1)==o.min){closestHandle=$(this.handles[++index])}this._start(event,index);self._handleIndex=index;closestHandle.addClass("ui-state-active").focus();var offset=closestHandle.offset();var mouseOverHandle=!$(event.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top-(closestHandle.height()/2)-(parseInt(closestHandle.css("borderTopWidth"),10)||0)-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+(parseInt(closestHandle.css("marginTop"),10)||0)};normValue=this._normValueFromMouse(position);this._slide(event,index,normValue);return true},_mouseStart:function(event){return true},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false},_mouseStop:function(event){this.handles.removeClass("ui-state-active");this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(position){var pixelTotal,pixelMouse;if("horizontal"==this.orientation){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1){percentMouse=1}if(percentMouse<0){percentMouse=0}if("vertical"==this.orientation){percentMouse=1-percentMouse}var valueTotal=this._valueMax()-this._valueMin(),valueMouse=percentMouse*valueTotal,valueMouseModStep=valueMouse%this.options.step,normValue=this._valueMin()+valueMouse-valueMouseModStep;if(valueMouseModStep>(this.options.step/2)){normValue+=this.options.step}return parseFloat(normValue.toFixed(5))},_start:function(event,index){this._trigger("start",event,this._uiHash(index))},_slide:function(event,index,newVal){var handle=this.handles[index];if(this.options.values&&this.options.values.length){var otherVal=this.values(index?0:1);if((index==0&&newVal>=otherVal)||(index==1&&newVal<=otherVal)){newVal=otherVal}if(newVal!=this.values(index)){var newValues=this.values();newValues[index]=newVal;var allowed=this._trigger("slide",event,this._uiHash(index,newVal,newValues));var otherVal=this.values(index?0:1);if(allowed!==false){this.values(index,newVal,(event.type=="mousedown"&&this.options.animate),true)}}}else{if(newVal!=this.value()){var allowed=this._trigger("slide",event,this._uiHash(index,newVal));if(allowed!==false){this._setData("value",newVal,(event.type=="mousedown"&&this.options.animate))}}}},_stop:function(event,index){this._trigger("stop",event,this._uiHash(index))},_change:function(event,index){this._trigger("change",event,this._uiHash(index))},value:function(newValue){if(arguments.length){this._setData("value",newValue);this._change(null,0)}return this._value()},values:function(index,newValue,animated,noPropagation){if(arguments.length>1){this.options.values[index]=newValue;this._refreshValue(animated);if(!noPropagation){this._change(null,index)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(index)}else{return this.value()}}else{return this._values()}},_setData:function(key,value,animated){$.widget.prototype._setData.apply(this,arguments);switch(key){case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(animated);break;case"value":this._refreshValue(animated);break}},_step:function(){var step=this.options.step;return step},_value:function(){var val=this.options.value;if(val<this._valueMin()){val=this._valueMin()}if(val>this._valueMax()){val=this._valueMax()}return val},_values:function(index){if(arguments.length){var val=this.options.values[index];if(val<this._valueMin()){val=this._valueMin()}if(val>this._valueMax()){val=this._valueMax()}return val}else{return this.options.values}},_valueMin:function(){var valueMin=this.options.min;return valueMin},_valueMax:function(){var valueMax=this.options.max;return valueMax},_refreshValue:function(animate){var oRange=this.options.range,o=this.options,self=this;if(this.options.values&&this.options.values.length){var vp0,vp1;this.handles.each(function(i,j){var valPercent=(self.values(i)-self._valueMin())/(self._valueMax()-self._valueMin())*100;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);if(self.options.range===true){if(self.orientation=="horizontal"){(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({width:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}else{(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({bottom:(valPercent)+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({height:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}}lastValPercent=valPercent})}else{var value=this.value(),valueMin=this._valueMin(),valueMax=this._valueMax(),valPercent=valueMax!=valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);(oRange=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="horizontal")&&this.range[animate?"animate":"css"]({width:(100-valPercent)+"%"},{queue:false,duration:o.animate});(oRange=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="vertical")&&this.range[animate?"animate":"css"]({height:(100-valPercent)+"%"},{queue:false,duration:o.animate})}},_uiHash:function(index,value,values){var multiple=this.options.values&&this.options.values.length;return{handle:this.handles[index],value:value||(multiple?this.values(index):this.value()),values:values||(multiple&&this.values())}}}));$.extend($.ui.slider,{getter:"value values",version:"1.7",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);(function($){$.each({focus:"focusin",blur:"focusout"},function(original,fix){$.event.special[fix]={setup:function(){if($.browser.msie){return false}this.addEventListener(original,$.event.special[fix].handler,true)},teardown:function(){if($.browser.msie){return false}this.removeEventListener(original,$.event.special[fix].handler,true)},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments)}}});$.extend($.fn,{delegate:function(type,delegate,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments)}})},triggerEvent:function(type,target){return this.triggerHandler(type,[jQuery.event.fix({type:type,target:target})])}})})(jQuery);var fluid_1_1=fluid_1_1||{};var fluid=fluid||fluid_1_1;(function($,fluid){fluid.version="Infusion 1.1";fluid.fail=function(message){fluid.setLogging(true);fluid.log(message.message?message.message:message);throw new Error(message)};fluid.wrap=function(obj){return((!obj||obj.jquery)?obj:$(obj))};fluid.unwrap=function(obj){return obj&&obj.jquery&&obj.length===1?obj[0]:obj};fluid.keyForValue=function(obj,value){for(var key in obj){if(obj[key]===value){return key}}return null};fluid.findKeyInObject=fluid.keyForValue;fluid.clear=function(target){if(target instanceof Array){target.length=0}else{for(var i in target){delete target[i]}}};fluid.container=function(containerSpec){var container=containerSpec;if(typeof containerSpec==="string"||containerSpec.nodeType&&(containerSpec.nodeType===1||containerSpec.nodeType===9)){container=$(containerSpec)}if(!container||!container.jquery||container.length!==1){if(typeof (containerSpec)!=="string"){containerSpec=container.selector}fluid.fail({name:"NotOne",message:"A single container element was not found for selector "+containerSpec})}return container};var defaultsStore={};var globalDefaultsStore={};fluid.defaults=function(){var offset=0;var store=defaultsStore;if(typeof arguments[0]==="boolean"){store=globalDefaultsStore;offset=1}var componentName=arguments[offset];var defaultsObject=arguments[offset+1];if(defaultsObject!==undefined){store[componentName]=defaultsObject;return defaultsObject}return store[componentName]};fluid.createDomBinder=function(container,selectors){var cache={},that={};function cacheKey(name,thisContainer){return $.data(fluid.unwrap(thisContainer))+"-"+name}function record(name,thisContainer,result){cache[cacheKey(name,thisContainer)]=result}that.locate=function(name,localContainer){var selector,thisContainer,togo;selector=selectors[name];thisContainer=localContainer?localContainer:container;if(!thisContainer){fluid.fail("DOM binder invoked for selector "+name+" without container")}if(!selector){return thisContainer}if(typeof (selector)==="function"){togo=$(selector.call(null,fluid.unwrap(thisContainer)))}else{togo=$(selector,thisContainer)}if(togo.get(0)===document){togo=[]}if(!togo.selector){togo.selector=selector;togo.context=thisContainer}togo.selectorName=name;record(name,thisContainer,togo);return togo};that.fastLocate=function(name,localContainer){var thisContainer=localContainer?localContainer:container;var key=cacheKey(name,thisContainer);var togo=cache[key];return togo?togo:that.locate(name,localContainer)};that.clear=function(){cache={}};that.refresh=function(names,localContainer){var thisContainer=localContainer?localContainer:container;if(typeof names==="string"){names=[names]}if(thisContainer.length===undefined){thisContainer=[thisContainer]}for(var i=0;i<names.length;++i){for(var j=0;j<thisContainer.length;++j){that.locate(names[i],thisContainer[j])}}};return that};fluid.mergeListeners=function(events,listeners){if(listeners){for(var key in listeners){var value=listeners[key];var keydot=key.indexOf(".");var namespace;if(keydot!==-1){namespace=key.substring(keydot+1);key=key.substring(0,keydot)}if(!events[key]){events[key]=fluid.event.getEventFirer()}var firer=events[key];if(typeof (value)==="function"){firer.addListener(value,namespace)}else{if(value&&typeof value.length==="number"){for(var i=0;i<value.length;++i){firer.addListener(value[i],namespace)}}}}}};fluid.instantiateFirers=function(that,options){that.events={};if(options.events){for(var event in options.events){var eventType=options.events[event];that.events[event]=fluid.event.getEventFirer(eventType==="unicast",eventType==="preventable")}}fluid.mergeListeners(that.events,options.listeners)};fluid.mergeComponentOptions=function(that,componentName,userOptions){var defaults=fluid.defaults(componentName);that.options=fluid.merge(defaults?defaults.mergePolicy:null,{},defaults,userOptions)};fluid.expectFilledSelector=function(result,message){if(result&&result.length===0&&result.jquery){fluid.fail(message+': selector "'+result.selector+'" with name '+result.selectorName+" returned no results in context "+fluid.dumpEl(result.context))}};fluid.initView=function(componentName,container,userOptions){var that={};fluid.expectFilledSelector(container,'Error instantiating component with name "'+componentName);fluid.mergeComponentOptions(that,componentName,userOptions);if(container){that.container=fluid.container(container);fluid.initDomBinder(that)}fluid.instantiateFirers(that,that.options);return that};fluid.COMPONENT_OPTIONS={};fluid.VALUE={};fluid.emptySubcomponent=function(options){var that={};options=$.makeArray(options);for(var i=0;i<options.length;++i){that[options[i]]=function(){}}return that};fluid.initSubcomponent=function(that,className,args){return fluid.initSubcomponents(that,className,args)[0]};fluid.initSubcomponents=function(that,className,args){var entry=that.options[className];if(!entry){return }var entries=$.makeArray(entry);var optindex=-1;var togo=[];args=$.makeArray(args);for(var i=0;i<args.length;++i){if(args[i]===fluid.COMPONENT_OPTIONS){optindex=i}}for(i=0;i<entries.length;++i){entry=entries[i];if(optindex!==-1&&entry.options){args[optindex]=entry.options}if(typeof (entry)!=="function"){var entryType=typeof (entry)==="string"?entry:entry.type;var globDef=fluid.defaults(true,entryType);fluid.merge("reverse",that.options,globDef);togo[i]=entryType==="fluid.emptySubcomponent"?fluid.emptySubcomponent(entry.options):fluid.invokeGlobalFunction(entryType,args,{fluid:fluid})}else{togo[i]=entry.apply(null,args)}var returnedOptions=togo[i]?togo[i].returnedOptions:null;if(returnedOptions){fluid.merge(that.options.mergePolicy,that.options,returnedOptions);if(returnedOptions.listeners){fluid.mergeListeners(that.events,returnedOptions.listeners)}}}return togo};fluid.initDomBinder=function(that){that.dom=fluid.createDomBinder(that.container,that.options.selectors);that.locate=that.dom.locate};fluid.isPrimitive=function(value){var valueType=typeof (value);return !value||valueType==="string"||valueType==="boolean"||valueType==="number"};function mergeImpl(policy,basePath,target,source){var thisPolicy=policy&&typeof (policy)!=="string"?policy[basePath]:policy;if(typeof (thisPolicy)==="function"){thisPolicy.apply(null,target,source);return target}if(thisPolicy==="replace"){fluid.clear(target)}for(var name in source){var path=(basePath?basePath+".":"")+name;var thisTarget=target[name];var thisSource=source[name];var primitiveTarget=fluid.isPrimitive(thisTarget);if(thisSource!==undefined){if(thisSource!==null&&typeof thisSource==="object"&&!thisSource.nodeType&&!thisSource.jquery&&thisSource!==fluid.VALUE){if(primitiveTarget){target[name]=thisTarget=thisSource instanceof Array?[]:{}}mergeImpl(policy,path,thisTarget,thisSource)}else{if(thisTarget===null||thisTarget===undefined||thisPolicy!=="reverse"){target[name]=thisSource}}}}return target}fluid.merge=function(policy,target){var path="";for(var i=2;i<arguments.length;++i){var source=arguments[i];if(source!==null&&source!==undefined){mergeImpl(policy,path,target,source)}}if(policy&&typeof (policy)!=="string"){for(var key in policy){var elrh=policy[key];if(typeof (elrh)==="string"&&elrh!=="replace"){var oldValue=fluid.model.getBeanValue(target,key);if(oldValue===null||oldValue===undefined){var value=fluid.model.getBeanValue(target,elrh);fluid.model.setBeanValue(target,key,value)}}}}return target};fluid.copy=function(tocopy){if(fluid.isPrimitive(tocopy)){return tocopy}return $.extend(true,typeof (tocopy.length)==="number"?[]:{},tocopy)};fluid.invokeGlobalFunction=function(functionPath,args,environment){var func=fluid.model.getBeanValue(window,functionPath,environment);if(!func){fluid.fail("Error invoking global function: "+functionPath+" could not be located")}else{return func.apply(null,args)}};fluid.event={};var fluid_guid=1;fluid.event.getEventFirer=function(unicast,preventable){var log=fluid.log;var listeners={};return{addListener:function(listener,namespace,predicate){if(!listener){return }if(unicast){namespace="unicast"}if(!namespace){if(!listener.$$guid){listener.$$guid=fluid_guid++}namespace=listener.$$guid}listeners[namespace]={listener:listener,predicate:predicate}},removeListener:function(listener){if(typeof (listener)==="string"){delete listeners[listener]}else{if(typeof (listener)==="object"&&listener.$$guid){delete listeners[listener.$$guid]}}},fire:function(){for(var i in listeners){var lisrec=listeners[i];var listener=lisrec.listener;if(lisrec.predicate&&!lisrec.predicate(listener,arguments)){continue}try{var ret=listener.apply(null,arguments);if(preventable&&ret===false){return false}}catch(e){log("FireEvent received exception "+e.message+" e "+e+" firing to listener "+i);throw (e)}}}}};fluid.model={};fluid.model.copyModel=function(target,source){fluid.clear(target);$.extend(true,target,source)};fluid.model.parseEL=function(EL){return EL.toString().split(".")};fluid.model.composePath=function(prefix,suffix){return prefix===""?suffix:prefix+"."+suffix};fluid.model.setBeanValue=function(root,EL,newValue){var segs=fluid.model.parseEL(EL);for(var i=0;i<segs.length-1;i+=1){if(!root[segs[i]]){root[segs[i]]={}}root=root[segs[i]]}root[segs[segs.length-1]]=newValue};fluid.model.getBeanValue=function(root,EL,environment){if(EL===""||EL===null||EL===undefined){return root}var segs=fluid.model.parseEL(EL);for(var i=0;i<segs.length;++i){if(!root){return root}var segment=segs[i];if(environment&&environment[segment]){root=environment[segment];environment=null}else{root=root[segment]}}return root};var logging;fluid.setLogging=function(enabled){if(typeof enabled==="boolean"){logging=enabled}else{logging=false}};fluid.log=function(str){if(logging){str=new Date().toTimeString()+":  "+str;if(typeof (console)!=="undefined"){if(console.debug){console.debug(str)}else{console.log(str)}}else{if(typeof (YAHOO)!=="undefined"){YAHOO.log(str)}else{if(typeof (opera)!=="undefined"){opera.postError(str)}}}}};fluid.dumpEl=function(element){var togo;if(!element){return"null"}if(element.nodeType===3||element.nodeType===8){return"[data: "+element.data+"]"}if(element.nodeType===9){return"[document: location "+element.location+"]"}if(!element.nodeType&&typeof element.length==="number"){togo="[";for(var i=0;i<element.length;++i){togo+=fluid.dumpEl(element[i]);if(i<element.length-1){togo+=", "}}return togo+"]"}element=$(element);togo=element.get(0).tagName;if(element.attr("id")){togo+="#"+element.attr("id")}if(element.attr("class")){togo+="."+element.attr("class")}return togo};fluid.findAncestor=function(element,test){element=fluid.unwrap(element);while(element){if(test(element)){return element}element=element.parentNode}};fluid.jById=function(id,dokkument){dokkument=dokkument&&dokkument.nodeType===9?dokkument:document;var element=fluid.byId(id,dokkument);var togo=element?$(element):[];togo.selector="#"+id;togo.context=dokkument;return togo};fluid.byId=function(id,dokkument){dokkument=dokkument&&dokkument.nodeType===9?dokkument:document;var el=dokkument.getElementById(id);if(el){if(el.getAttribute("id")!==id){fluid.fail("Problem in document structure - picked up element "+fluid.dumpEl(el)+" for id "+id+" without this id - most likely the element has a name which conflicts with this id")}return el}else{return null}};fluid.getId=function(element){return fluid.unwrap(element).getAttribute("id")};fluid.allocateSimpleId=function(element){element=fluid.unwrap(element);if(!element.id){element.id="fluid-id-"+(fluid_guid++)}return element.id};fluid.transform=function(list){var togo=[];for(var i=0;i<list.length;++i){var transit=list[i];for(var j=0;j<arguments.length-1;++j){transit=arguments[j+1](transit,i)}togo[togo.length]=transit}return togo};fluid.find=function(list,fn,deflt){for(var i=0;i<list.length;++i){var transit=fn(list[i],i);if(transit!==null&&transit!==undefined){return transit}}return deflt};fluid.accumulate=function(list,fn,arg){for(var i=0;i<list.length;++i){arg=fn(list[i],arg,i)}return arg};fluid.remove_if=function(list,fn){for(var i=0;i<list.length;++i){if(fn(list[i],i)){list.splice(i,1);--i}}return list};fluid.formatMessage=function(messageString,args){if(!args){return messageString}if(typeof (args)==="string"){args=[args]}for(var i=0;i<args.length;++i){messageString=messageString.replace("{"+i+"}",args[i])}return messageString};fluid.messageLocator=function(messageBase){return function(messagecodes,args){if(typeof (messagecodes)==="string"){messagecodes=[messagecodes]}for(var i=0;i<messagecodes.length;++i){var code=messagecodes[i];var message=messageBase[code];if(message===undefined){continue}return fluid.formatMessage(message,args)}return"[Message string for key "+messagecodes[0]+" not found]"}};fluid.stringTemplate=function(template,values){var newString=template;for(var key in values){if(values.hasOwnProperty(key)){var searchStr="%"+key;newString=newString.replace(searchStr,values[key])}}return newString}})(jQuery,fluid_1_1);var fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.dom=fluid.dom||{};var getNextNode=function(iterator){if(iterator.node.firstChild){iterator.node=iterator.node.firstChild;iterator.depth+=1;return iterator}while(iterator.node){if(iterator.node.nextSibling){iterator.node=iterator.node.nextSibling;return iterator}iterator.node=iterator.node.parentNode;iterator.depth-=1}return iterator};fluid.dom.iterateDom=function(node,acceptor,allNodes){var currentNode={node:node,depth:0};var prevNode=node;var condition;while(currentNode.node!==null&&currentNode.depth>=0&&currentNode.depth<fluid.dom.iterateDom.DOM_BAIL_DEPTH){condition=null;if(currentNode.node.nodeType===1||allNodes){condition=acceptor(currentNode.node,currentNode.depth)}if(condition){if(condition==="delete"){currentNode.node.parentNode.removeChild(currentNode.node);currentNode.node=prevNode}else{if(condition==="stop"){return currentNode.node}}}prevNode=currentNode.node;currentNode=getNextNode(currentNode)}};fluid.dom.iterateDom.DOM_BAIL_DEPTH=256;fluid.dom.computeAbsolutePosition=function(element){var curleft=0,curtop=0;if(element.offsetParent){do{curleft+=element.offsetLeft;curtop+=element.offsetTop;element=element.offsetParent}while(element);return[curleft,curtop]}};fluid.dom.isContainer=function(container,containee){for(;containee;containee=containee.parentNode){if(container===containee){return true}}return false};fluid.dom.insertAfter=function(newChild,refChild){var nextSib=refChild.nextSibling;if(!nextSib){refChild.parentNode.appendChild(newChild)}else{refChild.parentNode.insertBefore(newChild,nextSib)}};fluid.dom.isWhitespaceNode=function(node){return !(/[^\t\n\r ]/.test(node.data))};fluid.dom.isIgnorableNode=function(node){return(node.nodeType===8)||((node.nodeType===3)&&fluid.dom.isWhitespaceNode(node))};fluid.dom.getElementText=function(element){var nodes=element.childNodes;var text="";for(var i=0;i<nodes.length;++i){var child=nodes[i];if(child.nodeType==3){text=text+child.nodeValue}}return text};fluid.dom.cleanseScripts=function(element){var cleansed=$.data(element,fluid.dom.cleanseScripts.MARKER);if(!cleansed){fluid.dom.iterateDom(element,function(node){return node.tagName.toLowerCase()==="script"?"delete":null});$.data(element,fluid.dom.cleanseScripts.MARKER,true)}};fluid.dom.cleanseScripts.MARKER="fluid-scripts-cleansed"})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.VALUE={};fluid.BINDING_ROOT_KEY="fluid-binding-root";fluid.findData=function(elem,name){while(elem){var data=$.data(elem,name);if(data){return data}elem=elem.parentNode}};fluid.bindFossils=function(node,data,fossils){$.data(node,fluid.BINDING_ROOT_KEY,{data:data,fossils:fossils})};fluid.findForm=function(node){return fluid.findAncestor(node,function(element){return element.nodeName.toLowerCase()==="form"})};fluid.value=function(nodeIn,newValue){var node=fluid.unwrap(nodeIn);var multiple=false;if(node.nodeType===undefined&&node.length>1){node=node[0];multiple=true}var jNode=$(node);if("input"!==node.nodeName.toLowerCase()||!/radio|checkbox/.test(node.type)){return $(node).val(newValue)}var name=node.name;if(name===undefined){fluid.fail("Cannot acquire value from node "+fluid.dumpEl(node)+" which does not have name attribute set")}var elements;if(multiple){elements=nodeIn}else{var elements=document.getElementsByName(name);var scope=fluid.findForm(node);elements=$.grep(elements,function(element){if(element.name!==name){return false}return !scope||fluid.dom.isContainer(scope,element)})}if(newValue!==undefined){if(typeof (newValue)==="boolean"){newValue=(newValue?"true":"false")}$.each(elements,function(){this.checked=(newValue instanceof Array?$.inArray(this.value,newValue)!==-1:newValue===this.value)})}else{var checked=$.map(elements,function(element){return element.checked?element.value:null});return node.type==="radio"?checked[0]:checked}};fluid.applyChange=function(node,newValue,applier){node=fluid.unwrap(node);if(newValue===undefined){newValue=fluid.value(node)}if(node.nodeType===undefined&&node.length>0){node=node[0]}var root=fluid.findData(node,fluid.BINDING_ROOT_KEY);if(!root){fluid.fail("Bound data could not be discovered in any node above "+fluid.dumpEl(node))}var name=node.name;var fossil=root.fossils[name];if(!fossil){fluid.fail("No fossil discovered for name "+name+" in fossil record above "+fluid.dumpEl(node))}if(typeof (fossil.oldvalue)==="boolean"){newValue=newValue[0]?true:false}var EL=root.fossils[name].EL;if(applier){applier.fireChangeRequest({path:EL,value:newValue,source:node.id})}else{fluid.model.setBeanValue(root.data,EL,newValue)}};fluid.pathUtil={};var getPathSegmentImpl=function(accept,path,i){var segment=null;if(accept){segment=""}var escaped=false;var limit=path.length;for(;i<limit;++i){var c=path.charAt(i);if(!escaped){if(c==="."){break}else{if(c==="\\"){escaped=true}else{if(segment!==null){segment+=c}}}}else{escaped=false;if(segment!==null){accept+=c}}}if(segment!==null){accept[0]=segment}return i};var globalAccept=[];fluid.pathUtil.getPathSegment=function(path,i){getPathSegmentImpl(globalAccept,path,i);return globalAccept[0]};fluid.pathUtil.getHeadPath=function(path){return fluid.pathUtil.getPathSegment(path,0)};fluid.pathUtil.getFromHeadPath=function(path){var firstdot=getPathSegmentImpl(null,path,0);return firstdot===path.length?null:path.substring(firstdot+1)};function lastDotIndex(path){return path.lastIndexOf(".")}fluid.pathUtil.getToTailPath=function(path){var lastdot=lastDotIndex(path);return lastdot==-1?null:path.substring(0,lastdot)};fluid.pathUtil.getTailPath=function(path){var lastdot=lastDotIndex(path);return fluid.pathUtil.getPathSegment(path,lastdot+1)};var composeSegment=function(prefix,toappend){for(var i=0;i<toappend.length;++i){var c=toappend.charAt(i);if(c==="."||c==="\\"||c==="}"){prefix+="\\"}prefix+=c}return prefix};fluid.pathUtil.composePath=function(prefix,suffix){if(prefix.length!==0){prefix+="."}return composeSegment(prefix,suffix)};fluid.pathUtil.matchPath=function(spec,path){var togo="";while(true){if(!spec){break}if(!path){return null}var spechead=fluid.pathUtil.getHeadPath(spec);var pathhead=fluid.pathUtil.getHeadPath(path);if(spechead!=="*"&&spechead!==pathhead){return null}togo=fluid.pathUtil.composePath(togo,pathhead);spec=fluid.pathUtil.getFromHeadPath(spec);path=fluid.pathUtil.getFromHeadPath(path)}return togo};fluid.model.applyChangeRequest=function(model,request){if(request.type==="ADD"){fluid.model.setBeanValue(model,request.path,request.value)}else{if(request.type==="DELETE"){var totail=fluid.pathUtil.getToTailPath(request.path);var tail=fluid.pathUtil.getTailPath(request.path);var penult=fluid.model.getBeanValue(model,penult);delete penult[tail]}}};fluid.makeChangeApplier=function(model){var baseEvents={guards:fluid.event.getEventFirer(false,true),modelChanged:fluid.event.getEventFirer(false,false)};var that={model:model};function makePredicate(listenerMember,requestIndex){return function(listener,args){var changeRequest=args[requestIndex];return fluid.pathUtil.matchPath(listener[listenerMember],changeRequest.path)}}function adaptListener(that,name,listenerMember,requestIndex){var predicate=makePredicate(listenerMember,requestIndex);that[name]={addListener:function(pathSpec,listener,namespace){listener[listenerMember]=pathSpec;baseEvents[name].addListener(listener,namespace,predicate)},removeListener:function(listener){baseEvents[name].removeListener(listener)}}}adaptListener(that,"guards","guardedPathSpec",1);adaptListener(that,"modelChanged","triggerPathSpec",2);that.fireChangeRequest=function(changeRequest){if(!changeRequest.type){changeRequest.type="ADD"}var prevent=baseEvents.guards.fire(model,changeRequest);if(prevent===false){return }var oldModel={};fluid.model.copyModel(oldModel,model);fluid.model.applyChangeRequest(model,changeRequest);baseEvents.modelChanged.fire(model,oldModel,changeRequest)};that.requestChange=function(path,value,type){var changeRequest={path:path,value:value,type:type};that.fireChangeRequest(changeRequest)};return that};fluid.makeSuperApplier=function(){var subAppliers=[];var that={};that.addSubApplier=function(path,subApplier){subAppliers.push({path:path,subApplier:subApplier})};that.fireChangeRequest=function(request){for(var i=0;i<subAppliers.length;++i){var path=subAppliers[i].path;if(request.path.indexOf(path)===0){var subpath=request.path.substring(path.length+1);var subRequest=fluid.copy(request);subRequest.path=subpath;subAppliers[i].subApplier.fireChangeRequest(subRequest)}}};return that};fluid.attachModel=function(baseModel,path,model){var segs=fluid.model.parseEL(path);for(var i=0;i<segs.length-1;++i){var seg=segs[i];var subModel=baseModel[seg];if(!subModel){baseModel[seg]=subModel={}}baseModel=subModel}baseModel[segs[segs.length-1]]=model};fluid.assembleModel=function(modelSpec){var model={};var superApplier=fluid.makeSuperApplier();var togo={model:model,applier:superApplier};for(path in modelSpec){var rec=modelSpec[path];fluid.attachModel(model,path,rec.model);if(rec.applier){superApplier.addSubApplier(path,rec.applier)}}return togo}})(jQuery,fluid_1_1);var fluid_1_1=fluid_1_1||{};var fluid=fluid||fluid_1_1;(function($,fluid){fluid.thatistBridge=function(name,peer){var togo=function(funcname){var segs=funcname.split(".");var move=peer;for(var i=0;i<segs.length;++i){move=move[segs[i]]}var args=[this];if(arguments.length===2){args=args.concat($.makeArray(arguments[1]))}var ret=move.apply(null,args);this.that=function(){return ret};var type=typeof (ret);return !ret||type==="string"||type==="number"||type==="boolean"||ret&&ret.length!==undefined?ret:this};$.fn[name]=togo;return togo};fluid.thatistBridge("fluid",fluid);fluid.thatistBridge("fluid_1_1",fluid_1_1);var NAMESPACE_KEY="fluid-keyboard-a11y";var getData=function(target,key){var data=$(target).data(NAMESPACE_KEY);return data?data[key]:undefined};var setData=function(target,key,value){$(target).each(function(){var data=$.data(this,NAMESPACE_KEY)||{};data[key]=value;$.data(this,NAMESPACE_KEY,data)})};var lastFocusedElement="disabled";if($.event.special.focusin){lastFocusedElement=null;$(document).bind("focusin",function(event){lastFocusedElement=event.target})}fluid.getLastFocusedElement=function(){if(lastFocusedElement==="disabled"){fluid.fail("Focus manager not enabled - please include jquery.delegate.js or equivalent for support of 'focusin' event")}return lastFocusedElement};var normalizeTabindexName=function(){return $.browser.msie?"tabIndex":"tabindex"};var canHaveDefaultTabindex=function(elements){if(elements.length<=0){return false}return $(elements[0]).is("a, input, button, select, area, textarea, object")};var getValue=function(elements){if(elements.length<=0){return undefined}if(!fluid.tabindex.hasAttr(elements)){return canHaveDefaultTabindex(elements)?Number(0):undefined}var value=elements.attr(normalizeTabindexName());return Number(value)};var setValue=function(elements,toIndex){return elements.each(function(i,item){$(item).attr(normalizeTabindexName(),toIndex)})};fluid.tabindex=function(target,toIndex){target=$(target);if(toIndex!==null&&toIndex!==undefined){return setValue(target,toIndex)}else{return getValue(target)}};fluid.tabindex.remove=function(target){target=$(target);return target.each(function(i,item){$(item).removeAttr(normalizeTabindexName())})};fluid.tabindex.hasAttr=function(target){target=$(target);if(target.length<=0){return false}var togo=target.map(function(){var attributeNode=this.getAttributeNode(normalizeTabindexName());return attributeNode?attributeNode.specified:false});return togo.length===1?togo[0]:togo};fluid.tabindex.has=function(target){target=$(target);return fluid.tabindex.hasAttr(target)||canHaveDefaultTabindex(target)};var ENABLEMENT_KEY="enablement";fluid.enabled=function(target,state){target=$(target);if(state===undefined){return getData(target,ENABLEMENT_KEY)!==false}else{$("*",target).each(function(){if(getData(this,ENABLEMENT_KEY)!==undefined){setData(this,ENABLEMENT_KEY,state)}else{if(/select|textarea|input/i.test(this.nodeName)){$(this).attr("disabled",!state)}}});setData(target,ENABLEMENT_KEY,state)}};fluid.a11y=$.a11y||{};fluid.a11y.orientation={HORIZONTAL:0,VERTICAL:1,BOTH:2};var UP_DOWN_KEYMAP={next:$.ui.keyCode.DOWN,previous:$.ui.keyCode.UP};var LEFT_RIGHT_KEYMAP={next:$.ui.keyCode.RIGHT,previous:$.ui.keyCode.LEFT};var unwrap=function(element){return element.jquery?element[0]:element};var makeElementsTabFocussable=function(elements){elements.each(function(idx,item){item=$(item);if(!item.fluid("tabindex.has")||item.fluid("tabindex")<0){item.fluid("tabindex",0)}})};fluid.tabbable=function(target){target=$(target);makeElementsTabFocussable(target)};var CONTEXT_KEY="selectionContext";var NO_SELECTION=-32768;var cleanUpWhenLeavingContainer=function(selectionContext){if(selectionContext.options.onLeaveContainer){selectionContext.options.onLeaveContainer(selectionContext.selectables[selectionContext.activeItemIndex])}else{if(selectionContext.options.onUnselect){selectionContext.options.onUnselect(selectionContext.selectables[selectionContext.activeItemIndex])}}if(!selectionContext.options.rememberSelectionState){selectionContext.activeItemIndex=NO_SELECTION}};var drawSelection=function(elementToSelect,handler){if(handler){handler(elementToSelect)}};var eraseSelection=function(selectedElement,handler){if(handler&&selectedElement){handler(selectedElement)}};var unselectElement=function(selectedElement,selectionContext){eraseSelection(selectedElement,selectionContext.options.onUnselect)};var selectElement=function(elementToSelect,selectionContext){unselectElement(selectionContext.selectedElement(),selectionContext);elementToSelect=unwrap(elementToSelect);var newIndex=selectionContext.selectables.index(elementToSelect);if(newIndex===-1){return }selectionContext.activeItemIndex=newIndex;drawSelection(elementToSelect,selectionContext.options.onSelect)};var selectableFocusHandler=function(selectionContext){return function(evt){selectElement(evt.target,selectionContext);return evt.stopPropagation()}};var selectableBlurHandler=function(selectionContext){return function(evt){unselectElement(evt.target,selectionContext);return evt.stopPropagation()}};var reifyIndex=function(sc_that){var elements=sc_that.selectables;if(sc_that.activeItemIndex>=elements.length){sc_that.activeItemIndex=0}if(sc_that.activeItemIndex<0&&sc_that.activeItemIndex!==NO_SELECTION){sc_that.activeItemIndex=elements.length-1}if(sc_that.activeItemIndex>=0){$(elements[sc_that.activeItemIndex]).focus()}};var prepareShift=function(selectionContext){unselectElement(selectionContext.selectedElement(),selectionContext);if(selectionContext.activeItemIndex===NO_SELECTION){selectionContext.activeItemIndex=-1}};var focusNextElement=function(selectionContext){prepareShift(selectionContext);++selectionContext.activeItemIndex;reifyIndex(selectionContext)};var focusPreviousElement=function(selectionContext){prepareShift(selectionContext);--selectionContext.activeItemIndex;reifyIndex(selectionContext)};var arrowKeyHandler=function(selectionContext,keyMap,userHandlers){return function(evt){if(evt.which===keyMap.next){focusNextElement(selectionContext);evt.preventDefault()}else{if(evt.which===keyMap.previous){focusPreviousElement(selectionContext);evt.preventDefault()}}}};var getKeyMapForDirection=function(direction){var keyMap;if(direction===fluid.a11y.orientation.HORIZONTAL){keyMap=LEFT_RIGHT_KEYMAP}else{if(direction===fluid.a11y.orientation.VERTICAL){keyMap=UP_DOWN_KEYMAP}}return keyMap};var tabKeyHandler=function(selectionContext){return function(evt){if(evt.which!==$.ui.keyCode.TAB){return }cleanUpWhenLeavingContainer(selectionContext);if(evt.shiftKey){selectionContext.focusIsLeavingContainer=true}}};var containerFocusHandler=function(selectionContext){return function(evt){var shouldOrig=selectionContext.options.autoSelectFirstItem;var shouldSelect=typeof (shouldOrig)==="function"?shouldOrig():shouldOrig;if(selectionContext.focusIsLeavingContainer){shouldSelect=false}if(shouldSelect&&evt.target===selectionContext.container.get(0)){if(selectionContext.activeItemIndex===NO_SELECTION){selectionContext.activeItemIndex=0}$(selectionContext.selectables[selectionContext.activeItemIndex]).focus()}return evt.stopPropagation()}};var containerBlurHandler=function(selectionContext){return function(evt){selectionContext.focusIsLeavingContainer=false;return evt.stopPropagation()}};var makeElementsSelectable=function(container,defaults,userOptions){var options=$.extend(true,{},defaults,userOptions);var keyMap=getKeyMapForDirection(options.direction);var selectableElements=options.selectableElements?options.selectableElements:container.find(options.selectableSelector);var that={container:container,activeItemIndex:NO_SELECTION,selectables:selectableElements,focusIsLeavingContainer:false,options:options};that.selectablesUpdated=function(focusedItem){if(typeof (that.options.selectablesTabindex)==="number"){that.selectables.fluid("tabindex",that.options.selectablesTabindex)}that.selectables.unbind("focus."+NAMESPACE_KEY);that.selectables.unbind("blur."+NAMESPACE_KEY);that.selectables.bind("focus."+NAMESPACE_KEY,selectableFocusHandler(that));that.selectables.bind("blur."+NAMESPACE_KEY,selectableBlurHandler(that));if(focusedItem){selectElement(focusedItem,that)}else{reifyIndex(that)}};that.refresh=function(){if(!that.options.selectableSelector){throw ("Cannot refresh selectable context which was not initialised by a selector")}that.selectables=container.find(options.selectableSelector);that.selectablesUpdated()};that.selectedElement=function(){return that.activeItemIndex<0?null:that.selectables[that.activeItemIndex]};if(keyMap){container.keydown(arrowKeyHandler(that,keyMap))}container.keydown(tabKeyHandler(that));container.focus(containerFocusHandler(that));container.blur(containerBlurHandler(that));that.selectablesUpdated();return that};fluid.selectable=function(target,options){target=$(target);var that=makeElementsSelectable(target,fluid.selectable.defaults,options);setData(target,CONTEXT_KEY,that);return that};fluid.selectable.select=function(target,toSelect){$(toSelect).focus()};fluid.selectable.selectNext=function(target){target=$(target);focusNextElement(getData(target,CONTEXT_KEY))};fluid.selectable.selectPrevious=function(target){target=$(target);focusPreviousElement(getData(target,CONTEXT_KEY))};fluid.selectable.currentSelection=function(target){target=$(target);var that=getData(target,CONTEXT_KEY);return $(that.selectedElement())};fluid.selectable.defaults={direction:fluid.a11y.orientation.VERTICAL,selectablesTabindex:-1,autoSelectFirstItem:true,rememberSelectionState:true,selectableSelector:".selectable",selectableElements:null,onSelect:null,onUnselect:null,onLeaveContainer:null};var checkForModifier=function(binding,evt){if(!binding.modifier){return true}var modifierKey=binding.modifier;var isCtrlKeyPresent=modifierKey&&evt.ctrlKey;var isAltKeyPresent=modifierKey&&evt.altKey;var isShiftKeyPresent=modifierKey&&evt.shiftKey;return isCtrlKeyPresent||isAltKeyPresent||isShiftKeyPresent};var makeActivationHandler=function(binding){return function(evt){var target=evt.target;if(!fluid.enabled(evt.target)){return }var code=evt.which?evt.which:evt.keyCode;if(code===binding.key&&binding.activateHandler&&checkForModifier(binding,evt)){var event=$.Event("fluid-activate");$(evt.target).trigger(event,[binding.activateHandler]);if(event.isDefaultPrevented()){evt.preventDefault()}}}};var makeElementsActivatable=function(elements,onActivateHandler,defaultKeys,options){var bindings=[];$(defaultKeys).each(function(index,key){bindings.push({modifier:null,key:key,activateHandler:onActivateHandler})});if(options&&options.additionalBindings){bindings=bindings.concat(options.additionalBindings)}setData(elements,ENABLEMENT_KEY,true);for(var i=0;i<bindings.length;++i){var binding=bindings[i];elements.keydown(makeActivationHandler(binding))}elements.bind("fluid-activate",function(evt,handler){handler=handler||onActivateHandler;return handler?handler(evt):null})};fluid.activatable=function(target,fn,options){target=$(target);makeElementsActivatable(target,fn,fluid.activatable.defaults.keys,options)};fluid.activate=function(target){$(target).trigger("fluid-activate")};fluid.activatable.defaults={keys:[$.ui.keyCode.ENTER,$.ui.keyCode.SPACE]}})(jQuery,fluid_1_1);var fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.orientation={HORIZONTAL:4,VERTICAL:1};fluid.rectSides={4:["left","right"],1:["top","bottom"],8:"top",12:"bottom",2:"left",3:"right"};fluid.position={BEFORE:-1,AFTER:1,INSIDE:2,REPLACE:3};fluid.direction={NEXT:1,PREVIOUS:-1,UP:8,DOWN:12,LEFT:2,RIGHT:3};fluid.directionSign=function(direction){return direction===fluid.direction.UP||direction===fluid.direction.LEFT?fluid.direction.PREVIOUS:fluid.direction.NEXT};fluid.directionAxis=function(direction){return direction===fluid.direction.LEFT||direction===fluid.direction.RIGHT?0:1};fluid.directionOrientation=function(direction){return fluid.directionAxis(direction)?fluid.orientation.VERTICAL:fluid.orientation.HORIZONTAL};fluid.keycodeDirection={up:fluid.direction.UP,down:fluid.direction.DOWN,left:fluid.direction.LEFT,right:fluid.direction.RIGHT};fluid.moveDom=function(source,target,position){source=fluid.unwrap(source);target=fluid.unwrap(target);var scan;if(position===fluid.position.INSIDE){target.appendChild(source)}else{if(position===fluid.position.BEFORE){for(scan=target.previousSibling;;scan=scan.previousSibling){if(!scan||!fluid.dom.isIgnorableNode(scan)){if(scan!==source){fluid.dom.cleanseScripts(source);target.parentNode.insertBefore(source,target)}break}}}else{if(position===fluid.position.AFTER){for(scan=target.nextSibling;;scan=scan.nextSibling){if(!scan||!fluid.dom.isIgnorableNode(scan)){if(scan!==source){fluid.dom.cleanseScripts(source);fluid.dom.insertAfter(source,target)}break}}}else{fluid.fail("Unrecognised position supplied to fluid.moveDom: "+position)}}}};fluid.normalisePosition=function(position,samespan,targeti,sourcei){if(position===fluid.position.REPLACE){position=samespan&&targeti>=sourcei?fluid.position.AFTER:fluid.position.BEFORE}return position};fluid.permuteDom=function(element,target,position,sourceelements,targetelements){element=fluid.unwrap(element);target=fluid.unwrap(target);var sourcei=$.inArray(element,sourceelements);if(sourcei===-1){fluid.fail("Error in permuteDom: source element "+fluid.dumpEl(element)+" not found in source list "+fluid.dumpEl(sourceelements))}var targeti=$.inArray(target,targetelements);if(targeti===-1){fluid.fail("Error in permuteDom: target element "+fluid.dumpEl(target)+" not found in source list "+fluid.dumpEl(targetelements))}var samespan=sourceelements===targetelements;position=fluid.normalisePosition(position,samespan,targeti,sourcei);var oldn={};oldn[fluid.position.AFTER]=element.nextSibling;oldn[fluid.position.BEFORE]=element.previousSibling;fluid.moveDom(sourceelements[sourcei],targetelements[targeti],position);var frontlimit=samespan?targeti-1:sourceelements.length-2;var i;if(!samespan||targeti>sourcei){for(i=frontlimit;i>sourcei;--i){fluid.moveDom(sourceelements[i+1],sourceelements[i],fluid.position.AFTER)}if(sourcei+1<sourceelements.length){fluid.moveDom(sourceelements[sourcei+1],oldn[fluid.position.AFTER],fluid.position.BEFORE)}}var backlimit=samespan?sourcei-1:targetelements.length-1;if(position===fluid.position.AFTER){targeti++}if(!samespan||targeti<sourcei){for(i=targeti;i<backlimit;++i){fluid.moveDom(targetelements[i],targetelements[i+1],fluid.position.BEFORE)}if(backlimit>=0&&backlimit<targetelements.length-1){fluid.moveDom(targetelements[backlimit],oldn[fluid.position.BEFORE],fluid.position.AFTER)}}};var curCss=function(a,name){return window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(name):a.currentStyle[name]};var isAttached=function(node){while(node&&node.nodeName){if(node.nodeName==="BODY"){return true}node=node.parentNode}return false};var generalHidden=function(a){return"hidden"===a.type||curCss(a,"display")==="none"||curCss(a,"visibility")==="hidden"||!isAttached(a)};var computeGeometry=function(element,orientation,disposition){var elem={};elem.element=element;elem.orientation=orientation;if(disposition===fluid.position.INSIDE){elem.position=disposition}if(generalHidden(element)){elem.clazz="hidden"}var pos=fluid.dom.computeAbsolutePosition(element)||[0,0];var width=element.offsetWidth;var height=element.offsetHeight;elem.rect={left:pos[0],top:pos[1]};elem.rect.right=pos[0]+width;elem.rect.bottom=pos[1]+height;return elem};var SENTINEL_DIMENSION=10000;function dumprect(rect){return"Rect top: "+rect.top+" left: "+rect.left+" bottom: "+rect.bottom+" right: "+rect.right}function dumpelem(cacheelem){if(!cacheelem||!cacheelem.rect){return"null"}else{return dumprect(cacheelem.rect)+" position: "+cacheelem.position+" for "+fluid.dumpEl(cacheelem.element)}}fluid.dropManager=function(){var targets=[];var cache={};var that={};var lastClosest;function cacheKey(element){return $(element).data("")}function sentinelizeElement(targets,sides,cacheelem,fc,disposition,clazz){var elemCopy=$.extend(true,{},cacheelem);elemCopy.rect[sides[fc]]=elemCopy.rect[sides[1-fc]]+(fc?1:-1);elemCopy.rect[sides[1-fc]]=(fc?-1:1)*SENTINEL_DIMENSION;elemCopy.position=disposition===fluid.position.INSIDE?disposition:(fc?fluid.position.BEFORE:fluid.position.AFTER);elemCopy.clazz=clazz;targets[targets.length]=elemCopy}function splitElement(targets,sides,cacheelem,disposition,clazz1,clazz2){var elem1=$.extend(true,{},cacheelem);var elem2=$.extend(true,{},cacheelem);var midpoint=(elem1.rect[sides[0]]+elem1.rect[sides[1]])/2;elem1.rect[sides[1]]=midpoint;elem1.position=fluid.position.BEFORE;elem2.rect[sides[0]]=midpoint;elem2.position=fluid.position.AFTER;elem1.clazz=clazz1;elem2.clazz=clazz2;targets[targets.length]=elem1;targets[targets.length]=elem2}function getRelativeClass(thisElements,index,relative,thisclazz,mapper){index+=relative;if(index<0&&thisclazz==="locked"){return"locked"}if(index>=thisElements.length||mapper===null){return null}else{relative=thisElements[index];return mapper(relative)==="locked"&&thisclazz==="locked"?"locked":null}}var lastGeometry;var displacementX,displacementY;that.updateGeometry=function(geometricInfo){lastGeometry=geometricInfo;targets=[];cache={};var mapper=geometricInfo.elementMapper;for(var i=0;i<geometricInfo.extents.length;++i){var thisInfo=geometricInfo.extents[i];var orientation=thisInfo.orientation;var sides=fluid.rectSides[orientation];var processElement=function(element,sentB,sentF,disposition,j){var cacheelem=computeGeometry(element,orientation,disposition);cacheelem.owner=thisInfo;if(cacheelem.clazz!=="hidden"&&mapper){cacheelem.clazz=mapper(element)}cache[$.data(element)]=cacheelem;var backClass=getRelativeClass(thisInfo.elements,j,fluid.position.BEFORE,cacheelem.clazz,mapper);var frontClass=getRelativeClass(thisInfo.elements,j,fluid.position.AFTER,cacheelem.clazz,mapper);if(disposition===fluid.position.INSIDE){targets[targets.length]=cacheelem}else{splitElement(targets,sides,cacheelem,disposition,backClass,frontClass)}if(sentB&&geometricInfo.sentinelize){sentinelizeElement(targets,sides,cacheelem,1,disposition,backClass)}if(sentF&&geometricInfo.sentinelize){sentinelizeElement(targets,sides,cacheelem,0,disposition,frontClass)}return cacheelem};var allHidden=true;for(var j=0;j<thisInfo.elements.length;++j){var element=thisInfo.elements[j];var cacheelem=processElement(element,j===0,j===thisInfo.elements.length-1,fluid.position.INTERLEAVED,j);if(cacheelem.clazz!=="hidden"){allHidden=false}}if(allHidden&&thisInfo.parentElement){processElement(thisInfo.parentElement,true,true,fluid.position.INSIDE)}}};that.startDrag=function(event,handlePos,handleWidth,handleHeight){var handleMidX=handlePos[0]+handleWidth/2;var handleMidY=handlePos[1]+handleHeight/2;var dX=handleMidX-event.pageX;var dY=handleMidY-event.pageY;that.updateGeometry(lastGeometry);lastClosest=null;displacementX=dX;displacementY=dY;$("").bind("mousemove.fluid-dropManager",that.mouseMove)};that.lastPosition=function(){return lastClosest};that.endDrag=function(){$("").unbind("mousemove.fluid-dropManager")};that.mouseMove=function(evt){var x=evt.pageX+displacementX;var y=evt.pageY+displacementY;var closestTarget=that.closestTarget(x,y,lastClosest);if(closestTarget&&closestTarget!==fluid.dropManager.NO_CHANGE){lastClosest=closestTarget;that.dropChangeFirer.fire(closestTarget)}};that.dropChangeFirer=fluid.event.getEventFirer();var blankHolder={element:null};that.closestTarget=function(x,y,lastClosest){var mindistance=Number.MAX_VALUE;var minelem=blankHolder;var minlockeddistance=Number.MAX_VALUE;var minlockedelem=blankHolder;for(var i=0;i<targets.length;++i){var cacheelem=targets[i];if(cacheelem.clazz==="hidden"){continue}var distance=fluid.geom.minPointRectangle(x,y,cacheelem.rect);if(cacheelem.clazz==="locked"){if(distance<minlockeddistance){minlockeddistance=distance;minlockedelem=cacheelem}}else{if(distance<mindistance){mindistance=distance;minelem=cacheelem}if(distance===0){break}}}if(!minelem){return minelem}if(minlockeddistance>=mindistance){minlockedelem=blankHolder}if(lastClosest&&lastClosest.position===minelem.position&&fluid.unwrap(lastClosest.element)===fluid.unwrap(minelem.element)&&fluid.unwrap(lastClosest.lockedelem)===fluid.unwrap(minlockedelem.element)){return fluid.dropManager.NO_CHANGE}return{position:minelem.position,element:minelem.element,lockedelem:minlockedelem.element}};that.projectFrom=function(element,direction,includeLocked){that.updateGeometry(lastGeometry);var cacheelem=cache[cacheKey(element)];var projected=fluid.geom.projectFrom(cacheelem.rect,direction,targets,includeLocked);if(!projected.cacheelem){return null}var retpos=projected.cacheelem.position;return{element:projected.cacheelem.element,position:retpos?retpos:fluid.position.BEFORE}};function getRelativeElement(element,direction,elements){var folded=fluid.directionSign(direction);var index=$(elements).index(element)+folded;if(index<0){index+=elements.length}index%=elements.length;return elements[index]}that.logicalFrom=function(element,direction,includeLocked){var orderables=that.getOwningSpan(element,fluid.position.INTERLEAVED,includeLocked);return{element:getRelativeElement(element,direction,orderables),position:fluid.position.REPLACE}};that.lockedWrapFrom=function(element,direction,includeLocked){var base=that.logicalFrom(element,direction,includeLocked);var selectables=that.getOwningSpan(element,fluid.position.INTERLEAVED,includeLocked);var allElements=cache[cacheKey(element)].owner.elements;if(includeLocked||selectables[0]===allElements[0]){return base}var directElement=getRelativeElement(element,direction,allElements);if(lastGeometry.elementMapper(directElement)==="locked"){base.element=null;base.clazz="locked"}return base};that.getOwningSpan=function(element,position,includeLocked){var owner=cache[cacheKey(element)].owner;var elements=position===fluid.position.INSIDE?[owner.parentElement]:owner.elements;if(!includeLocked&&lastGeometry.elementMapper){elements=$.makeArray(elements);fluid.remove_if(elements,function(element){return lastGeometry.elementMapper(element)==="locked"})}return elements};that.geometricMove=function(element,target,position){var sourceElements=that.getOwningSpan(element,null,true);var targetElements=that.getOwningSpan(target,position,true);fluid.permuteDom(element,target,position,sourceElements,targetElements)};return that};fluid.dropManager.NO_CHANGE="no change";fluid.geom=fluid.geom||{};fluid.geom.minPointRectangle=function(x,y,rectangle){var dx=x<rectangle.left?(rectangle.left-x):(x>rectangle.right?(x-rectangle.right):0);var dy=y<rectangle.top?(rectangle.top-y):(y>rectangle.bottom?(y-rectangle.bottom):0);return dx*dx+dy*dy};fluid.geom.minRectRect=function(rect1,rect2){var dx=rect1.right<rect2.left?rect2.left-rect1.right:rect2.right<rect1.left?rect1.left-rect2.right:0;var dy=rect1.bottom<rect2.top?rect2.top-rect1.bottom:rect2.bottom<rect1.top?rect1.top-rect2.bottom:0;return dx*dx+dy*dy};var makePenCollect=function(){return{mindist:Number.MAX_VALUE,minrdist:Number.MAX_VALUE}};fluid.geom.projectFrom=function(baserect,direction,targets,forSelection){var axis=fluid.directionAxis(direction);var frontSide=fluid.rectSides[direction];var backSide=fluid.rectSides[axis*15+5-direction];var dirSign=fluid.directionSign(direction);var penrect={left:(7*baserect.left+1*baserect.right)/8,right:(5*baserect.left+3*baserect.right)/8,top:(7*baserect.top+1*baserect.bottom)/8,bottom:(5*baserect.top+3*baserect.bottom)/8};penrect[frontSide]=dirSign*SENTINEL_DIMENSION;penrect[backSide]=-penrect[frontSide];function accPen(collect,cacheelem,backSign){var thisrect=cacheelem.rect;var pdist=fluid.geom.minRectRect(penrect,thisrect);var rdist=-dirSign*backSign*(baserect[backSign===1?frontSide:backSide]-thisrect[backSign===1?backSide:frontSide]);if(pdist<=collect.mindist&&rdist>=0){if(pdist===collect.mindist&&rdist*backSign>collect.minrdist){return }collect.minrdist=rdist*backSign;collect.mindist=pdist;collect.minelem=cacheelem}}var collect=makePenCollect();var backcollect=makePenCollect();var lockedcollect=makePenCollect();for(var i=0;i<targets.length;++i){var elem=targets[i];var isPure=elem.owner&&elem.element===elem.owner.parentElement;if(elem.clazz==="hidden"||forSelection&&isPure){continue}else{if(!forSelection&&elem.clazz==="locked"){accPen(lockedcollect,elem,1)}else{accPen(collect,elem,1);accPen(backcollect,elem,-1)}}}var wrap=!collect.minelem||backcollect.mindist<collect.mindist;var mincollect=wrap?backcollect:collect;var togo={wrapped:wrap,cacheelem:mincollect.minelem};if(lockedcollect.mindist<mincollect.mindist){togo.lockedelem=lockedcollect.minelem}return togo}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var defaultAvatarCreator=function(item,cssClass,dropWarning){var avatar=$(item).clone();fluid.dom.iterateDom(avatar.get(0),function(node){if(node.tagName.toLowerCase()==="script"){return"delete"}node.removeAttribute("id");if(node.tagName.toLowerCase()==="input"){node.setAttribute("disabled","disabled")}});avatar.removeAttr("id");avatar.removeClass("ui-droppable");avatar.addClass(cssClass);if(dropWarning){var avatarContainer=$(document.createElement("div"));avatarContainer.append(avatar);avatarContainer.append(dropWarning);avatar=avatarContainer}$("body").append(avatar);if(!$.browser.safari){avatar.css("display","block").width(item.offsetWidth).height(item.offsetHeight)}if($.browser.opera){avatar.hide()}return avatar};function firstSelectable(that){var selectables=that.dom.fastLocate("selectables");if(selectables.length<=0){return null}return selectables[0]}function bindHandlersToContainer(container,keyDownHandler,keyUpHandler,mouseMoveHandler){var actualKeyDown=keyDownHandler;var advancedPrevention=false;if($.browser.msie){container[0].ondrag=function(){return false};container[0].onselectstart=function(){return false}}if($.browser.opera){container.keypress(function(evt){if(advancedPrevention){advancedPrevention=false;evt.preventDefault();return false}});actualKeyDown=function(evt){var oldret=keyDownHandler(evt);if(oldret===false){advancedPrevention=true}}}container.keydown(actualKeyDown);container.keyup(keyUpHandler)}function addRolesToContainer(that){var first=that.dom.fastLocate("selectables")[0];that.container.attr("role",that.options.containerRole.container);that.container.attr("aria-multiselectable","false");that.container.attr("aria-readonly","false");that.container.attr("aria-disabled","false")}function createAvatarId(parentId){return parentId+"_avatar"}var adaptKeysets=function(options){if(options.keysets&&!(options.keysets instanceof Array)){options.keysets=[options.keysets]}};fluid.reorderer=function(container,options){if(!container){fluid.fail("Reorderer initialised with no container")}var thatReorderer=fluid.initView("fluid.reorderer",container,options);options=thatReorderer.options;var dropManager=fluid.dropManager();thatReorderer.layoutHandler=fluid.initSubcomponent(thatReorderer,"layoutHandler",[container,options,dropManager,thatReorderer.dom]);thatReorderer.activeItem=undefined;adaptKeysets(options);var kbDropWarning=thatReorderer.locate("dropWarning");var mouseDropWarning;if(kbDropWarning){mouseDropWarning=kbDropWarning.clone()}var isMove=function(evt){var keysets=options.keysets;for(var i=0;i<keysets.length;i++){if(keysets[i].modifier(evt)){return true}}return false};var isActiveItemMovable=function(){return $.inArray(thatReorderer.activeItem,thatReorderer.dom.fastLocate("movables"))>=0};var setDropEffects=function(value){thatReorderer.dom.fastLocate("dropTargets").attr("aria-dropeffect",value)};var styles=options.styles;var noModifier=function(evt){return(!evt.ctrlKey&&!evt.altKey&&!evt.shiftKey&&!evt.metaKey)};var handleDirectionKeyDown=function(evt){var item=thatReorderer.activeItem;if(!item){return true}var keysets=options.keysets;for(var i=0;i<keysets.length;i++){var keyset=keysets[i];var didProcessKey=false;var keydir=fluid.keyForValue(keyset,evt.keyCode);if(!keydir){continue}var isMovement=keyset.modifier(evt);var dirnum=fluid.keycodeDirection[keydir];var relativeItem=thatReorderer.layoutHandler.getRelativePosition(item,dirnum,!isMovement);if(!relativeItem){continue}if(isMovement){var prevent=thatReorderer.events.onBeginMove.fire(item);if(prevent===false){return false}if(kbDropWarning.length>0){if(relativeItem.clazz==="locked"){thatReorderer.events.onShowKeyboardDropWarning.fire(item,kbDropWarning);kbDropWarning.show()}else{kbDropWarning.hide()}}if(relativeItem.element){thatReorderer.requestMovement(relativeItem,item)}}else{if(noModifier(evt)){$(relativeItem.element).focus()}}return false}return true};thatReorderer.handleKeyDown=function(evt){if(!thatReorderer.activeItem||thatReorderer.activeItem!==evt.target){return true}var jActiveItem=$(thatReorderer.activeItem);if(!jActiveItem.hasClass(styles.dragging)&&isMove(evt)){if(isActiveItemMovable()){jActiveItem.removeClass(styles.selected);jActiveItem.addClass(styles.dragging);jActiveItem.attr("aria-grabbed","true");setDropEffects("move")}return false}return handleDirectionKeyDown(evt)};thatReorderer.handleKeyUp=function(evt){if(!thatReorderer.activeItem||thatReorderer.activeItem!==evt.target){return true}var jActiveItem=$(thatReorderer.activeItem);if(jActiveItem.hasClass(styles.dragging)&&!isMove(evt)){if(kbDropWarning){kbDropWarning.hide()}jActiveItem.removeClass(styles.dragging);jActiveItem.addClass(styles.selected);jActiveItem.attr("aria-grabbed","false");setDropEffects("none");return false}return false};var dropMarker;var createDropMarker=function(tagName){var dropMarker=$(document.createElement(tagName));dropMarker.addClass(options.styles.dropMarker);dropMarker.hide();return dropMarker};fluid.logEnabled=true;thatReorderer.requestMovement=function(requestedPosition,item){if(!requestedPosition||fluid.unwrap(requestedPosition.element)===fluid.unwrap(item)){return }thatReorderer.events.onMove.fire(item,requestedPosition);dropManager.geometricMove(item,requestedPosition.element,requestedPosition.position);$(thatReorderer.activeItem).focus();thatReorderer.refresh();dropManager.updateGeometry(thatReorderer.layoutHandler.getGeometricInfo());thatReorderer.events.afterMove.fire(item,requestedPosition,thatReorderer.dom.fastLocate("movables"))};var hoverStyleHandler=function(item,state){thatReorderer.dom.fastLocate("grabHandle",item)[state?"addClass":"removeClass"](styles.hover)};function initMovable(item){var styles=options.styles;item.attr("aria-grabbed","false");item.mouseover(function(){thatReorderer.events.onHover.fire(item,true)});item.mouseout(function(){thatReorderer.events.onHover.fire(item,false)});var avatar;thatReorderer.dom.fastLocate("grabHandle",item).draggable({refreshPositions:false,scroll:true,helper:function(){var dropWarningEl;if(mouseDropWarning){dropWarningEl=mouseDropWarning[0]}avatar=$(options.avatarCreator(item[0],styles.avatar,dropWarningEl));avatar.attr("id",createAvatarId(thatReorderer.container.id));return avatar},start:function(e,ui){var prevent=thatReorderer.events.onBeginMove.fire(item);if(prevent===false){return false}var handle=thatReorderer.dom.fastLocate("grabHandle",item)[0];var handlePos=fluid.dom.computeAbsolutePosition(handle);var handleWidth=handle.offsetWidth;var handleHeight=handle.offsetHeight;item.focus();item.removeClass(options.styles.selected);item.addClass(options.styles.mouseDrag);item.attr("aria-grabbed","true");setDropEffects("move");dropManager.startDrag(e,handlePos,handleWidth,handleHeight);avatar.show()},stop:function(e,ui){item.removeClass(options.styles.mouseDrag);item.addClass(options.styles.selected);$(thatReorderer.activeItem).attr("aria-grabbed","false");var markerNode=fluid.unwrap(dropMarker);if(markerNode.parentNode){markerNode.parentNode.removeChild(markerNode)}avatar.hide();ui.helper=null;setDropEffects("none");dropManager.endDrag();thatReorderer.requestMovement(dropManager.lastPosition(),item);thatReorderer.activeItem.focus()},handle:thatReorderer.dom.fastLocate("grabHandle",item)})}function changeSelectedToDefault(jItem,styles){jItem.removeClass(styles.selected);jItem.removeClass(styles.dragging);jItem.addClass(styles.defaultStyle);jItem.attr("aria-selected","false")}var selectItem=function(anItem){thatReorderer.events.onSelect.fire(anItem);var styles=options.styles;if(thatReorderer.activeItem&&thatReorderer.activeItem!==anItem){changeSelectedToDefault($(thatReorderer.activeItem),styles)}thatReorderer.activeItem=anItem;var jItem=$(anItem);jItem.removeClass(styles.defaultStyle);jItem.addClass(styles.selected);jItem.attr("aria-selected","true")};var initSelectables=function(){var handleBlur=function(evt){changeSelectedToDefault($(this),options.styles);return evt.stopPropagation()};var handleFocus=function(evt){selectItem(this);return evt.stopPropagation()};var selectables=thatReorderer.dom.fastLocate("selectables");for(var i=0;i<selectables.length;++i){var selectable=$(selectables[i]);if(!$.data(selectable[0],"fluid.reorderer.selectable-initialised")){selectable.addClass(styles.defaultStyle);selectables.blur(handleBlur);selectables.focus(handleFocus);selectables.click(function(evt){var handle=fluid.unwrap(thatReorderer.dom.fastLocate("grabHandle",this));if(fluid.dom.isContainer(handle,evt.target)){$(this).focus()}});selectables.attr("role",options.containerRole.item);selectables.attr("aria-selected","false");selectables.attr("aria-disabled","false");$.data(selectable[0],"fluid.reorderer.selectable-initialised",true)}}if(!thatReorderer.selectableContext){thatReorderer.selectableContext=fluid.selectable(thatReorderer.container,{selectableElements:selectables,selectablesTabindex:thatReorderer.options.selectablesTabindex,direction:null})}};var dropChangeListener=function(dropTarget){fluid.moveDom(dropMarker,dropTarget.element,dropTarget.position);dropMarker.css("display","");if(mouseDropWarning){if(dropTarget.lockedelem){mouseDropWarning.show()}else{mouseDropWarning.hide()}}};var initItems=function(){var movables=thatReorderer.dom.fastLocate("movables");var dropTargets=thatReorderer.dom.fastLocate("dropTargets");initSelectables();for(var i=0;i<movables.length;i++){var item=movables[i];if(!$.data(item,"fluid.reorderer.movable-initialised")){initMovable($(item));$.data(item,"fluid.reorderer.movable-initialised",true)}}if(movables.length>0&&!dropMarker){dropMarker=createDropMarker(movables[0].tagName)}dropManager.updateGeometry(thatReorderer.layoutHandler.getGeometricInfo());dropManager.dropChangeFirer.addListener(dropChangeListener,"fluid.Reorderer");dropTargets.attr("aria-dropeffect","none")};if(thatReorderer.container){bindHandlersToContainer(thatReorderer.container,thatReorderer.handleKeyDown,thatReorderer.handleKeyUp);addRolesToContainer(thatReorderer);fluid.tabbable(thatReorderer.container);initItems()}if(options.afterMoveCallbackUrl){thatReorderer.events.afterMove.addListener(function(){var layoutHandler=thatReorderer.layoutHandler;var model=layoutHandler.getModel?layoutHandler.getModel():options.acquireModel(thatReorderer);$.post(options.afterMoveCallbackUrl,JSON.stringify(model))},"postModel")}thatReorderer.events.onHover.addListener(hoverStyleHandler,"style");thatReorderer.refresh=function(){thatReorderer.dom.refresh("movables");thatReorderer.dom.refresh("selectables");thatReorderer.dom.refresh("grabHandle",thatReorderer.dom.fastLocate("movables"));thatReorderer.dom.refresh("stylisticOffset",thatReorderer.dom.fastLocate("movables"));thatReorderer.dom.refresh("dropTargets");thatReorderer.events.onRefresh.fire();initItems();thatReorderer.selectableContext.selectables=thatReorderer.dom.fastLocate("selectables");thatReorderer.selectableContext.selectablesUpdated(thatReorderer.activeItem)};thatReorderer.refresh();return thatReorderer};fluid.reorderer.keys={TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:19,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,i:73,j:74,k:75,m:77};fluid.reorderer.defaultKeysets=[{modifier:function(evt){return evt.ctrlKey},up:fluid.reorderer.keys.UP,down:fluid.reorderer.keys.DOWN,right:fluid.reorderer.keys.RIGHT,left:fluid.reorderer.keys.LEFT},{modifier:function(evt){return evt.ctrlKey},up:fluid.reorderer.keys.i,down:fluid.reorderer.keys.m,right:fluid.reorderer.keys.k,left:fluid.reorderer.keys.j}];fluid.reorderer.roles={GRID:{container:"grid",item:"gridcell"},LIST:{container:"list",item:"listitem"},REGIONS:{container:"main",item:"article"}};var simpleInit=function(container,layoutHandler,options){options=options||{};options.layoutHandler=layoutHandler;return fluid.reorderer(container,options)};fluid.reorderList=function(container,options){return simpleInit(container,"fluid.listLayoutHandler",options)};fluid.reorderGrid=function(container,options){return simpleInit(container,"fluid.gridLayoutHandler",options)};fluid.reorderer.GEOMETRIC_STRATEGY="projectFrom";fluid.reorderer.LOGICAL_STRATEGY="logicalFrom";fluid.reorderer.WRAP_LOCKED_STRATEGY="lockedWrapFrom";fluid.reorderer.NO_STRATEGY=null;fluid.reorderer.relativeInfoGetter=function(orientation,coStrategy,contraStrategy,dropManager,dom){return function(item,direction,forSelection){var dirorient=fluid.directionOrientation(direction);var strategy=dirorient===orientation?coStrategy:contraStrategy;return strategy!==null?dropManager[strategy](item,direction,forSelection):null}};fluid.defaults("fluid.reorderer",{styles:{defaultStyle:"fl-reorderer-movable-default",selected:"fl-reorderer-movable-selected",dragging:"fl-reorderer-movable-dragging",mouseDrag:"fl-reorderer-movable-dragging",hover:"fl-reorderer-movable-hover",dropMarker:"fl-reorderer-dropMarker",avatar:"fl-reorderer-avatar"},selectors:{dropWarning:".flc-reorderer-dropWarning",movables:".flc-reorderer-movable",grabHandle:"",stylisticOffset:""},avatarCreator:defaultAvatarCreator,keysets:fluid.reorderer.defaultKeysets,layoutHandler:{type:"fluid.listLayoutHandler"},events:{onShowKeyboardDropWarning:null,onSelect:null,onBeginMove:"preventable",onMove:null,afterMove:null,onHover:null,onRefresh:null},mergePolicy:{keysets:"replace","selectors.selectables":"selectors.movables","selectors.dropTargets":"selectors.movables"}});function geometricInfoGetter(orientation,sentinelize,dom){return function(){return{sentinelize:sentinelize,extents:[{orientation:orientation,elements:dom.fastLocate("dropTargets")}],elementMapper:function(element){return $.inArray(element,dom.fastLocate("movables"))===-1?"locked":null}}}}fluid.defaults(true,"fluid.listLayoutHandler",{orientation:fluid.orientation.VERTICAL,containerRole:fluid.reorderer.roles.LIST,selectablesTabindex:-1,sentinelize:true});fluid.listLayoutHandler=function(container,options,dropManager,dom){var that={};that.getRelativePosition=fluid.reorderer.relativeInfoGetter(options.orientation,fluid.reorderer.LOGICAL_STRATEGY,null,dropManager,dom);that.getGeometricInfo=geometricInfoGetter(options.orientation,options.sentinelize,dom);return that};fluid.defaults(true,"fluid.gridLayoutHandler",{orientation:fluid.orientation.HORIZONTAL,containerRole:fluid.reorderer.roles.GRID,selectablesTabindex:-1,sentinelize:false});fluid.gridLayoutHandler=function(container,options,dropManager,dom){var that={};that.getRelativePosition=fluid.reorderer.relativeInfoGetter(options.orientation,fluid.reorderer.LOGICAL_STRATEGY,fluid.reorderer.GEOMETRIC_STRATEGY,dropManager,dom);that.getGeometricInfo=geometricInfoGetter(options.orientation,options.sentinelize,dom);return that}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var deriveLightboxCellBase=function(namebase,index){return namebase+"lightbox-cell:"+index+":"};var addThumbnailActivateHandler=function(lightboxContainer){var enterKeyHandler=function(evt){if(evt.which===fluid.reorderer.keys.ENTER){var thumbnailAnchors=$("a",evt.target);document.location=thumbnailAnchors.attr("href")}};$(lightboxContainer).keypress(enterKeyHandler)};var seekNodesById=function(rootnode,tagname,idmatch){var inputs=rootnode.getElementsByTagName(tagname);var togo=[];for(var i=0;i<inputs.length;i+=1){var input=inputs[i];var id=input.id;if(id&&id.match(idmatch)){togo.push(input)}}return togo};var createItemFinder=function(parentNode,containerId){var lightboxCellNamePattern="^"+deriveLightboxCellBase(containerId,"[0-9]+")+"$";return function(){return seekNodesById(parentNode,"div",lightboxCellNamePattern)}};var findForm=function(element){while(element){if(element.nodeName.toLowerCase()==="form"){return element}element=element.parentNode}};var defaultAfterMoveCallback=function(lightboxContainer){var reorderform=findForm(lightboxContainer);return function(){var inputs,i;inputs=seekNodesById(reorderform,"input","^"+deriveLightboxCellBase(lightboxContainer.id,"[^:]*")+"reorder-index$");for(i=0;i<inputs.length;i+=1){inputs[i].value=i}if(reorderform&&reorderform.action){$.post(reorderform.action,$(reorderform).serialize(),function(type,data,evt){})}}};fluid.defaults("fluid.reorderImages",{layoutHandler:"fluid.gridLayoutHandler",selectors:{imageTitle:".flc-reorderer-imageTitle"}});fluid.reorderImages=function(container,options){var that=fluid.initView("fluid.reorderImages",container,options);var containerEl=fluid.unwrap(that.container);if(!that.options.afterMoveCallback){that.options.afterMoveCallback=defaultAfterMoveCallback(containerEl)}if(!that.options.selectors.movables){that.options.selectors.movables=createItemFinder(containerEl,containerEl.id)}var reorderer=fluid.reorderer(container,that.options);var movables=reorderer.locate("movables");fluid.transform(movables,function(cell){fluid.reorderImages.addAriaRoles(that.options.selectors.imageTitle,cell)});fluid.tabindex($("a",container),-1);addThumbnailActivateHandler(container);return reorderer};fluid.reorderImages.addAriaRoles=function(imageTitle,cell){cell=$(cell);cell.attr("role","img");var title=$(imageTitle,cell);if(title[0]===cell[0]||title[0]===document){fluid.fail("Could not locate cell title using selector "+imageTitle+" in context "+fluid.dumpEl(cell))}var titleId=fluid.allocateSimpleId(title);cell.attr("aria-labelledby",titleId);var image=$("img",cell);image.attr("role","presentation");image.attr("alt","")};fluid.lightbox=fluid.reorderImages})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};fluid.moduleLayout=fluid.moduleLayout||{};(function($,fluid){var findColumnAndItemIndices=function(item,layout){return fluid.find(layout.columns,function(column,colIndex){var index=$.inArray(item,column.elements);return index===-1?null:{columnIndex:colIndex,itemIndex:index}},{columnIndex:-1,itemIndex:-1})};var findColIndex=function(item,layout){return fluid.find(layout.columns,function(column,colIndex){return item===column.container?colIndex:null},-1)};fluid.moduleLayout.updateLayout=function(item,target,position,layout){item=fluid.unwrap(item);target=fluid.unwrap(target);var itemIndices=findColumnAndItemIndices(item,layout);layout.columns[itemIndices.columnIndex].elements.splice(itemIndices.itemIndex,1);var targetCol;if(position===fluid.position.INSIDE){targetCol=layout.columns[findColIndex(target,layout)].elements;targetCol.splice(targetCol.length,0,item)}else{var relativeItemIndices=findColumnAndItemIndices(target,layout);targetCol=layout.columns[relativeItemIndices.columnIndex].elements;position=fluid.normalisePosition(position,itemIndices.columnIndex===relativeItemIndices.columnIndex,relativeItemIndices.itemIndex,itemIndices.itemIndex);var relative=position===fluid.position.BEFORE?0:1;targetCol.splice(relativeItemIndices.itemIndex+relative,0,item)}};fluid.moduleLayout.layoutFromFlat=function(container,columns,portlets){var layout={};layout.container=container;layout.columns=fluid.transform(columns,function(column){return{container:column,elements:$.makeArray(portlets.filter(function(){return fluid.dom.isContainer(column,this)}))}});return layout};fluid.moduleLayout.layoutFromIds=function(idLayout){return{container:fluid.byId(idLayout.id),columns:fluid.transform(idLayout.columns,function(column){return{container:fluid.byId(column.id),elements:fluid.transform(column.children,fluid.byId)}})}};fluid.moduleLayout.layoutToIds=function(idLayout){return{id:fluid.getId(idLayout.container),columns:fluid.transform(idLayout.columns,function(column){return{id:fluid.getId(column.container),children:fluid.transform(column.elements,fluid.getId)}})}};var defaultOnShowKeyboardDropWarning=function(item,dropWarning){if(dropWarning){var offset=$(item).offset();dropWarning=$(dropWarning);dropWarning.css("position","absolute");dropWarning.css("top",offset.top);dropWarning.css("left",offset.left)}};fluid.defaults(true,"fluid.moduleLayoutHandler",{orientation:fluid.orientation.VERTICAL,containerRole:fluid.reorderer.roles.REGIONS,selectablesTabindex:0,sentinelize:true});fluid.moduleLayoutHandler=function(container,options,dropManager,dom){var that={};function computeLayout(){var togo;if(options.selectors.modules){togo=fluid.moduleLayout.layoutFromFlat(container,dom.locate("columns"),dom.locate("modules"))}if(!togo){var idLayout=fluid.model.getBeanValue(options,"moduleLayout.layout");fluid.moduleLayout.layoutFromIds(idLayout)}return togo}var layout=computeLayout();that.layout=layout;function isLocked(item){var lockedModules=options.selectors.lockedModules?dom.fastLocate("lockedModules"):[];return $.inArray(item,lockedModules)!==-1}that.getRelativePosition=fluid.reorderer.relativeInfoGetter(options.orientation,fluid.reorderer.WRAP_LOCKED_STRATEGY,fluid.reorderer.GEOMETRIC_STRATEGY,dropManager,dom);that.getGeometricInfo=function(){var extents=[];var togo={extents:extents,sentinelize:options.sentinelize};togo.elementMapper=function(element){return isLocked(element)?"locked":null};for(var col=0;col<layout.columns.length;col++){var column=layout.columns[col];var thisEls={orientation:options.orientation,elements:$.makeArray(column.elements),parentElement:column.container};extents.push(thisEls)}return togo};function computeModules(all){return function(){var modules=fluid.accumulate(layout.columns,function(column,list){return list.concat(column.elements)},[]);if(!all){fluid.remove_if(modules,isLocked)}return modules}}that.returnedOptions={selectors:{movables:computeModules(false),dropTargets:computeModules(false),selectables:computeModules(true)},listeners:{onMove:function(item,requestedPosition){fluid.moduleLayout.updateLayout(item,requestedPosition.element,requestedPosition.position,layout)},onRefresh:function(){layout=computeLayout();that.layout=layout},"onShowKeyboardDropWarning.setPosition":defaultOnShowKeyboardDropWarning}};that.getModel=function(){return fluid.moduleLayout.layoutToIds(layout)};return that}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.reorderLayout=function(container,userOptions){var assembleOptions={layoutHandler:"fluid.moduleLayoutHandler",selectors:{columns:".flc-reorderer-column",modules:".flc-reorderer-module"}};var options=$.extend(true,assembleOptions,userOptions);return fluid.reorderer(container,options)}})(jQuery,fluid_1_1);
+/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
+       Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
+       This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],objIdArr=[],listenersArr=[],script,timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7")}catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always"}catch(e){if(playerVersion[0]==6){fp6Crash=true}}if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX)}catch(e){}}}if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)]}}catch(e){}}}}var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u);
+/*@cc_on
+                       ie = true;
+                       @if (@_win32)
+                               windows = true;
+                       @elif (@_mac)
+                               mac = true;
+                       @end
+               @*/
+return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac}}();var onDomLoad=function(){if(!ua.w3cdom){return }addDomLoadEvent(main);if(ua.ie&&ua.win){try{doc.write("<script id=__ie_ondomload defer=true src=//:><\/script>");script=getElementById("__ie_ondomload");if(script){addListener(script,"onreadystatechange",checkReadyState)}}catch(e){}}if(ua.webkit&&typeof doc.readyState!=UNDEF){timer=setInterval(function(){if(/loaded|complete/.test(doc.readyState)){callDomLoadFunctions()}},10)}if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null)}addLoadEvent(callDomLoadFunctions)}();function checkReadyState(){if(script.readyState=="complete"){script.parentNode.removeChild(script);callDomLoadFunctions()}}function callDomLoadFunctions(){if(isDomLoaded){return }if(ua.ie&&ua.win){var s=createElement("span");try{var t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t)}catch(e){return }}isDomLoaded=true;if(timer){clearInterval(timer);timer=null}var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]()}}function addDomLoadEvent(fn){if(isDomLoaded){fn()}else{domLoadFnArr[domLoadFnArr.length]=fn}}function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false)}else{if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false)}else{if(typeof win.attachEvent!=UNDEF){addListener(win,"onload",fn)}else{if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn()}}else{win.onload=fn}}}}}function main(){var rl=regObjArr.length;for(var i=0;i<rl;i++){var id=regObjArr[i].id;if(ua.pv[0]>0){var obj=getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312){fixParams(obj)}setVisibility(id,true)}else{if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i])}else{displayAltContent(obj)}}}}else{setVisibility(id,true)}}}function fixParams(obj){var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i<al;i++){if(a[i].nodeName=="DATA"){e.setAttribute("src",a[i].nodeValue)}else{e.setAttribute(a[i].nodeName,a[i].nodeValue)}}}var c=nestedObj.childNodes;if(c){var cl=c.length;for(var j=0;j<cl;j++){if(c[j].nodeType==1&&c[j].nodeName=="PARAM"){e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"))}}}obj.parentNode.replaceChild(e,obj)}}function showExpressInstall(regObj){isExpressInstallActive=true;var obj=getElementById(regObj.id);if(obj){if(regObj.altContentId){var ac=getElementById(regObj.altContentId);if(ac){storedAltContent=ac;storedAltContentId=regObj.altContentId}}else{storedAltContent=abstractAltContent(obj)}if(!(/%$/.test(regObj.width))&&parseInt(regObj.width,10)<310){regObj.width="310"}if(!(/%$/.test(regObj.height))&&parseInt(regObj.height,10)<137){regObj.height="137"}doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",dt=doc.title,fv="MMredirectURL="+win.location+"&MMplayerType="+pt+"&MMdoctitle="+dt,replaceId=regObj.id;if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceId+="SWFObjectNew";newObj.setAttribute("id",replaceId);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addListener(win,"onload",fn)}createSWF({data:regObj.expressInstall,id:EXPRESS_INSTALL_ID,width:regObj.width,height:regObj.height},{flashvars:fv},replaceId)}}function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addListener(win,"onload",fn)}else{obj.parentNode.replaceChild(abstractAltContent(obj),obj)}}function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML}else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName=="PARAM")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true))}}}}}return ac}function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(el){if(typeof attObj.id==UNDEF){attObj.id=id}if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){parObj.movie=attObj[i]}else{if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"'}else{if(i.toLowerCase()!="classid"){att+=" "+i+'="'+attObj[i]+'"'}}}}}var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />'}}el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+">"+par+"</object>";objIdArr[objIdArr.length]=attObj.id;r=getElementById(attObj.id)}else{if(ua.webkit&&ua.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if(attObj[k]!=Object.prototype[k]){if(k.toLowerCase()=="data"){e.setAttribute("src",attObj[k])}else{if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj[k])}else{if(k.toLowerCase()!="classid"){e.setAttribute(k,attObj[k])}}}}}for(var l in parObj){if(parObj[l]!=Object.prototype[l]){if(l.toLowerCase()!="movie"){e.setAttribute(l,parObj[l])}}}el.parentNode.replaceChild(e,el);r=e}else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m])}else{if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj[m])}}}}for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,parObj[n])}}el.parentNode.replaceChild(o,el);r=o}}}return r}function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p)}function removeSWF(id){var obj=getElementById(id);if(obj&&(obj.nodeName=="OBJECT"||obj.nodeName=="EMBED")){if(ua.ie&&ua.win){if(obj.readyState==4){removeObjectInIE(id)}else{win.attachEvent("onload",function(){removeObjectInIE(id)})}}else{obj.parentNode.removeChild(obj)}}}function removeObjectInIE(id){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null}}obj.parentNode.removeChild(obj)}}function getElementById(id){var el=null;try{el=doc.getElementById(id)}catch(e){}return el}function createElement(el){return doc.createElement(el)}function addListener(target,eventType,fn){target.attachEvent(eventType,fn);listenersArr[listenersArr.length]=[target,eventType,fn]}function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false}function createCSS(sel,decl){if(ua.ie&&ua.mac){return }var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.createTextNode(sel+" {"+decl+"}"))}h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl)}}}function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded&&getElementById(id)){getElementById(id).style.visibility=v}else{createCSS("#"+id,"visibility:"+v)}}function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBadChars=regex.exec(s)!=null;return hasBadChars?encodeURIComponent(s):s}var cleanup=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var ll=listenersArr.length;for(var i=0;i<ll;i++){listenersArr[i][0].detachEvent(listenersArr[i][1],listenersArr[i][2])}var il=objIdArr.length;for(var j=0;j<il;j++){removeSWF(objIdArr[j])}for(var k in ua){ua[k]=null}ua=null;for(var l in swfobject){swfobject[l]=null}swfobject=null})}}();return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr){if(!ua.w3cdom||!objectIdStr||!swfVersionStr){return }var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr?xiSwfUrlStr:false;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false)},getObjectById:function(objectIdStr){var r=null;if(ua.w3cdom){var o=getElementById(objectIdStr);if(o){var n=o.getElementsByTagName(OBJECT)[0];if(!n||(n&&typeof o.SetVariable!=UNDEF)){r=o}else{if(typeof n.SetVariable!=UNDEF){r=n}}}}return r},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj){if(!ua.w3cdom||!swfUrlStr||!replaceElemIdStr||!widthStr||!heightStr||!swfVersionStr){return }widthStr+="";heightStr+="";if(hasPlayerVersion(swfVersionStr)){setVisibility(replaceElemIdStr,false);var att={};if(attObj&&typeof attObj===OBJECT){for(var i in attObj){if(attObj[i]!=Object.prototype[i]){att[i]=attObj[i]}}}att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par={};if(parObj&&typeof parObj===OBJECT){for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par[j]=parObj[j]}}}if(flashvarsObj&&typeof flashvarsObj===OBJECT){for(var k in flashvarsObj){if(flashvarsObj[k]!=Object.prototype[k]){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+k+"="+flashvarsObj[k]}else{par.flashvars=k+"="+flashvarsObj[k]}}}}addDomLoadEvent(function(){createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true)}})}else{if(xiSwfUrlStr&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){isExpressInstallActive=true;setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){var regObj={};regObj.id=regObj.altContentId=replaceElemIdStr;regObj.width=widthStr;regObj.height=heightStr;regObj.expressInstall=xiSwfUrlStr;showExpressInstall(regObj)})}}},getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]}},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3cdom){return createSWF(attObj,parObj,replaceElemIdStr)}else{return undefined}},removeSWF:function(objElemIdStr){if(ua.w3cdom){removeSWF(objElemIdStr)}},createCSS:function(sel,decl){if(ua.w3cdom){createCSS(sel,decl)}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(param==null){return urlEncodeIfNecessary(q)}if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(isExpressInstallActive&&storedAltContent){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block"}}storedAltContent=null;storedAltContentId=null;isExpressInstallActive=false}}}}}();var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(settings){this.initSWFUpload(settings)}}SWFUpload.prototype.initSWFUpload=function(settings){try{this.customSettings={};this.settings=settings;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(ex){delete SWFUpload.instances[this.movieName];throw ex}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 2009-03-25";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.completeURL=function(url){if(typeof (url)!=="string"||url.match(/^https?:\/\//i)||url.match(/^\//)){return url}var currentURL=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");var indexSlash=window.location.pathname.lastIndexOf("/");if(indexSlash<=0){path="/"}else{path=window.location.pathname.substr(0,indexSlash)+"/"}return path+url};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(settingName,defaultValue){this.settings[settingName]=(this.settings[settingName]==undefined)?defaultValue:this.settings[settingName]};this.ensureDefault("upload_url","");this.ensureDefault("preserve_relative_urls",false);this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",false);this.ensureDefault("requeue_on_error",false);this.ensureDefault("http_success",[]);this.ensureDefault("assume_success_timeout",0);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",true);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",false);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_placeholder",null);this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+new Date().getTime()}if(!this.settings.preserve_relative_urls){this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url)}delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){var targetElement,tempParent;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added"}targetElement=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;if(targetElement==undefined){throw"Could not find the placeholder element: "+this.settings.button_placeholder_id}tempParent=document.createElement("div");tempParent.innerHTML=this.getFlashHTML();targetElement.parentNode.replaceChild(tempParent.firstChild,targetElement);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement()}};SWFUpload.prototype.getFlashHTML=function(){return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.settings.flash_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload">','<param name="wmode" value="',this.settings.button_window_mode,'" />','<param name="movie" value="',this.settings.flash_url,'" />','<param name="quality" value="high" />','<param name="menu" value="false" />','<param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+this.getFlashVars()+'" />',"</object>"].join("")};SWFUpload.prototype.getFlashVars=function(){var paramString=this.buildParamString();var httpSuccessString=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;useQueryString=",encodeURIComponent(this.settings.use_query_string),"&amp;requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&amp;httpSuccess=",encodeURIComponent(httpSuccessString),"&amp;assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&amp;params=",encodeURIComponent(paramString),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),"&amp;fileTypes=",encodeURIComponent(this.settings.file_types),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&amp;fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonText=",encodeURIComponent(this.settings.button_text),"&amp;buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&amp;buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&amp;buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&amp;buttonAction=",encodeURIComponent(this.settings.button_action),"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&amp;buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("")};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName)}if(this.movieElement===null){throw"Could not find Flash element"}return this.movieElement};SWFUpload.prototype.buildParamString=function(){var postParams=this.settings.post_params;var paramStringPairs=[];if(typeof (postParams)==="object"){for(var name in postParams){if(postParams.hasOwnProperty(name)){paramStringPairs.push(encodeURIComponent(name.toString())+"="+encodeURIComponent(postParams[name].toString()))}}}return paramStringPairs.join("&amp;")};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var movieElement=null;movieElement=this.getMovieElement();if(movieElement&&typeof (movieElement.CallFunction)==="unknown"){for(var i in movieElement){try{if(typeof (movieElement[i])==="function"){movieElement[i]=null}}catch(ex1){}}try{movieElement.parentNode.removeChild(movieElement)}catch(ex){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true}catch(ex2){return false}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url:               ",this.settings.upload_url,"\n","\t","flash_url:                ",this.settings.flash_url,"\n","\t","use_query_string:         ",this.settings.use_query_string.toString(),"\n","\t","requeue_on_error:         ",this.settings.requeue_on_error.toString(),"\n","\t","http_success:             ",this.settings.http_success.join(", "),"\n","\t","assume_success_timeout:   ",this.settings.assume_success_timeout,"\n","\t","file_post_name:           ",this.settings.file_post_name,"\n","\t","post_params:              ",this.settings.post_params.toString(),"\n","\t","file_types:               ",this.settings.file_types,"\n","\t","file_types_description:   ",this.settings.file_types_description,"\n","\t","file_size_limit:          ",this.settings.file_size_limit,"\n","\t","file_upload_limit:        ",this.settings.file_upload_limit,"\n","\t","file_queue_limit:         ",this.settings.file_queue_limit,"\n","\t","debug:                    ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching:      ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id:    ",this.settings.button_placeholder_id.toString(),"\n","\t","button_placeholder:       ",(this.settings.button_placeholder?"Set":"Not Set"),"\n","\t","button_image_url:         ",this.settings.button_image_url.toString(),"\n","\t","button_width:             ",this.settings.button_width.toString(),"\n","\t","button_height:            ",this.settings.button_height.toString(),"\n","\t","button_text:              ",this.settings.button_text.toString(),"\n","\t","button_text_style:        ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding:  ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action:            ",this.settings.button_action.toString(),"\n","\t","button_disabled:          ",this.settings.button_disabled.toString(),"\n","\t","custom_settings:          ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned:  ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n","\t","file_queued_handler assigned:       ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","file_queue_error_handler assigned:  ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n","\t","upload_start_handler assigned:      ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned:   ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned:      ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned:    ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned:   ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","debug_handler assigned:             ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""))};SWFUpload.prototype.addSetting=function(name,value,default_value){if(value==undefined){return(this.settings[name]=default_value)}else{return(this.settings[name]=value)}};SWFUpload.prototype.getSetting=function(name){if(this.settings[name]!=undefined){return this.settings[name]}return""};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction('<invoke name="'+functionName+'" returntype="javascript">'+__flash__argumentsToXML(argumentArray,0)+"</invoke>");returnValue=eval(returnString)}catch(ex){throw"Call to "+functionName+" failed"}if(returnValue!=undefined&&typeof returnValue.post==="object"){returnValue=this.unescapeFilePostParams(returnValue)}return returnValue};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")};SWFUpload.prototype.startUpload=function(fileID){this.callFlash("StartUpload",[fileID])};SWFUpload.prototype.cancelUpload=function(fileID,triggerErrorEvent){if(triggerErrorEvent!==false){triggerErrorEvent=true}this.callFlash("CancelUpload",[fileID,triggerErrorEvent])};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")};SWFUpload.prototype.setStats=function(statsObject){this.callFlash("SetStats",[statsObject])};SWFUpload.prototype.getFile=function(fileID){if(typeof (fileID)==="number"){return this.callFlash("GetFileByIndex",[fileID])}else{return this.callFlash("GetFile",[fileID])}};SWFUpload.prototype.addFileParam=function(fileID,name,value){return this.callFlash("AddFileParam",[fileID,name,value])};SWFUpload.prototype.removeFileParam=function(fileID,name){this.callFlash("RemoveFileParam",[fileID,name])};SWFUpload.prototype.setUploadURL=function(url){this.settings.upload_url=url.toString();this.callFlash("SetUploadURL",[url])};SWFUpload.prototype.setPostParams=function(paramsObject){this.settings.post_params=paramsObject;this.callFlash("SetPostParams",[paramsObject])};SWFUpload.prototype.addPostParam=function(name,value){this.settings.post_params[name]=value;this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(name){delete this.settings.post_params[name];this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(types,description){this.settings.file_types=types;this.settings.file_types_description=description;this.callFlash("SetFileTypes",[types,description])};SWFUpload.prototype.setFileSizeLimit=function(fileSizeLimit){this.settings.file_size_limit=fileSizeLimit;this.callFlash("SetFileSizeLimit",[fileSizeLimit])};SWFUpload.prototype.setFileUploadLimit=function(fileUploadLimit){this.settings.file_upload_limit=fileUploadLimit;this.callFlash("SetFileUploadLimit",[fileUploadLimit])};SWFUpload.prototype.setFileQueueLimit=function(fileQueueLimit){this.settings.file_queue_limit=fileQueueLimit;this.callFlash("SetFileQueueLimit",[fileQueueLimit])};SWFUpload.prototype.setFilePostName=function(filePostName){this.settings.file_post_name=filePostName;this.callFlash("SetFilePostName",[filePostName])};SWFUpload.prototype.setUseQueryString=function(useQueryString){this.settings.use_query_string=useQueryString;this.callFlash("SetUseQueryString",[useQueryString])};SWFUpload.prototype.setRequeueOnError=function(requeueOnError){this.settings.requeue_on_error=requeueOnError;this.callFlash("SetRequeueOnError",[requeueOnError])};SWFUpload.prototype.setHTTPSuccess=function(http_status_codes){if(typeof http_status_codes==="string"){http_status_codes=http_status_codes.replace(" ","").split(",")}this.settings.http_success=http_status_codes;this.callFlash("SetHTTPSuccess",[http_status_codes])};SWFUpload.prototype.setAssumeSuccessTimeout=function(timeout_seconds){this.settings.assume_success_timeout=timeout_seconds;this.callFlash("SetAssumeSuccessTimeout",[timeout_seconds])};SWFUpload.prototype.setDebugEnabled=function(debugEnabled){this.settings.debug_enabled=debugEnabled;this.callFlash("SetDebugEnabled",[debugEnabled])};SWFUpload.prototype.setButtonImageURL=function(buttonImageURL){if(buttonImageURL==undefined){buttonImageURL=""}this.settings.button_image_url=buttonImageURL;this.callFlash("SetButtonImageURL",[buttonImageURL])};SWFUpload.prototype.setButtonDimensions=function(width,height){this.settings.button_width=width;this.settings.button_height=height;var movie=this.getMovieElement();if(movie!=undefined){movie.style.width=width+"px";movie.style.height=height+"px"}this.callFlash("SetButtonDimensions",[width,height])};SWFUpload.prototype.setButtonText=function(html){this.settings.button_text=html;this.callFlash("SetButtonText",[html])};SWFUpload.prototype.setButtonTextPadding=function(left,top){this.settings.button_text_top_padding=top;this.settings.button_text_left_padding=left;this.callFlash("SetButtonTextPadding",[left,top])};SWFUpload.prototype.setButtonTextStyle=function(css){this.settings.button_text_style=css;this.callFlash("SetButtonTextStyle",[css])};SWFUpload.prototype.setButtonDisabled=function(isDisabled){this.settings.button_disabled=isDisabled;this.callFlash("SetButtonDisabled",[isDisabled])};SWFUpload.prototype.setButtonAction=function(buttonAction){this.settings.button_action=buttonAction;this.callFlash("SetButtonAction",[buttonAction])};SWFUpload.prototype.setButtonCursor=function(cursor){this.settings.button_cursor=cursor;this.callFlash("SetButtonCursor",[cursor])};SWFUpload.prototype.queueEvent=function(handlerName,argumentArray){if(argumentArray==undefined){argumentArray=[]}else{if(!(argumentArray instanceof Array)){argumentArray=[argumentArray]}}var self=this;if(typeof this.settings[handlerName]==="function"){this.eventQueue.push(function(){this.settings[handlerName].apply(this,argumentArray)});setTimeout(function(){self.executeNextEvent()},0)}else{if(this.settings[handlerName]!==null){throw"Event handler "+handlerName+" is unknown or is not a function"}}};SWFUpload.prototype.executeNextEvent=function(){var f=this.eventQueue?this.eventQueue.shift():null;if(typeof (f)==="function"){f.apply(this)}};SWFUpload.prototype.unescapeFilePostParams=function(file){var reg=/[$]([0-9a-f]{4})/i;var unescapedPost={};var uk;if(file!=undefined){for(var k in file.post){if(file.post.hasOwnProperty(k)){uk=k;var match;while((match=reg.exec(uk))!==null){uk=uk.replace(match[0],String.fromCharCode(parseInt("0x"+match[1],16)))}unescapedPost[uk]=file.post[k]}}file.post=unescapedPost}return file};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface")}catch(ex){return false}};SWFUpload.prototype.flashReady=function(){var movieElement=this.getMovieElement();if(!movieElement){this.debug("Flash called back ready but the flash movie can't be found.");return }this.cleanUp(movieElement);this.queueEvent("swfupload_loaded_handler")};SWFUpload.prototype.cleanUp=function(movieElement){try{if(this.movieElement&&typeof (movieElement.CallFunction)==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var key in movieElement){try{if(typeof (movieElement[key])==="function"){movieElement[key]=null}}catch(ex){}}}}catch(ex1){}window.__flash__removeCallback=function(instance,name){try{if(instance){instance[name]=null}}catch(flashEx){}}};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")};SWFUpload.prototype.fileQueued=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("file_queued_handler",file)};SWFUpload.prototype.fileQueueError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("file_queue_error_handler",[file,errorCode,message])};SWFUpload.prototype.fileDialogComplete=function(numFilesSelected,numFilesQueued,numFilesInQueue){this.queueEvent("file_dialog_complete_handler",[numFilesSelected,numFilesQueued,numFilesInQueue])};SWFUpload.prototype.uploadStart=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("return_upload_start_handler",file)};SWFUpload.prototype.returnUploadStart=function(file){var returnValue;if(typeof this.settings.upload_start_handler==="function"){file=this.unescapeFilePostParams(file);returnValue=this.settings.upload_start_handler.call(this,file)}else{if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function"}}if(returnValue===undefined){returnValue=true}returnValue=!!returnValue;this.callFlash("ReturnUploadStart",[returnValue])};SWFUpload.prototype.uploadProgress=function(file,bytesComplete,bytesTotal){file=this.unescapeFilePostParams(file);this.queueEvent("upload_progress_handler",[file,bytesComplete,bytesTotal])};SWFUpload.prototype.uploadError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("upload_error_handler",[file,errorCode,message])};SWFUpload.prototype.uploadSuccess=function(file,serverData,responseReceived){file=this.unescapeFilePostParams(file);this.queueEvent("upload_success_handler",[file,serverData,responseReceived])};SWFUpload.prototype.uploadComplete=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("upload_complete_handler",file)};SWFUpload.prototype.debug=function(message){this.queueEvent("debug_handler",message)};SWFUpload.prototype.debugMessage=function(message){if(this.settings.debug){var exceptionMessage,exceptionValues=[];if(typeof message==="object"&&typeof message.name==="string"&&typeof message.message==="string"){for(var key in message){if(message.hasOwnProperty(key)){exceptionValues.push(key+": "+message[key])}}exceptionMessage=exceptionValues.join("\n")||"";exceptionValues=exceptionMessage.split("\n");exceptionMessage="EXCEPTION: "+exceptionValues.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(exceptionMessage)}else{SWFUpload.Console.writeLine(message)}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(message){var console,documentForm;try{console=document.getElementById("SWFUpload_Console");if(!console){documentForm=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(documentForm);console=document.createElement("textarea");console.id="SWFUpload_Console";console.style.fontFamily="monospace";console.setAttribute("wrap","off");console.wrap="off";console.style.overflow="auto";console.style.width="700px";console.style.height="350px";console.style.margin="5px";documentForm.appendChild(console)}console.value+=message+"\n";console.scrollTop=console.scrollHeight-console.clientHeight}catch(ex){alert("Exception: "+ex.name+" Message: "+ex.message)}};fluid_1_1=fluid_1_1||{};(function($,fluid){var animateDisplay=function(elm,animation,defaultAnimation){animation=(animation)?animation:defaultAnimation;elm.animate(animation.params,animation.duration,animation.callback)};var animateProgress=function(elm,width,speed){elm.queue("fx",[]);elm.animate({width:width,queue:false},speed)};var showProgress=function(that,animation){if(animation===false){that.displayElement.show()}else{animateDisplay(that.displayElement,animation,that.options.showAnimation)}};var hideProgress=function(that,delay,animation){delay=(delay===null||isNaN(delay))?that.options.delay:delay;if(delay){var timeOut=setTimeout(function(){hideProgress(that,0,animation)},delay)}else{if(animation===false){that.displayElement.hide()}else{animateDisplay(that.displayElement,animation,that.options.hideAnimation)}}};var updateWidth=function(that,newWidth,dontAnimate){dontAnimate=dontAnimate||false;var currWidth=that.indicator.width();var direction=that.options.animate;if((newWidth>currWidth)&&(direction==="both"||direction==="forward")&&!dontAnimate){animateProgress(that.indicator,newWidth,that.options.speed)}else{if((newWidth<currWidth)&&(direction==="both"||direction==="backward")&&!dontAnimate){animateProgress(that.indicator,newWidth,that.options.speed)}else{that.indicator.width(newWidth)}}};var percentToPixels=function(that,percent){return Math.round((Math.min(percent,100)*that.progressBar.width())/100)};var refreshRelativeWidth=function(that){var pixels=Math.max(percentToPixels(that,parseFloat(that.storedPercent)),that.options.minWidth);updateWidth(that,pixels,true)};var initARIA=function(ariaElement){ariaElement.attr("role","progressbar");ariaElement.attr("aria-valuemin","0");ariaElement.attr("aria-valuemax","100");ariaElement.attr("aria-live","assertive");ariaElement.attr("aria-busy","false");ariaElement.attr("aria-valuenow","0");ariaElement.attr("aria-valuetext","")};var updateARIA=function(that,percent){var busy=percent<100&&percent>0;that.ariaElement.attr("aria-busy",busy);that.ariaElement.attr("aria-valuenow",percent);if(busy){var busyString=fluid.stringTemplate(that.options.ariaBusyText,{percentComplete:percent});that.ariaElement.attr("aria-valuetext",busyString)}else{if(percent===100){that.ariaElement.attr("aria-valuetext",that.options.ariaDoneText)}}};var updateText=function(label,value){label.html(value)};var repositionIndicator=function(that){that.indicator.css("top",that.progressBar.position().top).css("left",0).height(that.progressBar.height());refreshRelativeWidth(that)};var updateProgress=function(that,percent,labelText,animationForShow){showProgress(that,animationForShow);if(percent!==null){that.storedPercent=percent;var pixels=Math.max(percentToPixels(that,parseFloat(percent)),that.options.minWidth);updateWidth(that,pixels)}if(labelText!==null){updateText(that.label,labelText)}if(that.ariaElement){updateARIA(that,percent)}};var setupProgress=function(that){that.displayElement=that.locate("displayElement");if(that.options.initiallyHidden){that.displayElement.hide()}that.progressBar=that.locate("progressBar");that.label=that.locate("label");that.indicator=that.locate("indicator");that.ariaElement=that.locate("ariaElement");that.indicator.width(that.options.minWidth);that.storedPercent=0;if(that.ariaElement){initARIA(that.ariaElement)}};fluid.progress=function(container,options){var that=fluid.initView("fluid.progress",container,options);setupProgress(that);that.show=function(animation){showProgress(that,animation)};that.hide=function(delay,animation){hideProgress(that,delay,animation)};that.update=function(percentage,labelValue,animationForShow){updateProgress(that,percentage,labelValue,animationForShow)};that.refreshView=function(){repositionIndicator(that)};return that};fluid.defaults("fluid.progress",{selectors:{displayElement:".flc-progress",progressBar:".flc-progress-bar",indicator:".flc-progress-indicator",label:".flc-progress-label",ariaElement:".flc-progress-bar"},showAnimation:{params:{opacity:"show"},duration:"slow",callback:null},hideAnimation:{params:{opacity:"hide"},duration:"slow",callback:null},minWidth:5,delay:0,speed:200,animate:"forward",initiallyHidden:true,updatePosition:false,ariaBusyText:"Progress is %percentComplete percent complete",ariaDoneText:"Progress is complete."})})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var updateProgress=function(file,events,demoState,isUploading){if(!isUploading){return }var chunk=Math.min(demoState.chunkSize,file.size);demoState.bytesUploaded=Math.min(demoState.bytesUploaded+chunk,file.size);events.onFileProgress.fire(file,demoState.bytesUploaded,file.size)};var fireAfterFileComplete=function(that,file){if(that.swfUploadSettings){that.swfUploadSettings.upload_complete_handler(file)}else{that.events.afterFileComplete.fire(file)}};var finishAndContinueOrCleanup=function(that,file){that.queueManager.finishFile(file);if(that.queueManager.shouldUploadNextFile()){startUploading(that)}else{that.queueManager.complete()}};var finishUploading=function(that){if(!that.queue.isUploading){return }var file=that.demoState.currentFile;file.filestatus=fluid.uploader.fileStatusConstants.COMPLETE;that.events.onFileSuccess.fire(file);that.demoState.fileIdx++;finishAndContinueOrCleanup(that,file)};var simulateUpload=function(that){if(!that.queue.isUploading){return }var file=that.demoState.currentFile;if(that.demoState.bytesUploaded<file.size){that.invokeAfterRandomDelay(function(){updateProgress(file,that.events,that.demoState,that.queue.isUploading);simulateUpload(that)})}else{finishUploading(that)}};var startUploading=function(that){that.demoState.currentFile=that.queue.files[that.demoState.fileIdx];that.demoState.chunksForCurrentFile=Math.ceil(that.demoState.currentFile/that.demoState.chunkSize);that.demoState.bytesUploaded=0;that.queue.isUploading=true;that.events.onFileStart.fire(that.demoState.currentFile);that.demoState.currentFile.filestatus=fluid.uploader.fileStatusConstants.IN_PROGRESS;simulateUpload(that)};var stopDemo=function(that){var file=that.demoState.currentFile;file.filestatus=fluid.uploader.fileStatusConstants.CANCELLED;that.queue.shouldStop=true;that.events.onFileError.fire(file,fluid.uploader.errorConstants.UPLOAD_STOPPED,"The demo upload was paused by the user.");finishAndContinueOrCleanup(that,file);that.events.onUploadStop.fire()};var setupDemoUploadManager=function(that){if(that.options.simulateDelay===undefined||that.options.simulateDelay===null){that.options.simulateDelay=true}that.demoState={fileIdx:0,chunkSize:200000};return that};fluid.demoUploadManager=function(uploadManager){var that=uploadManager;that.start=function(){that.queueManager.start();startUploading(that)};that.stop=function(){stopDemo(that)};that.invokeAfterRandomDelay=function(fn){var delay;if(that.options.simulateDelay){delay=Math.floor(Math.random()*1000+100);setTimeout(fn,delay)}else{fn()}};setupDemoUploadManager(that);return that}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var filterFiles=function(files,filterFn){var filteredFiles=[];for(var i=0;i<files.length;i++){var file=files[i];if(filterFn(file)===true){filteredFiles.push(file)}}return filteredFiles};var getUploadedFiles=function(that){return filterFiles(that.files,function(file){return(file.filestatus===fluid.uploader.fileStatusConstants.COMPLETE)})};var getReadyFiles=function(that){return filterFiles(that.files,function(file){return(file.filestatus===fluid.uploader.fileStatusConstants.QUEUED||file.filestatus===fluid.uploader.fileStatusConstants.CANCELLED)})};var getErroredFiles=function(that){return filterFiles(that.files,function(file){return(file.filestatus===fluid.uploader.fileStatusConstants.ERROR)})};var removeFile=function(that,file){var idx=$.inArray(file,that.files);that.files.splice(idx,1)};var clearCurrentBatch=function(that){that.currentBatch={fileIdx:-1,files:[],totalBytes:0,numFilesCompleted:0,numFilesErrored:0,bytesUploadedForFile:0,previousBytesUploadedForFile:0,totalBytesUploaded:0}};var updateCurrentBatch=function(that){var readyFiles=that.getReadyFiles();that.currentBatch.files=readyFiles;that.currentBatch.totalBytes=fluid.fileQueue.sizeOfFiles(readyFiles)};var setupCurrentBatch=function(that){clearCurrentBatch(that);updateCurrentBatch(that)};fluid.fileQueue=function(){var that={};that.files=[];that.isUploading=false;that.addFile=function(file){that.files.push(file)};that.removeFile=function(file){removeFile(that,file)};that.totalBytes=function(){return fluid.fileQueue.sizeOfFiles(that.files)};that.getReadyFiles=function(){return getReadyFiles(that)};that.getErroredFiles=function(){return getErroredFiles(that)};that.sizeOfReadyFiles=function(){return fluid.fileQueue.sizeOfFiles(that.getReadyFiles())};that.getUploadedFiles=function(){return getUploadedFiles(that)};that.sizeOfUploadedFiles=function(){return fluid.fileQueue.sizeOfFiles(that.getUploadedFiles())};that.setupCurrentBatch=function(){setupCurrentBatch(that)};that.clearCurrentBatch=function(){clearCurrentBatch(that)};that.updateCurrentBatch=function(){updateCurrentBatch(that)};return that};fluid.fileQueue.sizeOfFiles=function(files){var totalBytes=0;for(var i=0;i<files.length;i++){var file=files[i];totalBytes+=file.size}return totalBytes};fluid.fileQueue.manager=function(queue,events){var that={};that.queue=queue;that.events=events;that.start=function(){that.queue.setupCurrentBatch();that.queue.isUploading=true;that.queue.shouldStop=false;that.events.onUploadStart.fire(that.queue.currentBatch.files)};that.startFile=function(){that.queue.currentBatch.fileIdx++;that.queue.currentBatch.bytesUploadedForFile=0;that.queue.currentBatch.previousBytesUploadedForFile=0};that.finishFile=function(file){var batch=that.queue.currentBatch;batch.numFilesCompleted++;that.events.afterFileComplete.fire(file)};that.shouldUploadNextFile=function(){return !that.queue.shouldStop&&that.queue.isUploading&&that.queue.currentBatch.numFilesCompleted<that.queue.currentBatch.files.length};that.complete=function(){that.events.afterUploadComplete.fire(that.queue.currentBatch.files);that.queue.clearCurrentBatch()};return that}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var refreshView=function(that){var maxHeight=that.options.maxHeight;var isOverMaxHeight=(that.scrollingElm.children().eq(0).height()>maxHeight);var setHeight=(isOverMaxHeight)?maxHeight:"";that.scrollingElm.height(setHeight)};var scrollBottom=function(that){that.scrollingElm[0].scrollTop=that.scrollingElm[0].scrollHeight};var scrollTo=function(that,element){if(!element||element.length<1){return }var padTop=0;var padBottom=0;var elmPosTop=element[0].offsetTop;var elmHeight=element.height();var containerScrollTop=that.scrollingElm[0].scrollTop;var containerHeight=that.scrollingElm.height();if(that.options.padScroll){var prevElmHeight=element.prev().height();padTop=(prevElmHeight+elmHeight<=containerHeight)?prevElmHeight:0;var nextElmHeight=element.next().height();padBottom=(nextElmHeight+elmHeight<=containerHeight)?nextElmHeight:0}if((elmPosTop-padTop)<containerScrollTop){that.scrollingElm[0].scrollTop=elmPosTop-padTop}if(((elmPosTop+elmHeight)+padBottom)>(containerScrollTop+containerHeight)){elmHeight=(elmHeight<containerHeight)?elmHeight:containerHeight;that.scrollingElm[0].scrollTop=(elmPosTop-containerHeight+elmHeight+padBottom)}};var setupScroller=function(that){that.scrollingElm=that.container.parents(that.options.selectors.wrapper);if(!that.scrollingElm.length){fluid.fail({name:"Missing Scroller",message:"The scroller wrapper element was not found."})}if(!$.browser.msie||$.browser.version>6){that.scrollingElm.css("max-height",that.options.maxHeight)}};fluid.scroller=function(container,options){var that=fluid.initView("fluid.scroller",container,options);setupScroller(that);that.scrollTo=function(element){scrollTo(that,element)};that.scrollBottom=function(){scrollBottom(that)};that.refreshView=function(){if($.browser.msie&&$.browser.version<7){refreshView(that)}};that.refreshView();return that};fluid.defaults("fluid.scroller",{selectors:{wrapper:".flc-scroller"},maxHeight:180,padScroll:true})})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var unbindSelectFiles=function(){var emptyFunction=function(){};SWFUpload.prototype.selectFile=emptyFunction;SWFUpload.prototype.selectFiles=emptyFunction};var prepareUpstreamOptions=function(that,uploader){that.returnedOptions={uploadManager:{type:uploader.options.uploadManager.type||uploader.options.uploadManager}}};var createAfterReadyHandler=function(that,uploader){return function(){var flashMovie=$("#"+uploader.uploadManager.swfUploader.movieName,uploader.container);var browseButton=uploader.locate("browseButton");fluid.tabindex(flashMovie,0);flashMovie.attr("role","button");flashMovie.attr("alt","Browse files button");if(that.isTransparent){flashMovie.addClass(that.options.styles.browseButtonOverlay);flashMovie.css("top",browseButton.position().top);flashMovie.css("left",browseButton.position().left)}}};var createFlash9MovieContainer=function(){var container=$("<div class='fl-uploader-flash9-container'></div>");var placeholder=$("<span></span>");var placeholderId=fluid.allocateSimpleId(placeholder);container.append(placeholder);$("body").append(container);return placeholderId};var setupForFlash9=function(that,uploader){that.returnedOptions.uploadManager.options={flashURL:that.options.flash9URL||undefined,flashButtonPeerId:createFlash9MovieContainer()}};var createEmptyPlaceholder=function(){var placeholder=$("<span></span>");fluid.allocateSimpleId(placeholder);return placeholder};var createButtonPlaceholder=function(browseButton){var placeholder=$("<span></span>");var placeholderId=fluid.allocateSimpleId(placeholder);browseButton.before(placeholder);unbindSelectFiles();return placeholderId};var setupForFlash10=function(that,uploader){var browseButton=uploader.locate("browseButton");fluid.tabindex(browseButton,-1);that.isTransparent=that.options.flashButtonAlwaysVisible?false:(!$.browser.msie||that.options.transparentEvenInIE);var peerId=that.isTransparent?createButtonPlaceholder(browseButton):fluid.allocateSimpleId(browseButton);that.returnedOptions.uploadManager.options={flashURL:that.options.flash10URL||undefined,flashButtonImageURL:that.isTransparent?undefined:that.options.flashButtonImageURL,flashButtonPeerId:peerId,flashButtonHeight:that.isTransparent?browseButton.outerHeight():that.options.flashButtonHeight,flashButtonWidth:that.isTransparent?browseButton.outerWidth():that.options.flashButtonWidth,flashButtonWindowMode:that.isTransparent?SWFUpload.WINDOW_MODE.TRANSPARENT:SWFUpload.WINDOW_MODE.OPAQUE,flashButtonCursorEffect:SWFUpload.CURSOR.HAND,listeners:{afterReady:createAfterReadyHandler(that,uploader),onUploadStart:function(){uploader.uploadManager.swfUploader.setButtonDisabled(true)},afterUploadComplete:function(){uploader.uploadManager.swfUploader.setButtonDisabled(false)}}}};fluid.swfUploadSetupDecorator=function(uploader,options){var that={};fluid.mergeComponentOptions(that,"fluid.swfUploadSetupDecorator",options);that.flashVersion=swfobject.getFlashPlayerVersion().major;prepareUpstreamOptions(that,uploader);if(that.flashVersion===9){setupForFlash9(that,uploader)}else{setupForFlash10(that,uploader)}return that};fluid.defaults("fluid.swfUploadSetupDecorator",{flashButtonAlwaysVisible:true,transparentEvenInIE:false,flashButtonImageURL:"../images/browse.png",flashButtonHeight:22,flashButtonWidth:106,styles:{browseButtonOverlay:"fl-uploader-browse-overlay"}});var swfUploadOptionsMap={uploadURL:"upload_url",flashURL:"flash_url",postParams:"post_params",fileSizeLimit:"file_size_limit",fileTypes:"file_types",fileTypesDescription:"file_types_description",fileUploadLimit:"file_upload_limit",fileQueueLimit:"file_queue_limit",flashButtonPeerId:"button_placeholder_id",flashButtonImageURL:"button_image_url",flashButtonHeight:"button_height",flashButtonWidth:"button_width",flashButtonWindowMode:"button_window_mode",flashButtonCursorEffect:"button_cursor",debug:"debug"};var swfUploadEventMap={afterReady:"swfupload_loaded_handler",onFileDialog:"file_dialog_start_handler",afterFileQueued:"file_queued_handler",onQueueError:"file_queue_error_handler",afterFileDialog:"file_dialog_complete_handler",onFileStart:"upload_start_handler",onFileProgress:"upload_progress_handler",onFileError:"upload_error_handler",onFileSuccess:"upload_success_handler"};var mapNames=function(nameMap,source,target){var result=target||{};for(var key in source){var mappedKey=nameMap[key];if(mappedKey){result[mappedKey]=source[key]}}return result};var mapEvents=function(that,nameMap,target){var result=target||{};for(var eventType in that.events){var fireFn=that.events[eventType].fire;var mappedName=nameMap[eventType];if(mappedName){result[mappedName]=fireFn}}result.upload_complete_handler=function(file){that.queueManager.finishFile(file);if(that.queueManager.shouldUploadNextFile()){that.swfUploader.startUpload()}else{if(that.queueManager.queue.shouldStop){that.swfUploader.stopUpload()}that.queueManager.complete()}};return result};var browse=function(that){if(that.queue.isUploading){return }if(that.options.fileQueueLimit===1){that.swfUploader.selectFile()}else{that.swfUploader.selectFiles()}};var stopUpload=function(that){that.queue.shouldStop=true;that.events.onUploadStop.fire()};var bindEvents=function(that){var fileStatusUpdater=function(file){fluid.find(that.queue.files,function(potentialMatch){if(potentialMatch.id===file.id){potentialMatch.filestatus=file.filestatus;return true}})};that.events.afterFileQueued.addListener(function(file){that.queue.addFile(file)});that.events.onFileStart.addListener(function(file){that.queueManager.startFile();fileStatusUpdater(file)});that.events.onFileProgress.addListener(function(file,currentBytes,totalBytes){var currentBatch=that.queue.currentBatch;var byteIncrement=currentBytes-currentBatch.previousBytesUploadedForFile;currentBatch.totalBytesUploaded+=byteIncrement;currentBatch.bytesUploadedForFile+=byteIncrement;currentBatch.previousBytesUploadedForFile=currentBytes;fileStatusUpdater(file)});that.events.onFileError.addListener(function(file,error){if(error===fluid.uploader.errorConstants.UPLOAD_STOPPED){that.queue.isUploading=false}else{if(that.queue.isUploading){that.queue.currentBatch.totalBytesUploaded+=file.size;that.queue.currentBatch.numFilesErrored++}}fileStatusUpdater(file)});that.events.onFileSuccess.addListener(function(file){if(that.queue.currentBatch.bytesUploadedForFile===0){that.queue.currentBatch.totalBytesUploaded+=file.size}fileStatusUpdater(file)});that.events.afterUploadComplete.addListener(function(){that.queue.isUploading=false})};var removeFile=function(that,file){that.queue.removeFile(file);that.swfUploader.cancelUpload(file.id);that.events.afterFileRemoved.fire(file)};var setupSwfUploadManager=function(that,events){that.events=events;that.queue=fluid.fileQueue();that.queueManager=fluid.fileQueue.manager(that.queue,that.events);that.swfUploadSettings=mapNames(swfUploadOptionsMap,that.options);mapEvents(that,swfUploadEventMap,that.swfUploadSettings);that.swfUploader=new SWFUpload(that.swfUploadSettings);bindEvents(that)};fluid.swfUploadManager=function(events,options){var that={};fluid.mergeComponentOptions(that,"fluid.swfUploadManager",options);fluid.mergeListeners(events,that.options.listeners);that.browseForFiles=function(){browse(that)};that.removeFile=function(file){removeFile(that,file)};that.start=function(){that.queueManager.start();that.swfUploader.startUpload()};that.stop=function(){stopUpload(that)};setupSwfUploadManager(that,events);return that};fluid.defaults("fluid.swfUploadManager",{uploadURL:"",flashURL:"../../../lib/swfupload/flash/swfupload.swf",flashButtonPeerId:"",postParams:{},fileSizeLimit:"20480",fileTypes:"*",fileTypesDescription:null,fileUploadLimit:0,fileQueueLimit:0,debug:false})})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var rowForFile=function(that,file){return that.locate("fileQueue").find("#"+file.id)};var errorRowForFile=function(that,file){return $("#"+file.id+"_error",that.container)};var fileForRow=function(that,row){var files=that.uploadManager.queue.files;for(var i=0;i<files.length;i++){var file=files[i];if(file.id.toString()===row.attr("id")){return file}}return null};var progressorForFile=function(that,file){var progressId=file.id+"_progress";return that.fileProgressors[progressId]};var startFileProgress=function(that,file){var fileRowElm=rowForFile(that,file);that.scroller.scrollTo(fileRowElm);var fileProgressor=progressorForFile(that,file);fileProgressor.refreshView();fileProgressor.show()};var updateFileProgress=function(that,file,fileBytesComplete,fileTotalBytes){var filePercent=fluid.uploader.derivePercent(fileBytesComplete,fileTotalBytes);var filePercentStr=filePercent+"%";progressorForFile(that,file).update(filePercent,filePercentStr)};var hideFileProgress=function(that,file){var fileRowElm=rowForFile(that,file);progressorForFile(that,file).hide();if(file.filestatus===fluid.uploader.fileStatusConstants.COMPLETE){that.locate("fileIconBtn",fileRowElm).removeClass(that.options.styles.dim)}};var removeFileProgress=function(that,file){var fileProgressor=progressorForFile(that,file);if(!fileProgressor){return }var rowProgressor=fileProgressor.displayElement;rowProgressor.remove()};var animateRowRemoval=function(that,row){row.fadeOut("fast",function(){row.remove();that.refreshView()})};var removeFileErrorRow=function(that,file){if(file.filestatus===fluid.uploader.fileStatusConstants.ERROR){animateRowRemoval(that,errorRowForFile(that,file))}};var removeFileAndRow=function(that,file,row){removeFileProgress(that,file);removeFileErrorRow(that,file);that.uploadManager.removeFile(file);animateRowRemoval(that,row)};var removeFileForRow=function(that,row){var file=fileForRow(that,row);if(!file||file.filestatus===fluid.uploader.fileStatusConstants.COMPLETE){return }removeFileAndRow(that,file,row)};var removeRowForFile=function(that,file){var row=rowForFile(that,file);removeFileAndRow(that,file,row)};var bindHover=function(row,styles){var over=function(){if(row.hasClass(styles.ready)&&!row.hasClass(styles.uploading)){row.addClass(styles.hover)}};var out=function(){if(row.hasClass(styles.ready)&&!row.hasClass(styles.uploading)){row.removeClass(styles.hover)}};row.hover(over,out)};var bindDeleteKey=function(that,row){var deleteHandler=function(){removeFileForRow(that,row)};fluid.activatable(row,null,{additionalBindings:[{key:$.ui.keyCode.DELETE,activateHandler:deleteHandler}]})};var bindRowHandlers=function(that,row){if($.browser.msie&&$.browser.version<7){bindHover(row,that.options.styles)}that.locate("fileIconBtn",row).click(function(){removeFileForRow(that,row)});bindDeleteKey(that,row)};var renderRowFromTemplate=function(that,file){var row=that.rowTemplate.clone();that.locate("fileName",row).text(file.name);that.locate("fileSize",row).text(fluid.uploader.formatFileSize(file.size));that.locate("fileIconBtn",row).addClass(that.options.styles.remove);row.attr("id",file.id);row.addClass(that.options.styles.ready);bindRowHandlers(that,row);return row};var createProgressorFromTemplate=function(that,row){var rowProgressor=that.rowProgressorTemplate.clone();var rowId=row.attr("id");var progressId=rowId+"_progress";rowProgressor.attr("id",progressId);rowProgressor.css("top",row.position().top);rowProgressor.height(row.height()).width(5);that.container.after(rowProgressor);that.fileProgressors[progressId]=fluid.progress(that.uploadContainer,{selectors:{progressBar:"#"+rowId,displayElement:"#"+progressId,label:"#"+progressId+" .fl-uploader-file-progress-text",indicator:"#"+progressId}})};var addFile=function(that,file){var row=renderRowFromTemplate(that,file);if(!($.browser.msie&&($.browser.version>=8))){row.hide()}that.container.append(row);row.fadeIn("slow");that.scroller.scrollBottom();createProgressorFromTemplate(that,row);that.refreshView()};var prepareForUpload=function(that){var rowButtons=that.locate("fileIconBtn",that.locate("fileRows"));rowButtons.attr("disabled","disabled");rowButtons.addClass(that.options.styles.dim)};var refreshAfterUpload=function(that){var rowButtons=that.locate("fileIconBtn",that.locate("fileRows"));rowButtons.removeAttr("disabled");rowButtons.removeClass(that.options.styles.dim)};var changeRowState=function(that,row,newState){row.removeClass(that.options.styles.ready).removeClass(that.options.styles.error).addClass(newState)};var markRowAsComplete=function(that,file){var row=rowForFile(that,file);changeRowState(that,row,that.options.styles.uploaded);row.attr("title",that.options.strings.status.success);fluid.enabled(row,false);var removeRowBtn=that.locate("fileIconBtn",row);removeRowBtn.unbind("click");removeRowBtn.removeClass(that.options.styles.remove);removeRowBtn.attr("title",that.options.strings.status.success)};var renderErrorInfoRowFromTemplate=function(that,fileRow,error){var errorRow=that.errorInfoRowTemplate.clone();errorRow.attr("id",fileRow.attr("id")+"_error");var errorType=fluid.keyForValue(fluid.uploader.errorConstants,error);var errorMsg=that.options.strings.errors[errorType];that.locate("errorText",errorRow).text(errorMsg);fileRow.after(errorRow);that.scroller.scrollTo(errorRow)};var showErrorForFile=function(that,file,error){hideFileProgress(that,file);if(file.filestatus===fluid.uploader.fileStatusConstants.ERROR){var fileRowElm=rowForFile(that,file);changeRowState(that,fileRowElm,that.options.styles.error);renderErrorInfoRowFromTemplate(that,fileRowElm,error)}};var bindModelEvents=function(that){that.returnedOptions={listeners:{afterFileQueued:that.addFile,onUploadStart:that.prepareForUpload,onFileStart:that.showFileProgress,onFileProgress:that.updateFileProgress,onFileSuccess:that.markFileComplete,onFileError:that.showErrorForFile,afterFileComplete:that.hideFileProgress,afterUploadComplete:that.refreshAfterUpload}}};var addKeyboardNavigation=function(that){fluid.tabbable(that.container);that.selectableContext=fluid.selectable(that.container,{selectableSelector:that.options.selectors.fileRows,onSelect:function(itemToSelect){$(itemToSelect).addClass(that.options.styles.selected)},onUnselect:function(selectedItem){$(selectedItem).removeClass(that.options.styles.selected)}})};var prepareTemplateElements=function(that){that.rowTemplate=that.locate("rowTemplate").remove();if($.browser.msie&&($.browser.version>=8)){that.rowTemplate.removeClass(that.options.styles.hiddenTemplate)}that.errorInfoRowTemplate=that.locate("errorInfoRowTemplate").remove();that.errorInfoRowTemplate.removeClass(that.options.styles.hiddenTemplate);that.rowProgressorTemplate=that.locate("rowProgressorTemplate",that.uploadContainer).remove()};var setupFileQueue=function(that,uploadManager){that.uploadManager=uploadManager;that.scroller=fluid.scroller(that.container);prepareTemplateElements(that);addKeyboardNavigation(that);bindModelEvents(that)};fluid.fileQueueView=function(container,parentContainer,uploadManager,options){var that=fluid.initView("fluid.fileQueueView",container,options);that.uploadContainer=parentContainer;that.fileProgressors={};that.addFile=function(file){addFile(that,file)};that.removeFile=function(file){removeRowForFile(that,file)};that.prepareForUpload=function(){prepareForUpload(that)};that.refreshAfterUpload=function(){refreshAfterUpload(that)};that.showFileProgress=function(file){startFileProgress(that,file)};that.updateFileProgress=function(file,fileBytesComplete,fileTotalBytes){updateFileProgress(that,file,fileBytesComplete,fileTotalBytes)};that.markFileComplete=function(file){progressorForFile(that,file).update(100,"100%");markRowAsComplete(that,file)};that.showErrorForFile=function(file,error){showErrorForFile(that,file,error)};that.hideFileProgress=function(file){hideFileProgress(that,file)};that.refreshView=function(){that.scroller.refreshView();that.selectableContext.refresh()};setupFileQueue(that,uploadManager);return that};fluid.defaults("fluid.fileQueueView",{selectors:{fileRows:".flc-uploader-file",fileName:".flc-uploader-file-name",fileSize:".flc-uploader-file-size",fileIconBtn:".flc-uploader-file-action",errorText:".flc-uploader-file-error",rowTemplate:".flc-uploader-file-tmplt",errorInfoRowTemplate:".flc-uploader-file-error-tmplt",rowProgressorTemplate:".flc-uploader-file-progressor-tmplt"},styles:{hover:"fl-uploader-file-hover",selected:"fl-uploader-file-focus",ready:"fl-uploader-file-state-ready",uploading:"fl-uploader-file-state-uploading",uploaded:"fl-uploader-file-state-uploaded",error:"fl-uploader-file-state-error",remove:"fl-uploader-file-action-remove",dim:"fl-uploader-dim",hiddenTemplate:"fl-uploader-hidden-templates"},strings:{progress:{toUploadLabel:"To upload: %fileCount %fileLabel (%totalBytes)",singleFile:"file",pluralFiles:"files"},status:{success:"File Uploaded",error:"File Upload Error"},errors:{HTTP_ERROR:"File upload error: a network error occured or the file was rejected (reason unknown).",IO_ERROR:"File upload error: a network error occured.",UPLOAD_LIMIT_EXCEEDED:"File upload error: you have uploaded as many files as you are allowed during this session",UPLOAD_FAILED:"File upload error: the upload failed for an unknown reason.",QUEUE_LIMIT_EXCEEDED:"You have as many files in the queue as can be added at one time. Removing files from the queue may allow you to add different files.",FILE_EXCEEDS_SIZE_LIMIT:"One or more of the files that you attempted to add to the queue exceeded the limit of %fileSizeLimit.",ZERO_BYTE_FILE:"One or more of the files that you attempted to add contained no data.",INVALID_FILETYPE:"One or more files were not added to the queue because they were of the wrong type."}}})})(jQuery,fluid_1_1);(function($,fluid){var fileOrFiles=function(that,numFiles){return(numFiles===1)?that.options.strings.progress.singleFile:that.options.strings.progress.pluralFiles};var enableElement=function(that,elm){elm.removeAttr("disabled");elm.removeClass(that.options.styles.dim)};var disableElement=function(that,elm){elm.attr("disabled","disabled");elm.addClass(that.options.styles.dim)};var showElement=function(that,elm){elm.removeClass(that.options.styles.hidden)};var hideElement=function(that,elm){elm.addClass(that.options.styles.hidden)};var setTotalProgressStyle=function(that,didError){didError=didError||false;var indicator=that.totalProgress.indicator;indicator.toggleClass(that.options.styles.totalProgress,!didError);indicator.toggleClass(that.options.styles.totalProgressError,didError)};var setStateEmpty=function(that){disableElement(that,that.locate("uploadButton"));if(that.uploadManager.queue.files.length===0){that.locate("browseButton").text(that.options.strings.buttons.browse);showElement(that,that.locate("instructions"))}};var setStateDone=function(that){disableElement(that,that.locate("uploadButton"));enableElement(that,that.locate("browseButton"));hideElement(that,that.locate("pauseButton"));showElement(that,that.locate("uploadButton"))};var setStateLoaded=function(that){that.locate("browseButton").text(that.options.strings.buttons.addMore);hideElement(that,that.locate("pauseButton"));showElement(that,that.locate("uploadButton"));enableElement(that,that.locate("uploadButton"));enableElement(that,that.locate("browseButton"));hideElement(that,that.locate("instructions"));that.totalProgress.hide()};var setStateUploading=function(that){that.totalProgress.hide(false,false);setTotalProgressStyle(that);hideElement(that,that.locate("uploadButton"));disableElement(that,that.locate("browseButton"));enableElement(that,that.locate("pauseButton"));showElement(that,that.locate("pauseButton"));that.locate(that.options.focusWithEvent.afterUploadStart).focus()};var renderUploadTotalMessage=function(that){var numReadyFiles=that.uploadManager.queue.getReadyFiles().length;var bytesReadyFiles=that.uploadManager.queue.sizeOfReadyFiles();var fileLabelStr=fileOrFiles(that,numReadyFiles);var totalStateStr=fluid.stringTemplate(that.options.strings.progress.toUploadLabel,{fileCount:numReadyFiles,fileLabel:fileLabelStr,totalBytes:fluid.uploader.formatFileSize(bytesReadyFiles)});that.locate("totalFileStatusText").html(totalStateStr)};var updateTotalProgress=function(that){var batch=that.uploadManager.queue.currentBatch;var totalPercent=fluid.uploader.derivePercent(batch.totalBytesUploaded,batch.totalBytes);var numFilesInBatch=batch.files.length;var fileLabelStr=fileOrFiles(that,numFilesInBatch);var totalProgressStr=fluid.stringTemplate(that.options.strings.progress.totalProgressLabel,{curFileN:batch.fileIdx+1,totalFilesN:numFilesInBatch,fileLabel:fileLabelStr,currBytes:fluid.uploader.formatFileSize(batch.totalBytesUploaded),totalBytes:fluid.uploader.formatFileSize(batch.totalBytes)});that.totalProgress.update(totalPercent,totalProgressStr)};var updateTotalAtCompletion=function(that){var numErroredFiles=that.uploadManager.queue.getErroredFiles().length;var numTotalFiles=that.uploadManager.queue.files.length;var fileLabelStr=fileOrFiles(that,numTotalFiles);var errorStr="";if(numErroredFiles>0){var errorLabelString=(numErroredFiles===1)?that.options.strings.progress.singleError:that.options.strings.progress.pluralErrors;setTotalProgressStyle(that,true);errorStr=fluid.stringTemplate(that.options.strings.progress.numberOfErrors,{errorsN:numErroredFiles,errorLabel:errorLabelString})}var totalProgressStr=fluid.stringTemplate(that.options.strings.progress.completedLabel,{curFileN:that.uploadManager.queue.getUploadedFiles().length,totalFilesN:numTotalFiles,errorString:errorStr,fileLabel:fileLabelStr,totalCurrBytes:fluid.uploader.formatFileSize(that.uploadManager.queue.sizeOfUploadedFiles())});that.totalProgress.update(100,totalProgressStr)};var bindDOMEvents=function(that){that.locate("browseButton").click(function(evnt){that.uploadManager.browseForFiles();evnt.preventDefault()});that.locate("uploadButton").click(function(){that.uploadManager.start()});that.locate("pauseButton").click(function(){that.uploadManager.stop()})};var updateStateAfterFileDialog=function(that){if(that.uploadManager.queue.getReadyFiles().length>0){setStateLoaded(that);renderUploadTotalMessage(that);that.locate(that.options.focusWithEvent.afterFileDialog).focus()}};var updateStateAfterFileRemoval=function(that){if(that.uploadManager.queue.getReadyFiles().length===0){setStateEmpty(that)}renderUploadTotalMessage(that)};var updateStateAfterPause=function(that){};var updateStateAfterCompletion=function(that){var userPaused=that.uploadManager.queue.shouldStop;if(that.uploadManager.queue.getReadyFiles().length===0){setStateDone(that)}else{setStateLoaded(that)}updateTotalAtCompletion(that)};var bindModelEvents=function(that){that.events.afterFileDialog.addListener(function(){updateStateAfterFileDialog(that)});that.events.afterFileRemoved.addListener(function(){updateStateAfterFileRemoval(that)});that.events.onUploadStart.addListener(function(){setStateUploading(that)});that.events.onUploadStop.addListener(function(){that.locate(that.options.focusWithEvent.afterUploadStop).focus()});that.events.onFileProgress.addListener(function(){updateTotalProgress(that)});that.events.onFileSuccess.addListener(function(){updateTotalProgress(that)});that.events.onFileError.addListener(function(file,error,message){if(error===fluid.uploader.errorConstants.UPLOAD_STOPPED){updateStateAfterPause(that)}});that.events.afterUploadComplete.addListener(function(){updateStateAfterCompletion(that)})};var initUploadManager=function(that){var manager=fluid.initSubcomponent(that,"uploadManager",[that.events,fluid.COMPONENT_OPTIONS]);return that.options.demo?fluid.demoUploadManager(manager):manager};var setupUploader=function(that){that.decorators=fluid.initSubcomponents(that,"decorators",[that,fluid.COMPONENT_OPTIONS]);that.uploadManager=initUploadManager(that);that.fileQueueView=fluid.initSubcomponent(that,"fileQueueView",[that.locate("fileQueue"),that.container,that.uploadManager,fluid.COMPONENT_OPTIONS]);that.totalProgress=fluid.initSubcomponent(that,"totalProgressBar",[that.container,fluid.COMPONENT_OPTIONS]);disableElement(that,that.locate("uploadButton"));bindDOMEvents(that);bindModelEvents(that)};fluid.uploader=function(container,options){var that=fluid.initView("fluid.uploader",container,options);setupUploader(that);return that};fluid.progressiveEnhanceableUploader=function(container,enhanceable,options){enhanceable=fluid.container(enhanceable);container=fluid.container(container);if(swfobject.getFlashPlayerVersion().major<9){enhanceable.show()}else{container.show();return fluid.uploader(container,options)}};fluid.uploader.formatFileSize=function(bytes){if(typeof bytes==="number"){if(bytes===0){return"0.0 KB"}else{if(bytes>0){if(bytes<1048576){return(Math.ceil(bytes/1024*10)/10).toFixed(1)+" KB"}else{return(Math.ceil(bytes/1048576*10)/10).toFixed(1)+" MB"}}}}return""};fluid.uploader.derivePercent=function(num,total){return Math.round((num*100)/total)};fluid.defaults("fluid.uploader",{demo:false,decorators:[{type:"fluid.swfUploadSetupDecorator"},{type:"fluid.manuallyDegrade",options:{selectors:{enhanceable:".fl-uploader.fl-progEnhance-basic"}}}],uploadManager:{type:"fluid.swfUploadManager"},fileQueueView:{type:"fluid.fileQueueView"},totalProgressBar:{type:"fluid.progress",options:{selectors:{progressBar:".flc-uploader-queue-footer",displayElement:".flc-uploader-total-progress",label:".flc-uploader-total-progress-text",indicator:".flc-uploader-total-progress",ariaElement:".flc-uploader-total-progress"}}},selectors:{fileQueue:".flc-uploader-queue",browseButton:".flc-uploader-button-browse",uploadButton:".flc-uploader-button-upload",pauseButton:".flc-uploader-button-pause",totalFileStatusText:".flc-uploader-total-progress-text",instructions:".flc-uploader-browse-instructions"},focusWithEvent:{afterFileDialog:"uploadButton",afterUploadStart:"pauseButton",afterUploadStop:"uploadButton"},styles:{disabled:"fl-uploader-disabled",hidden:"fl-uploader-hidden",dim:"fl-uploader-dim",totalProgress:"fl-uploader-total-progress-okay",totalProgressError:"fl-uploader-total-progress-errored"},events:{afterReady:null,onFileDialog:null,afterFileQueued:null,afterFileRemoved:null,onQueueError:null,afterFileDialog:null,onUploadStart:null,onUploadStop:null,onFileStart:null,onFileProgress:null,onFileError:null,onFileSuccess:null,afterFileComplete:null,afterUploadComplete:null},strings:{progress:{toUploadLabel:"To upload: %fileCount %fileLabel (%totalBytes)",totalProgressLabel:"Uploading: %curFileN of %totalFilesN %fileLabel (%currBytes of %totalBytes)",completedLabel:"Uploaded: %curFileN of %totalFilesN %fileLabel (%totalCurrBytes)%errorString",numberOfErrors:", %errorsN %errorLabel",singleFile:"file",pluralFiles:"files",singleError:"error",pluralErrors:"errors"},buttons:{browse:"Browse Files",addMore:"Add More",stopUpload:"Stop Upload",cancelRemaning:"Cancel remaining Uploads",resumeUpload:"Resume Upload"}}});fluid.uploader.errorConstants={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};fluid.uploader.fileStatusConstants={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};var renderLink=function(renderLocation,text,classes,appendBeside){var link=$("<a href='#'>"+text+"</a>");link.addClass(classes);if(renderLocation==="before"){appendBeside.before(link)}else{appendBeside.after(link)}return link};var toggleVisibility=function(toShow,toHide){if(window.opera){toShow.show().removeClass("hideUploaderForOpera");toHide.show().addClass("hideUploaderForOpera")}else{toShow.show();toHide.hide()}};var defaultControlRenderer=function(that){var degradeLink=renderLink(that.options.defaultRenderLocation,that.options.strings.degradeLinkText,that.options.styles.degradeLinkClass,that.enhancedContainer);degradeLink.addClass("flc-manuallyDegrade-degrade");var enhanceLink=renderLink(that.options.defaultRenderLocation,that.options.strings.enhanceLinkText,that.options.styles.enhanceLinkClass,that.degradedContainer);enhanceLink.addClass("flc-manuallyDegrade-enhance")};var fetchControls=function(that){that.degradeControl=that.locate("degradeControl");that.enhanceControl=that.locate("enhanceControl")};var setupManuallyDegrade=function(that){if(!that.degradedContainer.length){return }fetchControls(that);if(!that.degradeControl.length&&!that.enhanceControl.length){that.options.controlRenderer(that);fetchControls(that)}that.degradeControl.click(that.degrade);that.enhanceControl.click(that.enhance);that.enhanceControl.hide()};var determineContainer=function(options){var defaults=fluid.defaults("fluid.manuallyDegrade");return(options&&options.container)?options.container:defaults.container};fluid.manuallyDegrade=function(component,options){var container=determineContainer(options);var that=fluid.initView("fluid.manuallyDegrade",container,options);var isDegraded=false;that.enhancedContainer=component.container;that.degradedContainer=that.locate("enhanceable");that.degrade=function(){toggleVisibility(that.enhanceControl,that.degradeControl);toggleVisibility(that.degradedContainer,that.enhancedContainer);isDegraded=true};that.enhance=function(){toggleVisibility(that.degradeControl,that.enhanceControl);toggleVisibility(that.enhancedContainer,that.degradedContainer);isDegraded=false};that.isDegraded=function(){return isDegraded};setupManuallyDegrade(that);return that};fluid.defaults("fluid.manuallyDegrade",{container:"body",controlRenderer:defaultControlRenderer,defaultRenderLocation:"before",strings:{degradeLinkText:"Switch to the standard single-file Uploader",enhanceLinkText:"Switch to the Flash-based multi-file Uploader"},selectors:{enhanceable:".fl-ProgEnhance-basic",degradeControl:".flc-manuallyDegrade-degrade",enhanceControl:".flc-manuallyDegrade-enhance"},styles:{degradeLinkClass:"fl-uploader-manually-degrade",enhanceLinkClass:"fl-uploader-manually-enhance"}})})(jQuery,fluid_1_1);var whitespace="\n\r\t ";var closedTags={abbr:true,br:true,col:true,img:true,input:true,link:true,meta:true,param:true,hr:true,area:true,embed:true};XMLP=function(strXML){this.m_xml=strXML;this.m_iP=0;this.m_iState=XMLP._STATE_PROLOG;this.m_stack=[];this.m_attributes={};this.m_emitSynthetic=false};XMLP._NONE=0;XMLP._ELM_B=1;XMLP._ELM_E=2;XMLP._ELM_EMP=3;XMLP._ATT=4;XMLP._TEXT=5;XMLP._ENTITY=6;XMLP._PI=7;XMLP._CDATA=8;XMLP._COMMENT=9;XMLP._DTD=10;XMLP._ERROR=11;XMLP._CONT_XML=0;XMLP._CONT_ALT=1;XMLP._ATT_NAME=0;XMLP._ATT_VAL=1;XMLP._STATE_PROLOG=1;XMLP._STATE_DOCUMENT=2;XMLP._STATE_MISC=3;XMLP._errs=[];XMLP._errs[XMLP.ERR_CLOSE_PI=0]="PI: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_DTD=1]="DTD: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_COMMENT=2]="Comment: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_CDATA=3]="CDATA: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_ELM=4]="Element: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_ENTITY=5]="Entity: missing closing sequence";XMLP._errs[XMLP.ERR_PI_TARGET=6]="PI: target is required";XMLP._errs[XMLP.ERR_ELM_EMPTY=7]="Element: cannot be both empty and closing";XMLP._errs[XMLP.ERR_ELM_NAME=8]='Element: name must immediatly follow "<"';XMLP._errs[XMLP.ERR_ELM_LT_NAME=9]='Element: "<" not allowed in element names';XMLP._errs[XMLP.ERR_ATT_VALUES=10]="Attribute: values are required and must be in quotes";XMLP._errs[XMLP.ERR_ATT_LT_NAME=11]='Element: "<" not allowed in attribute names';XMLP._errs[XMLP.ERR_ATT_LT_VALUE=12]='Attribute: "<" not allowed in attribute values';XMLP._errs[XMLP.ERR_ATT_DUP=13]="Attribute: duplicate attributes not allowed";XMLP._errs[XMLP.ERR_ENTITY_UNKNOWN=14]="Entity: unknown entity";XMLP._errs[XMLP.ERR_INFINITELOOP=15]="Infinite loop";XMLP._errs[XMLP.ERR_DOC_STRUCTURE=16]="Document: only comments, processing instructions, or whitespace allowed outside of document element";XMLP._errs[XMLP.ERR_ELM_NESTING=17]="Element: must be nested correctly";XMLP.prototype._checkStructure=function(iEvent){var stack=this.m_stack;if(XMLP._STATE_PROLOG==this.m_iState){this.m_iState=XMLP._STATE_DOCUMENT}if(XMLP._STATE_DOCUMENT===this.m_iState){if((XMLP._ELM_B==iEvent)||(XMLP._ELM_EMP==iEvent)){this.m_stack[stack.length]=this.getName()}if((XMLP._ELM_E==iEvent)||(XMLP._ELM_EMP==iEvent)){if(stack.length===0){return XMLP._NONE}var strTop=stack[stack.length-1];this.m_stack.length--;if(strTop===null||strTop!==this.getName()){return this._setErr(XMLP.ERR_ELM_NESTING)}}}return iEvent};XMLP.prototype.getColumnNumber=function(){return SAXStrings.getColumnNumber(this.m_xml,this.m_iP)};XMLP.prototype.getContent=function(){return(this.m_cSrc==XMLP._CONT_XML)?this.m_xml:this.m_cAlt};XMLP.prototype.getContentBegin=function(){return this.m_cB};XMLP.prototype.getContentEnd=function(){return this.m_cE};XMLP.prototype.getLineNumber=function(){return SAXStrings.getLineNumber(this.m_xml,this.m_iP)};XMLP.prototype.getName=function(){return this.m_name};XMLP.prototype.next=function(){return this._checkStructure(this._parse())};XMLP.prototype._parse=function(){var iP=this.m_iP;var xml=this.m_xml;if(iP===xml.length){return XMLP._NONE}var c=xml.charAt(iP);if(c==="<"){var c2=xml.charAt(iP+1);if(c2==="?"){return this._parsePI(iP+2)}else{if(c2==="!"){if(iP===xml.indexOf("<!DOCTYPE",iP)){return this._parseDTD(iP+9)}else{if(iP===xml.indexOf("<!--",iP)){return this._parseComment(iP+4)}else{if(iP===xml.indexOf("<![CDATA[",iP)){return this._parseCDATA(iP+9)}}}}else{return this._parseElement(iP+1)}}}else{return this._parseText(iP)}};var nameRegex=/([^\s>]+)/g;var attrStartRegex=/\s*([\w:]+)/gm;var attrValRegex=/\"([^\"]*)\"\s*/gm;var attrValIERegex=/([^\>\s]+)\s*/gm;var closeRegex=/\s*<\//g;XMLP.prototype._parseElement=function(iB){var iE,iDE,iRet;var iType,strN,iLast;iDE=iE=this.m_xml.indexOf(">",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_ELM)}if(this.m_xml.charAt(iB)=="/"){iType=XMLP._ELM_E;iB++}else{iType=XMLP._ELM_B}if(this.m_xml.charAt(iE-1)=="/"){if(iType==XMLP._ELM_E){return this._setErr(XMLP.ERR_ELM_EMPTY)}iType=XMLP._ELM_EMP;iDE--}nameRegex.lastIndex=iB;var nameMatch=nameRegex.exec(this.m_xml);if(!nameMatch){return this._setErr(XMLP.ERR_ELM_NAME)}strN=nameMatch[1].toLowerCase();if("li"===strN&&iType!==XMLP._ELM_E&&this.m_stack.length>0&&this.m_stack[this.m_stack.length-1]==="li"&&!this.m_emitSynthetic){this.m_name="li";this.m_emitSynthetic=true;return XMLP._ELM_E}this.m_attributes={};this.m_cAlt="";if(nameRegex.lastIndex<iDE){this.m_iP=nameRegex.lastIndex;while(this.m_iP<iDE){attrStartRegex.lastIndex=this.m_iP;var attrMatch=attrStartRegex.exec(this.m_xml);if(!attrMatch){return this._setErr(XMLP.ERR_ATT_VALUES)}var attrname=attrMatch[1].toLowerCase();var attrval;if(this.m_xml.charCodeAt(attrStartRegex.lastIndex)===61){var valRegex=this.m_xml.charCodeAt(attrStartRegex.lastIndex+1)===34?attrValRegex:attrValIERegex;valRegex.lastIndex=attrStartRegex.lastIndex+1;attrMatch=valRegex.exec(this.m_xml);if(!attrMatch){return this._setErr(XMLP.ERR_ATT_VALUES)}attrval=attrMatch[1]}else{attrval=attrname;valRegex=attrStartRegex}if(!this.m_attributes[attrname]){this.m_attributes[attrname]=attrval}else{return this._setErr(XMLP.ERR_ATT_DUP)}this.m_iP=valRegex.lastIndex}}if(strN.indexOf("<")!=-1){return this._setErr(XMLP.ERR_ELM_LT_NAME)}this.m_name=strN;this.m_iP=iE+1;if(closedTags[strN]){closeRegex.lastIndex=iE+1;var closeMatch=closeRegex.exec;if(closeMatch){var matchclose=this.m_xml.indexOf(strN,closeMatch.lastIndex);if(matchclose===closeMatch.lastIndex){return iType}else{return XMLP._ELM_EMP}}}this.m_emitSynthetic=false;return iType};XMLP.prototype._parseCDATA=function(iB){var iE=this.m_xml.indexOf("]]>",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_CDATA)}this._setContent(XMLP._CONT_XML,iB,iE);this.m_iP=iE+3;return XMLP._CDATA};XMLP.prototype._parseComment=function(iB){var iE=this.m_xml.indexOf("-->",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_COMMENT)}this._setContent(XMLP._CONT_XML,iB-4,iE+3);this.m_iP=iE+3;return XMLP._COMMENT};XMLP.prototype._parseDTD=function(iB){var iE,strClose,iInt,iLast;iE=this.m_xml.indexOf(">",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_DTD)}iInt=this.m_xml.indexOf("[",iB);strClose=((iInt!=-1)&&(iInt<iE))?"]>":">";while(true){if(iE==iLast){return this._setErr(XMLP.ERR_INFINITELOOP)}iLast=iE;iE=this.m_xml.indexOf(strClose,iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_DTD)}if(this.m_xml.substring(iE-1,iE+2)!="]]>"){break}}this.m_iP=iE+strClose.length;return XMLP._DTD};XMLP.prototype._parsePI=function(iB){var iE,iTB,iTE,iCB,iCE;iE=this.m_xml.indexOf("?>",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_PI)}iTB=SAXStrings.indexOfNonWhitespace(this.m_xml,iB,iE);if(iTB==-1){return this._setErr(XMLP.ERR_PI_TARGET)}iTE=SAXStrings.indexOfWhitespace(this.m_xml,iTB,iE);if(iTE==-1){iTE=iE}iCB=SAXStrings.indexOfNonWhitespace(this.m_xml,iTE,iE);if(iCB==-1){iCB=iE}iCE=SAXStrings.lastIndexOfNonWhitespace(this.m_xml,iCB,iE);if(iCE==-1){iCE=iE-1}this.m_name=this.m_xml.substring(iTB,iTE);this._setContent(XMLP._CONT_XML,iCB,iCE+1);this.m_iP=iE+2;return XMLP._PI};XMLP.prototype._parseText=function(iB){var iE=this.m_xml.indexOf("<",iB);if(iE==-1){iE=this.m_xml.length}this._setContent(XMLP._CONT_XML,iB,iE);this.m_iP=iE;return XMLP._TEXT};XMLP.prototype._setContent=function(iSrc){var args=arguments;if(XMLP._CONT_XML==iSrc){this.m_cAlt=null;this.m_cB=args[1];this.m_cE=args[2]}else{this.m_cAlt=args[1];this.m_cB=0;this.m_cE=args[1].length}this.m_cSrc=iSrc};XMLP.prototype._setErr=function(iErr){var strErr=XMLP._errs[iErr];this.m_cAlt=strErr;this.m_cB=0;this.m_cE=strErr.length;this.m_cSrc=XMLP._CONT_ALT;return XMLP._ERROR};SAXStrings={};SAXStrings.WHITESPACE=" \t\n\r";SAXStrings.QUOTES="\"'";SAXStrings.getColumnNumber=function(strD,iP){if(!strD){return -1}iP=iP||strD.length;var arrD=strD.substring(0,iP).split("\n");arrD.length--;var iLinePos=arrD.join("\n").length;return iP-iLinePos};SAXStrings.getLineNumber=function(strD,iP){if(!strD){return -1}iP=iP||strD.length;return strD.substring(0,iP).split("\n").length};SAXStrings.indexOfNonWhitespace=function(strD,iB,iE){if(!strD){return -1}iB=iB||0;iE=iE||strD.length;for(var i=iB;i<iE;++i){var c=strD.charAt(i);if(c!==" "&&c!=="\t"&&c!=="\n"&&c!=="\r"){return i}}return -1};SAXStrings.indexOfWhitespace=function(strD,iB,iE){if(!strD){return -1}iB=iB||0;iE=iE||strD.length;for(var i=iB;i<iE;i++){if(SAXStrings.WHITESPACE.indexOf(strD.charAt(i))!=-1){return i}}return -1};SAXStrings.lastIndexOfNonWhitespace=function(strD,iB,iE){if(!strD){return -1}iB=iB||0;iE=iE||strD.length;for(var i=iE-1;i>=iB;i--){if(SAXStrings.WHITESPACE.indexOf(strD.charAt(i))==-1){return i}}return -1};SAXStrings.replace=function(strD,iB,iE,strF,strR){if(!strD){return""}iB=iB||0;iE=iE||strD.length;return strD.substring(iB,iE).split(strF).join(strR)};function __unescapeString(str){return str.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&apos;/g,"'")}function __escapeString(str){var escAmpRegEx=/&/g;var escLtRegEx=/</g;var escGtRegEx=/>/g;var quotRegEx=/"/g;var aposRegEx=/'/g;str=str.replace(escAmpRegEx,"&amp;");str=str.replace(escLtRegEx,"&lt;");str=str.replace(escGtRegEx,"&gt;");str=str.replace(quotRegEx,"&quot;");str=str.replace(aposRegEx,"&apos;");return str}fluid_1_1=fluid_1_1||{};(function($,fluid){var t;var parser;var tagstack;var lumpindex=0;var nestingdepth=0;var justended=false;var defstart=-1;var defend=-1;var baseURL;var debugMode=false;var cutpoints=[];var cutstatus=[];function init(baseURLin,debugModeIn,cutpointsIn){t.rootlump=fluid.XMLLump(0,-1);tagstack=[t.rootlump];lumpindex=0;nestingdepth=0;justended=false;defstart=-1;defend=-1;baseURL=baseURLin;debugMode=debugModeIn;cutpoints=cutpointsIn;if(cutpoints){for(var i=0;i<cutpoints.length;++i){cutstatus[i]=[];cutpoints[i].tree=fluid.parseSelector(cutpoints[i].selector)}}}function findTopContainer(){for(var i=tagstack.length-1;i>=0;--i){var lump=tagstack[i];if(lump.rsfID!==undefined){return lump}}return t.rootlump}function newLump(){var togo=fluid.XMLLump(lumpindex,nestingdepth);if(debugMode){togo.line=parser.getLineNumber();togo.column=parser.getColumnNumber()}t.lumps[lumpindex]=togo;++lumpindex;return togo}function addLump(mmap,ID,lump){var list=mmap[ID];if(!list){list=[];mmap[ID]=list}list[list.length]=lump}function checkContribute(ID,lump){if(ID.indexOf("scr=contribute-")!==-1){var scr=ID.substring("scr=contribute-".length);addLump(t.collectmap,scr,lump)}}var parseUri=function(source){var o=parseUri.options,value=o.parser[o.strictMode?"strict":"loose"].exec(source);for(var i=0,uri={};i<14;i++){uri[o.key[i]]=value[i]||""}uri[o.q.name]={};uri[o.key[12]].replace(o.q.parser,function($0,$1,$2){if($1){uri[o.q.name][$1]=$2}});return uri};parseUri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function rewriteUrl(url){var po=parseUri(url);if(po.protocol||url.charAt(0)==="/"){return url}else{return baseURL+url}}fluid.debugLump=function(lump){var togo=lump.text;togo+=" at ";togo+="lump line "+lump.line+" column "+lump.column+" index "+lump.lumpindex;togo+=parent.href===null?"":" in file "+parent.href;return togo};function debugLump(lump){return"<"+lump.tagname+">"}function hasCssClass(clazz,totest){if(!totest){return false}return(" "+totest+" ").indexOf(" "+clazz+" ")!==-1}function matchNode(term,headlump){if(term.predList){for(var i=0;i<term.predList.length;++i){var pred=term.predList[i];if(pred.id&&headlump.attributemap.id!==pred.id){return false}if(pred.clazz&&!hasCssClass(pred.clazz,headlump.attributemap["class"])){return false}if(pred.tag&&headlump.tagname!==pred.tag){return false}}return true}}function tagStartCut(headlump){var togo=undefined;if(cutpoints){for(var i=0;i<cutpoints.length;++i){var cut=cutpoints[i];var cutstat=cutstatus[i];var nextterm=cutstat.length;if(nextterm<cut.tree.length){var term=cut.tree[nextterm];if(nextterm>0){if(cut.tree[nextterm-1].child&&cutstat[nextterm-1]!==headlump.nestingdepth-1){continue}}var isMatch=matchNode(term,headlump);if(isMatch){cutstat[cutstat.length]=headlump.nestingdepth;if(cutstat.length===cut.tree.length){if(togo!==undefined){fluid.fail("Cutpoint specification error - node "+debugLump(headlump)+" has already matched with rsf:id of "+togo)}if(cut.id===undefined||cut.id===null){fluid.fail("Error in cutpoints list - entry at position "+i+" does not have an id set")}togo=cut.id}}}}}return togo}function tagEndCut(){if(cutpoints){for(var i=0;i<cutpoints.length;++i){var cutstat=cutstatus[i];if(cutstat.length>0&&cutstat[cutstat.length-1]===nestingdepth){cutstat.length--}}}}function processTagStart(isempty,text){++nestingdepth;if(justended){justended=false;var backlump=newLump();backlump.nestingdepth--}if(t.firstdocumentindex===-1){t.firstdocumentindex=lumpindex}var headlump=newLump();var stacktop=tagstack[tagstack.length-1];headlump.uplump=stacktop;var tagname=parser.getName();headlump.tagname=tagname;var attrs=headlump.attributemap=parser.m_attributes;var ID=attrs[fluid.ID_ATTRIBUTE];if(ID===undefined){ID=tagStartCut(headlump)}for(var attrname in attrs){var attrval=attrs[attrname];if(/href|src|codebase|action/.test(attrname)){attrval=rewriteUrl(attrval);attrs[attrname]=attrval}else{if(ID===undefined&&/for|headers/.test(attrname)){ID=attrs[fluid.ID_ATTRIBUTE]="scr=null"}}}if(ID){if(ID.charCodeAt(0)===126){ID=ID.substring(1);headlump.elide=true}checkContribute(ID,headlump);headlump.rsfID=ID;var downreg=findTopContainer();if(!downreg.downmap){downreg.downmap={}}addLump(downreg.downmap,ID,headlump);addLump(t.globalmap,ID,headlump);var colpos=ID.indexOf(":");if(colpos!==-1){var prefix=ID.substring(0,colpos);if(!stacktop.finallump){stacktop.finallump={}}stacktop.finallump[prefix]=headlump}}headlump.text="<"+tagname+fluid.dumpAttributes(attrs)+">";tagstack[tagstack.length]=headlump;if(isempty){processTagEnd()}}function processTagEnd(){tagEndCut();var endlump=newLump();--nestingdepth;endlump.text="</"+parser.getName()+">";var oldtop=tagstack[tagstack.length-1];oldtop.close_tag=t.lumps[lumpindex-1];tagstack.length--;justended=true}function processDefaultTag(){if(defstart!==-1){if(t.firstdocumentindex===-1){t.firstdocumentindex=lumpindex}var text=parser.getContent().substr(defstart,defend-defstart);justended=false;var newlump=newLump();newlump.text=text;defstart=-1}}fluid.ID_ATTRIBUTE="rsf:id";fluid.getPrefix=function(id){var colpos=id.indexOf(":");return colpos===-1?id:id.substring(0,colpos)};fluid.SplitID=function(id){var that={};var colpos=id.indexOf(":");if(colpos===-1){that.prefix=id}else{that.prefix=id.substring(0,colpos);that.suffix=id.substring(colpos+1)}return that};fluid.XMLLump=function(lumpindex,nestingdepth){return{nestingdepth:nestingdepth,lumpindex:lumpindex,parent:t}};fluid.XMLViewTemplate=function(){return{globalmap:{},collectmap:{},lumps:[],firstdocumentindex:-1}};fluid.fetchResources=function(resourceSpecs,callback){var resourceCallback=function(thisSpec){return{success:function(response){thisSpec.resourceText=response;thisSpec.resourceKey=thisSpec.href;thisSpec.queued=false;fluid.fetchResources(resourceSpecs,callback)},error:function(response,textStatus,errorThrown){thisSpec.fetchError={status:response.status,textStatus:textStatus,errorThrown:errorThrown}}}};var complete=true;for(var key in resourceSpecs){var resourceSpec=resourceSpecs[key];if(resourceSpec.href&&!resourceSpec.resourceText){if(!resourceSpec.queued){var thisCallback=resourceCallback(resourceSpec);$.ajax({url:resourceSpec.href,success:thisCallback.success,error:thisCallback.error});resourceSpec.queued=true}complete=false}else{if(resourceSpec.nodeId&&!resourceSpec.resourceText){var node=document.getElementById(resourceSpec.nodeId);resourceSpec.resourceText=fluid.dom.getElementText(node);resourceSpec.resourceKey=resourceSpec.nodeId}}}if(complete){if($.browser.mozilla){setTimeout(function(){callback(resourceSpecs)},1)}else{callback(resourceSpecs)}}};fluid.XMLEncode=function(text){return text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};fluid.dumpAttributes=function(attrcopy){var togo="";for(var attrname in attrcopy){var attrvalue=attrcopy[attrname];if(attrvalue!==null&&attrvalue!==undefined){togo+=" "+attrname+'="'+attrvalue+'"'}}return togo};fluid.aggregateMMap=function(target,source){for(var key in source){var targhas=target[key];if(!targhas){target[key]=[]}target[key]=target[key].concat(source[key])}};var unUnicode=/(\\u[\dabcdef]{4}|\\x[\dabcdef]{2})/g;fluid.unescapeProperties=function(string){string=string.replace(unUnicode,function(match){var code=match.substring(2);var parsed=parseInt(code,16);return String.fromCharCode(parsed)});var pos=0;while(true){var backpos=string.indexOf("\\",pos);if(backpos===-1){break}if(backpos===string.length-1){return[string.substring(0,string.length-1),true]}var replace=string.charAt(backpos+1);if(replace==="n"){replace="\n"}if(replace==="r"){replace="\r"}if(replace==="t"){replace="\t"}string=string.substring(0,backpos)+replace+string.substring(backpos+2);pos=backpos+1}return[string,false]};var breakPos=/[^\\][\s:=]/;fluid.parseJavaProperties=function(text){var togo={};text=text.replace(/\r\n/g,"\n");text=text.replace(/\r/g,"\n");lines=text.split("\n");var contin,key,valueComp,valueRaw,valueEsc;for(var i=0;i<lines.length;++i){var line=$.trim(lines[i]);if(!line||line.charAt(0)==="#"||line.charAt(0)==="!"){continue}if(!contin){valueComp="";var breakpos=line.search(breakPos);if(breakpos===-1){key=line;valueRaw=""}else{key=$.trim(line.substring(0,breakpos+1));valueRaw=$.trim(line.substring(breakpos+2));if(valueRaw.charAt(0)===":"||valueRaw.charAt(0)==="="){valueRaw=$.trim(valueRaw.substring(1))}}key=fluid.unescapeProperties(key)[0];valueEsc=fluid.unescapeProperties(valueRaw)}else{valueEsc=fluid.unescapeProperties(line)}contin=valueEsc[1];if(!valueEsc[1]){togo[key]=valueComp+valueEsc[0]}else{valueComp+=valueEsc[0]}}return togo};fluid.parseTemplates=function(resourceSpec,templateList,opts){var togo=[];togo.globalmap={};for(var i=0;i<templateList.length;++i){var resource=resourceSpec[templateList[i]];var lastslash=resource.href.lastIndexOf("/");var baseURL=lastslash===-1?"":resource.href.substring(0,lastslash+1);var template=fluid.parseTemplate(resource.resourceText,baseURL,opts.scanStart&&i===0,resource.cutpoints,opts);if(i===0){fluid.aggregateMMap(togo.globalmap,template.globalmap)}template.href=resource.href;template.baseURL=baseURL;template.resourceKey=resource.resourceKey;togo[i]=template;fluid.aggregateMMap(togo.globalmap,template.rootlump.downmap)}return togo};fluid.parseTemplate=function(template,baseURL,scanStart,cutpoints_in,opts){t=fluid.XMLViewTemplate();opts=opts||{};init(baseURL,opts.debugMode,cutpoints_in);var idpos=template.indexOf(fluid.ID_ATTRIBUTE);if(scanStart){var brackpos=template.indexOf(">",idpos);parser=new XMLP(template.substring(brackpos+1))}else{parser=new XMLP(template)}parseloop:while(true){var iEvent=parser.next();switch(iEvent){case XMLP._ELM_B:processDefaultTag();processTagStart(false,"");break;case XMLP._ELM_E:processDefaultTag();processTagEnd();break;case XMLP._ELM_EMP:processDefaultTag();processTagStart(true,"");break;case XMLP._PI:case XMLP._DTD:defstart=-1;continue;case XMLP._TEXT:case XMLP._ENTITY:case XMLP._CDATA:case XMLP._COMMENT:if(defstart===-1){defstart=parser.m_cB}defend=parser.m_cE;break;case XMLP._ERROR:fluid.setLogging(true);var message="Error parsing template: "+parser.m_cAlt+" at line "+parser.getLineNumber();fluid.log(message);fluid.log("Just read: "+parser.m_xml.substring(parser.m_iP-30,parser.m_iP));fluid.log("Still to read: "+parser.m_xml.substring(parser.m_iP,parser.m_iP+30));fluid.fail(message);break parseloop;case XMLP._NONE:break parseloop}}return t};var chars="(?:[\\w\u0128-\uFFFF*_-]|\\\\.)";var quickChild=new RegExp("^>\\s*("+chars+"+)");var quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)");var selSeg=new RegExp("^s*([#.]?)("+chars+"*)");var quickClass=new RegExp("([#.]?)("+chars+"+)","g");var childSeg=new RegExp("\\s*(>)?\\s*","g");var whiteSpace=new RegExp("^\\w*$");fluid.parseSelector=function(selstring){var togo=[];selstring=$.trim(selstring);quickClass.lastIndex=0;var lastIndex=0;while(true){var atNode=[];while(true){var segMatch=quickClass.exec(selstring);if(!segMatch||segMatch.index!==lastIndex){break}var thisNode={};var text=segMatch[2];if(segMatch[1]===""){thisNode.tag=text}else{if(segMatch[1]==="#"){thisNode.id=text}else{if(segMatch[1]==="."){thisNode.clazz=text}}}atNode[atNode.length]=thisNode;lastIndex=quickClass.lastIndex}childSeg.lastIndex=lastIndex;var fullAtNode={predList:atNode};var childMatch=childSeg.exec(selstring);if(!childMatch||childMatch.index!==lastIndex){var remainder=selstring.substring(lastIndex);fluid.fail("Error in selector string - can not match child selector expression at "+remainder)}if(childMatch[1]===">"){fullAtNode.child=true}togo[togo.length]=fullAtNode;if(childSeg.lastIndex>=selstring.length){break}lastIndex=childSeg.lastIndex;quickClass.lastIndex=childSeg.lastIndex}return togo}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){function debugPosition(component){return"as child of "+(component.parent.fullID?"component with full ID "+component.parent.fullID:"root")}function computeFullID(component){var togo="";var move=component;if(component.children===undefined){togo=component.ID+(component.localID!==undefined?component.localID:"");move=component.parent}while(move.parent){var parent=move.parent;if(move.fullID!==undefined){togo=move.fullID+togo;return togo}if(move.noID===undefined){var ID=move.ID;if(ID===undefined){fluid.fail("Error in component tree - component found with no ID "+debugPosition(parent)+": please check structure")}var colpos=ID.indexOf(":");var prefix=colpos===-1?ID:ID.substring(0,colpos);togo=prefix+":"+(move.localID===undefined?"":move.localID)+":"+togo}move=parent}return togo}function isBoundPrimitive(value){return fluid.isPrimitive(value)||value instanceof Array&&(value.length===0||typeof (value[0])==="string")}function processChild(value,key){if(isBoundPrimitive(value)){return{componentType:"UIBound",value:value,ID:key}}else{var unzip=unzipComponent(value);if(unzip.ID){return{ID:key,componentType:"UIContainer",children:[unzip]}}else{unzip.ID=key;return unzip}}}function fixChildren(children){if(!(children instanceof Array)){var togo=[];for(var key in children){var value=children[key];if(value instanceof Array){for(var i=0;i<value.length;++i){var processed=processChild(value[i],key);togo[togo.length]=processed}}else{togo[togo.length]=processChild(value,key)}}return togo}else{return children}}function fixupValue(uibound,model){if(uibound.value===undefined&&uibound.valuebinding!==undefined){if(!model){fluid.fail("Cannot perform value fixup for valuebinding "+uibound.valuebinding+" since no model was supplied to rendering")}uibound.value=fluid.model.getBeanValue(model,uibound.valuebinding)}}function upgradeBound(holder,property,model){if(holder[property]!==undefined){if(isBoundPrimitive(holder[property])){holder[property]={value:holder[property]}}}else{holder[property]={value:null}}fixupValue(holder[property],model)}var duckMap={children:"UIContainer",value:"UIBound",valuebinding:"UIBound",messagekey:"UIMessage",markup:"UIVerbatim",selection:"UISelect",target:"UILink",choiceindex:"UISelectChoice",functionname:"UIInitBlock"};function unzipComponent(component,model){if(component){for(var key in duckMap){if(component[key]!==undefined){component.componentType=duckMap[key];break}}if(component.componentType===undefined&&component.ID!==undefined){component.componentType="UIBound"}}if(!component||component.componentType===undefined){var decorators=component.decorators;if(decorators){delete component.decorators}component={componentType:"UIContainer",children:component};component.decorators=decorators}var cType=component.componentType;if(cType==="UIContainer"){component.children=fixChildren(component.children)}else{if(cType==="UISelect"){upgradeBound(component,"selection",model);upgradeBound(component,"optionlist",model);upgradeBound(component,"optionnames",model)}else{if(cType==="UILink"){upgradeBound(component,"target",model);upgradeBound(component,"linktext",model)}}}return component}function assignSubmittingName(component,defaultname){if(component.submittingname===undefined&&component.willinput!==false){component.submittingname=defaultname?defaultname:component.fullID}return component.submittingname}function fixupTree(tree,model){if(tree.componentType===undefined){tree=unzipComponent(tree,model)}if(tree.componentType!=="UIContainer"&&!tree.parent){tree={children:[tree]}}if(tree.children){tree.childmap={};for(var i=0;i<tree.children.length;++i){var child=tree.children[i];if(child.componentType===undefined){child=unzipComponent(child,model);tree.children[i]=child}child.parent=tree;if(child.ID===undefined){fluid.fail("Error in component tree: component found with no ID "+debugPosition(child))}tree.childmap[child.ID]=child;var colpos=child.ID.indexOf(":");if(colpos===-1){}else{var prefix=child.ID.substring(0,colpos);var childlist=tree.childmap[prefix];if(!childlist){childlist=[];tree.childmap[prefix]=childlist}if(child.localID===undefined&&childlist.length!==0){child.localID=childlist.length}childlist[childlist.length]=child}child.fullID=computeFullID(child);var componentType=child.componentType;if(componentType=="UISelect"){child.selection.fullID=child.fullID+"-selection"}else{if(componentType=="UIInitBlock"){var call=child.functionname+"(";for(var j=0;j<child.arguments.length;++j){if(child.arguments[j] instanceof fluid.ComponentReference){child.arguments[j]=child.parent.fullID+child.arguments[j].reference}call+='"'+child.arguments[j]+'"';if(j<child.arguments.length-1){call+=", "}}child.markup=call+")\n";child.componentType="UIVerbatim"}else{if(componentType=="UIBound"){fixupValue(child,model)}}}fixupTree(child,model)}}return tree}var globalmap={};var branchmap={};var rewritemap={};var seenset={};var collected={};var out="";var debugMode=false;var directFossils={};var renderOptions={};var decoratorQueue=[];var renderedbindings={};function getRewriteKey(template,parent,id){return template.resourceKey+parent.fullID+id}function resolveInScope(searchID,defprefix,scope,child){var deflump;var scopelook=scope?scope[searchID]:null;if(scopelook){for(var i=0;i<scopelook.length;++i){var scopelump=scopelook[i];if(!deflump&&scopelump.rsfID==defprefix){deflump=scopelump}if(scopelump.rsfID==searchID){return scopelump}}}return deflump}function resolveCall(sourcescope,child){var searchID=child.jointID?child.jointID:child.ID;var split=fluid.SplitID(searchID);var defprefix=split.prefix+":";var match=resolveInScope(searchID,defprefix,sourcescope.downmap,child);if(match){return match}if(child.children){match=resolveInScope(searchID,defprefix,globalmap,child);if(match){return match}}return null}function noteCollected(template){if(!seenset[template.href]){fluid.aggregateMMap(collected,template.collectmap);seenset[template.href]=true}}function resolveRecurse(basecontainer,parentlump){for(var i=0;i<basecontainer.children.length;++i){var branch=basecontainer.children[i];if(branch.children){var resolved=resolveCall(parentlump,branch);if(resolved){branchmap[branch.fullID]=resolved;var id=resolved.attributemap.id;if(id!==undefined){rewritemap[getRewriteKey(parentlump.parent,basecontainer,id)]=branch.fullID}noteCollected(resolved.parent);resolveRecurse(branch,resolved)}}}if(parentlump.downmap){for(var id in parentlump.downmap){var lumps=parentlump.downmap[id];for(var i=0;i<lumps.length;++i){var lump=lumps[i];var lumpid=lump.attributemap.id;if(lumpid!==undefined&&lump.rsfID!==undefined){var resolved=fetchComponent(basecontainer,lump.rsfID);if(resolved!==null){var resolveID=resolved.fullID;if(resolved.componentType==="UISelect"){resolveID=resolveID+"-selection"}rewritemap[getRewriteKey(parentlump.parent,basecontainer,lumpid)]=resolveID}}}}}}function resolveBranches(globalmapp,basecontainer,parentlump){branchmap={};rewritemap={};seenset={};collected={};globalmap=globalmapp;branchmap[basecontainer.fullID]=parentlump;resolveRecurse(basecontainer,parentlump)}function dumpBranchHead(branch,targetlump){if(targetlump.elide){return }var attrcopy={};$.extend(true,attrcopy,targetlump.attributemap);adjustForID(attrcopy,branch);outDecorators(branch,attrcopy);out+="<"+targetlump.tagname+" ";out+=fluid.dumpAttributes(attrcopy);out+=">"}function dumpTillLump(lumps,start,limit){for(;start<limit;++start){var text=lumps[start].text;if(text){out+=lumps[start].text}}}function dumpScan(lumps,renderindex,basedepth,closeparent,insideleaf){var start=renderindex;while(true){if(renderindex===lumps.length){break}var lump=lumps[renderindex];if(lump.nestingdepth<basedepth){break}if(lump.rsfID!==undefined){if(!insideleaf){break}if(insideleaf&&lump.nestingdepth>basedepth+(closeparent?0:1)){fluid.log("Error in component tree - leaf component found to contain further components - at "+lump.toString())}else{break}}++renderindex}if(!closeparent&&(renderindex==lumps.length||!lumps[renderindex].rsfID)){--renderindex}dumpTillLump(lumps,start,renderindex);return renderindex}var trc={};function openTag(){if(!trc.iselide){out+="<"+trc.uselump.tagname}}function closeTag(){if(!trc.iselide){out+="</"+trc.uselump.tagname+">"}}function renderUnchanged(){dumpTillLump(trc.uselump.parent.lumps,trc.uselump.lumpindex+1,trc.close.lumpindex+(trc.iselide?0:1))}function replaceAttributes(){if(!trc.iselide){out+=fluid.dumpAttributes(trc.attrcopy)}dumpTemplateBody()}function replaceAttributesOpen(){if(trc.iselide){replaceAttributes()}else{out+=fluid.dumpAttributes(trc.attrcopy);out+=">";trc.nextpos=trc.endopen.lumpindex}}function dumpTemplateBody(){if(trc.endopen.lumpindex===trc.close.lumpindex){if(!trc.iselide){out+="/>"}}else{if(!trc.iselide){out+=">"}dumpTillLump(trc.uselump.parent.lumps,trc.endopen.lumpindex,trc.close.lumpindex+(trc.iselide?0:1))}}function rewriteLeaf(value){if(isValue(value)){replaceBody(value)}else{replaceAttributes()}}function rewriteLeafOpen(value){if(trc.iselide){rewriteLeaf(trc.value)}else{if(isValue(value)){replaceBody(value)}else{replaceAttributesOpen()}}}function replaceBody(value){out+=fluid.dumpAttributes(trc.attrcopy);if(!trc.iselide){out+=">"}out+=fluid.XMLEncode(value.toString());closeTag()}function isValue(value){return value!==null&&value!==undefined&&!isPlaceholder(value)}function isPlaceholder(value){return false}function rewriteURL(template,URL){return URL}function dumpHiddenField(todump){out+='<input type="hidden" ';var isvirtual=todump.virtual;var outattrs={};outattrs[isvirtual?"id":"name"]=todump.name;outattrs.value=todump.value;out+=fluid.dumpAttributes(outattrs);out+=" />\n"}function applyAutoBind(torender,finalID){var tagname=trc.uselump.tagname;var applier=renderOptions.applier;function applyFunc(){fluid.applyChange(fluid.byId(finalID),undefined,applier)}if(renderOptions.autoBind&&/input|select|textarea/.test(tagname)&&!renderedbindings[finalID]){var decorators=[{jQuery:["change",applyFunc]}];if($.browser.msie&&tagname==="input"&&/radio|checkbox/.test(trc.attrcopy.type)){decorators.push({jQuery:["click",applyFunc]})}outDecoratorsImpl(torender,decorators,trc.attrcopy,finalID)}}function dumpBoundFields(torender,parent){if(torender){var holder=parent?parent:torender;if(directFossils&&holder.submittingname&&holder.valuebinding){directFossils[holder.submittingname]={name:holder.submittingname,EL:holder.valuebinding,oldvalue:holder.value};applyAutoBind(torender,torender.fullID)}if(torender.fossilizedbinding){dumpHiddenField(torender.fossilizedbinding)}if(torender.fossilizedshaper){dumpHiddenField(torender.fossilizedshaper)}}}function dumpSelectionBindings(uiselect){if(!renderedbindings[uiselect.selection.fullID]){renderedbindings[uiselect.selection.fullID]=true;dumpBoundFields(uiselect.selection);dumpBoundFields(uiselect.optionlist);dumpBoundFields(uiselect.optionnames)}}fluid.NULL_STRING="\u25a9null\u25a9";var LINK_ATTRIBUTES={a:"href",link:"href",img:"src",frame:"src",script:"src",style:"src",input:"src",embed:"src",form:"action",applet:"codebase",object:"codebase"};function isSelectedValue(torender,value){var selection=torender.selection;return selection.value&&typeof (selection.value)!=="string"&&typeof (selection.value.length)==="number"?$.inArray(value,selection.value,value)!==-1:selection.value===value}function getRelativeComponent(component,relativeID){component=component.parent;if(relativeID.indexOf("..::")===0){relativeID=relativeID.substring(4);component=component.parent}return component.childmap[relativeID]}function explodeDecorators(decorators){var togo=[];if(decorators.type){togo[0]=decorators}else{for(var key in decorators){if(key==="$"){key="jQuery"}var value=decorators[key];var decorator={type:key};if(key==="jQuery"){decorator.func=value[0];decorator.args=value.slice(1)}else{if(key==="addClass"||key==="removeClass"){decorator.classes=value}else{if(key==="attrs"){decorator.attributes=value}else{if(key==="identify"){decorator.key=value}}}}togo[togo.length]=decorator}}return togo}function outDecoratorsImpl(torender,decorators,attrcopy,finalID){renderOptions.idMap=renderOptions.idMap||{};for(var i=0;i<decorators.length;++i){var decorator=decorators[i];var type=decorator.type;if(!type){var explodedDecorators=explodeDecorators(decorator);outDecoratorsImpl(torender,explodedDecorators,attrcopy,finalID);continue}if(type==="$"){type=decorator.type="jQuery"}if(type==="jQuery"||type==="event"||type==="fluid"){var id=adjustForID(attrcopy,torender,true,finalID);decorator.id=id;decoratorQueue[decoratorQueue.length]=decorator}else{if(type==="attrs"){$.extend(true,attrcopy,decorator.attributes)}else{if(type==="addClass"||type==="removeClass"){var fakeNode={nodeType:1,className:attrcopy["class"]||""};$(fakeNode)[type](decorator.classes);attrcopy["class"]=fakeNode.className}else{if(type==="identify"){var id=adjustForID(attrcopy,torender,true,finalID);renderOptions.idMap[decorator.key]=id}}}}}}function outDecorators(torender,attrcopy){if(!torender.decorators){return }if(torender.decorators.length===undefined){torender.decorators=explodeDecorators(torender.decorators)}outDecoratorsImpl(torender,torender.decorators,attrcopy)}function renderComponent(torender){var attrcopy=trc.attrcopy;var lumps=trc.uselump.parent.lumps;var lumpindex=trc.uselump.lumpindex;var componentType=torender.componentType;var tagname=trc.uselump.tagname;outDecorators(torender,attrcopy);if(componentType==="UIMessage"){componentType="UIBound";if(!renderOptions.messageLocator){torender.value="[No messageLocator is configured in options - please consult documentation on options.messageSource]"}else{torender.value=renderOptions.messageLocator(torender.messagekey,torender.args)}}function makeFail(torender,end){fluid.fail("Error in component tree - UISelectChoice with id "+torender.fullID+end)}if(componentType==="UIBound"||componentType==="UISelectChoice"){var parent;if(torender.choiceindex!==undefined){if(torender.parentFullID){parent=getAbsoluteComponent(view,torender.parentFullID);if(!parent){makeFail(torender," has parentFullID of "+torender.parentFullID+" which cannot be resolved")}}else{if(torender.parentRelativeID!==undefined){parent=getRelativeComponent(torender,torender.parentRelativeID);if(!parent){makeFail(torender," has parentRelativeID of "+torender.parentRelativeID+" which cannot be resolved")}}else{makeFail(torender," does not have either parentFullID or parentRelativeID set")}}assignSubmittingName(parent.selection);dumpSelectionBindings(parent)}var submittingname=parent?parent.selection.submittingname:torender.submittingname;if(tagname==="input"||tagname==="textarea"){if(!parent){submittingname=assignSubmittingName(torender)}if(submittingname!==undefined){attrcopy.name=submittingname}}dumpBoundFields(torender,parent?parent.selection:null);if(typeof (torender.value)==="boolean"||attrcopy.type==="radio"||attrcopy.type==="checkbox"){var underlyingValue;var directValue=torender.value;if(torender.choiceindex!==undefined){if(!parent.optionlist.value){fluid.fail("Error in component tree - selection control with full ID "+parent.fullID+" has no values")}underlyingValue=parent.optionlist.value[torender.choiceindex];directValue=isSelectedValue(parent,underlyingValue)}if(isValue(directValue)){if(directValue){attrcopy.checked="checked"}else{delete attrcopy.checked}}attrcopy.value=underlyingValue?underlyingValue:"true";rewriteLeaf(null)}else{if(torender.value instanceof Array){renderUnchanged()}else{var value=parent?parent[tagname==="textarea"||tagname==="input"?"optionlist":"optionnames"].value[torender.choiceindex]:torender.value;if(tagname==="textarea"){if(isPlaceholder(value)&&torender.willinput){value=""}rewriteLeaf(value)}else{if(tagname==="input"){if(torender.willinput||isValue(value)){attrcopy.value=value}rewriteLeaf(null)}else{delete attrcopy.name;rewriteLeafOpen(value)}}}}}else{if(componentType==="UISelect"){applyAutoBind(torender,torender.selection.fullID);var ishtmlselect=tagname==="select";var ismultiple=false;if(torender.selection.value instanceof Array){ismultiple=true;if(ishtmlselect){attrcopy.multiple="multiple"}}assignSubmittingName(torender.selection,attrcopy.id);if(ishtmlselect){if(torender.selection.willinput!==false){attrcopy.name=torender.selection.submittingname}}out+=fluid.dumpAttributes(attrcopy);if(ishtmlselect){out+=">";var values=torender.optionlist.value;var names=torender.optionnames===null||torender.optionnames===undefined||!torender.optionnames.value?values:torender.optionnames.value;if(!names||!names.length){fluid.fail("Error in component tree - UISelect component with fullID "+torender.fullID+" does not have optionnames set")}for(var i=0;i<names.length;++i){out+='<option value="';var value=values[i];if(value===null){value=fluid.NULL_STRING}out+=fluid.XMLEncode(value);if(isSelectedValue(torender,value)){out+='" selected="selected'}out+='">';out+=fluid.XMLEncode(names[i]);out+="</option>\n"}closeTag()}else{dumpTemplateBody()}dumpSelectionBindings(torender)}else{if(componentType==="UILink"){var attrname=LINK_ATTRIBUTES[tagname];if(attrname){var target=torender.target.value;if(!isValue(target)){target=attrcopy[attname]}else{target=rewriteURL(trc.uselump.parent,target)}attrcopy[attrname]=target}var value=torender.linktext.value;if(!isValue(value)){replaceAttributesOpen()}else{rewriteLeaf(value)}}else{if(torender.markup!==undefined){var rendered=torender.markup;if(rendered===null){out+=fluid.dumpAttributes(attrcopy);out+=">";renderUnchanged()}else{if(!trc.iselide){out+=fluid.dumpAttributes(attrcopy);out+=">"}out+=rendered;closeTag()}}else{}}}}}function adjustForID(attrcopy,component,late,forceID){if(!late){delete attrcopy["rsf:id"]}if(forceID!==undefined){attrcopy.id=forceID}else{if(attrcopy.id||late){attrcopy.id=component.fullID}}var count=1;var baseid=attrcopy.id;while(renderOptions.document.getElementById(attrcopy.id)){attrcopy.id=baseid+"-"+(count++)}return attrcopy.id}function rewriteIDRelation(context){var attrname;var attrval=trc.attrcopy["for"];if(attrval!==undefined){attrname="for"}else{attrval=trc.attrcopy.headers;if(attrval!==undefined){attrname="headers"}}if(!attrname){return }var tagname=trc.uselump.tagname;if(attrname==="for"&&tagname!=="label"){return }if(attrname==="headers"&&tagname!=="td"&&tagname!=="th"){return }var rewritten=rewritemap[getRewriteKey(trc.uselump.parent,context,attrval)];if(rewritten!==undefined){trc.attrcopy[attrname]=rewritten}}function renderComment(message){out+=("<!-- "+fluid.XMLEncode(message)+"-->")}function renderDebugMessage(message){out+='<span style="background-color:#FF466B;color:white;padding:1px;">';out+=message;out+="</span><br/>"}function reportPath(branch){var path=branch.fullID;return !path?"component tree root":"full path "+path}function renderComponentSystem(context,torendero,lump){var lumpindex=lump.lumpindex;var lumps=lump.parent.lumps;var nextpos=-1;var outerendopen=lumps[lumpindex+1];var outerclose=lump.close_tag;nextpos=outerclose.lumpindex+1;var payloadlist=lump.downmap?lump.downmap["payload-component"]:null;var payload=payloadlist?payloadlist[0]:null;var iselide=lump.rsfID.charCodeAt(0)===126;var endopen=outerendopen;var close=outerclose;var uselump=lump;var attrcopy={};$.extend(true,attrcopy,(payload===null?lump:payload).attributemap);trc.attrcopy=attrcopy;trc.uselump=uselump;trc.endopen=endopen;trc.close=close;trc.nextpos=nextpos;trc.iselide=iselide;rewriteIDRelation(context);if(torendero===null){if(lump.rsfID.indexOf("scr=")===(iselide?1:0)){var scrname=lump.rsfID.substring(4+(iselide?1:0));if(scrname==="ignore"){nextpos=trc.close.lumpindex+1}else{openTag();replaceAttributesOpen();nextpos=trc.endopen.lumpindex}}}else{if(payload){trc.endopen=lumps[payload.lumpindex+1];trc.close=payload.close_tag;trc.uselump=payload;dumpTillLump(lumps,lumpindex,payload.lumpindex);lumpindex=payload.lumpindex}adjustForID(attrcopy,torendero);openTag();renderComponent(torendero);if(payload!==null){if(trc.nextpos===nextpos){dumpTillLump(lumps,trc.close.lumpindex+1,outerclose.lumpindex+1)}}nextpos=trc.nextpos}return nextpos}function renderContainer(child,targetlump){var t2=targetlump.parent;var firstchild=t2.lumps[targetlump.lumpindex+1];if(child.children!==undefined){dumpBranchHead(child,targetlump)}else{renderComponentSystem(child.parent,child,targetlump)}renderRecurse(child,targetlump,firstchild)}function fetchComponent(basecontainer,id,lump){if(id.indexOf("msg=")===0){var key=id.substring(4);return{componentType:"UIMessage",messagekey:key}}while(basecontainer){var togo=basecontainer.childmap[id];if(togo){return togo}basecontainer=basecontainer.parent}return null}function fetchComponents(basecontainer,id){var togo;while(basecontainer){togo=basecontainer.childmap[id];if(togo){break}basecontainer=basecontainer.parent}return togo}function findChild(sourcescope,child){var split=fluid.SplitID(child.ID);var headlumps=sourcescope.downmap[child.ID];if(headlumps===null){headlumps=sourcescope.downmap[split.prefix+":"]}return headlumps===null?null:headlumps[0]}function renderRecurse(basecontainer,parentlump,baselump){var renderindex=baselump.lumpindex;var basedepth=parentlump.nestingdepth;var t1=parentlump.parent;if(debugMode){var rendered={}}while(true){renderindex=dumpScan(t1.lumps,renderindex,basedepth,!parentlump.elide,false);if(renderindex===t1.lumps.length){break}var lump=t1.lumps[renderindex];var id=lump.rsfID;if(lump.nestingdepth<basedepth||id===undefined){break}if(id.charCodeAt(0)===126){id=id.substring(1)}if(id.indexOf(":")!==-1){var prefix=fluid.getPrefix(id);var children=fetchComponents(basecontainer,prefix);var finallump=lump.uplump.finallump[prefix];var closefinal=finallump.close_tag;if(children){for(var i=0;i<children.length;++i){var child=children[i];if(child.children){var targetlump=branchmap[child.fullID];if(targetlump){if(debugMode){renderComment("Branching for "+child.fullID+" from "+fluid.debugLump(lump)+" to "+fluid.debugLump(targetlump))}renderContainer(child,targetlump);if(debugMode){renderComment("Branch returned for "+child.fullID+fluid.debugLump(lump)+" to "+fluid.debugLump(targetlump))}}else{if(debugMode){renderDebugMessage("No matching template branch found for branch container with full ID "+child.fullID+" rendering from parent template branch "+fluid.debugLump(baselump))}}}else{var targetlump=findChild(parentlump,child);if(!targetlump){if(debugMode){renderDebugMessage("Repetitive leaf with full ID "+child.fullID+" could not be rendered from parent template branch "+fluid.debugLump(baselump))}continue}var renderend=renderComponentSystem(basecontainer,child,targetlump);var wasopentag=renderend<t1.lumps.lengtn&&t1.lumps[renderend].nestingdepth>=targetlump.nestingdepth;var newbase=child.children?child:basecontainer;if(wasopentag){renderRecurse(newbase,targetlump,t1.lumps[renderend]);renderend=targetlump.close_tag.lumpindex+1}if(i!==children.length-1){if(renderend<closefinal.lumpindex){dumpScan(t1.lumps,renderend,targetlump.nestingdepth-1,false,false)}}else{dumpScan(t1.lumps,renderend,targetlump.nestingdepth,true,false)}}}}else{if(debugMode){renderDebugMessage("No branch container with prefix "+prefix+": found in container "+reportPath(basecontainer)+" rendering at template position "+fluid.debugLump(baselump)+", skipping")}}renderindex=closefinal.lumpindex+1;if(debugMode){renderComment("Stack returned from branch for ID "+id+" to "+fluid.debugLump(baselump)+": skipping from "+fluid.debugLump(lump)+" to "+fluid.debugLump(closefinal))}}else{var component;if(id){if(debugMode){rendered[id]=true}component=fetchComponent(basecontainer,id,lump)}if(component&&component.children!==undefined){renderContainer(component);renderindex=lump.close_tag.lumpindex+1}else{renderindex=renderComponentSystem(basecontainer,component,lump)}}if(renderindex===t1.lumps.length){break}}if(debugMode){var children=basecontainer.children;for(var key=0;key<children.length;++key){var child=children[key];if(!(child.ID.indexOf(":")!==-1)&&!rendered[child.ID]){renderDebugMessage("Leaf child component "+child.componentType+" with full ID "+child.fullID+" could not be found within template "+fluid.debugLump(baselump))}}}}function renderCollect(collump){dumpTillLump(collump.parent.lumps,collump.lumpindex,collump.close_tag.lumpindex+1)}function renderCollects(){for(var key in collected){var collist=collected[key];for(var i=0;i<collist.length;++i){renderCollect(collist[i])}}}function processDecoratorQueue(){for(var i=0;i<decoratorQueue.length;++i){var decorator=decoratorQueue[i];var node=fluid.byId(decorator.id);if(!node){fluid.fail("Error during rendering - component with id "+decorator.id+" which has a queued decorator was not found in the output markup")}if(decorator.type==="jQuery"){var jnode=$(node);jnode[decorator.func].apply(jnode,$.makeArray(decorator.args))}else{if(decorator.type==="fluid"){var args=decorator.args;if(!args){if(!decorator.container){decorator.container=node}args=[decorator.container,decorator.options]}var that=fluid.invokeGlobalFunction(decorator.func,args,fluid);decorator.that=that}else{if(decorator.type==="event"){node[decorator.event]=decorator.handler}}}}}fluid.ComponentReference=function(reference){this.reference=reference};fluid.explode=function(hash,basepath){var togo=[];for(var key in hash){var binding=basepath===undefined?key:basepath+"."+key;togo[togo.length]={ID:key,value:hash[key],valuebinding:binding}}return togo};fluid.explodeSelectionToInputs=function(optionlist,opts){return fluid.transform(optionlist,function(option,index){return{ID:opts.rowID,children:[{ID:opts.inputID,parentRelativeID:"..::"+opts.selectID,choiceindex:index},{ID:opts.labelID,parentRelativeID:"..::"+opts.selectID,choiceindex:index}]}})};fluid.resolveMessageSource=function(messageSource){if(messageSource.type==="data"){if(messageSource.url===undefined){return fluid.messageLocator(messageSource.messages)}else{}}};fluid.makeBranches=function(){var firstBranch;var thisBranch;for(var i=0;i<arguments.length;++i){var thisarg=arguments[i];var nextBranch;if(typeof (thisarg)==="string"){nextBranch={ID:thisarg}}else{if(thisarg instanceof Array){nextBranch={ID:thisarg[0],jointID:thisarg[1]}}else{$.extend(true,thisBranch,thisarg);nextBranch=thisBranch}}if(thisBranch&&nextBranch!==thisBranch){if(!thisBranch.children){thisBranch.children=[]}thisBranch.children[thisBranch.children.length]=nextBranch}thisBranch=nextBranch;if(!firstBranch){firstBranch=nextBranch}}return firstBranch};fluid.renderTemplates=function(templates,tree,options,fossilsIn){options=options||{};tree=tree||{};debugMode=options.debugMode;if(!options.messageLocator&&options.messageSource){options.messageLocator=fluid.resolveMessageSource(options.messageSource)}options.document=options.document||document;directFossils=fossilsIn;decoratorQueue=[];tree=fixupTree(tree,options.model);var template=templates[0];resolveBranches(templates.globalmap,tree,template.rootlump);out="";renderedbindings={};renderOptions=options;renderCollects();renderRecurse(tree,template.rootlump,template.lumps[template.firstdocumentindex]);return out};fluid.reRender=function(templates,node,tree,options){options=options||{};node=fluid.unwrap(node);var lastFocusedElement=fluid.getLastFocusedElement?fluid.getLastFocusedElement():null;var lastId;if(lastFocusedElement&&fluid.dom.isContainer(node,lastFocusedElement)){lastId=lastFocusedElement.id}if($.browser.msie){$(node).empty()}else{node.innerHTML=""}var fossils={};var rendered=fluid.renderTemplates(templates,tree,options,fossils);if(options.renderRaw){rendered=fluid.XMLEncode(rendered);rendered=rendered.replace(/\n/g,"<br/>")}if(options.model){fluid.bindFossils(node,options.model,fossils)}if($.browser.msie){$(node).html(rendered)}else{node.innerHTML=rendered}processDecoratorQueue();if(lastId){var element=fluid.byId(lastId);if(element){$(element).focus()}}return templates};function findNodeValue(rootNode){var node=fluid.dom.iterateDom(rootNode,function(node){return node.nodeType===8||node.nodeType===4?"stop":null},true);var value=node.nodeValue;if(value.indexOf("[CDATA[")===0){return value.substring(6,value.length-2)}else{return value}}fluid.extractTemplate=function(node,armouring){if(!armouring){return node.innerHTML}else{return findNodeValue(node)}};fluid.selfRender=function(node,tree,options){options=options||{};node=fluid.unwrap(node);var resourceSpec={base:{resourceText:fluid.extractTemplate(node,options.armouring),href:".",resourceKey:".",cutpoints:options.cutpoints}};var templates=fluid.parseTemplates(resourceSpec,["base"],options);return fluid.reRender(templates,node,tree,options)}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var insertAnchor=function(el){var a=$("<a name='"+el.text()+"' />",el[0].ownerDocument);el.before(a)};var createNode=function(id){var node={ID:id,children:[]};return node};var createTree=function(headings,levels){var generateTree=function(nodes,items,level){if(items.length===0){return }var item=items[0];if(level===item.level){nodes[nodes.length-1].push(item.leaf);items.shift();return generateTree(nodes,items,level)}if(level<item.level){var prefix=level>-1?"level"+(level+1)+":":"";var postfix=level===-1?"s:":"s";var name=prefix+"level"+(level+2)+postfix;var myNode=createNode(name);nodes[nodes.length-1].push(myNode);nodes.push(myNode.children);return generateTree(nodes,items,level+1)}if(level>item.level){nodes.pop();return generateTree(nodes,items,level-1)}};var tree={children:[]};var items=fluid.transform(headings,function(heading){var level=$.inArray(heading.tagName,levels);var text=$(heading).text();return{level:level,leaf:{ID:"level"+(level+1)+":item",children:[{ID:"link",linktext:text,target:"#"+text}]}}});generateTree([tree.children],items,-1);return tree};var buildTOC=function(container,headings,levels,templateURL,afterRender){headings.each(function(i,el){insertAnchor($(el))});var resources={toc:{href:templateURL}};fluid.fetchResources(resources,function(){var templates=fluid.parseTemplates(resources,["toc"],{});var node=$("<div></div>",container[0].ownerDocument);fluid.reRender(templates,node,createTree(headings,levels),{});container.prepend(node);afterRender.fire(node)})};fluid.tableOfContents=function(container,options){var that=fluid.initView("fluid.tableOfContents",container,options);that.events.afterRender.addListener(function(node){that.tocNode=$(node)});buildTOC(that.container,that.locate("headings"),that.options.levels,that.options.templateUrl,that.events.afterRender);that.hide=function(){if(that.tocNode){that.tocNode.hide()}};that.show=function(){if(that.tocNode){that.tocNode.show()}};return that};fluid.defaults("fluid.tableOfContents",{selectors:{headings:":header"},events:{afterRender:null},templateUrl:"../html/TableOfContents.html",levels:["H1","H2","H3","H4","H5","H6"]})})(jQuery,fluid_1_1);(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip-settings",settings);this.tooltipText=this.title;$(this).removeAttr("title");this.alt=""}).hover(save,hide).click(hide)},fixPNG:IE?function(){return this.each(function(){var image=$(this).css("backgroundImage");if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css("position");if(position!="absolute"&&position!="relative"){$(this).css("position","relative")}})}})}:function(){return this},unfixPNG:IE?function(){return this.each(function(){$(this).css({filter:"",backgroundImage:""})})}:function(){return this},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]()})},url:function(){return this.attr("href")||this.attr("src")}});function createHelper(settings){if(helper.parent){return }helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe){helper.parent.bgiframe()}helper.title=$("h3",helper.parent);helper.body=$("div.body",helper.parent);helper.url=$("div.url",helper.parent)}function settings(element){return $.data(element,"tooltip-settings")}function handle(event){if(settings(this).delay){tID=setTimeout(show,settings(this).delay)}else{show()}track=!!settings(this).track;$(document.body).bind("mousemove",update);update(event)}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler)){return }current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent)}helper.body.show()}else{if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;part=parts[i];i++){if(i>0){helper.body.append("<br/>")}helper.body.append(part)}helper.body.hideWhenEmpty()}else{helper.title.html(title).show();helper.body.hide()}}if(settings(this).showURL&&$(this).url()){helper.url.html($(this).url().replace("http://","")).show()}else{helper.url.hide()}helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG){helper.parent.fixPNG()}handle.apply(this,arguments)}function show(){tID=null;helper.parent.show();update()}function update(event){if($.tooltip.blocked){return }if(!track&&helper.parent.is(":visible")){$(document.body).unbind("mousemove",update)}if(current==null||!settings(current)){return }helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;helper.parent.css({left:left+"px",top:top+"px"})}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+"px"}).addClass("viewport-right")}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+"px"}).addClass("viewport-bottom")}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()}}function hide(event){if($.tooltip.blocked){return }if(tID){clearTimeout(tID)}current=null;helper.parent.hide().removeClass(settings(this).extraClass);if(settings(this).fixPNG){helper.parent.unfixPNG()}}$.fn.Tooltip=$.fn.tooltip})(jQuery);fluid_1_1=fluid_1_1||{};(function($,fluid){var STATE_INITIAL="state_initial",STATE_CHANGED="state_changed",STATE_REVERTED="state_reverted";function defaultRenderer(that,targetContainer){var markup="<span class='flc-undo'><span class='flc-undo-undoContainer'>[<a href='#' class='flc-undo-undoControl'>undo</a>]</span><span class='flc-undo-redoContainer'>[<a href='#' class='flc-undo-redoControl'>redo</a>]</span></span>";var markupNode=$(markup);targetContainer.append(markupNode);return markupNode}function refreshView(that){if(that.state===STATE_INITIAL){that.locate("undoContainer").hide();that.locate("redoContainer").hide()}else{if(that.state===STATE_CHANGED){that.locate("undoContainer").show();that.locate("redoContainer").hide()}else{if(that.state===STATE_REVERTED){that.locate("undoContainer").hide();that.locate("redoContainer").show()}}}}var bindHandlers=function(that){that.locate("undoControl").click(function(){if(that.state!==STATE_REVERTED){fluid.model.copyModel(that.extremalModel,that.component.model);that.component.updateModel(that.initialModel,that);that.state=STATE_REVERTED;refreshView(that);that.locate("redoControl").focus()}return false});that.locate("redoControl").click(function(){if(that.state!==STATE_CHANGED){that.component.updateModel(that.extremalModel,that);that.state=STATE_CHANGED;refreshView(that);that.locate("undoControl").focus()}return false});return{modelChanged:function(newModel,oldModel,source){if(source!==that){that.state=STATE_CHANGED;fluid.model.copyModel(that.initialModel,oldModel);refreshView(that)}}}};fluid.undoDecorator=function(component,userOptions){var that=fluid.initView("undo",null,userOptions);that.container=that.options.renderer(that,component.container);fluid.initDomBinder(that);fluid.tabindex(that.locate("undoControl"),0);fluid.tabindex(that.locate("redoControl"),0);that.component=component;that.initialModel={};that.extremalModel={};fluid.model.copyModel(that.initialModel,component.model);fluid.model.copyModel(that.extremalModel,component.model);that.state=STATE_INITIAL;refreshView(that);var listeners=bindHandlers(that);that.returnedOptions={listeners:listeners};return that};fluid.defaults("undo",{selectors:{undoContainer:".flc-undo-undoContainer",undoControl:".flc-undo-undoControl",redoContainer:".flc-undo-redoContainer",redoControl:".flc-undo-redoControl"},renderer:defaultRenderer})})(jQuery,fluid_1_1);if(!this.JSON){JSON=function(){function f(n){return n<10?"0"+n:n}Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function stringify(value,whitelist){var a,i,k,l,r=/["\\\x00-\x1f\x7f-\x9f]/g,v;switch(typeof value){case"string":return r.test(value)?'"'+value.replace(r,function(a){var c=m[a];if(c){return c}c=a.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"':'"'+value+'"';case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}if(typeof value.toJSON==="function"){return stringify(value.toJSON())}a=[];if(typeof value.length==="number"&&!(value.propertyIsEnumerable("length"))){l=value.length;for(i=0;i<l;i+=1){a.push(stringify(value[i],whitelist)||"null")}return"["+a.join(",")+"]"}if(whitelist){l=whitelist.length;for(i=0;i<l;i+=1){k=whitelist[i];if(typeof k==="string"){v=stringify(value[k],whitelist);if(v){a.push(stringify(k)+":"+v)}}}}else{for(k in value){if(typeof k==="string"){v=stringify(value[k],whitelist);if(v){a.push(stringify(k)+":"+v)}}}}return"{"+a.join(",")+"}"}}return{stringify:stringify,parse:function(text,filter){var j;function walk(k,v){var i,n;if(v&&typeof v==="object"){for(i in v){if(Object.prototype.hasOwnProperty.apply(v,[i])){n=walk(i,v[i]);if(n!==undefined){v[i]=n}}}}return filter(k,v)}if(/^[\],:{}\s]*$/.test(text.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof filter==="function"?walk("",j):j}throw new SyntaxError("parseJSON")}}}()}fluid_1_1=fluid_1_1||{};(function($,fluid){var replaceClass=function(container,selector,regExp,newVal){newVal=newVal||"";$(selector,container).andSelf().each(function(i){var attr=($.browser.msie===false)?"class":"className";if(this.getAttribute(attr)){this.setAttribute(attr,this.getAttribute(attr).replace(regExp,newVal))}})};var addClassForSetting=function(element,settingName,value,classnameMap){var settingValues=classnameMap[settingName]||{};var className=settingValues[value];if(className){element.addClass(className)}};var isTrue=function(val){return val&&(val===true||val==="true")};var setToc=function(that,tocSetting){if(isTrue(tocSetting)){if(that.tableOfContents){that.tableOfContents.show()}else{that.tableOfContents=fluid.initSubcomponent(that,"tableOfContents",[that.container,fluid.COMPONENT_OPTIONS])}}else{if(that.tableOfContents){that.tableOfContents.hide()}}};var setLineSpacing=function(container,spacing){spacing=spacing&&spacing>0?spacing:1;container.css("line-height",spacing+"em")};var setMinSize=function(container,size){if(size&&size>0){container.css("font-size",size+"pt");replaceClass(container,"[class*=fl-font-size-]",/\bfl-font-size-[0-9]{1,2}\s+/g,"fl-font-size-100")}else{container.css("font-size","")}};var addStyles=function(container,settings,classnameMap){addClassForSetting(container,"textFont",settings.textFont,classnameMap);addClassForSetting(container,"textSpacing",settings.textSpacing,classnameMap);addClassForSetting(container,"theme",settings.theme,classnameMap);addClassForSetting(container,"layout",settings.layout,classnameMap)};var styleElements=function(elements,setting,classname){if(setting){elements.addClass(classname)}else{elements.removeClass(classname)}};var styleLinks=function(container,settings,classnameMap){var links=$("a",container);styleElements(links,settings.linksUnderline,classnameMap.linksUnderline);styleElements(links,settings.linksBold,classnameMap.linksBold);styleElements(links,settings.linksLarger,classnameMap.linksLarger)};var styleInputs=function(container,settings,classnameMap){styleElements($("input",container),settings.inputsLarger,classnameMap.inputsLarger)};var initModel=function(that){if(that.options.savedSettings){that.model=that.options.savedSettings;return }that.model=that.settingsStore.fetch()||fluid.copy(that.defaultSiteSettings)};var clearClashingClasses=function(container,classnameMap){var settingsWhichMayClash=["textFont","textSpacing","theme","layout"];var classesToRemove="fl-noBackgroundImages";var selector=".fl-noBackgroundImages";for(var i=0;i<settingsWhichMayClash.length;i++){var settingValues=classnameMap[settingsWhichMayClash[i]];for(var val in settingValues){var classname=settingValues[val];if(classname){classesToRemove=classesToRemove+" "+classname;selector=selector+",."+classname}}}$(selector,container).removeClass(classesToRemove);return classesToRemove};var setupUIEnhancer=function(that){that.settingsStore=fluid.initSubcomponent(that,"settingsStore",[fluid.COMPONENT_OPTIONS]);initModel(that);that.refreshView()};fluid.uiEnhancer=function(doc,options){doc=doc||document;var that=fluid.initView("fluid.uiEnhancer",doc,options);$(doc).data("uiEnhancer",that);that.container=$("body",doc);that.defaultSiteSettings=that.options.defaultSiteSettings;var clashingClassnames;that.refreshView=function(){that.container.removeClass(clashingClassnames);addStyles(that.container,that.model,that.options.classnameMap);styleElements(that.container,!isTrue(that.model.backgroundImages),that.options.classnameMap.noBackgroundImages);setMinSize(that.container,that.model.textSize);setLineSpacing(that.container,that.model.lineSpacing);setToc(that,that.model.toc);styleLinks(that.container,that.model,that.options.classnameMap);styleInputs(that.container,that.model,that.options.classnameMap)};that.updateModel=function(newModel,source){that.events.modelChanged.fire(newModel,that.model,source);fluid.clear(that.model);fluid.model.copyModel(that.model,newModel);that.settingsStore.save(that.model);that.refreshView()};clashingClassnames=clearClashingClasses(that.container,that.options.classnameMap);setupUIEnhancer(that);return that};fluid.defaults("fluid.uiEnhancer",{tableOfContents:{type:"fluid.tableOfContents",options:{templateUrl:"../../tableOfContents/html/TableOfContents.html"}},settingsStore:{type:"fluid.uiEnhancer.cookieStore"},events:{modelChanged:null},classnameMap:{textFont:{serif:"fl-font-serif",sansSerif:"fl-font-sans",arial:"fl-font-arial",verdana:"fl-font-verdana",monospace:"fl-font-monospace",courier:"fl-font-courier",times:"fl-font-times"},textSpacing:{"default":"",wide0:"fl-font-spacing-0",wide1:"fl-font-spacing-1",wide2:"fl-font-spacing-2",wide3:"fl-font-spacing-3",wide4:"fl-font-spacing-4",wide5:"fl-font-spacing-5",wide6:"fl-font-spacing-6"},theme:{mist:"fl-theme-mist",rust:"fl-theme-rust",highContrast:"fl-theme-hc",highContrastInverted:"fl-theme-hci",lowContrast:"fl-theme-slate",mediumContrast:"fl-theme-coal","default":""},layout:{simple:"fl-layout-linear","default":""},noBackgroundImages:"fl-noBackgroundImages",linksUnderline:"fl-text-underline",linksBold:"fl-text-bold",linksLarger:"fl-text-larger",inputsLarger:"fl-text-larger"},defaultSiteSettings:{textFont:"",textSpacing:"",theme:"default",layout:"default",textSize:"",lineSpacing:"",backgroundImages:true,toc:false,linksUnderline:false,linksBold:false,linksLarger:false,inputsLarger:false}});fluid.uiEnhancer.cookieStore=function(options){var that={};fluid.mergeComponentOptions(that,"fluid.uiEnhancer.cookieStore",options);that.fetch=function(){var cookie=document.cookie;var cookiePrefix=that.options.cookieName+"=";var retObj,startIndex,endIndex;if(cookie.length>0){startIndex=cookie.indexOf(cookiePrefix);if(startIndex>-1){startIndex=startIndex+cookiePrefix.length;endIndex=cookie.indexOf(";",startIndex);if(endIndex<startIndex){endIndex=cookie.length}retObj=JSON.parse(decodeURIComponent(cookie.substring(startIndex,endIndex)))}}return retObj};that.save=function(settings){document.cookie=that.options.cookieName+"="+encodeURIComponent(JSON.stringify(settings))};return that};fluid.defaults("fluid.uiEnhancer.cookieStore",{cookieName:"fluid-ui-settings"});fluid.uiEnhancer.tempStore=function(options){var that={};that.model=null;that.fetch=function(){return that.model};that.save=function(settings){that.model=settings};return that}})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){var initSliderAria=function(thumb,opts){var ariaDefaults={role:"slider","aria-valuenow":opts.value,"aria-valuemin":opts.min,"aria-valuemax":opts.max};thumb.attr(ariaDefaults)};var initTextfieldSlider=function(that){var textfield=that.locate("textfield");textfield.val(that.model);var sliderOptions=that.options.sliderOptions;sliderOptions.value=that.model;sliderOptions.min=that.options.min;sliderOptions.max=that.options.max;var slider=that.locate("slider").slider(sliderOptions);initSliderAria(that.locate("thumb"),sliderOptions);textfield.change(function(){if(that.isValid(this.value)){if(!that.isInRange(this.value)){this.value=(this.value<that.min)?that.min:that.max}slider.slider("value",this.value);that.updateModel(this.value,this)}else{this.value=that.model}});textfield.keypress(function(evt){if(evt.keyCode!==$.ui.keyCode.ENTER){return true}else{$(evt.target).change();$(fluid.findForm(evt.target)).submit();return false}});slider.bind("slide",function(e,ui){textfield.val(ui.value);that.updateModel(ui.value,slider)})};fluid.textfieldSlider=function(container,options){var that=fluid.initView("fluid.textfieldSlider",container,options);that.model=that.options.value||that.locate("textfield").val();that.min=that.options.min;that.max=that.options.max;initTextfieldSlider(that);that.isInRange=function(value){return(value>=that.min&&value<=that.max)};that.isValid=function(value){return !(isNaN(parseInt(value,10))||isNaN(value))};that.updateModel=function(model,source){if(that.isInRange(model)){that.events.modelChanged.fire(model,that.model,source);that.model=model;that.locate("thumb").attr("aria-valuenow",that.model)}};return that};fluid.defaults("fluid.textfieldSlider",{selectors:{textfield:".flc-textfieldSlider-field",slider:".flc-textfieldSlider-slider",thumb:".ui-slider-handle"},events:{modelChanged:null},sliderOptions:{orientation:"horizontal"},min:0,max:100,value:null})})(jQuery,fluid_1_1);(function($,fluid){var createSelectNode=function(id,selection,list,names){return{ID:id,selection:{valuebinding:selection},optionlist:{valuebinding:list},optionnames:{valuebinding:names}}};var createSimpleBindingNode=function(id,binding){return{ID:id,valuebinding:binding}};var generateTree=function(that,rendererModel){var children=[];children.push(createSelectNode("text-font","selections.textFont","labelMap.textFont.values","labelMap.textFont.names"));children.push(createSelectNode("text-spacing","selections.textSpacing","labelMap.textSpacing.values","labelMap.textSpacing.names"));children.push(createSelectNode("theme","selections.theme","labelMap.theme.values","labelMap.theme.names"));var bgiExplodeOpts={selectID:"background-images",rowID:"background-images-row:",inputID:"background-images-choice",labelID:"background-images-label"};children.push(createSelectNode("background-images","selections.backgroundImages","labelMap.backgroundImages.values","labelMap.backgroundImages.names"));children=children.concat(fluid.explodeSelectionToInputs(that.options.controlValues.backgroundImages,bgiExplodeOpts));var layoutExplodeOpts={selectID:"layout",rowID:"layout-row:",inputID:"layout-choice",labelID:"layout-label"};children.push(createSelectNode("layout","selections.layout","labelMap.layout.values","labelMap.layout.names"));children=children.concat(fluid.explodeSelectionToInputs(that.options.controlValues.layout,layoutExplodeOpts));var tocExplodeOpts={selectID:"toc",rowID:"toc-row:",inputID:"toc-choice",labelID:"toc-label"};children.push(createSelectNode("toc","selections.toc","labelMap.toc.values","labelMap.toc.names"));children=children.concat(fluid.explodeSelectionToInputs(that.options.controlValues.layout,tocExplodeOpts));children.push(createSimpleBindingNode("links-underline","selections.linksUnderline"));children.push(createSimpleBindingNode("links-bold","selections.linksBold"));children.push(createSimpleBindingNode("links-larger","selections.linksLarger"));children.push(createSimpleBindingNode("inputs-larger","selections.inputsLarger"));return{children:children}};var bindHandlers=function(that){var saveButton=that.locate("save");saveButton.click(that.save);that.locate("reset").click(that.reset);that.locate("cancel").click(that.cancel);var form=fluid.findForm(saveButton);$(form).submit(function(){that.save()})};var initPreview=function(that){var previewFrame=that.locate("previewFrame");var previewEnhancer;that.events.modelChanged.addListener(function(model){setTimeout(function(){if(previewEnhancer){previewEnhancer.updateModel(model)}},0)});previewFrame.load(function(){var previewFrameContents=previewFrame.contents();var options={savedSettings:that.model,tableOfContents:that.uiEnhancer.options.tableOfContents,settingsStore:{type:"fluid.uiEnhancer.tempStore"}};previewEnhancer=fluid.uiEnhancer(previewFrameContents,options)})};var createLabelMap=function(options){var labelMap={};for(var item in options.controlValues){labelMap[item]={names:options.strings[item],values:options.controlValues[item]}}return labelMap};var createRenderOptions=function(that){that.model.toc=String(that.model.toc);that.model.backgroundImages=String(that.model.backgroundImages);var aggregateModel=fluid.assembleModel({selections:{model:that.model,applier:that.applier},labelMap:{model:createLabelMap(that.options)}});return{model:aggregateModel.model,applier:aggregateModel.applier,autoBind:true}};var initSliders=function(that){var createOptions=function(settingName){return{listeners:{modelChanged:function(value){that.applier.requestChange(settingName,value)}},value:that.model[settingName]}};var options=createOptions("textSize");fluid.merge(null,options,that.options.textMinSize.options);fluid.initSubcomponents(that,"textMinSize",[that.options.selectors.textMinSizeCtrl,options]);options=createOptions("lineSpacing");fluid.merge(null,options,that.options.lineSpacing.options);fluid.initSubcomponents(that,"lineSpacing",[that.options.selectors.lineSpacingCtrl,options])};var mergeSiteDefaults=function(options,siteDefaults){for(var settingName in options.controlValues){var setting=String(siteDefaults[settingName]);var settingValues=options.controlValues[settingName];if(setting){var index=$.inArray(setting,settingValues);if(index===-1){var defaultIndex=$.inArray("default",settingValues);if(defaultIndex===-1){settingValues.push(setting)}else{settingValues[defaultIndex]=setting}}}}};var setupUIOptions=function(that){that.applier.modelChanged.addListener("*",function(newModel,oldModel,changeRequest){that.events.modelChanged.fire(newModel,oldModel,changeRequest.source)});mergeSiteDefaults(that.options,that.uiEnhancer.defaultSiteSettings);that.events.afterRender.addListener(function(){initSliders(that);bindHandlers(that);initPreview(that)});var rendererOptions=createRenderOptions(that);var template=fluid.selfRender(that.container,generateTree(that,rendererOptions.model),rendererOptions);that.events.afterRender.fire();return template};fluid.uiOptions=function(container,options){var that=fluid.initView("fluid.uiOptions",container,options);that.uiEnhancer=$(document).data("uiEnhancer");that.model=fluid.copy(that.uiEnhancer.model);that.applier=fluid.makeChangeApplier(that.model);var savedModel=that.uiEnhancer.model;var template;that.save=function(){that.events.onSave.fire(that.model);savedModel=fluid.copy(that.model);that.uiEnhancer.updateModel(savedModel)};that.reset=function(){that.events.onReset.fire();that.updateModel(fluid.copy(that.uiEnhancer.defaultSiteSettings),that);that.refreshView()};that.cancel=function(){that.events.onCancel.fire();that.updateModel(fluid.copy(savedModel),that);that.refreshView()};that.refreshView=function(){var rendererOptions=createRenderOptions(that);fluid.reRender(template,that.container,generateTree(that,rendererOptions.model),rendererOptions);that.events.afterRender.fire()};that.updateModel=function(newModel,source){that.events.modelChanged.fire(newModel,that.model,source);fluid.clear(that.model);fluid.model.copyModel(that.model,newModel)};template=setupUIOptions(that);return that};fluid.defaults("fluid.uiOptions",{textMinSize:{type:"fluid.textfieldSlider",options:{min:6,max:30}},lineSpacing:{type:"fluid.textfieldSlider",options:{min:1,max:10}},selectors:{controls:".flc-uiOptions-control",textMinSizeCtrl:".flc-uiOptions-min-text-size",lineSpacingCtrl:".flc-uiOptions-line-spacing",cancel:".flc-uiOptions-cancel",reset:".flc-uiOptions-reset",save:".flc-uiOptions-save",previewFrame:".flc-uiOptions-preview-frame"},events:{modelChanged:null,onSave:null,onCancel:null,onReset:null,afterRender:null},strings:{textFont:["Serif","Sans-Serif","Arial","Verdana","Courier","Times"],textSpacing:["Regular","Wide","Wider","Widest"],theme:["Low Contrast","Medium Contrast","Medium Contrast Grey Scale","High Contrast","High Contrast Inverted"],backgroundImages:["Yes","No"],layout:["Yes","No"],toc:["Yes","No"]},controlValues:{textFont:["serif","sansSerif","arial","verdana","courier","times"],textSpacing:["default","wide1","wide2","wide3"],theme:["lowContrast","default","mediumContrast","highContrast","highContrastInverted"],backgroundImages:["true","false"],layout:["simple","default"],toc:["true","false"]}})})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){function updateStyles(pageListThat,newModel,oldModel){if(!pageListThat.pageLinks){return }if(oldModel.pageIndex!==undefined){var oldLink=pageListThat.pageLinks.eq(oldModel.pageIndex);oldLink.removeClass(pageListThat.options.styles.currentPage)}var pageLink=pageListThat.pageLinks.eq(newModel.pageIndex);pageLink.addClass(pageListThat.options.styles.currentPage)}function bindLinkClick(link,events,eventArg){link.unbind("click.fluid.pager");link.bind("click.fluid.pager",function(){events.initiatePageChange.fire(eventArg)})}function computePageCount(model){model.pageCount=Math.max(1,Math.floor((model.totalRange-1)/model.pageSize)+1)}function computePageLimit(model){return Math.min(model.totalRange,(model.pageIndex+1)*model.pageSize)}fluid.pager=function(){return fluid.pagerImpl.apply(null,arguments)};fluid.pager.directPageList=function(container,events,options){var that=fluid.initView("fluid.pager.directPageList",container,options);that.pageLinks=that.locate("pageLinks");for(var i=0;i<that.pageLinks.length;++i){var pageLink=that.pageLinks.eq(i);bindLinkClick(pageLink,events,{pageIndex:i})}events.onModelChange.addListener(function(newModel,oldModel){updateStyles(that,newModel,oldModel)});that.defaultModel={pageIndex:undefined,pageSize:1,totalRange:that.pageLinks.length};return that};fluid.iota=function(count,first){first=first||0;var togo=[];for(var i=0;i<count;++i){togo[togo.length]=first++}return togo};fluid.pager.everyPageStrategy=fluid.iota;fluid.pager.gappedPageStrategy=function(locality,midLocality){if(!locality){locality=3}if(!midLocality){midLocality=locality}return function(count,first,mid){var togo=[];var j=0;var lastSkip=false;for(var i=0;i<count;++i){if(i<locality||(count-i-1)<locality||(i>=mid-midLocality&&i<=mid+midLocality)){togo[j++]=i;lastSkip=false}else{if(!lastSkip){togo[j++]=-1;lastSkip=true}}}return togo}};fluid.pager.renderedPageList=function(container,events,pagerBarOptions,options,strings){options=$.extend(true,pagerBarOptions,options);var that=fluid.initView("fluid.pager.renderedPageList",container,options);options=that.options;var renderOptions={cutpoints:[{id:"page-link:link",selector:pagerBarOptions.selectors.pageLinks},{id:"page-link:skip",selector:pagerBarOptions.selectors.pageLinkSkip},{id:"page-link:disabled",selector:pagerBarOptions.selectors.pageLinkDisabled}]};if(options.linkBody){renderOptions.cutpoints[renderOptions.cutpoints.length]={id:"payload-component",selector:options.linkBody}}function pageToComponent(current){return function(page){return page===-1?{ID:"page-link:skip"}:{ID:page===current?"page-link:link":"page-link:link",localID:page+1,value:page+1,pageIndex:page,decorators:[{type:"jQuery",func:"click",args:function(){events.initiatePageChange.fire({pageIndex:page})}},{type:page===current?"addClass":"",classes:that.options.styles.currentPage}]}}}var root=that.locate("root");fluid.expectFilledSelector(root,"Error finding root template for fluid.pager.renderedPageList");var template=fluid.selfRender(root,{},renderOptions);events.onModelChange.addListener(function(newModel,oldModel){var pages=that.options.pageStrategy(newModel.pageCount,0,newModel.pageIndex);var pageTree=fluid.transform(pages,pageToComponent(newModel.pageIndex));pageTree[pageTree.length-1].value=pageTree[pageTree.length-1].value+strings.last;events.onRenderPageLinks.fire(pageTree,newModel);fluid.reRender(template,root,pageTree,renderOptions);updateStyles(that,newModel,oldModel)});return that};fluid.defaults("fluid.pager.renderedPageList",{selectors:{root:".flc-pager-links"},linkBody:"a",pageStrategy:fluid.pager.everyPageStrategy});var updatePreviousNext=function(that,options,newModel){if(newModel.pageIndex===0){that.previous.addClass(options.styles.disabled)}else{that.previous.removeClass(options.styles.disabled)}if(newModel.pageIndex===newModel.pageCount-1){that.next.addClass(options.styles.disabled)}else{that.next.removeClass(options.styles.disabled)}};fluid.pager.previousNext=function(container,events,options){var that=fluid.initView("fluid.pager.previousNext",container,options);that.previous=that.locate("previous");bindLinkClick(that.previous,events,{relativePage:-1});that.next=that.locate("next");bindLinkClick(that.next,events,{relativePage:+1});events.onModelChange.addListener(function(newModel,oldModel,overallThat){updatePreviousNext(that,options,newModel)});return that};fluid.pager.pagerBar=function(events,container,options,strings){var that=fluid.initView("fluid.pager.pagerBar",container,options);that.pageList=fluid.initSubcomponent(that,"pageList",[container,events,that.options,fluid.COMPONENT_OPTIONS,strings]);that.previousNext=fluid.initSubcomponent(that,"previousNext",[container,events,that.options,fluid.COMPONENT_OPTIONS,strings]);return that};fluid.defaults("fluid.pager.pagerBar",{previousNext:{type:"fluid.pager.previousNext"},pageList:{type:"fluid.pager.directPageList"},selectors:{pageLinks:".flc-pager-pageLink",pageLinkSkip:".flc-pager-pageLink-skip",pageLinkDisabled:".flc-pager-pageLink-disabled",previous:".flc-pager-previous",next:".flc-pager-next"},styles:{currentPage:"fl-pager-currentPage",disabled:"fl-pager-disabled"}});function getColumnDefs(that){return that.options.columnDefs}fluid.pager.findColumnDef=function(columnDefs,key){var columnDef=$.grep(columnDefs,function(def){return def.key===key})[0];return columnDef};function getRoots(target,overallThat,index){var cellRoot=(overallThat.options.dataOffset?overallThat.options.dataOffset+".":"");target.shortRoot=index;target.longRoot=cellRoot+target.shortRoot}function expandPath(EL,shortRoot,longRoot){if(EL.charAt(0)==="*"){return longRoot+EL.substring(1)}else{return EL.replace("*",shortRoot)}}fluid.pager.fetchValue=function(that,dataModel,index,valuebinding,roots){getRoots(roots,that,index);var path=expandPath(valuebinding,roots.shortRoot,roots.longRoot);return fluid.model.getBeanValue(dataModel,path)};fluid.pager.basicSorter=function(overallThat,model){var dataModel=overallThat.options.dataModel;var roots={};var columnDefs=getColumnDefs(overallThat);var columnDef=fluid.pager.findColumnDef(columnDefs,model.sortKey);var sortrecs=[];for(var i=0;i<model.totalRange;++i){sortrecs[i]={index:i,value:fluid.pager.fetchValue(overallThat,dataModel,i,columnDef.valuebinding,roots)}}var columnType=typeof sortrecs[0].value;function sortfunc(arec,brec){var a=arec.value;var b=brec.value;return a===b?0:(a>b?model.sortDir:-model.sortDir)}sortrecs.sort(sortfunc);return fluid.transform(sortrecs,function(row){return row.index})};fluid.pager.directModelFilter=function(model,pagerModel,perm){var togo=[];var limit=computePageLimit(pagerModel);for(var i=pagerModel.pageIndex*pagerModel.pageSize;i<limit;++i){var index=perm?perm[i]:i;togo[togo.length]={index:index,row:model[index]}}return togo};function expandVariables(value,opts){var togo="";var index=0;while(true){var nextindex=value.indexOf("${",index);if(nextindex===-1){togo+=value.substring(index);break}else{togo+=value.substring(index,nextindex);var endi=value.indexOf("}",nextindex+2);var EL=value.substring(nextindex+2,endi);if(EL==="VALUE"){EL=opts.EL}else{EL=expandPath(EL,opts.shortRoot,opts.longRoot)}var val=fluid.model.getBeanValue(opts.dataModel,EL);togo+=val;index=endi+1}}return togo}function expandPaths(target,tree,opts){for(var i in tree){var val=tree[i];if(val===fluid.VALUE){if(i==="valuebinding"){target[i]=opts.EL}else{target[i]={valuebinding:opts.EL}}}else{if(i==="valuebinding"){target[i]=expandPath(tree[i],opts)}else{if(typeof (val)==="object"){target[i]=val.length!==undefined?[]:{};expandPaths(target[i],val,opts)}else{if(typeof (val)==="string"){target[i]=expandVariables(val,opts)}else{target[i]=tree[i]}}}}}return target}function iDforColumn(columnDef,opts){var options=opts.options;var EL=columnDef.valuebinding;var key=columnDef.key;if(!EL){fluid.fail("Error in definition for column with key "+key+": valuebinding is not set")}opts.EL=expandPath(EL,opts.shortRoot,opts.longRoot);if(!key){var segs=fluid.model.parseEL(EL);key=segs[segs.length-1]}var ID=(options.keyPrefix?options.keyPrefix:"")+key;return ID}function expandColumnDefs(filteredRow,opts){var tree=fluid.transform(opts.columnDefs,function(columnDef){var ID=iDforColumn(columnDef,opts);var togo;if(!columnDef.components){return{ID:ID,valuebinding:opts.EL}}else{if(typeof columnDef.components==="function"){togo=columnDef.components(filteredRow.row,filteredRow.index)}else{togo=columnDef.components}}togo=expandPaths({},togo,opts);togo.ID=ID;return togo});return tree}function fetchModel(overallThat){return fluid.model.getBeanValue(overallThat.options.dataModel,overallThat.options.dataOffset)}function bigHeaderForKey(key,opts){var id=opts.options.renderOptions.idMap["header:"+key];var smallHeader=fluid.jById(id);if(smallHeader.length===0){return null}var headerSortStylisticOffset=opts.overallOptions.selectors.headerSortStylisticOffset;var bigHeader=fluid.findAncestor(smallHeader,function(element){return $(element).is(headerSortStylisticOffset)});return bigHeader}function setSortHeaderClass(styles,element,sort){element=$(element);element.removeClass(styles.ascendingHeader);element.removeClass(styles.descendingHeader);if(sort!==0){element.addClass(sort===1?styles.ascendingHeader:styles.descendingHeader)}}function isCurrentColumnSortable(columnDefs,model){var columnDef=model.sortKey?fluid.pager.findColumnDef(columnDefs,model.sortKey):null;return columnDef?columnDef.sortable:false}function setModelSortHeaderClass(newModel,opts){var styles=opts.overallOptions.styles;var sort=isCurrentColumnSortable(opts.columnDefs,newModel)?newModel.sortDir:0;setSortHeaderClass(styles,bigHeaderForKey(newModel.sortKey,opts),sort)}function fireModelChange(that,newModel,forceUpdate){computePageCount(newModel);if(newModel.pageIndex>=newModel.pageCount){newModel.pageIndex=newModel.pageCount-1}if(forceUpdate||newModel.pageIndex!==that.model.pageIndex||newModel.pageSize!==that.model.pageSize||newModel.sortKey!==that.model.sortKey||newModel.sortDir!==that.model.sortDir){var sorted=isCurrentColumnSortable(getColumnDefs(that),newModel)?that.options.sorter(that,newModel):null;that.permutation=sorted;that.events.onModelChange.fire(newModel,that.model,that);fluid.model.copyModel(that.model,newModel)}}function generateColumnClick(overallThat,columnDef,opts){return function(){if(columnDef.sortable===true){var model=overallThat.model;var newModel=fluid.copy(model);var styles=overallThat.options.styles;var oldKey=model.sortKey;if(columnDef.key!==model.sortKey){newModel.sortKey=columnDef.key;newModel.sortDir=1;var oldBig=bigHeaderForKey(oldKey,opts);if(oldBig){setSortHeaderClass(styles,oldBig,0)}}else{if(newModel.sortKey===columnDef.key){newModel.sortDir=-1*newModel.sortDir}else{return false}}newModel.pageIndex=0;fireModelChange(overallThat,newModel,true);setModelSortHeaderClass(newModel,opts)}return false}}function fetchHeaderDecorators(decorators,columnDef){return decorators[columnDef.sortable?"sortableHeader":"unsortableHeader"]}function generateHeader(overallThat,newModel,columnDefs,opts){return{children:fluid.transform(columnDefs,function(columnDef){return{ID:iDforColumn(columnDef,opts),value:columnDef.label,decorators:[{jQuery:["click",generateColumnClick(overallThat,columnDef,opts)]},{identify:"header:"+columnDef.key}].concat(fetchHeaderDecorators(opts.overallOptions.decorators,columnDef))}})}}fluid.pager.selfRender=function(overallThat,inOptions){var that=fluid.initView("fluid.pager.selfRender",overallThat.container,inOptions);var options=that.options;options.renderOptions.idMap=options.renderOptions.idMap||{};var idMap=options.renderOptions.idMap;var root=that.locate("root");var template=fluid.selfRender(root,{},options.renderOptions);root.addClass(options.styles.root);var columnDefs=getColumnDefs(overallThat);var expOpts={options:options,columnDefs:columnDefs,overallOptions:overallThat.options,dataModel:overallThat.options.dataModel,idMap:idMap};var directModel=fetchModel(overallThat);return{returnedOptions:{listeners:{onModelChange:function(newModel,oldModel){var filtered=overallThat.options.modelFilter(directModel,newModel,overallThat.permutation);var tree=fluid.transform(filtered,function(filteredRow){var roots=getRoots(expOpts,overallThat,filteredRow.index);if(columnDefs==="explode"){return fluid.explode(filteredRow.row,root)}else{if(columnDefs.length){return expandColumnDefs(filteredRow,expOpts)}}});var fullTree={};fullTree[options.row]=tree;if(typeof (columnDefs)==="object"){fullTree[options.header]=generateHeader(overallThat,newModel,columnDefs,expOpts)}options.renderOptions=options.renderOptions||{};options.renderOptions.model=expOpts.dataModel;fluid.reRender(template,root,fullTree,options.renderOptions);setModelSortHeaderClass(newModel,expOpts)}}}}};fluid.defaults("fluid.pager.selfRender",{selectors:{root:".flc-pager-body-template"},styles:{root:"fl-pager"},keyStrategy:"id",keyPrefix:"",row:"row:",header:"header:",renderOptions:{}});fluid.pager.summary=function(dom,options){var node=dom.locate("summary");return{returnedOptions:{listeners:{onModelChange:function(newModel,oldModel){var text=fluid.stringTemplate(options.message,{first:newModel.pageIndex*newModel.pageSize+1,last:computePageLimit(newModel),total:newModel.totalRange});if(node.length>0){node.text(text)}}}}}};fluid.pager.directPageSize=function(that){var node=that.locate("pageSize");if(node.length>0){that.events.onModelChange.addListener(function(newModel,oldModel){if(node.val()!==newModel.pageSize){node.val(newModel.pageSize)}});node.change(function(){that.events.initiatePageSizeChange.fire(node.val())})}return that};fluid.pager.rangeAnnotator=function(that,options){var roots={};that.events.onRenderPageLinks.addListener(function(tree,newModel){var column=that.options.annotateColumnRange;var dataModel=that.options.dataModel;var columnDefs=getColumnDefs(that);if(!column||!dataModel||!columnDefs){return }var columnDef=fluid.pager.findColumnDef(columnDefs,column);function fetchValue(index){index=that.permutation?that.permutation[index]:index;return fluid.pager.fetchValue(that,dataModel,index,columnDef.valuebinding,roots)}var tModel={};fluid.model.copyModel(tModel,newModel);fluid.transform(tree,function(cell){if(cell.ID==="page-link:link"){var page=cell.pageIndex;var start=page*tModel.pageSize;tModel.pageIndex=page;var limit=computePageLimit(tModel);var iValue=fetchValue(start);var lValue=fetchValue(limit-1);var text="<b>"+iValue+"</b><br/>&mdash;<br/><b>"+lValue+"</b>";var decorator={type:"jQuery",func:"tooltip",args:{delay:that.options.tooltipDelay,extraClass:that.options.styles.tooltip,bodyHandler:function(){return text},showURL:false,id:that.options.tooltipId}};cell.decorators.push(decorator)}})})};fluid.pagerImpl=function(container,options){var that=fluid.initView("fluid.pager",container,options);var pageIndexConformer=function(model,changeRequest){if(changeRequest.value<0){changeRequest.value=0}};that.events.initiatePageChange.addListener(function(arg){var newModel=fluid.copy(that.model);if(arg.relativePage!==undefined){newModel.pageIndex=that.model.pageIndex+arg.relativePage}else{newModel.pageIndex=arg.pageIndex}if(newModel.pageIndex===undefined||newModel.pageIndex<0){newModel.pageIndex=0}fireModelChange(that,newModel,arg.forceUpdate)});that.events.initiatePageSizeChange.addListener(function(arg){var newModel=fluid.copy(that.model);newModel.pageSize=arg;fireModelChange(that,newModel)});var pagerBarElement=that.locate("pagerBar");if(pagerBarElement.length>0){that.pagerBar=fluid.initSubcomponent(that,"pagerBar",[that.events,pagerBarElement,fluid.COMPONENT_OPTIONS,that.options.strings])}var pagerBarSecondaryElement=that.locate("pagerBarSecondary");if(pagerBarSecondaryElement.length>0){that.pagerBarSecondary=fluid.initSubcomponent(that,"pagerBar",[that.events,pagerBarSecondaryElement,fluid.COMPONENT_OPTIONS,that.options.strings])}that.bodyRenderer=fluid.initSubcomponent(that,"bodyRenderer",[that,fluid.COMPONENT_OPTIONS]);that.summary=fluid.initSubcomponent(that,"summary",[that.dom,fluid.COMPONENT_OPTIONS]);that.pageSize=fluid.initSubcomponent(that,"pageSize",[that]);that.rangeAnnotator=fluid.initSubcomponent(that,"rangeAnnotator",[that,fluid.COMPONENT_OPTIONS]);that.model=fluid.copy(that.options.model);var dataModel=fetchModel(that);if(dataModel){that.model.totalRange=dataModel.length}if(that.model.totalRange===undefined){if(!that.pagerBar){fluid.fail("Error in Pager configuration - cannot determine total range,  since not configured in model.totalRange and no PagerBar is configured")}that.model=that.pagerBar.pageList.defaultModel}that.applier=fluid.makeChangeApplier(that.model);that.events.initiatePageChange.fire({pageIndex:that.model.pageIndex?that.model.pageIndex:0,forceUpdate:true});return that};fluid.defaults("fluid.pager",{pagerBar:{type:"fluid.pager.pagerBar",options:null},summary:{type:"fluid.pager.summary",options:{message:"%first-%last of %total items"}},pageSize:{type:"fluid.pager.directPageSize"},modelFilter:fluid.pager.directModelFilter,sorter:fluid.pager.basicSorter,bodyRenderer:{type:"fluid.emptySubcomponent"},model:{pageIndex:undefined,pageSize:10,totalRange:undefined},dataModel:undefined,dataOffset:"",columnDefs:"explode",annotateColumnRange:undefined,tooltipDelay:300,tooltipId:"tooltip",rangeAnnotator:{type:"fluid.pager.rangeAnnotator"},selectors:{pagerBar:".flc-pager-top",pagerBarSecondary:".flc-pager-bottom",summary:".flc-pager-summary",pageSize:".flc-pager-page-size",headerSortStylisticOffset:".flc-pager-sort-header"},styles:{tooltip:"fl-pager-tooltip",ascendingHeader:"fl-pager-asc",descendingHeader:"fl-pager-desc"},decorators:{sortableHeader:[],unsortableHeader:[]},strings:{last:" (last)"},events:{initiatePageChange:null,initiatePageSizeChange:null,onModelChange:null,onRenderPageLinks:null}})})(jQuery,fluid_1_1);fluid_1_1=fluid_1_1||{};(function($,fluid){function sendKey(control,event,virtualCode,charCode){var kE=document.createEvent("KeyEvents");kE.initKeyEvent(event,1,1,null,0,0,0,0,virtualCode,charCode);control.dispatchEvent(kE)}fluid.setCaretToEnd=function(control,value){var pos=value?value.length:0;try{control.focus();if(control.setSelectionRange){control.setSelectionRange(pos,pos);if($.browser.mozilla&&pos>0){sendKey(control,"keypress",92,92);sendKey(control,"keydown",8,0);sendKey(control,"keypress",8,0)}}else{if(control.createTextRange){var range=control.createTextRange();range.move("character",pos);range.select()}}}catch(e){}};fluid.deadMansBlur=function(control,exclusions,handler){var blurPending=false;$(control).blur(function(){blurPending=true;setTimeout(function(){if(blurPending){handler(control)}},150)});var canceller=function(){blurPending=false};exclusions.focus(canceller);exclusions.click(canceller)};var renderEditContainer=function(that,really){that.editContainer=that.locate("editContainer");that.editField=that.locate("edit");if(that.editContainer.length!==1){if(that.editField.length===1){that.editContainer=that.editField}else{if(that.editContainer.length>1){fluid.fail("InlineEdit did not find a unique container for selector "+that.options.selectors.editContainer+": "+fluid.dumpEl(that.editContainer))}}}if(that.editContainer.length===1&&!that.editField){that.editField=that.locate("edit",that.editContainer)}if(!really){return }var editElms=that.options.editModeRenderer(that);if(editElms){that.editContainer=editElms.container;that.editField=editElms.field}if(that.editField.length===0){fluid.fail("InlineEdit improperly initialised - editField could not be located (selector "+that.options.selectors.edit+")")}};var switchToViewMode=function(that){that.editContainer.hide();that.viewEl.show()};var cancel=function(that){if(that.isEditing()){that.editView.value(that.model.value);switchToViewMode(that)}};var finish=function(that){var newValue=that.editView.value();var oldValue=that.model.value;var viewNode=that.viewEl[0];var editNode=that.editField[0];var ret=that.events.onFinishEdit.fire(newValue,oldValue,editNode,viewNode);if(ret===false){return }that.updateModelValue(newValue);that.events.afterFinishEdit.fire(newValue,oldValue,editNode,viewNode);switchToViewMode(that)};var bindEditFinish=function(that){if(that.options.submitOnEnter===undefined){that.options.submitOnEnter="textarea"!==fluid.unwrap(that.editField).nodeName.toLowerCase()}function keyCode(evt){return evt.keyCode?evt.keyCode:(evt.which?evt.which:0)}var escHandler=function(evt){var code=keyCode(evt);if(code===$.ui.keyCode.ESCAPE){cancel(that);return false}};var finishHandler=function(evt){var code=keyCode(evt);if(code!==$.ui.keyCode.ENTER){return true}finish(that);that.viewEl.focus();return false};if(that.options.submitOnEnter){that.editContainer.keypress(finishHandler)}that.editContainer.keydown(escHandler)};var bindBlurHandler=function(that){if(that.options.blurHandlerBinder){that.options.blurHandlerBinder(that)}else{var blurHandler=function(evt){finish(that);return false};that.editField.blur(blurHandler)}};var initializeEditView=function(that,initial){if(!that.editInitialized){renderEditContainer(that,!that.options.lazyEditView||!initial);if(!that.options.lazyEditView||!initial){that.editView=fluid.initSubcomponent(that,"editView",that.editField);$.extend(true,that.editView,fluid.initSubcomponent(that,"editAccessor",that.editField));bindEditFinish(that);bindBlurHandler(that);that.editView.refreshView(that);that.editInitialized=true}}};var edit=function(that){initializeEditView(that,false);var viewEl=that.viewEl;var displayText=that.displayView.value();that.updateModelValue(displayText===that.options.defaultViewText?"":displayText);if(that.options.applyEditPadding){that.editField.width(Math.max(viewEl.width()+that.options.paddings.edit,that.options.paddings.minimumEdit))}viewEl.removeClass(that.options.styles.invitation);viewEl.removeClass(that.options.styles.focus);viewEl.hide();that.editContainer.show();if(that.tooltipEnabled()){$("#"+that.options.tooltipId).hide()}setTimeout(function(){that.editField.focus();fluid.setCaretToEnd(that.editField[0],that.editView.value());if(that.options.selectOnEdit){that.editField[0].select()}},0);that.events.afterBeginEdit.fire()};var clearEmptyViewStyles=function(textEl,defaultViewStyle,originalViewPadding){textEl.removeClass(defaultViewStyle);textEl.css("padding-right",originalViewPadding)};var showDefaultViewText=function(that){that.displayView.value(that.options.defaultViewText);that.viewEl.css("padding-right",that.existingPadding);that.viewEl.addClass(that.options.styles.defaultViewStyle)};var showNothing=function(that){that.displayView.value("");if($.browser.msie){if(that.viewEl.css("display")==="inline"){that.viewEl.css("display","inline-block")}}};var showEditedText=function(that){that.displayView.value(that.model.value);clearEmptyViewStyles(that.viewEl,that.options.styles.defaultViewStyle,that.existingPadding)};var refreshView=function(that,source){that.displayView.refreshView(that,source);if(that.editView){that.editView.refreshView(that,source)}};var initModel=function(that,value){that.model.value=value;that.refreshView()};var updateModelValue=function(that,newValue,source){if(that.model.value!==newValue){var oldModel=$.extend(true,{},that.model);that.model.value=newValue;that.events.modelChanged.fire(that.model,oldModel,source);that.refreshView(source)}};var bindHoverHandlers=function(viewEl,invitationStyle){var over=function(evt){viewEl.addClass(invitationStyle)};var out=function(evt){viewEl.removeClass(invitationStyle)};viewEl.hover(over,out)};var makeEditHandler=function(that){return function(){var prevent=that.events.onBeginEdit.fire();if(prevent===false){return false}edit(that);return true}};function makeEditTriggerGuard(that){var viewEl=fluid.unwrap(that.viewEl);return function(event){var outer=fluid.findAncestor(event.target,function(elem){if(/input|select|textarea|button|a/i.test(elem.nodeName)||elem===viewEl){return true}});if(outer===viewEl){that.edit();return false}}}var bindMouseHandlers=function(that){bindHoverHandlers(that.viewEl,that.options.styles.invitation);that.viewEl.click(makeEditTriggerGuard(that))};var bindHighlightHandler=function(viewEl,focusStyle,invitationStyle){var focusOn=function(){viewEl.addClass(focusStyle);viewEl.addClass(invitationStyle)};var focusOff=function(){viewEl.removeClass(focusStyle);viewEl.removeClass(invitationStyle)};viewEl.focus(focusOn);viewEl.blur(focusOff)};var bindKeyboardHandlers=function(that){fluid.tabbable(that.viewEl);var guard=makeEditTriggerGuard(that);fluid.activatable(that.viewEl,function(event){return guard(event)})};var aria=function(viewEl,editContainer){viewEl.attr("role","button")};var defaultEditModeRenderer=function(that){if(that.editContainer.length>0&&that.editField.length>0){return{container:that.editContainer,field:that.editField}}var editModeTemplate="<span><input type='text' class='flc-inlineEdit-edit fl-inlineEdit-edit'/></span>";var editContainer=$(editModeTemplate);var editField=$("input",editContainer);var componentContainerId=that.container.attr("id");if(componentContainerId){var editContainerId=componentContainerId+"-edit-container";var editFieldId=componentContainerId+"-edit";editContainer.attr("id",editContainerId);editField.attr("id",editFieldId)}that.viewEl.after(editContainer);return{container:editContainer,field:editField}};var makeIsEditing=function(that){var isEditing=false;that.events.onBeginEdit.addListener(function(){isEditing=true});that.events.afterFinishEdit.addListener(function(){isEditing=false});return function(){return isEditing}};var setupInlineEdit=function(componentContainer,that){var padding=that.viewEl.css("padding-right");that.existingPadding=padding?parseFloat(padding):0;initModel(that,that.displayView.value());bindMouseHandlers(that);bindKeyboardHandlers(that);bindHighlightHandler(that.viewEl,that.options.styles.focus,that.options.styles.invitation);aria(that.viewEl);if(that.editContainer){that.editContainer.hide()}var initTooltip=function(){if(that.tooltipEnabled()){that.viewEl.tooltip({delay:that.options.tooltipDelay,extraClass:that.options.styles.tooltip,bodyHandler:function(){return that.options.tooltipText},id:that.options.tooltipId})}};$(initTooltip);that.decorators=fluid.initSubcomponents(that,"componentDecorators",[that,fluid.COMPONENT_OPTIONS])};var setupInlineEdits=function(editables,options){var editors=[];editables.each(function(idx,editable){editors.push(fluid.inlineEdit($(editable),options))});return editors};fluid.inlineEdit=function(componentContainer,userOptions){var that=fluid.initView("inlineEdit",componentContainer,userOptions);that.viewEl=that.locate("text");that.displayView=fluid.initSubcomponent(that,"displayView",that.viewEl);$.extend(true,that.displayView,fluid.initSubcomponent(that,"displayAccessor",that.viewEl));that.model={value:""};that.edit=makeEditHandler(that);that.isEditing=makeIsEditing(that);that.finish=function(){finish(that)};that.cancel=function(){cancel(that)};that.tooltipEnabled=function(){return that.options.useTooltip&&$.fn.tooltip};that.refreshView=function(source){refreshView(that,source)};that.updateModelValue=function(newValue,source){updateModelValue(that,newValue,source)};that.updateModel=function(newModel,source){updateModelValue(that,newModel.value,source)};initializeEditView(that,true);setupInlineEdit(componentContainer,that);return that};fluid.inlineEdit.standardAccessor=function(element){var nodeName=element.nodeName.toLowerCase();var func="input"===nodeName||"textarea"===nodeName?"val":"text";return{value:function(newValue){return $(element)[func](newValue)}}};fluid.inlineEdit.richTextViewAccessor=function(element){return{value:function(newValue){return $(element).html(newValue)}}};fluid.inlineEdit.standardDisplayView=function(viewEl){var that={refreshView:function(componentThat,source){if(componentThat.model.value){showEditedText(componentThat)}else{if(componentThat.options.defaultViewText){showDefaultViewText(componentThat)}else{showNothing(componentThat)}}if(($.trim(componentThat.viewEl.text()).length===0)&&(componentThat.existingPadding<componentThat.options.paddings.minimumView)){componentThat.viewEl.css("padding-right",componentThat.options.paddings.minimumView)}}};return that};fluid.inlineEdit.standardEditView=function(editField){var that={refreshView:function(componentThat,source){if(componentThat.editField&&componentThat.editField.index(source)===-1){componentThat.editView.value(componentThat.model.value)}}};$.extend(true,that,fluid.inlineEdit.standardAccessor(editField));return that};fluid.inlineEdits=function(componentContainer,options){options=options||{};var selectors=$.extend({},fluid.defaults("inlineEdits").selectors,options.selectors);var container=fluid.container(componentContainer);var editables=$(selectors.editables,container);return setupInlineEdits(editables,options)};fluid.defaults("inlineEdit",{selectors:{text:".flc-inlineEdit-text",editContainer:".flc-inlineEdit-editContainer",edit:".flc-inlineEdit-edit"},styles:{text:"fl-inlineEdit-text",edit:"fl-inlineEdit-edit",invitation:"fl-inlineEdit-invitation",defaultViewStyle:"fl-inlineEdit-invitation-text",tooltip:"fl-inlineEdit-tooltip",focus:"fl-inlineEdit-focus"},events:{modelChanged:null,onBeginEdit:"preventable",afterBeginEdit:null,onFinishEdit:"preventable",afterFinishEdit:null,afterInitEdit:null},paddings:{edit:10,minimumEdit:80,minimumView:60},applyEditPadding:true,blurHandlerBinder:null,submitOnEnter:undefined,displayAccessor:{type:"fluid.inlineEdit.standardAccessor"},displayView:{type:"fluid.inlineEdit.standardDisplayView"},editAccessor:{type:"fluid.inlineEdit.standardAccessor"},editView:{type:"fluid.inlineEdit.standardEditView"},editModeRenderer:defaultEditModeRenderer,lazyEditView:false,defaultViewText:"Click here to edit",tooltipText:"Click item to edit",tooltipId:"tooltip",useTooltip:false,tooltipDelay:1000,selectOnEdit:false});fluid.defaults("inlineEdits",{selectors:{editables:".flc-inlineEditable"}})})(jQuery,fluid_1_1);(function($){if(typeof (tinyMCE)!=="undefined"){tinyMCE.init({mode:"none",theme:"simple"})}$.fn.tinymce=function(){this.each(function(){tinyMCE.execCommand("mceAddControl",false,this.id)});return this}})(jQuery);fluid_1_1=fluid_1_1||{};(function($,fluid){var configureInlineEdit=function(configurationName,container,options){var assembleOptions=$.extend({},fluid.defaults(configurationName),options);return fluid.inlineEdit(container,assembleOptions)};fluid.inlineEdit.tinyMCE=function(container,options){return configureInlineEdit("fluid.inlineEdit.tinyMCE",container,options)};fluid.inlineEdit.tinyMCE.viewAccessor=function(editField){return{value:function(newValue){var editor=tinyMCE.get(editField.id);if(!editor){return""}if(newValue){$(editField).val(newValue);editor.setContent(newValue,{format:"raw"})}else{return editor.getContent()}}}};fluid.inlineEdit.tinyMCE.blurHandlerBinder=function(that){function focusEditor(editor){setTimeout(function(){tinyMCE.execCommand("mceFocus",false,that.editField[0].id);if($.browser.mozilla&&$.browser.version.substring(0,3)==="1.8"){return }editor.selection.select(editor.getBody(),1);editor.selection.collapse(0)},10)}that.events.afterInitEdit.addListener(function(editor){focusEditor(editor);var editorBody=editor.getBody();fluid.deadMansBlur(that.editField,$(editorBody),function(){that.cancel()})});that.events.afterBeginEdit.addListener(function(){var editor=tinyMCE.get(that.editField[0].id);if(editor){focusEditor(editor)}})};fluid.inlineEdit.tinyMCE.editModeRenderer=function(that){var defaultOptions={mode:"exact",theme:"simple"};var options=$.extend(true,defaultOptions,that.options.tinyMCE);options.elements=fluid.allocateSimpleId(that.editField);var oldinit=options.init_instance_callback;options.init_instance_callback=function(instance){that.events.afterInitEdit.fire(instance);if(oldinit){oldinit()}};tinyMCE.init(options)};fluid.defaults("fluid.inlineEdit.tinyMCE",{useTooltip:true,selectors:{edit:"textarea"},styles:{invitation:null},displayAccessor:{type:"fluid.inlineEdit.richTextViewAccessor"},editAccessor:{type:"fluid.inlineEdit.tinyMCE.viewAccessor"},lazyEditView:true,blurHandlerBinder:fluid.inlineEdit.tinyMCE.blurHandlerBinder,editModeRenderer:fluid.inlineEdit.tinyMCE.editModeRenderer});fluid.inlineEdit.FCKEditor=function(container,options){return configureInlineEdit("fluid.inlineEdit.FCKEditor",container,options)};fluid.inlineEdit.FCKEditor.complete=fluid.event.getEventFirer();fluid.inlineEdit.FCKEditor.complete.addListener(function(editor){var editField=editor.LinkedField;var that=$.data(editField,"fluid.inlineEdit.FCKEditor");that.events.afterInitEdit.fire(editor)});fluid.inlineEdit.FCKEditor.blurHandlerBinder=function(that){function focusEditor(editor){editor.Focus()}that.events.afterInitEdit.addListener(function(editor){focusEditor(editor);var editorBody=editor.EditingArea.TargetElement});that.events.afterBeginEdit.addListener(function(){var editor=fluid.inlineEdit.FCKEditor.byId(that.editField[0].id);if(editor){focusEditor(editor)}})};fluid.inlineEdit.FCKEditor.byId=function(id){var editor=typeof (FCKeditorAPI)==="undefined"?null:FCKeditorAPI.GetInstance(id);return editor};fluid.inlineEdit.FCKEditor.editModeRenderer=function(that){var id=fluid.allocateSimpleId(that.editField);$.data(fluid.unwrap(that.editField),"fluid.inlineEdit.FCKEditor",that);var oFCKeditor=new FCKeditor(id);var opcopy=fluid.copy(that.options.FCKEditor);opcopy.BasePath=opcopy.BasePath+"editor/";$.extend(true,oFCKeditor.Config,opcopy);$.extend(true,oFCKeditor,that.options.FCKEditor);oFCKeditor.Config.fluidInstance=that;oFCKeditor.ReplaceTextarea()};fluid.inlineEdit.FCKEditor.viewAccessor=function(editField){return{value:function(newValue){var editor=fluid.inlineEdit.FCKEditor.byId(editField.id);if(!editor){if(newValue){$(editField).val(newValue)}return""}if(newValue){editor.SetHTML(newValue)}else{return editor.GetHTML()}}}};fluid.defaults("fluid.inlineEdit.FCKEditor",{selectors:{edit:"textarea"},styles:{invitation:null},displayAccessor:{type:"fluid.inlineEdit.richTextViewAccessor"},editAccessor:{type:"fluid.inlineEdit.FCKEditor.viewAccessor"},lazyEditView:true,blurHandlerBinder:fluid.inlineEdit.FCKEditor.blurHandlerBinder,editModeRenderer:fluid.inlineEdit.FCKEditor.editModeRenderer,FCKEditor:{BasePath:"fckeditor/"}});fluid.inlineEdit.dropdown=function(container,options){return configureInlineEdit("fluid.inlineEdit.dropdown",container,options)};fluid.inlineEdit.dropdown.editModeRenderer=function(that){var id=fluid.allocateSimpleId(that.editField);that.editField.selectbox({finishHandler:function(){that.finish()}});return{container:that.editContainer,field:$("input.selectbox",that.editContainer)}};fluid.inlineEdit.dropdown.blurHandlerBinder=function(that){fluid.deadMansBlur(that.editField,$("div.selectbox-wrapper li",that.editContainer),function(){that.cancel()})};fluid.defaults("fluid.inlineEdit.dropdown",{applyEditPadding:false,blurHandlerBinder:fluid.inlineEdit.dropdown.blurHandlerBinder,editModeRenderer:fluid.inlineEdit.dropdown.editModeRenderer})})(jQuery,fluid_1_1);function FCKeditor_OnComplete(editorInstance){fluid.inlineEdit.FCKEditor.complete.fire(editorInstance)};
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/README.txt b/docs/include/jscripts/infusion_old/README.txt
new file mode 100644 (file)
index 0000000..d289047
--- /dev/null
@@ -0,0 +1,247 @@
+Fluid Infusion 1.1
+==================
+Main Project Site:  http://fluidproject.org
+Documentation:      http://wiki.fluidproject.org/display/fluid/Infusion+Documentation
+
+What's New in 1.1
+=================
+
+This release:
+
+    * Updates our supported browsers to include the latest from Yahoo's A-grade browser list
+      * see http://wiki.fluidproject.org/display/fluid/Browser+Support
+    * Provides the ability to create custom builds:
+      * see http://wiki.fluidproject.org/display/fluid/Custom+Build
+    * Adds jQuery UI Themes for working with FSS themes
+    * Adds new and powerful decorators for the Renderer:
+      * The "fluid" decorator instantiates any Fluid Infusion component bound to the markup
+      * New support for removing arbitrary attributes and CSS classes
+    * Updates the Pager:
+      * Improved handing of column sorting
+      * Fixed persistence of focus
+    * Updates the Uploader:
+      * User can manually switch to the standard non-Flash http file uploader
+      * Uploader Browse button now respects DOM z-index in Flash 10
+    * Updates the User Interface Options:
+      * Better cross browser support
+      * Better keyboard and screen reader accessibility
+    * Changes some class names in the FSS and components:
+         * see http://wiki.fluidproject.org/display/fluid/Upgrading+to+Infusion+1.1
+       * Changes some Framework API:
+         * see http://wiki.fluidproject.org/display/fluid/Upgrading+to+Infusion+1.1
+    * Fixes many bugs
+
+What's in this Release
+======================
+
+This release is available in two forms:
+    Deployment Bundle - infusion-1.1.zip 
+    Source Code Bundle - infusion-1.1-src.zip
+
+In addition to source code, samples and tests, both bundles include at the top level a single JavaScript file
+
+    InfusionAll.js
+
+that is a combination of all other source files. Developers can include this single file in their
+pages to provide all the necessary support for the Infusion component Library. In the Deployment Bundle,
+this script is compressed and suitable for production use.
+
+The Deployment Bundle also includes a WAR file suitable for deployment in Java-based containers: 
+        fluid-components-1.1.war
+
+Source Code
+-----------
+The organization of the full source code for the Infusion library is as follows:
+
+        components/
+             inlineEdit/
+             pager/
+             progress/
+             reorderer/
+             tableOfContents/
+             uiOptions/
+             undo/
+             uploader/
+        framework/
+             core/
+             fss/
+             renderer/
+        lib/
+             fastXmlPull/
+             jquery/
+             json/
+             swfobject/
+             swfupload/
+
+In the Deployment Bundle, the JavaScript source has been minified: comments and whitespace have
+been removed. 
+
+Developers wishing to learn about the Fluid Infusion code, or debug their applications, should use
+the Source Code Bundle.
+
+Examples and Sample Code
+------------------------
+Sample code illustrating how Infusion components can be used:
+
+        integration-demos/
+             bspace/    (showcases: Inline Edit)
+             sakai/     (showcases: Inline Edit, Pager, UI Options, FSS)
+             uportal/   (showcases: Reorderer, UI Options, FSS)
+        standalone-demos/
+             keyboard-a11y/
+             lib/
+             pager/
+             progress/
+             quick-start-examples/
+                  fss/
+                  inlineEdit/
+                  reorderer/
+             renderer/
+             reorderer/
+             table-of-contents/
+
+Tests
+-----
+        tests/
+            component-tests/
+            escalated-tests/
+            framework-tests/
+            lib/
+            manual-tests/
+            test-core/
+
+License
+-------
+Fluid Infusion code is licensed under a dual ECL 2.0 / BSD license. The specific licenses can be
+found in the license file:
+        licenses/Infusion-LICENSE.txt
+
+Infusion also depends upon some third party open source modules. These are contained in their own
+folders, and their licenses are also present in
+        licenses/
+
+Third Party Software in Infusion
+--------------------------------
+This is a list of publicly available software that is included in the Fluid Infusion bundle, along
+with their licensing terms.
+
+    * jQuery javascript library v1.3.2: http://jquery.com/ (MIT and GPL licensed http://docs.jquery.com/Licensing)
+    * jQuery UI javascript widget library v1.7: http://ui.jquery.com/ (MIT and GPL licensed http://docs.jquery.com/Licensing)
+    * jQuery QUnit testrunner r6173: http://docs.jquery.com/QUnit (MIT and GPL licensed http://docs.jquery.com/Licensing)
+    * Douglas Crockford's JSON parsing and stringifying methods (from 2007-11-06): http://www.json.org/ (Public Domain)
+    * SWFUpload v2.2.0.1: http://swfupload.org/ (MIT licensed http://www.opensource.org/licenses/mit-license.php)
+    * SWFObject v2.1: http://code.google.com/p/swfobject/ (MIT licensed http://www.opensource.org/licenses/mit-license.php)
+    * Sample markup and stylesheets from Sakai v2.5 (http://sakaiproject.org) and uPortal v2.6 (http://www.uportal.org/)
+    * FCKeditor v2.6, HTML text editor (LGPL licensed http://www.fckeditor.net/license)
+    
+Other third party software
+
+    * fastXmlPull is based on XML for Script's Fast Pull Parser v3.1
+      (see: http://wiki.fluidproject.org/display/fluid/Licensing+for+fastXmlPull.js )
+    * fluid.reset.css is based on YUI's CSS reset styling v2.5.2
+      see: http://developer.yahoo.com/yui/reset/ (BSD licensed http://developer.yahoo.com/yui/license.html)
+    
+Readme
+------
+This file.
+        README.txt
+
+
+Documentation
+=============
+
+    http://wiki.fluidproject.org/display/fluid/Infusion+Documentation
+
+The Fluid Project uses a wiki for documentation and project collaboration: http://wiki.fluidproject.org.
+
+The documentation for Infusion consists of a number of information pages stored in the Fluid Wiki.
+The pages include tutorials, API descriptions, testing procedures, and data-gathering approaches. To make the 
+manual pages easy to navigate we have added the following guides:
+
+    * A landing page is provided for the reader, with links to all of our documenation.
+    * A link to the documentation appears at the top of the left-side wiki navigation
+      bar with the name "Infusion Documentation".
+
+
+Supported Browsers
+==================
+Firefox 2.x, 3.x: full support
+Internet Explorer 6.x, 7.x: full support
+Safari 3.1, Opera 9.6: full support (except keyboard interaction, which is not supported by these browsers)
+
+Internet Explorer 8: preliminary support
+
+For more information on Fluid Infusion browser support, please see:
+    http://wiki.fluidproject.org/display/fluid/Browser+Support
+
+
+Status of Components and Framework Features
+===========================================
+
+Production: supports A-Grade browsers, stable for production usage across a wide range of
+applications and use cases
+    * Fluid Skinning System 
+    * Infusion Framework Core
+    * Inline Edit: Simple Text
+    * Reorderer: List, Grid, Layout, Image
+    * Undo
+
+Preview: still growing, but with broad browser support. Expect new features in upcoming releases
+    * Pager
+    * Progress
+    * UI Options
+    * Uploader
+    * Renderer
+
+Sneak Peek: in development; APIs will change. Share your feedback, ideas, and code
+    * Inline Edit: Dropdown
+    * Inline Edit: Rich Text
+    * Table of Contents
+
+
+Known Issues
+============
+
+The Fluid Project uses a JIRA website to track bugs: http://issues.fluidproject.org.
+Some of the known issues in this release are described here:
+
+FSS:
+    FLUID-2504: Flexible columns don't maintain proper alignment under certain conditions
+    FLUID-2434: In IE, major font size changes break text positioning within form controls
+    FLUID-2397: Opera doesn't seem to repaint certain css changes on the fly, requiring a refresh to see them
+
+Framework:
+    FLUID-2577 Renderer performance can be slow on IE 6 and 7 in some contexts.
+
+Inline Edit: 
+    FLUID-1600 Pressing the "Tab" key to exit edit mode places focus on the wrong item
+    FLUID-2536 Inline Edit test fails using IE 8
+  
+Uploader: 
+    FLUID-2582 Uploader is dependent on ProgressiveEnhancement.js, which is not included in InfusionAll.js
+    FLUID-2895 The browse files button displays as a white box in IE 7 when running off the local system in Flash 10
+    FLUID-2052 Cannot tab away from the "Browse Files" button with Flash 10; using FF3*
+    FLUID-2032 Cannot Tab to the 'Browse More" button with Flash 10, using FF2*
+    * For information related to known issues with Flash 10 compatibility, 
+      see http://wiki.fluidproject.org/x/kwZo
+
+Layout Reorderer: 
+    FLUID-1540 Can't use keyboard reordering to move a nested reorderer to the right column, using IE6
+    FLUID-2171 In IE, can't reorderer portlets containing Google components
+    FLUID-858  Portlet Columns load with no padding between them in IE7
+
+Pager:
+    FLUID-2880 The Pager will be refactored. Note that as a result of this, there will be significant changes to the Pager API
+    FLUID-2329 The self-rendering mode of the Pager is not the default mode
+
+Reorderer: 
+    FLUID-539 Can't use the "Tab" key to navigate out of reorderable tabs
+    FLUID-148 Edge case: visual position of drop target when droppable is at beginning or end of a row
+    FLUID-118 Dragging an image offscreen or out of the frame has some unexpected results.
+
+UI Options: 
+    FLUID-2398 Minimum font size control changes the text size even when the base size is larger then the minimum.
+    FLUID-2481 "Links" selection does not work correctly in UIOptions
+    FLUID-2506 Keyboard navigation inside the dialog breaks in simple layout mode: using FF
+    FLUID-2524 scrolling the screen while the UI Options dialog is open, will cause it's contents to appear distorted: using IE
+    
diff --git a/docs/include/jscripts/infusion_old/components/inlineEdit/css/InlineEdit.css b/docs/include/jscripts/infusion_old/components/inlineEdit/css/InlineEdit.css
new file mode 100644 (file)
index 0000000..b2361a0
--- /dev/null
@@ -0,0 +1,3 @@
+.fl-inlineEdit-edit{margin:-2px;padding:0;}
+.fl-inlineEdit-tooltip{position:absolute;background:#CCC;border:1px solid #999;font:normal 75% sans-serif;padding:3px 5px;}
+.fl-inlineEdit-invitation{border:1px solid #999;background:lightyellow;cursor:pointer;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/inlineEdit/js/InlineEdit.js b/docs/include/jscripts/infusion_old/components/inlineEdit/js/InlineEdit.js
new file mode 100644 (file)
index 0000000..b636a58
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){function sendKey(control,event,virtualCode,charCode){var kE=document.createEvent("KeyEvents");kE.initKeyEvent(event,1,1,null,0,0,0,0,virtualCode,charCode);control.dispatchEvent(kE)}fluid.setCaretToEnd=function(control,value){var pos=value?value.length:0;try{control.focus();if(control.setSelectionRange){control.setSelectionRange(pos,pos);if($.browser.mozilla&&pos>0){sendKey(control,"keypress",92,92);sendKey(control,"keydown",8,0);sendKey(control,"keypress",8,0)}}else{if(control.createTextRange){var range=control.createTextRange();range.move("character",pos);range.select()}}}catch(e){}};fluid.deadMansBlur=function(control,exclusions,handler){var blurPending=false;$(control).blur(function(){blurPending=true;setTimeout(function(){if(blurPending){handler(control)}},150)});var canceller=function(){blurPending=false};exclusions.focus(canceller);exclusions.click(canceller)};var renderEditContainer=function(that,really){that.editContainer=that.locate("editContainer");that.editField=that.locate("edit");if(that.editContainer.length!==1){if(that.editField.length===1){that.editContainer=that.editField}else{if(that.editContainer.length>1){fluid.fail("InlineEdit did not find a unique container for selector "+that.options.selectors.editContainer+": "+fluid.dumpEl(that.editContainer))}}}if(that.editContainer.length===1&&!that.editField){that.editField=that.locate("edit",that.editContainer)}if(!really){return }var editElms=that.options.editModeRenderer(that);if(editElms){that.editContainer=editElms.container;that.editField=editElms.field}if(that.editField.length===0){fluid.fail("InlineEdit improperly initialised - editField could not be located (selector "+that.options.selectors.edit+")")}};var switchToViewMode=function(that){that.editContainer.hide();that.viewEl.show()};var cancel=function(that){if(that.isEditing()){that.editView.value(that.model.value);switchToViewMode(that)}};var finish=function(that){var newValue=that.editView.value();var oldValue=that.model.value;var viewNode=that.viewEl[0];var editNode=that.editField[0];var ret=that.events.onFinishEdit.fire(newValue,oldValue,editNode,viewNode);if(ret===false){return }that.updateModelValue(newValue);that.events.afterFinishEdit.fire(newValue,oldValue,editNode,viewNode);switchToViewMode(that)};var bindEditFinish=function(that){if(that.options.submitOnEnter===undefined){that.options.submitOnEnter="textarea"!==fluid.unwrap(that.editField).nodeName.toLowerCase()}function keyCode(evt){return evt.keyCode?evt.keyCode:(evt.which?evt.which:0)}var escHandler=function(evt){var code=keyCode(evt);if(code===$.ui.keyCode.ESCAPE){cancel(that);return false}};var finishHandler=function(evt){var code=keyCode(evt);if(code!==$.ui.keyCode.ENTER){return true}finish(that);that.viewEl.focus();return false};if(that.options.submitOnEnter){that.editContainer.keypress(finishHandler)}that.editContainer.keydown(escHandler)};var bindBlurHandler=function(that){if(that.options.blurHandlerBinder){that.options.blurHandlerBinder(that)}else{var blurHandler=function(evt){finish(that);return false};that.editField.blur(blurHandler)}};var initializeEditView=function(that,initial){if(!that.editInitialized){renderEditContainer(that,!that.options.lazyEditView||!initial);if(!that.options.lazyEditView||!initial){that.editView=fluid.initSubcomponent(that,"editView",that.editField);$.extend(true,that.editView,fluid.initSubcomponent(that,"editAccessor",that.editField));bindEditFinish(that);bindBlurHandler(that);that.editView.refreshView(that);that.editInitialized=true}}};var edit=function(that){initializeEditView(that,false);var viewEl=that.viewEl;var displayText=that.displayView.value();that.updateModelValue(displayText===that.options.defaultViewText?"":displayText);if(that.options.applyEditPadding){that.editField.width(Math.max(viewEl.width()+that.options.paddings.edit,that.options.paddings.minimumEdit))}viewEl.removeClass(that.options.styles.invitation);viewEl.removeClass(that.options.styles.focus);viewEl.hide();that.editContainer.show();if(that.tooltipEnabled()){$("#"+that.options.tooltipId).hide()}setTimeout(function(){that.editField.focus();fluid.setCaretToEnd(that.editField[0],that.editView.value());if(that.options.selectOnEdit){that.editField[0].select()}},0);that.events.afterBeginEdit.fire()};var clearEmptyViewStyles=function(textEl,defaultViewStyle,originalViewPadding){textEl.removeClass(defaultViewStyle);textEl.css("padding-right",originalViewPadding)};var showDefaultViewText=function(that){that.displayView.value(that.options.defaultViewText);that.viewEl.css("padding-right",that.existingPadding);that.viewEl.addClass(that.options.styles.defaultViewStyle)};var showNothing=function(that){that.displayView.value("");if($.browser.msie){if(that.viewEl.css("display")==="inline"){that.viewEl.css("display","inline-block")}}};var showEditedText=function(that){that.displayView.value(that.model.value);clearEmptyViewStyles(that.viewEl,that.options.styles.defaultViewStyle,that.existingPadding)};var refreshView=function(that,source){that.displayView.refreshView(that,source);if(that.editView){that.editView.refreshView(that,source)}};var initModel=function(that,value){that.model.value=value;that.refreshView()};var updateModelValue=function(that,newValue,source){if(that.model.value!==newValue){var oldModel=$.extend(true,{},that.model);that.model.value=newValue;that.events.modelChanged.fire(that.model,oldModel,source);that.refreshView(source)}};var bindHoverHandlers=function(viewEl,invitationStyle){var over=function(evt){viewEl.addClass(invitationStyle)};var out=function(evt){viewEl.removeClass(invitationStyle)};viewEl.hover(over,out)};var makeEditHandler=function(that){return function(){var prevent=that.events.onBeginEdit.fire();if(prevent===false){return false}edit(that);return true}};function makeEditTriggerGuard(that){var viewEl=fluid.unwrap(that.viewEl);return function(event){var outer=fluid.findAncestor(event.target,function(elem){if(/input|select|textarea|button|a/i.test(elem.nodeName)||elem===viewEl){return true}});if(outer===viewEl){that.edit();return false}}}var bindMouseHandlers=function(that){bindHoverHandlers(that.viewEl,that.options.styles.invitation);that.viewEl.click(makeEditTriggerGuard(that))};var bindHighlightHandler=function(viewEl,focusStyle,invitationStyle){var focusOn=function(){viewEl.addClass(focusStyle);viewEl.addClass(invitationStyle)};var focusOff=function(){viewEl.removeClass(focusStyle);viewEl.removeClass(invitationStyle)};viewEl.focus(focusOn);viewEl.blur(focusOff)};var bindKeyboardHandlers=function(that){fluid.tabbable(that.viewEl);var guard=makeEditTriggerGuard(that);fluid.activatable(that.viewEl,function(event){return guard(event)})};var aria=function(viewEl,editContainer){viewEl.attr("role","button")};var defaultEditModeRenderer=function(that){if(that.editContainer.length>0&&that.editField.length>0){return{container:that.editContainer,field:that.editField}}var editModeTemplate="<span><input type='text' class='flc-inlineEdit-edit fl-inlineEdit-edit'/></span>";var editContainer=$(editModeTemplate);var editField=$("input",editContainer);var componentContainerId=that.container.attr("id");if(componentContainerId){var editContainerId=componentContainerId+"-edit-container";var editFieldId=componentContainerId+"-edit";editContainer.attr("id",editContainerId);editField.attr("id",editFieldId)}that.viewEl.after(editContainer);return{container:editContainer,field:editField}};var makeIsEditing=function(that){var isEditing=false;that.events.onBeginEdit.addListener(function(){isEditing=true});that.events.afterFinishEdit.addListener(function(){isEditing=false});return function(){return isEditing}};var setupInlineEdit=function(componentContainer,that){var padding=that.viewEl.css("padding-right");that.existingPadding=padding?parseFloat(padding):0;initModel(that,that.displayView.value());bindMouseHandlers(that);bindKeyboardHandlers(that);bindHighlightHandler(that.viewEl,that.options.styles.focus,that.options.styles.invitation);aria(that.viewEl);if(that.editContainer){that.editContainer.hide()}var initTooltip=function(){if(that.tooltipEnabled()){that.viewEl.tooltip({delay:that.options.tooltipDelay,extraClass:that.options.styles.tooltip,bodyHandler:function(){return that.options.tooltipText},id:that.options.tooltipId})}};$(initTooltip);that.decorators=fluid.initSubcomponents(that,"componentDecorators",[that,fluid.COMPONENT_OPTIONS])};var setupInlineEdits=function(editables,options){var editors=[];editables.each(function(idx,editable){editors.push(fluid.inlineEdit($(editable),options))});return editors};fluid.inlineEdit=function(componentContainer,userOptions){var that=fluid.initView("inlineEdit",componentContainer,userOptions);that.viewEl=that.locate("text");that.displayView=fluid.initSubcomponent(that,"displayView",that.viewEl);$.extend(true,that.displayView,fluid.initSubcomponent(that,"displayAccessor",that.viewEl));that.model={value:""};that.edit=makeEditHandler(that);that.isEditing=makeIsEditing(that);that.finish=function(){finish(that)};that.cancel=function(){cancel(that)};that.tooltipEnabled=function(){return that.options.useTooltip&&$.fn.tooltip};that.refreshView=function(source){refreshView(that,source)};that.updateModelValue=function(newValue,source){updateModelValue(that,newValue,source)};that.updateModel=function(newModel,source){updateModelValue(that,newModel.value,source)};initializeEditView(that,true);setupInlineEdit(componentContainer,that);return that};fluid.inlineEdit.standardAccessor=function(element){var nodeName=element.nodeName.toLowerCase();var func="input"===nodeName||"textarea"===nodeName?"val":"text";return{value:function(newValue){return $(element)[func](newValue)}}};fluid.inlineEdit.richTextViewAccessor=function(element){return{value:function(newValue){return $(element).html(newValue)}}};fluid.inlineEdit.standardDisplayView=function(viewEl){var that={refreshView:function(componentThat,source){if(componentThat.model.value){showEditedText(componentThat)}else{if(componentThat.options.defaultViewText){showDefaultViewText(componentThat)}else{showNothing(componentThat)}}if(($.trim(componentThat.viewEl.text()).length===0)&&(componentThat.existingPadding<componentThat.options.paddings.minimumView)){componentThat.viewEl.css("padding-right",componentThat.options.paddings.minimumView)}}};return that};fluid.inlineEdit.standardEditView=function(editField){var that={refreshView:function(componentThat,source){if(componentThat.editField&&componentThat.editField.index(source)===-1){componentThat.editView.value(componentThat.model.value)}}};$.extend(true,that,fluid.inlineEdit.standardAccessor(editField));return that};fluid.inlineEdits=function(componentContainer,options){options=options||{};var selectors=$.extend({},fluid.defaults("inlineEdits").selectors,options.selectors);var container=fluid.container(componentContainer);var editables=$(selectors.editables,container);return setupInlineEdits(editables,options)};fluid.defaults("inlineEdit",{selectors:{text:".flc-inlineEdit-text",editContainer:".flc-inlineEdit-editContainer",edit:".flc-inlineEdit-edit"},styles:{text:"fl-inlineEdit-text",edit:"fl-inlineEdit-edit",invitation:"fl-inlineEdit-invitation",defaultViewStyle:"fl-inlineEdit-invitation-text",tooltip:"fl-inlineEdit-tooltip",focus:"fl-inlineEdit-focus"},events:{modelChanged:null,onBeginEdit:"preventable",afterBeginEdit:null,onFinishEdit:"preventable",afterFinishEdit:null,afterInitEdit:null},paddings:{edit:10,minimumEdit:80,minimumView:60},applyEditPadding:true,blurHandlerBinder:null,submitOnEnter:undefined,displayAccessor:{type:"fluid.inlineEdit.standardAccessor"},displayView:{type:"fluid.inlineEdit.standardDisplayView"},editAccessor:{type:"fluid.inlineEdit.standardAccessor"},editView:{type:"fluid.inlineEdit.standardEditView"},editModeRenderer:defaultEditModeRenderer,lazyEditView:false,defaultViewText:"Click here to edit",tooltipText:"Click item to edit",tooltipId:"tooltip",useTooltip:false,tooltipDelay:1000,selectOnEdit:false});fluid.defaults("inlineEdits",{selectors:{editables:".flc-inlineEditable"}})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/inlineEdit/js/InlineEditIntegrations.js b/docs/include/jscripts/infusion_old/components/inlineEdit/js/InlineEditIntegrations.js
new file mode 100644 (file)
index 0000000..1ee53a6
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var configureInlineEdit=function(configurationName,container,options){var assembleOptions=$.extend({},fluid.defaults(configurationName),options);return fluid.inlineEdit(container,assembleOptions)};fluid.inlineEdit.tinyMCE=function(container,options){return configureInlineEdit("fluid.inlineEdit.tinyMCE",container,options)};fluid.inlineEdit.tinyMCE.viewAccessor=function(editField){return{value:function(newValue){var editor=tinyMCE.get(editField.id);if(!editor){return""}if(newValue){$(editField).val(newValue);editor.setContent(newValue,{format:"raw"})}else{return editor.getContent()}}}};fluid.inlineEdit.tinyMCE.blurHandlerBinder=function(that){function focusEditor(editor){setTimeout(function(){tinyMCE.execCommand("mceFocus",false,that.editField[0].id);if($.browser.mozilla&&$.browser.version.substring(0,3)==="1.8"){return }editor.selection.select(editor.getBody(),1);editor.selection.collapse(0)},10)}that.events.afterInitEdit.addListener(function(editor){focusEditor(editor);var editorBody=editor.getBody();fluid.deadMansBlur(that.editField,$(editorBody),function(){that.cancel()})});that.events.afterBeginEdit.addListener(function(){var editor=tinyMCE.get(that.editField[0].id);if(editor){focusEditor(editor)}})};fluid.inlineEdit.tinyMCE.editModeRenderer=function(that){var defaultOptions={mode:"exact",theme:"simple"};var options=$.extend(true,defaultOptions,that.options.tinyMCE);options.elements=fluid.allocateSimpleId(that.editField);var oldinit=options.init_instance_callback;options.init_instance_callback=function(instance){that.events.afterInitEdit.fire(instance);if(oldinit){oldinit()}};tinyMCE.init(options)};fluid.defaults("fluid.inlineEdit.tinyMCE",{useTooltip:true,selectors:{edit:"textarea"},styles:{invitation:null},displayAccessor:{type:"fluid.inlineEdit.richTextViewAccessor"},editAccessor:{type:"fluid.inlineEdit.tinyMCE.viewAccessor"},lazyEditView:true,blurHandlerBinder:fluid.inlineEdit.tinyMCE.blurHandlerBinder,editModeRenderer:fluid.inlineEdit.tinyMCE.editModeRenderer});fluid.inlineEdit.FCKEditor=function(container,options){return configureInlineEdit("fluid.inlineEdit.FCKEditor",container,options)};fluid.inlineEdit.FCKEditor.complete=fluid.event.getEventFirer();fluid.inlineEdit.FCKEditor.complete.addListener(function(editor){var editField=editor.LinkedField;var that=$.data(editField,"fluid.inlineEdit.FCKEditor");that.events.afterInitEdit.fire(editor)});fluid.inlineEdit.FCKEditor.blurHandlerBinder=function(that){function focusEditor(editor){editor.Focus()}that.events.afterInitEdit.addListener(function(editor){focusEditor(editor);var editorBody=editor.EditingArea.TargetElement});that.events.afterBeginEdit.addListener(function(){var editor=fluid.inlineEdit.FCKEditor.byId(that.editField[0].id);if(editor){focusEditor(editor)}})};fluid.inlineEdit.FCKEditor.byId=function(id){var editor=typeof (FCKeditorAPI)==="undefined"?null:FCKeditorAPI.GetInstance(id);return editor};fluid.inlineEdit.FCKEditor.editModeRenderer=function(that){var id=fluid.allocateSimpleId(that.editField);$.data(fluid.unwrap(that.editField),"fluid.inlineEdit.FCKEditor",that);var oFCKeditor=new FCKeditor(id);var opcopy=fluid.copy(that.options.FCKEditor);opcopy.BasePath=opcopy.BasePath+"editor/";$.extend(true,oFCKeditor.Config,opcopy);$.extend(true,oFCKeditor,that.options.FCKEditor);oFCKeditor.Config.fluidInstance=that;oFCKeditor.ReplaceTextarea()};fluid.inlineEdit.FCKEditor.viewAccessor=function(editField){return{value:function(newValue){var editor=fluid.inlineEdit.FCKEditor.byId(editField.id);if(!editor){if(newValue){$(editField).val(newValue)}return""}if(newValue){editor.SetHTML(newValue)}else{return editor.GetHTML()}}}};fluid.defaults("fluid.inlineEdit.FCKEditor",{selectors:{edit:"textarea"},styles:{invitation:null},displayAccessor:{type:"fluid.inlineEdit.richTextViewAccessor"},editAccessor:{type:"fluid.inlineEdit.FCKEditor.viewAccessor"},lazyEditView:true,blurHandlerBinder:fluid.inlineEdit.FCKEditor.blurHandlerBinder,editModeRenderer:fluid.inlineEdit.FCKEditor.editModeRenderer,FCKEditor:{BasePath:"fckeditor/"}});fluid.inlineEdit.dropdown=function(container,options){return configureInlineEdit("fluid.inlineEdit.dropdown",container,options)};fluid.inlineEdit.dropdown.editModeRenderer=function(that){var id=fluid.allocateSimpleId(that.editField);that.editField.selectbox({finishHandler:function(){that.finish()}});return{container:that.editContainer,field:$("input.selectbox",that.editContainer)}};fluid.inlineEdit.dropdown.blurHandlerBinder=function(that){fluid.deadMansBlur(that.editField,$("div.selectbox-wrapper li",that.editContainer),function(){that.cancel()})};fluid.defaults("fluid.inlineEdit.dropdown",{applyEditPadding:false,blurHandlerBinder:fluid.inlineEdit.dropdown.blurHandlerBinder,editModeRenderer:fluid.inlineEdit.dropdown.editModeRenderer})})(jQuery,fluid_1_1);function FCKeditor_OnComplete(editorInstance){fluid.inlineEdit.FCKEditor.complete.fire(editorInstance)};
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/inlineEdit/js/jquery.tinymce.js b/docs/include/jscripts/infusion_old/components/inlineEdit/js/jquery.tinymce.js
new file mode 100644 (file)
index 0000000..399b141
--- /dev/null
@@ -0,0 +1 @@
+(function($){if(typeof (tinyMCE)!=="undefined"){tinyMCE.init({mode:"none",theme:"simple"})}$.fn.tinymce=function(){this.each(function(){tinyMCE.execCommand("mceAddControl",false,this.id)});return this}})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/pager/css/Pager.css b/docs/include/jscripts/infusion_old/components/pager/css/Pager.css
new file mode 100644 (file)
index 0000000..bb1bca8
--- /dev/null
@@ -0,0 +1,11 @@
+.fl-pager .fl-pager-data .fl-pager-desc{background:url(../images/arrow-up.png) no-repeat right;}
+.fl-pager .fl-pager-data .fl-pager-asc{background:url(../images/arrow-dn.png) no-repeat right;}
+.fl-pager .fl-pager-ui{margin:0;padding:0;}
+.fl-pager .fl-pager-ui li{list-style-type:none;display:inline;}
+.fl-pager .fl-pager-ui a{padding:0 3px;margin:0 2px;}
+.fl-pager .fl-pager-ui .fl-pager-links a{border:1px solid #ccc;background-color:#fff;zoom:1;}
+.fl-pager .fl-pager-ui .fl-pager-disabled,.fl-pager .fl-pager-ui .fl-pager-links .fl-pager-currentPage{color:#000;border:none;background-color:transparent;text-decoration:none;}
+.fl-pager .fl-pager-ui .fl-pager-links a:hover{background-color:#0287C5;color:#fff;text-decoration:none;}
+.fl-pager .fl-pager-ui .fl-pager-disabled:hover,.fl-pager .fl-pager-ui .fl-pager-links .fl-pager-currentPage:hover{background-color:transparent;color:#000;text-decoration:none;cursor:default;}
+.fl-theme-hc .fl-pager .fl-pager-data .fl-pager-desc{background:url(../images/arrow-up.png) no-repeat right;}
+.fl-theme-hc .fl-pager .fl-pager-data .fl-pager-asc{background:url(../images/arrow-dn.png) no-repeat right;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/pager/images/arrow-dn.png b/docs/include/jscripts/infusion_old/components/pager/images/arrow-dn.png
new file mode 100644 (file)
index 0000000..85fda0b
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/pager/images/arrow-dn.png differ
diff --git a/docs/include/jscripts/infusion_old/components/pager/images/arrow-up.png b/docs/include/jscripts/infusion_old/components/pager/images/arrow-up.png
new file mode 100644 (file)
index 0000000..1c67431
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/pager/images/arrow-up.png differ
diff --git a/docs/include/jscripts/infusion_old/components/pager/js/Pager.js b/docs/include/jscripts/infusion_old/components/pager/js/Pager.js
new file mode 100644 (file)
index 0000000..e0010c9
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){function updateStyles(pageListThat,newModel,oldModel){if(!pageListThat.pageLinks){return }if(oldModel.pageIndex!==undefined){var oldLink=pageListThat.pageLinks.eq(oldModel.pageIndex);oldLink.removeClass(pageListThat.options.styles.currentPage)}var pageLink=pageListThat.pageLinks.eq(newModel.pageIndex);pageLink.addClass(pageListThat.options.styles.currentPage)}function bindLinkClick(link,events,eventArg){link.unbind("click.fluid.pager");link.bind("click.fluid.pager",function(){events.initiatePageChange.fire(eventArg)})}function computePageCount(model){model.pageCount=Math.max(1,Math.floor((model.totalRange-1)/model.pageSize)+1)}function computePageLimit(model){return Math.min(model.totalRange,(model.pageIndex+1)*model.pageSize)}fluid.pager=function(){return fluid.pagerImpl.apply(null,arguments)};fluid.pager.directPageList=function(container,events,options){var that=fluid.initView("fluid.pager.directPageList",container,options);that.pageLinks=that.locate("pageLinks");for(var i=0;i<that.pageLinks.length;++i){var pageLink=that.pageLinks.eq(i);bindLinkClick(pageLink,events,{pageIndex:i})}events.onModelChange.addListener(function(newModel,oldModel){updateStyles(that,newModel,oldModel)});that.defaultModel={pageIndex:undefined,pageSize:1,totalRange:that.pageLinks.length};return that};fluid.iota=function(count,first){first=first||0;var togo=[];for(var i=0;i<count;++i){togo[togo.length]=first++}return togo};fluid.pager.everyPageStrategy=fluid.iota;fluid.pager.gappedPageStrategy=function(locality,midLocality){if(!locality){locality=3}if(!midLocality){midLocality=locality}return function(count,first,mid){var togo=[];var j=0;var lastSkip=false;for(var i=0;i<count;++i){if(i<locality||(count-i-1)<locality||(i>=mid-midLocality&&i<=mid+midLocality)){togo[j++]=i;lastSkip=false}else{if(!lastSkip){togo[j++]=-1;lastSkip=true}}}return togo}};fluid.pager.renderedPageList=function(container,events,pagerBarOptions,options,strings){options=$.extend(true,pagerBarOptions,options);var that=fluid.initView("fluid.pager.renderedPageList",container,options);options=that.options;var renderOptions={cutpoints:[{id:"page-link:link",selector:pagerBarOptions.selectors.pageLinks},{id:"page-link:skip",selector:pagerBarOptions.selectors.pageLinkSkip},{id:"page-link:disabled",selector:pagerBarOptions.selectors.pageLinkDisabled}]};if(options.linkBody){renderOptions.cutpoints[renderOptions.cutpoints.length]={id:"payload-component",selector:options.linkBody}}function pageToComponent(current){return function(page){return page===-1?{ID:"page-link:skip"}:{ID:page===current?"page-link:link":"page-link:link",localID:page+1,value:page+1,pageIndex:page,decorators:[{type:"jQuery",func:"click",args:function(){events.initiatePageChange.fire({pageIndex:page})}},{type:page===current?"addClass":"",classes:that.options.styles.currentPage}]}}}var root=that.locate("root");fluid.expectFilledSelector(root,"Error finding root template for fluid.pager.renderedPageList");var template=fluid.selfRender(root,{},renderOptions);events.onModelChange.addListener(function(newModel,oldModel){var pages=that.options.pageStrategy(newModel.pageCount,0,newModel.pageIndex);var pageTree=fluid.transform(pages,pageToComponent(newModel.pageIndex));pageTree[pageTree.length-1].value=pageTree[pageTree.length-1].value+strings.last;events.onRenderPageLinks.fire(pageTree,newModel);fluid.reRender(template,root,pageTree,renderOptions);updateStyles(that,newModel,oldModel)});return that};fluid.defaults("fluid.pager.renderedPageList",{selectors:{root:".flc-pager-links"},linkBody:"a",pageStrategy:fluid.pager.everyPageStrategy});var updatePreviousNext=function(that,options,newModel){if(newModel.pageIndex===0){that.previous.addClass(options.styles.disabled)}else{that.previous.removeClass(options.styles.disabled)}if(newModel.pageIndex===newModel.pageCount-1){that.next.addClass(options.styles.disabled)}else{that.next.removeClass(options.styles.disabled)}};fluid.pager.previousNext=function(container,events,options){var that=fluid.initView("fluid.pager.previousNext",container,options);that.previous=that.locate("previous");bindLinkClick(that.previous,events,{relativePage:-1});that.next=that.locate("next");bindLinkClick(that.next,events,{relativePage:+1});events.onModelChange.addListener(function(newModel,oldModel,overallThat){updatePreviousNext(that,options,newModel)});return that};fluid.pager.pagerBar=function(events,container,options,strings){var that=fluid.initView("fluid.pager.pagerBar",container,options);that.pageList=fluid.initSubcomponent(that,"pageList",[container,events,that.options,fluid.COMPONENT_OPTIONS,strings]);that.previousNext=fluid.initSubcomponent(that,"previousNext",[container,events,that.options,fluid.COMPONENT_OPTIONS,strings]);return that};fluid.defaults("fluid.pager.pagerBar",{previousNext:{type:"fluid.pager.previousNext"},pageList:{type:"fluid.pager.directPageList"},selectors:{pageLinks:".flc-pager-pageLink",pageLinkSkip:".flc-pager-pageLink-skip",pageLinkDisabled:".flc-pager-pageLink-disabled",previous:".flc-pager-previous",next:".flc-pager-next"},styles:{currentPage:"fl-pager-currentPage",disabled:"fl-pager-disabled"}});function getColumnDefs(that){return that.options.columnDefs}fluid.pager.findColumnDef=function(columnDefs,key){var columnDef=$.grep(columnDefs,function(def){return def.key===key})[0];return columnDef};function getRoots(target,overallThat,index){var cellRoot=(overallThat.options.dataOffset?overallThat.options.dataOffset+".":"");target.shortRoot=index;target.longRoot=cellRoot+target.shortRoot}function expandPath(EL,shortRoot,longRoot){if(EL.charAt(0)==="*"){return longRoot+EL.substring(1)}else{return EL.replace("*",shortRoot)}}fluid.pager.fetchValue=function(that,dataModel,index,valuebinding,roots){getRoots(roots,that,index);var path=expandPath(valuebinding,roots.shortRoot,roots.longRoot);return fluid.model.getBeanValue(dataModel,path)};fluid.pager.basicSorter=function(overallThat,model){var dataModel=overallThat.options.dataModel;var roots={};var columnDefs=getColumnDefs(overallThat);var columnDef=fluid.pager.findColumnDef(columnDefs,model.sortKey);var sortrecs=[];for(var i=0;i<model.totalRange;++i){sortrecs[i]={index:i,value:fluid.pager.fetchValue(overallThat,dataModel,i,columnDef.valuebinding,roots)}}var columnType=typeof sortrecs[0].value;function sortfunc(arec,brec){var a=arec.value;var b=brec.value;return a===b?0:(a>b?model.sortDir:-model.sortDir)}sortrecs.sort(sortfunc);return fluid.transform(sortrecs,function(row){return row.index})};fluid.pager.directModelFilter=function(model,pagerModel,perm){var togo=[];var limit=computePageLimit(pagerModel);for(var i=pagerModel.pageIndex*pagerModel.pageSize;i<limit;++i){var index=perm?perm[i]:i;togo[togo.length]={index:index,row:model[index]}}return togo};function expandVariables(value,opts){var togo="";var index=0;while(true){var nextindex=value.indexOf("${",index);if(nextindex===-1){togo+=value.substring(index);break}else{togo+=value.substring(index,nextindex);var endi=value.indexOf("}",nextindex+2);var EL=value.substring(nextindex+2,endi);if(EL==="VALUE"){EL=opts.EL}else{EL=expandPath(EL,opts.shortRoot,opts.longRoot)}var val=fluid.model.getBeanValue(opts.dataModel,EL);togo+=val;index=endi+1}}return togo}function expandPaths(target,tree,opts){for(var i in tree){var val=tree[i];if(val===fluid.VALUE){if(i==="valuebinding"){target[i]=opts.EL}else{target[i]={valuebinding:opts.EL}}}else{if(i==="valuebinding"){target[i]=expandPath(tree[i],opts)}else{if(typeof (val)==="object"){target[i]=val.length!==undefined?[]:{};expandPaths(target[i],val,opts)}else{if(typeof (val)==="string"){target[i]=expandVariables(val,opts)}else{target[i]=tree[i]}}}}}return target}function iDforColumn(columnDef,opts){var options=opts.options;var EL=columnDef.valuebinding;var key=columnDef.key;if(!EL){fluid.fail("Error in definition for column with key "+key+": valuebinding is not set")}opts.EL=expandPath(EL,opts.shortRoot,opts.longRoot);if(!key){var segs=fluid.model.parseEL(EL);key=segs[segs.length-1]}var ID=(options.keyPrefix?options.keyPrefix:"")+key;return ID}function expandColumnDefs(filteredRow,opts){var tree=fluid.transform(opts.columnDefs,function(columnDef){var ID=iDforColumn(columnDef,opts);var togo;if(!columnDef.components){return{ID:ID,valuebinding:opts.EL}}else{if(typeof columnDef.components==="function"){togo=columnDef.components(filteredRow.row,filteredRow.index)}else{togo=columnDef.components}}togo=expandPaths({},togo,opts);togo.ID=ID;return togo});return tree}function fetchModel(overallThat){return fluid.model.getBeanValue(overallThat.options.dataModel,overallThat.options.dataOffset)}function bigHeaderForKey(key,opts){var id=opts.options.renderOptions.idMap["header:"+key];var smallHeader=fluid.jById(id);if(smallHeader.length===0){return null}var headerSortStylisticOffset=opts.overallOptions.selectors.headerSortStylisticOffset;var bigHeader=fluid.findAncestor(smallHeader,function(element){return $(element).is(headerSortStylisticOffset)});return bigHeader}function setSortHeaderClass(styles,element,sort){element=$(element);element.removeClass(styles.ascendingHeader);element.removeClass(styles.descendingHeader);if(sort!==0){element.addClass(sort===1?styles.ascendingHeader:styles.descendingHeader)}}function isCurrentColumnSortable(columnDefs,model){var columnDef=model.sortKey?fluid.pager.findColumnDef(columnDefs,model.sortKey):null;return columnDef?columnDef.sortable:false}function setModelSortHeaderClass(newModel,opts){var styles=opts.overallOptions.styles;var sort=isCurrentColumnSortable(opts.columnDefs,newModel)?newModel.sortDir:0;setSortHeaderClass(styles,bigHeaderForKey(newModel.sortKey,opts),sort)}function fireModelChange(that,newModel,forceUpdate){computePageCount(newModel);if(newModel.pageIndex>=newModel.pageCount){newModel.pageIndex=newModel.pageCount-1}if(forceUpdate||newModel.pageIndex!==that.model.pageIndex||newModel.pageSize!==that.model.pageSize||newModel.sortKey!==that.model.sortKey||newModel.sortDir!==that.model.sortDir){var sorted=isCurrentColumnSortable(getColumnDefs(that),newModel)?that.options.sorter(that,newModel):null;that.permutation=sorted;that.events.onModelChange.fire(newModel,that.model,that);fluid.model.copyModel(that.model,newModel)}}function generateColumnClick(overallThat,columnDef,opts){return function(){if(columnDef.sortable===true){var model=overallThat.model;var newModel=fluid.copy(model);var styles=overallThat.options.styles;var oldKey=model.sortKey;if(columnDef.key!==model.sortKey){newModel.sortKey=columnDef.key;newModel.sortDir=1;var oldBig=bigHeaderForKey(oldKey,opts);if(oldBig){setSortHeaderClass(styles,oldBig,0)}}else{if(newModel.sortKey===columnDef.key){newModel.sortDir=-1*newModel.sortDir}else{return false}}newModel.pageIndex=0;fireModelChange(overallThat,newModel,true);setModelSortHeaderClass(newModel,opts)}return false}}function fetchHeaderDecorators(decorators,columnDef){return decorators[columnDef.sortable?"sortableHeader":"unsortableHeader"]}function generateHeader(overallThat,newModel,columnDefs,opts){return{children:fluid.transform(columnDefs,function(columnDef){return{ID:iDforColumn(columnDef,opts),value:columnDef.label,decorators:[{jQuery:["click",generateColumnClick(overallThat,columnDef,opts)]},{identify:"header:"+columnDef.key}].concat(fetchHeaderDecorators(opts.overallOptions.decorators,columnDef))}})}}fluid.pager.selfRender=function(overallThat,inOptions){var that=fluid.initView("fluid.pager.selfRender",overallThat.container,inOptions);var options=that.options;options.renderOptions.idMap=options.renderOptions.idMap||{};var idMap=options.renderOptions.idMap;var root=that.locate("root");var template=fluid.selfRender(root,{},options.renderOptions);root.addClass(options.styles.root);var columnDefs=getColumnDefs(overallThat);var expOpts={options:options,columnDefs:columnDefs,overallOptions:overallThat.options,dataModel:overallThat.options.dataModel,idMap:idMap};var directModel=fetchModel(overallThat);return{returnedOptions:{listeners:{onModelChange:function(newModel,oldModel){var filtered=overallThat.options.modelFilter(directModel,newModel,overallThat.permutation);var tree=fluid.transform(filtered,function(filteredRow){var roots=getRoots(expOpts,overallThat,filteredRow.index);if(columnDefs==="explode"){return fluid.explode(filteredRow.row,root)}else{if(columnDefs.length){return expandColumnDefs(filteredRow,expOpts)}}});var fullTree={};fullTree[options.row]=tree;if(typeof (columnDefs)==="object"){fullTree[options.header]=generateHeader(overallThat,newModel,columnDefs,expOpts)}options.renderOptions=options.renderOptions||{};options.renderOptions.model=expOpts.dataModel;fluid.reRender(template,root,fullTree,options.renderOptions);setModelSortHeaderClass(newModel,expOpts)}}}}};fluid.defaults("fluid.pager.selfRender",{selectors:{root:".flc-pager-body-template"},styles:{root:"fl-pager"},keyStrategy:"id",keyPrefix:"",row:"row:",header:"header:",renderOptions:{}});fluid.pager.summary=function(dom,options){var node=dom.locate("summary");return{returnedOptions:{listeners:{onModelChange:function(newModel,oldModel){var text=fluid.stringTemplate(options.message,{first:newModel.pageIndex*newModel.pageSize+1,last:computePageLimit(newModel),total:newModel.totalRange});if(node.length>0){node.text(text)}}}}}};fluid.pager.directPageSize=function(that){var node=that.locate("pageSize");if(node.length>0){that.events.onModelChange.addListener(function(newModel,oldModel){if(node.val()!==newModel.pageSize){node.val(newModel.pageSize)}});node.change(function(){that.events.initiatePageSizeChange.fire(node.val())})}return that};fluid.pager.rangeAnnotator=function(that,options){var roots={};that.events.onRenderPageLinks.addListener(function(tree,newModel){var column=that.options.annotateColumnRange;var dataModel=that.options.dataModel;var columnDefs=getColumnDefs(that);if(!column||!dataModel||!columnDefs){return }var columnDef=fluid.pager.findColumnDef(columnDefs,column);function fetchValue(index){index=that.permutation?that.permutation[index]:index;return fluid.pager.fetchValue(that,dataModel,index,columnDef.valuebinding,roots)}var tModel={};fluid.model.copyModel(tModel,newModel);fluid.transform(tree,function(cell){if(cell.ID==="page-link:link"){var page=cell.pageIndex;var start=page*tModel.pageSize;tModel.pageIndex=page;var limit=computePageLimit(tModel);var iValue=fetchValue(start);var lValue=fetchValue(limit-1);var text="<b>"+iValue+"</b><br/>&mdash;<br/><b>"+lValue+"</b>";var decorator={type:"jQuery",func:"tooltip",args:{delay:that.options.tooltipDelay,extraClass:that.options.styles.tooltip,bodyHandler:function(){return text},showURL:false,id:that.options.tooltipId}};cell.decorators.push(decorator)}})})};fluid.pagerImpl=function(container,options){var that=fluid.initView("fluid.pager",container,options);var pageIndexConformer=function(model,changeRequest){if(changeRequest.value<0){changeRequest.value=0}};that.events.initiatePageChange.addListener(function(arg){var newModel=fluid.copy(that.model);if(arg.relativePage!==undefined){newModel.pageIndex=that.model.pageIndex+arg.relativePage}else{newModel.pageIndex=arg.pageIndex}if(newModel.pageIndex===undefined||newModel.pageIndex<0){newModel.pageIndex=0}fireModelChange(that,newModel,arg.forceUpdate)});that.events.initiatePageSizeChange.addListener(function(arg){var newModel=fluid.copy(that.model);newModel.pageSize=arg;fireModelChange(that,newModel)});var pagerBarElement=that.locate("pagerBar");if(pagerBarElement.length>0){that.pagerBar=fluid.initSubcomponent(that,"pagerBar",[that.events,pagerBarElement,fluid.COMPONENT_OPTIONS,that.options.strings])}var pagerBarSecondaryElement=that.locate("pagerBarSecondary");if(pagerBarSecondaryElement.length>0){that.pagerBarSecondary=fluid.initSubcomponent(that,"pagerBar",[that.events,pagerBarSecondaryElement,fluid.COMPONENT_OPTIONS,that.options.strings])}that.bodyRenderer=fluid.initSubcomponent(that,"bodyRenderer",[that,fluid.COMPONENT_OPTIONS]);that.summary=fluid.initSubcomponent(that,"summary",[that.dom,fluid.COMPONENT_OPTIONS]);that.pageSize=fluid.initSubcomponent(that,"pageSize",[that]);that.rangeAnnotator=fluid.initSubcomponent(that,"rangeAnnotator",[that,fluid.COMPONENT_OPTIONS]);that.model=fluid.copy(that.options.model);var dataModel=fetchModel(that);if(dataModel){that.model.totalRange=dataModel.length}if(that.model.totalRange===undefined){if(!that.pagerBar){fluid.fail("Error in Pager configuration - cannot determine total range,  since not configured in model.totalRange and no PagerBar is configured")}that.model=that.pagerBar.pageList.defaultModel}that.applier=fluid.makeChangeApplier(that.model);that.events.initiatePageChange.fire({pageIndex:that.model.pageIndex?that.model.pageIndex:0,forceUpdate:true});return that};fluid.defaults("fluid.pager",{pagerBar:{type:"fluid.pager.pagerBar",options:null},summary:{type:"fluid.pager.summary",options:{message:"%first-%last of %total items"}},pageSize:{type:"fluid.pager.directPageSize"},modelFilter:fluid.pager.directModelFilter,sorter:fluid.pager.basicSorter,bodyRenderer:{type:"fluid.emptySubcomponent"},model:{pageIndex:undefined,pageSize:10,totalRange:undefined},dataModel:undefined,dataOffset:"",columnDefs:"explode",annotateColumnRange:undefined,tooltipDelay:300,tooltipId:"tooltip",rangeAnnotator:{type:"fluid.pager.rangeAnnotator"},selectors:{pagerBar:".flc-pager-top",pagerBarSecondary:".flc-pager-bottom",summary:".flc-pager-summary",pageSize:".flc-pager-page-size",headerSortStylisticOffset:".flc-pager-sort-header"},styles:{tooltip:"fl-pager-tooltip",ascendingHeader:"fl-pager-asc",descendingHeader:"fl-pager-desc"},decorators:{sortableHeader:[],unsortableHeader:[]},strings:{last:" (last)"},events:{initiatePageChange:null,initiatePageSizeChange:null,onModelChange:null,onRenderPageLinks:null}})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/progress/js/Progress.js b/docs/include/jscripts/infusion_old/components/progress/js/Progress.js
new file mode 100644 (file)
index 0000000..c1989c2
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var animateDisplay=function(elm,animation,defaultAnimation){animation=(animation)?animation:defaultAnimation;elm.animate(animation.params,animation.duration,animation.callback)};var animateProgress=function(elm,width,speed){elm.queue("fx",[]);elm.animate({width:width,queue:false},speed)};var showProgress=function(that,animation){if(animation===false){that.displayElement.show()}else{animateDisplay(that.displayElement,animation,that.options.showAnimation)}};var hideProgress=function(that,delay,animation){delay=(delay===null||isNaN(delay))?that.options.delay:delay;if(delay){var timeOut=setTimeout(function(){hideProgress(that,0,animation)},delay)}else{if(animation===false){that.displayElement.hide()}else{animateDisplay(that.displayElement,animation,that.options.hideAnimation)}}};var updateWidth=function(that,newWidth,dontAnimate){dontAnimate=dontAnimate||false;var currWidth=that.indicator.width();var direction=that.options.animate;if((newWidth>currWidth)&&(direction==="both"||direction==="forward")&&!dontAnimate){animateProgress(that.indicator,newWidth,that.options.speed)}else{if((newWidth<currWidth)&&(direction==="both"||direction==="backward")&&!dontAnimate){animateProgress(that.indicator,newWidth,that.options.speed)}else{that.indicator.width(newWidth)}}};var percentToPixels=function(that,percent){return Math.round((Math.min(percent,100)*that.progressBar.width())/100)};var refreshRelativeWidth=function(that){var pixels=Math.max(percentToPixels(that,parseFloat(that.storedPercent)),that.options.minWidth);updateWidth(that,pixels,true)};var initARIA=function(ariaElement){ariaElement.attr("role","progressbar");ariaElement.attr("aria-valuemin","0");ariaElement.attr("aria-valuemax","100");ariaElement.attr("aria-live","assertive");ariaElement.attr("aria-busy","false");ariaElement.attr("aria-valuenow","0");ariaElement.attr("aria-valuetext","")};var updateARIA=function(that,percent){var busy=percent<100&&percent>0;that.ariaElement.attr("aria-busy",busy);that.ariaElement.attr("aria-valuenow",percent);if(busy){var busyString=fluid.stringTemplate(that.options.ariaBusyText,{percentComplete:percent});that.ariaElement.attr("aria-valuetext",busyString)}else{if(percent===100){that.ariaElement.attr("aria-valuetext",that.options.ariaDoneText)}}};var updateText=function(label,value){label.html(value)};var repositionIndicator=function(that){that.indicator.css("top",that.progressBar.position().top).css("left",0).height(that.progressBar.height());refreshRelativeWidth(that)};var updateProgress=function(that,percent,labelText,animationForShow){showProgress(that,animationForShow);if(percent!==null){that.storedPercent=percent;var pixels=Math.max(percentToPixels(that,parseFloat(percent)),that.options.minWidth);updateWidth(that,pixels)}if(labelText!==null){updateText(that.label,labelText)}if(that.ariaElement){updateARIA(that,percent)}};var setupProgress=function(that){that.displayElement=that.locate("displayElement");if(that.options.initiallyHidden){that.displayElement.hide()}that.progressBar=that.locate("progressBar");that.label=that.locate("label");that.indicator=that.locate("indicator");that.ariaElement=that.locate("ariaElement");that.indicator.width(that.options.minWidth);that.storedPercent=0;if(that.ariaElement){initARIA(that.ariaElement)}};fluid.progress=function(container,options){var that=fluid.initView("fluid.progress",container,options);setupProgress(that);that.show=function(animation){showProgress(that,animation)};that.hide=function(delay,animation){hideProgress(that,delay,animation)};that.update=function(percentage,labelValue,animationForShow){updateProgress(that,percentage,labelValue,animationForShow)};that.refreshView=function(){repositionIndicator(that)};return that};fluid.defaults("fluid.progress",{selectors:{displayElement:".flc-progress",progressBar:".flc-progress-bar",indicator:".flc-progress-indicator",label:".flc-progress-label",ariaElement:".flc-progress-bar"},showAnimation:{params:{opacity:"show"},duration:"slow",callback:null},hideAnimation:{params:{opacity:"hide"},duration:"slow",callback:null},minWidth:5,delay:0,speed:200,animate:"forward",initiallyHidden:true,updatePosition:false,ariaBusyText:"Progress is %percentComplete percent complete",ariaDoneText:"Progress is complete."})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/css/ImageReorderer.css b/docs/include/jscripts/infusion_old/components/reorderer/css/ImageReorderer.css
new file mode 100644 (file)
index 0000000..ce2b2d6
--- /dev/null
@@ -0,0 +1,16 @@
+.fl-reorderer-image-container{overflow:hidden;width:100%;margin-top:50px;}
+.fl-reorderer-image-container img{border:0;}
+.fl-reorderer-image-inner-container{height:100px;width:140px;background-color:#eee;overflow:hidden;margin:0 auto 3px auto;}
+.fl-reorderer-image-inner-container img{width:150px;}
+.fl-reorderer-movable-default,.fl-reorderer-movable-selected{height:150px!important;width:150px;border:2px solid #ddd;float:left;margin:5px!important;text-align:center;padding-top:10px;}
+.fl-reorderer-movable-hover{border-color:#666;}
+.fl-reorderer-movable-selected{border-color:#666;background-color:#ddd;cursor:move;}
+.fl-reorderer-movable-selected img{border:1px solid #eee;}
+.fl-reorderer-movable-dragging{height:150px!important;width:150px;border:2px solid #666;background-color:#eee;float:left;margin:5px!important;text-align:center;opacity:.2;filter:alpha(opacity=20);padding-top:10px;}
+.fl-reorderer-imageTitle{margin-top:5px;height:40px;overflow:hidden;}
+.fl-reorderer-imageTitle a{text-decoration:none;}
+.fl-reorderer-imageTitle a:hover{text-decoration:underline;}
+div .fl-reorderer-dropMarker{height:160px!important;margin:0 -2px;padding:0 2px;background-color:red;float:left;}
+.fl-reorderer-instructions{color:#666;background-color:lightyellow;padding:3px;border:2px solid #ddd;font-size:.9em;position:absolute;top:0;right:0;width:340px;}
+.fl-reorderer-downarrow{font-size:0;line-height:0;width:0;margin:5px 8px 30px 0;float:left;border-top:10px solid red;border-left:10px solid lightyellow;border-right:10px solid lightyellow;}
+.fl-reorderer-screen-reader-instructions{position:absolute;left:0;top:-500px;width:1px;height:1px;overflow:hidden;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/css/Reorderer.css b/docs/include/jscripts/infusion_old/components/reorderer/css/Reorderer.css
new file mode 100644 (file)
index 0000000..62e7ad8
--- /dev/null
@@ -0,0 +1,8 @@
+.fl-reorderer-movable-default{cursor:move;}
+.fl-reorderer-movable-selected{background-color:lightyellow!important;}
+.fl-reorderer-movable-hover{background-color:lightyellow;}
+.fl-reorderer-movable-dragging{background:#ccc!important;}
+.fl-reorderer-avatar{cursor:move;list-style-type:none;filter:alpha(opacity=75);opacity:.75;}
+.flc-reorderer-dropWarning{display:none;padding:5px 25px;color:#fff;opacity:1;filter:alpha(opacity=100);background:#900 url('../images/themes/_common/exclamation.png') no-repeat 5px center;}
+.fluid-vertical-order .fl-reorderer-dropMarker{background-color:#F00!important;height:0;padding:2px 0 0 0;border-width:0;margin:-2px 0 0 0;list-style-type:none;font-size:0;line-height:0;overflow:hidden;}
+.fluid-horizontal-order .fl-reorderer-dropMarker{background-color:#F00!important;padding:0 3px;border-width:0;margin:0 -3px!important;list-style-type:none;overflow:hidden;width:0!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/html/ImageReordererRSF.html b/docs/include/jscripts/infusion_old/components/reorderer/html/ImageReordererRSF.html
new file mode 100644 (file)
index 0000000..4162030
--- /dev/null
@@ -0,0 +1,285 @@
+<!DOCTYPE html      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\r
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+
+<!--  This is a multi purpose file used for:
+        1. as a stand alone example of the Lightbox 
+        2. as the RSF template for the image gallery tool 
+      Note that the RSF ids throughout this template are used by the gallery tool and are only necessary when using RSF.-->
+      \r
+<html xmlns="http://www.w3.org/1999/xhtml" \r
+  xmlns:rsf="http://ponder.org.uk/rsf">\r
+  \r
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+    <title>Fluid Image Reorderer</title>\r
+    <link href="../../../framework/fss/css/fss-reset.css" type="text/css" rel="stylesheet" media="all" />\r
+    <link href="../css/Reorderer.css" rsf:id="scr=contribute-style" type="text/css" rel="stylesheet" media="all" />\r
+    <link href="../css/ImageReorderer.css" rsf:id="scr=contribute-style" type="text/css" rel="stylesheet" media="all" />
+    
+    <!--  Required javascript modules for the Image Reorderer which can be replaced with the build generated file Fluid-all.js -->
+    <script type="text/javascript" src="../../../lib/jquery/core/js/jquery.js" rsf:id="scr=contribute-script"></script>\r
+    <script type="text/javascript" src="../../../lib/jquery/ui/js/ui.core.js" rsf:id="scr=contribute-script"></script>\r
+    <script type="text/javascript" src="../../../lib/jquery/ui/js/ui.draggable.js" rsf:id="scr=contribute-script"></script>\r
+    <script type="text/javascript" src="../../../framework/core/js/jquery.keyboard-a11y.js" rsf:id="scr=contribute-script"></script>
+    <script type="text/javascript" src="../../../framework/core/js/Fluid.js" rsf:id="scr=contribute-script"></script>\r
+    <script type="text/javascript" src="../../../framework/core/js/FluidDOMUtilities.js" rsf:id="scr=contribute-script"></script>\r
+    <script type="text/javascript" src="../../reorderer/js/GeometricManager.js" rsf:id="scr=contribute-script"></script>\r
+    <script type="text/javascript" src="../../reorderer/js/Reorderer.js" rsf:id="scr=contribute-script"></script>\r
+    <script type="text/javascript" src="../../reorderer/js/ImageReorderer.js" rsf:id="scr=contribute-script"></script>\r
+    
+    <!--  Ensure jQuery plays nice with other toolkits - must be called after all the javascript is loaded. --> 
+    <script type="text/javascript" rsf:id="scr=contribute-script">
+      jQuery.noConflict();
+    </script> 
+  </head>\r
+  <body>\r
+    <p id="para1">This is the Image Reorderer demo page.</p>\r
+
+    <!--  
+      The Lightbox uses hidden inputs as the strategy for posting the item order back 
+      to the server, therefore the orderables need to be enclosed in a form.
+    -->\r
+    <form id="reorder-form">\r
+
+      <!-- lightbox-parent is used for testing setup and teardown -->
+      <div rsf:id="lightbox:" id="lightbox-parent" >\r
+        <div rsf:id="lightbox-temp-container:" id="gallery:::gallery-thumbs:::" class="fl-reorderer-image-container" tabindex="2">\r
+         
+          <!--  
+            Orderable items are divs denoted by ids in the following form.
+            [lightbox-container-id] + lightbox-cell: + [index] + :  
+            The createLightboxFromId() function expects this format when attaching the javascript behaviour of the Lightbox. 
+          -->
+          <div rsf:id="lightbox-cell:" id="gallery:::gallery-thumbs:::lightbox-cell:0:">\r
+        \r
+            <div rsf:id="lightbox-client-cell:">
+            
+              <!--  The RSF gallery contains the markup for this inner div in another template. -->\r
+              <div class="fl-reorderer-image-inner-container">\r
+              \r
+                <a id="focus-element1" href="../images/Dragonfruit.jpg">\r
+                  <img id="fluid.img.first" src="../images/Dragonfruit.jpg" alt="Dragonfruit"/>\r
+                </a>\r
+              </div>\r
+              <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                <a href="../images/Dragonfruit.jpg" >Dragonfruit</a>\r
+              </div>\r
+            </div>
+          \r
+            <!--  \r
+              This input is used for posting the new order back to the server.\r
+              The value is the index of the thumbnail in a virtual array of thumbnails.\r
+              That is, 'value="0"' denotes the 0'th thumbnail; 'value="1"' the 1st,\r
+              and so on.\r
+            -->\r
+            <input rsf:id="reorder-index" id="gallery:::gallery-thumbs:::lightbox-cell:0:reorder-index" value="0" type="hidden"/>\r
+          </div>\r
+    
+          <!--  The remainder of the lightbox cells are used for the stand alone lightbox and the tests, not the RSF gallery -->\r
+          <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:1:">\r
+            <div>\r
+              <div class="fl-reorderer-image-inner-container">\r
+                <a href="../images/Kiwano.jpg" >\r
+                  <img id="fluid.img.second" src="../images/Kiwano.jpg" alt="Kiwano"/>\r
+                </a>\r
+              </div>\r
+              <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                <a href="../images/Kiwano.jpg" >Kiwano</a>\r
+              </div>\r
+            </div>\r
+            <input id="gallery:::gallery-thumbs:::lightbox-cell:1:reorder-index" value="1" type="hidden"/>      \r
+          </div>\r
+              \r
+          <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:2:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Blackberry.jpg" >\r
+                             <img id="fluid.img.3" src="../images/Blackberry.jpg" alt="Blackberry"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Blackberry.jpg" >Blackberry</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:2:reorder-index" value="2" type="hidden"/>\r
+                     </div>\r
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:3:">\r
+                 <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Cherry.jpg">\r
+                             <img id="fluid.img.4" src="../images/Cherry.jpg" alt="Cherry"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Cherry.jpg" >Cherry</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:3:reorder-index" value="3" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:4:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Fig.jpg">\r
+                             <img id="fluid.img.5" src="../images/Fig.jpg" alt="Fig"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Fig.jpg" >Fig</a>\r
+                         </div>\r
+                       </div>\r
+                 <input id="gallery:::gallery-thumbs:::lightbox-cell:4:reorder-index" value="4" type="hidden"/>        \r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:5:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Grapes.jpg">\r
+                             <img id="fluid.img.6" src="../images/Grapes.jpg" alt="Grapes"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Grapes.jpg" >Grapes</a>\r
+                         </div>\r
+                       </div>\r
+                 <input id="gallery:::gallery-thumbs:::lightbox-cell:5:reorder-index" value="5" type="hidden"/>\r
+                     </div>
+      
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:6:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Kiwi.jpg" >\r
+                             <img id="fluid.img.7" src="../images/Kiwi.jpg" alt="Kiwi"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Kiwi.jpg" >Kiwi</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:6:reorder-index" value="6" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:7:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Kumquat.jpg">\r
+                             <img id="fluid.img.8" src="../images/Kumquat.jpg" alt="Kumquat"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Kumquat.jpg" >Kumquat</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:7:reorder-index" value="7" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:8:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Lemon.jpg">\r
+                             <img id="fluid.img.9" src="../images/Lemon.jpg" alt="Lemon"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Lemon.jpg" >Lemon</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:8:reorder-index" value="8" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:9:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Orange.jpg">\r
+                             <img id="fluid.img.10" src="../images/Orange.jpg" alt="Orange"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Orange.jpg" >Orange</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:9:reorder-index" value="9" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:10:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/RedApple.jpg">\r
+                             <img id="fluid.img.11" src="../images/RedApple.jpg" alt="RedApple"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/RedApple.jpg" >RedApple</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:10:reorder-index" value="10" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:11:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Tamarillo.jpg">\r
+                             <img id="fluid.img.12" src="../images/Tamarillo.jpg" alt="Tamarillo"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Tamarillo.jpg" >Tamarillo</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:11:reorder-index" value="11" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:12:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Mangosteen.jpg">\r
+                             <img id="fluid.img.secondLast" src="../images/Mangosteen.jpg" alt="Mangosteen"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Mangosteen.jpg" >Mangosteen</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:12:reorder-index" value="12" type="hidden"/>\r
+                     </div>
+      \r
+                     <div rsf:id="scr=ignore" id="gallery:::gallery-thumbs:::lightbox-cell:13:">\r
+                       <div>\r
+                         <div class="fl-reorderer-image-inner-container">\r
+                           <a href="../images/Banana.jpg">\r
+                             <img id="fluid.img.last" src="../images/Banana.jpg" alt="Banana"/>\r
+                           </a>\r
+                         </div>\r
+                         <div class="flc-reorderer-imageTitle fl-reorderer-imageTitle">\r
+                           <a href="../images/Banana.jpg" >Banana</a>\r
+                         </div>\r
+                       </div>\r
+                       <input id="gallery:::gallery-thumbs:::lightbox-cell:13:reorder-index" value="13" type="hidden"/>\r
+                     </div>\r
+                   </div>
+        
+        <!--  Attach the javascript functionality to the markup by using createLightboxFromId() -->\r
+        <script type="text/javascript"  rsf:id="init-script">\r
+          fluid.reorderImages("[id='gallery:::gallery-thumbs:::']");\r
+        </script>\r
+      </div>
+      \r
+      <!-- Sample instruction message. In the RSF gallery, this is supplied by the server. -->\r
+      <div class="fl-reorderer-instructions">\r
+        <div class="fl-reorderer-screen-reader-instructions" tabindex="1">Image Reorderer: To use the keyboard:\r
+                  Screen reader users turn off virtual cursor (insert + z).\r
+                  Select an image using i, k, m or j.\r
+                  Move an image using CTRL + i, k, m or j.\r
+                  View an image by pressing Enter.</div>\r
+        <div class="fl-reorderer-downarrow"></div>\r
+        <div tabindex="-1">\r
+          To use the keyboard:<br/>\r
+            Select an image using i, k, m or j, or the arrow keys.<br/>\r
+            View an image by pressing Enter.<br/>\r
+            Move an image using CTRL + a direction key. 
+        </div>\r
+      </div>\r
+    </form>\r
+  </body>\r
+</html>\r
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/images/Banana.jpg b/docs/include/jscripts/infusion_old/components/reorderer/images/Banana.jpg
new file mode 100644 (file)
index 0000000..7967d44
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/reorderer/images/Banana.jpg differ
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/images/Blackberry.jpg b/docs/include/jscripts/infusion_old/components/reorderer/images/Blackberry.jpg
new file mode 100644 (file)
index 0000000..159da7d
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/reorderer/images/Blackberry.jpg differ
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/images/Cherry.jpg b/docs/include/jscripts/infusion_old/components/reorderer/images/Cherry.jpg
new file mode 100644 (file)
index 0000000..d89e4dd
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/reorderer/images/Cherry.jpg differ
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/images/Dragonfruit.jpg b/docs/include/jscripts/infusion_old/components/reorderer/images/Dragonfruit.jpg
new file mode 100644 (file)
index 0000000..0845cf6
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/reorderer/images/Dragonfruit.jpg differ
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/images/Fig.jpg b/docs/include/jscripts/infusion_old/components/reorderer/images/Fig.jpg
new file mode 100644 (file)
index 0000000..a6f6366
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/reorderer/images/Fig.jpg differ
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/images/Grapes.jpg b/docs/include/jscripts/infusion_old/components/reorderer/images/Grapes.jpg
new file mode 100644 (file)
index 0000000..eb940e0
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/reorderer/images/Grapes.jpg differ
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/images/Kiwano.jpg b/docs/include/jscripts/infusion_old/components/reorderer/images/Kiwano.jpg
new file mode 100644 (file)
index 0000000..a45b187
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/reorderer/images/Kiwano.jpg differ
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/images/Kiwi.jpg b/docs/include/jscripts/infusion_old/components/reorderer/images/Kiwi.jpg
new file mode 100644 (file)
index 0000000..3df27b8
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/reorderer/images/Kiwi.jpg differ
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/images/Kumquat.jpg b/docs/include/jscripts/infusion_old/components/reorderer/images/Kumquat.jpg
new file mode 100644 (file)
index 0000000..96db6fa
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/reorderer/images/Kumquat.jpg differ
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/images/Lemon.jpg b/docs/include/jscripts/infusion_old/components/reorderer/images/Lemon.jpg
new file mode 100644 (file)
index 0000000..d0bd7c7
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/reorderer/images/Lemon.jpg differ
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/images/Mangosteen.jpg b/docs/include/jscripts/infusion_old/components/reorderer/images/Mangosteen.jpg
new file mode 100644 (file)
index 0000000..e416ac9
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/reorderer/images/Mangosteen.jpg differ
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/images/Orange.jpg b/docs/include/jscripts/infusion_old/components/reorderer/images/Orange.jpg
new file mode 100644 (file)
index 0000000..35ce31a
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/reorderer/images/Orange.jpg differ
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/images/RedApple.jpg b/docs/include/jscripts/infusion_old/components/reorderer/images/RedApple.jpg
new file mode 100644 (file)
index 0000000..17368bf
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/reorderer/images/RedApple.jpg differ
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/images/Tamarillo.jpg b/docs/include/jscripts/infusion_old/components/reorderer/images/Tamarillo.jpg
new file mode 100644 (file)
index 0000000..59ce319
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/reorderer/images/Tamarillo.jpg differ
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/js/GeometricManager.js b/docs/include/jscripts/infusion_old/components/reorderer/js/GeometricManager.js
new file mode 100644 (file)
index 0000000..0c750cc
--- /dev/null
@@ -0,0 +1 @@
+var fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.orientation={HORIZONTAL:4,VERTICAL:1};fluid.rectSides={4:["left","right"],1:["top","bottom"],8:"top",12:"bottom",2:"left",3:"right"};fluid.position={BEFORE:-1,AFTER:1,INSIDE:2,REPLACE:3};fluid.direction={NEXT:1,PREVIOUS:-1,UP:8,DOWN:12,LEFT:2,RIGHT:3};fluid.directionSign=function(direction){return direction===fluid.direction.UP||direction===fluid.direction.LEFT?fluid.direction.PREVIOUS:fluid.direction.NEXT};fluid.directionAxis=function(direction){return direction===fluid.direction.LEFT||direction===fluid.direction.RIGHT?0:1};fluid.directionOrientation=function(direction){return fluid.directionAxis(direction)?fluid.orientation.VERTICAL:fluid.orientation.HORIZONTAL};fluid.keycodeDirection={up:fluid.direction.UP,down:fluid.direction.DOWN,left:fluid.direction.LEFT,right:fluid.direction.RIGHT};fluid.moveDom=function(source,target,position){source=fluid.unwrap(source);target=fluid.unwrap(target);var scan;if(position===fluid.position.INSIDE){target.appendChild(source)}else{if(position===fluid.position.BEFORE){for(scan=target.previousSibling;;scan=scan.previousSibling){if(!scan||!fluid.dom.isIgnorableNode(scan)){if(scan!==source){fluid.dom.cleanseScripts(source);target.parentNode.insertBefore(source,target)}break}}}else{if(position===fluid.position.AFTER){for(scan=target.nextSibling;;scan=scan.nextSibling){if(!scan||!fluid.dom.isIgnorableNode(scan)){if(scan!==source){fluid.dom.cleanseScripts(source);fluid.dom.insertAfter(source,target)}break}}}else{fluid.fail("Unrecognised position supplied to fluid.moveDom: "+position)}}}};fluid.normalisePosition=function(position,samespan,targeti,sourcei){if(position===fluid.position.REPLACE){position=samespan&&targeti>=sourcei?fluid.position.AFTER:fluid.position.BEFORE}return position};fluid.permuteDom=function(element,target,position,sourceelements,targetelements){element=fluid.unwrap(element);target=fluid.unwrap(target);var sourcei=$.inArray(element,sourceelements);if(sourcei===-1){fluid.fail("Error in permuteDom: source element "+fluid.dumpEl(element)+" not found in source list "+fluid.dumpEl(sourceelements))}var targeti=$.inArray(target,targetelements);if(targeti===-1){fluid.fail("Error in permuteDom: target element "+fluid.dumpEl(target)+" not found in source list "+fluid.dumpEl(targetelements))}var samespan=sourceelements===targetelements;position=fluid.normalisePosition(position,samespan,targeti,sourcei);var oldn={};oldn[fluid.position.AFTER]=element.nextSibling;oldn[fluid.position.BEFORE]=element.previousSibling;fluid.moveDom(sourceelements[sourcei],targetelements[targeti],position);var frontlimit=samespan?targeti-1:sourceelements.length-2;var i;if(!samespan||targeti>sourcei){for(i=frontlimit;i>sourcei;--i){fluid.moveDom(sourceelements[i+1],sourceelements[i],fluid.position.AFTER)}if(sourcei+1<sourceelements.length){fluid.moveDom(sourceelements[sourcei+1],oldn[fluid.position.AFTER],fluid.position.BEFORE)}}var backlimit=samespan?sourcei-1:targetelements.length-1;if(position===fluid.position.AFTER){targeti++}if(!samespan||targeti<sourcei){for(i=targeti;i<backlimit;++i){fluid.moveDom(targetelements[i],targetelements[i+1],fluid.position.BEFORE)}if(backlimit>=0&&backlimit<targetelements.length-1){fluid.moveDom(targetelements[backlimit],oldn[fluid.position.BEFORE],fluid.position.AFTER)}}};var curCss=function(a,name){return window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(name):a.currentStyle[name]};var isAttached=function(node){while(node&&node.nodeName){if(node.nodeName==="BODY"){return true}node=node.parentNode}return false};var generalHidden=function(a){return"hidden"===a.type||curCss(a,"display")==="none"||curCss(a,"visibility")==="hidden"||!isAttached(a)};var computeGeometry=function(element,orientation,disposition){var elem={};elem.element=element;elem.orientation=orientation;if(disposition===fluid.position.INSIDE){elem.position=disposition}if(generalHidden(element)){elem.clazz="hidden"}var pos=fluid.dom.computeAbsolutePosition(element)||[0,0];var width=element.offsetWidth;var height=element.offsetHeight;elem.rect={left:pos[0],top:pos[1]};elem.rect.right=pos[0]+width;elem.rect.bottom=pos[1]+height;return elem};var SENTINEL_DIMENSION=10000;function dumprect(rect){return"Rect top: "+rect.top+" left: "+rect.left+" bottom: "+rect.bottom+" right: "+rect.right}function dumpelem(cacheelem){if(!cacheelem||!cacheelem.rect){return"null"}else{return dumprect(cacheelem.rect)+" position: "+cacheelem.position+" for "+fluid.dumpEl(cacheelem.element)}}fluid.dropManager=function(){var targets=[];var cache={};var that={};var lastClosest;function cacheKey(element){return $(element).data("")}function sentinelizeElement(targets,sides,cacheelem,fc,disposition,clazz){var elemCopy=$.extend(true,{},cacheelem);elemCopy.rect[sides[fc]]=elemCopy.rect[sides[1-fc]]+(fc?1:-1);elemCopy.rect[sides[1-fc]]=(fc?-1:1)*SENTINEL_DIMENSION;elemCopy.position=disposition===fluid.position.INSIDE?disposition:(fc?fluid.position.BEFORE:fluid.position.AFTER);elemCopy.clazz=clazz;targets[targets.length]=elemCopy}function splitElement(targets,sides,cacheelem,disposition,clazz1,clazz2){var elem1=$.extend(true,{},cacheelem);var elem2=$.extend(true,{},cacheelem);var midpoint=(elem1.rect[sides[0]]+elem1.rect[sides[1]])/2;elem1.rect[sides[1]]=midpoint;elem1.position=fluid.position.BEFORE;elem2.rect[sides[0]]=midpoint;elem2.position=fluid.position.AFTER;elem1.clazz=clazz1;elem2.clazz=clazz2;targets[targets.length]=elem1;targets[targets.length]=elem2}function getRelativeClass(thisElements,index,relative,thisclazz,mapper){index+=relative;if(index<0&&thisclazz==="locked"){return"locked"}if(index>=thisElements.length||mapper===null){return null}else{relative=thisElements[index];return mapper(relative)==="locked"&&thisclazz==="locked"?"locked":null}}var lastGeometry;var displacementX,displacementY;that.updateGeometry=function(geometricInfo){lastGeometry=geometricInfo;targets=[];cache={};var mapper=geometricInfo.elementMapper;for(var i=0;i<geometricInfo.extents.length;++i){var thisInfo=geometricInfo.extents[i];var orientation=thisInfo.orientation;var sides=fluid.rectSides[orientation];var processElement=function(element,sentB,sentF,disposition,j){var cacheelem=computeGeometry(element,orientation,disposition);cacheelem.owner=thisInfo;if(cacheelem.clazz!=="hidden"&&mapper){cacheelem.clazz=mapper(element)}cache[$.data(element)]=cacheelem;var backClass=getRelativeClass(thisInfo.elements,j,fluid.position.BEFORE,cacheelem.clazz,mapper);var frontClass=getRelativeClass(thisInfo.elements,j,fluid.position.AFTER,cacheelem.clazz,mapper);if(disposition===fluid.position.INSIDE){targets[targets.length]=cacheelem}else{splitElement(targets,sides,cacheelem,disposition,backClass,frontClass)}if(sentB&&geometricInfo.sentinelize){sentinelizeElement(targets,sides,cacheelem,1,disposition,backClass)}if(sentF&&geometricInfo.sentinelize){sentinelizeElement(targets,sides,cacheelem,0,disposition,frontClass)}return cacheelem};var allHidden=true;for(var j=0;j<thisInfo.elements.length;++j){var element=thisInfo.elements[j];var cacheelem=processElement(element,j===0,j===thisInfo.elements.length-1,fluid.position.INTERLEAVED,j);if(cacheelem.clazz!=="hidden"){allHidden=false}}if(allHidden&&thisInfo.parentElement){processElement(thisInfo.parentElement,true,true,fluid.position.INSIDE)}}};that.startDrag=function(event,handlePos,handleWidth,handleHeight){var handleMidX=handlePos[0]+handleWidth/2;var handleMidY=handlePos[1]+handleHeight/2;var dX=handleMidX-event.pageX;var dY=handleMidY-event.pageY;that.updateGeometry(lastGeometry);lastClosest=null;displacementX=dX;displacementY=dY;$("").bind("mousemove.fluid-dropManager",that.mouseMove)};that.lastPosition=function(){return lastClosest};that.endDrag=function(){$("").unbind("mousemove.fluid-dropManager")};that.mouseMove=function(evt){var x=evt.pageX+displacementX;var y=evt.pageY+displacementY;var closestTarget=that.closestTarget(x,y,lastClosest);if(closestTarget&&closestTarget!==fluid.dropManager.NO_CHANGE){lastClosest=closestTarget;that.dropChangeFirer.fire(closestTarget)}};that.dropChangeFirer=fluid.event.getEventFirer();var blankHolder={element:null};that.closestTarget=function(x,y,lastClosest){var mindistance=Number.MAX_VALUE;var minelem=blankHolder;var minlockeddistance=Number.MAX_VALUE;var minlockedelem=blankHolder;for(var i=0;i<targets.length;++i){var cacheelem=targets[i];if(cacheelem.clazz==="hidden"){continue}var distance=fluid.geom.minPointRectangle(x,y,cacheelem.rect);if(cacheelem.clazz==="locked"){if(distance<minlockeddistance){minlockeddistance=distance;minlockedelem=cacheelem}}else{if(distance<mindistance){mindistance=distance;minelem=cacheelem}if(distance===0){break}}}if(!minelem){return minelem}if(minlockeddistance>=mindistance){minlockedelem=blankHolder}if(lastClosest&&lastClosest.position===minelem.position&&fluid.unwrap(lastClosest.element)===fluid.unwrap(minelem.element)&&fluid.unwrap(lastClosest.lockedelem)===fluid.unwrap(minlockedelem.element)){return fluid.dropManager.NO_CHANGE}return{position:minelem.position,element:minelem.element,lockedelem:minlockedelem.element}};that.projectFrom=function(element,direction,includeLocked){that.updateGeometry(lastGeometry);var cacheelem=cache[cacheKey(element)];var projected=fluid.geom.projectFrom(cacheelem.rect,direction,targets,includeLocked);if(!projected.cacheelem){return null}var retpos=projected.cacheelem.position;return{element:projected.cacheelem.element,position:retpos?retpos:fluid.position.BEFORE}};function getRelativeElement(element,direction,elements){var folded=fluid.directionSign(direction);var index=$(elements).index(element)+folded;if(index<0){index+=elements.length}index%=elements.length;return elements[index]}that.logicalFrom=function(element,direction,includeLocked){var orderables=that.getOwningSpan(element,fluid.position.INTERLEAVED,includeLocked);return{element:getRelativeElement(element,direction,orderables),position:fluid.position.REPLACE}};that.lockedWrapFrom=function(element,direction,includeLocked){var base=that.logicalFrom(element,direction,includeLocked);var selectables=that.getOwningSpan(element,fluid.position.INTERLEAVED,includeLocked);var allElements=cache[cacheKey(element)].owner.elements;if(includeLocked||selectables[0]===allElements[0]){return base}var directElement=getRelativeElement(element,direction,allElements);if(lastGeometry.elementMapper(directElement)==="locked"){base.element=null;base.clazz="locked"}return base};that.getOwningSpan=function(element,position,includeLocked){var owner=cache[cacheKey(element)].owner;var elements=position===fluid.position.INSIDE?[owner.parentElement]:owner.elements;if(!includeLocked&&lastGeometry.elementMapper){elements=$.makeArray(elements);fluid.remove_if(elements,function(element){return lastGeometry.elementMapper(element)==="locked"})}return elements};that.geometricMove=function(element,target,position){var sourceElements=that.getOwningSpan(element,null,true);var targetElements=that.getOwningSpan(target,position,true);fluid.permuteDom(element,target,position,sourceElements,targetElements)};return that};fluid.dropManager.NO_CHANGE="no change";fluid.geom=fluid.geom||{};fluid.geom.minPointRectangle=function(x,y,rectangle){var dx=x<rectangle.left?(rectangle.left-x):(x>rectangle.right?(x-rectangle.right):0);var dy=y<rectangle.top?(rectangle.top-y):(y>rectangle.bottom?(y-rectangle.bottom):0);return dx*dx+dy*dy};fluid.geom.minRectRect=function(rect1,rect2){var dx=rect1.right<rect2.left?rect2.left-rect1.right:rect2.right<rect1.left?rect1.left-rect2.right:0;var dy=rect1.bottom<rect2.top?rect2.top-rect1.bottom:rect2.bottom<rect1.top?rect1.top-rect2.bottom:0;return dx*dx+dy*dy};var makePenCollect=function(){return{mindist:Number.MAX_VALUE,minrdist:Number.MAX_VALUE}};fluid.geom.projectFrom=function(baserect,direction,targets,forSelection){var axis=fluid.directionAxis(direction);var frontSide=fluid.rectSides[direction];var backSide=fluid.rectSides[axis*15+5-direction];var dirSign=fluid.directionSign(direction);var penrect={left:(7*baserect.left+1*baserect.right)/8,right:(5*baserect.left+3*baserect.right)/8,top:(7*baserect.top+1*baserect.bottom)/8,bottom:(5*baserect.top+3*baserect.bottom)/8};penrect[frontSide]=dirSign*SENTINEL_DIMENSION;penrect[backSide]=-penrect[frontSide];function accPen(collect,cacheelem,backSign){var thisrect=cacheelem.rect;var pdist=fluid.geom.minRectRect(penrect,thisrect);var rdist=-dirSign*backSign*(baserect[backSign===1?frontSide:backSide]-thisrect[backSign===1?backSide:frontSide]);if(pdist<=collect.mindist&&rdist>=0){if(pdist===collect.mindist&&rdist*backSign>collect.minrdist){return }collect.minrdist=rdist*backSign;collect.mindist=pdist;collect.minelem=cacheelem}}var collect=makePenCollect();var backcollect=makePenCollect();var lockedcollect=makePenCollect();for(var i=0;i<targets.length;++i){var elem=targets[i];var isPure=elem.owner&&elem.element===elem.owner.parentElement;if(elem.clazz==="hidden"||forSelection&&isPure){continue}else{if(!forSelection&&elem.clazz==="locked"){accPen(lockedcollect,elem,1)}else{accPen(collect,elem,1);accPen(backcollect,elem,-1)}}}var wrap=!collect.minelem||backcollect.mindist<collect.mindist;var mincollect=wrap?backcollect:collect;var togo={wrapped:wrap,cacheelem:mincollect.minelem};if(lockedcollect.mindist<mincollect.mindist){togo.lockedelem=lockedcollect.minelem}return togo}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/js/ImageReorderer.js b/docs/include/jscripts/infusion_old/components/reorderer/js/ImageReorderer.js
new file mode 100644 (file)
index 0000000..5504818
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var deriveLightboxCellBase=function(namebase,index){return namebase+"lightbox-cell:"+index+":"};var addThumbnailActivateHandler=function(lightboxContainer){var enterKeyHandler=function(evt){if(evt.which===fluid.reorderer.keys.ENTER){var thumbnailAnchors=$("a",evt.target);document.location=thumbnailAnchors.attr("href")}};$(lightboxContainer).keypress(enterKeyHandler)};var seekNodesById=function(rootnode,tagname,idmatch){var inputs=rootnode.getElementsByTagName(tagname);var togo=[];for(var i=0;i<inputs.length;i+=1){var input=inputs[i];var id=input.id;if(id&&id.match(idmatch)){togo.push(input)}}return togo};var createItemFinder=function(parentNode,containerId){var lightboxCellNamePattern="^"+deriveLightboxCellBase(containerId,"[0-9]+")+"$";return function(){return seekNodesById(parentNode,"div",lightboxCellNamePattern)}};var findForm=function(element){while(element){if(element.nodeName.toLowerCase()==="form"){return element}element=element.parentNode}};var defaultAfterMoveCallback=function(lightboxContainer){var reorderform=findForm(lightboxContainer);return function(){var inputs,i;inputs=seekNodesById(reorderform,"input","^"+deriveLightboxCellBase(lightboxContainer.id,"[^:]*")+"reorder-index$");for(i=0;i<inputs.length;i+=1){inputs[i].value=i}if(reorderform&&reorderform.action){$.post(reorderform.action,$(reorderform).serialize(),function(type,data,evt){})}}};fluid.defaults("fluid.reorderImages",{layoutHandler:"fluid.gridLayoutHandler",selectors:{imageTitle:".flc-reorderer-imageTitle"}});fluid.reorderImages=function(container,options){var that=fluid.initView("fluid.reorderImages",container,options);var containerEl=fluid.unwrap(that.container);if(!that.options.afterMoveCallback){that.options.afterMoveCallback=defaultAfterMoveCallback(containerEl)}if(!that.options.selectors.movables){that.options.selectors.movables=createItemFinder(containerEl,containerEl.id)}var reorderer=fluid.reorderer(container,that.options);var movables=reorderer.locate("movables");fluid.transform(movables,function(cell){fluid.reorderImages.addAriaRoles(that.options.selectors.imageTitle,cell)});fluid.tabindex($("a",container),-1);addThumbnailActivateHandler(container);return reorderer};fluid.reorderImages.addAriaRoles=function(imageTitle,cell){cell=$(cell);cell.attr("role","img");var title=$(imageTitle,cell);if(title[0]===cell[0]||title[0]===document){fluid.fail("Could not locate cell title using selector "+imageTitle+" in context "+fluid.dumpEl(cell))}var titleId=fluid.allocateSimpleId(title);cell.attr("aria-labelledby",titleId);var image=$("img",cell);image.attr("role","presentation");image.attr("alt","")};fluid.lightbox=fluid.reorderImages})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/js/LayoutReorderer.js b/docs/include/jscripts/infusion_old/components/reorderer/js/LayoutReorderer.js
new file mode 100644 (file)
index 0000000..b0676e0
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.reorderLayout=function(container,userOptions){var assembleOptions={layoutHandler:"fluid.moduleLayoutHandler",selectors:{columns:".flc-reorderer-column",modules:".flc-reorderer-module"}};var options=$.extend(true,assembleOptions,userOptions);return fluid.reorderer(container,options)}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/js/ModuleLayout.js b/docs/include/jscripts/infusion_old/components/reorderer/js/ModuleLayout.js
new file mode 100644 (file)
index 0000000..90da890
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};fluid.moduleLayout=fluid.moduleLayout||{};(function($,fluid){var findColumnAndItemIndices=function(item,layout){return fluid.find(layout.columns,function(column,colIndex){var index=$.inArray(item,column.elements);return index===-1?null:{columnIndex:colIndex,itemIndex:index}},{columnIndex:-1,itemIndex:-1})};var findColIndex=function(item,layout){return fluid.find(layout.columns,function(column,colIndex){return item===column.container?colIndex:null},-1)};fluid.moduleLayout.updateLayout=function(item,target,position,layout){item=fluid.unwrap(item);target=fluid.unwrap(target);var itemIndices=findColumnAndItemIndices(item,layout);layout.columns[itemIndices.columnIndex].elements.splice(itemIndices.itemIndex,1);var targetCol;if(position===fluid.position.INSIDE){targetCol=layout.columns[findColIndex(target,layout)].elements;targetCol.splice(targetCol.length,0,item)}else{var relativeItemIndices=findColumnAndItemIndices(target,layout);targetCol=layout.columns[relativeItemIndices.columnIndex].elements;position=fluid.normalisePosition(position,itemIndices.columnIndex===relativeItemIndices.columnIndex,relativeItemIndices.itemIndex,itemIndices.itemIndex);var relative=position===fluid.position.BEFORE?0:1;targetCol.splice(relativeItemIndices.itemIndex+relative,0,item)}};fluid.moduleLayout.layoutFromFlat=function(container,columns,portlets){var layout={};layout.container=container;layout.columns=fluid.transform(columns,function(column){return{container:column,elements:$.makeArray(portlets.filter(function(){return fluid.dom.isContainer(column,this)}))}});return layout};fluid.moduleLayout.layoutFromIds=function(idLayout){return{container:fluid.byId(idLayout.id),columns:fluid.transform(idLayout.columns,function(column){return{container:fluid.byId(column.id),elements:fluid.transform(column.children,fluid.byId)}})}};fluid.moduleLayout.layoutToIds=function(idLayout){return{id:fluid.getId(idLayout.container),columns:fluid.transform(idLayout.columns,function(column){return{id:fluid.getId(column.container),children:fluid.transform(column.elements,fluid.getId)}})}};var defaultOnShowKeyboardDropWarning=function(item,dropWarning){if(dropWarning){var offset=$(item).offset();dropWarning=$(dropWarning);dropWarning.css("position","absolute");dropWarning.css("top",offset.top);dropWarning.css("left",offset.left)}};fluid.defaults(true,"fluid.moduleLayoutHandler",{orientation:fluid.orientation.VERTICAL,containerRole:fluid.reorderer.roles.REGIONS,selectablesTabindex:0,sentinelize:true});fluid.moduleLayoutHandler=function(container,options,dropManager,dom){var that={};function computeLayout(){var togo;if(options.selectors.modules){togo=fluid.moduleLayout.layoutFromFlat(container,dom.locate("columns"),dom.locate("modules"))}if(!togo){var idLayout=fluid.model.getBeanValue(options,"moduleLayout.layout");fluid.moduleLayout.layoutFromIds(idLayout)}return togo}var layout=computeLayout();that.layout=layout;function isLocked(item){var lockedModules=options.selectors.lockedModules?dom.fastLocate("lockedModules"):[];return $.inArray(item,lockedModules)!==-1}that.getRelativePosition=fluid.reorderer.relativeInfoGetter(options.orientation,fluid.reorderer.WRAP_LOCKED_STRATEGY,fluid.reorderer.GEOMETRIC_STRATEGY,dropManager,dom);that.getGeometricInfo=function(){var extents=[];var togo={extents:extents,sentinelize:options.sentinelize};togo.elementMapper=function(element){return isLocked(element)?"locked":null};for(var col=0;col<layout.columns.length;col++){var column=layout.columns[col];var thisEls={orientation:options.orientation,elements:$.makeArray(column.elements),parentElement:column.container};extents.push(thisEls)}return togo};function computeModules(all){return function(){var modules=fluid.accumulate(layout.columns,function(column,list){return list.concat(column.elements)},[]);if(!all){fluid.remove_if(modules,isLocked)}return modules}}that.returnedOptions={selectors:{movables:computeModules(false),dropTargets:computeModules(false),selectables:computeModules(true)},listeners:{onMove:function(item,requestedPosition){fluid.moduleLayout.updateLayout(item,requestedPosition.element,requestedPosition.position,layout)},onRefresh:function(){layout=computeLayout();that.layout=layout},"onShowKeyboardDropWarning.setPosition":defaultOnShowKeyboardDropWarning}};that.getModel=function(){return fluid.moduleLayout.layoutToIds(layout)};return that}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/reorderer/js/Reorderer.js b/docs/include/jscripts/infusion_old/components/reorderer/js/Reorderer.js
new file mode 100644 (file)
index 0000000..656f8ec
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var defaultAvatarCreator=function(item,cssClass,dropWarning){var avatar=$(item).clone();fluid.dom.iterateDom(avatar.get(0),function(node){if(node.tagName.toLowerCase()==="script"){return"delete"}node.removeAttribute("id");if(node.tagName.toLowerCase()==="input"){node.setAttribute("disabled","disabled")}});avatar.removeAttr("id");avatar.removeClass("ui-droppable");avatar.addClass(cssClass);if(dropWarning){var avatarContainer=$(document.createElement("div"));avatarContainer.append(avatar);avatarContainer.append(dropWarning);avatar=avatarContainer}$("body").append(avatar);if(!$.browser.safari){avatar.css("display","block").width(item.offsetWidth).height(item.offsetHeight)}if($.browser.opera){avatar.hide()}return avatar};function firstSelectable(that){var selectables=that.dom.fastLocate("selectables");if(selectables.length<=0){return null}return selectables[0]}function bindHandlersToContainer(container,keyDownHandler,keyUpHandler,mouseMoveHandler){var actualKeyDown=keyDownHandler;var advancedPrevention=false;if($.browser.msie){container[0].ondrag=function(){return false};container[0].onselectstart=function(){return false}}if($.browser.opera){container.keypress(function(evt){if(advancedPrevention){advancedPrevention=false;evt.preventDefault();return false}});actualKeyDown=function(evt){var oldret=keyDownHandler(evt);if(oldret===false){advancedPrevention=true}}}container.keydown(actualKeyDown);container.keyup(keyUpHandler)}function addRolesToContainer(that){var first=that.dom.fastLocate("selectables")[0];that.container.attr("role",that.options.containerRole.container);that.container.attr("aria-multiselectable","false");that.container.attr("aria-readonly","false");that.container.attr("aria-disabled","false")}function createAvatarId(parentId){return parentId+"_avatar"}var adaptKeysets=function(options){if(options.keysets&&!(options.keysets instanceof Array)){options.keysets=[options.keysets]}};fluid.reorderer=function(container,options){if(!container){fluid.fail("Reorderer initialised with no container")}var thatReorderer=fluid.initView("fluid.reorderer",container,options);options=thatReorderer.options;var dropManager=fluid.dropManager();thatReorderer.layoutHandler=fluid.initSubcomponent(thatReorderer,"layoutHandler",[container,options,dropManager,thatReorderer.dom]);thatReorderer.activeItem=undefined;adaptKeysets(options);var kbDropWarning=thatReorderer.locate("dropWarning");var mouseDropWarning;if(kbDropWarning){mouseDropWarning=kbDropWarning.clone()}var isMove=function(evt){var keysets=options.keysets;for(var i=0;i<keysets.length;i++){if(keysets[i].modifier(evt)){return true}}return false};var isActiveItemMovable=function(){return $.inArray(thatReorderer.activeItem,thatReorderer.dom.fastLocate("movables"))>=0};var setDropEffects=function(value){thatReorderer.dom.fastLocate("dropTargets").attr("aria-dropeffect",value)};var styles=options.styles;var noModifier=function(evt){return(!evt.ctrlKey&&!evt.altKey&&!evt.shiftKey&&!evt.metaKey)};var handleDirectionKeyDown=function(evt){var item=thatReorderer.activeItem;if(!item){return true}var keysets=options.keysets;for(var i=0;i<keysets.length;i++){var keyset=keysets[i];var didProcessKey=false;var keydir=fluid.keyForValue(keyset,evt.keyCode);if(!keydir){continue}var isMovement=keyset.modifier(evt);var dirnum=fluid.keycodeDirection[keydir];var relativeItem=thatReorderer.layoutHandler.getRelativePosition(item,dirnum,!isMovement);if(!relativeItem){continue}if(isMovement){var prevent=thatReorderer.events.onBeginMove.fire(item);if(prevent===false){return false}if(kbDropWarning.length>0){if(relativeItem.clazz==="locked"){thatReorderer.events.onShowKeyboardDropWarning.fire(item,kbDropWarning);kbDropWarning.show()}else{kbDropWarning.hide()}}if(relativeItem.element){thatReorderer.requestMovement(relativeItem,item)}}else{if(noModifier(evt)){$(relativeItem.element).focus()}}return false}return true};thatReorderer.handleKeyDown=function(evt){if(!thatReorderer.activeItem||thatReorderer.activeItem!==evt.target){return true}var jActiveItem=$(thatReorderer.activeItem);if(!jActiveItem.hasClass(styles.dragging)&&isMove(evt)){if(isActiveItemMovable()){jActiveItem.removeClass(styles.selected);jActiveItem.addClass(styles.dragging);jActiveItem.attr("aria-grabbed","true");setDropEffects("move")}return false}return handleDirectionKeyDown(evt)};thatReorderer.handleKeyUp=function(evt){if(!thatReorderer.activeItem||thatReorderer.activeItem!==evt.target){return true}var jActiveItem=$(thatReorderer.activeItem);if(jActiveItem.hasClass(styles.dragging)&&!isMove(evt)){if(kbDropWarning){kbDropWarning.hide()}jActiveItem.removeClass(styles.dragging);jActiveItem.addClass(styles.selected);jActiveItem.attr("aria-grabbed","false");setDropEffects("none");return false}return false};var dropMarker;var createDropMarker=function(tagName){var dropMarker=$(document.createElement(tagName));dropMarker.addClass(options.styles.dropMarker);dropMarker.hide();return dropMarker};fluid.logEnabled=true;thatReorderer.requestMovement=function(requestedPosition,item){if(!requestedPosition||fluid.unwrap(requestedPosition.element)===fluid.unwrap(item)){return }thatReorderer.events.onMove.fire(item,requestedPosition);dropManager.geometricMove(item,requestedPosition.element,requestedPosition.position);$(thatReorderer.activeItem).focus();thatReorderer.refresh();dropManager.updateGeometry(thatReorderer.layoutHandler.getGeometricInfo());thatReorderer.events.afterMove.fire(item,requestedPosition,thatReorderer.dom.fastLocate("movables"))};var hoverStyleHandler=function(item,state){thatReorderer.dom.fastLocate("grabHandle",item)[state?"addClass":"removeClass"](styles.hover)};function initMovable(item){var styles=options.styles;item.attr("aria-grabbed","false");item.mouseover(function(){thatReorderer.events.onHover.fire(item,true)});item.mouseout(function(){thatReorderer.events.onHover.fire(item,false)});var avatar;thatReorderer.dom.fastLocate("grabHandle",item).draggable({refreshPositions:false,scroll:true,helper:function(){var dropWarningEl;if(mouseDropWarning){dropWarningEl=mouseDropWarning[0]}avatar=$(options.avatarCreator(item[0],styles.avatar,dropWarningEl));avatar.attr("id",createAvatarId(thatReorderer.container.id));return avatar},start:function(e,ui){var prevent=thatReorderer.events.onBeginMove.fire(item);if(prevent===false){return false}var handle=thatReorderer.dom.fastLocate("grabHandle",item)[0];var handlePos=fluid.dom.computeAbsolutePosition(handle);var handleWidth=handle.offsetWidth;var handleHeight=handle.offsetHeight;item.focus();item.removeClass(options.styles.selected);item.addClass(options.styles.mouseDrag);item.attr("aria-grabbed","true");setDropEffects("move");dropManager.startDrag(e,handlePos,handleWidth,handleHeight);avatar.show()},stop:function(e,ui){item.removeClass(options.styles.mouseDrag);item.addClass(options.styles.selected);$(thatReorderer.activeItem).attr("aria-grabbed","false");var markerNode=fluid.unwrap(dropMarker);if(markerNode.parentNode){markerNode.parentNode.removeChild(markerNode)}avatar.hide();ui.helper=null;setDropEffects("none");dropManager.endDrag();thatReorderer.requestMovement(dropManager.lastPosition(),item);thatReorderer.activeItem.focus()},handle:thatReorderer.dom.fastLocate("grabHandle",item)})}function changeSelectedToDefault(jItem,styles){jItem.removeClass(styles.selected);jItem.removeClass(styles.dragging);jItem.addClass(styles.defaultStyle);jItem.attr("aria-selected","false")}var selectItem=function(anItem){thatReorderer.events.onSelect.fire(anItem);var styles=options.styles;if(thatReorderer.activeItem&&thatReorderer.activeItem!==anItem){changeSelectedToDefault($(thatReorderer.activeItem),styles)}thatReorderer.activeItem=anItem;var jItem=$(anItem);jItem.removeClass(styles.defaultStyle);jItem.addClass(styles.selected);jItem.attr("aria-selected","true")};var initSelectables=function(){var handleBlur=function(evt){changeSelectedToDefault($(this),options.styles);return evt.stopPropagation()};var handleFocus=function(evt){selectItem(this);return evt.stopPropagation()};var selectables=thatReorderer.dom.fastLocate("selectables");for(var i=0;i<selectables.length;++i){var selectable=$(selectables[i]);if(!$.data(selectable[0],"fluid.reorderer.selectable-initialised")){selectable.addClass(styles.defaultStyle);selectables.blur(handleBlur);selectables.focus(handleFocus);selectables.click(function(evt){var handle=fluid.unwrap(thatReorderer.dom.fastLocate("grabHandle",this));if(fluid.dom.isContainer(handle,evt.target)){$(this).focus()}});selectables.attr("role",options.containerRole.item);selectables.attr("aria-selected","false");selectables.attr("aria-disabled","false");$.data(selectable[0],"fluid.reorderer.selectable-initialised",true)}}if(!thatReorderer.selectableContext){thatReorderer.selectableContext=fluid.selectable(thatReorderer.container,{selectableElements:selectables,selectablesTabindex:thatReorderer.options.selectablesTabindex,direction:null})}};var dropChangeListener=function(dropTarget){fluid.moveDom(dropMarker,dropTarget.element,dropTarget.position);dropMarker.css("display","");if(mouseDropWarning){if(dropTarget.lockedelem){mouseDropWarning.show()}else{mouseDropWarning.hide()}}};var initItems=function(){var movables=thatReorderer.dom.fastLocate("movables");var dropTargets=thatReorderer.dom.fastLocate("dropTargets");initSelectables();for(var i=0;i<movables.length;i++){var item=movables[i];if(!$.data(item,"fluid.reorderer.movable-initialised")){initMovable($(item));$.data(item,"fluid.reorderer.movable-initialised",true)}}if(movables.length>0&&!dropMarker){dropMarker=createDropMarker(movables[0].tagName)}dropManager.updateGeometry(thatReorderer.layoutHandler.getGeometricInfo());dropManager.dropChangeFirer.addListener(dropChangeListener,"fluid.Reorderer");dropTargets.attr("aria-dropeffect","none")};if(thatReorderer.container){bindHandlersToContainer(thatReorderer.container,thatReorderer.handleKeyDown,thatReorderer.handleKeyUp);addRolesToContainer(thatReorderer);fluid.tabbable(thatReorderer.container);initItems()}if(options.afterMoveCallbackUrl){thatReorderer.events.afterMove.addListener(function(){var layoutHandler=thatReorderer.layoutHandler;var model=layoutHandler.getModel?layoutHandler.getModel():options.acquireModel(thatReorderer);$.post(options.afterMoveCallbackUrl,JSON.stringify(model))},"postModel")}thatReorderer.events.onHover.addListener(hoverStyleHandler,"style");thatReorderer.refresh=function(){thatReorderer.dom.refresh("movables");thatReorderer.dom.refresh("selectables");thatReorderer.dom.refresh("grabHandle",thatReorderer.dom.fastLocate("movables"));thatReorderer.dom.refresh("stylisticOffset",thatReorderer.dom.fastLocate("movables"));thatReorderer.dom.refresh("dropTargets");thatReorderer.events.onRefresh.fire();initItems();thatReorderer.selectableContext.selectables=thatReorderer.dom.fastLocate("selectables");thatReorderer.selectableContext.selectablesUpdated(thatReorderer.activeItem)};thatReorderer.refresh();return thatReorderer};fluid.reorderer.keys={TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:19,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,i:73,j:74,k:75,m:77};fluid.reorderer.defaultKeysets=[{modifier:function(evt){return evt.ctrlKey},up:fluid.reorderer.keys.UP,down:fluid.reorderer.keys.DOWN,right:fluid.reorderer.keys.RIGHT,left:fluid.reorderer.keys.LEFT},{modifier:function(evt){return evt.ctrlKey},up:fluid.reorderer.keys.i,down:fluid.reorderer.keys.m,right:fluid.reorderer.keys.k,left:fluid.reorderer.keys.j}];fluid.reorderer.roles={GRID:{container:"grid",item:"gridcell"},LIST:{container:"list",item:"listitem"},REGIONS:{container:"main",item:"article"}};var simpleInit=function(container,layoutHandler,options){options=options||{};options.layoutHandler=layoutHandler;return fluid.reorderer(container,options)};fluid.reorderList=function(container,options){return simpleInit(container,"fluid.listLayoutHandler",options)};fluid.reorderGrid=function(container,options){return simpleInit(container,"fluid.gridLayoutHandler",options)};fluid.reorderer.GEOMETRIC_STRATEGY="projectFrom";fluid.reorderer.LOGICAL_STRATEGY="logicalFrom";fluid.reorderer.WRAP_LOCKED_STRATEGY="lockedWrapFrom";fluid.reorderer.NO_STRATEGY=null;fluid.reorderer.relativeInfoGetter=function(orientation,coStrategy,contraStrategy,dropManager,dom){return function(item,direction,forSelection){var dirorient=fluid.directionOrientation(direction);var strategy=dirorient===orientation?coStrategy:contraStrategy;return strategy!==null?dropManager[strategy](item,direction,forSelection):null}};fluid.defaults("fluid.reorderer",{styles:{defaultStyle:"fl-reorderer-movable-default",selected:"fl-reorderer-movable-selected",dragging:"fl-reorderer-movable-dragging",mouseDrag:"fl-reorderer-movable-dragging",hover:"fl-reorderer-movable-hover",dropMarker:"fl-reorderer-dropMarker",avatar:"fl-reorderer-avatar"},selectors:{dropWarning:".flc-reorderer-dropWarning",movables:".flc-reorderer-movable",grabHandle:"",stylisticOffset:""},avatarCreator:defaultAvatarCreator,keysets:fluid.reorderer.defaultKeysets,layoutHandler:{type:"fluid.listLayoutHandler"},events:{onShowKeyboardDropWarning:null,onSelect:null,onBeginMove:"preventable",onMove:null,afterMove:null,onHover:null,onRefresh:null},mergePolicy:{keysets:"replace","selectors.selectables":"selectors.movables","selectors.dropTargets":"selectors.movables"}});function geometricInfoGetter(orientation,sentinelize,dom){return function(){return{sentinelize:sentinelize,extents:[{orientation:orientation,elements:dom.fastLocate("dropTargets")}],elementMapper:function(element){return $.inArray(element,dom.fastLocate("movables"))===-1?"locked":null}}}}fluid.defaults(true,"fluid.listLayoutHandler",{orientation:fluid.orientation.VERTICAL,containerRole:fluid.reorderer.roles.LIST,selectablesTabindex:-1,sentinelize:true});fluid.listLayoutHandler=function(container,options,dropManager,dom){var that={};that.getRelativePosition=fluid.reorderer.relativeInfoGetter(options.orientation,fluid.reorderer.LOGICAL_STRATEGY,null,dropManager,dom);that.getGeometricInfo=geometricInfoGetter(options.orientation,options.sentinelize,dom);return that};fluid.defaults(true,"fluid.gridLayoutHandler",{orientation:fluid.orientation.HORIZONTAL,containerRole:fluid.reorderer.roles.GRID,selectablesTabindex:-1,sentinelize:false});fluid.gridLayoutHandler=function(container,options,dropManager,dom){var that={};that.getRelativePosition=fluid.reorderer.relativeInfoGetter(options.orientation,fluid.reorderer.LOGICAL_STRATEGY,fluid.reorderer.GEOMETRIC_STRATEGY,dropManager,dom);that.getGeometricInfo=geometricInfoGetter(options.orientation,options.sentinelize,dom);return that}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/tableOfContents/html/TableOfContents.html b/docs/include/jscripts/infusion_old/components/tableOfContents/html/TableOfContents.html
new file mode 100644 (file)
index 0000000..f43e866
--- /dev/null
@@ -0,0 +1,33 @@
+       <!-- Table of contents template -->
+        <div id="toc">
+            <ul rsf:id="level1s:">
+                <li rsf:id="level1:item">
+                    <a rsf:id="link" href="">1</a>
+                </li>
+                <ul rsf:id="level1:level2s">
+                    <li rsf:id="level2:item">
+                        <a rsf:id="link" href="">2</a>
+                    </li>
+                    <ul rsf:id="level2:level3s">
+                        <li rsf:id="level3:item">
+                            <a rsf:id="link" href="">3</a>
+                        </li>
+                        <ul rsf:id="level3:level4s">
+                            <li rsf:id="level4:item">
+                                <a rsf:id="link" href="">4</a>
+                            </li>
+                            <ul rsf:id="level4:level5s">
+                                <li rsf:id="level5:item">
+                                    <a rsf:id="link" href="">5</a>
+                                </li>
+                                <ul rsf:id="level5:level6s">
+                                    <li rsf:id="level6:item">
+                                        <a rsf:id="link" href="">6</a>
+                                    </li>
+                                </ul>
+                            </ul>
+                        </ul>
+                    </ul>
+                </ul>
+            </ul>
+        </div>
diff --git a/docs/include/jscripts/infusion_old/components/tableOfContents/js/TableOfContents.js b/docs/include/jscripts/infusion_old/components/tableOfContents/js/TableOfContents.js
new file mode 100644 (file)
index 0000000..2b8012c
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var insertAnchor=function(el){var a=$("<a name='"+el.text()+"' />",el[0].ownerDocument);el.before(a)};var createNode=function(id){var node={ID:id,children:[]};return node};var createTree=function(headings,levels){var generateTree=function(nodes,items,level){if(items.length===0){return }var item=items[0];if(level===item.level){nodes[nodes.length-1].push(item.leaf);items.shift();return generateTree(nodes,items,level)}if(level<item.level){var prefix=level>-1?"level"+(level+1)+":":"";var postfix=level===-1?"s:":"s";var name=prefix+"level"+(level+2)+postfix;var myNode=createNode(name);nodes[nodes.length-1].push(myNode);nodes.push(myNode.children);return generateTree(nodes,items,level+1)}if(level>item.level){nodes.pop();return generateTree(nodes,items,level-1)}};var tree={children:[]};var items=fluid.transform(headings,function(heading){var level=$.inArray(heading.tagName,levels);var text=$(heading).text();return{level:level,leaf:{ID:"level"+(level+1)+":item",children:[{ID:"link",linktext:text,target:"#"+text}]}}});generateTree([tree.children],items,-1);return tree};var buildTOC=function(container,headings,levels,templateURL,afterRender){headings.each(function(i,el){insertAnchor($(el))});var resources={toc:{href:templateURL}};fluid.fetchResources(resources,function(){var templates=fluid.parseTemplates(resources,["toc"],{});var node=$("<div></div>",container[0].ownerDocument);fluid.reRender(templates,node,createTree(headings,levels),{});container.prepend(node);afterRender.fire(node)})};fluid.tableOfContents=function(container,options){var that=fluid.initView("fluid.tableOfContents",container,options);that.events.afterRender.addListener(function(node){that.tocNode=$(node)});buildTOC(that.container,that.locate("headings"),that.options.levels,that.options.templateUrl,that.events.afterRender);that.hide=function(){if(that.tocNode){that.tocNode.hide()}};that.show=function(){if(that.tocNode){that.tocNode.show()}};return that};fluid.defaults("fluid.tableOfContents",{selectors:{headings:":header"},events:{afterRender:null},templateUrl:"../html/TableOfContents.html",levels:["H1","H2","H3","H4","H5","H6"]})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/uiOptions/css/Slider.css b/docs/include/jscripts/infusion_old/components/uiOptions/css/Slider.css
new file mode 100644 (file)
index 0000000..414e376
--- /dev/null
@@ -0,0 +1,14 @@
+.fl-slider-vert{height:10em;width:.8em;}
+.fl-slider-horz{width:10em;height:.8em;}
+.fl-slider{position:relative;background-color:#ebebeb;padding:0;}
+.fl-slider .fl-handle,.fl-slider a{position:absolute;display:block;background-color:#ccc;height:1.2em;width:1.2em;top:0;left:0;}
+.fl-slider-vert .fl-handle,.fl-slider-vert a{margin-left:-0.2em;margin-top:-0.5em;}
+.fl-slider-horz .fl-handle,.fl-slider-horz a{margin-top:-0.2em;margin-left:-0.5em;}
+.fl-theme-hc .fl-slider{background-color:#000;}
+.fl-theme-hc .fl-slider .fl-handle,.fl-theme-hc .fl-slider a,.fl-theme-hc .fl-slider a:hover{border:1px solid #000!important;background-color:#fff!important;}
+.fl-theme-hci .fl-slider{background-color:#fff;}
+.fl-theme-hci .fl-slider .fl-handle,.fl-theme-hci .fl-slider a,.fl-theme-hci .fl-slider a:hover{border:1px solid #fff!important;background-color:#000!important;}
+.fl-theme-slate .fl-slider{background-color:#ccc;}
+.fl-theme-slate .fl-slider .fl-handle,.fl-theme-slate .fl-slider a,.fl-theme-slate .fl-slider a:hover{border:1px solid #000;background-color:#999;}
+.fl-theme-coal .fl-slider{background-color:#ccc;}
+.fl-theme-coal .fl-slider .fl-handle,.fl-theme-coal .fl-slider a,.fl-theme-coal .fl-slider a:hover{border:1px solid #000;background-color:#999;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/uiOptions/css/UIOptions.css b/docs/include/jscripts/infusion_old/components/uiOptions/css/UIOptions.css
new file mode 100644 (file)
index 0000000..cb26be1
--- /dev/null
@@ -0,0 +1,36 @@
+.fl-uiOptions{background-color:#fff;}
+.fl-uiOptions .ui-accordion-content{border:1px solid;}
+.fl-uiOptions h2{cursor:pointer;margin:0;padding:5px 5px 5px 24px;background-color:#f5f5f5;}
+.fl-uiOptions h2:hover{background-color:#ccc;}
+.fl-uiOptions h2.ui-state-focus{background-color:#ccc;}
+.fl-uiOptions h2.ui-helper-reset{padding:5px 5px 5px 24px!important;}
+.fl-uiOptions fieldset{margin:0;padding:0;}
+.fl-uiOptions ol{margin:0;padding:15px 0 0 0;}
+.fl-uiOptions li{padding:6px 0;clear:both;list-style-type:none;line-height:1.6em;}
+.fl-uiOptions legend{text-indent:-500%;margin-bottom:-1.6em;visibility:hidden;}
+.fl-uiOptions .fl-uiOptions-buttons-refresher-5{width:5em;}
+.fl-uiOptions .fl-uiOptions-buttons-refresher-10{width:10em;}
+.fl-uiOptions .fl-accordion-content{zoom:1;}
+.fl-uiOptions .fl-accordion-content fieldset,.fl-uiOptions .fl-accordion-content span{display:inline;}
+.fl-uiOptions .fl-formLabels{text-align:right;padding-right:5px;}
+.fl-uiOptions .fl-uiOptions-min-text-size .fl-textfield,.fl-uiOptions .fl-uiOptions-line-spacing .fl-textfield{width:1.85em;height:1.2em;padding:.1em;}
+.fl-uiOptions .fl-slider{margin-bottom:0;margin-top:5px;}
+.fl-uiOptions .fl-subcomp-preview{padding:0;border:3px solid;}
+.fl-uiOptions .fl-subcomp-preview h2{font-weight:normal;margin:0;padding:5px;}
+.fl-uiOptions .fl-subcomp-preview iframe{width:100%;height:300px;}
+.fl-theme-mist .fl-uiOptions h2{background-color:#ebebeb;}
+.fl-theme-mist .fl-uiOptions .ui-accordion-content{border-color:#ebebeb;}
+.fl-theme-mist .fl-uiOptions .fl-subcomp-preview{border-color:#ebebeb;}
+.fl-theme-slate .fl-uiOptions h2{background-color:#666;}
+.fl-theme-slate .fl-uiOptions .ui-accordion-content{border-color:#666;}
+.fl-theme-slate .fl-uiOptions .fl-subcomp-preview{border-color:#666;}
+.fl-theme-coal .fl-uiOptions h2{background-color:#666;color:#fff;}
+.fl-theme-coal .fl-uiOptions .ui-accordion-content{border-color:#666;}
+.fl-theme-coal .fl-uiOptions .fl-subcomp-preview{border-color:#666;}
+.fl-theme-hc .fl-uiOptions h2{background-color:#666;color:#fff;}
+.fl-theme-hc .fl-uiOptions h2.ui-state-default{color:#fff!important;}
+.fl-theme-hc .fl-uiOptions h2.ui-state-hover{color:#000!important;}
+.fl-theme-hc .fl-uiOptions h2.ui-state-focus{color:#000!important;}
+.fl-theme-hci .fl-uiOptions h2.ui-state-default{color:#000!important;}
+.fl-theme-hci .fl-uiOptions h2.ui-state-hover{color:#fff!important;}
+.fl-theme-hci .fl-uiOptions h2.ui-state-focus{color:#fff!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/uiOptions/css/UIOptionsPreview.css b/docs/include/jscripts/infusion_old/components/uiOptions/css/UIOptionsPreview.css
new file mode 100644 (file)
index 0000000..f6a1005
--- /dev/null
@@ -0,0 +1,5 @@
+.fl-uiOptions-previewContent{font-size:13px;background:#e8ffea url(../images/main_bg.png) no-repeat fixed 0 0;padding:0 10px;}
+.fl-uiOptions-previewContent h1{margin:0;padding:5px 0 5px 0;}
+.fl-uiOptions-previewContent p{padding:5px;}
+.fl-uiOptions-previewContent img{float:right;margin:10px 0;}
+.fl-uiOptions-previewContent table thead th{background-color:#fff;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/uiOptions/html/UIOptions.html b/docs/include/jscripts/infusion_old/components/uiOptions/html/UIOptions.html
new file mode 100644 (file)
index 0000000..af73eb4
--- /dev/null
@@ -0,0 +1,178 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+\r
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:rsf="http://ponder.org.uk/rsf">\r
+    <head>\r
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-reset.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-layout.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-text.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-hc.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-hci.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-slate.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-coal.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-mist.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-rust.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../lib/jquery/ui/css/fl-theme-coal/coal.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../lib/jquery/ui/css/fl-theme-mist/mist.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../lib/jquery/ui/css/fl-theme-slate/slate.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../lib/jquery/ui/css/fl-theme-hc/hc.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../lib/jquery/ui/css/fl-theme-hci/hci.css" />\r
+        <link rel="stylesheet" type="text/css" href="../css/UIOptions.css" />\r
+        <link rel="stylesheet" type="text/css" href="../css/Slider.css" />\r
+\r
+        <title>UI Options</title>\r
+        <script type="text/javascript" src="../../../lib/jquery/core/js/jquery.js"></script>\r
+        <script type="text/javascript" src="../../../lib/jquery/ui/js/ui.core.js"></script>\r
+        <script type="text/javascript" src="../../../lib/jquery/ui/js/ui.accordion.js"></script>        \r
+        <script type="text/javascript" src="../../../lib/jquery/ui/js/ui.slider.js"></script>        \r
+        <script type="text/javascript" src="../../../lib/json/js/json2.js"></script>\r
+        <script type="text/javascript" src="../../../lib/jquery/plugins/delegate/js/jquery.delegate.js"></script>\r
+\r
+        <script type="text/javascript" src="../../../framework/core/js/jquery.keyboard-a11y.js"></script>        \r
+        <script type="text/javascript" src="../../../framework/core/js/Fluid.js"></script>\r
+        <script type="text/javascript" src="../../../framework/core/js/FluidDOMUtilities.js"></script>\r
+        <script type="text/javascript" src="../../../framework/core/js/DataBinding.js"></script>\r
+        <script type="text/javascript" src="../../../lib/fastXmlPull/js/fastXmlPull.js"></script>\r
+        <script type="text/javascript" src="../../../framework/renderer/js/fluidParser.js"></script>\r
+        <script type="text/javascript" src="../../../framework/renderer/js/fluidRenderer.js"></script>\r
+\r
+        <script type="text/javascript" src="../js/UIEnhancer.js"></script>\r
+        <script type="text/javascript" src="../js/UIOptions.js"></script>\r
+        <script type="text/javascript" src="../../tableOfContents/js/TableOfContents.js"></script>\r
+        <script type="text/javascript" src="../../undo/js/Undo.js"></script>\r
+        \r
+        <script type="text/javascript">\r
+            $().ready(function () {\r
+                fluid.uiEnhancer();\r
+                \r
+                var options = {\r
+                    listeners: {\r
+                        afterRender: function () {\r
+                            $('.fl-uiOptions .fl-col:eq(0)').accordion({header: 'h2', clearStyle: true, autoHeight: false});\r
+                        }\r
+                    }\r
+                };\r
+                fluid.uiOptions(".uiOptions", options);\r
+            });\r
+        </script>\r
+    </head>\r
+\r
+    <body>\r
+\r
+        <h1>User Interface Options</h1>\r
+        <form id="options" action="" class="fl-col-flex2 fl-uiOptions uiOptions">\r
+            \r
+            <!-- column 1, options -->\r
+            <div class="fl-col">\r
+                    <h2>Easier to see</h2>\r
+                    <div class="fl-accordion-content">\r
+                        <ol class="fl-controls-right">\r
+                            <li>\r
+                                <label for="text-font" class="fl-label">Font style:</label>\r
+                                <select rsf:id="text-font" id="text-font" class="flc-uiOptions-control" >\r
+                                </select>\r
+                            </li>\r
+                            \r
+                            <li class="flc-uiOptions-min-text-size fl-uiOptions-min-text-size">\r
+                                <label for="min-text-size" class="fl-label">Minimum text size:</label>\r
+                                <p class="fl-slider fl-force-right fl-slider-horz flc-textfieldSlider-slider flc-uiOptions-control"> </p>\r
+                                <input id="min-text-size" class="fl-textfield flc-textfieldSlider-field flc-uiOptions-control" type="text" />pt                                \r
+                            </li>\r
+        \r
+                            <li>\r
+                                <label for="text-spacing" class="fl-label">Text Spacing:</label>\r
+                                <select rsf:id="text-spacing" id="text-spacing" class="flc-uiOptions-control" >\r
+                                    <option>text-spacing here</option>\r
+                                </select>\r
+                            </li>\r
+                            <li class="flc-uiOptions-line-spacing fl-uiOptions-line-spacing">\r
+                                <label for="line-spacing" class="fl-label">Line Spacing:</label>\r
+                                <p class="fl-slider fl-force-right fl-slider-horz flc-textfieldSlider-slider flc-uiOptions-control"> </p>\r
+                                <input id="line-spacing" class="fl-textfield flc-textfieldSlider-field flc-uiOptions-control" type="text" />                             \r
+                            </li>\r
+                            <li>\r
+                                <label class="fl-label" for="theme">Contrast:</label>\r
+                                <select rsf:id="theme" id="theme" class="flc-uiOptions-control" >\r
+                                    <option>contrast here</option>\r
+                                </select>\r
+                            </li>\r
+        \r
+                            <li>\r
+                                <span class="fl-label">Background Images:</span>\r
+                                <fieldset>\r
+                                    <legend>Background Images</legend>\r
+                                    <span rsf:id="background-images-row:">\r
+                                        <input rsf:id="background-images-choice" id="background-images-choice" class="flc-uiOptions-control" type="radio" />\r
+                                        <label rsf:id="background-images-label" for="background-images-choice">choice</label>\r
+                                    </span>\r
+                                </fieldset>\r
+                            </li>\r
+        \r
+                            <li>                             \r
+                                <span class="fl-label">Simplified Layout:</span>\r
+                                <fieldset>\r
+                                    <legend>Simplified Layout</legend>\r
+                                    <span rsf:id="layout-row:">\r
+                                        <input rsf:id="layout-choice" id="layout-choice" class="flc-uiOptions-control" type="radio" />\r
+                                        <label rsf:id="layout-label" for="layout-choice">choice</label>\r
+                                    </span>\r
+                                </fieldset>\r
+                            </li>\r
+                        </ol>\r
+                    </div>\r
+                \r
+                    <h2>Easier to find</h2>\r
+                    <div class="fl-accordion-content">\r
+                        <ol class="fl-controls-right">\r
+                            <li>\r
+                                <span class="fl-label">Table of Contents:</span>\r
+                                <fieldset>\r
+                                    <legend>Table of Contents</legend>\r
+                                    <span rsf:id="toc-row:">\r
+                                        <input rsf:id="toc-choice" id="toc-choice" class="fl-textfield flc-uiOptions-control" type="radio"/>\r
+                                        <label rsf:id="toc-label" for="toc-choice">choice</label>\r
+                                    </span>\r
+                                </fieldset>\r
+                            </li>                            \r
+                            <li>\r
+                                <span class="fl-label">Links:</span>\r
+                               <fieldset>\r
+                                   <legend>Links</legend>\r
+                                    <input rsf:id="links-underline" id="links-underline" class="flc-uiOptions-control" type="checkbox"/>\r
+                                    <label for="links-underline">Underline</label><br />\r
+                                    <input rsf:id="links-bold" id="links-bold" class="flc-uiOptions-control" type="checkbox"/>\r
+                                    <label for="links-bold">Bold</label><br />\r
+                                    <input rsf:id="links-larger" id="links-larger" class="flc-uiOptions-control" type="checkbox"/>\r
+                                    <label for="links-larger">Larger</label>\r
+                                </fieldset>\r
+                            </li>\r
+                            <li>\r
+                                <span class="fl-label">Inputs:</span>\r
+                               <fieldset>\r
+                                   <legend>Inputs</legend>\r
+                                    <input rsf:id="inputs-larger" id="inputs-larger" class="flc-uiOptions-control" type="checkbox"/>\r
+                                    <label for="inputs-larger">Larger</label>\r
+                                </fieldset>                                   \r
+                            </li>\r
+                        </ol>\r
+                    </div>\r
+                \r
+            </div>\r
+            <!-- column 2, preview -->\r
+            <div class="fl-col">\r
+                <div class="fl-subcomp-preview">\r
+                    <h2><strong>Preview window</strong> (updates automatically)</h2>\r
+                    <iframe class="flc-uiOptions-preview-frame" src="UIOptionsPreview.html" frameborder="0"></iframe>\r
+                </div>\r
+                <div class="fl-text-align-center fl-subcomp-buttons">\r
+                    <input class="flc-uiOptions-reset" type="button" value="Reset" />\r
+                    <input class="flc-uiOptions-save" type="button" value="Save and apply" />\r
+                    <input class="flc-uiOptions-cancel" type="button" value="Cancel" />\r
+                </div>                \r
+            </div>\r
+            \r
+        </form>                \r
+    </body>\r
+</html>\r
+\r
diff --git a/docs/include/jscripts/infusion_old/components/uiOptions/html/UIOptionsPreview.html b/docs/include/jscripts/infusion_old/components/uiOptions/html/UIOptionsPreview.html
new file mode 100644 (file)
index 0000000..b50caec
--- /dev/null
@@ -0,0 +1,85 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+       <head>\r
+               <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+               <title>UI Options Preview Content</title>\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-reset.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-layout.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-text.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-hc.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-hci.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-slate.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-coal.css" />\r
+        <link rel="stylesheet" type="text/css" href="../../../framework/fss/css/fss-theme-mist.css" />\r
+        <link rel="stylesheet" type="text/css" href="../css/UIOptionsPreview.css" />\r
+\r
+       </head>\r
+       <body class="fl-uiOptions-previewContent">\r
+        <h1>Web Pages</h1>\r
+        <img src="../images/mintleaf.png" alt="Mint Leaf" title="This is a mint leaf" />\r
+        <p>A <b>web page</b> or <b>webpage</b> is a <em>resource of information</em> that is suitable for the World Wide Web and can be accessed through a web browser. This information is usually in HTML or XHTML format, and may provide navigation to other web pages via hypertext links.</p>\r
+        <h2>Color, typography, illustration and interaction</h2>\r
+        <p><a href="#">Web pages</a> usually include instructions as to the colors of text and backgrounds and very often also contain links to images and sometimes other media to be included in the final view.</p>\r
+        <h2>Elements of a webpage</h2>\r
+        <ol>\r
+            <li>Textual\r
+                <ul>\r
+                    <li><a href="#">content with a textual representaion</a></li>\r
+                </ul>\r
+            </li>\r
+            <li>Non-textual\r
+                <ul>\r
+                    <li>Static and Animated imagery</li>\r
+                    <li>Audio</li>\r
+                    <li>Video</li>\r
+                </ul>\r
+            </li>\r
+            <li>Interactive\r
+                <ul>\r
+                    <li>Forms</li>\r
+                    <li><a href="#">Hyperlinks</a></li>\r
+                </ul>\r
+            </li>\r
+            <li>Hidden</li>\r
+        </ol>\r
+        <h3>Breakdown of webpage markup</h3>\r
+        <table>\r
+            <thead>\r
+                <tr>\r
+                    <th>Tag</th>\r
+                    <th>Meaning</th>\r
+                    <th>Deprecated</th>\r
+                </tr>\r
+            </thead>\r
+            <tbody>\r
+                <tr>\r
+                    <td><pre>&lt;B&gt;</pre></td>\r
+                    <td>Make an element as BOLD</td>\r
+                    <td><input type="checkbox" checked="checked" disabled="disabled" /></td>\r
+                </tr>\r
+                <tr>\r
+                    <td><pre>&lt;I&gt;</pre></td>\r
+                    <td>Show an element in ITALICS</td>\r
+                    <td><input type="checkbox" checked="checked" /></td>\r
+                </tr>\r
+                <tr>\r
+                    <td><pre>&lt;EM&gt;</pre></td>\r
+                    <td>EMPHASIZE an element</td>\r
+                    <td><input type="checkbox" disabled="disabled" /></td>\r
+                </tr>\r
+                <tr>\r
+                    <td><pre>&lt;STRONG&gt;</pre></td>\r
+                    <td>Use STRONG EMPHASIS for an element</td>\r
+                    <td><input type="checkbox" /></td>\r
+                </tr>\r
+            </tbody>\r
+            <tfoot>\r
+                <tr>\r
+                    <th>Tag</th>\r
+                    <th>Meaning</th>\r
+                    <th>Deprecated</th>\r
+                </tr>\r
+            </tfoot>\r
+        </table>\r
+       </body>\r
+</html>\r
diff --git a/docs/include/jscripts/infusion_old/components/uiOptions/images/500x327_mint_truffle.jpg b/docs/include/jscripts/infusion_old/components/uiOptions/images/500x327_mint_truffle.jpg
new file mode 100644 (file)
index 0000000..50e0acd
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uiOptions/images/500x327_mint_truffle.jpg differ
diff --git a/docs/include/jscripts/infusion_old/components/uiOptions/images/border_1.png b/docs/include/jscripts/infusion_old/components/uiOptions/images/border_1.png
new file mode 100644 (file)
index 0000000..7764c61
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uiOptions/images/border_1.png differ
diff --git a/docs/include/jscripts/infusion_old/components/uiOptions/images/expand_collapse.png b/docs/include/jscripts/infusion_old/components/uiOptions/images/expand_collapse.png
new file mode 100644 (file)
index 0000000..909a6e4
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uiOptions/images/expand_collapse.png differ
diff --git a/docs/include/jscripts/infusion_old/components/uiOptions/images/h1.png b/docs/include/jscripts/infusion_old/components/uiOptions/images/h1.png
new file mode 100644 (file)
index 0000000..a1e35fc
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uiOptions/images/h1.png differ
diff --git a/docs/include/jscripts/infusion_old/components/uiOptions/images/main_bg.png b/docs/include/jscripts/infusion_old/components/uiOptions/images/main_bg.png
new file mode 100644 (file)
index 0000000..3948c79
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uiOptions/images/main_bg.png differ
diff --git a/docs/include/jscripts/infusion_old/components/uiOptions/images/mintleaf.png b/docs/include/jscripts/infusion_old/components/uiOptions/images/mintleaf.png
new file mode 100644 (file)
index 0000000..2d5e678
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uiOptions/images/mintleaf.png differ
diff --git a/docs/include/jscripts/infusion_old/components/uiOptions/js/UIEnhancer.js b/docs/include/jscripts/infusion_old/components/uiOptions/js/UIEnhancer.js
new file mode 100644 (file)
index 0000000..803a53e
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var replaceClass=function(container,selector,regExp,newVal){newVal=newVal||"";$(selector,container).andSelf().each(function(i){var attr=($.browser.msie===false)?"class":"className";if(this.getAttribute(attr)){this.setAttribute(attr,this.getAttribute(attr).replace(regExp,newVal))}})};var addClassForSetting=function(element,settingName,value,classnameMap){var settingValues=classnameMap[settingName]||{};var className=settingValues[value];if(className){element.addClass(className)}};var isTrue=function(val){return val&&(val===true||val==="true")};var setToc=function(that,tocSetting){if(isTrue(tocSetting)){if(that.tableOfContents){that.tableOfContents.show()}else{that.tableOfContents=fluid.initSubcomponent(that,"tableOfContents",[that.container,fluid.COMPONENT_OPTIONS])}}else{if(that.tableOfContents){that.tableOfContents.hide()}}};var setLineSpacing=function(container,spacing){spacing=spacing&&spacing>0?spacing:1;container.css("line-height",spacing+"em")};var setMinSize=function(container,size){if(size&&size>0){container.css("font-size",size+"pt");replaceClass(container,"[class*=fl-font-size-]",/\bfl-font-size-[0-9]{1,2}\s+/g,"fl-font-size-100")}else{container.css("font-size","")}};var addStyles=function(container,settings,classnameMap){addClassForSetting(container,"textFont",settings.textFont,classnameMap);addClassForSetting(container,"textSpacing",settings.textSpacing,classnameMap);addClassForSetting(container,"theme",settings.theme,classnameMap);addClassForSetting(container,"layout",settings.layout,classnameMap)};var styleElements=function(elements,setting,classname){if(setting){elements.addClass(classname)}else{elements.removeClass(classname)}};var styleLinks=function(container,settings,classnameMap){var links=$("a",container);styleElements(links,settings.linksUnderline,classnameMap.linksUnderline);styleElements(links,settings.linksBold,classnameMap.linksBold);styleElements(links,settings.linksLarger,classnameMap.linksLarger)};var styleInputs=function(container,settings,classnameMap){styleElements($("input",container),settings.inputsLarger,classnameMap.inputsLarger)};var initModel=function(that){if(that.options.savedSettings){that.model=that.options.savedSettings;return }that.model=that.settingsStore.fetch()||fluid.copy(that.defaultSiteSettings)};var clearClashingClasses=function(container,classnameMap){var settingsWhichMayClash=["textFont","textSpacing","theme","layout"];var classesToRemove="fl-noBackgroundImages";var selector=".fl-noBackgroundImages";for(var i=0;i<settingsWhichMayClash.length;i++){var settingValues=classnameMap[settingsWhichMayClash[i]];for(var val in settingValues){var classname=settingValues[val];if(classname){classesToRemove=classesToRemove+" "+classname;selector=selector+",."+classname}}}$(selector,container).removeClass(classesToRemove);return classesToRemove};var setupUIEnhancer=function(that){that.settingsStore=fluid.initSubcomponent(that,"settingsStore",[fluid.COMPONENT_OPTIONS]);initModel(that);that.refreshView()};fluid.uiEnhancer=function(doc,options){doc=doc||document;var that=fluid.initView("fluid.uiEnhancer",doc,options);$(doc).data("uiEnhancer",that);that.container=$("body",doc);that.defaultSiteSettings=that.options.defaultSiteSettings;var clashingClassnames;that.refreshView=function(){that.container.removeClass(clashingClassnames);addStyles(that.container,that.model,that.options.classnameMap);styleElements(that.container,!isTrue(that.model.backgroundImages),that.options.classnameMap.noBackgroundImages);setMinSize(that.container,that.model.textSize);setLineSpacing(that.container,that.model.lineSpacing);setToc(that,that.model.toc);styleLinks(that.container,that.model,that.options.classnameMap);styleInputs(that.container,that.model,that.options.classnameMap)};that.updateModel=function(newModel,source){that.events.modelChanged.fire(newModel,that.model,source);fluid.clear(that.model);fluid.model.copyModel(that.model,newModel);that.settingsStore.save(that.model);that.refreshView()};clashingClassnames=clearClashingClasses(that.container,that.options.classnameMap);setupUIEnhancer(that);return that};fluid.defaults("fluid.uiEnhancer",{tableOfContents:{type:"fluid.tableOfContents",options:{templateUrl:"../../tableOfContents/html/TableOfContents.html"}},settingsStore:{type:"fluid.uiEnhancer.cookieStore"},events:{modelChanged:null},classnameMap:{textFont:{serif:"fl-font-serif",sansSerif:"fl-font-sans",arial:"fl-font-arial",verdana:"fl-font-verdana",monospace:"fl-font-monospace",courier:"fl-font-courier",times:"fl-font-times"},textSpacing:{"default":"",wide0:"fl-font-spacing-0",wide1:"fl-font-spacing-1",wide2:"fl-font-spacing-2",wide3:"fl-font-spacing-3",wide4:"fl-font-spacing-4",wide5:"fl-font-spacing-5",wide6:"fl-font-spacing-6"},theme:{mist:"fl-theme-mist",rust:"fl-theme-rust",highContrast:"fl-theme-hc",highContrastInverted:"fl-theme-hci",lowContrast:"fl-theme-slate",mediumContrast:"fl-theme-coal","default":""},layout:{simple:"fl-layout-linear","default":""},noBackgroundImages:"fl-noBackgroundImages",linksUnderline:"fl-text-underline",linksBold:"fl-text-bold",linksLarger:"fl-text-larger",inputsLarger:"fl-text-larger"},defaultSiteSettings:{textFont:"",textSpacing:"",theme:"default",layout:"default",textSize:"",lineSpacing:"",backgroundImages:true,toc:false,linksUnderline:false,linksBold:false,linksLarger:false,inputsLarger:false}});fluid.uiEnhancer.cookieStore=function(options){var that={};fluid.mergeComponentOptions(that,"fluid.uiEnhancer.cookieStore",options);that.fetch=function(){var cookie=document.cookie;var cookiePrefix=that.options.cookieName+"=";var retObj,startIndex,endIndex;if(cookie.length>0){startIndex=cookie.indexOf(cookiePrefix);if(startIndex>-1){startIndex=startIndex+cookiePrefix.length;endIndex=cookie.indexOf(";",startIndex);if(endIndex<startIndex){endIndex=cookie.length}retObj=JSON.parse(decodeURIComponent(cookie.substring(startIndex,endIndex)))}}return retObj};that.save=function(settings){document.cookie=that.options.cookieName+"="+encodeURIComponent(JSON.stringify(settings))};return that};fluid.defaults("fluid.uiEnhancer.cookieStore",{cookieName:"fluid-ui-settings"});fluid.uiEnhancer.tempStore=function(options){var that={};that.model=null;that.fetch=function(){return that.model};that.save=function(settings){that.model=settings};return that}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/uiOptions/js/UIOptions.js b/docs/include/jscripts/infusion_old/components/uiOptions/js/UIOptions.js
new file mode 100644 (file)
index 0000000..2e0768f
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var initSliderAria=function(thumb,opts){var ariaDefaults={role:"slider","aria-valuenow":opts.value,"aria-valuemin":opts.min,"aria-valuemax":opts.max};thumb.attr(ariaDefaults)};var initTextfieldSlider=function(that){var textfield=that.locate("textfield");textfield.val(that.model);var sliderOptions=that.options.sliderOptions;sliderOptions.value=that.model;sliderOptions.min=that.options.min;sliderOptions.max=that.options.max;var slider=that.locate("slider").slider(sliderOptions);initSliderAria(that.locate("thumb"),sliderOptions);textfield.change(function(){if(that.isValid(this.value)){if(!that.isInRange(this.value)){this.value=(this.value<that.min)?that.min:that.max}slider.slider("value",this.value);that.updateModel(this.value,this)}else{this.value=that.model}});textfield.keypress(function(evt){if(evt.keyCode!==$.ui.keyCode.ENTER){return true}else{$(evt.target).change();$(fluid.findForm(evt.target)).submit();return false}});slider.bind("slide",function(e,ui){textfield.val(ui.value);that.updateModel(ui.value,slider)})};fluid.textfieldSlider=function(container,options){var that=fluid.initView("fluid.textfieldSlider",container,options);that.model=that.options.value||that.locate("textfield").val();that.min=that.options.min;that.max=that.options.max;initTextfieldSlider(that);that.isInRange=function(value){return(value>=that.min&&value<=that.max)};that.isValid=function(value){return !(isNaN(parseInt(value,10))||isNaN(value))};that.updateModel=function(model,source){if(that.isInRange(model)){that.events.modelChanged.fire(model,that.model,source);that.model=model;that.locate("thumb").attr("aria-valuenow",that.model)}};return that};fluid.defaults("fluid.textfieldSlider",{selectors:{textfield:".flc-textfieldSlider-field",slider:".flc-textfieldSlider-slider",thumb:".ui-slider-handle"},events:{modelChanged:null},sliderOptions:{orientation:"horizontal"},min:0,max:100,value:null})})(jQuery,fluid_1_1);(function($,fluid){var createSelectNode=function(id,selection,list,names){return{ID:id,selection:{valuebinding:selection},optionlist:{valuebinding:list},optionnames:{valuebinding:names}}};var createSimpleBindingNode=function(id,binding){return{ID:id,valuebinding:binding}};var generateTree=function(that,rendererModel){var children=[];children.push(createSelectNode("text-font","selections.textFont","labelMap.textFont.values","labelMap.textFont.names"));children.push(createSelectNode("text-spacing","selections.textSpacing","labelMap.textSpacing.values","labelMap.textSpacing.names"));children.push(createSelectNode("theme","selections.theme","labelMap.theme.values","labelMap.theme.names"));var bgiExplodeOpts={selectID:"background-images",rowID:"background-images-row:",inputID:"background-images-choice",labelID:"background-images-label"};children.push(createSelectNode("background-images","selections.backgroundImages","labelMap.backgroundImages.values","labelMap.backgroundImages.names"));children=children.concat(fluid.explodeSelectionToInputs(that.options.controlValues.backgroundImages,bgiExplodeOpts));var layoutExplodeOpts={selectID:"layout",rowID:"layout-row:",inputID:"layout-choice",labelID:"layout-label"};children.push(createSelectNode("layout","selections.layout","labelMap.layout.values","labelMap.layout.names"));children=children.concat(fluid.explodeSelectionToInputs(that.options.controlValues.layout,layoutExplodeOpts));var tocExplodeOpts={selectID:"toc",rowID:"toc-row:",inputID:"toc-choice",labelID:"toc-label"};children.push(createSelectNode("toc","selections.toc","labelMap.toc.values","labelMap.toc.names"));children=children.concat(fluid.explodeSelectionToInputs(that.options.controlValues.layout,tocExplodeOpts));children.push(createSimpleBindingNode("links-underline","selections.linksUnderline"));children.push(createSimpleBindingNode("links-bold","selections.linksBold"));children.push(createSimpleBindingNode("links-larger","selections.linksLarger"));children.push(createSimpleBindingNode("inputs-larger","selections.inputsLarger"));return{children:children}};var bindHandlers=function(that){var saveButton=that.locate("save");saveButton.click(that.save);that.locate("reset").click(that.reset);that.locate("cancel").click(that.cancel);var form=fluid.findForm(saveButton);$(form).submit(function(){that.save()})};var initPreview=function(that){var previewFrame=that.locate("previewFrame");var previewEnhancer;that.events.modelChanged.addListener(function(model){setTimeout(function(){if(previewEnhancer){previewEnhancer.updateModel(model)}},0)});previewFrame.load(function(){var previewFrameContents=previewFrame.contents();var options={savedSettings:that.model,tableOfContents:that.uiEnhancer.options.tableOfContents,settingsStore:{type:"fluid.uiEnhancer.tempStore"}};previewEnhancer=fluid.uiEnhancer(previewFrameContents,options)})};var createLabelMap=function(options){var labelMap={};for(var item in options.controlValues){labelMap[item]={names:options.strings[item],values:options.controlValues[item]}}return labelMap};var createRenderOptions=function(that){that.model.toc=String(that.model.toc);that.model.backgroundImages=String(that.model.backgroundImages);var aggregateModel=fluid.assembleModel({selections:{model:that.model,applier:that.applier},labelMap:{model:createLabelMap(that.options)}});return{model:aggregateModel.model,applier:aggregateModel.applier,autoBind:true}};var initSliders=function(that){var createOptions=function(settingName){return{listeners:{modelChanged:function(value){that.applier.requestChange(settingName,value)}},value:that.model[settingName]}};var options=createOptions("textSize");fluid.merge(null,options,that.options.textMinSize.options);fluid.initSubcomponents(that,"textMinSize",[that.options.selectors.textMinSizeCtrl,options]);options=createOptions("lineSpacing");fluid.merge(null,options,that.options.lineSpacing.options);fluid.initSubcomponents(that,"lineSpacing",[that.options.selectors.lineSpacingCtrl,options])};var mergeSiteDefaults=function(options,siteDefaults){for(var settingName in options.controlValues){var setting=String(siteDefaults[settingName]);var settingValues=options.controlValues[settingName];if(setting){var index=$.inArray(setting,settingValues);if(index===-1){var defaultIndex=$.inArray("default",settingValues);if(defaultIndex===-1){settingValues.push(setting)}else{settingValues[defaultIndex]=setting}}}}};var setupUIOptions=function(that){that.applier.modelChanged.addListener("*",function(newModel,oldModel,changeRequest){that.events.modelChanged.fire(newModel,oldModel,changeRequest.source)});mergeSiteDefaults(that.options,that.uiEnhancer.defaultSiteSettings);that.events.afterRender.addListener(function(){initSliders(that);bindHandlers(that);initPreview(that)});var rendererOptions=createRenderOptions(that);var template=fluid.selfRender(that.container,generateTree(that,rendererOptions.model),rendererOptions);that.events.afterRender.fire();return template};fluid.uiOptions=function(container,options){var that=fluid.initView("fluid.uiOptions",container,options);that.uiEnhancer=$(document).data("uiEnhancer");that.model=fluid.copy(that.uiEnhancer.model);that.applier=fluid.makeChangeApplier(that.model);var savedModel=that.uiEnhancer.model;var template;that.save=function(){that.events.onSave.fire(that.model);savedModel=fluid.copy(that.model);that.uiEnhancer.updateModel(savedModel)};that.reset=function(){that.events.onReset.fire();that.updateModel(fluid.copy(that.uiEnhancer.defaultSiteSettings),that);that.refreshView()};that.cancel=function(){that.events.onCancel.fire();that.updateModel(fluid.copy(savedModel),that);that.refreshView()};that.refreshView=function(){var rendererOptions=createRenderOptions(that);fluid.reRender(template,that.container,generateTree(that,rendererOptions.model),rendererOptions);that.events.afterRender.fire()};that.updateModel=function(newModel,source){that.events.modelChanged.fire(newModel,that.model,source);fluid.clear(that.model);fluid.model.copyModel(that.model,newModel)};template=setupUIOptions(that);return that};fluid.defaults("fluid.uiOptions",{textMinSize:{type:"fluid.textfieldSlider",options:{min:6,max:30}},lineSpacing:{type:"fluid.textfieldSlider",options:{min:1,max:10}},selectors:{controls:".flc-uiOptions-control",textMinSizeCtrl:".flc-uiOptions-min-text-size",lineSpacingCtrl:".flc-uiOptions-line-spacing",cancel:".flc-uiOptions-cancel",reset:".flc-uiOptions-reset",save:".flc-uiOptions-save",previewFrame:".flc-uiOptions-preview-frame"},events:{modelChanged:null,onSave:null,onCancel:null,onReset:null,afterRender:null},strings:{textFont:["Serif","Sans-Serif","Arial","Verdana","Courier","Times"],textSpacing:["Regular","Wide","Wider","Widest"],theme:["Low Contrast","Medium Contrast","Medium Contrast Grey Scale","High Contrast","High Contrast Inverted"],backgroundImages:["Yes","No"],layout:["Yes","No"],toc:["Yes","No"]},controlValues:{textFont:["serif","sansSerif","arial","verdana","courier","times"],textSpacing:["default","wide1","wide2","wide3"],theme:["lowContrast","default","mediumContrast","highContrast","highContrastInverted"],backgroundImages:["true","false"],layout:["simple","default"],toc:["true","false"]}})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/undo/js/Undo.js b/docs/include/jscripts/infusion_old/components/undo/js/Undo.js
new file mode 100644 (file)
index 0000000..4a44792
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var STATE_INITIAL="state_initial",STATE_CHANGED="state_changed",STATE_REVERTED="state_reverted";function defaultRenderer(that,targetContainer){var markup="<span class='flc-undo'><span class='flc-undo-undoContainer'>[<a href='#' class='flc-undo-undoControl'>undo</a>]</span><span class='flc-undo-redoContainer'>[<a href='#' class='flc-undo-redoControl'>redo</a>]</span></span>";var markupNode=$(markup);targetContainer.append(markupNode);return markupNode}function refreshView(that){if(that.state===STATE_INITIAL){that.locate("undoContainer").hide();that.locate("redoContainer").hide()}else{if(that.state===STATE_CHANGED){that.locate("undoContainer").show();that.locate("redoContainer").hide()}else{if(that.state===STATE_REVERTED){that.locate("undoContainer").hide();that.locate("redoContainer").show()}}}}var bindHandlers=function(that){that.locate("undoControl").click(function(){if(that.state!==STATE_REVERTED){fluid.model.copyModel(that.extremalModel,that.component.model);that.component.updateModel(that.initialModel,that);that.state=STATE_REVERTED;refreshView(that);that.locate("redoControl").focus()}return false});that.locate("redoControl").click(function(){if(that.state!==STATE_CHANGED){that.component.updateModel(that.extremalModel,that);that.state=STATE_CHANGED;refreshView(that);that.locate("undoControl").focus()}return false});return{modelChanged:function(newModel,oldModel,source){if(source!==that){that.state=STATE_CHANGED;fluid.model.copyModel(that.initialModel,oldModel);refreshView(that)}}}};fluid.undoDecorator=function(component,userOptions){var that=fluid.initView("undo",null,userOptions);that.container=that.options.renderer(that,component.container);fluid.initDomBinder(that);fluid.tabindex(that.locate("undoControl"),0);fluid.tabindex(that.locate("redoControl"),0);that.component=component;that.initialModel={};that.extremalModel={};fluid.model.copyModel(that.initialModel,component.model);fluid.model.copyModel(that.extremalModel,component.model);that.state=STATE_INITIAL;refreshView(that);var listeners=bindHandlers(that);that.returnedOptions={listeners:listeners};return that};fluid.defaults("undo",{selectors:{undoContainer:".flc-undo-undoContainer",undoControl:".flc-undo-undoControl",redoContainer:".flc-undo-redoContainer",redoControl:".flc-undo-redoControl"},renderer:defaultRenderer})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/uploader/ReadMe.txt b/docs/include/jscripts/infusion_old/components/uploader/ReadMe.txt
new file mode 100644 (file)
index 0000000..eec74c1
--- /dev/null
@@ -0,0 +1,103 @@
+Infusion Uploader Read Me
+
+1) Upgrading
+2) Known Issues
+3) Troubleshooting
+4) Running the Uploader with out a Server
+
+--------------------------------------
+
+UPGRADING from previous versions:
+
+Before upgrading from Infusion 0.5 or earlier, please refer to the Uploader API documentation and the 
+latest example code. The Fluid Uploader was extensively refactored in the 0.6 release, and a fresh new 
+API has been introduced.
+
+Please refer to the Uploader API documentation on the Fluid Wiki and the 
+Infusion 1.0 example code before using the Uploader with an existing integration. 
+http://wiki.fluidproject.org/display/fluid/Uploader+API
+
+--------------------------------------
+
+KNOWN ISSUES: 
+
+* To support Flash 10 (released on 9/26/2008), the Uploader required a new version of the SWFUpload 
+  Flash component (2.2.0 beta 3). This new version, still in beta, still has numerous bugs. We have 
+  worked around many of the bugs and inconsistencies in the SWFUpload code, but there are still 
+  significant compromises and issues in this release. For this reason we do not consider this version 
+  of the Uploader to be production-ready. 
+
+  In the previous version of the Uploader, the Flash component worked completely "behind the scenes". 
+  To support Flash 10, the Uploader displays a Flash-based "Browse files..." button in place of a 
+  HTML button. The Flash-based button presents the following quirks:
+  
+      In Firefox and IE, the Flash-based Browse button does not size correctly when the text/page 
+      is resized or zoomed.
+
+      In Firefox (FF):
+      - The AIRA role for the Browse button is read correctly as "button" but the text of the button, 
+        "Browse Files", is ignored.
+      - The Flash-based Browse button traps keyboard navigation, refusing to give up focus without a 
+        mouse click. 
+      
+      In Internet Explorer (IE):
+      - AIRA is not supported by Internet Explorer.
+
+    We are exploring work-arounds for most of these issues, and will have a patch out as soon 
+    as possible to fix them.
+
+* In previous versions of the Uploader the upload process would stop immediately at the moment that 
+  the Stop Upload button was clicked.
+   
+  With Infusion 0.8, we wait for the current file to complete or to error before we stop the upload 
+  process. This avoids a serious bug in the SWFUploader where the Upload process could get stuck when 
+  the Upload process as resumed.
+
+
+--------------------------------------
+
+TROUBLE SHOOTING:
+
+* When running the Uploader sample code on a local system without a server, check to make 
+  sure that you have followed the instructions below under "RUNNING THE UPLOADER ON A 
+  LOCAL SYSTEM WITHOUT A SERVER". 
+
+* If you see this error in your console: 
+  [Exception... "'Invalid function name' when calling method: [nsIDOMEventListener::handleEvent]" 
+  nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]
+
+  The flashUrl option is probably wrong. Check that first. 
+
+
+--------------------------------------
+
+RUNNING THE UPLOADER ON A LOCAL SYSTEM WITHOUT A SERVER
+
+Running the Uploader locally without a server is intended for basic testing purposes only. The 
+DemoUploadManager provides a simulated conversation with the server, but it doesn't represent a
+fully accurate picture of the component's behaviour when used in a real deployment environment.
+
+So see the Uploader in action with a real server, have a look at Fluid's Image Gallery demo:
+
+http://build.fluidproject.org:8080/sakai-imagegallery2-web/site/AddImages/
+
+
+Additionally, you may need to modify some of your Flash settings to allow the local SWFUpload 
+object to access your file system. To do so, follow these directions:
+
+1. Open your browser
+2. Browse to:
+   http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
+3. In the Flash Settings panel, click "Edit locations..."
+4. Select "Add location..."
+5. Click "Browse for folder..."
+6. Select the local /src/webapp/lib/swfupload/flash/ directory that contains the swfupload.swf file
+7. Restart your browser
+
+You should be good to go! 
+
+However, if you move your installation, you'll need to do this all over again. There are settings 
+that will allow the file to be run from any location on your local machine but these instructions 
+are the minimum settings and therefor pose the least security risk.
+
+These settings are global and do not need to repeated for every browser on a given system. 
diff --git a/docs/include/jscripts/infusion_old/components/uploader/css/Uploader.css b/docs/include/jscripts/infusion_old/components/uploader/css/Uploader.css
new file mode 100644 (file)
index 0000000..d66650a
--- /dev/null
@@ -0,0 +1,76 @@
+.fl-uploader{width:500px;position:relative;display:block;clear:both;padding:1em 2em;}
+.fl-uploader-manually-degrade,.fl-uploader-manually-enhance{display:block;width:434px;clear:both;float:none;text-align:center;padding:1em;}
+.fl-ProgEnhance-basic div input{margin-top:.6em;}
+.fl-ProgEnhance-enhanced{display:none;}
+.fl-progEnhance-basic div input{margin-top:.6em;}
+.fl-progEnhance-enhanced{display:none;}
+.fl-uploader td,.fl-uploader th{border:none;}
+.fl-uploader table{border-collapse:separate;margin:0;}
+.fl-uploader form{height:auto!important;}
+.fl-uploader button{background-color:#4F99D3;border-color:#2A3990;border-width:1px;border-style:solid;font-weight:bolder;font-size:1.06em;color:#FFF;height:32px;padding-left:2em;padding-right:2em;margin-right:1em;outline:none;cursor:pointer;}
+.fl-uploader button:focus,.fl-uploader button.focus{outline:2px solid #142B8C;}
+.fl-uploader button:hover{background-color:#115F8F;}
+.fl-uploader button.fl-uploader-button-default{background-color:#74B74A;border-color:#006838;}
+.fl-uploader button.fl-uploader-button-default:hover{background-color:#519325;border-color:#142B8C;}
+.fl-uploader button.fl-uploader-button-cancel{background-color:#D03E4F;border-color:#BF1E2D;}
+.fl-uploader button.fl-uploader-button-cancel:hover{background-color:#9E182B;border-color:#142B8C;}
+.fl-uploader button.fl-uploader-dim{background-color:#999;border-color:#666;}
+.fl-uploader button.fl-uploader-dim:hover{background-color:#999;border-color:#666;}
+.fl-uploader button span.text-description{display:none;}
+.fl-uploader a.fl-uploader-browse{background-image:url(../images/add.png);background-attachment:scroll;background-repeat:no-repeat;background-position:5px center;padding:4px 7px 4px 26px;border:none;white-space:nowrap;color:#427ABE;font-weight:normal;cursor:pointer;}
+html>body .fl-uploader a.fl-uploader-browse{padding:3px 6px 3px 25px;border:1px solid transparent;}
+.fl-uploader a.fl-uploader-browse:hover{border:1px solid #CCC;background-color:#FFF;}
+.fl-uploader a.fl-uploader-browse:focus,.fl-uploader a.fl-uploader-browse.focus{outline:2px solid #142B8C;background-color:#FFF;}
+.fl-uploader .fl-uploader-browse-overlay{position:absolute;z-index:1;}
+.fl-uploader-queue-wrapper caption{display:none;}
+.fl-uploader-queue-header{background-color:transparent;color:#666;}
+.fl-uploader-queue-header th{text-align:left;font-size:.94em;font-weight:normal;padding:6px;}
+.fl-uploader-queue-footer{position:relative;background-color:#E6E6E6;border:1px solid #999;}
+.fl-uploader-queue-footer table{width:100%;position:relative;z-index:6;}
+.fl-uploader-queue-footer td{padding:8px 6px;vertical-align:middle;font-size:1.07em;font-weight:bolder;color:#666;}
+.fl-uploader-footer-buttons{text-align:right;}
+.fl-scroller{display:block;position:relative;background-color:white;overflow:auto;overflow-x:hidden;overflow-y:auto;border-width:1px 1px 0;border-style:solid;border-color:#999;}
+.fl-scroller .fl-scroller-inner{position:relative;overflow:hidden;}
+.fl-uploader-queue{position:relative;font-size:.9em;color:#333;z-index:6;}
+html>body .fl-uploader-queue{width:100%;}
+.fl-uploader-queue:focus{border:1px solid #142B8C;}
+.fl-uploader-queue tr:focus,.fl-uploader-queue tr.fl-uploader-file-focus{background-color:#FFF9DC;}
+.fl-uploader-queue tr{background-color:transparent;}
+.fl-uploader-queue tr.fl-uploader-file-state-ready:hover,.fl-uploader-queue tr.fl-uploader-file-hover{background-color:#FFF9DC;}
+.fl-uploader-queue tr.fl-uploader-dim{color:#666;}
+.fl-uploader-queue td,.fl-uploader-queue th{text-align:left;padding:3px 6px;border-bottom:1px solid #BBCFDC;}
+.fl-uploader-queue-wrapper .fl-uploader-file-name{width:322px;overflow:hidden;}
+.fl-uploader-queue-wrapper .fl-uploader-file-size{text-align:right;width:4em;white-space:nowrap;}
+.fl-uploader-queue .fl-uploader-file-action{border:1px solid transparent;height:20px;width:20px;overflow:hidden;background-color:transparent;background-attachment:scroll;background-repeat:no-repeat;background-position:1px 1px;outline:0;padding:0;margin:0;outline:none;}
+.fl-uploader-queue .fl-uploader-file-action:hover{border:1px solid transparent;background-color:transparent;cursor:auto;}
+.fl-uploader-queue .fl-uploader-file-actions .fl-uploader-dim{border:1px solid transparent;background-color:transparent;cursor:auto;}
+.fl-uploader-queue .fl-uploader-file-action-remove{background-image:url(../images/remove.png);cursor:pointer!important;}
+.fl-uploader-queue .fl-uploader-file-action-remove:hover,.fl-uploader-queue tr.fl-uploader-file-state-ready:focus .fl-uploader-file-action-remove,.fl-uploader-queue tr.focus .fl-uploader-file-action-remove{border:1px solid #CCC;background-color:#FFF;}
+.fl-uploader-queue .fl-uploader-file-action-remove:focus,.fl-uploader-queue .fl-uploader-file-action-remove.focus{background-color:#4F99D3;outline:none;}
+.fl-uploader-queue .fl-uploader-file-state-uploaded th,.fl-uploader-queue tr.fl-uploader-file-state-uploaded th,.fl-uploader-queue tr.focus th{border-left:4px solid #74B74A;color:#5E7A5E;}
+.fl-uploader-queue .fl-uploader-file-state-uploaded td{color:#5E7A5E;}
+.fl-uploader-queue .fl-uploader-file-state-uploaded .fl-uploader-file-action{background-image:url(../images/tick.png);}
+.fl-uploader-queue .fl-uploader-file-state-error th{border-left:4px solid #F5E392;background-color:#FCFBE6;border-bottom-width:0;}
+.fl-uploader-queue .fl-uploader-file-state-error td{background-color:#FCFBE6;border-bottom-width:0;}
+.fl-uploader-queue .fl-uploader-file-error td{background-color:#FCFBE6;border-left:4px solid #F5E392;background-image:url(../images/error.png);background-position:8px 2px;background-repeat:no-repeat;padding-bottom:8px;padding-left:32px;}
+.fl-uploader-queue-wrapper td.fl-uploader-file-actions,.fl-uploader-queue-wrapper th.fl-uploader-file-actions{white-space:nowrap;text-align:center;}
+.fl-uploader-queue td.fileStatus{white-space:nowrap;}
+.fl-uploader-queue-wrapper .fl-uploader-browse-instructions{background-color:#F0F9FF;color:#666;text-align:center;border-left:1px solid #999;border-right:1px solid #999;padding:6px;}
+.fl-uploader-btns{margin-top:1em;}
+.fl-uploader-btns .fl-uploader-upload,.fl-uploader-btns .fl-uploader-resume,.fl-uploader-btns .fl-uploader-pause{width:8.4em;}
+.fl-uploader-btns .fl-uploader-done,.fl-uploader-btns .fl-uploader-cancel{width:7.6em;}
+.fl-uploader-btns button{float:right;padding:0;}
+button span.fl-uploader-button-text-hidden{display:none;}
+.fl-uploader-disabled,.fl-uploader-dim{cursor:auto;}
+.fl-uploader-disabled{background-color:#CCC!important;border-color:#999!important;}
+.fl-uploader-dim{opacity:.4;filter:alpha(opacity=40);}
+.fl-uploader-hidden{display:none;}
+.fl-uploader-hidden-templates{display:none;}
+.fl-uploader-file-progress,.fl-uploader-total-progress-okay,.fl-uploader-total-progress-errored{position:absolute;display:none;background-attachment:scroll;background-position:bottom left;background-repeat:repeat-x;overflow:hidden;left:0;z-index:4;}
+.fl-uploader-file-progress{background-image:url('../images/gradient-file-green.png');background-color:#D1D6DD;border-right:1px solid #9FCE7F;width:76%;}
+.fl-uploader-file-progress .fl-uploader-file-progress-text{display:none;}
+.fl-uploader-total-progress-okay,.fl-uploader-total-progress-errored{top:0;height:100%;width:76%;}
+.fl-uploader-total-progress-okay{background-image:url('../images/gradient-total-green.png');border-right:1px solid #9FCE7F;background-color:#BDBFC1;}
+.fl-uploader-total-progress-errored{background-image:url('../images/gradient-total-yellow.png');border-right:1px solid #E8C81C;background-color:#F6ECA0;}
+.fl-uploader-flash9-container{overflow:hidden;width:1px;height:1px;}
+.hideUploaderForOpera{visibility:hidden;overflow:hidden;height:0;width:0;padding:0;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/uploader/html/Uploader.html b/docs/include/jscripts/infusion_old/components/uploader/html/Uploader.html
new file mode 100644 (file)
index 0000000..af70ce2
--- /dev/null
@@ -0,0 +1,127 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+        <title>Uploader Template</title>
+  
+        <link href="../../../framework/fss/css/fss-reset.css" rel="stylesheet" type="text/css" />
+        <link href="../../../framework/fss/css/fss-layout.css" rel="stylesheet" type="text/css" />
+        <link href="../css/Uploader.css" rel="stylesheet" type="text/css" />
+        
+        <!-- Fluid and jQuery Dependencies -->
+        <script src="../../../lib/jquery/core/js/jquery.js" type="text/javascript"></script>
+        <script src="../../../lib/jquery/ui/js/ui.core.js" type="text/javascript"></script>
+        <script src="../../../framework/core/js/jquery.keyboard-a11y.js" type="text/javascript"></script>
+        <script src="../../../lib/swfobject/js/swfobject.js" type="text/javascript"></script>
+        <script src="../../../lib/swfupload/js/swfupload.js" type="text/javascript"></script>
+        <script src="../../../framework/core/js/Fluid.js" type="text/javascript"></script>
+        <script src="../../../framework/core/js/ProgressiveEnhancement.js" type="text/javascript"></script>
+        
+        <!-- Uploader dependencies; these will be merged into a new Uploader.js at the end -->
+        <script src="../js/FileQueue.js" type="text/javascript"></script>
+        <script src="../js/DemoUploadManager.js" type="text/javascript"></script>
+        <script src="../js/SWFUploadManager.js" type="text/javascript"></script>
+        <script src="../js/Scroller.js" type="text/javascript"></script>
+        <script src="../../progress/js/Progress.js" type="text/javascript"></script>
+        <script src="../js/Uploader.js" type="text/javascript"></script>
+    </head>
+    
+    <body>
+        <div id="uploader-contents">
+            
+            <!-- This form will be progressively enhanced by the Fluid Uploader component. -->
+            <form method="post" enctype="multipart/form-data" class="fl-uploader fl-progEnhance-basic">
+                <p>Browse to upload a file.</p>
+                <input name="fileData" type="file" />
+                <div><input type="submit" value="Save"/></div>
+            </form>
+            
+            <!-- This is the markup for the Fluid Uploader component itself. -->
+            <form class="flc-uploader fl-uploader fl-progEnhance-enhanced" 
+                  method="get" 
+                  enctype="multipart/form-data">
+                      
+                <!-- The file queue -->
+                <div class="fl-uploader-queue-wrapper">
+                    
+                    <!-- Top of the queue -->
+                    <div class="fl-uploader-queue-header">
+                        <table cellspacing="0" cellpadding="0" summary="Headers for the file queue.">
+                            <caption>File Upload Queue:</caption>
+
+                                <tr>
+                                    <th scope="col" class="fl-uploader-file-name">File Name</th>
+                                    <th scope="col" class="fl-uploader-file-size">Size&nbsp;&nbsp;</th>
+                                    <th scope="col" class="fl-uploader-file-actions">&nbsp;</th>
+                                </tr>
+
+                        </table>
+                    </div>
+                    
+                    <!-- Scrollable view -->
+                    <div class="flc-scroller fl-scroller">
+                        <div class="fl-scroller-inner">
+                            <table cellspacing="0" class="flc-uploader-queue fl-uploader-queue" summary="Queue of files to upload.">
+                                <tbody>
+                                    <!-- Rows will be rendered in here. -->
+                                    
+                                    <!-- Template markup for the file queue rows -->
+                                    <tr class="flc-uploader-file-tmplt flc-uploader-file fl-uploader-hidden-templates">
+                                        <th class="flc-uploader-file-name fl-uploader-file-name" scope="row">File Name Placeholder</th>
+                                        <td class="flc-uploader-file-size fl-uploader-file-size">0 KB</td>
+                                        <td class="fl-uploader-file-actions">
+                                            <button type="button" class="flc-uploader-file-action fl-uploader-file-action" title="Remove File" tabindex="-1">
+                                                <span class="fl-uploader-button-text fl-uploader-hidden">Remove file from queue</span>
+                                            </button>
+                                        </td>
+                                    </tr>
+                                    
+                                    <!-- Template for the file error info rows -->
+                                    <tr class="flc-uploader-file-error-tmplt fl-uploader-file-error fl-uploader-hidden-templates">
+                                        <td colspan="3" class="flc-uploader-file-error"></td>
+                                    </tr>
+                                </tbody>
+                            </table>
+                            <div class="flc-uploader-file-progressor-tmplt fl-uploader-file-progress"><span class="fl-uploader-file-progress-text fl-uploader-hidden">76%</span></div>
+                        </div>
+                    </div>
+                    
+                    <div class="flc-uploader-browse-instructions fl-uploader-browse-instructions">
+                        Choose <em>Browse files</em> to add files to the queue 
+                    </div>
+        
+                    <!-- Foot of the queue -->
+                    <div class="flc-uploader-queue-footer fl-uploader-queue-footer">
+                        <table cellspacing="0" cellpadding="0" summary="Status of file queue.">
+
+                                <tr>
+                                    <td class="flc-uploader-total-progress-text">
+                                        Total: <span class="fl-uploader-totalFiles">0</span> files 
+                                        (<span class="fl-uploader-totalBytes">0 KB</span>)
+                                    </td>
+                                    <td class=".fl-uploader-footer-buttons" align="right" >
+                                        <a href="#" class="flc-uploader-button-browse fl-uploader-browse">Browse files</a>
+                                    </td>
+                                </tr>
+
+                        </table>
+                        <div class="flc-uploader-total-progress fl-uploader-total-progress-okay">&nbsp;</div>
+                    </div>
+                </div>
+                
+                <!-- Action buttons -->
+                <div class="fl-uploader-btns">
+                    <button type="button" class="flc-uploader-button-pause fl-uploader-pause fl-uploader-hidden">Stop Upload</button><button type="button" class="flc-uploader-button-upload fl-uploader-upload fl-uploader-button-default fl-uploader-dim" disabled="disabled">Upload</button>
+                </div>
+            </form>
+        
+        </div>
+            
+        <script type="text/javascript">
+            var myUploader = fluid.progressiveEnhanceableUploader(".flc-uploader", ".fl-progEnhance-basic", {
+                demo: true,
+                uploadManager: "fluid.swfUploadManager"
+            });
+        </script> 
+    </body>
+</html>
diff --git a/docs/include/jscripts/infusion_old/components/uploader/images/add.png b/docs/include/jscripts/infusion_old/components/uploader/images/add.png
new file mode 100644 (file)
index 0000000..6332fef
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uploader/images/add.png differ
diff --git a/docs/include/jscripts/infusion_old/components/uploader/images/browse.png b/docs/include/jscripts/infusion_old/components/uploader/images/browse.png
new file mode 100644 (file)
index 0000000..dd3927c
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uploader/images/browse.png differ
diff --git a/docs/include/jscripts/infusion_old/components/uploader/images/error.png b/docs/include/jscripts/infusion_old/components/uploader/images/error.png
new file mode 100644 (file)
index 0000000..628cf2d
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uploader/images/error.png differ
diff --git a/docs/include/jscripts/infusion_old/components/uploader/images/gradient-file-green.png b/docs/include/jscripts/infusion_old/components/uploader/images/gradient-file-green.png
new file mode 100644 (file)
index 0000000..95374c8
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uploader/images/gradient-file-green.png differ
diff --git a/docs/include/jscripts/infusion_old/components/uploader/images/gradient-file-grey.png b/docs/include/jscripts/infusion_old/components/uploader/images/gradient-file-grey.png
new file mode 100644 (file)
index 0000000..7da71fe
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uploader/images/gradient-file-grey.png differ
diff --git a/docs/include/jscripts/infusion_old/components/uploader/images/gradient-total-green.png b/docs/include/jscripts/infusion_old/components/uploader/images/gradient-total-green.png
new file mode 100644 (file)
index 0000000..cc999e5
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uploader/images/gradient-total-green.png differ
diff --git a/docs/include/jscripts/infusion_old/components/uploader/images/gradient-total-grey.png b/docs/include/jscripts/infusion_old/components/uploader/images/gradient-total-grey.png
new file mode 100644 (file)
index 0000000..0246eca
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uploader/images/gradient-total-grey.png differ
diff --git a/docs/include/jscripts/infusion_old/components/uploader/images/gradient-total-yellow.png b/docs/include/jscripts/infusion_old/components/uploader/images/gradient-total-yellow.png
new file mode 100644 (file)
index 0000000..98a4db6
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uploader/images/gradient-total-yellow.png differ
diff --git a/docs/include/jscripts/infusion_old/components/uploader/images/remove.png b/docs/include/jscripts/infusion_old/components/uploader/images/remove.png
new file mode 100644 (file)
index 0000000..8409ecf
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uploader/images/remove.png differ
diff --git a/docs/include/jscripts/infusion_old/components/uploader/images/tick.png b/docs/include/jscripts/infusion_old/components/uploader/images/tick.png
new file mode 100644 (file)
index 0000000..a9925a0
Binary files /dev/null and b/docs/include/jscripts/infusion_old/components/uploader/images/tick.png differ
diff --git a/docs/include/jscripts/infusion_old/components/uploader/js/DemoUploadManager.js b/docs/include/jscripts/infusion_old/components/uploader/js/DemoUploadManager.js
new file mode 100644 (file)
index 0000000..d9020ba
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var updateProgress=function(file,events,demoState,isUploading){if(!isUploading){return }var chunk=Math.min(demoState.chunkSize,file.size);demoState.bytesUploaded=Math.min(demoState.bytesUploaded+chunk,file.size);events.onFileProgress.fire(file,demoState.bytesUploaded,file.size)};var fireAfterFileComplete=function(that,file){if(that.swfUploadSettings){that.swfUploadSettings.upload_complete_handler(file)}else{that.events.afterFileComplete.fire(file)}};var finishAndContinueOrCleanup=function(that,file){that.queueManager.finishFile(file);if(that.queueManager.shouldUploadNextFile()){startUploading(that)}else{that.queueManager.complete()}};var finishUploading=function(that){if(!that.queue.isUploading){return }var file=that.demoState.currentFile;file.filestatus=fluid.uploader.fileStatusConstants.COMPLETE;that.events.onFileSuccess.fire(file);that.demoState.fileIdx++;finishAndContinueOrCleanup(that,file)};var simulateUpload=function(that){if(!that.queue.isUploading){return }var file=that.demoState.currentFile;if(that.demoState.bytesUploaded<file.size){that.invokeAfterRandomDelay(function(){updateProgress(file,that.events,that.demoState,that.queue.isUploading);simulateUpload(that)})}else{finishUploading(that)}};var startUploading=function(that){that.demoState.currentFile=that.queue.files[that.demoState.fileIdx];that.demoState.chunksForCurrentFile=Math.ceil(that.demoState.currentFile/that.demoState.chunkSize);that.demoState.bytesUploaded=0;that.queue.isUploading=true;that.events.onFileStart.fire(that.demoState.currentFile);that.demoState.currentFile.filestatus=fluid.uploader.fileStatusConstants.IN_PROGRESS;simulateUpload(that)};var stopDemo=function(that){var file=that.demoState.currentFile;file.filestatus=fluid.uploader.fileStatusConstants.CANCELLED;that.queue.shouldStop=true;that.events.onFileError.fire(file,fluid.uploader.errorConstants.UPLOAD_STOPPED,"The demo upload was paused by the user.");finishAndContinueOrCleanup(that,file);that.events.onUploadStop.fire()};var setupDemoUploadManager=function(that){if(that.options.simulateDelay===undefined||that.options.simulateDelay===null){that.options.simulateDelay=true}that.demoState={fileIdx:0,chunkSize:200000};return that};fluid.demoUploadManager=function(uploadManager){var that=uploadManager;that.start=function(){that.queueManager.start();startUploading(that)};that.stop=function(){stopDemo(that)};that.invokeAfterRandomDelay=function(fn){var delay;if(that.options.simulateDelay){delay=Math.floor(Math.random()*1000+100);setTimeout(fn,delay)}else{fn()}};setupDemoUploadManager(that);return that}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/uploader/js/FileQueue.js b/docs/include/jscripts/infusion_old/components/uploader/js/FileQueue.js
new file mode 100644 (file)
index 0000000..f91ea08
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var filterFiles=function(files,filterFn){var filteredFiles=[];for(var i=0;i<files.length;i++){var file=files[i];if(filterFn(file)===true){filteredFiles.push(file)}}return filteredFiles};var getUploadedFiles=function(that){return filterFiles(that.files,function(file){return(file.filestatus===fluid.uploader.fileStatusConstants.COMPLETE)})};var getReadyFiles=function(that){return filterFiles(that.files,function(file){return(file.filestatus===fluid.uploader.fileStatusConstants.QUEUED||file.filestatus===fluid.uploader.fileStatusConstants.CANCELLED)})};var getErroredFiles=function(that){return filterFiles(that.files,function(file){return(file.filestatus===fluid.uploader.fileStatusConstants.ERROR)})};var removeFile=function(that,file){var idx=$.inArray(file,that.files);that.files.splice(idx,1)};var clearCurrentBatch=function(that){that.currentBatch={fileIdx:-1,files:[],totalBytes:0,numFilesCompleted:0,numFilesErrored:0,bytesUploadedForFile:0,previousBytesUploadedForFile:0,totalBytesUploaded:0}};var updateCurrentBatch=function(that){var readyFiles=that.getReadyFiles();that.currentBatch.files=readyFiles;that.currentBatch.totalBytes=fluid.fileQueue.sizeOfFiles(readyFiles)};var setupCurrentBatch=function(that){clearCurrentBatch(that);updateCurrentBatch(that)};fluid.fileQueue=function(){var that={};that.files=[];that.isUploading=false;that.addFile=function(file){that.files.push(file)};that.removeFile=function(file){removeFile(that,file)};that.totalBytes=function(){return fluid.fileQueue.sizeOfFiles(that.files)};that.getReadyFiles=function(){return getReadyFiles(that)};that.getErroredFiles=function(){return getErroredFiles(that)};that.sizeOfReadyFiles=function(){return fluid.fileQueue.sizeOfFiles(that.getReadyFiles())};that.getUploadedFiles=function(){return getUploadedFiles(that)};that.sizeOfUploadedFiles=function(){return fluid.fileQueue.sizeOfFiles(that.getUploadedFiles())};that.setupCurrentBatch=function(){setupCurrentBatch(that)};that.clearCurrentBatch=function(){clearCurrentBatch(that)};that.updateCurrentBatch=function(){updateCurrentBatch(that)};return that};fluid.fileQueue.sizeOfFiles=function(files){var totalBytes=0;for(var i=0;i<files.length;i++){var file=files[i];totalBytes+=file.size}return totalBytes};fluid.fileQueue.manager=function(queue,events){var that={};that.queue=queue;that.events=events;that.start=function(){that.queue.setupCurrentBatch();that.queue.isUploading=true;that.queue.shouldStop=false;that.events.onUploadStart.fire(that.queue.currentBatch.files)};that.startFile=function(){that.queue.currentBatch.fileIdx++;that.queue.currentBatch.bytesUploadedForFile=0;that.queue.currentBatch.previousBytesUploadedForFile=0};that.finishFile=function(file){var batch=that.queue.currentBatch;batch.numFilesCompleted++;that.events.afterFileComplete.fire(file)};that.shouldUploadNextFile=function(){return !that.queue.shouldStop&&that.queue.isUploading&&that.queue.currentBatch.numFilesCompleted<that.queue.currentBatch.files.length};that.complete=function(){that.events.afterUploadComplete.fire(that.queue.currentBatch.files);that.queue.clearCurrentBatch()};return that}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/uploader/js/SWFUploadManager.js b/docs/include/jscripts/infusion_old/components/uploader/js/SWFUploadManager.js
new file mode 100644 (file)
index 0000000..81c272d
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var unbindSelectFiles=function(){var emptyFunction=function(){};SWFUpload.prototype.selectFile=emptyFunction;SWFUpload.prototype.selectFiles=emptyFunction};var prepareUpstreamOptions=function(that,uploader){that.returnedOptions={uploadManager:{type:uploader.options.uploadManager.type||uploader.options.uploadManager}}};var createAfterReadyHandler=function(that,uploader){return function(){var flashMovie=$("#"+uploader.uploadManager.swfUploader.movieName,uploader.container);var browseButton=uploader.locate("browseButton");fluid.tabindex(flashMovie,0);flashMovie.attr("role","button");flashMovie.attr("alt","Browse files button");if(that.isTransparent){flashMovie.addClass(that.options.styles.browseButtonOverlay);flashMovie.css("top",browseButton.position().top);flashMovie.css("left",browseButton.position().left)}}};var createFlash9MovieContainer=function(){var container=$("<div class='fl-uploader-flash9-container'></div>");var placeholder=$("<span></span>");var placeholderId=fluid.allocateSimpleId(placeholder);container.append(placeholder);$("body").append(container);return placeholderId};var setupForFlash9=function(that,uploader){that.returnedOptions.uploadManager.options={flashURL:that.options.flash9URL||undefined,flashButtonPeerId:createFlash9MovieContainer()}};var createEmptyPlaceholder=function(){var placeholder=$("<span></span>");fluid.allocateSimpleId(placeholder);return placeholder};var createButtonPlaceholder=function(browseButton){var placeholder=$("<span></span>");var placeholderId=fluid.allocateSimpleId(placeholder);browseButton.before(placeholder);unbindSelectFiles();return placeholderId};var setupForFlash10=function(that,uploader){var browseButton=uploader.locate("browseButton");fluid.tabindex(browseButton,-1);that.isTransparent=that.options.flashButtonAlwaysVisible?false:(!$.browser.msie||that.options.transparentEvenInIE);var peerId=that.isTransparent?createButtonPlaceholder(browseButton):fluid.allocateSimpleId(browseButton);that.returnedOptions.uploadManager.options={flashURL:that.options.flash10URL||undefined,flashButtonImageURL:that.isTransparent?undefined:that.options.flashButtonImageURL,flashButtonPeerId:peerId,flashButtonHeight:that.isTransparent?browseButton.outerHeight():that.options.flashButtonHeight,flashButtonWidth:that.isTransparent?browseButton.outerWidth():that.options.flashButtonWidth,flashButtonWindowMode:that.isTransparent?SWFUpload.WINDOW_MODE.TRANSPARENT:SWFUpload.WINDOW_MODE.OPAQUE,flashButtonCursorEffect:SWFUpload.CURSOR.HAND,listeners:{afterReady:createAfterReadyHandler(that,uploader),onUploadStart:function(){uploader.uploadManager.swfUploader.setButtonDisabled(true)},afterUploadComplete:function(){uploader.uploadManager.swfUploader.setButtonDisabled(false)}}}};fluid.swfUploadSetupDecorator=function(uploader,options){var that={};fluid.mergeComponentOptions(that,"fluid.swfUploadSetupDecorator",options);that.flashVersion=swfobject.getFlashPlayerVersion().major;prepareUpstreamOptions(that,uploader);if(that.flashVersion===9){setupForFlash9(that,uploader)}else{setupForFlash10(that,uploader)}return that};fluid.defaults("fluid.swfUploadSetupDecorator",{flashButtonAlwaysVisible:true,transparentEvenInIE:false,flashButtonImageURL:"../images/browse.png",flashButtonHeight:22,flashButtonWidth:106,styles:{browseButtonOverlay:"fl-uploader-browse-overlay"}});var swfUploadOptionsMap={uploadURL:"upload_url",flashURL:"flash_url",postParams:"post_params",fileSizeLimit:"file_size_limit",fileTypes:"file_types",fileTypesDescription:"file_types_description",fileUploadLimit:"file_upload_limit",fileQueueLimit:"file_queue_limit",flashButtonPeerId:"button_placeholder_id",flashButtonImageURL:"button_image_url",flashButtonHeight:"button_height",flashButtonWidth:"button_width",flashButtonWindowMode:"button_window_mode",flashButtonCursorEffect:"button_cursor",debug:"debug"};var swfUploadEventMap={afterReady:"swfupload_loaded_handler",onFileDialog:"file_dialog_start_handler",afterFileQueued:"file_queued_handler",onQueueError:"file_queue_error_handler",afterFileDialog:"file_dialog_complete_handler",onFileStart:"upload_start_handler",onFileProgress:"upload_progress_handler",onFileError:"upload_error_handler",onFileSuccess:"upload_success_handler"};var mapNames=function(nameMap,source,target){var result=target||{};for(var key in source){var mappedKey=nameMap[key];if(mappedKey){result[mappedKey]=source[key]}}return result};var mapEvents=function(that,nameMap,target){var result=target||{};for(var eventType in that.events){var fireFn=that.events[eventType].fire;var mappedName=nameMap[eventType];if(mappedName){result[mappedName]=fireFn}}result.upload_complete_handler=function(file){that.queueManager.finishFile(file);if(that.queueManager.shouldUploadNextFile()){that.swfUploader.startUpload()}else{if(that.queueManager.queue.shouldStop){that.swfUploader.stopUpload()}that.queueManager.complete()}};return result};var browse=function(that){if(that.queue.isUploading){return }if(that.options.fileQueueLimit===1){that.swfUploader.selectFile()}else{that.swfUploader.selectFiles()}};var stopUpload=function(that){that.queue.shouldStop=true;that.events.onUploadStop.fire()};var bindEvents=function(that){var fileStatusUpdater=function(file){fluid.find(that.queue.files,function(potentialMatch){if(potentialMatch.id===file.id){potentialMatch.filestatus=file.filestatus;return true}})};that.events.afterFileQueued.addListener(function(file){that.queue.addFile(file)});that.events.onFileStart.addListener(function(file){that.queueManager.startFile();fileStatusUpdater(file)});that.events.onFileProgress.addListener(function(file,currentBytes,totalBytes){var currentBatch=that.queue.currentBatch;var byteIncrement=currentBytes-currentBatch.previousBytesUploadedForFile;currentBatch.totalBytesUploaded+=byteIncrement;currentBatch.bytesUploadedForFile+=byteIncrement;currentBatch.previousBytesUploadedForFile=currentBytes;fileStatusUpdater(file)});that.events.onFileError.addListener(function(file,error){if(error===fluid.uploader.errorConstants.UPLOAD_STOPPED){that.queue.isUploading=false}else{if(that.queue.isUploading){that.queue.currentBatch.totalBytesUploaded+=file.size;that.queue.currentBatch.numFilesErrored++}}fileStatusUpdater(file)});that.events.onFileSuccess.addListener(function(file){if(that.queue.currentBatch.bytesUploadedForFile===0){that.queue.currentBatch.totalBytesUploaded+=file.size}fileStatusUpdater(file)});that.events.afterUploadComplete.addListener(function(){that.queue.isUploading=false})};var removeFile=function(that,file){that.queue.removeFile(file);that.swfUploader.cancelUpload(file.id);that.events.afterFileRemoved.fire(file)};var setupSwfUploadManager=function(that,events){that.events=events;that.queue=fluid.fileQueue();that.queueManager=fluid.fileQueue.manager(that.queue,that.events);that.swfUploadSettings=mapNames(swfUploadOptionsMap,that.options);mapEvents(that,swfUploadEventMap,that.swfUploadSettings);that.swfUploader=new SWFUpload(that.swfUploadSettings);bindEvents(that)};fluid.swfUploadManager=function(events,options){var that={};fluid.mergeComponentOptions(that,"fluid.swfUploadManager",options);fluid.mergeListeners(events,that.options.listeners);that.browseForFiles=function(){browse(that)};that.removeFile=function(file){removeFile(that,file)};that.start=function(){that.queueManager.start();that.swfUploader.startUpload()};that.stop=function(){stopUpload(that)};setupSwfUploadManager(that,events);return that};fluid.defaults("fluid.swfUploadManager",{uploadURL:"",flashURL:"../../../lib/swfupload/flash/swfupload.swf",flashButtonPeerId:"",postParams:{},fileSizeLimit:"20480",fileTypes:"*",fileTypesDescription:null,fileUploadLimit:0,fileQueueLimit:0,debug:false})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/uploader/js/Scroller.js b/docs/include/jscripts/infusion_old/components/uploader/js/Scroller.js
new file mode 100644 (file)
index 0000000..156a473
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var refreshView=function(that){var maxHeight=that.options.maxHeight;var isOverMaxHeight=(that.scrollingElm.children().eq(0).height()>maxHeight);var setHeight=(isOverMaxHeight)?maxHeight:"";that.scrollingElm.height(setHeight)};var scrollBottom=function(that){that.scrollingElm[0].scrollTop=that.scrollingElm[0].scrollHeight};var scrollTo=function(that,element){if(!element||element.length<1){return }var padTop=0;var padBottom=0;var elmPosTop=element[0].offsetTop;var elmHeight=element.height();var containerScrollTop=that.scrollingElm[0].scrollTop;var containerHeight=that.scrollingElm.height();if(that.options.padScroll){var prevElmHeight=element.prev().height();padTop=(prevElmHeight+elmHeight<=containerHeight)?prevElmHeight:0;var nextElmHeight=element.next().height();padBottom=(nextElmHeight+elmHeight<=containerHeight)?nextElmHeight:0}if((elmPosTop-padTop)<containerScrollTop){that.scrollingElm[0].scrollTop=elmPosTop-padTop}if(((elmPosTop+elmHeight)+padBottom)>(containerScrollTop+containerHeight)){elmHeight=(elmHeight<containerHeight)?elmHeight:containerHeight;that.scrollingElm[0].scrollTop=(elmPosTop-containerHeight+elmHeight+padBottom)}};var setupScroller=function(that){that.scrollingElm=that.container.parents(that.options.selectors.wrapper);if(!that.scrollingElm.length){fluid.fail({name:"Missing Scroller",message:"The scroller wrapper element was not found."})}if(!$.browser.msie||$.browser.version>6){that.scrollingElm.css("max-height",that.options.maxHeight)}};fluid.scroller=function(container,options){var that=fluid.initView("fluid.scroller",container,options);setupScroller(that);that.scrollTo=function(element){scrollTo(that,element)};that.scrollBottom=function(){scrollBottom(that)};that.refreshView=function(){if($.browser.msie&&$.browser.version<7){refreshView(that)}};that.refreshView();return that};fluid.defaults("fluid.scroller",{selectors:{wrapper:".flc-scroller"},maxHeight:180,padScroll:true})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/components/uploader/js/Uploader.js b/docs/include/jscripts/infusion_old/components/uploader/js/Uploader.js
new file mode 100644 (file)
index 0000000..640f2b1
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var rowForFile=function(that,file){return that.locate("fileQueue").find("#"+file.id)};var errorRowForFile=function(that,file){return $("#"+file.id+"_error",that.container)};var fileForRow=function(that,row){var files=that.uploadManager.queue.files;for(var i=0;i<files.length;i++){var file=files[i];if(file.id.toString()===row.attr("id")){return file}}return null};var progressorForFile=function(that,file){var progressId=file.id+"_progress";return that.fileProgressors[progressId]};var startFileProgress=function(that,file){var fileRowElm=rowForFile(that,file);that.scroller.scrollTo(fileRowElm);var fileProgressor=progressorForFile(that,file);fileProgressor.refreshView();fileProgressor.show()};var updateFileProgress=function(that,file,fileBytesComplete,fileTotalBytes){var filePercent=fluid.uploader.derivePercent(fileBytesComplete,fileTotalBytes);var filePercentStr=filePercent+"%";progressorForFile(that,file).update(filePercent,filePercentStr)};var hideFileProgress=function(that,file){var fileRowElm=rowForFile(that,file);progressorForFile(that,file).hide();if(file.filestatus===fluid.uploader.fileStatusConstants.COMPLETE){that.locate("fileIconBtn",fileRowElm).removeClass(that.options.styles.dim)}};var removeFileProgress=function(that,file){var fileProgressor=progressorForFile(that,file);if(!fileProgressor){return }var rowProgressor=fileProgressor.displayElement;rowProgressor.remove()};var animateRowRemoval=function(that,row){row.fadeOut("fast",function(){row.remove();that.refreshView()})};var removeFileErrorRow=function(that,file){if(file.filestatus===fluid.uploader.fileStatusConstants.ERROR){animateRowRemoval(that,errorRowForFile(that,file))}};var removeFileAndRow=function(that,file,row){removeFileProgress(that,file);removeFileErrorRow(that,file);that.uploadManager.removeFile(file);animateRowRemoval(that,row)};var removeFileForRow=function(that,row){var file=fileForRow(that,row);if(!file||file.filestatus===fluid.uploader.fileStatusConstants.COMPLETE){return }removeFileAndRow(that,file,row)};var removeRowForFile=function(that,file){var row=rowForFile(that,file);removeFileAndRow(that,file,row)};var bindHover=function(row,styles){var over=function(){if(row.hasClass(styles.ready)&&!row.hasClass(styles.uploading)){row.addClass(styles.hover)}};var out=function(){if(row.hasClass(styles.ready)&&!row.hasClass(styles.uploading)){row.removeClass(styles.hover)}};row.hover(over,out)};var bindDeleteKey=function(that,row){var deleteHandler=function(){removeFileForRow(that,row)};fluid.activatable(row,null,{additionalBindings:[{key:$.ui.keyCode.DELETE,activateHandler:deleteHandler}]})};var bindRowHandlers=function(that,row){if($.browser.msie&&$.browser.version<7){bindHover(row,that.options.styles)}that.locate("fileIconBtn",row).click(function(){removeFileForRow(that,row)});bindDeleteKey(that,row)};var renderRowFromTemplate=function(that,file){var row=that.rowTemplate.clone();that.locate("fileName",row).text(file.name);that.locate("fileSize",row).text(fluid.uploader.formatFileSize(file.size));that.locate("fileIconBtn",row).addClass(that.options.styles.remove);row.attr("id",file.id);row.addClass(that.options.styles.ready);bindRowHandlers(that,row);return row};var createProgressorFromTemplate=function(that,row){var rowProgressor=that.rowProgressorTemplate.clone();var rowId=row.attr("id");var progressId=rowId+"_progress";rowProgressor.attr("id",progressId);rowProgressor.css("top",row.position().top);rowProgressor.height(row.height()).width(5);that.container.after(rowProgressor);that.fileProgressors[progressId]=fluid.progress(that.uploadContainer,{selectors:{progressBar:"#"+rowId,displayElement:"#"+progressId,label:"#"+progressId+" .fl-uploader-file-progress-text",indicator:"#"+progressId}})};var addFile=function(that,file){var row=renderRowFromTemplate(that,file);if(!($.browser.msie&&($.browser.version>=8))){row.hide()}that.container.append(row);row.fadeIn("slow");that.scroller.scrollBottom();createProgressorFromTemplate(that,row);that.refreshView()};var prepareForUpload=function(that){var rowButtons=that.locate("fileIconBtn",that.locate("fileRows"));rowButtons.attr("disabled","disabled");rowButtons.addClass(that.options.styles.dim)};var refreshAfterUpload=function(that){var rowButtons=that.locate("fileIconBtn",that.locate("fileRows"));rowButtons.removeAttr("disabled");rowButtons.removeClass(that.options.styles.dim)};var changeRowState=function(that,row,newState){row.removeClass(that.options.styles.ready).removeClass(that.options.styles.error).addClass(newState)};var markRowAsComplete=function(that,file){var row=rowForFile(that,file);changeRowState(that,row,that.options.styles.uploaded);row.attr("title",that.options.strings.status.success);fluid.enabled(row,false);var removeRowBtn=that.locate("fileIconBtn",row);removeRowBtn.unbind("click");removeRowBtn.removeClass(that.options.styles.remove);removeRowBtn.attr("title",that.options.strings.status.success)};var renderErrorInfoRowFromTemplate=function(that,fileRow,error){var errorRow=that.errorInfoRowTemplate.clone();errorRow.attr("id",fileRow.attr("id")+"_error");var errorType=fluid.keyForValue(fluid.uploader.errorConstants,error);var errorMsg=that.options.strings.errors[errorType];that.locate("errorText",errorRow).text(errorMsg);fileRow.after(errorRow);that.scroller.scrollTo(errorRow)};var showErrorForFile=function(that,file,error){hideFileProgress(that,file);if(file.filestatus===fluid.uploader.fileStatusConstants.ERROR){var fileRowElm=rowForFile(that,file);changeRowState(that,fileRowElm,that.options.styles.error);renderErrorInfoRowFromTemplate(that,fileRowElm,error)}};var bindModelEvents=function(that){that.returnedOptions={listeners:{afterFileQueued:that.addFile,onUploadStart:that.prepareForUpload,onFileStart:that.showFileProgress,onFileProgress:that.updateFileProgress,onFileSuccess:that.markFileComplete,onFileError:that.showErrorForFile,afterFileComplete:that.hideFileProgress,afterUploadComplete:that.refreshAfterUpload}}};var addKeyboardNavigation=function(that){fluid.tabbable(that.container);that.selectableContext=fluid.selectable(that.container,{selectableSelector:that.options.selectors.fileRows,onSelect:function(itemToSelect){$(itemToSelect).addClass(that.options.styles.selected)},onUnselect:function(selectedItem){$(selectedItem).removeClass(that.options.styles.selected)}})};var prepareTemplateElements=function(that){that.rowTemplate=that.locate("rowTemplate").remove();if($.browser.msie&&($.browser.version>=8)){that.rowTemplate.removeClass(that.options.styles.hiddenTemplate)}that.errorInfoRowTemplate=that.locate("errorInfoRowTemplate").remove();that.errorInfoRowTemplate.removeClass(that.options.styles.hiddenTemplate);that.rowProgressorTemplate=that.locate("rowProgressorTemplate",that.uploadContainer).remove()};var setupFileQueue=function(that,uploadManager){that.uploadManager=uploadManager;that.scroller=fluid.scroller(that.container);prepareTemplateElements(that);addKeyboardNavigation(that);bindModelEvents(that)};fluid.fileQueueView=function(container,parentContainer,uploadManager,options){var that=fluid.initView("fluid.fileQueueView",container,options);that.uploadContainer=parentContainer;that.fileProgressors={};that.addFile=function(file){addFile(that,file)};that.removeFile=function(file){removeRowForFile(that,file)};that.prepareForUpload=function(){prepareForUpload(that)};that.refreshAfterUpload=function(){refreshAfterUpload(that)};that.showFileProgress=function(file){startFileProgress(that,file)};that.updateFileProgress=function(file,fileBytesComplete,fileTotalBytes){updateFileProgress(that,file,fileBytesComplete,fileTotalBytes)};that.markFileComplete=function(file){progressorForFile(that,file).update(100,"100%");markRowAsComplete(that,file)};that.showErrorForFile=function(file,error){showErrorForFile(that,file,error)};that.hideFileProgress=function(file){hideFileProgress(that,file)};that.refreshView=function(){that.scroller.refreshView();that.selectableContext.refresh()};setupFileQueue(that,uploadManager);return that};fluid.defaults("fluid.fileQueueView",{selectors:{fileRows:".flc-uploader-file",fileName:".flc-uploader-file-name",fileSize:".flc-uploader-file-size",fileIconBtn:".flc-uploader-file-action",errorText:".flc-uploader-file-error",rowTemplate:".flc-uploader-file-tmplt",errorInfoRowTemplate:".flc-uploader-file-error-tmplt",rowProgressorTemplate:".flc-uploader-file-progressor-tmplt"},styles:{hover:"fl-uploader-file-hover",selected:"fl-uploader-file-focus",ready:"fl-uploader-file-state-ready",uploading:"fl-uploader-file-state-uploading",uploaded:"fl-uploader-file-state-uploaded",error:"fl-uploader-file-state-error",remove:"fl-uploader-file-action-remove",dim:"fl-uploader-dim",hiddenTemplate:"fl-uploader-hidden-templates"},strings:{progress:{toUploadLabel:"To upload: %fileCount %fileLabel (%totalBytes)",singleFile:"file",pluralFiles:"files"},status:{success:"File Uploaded",error:"File Upload Error"},errors:{HTTP_ERROR:"File upload error: a network error occured or the file was rejected (reason unknown).",IO_ERROR:"File upload error: a network error occured.",UPLOAD_LIMIT_EXCEEDED:"File upload error: you have uploaded as many files as you are allowed during this session",UPLOAD_FAILED:"File upload error: the upload failed for an unknown reason.",QUEUE_LIMIT_EXCEEDED:"You have as many files in the queue as can be added at one time. Removing files from the queue may allow you to add different files.",FILE_EXCEEDS_SIZE_LIMIT:"One or more of the files that you attempted to add to the queue exceeded the limit of %fileSizeLimit.",ZERO_BYTE_FILE:"One or more of the files that you attempted to add contained no data.",INVALID_FILETYPE:"One or more files were not added to the queue because they were of the wrong type."}}})})(jQuery,fluid_1_1);(function($,fluid){var fileOrFiles=function(that,numFiles){return(numFiles===1)?that.options.strings.progress.singleFile:that.options.strings.progress.pluralFiles};var enableElement=function(that,elm){elm.removeAttr("disabled");elm.removeClass(that.options.styles.dim)};var disableElement=function(that,elm){elm.attr("disabled","disabled");elm.addClass(that.options.styles.dim)};var showElement=function(that,elm){elm.removeClass(that.options.styles.hidden)};var hideElement=function(that,elm){elm.addClass(that.options.styles.hidden)};var setTotalProgressStyle=function(that,didError){didError=didError||false;var indicator=that.totalProgress.indicator;indicator.toggleClass(that.options.styles.totalProgress,!didError);indicator.toggleClass(that.options.styles.totalProgressError,didError)};var setStateEmpty=function(that){disableElement(that,that.locate("uploadButton"));if(that.uploadManager.queue.files.length===0){that.locate("browseButton").text(that.options.strings.buttons.browse);showElement(that,that.locate("instructions"))}};var setStateDone=function(that){disableElement(that,that.locate("uploadButton"));enableElement(that,that.locate("browseButton"));hideElement(that,that.locate("pauseButton"));showElement(that,that.locate("uploadButton"))};var setStateLoaded=function(that){that.locate("browseButton").text(that.options.strings.buttons.addMore);hideElement(that,that.locate("pauseButton"));showElement(that,that.locate("uploadButton"));enableElement(that,that.locate("uploadButton"));enableElement(that,that.locate("browseButton"));hideElement(that,that.locate("instructions"));that.totalProgress.hide()};var setStateUploading=function(that){that.totalProgress.hide(false,false);setTotalProgressStyle(that);hideElement(that,that.locate("uploadButton"));disableElement(that,that.locate("browseButton"));enableElement(that,that.locate("pauseButton"));showElement(that,that.locate("pauseButton"));that.locate(that.options.focusWithEvent.afterUploadStart).focus()};var renderUploadTotalMessage=function(that){var numReadyFiles=that.uploadManager.queue.getReadyFiles().length;var bytesReadyFiles=that.uploadManager.queue.sizeOfReadyFiles();var fileLabelStr=fileOrFiles(that,numReadyFiles);var totalStateStr=fluid.stringTemplate(that.options.strings.progress.toUploadLabel,{fileCount:numReadyFiles,fileLabel:fileLabelStr,totalBytes:fluid.uploader.formatFileSize(bytesReadyFiles)});that.locate("totalFileStatusText").html(totalStateStr)};var updateTotalProgress=function(that){var batch=that.uploadManager.queue.currentBatch;var totalPercent=fluid.uploader.derivePercent(batch.totalBytesUploaded,batch.totalBytes);var numFilesInBatch=batch.files.length;var fileLabelStr=fileOrFiles(that,numFilesInBatch);var totalProgressStr=fluid.stringTemplate(that.options.strings.progress.totalProgressLabel,{curFileN:batch.fileIdx+1,totalFilesN:numFilesInBatch,fileLabel:fileLabelStr,currBytes:fluid.uploader.formatFileSize(batch.totalBytesUploaded),totalBytes:fluid.uploader.formatFileSize(batch.totalBytes)});that.totalProgress.update(totalPercent,totalProgressStr)};var updateTotalAtCompletion=function(that){var numErroredFiles=that.uploadManager.queue.getErroredFiles().length;var numTotalFiles=that.uploadManager.queue.files.length;var fileLabelStr=fileOrFiles(that,numTotalFiles);var errorStr="";if(numErroredFiles>0){var errorLabelString=(numErroredFiles===1)?that.options.strings.progress.singleError:that.options.strings.progress.pluralErrors;setTotalProgressStyle(that,true);errorStr=fluid.stringTemplate(that.options.strings.progress.numberOfErrors,{errorsN:numErroredFiles,errorLabel:errorLabelString})}var totalProgressStr=fluid.stringTemplate(that.options.strings.progress.completedLabel,{curFileN:that.uploadManager.queue.getUploadedFiles().length,totalFilesN:numTotalFiles,errorString:errorStr,fileLabel:fileLabelStr,totalCurrBytes:fluid.uploader.formatFileSize(that.uploadManager.queue.sizeOfUploadedFiles())});that.totalProgress.update(100,totalProgressStr)};var bindDOMEvents=function(that){that.locate("browseButton").click(function(evnt){that.uploadManager.browseForFiles();evnt.preventDefault()});that.locate("uploadButton").click(function(){that.uploadManager.start()});that.locate("pauseButton").click(function(){that.uploadManager.stop()})};var updateStateAfterFileDialog=function(that){if(that.uploadManager.queue.getReadyFiles().length>0){setStateLoaded(that);renderUploadTotalMessage(that);that.locate(that.options.focusWithEvent.afterFileDialog).focus()}};var updateStateAfterFileRemoval=function(that){if(that.uploadManager.queue.getReadyFiles().length===0){setStateEmpty(that)}renderUploadTotalMessage(that)};var updateStateAfterPause=function(that){};var updateStateAfterCompletion=function(that){var userPaused=that.uploadManager.queue.shouldStop;if(that.uploadManager.queue.getReadyFiles().length===0){setStateDone(that)}else{setStateLoaded(that)}updateTotalAtCompletion(that)};var bindModelEvents=function(that){that.events.afterFileDialog.addListener(function(){updateStateAfterFileDialog(that)});that.events.afterFileRemoved.addListener(function(){updateStateAfterFileRemoval(that)});that.events.onUploadStart.addListener(function(){setStateUploading(that)});that.events.onUploadStop.addListener(function(){that.locate(that.options.focusWithEvent.afterUploadStop).focus()});that.events.onFileProgress.addListener(function(){updateTotalProgress(that)});that.events.onFileSuccess.addListener(function(){updateTotalProgress(that)});that.events.onFileError.addListener(function(file,error,message){if(error===fluid.uploader.errorConstants.UPLOAD_STOPPED){updateStateAfterPause(that)}});that.events.afterUploadComplete.addListener(function(){updateStateAfterCompletion(that)})};var initUploadManager=function(that){var manager=fluid.initSubcomponent(that,"uploadManager",[that.events,fluid.COMPONENT_OPTIONS]);return that.options.demo?fluid.demoUploadManager(manager):manager};var setupUploader=function(that){that.decorators=fluid.initSubcomponents(that,"decorators",[that,fluid.COMPONENT_OPTIONS]);that.uploadManager=initUploadManager(that);that.fileQueueView=fluid.initSubcomponent(that,"fileQueueView",[that.locate("fileQueue"),that.container,that.uploadManager,fluid.COMPONENT_OPTIONS]);that.totalProgress=fluid.initSubcomponent(that,"totalProgressBar",[that.container,fluid.COMPONENT_OPTIONS]);disableElement(that,that.locate("uploadButton"));bindDOMEvents(that);bindModelEvents(that)};fluid.uploader=function(container,options){var that=fluid.initView("fluid.uploader",container,options);setupUploader(that);return that};fluid.progressiveEnhanceableUploader=function(container,enhanceable,options){enhanceable=fluid.container(enhanceable);container=fluid.container(container);if(swfobject.getFlashPlayerVersion().major<9){enhanceable.show()}else{container.show();return fluid.uploader(container,options)}};fluid.uploader.formatFileSize=function(bytes){if(typeof bytes==="number"){if(bytes===0){return"0.0 KB"}else{if(bytes>0){if(bytes<1048576){return(Math.ceil(bytes/1024*10)/10).toFixed(1)+" KB"}else{return(Math.ceil(bytes/1048576*10)/10).toFixed(1)+" MB"}}}}return""};fluid.uploader.derivePercent=function(num,total){return Math.round((num*100)/total)};fluid.defaults("fluid.uploader",{demo:false,decorators:[{type:"fluid.swfUploadSetupDecorator"},{type:"fluid.manuallyDegrade",options:{selectors:{enhanceable:".fl-uploader.fl-progEnhance-basic"}}}],uploadManager:{type:"fluid.swfUploadManager"},fileQueueView:{type:"fluid.fileQueueView"},totalProgressBar:{type:"fluid.progress",options:{selectors:{progressBar:".flc-uploader-queue-footer",displayElement:".flc-uploader-total-progress",label:".flc-uploader-total-progress-text",indicator:".flc-uploader-total-progress",ariaElement:".flc-uploader-total-progress"}}},selectors:{fileQueue:".flc-uploader-queue",browseButton:".flc-uploader-button-browse",uploadButton:".flc-uploader-button-upload",pauseButton:".flc-uploader-button-pause",totalFileStatusText:".flc-uploader-total-progress-text",instructions:".flc-uploader-browse-instructions"},focusWithEvent:{afterFileDialog:"uploadButton",afterUploadStart:"pauseButton",afterUploadStop:"uploadButton"},styles:{disabled:"fl-uploader-disabled",hidden:"fl-uploader-hidden",dim:"fl-uploader-dim",totalProgress:"fl-uploader-total-progress-okay",totalProgressError:"fl-uploader-total-progress-errored"},events:{afterReady:null,onFileDialog:null,afterFileQueued:null,afterFileRemoved:null,onQueueError:null,afterFileDialog:null,onUploadStart:null,onUploadStop:null,onFileStart:null,onFileProgress:null,onFileError:null,onFileSuccess:null,afterFileComplete:null,afterUploadComplete:null},strings:{progress:{toUploadLabel:"To upload: %fileCount %fileLabel (%totalBytes)",totalProgressLabel:"Uploading: %curFileN of %totalFilesN %fileLabel (%currBytes of %totalBytes)",completedLabel:"Uploaded: %curFileN of %totalFilesN %fileLabel (%totalCurrBytes)%errorString",numberOfErrors:", %errorsN %errorLabel",singleFile:"file",pluralFiles:"files",singleError:"error",pluralErrors:"errors"},buttons:{browse:"Browse Files",addMore:"Add More",stopUpload:"Stop Upload",cancelRemaning:"Cancel remaining Uploads",resumeUpload:"Resume Upload"}}});fluid.uploader.errorConstants={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};fluid.uploader.fileStatusConstants={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};var renderLink=function(renderLocation,text,classes,appendBeside){var link=$("<a href='#'>"+text+"</a>");link.addClass(classes);if(renderLocation==="before"){appendBeside.before(link)}else{appendBeside.after(link)}return link};var toggleVisibility=function(toShow,toHide){if(window.opera){toShow.show().removeClass("hideUploaderForOpera");toHide.show().addClass("hideUploaderForOpera")}else{toShow.show();toHide.hide()}};var defaultControlRenderer=function(that){var degradeLink=renderLink(that.options.defaultRenderLocation,that.options.strings.degradeLinkText,that.options.styles.degradeLinkClass,that.enhancedContainer);degradeLink.addClass("flc-manuallyDegrade-degrade");var enhanceLink=renderLink(that.options.defaultRenderLocation,that.options.strings.enhanceLinkText,that.options.styles.enhanceLinkClass,that.degradedContainer);enhanceLink.addClass("flc-manuallyDegrade-enhance")};var fetchControls=function(that){that.degradeControl=that.locate("degradeControl");that.enhanceControl=that.locate("enhanceControl")};var setupManuallyDegrade=function(that){if(!that.degradedContainer.length){return }fetchControls(that);if(!that.degradeControl.length&&!that.enhanceControl.length){that.options.controlRenderer(that);fetchControls(that)}that.degradeControl.click(that.degrade);that.enhanceControl.click(that.enhance);that.enhanceControl.hide()};var determineContainer=function(options){var defaults=fluid.defaults("fluid.manuallyDegrade");return(options&&options.container)?options.container:defaults.container};fluid.manuallyDegrade=function(component,options){var container=determineContainer(options);var that=fluid.initView("fluid.manuallyDegrade",container,options);var isDegraded=false;that.enhancedContainer=component.container;that.degradedContainer=that.locate("enhanceable");that.degrade=function(){toggleVisibility(that.enhanceControl,that.degradeControl);toggleVisibility(that.degradedContainer,that.enhancedContainer);isDegraded=true};that.enhance=function(){toggleVisibility(that.degradeControl,that.enhanceControl);toggleVisibility(that.enhancedContainer,that.degradedContainer);isDegraded=false};that.isDegraded=function(){return isDegraded};setupManuallyDegrade(that);return that};fluid.defaults("fluid.manuallyDegrade",{container:"body",controlRenderer:defaultControlRenderer,defaultRenderLocation:"before",strings:{degradeLinkText:"Switch to the standard single-file Uploader",enhanceLinkText:"Switch to the Flash-based multi-file Uploader"},selectors:{enhanceable:".fl-ProgEnhance-basic",degradeControl:".flc-manuallyDegrade-degrade",enhanceControl:".flc-manuallyDegrade-enhance"},styles:{degradeLinkClass:"fl-uploader-manually-degrade",enhanceLinkClass:"fl-uploader-manually-enhance"}})})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/core/js/DataBinding.js b/docs/include/jscripts/infusion_old/framework/core/js/DataBinding.js
new file mode 100644 (file)
index 0000000..94a515f
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.VALUE={};fluid.BINDING_ROOT_KEY="fluid-binding-root";fluid.findData=function(elem,name){while(elem){var data=$.data(elem,name);if(data){return data}elem=elem.parentNode}};fluid.bindFossils=function(node,data,fossils){$.data(node,fluid.BINDING_ROOT_KEY,{data:data,fossils:fossils})};fluid.findForm=function(node){return fluid.findAncestor(node,function(element){return element.nodeName.toLowerCase()==="form"})};fluid.value=function(nodeIn,newValue){var node=fluid.unwrap(nodeIn);var multiple=false;if(node.nodeType===undefined&&node.length>1){node=node[0];multiple=true}var jNode=$(node);if("input"!==node.nodeName.toLowerCase()||!/radio|checkbox/.test(node.type)){return $(node).val(newValue)}var name=node.name;if(name===undefined){fluid.fail("Cannot acquire value from node "+fluid.dumpEl(node)+" which does not have name attribute set")}var elements;if(multiple){elements=nodeIn}else{var elements=document.getElementsByName(name);var scope=fluid.findForm(node);elements=$.grep(elements,function(element){if(element.name!==name){return false}return !scope||fluid.dom.isContainer(scope,element)})}if(newValue!==undefined){if(typeof (newValue)==="boolean"){newValue=(newValue?"true":"false")}$.each(elements,function(){this.checked=(newValue instanceof Array?$.inArray(this.value,newValue)!==-1:newValue===this.value)})}else{var checked=$.map(elements,function(element){return element.checked?element.value:null});return node.type==="radio"?checked[0]:checked}};fluid.applyChange=function(node,newValue,applier){node=fluid.unwrap(node);if(newValue===undefined){newValue=fluid.value(node)}if(node.nodeType===undefined&&node.length>0){node=node[0]}var root=fluid.findData(node,fluid.BINDING_ROOT_KEY);if(!root){fluid.fail("Bound data could not be discovered in any node above "+fluid.dumpEl(node))}var name=node.name;var fossil=root.fossils[name];if(!fossil){fluid.fail("No fossil discovered for name "+name+" in fossil record above "+fluid.dumpEl(node))}if(typeof (fossil.oldvalue)==="boolean"){newValue=newValue[0]?true:false}var EL=root.fossils[name].EL;if(applier){applier.fireChangeRequest({path:EL,value:newValue,source:node.id})}else{fluid.model.setBeanValue(root.data,EL,newValue)}};fluid.pathUtil={};var getPathSegmentImpl=function(accept,path,i){var segment=null;if(accept){segment=""}var escaped=false;var limit=path.length;for(;i<limit;++i){var c=path.charAt(i);if(!escaped){if(c==="."){break}else{if(c==="\\"){escaped=true}else{if(segment!==null){segment+=c}}}}else{escaped=false;if(segment!==null){accept+=c}}}if(segment!==null){accept[0]=segment}return i};var globalAccept=[];fluid.pathUtil.getPathSegment=function(path,i){getPathSegmentImpl(globalAccept,path,i);return globalAccept[0]};fluid.pathUtil.getHeadPath=function(path){return fluid.pathUtil.getPathSegment(path,0)};fluid.pathUtil.getFromHeadPath=function(path){var firstdot=getPathSegmentImpl(null,path,0);return firstdot===path.length?null:path.substring(firstdot+1)};function lastDotIndex(path){return path.lastIndexOf(".")}fluid.pathUtil.getToTailPath=function(path){var lastdot=lastDotIndex(path);return lastdot==-1?null:path.substring(0,lastdot)};fluid.pathUtil.getTailPath=function(path){var lastdot=lastDotIndex(path);return fluid.pathUtil.getPathSegment(path,lastdot+1)};var composeSegment=function(prefix,toappend){for(var i=0;i<toappend.length;++i){var c=toappend.charAt(i);if(c==="."||c==="\\"||c==="}"){prefix+="\\"}prefix+=c}return prefix};fluid.pathUtil.composePath=function(prefix,suffix){if(prefix.length!==0){prefix+="."}return composeSegment(prefix,suffix)};fluid.pathUtil.matchPath=function(spec,path){var togo="";while(true){if(!spec){break}if(!path){return null}var spechead=fluid.pathUtil.getHeadPath(spec);var pathhead=fluid.pathUtil.getHeadPath(path);if(spechead!=="*"&&spechead!==pathhead){return null}togo=fluid.pathUtil.composePath(togo,pathhead);spec=fluid.pathUtil.getFromHeadPath(spec);path=fluid.pathUtil.getFromHeadPath(path)}return togo};fluid.model.applyChangeRequest=function(model,request){if(request.type==="ADD"){fluid.model.setBeanValue(model,request.path,request.value)}else{if(request.type==="DELETE"){var totail=fluid.pathUtil.getToTailPath(request.path);var tail=fluid.pathUtil.getTailPath(request.path);var penult=fluid.model.getBeanValue(model,penult);delete penult[tail]}}};fluid.makeChangeApplier=function(model){var baseEvents={guards:fluid.event.getEventFirer(false,true),modelChanged:fluid.event.getEventFirer(false,false)};var that={model:model};function makePredicate(listenerMember,requestIndex){return function(listener,args){var changeRequest=args[requestIndex];return fluid.pathUtil.matchPath(listener[listenerMember],changeRequest.path)}}function adaptListener(that,name,listenerMember,requestIndex){var predicate=makePredicate(listenerMember,requestIndex);that[name]={addListener:function(pathSpec,listener,namespace){listener[listenerMember]=pathSpec;baseEvents[name].addListener(listener,namespace,predicate)},removeListener:function(listener){baseEvents[name].removeListener(listener)}}}adaptListener(that,"guards","guardedPathSpec",1);adaptListener(that,"modelChanged","triggerPathSpec",2);that.fireChangeRequest=function(changeRequest){if(!changeRequest.type){changeRequest.type="ADD"}var prevent=baseEvents.guards.fire(model,changeRequest);if(prevent===false){return }var oldModel={};fluid.model.copyModel(oldModel,model);fluid.model.applyChangeRequest(model,changeRequest);baseEvents.modelChanged.fire(model,oldModel,changeRequest)};that.requestChange=function(path,value,type){var changeRequest={path:path,value:value,type:type};that.fireChangeRequest(changeRequest)};return that};fluid.makeSuperApplier=function(){var subAppliers=[];var that={};that.addSubApplier=function(path,subApplier){subAppliers.push({path:path,subApplier:subApplier})};that.fireChangeRequest=function(request){for(var i=0;i<subAppliers.length;++i){var path=subAppliers[i].path;if(request.path.indexOf(path)===0){var subpath=request.path.substring(path.length+1);var subRequest=fluid.copy(request);subRequest.path=subpath;subAppliers[i].subApplier.fireChangeRequest(subRequest)}}};return that};fluid.attachModel=function(baseModel,path,model){var segs=fluid.model.parseEL(path);for(var i=0;i<segs.length-1;++i){var seg=segs[i];var subModel=baseModel[seg];if(!subModel){baseModel[seg]=subModel={}}baseModel=subModel}baseModel[segs[segs.length-1]]=model};fluid.assembleModel=function(modelSpec){var model={};var superApplier=fluid.makeSuperApplier();var togo={model:model,applier:superApplier};for(path in modelSpec){var rec=modelSpec[path];fluid.attachModel(model,path,rec.model);if(rec.applier){superApplier.addSubApplier(path,rec.applier)}}return togo}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/core/js/Fluid.js b/docs/include/jscripts/infusion_old/framework/core/js/Fluid.js
new file mode 100644 (file)
index 0000000..74a5df8
--- /dev/null
@@ -0,0 +1 @@
+var fluid_1_1=fluid_1_1||{};var fluid=fluid||fluid_1_1;(function($,fluid){fluid.version="Infusion 1.1";fluid.fail=function(message){fluid.setLogging(true);fluid.log(message.message?message.message:message);throw new Error(message)};fluid.wrap=function(obj){return((!obj||obj.jquery)?obj:$(obj))};fluid.unwrap=function(obj){return obj&&obj.jquery&&obj.length===1?obj[0]:obj};fluid.keyForValue=function(obj,value){for(var key in obj){if(obj[key]===value){return key}}return null};fluid.findKeyInObject=fluid.keyForValue;fluid.clear=function(target){if(target instanceof Array){target.length=0}else{for(var i in target){delete target[i]}}};fluid.container=function(containerSpec){var container=containerSpec;if(typeof containerSpec==="string"||containerSpec.nodeType&&(containerSpec.nodeType===1||containerSpec.nodeType===9)){container=$(containerSpec)}if(!container||!container.jquery||container.length!==1){if(typeof (containerSpec)!=="string"){containerSpec=container.selector}fluid.fail({name:"NotOne",message:"A single container element was not found for selector "+containerSpec})}return container};var defaultsStore={};var globalDefaultsStore={};fluid.defaults=function(){var offset=0;var store=defaultsStore;if(typeof arguments[0]==="boolean"){store=globalDefaultsStore;offset=1}var componentName=arguments[offset];var defaultsObject=arguments[offset+1];if(defaultsObject!==undefined){store[componentName]=defaultsObject;return defaultsObject}return store[componentName]};fluid.createDomBinder=function(container,selectors){var cache={},that={};function cacheKey(name,thisContainer){return $.data(fluid.unwrap(thisContainer))+"-"+name}function record(name,thisContainer,result){cache[cacheKey(name,thisContainer)]=result}that.locate=function(name,localContainer){var selector,thisContainer,togo;selector=selectors[name];thisContainer=localContainer?localContainer:container;if(!thisContainer){fluid.fail("DOM binder invoked for selector "+name+" without container")}if(!selector){return thisContainer}if(typeof (selector)==="function"){togo=$(selector.call(null,fluid.unwrap(thisContainer)))}else{togo=$(selector,thisContainer)}if(togo.get(0)===document){togo=[]}if(!togo.selector){togo.selector=selector;togo.context=thisContainer}togo.selectorName=name;record(name,thisContainer,togo);return togo};that.fastLocate=function(name,localContainer){var thisContainer=localContainer?localContainer:container;var key=cacheKey(name,thisContainer);var togo=cache[key];return togo?togo:that.locate(name,localContainer)};that.clear=function(){cache={}};that.refresh=function(names,localContainer){var thisContainer=localContainer?localContainer:container;if(typeof names==="string"){names=[names]}if(thisContainer.length===undefined){thisContainer=[thisContainer]}for(var i=0;i<names.length;++i){for(var j=0;j<thisContainer.length;++j){that.locate(names[i],thisContainer[j])}}};return that};fluid.mergeListeners=function(events,listeners){if(listeners){for(var key in listeners){var value=listeners[key];var keydot=key.indexOf(".");var namespace;if(keydot!==-1){namespace=key.substring(keydot+1);key=key.substring(0,keydot)}if(!events[key]){events[key]=fluid.event.getEventFirer()}var firer=events[key];if(typeof (value)==="function"){firer.addListener(value,namespace)}else{if(value&&typeof value.length==="number"){for(var i=0;i<value.length;++i){firer.addListener(value[i],namespace)}}}}}};fluid.instantiateFirers=function(that,options){that.events={};if(options.events){for(var event in options.events){var eventType=options.events[event];that.events[event]=fluid.event.getEventFirer(eventType==="unicast",eventType==="preventable")}}fluid.mergeListeners(that.events,options.listeners)};fluid.mergeComponentOptions=function(that,componentName,userOptions){var defaults=fluid.defaults(componentName);that.options=fluid.merge(defaults?defaults.mergePolicy:null,{},defaults,userOptions)};fluid.expectFilledSelector=function(result,message){if(result&&result.length===0&&result.jquery){fluid.fail(message+': selector "'+result.selector+'" with name '+result.selectorName+" returned no results in context "+fluid.dumpEl(result.context))}};fluid.initView=function(componentName,container,userOptions){var that={};fluid.expectFilledSelector(container,'Error instantiating component with name "'+componentName);fluid.mergeComponentOptions(that,componentName,userOptions);if(container){that.container=fluid.container(container);fluid.initDomBinder(that)}fluid.instantiateFirers(that,that.options);return that};fluid.COMPONENT_OPTIONS={};fluid.VALUE={};fluid.emptySubcomponent=function(options){var that={};options=$.makeArray(options);for(var i=0;i<options.length;++i){that[options[i]]=function(){}}return that};fluid.initSubcomponent=function(that,className,args){return fluid.initSubcomponents(that,className,args)[0]};fluid.initSubcomponents=function(that,className,args){var entry=that.options[className];if(!entry){return }var entries=$.makeArray(entry);var optindex=-1;var togo=[];args=$.makeArray(args);for(var i=0;i<args.length;++i){if(args[i]===fluid.COMPONENT_OPTIONS){optindex=i}}for(i=0;i<entries.length;++i){entry=entries[i];if(optindex!==-1&&entry.options){args[optindex]=entry.options}if(typeof (entry)!=="function"){var entryType=typeof (entry)==="string"?entry:entry.type;var globDef=fluid.defaults(true,entryType);fluid.merge("reverse",that.options,globDef);togo[i]=entryType==="fluid.emptySubcomponent"?fluid.emptySubcomponent(entry.options):fluid.invokeGlobalFunction(entryType,args,{fluid:fluid})}else{togo[i]=entry.apply(null,args)}var returnedOptions=togo[i]?togo[i].returnedOptions:null;if(returnedOptions){fluid.merge(that.options.mergePolicy,that.options,returnedOptions);if(returnedOptions.listeners){fluid.mergeListeners(that.events,returnedOptions.listeners)}}}return togo};fluid.initDomBinder=function(that){that.dom=fluid.createDomBinder(that.container,that.options.selectors);that.locate=that.dom.locate};fluid.isPrimitive=function(value){var valueType=typeof (value);return !value||valueType==="string"||valueType==="boolean"||valueType==="number"};function mergeImpl(policy,basePath,target,source){var thisPolicy=policy&&typeof (policy)!=="string"?policy[basePath]:policy;if(typeof (thisPolicy)==="function"){thisPolicy.apply(null,target,source);return target}if(thisPolicy==="replace"){fluid.clear(target)}for(var name in source){var path=(basePath?basePath+".":"")+name;var thisTarget=target[name];var thisSource=source[name];var primitiveTarget=fluid.isPrimitive(thisTarget);if(thisSource!==undefined){if(thisSource!==null&&typeof thisSource==="object"&&!thisSource.nodeType&&!thisSource.jquery&&thisSource!==fluid.VALUE){if(primitiveTarget){target[name]=thisTarget=thisSource instanceof Array?[]:{}}mergeImpl(policy,path,thisTarget,thisSource)}else{if(thisTarget===null||thisTarget===undefined||thisPolicy!=="reverse"){target[name]=thisSource}}}}return target}fluid.merge=function(policy,target){var path="";for(var i=2;i<arguments.length;++i){var source=arguments[i];if(source!==null&&source!==undefined){mergeImpl(policy,path,target,source)}}if(policy&&typeof (policy)!=="string"){for(var key in policy){var elrh=policy[key];if(typeof (elrh)==="string"&&elrh!=="replace"){var oldValue=fluid.model.getBeanValue(target,key);if(oldValue===null||oldValue===undefined){var value=fluid.model.getBeanValue(target,elrh);fluid.model.setBeanValue(target,key,value)}}}}return target};fluid.copy=function(tocopy){if(fluid.isPrimitive(tocopy)){return tocopy}return $.extend(true,typeof (tocopy.length)==="number"?[]:{},tocopy)};fluid.invokeGlobalFunction=function(functionPath,args,environment){var func=fluid.model.getBeanValue(window,functionPath,environment);if(!func){fluid.fail("Error invoking global function: "+functionPath+" could not be located")}else{return func.apply(null,args)}};fluid.event={};var fluid_guid=1;fluid.event.getEventFirer=function(unicast,preventable){var log=fluid.log;var listeners={};return{addListener:function(listener,namespace,predicate){if(!listener){return }if(unicast){namespace="unicast"}if(!namespace){if(!listener.$$guid){listener.$$guid=fluid_guid++}namespace=listener.$$guid}listeners[namespace]={listener:listener,predicate:predicate}},removeListener:function(listener){if(typeof (listener)==="string"){delete listeners[listener]}else{if(typeof (listener)==="object"&&listener.$$guid){delete listeners[listener.$$guid]}}},fire:function(){for(var i in listeners){var lisrec=listeners[i];var listener=lisrec.listener;if(lisrec.predicate&&!lisrec.predicate(listener,arguments)){continue}try{var ret=listener.apply(null,arguments);if(preventable&&ret===false){return false}}catch(e){log("FireEvent received exception "+e.message+" e "+e+" firing to listener "+i);throw (e)}}}}};fluid.model={};fluid.model.copyModel=function(target,source){fluid.clear(target);$.extend(true,target,source)};fluid.model.parseEL=function(EL){return EL.toString().split(".")};fluid.model.composePath=function(prefix,suffix){return prefix===""?suffix:prefix+"."+suffix};fluid.model.setBeanValue=function(root,EL,newValue){var segs=fluid.model.parseEL(EL);for(var i=0;i<segs.length-1;i+=1){if(!root[segs[i]]){root[segs[i]]={}}root=root[segs[i]]}root[segs[segs.length-1]]=newValue};fluid.model.getBeanValue=function(root,EL,environment){if(EL===""||EL===null||EL===undefined){return root}var segs=fluid.model.parseEL(EL);for(var i=0;i<segs.length;++i){if(!root){return root}var segment=segs[i];if(environment&&environment[segment]){root=environment[segment];environment=null}else{root=root[segment]}}return root};var logging;fluid.setLogging=function(enabled){if(typeof enabled==="boolean"){logging=enabled}else{logging=false}};fluid.log=function(str){if(logging){str=new Date().toTimeString()+":  "+str;if(typeof (console)!=="undefined"){if(console.debug){console.debug(str)}else{console.log(str)}}else{if(typeof (YAHOO)!=="undefined"){YAHOO.log(str)}else{if(typeof (opera)!=="undefined"){opera.postError(str)}}}}};fluid.dumpEl=function(element){var togo;if(!element){return"null"}if(element.nodeType===3||element.nodeType===8){return"[data: "+element.data+"]"}if(element.nodeType===9){return"[document: location "+element.location+"]"}if(!element.nodeType&&typeof element.length==="number"){togo="[";for(var i=0;i<element.length;++i){togo+=fluid.dumpEl(element[i]);if(i<element.length-1){togo+=", "}}return togo+"]"}element=$(element);togo=element.get(0).tagName;if(element.attr("id")){togo+="#"+element.attr("id")}if(element.attr("class")){togo+="."+element.attr("class")}return togo};fluid.findAncestor=function(element,test){element=fluid.unwrap(element);while(element){if(test(element)){return element}element=element.parentNode}};fluid.jById=function(id,dokkument){dokkument=dokkument&&dokkument.nodeType===9?dokkument:document;var element=fluid.byId(id,dokkument);var togo=element?$(element):[];togo.selector="#"+id;togo.context=dokkument;return togo};fluid.byId=function(id,dokkument){dokkument=dokkument&&dokkument.nodeType===9?dokkument:document;var el=dokkument.getElementById(id);if(el){if(el.getAttribute("id")!==id){fluid.fail("Problem in document structure - picked up element "+fluid.dumpEl(el)+" for id "+id+" without this id - most likely the element has a name which conflicts with this id")}return el}else{return null}};fluid.getId=function(element){return fluid.unwrap(element).getAttribute("id")};fluid.allocateSimpleId=function(element){element=fluid.unwrap(element);if(!element.id){element.id="fluid-id-"+(fluid_guid++)}return element.id};fluid.transform=function(list){var togo=[];for(var i=0;i<list.length;++i){var transit=list[i];for(var j=0;j<arguments.length-1;++j){transit=arguments[j+1](transit,i)}togo[togo.length]=transit}return togo};fluid.find=function(list,fn,deflt){for(var i=0;i<list.length;++i){var transit=fn(list[i],i);if(transit!==null&&transit!==undefined){return transit}}return deflt};fluid.accumulate=function(list,fn,arg){for(var i=0;i<list.length;++i){arg=fn(list[i],arg,i)}return arg};fluid.remove_if=function(list,fn){for(var i=0;i<list.length;++i){if(fn(list[i],i)){list.splice(i,1);--i}}return list};fluid.formatMessage=function(messageString,args){if(!args){return messageString}if(typeof (args)==="string"){args=[args]}for(var i=0;i<args.length;++i){messageString=messageString.replace("{"+i+"}",args[i])}return messageString};fluid.messageLocator=function(messageBase){return function(messagecodes,args){if(typeof (messagecodes)==="string"){messagecodes=[messagecodes]}for(var i=0;i<messagecodes.length;++i){var code=messagecodes[i];var message=messageBase[code];if(message===undefined){continue}return fluid.formatMessage(message,args)}return"[Message string for key "+messagecodes[0]+" not found]"}};fluid.stringTemplate=function(template,values){var newString=template;for(var key in values){if(values.hasOwnProperty(key)){var searchStr="%"+key;newString=newString.replace(searchStr,values[key])}}return newString}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/core/js/FluidDOMUtilities.js b/docs/include/jscripts/infusion_old/framework/core/js/FluidDOMUtilities.js
new file mode 100644 (file)
index 0000000..61b0567
--- /dev/null
@@ -0,0 +1 @@
+var fluid_1_1=fluid_1_1||{};(function($,fluid){fluid.dom=fluid.dom||{};var getNextNode=function(iterator){if(iterator.node.firstChild){iterator.node=iterator.node.firstChild;iterator.depth+=1;return iterator}while(iterator.node){if(iterator.node.nextSibling){iterator.node=iterator.node.nextSibling;return iterator}iterator.node=iterator.node.parentNode;iterator.depth-=1}return iterator};fluid.dom.iterateDom=function(node,acceptor,allNodes){var currentNode={node:node,depth:0};var prevNode=node;var condition;while(currentNode.node!==null&&currentNode.depth>=0&&currentNode.depth<fluid.dom.iterateDom.DOM_BAIL_DEPTH){condition=null;if(currentNode.node.nodeType===1||allNodes){condition=acceptor(currentNode.node,currentNode.depth)}if(condition){if(condition==="delete"){currentNode.node.parentNode.removeChild(currentNode.node);currentNode.node=prevNode}else{if(condition==="stop"){return currentNode.node}}}prevNode=currentNode.node;currentNode=getNextNode(currentNode)}};fluid.dom.iterateDom.DOM_BAIL_DEPTH=256;fluid.dom.computeAbsolutePosition=function(element){var curleft=0,curtop=0;if(element.offsetParent){do{curleft+=element.offsetLeft;curtop+=element.offsetTop;element=element.offsetParent}while(element);return[curleft,curtop]}};fluid.dom.isContainer=function(container,containee){for(;containee;containee=containee.parentNode){if(container===containee){return true}}return false};fluid.dom.insertAfter=function(newChild,refChild){var nextSib=refChild.nextSibling;if(!nextSib){refChild.parentNode.appendChild(newChild)}else{refChild.parentNode.insertBefore(newChild,nextSib)}};fluid.dom.isWhitespaceNode=function(node){return !(/[^\t\n\r ]/.test(node.data))};fluid.dom.isIgnorableNode=function(node){return(node.nodeType===8)||((node.nodeType===3)&&fluid.dom.isWhitespaceNode(node))};fluid.dom.getElementText=function(element){var nodes=element.childNodes;var text="";for(var i=0;i<nodes.length;++i){var child=nodes[i];if(child.nodeType==3){text=text+child.nodeValue}}return text};fluid.dom.cleanseScripts=function(element){var cleansed=$.data(element,fluid.dom.cleanseScripts.MARKER);if(!cleansed){fluid.dom.iterateDom(element,function(node){return node.tagName.toLowerCase()==="script"?"delete":null});$.data(element,fluid.dom.cleanseScripts.MARKER,true)}};fluid.dom.cleanseScripts.MARKER="fluid-scripts-cleansed"})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/core/js/ProgressiveEnhancement.js b/docs/include/jscripts/infusion_old/framework/core/js/ProgressiveEnhancement.js
new file mode 100644 (file)
index 0000000..f3fac5c
--- /dev/null
@@ -0,0 +1 @@
+(function($){$("head").append("<style type='text/css'>.fl-progEnhance-basic, .fl-ProgEnhance-basic { display: none; }</style>")})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/core/js/jquery.keyboard-a11y.js b/docs/include/jscripts/infusion_old/framework/core/js/jquery.keyboard-a11y.js
new file mode 100644 (file)
index 0000000..105f33c
--- /dev/null
@@ -0,0 +1 @@
+var fluid_1_1=fluid_1_1||{};var fluid=fluid||fluid_1_1;(function($,fluid){fluid.thatistBridge=function(name,peer){var togo=function(funcname){var segs=funcname.split(".");var move=peer;for(var i=0;i<segs.length;++i){move=move[segs[i]]}var args=[this];if(arguments.length===2){args=args.concat($.makeArray(arguments[1]))}var ret=move.apply(null,args);this.that=function(){return ret};var type=typeof (ret);return !ret||type==="string"||type==="number"||type==="boolean"||ret&&ret.length!==undefined?ret:this};$.fn[name]=togo;return togo};fluid.thatistBridge("fluid",fluid);fluid.thatistBridge("fluid_1_1",fluid_1_1);var NAMESPACE_KEY="fluid-keyboard-a11y";var getData=function(target,key){var data=$(target).data(NAMESPACE_KEY);return data?data[key]:undefined};var setData=function(target,key,value){$(target).each(function(){var data=$.data(this,NAMESPACE_KEY)||{};data[key]=value;$.data(this,NAMESPACE_KEY,data)})};var lastFocusedElement="disabled";if($.event.special.focusin){lastFocusedElement=null;$(document).bind("focusin",function(event){lastFocusedElement=event.target})}fluid.getLastFocusedElement=function(){if(lastFocusedElement==="disabled"){fluid.fail("Focus manager not enabled - please include jquery.delegate.js or equivalent for support of 'focusin' event")}return lastFocusedElement};var normalizeTabindexName=function(){return $.browser.msie?"tabIndex":"tabindex"};var canHaveDefaultTabindex=function(elements){if(elements.length<=0){return false}return $(elements[0]).is("a, input, button, select, area, textarea, object")};var getValue=function(elements){if(elements.length<=0){return undefined}if(!fluid.tabindex.hasAttr(elements)){return canHaveDefaultTabindex(elements)?Number(0):undefined}var value=elements.attr(normalizeTabindexName());return Number(value)};var setValue=function(elements,toIndex){return elements.each(function(i,item){$(item).attr(normalizeTabindexName(),toIndex)})};fluid.tabindex=function(target,toIndex){target=$(target);if(toIndex!==null&&toIndex!==undefined){return setValue(target,toIndex)}else{return getValue(target)}};fluid.tabindex.remove=function(target){target=$(target);return target.each(function(i,item){$(item).removeAttr(normalizeTabindexName())})};fluid.tabindex.hasAttr=function(target){target=$(target);if(target.length<=0){return false}var togo=target.map(function(){var attributeNode=this.getAttributeNode(normalizeTabindexName());return attributeNode?attributeNode.specified:false});return togo.length===1?togo[0]:togo};fluid.tabindex.has=function(target){target=$(target);return fluid.tabindex.hasAttr(target)||canHaveDefaultTabindex(target)};var ENABLEMENT_KEY="enablement";fluid.enabled=function(target,state){target=$(target);if(state===undefined){return getData(target,ENABLEMENT_KEY)!==false}else{$("*",target).each(function(){if(getData(this,ENABLEMENT_KEY)!==undefined){setData(this,ENABLEMENT_KEY,state)}else{if(/select|textarea|input/i.test(this.nodeName)){$(this).attr("disabled",!state)}}});setData(target,ENABLEMENT_KEY,state)}};fluid.a11y=$.a11y||{};fluid.a11y.orientation={HORIZONTAL:0,VERTICAL:1,BOTH:2};var UP_DOWN_KEYMAP={next:$.ui.keyCode.DOWN,previous:$.ui.keyCode.UP};var LEFT_RIGHT_KEYMAP={next:$.ui.keyCode.RIGHT,previous:$.ui.keyCode.LEFT};var unwrap=function(element){return element.jquery?element[0]:element};var makeElementsTabFocussable=function(elements){elements.each(function(idx,item){item=$(item);if(!item.fluid("tabindex.has")||item.fluid("tabindex")<0){item.fluid("tabindex",0)}})};fluid.tabbable=function(target){target=$(target);makeElementsTabFocussable(target)};var CONTEXT_KEY="selectionContext";var NO_SELECTION=-32768;var cleanUpWhenLeavingContainer=function(selectionContext){if(selectionContext.options.onLeaveContainer){selectionContext.options.onLeaveContainer(selectionContext.selectables[selectionContext.activeItemIndex])}else{if(selectionContext.options.onUnselect){selectionContext.options.onUnselect(selectionContext.selectables[selectionContext.activeItemIndex])}}if(!selectionContext.options.rememberSelectionState){selectionContext.activeItemIndex=NO_SELECTION}};var drawSelection=function(elementToSelect,handler){if(handler){handler(elementToSelect)}};var eraseSelection=function(selectedElement,handler){if(handler&&selectedElement){handler(selectedElement)}};var unselectElement=function(selectedElement,selectionContext){eraseSelection(selectedElement,selectionContext.options.onUnselect)};var selectElement=function(elementToSelect,selectionContext){unselectElement(selectionContext.selectedElement(),selectionContext);elementToSelect=unwrap(elementToSelect);var newIndex=selectionContext.selectables.index(elementToSelect);if(newIndex===-1){return }selectionContext.activeItemIndex=newIndex;drawSelection(elementToSelect,selectionContext.options.onSelect)};var selectableFocusHandler=function(selectionContext){return function(evt){selectElement(evt.target,selectionContext);return evt.stopPropagation()}};var selectableBlurHandler=function(selectionContext){return function(evt){unselectElement(evt.target,selectionContext);return evt.stopPropagation()}};var reifyIndex=function(sc_that){var elements=sc_that.selectables;if(sc_that.activeItemIndex>=elements.length){sc_that.activeItemIndex=0}if(sc_that.activeItemIndex<0&&sc_that.activeItemIndex!==NO_SELECTION){sc_that.activeItemIndex=elements.length-1}if(sc_that.activeItemIndex>=0){$(elements[sc_that.activeItemIndex]).focus()}};var prepareShift=function(selectionContext){unselectElement(selectionContext.selectedElement(),selectionContext);if(selectionContext.activeItemIndex===NO_SELECTION){selectionContext.activeItemIndex=-1}};var focusNextElement=function(selectionContext){prepareShift(selectionContext);++selectionContext.activeItemIndex;reifyIndex(selectionContext)};var focusPreviousElement=function(selectionContext){prepareShift(selectionContext);--selectionContext.activeItemIndex;reifyIndex(selectionContext)};var arrowKeyHandler=function(selectionContext,keyMap,userHandlers){return function(evt){if(evt.which===keyMap.next){focusNextElement(selectionContext);evt.preventDefault()}else{if(evt.which===keyMap.previous){focusPreviousElement(selectionContext);evt.preventDefault()}}}};var getKeyMapForDirection=function(direction){var keyMap;if(direction===fluid.a11y.orientation.HORIZONTAL){keyMap=LEFT_RIGHT_KEYMAP}else{if(direction===fluid.a11y.orientation.VERTICAL){keyMap=UP_DOWN_KEYMAP}}return keyMap};var tabKeyHandler=function(selectionContext){return function(evt){if(evt.which!==$.ui.keyCode.TAB){return }cleanUpWhenLeavingContainer(selectionContext);if(evt.shiftKey){selectionContext.focusIsLeavingContainer=true}}};var containerFocusHandler=function(selectionContext){return function(evt){var shouldOrig=selectionContext.options.autoSelectFirstItem;var shouldSelect=typeof (shouldOrig)==="function"?shouldOrig():shouldOrig;if(selectionContext.focusIsLeavingContainer){shouldSelect=false}if(shouldSelect&&evt.target===selectionContext.container.get(0)){if(selectionContext.activeItemIndex===NO_SELECTION){selectionContext.activeItemIndex=0}$(selectionContext.selectables[selectionContext.activeItemIndex]).focus()}return evt.stopPropagation()}};var containerBlurHandler=function(selectionContext){return function(evt){selectionContext.focusIsLeavingContainer=false;return evt.stopPropagation()}};var makeElementsSelectable=function(container,defaults,userOptions){var options=$.extend(true,{},defaults,userOptions);var keyMap=getKeyMapForDirection(options.direction);var selectableElements=options.selectableElements?options.selectableElements:container.find(options.selectableSelector);var that={container:container,activeItemIndex:NO_SELECTION,selectables:selectableElements,focusIsLeavingContainer:false,options:options};that.selectablesUpdated=function(focusedItem){if(typeof (that.options.selectablesTabindex)==="number"){that.selectables.fluid("tabindex",that.options.selectablesTabindex)}that.selectables.unbind("focus."+NAMESPACE_KEY);that.selectables.unbind("blur."+NAMESPACE_KEY);that.selectables.bind("focus."+NAMESPACE_KEY,selectableFocusHandler(that));that.selectables.bind("blur."+NAMESPACE_KEY,selectableBlurHandler(that));if(focusedItem){selectElement(focusedItem,that)}else{reifyIndex(that)}};that.refresh=function(){if(!that.options.selectableSelector){throw ("Cannot refresh selectable context which was not initialised by a selector")}that.selectables=container.find(options.selectableSelector);that.selectablesUpdated()};that.selectedElement=function(){return that.activeItemIndex<0?null:that.selectables[that.activeItemIndex]};if(keyMap){container.keydown(arrowKeyHandler(that,keyMap))}container.keydown(tabKeyHandler(that));container.focus(containerFocusHandler(that));container.blur(containerBlurHandler(that));that.selectablesUpdated();return that};fluid.selectable=function(target,options){target=$(target);var that=makeElementsSelectable(target,fluid.selectable.defaults,options);setData(target,CONTEXT_KEY,that);return that};fluid.selectable.select=function(target,toSelect){$(toSelect).focus()};fluid.selectable.selectNext=function(target){target=$(target);focusNextElement(getData(target,CONTEXT_KEY))};fluid.selectable.selectPrevious=function(target){target=$(target);focusPreviousElement(getData(target,CONTEXT_KEY))};fluid.selectable.currentSelection=function(target){target=$(target);var that=getData(target,CONTEXT_KEY);return $(that.selectedElement())};fluid.selectable.defaults={direction:fluid.a11y.orientation.VERTICAL,selectablesTabindex:-1,autoSelectFirstItem:true,rememberSelectionState:true,selectableSelector:".selectable",selectableElements:null,onSelect:null,onUnselect:null,onLeaveContainer:null};var checkForModifier=function(binding,evt){if(!binding.modifier){return true}var modifierKey=binding.modifier;var isCtrlKeyPresent=modifierKey&&evt.ctrlKey;var isAltKeyPresent=modifierKey&&evt.altKey;var isShiftKeyPresent=modifierKey&&evt.shiftKey;return isCtrlKeyPresent||isAltKeyPresent||isShiftKeyPresent};var makeActivationHandler=function(binding){return function(evt){var target=evt.target;if(!fluid.enabled(evt.target)){return }var code=evt.which?evt.which:evt.keyCode;if(code===binding.key&&binding.activateHandler&&checkForModifier(binding,evt)){var event=$.Event("fluid-activate");$(evt.target).trigger(event,[binding.activateHandler]);if(event.isDefaultPrevented()){evt.preventDefault()}}}};var makeElementsActivatable=function(elements,onActivateHandler,defaultKeys,options){var bindings=[];$(defaultKeys).each(function(index,key){bindings.push({modifier:null,key:key,activateHandler:onActivateHandler})});if(options&&options.additionalBindings){bindings=bindings.concat(options.additionalBindings)}setData(elements,ENABLEMENT_KEY,true);for(var i=0;i<bindings.length;++i){var binding=bindings[i];elements.keydown(makeActivationHandler(binding))}elements.bind("fluid-activate",function(evt,handler){handler=handler||onActivateHandler;return handler?handler(evt):null})};fluid.activatable=function(target,fn,options){target=$(target);makeElementsActivatable(target,fn,fluid.activatable.defaults.keys,options)};fluid.activate=function(target){$(target).trigger("fluid-activate")};fluid.activatable.defaults={keys:[$.ui.keyCode.ENTER,$.ui.keyCode.SPACE]}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/fss/css/fss-JSR168Bridge.css b/docs/include/jscripts/infusion_old/framework/fss/css/fss-JSR168Bridge.css
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/include/jscripts/infusion_old/framework/fss/css/fss-layout.css b/docs/include/jscripts/infusion_old/framework/fss/css/fss-layout.css
new file mode 100644 (file)
index 0000000..0595663
--- /dev/null
@@ -0,0 +1,115 @@
+.fl-fix{overflow:auto;zoom:1;}
+.fl-push{clear:both;}
+.fl-force-right{float:right;display:inline;}
+.fl-force-left{float:left;display:inline;}
+.fl-centered{margin-left:auto;margin-right:auto;display:block;}
+.fl-container-50{width:50px;}
+.fl-container-100{width:100px;}
+.fl-container-150{width:150px;}
+.fl-container-200{width:200px;}
+.fl-container-250{width:250px;}
+.fl-container-300{width:300px;}
+.fl-container-350{width:350px;}
+.fl-container-400{width:400px;}
+.fl-container-450{width:450px;}
+.fl-container-500{width:500px;}
+.fl-container-550{width:550px;}
+.fl-container-600{width:600px;}
+.fl-container-650{width:650px;}
+.fl-container-700{width:700px;}
+.fl-container-750{width:750px;}
+.fl-container-800{width:800px;}
+.fl-container-850{width:850px;}
+.fl-container-900{width:900px;}
+.fl-container-950{width:950px;}
+.fl-container-1000{width:1000px;}
+.fl-container-auto{width:auto;}
+.fl-container-flex{width:100%;clear:both;}
+.fl-container-flex10{width:10%;}
+.fl-container-flex20{width:20%;}
+.fl-container-flex25{width:25%;}
+.fl-container-flex30{width:30%;}
+.fl-container-flex33{width:33%;}
+.fl-container-flex40{width:40%;}
+.fl-container-flex50{width:50%;}
+.fl-container-flex60{width:60%;}
+.fl-container-flex66{width:66%;}
+.fl-container-flex75{width:75%;}
+.fl-layout-linear *,.fl-layout-linear .fl-linearEnabled{overflow:visible!important;clear:both!important;float:none!important;margin-left:0!important;margin-right:0!important;}
+.fl-layout-linear .fl-container,.fl-layout-linear .fl-container-100,.fl-layout-linear .fl-container-150,.fl-layout-linear .fl-container-200,.fl-layout-linear .fl-container-250,.fl-layout-linear .fl-container-300,.fl-layout-linear .fl-container-400,.fl-layout-linear .fl-container-750,.fl-layout-linear .fl-container-950,.fl-layout-linear .fl-container-auto,.fl-layout-linear .fl-container-flex25,.fl-layout-linear .fl-container-flex30,.fl-layout-linear .fl-container-flex33,.fl-layout-linear .fl-container-flex50,.fl-layout-linear .fl-col,.fl-layout-linear .fl-col-side,.fl-layout-linear .fl-col-flex,.fl-layout-linear .fl-col-main,.fl-layout-linear .fl-col-fixed,.fl-layout-linear .fl-col-justified{width:100%!important;margin:auto;padding:0!important;}
+.fl-layout-linear .fl-force-left,.fl-layout-linear .fl-force-right,.fl-layout-linear li{display:block!important;float:none!important;}
+.fl-layout-linear .fl-linearEnabled{width:100%!important;display:block;}
+.fl-layout-linear .fl-button-left,.fl-layout-linear .fl-button-right{padding:1em;}
+.fl-col-justified{float:left;display:inline;overflow:auto;text-align:justify;}
+.fl-col-flex2,.fl-col-flex3,.fl-col-flex4,.fl-col-flex5{overflow:auto;zoom:1;}
+.fl-col{float:left;display:inline;}
+.fl-col-flex5 .fl-col{width:18.95%;margin-left:.25%;margin-right:.25%;padding-left:.25%;padding-right:.25%;}
+.fl-col-flex4 .fl-col{width:24%;margin-left:.25%;margin-right:.25%;padding-left:.25%;padding-right:.25%;}
+.fl-col-flex3 .fl-col{width:32.33%;margin-left:.25%;margin-right:.25%;padding-left:.25%;padding-right:.25%;}
+.fl-col-flex2 .fl-col{width:48.85%;margin-left:.25%;margin-right:.25%;padding-left:.25%;padding-right:.25%;}
+.fl-col-mixed,.fl-col-mixed2,.fl-col-mixed3{overflow:auto;zoom:1;}
+.fl-col-mixed .fl-col-side{width:200px;}
+.fl-col-mixed .fl-col-side,.fl-col-mixed .fl-col-main{padding:0 10px;}
+.fl-col-mixed2 .fl-col-side{width:200px;padding:0 10px;float:left;}
+.fl-col-mixed2 .fl-col-main{margin-left:220px;padding:0 10px;}
+.fl-col-mixed3 .fl-col-main{margin:0 220px;}
+.fl-col-fixed,.fl-col-flex{padding:0 10px;}
+.fl-col-mixed .fl-col-fixed{width:200px;padding:0 10px;}
+.fl-col-mixed .fl-col-flex{margin-left:220px;padding:0 10px;}
+.fl-col-mixed-100 .fl-col-fixed{width:100px;}
+.fl-col-mixed-100 .fl-col-flex{margin-left:120px;}
+.fl-col-mixed-150 .fl-col-fixed{width:150px;}
+.fl-col-mixed-150 .fl-col-flex{margin-left:170px;}
+.fl-col-mixed-200 .fl-col-fixed{width:200px;}
+.fl-col-mixed-200 .fl-col-flex{margin-left:220px;}
+.fl-col-mixed-250 .fl-col-fixed{width:250px;}
+.fl-col-mixed-250 .fl-col-flex{margin-left:270px;}
+.fl-col-mixed-300 .fl-col-fixed{width:300px;}
+.fl-col-mixed-300 .fl-col-flex{margin-left:320px;}
+.fl-tabs{margin:.75em 0 0 0;border-bottom:1px solid #000;text-align:center;padding-bottom:.2em;}
+.fl-tabs li{list-style-type:none;display:inline;}
+.fl-tabs li a{padding:.25em 1.25em .2em;background-color:#fff;margin-left:-5px;*margin-bottom:-7px;zoom:1;border:1px solid #000;color:#999;}
+.fl-tabs-center{text-align:center;}
+.fl-tabs-left{text-align:left;padding-left:10px;}
+.fl-tabs-right{text-align:right;padding-right:15px;}
+.fl-tabs .fl-reorderer-dropMarker{padding:0 3px;background-color:#c00;margin:0 5px 0 -5px;zoom:1;}
+.fl-tabs .fl-tabs-active a{padding:.25em 1.25em;border-bottom:none;color:#000;}
+.fl-tabs-content{padding:5px;}
+.fl-listmenu{padding:0;margin:0;border-bottom-width:1px;border-bottom-style:solid;}
+.fl-listmenu li{margin:0;padding:0;list-style-type:none;border-width:1px;border-style:solid;border-bottom:none;}
+.fl-listmenu a{padding:5px 5px;display:block;zoom:1;}
+ul.fl-grid,.fl-grid ul{padding:0;margin:0;}
+.fl-grid li{list-style-type:none;display:inline;}
+.fl-grid li{float:left;width:19%;margin:.5%;height:150px;overflow:hidden;position:relative;display:inline;}
+.fl-grid li img{display:block;margin:5px auto;}
+.fl-grid li .caption{position:absolute;left:0;bottom:0;width:100%;text-align:center;height:1em;padding:3px 0;}
+.fl-icon{text-indent:-5000px;overflow:hidden;cursor:pointer;display:block;height:16px;width:16px;margin-left:5px;margin-right:5px;background-position:center center;background-repeat:no-repeat;}
+input.fl-icon{padding-left:16px;}
+.fl-button-left{float:left;margin-right:10px;padding:0 0 0 16px;background-position:left center;background-repeat:no-repeat;}
+.fl-button-right{float:right;margin-left:10px;padding:0 0 0 16px;background-position:left center;background-repeat:no-repeat;}
+.fl-button-inner{float:left;padding:5px 16px 5px 0;cursor:pointer;background-position:right center;background-repeat:no-repeat;}
+.fl-widget{padding:5px;margin-bottom:10px;}
+.fl-widget .button{margin:0 5px;}
+.fl-grabbable .fl-widget-titlebar{background-position:center top;background-repeat:no-repeat;cursor:move;}
+.fl-widget .fl-widget-titlebar h2{padding:0;margin:0;font-size:105%;}
+.fl-widget .fl-widget-titlebar .fl-button-inner{font-size:.8em;padding-bottom:.2em;padding-top:.2em;}
+.fl-widget .fl-widget-controls{margin:-1.3em 0 1.5em 0;}
+.fl-widget .fl-widget-options{margin-top:5px;padding:0 10px;}
+.fl-widget .fl-widget-options ul{margin:0;padding:0;overflow:hidden;zoom:1;}
+.fl-widget .fl-widget-options li{list-style-type:none;float:left;display:inline;padding:0 5px 0 5px;margin-left:-5px;}
+.fl-widget .fl-widget-options a{margin-right:5px;}
+.fl-widget .fl-widget-content{zoom:1;margin:5px 0 0 0;overflow:auto;}
+.fl-widget .empty *{padding-top:10px;margin-left:auto;margin-right:auto;text-align:center;}
+.fl-widget .menu{margin:0;}
+.fl-widget .toggle{width:32px;}
+.fl-widget .on{background-position:left top;}
+.fl-widget .off{background-position:left bottom;}
+.fl-controls-left li{list-style-type:none;text-align:left;}
+.fl-controls-left .fl-label{float:left;text-align:left;width:50%;margin-right:5px;}
+.fl-controls-right li{list-style-type:none;display:block;text-align:left;}
+.fl-controls-right .fl-label{float:left;text-align:right;width:50%;margin-right:5px;}
+.fl-controls-centered li{list-style-type:none;display:block;text-align:left;}
+.fl-controls-centered .fl-label{float:left;text-align:center;width:50%;margin-right:5px;}
+.fl-noBackgroundImages,.fl-noBackgroundImages *{background-image:none!important;}
+.fl-noBackgroundImages .fl-icon{text-indent:0!important;width:auto!important;background-color:transparent!important;}
+.fl-ProgEnhance-enhanced,.fl-progEnhance-enhanced{display:none;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/fss/css/fss-reset.css b/docs/include/jscripts/infusion_old/framework/fss/css/fss-reset.css
new file mode 100644 (file)
index 0000000..ccef1d8
--- /dev/null
@@ -0,0 +1,37 @@
+table{font-size:inherit;font:100%;}
+pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
+html{color:#000;background:#FFF;}
+body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}
+table{border-collapse:collapse;border-spacing:0;}
+fieldset,img{border:0;}
+address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}
+li{list-style:none;}
+caption,th{text-align:left;}
+h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
+q:before,q:after{content:'';}
+abbr,acronym{border:0;font-variant:normal;}
+sup{vertical-align:text-top;}
+sub{vertical-align:text-bottom;}
+legend{color:#000;}
+h1{font-size:138.5%;}
+h2{font-size:123.1%;}
+h3{font-size:108%;}
+h1,h2,h3{margin:1em 0;}
+h1,h2,h3,h4,h5,h6,strong{font-weight:bold;}
+abbr,acronym{border-bottom:1px dotted #000;cursor:help;}
+em{font-style:italic;}
+blockquote,ul,ol,dl{margin:1em;}
+ol,ul,dl{margin-left:2em;}
+ol li{list-style:decimal outside;}
+ul li{list-style:disc outside;}
+dl dd{margin-left:1em;}
+th,td{border:1px solid #000;padding:.5em;}
+th{font-weight:bold;text-align:center;}
+caption{margin-bottom:.5em;text-align:center;}
+p,fieldset,table,pre{margin-bottom:1em;}
+input[type=text],input[type=password],textarea{width:12.25em;*width:11.9em;}
+input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}
+html{overflow:auto;font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;}
+input,textarea,select{*font-size:100%;*font-family:sans-serif;}
+input{*overflow:visible;*padding:0 1em;}
+:focus{outline:2px solid black;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/fss/css/fss-text.css b/docs/include/jscripts/infusion_old/framework/fss/css/fss-text.css
new file mode 100644 (file)
index 0000000..ef3f4b0
--- /dev/null
@@ -0,0 +1,61 @@
+.fl-font-size-70,.fl-font-size-70 body,.fl-font-size-70 input,.fl-font-size-70 select,.fl-font-size-70 textarea{font-size:.7em!important;line-height:1em!important;}
+.fl-font-size-80,.fl-font-size-80 body,.fl-font-size-80 input,.fl-font-size-80 select,.fl-font-size-80 textarea{font-size:.8em!important;line-height:1.1em!important;}
+.fl-font-size-90,.fl-font-size-90 body,.fl-font-size-90 input,.fl-font-size-90 select,.fl-font-size-90 textarea{font-size:.9em!important;line-height:1.2em!important;}
+.fl-font-size-100,.fl-font-size-100 body,.fl-font-size-100 input,.fl-font-size-100 select,.fl-font-size-100 textarea{font-size:1em!important;line-height:1.3em!important;}
+.fl-font-size-110,.fl-font-size-110 body,.fl-font-size-110 input,.fl-font-size-110 select,.fl-font-size-110 textarea{font-size:1.1em!important;line-height:1.4em!important;}
+.fl-font-size-120,.fl-font-size-120 body,.fl-font-size-120 input,.fl-font-size-120 select,.fl-font-size-120 textarea{font-size:1.2em!important;line-height:1.5em!important;}
+.fl-font-size-130,.fl-font-size-130 body,.fl-font-size-130 input,.fl-font-size-130 select,.fl-font-size-130 textarea{font-size:1.3em!important;line-height:1.6em!important;}
+.fl-font-size-140,.fl-font-size-140 body,.fl-font-size-140 input,.fl-font-size-140 select,.fl-font-size-140 textarea{font-size:1.4em!important;line-height:1.7em!important;}
+.fl-font-size-150,.fl-font-size-150 body,.fl-font-size-150 input,.fl-font-size-150 select,.fl-font-size-150 textarea{font-size:1.5em!important;line-height:1.8em!important;}
+@media screen and(-webkit-min-device-pixel-ratio:0){[class~='fl-font-size-70'] input[type=submit],[class~='fl-font-size-70'] input[type=button]{padding:0 1em;}
+[class~='fl-font-size-80'] input[type=submit],[class~='fl-font-size-80'] input[type=button]{font-size:.8em!important;padding:0 1em;}
+[class~='fl-font-size-90'] input[type=submit],[class~='fl-font-size-90'] input[type=button]{font-size:.9em!important;padding:0 1em;}
+[class~='fl-font-size-100'] input[type=submit],[class~='fl-font-size-100'] input[type=button]{font-size:1em!important;padding:0 1em;}
+[class~='fl-font-size-110'] input[type=submit],input[type=submit][class~='fl-font-size-110'],[class~='fl-font-size-110'] input[type=button]{background-color:#fff;font-size:1.1em!important;padding:0 1em;}
+[class~='fl-font-size-120'] input[type=submit],input[type=submit][class~='fl-font-size-120'],[class~='fl-font-size-120'] input[type=button]{background-color:#fff;font-size:1.2em!important;padding:0 1em;}
+[class~='fl-font-size-130'] input[type=submit],input[type=submit][class~='fl-font-size-130'],[class~='fl-font-size-130'] input[type=button]{background-color:#fff;font-size:1.3em!important;padding:0 1em;}
+[class~='fl-font-size-140'] input[type=submit],input[type=submit][class~='fl-font-size-140'],[class~='fl-font-size-140'] input[type=button]{background-color:#fff;font-size:1.4em!important;padding:0 1em;}
+[class~='fl-font-size-150'] input[type=submit],input[type=submit][class~='fl-font-size-150'],[class~='fl-font-size-150'] input[type=button]{background-color:#fff;font-size:1.5em!important;padding:0 1em;}
+[class~='fl-font-serif'] input[type=submit],[class~='fl-font-sans'] input[type=submit],[class~='fl-font-monospace'] input[type=submit],[class~='fl-font-arial'] input[type=submit],[class~='fl-font-verdana'] input[type=submit],[class~='fl-font-times'] input[type=submit],[class~='fl-font-courier'] input[type=submit]{background-color:#fff;padding:0 1em;}
+}
+.fl-font-serif,.fl-font-serif *{font-family:Georgia,Times,"Times New Roman","Book Antiqua",serif!important;}
+.fl-font-sans,.fl-font-sans *{font-family:Tahoma,Verdana,Helvetica,sans-serif!important;}
+.fl-font-monospace,.fl-font-monospace *{font-family:"Courier New,Courier",monospace!important;}
+.fl-font-arial,.fl-font-arial *{font-family:"Arial"!important;}
+.fl-font-verdana,.fl-font-verdana *{font-family:"Verdana"!important;}
+.fl-font-times,.fl-font-times *{font-family:Georgia,Times,"Times New Roman",serif!important;}
+.fl-font-courier,.fl-font-courier *{font-family:"Courier New",Courier,monospace!important;}
+.fl-text-align-left{text-align:left;}
+.fl-text-align-right{text-align:right;}
+.fl-text-align-center{text-align:center;}
+.fl-text-align-justify{text-align:justify;}
+.fl-font-spacing-0,.fl-font-spacing-0 body,.fl-font-spacing-0 input,.fl-font-spacing-0 select,.fl-font-spacing-0 textarea{letter-spacing:0;}
+.fl-font-spacing-1,.fl-font-spacing-1 body,.fl-font-spacing-1 input,.fl-font-spacing-1 select,.fl-font-spacing-1 textarea{letter-spacing:.1em;}
+.fl-font-spacing-2,.fl-font-spacing-2 body,.fl-font-spacing-2 input,.fl-font-spacing-2 select,.fl-font-spacing-2 textarea{letter-spacing:.2em;}
+.fl-font-spacing-3,.fl-font-spacing-3 body,.fl-font-spacing-3 input,.fl-font-spacing-3 select,.fl-font-spacing-3 textarea{letter-spacing:.3em;}
+.fl-font-spacing-4,.fl-font-spacing-4 body,.fl-font-spacing-4 input,.fl-font-spacing-4 select,.fl-font-spacing-4 textarea{letter-spacing:.4em;}
+.fl-font-spacing-5,.fl-font-spacing-5 body,.fl-font-spacing-5 input,.fl-font-spacing-5 select,.fl-font-spacing-5 textarea{letter-spacing:.5em;}
+.fl-font-spacing-6,.fl-font-spacing-6 body,.fl-font-spacing-6 input,.fl-font-spacing-6 select,.fl-font-spacing-6 textarea{letter-spacing:.6em;}
+.fl-text-aqua{color:aqua!important;}
+.fl-text-black{color:black!important;}
+.fl-text-blue{color:blue!important;}
+.fl-text-fuchsia{color:fuchsia!important;}
+.fl-text-gray{color:gray!important;}
+.fl-text-green{color:green!important;}
+.fl-text-lime{color:lime!important;}
+.fl-text-maroon{color:maroon!important;}
+.fl-text-navy{color:navy!important;}
+.fl-text-olive{color:olive!important;}
+.fl-text-purple{color:purple!important;}
+.fl-text-red{color:red!important;}
+.fl-text-silver{color:silver!important;}
+.fl-text-teal{color:teal!important;}
+.fl-text-white{color:white!important;}
+.fl-text-yellow{color:yellow!important;}
+.fl-text-underline{text-decoration:underline!important;}
+.fl-text-bold{font-weight:bold!important;}
+.fl-text-larger{font-size:125%!important;}
+.fl-input-outline{border:2px solid;}
+.fl-highlight-yellow,.fl-highlight-hover-yellow:hover,.fl-highlight-focus-yellow:focus{background-color:#FF0!important;background-image:none!important;}
+.fl-highlight-green,.fl-highlight-hover-green:hover,.fl-highlight-focus-green:focus{background-color:#0F0!important;background-image:none!important;}
+.fl-highlight-blue,.fl-highlight-hover-blue:hover,.fl-highlight-focus-blue:focus{background-color:#00F!important;background-image:none!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-coal.css b/docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-coal.css
new file mode 100644 (file)
index 0000000..94cc6cf
--- /dev/null
@@ -0,0 +1,57 @@
+.fl-theme-coal :focus,.fl-theme-coal .selectable{outline:.1em solid #000;}
+.fl-theme-coal{color:#000!important;background-color:#ebebeb!important;border-color:#000;}
+.fl-theme-coal a{color:#333!important;font-weight:bold;}
+.fl-theme-coal a:hover{color:#999!important;}
+.fl-theme-coal h1{color:#000;border-bottom-width:.2em;border-bottom-style:solid;}
+.fl-theme-coal h2{color:#666;}
+.fl-theme-coal th{border:.1em solid #fff;background-color:#dfefff!important;}
+.fl-theme-coal td{border:.1em solid #999!important;}
+.fl-theme-coal .fl-textfield,.fl-theme-coal .fl-textarea{background-color:#fff;border:1px solid #000;}
+.fl-theme-coal .fl-icon{background-color:#666;}
+.fl-theme-coal .fl-inlineEdit-edit{background-color:#ebebeb!important;border:.1em solid #fff;margin:-0.1em;}
+.fl-theme-coal .fl-button-left,.fl-theme-coal .fl-button-right{color:#FFF!important;background-color:#333!important;}
+.fl-theme-coal .fl-button-left{background-image:url(../images/themes/coal/buttons-med-cap.png);}
+.fl-theme-coal .fl-button-right{background-image:url(../images/themes/coal/buttons-med-cap.png);}
+.fl-theme-coal .fl-button-inner{background-image:url(../images/themes/coal/buttons-med-bg.png);}
+.fl-theme-coal a.fl-button-left:hover,.fl-theme-coal a.fl-button-right:hover{color:#fff!important;}
+.fl-theme-coal .fl-tabs{border-bottom-color:#333;}
+.fl-theme-coal .fl-tabs li,.fl-theme-coal .fl-tabs li a{font-weight:bold;color:#fff!important;border-color:#333;border-bottom-color:#333;background-color:#666;text-decoration:none;}
+.fl-theme-coal .fl-tabs li a:hover{background-color:#333;color:#fff!important;}
+.fl-theme-coal .fl-tabs li.fl-activeTab,.fl-theme-coal .fl-tabs li.fl-activeTab:hover,.fl-theme-coal .fl-tabs li.fl-activeTab a,.fl-theme-coal .fl-tabs li.fl-activeTab a:hover,.fl-theme-coal .fl-tabs li.fl-tabs-active,.fl-theme-coal .fl-tabs li.fl-tabs-active a,.fl-theme-coal .fl-tabs li.fl-tabs-active a:hover{background-color:#ebebeb;border-bottom-color:#ebebeb;color:#000!important;}
+.fl-theme-coal .fl-tabs-content{background-color:#ebebeb;color:#000;border:1px solid #999;border-top:none;}
+.fl-theme-coal .fl-listmenu{border:1px solid #333;border-bottom-width:2px;background-color:#ebebeb;}
+.fl-theme-coal .fl-listmenu li,.fl-theme-coal .fl-listmenu li a{font-weight:bold;background-color:#ebebeb;border-color:#333;text-decoration:none;}
+.fl-theme-coal .fl-listmenu a:hover{background-color:#fff;color:#333!important;}
+.fl-theme-coal .fl-listmenu .fl-activemenu,.fl-theme-coal .fl-listmenu .fl-activemenu:hover{background-color:#fff;border-bottom-color:#999;color:#d9d9d9;}
+.fl-theme-coal .fl-grid{border:2px solid #000;background-color:#ccc;}
+.fl-theme-coal .fl-grid li{background-color:#dfefff;border:1px solid #000;}
+.fl-theme-coal .fl-grid .caption{background-color:#dfefff;color:#fff;}
+.fl-theme-coal .fl-widget{background:#333 url(../images/themes/coal/widget-bg.png) repeat-x top left;border:1px solid #000;}
+.fl-theme-coal .fl-widget h2{color:#fff;}
+.fl-theme-coal .fl-widget .fl-icon-more{background-image:url('../images/themes/coal/icon-widget-More.png');margin-left:0;}
+.fl-theme-coal .fl-widget .fl-icon-close{background-image:url('../images/themes/coal/icon-widget-Close.png');margin-right:0;}
+.fl-theme-coal .fl-grabbable .fl-widget-titlebar{background-image:url('../images/themes/coal/icon-widget-gripper.png');}
+.fl-theme-coal .fl-widget-titlebar{background-position:center top;background-repeat:no-repeat;}
+.fl-theme-coal .fl-widget-titlebar .icon{background-position:center center;}
+.fl-theme-coal .fl-widget-titlebar .fl-button-right,.fl-theme-coal .fl-widget-titlebar .fl-button-left{background-image:url(../images/themes/coal/buttons-titlebar-cap.png);text-decoration:none;}
+.fl-theme-coal .fl-widget-titlebar .fl-button-inner{background-image:url(../images/themes/coal/buttons-titlebar-bg.png);padding-bottom:.3em;padding-top:0;}
+.fl-theme-coal .fl-widget-options li{border-left:1px solid #ccc;}
+.fl-theme-coal .fl-widget-options li a{color:#ebebeb!important;}
+.fl-theme-coal .fl-widget-options li a:hover{color:#fff!important;}
+.fl-theme-coal .fl-widget-options a.icon:hover{background-color:#fff;border-color:#000;}
+.fl-theme-coal .fl-widget-content{background-color:#fff;}
+.fl-theme-coal .fl-progress-bounds{border-color:#333;background-color:#ebebeb;}
+.fl-theme-coal .fl-progress-fill{color:#fff;background-color:#999;}
+.fl-theme-coal .fl-reorderer-dropMarker{background-color:#f00!important;}
+.fl-theme-coal .fl-tabs-content-enhanced{background:#ebebeb url(../images/themes/coal/tabs-med-content-bg.png) repeat-x left top;border:none;}
+.fl-theme-coal .fl-tabs-enhanced{background:url(../images/themes/coal/tabs-med-container-bg.png) repeat-x left bottom;border-bottom:none;margin:10px 0 0;padding:5px 0 6px;*padding:0;}
+.fl-theme-coal .fl-tabs-enhanced li{background:transparent url(../images/themes/coal/tabs-med-cap.png) no-repeat left top;padding:4px 0 6px 16px;*padding-top:0;}
+.fl-theme-coal .fl-tabs-enhanced li a{background:transparent url(../images/themes/coal/tabs-med-bg.png) no-repeat right top;border:none;margin:0;padding:4px 16px 6px 0;color:#ebebeb!important;*padding-bottom:4px;}
+.fl-theme-coal .fl-tabs-enhanced li.fl-tabs-active{background:transparent url(../images/themes/coal/tabs-med-active-cap.png) no-repeat scroll left top;}
+.fl-theme-coal .fl-tabs-enhanced li.fl-tabs-active a{background:transparent url(../images/themes/coal/tabs-med-active-bg.png) no-repeat scroll right top;color:#fff!important;}
+.fl-theme-coal .fl-widget-content .fl-tabs-content-enhanced{background:#ebebeb url(../images/themes/coal/tabs-light-content-bg.png) repeat-x left top;border:none;}
+.fl-theme-coal .fl-widget-content .fl-tabs-enhanced{background:url(../images/themes/coal/tabs-light-container-bg.png) repeat-x left bottom;border-bottom:none;margin:10px 0 0;padding:5px 0 6px;*padding:0;}
+.fl-theme-coal .fl-widget-content .fl-tabs-enhanced li{background:transparent url(../images/themes/coal/tabs-light-cap.png) no-repeat left top;padding:4px 0 6px 16px;*padding-top:0;}
+.fl-theme-coal .fl-widget-content .fl-tabs-enhanced li a{background:transparent url(../images/themes/coal/tabs-light-bg.png) no-repeat right top;border:none;margin:0;padding:4px 16px 6px 0;color:#ebebeb!important;*padding-bottom:4px;}
+.fl-theme-coal .fl-widget-content .fl-tabs-enhanced li.fl-tabs-active{background:transparent url(../images/themes/coal/tabs-light-active-cap.png) no-repeat scroll left top;}
+.fl-theme-coal .fl-widget-content .fl-tabs-enhanced li.fl-tabs-active a{background:transparent url(../images/themes/coal/tabs-light-active-bg.png) no-repeat scroll right top;color:#fff!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-debug.css b/docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-debug.css
new file mode 100644 (file)
index 0000000..7e658bd
--- /dev/null
@@ -0,0 +1,18 @@
+.fl-theme-debug{color:#fff;background-color:#000;}
+.fl-theme-debug a{color:#F00;}
+.outline *{outline:1px solid #f00;}
+.fl-theme-debug div{background-color:#292929;}
+.fl-theme-debug div div{background-color:#525252;}
+.fl-theme-debug div div div{background-color:#7b7b7b;}
+.fl-theme-debug div div div div{background-color:#a4a4a4;}
+.fl-theme-debug div div div div div{background-color:#cdcdcd;}
+.fl-theme-debug div div div div div div{background-color:#f6f6f6;}
+.fl-theme-debug div div div div div div div{background-color:#fafafa;}
+.fl-theme-debug div div div div div div div div{background-color:#f5f5f5;}
+.fl-theme-debug div div div div div div div div div{background-color:#f0f0f0;}
+.fl-theme-debug div div div div div div div div div div{background-color:#ebebeb;}
+.fl-theme-debug div div div div div div div div div div div{background-color:#e6e6e6;}
+.fl-theme-debug div div div div div div div div div div div div{background-color:#e1e1e1;}
+.fl-theme-debug div div div div div div div div div div div div div{background-color:#dcdcdc;}
+.fl-theme-debug div div div div div div div div div div div div div div{background-color:#d7d7d7;}
+.fl-theme-debug div div div div div div div div div div div div div div div{background-color:#d2d2d2;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-hc.css b/docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-hc.css
new file mode 100644 (file)
index 0000000..e6cc0e4
--- /dev/null
@@ -0,0 +1,35 @@
+.fl-theme-hc :focus,.fl-theme-hc .selectable{outline:.2em solid #F00;}
+.fl-theme-hc{color:#000!important;background-color:#fff!important;}
+.fl-theme-hc div,.fl-theme-hc input{color:#000;background-color:#fff;border-color:#000;}
+.fl-theme-hc .fl-knockout{background:transparent!important;color:#000;}
+.fl-theme-hc a{color:#000!important;font-weight:bold;background-color:#fff!important;}
+.fl-theme-hc a:hover{color:#fff!important;background-color:#000!important;}
+.fl-theme-hc a:hover *{color:#fff!important;background-color:#000!important;}
+.fl-theme-hc h1,.fl-theme-hc h2,.fl-theme-hc h3,.fl-theme-hc h4,.fl-theme-hc h5,.fl-theme-hc h6{color:#000!important;background-color:#fff!important;border-color:#000!important;border-bottom:.1em dashed #000!important;}
+.fl-theme-hc th{border:.1em solid #000;background-color:#000!important;color:#fff!important;}
+.fl-theme-hc td{border:.1em solid #000;}
+.fl-theme-hc .fl-inlineEdit-edit{background-color:#000!important;color:#fff!important;border:.1em solid #fff;padding:.1em;margin:-0.1em;}
+.fl-theme-hc .fl-tabs{border-bottom-color:#000;}
+.fl-theme-hc .fl-tabs li,.fl-theme-hc .fl-tabs li *{border-color:#000;border-bottom-color:#000;}
+.fl-theme-hc .fl-tabs li{background-color:#000;}
+.fl-theme-hc .fl-tabs li *{color:#fff!important;font-weight:bold;background-color:#000!important;text-decoration:none;}
+.fl-theme-hc .fl-tabs li:hover,.fl-theme-hc .fl-tabs li:hover *,.fl-theme-hc .fl-tabs li a:hover{color:#000!important;background-color:#fff!important;}
+.fl-theme-hc .fl-tabs li.fl-tabs-active,.fl-theme-hc .fl-tabs li.fl-tabs-active a,.fl-theme-hc .fl-tabs li.fl-tabs-active a:hover,.fl-theme-hc .fl-tabs li.fl-activeTab,.fl-theme-hc .fl-tabs li.fl-activeTab:hover,.fl-theme-hc .fl-tabs li.fl-activeTab a,.fl-theme-hc .fl-tabs li.fl-activeTab a:hover{background-color:#fff!important;border-bottom-color:#fff;color:#000!important;}
+.fl-theme-hc .fl-tab-content{background-color:#fff;color:#000;}
+.fl-theme-hc .fl-listmenu{border:1px solid #000;border-bottom-width:2px;background-color:#fff;}
+.fl-theme-hc .fl-listmenu li,.fl-theme-hc .fl-listmenu li a{font-weight:bold;color:#000;background-color:#fff;border-color:#000;text-decoration:none;}
+.fl-theme-hc .fl-listmenu a:hover{background-color:#fff;color:#fff;}
+.fl-theme-hc .fl-listmenu .fl-activemenu,.fl-theme-hc .fl-listmenu .fl-activemenu:hover{background-color:#fff;border-bottom-color:#fff;color:#508cc9;}
+.fl-theme-hc .fl-button-right,.fl-theme-hc .fl-button-left,.fl-theme-hc .fl-button-inner{padding:0;}
+.fl-theme-hc .fl-widget{background-color:#000;border:1px solid #fff;}
+.fl-theme-hc .fl-widget h2{color:#fff;}
+.fl-theme-hc .fl-widget a{color:#000;}
+.fl-theme-hc .fl-widget .fl-icon{color:#000;background-image:none;background-color:#fff;text-indent:0;width:auto;height:auto;margin-left:0;padding:0 2px;display:inline;font-weight:bold;}
+.fl-theme-hc .fl-widget .fl-widget-titlebar{margin-bottom:3px;}
+.fl-theme-hc .fl-widget .fl-widget-options{padding:0;}
+.fl-theme-hc .fl-widget .fl-widget-options li{border-left:1px solid #fff;}
+.fl-theme-hc .fl-widget .fl-widget-options a{color:#fff;}
+.fl-theme-hc .fl-widget .fl-widget-content{background-color:#fff;}
+.fl-theme-hc .fl-progress-bounds{border-color:#000;background-color:#fff;}
+.fl-theme-hc .fl-progress-fill{color:#fff;background-color:#000;}
+.fl-theme-hc .fl-reorderer-dropMarker{background-color:#f00!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-hci.css b/docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-hci.css
new file mode 100644 (file)
index 0000000..7a3a932
--- /dev/null
@@ -0,0 +1,35 @@
+.fl-theme-hci :focus,.fl-theme-hci .selectable{outline:.2em solid #F00;}
+.fl-theme-hci{color:#fff!important;background-color:#000!important;}
+.fl-theme-hci div,.fl-theme-hci input{color:#fff!important;background-color:#000!important;}
+.fl-theme-hci .fl-knockout{background:transparent!important;color:#fff;}
+.fl-theme-hci a{color:#fff!important;font-weight:bold;background-color:#000!important;}
+.fl-theme-hci a:hover{color:#000!important;background-color:#fff!important;}
+.fl-theme-hci a:hover *{color:#000!important;background-color:#fff!important;}
+.fl-theme-hci h1,.fl-theme-hci h2,.fl-theme-hci h3,.fl-theme-hci h4,.fl-theme-hci h5,.fl-theme-hci h6{color:#fff;background-color:#000;border-color:#fff;border-bottom:.1em dashed #fff;}
+.fl-theme-hci th{border:.1em solid #fff;background-color:#fff!important;color:#000!important;}
+.fl-theme-hci td{border:.1em solid #fff;}
+.fl-theme-hci .fl-inlineEdit-edit{background-color:#fff!important;color:#000!important;border:.1em solid #000;padding:.1em;margin:-0.1em;}
+.fl-theme-hci .fl-tabs{border-bottom-color:#fff;}
+.fl-theme-hci .fl-tabs li,.fl-theme-hci .fl-tabs li *{border-color:#fff;border-bottom-color:#fff;}
+.fl-theme-hci .fl-tabs li{background-color:#fff;}
+.fl-theme-hci .fl-tabs li *{color:#000!important;font-weight:bold;background-color:#fff!important;text-decoration:none;}
+.fl-theme-hci .fl-tabs li:hover,.fl-theme-hci .fl-tabs li:hover *,.fl-theme-hci .fl-tabs li a:hover{color:#fff!important;background-color:#000!important;}
+.fl-theme-hci .fl-tabs li.fl-tabs-active,.fl-theme-hci .fl-tabs li.fl-tabs-active a,.fl-theme-hci .fl-tabs li.fl-tabs-active a:hover,.fl-theme-hci .fl-tabs li.fl-activeTab,.fl-theme-hci .fl-tabs li.fl-activeTab:hover,.fl-theme-hci .fl-tabs li.fl-activeTab a,.fl-theme-hci .fl-tabs li.fl-activeTab a:hover{background-color:#000!important;border-bottom-color:#000;color:#fff!important;}
+.fl-theme-hci .fl-tab-content{background-color:#000;border:1px solid #fff;border-top:none;color:#fff;}
+.fl-theme-hci .fl-listmenu{border:1px solid #fff;border-bottom-width:2px;background-color:#000;}
+.fl-theme-hci .fl-listmenu li,.fl-theme-hci .fl-listmenu li a{font-weight:bold;color:#fff;background-color:#dfefff;border-color:#fff;text-decoration:none;}
+.fl-theme-hci .fl-listmenu a:hover{background-color:#5a95cf;color:#000;}
+.fl-theme-hci .fl-listmenu .fl-activemenu,.fl-theme-hci .fl-listmenu .fl-activemenu:hover{background-color:#000;border-bottom-color:#000;color:#508cc9;}
+.fl-theme-hci .fl-button-right,.fl-theme-hci .fl-button-left,.fl-theme-hci .fl-button-inner{padding:0;}
+.fl-theme-hci .fl-widget{background-color:#fff!important;border:1px solid #000;}
+.fl-theme-hci .fl-widget h2{color:#000;background-color:#fff;}
+.fl-theme-hci .fl-widget a{color:#fff;}
+.fl-theme-hci .fl-widget .fl-icon{color:#fff;background-image:none;background-color:#000;text-indent:0;width:auto;height:auto;margin-left:0;padding:0 2px;display:inline;font-weight:bold;}
+.fl-theme-hci .fl-widget .fl-widget-titlebar{margin-bottom:3px;}
+.fl-theme-hci .fl-widget .fl-widget-options{padding:0;}
+.fl-theme-hci .fl-widget .fl-widget-options li{border-left:1px solid #000;}
+.fl-theme-hci .fl-widget .fl-widget-options a{color:#000;}
+.fl-theme-hci .fl-widget .fl-widget-content{background-color:#000;}
+.fl-theme-hci .fl-progress-bounds{border-color:#fff;background-color:#000;}
+.fl-theme-hci .fl-progress-fill{color:#000;background-color:#fff;}
+.fl-theme-hci .fl-reorderer-dropMarker{background-color:#f00!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-mist.css b/docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-mist.css
new file mode 100644 (file)
index 0000000..ec71b2f
--- /dev/null
@@ -0,0 +1,50 @@
+.fl-theme-mist :focus,.fl-theme-mist .selectable{outline:.1em solid #F00;}
+.fl-theme-mist{color:#000!important;background-color:#f4f4f4!important;border-color:#4070a1;}
+.fl-theme-mist a{color:#5a95cf!important;font-weight:bold;}
+.fl-theme-mist a:hover{color:#6DB5FB!important;}
+.fl-theme-mist h1{color:#4070a1;border-bottom-width:.2em;border-bottom-style:solid;}
+.fl-theme-mist h2{color:#5a95cf;}
+.fl-theme-mist th{border:.1em solid #5a95cf;background-color:#dfefff!important;}
+.fl-theme-mist td{border:.1em solid #999!important;}
+.fl-theme-mist .fl-textfield,.fl-theme-mist .fl-textarea{border:1px solid #5a95cf;border-bottom-color:#5a95cf;border-right-color:#5a95cf;background-color:#dfefff;}
+.fl-theme-mist .fl-icon{background-color:#5a95cf;}
+.fl-theme-mist .fl-inlineEdit-edit{background-color:#dfefff!important;border:.1em solid #5a95cf;margin:-0.1em;}
+.fl-theme-mist .fl-button-left{background-image:url(../images/themes/mist/buttons-med-cap.png);}
+.fl-theme-mist .fl-button-right{background-image:url(../images/themes/mist/buttons-med-cap.png);}
+.fl-theme-mist .fl-button-inner{background-image:url(../images/themes/mist/buttons-med-bg.png);}
+.fl-theme-mist .fl-tabs{border-bottom-color:#4070a1;}
+.fl-theme-mist .fl-tabs li,.fl-theme-mist .fl-tabs li a{font-weight:bold;color:#4070a1;border-color:#4070a1;border-bottom-color:#4070a1;text-decoration:none;background-color:#dfefff;}
+.fl-theme-mist .fl-tabs li a:hover{background-color:#5a95cf;color:#fff!important;}
+.fl-theme-mist .fl-tabs li.fl-activeTab,.fl-theme-mist .fl-tabs li.fl-activeTab:hover,.fl-theme-mist .fl-tabs li.fl-activeTab a,.fl-theme-mist .fl-tabs li.fl-activeTab a:hover .fl-theme-mist .fl-tabs li.fl-tabs-active,.fl-theme-mist .fl-tabs li.fl-tabs-active a,.fl-theme-mist .fl-tabs li.fl-tabs-active a:hover{background-color:#f4f4f4;border-bottom-color:#f4f4f4;color:#508cc9!important;}
+.fl-theme-mist .fl-tabs-content{background-color:#f4f4f4;color:#000;border:1px solid #61c5ff;border-top:none;margin-top:-4px;}
+.fl-theme-mist .fl-listmenu{border:1px solid #4070a1;border-bottom-width:2px;background-color:#fff;}
+.fl-theme-mist .fl-listmenu li,.fl-theme-mist .fl-listmenu li a{font-weight:bold;color:#4070a1;background-color:#dfefff;border-color:#4070a1;text-decoration:none;}
+.fl-theme-mist .fl-listmenu li a:hover{background-color:#5a95cf;color:#fff!important;}
+.fl-theme-mist .fl-listmenu .fl-activemenu,.fl-theme-mist .fl-listmenu .fl-activemenu:hover{background-color:#fff;border-bottom-color:#fff;color:#508cc9;}
+.fl-theme-mist .fl-grid{border:2px solid #4070a1;background-color:#fff;}
+.fl-theme-mist .fl-grid li{background-color:#dfefff;border:1px solid #4070a1;}
+.fl-theme-mist .fl-grid .caption{background-color:#dfefff;color:#5a95cf;}
+.fl-theme-mist .fl-widget{background:#efefef url(../images/themes/mist/widget-bg.png) repeat-x top left;border:1px solid #CCC;}
+.fl-theme-mist .fl-widget h2{color:#000;}
+.fl-theme-mist .fl-widget .fl-icon-more{background-image:url('../images/themes/mist/icon-widget-More.png');margin-left:0;}
+.fl-theme-mist .fl-widget .fl-icon-close{background-image:url('../images/themes/mist/icon-widget-Close.png');margin-right:0;}
+.fl-theme-mist .fl-grabbable .fl-widget-titlebar{background-image:url('../images/themes/mist/icon-widget-gripper.png');}
+.fl-theme-mist .fl-widget-titlebar .icon{background-position:center center;}
+.fl-theme-mist .fl-widget-titlebar .fl-button-right,.fl-theme-mist .fl-widget-titlebar .fl-button-left{color:#4070a1!important;background-image:url(../images/themes/mist/buttons-titlebar-cap.png);text-decoration:none;}
+.fl-theme-mist .fl-widget-titlebar .fl-button-inner{background-image:url(../images/themes/mist/buttons-titlebar-bg.png);}
+.fl-theme-mist .fl-widget-options li{border-left:1px solid #ccc;}
+.fl-theme-mist .fl-widget-options a.icon:hover{background-color:#5a95cf;border-color:#000;}
+.fl-theme-mist .fl-widget-content{background-color:#fff;}
+.fl-theme-mist .fl-progress-bounds{border-color:#999;background-color:#fff;}
+.fl-theme-mist .fl-progress-fill{color:#4070a1;background-color:#000;}
+.fl-theme-mist .fl-reorderer-dropMarker{background-color:#f00!important;}
+.fl-theme-mist .fl-tabs-enhanced{background:url(../images/themes/mist/tabs-med-container-bg.png) repeat-x left bottom;border-bottom:none;margin:10px 1px 0;padding:5px 0 6px;*padding:2px 0;}
+.fl-theme-mist .fl-tabs-enhanced li{background:transparent url(../images/themes/mist/tabs-med-cap.png) no-repeat left top;padding:4px 0 6px 16px;*padding-top:0;}
+.fl-theme-mist .fl-tabs-enhanced li a{background:transparent url(../images/themes/mist/tabs-med-bg.png) no-repeat right top;border:none;margin:0;padding:4px 16px 6px 0;color:#666!important;*padding-bottom:4px;}
+.fl-theme-mist .fl-tabs-enhanced li.fl-tabs-active{background:transparent url(../images/themes/mist/tabs-med-active-cap.png) no-repeat scroll left top;}
+.fl-theme-mist .fl-tabs-enhanced li.fl-tabs-active a{background:transparent url(../images/themes/mist/tabs-med-active-bg.png) no-repeat scroll right top;color:#000!important;}
+.fl-theme-mist .fl-widget-content .fl-tabs-enhanced{background:url(../images/themes/mist/tabs-light-container-bg.png) repeat-x left bottom;border-bottom:none;margin:10px 1px 0;padding:5px 0 6px;*padding:2px 0;}
+.fl-theme-mist .fl-widget-content .fl-tabs-enhanced li{background:transparent url(../images/themes/mist/tabs-light-cap.png) no-repeat left top;padding:4px 0 6px 16px;*padding-top:0;}
+.fl-theme-mist .fl-widget-content .fl-tabs-enhanced li a{background:transparent url(../images/themes/mist/tabs-light-bg.png) no-repeat right top;border:none;margin:0;padding:4px 16px 6px 0;color:#666!important;*padding-bottom:4px;}
+.fl-theme-mist .fl-widget-content .fl-tabs-enhanced li.fl-tabs-active{background:transparent url(../images/themes/mist/tabs-light-active-cap.png) no-repeat scroll left top;}
+.fl-theme-mist .fl-widget-content .fl-tabs-enhanced li.fl-tabs-active a{background:transparent url(../images/themes/mist/tabs-light-active-bg.png) no-repeat scroll right top;color:#000!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-rust.css b/docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-rust.css
new file mode 100644 (file)
index 0000000..855b388
--- /dev/null
@@ -0,0 +1,30 @@
+.fl-theme-rust :focus,.fl-theme-rust .selectable{outline:.2em solid #662e0f;}
+.fl-theme-rust{color:#000!important;background-color:#F2E0B6!important;border-color:#916535;}
+.fl-theme-rust .fl-knockout{background:transparent;color:#000;}
+.fl-theme-rust a{color:#916535!important;}
+.fl-theme-rust a:hover{color:#914E38!important;}
+.fl-theme-rust h1{color:#000;border-bottom-width:1px;border-bottom-style:dotted;}
+.fl-theme-rust h2{color:#453A2E;}
+.fl-theme-rust th{border:.1em solid #453A2E;background-color:#917A61!important;color:#fff!important;}
+.fl-theme-rust td{border:.1em solid #453A2E!important;}
+.fl-theme-rust .fl-inlineEdit-edit{background-color:#dfefff;border:1px solid #5a95cf;margin:-1px;}
+.fl-theme-rust .fl-wrapper-widget{border:3px solid #dfefff;background-color:#333;color:#fff;}
+.fl-theme-rust .fl-wrapper-callout{border-color:#999;background-color:#dfefff;}
+.fl-theme-rust .fl-tabs{border-bottom-color:#916535;}
+.fl-theme-rust .fl-tabs li{background-color:#F2E0B6;}
+.fl-theme-rust .fl-tabs li,.fl-theme-rust .fl-tabs li a{font-weight:bold;border-color:#916535;border-bottom-color:#916535;text-decoration:none;}
+.fl-theme-rust .fl-tabs li:hover,.fl-theme-rust .fl-tabs li:hover a,.fl-theme-rust .fl-tabs li a:hover{background-color:#662e0f;color:#fff!important;}
+.fl-theme-rust .fl-tabs li.fl-tabs-active,.fl-theme-rust .fl-tabs li.fl-tabs-active a,.fl-theme-rust .fl-tabs li.fl-tabs-active a:hover,.fl-theme-rust .fl-tabs li.fl-activeTab,.fl-theme-rust .fl-tabs li.fl-activeTab:hover,.fl-theme-rust .fl-tabs li.fl-activeTab a,.fl-theme-rust .fl-tabs li.fl-activeTab a:hover{background-color:#FFFBC2;border-bottom-color:#FFFBC2;color:#916535!important;}
+.fl-theme-rust .fl-tab-content{background-color:#FFFBC2;color:#000;border:1px solid #916535;border-top:none;}
+.fl-theme-rust .fl-listmenu{border:1px solid #4070a1;background-color:#fff;}
+.fl-theme-rust .fl-listmenu li,.fl-theme-rust .fl-listmenu li a{font-weight:bold;color:#4070a1;background-color:#fff;border-color:#4070a1;text-decoration:none;}
+.fl-theme-rust .fl-listmenu a:hover{background-color:#5a95cf;color:#fff;}
+.fl-theme-rust .fl-listmenu .fl-activemenu,.fl-theme-rust .fl-listmenu .fl-activemenu:hover{background-color:#fff;border-bottom-color:#fff;color:#508cc9;}
+.fl-theme-rust .fl-widget{background:#662e0f url(../images/themes/rust/widget-earmark.png) no-repeat top left;}
+.fl-theme-rust .fl-widget h2{color:#FFFBC2;}
+.fl-theme-rust .grabbable{background-image:url('../images/themes/rust/gripper.png');}
+.fl-theme-rust .fl-widget-titlebar .icon{background-position:center center;}
+.fl-theme-rust .fl-widget-options li{border-left:1px solid #cf923e;}
+.fl-theme-rust .fl-widget-options a{color:#cf923e!important;}
+.fl-theme-rust .fl-widget-options a.icon:hover{background-color:#cf923e;border-color:#fffbc2;}
+.fl-theme-rust .fl-widget-content{background-color:#FFFBC2!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-slate.css b/docs/include/jscripts/infusion_old/framework/fss/css/fss-theme-slate.css
new file mode 100644 (file)
index 0000000..da88d04
--- /dev/null
@@ -0,0 +1,51 @@
+.fl-theme-slate :focus,.fl-theme-slate .selectable{outline:.1em solid #000;}
+.fl-theme-slate{color:#000!important;background-color:#ccc!important;border-color:#999;}
+.fl-theme-slate a{color:#ebebeb!important;font-weight:bold;}
+.fl-theme-slate a:hover{color:#fff!important;}
+.fl-theme-slate h1{color:#999;border-bottom-width:.2em;border-bottom-style:solid;}
+.fl-theme-slate h2{color:#fff;}
+.fl-theme-slate th{border:.1em solid #fff;background-color:#dfefff!important;}
+.fl-theme-slate td{border:.1em solid #999!important;}
+.fl-theme-slate .fl-textfield,.fl-theme-slate .fl-textarea{background-color:#ccc;border:1px solid #666;}
+.fl-theme-slate .fl-icon{background-color:#ebebeb;}
+.fl-theme-slate .fl-inlineEdit-edit{background-color:#dfefff!important;border:.1em solid #fff;margin:-0.1em;}
+.fl-theme-slate .fl-button-left,.fl-theme-slate .fl-button-right{color:#FFF!important;background-color:#999!important;}
+.fl-theme-slate .fl-button-left{background-image:url(../images/themes/slate/buttons-med-cap.png);}
+.fl-theme-slate .fl-button-right{background-image:url(../images/themes/slate/buttons-med-cap.png);}
+.fl-theme-slate .fl-button-inner{background-image:url(../images/themes/slate/buttons-med-bg.png);}
+.fl-theme-slate .fl-tabs{border-bottom-color:#999;}
+.fl-theme-slate .fl-tabs li,.fl-theme-slate .fl-tabs li a{font-weight:bold;color:#999;border-color:#999;border-bottom-color:#999;background-color:#666;text-decoration:none;}
+.fl-theme-slate .fl-tabs li a:hover{background-color:#999;color:#fff!important;}
+.fl-theme-slate .fl-tabs li.fl-activeTab,.fl-theme-slate .fl-tabs li.fl-activeTab:hover,.fl-theme-slate .fl-tabs li.fl-activeTab a,.fl-theme-slate .fl-tabs li.fl-activeTab a:hover,.fl-theme-slate .fl-tabs li.fl-tabs-active,.fl-theme-slate .fl-tabs li.fl-tabs-active a,.fl-theme-slate .fl-tabs li.fl-tabs-active a:hover{background-color:#ebebeb;border-bottom-color:#ccc;color:#000!important;}
+.fl-theme-slate .fl-tabs-content{background-color:#ebebeb;color:#000;border:1px solid #999;border-top:none;}
+.fl-theme-slate .fl-listmenu{border:1px solid #999;border-bottom-width:2px;background-color:#ccc;}
+.fl-theme-slate .fl-listmenu li,.fl-theme-slate .fl-listmenu li a{font-weight:bold;background-color:#999;border-color:#ccc;text-decoration:none;}
+.fl-theme-slate .fl-listmenu a:hover{background-color:#ebebeb;color:#000!important;}
+.fl-theme-slate .fl-listmenu .fl-activemenu,.fl-theme-slate .fl-listmenu .fl-activemenu:hover{background-color:#ccc;border-bottom-color:#ccc;color:#d9d9d9;}
+.fl-theme-slate .fl-grid{border:2px solid #999;background-color:#ccc;}
+.fl-theme-slate .fl-grid li{background-color:#dfefff;border:1px solid #999;}
+.fl-theme-slate .fl-grid .caption{background-color:#dfefff;color:#fff;}
+.fl-theme-slate .fl-widget{background:#ccc url(../images/themes/slate/widget-bg.png) repeat-x top left;border:1px solid #666;}
+.fl-theme-slate .fl-widget h2{color:#ccc;}
+.fl-theme-slate .fl-widget .fl-icon-more{background-image:url('../images/themes/slate/icon-widget-More.png');margin-left:0;}
+.fl-theme-slate .fl-widget .fl-icon-close{background-image:url('../images/themes/slate/icon-widget-Close.png');margin-right:0;}
+.fl-theme-slate .fl-grabbable .fl-widget-titlebar{background-image:url('../images/themes/slate/icon-widget-gripper.png');}
+.fl-theme-slate .fl-widget-titlebar .icon{background-position:center center;}
+.fl-theme-slate .fl-widget-titlebar .fl-button-right,.fl-theme-slate .fl-widget-titlebar .fl-button-left{color:#333!important;background-image:url(../images/themes/slate/buttons-titlebar-cap.png);text-decoration:none;}
+.fl-theme-slate .fl-widget-titlebar .fl-button-inner{background-image:url(../images/themes/slate/buttons-titlebar-bg.png);padding-bottom:.3em;padding-top:0;}
+.fl-theme-slate .fl-widget-options li{border-left:1px solid #ccc;}
+.fl-theme-slate .fl-widget-options a.icon:hover{background-color:#fff;border-color:#000;}
+.fl-theme-slate .fl-widget-content{background-color:#bfbfbf;}
+.fl-theme-slate .fl-progress-bounds{border-color:#999;background-color:#ccc;}
+.fl-theme-slate .fl-progress-fill{color:#999;background-color:#000;}
+.fl-theme-slate .fl-reorderer-dropMarker{background-color:#f00!important;}
+.fl-theme-slate .fl-tabs-enhanced{background:url(../images/themes/slate/tabs-light-container-bg.png) repeat-x left bottom;border-bottom:none;margin:10px 1px 0;padding:5px 0 6px;*padding:0;}
+.fl-theme-slate .fl-tabs-enhanced li{background:transparent url(../images/themes/slate/tabs-light-cap.png) no-repeat left top;padding:4px 0 6px 16px;*padding-top:0;}
+.fl-theme-slate .fl-tabs-enhanced li a{background:transparent url(../images/themes/slate/tabs-light-bg.png) no-repeat right top;border:none;margin:0;padding:4px 16px 6px 0;color:#666!important;*padding-bottom:4px;}
+.fl-theme-slate .fl-tabs-enhanced li.fl-tabs-active{background:transparent url(../images/themes/slate/tabs-light-active-cap.png) no-repeat scroll left top;}
+.fl-theme-slate .fl-tabs-enhanced li.fl-tabs-active a{background:transparent url(../images/themes/slate/tabs-light-active-bg.png) no-repeat scroll right top;color:#000!important;}
+.fl-theme-slate .fl-widget-content .fl-tabs-enhanced{background:url(../images/themes/slate/tabs-med-container-bg.png) repeat-x left bottom;border-bottom:none;margin:10px 1px 0;padding:5px 0 6px;*padding:0;}
+.fl-theme-slate .fl-widget-content .fl-tabs-enhanced li{background:transparent url(../images/themes/slate/tabs-med-cap.png) no-repeat left top;padding:4px 0 6px 16px;*padding-top:0;}
+.fl-theme-slate .fl-widget-content .fl-tabs-enhanced li a{background:transparent url(../images/themes/slate/tabs-med-bg.png) no-repeat right top;border:none;margin:0;padding:4px 16px 6px 0;color:#666!important;*padding-bottom:4px;}
+.fl-theme-slate .fl-widget-content .fl-tabs-enhanced li.fl-tabs-active{background:transparent url(../images/themes/slate/tabs-med-active-cap.png) no-repeat scroll left top;}
+.fl-theme-slate .fl-widget-content .fl-tabs-enhanced li.fl-tabs-active a{background:transparent url(../images/themes/slate/tabs-med-active-bg.png) no-repeat scroll right top;color:#000!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/exclamation.png b/docs/include/jscripts/infusion_old/framework/fss/images/exclamation.png
new file mode 100644 (file)
index 0000000..056f680
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/exclamation.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/gripper.png b/docs/include/jscripts/infusion_old/framework/fss/images/gripper.png
new file mode 100644 (file)
index 0000000..5e7cc70
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/gripper.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/_common/exclamation.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/_common/exclamation.png
new file mode 100644 (file)
index 0000000..056f680
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/_common/exclamation.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/_common/gloss_25_repeater.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/_common/gloss_25_repeater.png
new file mode 100644 (file)
index 0000000..5e7c7a7
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/_common/gloss_25_repeater.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/_common/gripper.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/_common/gripper.png
new file mode 100644 (file)
index 0000000..5e7cc70
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/_common/gripper.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-light-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-light-bg.png
new file mode 100644 (file)
index 0000000..606c730
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-light-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-light-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-light-cap.png
new file mode 100644 (file)
index 0000000..4b43a2e
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-light-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-med-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-med-bg.png
new file mode 100644 (file)
index 0000000..08adba5
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-med-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-med-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-med-cap.png
new file mode 100644 (file)
index 0000000..d5b284b
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-med-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-titlebar-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-titlebar-bg.png
new file mode 100644 (file)
index 0000000..4979328
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-titlebar-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-titlebar-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-titlebar-cap.png
new file mode 100644 (file)
index 0000000..20acddc
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/buttons-titlebar-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/coal-icons.psd b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/coal-icons.psd
new file mode 100644 (file)
index 0000000..795b414
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/coal-icons.psd differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-menu-Delete.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-menu-Delete.png
new file mode 100644 (file)
index 0000000..85e3070
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-menu-Delete.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-Close.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-Close.png
new file mode 100644 (file)
index 0000000..1d8bab3
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-Close.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-Less.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-Less.png
new file mode 100644 (file)
index 0000000..395067b
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-Less.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-More.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-More.png
new file mode 100644 (file)
index 0000000..6ed2263
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-More.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-ShowSettings.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-ShowSettings.png
new file mode 100644 (file)
index 0000000..7f43e1d
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-ShowSettings.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-gripper.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-gripper.png
new file mode 100644 (file)
index 0000000..ce26271
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/icon-widget-gripper.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-active-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-active-bg.png
new file mode 100644 (file)
index 0000000..636b637
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-active-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-active-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-active-cap.png
new file mode 100644 (file)
index 0000000..3099399
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-active-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-bg.png
new file mode 100644 (file)
index 0000000..70c3025
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-cap.png
new file mode 100644 (file)
index 0000000..55b6167
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-container-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-container-bg.png
new file mode 100644 (file)
index 0000000..1fe4dd0
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-container-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-content-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-content-bg.png
new file mode 100644 (file)
index 0000000..6feba9c
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-light-content-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-active-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-active-bg.png
new file mode 100644 (file)
index 0000000..742fe13
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-active-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-active-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-active-cap.png
new file mode 100644 (file)
index 0000000..4df34a5
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-active-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-bg.png
new file mode 100644 (file)
index 0000000..9dfff09
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-cap.png
new file mode 100644 (file)
index 0000000..2d22070
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-container-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-container-bg.png
new file mode 100644 (file)
index 0000000..112a5b7
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-container-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-content-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-content-bg.png
new file mode 100644 (file)
index 0000000..6feba9c
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/tabs-med-content-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/widget-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/widget-bg.png
new file mode 100644 (file)
index 0000000..4579055
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/coal/widget-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-light-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-light-bg.png
new file mode 100644 (file)
index 0000000..e617b68
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-light-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-light-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-light-cap.png
new file mode 100644 (file)
index 0000000..42e7286
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-light-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-med-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-med-bg.png
new file mode 100644 (file)
index 0000000..6704779
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-med-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-med-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-med-cap.png
new file mode 100644 (file)
index 0000000..8313382
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-med-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-titlebar-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-titlebar-bg.png
new file mode 100644 (file)
index 0000000..50cd421
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-titlebar-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-titlebar-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-titlebar-cap.png
new file mode 100644 (file)
index 0000000..8730c71
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/buttons-titlebar-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-menu-Delete.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-menu-Delete.png
new file mode 100644 (file)
index 0000000..85e3070
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-menu-Delete.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-options-ListOrGrid.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-options-ListOrGrid.png
new file mode 100644 (file)
index 0000000..b39267f
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-options-ListOrGrid.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-Close.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-Close.png
new file mode 100644 (file)
index 0000000..347e288
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-Close.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-Less.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-Less.png
new file mode 100644 (file)
index 0000000..fdd1a3d
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-Less.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-More.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-More.png
new file mode 100644 (file)
index 0000000..164ee2b
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-More.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-ShowSettings.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-ShowSettings.png
new file mode 100644 (file)
index 0000000..7f43e1d
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-ShowSettings.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-gripper.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-gripper.png
new file mode 100644 (file)
index 0000000..c0b6b97
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/icon-widget-gripper.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/mist-icons.psd b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/mist-icons.psd
new file mode 100644 (file)
index 0000000..8c8472e
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/mist-icons.psd differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-active-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-active-bg.png
new file mode 100644 (file)
index 0000000..96036b2
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-active-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-active-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-active-cap.png
new file mode 100644 (file)
index 0000000..29adc21
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-active-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-bg.png
new file mode 100644 (file)
index 0000000..ca91cc1
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-cap.png
new file mode 100644 (file)
index 0000000..6bbcd54
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-container-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-container-bg.png
new file mode 100644 (file)
index 0000000..eda424e
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-light-container-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-active-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-active-bg.png
new file mode 100644 (file)
index 0000000..ab495c6
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-active-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-active-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-active-cap.png
new file mode 100644 (file)
index 0000000..218603a
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-active-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-bg.png
new file mode 100644 (file)
index 0000000..907e1ec
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-cap.png
new file mode 100644 (file)
index 0000000..15524c4
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-container-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-container-bg.png
new file mode 100644 (file)
index 0000000..888fb86
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/tabs-med-container-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/widget-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/widget-bg.png
new file mode 100644 (file)
index 0000000..a7beb3d
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/mist/widget-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/gripper.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/gripper.png
new file mode 100644 (file)
index 0000000..84d3710
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/gripper.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-menu-Delete.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-menu-Delete.png
new file mode 100644 (file)
index 0000000..b1ec1ca
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-menu-Delete.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-options-ListOrGrid.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-options-ListOrGrid.png
new file mode 100644 (file)
index 0000000..b39267f
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-options-ListOrGrid.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-widget-Close.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-widget-Close.png
new file mode 100644 (file)
index 0000000..9c12532
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-widget-Close.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-widget-More.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-widget-More.png
new file mode 100644 (file)
index 0000000..21d40de
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-widget-More.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-widget-Settings.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-widget-Settings.png
new file mode 100644 (file)
index 0000000..1dbedbb
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/icon-widget-Settings.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/menu-hover.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/menu-hover.png
new file mode 100644 (file)
index 0000000..e398151
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/menu-hover.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/widget-earmark.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/widget-earmark.png
new file mode 100644 (file)
index 0000000..3f2b612
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/rust/widget-earmark.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-light-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-light-bg.png
new file mode 100644 (file)
index 0000000..7a49729
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-light-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-light-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-light-cap.png
new file mode 100644 (file)
index 0000000..1b61357
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-light-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-med-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-med-bg.png
new file mode 100644 (file)
index 0000000..011549f
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-med-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-med-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-med-cap.png
new file mode 100644 (file)
index 0000000..af12703
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-med-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-titlebar-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-titlebar-bg.png
new file mode 100644 (file)
index 0000000..299b57e
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-titlebar-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-titlebar-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-titlebar-cap.png
new file mode 100644 (file)
index 0000000..f17f7f6
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/buttons-titlebar-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-Close.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-Close.png
new file mode 100644 (file)
index 0000000..df8ba52
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-Close.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-Less.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-Less.png
new file mode 100644 (file)
index 0000000..afb4355
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-Less.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-More.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-More.png
new file mode 100644 (file)
index 0000000..7eaf519
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-More.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-gripper.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-gripper.png
new file mode 100644 (file)
index 0000000..d944f44
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/icon-widget-gripper.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/slate-icons.psd b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/slate-icons.psd
new file mode 100644 (file)
index 0000000..874d755
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/slate-icons.psd differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/sprites.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/sprites.png
new file mode 100644 (file)
index 0000000..45b5a94
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/sprites.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-active-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-active-bg.png
new file mode 100644 (file)
index 0000000..e1a3e64
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-active-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-active-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-active-cap.png
new file mode 100644 (file)
index 0000000..a150b58
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-active-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-bg.png
new file mode 100644 (file)
index 0000000..132027f
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-cap.png
new file mode 100644 (file)
index 0000000..ee50821
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-container-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-container-bg.png
new file mode 100644 (file)
index 0000000..2ad596e
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-light-container-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-active-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-active-bg.png
new file mode 100644 (file)
index 0000000..0d87fcc
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-active-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-active-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-active-cap.png
new file mode 100644 (file)
index 0000000..c49b497
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-active-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-bg.png
new file mode 100644 (file)
index 0000000..1d35340
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-cap.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-cap.png
new file mode 100644 (file)
index 0000000..27bb1d4
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-cap.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-container-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-container-bg.png
new file mode 100644 (file)
index 0000000..a64706d
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/tabs-med-container-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/widget-bg.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/widget-bg.png
new file mode 100644 (file)
index 0000000..1f60b14
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/widget-bg.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/widget-earmark.png b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/widget-earmark.png
new file mode 100644 (file)
index 0000000..f286c20
Binary files /dev/null and b/docs/include/jscripts/infusion_old/framework/fss/images/themes/slate/widget-earmark.png differ
diff --git a/docs/include/jscripts/infusion_old/framework/renderer/js/fluidParser.js b/docs/include/jscripts/infusion_old/framework/renderer/js/fluidParser.js
new file mode 100644 (file)
index 0000000..d27d83d
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){var t;var parser;var tagstack;var lumpindex=0;var nestingdepth=0;var justended=false;var defstart=-1;var defend=-1;var baseURL;var debugMode=false;var cutpoints=[];var cutstatus=[];function init(baseURLin,debugModeIn,cutpointsIn){t.rootlump=fluid.XMLLump(0,-1);tagstack=[t.rootlump];lumpindex=0;nestingdepth=0;justended=false;defstart=-1;defend=-1;baseURL=baseURLin;debugMode=debugModeIn;cutpoints=cutpointsIn;if(cutpoints){for(var i=0;i<cutpoints.length;++i){cutstatus[i]=[];cutpoints[i].tree=fluid.parseSelector(cutpoints[i].selector)}}}function findTopContainer(){for(var i=tagstack.length-1;i>=0;--i){var lump=tagstack[i];if(lump.rsfID!==undefined){return lump}}return t.rootlump}function newLump(){var togo=fluid.XMLLump(lumpindex,nestingdepth);if(debugMode){togo.line=parser.getLineNumber();togo.column=parser.getColumnNumber()}t.lumps[lumpindex]=togo;++lumpindex;return togo}function addLump(mmap,ID,lump){var list=mmap[ID];if(!list){list=[];mmap[ID]=list}list[list.length]=lump}function checkContribute(ID,lump){if(ID.indexOf("scr=contribute-")!==-1){var scr=ID.substring("scr=contribute-".length);addLump(t.collectmap,scr,lump)}}var parseUri=function(source){var o=parseUri.options,value=o.parser[o.strictMode?"strict":"loose"].exec(source);for(var i=0,uri={};i<14;i++){uri[o.key[i]]=value[i]||""}uri[o.q.name]={};uri[o.key[12]].replace(o.q.parser,function($0,$1,$2){if($1){uri[o.q.name][$1]=$2}});return uri};parseUri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function rewriteUrl(url){var po=parseUri(url);if(po.protocol||url.charAt(0)==="/"){return url}else{return baseURL+url}}fluid.debugLump=function(lump){var togo=lump.text;togo+=" at ";togo+="lump line "+lump.line+" column "+lump.column+" index "+lump.lumpindex;togo+=parent.href===null?"":" in file "+parent.href;return togo};function debugLump(lump){return"<"+lump.tagname+">"}function hasCssClass(clazz,totest){if(!totest){return false}return(" "+totest+" ").indexOf(" "+clazz+" ")!==-1}function matchNode(term,headlump){if(term.predList){for(var i=0;i<term.predList.length;++i){var pred=term.predList[i];if(pred.id&&headlump.attributemap.id!==pred.id){return false}if(pred.clazz&&!hasCssClass(pred.clazz,headlump.attributemap["class"])){return false}if(pred.tag&&headlump.tagname!==pred.tag){return false}}return true}}function tagStartCut(headlump){var togo=undefined;if(cutpoints){for(var i=0;i<cutpoints.length;++i){var cut=cutpoints[i];var cutstat=cutstatus[i];var nextterm=cutstat.length;if(nextterm<cut.tree.length){var term=cut.tree[nextterm];if(nextterm>0){if(cut.tree[nextterm-1].child&&cutstat[nextterm-1]!==headlump.nestingdepth-1){continue}}var isMatch=matchNode(term,headlump);if(isMatch){cutstat[cutstat.length]=headlump.nestingdepth;if(cutstat.length===cut.tree.length){if(togo!==undefined){fluid.fail("Cutpoint specification error - node "+debugLump(headlump)+" has already matched with rsf:id of "+togo)}if(cut.id===undefined||cut.id===null){fluid.fail("Error in cutpoints list - entry at position "+i+" does not have an id set")}togo=cut.id}}}}}return togo}function tagEndCut(){if(cutpoints){for(var i=0;i<cutpoints.length;++i){var cutstat=cutstatus[i];if(cutstat.length>0&&cutstat[cutstat.length-1]===nestingdepth){cutstat.length--}}}}function processTagStart(isempty,text){++nestingdepth;if(justended){justended=false;var backlump=newLump();backlump.nestingdepth--}if(t.firstdocumentindex===-1){t.firstdocumentindex=lumpindex}var headlump=newLump();var stacktop=tagstack[tagstack.length-1];headlump.uplump=stacktop;var tagname=parser.getName();headlump.tagname=tagname;var attrs=headlump.attributemap=parser.m_attributes;var ID=attrs[fluid.ID_ATTRIBUTE];if(ID===undefined){ID=tagStartCut(headlump)}for(var attrname in attrs){var attrval=attrs[attrname];if(/href|src|codebase|action/.test(attrname)){attrval=rewriteUrl(attrval);attrs[attrname]=attrval}else{if(ID===undefined&&/for|headers/.test(attrname)){ID=attrs[fluid.ID_ATTRIBUTE]="scr=null"}}}if(ID){if(ID.charCodeAt(0)===126){ID=ID.substring(1);headlump.elide=true}checkContribute(ID,headlump);headlump.rsfID=ID;var downreg=findTopContainer();if(!downreg.downmap){downreg.downmap={}}addLump(downreg.downmap,ID,headlump);addLump(t.globalmap,ID,headlump);var colpos=ID.indexOf(":");if(colpos!==-1){var prefix=ID.substring(0,colpos);if(!stacktop.finallump){stacktop.finallump={}}stacktop.finallump[prefix]=headlump}}headlump.text="<"+tagname+fluid.dumpAttributes(attrs)+">";tagstack[tagstack.length]=headlump;if(isempty){processTagEnd()}}function processTagEnd(){tagEndCut();var endlump=newLump();--nestingdepth;endlump.text="</"+parser.getName()+">";var oldtop=tagstack[tagstack.length-1];oldtop.close_tag=t.lumps[lumpindex-1];tagstack.length--;justended=true}function processDefaultTag(){if(defstart!==-1){if(t.firstdocumentindex===-1){t.firstdocumentindex=lumpindex}var text=parser.getContent().substr(defstart,defend-defstart);justended=false;var newlump=newLump();newlump.text=text;defstart=-1}}fluid.ID_ATTRIBUTE="rsf:id";fluid.getPrefix=function(id){var colpos=id.indexOf(":");return colpos===-1?id:id.substring(0,colpos)};fluid.SplitID=function(id){var that={};var colpos=id.indexOf(":");if(colpos===-1){that.prefix=id}else{that.prefix=id.substring(0,colpos);that.suffix=id.substring(colpos+1)}return that};fluid.XMLLump=function(lumpindex,nestingdepth){return{nestingdepth:nestingdepth,lumpindex:lumpindex,parent:t}};fluid.XMLViewTemplate=function(){return{globalmap:{},collectmap:{},lumps:[],firstdocumentindex:-1}};fluid.fetchResources=function(resourceSpecs,callback){var resourceCallback=function(thisSpec){return{success:function(response){thisSpec.resourceText=response;thisSpec.resourceKey=thisSpec.href;thisSpec.queued=false;fluid.fetchResources(resourceSpecs,callback)},error:function(response,textStatus,errorThrown){thisSpec.fetchError={status:response.status,textStatus:textStatus,errorThrown:errorThrown}}}};var complete=true;for(var key in resourceSpecs){var resourceSpec=resourceSpecs[key];if(resourceSpec.href&&!resourceSpec.resourceText){if(!resourceSpec.queued){var thisCallback=resourceCallback(resourceSpec);$.ajax({url:resourceSpec.href,success:thisCallback.success,error:thisCallback.error});resourceSpec.queued=true}complete=false}else{if(resourceSpec.nodeId&&!resourceSpec.resourceText){var node=document.getElementById(resourceSpec.nodeId);resourceSpec.resourceText=fluid.dom.getElementText(node);resourceSpec.resourceKey=resourceSpec.nodeId}}}if(complete){if($.browser.mozilla){setTimeout(function(){callback(resourceSpecs)},1)}else{callback(resourceSpecs)}}};fluid.XMLEncode=function(text){return text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};fluid.dumpAttributes=function(attrcopy){var togo="";for(var attrname in attrcopy){var attrvalue=attrcopy[attrname];if(attrvalue!==null&&attrvalue!==undefined){togo+=" "+attrname+'="'+attrvalue+'"'}}return togo};fluid.aggregateMMap=function(target,source){for(var key in source){var targhas=target[key];if(!targhas){target[key]=[]}target[key]=target[key].concat(source[key])}};var unUnicode=/(\\u[\dabcdef]{4}|\\x[\dabcdef]{2})/g;fluid.unescapeProperties=function(string){string=string.replace(unUnicode,function(match){var code=match.substring(2);var parsed=parseInt(code,16);return String.fromCharCode(parsed)});var pos=0;while(true){var backpos=string.indexOf("\\",pos);if(backpos===-1){break}if(backpos===string.length-1){return[string.substring(0,string.length-1),true]}var replace=string.charAt(backpos+1);if(replace==="n"){replace="\n"}if(replace==="r"){replace="\r"}if(replace==="t"){replace="\t"}string=string.substring(0,backpos)+replace+string.substring(backpos+2);pos=backpos+1}return[string,false]};var breakPos=/[^\\][\s:=]/;fluid.parseJavaProperties=function(text){var togo={};text=text.replace(/\r\n/g,"\n");text=text.replace(/\r/g,"\n");lines=text.split("\n");var contin,key,valueComp,valueRaw,valueEsc;for(var i=0;i<lines.length;++i){var line=$.trim(lines[i]);if(!line||line.charAt(0)==="#"||line.charAt(0)==="!"){continue}if(!contin){valueComp="";var breakpos=line.search(breakPos);if(breakpos===-1){key=line;valueRaw=""}else{key=$.trim(line.substring(0,breakpos+1));valueRaw=$.trim(line.substring(breakpos+2));if(valueRaw.charAt(0)===":"||valueRaw.charAt(0)==="="){valueRaw=$.trim(valueRaw.substring(1))}}key=fluid.unescapeProperties(key)[0];valueEsc=fluid.unescapeProperties(valueRaw)}else{valueEsc=fluid.unescapeProperties(line)}contin=valueEsc[1];if(!valueEsc[1]){togo[key]=valueComp+valueEsc[0]}else{valueComp+=valueEsc[0]}}return togo};fluid.parseTemplates=function(resourceSpec,templateList,opts){var togo=[];togo.globalmap={};for(var i=0;i<templateList.length;++i){var resource=resourceSpec[templateList[i]];var lastslash=resource.href.lastIndexOf("/");var baseURL=lastslash===-1?"":resource.href.substring(0,lastslash+1);var template=fluid.parseTemplate(resource.resourceText,baseURL,opts.scanStart&&i===0,resource.cutpoints,opts);if(i===0){fluid.aggregateMMap(togo.globalmap,template.globalmap)}template.href=resource.href;template.baseURL=baseURL;template.resourceKey=resource.resourceKey;togo[i]=template;fluid.aggregateMMap(togo.globalmap,template.rootlump.downmap)}return togo};fluid.parseTemplate=function(template,baseURL,scanStart,cutpoints_in,opts){t=fluid.XMLViewTemplate();opts=opts||{};init(baseURL,opts.debugMode,cutpoints_in);var idpos=template.indexOf(fluid.ID_ATTRIBUTE);if(scanStart){var brackpos=template.indexOf(">",idpos);parser=new XMLP(template.substring(brackpos+1))}else{parser=new XMLP(template)}parseloop:while(true){var iEvent=parser.next();switch(iEvent){case XMLP._ELM_B:processDefaultTag();processTagStart(false,"");break;case XMLP._ELM_E:processDefaultTag();processTagEnd();break;case XMLP._ELM_EMP:processDefaultTag();processTagStart(true,"");break;case XMLP._PI:case XMLP._DTD:defstart=-1;continue;case XMLP._TEXT:case XMLP._ENTITY:case XMLP._CDATA:case XMLP._COMMENT:if(defstart===-1){defstart=parser.m_cB}defend=parser.m_cE;break;case XMLP._ERROR:fluid.setLogging(true);var message="Error parsing template: "+parser.m_cAlt+" at line "+parser.getLineNumber();fluid.log(message);fluid.log("Just read: "+parser.m_xml.substring(parser.m_iP-30,parser.m_iP));fluid.log("Still to read: "+parser.m_xml.substring(parser.m_iP,parser.m_iP+30));fluid.fail(message);break parseloop;case XMLP._NONE:break parseloop}}return t};var chars="(?:[\\w\u0128-\uFFFF*_-]|\\\\.)";var quickChild=new RegExp("^>\\s*("+chars+"+)");var quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)");var selSeg=new RegExp("^s*([#.]?)("+chars+"*)");var quickClass=new RegExp("([#.]?)("+chars+"+)","g");var childSeg=new RegExp("\\s*(>)?\\s*","g");var whiteSpace=new RegExp("^\\w*$");fluid.parseSelector=function(selstring){var togo=[];selstring=$.trim(selstring);quickClass.lastIndex=0;var lastIndex=0;while(true){var atNode=[];while(true){var segMatch=quickClass.exec(selstring);if(!segMatch||segMatch.index!==lastIndex){break}var thisNode={};var text=segMatch[2];if(segMatch[1]===""){thisNode.tag=text}else{if(segMatch[1]==="#"){thisNode.id=text}else{if(segMatch[1]==="."){thisNode.clazz=text}}}atNode[atNode.length]=thisNode;lastIndex=quickClass.lastIndex}childSeg.lastIndex=lastIndex;var fullAtNode={predList:atNode};var childMatch=childSeg.exec(selstring);if(!childMatch||childMatch.index!==lastIndex){var remainder=selstring.substring(lastIndex);fluid.fail("Error in selector string - can not match child selector expression at "+remainder)}if(childMatch[1]===">"){fullAtNode.child=true}togo[togo.length]=fullAtNode;if(childSeg.lastIndex>=selstring.length){break}lastIndex=childSeg.lastIndex;quickClass.lastIndex=childSeg.lastIndex}return togo}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/framework/renderer/js/fluidRenderer.js b/docs/include/jscripts/infusion_old/framework/renderer/js/fluidRenderer.js
new file mode 100644 (file)
index 0000000..0536055
--- /dev/null
@@ -0,0 +1 @@
+fluid_1_1=fluid_1_1||{};(function($,fluid){function debugPosition(component){return"as child of "+(component.parent.fullID?"component with full ID "+component.parent.fullID:"root")}function computeFullID(component){var togo="";var move=component;if(component.children===undefined){togo=component.ID+(component.localID!==undefined?component.localID:"");move=component.parent}while(move.parent){var parent=move.parent;if(move.fullID!==undefined){togo=move.fullID+togo;return togo}if(move.noID===undefined){var ID=move.ID;if(ID===undefined){fluid.fail("Error in component tree - component found with no ID "+debugPosition(parent)+": please check structure")}var colpos=ID.indexOf(":");var prefix=colpos===-1?ID:ID.substring(0,colpos);togo=prefix+":"+(move.localID===undefined?"":move.localID)+":"+togo}move=parent}return togo}function isBoundPrimitive(value){return fluid.isPrimitive(value)||value instanceof Array&&(value.length===0||typeof (value[0])==="string")}function processChild(value,key){if(isBoundPrimitive(value)){return{componentType:"UIBound",value:value,ID:key}}else{var unzip=unzipComponent(value);if(unzip.ID){return{ID:key,componentType:"UIContainer",children:[unzip]}}else{unzip.ID=key;return unzip}}}function fixChildren(children){if(!(children instanceof Array)){var togo=[];for(var key in children){var value=children[key];if(value instanceof Array){for(var i=0;i<value.length;++i){var processed=processChild(value[i],key);togo[togo.length]=processed}}else{togo[togo.length]=processChild(value,key)}}return togo}else{return children}}function fixupValue(uibound,model){if(uibound.value===undefined&&uibound.valuebinding!==undefined){if(!model){fluid.fail("Cannot perform value fixup for valuebinding "+uibound.valuebinding+" since no model was supplied to rendering")}uibound.value=fluid.model.getBeanValue(model,uibound.valuebinding)}}function upgradeBound(holder,property,model){if(holder[property]!==undefined){if(isBoundPrimitive(holder[property])){holder[property]={value:holder[property]}}}else{holder[property]={value:null}}fixupValue(holder[property],model)}var duckMap={children:"UIContainer",value:"UIBound",valuebinding:"UIBound",messagekey:"UIMessage",markup:"UIVerbatim",selection:"UISelect",target:"UILink",choiceindex:"UISelectChoice",functionname:"UIInitBlock"};function unzipComponent(component,model){if(component){for(var key in duckMap){if(component[key]!==undefined){component.componentType=duckMap[key];break}}if(component.componentType===undefined&&component.ID!==undefined){component.componentType="UIBound"}}if(!component||component.componentType===undefined){var decorators=component.decorators;if(decorators){delete component.decorators}component={componentType:"UIContainer",children:component};component.decorators=decorators}var cType=component.componentType;if(cType==="UIContainer"){component.children=fixChildren(component.children)}else{if(cType==="UISelect"){upgradeBound(component,"selection",model);upgradeBound(component,"optionlist",model);upgradeBound(component,"optionnames",model)}else{if(cType==="UILink"){upgradeBound(component,"target",model);upgradeBound(component,"linktext",model)}}}return component}function assignSubmittingName(component,defaultname){if(component.submittingname===undefined&&component.willinput!==false){component.submittingname=defaultname?defaultname:component.fullID}return component.submittingname}function fixupTree(tree,model){if(tree.componentType===undefined){tree=unzipComponent(tree,model)}if(tree.componentType!=="UIContainer"&&!tree.parent){tree={children:[tree]}}if(tree.children){tree.childmap={};for(var i=0;i<tree.children.length;++i){var child=tree.children[i];if(child.componentType===undefined){child=unzipComponent(child,model);tree.children[i]=child}child.parent=tree;if(child.ID===undefined){fluid.fail("Error in component tree: component found with no ID "+debugPosition(child))}tree.childmap[child.ID]=child;var colpos=child.ID.indexOf(":");if(colpos===-1){}else{var prefix=child.ID.substring(0,colpos);var childlist=tree.childmap[prefix];if(!childlist){childlist=[];tree.childmap[prefix]=childlist}if(child.localID===undefined&&childlist.length!==0){child.localID=childlist.length}childlist[childlist.length]=child}child.fullID=computeFullID(child);var componentType=child.componentType;if(componentType=="UISelect"){child.selection.fullID=child.fullID+"-selection"}else{if(componentType=="UIInitBlock"){var call=child.functionname+"(";for(var j=0;j<child.arguments.length;++j){if(child.arguments[j] instanceof fluid.ComponentReference){child.arguments[j]=child.parent.fullID+child.arguments[j].reference}call+='"'+child.arguments[j]+'"';if(j<child.arguments.length-1){call+=", "}}child.markup=call+")\n";child.componentType="UIVerbatim"}else{if(componentType=="UIBound"){fixupValue(child,model)}}}fixupTree(child,model)}}return tree}var globalmap={};var branchmap={};var rewritemap={};var seenset={};var collected={};var out="";var debugMode=false;var directFossils={};var renderOptions={};var decoratorQueue=[];var renderedbindings={};function getRewriteKey(template,parent,id){return template.resourceKey+parent.fullID+id}function resolveInScope(searchID,defprefix,scope,child){var deflump;var scopelook=scope?scope[searchID]:null;if(scopelook){for(var i=0;i<scopelook.length;++i){var scopelump=scopelook[i];if(!deflump&&scopelump.rsfID==defprefix){deflump=scopelump}if(scopelump.rsfID==searchID){return scopelump}}}return deflump}function resolveCall(sourcescope,child){var searchID=child.jointID?child.jointID:child.ID;var split=fluid.SplitID(searchID);var defprefix=split.prefix+":";var match=resolveInScope(searchID,defprefix,sourcescope.downmap,child);if(match){return match}if(child.children){match=resolveInScope(searchID,defprefix,globalmap,child);if(match){return match}}return null}function noteCollected(template){if(!seenset[template.href]){fluid.aggregateMMap(collected,template.collectmap);seenset[template.href]=true}}function resolveRecurse(basecontainer,parentlump){for(var i=0;i<basecontainer.children.length;++i){var branch=basecontainer.children[i];if(branch.children){var resolved=resolveCall(parentlump,branch);if(resolved){branchmap[branch.fullID]=resolved;var id=resolved.attributemap.id;if(id!==undefined){rewritemap[getRewriteKey(parentlump.parent,basecontainer,id)]=branch.fullID}noteCollected(resolved.parent);resolveRecurse(branch,resolved)}}}if(parentlump.downmap){for(var id in parentlump.downmap){var lumps=parentlump.downmap[id];for(var i=0;i<lumps.length;++i){var lump=lumps[i];var lumpid=lump.attributemap.id;if(lumpid!==undefined&&lump.rsfID!==undefined){var resolved=fetchComponent(basecontainer,lump.rsfID);if(resolved!==null){var resolveID=resolved.fullID;if(resolved.componentType==="UISelect"){resolveID=resolveID+"-selection"}rewritemap[getRewriteKey(parentlump.parent,basecontainer,lumpid)]=resolveID}}}}}}function resolveBranches(globalmapp,basecontainer,parentlump){branchmap={};rewritemap={};seenset={};collected={};globalmap=globalmapp;branchmap[basecontainer.fullID]=parentlump;resolveRecurse(basecontainer,parentlump)}function dumpBranchHead(branch,targetlump){if(targetlump.elide){return }var attrcopy={};$.extend(true,attrcopy,targetlump.attributemap);adjustForID(attrcopy,branch);outDecorators(branch,attrcopy);out+="<"+targetlump.tagname+" ";out+=fluid.dumpAttributes(attrcopy);out+=">"}function dumpTillLump(lumps,start,limit){for(;start<limit;++start){var text=lumps[start].text;if(text){out+=lumps[start].text}}}function dumpScan(lumps,renderindex,basedepth,closeparent,insideleaf){var start=renderindex;while(true){if(renderindex===lumps.length){break}var lump=lumps[renderindex];if(lump.nestingdepth<basedepth){break}if(lump.rsfID!==undefined){if(!insideleaf){break}if(insideleaf&&lump.nestingdepth>basedepth+(closeparent?0:1)){fluid.log("Error in component tree - leaf component found to contain further components - at "+lump.toString())}else{break}}++renderindex}if(!closeparent&&(renderindex==lumps.length||!lumps[renderindex].rsfID)){--renderindex}dumpTillLump(lumps,start,renderindex);return renderindex}var trc={};function openTag(){if(!trc.iselide){out+="<"+trc.uselump.tagname}}function closeTag(){if(!trc.iselide){out+="</"+trc.uselump.tagname+">"}}function renderUnchanged(){dumpTillLump(trc.uselump.parent.lumps,trc.uselump.lumpindex+1,trc.close.lumpindex+(trc.iselide?0:1))}function replaceAttributes(){if(!trc.iselide){out+=fluid.dumpAttributes(trc.attrcopy)}dumpTemplateBody()}function replaceAttributesOpen(){if(trc.iselide){replaceAttributes()}else{out+=fluid.dumpAttributes(trc.attrcopy);out+=">";trc.nextpos=trc.endopen.lumpindex}}function dumpTemplateBody(){if(trc.endopen.lumpindex===trc.close.lumpindex){if(!trc.iselide){out+="/>"}}else{if(!trc.iselide){out+=">"}dumpTillLump(trc.uselump.parent.lumps,trc.endopen.lumpindex,trc.close.lumpindex+(trc.iselide?0:1))}}function rewriteLeaf(value){if(isValue(value)){replaceBody(value)}else{replaceAttributes()}}function rewriteLeafOpen(value){if(trc.iselide){rewriteLeaf(trc.value)}else{if(isValue(value)){replaceBody(value)}else{replaceAttributesOpen()}}}function replaceBody(value){out+=fluid.dumpAttributes(trc.attrcopy);if(!trc.iselide){out+=">"}out+=fluid.XMLEncode(value.toString());closeTag()}function isValue(value){return value!==null&&value!==undefined&&!isPlaceholder(value)}function isPlaceholder(value){return false}function rewriteURL(template,URL){return URL}function dumpHiddenField(todump){out+='<input type="hidden" ';var isvirtual=todump.virtual;var outattrs={};outattrs[isvirtual?"id":"name"]=todump.name;outattrs.value=todump.value;out+=fluid.dumpAttributes(outattrs);out+=" />\n"}function applyAutoBind(torender,finalID){var tagname=trc.uselump.tagname;var applier=renderOptions.applier;function applyFunc(){fluid.applyChange(fluid.byId(finalID),undefined,applier)}if(renderOptions.autoBind&&/input|select|textarea/.test(tagname)&&!renderedbindings[finalID]){var decorators=[{jQuery:["change",applyFunc]}];if($.browser.msie&&tagname==="input"&&/radio|checkbox/.test(trc.attrcopy.type)){decorators.push({jQuery:["click",applyFunc]})}outDecoratorsImpl(torender,decorators,trc.attrcopy,finalID)}}function dumpBoundFields(torender,parent){if(torender){var holder=parent?parent:torender;if(directFossils&&holder.submittingname&&holder.valuebinding){directFossils[holder.submittingname]={name:holder.submittingname,EL:holder.valuebinding,oldvalue:holder.value};applyAutoBind(torender,torender.fullID)}if(torender.fossilizedbinding){dumpHiddenField(torender.fossilizedbinding)}if(torender.fossilizedshaper){dumpHiddenField(torender.fossilizedshaper)}}}function dumpSelectionBindings(uiselect){if(!renderedbindings[uiselect.selection.fullID]){renderedbindings[uiselect.selection.fullID]=true;dumpBoundFields(uiselect.selection);dumpBoundFields(uiselect.optionlist);dumpBoundFields(uiselect.optionnames)}}fluid.NULL_STRING="\u25a9null\u25a9";var LINK_ATTRIBUTES={a:"href",link:"href",img:"src",frame:"src",script:"src",style:"src",input:"src",embed:"src",form:"action",applet:"codebase",object:"codebase"};function isSelectedValue(torender,value){var selection=torender.selection;return selection.value&&typeof (selection.value)!=="string"&&typeof (selection.value.length)==="number"?$.inArray(value,selection.value,value)!==-1:selection.value===value}function getRelativeComponent(component,relativeID){component=component.parent;if(relativeID.indexOf("..::")===0){relativeID=relativeID.substring(4);component=component.parent}return component.childmap[relativeID]}function explodeDecorators(decorators){var togo=[];if(decorators.type){togo[0]=decorators}else{for(var key in decorators){if(key==="$"){key="jQuery"}var value=decorators[key];var decorator={type:key};if(key==="jQuery"){decorator.func=value[0];decorator.args=value.slice(1)}else{if(key==="addClass"||key==="removeClass"){decorator.classes=value}else{if(key==="attrs"){decorator.attributes=value}else{if(key==="identify"){decorator.key=value}}}}togo[togo.length]=decorator}}return togo}function outDecoratorsImpl(torender,decorators,attrcopy,finalID){renderOptions.idMap=renderOptions.idMap||{};for(var i=0;i<decorators.length;++i){var decorator=decorators[i];var type=decorator.type;if(!type){var explodedDecorators=explodeDecorators(decorator);outDecoratorsImpl(torender,explodedDecorators,attrcopy,finalID);continue}if(type==="$"){type=decorator.type="jQuery"}if(type==="jQuery"||type==="event"||type==="fluid"){var id=adjustForID(attrcopy,torender,true,finalID);decorator.id=id;decoratorQueue[decoratorQueue.length]=decorator}else{if(type==="attrs"){$.extend(true,attrcopy,decorator.attributes)}else{if(type==="addClass"||type==="removeClass"){var fakeNode={nodeType:1,className:attrcopy["class"]||""};$(fakeNode)[type](decorator.classes);attrcopy["class"]=fakeNode.className}else{if(type==="identify"){var id=adjustForID(attrcopy,torender,true,finalID);renderOptions.idMap[decorator.key]=id}}}}}}function outDecorators(torender,attrcopy){if(!torender.decorators){return }if(torender.decorators.length===undefined){torender.decorators=explodeDecorators(torender.decorators)}outDecoratorsImpl(torender,torender.decorators,attrcopy)}function renderComponent(torender){var attrcopy=trc.attrcopy;var lumps=trc.uselump.parent.lumps;var lumpindex=trc.uselump.lumpindex;var componentType=torender.componentType;var tagname=trc.uselump.tagname;outDecorators(torender,attrcopy);if(componentType==="UIMessage"){componentType="UIBound";if(!renderOptions.messageLocator){torender.value="[No messageLocator is configured in options - please consult documentation on options.messageSource]"}else{torender.value=renderOptions.messageLocator(torender.messagekey,torender.args)}}function makeFail(torender,end){fluid.fail("Error in component tree - UISelectChoice with id "+torender.fullID+end)}if(componentType==="UIBound"||componentType==="UISelectChoice"){var parent;if(torender.choiceindex!==undefined){if(torender.parentFullID){parent=getAbsoluteComponent(view,torender.parentFullID);if(!parent){makeFail(torender," has parentFullID of "+torender.parentFullID+" which cannot be resolved")}}else{if(torender.parentRelativeID!==undefined){parent=getRelativeComponent(torender,torender.parentRelativeID);if(!parent){makeFail(torender," has parentRelativeID of "+torender.parentRelativeID+" which cannot be resolved")}}else{makeFail(torender," does not have either parentFullID or parentRelativeID set")}}assignSubmittingName(parent.selection);dumpSelectionBindings(parent)}var submittingname=parent?parent.selection.submittingname:torender.submittingname;if(tagname==="input"||tagname==="textarea"){if(!parent){submittingname=assignSubmittingName(torender)}if(submittingname!==undefined){attrcopy.name=submittingname}}dumpBoundFields(torender,parent?parent.selection:null);if(typeof (torender.value)==="boolean"||attrcopy.type==="radio"||attrcopy.type==="checkbox"){var underlyingValue;var directValue=torender.value;if(torender.choiceindex!==undefined){if(!parent.optionlist.value){fluid.fail("Error in component tree - selection control with full ID "+parent.fullID+" has no values")}underlyingValue=parent.optionlist.value[torender.choiceindex];directValue=isSelectedValue(parent,underlyingValue)}if(isValue(directValue)){if(directValue){attrcopy.checked="checked"}else{delete attrcopy.checked}}attrcopy.value=underlyingValue?underlyingValue:"true";rewriteLeaf(null)}else{if(torender.value instanceof Array){renderUnchanged()}else{var value=parent?parent[tagname==="textarea"||tagname==="input"?"optionlist":"optionnames"].value[torender.choiceindex]:torender.value;if(tagname==="textarea"){if(isPlaceholder(value)&&torender.willinput){value=""}rewriteLeaf(value)}else{if(tagname==="input"){if(torender.willinput||isValue(value)){attrcopy.value=value}rewriteLeaf(null)}else{delete attrcopy.name;rewriteLeafOpen(value)}}}}}else{if(componentType==="UISelect"){applyAutoBind(torender,torender.selection.fullID);var ishtmlselect=tagname==="select";var ismultiple=false;if(torender.selection.value instanceof Array){ismultiple=true;if(ishtmlselect){attrcopy.multiple="multiple"}}assignSubmittingName(torender.selection,attrcopy.id);if(ishtmlselect){if(torender.selection.willinput!==false){attrcopy.name=torender.selection.submittingname}}out+=fluid.dumpAttributes(attrcopy);if(ishtmlselect){out+=">";var values=torender.optionlist.value;var names=torender.optionnames===null||torender.optionnames===undefined||!torender.optionnames.value?values:torender.optionnames.value;if(!names||!names.length){fluid.fail("Error in component tree - UISelect component with fullID "+torender.fullID+" does not have optionnames set")}for(var i=0;i<names.length;++i){out+='<option value="';var value=values[i];if(value===null){value=fluid.NULL_STRING}out+=fluid.XMLEncode(value);if(isSelectedValue(torender,value)){out+='" selected="selected'}out+='">';out+=fluid.XMLEncode(names[i]);out+="</option>\n"}closeTag()}else{dumpTemplateBody()}dumpSelectionBindings(torender)}else{if(componentType==="UILink"){var attrname=LINK_ATTRIBUTES[tagname];if(attrname){var target=torender.target.value;if(!isValue(target)){target=attrcopy[attname]}else{target=rewriteURL(trc.uselump.parent,target)}attrcopy[attrname]=target}var value=torender.linktext.value;if(!isValue(value)){replaceAttributesOpen()}else{rewriteLeaf(value)}}else{if(torender.markup!==undefined){var rendered=torender.markup;if(rendered===null){out+=fluid.dumpAttributes(attrcopy);out+=">";renderUnchanged()}else{if(!trc.iselide){out+=fluid.dumpAttributes(attrcopy);out+=">"}out+=rendered;closeTag()}}else{}}}}}function adjustForID(attrcopy,component,late,forceID){if(!late){delete attrcopy["rsf:id"]}if(forceID!==undefined){attrcopy.id=forceID}else{if(attrcopy.id||late){attrcopy.id=component.fullID}}var count=1;var baseid=attrcopy.id;while(renderOptions.document.getElementById(attrcopy.id)){attrcopy.id=baseid+"-"+(count++)}return attrcopy.id}function rewriteIDRelation(context){var attrname;var attrval=trc.attrcopy["for"];if(attrval!==undefined){attrname="for"}else{attrval=trc.attrcopy.headers;if(attrval!==undefined){attrname="headers"}}if(!attrname){return }var tagname=trc.uselump.tagname;if(attrname==="for"&&tagname!=="label"){return }if(attrname==="headers"&&tagname!=="td"&&tagname!=="th"){return }var rewritten=rewritemap[getRewriteKey(trc.uselump.parent,context,attrval)];if(rewritten!==undefined){trc.attrcopy[attrname]=rewritten}}function renderComment(message){out+=("<!-- "+fluid.XMLEncode(message)+"-->")}function renderDebugMessage(message){out+='<span style="background-color:#FF466B;color:white;padding:1px;">';out+=message;out+="</span><br/>"}function reportPath(branch){var path=branch.fullID;return !path?"component tree root":"full path "+path}function renderComponentSystem(context,torendero,lump){var lumpindex=lump.lumpindex;var lumps=lump.parent.lumps;var nextpos=-1;var outerendopen=lumps[lumpindex+1];var outerclose=lump.close_tag;nextpos=outerclose.lumpindex+1;var payloadlist=lump.downmap?lump.downmap["payload-component"]:null;var payload=payloadlist?payloadlist[0]:null;var iselide=lump.rsfID.charCodeAt(0)===126;var endopen=outerendopen;var close=outerclose;var uselump=lump;var attrcopy={};$.extend(true,attrcopy,(payload===null?lump:payload).attributemap);trc.attrcopy=attrcopy;trc.uselump=uselump;trc.endopen=endopen;trc.close=close;trc.nextpos=nextpos;trc.iselide=iselide;rewriteIDRelation(context);if(torendero===null){if(lump.rsfID.indexOf("scr=")===(iselide?1:0)){var scrname=lump.rsfID.substring(4+(iselide?1:0));if(scrname==="ignore"){nextpos=trc.close.lumpindex+1}else{openTag();replaceAttributesOpen();nextpos=trc.endopen.lumpindex}}}else{if(payload){trc.endopen=lumps[payload.lumpindex+1];trc.close=payload.close_tag;trc.uselump=payload;dumpTillLump(lumps,lumpindex,payload.lumpindex);lumpindex=payload.lumpindex}adjustForID(attrcopy,torendero);openTag();renderComponent(torendero);if(payload!==null){if(trc.nextpos===nextpos){dumpTillLump(lumps,trc.close.lumpindex+1,outerclose.lumpindex+1)}}nextpos=trc.nextpos}return nextpos}function renderContainer(child,targetlump){var t2=targetlump.parent;var firstchild=t2.lumps[targetlump.lumpindex+1];if(child.children!==undefined){dumpBranchHead(child,targetlump)}else{renderComponentSystem(child.parent,child,targetlump)}renderRecurse(child,targetlump,firstchild)}function fetchComponent(basecontainer,id,lump){if(id.indexOf("msg=")===0){var key=id.substring(4);return{componentType:"UIMessage",messagekey:key}}while(basecontainer){var togo=basecontainer.childmap[id];if(togo){return togo}basecontainer=basecontainer.parent}return null}function fetchComponents(basecontainer,id){var togo;while(basecontainer){togo=basecontainer.childmap[id];if(togo){break}basecontainer=basecontainer.parent}return togo}function findChild(sourcescope,child){var split=fluid.SplitID(child.ID);var headlumps=sourcescope.downmap[child.ID];if(headlumps===null){headlumps=sourcescope.downmap[split.prefix+":"]}return headlumps===null?null:headlumps[0]}function renderRecurse(basecontainer,parentlump,baselump){var renderindex=baselump.lumpindex;var basedepth=parentlump.nestingdepth;var t1=parentlump.parent;if(debugMode){var rendered={}}while(true){renderindex=dumpScan(t1.lumps,renderindex,basedepth,!parentlump.elide,false);if(renderindex===t1.lumps.length){break}var lump=t1.lumps[renderindex];var id=lump.rsfID;if(lump.nestingdepth<basedepth||id===undefined){break}if(id.charCodeAt(0)===126){id=id.substring(1)}if(id.indexOf(":")!==-1){var prefix=fluid.getPrefix(id);var children=fetchComponents(basecontainer,prefix);var finallump=lump.uplump.finallump[prefix];var closefinal=finallump.close_tag;if(children){for(var i=0;i<children.length;++i){var child=children[i];if(child.children){var targetlump=branchmap[child.fullID];if(targetlump){if(debugMode){renderComment("Branching for "+child.fullID+" from "+fluid.debugLump(lump)+" to "+fluid.debugLump(targetlump))}renderContainer(child,targetlump);if(debugMode){renderComment("Branch returned for "+child.fullID+fluid.debugLump(lump)+" to "+fluid.debugLump(targetlump))}}else{if(debugMode){renderDebugMessage("No matching template branch found for branch container with full ID "+child.fullID+" rendering from parent template branch "+fluid.debugLump(baselump))}}}else{var targetlump=findChild(parentlump,child);if(!targetlump){if(debugMode){renderDebugMessage("Repetitive leaf with full ID "+child.fullID+" could not be rendered from parent template branch "+fluid.debugLump(baselump))}continue}var renderend=renderComponentSystem(basecontainer,child,targetlump);var wasopentag=renderend<t1.lumps.lengtn&&t1.lumps[renderend].nestingdepth>=targetlump.nestingdepth;var newbase=child.children?child:basecontainer;if(wasopentag){renderRecurse(newbase,targetlump,t1.lumps[renderend]);renderend=targetlump.close_tag.lumpindex+1}if(i!==children.length-1){if(renderend<closefinal.lumpindex){dumpScan(t1.lumps,renderend,targetlump.nestingdepth-1,false,false)}}else{dumpScan(t1.lumps,renderend,targetlump.nestingdepth,true,false)}}}}else{if(debugMode){renderDebugMessage("No branch container with prefix "+prefix+": found in container "+reportPath(basecontainer)+" rendering at template position "+fluid.debugLump(baselump)+", skipping")}}renderindex=closefinal.lumpindex+1;if(debugMode){renderComment("Stack returned from branch for ID "+id+" to "+fluid.debugLump(baselump)+": skipping from "+fluid.debugLump(lump)+" to "+fluid.debugLump(closefinal))}}else{var component;if(id){if(debugMode){rendered[id]=true}component=fetchComponent(basecontainer,id,lump)}if(component&&component.children!==undefined){renderContainer(component);renderindex=lump.close_tag.lumpindex+1}else{renderindex=renderComponentSystem(basecontainer,component,lump)}}if(renderindex===t1.lumps.length){break}}if(debugMode){var children=basecontainer.children;for(var key=0;key<children.length;++key){var child=children[key];if(!(child.ID.indexOf(":")!==-1)&&!rendered[child.ID]){renderDebugMessage("Leaf child component "+child.componentType+" with full ID "+child.fullID+" could not be found within template "+fluid.debugLump(baselump))}}}}function renderCollect(collump){dumpTillLump(collump.parent.lumps,collump.lumpindex,collump.close_tag.lumpindex+1)}function renderCollects(){for(var key in collected){var collist=collected[key];for(var i=0;i<collist.length;++i){renderCollect(collist[i])}}}function processDecoratorQueue(){for(var i=0;i<decoratorQueue.length;++i){var decorator=decoratorQueue[i];var node=fluid.byId(decorator.id);if(!node){fluid.fail("Error during rendering - component with id "+decorator.id+" which has a queued decorator was not found in the output markup")}if(decorator.type==="jQuery"){var jnode=$(node);jnode[decorator.func].apply(jnode,$.makeArray(decorator.args))}else{if(decorator.type==="fluid"){var args=decorator.args;if(!args){if(!decorator.container){decorator.container=node}args=[decorator.container,decorator.options]}var that=fluid.invokeGlobalFunction(decorator.func,args,fluid);decorator.that=that}else{if(decorator.type==="event"){node[decorator.event]=decorator.handler}}}}}fluid.ComponentReference=function(reference){this.reference=reference};fluid.explode=function(hash,basepath){var togo=[];for(var key in hash){var binding=basepath===undefined?key:basepath+"."+key;togo[togo.length]={ID:key,value:hash[key],valuebinding:binding}}return togo};fluid.explodeSelectionToInputs=function(optionlist,opts){return fluid.transform(optionlist,function(option,index){return{ID:opts.rowID,children:[{ID:opts.inputID,parentRelativeID:"..::"+opts.selectID,choiceindex:index},{ID:opts.labelID,parentRelativeID:"..::"+opts.selectID,choiceindex:index}]}})};fluid.resolveMessageSource=function(messageSource){if(messageSource.type==="data"){if(messageSource.url===undefined){return fluid.messageLocator(messageSource.messages)}else{}}};fluid.makeBranches=function(){var firstBranch;var thisBranch;for(var i=0;i<arguments.length;++i){var thisarg=arguments[i];var nextBranch;if(typeof (thisarg)==="string"){nextBranch={ID:thisarg}}else{if(thisarg instanceof Array){nextBranch={ID:thisarg[0],jointID:thisarg[1]}}else{$.extend(true,thisBranch,thisarg);nextBranch=thisBranch}}if(thisBranch&&nextBranch!==thisBranch){if(!thisBranch.children){thisBranch.children=[]}thisBranch.children[thisBranch.children.length]=nextBranch}thisBranch=nextBranch;if(!firstBranch){firstBranch=nextBranch}}return firstBranch};fluid.renderTemplates=function(templates,tree,options,fossilsIn){options=options||{};tree=tree||{};debugMode=options.debugMode;if(!options.messageLocator&&options.messageSource){options.messageLocator=fluid.resolveMessageSource(options.messageSource)}options.document=options.document||document;directFossils=fossilsIn;decoratorQueue=[];tree=fixupTree(tree,options.model);var template=templates[0];resolveBranches(templates.globalmap,tree,template.rootlump);out="";renderedbindings={};renderOptions=options;renderCollects();renderRecurse(tree,template.rootlump,template.lumps[template.firstdocumentindex]);return out};fluid.reRender=function(templates,node,tree,options){options=options||{};node=fluid.unwrap(node);var lastFocusedElement=fluid.getLastFocusedElement?fluid.getLastFocusedElement():null;var lastId;if(lastFocusedElement&&fluid.dom.isContainer(node,lastFocusedElement)){lastId=lastFocusedElement.id}if($.browser.msie){$(node).empty()}else{node.innerHTML=""}var fossils={};var rendered=fluid.renderTemplates(templates,tree,options,fossils);if(options.renderRaw){rendered=fluid.XMLEncode(rendered);rendered=rendered.replace(/\n/g,"<br/>")}if(options.model){fluid.bindFossils(node,options.model,fossils)}if($.browser.msie){$(node).html(rendered)}else{node.innerHTML=rendered}processDecoratorQueue();if(lastId){var element=fluid.byId(lastId);if(element){$(element).focus()}}return templates};function findNodeValue(rootNode){var node=fluid.dom.iterateDom(rootNode,function(node){return node.nodeType===8||node.nodeType===4?"stop":null},true);var value=node.nodeValue;if(value.indexOf("[CDATA[")===0){return value.substring(6,value.length-2)}else{return value}}fluid.extractTemplate=function(node,armouring){if(!armouring){return node.innerHTML}else{return findNodeValue(node)}};fluid.selfRender=function(node,tree,options){options=options||{};node=fluid.unwrap(node);var resourceSpec={base:{resourceText:fluid.extractTemplate(node,options.armouring),href:".",resourceKey:".",cutpoints:options.cutpoints}};var templates=fluid.parseTemplates(resourceSpec,["base"],options);return fluid.reRender(templates,node,tree,options)}})(jQuery,fluid_1_1);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/fastXmlPull/js/fastXmlPull.js b/docs/include/jscripts/infusion_old/lib/fastXmlPull/js/fastXmlPull.js
new file mode 100644 (file)
index 0000000..3f7f1fe
--- /dev/null
@@ -0,0 +1 @@
+var whitespace="\n\r\t ";var closedTags={abbr:true,br:true,col:true,img:true,input:true,link:true,meta:true,param:true,hr:true,area:true,embed:true};XMLP=function(strXML){this.m_xml=strXML;this.m_iP=0;this.m_iState=XMLP._STATE_PROLOG;this.m_stack=[];this.m_attributes={};this.m_emitSynthetic=false};XMLP._NONE=0;XMLP._ELM_B=1;XMLP._ELM_E=2;XMLP._ELM_EMP=3;XMLP._ATT=4;XMLP._TEXT=5;XMLP._ENTITY=6;XMLP._PI=7;XMLP._CDATA=8;XMLP._COMMENT=9;XMLP._DTD=10;XMLP._ERROR=11;XMLP._CONT_XML=0;XMLP._CONT_ALT=1;XMLP._ATT_NAME=0;XMLP._ATT_VAL=1;XMLP._STATE_PROLOG=1;XMLP._STATE_DOCUMENT=2;XMLP._STATE_MISC=3;XMLP._errs=[];XMLP._errs[XMLP.ERR_CLOSE_PI=0]="PI: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_DTD=1]="DTD: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_COMMENT=2]="Comment: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_CDATA=3]="CDATA: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_ELM=4]="Element: missing closing sequence";XMLP._errs[XMLP.ERR_CLOSE_ENTITY=5]="Entity: missing closing sequence";XMLP._errs[XMLP.ERR_PI_TARGET=6]="PI: target is required";XMLP._errs[XMLP.ERR_ELM_EMPTY=7]="Element: cannot be both empty and closing";XMLP._errs[XMLP.ERR_ELM_NAME=8]='Element: name must immediatly follow "<"';XMLP._errs[XMLP.ERR_ELM_LT_NAME=9]='Element: "<" not allowed in element names';XMLP._errs[XMLP.ERR_ATT_VALUES=10]="Attribute: values are required and must be in quotes";XMLP._errs[XMLP.ERR_ATT_LT_NAME=11]='Element: "<" not allowed in attribute names';XMLP._errs[XMLP.ERR_ATT_LT_VALUE=12]='Attribute: "<" not allowed in attribute values';XMLP._errs[XMLP.ERR_ATT_DUP=13]="Attribute: duplicate attributes not allowed";XMLP._errs[XMLP.ERR_ENTITY_UNKNOWN=14]="Entity: unknown entity";XMLP._errs[XMLP.ERR_INFINITELOOP=15]="Infinite loop";XMLP._errs[XMLP.ERR_DOC_STRUCTURE=16]="Document: only comments, processing instructions, or whitespace allowed outside of document element";XMLP._errs[XMLP.ERR_ELM_NESTING=17]="Element: must be nested correctly";XMLP.prototype._checkStructure=function(iEvent){var stack=this.m_stack;if(XMLP._STATE_PROLOG==this.m_iState){this.m_iState=XMLP._STATE_DOCUMENT}if(XMLP._STATE_DOCUMENT===this.m_iState){if((XMLP._ELM_B==iEvent)||(XMLP._ELM_EMP==iEvent)){this.m_stack[stack.length]=this.getName()}if((XMLP._ELM_E==iEvent)||(XMLP._ELM_EMP==iEvent)){if(stack.length===0){return XMLP._NONE}var strTop=stack[stack.length-1];this.m_stack.length--;if(strTop===null||strTop!==this.getName()){return this._setErr(XMLP.ERR_ELM_NESTING)}}}return iEvent};XMLP.prototype.getColumnNumber=function(){return SAXStrings.getColumnNumber(this.m_xml,this.m_iP)};XMLP.prototype.getContent=function(){return(this.m_cSrc==XMLP._CONT_XML)?this.m_xml:this.m_cAlt};XMLP.prototype.getContentBegin=function(){return this.m_cB};XMLP.prototype.getContentEnd=function(){return this.m_cE};XMLP.prototype.getLineNumber=function(){return SAXStrings.getLineNumber(this.m_xml,this.m_iP)};XMLP.prototype.getName=function(){return this.m_name};XMLP.prototype.next=function(){return this._checkStructure(this._parse())};XMLP.prototype._parse=function(){var iP=this.m_iP;var xml=this.m_xml;if(iP===xml.length){return XMLP._NONE}var c=xml.charAt(iP);if(c==="<"){var c2=xml.charAt(iP+1);if(c2==="?"){return this._parsePI(iP+2)}else{if(c2==="!"){if(iP===xml.indexOf("<!DOCTYPE",iP)){return this._parseDTD(iP+9)}else{if(iP===xml.indexOf("<!--",iP)){return this._parseComment(iP+4)}else{if(iP===xml.indexOf("<![CDATA[",iP)){return this._parseCDATA(iP+9)}}}}else{return this._parseElement(iP+1)}}}else{return this._parseText(iP)}};var nameRegex=/([^\s>]+)/g;var attrStartRegex=/\s*([\w:]+)/gm;var attrValRegex=/\"([^\"]*)\"\s*/gm;var attrValIERegex=/([^\>\s]+)\s*/gm;var closeRegex=/\s*<\//g;XMLP.prototype._parseElement=function(iB){var iE,iDE,iRet;var iType,strN,iLast;iDE=iE=this.m_xml.indexOf(">",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_ELM)}if(this.m_xml.charAt(iB)=="/"){iType=XMLP._ELM_E;iB++}else{iType=XMLP._ELM_B}if(this.m_xml.charAt(iE-1)=="/"){if(iType==XMLP._ELM_E){return this._setErr(XMLP.ERR_ELM_EMPTY)}iType=XMLP._ELM_EMP;iDE--}nameRegex.lastIndex=iB;var nameMatch=nameRegex.exec(this.m_xml);if(!nameMatch){return this._setErr(XMLP.ERR_ELM_NAME)}strN=nameMatch[1].toLowerCase();if("li"===strN&&iType!==XMLP._ELM_E&&this.m_stack.length>0&&this.m_stack[this.m_stack.length-1]==="li"&&!this.m_emitSynthetic){this.m_name="li";this.m_emitSynthetic=true;return XMLP._ELM_E}this.m_attributes={};this.m_cAlt="";if(nameRegex.lastIndex<iDE){this.m_iP=nameRegex.lastIndex;while(this.m_iP<iDE){attrStartRegex.lastIndex=this.m_iP;var attrMatch=attrStartRegex.exec(this.m_xml);if(!attrMatch){return this._setErr(XMLP.ERR_ATT_VALUES)}var attrname=attrMatch[1].toLowerCase();var attrval;if(this.m_xml.charCodeAt(attrStartRegex.lastIndex)===61){var valRegex=this.m_xml.charCodeAt(attrStartRegex.lastIndex+1)===34?attrValRegex:attrValIERegex;valRegex.lastIndex=attrStartRegex.lastIndex+1;attrMatch=valRegex.exec(this.m_xml);if(!attrMatch){return this._setErr(XMLP.ERR_ATT_VALUES)}attrval=attrMatch[1]}else{attrval=attrname;valRegex=attrStartRegex}if(!this.m_attributes[attrname]){this.m_attributes[attrname]=attrval}else{return this._setErr(XMLP.ERR_ATT_DUP)}this.m_iP=valRegex.lastIndex}}if(strN.indexOf("<")!=-1){return this._setErr(XMLP.ERR_ELM_LT_NAME)}this.m_name=strN;this.m_iP=iE+1;if(closedTags[strN]){closeRegex.lastIndex=iE+1;var closeMatch=closeRegex.exec;if(closeMatch){var matchclose=this.m_xml.indexOf(strN,closeMatch.lastIndex);if(matchclose===closeMatch.lastIndex){return iType}else{return XMLP._ELM_EMP}}}this.m_emitSynthetic=false;return iType};XMLP.prototype._parseCDATA=function(iB){var iE=this.m_xml.indexOf("]]>",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_CDATA)}this._setContent(XMLP._CONT_XML,iB,iE);this.m_iP=iE+3;return XMLP._CDATA};XMLP.prototype._parseComment=function(iB){var iE=this.m_xml.indexOf("-->",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_COMMENT)}this._setContent(XMLP._CONT_XML,iB-4,iE+3);this.m_iP=iE+3;return XMLP._COMMENT};XMLP.prototype._parseDTD=function(iB){var iE,strClose,iInt,iLast;iE=this.m_xml.indexOf(">",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_DTD)}iInt=this.m_xml.indexOf("[",iB);strClose=((iInt!=-1)&&(iInt<iE))?"]>":">";while(true){if(iE==iLast){return this._setErr(XMLP.ERR_INFINITELOOP)}iLast=iE;iE=this.m_xml.indexOf(strClose,iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_DTD)}if(this.m_xml.substring(iE-1,iE+2)!="]]>"){break}}this.m_iP=iE+strClose.length;return XMLP._DTD};XMLP.prototype._parsePI=function(iB){var iE,iTB,iTE,iCB,iCE;iE=this.m_xml.indexOf("?>",iB);if(iE==-1){return this._setErr(XMLP.ERR_CLOSE_PI)}iTB=SAXStrings.indexOfNonWhitespace(this.m_xml,iB,iE);if(iTB==-1){return this._setErr(XMLP.ERR_PI_TARGET)}iTE=SAXStrings.indexOfWhitespace(this.m_xml,iTB,iE);if(iTE==-1){iTE=iE}iCB=SAXStrings.indexOfNonWhitespace(this.m_xml,iTE,iE);if(iCB==-1){iCB=iE}iCE=SAXStrings.lastIndexOfNonWhitespace(this.m_xml,iCB,iE);if(iCE==-1){iCE=iE-1}this.m_name=this.m_xml.substring(iTB,iTE);this._setContent(XMLP._CONT_XML,iCB,iCE+1);this.m_iP=iE+2;return XMLP._PI};XMLP.prototype._parseText=function(iB){var iE=this.m_xml.indexOf("<",iB);if(iE==-1){iE=this.m_xml.length}this._setContent(XMLP._CONT_XML,iB,iE);this.m_iP=iE;return XMLP._TEXT};XMLP.prototype._setContent=function(iSrc){var args=arguments;if(XMLP._CONT_XML==iSrc){this.m_cAlt=null;this.m_cB=args[1];this.m_cE=args[2]}else{this.m_cAlt=args[1];this.m_cB=0;this.m_cE=args[1].length}this.m_cSrc=iSrc};XMLP.prototype._setErr=function(iErr){var strErr=XMLP._errs[iErr];this.m_cAlt=strErr;this.m_cB=0;this.m_cE=strErr.length;this.m_cSrc=XMLP._CONT_ALT;return XMLP._ERROR};SAXStrings={};SAXStrings.WHITESPACE=" \t\n\r";SAXStrings.QUOTES="\"'";SAXStrings.getColumnNumber=function(strD,iP){if(!strD){return -1}iP=iP||strD.length;var arrD=strD.substring(0,iP).split("\n");arrD.length--;var iLinePos=arrD.join("\n").length;return iP-iLinePos};SAXStrings.getLineNumber=function(strD,iP){if(!strD){return -1}iP=iP||strD.length;return strD.substring(0,iP).split("\n").length};SAXStrings.indexOfNonWhitespace=function(strD,iB,iE){if(!strD){return -1}iB=iB||0;iE=iE||strD.length;for(var i=iB;i<iE;++i){var c=strD.charAt(i);if(c!==" "&&c!=="\t"&&c!=="\n"&&c!=="\r"){return i}}return -1};SAXStrings.indexOfWhitespace=function(strD,iB,iE){if(!strD){return -1}iB=iB||0;iE=iE||strD.length;for(var i=iB;i<iE;i++){if(SAXStrings.WHITESPACE.indexOf(strD.charAt(i))!=-1){return i}}return -1};SAXStrings.lastIndexOfNonWhitespace=function(strD,iB,iE){if(!strD){return -1}iB=iB||0;iE=iE||strD.length;for(var i=iE-1;i>=iB;i--){if(SAXStrings.WHITESPACE.indexOf(strD.charAt(i))==-1){return i}}return -1};SAXStrings.replace=function(strD,iB,iE,strF,strR){if(!strD){return""}iB=iB||0;iE=iE||strD.length;return strD.substring(iB,iE).split(strF).join(strR)};function __unescapeString(str){return str.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&apos;/g,"'")}function __escapeString(str){var escAmpRegEx=/&/g;var escLtRegEx=/</g;var escGtRegEx=/>/g;var quotRegEx=/"/g;var aposRegEx=/'/g;str=str.replace(escAmpRegEx,"&amp;");str=str.replace(escLtRegEx,"&lt;");str=str.replace(escGtRegEx,"&gt;");str=str.replace(quotRegEx,"&quot;");str=str.replace(aposRegEx,"&apos;");return str};
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/core/js/jquery.js b/docs/include/jscripts/infusion_old/lib/jquery/core/js/jquery.js
new file mode 100644 (file)
index 0000000..0de899d
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * jQuery JavaScript Library v1.3.2
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
+ * Revision: 6246
+ */
+(function(){var window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context)},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this}if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context)}else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3]){return jQuery().find(selector)}var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret}}else{return jQuery(context).find(selector)}}else{if(jQuery.isFunction(selector)){return jQuery(document).ready(selector)}}if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context}return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(num){return num===undefined?Array.prototype.slice.call(this):this[num]},pushStack:function(elems,name,selector){var ret=jQuery(elems);ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector}else{if(name){ret.selector=this.selector+"."+name+"("+selector+")"}}return ret},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this},each:function(callback,args){return jQuery.each(this,callback,args)},index:function(elem){return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this)},attr:function(name,value,type){var options=name;if(typeof name==="string"){if(value===undefined){return this[0]&&jQuery[type||"attr"](this[0],name)}else{options={};options[name]=value}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name))}})},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined}return this.attr(key,value,"curCSS")},text:function(text){if(typeof text!=="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text))}var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this])}})});return ret},wrapAll:function(html){if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).clone();if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstChild){elem=elem.firstChild}return elem}).append(this)}return this},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html)})},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html)})},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling)})},end:function(){return this.prevObject||jQuery([])},push:[].push,sort:[].sort,splice:[].splice,find:function(selector){if(this.length===1){var ret=this.pushStack([],"find",selector);ret.length=0;jQuery.find(selector,this[0],ret);return ret}else{return this.pushStack(jQuery.unique(jQuery.map(this,function(elem){return jQuery.find(selector,elem)})),"find",selector)}},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML;if(!html){var div=this.ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML}return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(events===true){var orig=this.find("*").andSelf(),i=0;ret.find("*").andSelf().each(function(){if(this.nodeName!==orig[i].nodeName){return }var events=jQuery.data(orig[i],"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data)}}i++})}return ret},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i)})||jQuery.multiFilter(selector,jQuery.grep(this,function(elem){return elem.nodeType===1})),"filter",selector)},closest:function(selector){var pos=jQuery.expr.match.POS.test(selector)?jQuery(selector):null,closer=0;return this.map(function(){var cur=this;while(cur&&cur.ownerDocument){if(pos?pos.index(cur)>-1:jQuery(cur).is(selector)){jQuery.data(cur,"closest",closer);return cur}cur=cur.parentNode;closer++}})},not:function(selector){if(typeof selector==="string"){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true),"not",selector)}else{selector=jQuery.multiFilter(selector,this)}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector})},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector==="string"?jQuery(selector):jQuery.makeArray(selector))))},is:function(selector){return !!selector&&jQuery.multiFilter(selector,this).length>0},hasClass:function(selector){return !!selector&&this.is("."+selector)},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,"option")){return(elem.attributes.value||{}).specified?elem.value:elem.text}if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0){return null}for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery(option).val();if(one){return value}values.push(value)}}return values}return(elem.value||"").replace(/\r/g,"")}return undefined}if(typeof value==="number"){value+=""}return this.each(function(){if(this.nodeType!=1){return }if(jQuery.isArray(value)&&/radio|checkbox/.test(this.type)){this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0)}else{if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0)});if(!values.length){this.selectedIndex=-1}}else{this.value=value}}})},html:function(value){return value===undefined?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(value)},replaceWith:function(value){return this.after(value).remove()},eq:function(i){return this.slice(i,+i+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(args,table,callback){if(this[0]){var fragment=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(args,(this[0].ownerDocument||this[0]),fragment),first=fragment.firstChild;if(first){for(var i=0,l=this.length;i<l;i++){callback.call(root(this[i],first),this.length>1||i>0?fragment.cloneNode(true):fragment)}}if(scripts){jQuery.each(scripts,evalScript)}}return this;function root(elem,cur){return table&&jQuery.nodeName(elem,"table")&&jQuery.nodeName(cur,"tr")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem}}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"})}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"")}if(elem.parentNode){elem.parentNode.removeChild(elem)}}function now(){return +new Date}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2}if(typeof target!=="object"&&!jQuery.isFunction(target)){target={}}if(length==i){target=this;--i}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){var src=target[name],copy=options[name];if(target===copy){continue}if(deep&&copy&&typeof copy==="object"&&!copy.nodeType){target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy)}else{if(copy!==undefined){target[name]=copy}}}}}return target};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{},toString=Object.prototype.toString;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery}return jQuery},isFunction:function(obj){return toString.call(obj)==="[object Function]"},isArray:function(obj){return toString.call(obj)==="[object Array]"},isXMLDoc:function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&jQuery.isXMLDoc(elem.ownerDocument)},globalEval:function(data){if(data&&/\S/.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval){script.appendChild(document.createTextNode(data))}else{script.text=data}head.insertBefore(script,head.firstChild);head.removeChild(script)}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase()},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length===undefined){for(name in object){if(callback.apply(object[name],args)===false){break}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break}}}}else{if(length===undefined){for(name in object){if(callback.call(object[name],name,object[name])===false){break}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}return object},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value)){value=value.call(elem,i)}return typeof value==="number"&&type=="curCSS"&&!exclude.test(name)?value+"px":value},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)){elem.className+=(elem.className?" ":"")+className}})},remove:function(elem,classNames){if(elem.nodeType==1){elem.className=classNames!==undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return !jQuery.className.has(classNames,className)}).join(" "):""}},has:function(elem,className){return elem&&jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name]}callback.call(elem);for(var name in options){elem.style[name]=old[name]}},css:function(elem,name,force,extra){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return }jQuery.each(which,function(){if(!extra){val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0}if(extra==="margin"){val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0}else{val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0}})}if(elem.offsetWidth!==0){getWH()}else{jQuery.swap(elem,props,getWH)}return Math.max(0,Math.round(val))}return jQuery.curCSS(elem,name,force)},curCSS:function(elem,name,force){var ret,style=elem.style;if(name=="opacity"&&!jQuery.support.opacity){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret}if(name.match(/float/i)){name=styleFloat}if(!force&&style&&style[name]){ret=style[name]}else{if(defaultView.getComputedStyle){if(name.match(/float/i)){name="float"}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle){ret=computedStyle.getPropertyValue(name)}if(name=="opacity"&&ret==""){ret="1"}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase()});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft}}}}return ret},clean:function(elems,context,fragment){context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document}if(!fragment&&elems.length===1&&typeof elems[0]==="string"){var match=/^<(\w+)\s*\/?>$/.exec(elems[0]);if(match){return[context.createElement(match[1])]}}var ret=[],scripts=[],div=context.createElement("div");jQuery.each(elems,function(i,elem){if(typeof elem==="number"){elem+=""}if(!elem){return }if(typeof elem==="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">"});var tags=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!jQuery.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--){div=div.lastChild}if(!jQuery.support.tbody){var hasBody=/<tbody/i.test(elem),tbody=!tags.indexOf("<table")&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j])}}}if(!jQuery.support.leadingWhitespace&&/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild)}elem=jQuery.makeArray(div.childNodes)}if(elem.nodeType){ret.push(elem)}else{ret=jQuery.merge(ret,elem)}});if(fragment){for(var i=0;ret[i];i++){if(jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i])}else{if(ret[i].nodeType===1){ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))))}fragment.appendChild(ret[i])}}return scripts}return ret},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&elem.parentNode){elem.parentNode.selectedIndex}if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed"}elem[name]=value}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue}if(name=="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:elem.nodeName.match(/(button|input|object|select|textarea)/i)?0:elem.nodeName.match(/^(a|area)$/i)&&elem.href?0:undefined}return elem[name]}if(!jQuery.support.style&&notxml&&name=="style"){return jQuery.attr(elem.style,"cssText",value)}if(set){elem.setAttribute(name,""+value)}var attr=!jQuery.support.hrefNormalized&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr}if(!jQuery.support.opacity&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+""=="NaN"?"":"alpha(opacity="+value*100+")")}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase()});if(set){elem[name]=value}return elem[name]},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"")},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||typeof array==="string"||jQuery.isFunction(array)||array.setInterval){ret[0]=array}else{while(i){ret[--i]=array[i]}}}return ret},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i}}return -1},merge:function(first,second){var i=0,elem,pos=first.length;if(!jQuery.support.getAll){while((elem=second[i++])!=null){if(elem.nodeType!=8){first[pos++]=elem}}}else{while((elem=second[i++])!=null){first[pos++]=elem}}return first},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i])}}}catch(e){ret=array}return ret},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv!=!callback(elems[i],i)){ret.push(elems[i])}}return ret},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null){ret[ret.length]=value}}return ret.concat.apply([],ret)}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};jQuery.each({parent:function(elem){return elem.parentNode},parents:function(elem){return jQuery.dir(elem,"parentNode")},next:function(elem){return jQuery.nth(elem,2,"nextSibling")},prev:function(elem){return jQuery.nth(elem,2,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string"){ret=jQuery.multiFilter(selector,ret)}return this.pushStack(jQuery.unique(ret),name,selector)}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector);for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems)}return this.pushStack(ret,name,selector)}});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1){this.removeAttribute(name)}},addClass:function(classNames){jQuery.className.add(this,classNames)},removeClass:function(classNames){jQuery.className.remove(this,classNames)},toggleClass:function(classNames,state){if(typeof state!=="boolean"){state=!jQuery.className.has(this,classNames)}jQuery.className[state?"add":"remove"](this,classNames)},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).length){jQuery("*",this).add([this]).each(function(){jQuery.event.remove(this);jQuery.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){jQuery(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments)}});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0}var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id){id=elem[expando]=++uuid}if(name&&!jQuery.cache[id]){jQuery.cache[id]={}}if(data!==undefined){jQuery.cache[id][name]=data}return name?jQuery.cache[id][name]:id},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id]){break}if(!name){jQuery.removeData(elem)}}}else{try{delete elem[expando]}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando)}}delete jQuery.cache[id]}},queue:function(elem,type,data){if(elem){type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!q||jQuery.isArray(data)){q=jQuery.data(elem,type,jQuery.makeArray(data))}else{if(data){q.push(data)}}}return q},dequeue:function(elem,type){var queue=jQuery.queue(elem,type),fn=queue.shift();if(!type||type==="fx"){fn=queue[0]}if(fn!==undefined){fn.call(elem)}}});jQuery.fn.extend({data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key)}return data===undefined&&parts[1]?this.data(parts[0]):data}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value)})}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})},queue:function(type,data){if(typeof type!=="string"){data=type;type="fx"}if(data===undefined){return jQuery.queue(this[0],type)}return this.each(function(){var queue=jQuery.queue(this,type,data);if(type=="fx"&&queue.length==1){queue[0].call(this)}})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})}});
+/*
+ * Sizzle CSS Selector Engine - v0.9.3
+ *  Copyright 2009, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString;var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[]}if(!selector||typeof selector!=="string"){return results}var parts=[],m,set,checkSet,check,mode,extra,prune=true;chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break}}if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context)}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift()}set=posProcess(selector,set)}}}else{var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&context.parentNode?context.parentNode:context,isXML(context));set=Sizzle.filter(ret.expr,ret.set);if(parts.length>0){checkSet=makeArray(set)}else{prune=false}while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur=""}else{pop=parts.pop()}if(pop==null){pop=context}Expr.relative[cur](checkSet,pop,isXML(context))}}if(!checkSet){checkSet=set}if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector)}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet)}else{if(context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i])}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i])}}}}}else{makeArray(checkSet,results)}if(extra){Sizzle(extra,context,results,seed);if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1)}}}}}return results};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set)};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[]}for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.match[type].exec(expr))){var left=RegExp.leftContext;if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break}}}}if(!set){set=context.getElementsByTagName("*")}return{set:set,expr:expr}};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[]}if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true}else{if(match===true){continue}}}if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true}else{curLoop[i]=false}}else{if(pass){result.push(item);anyFound=true}}}}}if(found!==undefined){if(!inplace){curLoop=result}expr=expr.replace(Expr.match[type],"");if(!anyFound){return[]}break}}}if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr}else{break}}old=expr}return curLoop};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href")}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase()}for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part}}if(isPartStrNotTag){Sizzle.filter(part,checkSet,true)}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part}}if(isPartStr){Sizzle.filter(part,checkSet,true)}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML)},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML)}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[]}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i])}}return ret.length===0?null:ret}},TAG:function(match,context){return context.getElementsByTagName(match[1])}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match}for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace){result.push(elem)}}else{if(inplace){curLoop[i]=false}}}}return false},ID:function(match){return match[1].replace(/\\/g,"")},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase()},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0}match[0]=done++;return match},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name]}if(match[2]==="~="){match[4]=" "+match[4]+" "}return match},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop)}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret)}return false}}else{if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true}}return match},POS:function(match){match.unshift(true);return match}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden"},disabled:function(elem){return elem.disabled===true},checked:function(elem){return elem.checked===true},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true},parent:function(elem){return !!elem.firstChild},empty:function(elem){return !elem.firstChild},has:function(elem,i,match){return !!Sizzle(match[3],elem).length},header:function(elem){return/h\d/i.test(elem.nodeName)},text:function(elem){return"text"===elem.type},radio:function(elem){return"radio"===elem.type},checkbox:function(elem){return"checkbox"===elem.type},file:function(elem){return"file"===elem.type},password:function(elem){return"password"===elem.type},submit:function(elem){return"submit"===elem.type},image:function(elem){return"image"===elem.type},reset:function(elem){return"reset"===elem.type},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON"},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName)}},setFilters:{first:function(elem,i){return i===0},last:function(elem,i,match,array){return i===array.length-1},even:function(elem,i){return i%2===0},odd:function(elem,i){return i%2===1},lt:function(elem,i,match){return i<match[3]-0},gt:function(elem,i,match){return i>match[3]-0},nth:function(elem,i,match){return match[3]-0==i},eq:function(elem,i,match){return match[3]-0==i}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array)}else{if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0}else{if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false}}return true}}}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case"only":case"first":while(node=node.previousSibling){if(node.nodeType===1){return false}}if(type=="first"){return true}node=elem;case"last":while(node=node.nextSibling){if(node.nodeType===1){return false}}return true;case"nth":var first=match[2],last=match[3];if(first==1&&last==0){return true}var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count}}parent.sizcache=doneName}var diff=elem.nodeIndex-last;if(first==0){return diff==0}else{return(diff%first==0&&diff/first>=0)}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array)}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results}return array};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array)}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i])}}else{for(var i=0;array[i];i++){ret.push(array[i])}}}return ret}}var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true}return ret}}else{if("sourceIndex" in document.documentElement){sortOrder=function(a,b){var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true}return ret}}else{if(document.createRange){sortOrder=function(a,b){var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.selectNode(a);aRange.collapse(true);bRange.selectNode(b);bRange.collapse(true);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true}return ret}}}}(function(){var form=document.createElement("form"),id="script"+(new Date).getTime();form.innerHTML="<input name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[]}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match}}root.removeChild(form)})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i])}}results=tmp}return results}}div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return }Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra)}catch(e){}}return oldSizzle(query,context,extra,seed)};Sizzle.find=oldSizzle.find;Sizzle.filter=oldSizzle.filter;Sizzle.selectors=oldSizzle.selectors;Sizzle.matches=oldSizzle.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0){return }div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return }Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1])}}})()}function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i}if(elem.nodeName===cur){match=elem;break}elem=elem[dir]}checkSet[i]=match}}}function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i}if(typeof cur!=="string"){if(elem===cur){match=true;break}}else{if(Sizzle.filter(cur,[elem]).length>0){match=elem;break}}}elem=elem[dir]}checkSet[i]=match}}}var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&isXML(elem.ownerDocument)};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"")}selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet)}return Sizzle.filter(later,tmpSet)};jQuery.find=Sizzle;jQuery.filter=Sizzle.filter;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;Sizzle.selectors.filters.hidden=function(elem){return elem.offsetWidth===0||elem.offsetHeight===0};Sizzle.selectors.filters.visible=function(elem){return elem.offsetWidth>0||elem.offsetHeight>0};Sizzle.selectors.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};jQuery.multiFilter=function(expr,elems,not){if(not){expr=":not("+expr+")"}return Sizzle.matches(expr,elems)};jQuery.dir=function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur)}cur=cur[dir]}return matched};jQuery.nth=function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1&&++num==result){break}}return cur};jQuery.sibling=function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem){r.push(n)}}return r};return ;window.Sizzle=Sizzle})();jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return }if(elem.setInterval&&elem!=window){elem=window}if(!handler.guid){handler.guid=this.guid++}if(data!==undefined){var fn=handler;handler=this.proxy(fn);handler.data=data}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(arguments.callee.elem,arguments):undefined});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();handler.type=namespaces.slice().sort().join(".");var handlers=events[type];if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].setup.call(elem,data,namespaces)}if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem,data,namespaces)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false)}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle)}}}}handlers[handler.guid]=handler;jQuery.event.global[type]=true});elem=null},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return }var events=jQuery.data(elem,"events"),ret,index;if(events){if(types===undefined||(typeof types==="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""))}}else{if(types.type){handler=types.handler;types=types.type}jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");if(events[type]){if(handler){delete events[type][handler.guid]}else{for(var handle in events[type]){if(namespace.test(events[type][handle].type)){delete events[type][handle]}}}if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].teardown.call(elem,namespaces)}for(ret in events[type]){break}if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem,namespaces)===false){if(elem.removeEventListener){elem.removeEventListener(type,jQuery.data(elem,"handle"),false)}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"))}}}ret=null;delete events[type]}}})}for(ret in events){break}if(!ret){var handle=jQuery.data(elem,"handle");if(handle){handle.elem=null}jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle")}}},trigger:function(event,data,elem,bubbling){var type=event.type||event;if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true}if(!elem){event.stopPropagation();if(this.global[type]){jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type]){jQuery.event.trigger(event,data,this.handle.elem)}})}}if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event)}event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle){handle.apply(elem,data)}if((!elem[type]||(jQuery.nodeName(elem,"a")&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){event.result=false}if(!bubbling&&elem[type]&&!event.isDefaultPrevented()&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;try{elem[type]()}catch(e){}}this.triggered=false;if(!event.isPropagationStopped()){var parent=elem.parentNode||elem.ownerDocument;if(parent){jQuery.event.trigger(event,data,parent,true)}}},handle:function(event){var all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;var namespaces=event.type.split(".");event.type=namespaces.shift();all=!namespaces.length&&!event.exclusive;var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||namespace.test(handler.type)){event.handler=handler;event.data=handler.data;var ret=handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation()}}if(event.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando]){return event}var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop]}if(!event.target){event.target=event.srcElement||document}if(event.target.nodeType==3){event.target=event.target.parentNode}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0)}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)))}return event},proxy:function(fn,proxy){proxy=proxy||function(){return fn.apply(this,arguments)};proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy},special:{ready:{setup:bindReady,teardown:function(){}}},specialAll:{live:{setup:function(selector,namespaces){jQuery.event.add(this,namespaces[0],liveHandler)},teardown:function(namespaces){if(namespaces.length){var remove=0,name=RegExp("(^|\\.)"+namespaces[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type)){remove++}});if(remove<1){jQuery.event.remove(this,namespaces[0],liveHandler)}}}}}};jQuery.Event=function(src){if(!this.preventDefault){return new jQuery.Event(src)}if(src&&src.type){this.originalEvent=src;this.type=src.type}else{this.type=src}this.timeStamp=now();this[expando]=true};function returnFalse(){return false}function returnTrue(){return true}jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return }if(e.preventDefault){e.preventDefault()}e.returnValue=false},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return }if(e.stopPropagation){e.stopPropagation()}e.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation()},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;while(parent&&parent!=this){try{parent=parent.parentNode}catch(e){parent=this}}if(parent!=this){event.type=event.data;jQuery.event.handle.apply(this,arguments)}};jQuery.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(orig,fix){jQuery.event.special[fix]={setup:function(){jQuery.event.add(this,orig,withinElement,fix)},teardown:function(){jQuery.event.remove(this,orig,withinElement)}}});jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data)})},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments)});return this.each(function(){jQuery.event.add(this,type,one,fn&&data)})},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn)})},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result}},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jQuery.event.proxy(fn,args[i++])}return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false}))},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut)},ready:function(fn){bindReady();if(jQuery.isReady){fn.call(document,jQuery)}else{jQuery.readyList.push(fn)}return this},live:function(type,fn){var proxy=jQuery.event.proxy(fn);proxy.guid+=this.selector+type;jQuery(document).bind(liveConvert(type,this.selector),this.selector,proxy);return this},die:function(type,fn){jQuery(document).unbind(liveConvert(type,this.selector),fn?{guid:fn.guid+this.selector+type}:null);return this}});function liveHandler(event){var check=RegExp("(^|\\.)"+event.type+"(\\.|$)"),stop=true,elems=[];jQuery.each(jQuery.data(this,"events").live||[],function(i,fn){if(check.test(fn.type)){var elem=jQuery(event.target).closest(fn.data)[0];if(elem){elems.push({elem:elem,fn:fn})}}});elems.sort(function(a,b){return jQuery.data(a.elem,"closest")-jQuery.data(b.elem,"closest")});jQuery.each(elems,function(){if(this.fn.call(this.elem,event,this.fn.data)===false){return(stop=false)}});return stop}function liveConvert(type,selector){return["live",type,selector.replace(/\./g,"`").replace(/ /g,"|")].join(".")}jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document,jQuery)});jQuery.readyList=null}jQuery(document).triggerHandler("ready")}}});var readyBound=false;function bindReady(){if(readyBound){return }readyBound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);jQuery.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);jQuery.ready()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(jQuery.isReady){return }try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return }jQuery.ready()})()}}}jQuery.event.add(window,"load",jQuery.ready)}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name)}});jQuery(window).bind("unload",function(){for(var id in jQuery.cache){if(id!=1&&jQuery.cache[id].handle){jQuery.event.remove(jQuery.cache[id].handle.elem)}}});(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+(new Date).getTime();div.style.display="none";div.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return }jQuery.support={leadingWhitespace:div.firstChild.nodeType==3,tbody:!div.getElementsByTagName("tbody").length,objectAll:!!div.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"))}catch(e){}root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id]}root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",arguments.callee)});div.cloneNode(true).fireEvent("onclick")}jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display="none"})})();var styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat";jQuery.props={"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!=="string"){return this._load(url)}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off)}var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null}else{if(typeof params==="object"){params=jQuery.param(params);type="POST"}}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified"){self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText)}if(callback){self.each(callback,[res.responseText,status,res])}}});return this},serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val}}):{name:elem.name,value:val}}).get()}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f)}});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type})},getScript:function(url,callback){return jQuery.get(url,null,callback,"script")},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={}}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type})},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data)}if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?"}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?"}}s.dataType="json"}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1")}s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp]}catch(e){}if(head){head.removeChild(script)}}}if(s.dataType=="script"&&s.cache==null){s.cache=false}if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"")}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=location.host)){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();script.onload=script.onreadystatechange=null;head.removeChild(script)}}}head.appendChild(script);return undefined}var requestDone=false;var xhr=s.xhr();if(s.username){xhr.open(type,s.url,s.async,s.username,s.password)}else{xhr.open(type,s.url,s.async)}try{if(s.data){xhr.setRequestHeader("Content-Type",s.contentType)}if(s.ifModified){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default)}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}xhr.abort();return false}if(s.global){jQuery.event.trigger("ajaxSend",[xhr,s])}var onreadystatechange=function(isTimeout){if(xhr.readyState==0){if(ival){clearInterval(ival);ival=null;if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}}else{if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null}status=isTimeout=="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s)}catch(e){status="parsererror"}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes}if(!jsonp){success()}}else{jQuery.handleError(s,xhr,status)}complete();if(isTimeout){xhr.abort()}if(s.async){xhr=null}}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xhr&&!requestDone){onreadystatechange("timeout")}},s.timeout)}}try{xhr.send(s.data)}catch(e){jQuery.handleError(s,xhr,null,e)}if(!s.async){onreadystatechange()}function success(){if(s.success){s.success(data,status)}if(s.global){jQuery.event.trigger("ajaxSuccess",[xhr,s])}}function complete(){if(s.complete){s.complete(xhr,status)}if(s.global){jQuery.event.trigger("ajaxComplete",[xhr,s])}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}return xhr},handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e)}if(s.global){jQuery.event.trigger("ajaxError",[xhr,s,e])}},active:0,httpSuccess:function(xhr){try{return !xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223}catch(e){}return false},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]}catch(e){}return false},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror"}if(s&&s.dataFilter){data=s.dataFilter(data,type)}if(typeof data==="string"){if(type=="script"){jQuery.globalEval(data)}if(type=="json"){data=window.eval("("+data+")")}}return data},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)}if(jQuery.isArray(a)||a.jquery){jQuery.each(a,function(){add(this.name,this.value)})}else{for(var j in a){if(jQuery.isArray(a[j])){jQuery.each(a[j],function(){add(j,this)})}else{add(j,jQuery.isFunction(a[j])?a[j]():a[j])}}}return s.join("&").replace(/%20/g,"+")}});var elemdisplay={},timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type});return obj}jQuery.fn.extend({show:function(speed,callback){if(speed){return this.animate(genFx("show",3),speed,callback)}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var tagName=this[i].tagName,display;if(elemdisplay[tagName]){display=elemdisplay[tagName]}else{var elem=jQuery("<"+tagName+" />").appendTo("body");display=elem.css("display");if(display==="none"){display="block"}elem.remove();elemdisplay[tagName]=display}jQuery.data(this[i],"olddisplay",display)}}for(var i=0,l=this.length;i<l;i++){this[i].style.display=jQuery.data(this[i],"olddisplay")||""}return this}},hide:function(speed,callback){if(speed){return this.animate(genFx("hide",3),speed,callback)}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none"){jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"))}}for(var i=0,l=this.length;i<l;i++){this[i].style.display="none"}return this}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn==null||bool?this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]()}):this.animate(genFx("toggle",3),fn,fn2)},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback)},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType==1&&jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return opt.complete.call(this)}if((p=="height"||p=="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow}}if(opt.overflow!=null){this.style.overflow="hidden"}opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val)){e[val=="toggle"?hidden?"show":"hide":val](prop)}else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit}if(parts[1]){end=((parts[1]=="-="?-1:1)*end)+start}e.custom(start,end,unit)}else{e.custom(start,val,"")}}});return true})},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([])}this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true)}timers.splice(i,1)}}});if(!gotoEnd){this.dequeue()}return this}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback)}});jQuery.extend({speed:function(speed,easing,fn){var opt=typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue()}if(jQuery.isFunction(opt.old)){opt.old.call(this)}};return opt},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={}}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd)}t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1)}}if(!timers.length){clearInterval(timerId);timerId=undefined}},13)}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());jQuery(this.elem).show()},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(gotoEnd){var t=now();if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){jQuery(this.elem).hide()}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p])}}this.options.complete.call(this.elem)}return false}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now)},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null){fx.elem.style[fx.prop]=fx.now+fx.unit}else{fx.elem[fx.prop]=fx.now}}}});if(document.documentElement.getBoundingClientRect){jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0])}var box=this[0].getBoundingClientRect(),doc=this[0].ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left}}}else{jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0])}jQuery.offset.initialized||jQuery.offset.initialize();var elem=this[0],offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView.getComputedStyle(elem,null),top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){computedStyle=defaultView.getComputedStyle(elem,null);top-=elem.scrollTop,left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop,left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.tagName))){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0}prevOffsetParent=offsetParent,offsetParent=elem.offsetParent}if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0}prevComputedStyle=computedStyle}if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop,left+=body.offsetLeft}if(prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop),left+=Math.max(docElem.scrollLeft,body.scrollLeft)}return{top:top,left:left}}}jQuery.offset={initialize:function(){if(this.initialized){return }var body=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,rules,prop,bodyMarginTop=body.style.marginTop,html='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';rules={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(prop in rules){container.style[prop]=rules[prop]}container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild,checkDiv=innerDiv.firstChild,td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);innerDiv.style.overflow="hidden",innerDiv.style.position="relative";this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);body.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(body.offsetTop===0);body.style.marginTop=bodyMarginTop;body.removeChild(container);this.initialized=true},bodyOffset:function(body){jQuery.offset.initialized||jQuery.offset.initialize();var top=body.offsetTop,left=body.offsetLeft;if(jQuery.offset.doesNotIncludeMarginInBodyOffset){top+=parseInt(jQuery.curCSS(body,"marginTop",true),10)||0,left+=parseInt(jQuery.curCSS(body,"marginLeft",true),10)||0}return{top:top,left:left}}};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}return results},offsetParent:function(){var offsetParent=this[0].offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent}return jQuery(offsetParent)}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){if(!this[0]){return null}return val!==undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val}):this[0]==window||this[0]==document?self[i?"pageYOffset":"pageXOffset"]||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method]}});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom",lower=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],lower,false,"padding"):null};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],lower,false,margin?"margin":"border"):null};var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(document.documentElement["client"+name],document.body["scroll"+name],document.documentElement["scroll"+name],document.body["offset"+name],document.documentElement["offset"+name]):size===undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,typeof size==="string"?size:size+"px")}})})();
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/plugins/bgiframe/js/jquery.bgiframe.js b/docs/include/jscripts/infusion_old/lib/jquery/plugins/bgiframe/js/jquery.bgiframe.js
new file mode 100644 (file)
index 0000000..b3f2969
--- /dev/null
@@ -0,0 +1 @@
+(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&parseInt($.browser.version)<=6){s=$.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},s||{});var prop=function(n){return n&&n.constructor==Number?n+"px":n},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(s.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":prop(s.top))+";left:"+(s.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":prop(s.left))+";width:"+(s.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":prop(s.width))+";height:"+(s.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":prop(s.height))+';"/>';return this.each(function(){if($("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(html),this.firstChild)}})}return this};if(!$.browser.version){$.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1]}})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/plugins/delegate/js/jquery.delegate.js b/docs/include/jscripts/infusion_old/lib/jquery/plugins/delegate/js/jquery.delegate.js
new file mode 100644 (file)
index 0000000..690a03a
--- /dev/null
@@ -0,0 +1 @@
+(function($){$.each({focus:"focusin",blur:"focusout"},function(original,fix){$.event.special[fix]={setup:function(){if($.browser.msie){return false}this.addEventListener(original,$.event.special[fix].handler,true)},teardown:function(){if($.browser.msie){return false}this.removeEventListener(original,$.event.special[fix].handler,true)},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments)}}});$.extend($.fn,{delegate:function(type,delegate,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments)}})},triggerEvent:function(type,target){return this.triggerHandler(type,[jQuery.event.fix({type:type,target:target})])}})})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/plugins/tooltip/css/jquery.tooltip.css b/docs/include/jscripts/infusion_old/lib/jquery/plugins/tooltip/css/jquery.tooltip.css
new file mode 100644 (file)
index 0000000..7594ab2
--- /dev/null
@@ -0,0 +1,2 @@
+#tooltip{position:absolute;z-index:3000;border:1px solid #111;background-color:#ffffe1;padding:2px;}
+#tooltip h3,#tooltip div{margin:0;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/plugins/tooltip/js/jquery.tooltip.js b/docs/include/jscripts/infusion_old/lib/jquery/plugins/tooltip/js/jquery.tooltip.js
new file mode 100644 (file)
index 0000000..9933928
--- /dev/null
@@ -0,0 +1 @@
+(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip-settings",settings);this.tooltipText=this.title;$(this).removeAttr("title");this.alt=""}).hover(save,hide).click(hide)},fixPNG:IE?function(){return this.each(function(){var image=$(this).css("backgroundImage");if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css("position");if(position!="absolute"&&position!="relative"){$(this).css("position","relative")}})}})}:function(){return this},unfixPNG:IE?function(){return this.each(function(){$(this).css({filter:"",backgroundImage:""})})}:function(){return this},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]()})},url:function(){return this.attr("href")||this.attr("src")}});function createHelper(settings){if(helper.parent){return }helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe){helper.parent.bgiframe()}helper.title=$("h3",helper.parent);helper.body=$("div.body",helper.parent);helper.url=$("div.url",helper.parent)}function settings(element){return $.data(element,"tooltip-settings")}function handle(event){if(settings(this).delay){tID=setTimeout(show,settings(this).delay)}else{show()}track=!!settings(this).track;$(document.body).bind("mousemove",update);update(event)}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler)){return }current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent)}helper.body.show()}else{if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;part=parts[i];i++){if(i>0){helper.body.append("<br/>")}helper.body.append(part)}helper.body.hideWhenEmpty()}else{helper.title.html(title).show();helper.body.hide()}}if(settings(this).showURL&&$(this).url()){helper.url.html($(this).url().replace("http://","")).show()}else{helper.url.hide()}helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG){helper.parent.fixPNG()}handle.apply(this,arguments)}function show(){tID=null;helper.parent.show();update()}function update(event){if($.tooltip.blocked){return }if(!track&&helper.parent.is(":visible")){$(document.body).unbind("mousemove",update)}if(current==null||!settings(current)){return }helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;helper.parent.css({left:left+"px",top:top+"px"})}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+"px"}).addClass("viewport-right")}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+"px"}).addClass("viewport-bottom")}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()}}function hide(event){if($.tooltip.blocked){return }if(tID){clearTimeout(tID)}current=null;helper.parent.hide().removeClass(settings(this).extraClass);if(settings(this).fixPNG){helper.parent.unfixPNG()}}$.fn.Tooltip=$.fn.tooltip})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/coal.css b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/coal.css
new file mode 100644 (file)
index 0000000..e336c12
--- /dev/null
@@ -0,0 +1,319 @@
+.fl-theme-coal .ui-helper-hidden{display:none;}
+.fl-theme-coal .ui-helper-hidden-accessible{position:absolute;left:-99999999px;}
+.fl-theme-coal .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none;}
+.fl-theme-coal .ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
+.fl-theme-coal .ui-helper-clearfix{display:inline-block;}
+/* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix{height:1%;}
+.fl-theme-coal .ui-helper-clearfix{display:block;}
+/* end clearfix */ .fl-theme-coal .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0);}
+.fl-theme-coal .ui-state-disabled{cursor:default!important;}
+.fl-theme-coal .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;}
+.fl-theme-coal .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
+.fl-theme-coal .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-coal .ui-widget input,.fl-theme-coal .ui-widget select,.fl-theme-coal .ui-widget textarea,.fl-theme-coal .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-coal .ui-widget-content{border:1px solid #ccc;background:#ccc url(images/ui-bg_flAF_75_cccccc_40x100.png) 50% 50% repeat-x;color:#222;}
+.fl-theme-coal .ui-widget-content a{color:#222;}
+.fl-theme-coal .ui-widget-header{border:1px solid #00000;background:#575757 url(images/ui-bg_highlight-soft_25_575757_1x100.png) 50% 50% repeat-x;color:#ccc;font-weight:bold;}
+.fl-theme-coal .ui-widget-header a{color:#ccc;}
+.fl-theme-coal .ui-state-default,.fl-theme-coal .ui-widget-content .ui-state-default{border:1px solid #000;background:#333 url(images/ui-bg_highlight-soft_75_333333_1x100.png) 50% 50% repeat-x;font-weight:normal;color:#a3a3a3;outline:none;}
+.fl-theme-coal .ui-state-default a,.fl-theme-coal .ui-state-default a:link,.fl-theme-coal .ui-state-default a:visited{color:#a3a3a3;text-decoration:none;outline:none;}
+.fl-theme-coal .ui-state-hover,.fl-theme-coal .ui-widget-content .ui-state-hover,.fl-theme-coal .ui-state-focus,.fl-theme-coal .ui-widget-content .ui-state-focus{border:1px solid #000;background:#666 url(images/ui-bg_highlight-soft_75_666666_1x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
+.fl-theme-coal .ui-state-hover a,.fl-theme-coal .ui-state-hover a:hover{color:#fff;text-decoration:none;outline:none;}
+.fl-theme-coal .ui-state-active,.fl-theme-coal .ui-widget-content .ui-state-active{border:1px solid #000;background:#000 url(images/ui-bg_highlight-soft_65_000000_1x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
+.fl-theme-coal .ui-state-active a,.fl-theme-coal .ui-state-active a:link,.fl-theme-coal .ui-state-active a:visited{color:#fff;outline:none;text-decoration:none;}
+.fl-theme-coal .ui-state-highlight,.fl-theme-coal .ui-widget-content .ui-state-highlight{border:1px solid #666;background:#ccc url(images/ui-bg_highlight-soft_55_cccccc_1x100.png) 50% top repeat-x;color:#000;}
+.fl-theme-coal .ui-state-highlight a,.fl-theme-coal .ui-widget-content .ui-state-highlight a{color:#000;}
+.fl-theme-coal .ui-state-error,.fl-theme-coal .ui-widget-content .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_inset-soft_95_fef1ec_1x100.png) 50% bottom repeat-x;color:#cd0a0a;}
+.fl-theme-coal .ui-state-error a,.fl-theme-coal .ui-widget-content .ui-state-error a{color:#cd0a0a;}
+.fl-theme-coal .ui-state-error-text,.fl-theme-coal .ui-widget-content .ui-state-error-text{color:#cd0a0a;}
+.fl-theme-coal .ui-state-disabled,.fl-theme-coal .ui-widget-content .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none;}
+.fl-theme-coal .ui-priority-primary,.fl-theme-coal .ui-widget-content .ui-priority-primary{font-weight:bold;}
+.fl-theme-coal .ui-priority-secondary,.fl-theme-coal .ui-widget-content .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal;}
+.fl-theme-coal .ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_222222_256x240.png);}
+.fl-theme-coal .ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png);}
+.fl-theme-coal .ui-widget-header .ui-icon{background-image:url(images/ui-icons_cccccc_256x240.png);}
+.fl-theme-coal .ui-state-default .ui-icon{background-image:url(images/ui-icons_a3a3a3_256x240.png);}
+.fl-theme-coal .ui-state-hover .ui-icon,.fl-theme-coal .ui-state-focus .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-coal .ui-state-active .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-coal .ui-state-highlight .ui-icon{background-image:url(images/ui-icons_333333_256x240.png);}
+.fl-theme-coal .ui-state-error .ui-icon,.fl-theme-coal .ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png);}
+.fl-theme-coal .ui-icon-carat-1-n{background-position:0 0;}
+.fl-theme-coal .ui-icon-carat-1-ne{background-position:-16px 0;}
+.fl-theme-coal .ui-icon-carat-1-e{background-position:-32px 0;}
+.fl-theme-coal .ui-icon-carat-1-se{background-position:-48px 0;}
+.fl-theme-coal .ui-icon-carat-1-s{background-position:-64px 0;}
+.fl-theme-coal .ui-icon-carat-1-sw{background-position:-80px 0;}
+.fl-theme-coal .ui-icon-carat-1-w{background-position:-96px 0;}
+.fl-theme-coal .ui-icon-carat-1-nw{background-position:-112px 0;}
+.fl-theme-coal .ui-icon-carat-2-n-s{background-position:-128px 0;}
+.fl-theme-coal .ui-icon-carat-2-e-w{background-position:-144px 0;}
+.fl-theme-coal .ui-icon-triangle-1-n{background-position:0 -16px;}
+.fl-theme-coal .ui-icon-triangle-1-ne{background-position:-16px -16px;}
+.fl-theme-coal .ui-icon-triangle-1-e{background-position:-32px -16px;}
+.fl-theme-coal .ui-icon-triangle-1-se{background-position:-48px -16px;}
+.fl-theme-coal .ui-icon-triangle-1-s{background-position:-64px -16px;}
+.fl-theme-coal .ui-icon-triangle-1-sw{background-position:-80px -16px;}
+.fl-theme-coal .ui-icon-triangle-1-w{background-position:-96px -16px;}
+.fl-theme-coal .ui-icon-triangle-1-nw{background-position:-112px -16px;}
+.fl-theme-coal .ui-icon-triangle-2-n-s{background-position:-128px -16px;}
+.fl-theme-coal .ui-icon-triangle-2-e-w{background-position:-144px -16px;}
+.fl-theme-coal .ui-icon-arrow-1-n{background-position:0 -32px;}
+.fl-theme-coal .ui-icon-arrow-1-ne{background-position:-16px -32px;}
+.fl-theme-coal .ui-icon-arrow-1-e{background-position:-32px -32px;}
+.fl-theme-coal .ui-icon-arrow-1-se{background-position:-48px -32px;}
+.fl-theme-coal .ui-icon-arrow-1-s{background-position:-64px -32px;}
+.fl-theme-coal .ui-icon-arrow-1-sw{background-position:-80px -32px;}
+.fl-theme-coal .ui-icon-arrow-1-w{background-position:-96px -32px;}
+.fl-theme-coal .ui-icon-arrow-1-nw{background-position:-112px -32px;}
+.fl-theme-coal .ui-icon-arrow-2-n-s{background-position:-128px -32px;}
+.fl-theme-coal .ui-icon-arrow-2-ne-sw{background-position:-144px -32px;}
+.fl-theme-coal .ui-icon-arrow-2-e-w{background-position:-160px -32px;}
+.fl-theme-coal .ui-icon-arrow-2-se-nw{background-position:-176px -32px;}
+.fl-theme-coal .ui-icon-arrowstop-1-n{background-position:-192px -32px;}
+.fl-theme-coal .ui-icon-arrowstop-1-e{background-position:-208px -32px;}
+.fl-theme-coal .ui-icon-arrowstop-1-s{background-position:-224px -32px;}
+.fl-theme-coal .ui-icon-arrowstop-1-w{background-position:-240px -32px;}
+.fl-theme-coal .ui-icon-arrowthick-1-n{background-position:0 -48px;}
+.fl-theme-coal .ui-icon-arrowthick-1-ne{background-position:-16px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-1-e{background-position:-32px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-1-se{background-position:-48px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-1-s{background-position:-64px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-1-sw{background-position:-80px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-1-w{background-position:-96px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-1-nw{background-position:-112px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-2-n-s{background-position:-128px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-2-e-w{background-position:-160px -48px;}
+.fl-theme-coal .ui-icon-arrowthick-2-se-nw{background-position:-176px -48px;}
+.fl-theme-coal .ui-icon-arrowthickstop-1-n{background-position:-192px -48px;}
+.fl-theme-coal .ui-icon-arrowthickstop-1-e{background-position:-208px -48px;}
+.fl-theme-coal .ui-icon-arrowthickstop-1-s{background-position:-224px -48px;}
+.fl-theme-coal .ui-icon-arrowthickstop-1-w{background-position:-240px -48px;}
+.fl-theme-coal .ui-icon-arrowreturnthick-1-w{background-position:0 -64px;}
+.fl-theme-coal .ui-icon-arrowreturnthick-1-n{background-position:-16px -64px;}
+.fl-theme-coal .ui-icon-arrowreturnthick-1-e{background-position:-32px -64px;}
+.fl-theme-coal .ui-icon-arrowreturnthick-1-s{background-position:-48px -64px;}
+.fl-theme-coal .ui-icon-arrowreturn-1-w{background-position:-64px -64px;}
+.fl-theme-coal .ui-icon-arrowreturn-1-n{background-position:-80px -64px;}
+.fl-theme-coal .ui-icon-arrowreturn-1-e{background-position:-96px -64px;}
+.fl-theme-coal .ui-icon-arrowreturn-1-s{background-position:-112px -64px;}
+.fl-theme-coal .ui-icon-arrowrefresh-1-w{background-position:-128px -64px;}
+.fl-theme-coal .ui-icon-arrowrefresh-1-n{background-position:-144px -64px;}
+.fl-theme-coal .ui-icon-arrowrefresh-1-e{background-position:-160px -64px;}
+.fl-theme-coal .ui-icon-arrowrefresh-1-s{background-position:-176px -64px;}
+.fl-theme-coal .ui-icon-arrow-4{background-position:0 -80px;}
+.fl-theme-coal .ui-icon-arrow-4-diag{background-position:-16px -80px;}
+.fl-theme-coal .ui-icon-extlink{background-position:-32px -80px;}
+.fl-theme-coal .ui-icon-newwin{background-position:-48px -80px;}
+.fl-theme-coal .ui-icon-refresh{background-position:-64px -80px;}
+.fl-theme-coal .ui-icon-shuffle{background-position:-80px -80px;}
+.fl-theme-coal .ui-icon-transfer-e-w{background-position:-96px -80px;}
+.fl-theme-coal .ui-icon-transferthick-e-w{background-position:-112px -80px;}
+.fl-theme-coal .ui-icon-folder-collapsed{background-position:0 -96px;}
+.fl-theme-coal .ui-icon-folder-open{background-position:-16px -96px;}
+.fl-theme-coal .ui-icon-document{background-position:-32px -96px;}
+.fl-theme-coal .ui-icon-document-b{background-position:-48px -96px;}
+.fl-theme-coal .ui-icon-note{background-position:-64px -96px;}
+.fl-theme-coal .ui-icon-mail-closed{background-position:-80px -96px;}
+.fl-theme-coal .ui-icon-mail-open{background-position:-96px -96px;}
+.fl-theme-coal .ui-icon-suitcase{background-position:-112px -96px;}
+.fl-theme-coal .ui-icon-comment{background-position:-128px -96px;}
+.fl-theme-coal .ui-icon-person{background-position:-144px -96px;}
+.fl-theme-coal .ui-icon-print{background-position:-160px -96px;}
+.fl-theme-coal .ui-icon-trash{background-position:-176px -96px;}
+.fl-theme-coal .ui-icon-locked{background-position:-192px -96px;}
+.fl-theme-coal .ui-icon-unlocked{background-position:-208px -96px;}
+.fl-theme-coal .ui-icon-bookmark{background-position:-224px -96px;}
+.fl-theme-coal .ui-icon-tag{background-position:-240px -96px;}
+.fl-theme-coal .ui-icon-home{background-position:0 -112px;}
+.fl-theme-coal .ui-icon-flag{background-position:-16px -112px;}
+.fl-theme-coal .ui-icon-calendar{background-position:-32px -112px;}
+.fl-theme-coal .ui-icon-cart{background-position:-48px -112px;}
+.fl-theme-coal .ui-icon-pencil{background-position:-64px -112px;}
+.fl-theme-coal .ui-icon-clock{background-position:-80px -112px;}
+.fl-theme-coal .ui-icon-disk{background-position:-96px -112px;}
+.fl-theme-coal .ui-icon-calculator{background-position:-112px -112px;}
+.fl-theme-coal .ui-icon-zoomin{background-position:-128px -112px;}
+.fl-theme-coal .ui-icon-zoomout{background-position:-144px -112px;}
+.fl-theme-coal .ui-icon-search{background-position:-160px -112px;}
+.fl-theme-coal .ui-icon-wrench{background-position:-176px -112px;}
+.fl-theme-coal .ui-icon-gear{background-position:-192px -112px;}
+.fl-theme-coal .ui-icon-heart{background-position:-208px -112px;}
+.fl-theme-coal .ui-icon-star{background-position:-224px -112px;}
+.fl-theme-coal .ui-icon-link{background-position:-240px -112px;}
+.fl-theme-coal .ui-icon-cancel{background-position:0 -128px;}
+.fl-theme-coal .ui-icon-plus{background-position:-16px -128px;}
+.fl-theme-coal .ui-icon-plusthick{background-position:-32px -128px;}
+.fl-theme-coal .ui-icon-minus{background-position:-48px -128px;}
+.fl-theme-coal .ui-icon-minusthick{background-position:-64px -128px;}
+.fl-theme-coal .ui-icon-close{background-position:-80px -128px;}
+.fl-theme-coal .ui-icon-closethick{background-position:-96px -128px;}
+.fl-theme-coal .ui-icon-key{background-position:-112px -128px;}
+.fl-theme-coal .ui-icon-lightbulb{background-position:-128px -128px;}
+.fl-theme-coal .ui-icon-scissors{background-position:-144px -128px;}
+.fl-theme-coal .ui-icon-clipboard{background-position:-160px -128px;}
+.fl-theme-coal .ui-icon-copy{background-position:-176px -128px;}
+.fl-theme-coal .ui-icon-contact{background-position:-192px -128px;}
+.fl-theme-coal .ui-icon-image{background-position:-208px -128px;}
+.fl-theme-coal .ui-icon-video{background-position:-224px -128px;}
+.fl-theme-coal .ui-icon-script{background-position:-240px -128px;}
+.fl-theme-coal .ui-icon-alert{background-position:0 -144px;}
+.fl-theme-coal .ui-icon-info{background-position:-16px -144px;}
+.fl-theme-coal .ui-icon-notice{background-position:-32px -144px;}
+.fl-theme-coal .ui-icon-help{background-position:-48px -144px;}
+.fl-theme-coal .ui-icon-check{background-position:-64px -144px;}
+.fl-theme-coal .ui-icon-bullet{background-position:-80px -144px;}
+.fl-theme-coal .ui-icon-radio-off{background-position:-96px -144px;}
+.fl-theme-coal .ui-icon-radio-on{background-position:-112px -144px;}
+.fl-theme-coal .ui-icon-pin-w{background-position:-128px -144px;}
+.fl-theme-coal .ui-icon-pin-s{background-position:-144px -144px;}
+.fl-theme-coal .ui-icon-play{background-position:0 -160px;}
+.fl-theme-coal .ui-icon-pause{background-position:-16px -160px;}
+.fl-theme-coal .ui-icon-seek-next{background-position:-32px -160px;}
+.fl-theme-coal .ui-icon-seek-prev{background-position:-48px -160px;}
+.fl-theme-coal .ui-icon-seek-end{background-position:-64px -160px;}
+.fl-theme-coal .ui-icon-seek-first{background-position:-80px -160px;}
+.fl-theme-coal .ui-icon-stop{background-position:-96px -160px;}
+.fl-theme-coal .ui-icon-eject{background-position:-112px -160px;}
+.fl-theme-coal .ui-icon-volume-off{background-position:-128px -160px;}
+.fl-theme-coal .ui-icon-volume-on{background-position:-144px -160px;}
+.fl-theme-coal .ui-icon-power{background-position:0 -176px;}
+.fl-theme-coal .ui-icon-signal-diag{background-position:-16px -176px;}
+.fl-theme-coal .ui-icon-signal{background-position:-32px -176px;}
+.fl-theme-coal .ui-icon-battery-0{background-position:-48px -176px;}
+.fl-theme-coal .ui-icon-battery-1{background-position:-64px -176px;}
+.fl-theme-coal .ui-icon-battery-2{background-position:-80px -176px;}
+.fl-theme-coal .ui-icon-battery-3{background-position:-96px -176px;}
+.fl-theme-coal .ui-icon-circle-plus{background-position:0 -192px;}
+.fl-theme-coal .ui-icon-circle-minus{background-position:-16px -192px;}
+.fl-theme-coal .ui-icon-circle-close{background-position:-32px -192px;}
+.fl-theme-coal .ui-icon-circle-triangle-e{background-position:-48px -192px;}
+.fl-theme-coal .ui-icon-circle-triangle-s{background-position:-64px -192px;}
+.fl-theme-coal .ui-icon-circle-triangle-w{background-position:-80px -192px;}
+.fl-theme-coal .ui-icon-circle-triangle-n{background-position:-96px -192px;}
+.fl-theme-coal .ui-icon-circle-arrow-e{background-position:-112px -192px;}
+.fl-theme-coal .ui-icon-circle-arrow-s{background-position:-128px -192px;}
+.fl-theme-coal .ui-icon-circle-arrow-w{background-position:-144px -192px;}
+.fl-theme-coal .ui-icon-circle-arrow-n{background-position:-160px -192px;}
+.fl-theme-coal .ui-icon-circle-zoomin{background-position:-176px -192px;}
+.fl-theme-coal .ui-icon-circle-zoomout{background-position:-192px -192px;}
+.fl-theme-coal .ui-icon-circle-check{background-position:-208px -192px;}
+.fl-theme-coal .ui-icon-circlesmall-plus{background-position:0 -208px;}
+.fl-theme-coal .ui-icon-circlesmall-minus{background-position:-16px -208px;}
+.fl-theme-coal .ui-icon-circlesmall-close{background-position:-32px -208px;}
+.fl-theme-coal .ui-icon-squaresmall-plus{background-position:-48px -208px;}
+.fl-theme-coal .ui-icon-squaresmall-minus{background-position:-64px -208px;}
+.fl-theme-coal .ui-icon-squaresmall-close{background-position:-80px -208px;}
+.fl-theme-coal .ui-icon-grip-dotted-vertical{background-position:0 -224px;}
+.fl-theme-coal .ui-icon-grip-dotted-horizontal{background-position:-16px -224px;}
+.fl-theme-coal .ui-icon-grip-solid-vertical{background-position:-32px -224px;}
+.fl-theme-coal .ui-icon-grip-solid-horizontal{background-position:-48px -224px;}
+.fl-theme-coal .ui-icon-gripsmall-diagonal-se{background-position:-64px -224px;}
+.fl-theme-coal .ui-icon-grip-diagonal-se{background-position:-80px -224px;}
+.fl-theme-coal .ui-corner-tl{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;}
+.fl-theme-coal .ui-corner-tr{-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;}
+.fl-theme-coal .ui-corner-bl{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;}
+.fl-theme-coal .ui-corner-br{-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;}
+.fl-theme-coal .ui-corner-top{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;}
+.fl-theme-coal .ui-corner-bottom{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;}
+.fl-theme-coal .ui-corner-right{-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;}
+.fl-theme-coal .ui-corner-left{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;}
+.fl-theme-coal .ui-corner-all{-moz-border-radius:0;-webkit-border-radius:0;}
+.fl-theme-coal .ui-widget-overlay{background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;opacity:.40;filter:Alpha(Opacity=40);}
+.fl-theme-coal .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;opacity:.50;filter:Alpha(Opacity=50);-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-coal .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}
+.fl-theme-coal .ui-accordion .ui-accordion-li-fix{display:inline;}
+.fl-theme-coal .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}
+.fl-theme-coal .ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em 2.2em;}
+.fl-theme-coal .ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px;}
+.fl-theme-coal .ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;}
+.fl-theme-coal .ui-accordion .ui-accordion-content-active{display:block;}
+.fl-theme-coal .ui-datepicker{width:17em;padding:.2em .2em 0;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-prev,.fl-theme-coal .ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-prev-hover,.fl-theme-coal .ui-datepicker .ui-datepicker-next-hover{top:1px;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-prev{left:2px;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-next{right:2px;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-prev-hover{left:1px;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-next-hover{right:1px;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-prev span,.fl-theme-coal .ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-title select{float:left;font-size:1em;margin:1px 0;}
+.fl-theme-coal .ui-datepicker select.ui-datepicker-month-year{width:100%;}
+.fl-theme-coal .ui-datepicker select.ui-datepicker-month,.fl-theme-coal .ui-datepicker select.ui-datepicker-year{width:49%;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-title select.ui-datepicker-year{float:right;}
+.fl-theme-coal .ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em;}
+.fl-theme-coal .ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0;}
+.fl-theme-coal .ui-datepicker td{border:0;padding:1px;}
+.fl-theme-coal .ui-datepicker td span,.fl-theme-coal .ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible;}
+.fl-theme-coal .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left;}
+.fl-theme-coal .ui-datepicker.ui-datepicker-multi{width:auto;}
+.fl-theme-coal .ui-datepicker-multi .ui-datepicker-group{float:left;}
+.fl-theme-coal .ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em;}
+.fl-theme-coal .ui-datepicker-multi-2 .ui-datepicker-group{width:50%;}
+.fl-theme-coal .ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%;}
+.fl-theme-coal .ui-datepicker-multi-4 .ui-datepicker-group{width:25%;}
+.fl-theme-coal .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0;}
+.fl-theme-coal .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0;}
+.fl-theme-coal .ui-datepicker-multi .ui-datepicker-buttonpane{clear:left;}
+.fl-theme-coal .ui-datepicker-row-break{clear:both;width:100%;}
+.fl-theme-coal .ui-datepicker-rtl{direction:rtl;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-group{float:right;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-coal .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-coal .ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px;}
+.fl-theme-coal .ui-dialog{position:relative;padding:.2em;width:300px;}
+.fl-theme-coal .ui-dialog .ui-dialog-titlebar{padding:.5em .3em .3em 1em;position:relative;}
+.fl-theme-coal .ui-dialog .ui-dialog-title{float:left;margin:.1em 0 .2em;}
+.fl-theme-coal .ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px;}
+.fl-theme-coal .ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px;}
+.fl-theme-coal .ui-dialog .ui-dialog-titlebar-close:hover,.fl-theme-coal .ui-dialog .ui-dialog-titlebar-close:focus{padding:0;}
+.fl-theme-coal .ui-dialog .ui-dialog-content{border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1;}
+.fl-theme-coal .ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em;}
+.fl-theme-coal .ui-dialog .ui-dialog-buttonpane button{float:right;margin:.5em .4em .5em 0;cursor:pointer;padding:.2em .6em .3em .6em;line-height:1.4em;width:auto;overflow:visible;}
+.fl-theme-coal .ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px;}
+.fl-theme-coal .ui-draggable .ui-dialog-titlebar{cursor:move;}
+.fl-theme-coal .ui-progressbar{height:2em;text-align:left;}
+.fl-theme-coal .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%;}
+.fl-theme-coal .ui-resizable{position:relative;}
+.fl-theme-coal .ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block;}
+.fl-theme-coal .ui-resizable-disabled .ui-resizable-handle,.fl-theme-coal .ui-resizable-autohide .ui-resizable-handle{display:none;}
+.fl-theme-coal .ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0;}
+.fl-theme-coal .ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0;}
+.fl-theme-coal .ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%;}
+.fl-theme-coal .ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%;}
+.fl-theme-coal .ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px;}
+.fl-theme-coal .ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px;}
+.fl-theme-coal .ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px;}
+.fl-theme-coal .ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px;}
+.fl-theme-coal .ui-slider{position:relative;text-align:left;}
+.fl-theme-coal .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;}
+.fl-theme-coal .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;}
+.fl-theme-coal .ui-slider-horizontal{height:.8em;}
+.fl-theme-coal .ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em;}
+.fl-theme-coal .ui-slider-horizontal .ui-slider-range{top:0;height:100%;}
+.fl-theme-coal .ui-slider-horizontal .ui-slider-range-min{left:0;}
+.fl-theme-coal .ui-slider-horizontal .ui-slider-range-max{right:0;}
+.fl-theme-coal .ui-slider-vertical{width:.8em;height:100px;}
+.fl-theme-coal .ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em;}
+.fl-theme-coal .ui-slider-vertical .ui-slider-range{left:0;width:100%;}
+.fl-theme-coal .ui-slider-vertical .ui-slider-range-min{bottom:0;}
+.fl-theme-coal .ui-slider-vertical .ui-slider-range-max{top:0;}
+.fl-theme-coal .ui-tabs{padding:.2em;zoom:1;}
+.fl-theme-coal .ui-tabs .ui-tabs-nav{list-style:none;position:relative;padding:.2em .2em 0;}
+.fl-theme-coal .ui-tabs .ui-tabs-nav li{position:relative;float:left;border-bottom-width:0!important;margin:0 .2em -1px 0;padding:0;}
+.fl-theme-coal .ui-tabs .ui-tabs-nav li a{float:left;text-decoration:none;padding:.5em 1em;}
+.fl-theme-coal .ui-tabs .ui-tabs-nav li.ui-tabs-selected{padding-bottom:1px;border-bottom-width:0;}
+.fl-theme-coal .ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.fl-theme-coal .ui-tabs .ui-tabs-nav li.ui-state-disabled a,.fl-theme-coal .ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text;}
+.fl-theme-coal .ui-tabs .ui-tabs-nav li a,.fl-theme-coal .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer;}
+.fl-theme-coal .ui-tabs .ui-tabs-panel{padding:1em 1.4em;display:block;border-width:0;background:none;}
+.fl-theme-coal .ui-tabs .ui-tabs-hide{display:none!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_0_000000_40x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_0_000000_40x100.png
new file mode 100644 (file)
index 0000000..abdc010
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_0_000000_40x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_75_cccccc_40x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_75_cccccc_40x100.png
new file mode 100644 (file)
index 0000000..5473aff
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_flat_75_cccccc_40x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_25_575757_1x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_25_575757_1x100.png
new file mode 100644 (file)
index 0000000..3a8f50c
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_25_575757_1x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_55_cccccc_1x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_55_cccccc_1x100.png
new file mode 100644 (file)
index 0000000..13e421b
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_55_cccccc_1x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_65_000000_1x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_65_000000_1x100.png
new file mode 100644 (file)
index 0000000..f07ec5f
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_65_000000_1x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_333333_1x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_333333_1x100.png
new file mode 100644 (file)
index 0000000..b932638
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_333333_1x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_666666_1x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_666666_1x100.png
new file mode 100644 (file)
index 0000000..053c7aa
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_highlight-soft_75_666666_1x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_inset-soft_95_fef1ec_1x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_inset-soft_95_fef1ec_1x100.png
new file mode 100644 (file)
index 0000000..0e05810
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-bg_inset-soft_95_fef1ec_1x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_222222_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_222222_256x240.png
new file mode 100644 (file)
index 0000000..67560da
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_222222_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_333333_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_333333_256x240.png
new file mode 100644 (file)
index 0000000..4d44b9b
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_333333_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_a3a3a3_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_a3a3a3_256x240.png
new file mode 100644 (file)
index 0000000..6ef54f5
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_a3a3a3_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cccccc_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cccccc_256x240.png
new file mode 100644 (file)
index 0000000..bdb3cf2
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cccccc_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cd0a0a_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cd0a0a_256x240.png
new file mode 100644 (file)
index 0000000..2db88b7
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_cd0a0a_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_ffffff_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_ffffff_256x240.png
new file mode 100644 (file)
index 0000000..746e6fa
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-coal/images/ui-icons_ffffff_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/hc.css b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/hc.css
new file mode 100644 (file)
index 0000000..7a01546
--- /dev/null
@@ -0,0 +1,319 @@
+.fl-theme-hc .ui-helper-hidden{display:none;}
+.fl-theme-hc .ui-helper-hidden-accessible{position:absolute;left:-99999999px;}
+.fl-theme-hc .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none;}
+.fl-theme-hc .ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
+.fl-theme-hc .ui-helper-clearfix{display:inline-block;}
+/* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix{height:1%;}
+.fl-theme-hc .ui-helper-clearfix{display:block;}
+/* end clearfix */ .fl-theme-hc .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0);}
+.fl-theme-hc .ui-state-disabled{cursor:default!important;}
+.fl-theme-hc .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;}
+.fl-theme-hc .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
+.fl-theme-hc .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-hc .ui-widget input,.fl-theme-hc .ui-widget select,.fl-theme-hc .ui-widget textarea,.fl-theme-hc .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-hc .ui-widget-content{border:1px solid #000;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;}
+.fl-theme-hc .ui-widget-content a{color:#000;}
+.fl-theme-hc .ui-widget-header{border:1px solid #000;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;font-weight:bold;}
+.fl-theme-hc .ui-widget-header a{color:#000;}
+.fl-theme-hc .ui-state-default,.fl-theme-hc .ui-widget-content .ui-state-default{border:1px solid #000;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
+.fl-theme-hc .ui-state-default a,.fl-theme-hc .ui-state-default a:link,.fl-theme-hc .ui-state-default a:visited{color:#fff;text-decoration:none;outline:none;}
+.fl-theme-hc .ui-state-hover,.fl-theme-hc .ui-widget-content .ui-state-hover,.fl-theme-hc .ui-state-focus,.fl-theme-hc .ui-widget-content .ui-state-focus{border:1px solid #000;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
+.fl-theme-hc .ui-state-hover a,.fl-theme-hc .ui-state-hover a:hover{color:#000;text-decoration:none;outline:none;}
+.fl-theme-hc .ui-state-active,.fl-theme-hc .ui-widget-content .ui-state-active{border:1px solid #000;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
+.fl-theme-hc .ui-state-active a,.fl-theme-hc .ui-state-active a:link,.fl-theme-hc .ui-state-active a:visited{color:#000;outline:none;text-decoration:none;}
+.fl-theme-hc .ui-state-highlight,.fl-theme-hc .ui-widget-content .ui-state-highlight{border:1px solid #000;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;}
+.fl-theme-hc .ui-state-highlight a,.fl-theme-hc .ui-widget-content .ui-state-highlight a{color:#000;}
+.fl-theme-hc .ui-state-error,.fl-theme-hc .ui-widget-content .ui-state-error{border:1px solid #fff;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;color:#fff;}
+.fl-theme-hc .ui-state-error a,.fl-theme-hc .ui-widget-content .ui-state-error a{color:#fff;}
+.fl-theme-hc .ui-state-error-text,.fl-theme-hc .ui-widget-content .ui-state-error-text{color:#fff;}
+.fl-theme-hc .ui-state-disabled,.fl-theme-hc .ui-widget-content .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none;}
+.fl-theme-hc .ui-priority-primary,.fl-theme-hc .ui-widget-content .ui-priority-primary{font-weight:bold;}
+.fl-theme-hc .ui-priority-secondary,.fl-theme-hc .ui-widget-content .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal;}
+.fl-theme-hc .ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hc .ui-widget-content .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hc .ui-widget-header .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hc .ui-state-default .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-hc .ui-state-hover .ui-icon,.fl-theme-hc .ui-state-focus .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hc .ui-state-active .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hc .ui-state-highlight .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hc .ui-state-error .ui-icon,.fl-theme-hc .ui-state-error-text .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-hc .ui-icon-carat-1-n{background-position:0 0;}
+.fl-theme-hc .ui-icon-carat-1-ne{background-position:-16px 0;}
+.fl-theme-hc .ui-icon-carat-1-e{background-position:-32px 0;}
+.fl-theme-hc .ui-icon-carat-1-se{background-position:-48px 0;}
+.fl-theme-hc .ui-icon-carat-1-s{background-position:-64px 0;}
+.fl-theme-hc .ui-icon-carat-1-sw{background-position:-80px 0;}
+.fl-theme-hc .ui-icon-carat-1-w{background-position:-96px 0;}
+.fl-theme-hc .ui-icon-carat-1-nw{background-position:-112px 0;}
+.fl-theme-hc .ui-icon-carat-2-n-s{background-position:-128px 0;}
+.fl-theme-hc .ui-icon-carat-2-e-w{background-position:-144px 0;}
+.fl-theme-hc .ui-icon-triangle-1-n{background-position:0 -16px;}
+.fl-theme-hc .ui-icon-triangle-1-ne{background-position:-16px -16px;}
+.fl-theme-hc .ui-icon-triangle-1-e{background-position:-32px -16px;}
+.fl-theme-hc .ui-icon-triangle-1-se{background-position:-48px -16px;}
+.fl-theme-hc .ui-icon-triangle-1-s{background-position:-64px -16px;}
+.fl-theme-hc .ui-icon-triangle-1-sw{background-position:-80px -16px;}
+.fl-theme-hc .ui-icon-triangle-1-w{background-position:-96px -16px;}
+.fl-theme-hc .ui-icon-triangle-1-nw{background-position:-112px -16px;}
+.fl-theme-hc .ui-icon-triangle-2-n-s{background-position:-128px -16px;}
+.fl-theme-hc .ui-icon-triangle-2-e-w{background-position:-144px -16px;}
+.fl-theme-hc .ui-icon-arrow-1-n{background-position:0 -32px;}
+.fl-theme-hc .ui-icon-arrow-1-ne{background-position:-16px -32px;}
+.fl-theme-hc .ui-icon-arrow-1-e{background-position:-32px -32px;}
+.fl-theme-hc .ui-icon-arrow-1-se{background-position:-48px -32px;}
+.fl-theme-hc .ui-icon-arrow-1-s{background-position:-64px -32px;}
+.fl-theme-hc .ui-icon-arrow-1-sw{background-position:-80px -32px;}
+.fl-theme-hc .ui-icon-arrow-1-w{background-position:-96px -32px;}
+.fl-theme-hc .ui-icon-arrow-1-nw{background-position:-112px -32px;}
+.fl-theme-hc .ui-icon-arrow-2-n-s{background-position:-128px -32px;}
+.fl-theme-hc .ui-icon-arrow-2-ne-sw{background-position:-144px -32px;}
+.fl-theme-hc .ui-icon-arrow-2-e-w{background-position:-160px -32px;}
+.fl-theme-hc .ui-icon-arrow-2-se-nw{background-position:-176px -32px;}
+.fl-theme-hc .ui-icon-arrowstop-1-n{background-position:-192px -32px;}
+.fl-theme-hc .ui-icon-arrowstop-1-e{background-position:-208px -32px;}
+.fl-theme-hc .ui-icon-arrowstop-1-s{background-position:-224px -32px;}
+.fl-theme-hc .ui-icon-arrowstop-1-w{background-position:-240px -32px;}
+.fl-theme-hc .ui-icon-arrowthick-1-n{background-position:0 -48px;}
+.fl-theme-hc .ui-icon-arrowthick-1-ne{background-position:-16px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-1-e{background-position:-32px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-1-se{background-position:-48px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-1-s{background-position:-64px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-1-sw{background-position:-80px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-1-w{background-position:-96px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-1-nw{background-position:-112px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-2-n-s{background-position:-128px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-2-e-w{background-position:-160px -48px;}
+.fl-theme-hc .ui-icon-arrowthick-2-se-nw{background-position:-176px -48px;}
+.fl-theme-hc .ui-icon-arrowthickstop-1-n{background-position:-192px -48px;}
+.fl-theme-hc .ui-icon-arrowthickstop-1-e{background-position:-208px -48px;}
+.fl-theme-hc .ui-icon-arrowthickstop-1-s{background-position:-224px -48px;}
+.fl-theme-hc .ui-icon-arrowthickstop-1-w{background-position:-240px -48px;}
+.fl-theme-hc .ui-icon-arrowreturnthick-1-w{background-position:0 -64px;}
+.fl-theme-hc .ui-icon-arrowreturnthick-1-n{background-position:-16px -64px;}
+.fl-theme-hc .ui-icon-arrowreturnthick-1-e{background-position:-32px -64px;}
+.fl-theme-hc .ui-icon-arrowreturnthick-1-s{background-position:-48px -64px;}
+.fl-theme-hc .ui-icon-arrowreturn-1-w{background-position:-64px -64px;}
+.fl-theme-hc .ui-icon-arrowreturn-1-n{background-position:-80px -64px;}
+.fl-theme-hc .ui-icon-arrowreturn-1-e{background-position:-96px -64px;}
+.fl-theme-hc .ui-icon-arrowreturn-1-s{background-position:-112px -64px;}
+.fl-theme-hc .ui-icon-arrowrefresh-1-w{background-position:-128px -64px;}
+.fl-theme-hc .ui-icon-arrowrefresh-1-n{background-position:-144px -64px;}
+.fl-theme-hc .ui-icon-arrowrefresh-1-e{background-position:-160px -64px;}
+.fl-theme-hc .ui-icon-arrowrefresh-1-s{background-position:-176px -64px;}
+.fl-theme-hc .ui-icon-arrow-4{background-position:0 -80px;}
+.fl-theme-hc .ui-icon-arrow-4-diag{background-position:-16px -80px;}
+.fl-theme-hc .ui-icon-extlink{background-position:-32px -80px;}
+.fl-theme-hc .ui-icon-newwin{background-position:-48px -80px;}
+.fl-theme-hc .ui-icon-refresh{background-position:-64px -80px;}
+.fl-theme-hc .ui-icon-shuffle{background-position:-80px -80px;}
+.fl-theme-hc .ui-icon-transfer-e-w{background-position:-96px -80px;}
+.fl-theme-hc .ui-icon-transferthick-e-w{background-position:-112px -80px;}
+.fl-theme-hc .ui-icon-folder-collapsed{background-position:0 -96px;}
+.fl-theme-hc .ui-icon-folder-open{background-position:-16px -96px;}
+.fl-theme-hc .ui-icon-document{background-position:-32px -96px;}
+.fl-theme-hc .ui-icon-document-b{background-position:-48px -96px;}
+.fl-theme-hc .ui-icon-note{background-position:-64px -96px;}
+.fl-theme-hc .ui-icon-mail-closed{background-position:-80px -96px;}
+.fl-theme-hc .ui-icon-mail-open{background-position:-96px -96px;}
+.fl-theme-hc .ui-icon-suitcase{background-position:-112px -96px;}
+.fl-theme-hc .ui-icon-comment{background-position:-128px -96px;}
+.fl-theme-hc .ui-icon-person{background-position:-144px -96px;}
+.fl-theme-hc .ui-icon-print{background-position:-160px -96px;}
+.fl-theme-hc .ui-icon-trash{background-position:-176px -96px;}
+.fl-theme-hc .ui-icon-locked{background-position:-192px -96px;}
+.fl-theme-hc .ui-icon-unlocked{background-position:-208px -96px;}
+.fl-theme-hc .ui-icon-bookmark{background-position:-224px -96px;}
+.fl-theme-hc .ui-icon-tag{background-position:-240px -96px;}
+.fl-theme-hc .ui-icon-home{background-position:0 -112px;}
+.fl-theme-hc .ui-icon-flag{background-position:-16px -112px;}
+.fl-theme-hc .ui-icon-calendar{background-position:-32px -112px;}
+.fl-theme-hc .ui-icon-cart{background-position:-48px -112px;}
+.fl-theme-hc .ui-icon-pencil{background-position:-64px -112px;}
+.fl-theme-hc .ui-icon-clock{background-position:-80px -112px;}
+.fl-theme-hc .ui-icon-disk{background-position:-96px -112px;}
+.fl-theme-hc .ui-icon-calculator{background-position:-112px -112px;}
+.fl-theme-hc .ui-icon-zoomin{background-position:-128px -112px;}
+.fl-theme-hc .ui-icon-zoomout{background-position:-144px -112px;}
+.fl-theme-hc .ui-icon-search{background-position:-160px -112px;}
+.fl-theme-hc .ui-icon-wrench{background-position:-176px -112px;}
+.fl-theme-hc .ui-icon-gear{background-position:-192px -112px;}
+.fl-theme-hc .ui-icon-heart{background-position:-208px -112px;}
+.fl-theme-hc .ui-icon-star{background-position:-224px -112px;}
+.fl-theme-hc .ui-icon-link{background-position:-240px -112px;}
+.fl-theme-hc .ui-icon-cancel{background-position:0 -128px;}
+.fl-theme-hc .ui-icon-plus{background-position:-16px -128px;}
+.fl-theme-hc .ui-icon-plusthick{background-position:-32px -128px;}
+.fl-theme-hc .ui-icon-minus{background-position:-48px -128px;}
+.fl-theme-hc .ui-icon-minusthick{background-position:-64px -128px;}
+.fl-theme-hc .ui-icon-close{background-position:-80px -128px;}
+.fl-theme-hc .ui-icon-closethick{background-position:-96px -128px;}
+.fl-theme-hc .ui-icon-key{background-position:-112px -128px;}
+.fl-theme-hc .ui-icon-lightbulb{background-position:-128px -128px;}
+.fl-theme-hc .ui-icon-scissors{background-position:-144px -128px;}
+.fl-theme-hc .ui-icon-clipboard{background-position:-160px -128px;}
+.fl-theme-hc .ui-icon-copy{background-position:-176px -128px;}
+.fl-theme-hc .ui-icon-contact{background-position:-192px -128px;}
+.fl-theme-hc .ui-icon-image{background-position:-208px -128px;}
+.fl-theme-hc .ui-icon-video{background-position:-224px -128px;}
+.fl-theme-hc .ui-icon-script{background-position:-240px -128px;}
+.fl-theme-hc .ui-icon-alert{background-position:0 -144px;}
+.fl-theme-hc .ui-icon-info{background-position:-16px -144px;}
+.fl-theme-hc .ui-icon-notice{background-position:-32px -144px;}
+.fl-theme-hc .ui-icon-help{background-position:-48px -144px;}
+.fl-theme-hc .ui-icon-check{background-position:-64px -144px;}
+.fl-theme-hc .ui-icon-bullet{background-position:-80px -144px;}
+.fl-theme-hc .ui-icon-radio-off{background-position:-96px -144px;}
+.fl-theme-hc .ui-icon-radio-on{background-position:-112px -144px;}
+.fl-theme-hc .ui-icon-pin-w{background-position:-128px -144px;}
+.fl-theme-hc .ui-icon-pin-s{background-position:-144px -144px;}
+.fl-theme-hc .ui-icon-play{background-position:0 -160px;}
+.fl-theme-hc .ui-icon-pause{background-position:-16px -160px;}
+.fl-theme-hc .ui-icon-seek-next{background-position:-32px -160px;}
+.fl-theme-hc .ui-icon-seek-prev{background-position:-48px -160px;}
+.fl-theme-hc .ui-icon-seek-end{background-position:-64px -160px;}
+.fl-theme-hc .ui-icon-seek-first{background-position:-80px -160px;}
+.fl-theme-hc .ui-icon-stop{background-position:-96px -160px;}
+.fl-theme-hc .ui-icon-eject{background-position:-112px -160px;}
+.fl-theme-hc .ui-icon-volume-off{background-position:-128px -160px;}
+.fl-theme-hc .ui-icon-volume-on{background-position:-144px -160px;}
+.fl-theme-hc .ui-icon-power{background-position:0 -176px;}
+.fl-theme-hc .ui-icon-signal-diag{background-position:-16px -176px;}
+.fl-theme-hc .ui-icon-signal{background-position:-32px -176px;}
+.fl-theme-hc .ui-icon-battery-0{background-position:-48px -176px;}
+.fl-theme-hc .ui-icon-battery-1{background-position:-64px -176px;}
+.fl-theme-hc .ui-icon-battery-2{background-position:-80px -176px;}
+.fl-theme-hc .ui-icon-battery-3{background-position:-96px -176px;}
+.fl-theme-hc .ui-icon-circle-plus{background-position:0 -192px;}
+.fl-theme-hc .ui-icon-circle-minus{background-position:-16px -192px;}
+.fl-theme-hc .ui-icon-circle-close{background-position:-32px -192px;}
+.fl-theme-hc .ui-icon-circle-triangle-e{background-position:-48px -192px;}
+.fl-theme-hc .ui-icon-circle-triangle-s{background-position:-64px -192px;}
+.fl-theme-hc .ui-icon-circle-triangle-w{background-position:-80px -192px;}
+.fl-theme-hc .ui-icon-circle-triangle-n{background-position:-96px -192px;}
+.fl-theme-hc .ui-icon-circle-arrow-e{background-position:-112px -192px;}
+.fl-theme-hc .ui-icon-circle-arrow-s{background-position:-128px -192px;}
+.fl-theme-hc .ui-icon-circle-arrow-w{background-position:-144px -192px;}
+.fl-theme-hc .ui-icon-circle-arrow-n{background-position:-160px -192px;}
+.fl-theme-hc .ui-icon-circle-zoomin{background-position:-176px -192px;}
+.fl-theme-hc .ui-icon-circle-zoomout{background-position:-192px -192px;}
+.fl-theme-hc .ui-icon-circle-check{background-position:-208px -192px;}
+.fl-theme-hc .ui-icon-circlesmall-plus{background-position:0 -208px;}
+.fl-theme-hc .ui-icon-circlesmall-minus{background-position:-16px -208px;}
+.fl-theme-hc .ui-icon-circlesmall-close{background-position:-32px -208px;}
+.fl-theme-hc .ui-icon-squaresmall-plus{background-position:-48px -208px;}
+.fl-theme-hc .ui-icon-squaresmall-minus{background-position:-64px -208px;}
+.fl-theme-hc .ui-icon-squaresmall-close{background-position:-80px -208px;}
+.fl-theme-hc .ui-icon-grip-dotted-vertical{background-position:0 -224px;}
+.fl-theme-hc .ui-icon-grip-dotted-horizontal{background-position:-16px -224px;}
+.fl-theme-hc .ui-icon-grip-solid-vertical{background-position:-32px -224px;}
+.fl-theme-hc .ui-icon-grip-solid-horizontal{background-position:-48px -224px;}
+.fl-theme-hc .ui-icon-gripsmall-diagonal-se{background-position:-64px -224px;}
+.fl-theme-hc .ui-icon-grip-diagonal-se{background-position:-80px -224px;}
+.fl-theme-hc .ui-corner-tl{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;}
+.fl-theme-hc .ui-corner-tr{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;}
+.fl-theme-hc .ui-corner-bl{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;}
+.fl-theme-hc .ui-corner-br{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-hc .ui-corner-top{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;}
+.fl-theme-hc .ui-corner-bottom{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-hc .ui-corner-right{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-hc .ui-corner-left{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;}
+.fl-theme-hc .ui-corner-all{-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-hc .ui-widget-overlay{background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;opacity:.75;filter:Alpha(Opacity=75);}
+.fl-theme-hc .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;opacity:100;filter:Alpha(Opacity=100);-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-hc .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}
+.fl-theme-hc .ui-accordion .ui-accordion-li-fix{display:inline;}
+.fl-theme-hc .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}
+.fl-theme-hc .ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em 2.2em;}
+.fl-theme-hc .ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px;}
+.fl-theme-hc .ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;}
+.fl-theme-hc .ui-accordion .ui-accordion-content-active{display:block;}
+.fl-theme-hc .ui-datepicker{width:17em;padding:.2em .2em 0;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-prev,.fl-theme-hc .ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-prev-hover,.fl-theme-hc .ui-datepicker .ui-datepicker-next-hover{top:1px;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-prev{left:2px;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-next{right:2px;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-prev-hover{left:1px;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-next-hover{right:1px;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-prev span,.fl-theme-hc .ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-title select{float:left;font-size:1em;margin:1px 0;}
+.fl-theme-hc .ui-datepicker select.ui-datepicker-month-year{width:100%;}
+.fl-theme-hc .ui-datepicker select.ui-datepicker-month,.fl-theme-hc .ui-datepicker select.ui-datepicker-year{width:49%;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-title select.ui-datepicker-year{float:right;}
+.fl-theme-hc .ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em;}
+.fl-theme-hc .ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0;}
+.fl-theme-hc .ui-datepicker td{border:0;padding:1px;}
+.fl-theme-hc .ui-datepicker td span,.fl-theme-hc .ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible;}
+.fl-theme-hc .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left;}
+.fl-theme-hc .ui-datepicker.ui-datepicker-multi{width:auto;}
+.fl-theme-hc .ui-datepicker-multi .ui-datepicker-group{float:left;}
+.fl-theme-hc .ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em;}
+.fl-theme-hc .ui-datepicker-multi-2 .ui-datepicker-group{width:50%;}
+.fl-theme-hc .ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%;}
+.fl-theme-hc .ui-datepicker-multi-4 .ui-datepicker-group{width:25%;}
+.fl-theme-hc .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0;}
+.fl-theme-hc .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0;}
+.fl-theme-hc .ui-datepicker-multi .ui-datepicker-buttonpane{clear:left;}
+.fl-theme-hc .ui-datepicker-row-break{clear:both;width:100%;}
+.fl-theme-hc .ui-datepicker-rtl{direction:rtl;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-group{float:right;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-hc .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-hc .ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px;}
+.fl-theme-hc .ui-dialog{position:relative;padding:.2em;width:300px;}
+.fl-theme-hc .ui-dialog .ui-dialog-titlebar{padding:.5em .3em .3em 1em;position:relative;}
+.fl-theme-hc .ui-dialog .ui-dialog-title{float:left;margin:.1em 0 .2em;}
+.fl-theme-hc .ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px;}
+.fl-theme-hc .ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px;}
+.fl-theme-hc .ui-dialog .ui-dialog-titlebar-close:hover,.fl-theme-hc .ui-dialog .ui-dialog-titlebar-close:focus{padding:0;}
+.fl-theme-hc .ui-dialog .ui-dialog-content{border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1;}
+.fl-theme-hc .ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em;}
+.fl-theme-hc .ui-dialog .ui-dialog-buttonpane button{float:right;margin:.5em .4em .5em 0;cursor:pointer;padding:.2em .6em .3em .6em;line-height:1.4em;width:auto;overflow:visible;}
+.fl-theme-hc .ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px;}
+.fl-theme-hc .ui-draggable .ui-dialog-titlebar{cursor:move;}
+.fl-theme-hc .ui-progressbar{height:2em;text-align:left;}
+.fl-theme-hc .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%;}
+.fl-theme-hc .ui-resizable{position:relative;}
+.fl-theme-hc .ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block;}
+.fl-theme-hc .ui-resizable-disabled .ui-resizable-handle,.fl-theme-hc .ui-resizable-autohide .ui-resizable-handle{display:none;}
+.fl-theme-hc .ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0;}
+.fl-theme-hc .ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0;}
+.fl-theme-hc .ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%;}
+.fl-theme-hc .ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%;}
+.fl-theme-hc .ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px;}
+.fl-theme-hc .ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px;}
+.fl-theme-hc .ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px;}
+.fl-theme-hc .ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px;}
+.fl-theme-hc .ui-slider{position:relative;text-align:left;}
+.fl-theme-hc .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;}
+.fl-theme-hc .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;}
+.fl-theme-hc .ui-slider-horizontal{height:.8em;}
+.fl-theme-hc .ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em;}
+.fl-theme-hc .ui-slider-horizontal .ui-slider-range{top:0;height:100%;}
+.fl-theme-hc .ui-slider-horizontal .ui-slider-range-min{left:0;}
+.fl-theme-hc .ui-slider-horizontal .ui-slider-range-max{right:0;}
+.fl-theme-hc .ui-slider-vertical{width:.8em;height:100px;}
+.fl-theme-hc .ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em;}
+.fl-theme-hc .ui-slider-vertical .ui-slider-range{left:0;width:100%;}
+.fl-theme-hc .ui-slider-vertical .ui-slider-range-min{bottom:0;}
+.fl-theme-hc .ui-slider-vertical .ui-slider-range-max{top:0;}
+.fl-theme-hc .ui-tabs{padding:.2em;zoom:1;}
+.fl-theme-hc .ui-tabs .ui-tabs-nav{list-style:none;position:relative;padding:.2em .2em 0;}
+.fl-theme-hc .ui-tabs .ui-tabs-nav li{position:relative;float:left;border-bottom-width:0!important;margin:0 .2em -1px 0;padding:0;}
+.fl-theme-hc .ui-tabs .ui-tabs-nav li a{float:left;text-decoration:none;padding:.5em 1em;}
+.fl-theme-hc .ui-tabs .ui-tabs-nav li.ui-tabs-selected{padding-bottom:1px;border-bottom-width:0;}
+.fl-theme-hc .ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.fl-theme-hc .ui-tabs .ui-tabs-nav li.ui-state-disabled a,.fl-theme-hc .ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text;}
+.fl-theme-hc .ui-tabs .ui-tabs-nav li a,.fl-theme-hc .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer;}
+.fl-theme-hc .ui-tabs .ui-tabs-panel{padding:1em 1.4em;display:block;border-width:0;background:none;}
+.fl-theme-hc .ui-tabs .ui-tabs-hide{display:none!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_000000_40x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_000000_40x100.png
new file mode 100644 (file)
index 0000000..abdc010
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_000000_40x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_ffffff_40x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_ffffff_40x100.png
new file mode 100644 (file)
index 0000000..ac8b229
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-bg_flat_0_ffffff_40x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_000000_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_000000_256x240.png
new file mode 100644 (file)
index 0000000..842156d
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_000000_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_ffffff_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_ffffff_256x240.png
new file mode 100644 (file)
index 0000000..746e6fa
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hc/images/ui-icons_ffffff_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/hci.css b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/hci.css
new file mode 100644 (file)
index 0000000..e174772
--- /dev/null
@@ -0,0 +1,319 @@
+.fl-theme-hci .ui-helper-hidden{display:none;}
+.fl-theme-hci .ui-helper-hidden-accessible{position:absolute;left:-99999999px;}
+.fl-theme-hci .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none;}
+.fl-theme-hci .ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
+.fl-theme-hci .ui-helper-clearfix{display:inline-block;}
+/* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix{height:1%;}
+.fl-theme-hci .ui-helper-clearfix{display:block;}
+/* end clearfix */ .fl-theme-hci .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0);}
+.fl-theme-hci .ui-state-disabled{cursor:default!important;}
+.fl-theme-hci .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;}
+.fl-theme-hci .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
+.fl-theme-hci .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-hci .ui-widget input,.fl-theme-hci .ui-widget select,.fl-theme-hci .ui-widget textarea,.fl-theme-hci .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-hci .ui-widget-content{border:1px solid #fff;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;color:#fff;}
+.fl-theme-hci .ui-widget-content a{color:#fff;}
+.fl-theme-hci .ui-widget-header{border:1px solid #fff;background:#999 url(images/ui-bg_flAF_0_999999_40x100.png) 50% 50% repeat-x;color:#fff;font-weight:bold;}
+.fl-theme-hci .ui-widget-header a{color:#fff;}
+.fl-theme-hci .ui-state-default,.fl-theme-hci .ui-widget-content .ui-state-default{border:1px solid #000;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
+.fl-theme-hci .ui-state-default a,.fl-theme-hci .ui-state-default a:link,.fl-theme-hci .ui-state-default a:visited{color:#000;text-decoration:none;outline:none;}
+.fl-theme-hci .ui-state-hover,.fl-theme-hci .ui-widget-content .ui-state-hover,.fl-theme-hci .ui-state-focus,.fl-theme-hci .ui-widget-content .ui-state-focus{border:1px solid #fff;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
+.fl-theme-hci .ui-state-hover a,.fl-theme-hci .ui-state-hover a:hover{color:#fff;text-decoration:none;outline:none;}
+.fl-theme-hci .ui-state-active,.fl-theme-hci .ui-widget-content .ui-state-active{border:1px solid #fff;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;font-weight:normal;color:#fff;outline:none;}
+.fl-theme-hci .ui-state-active a,.fl-theme-hci .ui-state-active a:link,.fl-theme-hci .ui-state-active a:visited{color:#fff;outline:none;text-decoration:none;}
+.fl-theme-hci .ui-state-highlight,.fl-theme-hci .ui-widget-content .ui-state-highlight{border:1px solid #fff;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;color:#fff;}
+.fl-theme-hci .ui-state-highlight a,.fl-theme-hci .ui-widget-content .ui-state-highlight a{color:#fff;}
+.fl-theme-hci .ui-state-error,.fl-theme-hci .ui-widget-content .ui-state-error{border:1px solid #000;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;color:#000;}
+.fl-theme-hci .ui-state-error a,.fl-theme-hci .ui-widget-content .ui-state-error a{color:#000;}
+.fl-theme-hci .ui-state-error-text,.fl-theme-hci .ui-widget-content .ui-state-error-text{color:#000;}
+.fl-theme-hci .ui-state-disabled,.fl-theme-hci .ui-widget-content .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none;}
+.fl-theme-hci .ui-priority-primary,.fl-theme-hci .ui-widget-content .ui-priority-primary{font-weight:bold;}
+.fl-theme-hci .ui-priority-secondary,.fl-theme-hci .ui-widget-content .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal;}
+.fl-theme-hci .ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-hci .ui-widget-content .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-hci .ui-widget-header .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-hci .ui-state-default .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hci .ui-state-hover .ui-icon,.fl-theme-hci .ui-state-focus .ui-icon{background-image:url(images/ui-icons_fffff_256x240.png);}
+.fl-theme-hci .ui-state-active .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-hci .ui-state-highlight .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-hci .ui-state-error .ui-icon,.fl-theme-hci .ui-state-error-text .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-hci .ui-icon-carat-1-n{background-position:0 0;}
+.fl-theme-hci .ui-icon-carat-1-ne{background-position:-16px 0;}
+.fl-theme-hci .ui-icon-carat-1-e{background-position:-32px 0;}
+.fl-theme-hci .ui-icon-carat-1-se{background-position:-48px 0;}
+.fl-theme-hci .ui-icon-carat-1-s{background-position:-64px 0;}
+.fl-theme-hci .ui-icon-carat-1-sw{background-position:-80px 0;}
+.fl-theme-hci .ui-icon-carat-1-w{background-position:-96px 0;}
+.fl-theme-hci .ui-icon-carat-1-nw{background-position:-112px 0;}
+.fl-theme-hci .ui-icon-carat-2-n-s{background-position:-128px 0;}
+.fl-theme-hci .ui-icon-carat-2-e-w{background-position:-144px 0;}
+.fl-theme-hci .ui-icon-triangle-1-n{background-position:0 -16px;}
+.fl-theme-hci .ui-icon-triangle-1-ne{background-position:-16px -16px;}
+.fl-theme-hci .ui-icon-triangle-1-e{background-position:-32px -16px;}
+.fl-theme-hci .ui-icon-triangle-1-se{background-position:-48px -16px;}
+.fl-theme-hci .ui-icon-triangle-1-s{background-position:-64px -16px;}
+.fl-theme-hci .ui-icon-triangle-1-sw{background-position:-80px -16px;}
+.fl-theme-hci .ui-icon-triangle-1-w{background-position:-96px -16px;}
+.fl-theme-hci .ui-icon-triangle-1-nw{background-position:-112px -16px;}
+.fl-theme-hci .ui-icon-triangle-2-n-s{background-position:-128px -16px;}
+.fl-theme-hci .ui-icon-triangle-2-e-w{background-position:-144px -16px;}
+.fl-theme-hci .ui-icon-arrow-1-n{background-position:0 -32px;}
+.fl-theme-hci .ui-icon-arrow-1-ne{background-position:-16px -32px;}
+.fl-theme-hci .ui-icon-arrow-1-e{background-position:-32px -32px;}
+.fl-theme-hci .ui-icon-arrow-1-se{background-position:-48px -32px;}
+.fl-theme-hci .ui-icon-arrow-1-s{background-position:-64px -32px;}
+.fl-theme-hci .ui-icon-arrow-1-sw{background-position:-80px -32px;}
+.fl-theme-hci .ui-icon-arrow-1-w{background-position:-96px -32px;}
+.fl-theme-hci .ui-icon-arrow-1-nw{background-position:-112px -32px;}
+.fl-theme-hci .ui-icon-arrow-2-n-s{background-position:-128px -32px;}
+.fl-theme-hci .ui-icon-arrow-2-ne-sw{background-position:-144px -32px;}
+.fl-theme-hci .ui-icon-arrow-2-e-w{background-position:-160px -32px;}
+.fl-theme-hci .ui-icon-arrow-2-se-nw{background-position:-176px -32px;}
+.fl-theme-hci .ui-icon-arrowstop-1-n{background-position:-192px -32px;}
+.fl-theme-hci .ui-icon-arrowstop-1-e{background-position:-208px -32px;}
+.fl-theme-hci .ui-icon-arrowstop-1-s{background-position:-224px -32px;}
+.fl-theme-hci .ui-icon-arrowstop-1-w{background-position:-240px -32px;}
+.fl-theme-hci .ui-icon-arrowthick-1-n{background-position:0 -48px;}
+.fl-theme-hci .ui-icon-arrowthick-1-ne{background-position:-16px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-1-e{background-position:-32px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-1-se{background-position:-48px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-1-s{background-position:-64px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-1-sw{background-position:-80px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-1-w{background-position:-96px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-1-nw{background-position:-112px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-2-n-s{background-position:-128px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-2-e-w{background-position:-160px -48px;}
+.fl-theme-hci .ui-icon-arrowthick-2-se-nw{background-position:-176px -48px;}
+.fl-theme-hci .ui-icon-arrowthickstop-1-n{background-position:-192px -48px;}
+.fl-theme-hci .ui-icon-arrowthickstop-1-e{background-position:-208px -48px;}
+.fl-theme-hci .ui-icon-arrowthickstop-1-s{background-position:-224px -48px;}
+.fl-theme-hci .ui-icon-arrowthickstop-1-w{background-position:-240px -48px;}
+.fl-theme-hci .ui-icon-arrowreturnthick-1-w{background-position:0 -64px;}
+.fl-theme-hci .ui-icon-arrowreturnthick-1-n{background-position:-16px -64px;}
+.fl-theme-hci .ui-icon-arrowreturnthick-1-e{background-position:-32px -64px;}
+.fl-theme-hci .ui-icon-arrowreturnthick-1-s{background-position:-48px -64px;}
+.fl-theme-hci .ui-icon-arrowreturn-1-w{background-position:-64px -64px;}
+.fl-theme-hci .ui-icon-arrowreturn-1-n{background-position:-80px -64px;}
+.fl-theme-hci .ui-icon-arrowreturn-1-e{background-position:-96px -64px;}
+.fl-theme-hci .ui-icon-arrowreturn-1-s{background-position:-112px -64px;}
+.fl-theme-hci .ui-icon-arrowrefresh-1-w{background-position:-128px -64px;}
+.fl-theme-hci .ui-icon-arrowrefresh-1-n{background-position:-144px -64px;}
+.fl-theme-hci .ui-icon-arrowrefresh-1-e{background-position:-160px -64px;}
+.fl-theme-hci .ui-icon-arrowrefresh-1-s{background-position:-176px -64px;}
+.fl-theme-hci .ui-icon-arrow-4{background-position:0 -80px;}
+.fl-theme-hci .ui-icon-arrow-4-diag{background-position:-16px -80px;}
+.fl-theme-hci .ui-icon-extlink{background-position:-32px -80px;}
+.fl-theme-hci .ui-icon-newwin{background-position:-48px -80px;}
+.fl-theme-hci .ui-icon-refresh{background-position:-64px -80px;}
+.fl-theme-hci .ui-icon-shuffle{background-position:-80px -80px;}
+.fl-theme-hci .ui-icon-transfer-e-w{background-position:-96px -80px;}
+.fl-theme-hci .ui-icon-transferthick-e-w{background-position:-112px -80px;}
+.fl-theme-hci .ui-icon-folder-collapsed{background-position:0 -96px;}
+.fl-theme-hci .ui-icon-folder-open{background-position:-16px -96px;}
+.fl-theme-hci .ui-icon-document{background-position:-32px -96px;}
+.fl-theme-hci .ui-icon-document-b{background-position:-48px -96px;}
+.fl-theme-hci .ui-icon-note{background-position:-64px -96px;}
+.fl-theme-hci .ui-icon-mail-closed{background-position:-80px -96px;}
+.fl-theme-hci .ui-icon-mail-open{background-position:-96px -96px;}
+.fl-theme-hci .ui-icon-suitcase{background-position:-112px -96px;}
+.fl-theme-hci .ui-icon-comment{background-position:-128px -96px;}
+.fl-theme-hci .ui-icon-person{background-position:-144px -96px;}
+.fl-theme-hci .ui-icon-print{background-position:-160px -96px;}
+.fl-theme-hci .ui-icon-trash{background-position:-176px -96px;}
+.fl-theme-hci .ui-icon-locked{background-position:-192px -96px;}
+.fl-theme-hci .ui-icon-unlocked{background-position:-208px -96px;}
+.fl-theme-hci .ui-icon-bookmark{background-position:-224px -96px;}
+.fl-theme-hci .ui-icon-tag{background-position:-240px -96px;}
+.fl-theme-hci .ui-icon-home{background-position:0 -112px;}
+.fl-theme-hci .ui-icon-flag{background-position:-16px -112px;}
+.fl-theme-hci .ui-icon-calendar{background-position:-32px -112px;}
+.fl-theme-hci .ui-icon-cart{background-position:-48px -112px;}
+.fl-theme-hci .ui-icon-pencil{background-position:-64px -112px;}
+.fl-theme-hci .ui-icon-clock{background-position:-80px -112px;}
+.fl-theme-hci .ui-icon-disk{background-position:-96px -112px;}
+.fl-theme-hci .ui-icon-calculator{background-position:-112px -112px;}
+.fl-theme-hci .ui-icon-zoomin{background-position:-128px -112px;}
+.fl-theme-hci .ui-icon-zoomout{background-position:-144px -112px;}
+.fl-theme-hci .ui-icon-search{background-position:-160px -112px;}
+.fl-theme-hci .ui-icon-wrench{background-position:-176px -112px;}
+.fl-theme-hci .ui-icon-gear{background-position:-192px -112px;}
+.fl-theme-hci .ui-icon-heart{background-position:-208px -112px;}
+.fl-theme-hci .ui-icon-star{background-position:-224px -112px;}
+.fl-theme-hci .ui-icon-link{background-position:-240px -112px;}
+.fl-theme-hci .ui-icon-cancel{background-position:0 -128px;}
+.fl-theme-hci .ui-icon-plus{background-position:-16px -128px;}
+.fl-theme-hci .ui-icon-plusthick{background-position:-32px -128px;}
+.fl-theme-hci .ui-icon-minus{background-position:-48px -128px;}
+.fl-theme-hci .ui-icon-minusthick{background-position:-64px -128px;}
+.fl-theme-hci .ui-icon-close{background-position:-80px -128px;}
+.fl-theme-hci .ui-icon-closethick{background-position:-96px -128px;}
+.fl-theme-hci .ui-icon-key{background-position:-112px -128px;}
+.fl-theme-hci .ui-icon-lightbulb{background-position:-128px -128px;}
+.fl-theme-hci .ui-icon-scissors{background-position:-144px -128px;}
+.fl-theme-hci .ui-icon-clipboard{background-position:-160px -128px;}
+.fl-theme-hci .ui-icon-copy{background-position:-176px -128px;}
+.fl-theme-hci .ui-icon-contact{background-position:-192px -128px;}
+.fl-theme-hci .ui-icon-image{background-position:-208px -128px;}
+.fl-theme-hci .ui-icon-video{background-position:-224px -128px;}
+.fl-theme-hci .ui-icon-script{background-position:-240px -128px;}
+.fl-theme-hci .ui-icon-alert{background-position:0 -144px;}
+.fl-theme-hci .ui-icon-info{background-position:-16px -144px;}
+.fl-theme-hci .ui-icon-notice{background-position:-32px -144px;}
+.fl-theme-hci .ui-icon-help{background-position:-48px -144px;}
+.fl-theme-hci .ui-icon-check{background-position:-64px -144px;}
+.fl-theme-hci .ui-icon-bullet{background-position:-80px -144px;}
+.fl-theme-hci .ui-icon-radio-off{background-position:-96px -144px;}
+.fl-theme-hci .ui-icon-radio-on{background-position:-112px -144px;}
+.fl-theme-hci .ui-icon-pin-w{background-position:-128px -144px;}
+.fl-theme-hci .ui-icon-pin-s{background-position:-144px -144px;}
+.fl-theme-hci .ui-icon-play{background-position:0 -160px;}
+.fl-theme-hci .ui-icon-pause{background-position:-16px -160px;}
+.fl-theme-hci .ui-icon-seek-next{background-position:-32px -160px;}
+.fl-theme-hci .ui-icon-seek-prev{background-position:-48px -160px;}
+.fl-theme-hci .ui-icon-seek-end{background-position:-64px -160px;}
+.fl-theme-hci .ui-icon-seek-first{background-position:-80px -160px;}
+.fl-theme-hci .ui-icon-stop{background-position:-96px -160px;}
+.fl-theme-hci .ui-icon-eject{background-position:-112px -160px;}
+.fl-theme-hci .ui-icon-volume-off{background-position:-128px -160px;}
+.fl-theme-hci .ui-icon-volume-on{background-position:-144px -160px;}
+.fl-theme-hci .ui-icon-power{background-position:0 -176px;}
+.fl-theme-hci .ui-icon-signal-diag{background-position:-16px -176px;}
+.fl-theme-hci .ui-icon-signal{background-position:-32px -176px;}
+.fl-theme-hci .ui-icon-battery-0{background-position:-48px -176px;}
+.fl-theme-hci .ui-icon-battery-1{background-position:-64px -176px;}
+.fl-theme-hci .ui-icon-battery-2{background-position:-80px -176px;}
+.fl-theme-hci .ui-icon-battery-3{background-position:-96px -176px;}
+.fl-theme-hci .ui-icon-circle-plus{background-position:0 -192px;}
+.fl-theme-hci .ui-icon-circle-minus{background-position:-16px -192px;}
+.fl-theme-hci .ui-icon-circle-close{background-position:-32px -192px;}
+.fl-theme-hci .ui-icon-circle-triangle-e{background-position:-48px -192px;}
+.fl-theme-hci .ui-icon-circle-triangle-s{background-position:-64px -192px;}
+.fl-theme-hci .ui-icon-circle-triangle-w{background-position:-80px -192px;}
+.fl-theme-hci .ui-icon-circle-triangle-n{background-position:-96px -192px;}
+.fl-theme-hci .ui-icon-circle-arrow-e{background-position:-112px -192px;}
+.fl-theme-hci .ui-icon-circle-arrow-s{background-position:-128px -192px;}
+.fl-theme-hci .ui-icon-circle-arrow-w{background-position:-144px -192px;}
+.fl-theme-hci .ui-icon-circle-arrow-n{background-position:-160px -192px;}
+.fl-theme-hci .ui-icon-circle-zoomin{background-position:-176px -192px;}
+.fl-theme-hci .ui-icon-circle-zoomout{background-position:-192px -192px;}
+.fl-theme-hci .ui-icon-circle-check{background-position:-208px -192px;}
+.fl-theme-hci .ui-icon-circlesmall-plus{background-position:0 -208px;}
+.fl-theme-hci .ui-icon-circlesmall-minus{background-position:-16px -208px;}
+.fl-theme-hci .ui-icon-circlesmall-close{background-position:-32px -208px;}
+.fl-theme-hci .ui-icon-squaresmall-plus{background-position:-48px -208px;}
+.fl-theme-hci .ui-icon-squaresmall-minus{background-position:-64px -208px;}
+.fl-theme-hci .ui-icon-squaresmall-close{background-position:-80px -208px;}
+.fl-theme-hci .ui-icon-grip-dotted-vertical{background-position:0 -224px;}
+.fl-theme-hci .ui-icon-grip-dotted-horizontal{background-position:-16px -224px;}
+.fl-theme-hci .ui-icon-grip-solid-vertical{background-position:-32px -224px;}
+.fl-theme-hci .ui-icon-grip-solid-horizontal{background-position:-48px -224px;}
+.fl-theme-hci .ui-icon-gripsmall-diagonal-se{background-position:-64px -224px;}
+.fl-theme-hci .ui-icon-grip-diagonal-se{background-position:-80px -224px;}
+.fl-theme-hci .ui-corner-tl{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;}
+.fl-theme-hci .ui-corner-tr{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;}
+.fl-theme-hci .ui-corner-bl{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;}
+.fl-theme-hci .ui-corner-br{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-hci .ui-corner-top{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;}
+.fl-theme-hci .ui-corner-bottom{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-hci .ui-corner-right{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-hci .ui-corner-left{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;}
+.fl-theme-hci .ui-corner-all{-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-hci .ui-widget-overlay{background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;opacity:.75;filter:Alpha(Opacity=75);}
+.fl-theme-hci .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;opacity:100;filter:Alpha(Opacity=100);-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-hci .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}
+.fl-theme-hci .ui-accordion .ui-accordion-li-fix{display:inline;}
+.fl-theme-hci .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}
+.fl-theme-hci .ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em 2.2em;}
+.fl-theme-hci .ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px;}
+.fl-theme-hci .ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;}
+.fl-theme-hci .ui-accordion .ui-accordion-content-active{display:block;}
+.fl-theme-hci .ui-datepicker{width:17em;padding:.2em .2em 0;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-prev,.fl-theme-hci .ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-prev-hover,.fl-theme-hci .ui-datepicker .ui-datepicker-next-hover{top:1px;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-prev{left:2px;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-next{right:2px;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-prev-hover{left:1px;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-next-hover{right:1px;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-prev span,.fl-theme-hci .ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-title select{float:left;font-size:1em;margin:1px 0;}
+.fl-theme-hci .ui-datepicker select.ui-datepicker-month-year{width:100%;}
+.fl-theme-hci .ui-datepicker select.ui-datepicker-month,.fl-theme-hci .ui-datepicker select.ui-datepicker-year{width:49%;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-title select.ui-datepicker-year{float:right;}
+.fl-theme-hci .ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em;}
+.fl-theme-hci .ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0;}
+.fl-theme-hci .ui-datepicker td{border:0;padding:1px;}
+.fl-theme-hci .ui-datepicker td span,.fl-theme-hci .ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible;}
+.fl-theme-hci .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left;}
+.fl-theme-hci .ui-datepicker.ui-datepicker-multi{width:auto;}
+.fl-theme-hci .ui-datepicker-multi .ui-datepicker-group{float:left;}
+.fl-theme-hci .ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em;}
+.fl-theme-hci .ui-datepicker-multi-2 .ui-datepicker-group{width:50%;}
+.fl-theme-hci .ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%;}
+.fl-theme-hci .ui-datepicker-multi-4 .ui-datepicker-group{width:25%;}
+.fl-theme-hci .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0;}
+.fl-theme-hci .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0;}
+.fl-theme-hci .ui-datepicker-multi .ui-datepicker-buttonpane{clear:left;}
+.fl-theme-hci .ui-datepicker-row-break{clear:both;width:100%;}
+.fl-theme-hci .ui-datepicker-rtl{direction:rtl;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-group{float:right;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-hci .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-hci .ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px;}
+.fl-theme-hci .ui-dialog{position:relative;padding:.2em;width:300px;}
+.fl-theme-hci .ui-dialog .ui-dialog-titlebar{padding:.5em .3em .3em 1em;position:relative;}
+.fl-theme-hci .ui-dialog .ui-dialog-title{float:left;margin:.1em 0 .2em;}
+.fl-theme-hci .ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px;}
+.fl-theme-hci .ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px;}
+.fl-theme-hci .ui-dialog .ui-dialog-titlebar-close:hover,.fl-theme-hci .ui-dialog .ui-dialog-titlebar-close:focus{padding:0;}
+.fl-theme-hci .ui-dialog .ui-dialog-content{border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1;}
+.fl-theme-hci .ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em;}
+.fl-theme-hci .ui-dialog .ui-dialog-buttonpane button{float:right;margin:.5em .4em .5em 0;cursor:pointer;padding:.2em .6em .3em .6em;line-height:1.4em;width:auto;overflow:visible;}
+.fl-theme-hci .ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px;}
+.fl-theme-hci .ui-draggable .ui-dialog-titlebar{cursor:move;}
+.fl-theme-hci .ui-progressbar{height:2em;text-align:left;}
+.fl-theme-hci .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%;}
+.fl-theme-hci .ui-resizable{position:relative;}
+.fl-theme-hci .ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block;}
+.fl-theme-hci .ui-resizable-disabled .ui-resizable-handle,.fl-theme-hci .ui-resizable-autohide .ui-resizable-handle{display:none;}
+.fl-theme-hci .ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0;}
+.fl-theme-hci .ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0;}
+.fl-theme-hci .ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%;}
+.fl-theme-hci .ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%;}
+.fl-theme-hci .ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px;}
+.fl-theme-hci .ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px;}
+.fl-theme-hci .ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px;}
+.fl-theme-hci .ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px;}
+.fl-theme-hci .ui-slider{position:relative;text-align:left;}
+.fl-theme-hci .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;}
+.fl-theme-hci .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;}
+.fl-theme-hci .ui-slider-horizontal{height:.8em;}
+.fl-theme-hci .ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em;}
+.fl-theme-hci .ui-slider-horizontal .ui-slider-range{top:0;height:100%;}
+.fl-theme-hci .ui-slider-horizontal .ui-slider-range-min{left:0;}
+.fl-theme-hci .ui-slider-horizontal .ui-slider-range-max{right:0;}
+.fl-theme-hci .ui-slider-vertical{width:.8em;height:100px;}
+.fl-theme-hci .ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em;}
+.fl-theme-hci .ui-slider-vertical .ui-slider-range{left:0;width:100%;}
+.fl-theme-hci .ui-slider-vertical .ui-slider-range-min{bottom:0;}
+.fl-theme-hci .ui-slider-vertical .ui-slider-range-max{top:0;}
+.fl-theme-hci .ui-tabs{padding:.2em;zoom:1;}
+.fl-theme-hci .ui-tabs .ui-tabs-nav{list-style:none;position:relative;padding:.2em .2em 0;}
+.fl-theme-hci .ui-tabs .ui-tabs-nav li{position:relative;float:left;border-bottom-width:0!important;margin:0 .2em -1px 0;padding:0;}
+.fl-theme-hci .ui-tabs .ui-tabs-nav li a{float:left;text-decoration:none;padding:.5em 1em;}
+.fl-theme-hci .ui-tabs .ui-tabs-nav li.ui-tabs-selected{padding-bottom:1px;border-bottom-width:0;}
+.fl-theme-hci .ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.fl-theme-hci .ui-tabs .ui-tabs-nav li.ui-state-disabled a,.fl-theme-hci .ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text;}
+.fl-theme-hci .ui-tabs .ui-tabs-nav li a,.fl-theme-hci .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer;}
+.fl-theme-hci .ui-tabs .ui-tabs-panel{padding:1em 1.4em;display:block;border-width:0;background:none;}
+.fl-theme-hci .ui-tabs .ui-tabs-hide{display:none!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_000000_40x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_000000_40x100.png
new file mode 100644 (file)
index 0000000..abdc010
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_000000_40x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_999999_40x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_999999_40x100.png
new file mode 100644 (file)
index 0000000..6b6de7d
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_999999_40x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_ffffff_40x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_ffffff_40x100.png
new file mode 100644 (file)
index 0000000..ac8b229
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-bg_flat_0_ffffff_40x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_000000_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_000000_256x240.png
new file mode 100644 (file)
index 0000000..842156d
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_000000_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_fffff_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_fffff_256x240.png
new file mode 100644 (file)
index 0000000..746e6fa
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_fffff_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_ffffff_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_ffffff_256x240.png
new file mode 100644 (file)
index 0000000..746e6fa
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-hci/images/ui-icons_ffffff_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_000000_40x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_000000_40x100.png
new file mode 100644 (file)
index 0000000..abdc010
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_000000_40x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_2e83ff_40x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_2e83ff_40x100.png
new file mode 100644 (file)
index 0000000..54b690f
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_0_2e83ff_40x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_75_ffffff_40x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_75_ffffff_40x100.png
new file mode 100644 (file)
index 0000000..ac8b229
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_flat_75_ffffff_40x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_65_ffffff_1x400.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_65_ffffff_1x400.png
new file mode 100644 (file)
index 0000000..42ccba2
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_65_ffffff_1x400.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_9dcaf6_1x400.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_9dcaf6_1x400.png
new file mode 100644 (file)
index 0000000..9ac3e31
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_9dcaf6_1x400.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_d9e8f7_1x400.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_d9e8f7_1x400.png
new file mode 100644 (file)
index 0000000..c7db55a
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_glass_75_d9e8f7_1x400.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_highlight-soft_55_9dcaf6_1x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_highlight-soft_55_9dcaf6_1x100.png
new file mode 100644 (file)
index 0000000..370050f
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_highlight-soft_55_9dcaf6_1x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_inset-soft_95_fef1ec_1x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_inset-soft_95_fef1ec_1x100.png
new file mode 100644 (file)
index 0000000..0e05810
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-bg_inset-soft_95_fef1ec_1x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_000000_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_000000_256x240.png
new file mode 100644 (file)
index 0000000..842156d
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_000000_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_222222_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_222222_256x240.png
new file mode 100644 (file)
index 0000000..67560da
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_222222_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_2e83ff_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_2e83ff_256x240.png
new file mode 100644 (file)
index 0000000..b425c44
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_2e83ff_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_454545_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_454545_256x240.png
new file mode 100644 (file)
index 0000000..0cd64a2
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_454545_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_888888_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_888888_256x240.png
new file mode 100644 (file)
index 0000000..2e5180e
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_888888_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_cd0a0a_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_cd0a0a_256x240.png
new file mode 100644 (file)
index 0000000..2db88b7
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/images/ui-icons_cd0a0a_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/mist.css b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-mist/mist.css
new file mode 100644 (file)
index 0000000..eb41f6c
--- /dev/null
@@ -0,0 +1,319 @@
+.fl-theme-mist .ui-helper-hidden{display:none;}
+.fl-theme-mist .ui-helper-hidden-accessible{position:absolute;left:-99999999px;}
+.fl-theme-mist .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none;}
+.fl-theme-mist .ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
+.fl-theme-mist .ui-helper-clearfix{display:inline-block;}
+/* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix{height:1%;}
+.fl-theme-mist .ui-helper-clearfix{display:block;}
+/* end clearfix */ .fl-theme-mist .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0);}
+.fl-theme-mist .ui-state-disabled{cursor:default!important;}
+.fl-theme-mist .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;}
+.fl-theme-mist .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
+.fl-theme-mist .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-mist .ui-widget input,.fl-theme-mist .ui-widget select,.fl-theme-mist .ui-widget textarea,.fl-theme-mist .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-mist .ui-widget-content{border:1px solid #ccc;background:#fff url(images/ui-bg_flAF_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222;}
+.fl-theme-mist .ui-widget-content a{color:#222;}
+.fl-theme-mist .ui-widget-header{border:1px solid #5A95CF;background:#9dcaf6 url(images/ui-bg_glass_75_9dcaf6_1x400.png) 50% 50% repeat-x;color:#222;font-weight:bold;}
+.fl-theme-mist .ui-widget-header a{color:#222;}
+.fl-theme-mist .ui-state-default,.fl-theme-mist .ui-widget-content .ui-state-default{border:1px solid #d3d3d3;background:#d9e8f7 url(images/ui-bg_glass_75_d9e8f7_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#555;outline:none;}
+.fl-theme-mist .ui-state-default a,.fl-theme-mist .ui-state-default a:link,.fl-theme-mist .ui-state-default a:visited{color:#555;text-decoration:none;outline:none;}
+.fl-theme-mist .ui-state-hover,.fl-theme-mist .ui-widget-content .ui-state-hover,.fl-theme-mist .ui-state-focus,.fl-theme-mist .ui-widget-content .ui-state-focus{border:1px solid #999;background:#9dcaf6 url(images/ui-bg_glass_75_9dcaf6_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121;outline:none;}
+.fl-theme-mist .ui-state-hover a,.fl-theme-mist .ui-state-hover a:hover{color:#212121;text-decoration:none;outline:none;}
+.fl-theme-mist .ui-state-active,.fl-theme-mist .ui-widget-content .ui-state-active{border:1px solid #5A95CF;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
+.fl-theme-mist .ui-state-active a,.fl-theme-mist .ui-state-active a:link,.fl-theme-mist .ui-state-active a:visited{color:#000;outline:none;text-decoration:none;}
+.fl-theme-mist .ui-state-highlight,.fl-theme-mist .ui-widget-content .ui-state-highlight{border:1px solid #2e83ff;background:#9dcaf6 url(images/ui-bg_highlight-soft_55_9dcaf6_1x100.png) 50% top repeat-x;color:#363636;}
+.fl-theme-mist .ui-state-highlight a,.fl-theme-mist .ui-widget-content .ui-state-highlight a{color:#363636;}
+.fl-theme-mist .ui-state-error,.fl-theme-mist .ui-widget-content .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_inset-soft_95_fef1ec_1x100.png) 50% bottom repeat-x;color:#cd0a0a;}
+.fl-theme-mist .ui-state-error a,.fl-theme-mist .ui-widget-content .ui-state-error a{color:#cd0a0a;}
+.fl-theme-mist .ui-state-error-text,.fl-theme-mist .ui-widget-content .ui-state-error-text{color:#cd0a0a;}
+.fl-theme-mist .ui-state-disabled,.fl-theme-mist .ui-widget-content .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none;}
+.fl-theme-mist .ui-priority-primary,.fl-theme-mist .ui-widget-content .ui-priority-primary{font-weight:bold;}
+.fl-theme-mist .ui-priority-secondary,.fl-theme-mist .ui-widget-content .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal;}
+.fl-theme-mist .ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_222222_256x240.png);}
+.fl-theme-mist .ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png);}
+.fl-theme-mist .ui-widget-header .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-mist .ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png);}
+.fl-theme-mist .ui-state-hover .ui-icon,.fl-theme-mist .ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png);}
+.fl-theme-mist .ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png);}
+.fl-theme-mist .ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png);}
+.fl-theme-mist .ui-state-error .ui-icon,.fl-theme-mist .ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png);}
+.fl-theme-mist .ui-icon-carat-1-n{background-position:0 0;}
+.fl-theme-mist .ui-icon-carat-1-ne{background-position:-16px 0;}
+.fl-theme-mist .ui-icon-carat-1-e{background-position:-32px 0;}
+.fl-theme-mist .ui-icon-carat-1-se{background-position:-48px 0;}
+.fl-theme-mist .ui-icon-carat-1-s{background-position:-64px 0;}
+.fl-theme-mist .ui-icon-carat-1-sw{background-position:-80px 0;}
+.fl-theme-mist .ui-icon-carat-1-w{background-position:-96px 0;}
+.fl-theme-mist .ui-icon-carat-1-nw{background-position:-112px 0;}
+.fl-theme-mist .ui-icon-carat-2-n-s{background-position:-128px 0;}
+.fl-theme-mist .ui-icon-carat-2-e-w{background-position:-144px 0;}
+.fl-theme-mist .ui-icon-triangle-1-n{background-position:0 -16px;}
+.fl-theme-mist .ui-icon-triangle-1-ne{background-position:-16px -16px;}
+.fl-theme-mist .ui-icon-triangle-1-e{background-position:-32px -16px;}
+.fl-theme-mist .ui-icon-triangle-1-se{background-position:-48px -16px;}
+.fl-theme-mist .ui-icon-triangle-1-s{background-position:-64px -16px;}
+.fl-theme-mist .ui-icon-triangle-1-sw{background-position:-80px -16px;}
+.fl-theme-mist .ui-icon-triangle-1-w{background-position:-96px -16px;}
+.fl-theme-mist .ui-icon-triangle-1-nw{background-position:-112px -16px;}
+.fl-theme-mist .ui-icon-triangle-2-n-s{background-position:-128px -16px;}
+.fl-theme-mist .ui-icon-triangle-2-e-w{background-position:-144px -16px;}
+.fl-theme-mist .ui-icon-arrow-1-n{background-position:0 -32px;}
+.fl-theme-mist .ui-icon-arrow-1-ne{background-position:-16px -32px;}
+.fl-theme-mist .ui-icon-arrow-1-e{background-position:-32px -32px;}
+.fl-theme-mist .ui-icon-arrow-1-se{background-position:-48px -32px;}
+.fl-theme-mist .ui-icon-arrow-1-s{background-position:-64px -32px;}
+.fl-theme-mist .ui-icon-arrow-1-sw{background-position:-80px -32px;}
+.fl-theme-mist .ui-icon-arrow-1-w{background-position:-96px -32px;}
+.fl-theme-mist .ui-icon-arrow-1-nw{background-position:-112px -32px;}
+.fl-theme-mist .ui-icon-arrow-2-n-s{background-position:-128px -32px;}
+.fl-theme-mist .ui-icon-arrow-2-ne-sw{background-position:-144px -32px;}
+.fl-theme-mist .ui-icon-arrow-2-e-w{background-position:-160px -32px;}
+.fl-theme-mist .ui-icon-arrow-2-se-nw{background-position:-176px -32px;}
+.fl-theme-mist .ui-icon-arrowstop-1-n{background-position:-192px -32px;}
+.fl-theme-mist .ui-icon-arrowstop-1-e{background-position:-208px -32px;}
+.fl-theme-mist .ui-icon-arrowstop-1-s{background-position:-224px -32px;}
+.fl-theme-mist .ui-icon-arrowstop-1-w{background-position:-240px -32px;}
+.fl-theme-mist .ui-icon-arrowthick-1-n{background-position:0 -48px;}
+.fl-theme-mist .ui-icon-arrowthick-1-ne{background-position:-16px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-1-e{background-position:-32px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-1-se{background-position:-48px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-1-s{background-position:-64px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-1-sw{background-position:-80px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-1-w{background-position:-96px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-1-nw{background-position:-112px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-2-n-s{background-position:-128px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-2-e-w{background-position:-160px -48px;}
+.fl-theme-mist .ui-icon-arrowthick-2-se-nw{background-position:-176px -48px;}
+.fl-theme-mist .ui-icon-arrowthickstop-1-n{background-position:-192px -48px;}
+.fl-theme-mist .ui-icon-arrowthickstop-1-e{background-position:-208px -48px;}
+.fl-theme-mist .ui-icon-arrowthickstop-1-s{background-position:-224px -48px;}
+.fl-theme-mist .ui-icon-arrowthickstop-1-w{background-position:-240px -48px;}
+.fl-theme-mist .ui-icon-arrowreturnthick-1-w{background-position:0 -64px;}
+.fl-theme-mist .ui-icon-arrowreturnthick-1-n{background-position:-16px -64px;}
+.fl-theme-mist .ui-icon-arrowreturnthick-1-e{background-position:-32px -64px;}
+.fl-theme-mist .ui-icon-arrowreturnthick-1-s{background-position:-48px -64px;}
+.fl-theme-mist .ui-icon-arrowreturn-1-w{background-position:-64px -64px;}
+.fl-theme-mist .ui-icon-arrowreturn-1-n{background-position:-80px -64px;}
+.fl-theme-mist .ui-icon-arrowreturn-1-e{background-position:-96px -64px;}
+.fl-theme-mist .ui-icon-arrowreturn-1-s{background-position:-112px -64px;}
+.fl-theme-mist .ui-icon-arrowrefresh-1-w{background-position:-128px -64px;}
+.fl-theme-mist .ui-icon-arrowrefresh-1-n{background-position:-144px -64px;}
+.fl-theme-mist .ui-icon-arrowrefresh-1-e{background-position:-160px -64px;}
+.fl-theme-mist .ui-icon-arrowrefresh-1-s{background-position:-176px -64px;}
+.fl-theme-mist .ui-icon-arrow-4{background-position:0 -80px;}
+.fl-theme-mist .ui-icon-arrow-4-diag{background-position:-16px -80px;}
+.fl-theme-mist .ui-icon-extlink{background-position:-32px -80px;}
+.fl-theme-mist .ui-icon-newwin{background-position:-48px -80px;}
+.fl-theme-mist .ui-icon-refresh{background-position:-64px -80px;}
+.fl-theme-mist .ui-icon-shuffle{background-position:-80px -80px;}
+.fl-theme-mist .ui-icon-transfer-e-w{background-position:-96px -80px;}
+.fl-theme-mist .ui-icon-transferthick-e-w{background-position:-112px -80px;}
+.fl-theme-mist .ui-icon-folder-collapsed{background-position:0 -96px;}
+.fl-theme-mist .ui-icon-folder-open{background-position:-16px -96px;}
+.fl-theme-mist .ui-icon-document{background-position:-32px -96px;}
+.fl-theme-mist .ui-icon-document-b{background-position:-48px -96px;}
+.fl-theme-mist .ui-icon-note{background-position:-64px -96px;}
+.fl-theme-mist .ui-icon-mail-closed{background-position:-80px -96px;}
+.fl-theme-mist .ui-icon-mail-open{background-position:-96px -96px;}
+.fl-theme-mist .ui-icon-suitcase{background-position:-112px -96px;}
+.fl-theme-mist .ui-icon-comment{background-position:-128px -96px;}
+.fl-theme-mist .ui-icon-person{background-position:-144px -96px;}
+.fl-theme-mist .ui-icon-print{background-position:-160px -96px;}
+.fl-theme-mist .ui-icon-trash{background-position:-176px -96px;}
+.fl-theme-mist .ui-icon-locked{background-position:-192px -96px;}
+.fl-theme-mist .ui-icon-unlocked{background-position:-208px -96px;}
+.fl-theme-mist .ui-icon-bookmark{background-position:-224px -96px;}
+.fl-theme-mist .ui-icon-tag{background-position:-240px -96px;}
+.fl-theme-mist .ui-icon-home{background-position:0 -112px;}
+.fl-theme-mist .ui-icon-flag{background-position:-16px -112px;}
+.fl-theme-mist .ui-icon-calendar{background-position:-32px -112px;}
+.fl-theme-mist .ui-icon-cart{background-position:-48px -112px;}
+.fl-theme-mist .ui-icon-pencil{background-position:-64px -112px;}
+.fl-theme-mist .ui-icon-clock{background-position:-80px -112px;}
+.fl-theme-mist .ui-icon-disk{background-position:-96px -112px;}
+.fl-theme-mist .ui-icon-calculator{background-position:-112px -112px;}
+.fl-theme-mist .ui-icon-zoomin{background-position:-128px -112px;}
+.fl-theme-mist .ui-icon-zoomout{background-position:-144px -112px;}
+.fl-theme-mist .ui-icon-search{background-position:-160px -112px;}
+.fl-theme-mist .ui-icon-wrench{background-position:-176px -112px;}
+.fl-theme-mist .ui-icon-gear{background-position:-192px -112px;}
+.fl-theme-mist .ui-icon-heart{background-position:-208px -112px;}
+.fl-theme-mist .ui-icon-star{background-position:-224px -112px;}
+.fl-theme-mist .ui-icon-link{background-position:-240px -112px;}
+.fl-theme-mist .ui-icon-cancel{background-position:0 -128px;}
+.fl-theme-mist .ui-icon-plus{background-position:-16px -128px;}
+.fl-theme-mist .ui-icon-plusthick{background-position:-32px -128px;}
+.fl-theme-mist .ui-icon-minus{background-position:-48px -128px;}
+.fl-theme-mist .ui-icon-minusthick{background-position:-64px -128px;}
+.fl-theme-mist .ui-icon-close{background-position:-80px -128px;}
+.fl-theme-mist .ui-icon-closethick{background-position:-96px -128px;}
+.fl-theme-mist .ui-icon-key{background-position:-112px -128px;}
+.fl-theme-mist .ui-icon-lightbulb{background-position:-128px -128px;}
+.fl-theme-mist .ui-icon-scissors{background-position:-144px -128px;}
+.fl-theme-mist .ui-icon-clipboard{background-position:-160px -128px;}
+.fl-theme-mist .ui-icon-copy{background-position:-176px -128px;}
+.fl-theme-mist .ui-icon-contact{background-position:-192px -128px;}
+.fl-theme-mist .ui-icon-image{background-position:-208px -128px;}
+.fl-theme-mist .ui-icon-video{background-position:-224px -128px;}
+.fl-theme-mist .ui-icon-script{background-position:-240px -128px;}
+.fl-theme-mist .ui-icon-alert{background-position:0 -144px;}
+.fl-theme-mist .ui-icon-info{background-position:-16px -144px;}
+.fl-theme-mist .ui-icon-notice{background-position:-32px -144px;}
+.fl-theme-mist .ui-icon-help{background-position:-48px -144px;}
+.fl-theme-mist .ui-icon-check{background-position:-64px -144px;}
+.fl-theme-mist .ui-icon-bullet{background-position:-80px -144px;}
+.fl-theme-mist .ui-icon-radio-off{background-position:-96px -144px;}
+.fl-theme-mist .ui-icon-radio-on{background-position:-112px -144px;}
+.fl-theme-mist .ui-icon-pin-w{background-position:-128px -144px;}
+.fl-theme-mist .ui-icon-pin-s{background-position:-144px -144px;}
+.fl-theme-mist .ui-icon-play{background-position:0 -160px;}
+.fl-theme-mist .ui-icon-pause{background-position:-16px -160px;}
+.fl-theme-mist .ui-icon-seek-next{background-position:-32px -160px;}
+.fl-theme-mist .ui-icon-seek-prev{background-position:-48px -160px;}
+.fl-theme-mist .ui-icon-seek-end{background-position:-64px -160px;}
+.fl-theme-mist .ui-icon-seek-first{background-position:-80px -160px;}
+.fl-theme-mist .ui-icon-stop{background-position:-96px -160px;}
+.fl-theme-mist .ui-icon-eject{background-position:-112px -160px;}
+.fl-theme-mist .ui-icon-volume-off{background-position:-128px -160px;}
+.fl-theme-mist .ui-icon-volume-on{background-position:-144px -160px;}
+.fl-theme-mist .ui-icon-power{background-position:0 -176px;}
+.fl-theme-mist .ui-icon-signal-diag{background-position:-16px -176px;}
+.fl-theme-mist .ui-icon-signal{background-position:-32px -176px;}
+.fl-theme-mist .ui-icon-battery-0{background-position:-48px -176px;}
+.fl-theme-mist .ui-icon-battery-1{background-position:-64px -176px;}
+.fl-theme-mist .ui-icon-battery-2{background-position:-80px -176px;}
+.fl-theme-mist .ui-icon-battery-3{background-position:-96px -176px;}
+.fl-theme-mist .ui-icon-circle-plus{background-position:0 -192px;}
+.fl-theme-mist .ui-icon-circle-minus{background-position:-16px -192px;}
+.fl-theme-mist .ui-icon-circle-close{background-position:-32px -192px;}
+.fl-theme-mist .ui-icon-circle-triangle-e{background-position:-48px -192px;}
+.fl-theme-mist .ui-icon-circle-triangle-s{background-position:-64px -192px;}
+.fl-theme-mist .ui-icon-circle-triangle-w{background-position:-80px -192px;}
+.fl-theme-mist .ui-icon-circle-triangle-n{background-position:-96px -192px;}
+.fl-theme-mist .ui-icon-circle-arrow-e{background-position:-112px -192px;}
+.fl-theme-mist .ui-icon-circle-arrow-s{background-position:-128px -192px;}
+.fl-theme-mist .ui-icon-circle-arrow-w{background-position:-144px -192px;}
+.fl-theme-mist .ui-icon-circle-arrow-n{background-position:-160px -192px;}
+.fl-theme-mist .ui-icon-circle-zoomin{background-position:-176px -192px;}
+.fl-theme-mist .ui-icon-circle-zoomout{background-position:-192px -192px;}
+.fl-theme-mist .ui-icon-circle-check{background-position:-208px -192px;}
+.fl-theme-mist .ui-icon-circlesmall-plus{background-position:0 -208px;}
+.fl-theme-mist .ui-icon-circlesmall-minus{background-position:-16px -208px;}
+.fl-theme-mist .ui-icon-circlesmall-close{background-position:-32px -208px;}
+.fl-theme-mist .ui-icon-squaresmall-plus{background-position:-48px -208px;}
+.fl-theme-mist .ui-icon-squaresmall-minus{background-position:-64px -208px;}
+.fl-theme-mist .ui-icon-squaresmall-close{background-position:-80px -208px;}
+.fl-theme-mist .ui-icon-grip-dotted-vertical{background-position:0 -224px;}
+.fl-theme-mist .ui-icon-grip-dotted-horizontal{background-position:-16px -224px;}
+.fl-theme-mist .ui-icon-grip-solid-vertical{background-position:-32px -224px;}
+.fl-theme-mist .ui-icon-grip-solid-horizontal{background-position:-48px -224px;}
+.fl-theme-mist .ui-icon-gripsmall-diagonal-se{background-position:-64px -224px;}
+.fl-theme-mist .ui-icon-grip-diagonal-se{background-position:-80px -224px;}
+.fl-theme-mist .ui-corner-tl{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;}
+.fl-theme-mist .ui-corner-tr{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;}
+.fl-theme-mist .ui-corner-bl{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;}
+.fl-theme-mist .ui-corner-br{-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;}
+.fl-theme-mist .ui-corner-top{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;}
+.fl-theme-mist .ui-corner-bottom{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;}
+.fl-theme-mist .ui-corner-right{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;}
+.fl-theme-mist .ui-corner-left{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;}
+.fl-theme-mist .ui-corner-all{-moz-border-radius:4px;-webkit-border-radius:4px;}
+.fl-theme-mist .ui-widget-overlay{background:#2e83ff url(images/ui-bg_flAF_0_2e83ff_40x100.png) 50% 50% repeat-x;opacity:.20;filter:Alpha(Opacity=20);}
+.fl-theme-mist .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url(images/ui-bg_flAF_0_000000_40x100.png) 50% 50% repeat-x;opacity:.30;filter:Alpha(Opacity=30);-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-mist .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}
+.fl-theme-mist .ui-accordion .ui-accordion-li-fix{display:inline;}
+.fl-theme-mist .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}
+.fl-theme-mist .ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em 2.2em;}
+.fl-theme-mist .ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px;}
+.fl-theme-mist .ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;}
+.fl-theme-mist .ui-accordion .ui-accordion-content-active{display:block;}
+.fl-theme-mist .ui-datepicker{width:17em;padding:.2em .2em 0;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-prev,.fl-theme-mist .ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-prev-hover,.fl-theme-mist .ui-datepicker .ui-datepicker-next-hover{top:1px;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-prev{left:2px;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-next{right:2px;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-prev-hover{left:1px;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-next-hover{right:1px;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-prev span,.fl-theme-mist .ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-title select{float:left;font-size:1em;margin:1px 0;}
+.fl-theme-mist .ui-datepicker select.ui-datepicker-month-year{width:100%;}
+.fl-theme-mist .ui-datepicker select.ui-datepicker-month,.fl-theme-mist .ui-datepicker select.ui-datepicker-year{width:49%;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-title select.ui-datepicker-year{float:right;}
+.fl-theme-mist .ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em;}
+.fl-theme-mist .ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0;}
+.fl-theme-mist .ui-datepicker td{border:0;padding:1px;}
+.fl-theme-mist .ui-datepicker td span,.fl-theme-mist .ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible;}
+.fl-theme-mist .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left;}
+.fl-theme-mist .ui-datepicker.ui-datepicker-multi{width:auto;}
+.fl-theme-mist .ui-datepicker-multi .ui-datepicker-group{float:left;}
+.fl-theme-mist .ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em;}
+.fl-theme-mist .ui-datepicker-multi-2 .ui-datepicker-group{width:50%;}
+.fl-theme-mist .ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%;}
+.fl-theme-mist .ui-datepicker-multi-4 .ui-datepicker-group{width:25%;}
+.fl-theme-mist .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0;}
+.fl-theme-mist .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0;}
+.fl-theme-mist .ui-datepicker-multi .ui-datepicker-buttonpane{clear:left;}
+.fl-theme-mist .ui-datepicker-row-break{clear:both;width:100%;}
+.fl-theme-mist .ui-datepicker-rtl{direction:rtl;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-group{float:right;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-mist .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-mist .ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px;}
+.fl-theme-mist .ui-dialog{position:relative;padding:.2em;width:300px;}
+.fl-theme-mist .ui-dialog .ui-dialog-titlebar{padding:.5em .3em .3em 1em;position:relative;}
+.fl-theme-mist .ui-dialog .ui-dialog-title{float:left;margin:.1em 0 .2em;}
+.fl-theme-mist .ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px;}
+.fl-theme-mist .ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px;}
+.fl-theme-mist .ui-dialog .ui-dialog-titlebar-close:hover,.fl-theme-mist .ui-dialog .ui-dialog-titlebar-close:focus{padding:0;}
+.fl-theme-mist .ui-dialog .ui-dialog-content{border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1;}
+.fl-theme-mist .ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em;}
+.fl-theme-mist .ui-dialog .ui-dialog-buttonpane button{float:right;margin:.5em .4em .5em 0;cursor:pointer;padding:.2em .6em .3em .6em;line-height:1.4em;width:auto;overflow:visible;}
+.fl-theme-mist .ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px;}
+.fl-theme-mist .ui-draggable .ui-dialog-titlebar{cursor:move;}
+.fl-theme-mist .ui-progressbar{height:2em;text-align:left;}
+.fl-theme-mist .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%;}
+.fl-theme-mist .ui-resizable{position:relative;}
+.fl-theme-mist .ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block;}
+.fl-theme-mist .ui-resizable-disabled .ui-resizable-handle,.fl-theme-mist .ui-resizable-autohide .ui-resizable-handle{display:none;}
+.fl-theme-mist .ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0;}
+.fl-theme-mist .ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0;}
+.fl-theme-mist .ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%;}
+.fl-theme-mist .ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%;}
+.fl-theme-mist .ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px;}
+.fl-theme-mist .ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px;}
+.fl-theme-mist .ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px;}
+.fl-theme-mist .ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px;}
+.fl-theme-mist .ui-slider{position:relative;text-align:left;}
+.fl-theme-mist .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;}
+.fl-theme-mist .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;}
+.fl-theme-mist .ui-slider-horizontal{height:.8em;}
+.fl-theme-mist .ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em;}
+.fl-theme-mist .ui-slider-horizontal .ui-slider-range{top:0;height:100%;}
+.fl-theme-mist .ui-slider-horizontal .ui-slider-range-min{left:0;}
+.fl-theme-mist .ui-slider-horizontal .ui-slider-range-max{right:0;}
+.fl-theme-mist .ui-slider-vertical{width:.8em;height:100px;}
+.fl-theme-mist .ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em;}
+.fl-theme-mist .ui-slider-vertical .ui-slider-range{left:0;width:100%;}
+.fl-theme-mist .ui-slider-vertical .ui-slider-range-min{bottom:0;}
+.fl-theme-mist .ui-slider-vertical .ui-slider-range-max{top:0;}
+.fl-theme-mist .ui-tabs{padding:.2em;zoom:1;}
+.fl-theme-mist .ui-tabs .ui-tabs-nav{list-style:none;position:relative;padding:.2em .2em 0;}
+.fl-theme-mist .ui-tabs .ui-tabs-nav li{position:relative;float:left;border-bottom-width:0!important;margin:0 .2em -1px 0;padding:0;}
+.fl-theme-mist .ui-tabs .ui-tabs-nav li a{float:left;text-decoration:none;padding:.5em 1em;}
+.fl-theme-mist .ui-tabs .ui-tabs-nav li.ui-tabs-selected{padding-bottom:1px;border-bottom-width:0;}
+.fl-theme-mist .ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.fl-theme-mist .ui-tabs .ui-tabs-nav li.ui-state-disabled a,.fl-theme-mist .ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text;}
+.fl-theme-mist .ui-tabs .ui-tabs-nav li a,.fl-theme-mist .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer;}
+.fl-theme-mist .ui-tabs .ui-tabs-panel{padding:1em 1.4em;display:block;border-width:0;background:none;}
+.fl-theme-mist .ui-tabs .ui-tabs-hide{display:none!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_666666_40x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_666666_40x100.png
new file mode 100644 (file)
index 0000000..b3dc88e
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_666666_40x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_999999_40x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_999999_40x100.png
new file mode 100644 (file)
index 0000000..6b6de7d
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_999999_40x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_cccccc_40x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_cccccc_40x100.png
new file mode 100644 (file)
index 0000000..5473aff
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_cccccc_40x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ebebeb_40x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ebebeb_40x100.png
new file mode 100644 (file)
index 0000000..1d773f9
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ebebeb_40x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ffffff_40x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ffffff_40x100.png
new file mode 100644 (file)
index 0000000..ac8b229
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_flat_0_ffffff_40x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_glass_75_666666_1x400.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_glass_75_666666_1x400.png
new file mode 100644 (file)
index 0000000..f7b1655
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_glass_75_666666_1x400.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-hard_100_ebebeb_1x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-hard_100_ebebeb_1x100.png
new file mode 100644 (file)
index 0000000..f182c8b
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-hard_100_ebebeb_1x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-soft_75_999999_1x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-soft_75_999999_1x100.png
new file mode 100644 (file)
index 0000000..0721365
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_highlight-soft_75_999999_1x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_inset-hard_100_ebebeb_1x100.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_inset-hard_100_ebebeb_1x100.png
new file mode 100644 (file)
index 0000000..9926860
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-bg_inset-hard_100_ebebeb_1x100.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_000000_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_000000_256x240.png
new file mode 100644 (file)
index 0000000..842156d
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_000000_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_666666_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_666666_256x240.png
new file mode 100644 (file)
index 0000000..ba04b08
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_666666_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ebebeb_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ebebeb_256x240.png
new file mode 100644 (file)
index 0000000..c3a2a91
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ebebeb_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ffffff_256x240.png b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ffffff_256x240.png
new file mode 100644 (file)
index 0000000..746e6fa
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/images/ui-icons_ffffff_256x240.png differ
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/slate.css b/docs/include/jscripts/infusion_old/lib/jquery/ui/css/fl-theme-slate/slate.css
new file mode 100644 (file)
index 0000000..0774905
--- /dev/null
@@ -0,0 +1,319 @@
+.fl-theme-slate .ui-helper-hidden{display:none;}
+.fl-theme-slate .ui-helper-hidden-accessible{position:absolute;left:-99999999px;}
+.fl-theme-slate .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none;}
+.fl-theme-slate .ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
+.fl-theme-slate .ui-helper-clearfix{display:inline-block;}
+/* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix{height:1%;}
+.fl-theme-slate .ui-helper-clearfix{display:block;}
+/* end clearfix */ .fl-theme-slate .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0);}
+.fl-theme-slate .ui-state-disabled{cursor:default!important;}
+.fl-theme-slate .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;}
+.fl-theme-slate .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
+.fl-theme-slate .ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-slate .ui-widget input,.fl-theme-slate .ui-widget select,.fl-theme-slate .ui-widget textarea,.fl-theme-slate .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
+.fl-theme-slate .ui-widget-content{border:1px solid #999;background:#ebebeb url(images/ui-bg_flAF_0_ebebeb_40x100.png) 50% 50% repeat-x;color:#000;}
+.fl-theme-slate .ui-widget-content a{color:#000;}
+.fl-theme-slate .ui-widget-header{border:1px solid #666;background:#666 url(images/ui-bg_glass_75_666666_1x400.png) 50% 50% repeat-x;color:#fff;font-weight:bold;}
+.fl-theme-slate .ui-widget-header a{color:#fff;}
+.fl-theme-slate .ui-state-default,.fl-theme-slate .ui-widget-content .ui-state-default{border:1px solid #ccc;background:#ebebeb url(images/ui-bg_inset-hard_100_ebebeb_1x100.png) 50% 50% repeat-x;font-weight:normal;color:#666;outline:none;}
+.fl-theme-slate .ui-state-default a,.fl-theme-slate .ui-state-default a:link,.fl-theme-slate .ui-state-default a:visited{color:#666;text-decoration:none;outline:none;}
+.fl-theme-slate .ui-state-hover,.fl-theme-slate .ui-widget-content .ui-state-hover,.fl-theme-slate .ui-state-focus,.fl-theme-slate .ui-widget-content .ui-state-focus{border:1px solid #999;background:#999 url(images/ui-bg_highlight-soft_75_999999_1x100.png) 50% 50% repeat-x;font-weight:normal;color:#ebebeb;outline:none;}
+.fl-theme-slate .ui-state-hover a,.fl-theme-slate .ui-state-hover a:hover{color:#ebebeb;text-decoration:none;outline:none;}
+.fl-theme-slate .ui-state-active,.fl-theme-slate .ui-widget-content .ui-state-active{border:1px solid #ccc;background:#ebebeb url(images/ui-bg_highlight-hard_100_ebebeb_1x100.png) 50% 50% repeat-x;font-weight:normal;color:#000;outline:none;}
+.fl-theme-slate .ui-state-active a,.fl-theme-slate .ui-state-active a:link,.fl-theme-slate .ui-state-active a:visited{color:#000;outline:none;text-decoration:none;}
+.fl-theme-slate .ui-state-highlight,.fl-theme-slate .ui-widget-content .ui-state-highlight{border:1px solid #ccc;background:#fff url(images/ui-bg_flAF_0_ffffff_40x100.png) 50% 50% repeat-x;color:#666;}
+.fl-theme-slate .ui-state-highlight a,.fl-theme-slate .ui-widget-content .ui-state-highlight a{color:#666;}
+.fl-theme-slate .ui-state-error,.fl-theme-slate .ui-widget-content .ui-state-error{border:1px solid #000;background:#666 url(images/ui-bg_flAF_0_666666_40x100.png) 50% 50% repeat-x;color:#fff;}
+.fl-theme-slate .ui-state-error a,.fl-theme-slate .ui-widget-content .ui-state-error a{color:#fff;}
+.fl-theme-slate .ui-state-error-text,.fl-theme-slate .ui-widget-content .ui-state-error-text{color:#fff;}
+.fl-theme-slate .ui-state-disabled,.fl-theme-slate .ui-widget-content .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none;}
+.fl-theme-slate .ui-priority-primary,.fl-theme-slate .ui-widget-content .ui-priority-primary{font-weight:bold;}
+.fl-theme-slate .ui-priority-secondary,.fl-theme-slate .ui-widget-content .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal;}
+.fl-theme-slate .ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-slate .ui-widget-content .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-slate .ui-widget-header .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-slate .ui-state-default .ui-icon{background-image:url(images/ui-icons_666666_256x240.png);}
+.fl-theme-slate .ui-state-hover .ui-icon,.fl-theme-slate .ui-state-focus .ui-icon{background-image:url(images/ui-icons_ebebeb_256x240.png);}
+.fl-theme-slate .ui-state-active .ui-icon{background-image:url(images/ui-icons_000000_256x240.png);}
+.fl-theme-slate .ui-state-highlight .ui-icon{background-image:url(images/ui-icons_666666_256x240.png);}
+.fl-theme-slate .ui-state-error .ui-icon,.fl-theme-slate .ui-state-error-text .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
+.fl-theme-slate .ui-icon-carat-1-n{background-position:0 0;}
+.fl-theme-slate .ui-icon-carat-1-ne{background-position:-16px 0;}
+.fl-theme-slate .ui-icon-carat-1-e{background-position:-32px 0;}
+.fl-theme-slate .ui-icon-carat-1-se{background-position:-48px 0;}
+.fl-theme-slate .ui-icon-carat-1-s{background-position:-64px 0;}
+.fl-theme-slate .ui-icon-carat-1-sw{background-position:-80px 0;}
+.fl-theme-slate .ui-icon-carat-1-w{background-position:-96px 0;}
+.fl-theme-slate .ui-icon-carat-1-nw{background-position:-112px 0;}
+.fl-theme-slate .ui-icon-carat-2-n-s{background-position:-128px 0;}
+.fl-theme-slate .ui-icon-carat-2-e-w{background-position:-144px 0;}
+.fl-theme-slate .ui-icon-triangle-1-n{background-position:0 -16px;}
+.fl-theme-slate .ui-icon-triangle-1-ne{background-position:-16px -16px;}
+.fl-theme-slate .ui-icon-triangle-1-e{background-position:-32px -16px;}
+.fl-theme-slate .ui-icon-triangle-1-se{background-position:-48px -16px;}
+.fl-theme-slate .ui-icon-triangle-1-s{background-position:-64px -16px;}
+.fl-theme-slate .ui-icon-triangle-1-sw{background-position:-80px -16px;}
+.fl-theme-slate .ui-icon-triangle-1-w{background-position:-96px -16px;}
+.fl-theme-slate .ui-icon-triangle-1-nw{background-position:-112px -16px;}
+.fl-theme-slate .ui-icon-triangle-2-n-s{background-position:-128px -16px;}
+.fl-theme-slate .ui-icon-triangle-2-e-w{background-position:-144px -16px;}
+.fl-theme-slate .ui-icon-arrow-1-n{background-position:0 -32px;}
+.fl-theme-slate .ui-icon-arrow-1-ne{background-position:-16px -32px;}
+.fl-theme-slate .ui-icon-arrow-1-e{background-position:-32px -32px;}
+.fl-theme-slate .ui-icon-arrow-1-se{background-position:-48px -32px;}
+.fl-theme-slate .ui-icon-arrow-1-s{background-position:-64px -32px;}
+.fl-theme-slate .ui-icon-arrow-1-sw{background-position:-80px -32px;}
+.fl-theme-slate .ui-icon-arrow-1-w{background-position:-96px -32px;}
+.fl-theme-slate .ui-icon-arrow-1-nw{background-position:-112px -32px;}
+.fl-theme-slate .ui-icon-arrow-2-n-s{background-position:-128px -32px;}
+.fl-theme-slate .ui-icon-arrow-2-ne-sw{background-position:-144px -32px;}
+.fl-theme-slate .ui-icon-arrow-2-e-w{background-position:-160px -32px;}
+.fl-theme-slate .ui-icon-arrow-2-se-nw{background-position:-176px -32px;}
+.fl-theme-slate .ui-icon-arrowstop-1-n{background-position:-192px -32px;}
+.fl-theme-slate .ui-icon-arrowstop-1-e{background-position:-208px -32px;}
+.fl-theme-slate .ui-icon-arrowstop-1-s{background-position:-224px -32px;}
+.fl-theme-slate .ui-icon-arrowstop-1-w{background-position:-240px -32px;}
+.fl-theme-slate .ui-icon-arrowthick-1-n{background-position:0 -48px;}
+.fl-theme-slate .ui-icon-arrowthick-1-ne{background-position:-16px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-1-e{background-position:-32px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-1-se{background-position:-48px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-1-s{background-position:-64px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-1-sw{background-position:-80px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-1-w{background-position:-96px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-1-nw{background-position:-112px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-2-n-s{background-position:-128px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-2-e-w{background-position:-160px -48px;}
+.fl-theme-slate .ui-icon-arrowthick-2-se-nw{background-position:-176px -48px;}
+.fl-theme-slate .ui-icon-arrowthickstop-1-n{background-position:-192px -48px;}
+.fl-theme-slate .ui-icon-arrowthickstop-1-e{background-position:-208px -48px;}
+.fl-theme-slate .ui-icon-arrowthickstop-1-s{background-position:-224px -48px;}
+.fl-theme-slate .ui-icon-arrowthickstop-1-w{background-position:-240px -48px;}
+.fl-theme-slate .ui-icon-arrowreturnthick-1-w{background-position:0 -64px;}
+.fl-theme-slate .ui-icon-arrowreturnthick-1-n{background-position:-16px -64px;}
+.fl-theme-slate .ui-icon-arrowreturnthick-1-e{background-position:-32px -64px;}
+.fl-theme-slate .ui-icon-arrowreturnthick-1-s{background-position:-48px -64px;}
+.fl-theme-slate .ui-icon-arrowreturn-1-w{background-position:-64px -64px;}
+.fl-theme-slate .ui-icon-arrowreturn-1-n{background-position:-80px -64px;}
+.fl-theme-slate .ui-icon-arrowreturn-1-e{background-position:-96px -64px;}
+.fl-theme-slate .ui-icon-arrowreturn-1-s{background-position:-112px -64px;}
+.fl-theme-slate .ui-icon-arrowrefresh-1-w{background-position:-128px -64px;}
+.fl-theme-slate .ui-icon-arrowrefresh-1-n{background-position:-144px -64px;}
+.fl-theme-slate .ui-icon-arrowrefresh-1-e{background-position:-160px -64px;}
+.fl-theme-slate .ui-icon-arrowrefresh-1-s{background-position:-176px -64px;}
+.fl-theme-slate .ui-icon-arrow-4{background-position:0 -80px;}
+.fl-theme-slate .ui-icon-arrow-4-diag{background-position:-16px -80px;}
+.fl-theme-slate .ui-icon-extlink{background-position:-32px -80px;}
+.fl-theme-slate .ui-icon-newwin{background-position:-48px -80px;}
+.fl-theme-slate .ui-icon-refresh{background-position:-64px -80px;}
+.fl-theme-slate .ui-icon-shuffle{background-position:-80px -80px;}
+.fl-theme-slate .ui-icon-transfer-e-w{background-position:-96px -80px;}
+.fl-theme-slate .ui-icon-transferthick-e-w{background-position:-112px -80px;}
+.fl-theme-slate .ui-icon-folder-collapsed{background-position:0 -96px;}
+.fl-theme-slate .ui-icon-folder-open{background-position:-16px -96px;}
+.fl-theme-slate .ui-icon-document{background-position:-32px -96px;}
+.fl-theme-slate .ui-icon-document-b{background-position:-48px -96px;}
+.fl-theme-slate .ui-icon-note{background-position:-64px -96px;}
+.fl-theme-slate .ui-icon-mail-closed{background-position:-80px -96px;}
+.fl-theme-slate .ui-icon-mail-open{background-position:-96px -96px;}
+.fl-theme-slate .ui-icon-suitcase{background-position:-112px -96px;}
+.fl-theme-slate .ui-icon-comment{background-position:-128px -96px;}
+.fl-theme-slate .ui-icon-person{background-position:-144px -96px;}
+.fl-theme-slate .ui-icon-print{background-position:-160px -96px;}
+.fl-theme-slate .ui-icon-trash{background-position:-176px -96px;}
+.fl-theme-slate .ui-icon-locked{background-position:-192px -96px;}
+.fl-theme-slate .ui-icon-unlocked{background-position:-208px -96px;}
+.fl-theme-slate .ui-icon-bookmark{background-position:-224px -96px;}
+.fl-theme-slate .ui-icon-tag{background-position:-240px -96px;}
+.fl-theme-slate .ui-icon-home{background-position:0 -112px;}
+.fl-theme-slate .ui-icon-flag{background-position:-16px -112px;}
+.fl-theme-slate .ui-icon-calendar{background-position:-32px -112px;}
+.fl-theme-slate .ui-icon-cart{background-position:-48px -112px;}
+.fl-theme-slate .ui-icon-pencil{background-position:-64px -112px;}
+.fl-theme-slate .ui-icon-clock{background-position:-80px -112px;}
+.fl-theme-slate .ui-icon-disk{background-position:-96px -112px;}
+.fl-theme-slate .ui-icon-calculator{background-position:-112px -112px;}
+.fl-theme-slate .ui-icon-zoomin{background-position:-128px -112px;}
+.fl-theme-slate .ui-icon-zoomout{background-position:-144px -112px;}
+.fl-theme-slate .ui-icon-search{background-position:-160px -112px;}
+.fl-theme-slate .ui-icon-wrench{background-position:-176px -112px;}
+.fl-theme-slate .ui-icon-gear{background-position:-192px -112px;}
+.fl-theme-slate .ui-icon-heart{background-position:-208px -112px;}
+.fl-theme-slate .ui-icon-star{background-position:-224px -112px;}
+.fl-theme-slate .ui-icon-link{background-position:-240px -112px;}
+.fl-theme-slate .ui-icon-cancel{background-position:0 -128px;}
+.fl-theme-slate .ui-icon-plus{background-position:-16px -128px;}
+.fl-theme-slate .ui-icon-plusthick{background-position:-32px -128px;}
+.fl-theme-slate .ui-icon-minus{background-position:-48px -128px;}
+.fl-theme-slate .ui-icon-minusthick{background-position:-64px -128px;}
+.fl-theme-slate .ui-icon-close{background-position:-80px -128px;}
+.fl-theme-slate .ui-icon-closethick{background-position:-96px -128px;}
+.fl-theme-slate .ui-icon-key{background-position:-112px -128px;}
+.fl-theme-slate .ui-icon-lightbulb{background-position:-128px -128px;}
+.fl-theme-slate .ui-icon-scissors{background-position:-144px -128px;}
+.fl-theme-slate .ui-icon-clipboard{background-position:-160px -128px;}
+.fl-theme-slate .ui-icon-copy{background-position:-176px -128px;}
+.fl-theme-slate .ui-icon-contact{background-position:-192px -128px;}
+.fl-theme-slate .ui-icon-image{background-position:-208px -128px;}
+.fl-theme-slate .ui-icon-video{background-position:-224px -128px;}
+.fl-theme-slate .ui-icon-script{background-position:-240px -128px;}
+.fl-theme-slate .ui-icon-alert{background-position:0 -144px;}
+.fl-theme-slate .ui-icon-info{background-position:-16px -144px;}
+.fl-theme-slate .ui-icon-notice{background-position:-32px -144px;}
+.fl-theme-slate .ui-icon-help{background-position:-48px -144px;}
+.fl-theme-slate .ui-icon-check{background-position:-64px -144px;}
+.fl-theme-slate .ui-icon-bullet{background-position:-80px -144px;}
+.fl-theme-slate .ui-icon-radio-off{background-position:-96px -144px;}
+.fl-theme-slate .ui-icon-radio-on{background-position:-112px -144px;}
+.fl-theme-slate .ui-icon-pin-w{background-position:-128px -144px;}
+.fl-theme-slate .ui-icon-pin-s{background-position:-144px -144px;}
+.fl-theme-slate .ui-icon-play{background-position:0 -160px;}
+.fl-theme-slate .ui-icon-pause{background-position:-16px -160px;}
+.fl-theme-slate .ui-icon-seek-next{background-position:-32px -160px;}
+.fl-theme-slate .ui-icon-seek-prev{background-position:-48px -160px;}
+.fl-theme-slate .ui-icon-seek-end{background-position:-64px -160px;}
+.fl-theme-slate .ui-icon-seek-first{background-position:-80px -160px;}
+.fl-theme-slate .ui-icon-stop{background-position:-96px -160px;}
+.fl-theme-slate .ui-icon-eject{background-position:-112px -160px;}
+.fl-theme-slate .ui-icon-volume-off{background-position:-128px -160px;}
+.fl-theme-slate .ui-icon-volume-on{background-position:-144px -160px;}
+.fl-theme-slate .ui-icon-power{background-position:0 -176px;}
+.fl-theme-slate .ui-icon-signal-diag{background-position:-16px -176px;}
+.fl-theme-slate .ui-icon-signal{background-position:-32px -176px;}
+.fl-theme-slate .ui-icon-battery-0{background-position:-48px -176px;}
+.fl-theme-slate .ui-icon-battery-1{background-position:-64px -176px;}
+.fl-theme-slate .ui-icon-battery-2{background-position:-80px -176px;}
+.fl-theme-slate .ui-icon-battery-3{background-position:-96px -176px;}
+.fl-theme-slate .ui-icon-circle-plus{background-position:0 -192px;}
+.fl-theme-slate .ui-icon-circle-minus{background-position:-16px -192px;}
+.fl-theme-slate .ui-icon-circle-close{background-position:-32px -192px;}
+.fl-theme-slate .ui-icon-circle-triangle-e{background-position:-48px -192px;}
+.fl-theme-slate .ui-icon-circle-triangle-s{background-position:-64px -192px;}
+.fl-theme-slate .ui-icon-circle-triangle-w{background-position:-80px -192px;}
+.fl-theme-slate .ui-icon-circle-triangle-n{background-position:-96px -192px;}
+.fl-theme-slate .ui-icon-circle-arrow-e{background-position:-112px -192px;}
+.fl-theme-slate .ui-icon-circle-arrow-s{background-position:-128px -192px;}
+.fl-theme-slate .ui-icon-circle-arrow-w{background-position:-144px -192px;}
+.fl-theme-slate .ui-icon-circle-arrow-n{background-position:-160px -192px;}
+.fl-theme-slate .ui-icon-circle-zoomin{background-position:-176px -192px;}
+.fl-theme-slate .ui-icon-circle-zoomout{background-position:-192px -192px;}
+.fl-theme-slate .ui-icon-circle-check{background-position:-208px -192px;}
+.fl-theme-slate .ui-icon-circlesmall-plus{background-position:0 -208px;}
+.fl-theme-slate .ui-icon-circlesmall-minus{background-position:-16px -208px;}
+.fl-theme-slate .ui-icon-circlesmall-close{background-position:-32px -208px;}
+.fl-theme-slate .ui-icon-squaresmall-plus{background-position:-48px -208px;}
+.fl-theme-slate .ui-icon-squaresmall-minus{background-position:-64px -208px;}
+.fl-theme-slate .ui-icon-squaresmall-close{background-position:-80px -208px;}
+.fl-theme-slate .ui-icon-grip-dotted-vertical{background-position:0 -224px;}
+.fl-theme-slate .ui-icon-grip-dotted-horizontal{background-position:-16px -224px;}
+.fl-theme-slate .ui-icon-grip-solid-vertical{background-position:-32px -224px;}
+.fl-theme-slate .ui-icon-grip-solid-horizontal{background-position:-48px -224px;}
+.fl-theme-slate .ui-icon-gripsmall-diagonal-se{background-position:-64px -224px;}
+.fl-theme-slate .ui-icon-grip-diagonal-se{background-position:-80px -224px;}
+.fl-theme-slate .ui-corner-tl{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;}
+.fl-theme-slate .ui-corner-tr{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;}
+.fl-theme-slate .ui-corner-bl{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;}
+.fl-theme-slate .ui-corner-br{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-slate .ui-corner-top{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;}
+.fl-theme-slate .ui-corner-bottom{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-slate .ui-corner-right{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;}
+.fl-theme-slate .ui-corner-left{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;}
+.fl-theme-slate .ui-corner-all{-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-slate .ui-widget-overlay{background:#ccc url(images/ui-bg_flAF_0_cccccc_40x100.png) 50% 50% repeat-x;opacity:.50;filter:Alpha(Opacity=50);}
+.fl-theme-slate .ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#999 url(images/ui-bg_flAF_0_999999_40x100.png) 50% 50% repeat-x;opacity:.50;filter:Alpha(Opacity=50);-moz-border-radius:5px;-webkit-border-radius:5px;}
+.fl-theme-slate .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}
+.fl-theme-slate .ui-accordion .ui-accordion-li-fix{display:inline;}
+.fl-theme-slate .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}
+.fl-theme-slate .ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em 2.2em;}
+.fl-theme-slate .ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px;}
+.fl-theme-slate .ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;}
+.fl-theme-slate .ui-accordion .ui-accordion-content-active{display:block;}
+.fl-theme-slate .ui-datepicker{width:17em;padding:.2em .2em 0;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-prev,.fl-theme-slate .ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-prev-hover,.fl-theme-slate .ui-datepicker .ui-datepicker-next-hover{top:1px;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-prev{left:2px;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-next{right:2px;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-prev-hover{left:1px;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-next-hover{right:1px;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-prev span,.fl-theme-slate .ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-title select{float:left;font-size:1em;margin:1px 0;}
+.fl-theme-slate .ui-datepicker select.ui-datepicker-month-year{width:100%;}
+.fl-theme-slate .ui-datepicker select.ui-datepicker-month,.fl-theme-slate .ui-datepicker select.ui-datepicker-year{width:49%;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-title select.ui-datepicker-year{float:right;}
+.fl-theme-slate .ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em;}
+.fl-theme-slate .ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0;}
+.fl-theme-slate .ui-datepicker td{border:0;padding:1px;}
+.fl-theme-slate .ui-datepicker td span,.fl-theme-slate .ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible;}
+.fl-theme-slate .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left;}
+.fl-theme-slate .ui-datepicker.ui-datepicker-multi{width:auto;}
+.fl-theme-slate .ui-datepicker-multi .ui-datepicker-group{float:left;}
+.fl-theme-slate .ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em;}
+.fl-theme-slate .ui-datepicker-multi-2 .ui-datepicker-group{width:50%;}
+.fl-theme-slate .ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%;}
+.fl-theme-slate .ui-datepicker-multi-4 .ui-datepicker-group{width:25%;}
+.fl-theme-slate .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0;}
+.fl-theme-slate .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0;}
+.fl-theme-slate .ui-datepicker-multi .ui-datepicker-buttonpane{clear:left;}
+.fl-theme-slate .ui-datepicker-row-break{clear:both;width:100%;}
+.fl-theme-slate .ui-datepicker-rtl{direction:rtl;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-group{float:right;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-slate .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px;}
+.fl-theme-slate .ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px;}
+.fl-theme-slate .ui-dialog{position:relative;padding:.2em;width:300px;}
+.fl-theme-slate .ui-dialog .ui-dialog-titlebar{padding:.5em .3em .3em 1em;position:relative;}
+.fl-theme-slate .ui-dialog .ui-dialog-title{float:left;margin:.1em 0 .2em;}
+.fl-theme-slate .ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px;}
+.fl-theme-slate .ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px;}
+.fl-theme-slate .ui-dialog .ui-dialog-titlebar-close:hover,.fl-theme-slate .ui-dialog .ui-dialog-titlebar-close:focus{padding:0;}
+.fl-theme-slate .ui-dialog .ui-dialog-content{border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1;}
+.fl-theme-slate .ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em;}
+.fl-theme-slate .ui-dialog .ui-dialog-buttonpane button{float:right;margin:.5em .4em .5em 0;cursor:pointer;padding:.2em .6em .3em .6em;line-height:1.4em;width:auto;overflow:visible;}
+.fl-theme-slate .ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px;}
+.fl-theme-slate .ui-draggable .ui-dialog-titlebar{cursor:move;}
+.fl-theme-slate .ui-progressbar{height:2em;text-align:left;}
+.fl-theme-slate .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%;}
+.fl-theme-slate .ui-resizable{position:relative;}
+.fl-theme-slate .ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block;}
+.fl-theme-slate .ui-resizable-disabled .ui-resizable-handle,.fl-theme-slate .ui-resizable-autohide .ui-resizable-handle{display:none;}
+.fl-theme-slate .ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0;}
+.fl-theme-slate .ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0;}
+.fl-theme-slate .ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%;}
+.fl-theme-slate .ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%;}
+.fl-theme-slate .ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px;}
+.fl-theme-slate .ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px;}
+.fl-theme-slate .ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px;}
+.fl-theme-slate .ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px;}
+.fl-theme-slate .ui-slider{position:relative;text-align:left;}
+.fl-theme-slate .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;}
+.fl-theme-slate .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;}
+.fl-theme-slate .ui-slider-horizontal{height:.8em;}
+.fl-theme-slate .ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em;}
+.fl-theme-slate .ui-slider-horizontal .ui-slider-range{top:0;height:100%;}
+.fl-theme-slate .ui-slider-horizontal .ui-slider-range-min{left:0;}
+.fl-theme-slate .ui-slider-horizontal .ui-slider-range-max{right:0;}
+.fl-theme-slate .ui-slider-vertical{width:.8em;height:100px;}
+.fl-theme-slate .ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em;}
+.fl-theme-slate .ui-slider-vertical .ui-slider-range{left:0;width:100%;}
+.fl-theme-slate .ui-slider-vertical .ui-slider-range-min{bottom:0;}
+.fl-theme-slate .ui-slider-vertical .ui-slider-range-max{top:0;}
+.fl-theme-slate .ui-tabs{padding:.2em;zoom:1;}
+.fl-theme-slate .ui-tabs .ui-tabs-nav{list-style:none;position:relative;padding:.2em .2em 0;}
+.fl-theme-slate .ui-tabs .ui-tabs-nav li{position:relative;float:left;border-bottom-width:0!important;margin:0 .2em -1px 0;padding:0;}
+.fl-theme-slate .ui-tabs .ui-tabs-nav li a{float:left;text-decoration:none;padding:.5em 1em;}
+.fl-theme-slate .ui-tabs .ui-tabs-nav li.ui-tabs-selected{padding-bottom:1px;border-bottom-width:0;}
+.fl-theme-slate .ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.fl-theme-slate .ui-tabs .ui-tabs-nav li.ui-state-disabled a,.fl-theme-slate .ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text;}
+.fl-theme-slate .ui-tabs .ui-tabs-nav li a,.fl-theme-slate .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer;}
+.fl-theme-slate .ui-tabs .ui-tabs-panel{padding:1em 1.4em;display:block;border-width:0;background:none;}
+.fl-theme-slate .ui-tabs .ui-tabs-hide{display:none!important;}
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui-FLUID-readme.txt b/docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui-FLUID-readme.txt
new file mode 100644 (file)
index 0000000..8caa071
--- /dev/null
@@ -0,0 +1 @@
+The ui.*.js files in this folder were taken from the 1.7 bundle, downloaded Mar. 11, 2009
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui.accordion.js b/docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui.accordion.js
new file mode 100644 (file)
index 0000000..271b612
--- /dev/null
@@ -0,0 +1 @@
+(function($){$.widget("ui.accordion",{_init:function(){var o=this.options,self=this;this.running=0;if(o.collapsible==$.ui.accordion.defaults.collapsible&&o.alwaysOpen!=$.ui.accordion.defaults.alwaysOpen){o.collapsible=!o.alwaysOpen}if(o.navigation){var current=this.element.find("a").filter(o.navigationFilter);if(current.length){if(current.filter(o.header).length){this.active=current}else{this.active=current.parent().parent().prev();current.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){$(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){$(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){$(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){$(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||o.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");$("<span/>").addClass("ui-icon "+o.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected);if($.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(event){return self._keydown(event)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!$.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(o.event){this.headers.bind((o.event)+".accordion",function(event){return self._clickHandler.call(self,event,this)})}},destroy:function(){var o=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var contents=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(o.autoHeight||o.fillHeight){contents.css("height","")}},_setData:function(key,value){if(key=="alwaysOpen"){key="collapsible";value=!value}$.widget.prototype._setData.apply(this,arguments)},_keydown:function(event){var o=this.options,keyCode=$.ui.keyCode;if(o.disabled||event.altKey||event.ctrlKey){return }var length=this.headers.length;var currentIndex=this.headers.index(event.target);var toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:return this._clickHandler({target:event.target},event.target)}if(toFocus){$(event.target).attr("tabIndex","-1");$(toFocus).attr("tabIndex","0");toFocus.focus();return false}return true},resize:function(){var o=this.options,maxHeight;if(o.fillSpace){if($.browser.msie){var defOverflow=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}maxHeight=this.element.parent().height();if($.browser.msie){this.element.parent().css("overflow",defOverflow)}this.headers.each(function(){maxHeight-=$(this).outerHeight()});var maxPadding=0;this.headers.next().each(function(){maxPadding=Math.max(maxPadding,$(this).innerHeight()-$(this).height())}).height(Math.max(0,maxHeight-maxPadding)).css("overflow","auto")}else{if(o.autoHeight){maxHeight=0;this.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).outerHeight())}).height(maxHeight)}}},activate:function(index){var active=this._findActive(index)[0];this._clickHandler({target:active},active)},_findActive:function(selector){return selector?typeof selector=="number"?this.headers.filter(":eq("+selector+")"):this.headers.not(this.headers.not(selector)):selector===false?$([]):this.headers.filter(":eq(0)")},_clickHandler:function(event,target){var o=this.options;if(o.disabled){return false}if(!event.target&&o.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");var toHide=this.active.next(),data={options:o,newHeader:$([]),oldHeader:o.active,newContent:$([]),oldContent:toHide},toShow=(this.active=$([]));this._toggle(toShow,toHide,data);return false}var clicked=$(event.currentTarget||target);var clickedIsActive=clicked[0]==this.active[0];if(this.running||(!o.collapsible&&clickedIsActive)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!clickedIsActive){clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected);clicked.next().addClass("ui-accordion-content-active")}var toShow=clicked.next(),toHide=this.active.next(),data={options:o,newHeader:clickedIsActive&&o.collapsible?$([]):clicked,oldHeader:this.active,newContent:clickedIsActive&&o.collapsible?$([]):toShow.find("> *"),oldContent:toHide.find("> *")},down=this.headers.index(this.active[0])>this.headers.index(clicked[0]);this.active=clickedIsActive?$([]):clicked;this._toggle(toShow,toHide,data,clickedIsActive,down);return false},_toggle:function(toShow,toHide,data,clickedIsActive,down){var o=this.options,self=this;this.toShow=toShow;this.toHide=toHide;this.data=data;var complete=function(){if(!self){return }return self._completed.apply(self,arguments)};this._trigger("changestart",null,this.data);this.running=toHide.size()===0?toShow.size():toHide.size();if(o.animated){var animOptions={};if(o.collapsible&&clickedIsActive){animOptions={toShow:$([]),toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace}}else{animOptions={toShow:toShow,toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace}}if(!o.proxied){o.proxied=o.animated}if(!o.proxiedDuration){o.proxiedDuration=o.duration}o.animated=$.isFunction(o.proxied)?o.proxied(animOptions):o.proxied;o.duration=$.isFunction(o.proxiedDuration)?o.proxiedDuration(animOptions):o.proxiedDuration;var animations=$.ui.accordion.animations,duration=o.duration,easing=o.animated;if(!animations[easing]){animations[easing]=function(options){this.slide(options,{easing:easing,duration:duration||700})}}animations[easing](animOptions)}else{if(o.collapsible&&clickedIsActive){toShow.toggle()}else{toHide.hide();toShow.show()}complete(true)}toHide.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();toShow.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(cancel){var o=this.options;this.running=cancel?0:--this.running;if(this.running){return }if(o.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});$.extend($.ui.accordion,{version:"1.7",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return }if(!options.toShow.size()){options.toHide.animate({height:"hide"},options);return }var overflow=options.toShow.css("overflow"),percentDone,showProps={},hideProps={},fxAttrs=["height","paddingTop","paddingBottom"],originalWidth;var s=options.toShow;originalWidth=s[0].style.width;s.width(parseInt(s.parent().width(),10)-parseInt(s.css("paddingLeft"),10)-parseInt(s.css("paddingRight"),10)-parseInt(s.css("borderLeftWidth"),10)-parseInt(s.css("borderRightWidth"),10));$.each(fxAttrs,function(i,prop){hideProps[prop]="hide";var parts=(""+$.css(options.toShow[0],prop)).match(/^([\d+-.]+)(.*)$/);showProps[prop]={value:parts[1],unit:parts[2]||"px"}});options.toShow.css({height:0,overflow:"hidden"}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{step:function(now,settings){if(settings.prop=="height"){percentDone=(settings.now-settings.start)/(settings.end-settings.start)}options.toShow[0].style[settings.prop]=(percentDone*showProps[settings.prop].value)+showProps[settings.prop].unit},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoHeight){options.toShow.css("height","")}options.toShow.css("width",originalWidth);options.toShow.css({overflow:overflow});options.complete()}})},bounceslide:function(options){this.slide(options,{easing:options.down?"easeOutBounce":"swing",duration:options.down?1000:200})},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700})}}})})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui.core.js b/docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui.core.js
new file mode 100644 (file)
index 0000000..d2f33c8
--- /dev/null
@@ -0,0 +1 @@
+jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]])}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return }for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args)}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(el,a){if($(el).css("overflow")=="hidden"){return false}var scroll=(a&&a=="left")?"scrollLeft":"scrollTop",has=false;if(el[scroll]>0){return true}el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size))},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=="role"?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)))};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""))}):removeAttr.call(this,name))}}$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove")});return _remove.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,"position",1))&&(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!scrollParent.length?$(document):scrollParent}});$.extend($.expr[":"],{data:function(elem,i,match){return !!$.data(elem,match[3])},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,"tabindex");return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"==nodeName||"area"==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)["area"==nodeName?"parents":"closest"](":hidden").length},tabbable:function(element){var tabIndex=$.attr(element,"tabindex");return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(":focusable")}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=="string"?methods.split(/,?\s+/):methods)}var methods=getMethods("getter");if(args.length==1&&typeof args[0]=="string"){methods=methods.concat(getMethods("getterSetter"))}return($.inArray(method,methods)!=-1)}$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=="string"),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=="_"){return this}if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined)}return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options))._init());(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args))})};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+"-"+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind("setData."+name,function(event,key,value){if(event.target==element){return self._setData(key,value)}}).bind("getData."+name,function(event,key){if(event.target==element){return self._getData(key)}}).bind("remove",function(){return self.destroy()})};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter="option"};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key)}options={};options[key]=value}$.each(options,function(key,value){self._setData(key,value)})},_getData:function(key){return this.options[key]},_setData:function(key,value){this.options[key]=value;if(key=="disabled"){this.element[value?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",value)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop]}}this.element.trigger(event,data);return !($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented())}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(event){return self._mouseDown(event)}).bind("click."+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false}});if($.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);($.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return }(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true}}this._mouseMoveDelegate=function(event){return self._mouseMove(event)};this._mouseUpDelegate=function(event){return self._mouseUp(event)};$(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event)}if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault()}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event))}return !this._mouseStarted},_mouseUp:function(event){$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event)}return false},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance)},_mouseDelayMet:function(event){return this.mouseDelayMet},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui.dialog.js b/docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui.dialog.js
new file mode 100644 (file)
index 0000000..c61006e
--- /dev/null
@@ -0,0 +1 @@
+(function($){var setDataSwitch={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},uiDialogClasses="ui-dialog ui-widget ui-widget-content ui-corner-all ";$.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var self=this,options=this.options,title=options.title||this.originalTitle||"&nbsp;",titleId=$.ui.dialog.getTitleId(this.element),uiDialog=(this.uiDialog=$("<div/>")).appendTo(document.body).hide().addClass(uiDialogClasses+options.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:options.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(event){(options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&self.close(event))}).attr({role:"dialog","aria-labelledby":titleId}).mousedown(function(event){self.moveToTop(false,event)}),uiDialogContent=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(uiDialog),uiDialogTitlebar=(this.uiDialogTitlebar=$("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(uiDialog),uiDialogTitlebarClose=$('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){uiDialogTitlebarClose.addClass("ui-state-hover")},function(){uiDialogTitlebarClose.removeClass("ui-state-hover")}).focus(function(){uiDialogTitlebarClose.addClass("ui-state-focus")}).blur(function(){uiDialogTitlebarClose.removeClass("ui-state-focus")}).mousedown(function(ev){ev.stopPropagation()}).click(function(event){self.close(event);return false}).appendTo(uiDialogTitlebar),uiDialogTitlebarCloseText=(this.uiDialogTitlebarCloseText=$("<span/>")).addClass("ui-icon ui-icon-closethick").text(options.closeText).appendTo(uiDialogTitlebarClose),uiDialogTitle=$("<span/>").addClass("ui-dialog-title").attr("id",titleId).html(title).prependTo(uiDialogTitlebar);uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();(options.draggable&&$.fn.draggable&&this._makeDraggable());(options.resizable&&$.fn.resizable&&this._makeResizable());this._createButtons(options.buttons);this._isOpen=false;(options.bgiframe&&$.fn.bgiframe&&uiDialog.bgiframe());(options.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(event){var self=this;if(false===self._trigger("beforeclose",event)){return }(self.overlay&&self.overlay.destroy());self.uiDialog.unbind("keypress.ui-dialog");(self.options.hide?self.uiDialog.hide(self.options.hide,function(){self._trigger("close",event)}):self.uiDialog.hide()&&self._trigger("close",event));$.ui.dialog.overlay.resize();self._isOpen=false},isOpen:function(){return this._isOpen},moveToTop:function(force,event){if((this.options.modal&&!force)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",event)}if(this.options.zIndex>$.ui.dialog.maxZ){$.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",$.ui.dialog.overlay.maxZ=++$.ui.dialog.maxZ));var saveScroll={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++$.ui.dialog.maxZ);this.element.attr(saveScroll);this._trigger("focus",event)},open:function(){if(this._isOpen){return }var options=this.options,uiDialog=this.uiDialog;this.overlay=options.modal?new $.ui.dialog.overlay(this):null;(uiDialog.next().length&&uiDialog.appendTo("body"));this._size();this._position(options.position);uiDialog.show(options.show);this.moveToTop(true);(options.modal&&uiDialog.bind("keypress.ui-dialog",function(event){if(event.keyCode!=$.ui.keyCode.TAB){return }var tabbables=$(":tabbable",this),first=tabbables.filter(":first")[0],last=tabbables.filter(":last")[0];if(event.target==last&&!event.shiftKey){setTimeout(function(){first.focus()},1)}else{if(event.target==first&&event.shiftKey){setTimeout(function(){last.focus()},1)}}}));$([]).add(uiDialog.find(".ui-dialog-content :tabbable:first")).add(uiDialog.find(".ui-dialog-buttonpane :tabbable:first")).add(uiDialog).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(buttons){var self=this,hasButtons=false,uiDialogButtonPane=$("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof buttons=="object"&&buttons!==null&&$.each(buttons,function(){return !(hasButtons=true)}));if(hasButtons){$.each(buttons,function(name,fn){$('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(name).click(function(){fn.apply(self.element[0],arguments)}).hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")}).appendTo(uiDialogButtonPane)});uiDialogButtonPane.appendTo(this.uiDialog)}},_makeDraggable:function(){var self=this,options=this.options,heightBeforeDrag;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){heightBeforeDrag=options.height;$(this).height($(this).height()).addClass("ui-dialog-dragging");(options.dragStart&&options.dragStart.apply(self.element[0],arguments))},drag:function(){(options.drag&&options.drag.apply(self.element[0],arguments))},stop:function(){$(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);(options.dragStop&&options.dragStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize()}})},_makeResizable:function(handles){handles=(handles===undefined?this.options.resizable:handles);var self=this,options=this.options,resizeHandles=typeof handles=="string"?handles:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:options.minHeight,start:function(){$(this).addClass("ui-dialog-resizing");(options.resizeStart&&options.resizeStart.apply(self.element[0],arguments))},resize:function(){(options.resize&&options.resize.apply(self.element[0],arguments))},handles:resizeHandles,stop:function(){$(this).removeClass("ui-dialog-resizing");options.height=$(this).height();options.width=$(this).width();(options.resizeStop&&options.resizeStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(pos){var wnd=$(window),doc=$(document),pTop=doc.scrollTop(),pLeft=doc.scrollLeft(),minTop=pTop;if($.inArray(pos,["center","top","right","bottom","left"])>=0){pos=[pos=="right"||pos=="left"?pos:"center",pos=="top"||pos=="bottom"?pos:"middle"]}if(pos.constructor!=Array){pos=["center","middle"]}if(pos[0].constructor==Number){pLeft+=pos[0]}else{switch(pos[0]){case"left":pLeft+=0;break;case"right":pLeft+=wnd.width()-this.uiDialog.outerWidth();break;default:case"center":pLeft+=(wnd.width()-this.uiDialog.outerWidth())/2}}if(pos[1].constructor==Number){pTop+=pos[1]}else{switch(pos[1]){case"top":pTop+=0;break;case"bottom":pTop+=wnd.height()-this.uiDialog.outerHeight();break;default:case"middle":pTop+=(wnd.height()-this.uiDialog.outerHeight())/2}}pTop=Math.max(pTop,minTop);this.uiDialog.css({top:pTop,left:pLeft})},_setData:function(key,value){(setDataSwitch[key]&&this.uiDialog.data(setDataSwitch[key],value));switch(key){case"buttons":this._createButtons(value);break;case"closeText":this.uiDialogTitlebarCloseText.text(value);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(uiDialogClasses+value);break;case"draggable":(value?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(value);break;case"position":this._position(value);break;case"resizable":var uiDialog=this.uiDialog,isResizable=this.uiDialog.is(":data(resizable)");(isResizable&&!value&&uiDialog.resizable("destroy"));(isResizable&&typeof value=="string"&&uiDialog.resizable("option","handles",value));(isResizable||this._makeResizable(value));break;case"title":$(".ui-dialog-title",this.uiDialogTitlebar).html(value||"&nbsp;");break;case"width":this.uiDialog.width(value);break}$.widget.prototype._setData.apply(this,arguments)},_size:function(){var options=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var nonContentHeight=this.uiDialog.css({height:"auto",width:options.width}).height();this.element.css({minHeight:Math.max(options.minHeight-nonContentHeight,0),height:options.height=="auto"?"auto":Math.max(options.height-nonContentHeight,0)})}});$.extend($.ui.dialog,{version:"1.7",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function($el){return"ui-dialog-title-"+($el.attr("id")||++this.uuid)},overlay:function(dialog){this.$el=$.ui.dialog.overlay.create(dialog)}});$.extend($.ui.dialog.overlay,{instances:[],maxZ:0,events:$.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(event){return event+".dialog-overlay"}).join(" "),create:function(dialog){if(this.instances.length===0){setTimeout(function(){$(document).bind($.ui.dialog.overlay.events,function(event){var dialogZ=$(event.target).parents(".ui-dialog").css("zIndex")||0;return(dialogZ>$.ui.dialog.overlay.maxZ)})},1);$(document).bind("keydown.dialog-overlay",function(event){(dialog.options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&dialog.close(event))});$(window).bind("resize.dialog-overlay",$.ui.dialog.overlay.resize)}var $el=$("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(dialog.options.bgiframe&&$.fn.bgiframe&&$el.bgiframe());this.instances.push($el);return $el},destroy:function($el){this.instances.splice($.inArray(this.instances,$el),1);if(this.instances.length===0){$([document,window]).unbind(".dialog-overlay")}$el.remove()},height:function(){if($.browser.msie&&$.browser.version<7){var scrollHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var offsetHeight=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(scrollHeight<offsetHeight){return $(window).height()+"px"}else{return scrollHeight+"px"}}else{return $(document).height()+"px"}},width:function(){if($.browser.msie&&$.browser.version<7){var scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(scrollWidth<offsetWidth){return $(window).width()+"px"}else{return scrollWidth+"px"}}else{return $(document).width()+"px"}},resize:function(){var $overlays=$([]);$.each($.ui.dialog.overlay.instances,function(){$overlays=$overlays.add(this)});$overlays.css({width:0,height:0}).css({width:$.ui.dialog.overlay.width(),height:$.ui.dialog.overlay.height()})}});$.extend($.ui.dialog.overlay.prototype,{destroy:function(){$.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui.draggable.js b/docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui.draggable.js
new file mode 100644 (file)
index 0000000..9682b2b
--- /dev/null
@@ -0,0 +1 @@
+(function($){$.widget("ui.draggable",$.extend({},$.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(event);if(!this.handle){return false}return true},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this._cacheHelperProportions();if($.ui.ddmanager){$.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt){this._adjustOffsetFromHelper(o.cursorAt)}if(o.containment){this._setContainment()}this._trigger("start",event);this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(event,true);return true},_mouseDrag:function(event,noPropagation){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();this._trigger("drag",event,ui);this.position=ui.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if($.ui.ddmanager){$.ui.ddmanager.drag(this,event)}return false},_mouseStop:function(event){var dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour){dropped=$.ui.ddmanager.drop(this,event)}if(this.dropped){dropped=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){var self=this;$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){self._trigger("stop",event);self._clear()})}else{this._trigger("stop",event);this._clear()}return false},_getHandle:function(event){var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;$(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==event.target){handle=true}});return handle},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event])):(o.helper=="clone"?this.element.clone():this.element);if(!helper.parents("body").length){helper.appendTo((o.appendTo=="parent"?this.element[0].parentNode:o.appendTo))}if(helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position"))){helper.css("position","absolute")}return helper},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined){this.offset.click.left=obj.left+this.margins.left}if(obj.right!=undefined){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left}if(obj.top!=undefined){this.offset.click.top=obj.top+this.margins.top}if(obj.bottom!=undefined){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&$.browser.msie)){po={top:0,left:0}}return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.element.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var o=this.options;if(o.containment=="parent"){o.containment=this.helper[0].parentNode}if(o.containment=="document"||o.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(o.containment)&&o.containment.constructor!=Array){var ce=$(o.containment)[0];if(!ce){return }var co=$(o.containment).offset();var over=($(ce).css("overflow")!="hidden");this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(o.containment.constructor==Array){this.containment=o.containment}}},_convertPositionTo:function(d,pos){if(!pos){pos=this.position}var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))}},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0]){pageX=this.containment[0]+this.offset.click.left}if(event.pageY-this.offset.click.top<this.containment[1]){pageY=this.containment[1]+this.offset.click.top}if(event.pageX-this.offset.click.left>this.containment[2]){pageX=this.containment[2]+this.offset.click.left}if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top}}if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left}}return{top:(pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(type,event,ui){ui=ui||this._uiHash();$.ui.plugin.call(this,type,[event,ui]);if(type=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return $.widget.prototype._trigger.call(this,type,event,ui)},plugins:{},_uiHash:function(event){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));$.extend($.ui.draggable,{version:"1.7",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui){var inst=$(this).data("draggable"),o=inst.options,uiSortable=$.extend({},ui,{item:inst.element});inst.sortables=[];$(o.connectToSortable).each(function(){var sortable=$.data(this,"sortable");if(sortable&&!sortable.options.disabled){inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable._refreshItems();sortable._trigger("activate",event,uiSortable)}})},stop:function(event,ui){var inst=$(this).data("draggable"),uiSortable=$.extend({},ui,{item:inst.element});$.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(event);this.instance.options.helper=this.instance.options._helper;if(inst.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",event,uiSortable)}})},drag:function(event,ui){var inst=$(this).data("draggable"),self=this;var checkPos=function(o){var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var helperTop=this.positionAbs.top,helperLeft=this.positionAbs.left;var itemHeight=o.height,itemWidth=o.width;var itemTop=o.top,itemLeft=o.left;return $.ui.isOver(helperTop+dyClick,helperLeft+dxClick,itemTop,itemLeft,itemHeight,itemWidth)};$.each(inst.sortables,function(i){this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click=inst.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=$(self).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return ui.helper[0]};event.target=this.instance.currentItem[0];this.instance._mouseCapture(event,true);this.instance._mouseStart(event,true,true);this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst._trigger("toSortable",event);inst.dropped=this.instance.element;inst.currentItem=inst.element;this.instance.fromOutside=inst}if(this.instance.currentItem){this.instance._mouseDrag(event)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",event,this.instance._uiHash(this.instance));this.instance._mouseStop(event,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}inst._trigger("fromSortable",event);inst.dropped=false}}})}});$.ui.plugin.add("draggable","cursor",{start:function(event,ui){var t=$("body"),o=$(this).data("draggable").options;if(t.css("cursor")){o._cursor=t.css("cursor")}t.css("cursor",o.cursor)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._cursor){$("body").css("cursor",o._cursor)}}});$.ui.plugin.add("draggable","iframeFix",{start:function(event,ui){var o=$(this).data("draggable").options;$(o.iframeFix===true?"iframe":o.iframeFix).each(function(){$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body")})},stop:function(event,ui){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});$.ui.plugin.add("draggable","opacity",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("opacity")){o._opacity=t.css("opacity")}t.css("opacity",o.opacity)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._opacity){$(ui.helper).css("opacity",o._opacity)}}});$.ui.plugin.add("draggable","scroll",{start:function(event,ui){var i=$(this).data("draggable");if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){i.overflowOffset=i.scrollParent.offset()}},drag:function(event,ui){var i=$(this).data("draggable"),o=i.options,scrolled=false;if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!="HTML"){if(!o.axis||o.axis!="x"){if((i.overflowOffset.top+i.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop+o.scrollSpeed}else{if(event.pageY-i.overflowOffset.top<o.scrollSensitivity){i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop-o.scrollSpeed}}}if(!o.axis||o.axis!="y"){if((i.overflowOffset.left+i.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft+o.scrollSpeed}else{if(event.pageX-i.overflowOffset.left<o.scrollSensitivity){i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft-o.scrollSpeed}}}}else{if(!o.axis||o.axis!="x"){if(event.pageY-$(document).scrollTop()<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed)}else{if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity){scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed)}}}if(!o.axis||o.axis!="y"){if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed)}else{if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity){scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed)}}}}if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(i,event)}}});$.ui.plugin.add("draggable","snap",{start:function(event,ui){var i=$(this).data("draggable"),o=i.options;i.snapElements=[];$(o.snap.constructor!=String?(o.snap.items||":data(draggable)"):o.snap).each(function(){var $t=$(this);var $o=$t.offset();if(this!=i.element[0]){i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left})}})},drag:function(event,ui){var inst=$(this).data("draggable"),o=inst.options;var d=o.snapTolerance;var x1=ui.offset.left,x2=x1+inst.helperProportions.width,y1=ui.offset.top,y2=y1+inst.helperProportions.height;for(var i=inst.snapElements.length-1;i>=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d)||(l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d)||(l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d)||(l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d))){if(inst.snapElements[i].snapping){(inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})))}inst.snapElements[i].snapping=false;continue}if(o.snapMode!="inner"){var ts=Math.abs(t-y2)<=d;var bs=Math.abs(b-y1)<=d;var ls=Math.abs(l-x2)<=d;var rs=Math.abs(r-x1)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top-inst.margins.top}if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top-inst.margins.top}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left-inst.margins.left}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r}).left-inst.margins.left}}var first=(ts||bs||ls||rs);if(o.snapMode!="outer"){var ts=Math.abs(t-y1)<=d;var bs=Math.abs(b-y2)<=d;var ls=Math.abs(l-x1)<=d;var rs=Math.abs(r-x2)<=d;if(ts){ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top-inst.margins.top}if(bs){ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top-inst.margins.top}if(ls){ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left-inst.margins.left}if(rs){ui.position.left=inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left-inst.margins.left}}if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first)){(inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})))}inst.snapElements[i].snapping=(ts||bs||ls||rs||first)}}});$.ui.plugin.add("draggable","stack",{start:function(event,ui){var o=$(this).data("draggable").options;var group=$.makeArray($(o.stack.group)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||o.stack.min)-(parseInt($(b).css("zIndex"),10)||o.stack.min)});$(group).each(function(i){this.style.zIndex=o.stack.min+i});this[0].style.zIndex=o.stack.min+group.length}});$.ui.plugin.add("draggable","zIndex",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("zIndex")){o._zIndex=t.css("zIndex")}t.css("zIndex",o.zIndex)},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._zIndex){$(ui.helper).css("zIndex",o._zIndex)}}})})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui.slider.js b/docs/include/jscripts/infusion_old/lib/jquery/ui/js/ui.slider.js
new file mode 100644 (file)
index 0000000..10129eb
--- /dev/null
@@ -0,0 +1 @@
+(function($){$.widget("ui.slider",$.extend({},$.ui.mouse,{_init:function(){var self=this,o=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=$([]);if(o.range){if(o.range===true){this.range=$("<div></div>");if(!o.values){o.values=[this._valueMin(),this._valueMin()]}if(o.values.length&&o.values.length!=2){o.values=[o.values[0],o.values[0]]}}else{this.range=$("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(o.range=="min"||o.range=="max"){this.range.addClass("ui-slider-range-"+o.range)}this.range.addClass("ui-widget-header")}if($(".ui-slider-handle",this.element).length==0){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(o.values&&o.values.length){while($(".ui-slider-handle",this.element).length<o.values.length){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=$(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(event){event.preventDefault()}).hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(".ui-slider .ui-state-focus").removeClass("ui-state-focus");$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")});this.handles.each(function(i){$(this).data("index.ui-slider-handle",i)});this.handles.keydown(function(event){var ret=true;var index=$(this).data("index.ui-slider-handle");if(self.options.disabled){return }switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:ret=false;if(!self._keySliding){self._keySliding=true;$(this).addClass("ui-state-active");self._start(event,index)}break}var curVal,newVal,step=self._step();if(self.options.values&&self.options.values.length){curVal=newVal=self.values(index)}else{curVal=newVal=self.value()}switch(event.keyCode){case $.ui.keyCode.HOME:newVal=self._valueMin();break;case $.ui.keyCode.END:newVal=self._valueMax();break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal==self._valueMax()){return }newVal=curVal+step;break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal==self._valueMin()){return }newVal=curVal-step;break}self._slide(event,index,newVal);return ret}).keyup(function(event){var index=$(this).data("index.ui-slider-handle");if(self._keySliding){self._stop(event,index);self._change(event,index);self._keySliding=false;$(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(o.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);var distance=this._valueMax()+1,closestHandle;var self=this,index;this.handles.each(function(i){var thisDistance=Math.abs(normValue-self.values(i));if(distance>thisDistance){distance=thisDistance;closestHandle=$(this);index=i}});if(o.range==true&&this.values(1)==o.min){closestHandle=$(this.handles[++index])}this._start(event,index);self._handleIndex=index;closestHandle.addClass("ui-state-active").focus();var offset=closestHandle.offset();var mouseOverHandle=!$(event.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top-(closestHandle.height()/2)-(parseInt(closestHandle.css("borderTopWidth"),10)||0)-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+(parseInt(closestHandle.css("marginTop"),10)||0)};normValue=this._normValueFromMouse(position);this._slide(event,index,normValue);return true},_mouseStart:function(event){return true},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false},_mouseStop:function(event){this.handles.removeClass("ui-state-active");this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(position){var pixelTotal,pixelMouse;if("horizontal"==this.orientation){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1){percentMouse=1}if(percentMouse<0){percentMouse=0}if("vertical"==this.orientation){percentMouse=1-percentMouse}var valueTotal=this._valueMax()-this._valueMin(),valueMouse=percentMouse*valueTotal,valueMouseModStep=valueMouse%this.options.step,normValue=this._valueMin()+valueMouse-valueMouseModStep;if(valueMouseModStep>(this.options.step/2)){normValue+=this.options.step}return parseFloat(normValue.toFixed(5))},_start:function(event,index){this._trigger("start",event,this._uiHash(index))},_slide:function(event,index,newVal){var handle=this.handles[index];if(this.options.values&&this.options.values.length){var otherVal=this.values(index?0:1);if((index==0&&newVal>=otherVal)||(index==1&&newVal<=otherVal)){newVal=otherVal}if(newVal!=this.values(index)){var newValues=this.values();newValues[index]=newVal;var allowed=this._trigger("slide",event,this._uiHash(index,newVal,newValues));var otherVal=this.values(index?0:1);if(allowed!==false){this.values(index,newVal,(event.type=="mousedown"&&this.options.animate),true)}}}else{if(newVal!=this.value()){var allowed=this._trigger("slide",event,this._uiHash(index,newVal));if(allowed!==false){this._setData("value",newVal,(event.type=="mousedown"&&this.options.animate))}}}},_stop:function(event,index){this._trigger("stop",event,this._uiHash(index))},_change:function(event,index){this._trigger("change",event,this._uiHash(index))},value:function(newValue){if(arguments.length){this._setData("value",newValue);this._change(null,0)}return this._value()},values:function(index,newValue,animated,noPropagation){if(arguments.length>1){this.options.values[index]=newValue;this._refreshValue(animated);if(!noPropagation){this._change(null,index)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(index)}else{return this.value()}}else{return this._values()}},_setData:function(key,value,animated){$.widget.prototype._setData.apply(this,arguments);switch(key){case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(animated);break;case"value":this._refreshValue(animated);break}},_step:function(){var step=this.options.step;return step},_value:function(){var val=this.options.value;if(val<this._valueMin()){val=this._valueMin()}if(val>this._valueMax()){val=this._valueMax()}return val},_values:function(index){if(arguments.length){var val=this.options.values[index];if(val<this._valueMin()){val=this._valueMin()}if(val>this._valueMax()){val=this._valueMax()}return val}else{return this.options.values}},_valueMin:function(){var valueMin=this.options.min;return valueMin},_valueMax:function(){var valueMax=this.options.max;return valueMax},_refreshValue:function(animate){var oRange=this.options.range,o=this.options,self=this;if(this.options.values&&this.options.values.length){var vp0,vp1;this.handles.each(function(i,j){var valPercent=(self.values(i)-self._valueMin())/(self._valueMax()-self._valueMin())*100;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);if(self.options.range===true){if(self.orientation=="horizontal"){(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({width:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}else{(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({bottom:(valPercent)+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({height:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}}lastValPercent=valPercent})}else{var value=this.value(),valueMin=this._valueMin(),valueMax=this._valueMax(),valPercent=valueMax!=valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);(oRange=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="horizontal")&&this.range[animate?"animate":"css"]({width:(100-valPercent)+"%"},{queue:false,duration:o.animate});(oRange=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="vertical")&&this.range[animate?"animate":"css"]({height:(100-valPercent)+"%"},{queue:false,duration:o.animate})}},_uiHash:function(index,value,values){var multiple=this.options.values&&this.options.values.length;return{handle:this.handles[index],value:value||(multiple?this.values(index):this.value()),values:values||(multiple&&this.values())}}}));$.extend($.ui.slider,{getter:"value values",version:"1.7",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/json/js/json2.js b/docs/include/jscripts/infusion_old/lib/json/js/json2.js
new file mode 100644 (file)
index 0000000..4e7f7bd
--- /dev/null
@@ -0,0 +1 @@
+if(!this.JSON){JSON=function(){function f(n){return n<10?"0"+n:n}Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function stringify(value,whitelist){var a,i,k,l,r=/["\\\x00-\x1f\x7f-\x9f]/g,v;switch(typeof value){case"string":return r.test(value)?'"'+value.replace(r,function(a){var c=m[a];if(c){return c}c=a.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"':'"'+value+'"';case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}if(typeof value.toJSON==="function"){return stringify(value.toJSON())}a=[];if(typeof value.length==="number"&&!(value.propertyIsEnumerable("length"))){l=value.length;for(i=0;i<l;i+=1){a.push(stringify(value[i],whitelist)||"null")}return"["+a.join(",")+"]"}if(whitelist){l=whitelist.length;for(i=0;i<l;i+=1){k=whitelist[i];if(typeof k==="string"){v=stringify(value[k],whitelist);if(v){a.push(stringify(k)+":"+v)}}}}else{for(k in value){if(typeof k==="string"){v=stringify(value[k],whitelist);if(v){a.push(stringify(k)+":"+v)}}}}return"{"+a.join(",")+"}"}}return{stringify:stringify,parse:function(text,filter){var j;function walk(k,v){var i,n;if(v&&typeof v==="object"){for(i in v){if(Object.prototype.hasOwnProperty.apply(v,[i])){n=walk(i,v[i]);if(n!==undefined){v[i]=n}}}}return filter(k,v)}if(/^[\],:{}\s]*$/.test(text.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof filter==="function"?walk("",j):j}throw new SyntaxError("parseJSON")}}}()};
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/swfobject/js/swfobject.js b/docs/include/jscripts/infusion_old/lib/swfobject/js/swfobject.js
new file mode 100644 (file)
index 0000000..c5a8164
--- /dev/null
@@ -0,0 +1,14 @@
+/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
+       Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
+       This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],objIdArr=[],listenersArr=[],script,timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7")}catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always"}catch(e){if(playerVersion[0]==6){fp6Crash=true}}if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX)}catch(e){}}}if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)]}}catch(e){}}}}var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u);
+/*@cc_on
+                       ie = true;
+                       @if (@_win32)
+                               windows = true;
+                       @elif (@_mac)
+                               mac = true;
+                       @end
+               @*/
+return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac}}();var onDomLoad=function(){if(!ua.w3cdom){return }addDomLoadEvent(main);if(ua.ie&&ua.win){try{doc.write("<script id=__ie_ondomload defer=true src=//:><\/script>");script=getElementById("__ie_ondomload");if(script){addListener(script,"onreadystatechange",checkReadyState)}}catch(e){}}if(ua.webkit&&typeof doc.readyState!=UNDEF){timer=setInterval(function(){if(/loaded|complete/.test(doc.readyState)){callDomLoadFunctions()}},10)}if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null)}addLoadEvent(callDomLoadFunctions)}();function checkReadyState(){if(script.readyState=="complete"){script.parentNode.removeChild(script);callDomLoadFunctions()}}function callDomLoadFunctions(){if(isDomLoaded){return }if(ua.ie&&ua.win){var s=createElement("span");try{var t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t)}catch(e){return }}isDomLoaded=true;if(timer){clearInterval(timer);timer=null}var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]()}}function addDomLoadEvent(fn){if(isDomLoaded){fn()}else{domLoadFnArr[domLoadFnArr.length]=fn}}function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false)}else{if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false)}else{if(typeof win.attachEvent!=UNDEF){addListener(win,"onload",fn)}else{if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn()}}else{win.onload=fn}}}}}function main(){var rl=regObjArr.length;for(var i=0;i<rl;i++){var id=regObjArr[i].id;if(ua.pv[0]>0){var obj=getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312){fixParams(obj)}setVisibility(id,true)}else{if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i])}else{displayAltContent(obj)}}}}else{setVisibility(id,true)}}}function fixParams(obj){var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i<al;i++){if(a[i].nodeName=="DATA"){e.setAttribute("src",a[i].nodeValue)}else{e.setAttribute(a[i].nodeName,a[i].nodeValue)}}}var c=nestedObj.childNodes;if(c){var cl=c.length;for(var j=0;j<cl;j++){if(c[j].nodeType==1&&c[j].nodeName=="PARAM"){e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"))}}}obj.parentNode.replaceChild(e,obj)}}function showExpressInstall(regObj){isExpressInstallActive=true;var obj=getElementById(regObj.id);if(obj){if(regObj.altContentId){var ac=getElementById(regObj.altContentId);if(ac){storedAltContent=ac;storedAltContentId=regObj.altContentId}}else{storedAltContent=abstractAltContent(obj)}if(!(/%$/.test(regObj.width))&&parseInt(regObj.width,10)<310){regObj.width="310"}if(!(/%$/.test(regObj.height))&&parseInt(regObj.height,10)<137){regObj.height="137"}doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",dt=doc.title,fv="MMredirectURL="+win.location+"&MMplayerType="+pt+"&MMdoctitle="+dt,replaceId=regObj.id;if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceId+="SWFObjectNew";newObj.setAttribute("id",replaceId);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addListener(win,"onload",fn)}createSWF({data:regObj.expressInstall,id:EXPRESS_INSTALL_ID,width:regObj.width,height:regObj.height},{flashvars:fv},replaceId)}}function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addListener(win,"onload",fn)}else{obj.parentNode.replaceChild(abstractAltContent(obj),obj)}}function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML}else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName=="PARAM")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true))}}}}}return ac}function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(el){if(typeof attObj.id==UNDEF){attObj.id=id}if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){parObj.movie=attObj[i]}else{if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"'}else{if(i.toLowerCase()!="classid"){att+=" "+i+'="'+attObj[i]+'"'}}}}}var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />'}}el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+">"+par+"</object>";objIdArr[objIdArr.length]=attObj.id;r=getElementById(attObj.id)}else{if(ua.webkit&&ua.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if(attObj[k]!=Object.prototype[k]){if(k.toLowerCase()=="data"){e.setAttribute("src",attObj[k])}else{if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj[k])}else{if(k.toLowerCase()!="classid"){e.setAttribute(k,attObj[k])}}}}}for(var l in parObj){if(parObj[l]!=Object.prototype[l]){if(l.toLowerCase()!="movie"){e.setAttribute(l,parObj[l])}}}el.parentNode.replaceChild(e,el);r=e}else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m])}else{if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj[m])}}}}for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,parObj[n])}}el.parentNode.replaceChild(o,el);r=o}}}return r}function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p)}function removeSWF(id){var obj=getElementById(id);if(obj&&(obj.nodeName=="OBJECT"||obj.nodeName=="EMBED")){if(ua.ie&&ua.win){if(obj.readyState==4){removeObjectInIE(id)}else{win.attachEvent("onload",function(){removeObjectInIE(id)})}}else{obj.parentNode.removeChild(obj)}}}function removeObjectInIE(id){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null}}obj.parentNode.removeChild(obj)}}function getElementById(id){var el=null;try{el=doc.getElementById(id)}catch(e){}return el}function createElement(el){return doc.createElement(el)}function addListener(target,eventType,fn){target.attachEvent(eventType,fn);listenersArr[listenersArr.length]=[target,eventType,fn]}function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false}function createCSS(sel,decl){if(ua.ie&&ua.mac){return }var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.createTextNode(sel+" {"+decl+"}"))}h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl)}}}function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded&&getElementById(id)){getElementById(id).style.visibility=v}else{createCSS("#"+id,"visibility:"+v)}}function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBadChars=regex.exec(s)!=null;return hasBadChars?encodeURIComponent(s):s}var cleanup=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var ll=listenersArr.length;for(var i=0;i<ll;i++){listenersArr[i][0].detachEvent(listenersArr[i][1],listenersArr[i][2])}var il=objIdArr.length;for(var j=0;j<il;j++){removeSWF(objIdArr[j])}for(var k in ua){ua[k]=null}ua=null;for(var l in swfobject){swfobject[l]=null}swfobject=null})}}();return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr){if(!ua.w3cdom||!objectIdStr||!swfVersionStr){return }var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr?xiSwfUrlStr:false;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false)},getObjectById:function(objectIdStr){var r=null;if(ua.w3cdom){var o=getElementById(objectIdStr);if(o){var n=o.getElementsByTagName(OBJECT)[0];if(!n||(n&&typeof o.SetVariable!=UNDEF)){r=o}else{if(typeof n.SetVariable!=UNDEF){r=n}}}}return r},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj){if(!ua.w3cdom||!swfUrlStr||!replaceElemIdStr||!widthStr||!heightStr||!swfVersionStr){return }widthStr+="";heightStr+="";if(hasPlayerVersion(swfVersionStr)){setVisibility(replaceElemIdStr,false);var att={};if(attObj&&typeof attObj===OBJECT){for(var i in attObj){if(attObj[i]!=Object.prototype[i]){att[i]=attObj[i]}}}att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par={};if(parObj&&typeof parObj===OBJECT){for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par[j]=parObj[j]}}}if(flashvarsObj&&typeof flashvarsObj===OBJECT){for(var k in flashvarsObj){if(flashvarsObj[k]!=Object.prototype[k]){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+k+"="+flashvarsObj[k]}else{par.flashvars=k+"="+flashvarsObj[k]}}}}addDomLoadEvent(function(){createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true)}})}else{if(xiSwfUrlStr&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){isExpressInstallActive=true;setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){var regObj={};regObj.id=regObj.altContentId=replaceElemIdStr;regObj.width=widthStr;regObj.height=heightStr;regObj.expressInstall=xiSwfUrlStr;showExpressInstall(regObj)})}}},getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]}},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3cdom){return createSWF(attObj,parObj,replaceElemIdStr)}else{return undefined}},removeSWF:function(objElemIdStr){if(ua.w3cdom){removeSWF(objElemIdStr)}},createCSS:function(sel,decl){if(ua.w3cdom){createCSS(sel,decl)}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(param==null){return urlEncodeIfNecessary(q)}if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(isExpressInstallActive&&storedAltContent){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block"}}storedAltContent=null;storedAltContentId=null;isExpressInstallActive=false}}}}}();
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/lib/swfupload/flash/swfupload.swf b/docs/include/jscripts/infusion_old/lib/swfupload/flash/swfupload.swf
new file mode 100644 (file)
index 0000000..e3f7670
Binary files /dev/null and b/docs/include/jscripts/infusion_old/lib/swfupload/flash/swfupload.swf differ
diff --git a/docs/include/jscripts/infusion_old/lib/swfupload/js/swfupload.js b/docs/include/jscripts/infusion_old/lib/swfupload/js/swfupload.js
new file mode 100644 (file)
index 0000000..6a76188
--- /dev/null
@@ -0,0 +1 @@
+var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(settings){this.initSWFUpload(settings)}}SWFUpload.prototype.initSWFUpload=function(settings){try{this.customSettings={};this.settings=settings;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(ex){delete SWFUpload.instances[this.movieName];throw ex}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 2009-03-25";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.completeURL=function(url){if(typeof (url)!=="string"||url.match(/^https?:\/\//i)||url.match(/^\//)){return url}var currentURL=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");var indexSlash=window.location.pathname.lastIndexOf("/");if(indexSlash<=0){path="/"}else{path=window.location.pathname.substr(0,indexSlash)+"/"}return path+url};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(settingName,defaultValue){this.settings[settingName]=(this.settings[settingName]==undefined)?defaultValue:this.settings[settingName]};this.ensureDefault("upload_url","");this.ensureDefault("preserve_relative_urls",false);this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",false);this.ensureDefault("requeue_on_error",false);this.ensureDefault("http_success",[]);this.ensureDefault("assume_success_timeout",0);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",true);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",false);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_placeholder",null);this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+new Date().getTime()}if(!this.settings.preserve_relative_urls){this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url)}delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){var targetElement,tempParent;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added"}targetElement=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;if(targetElement==undefined){throw"Could not find the placeholder element: "+this.settings.button_placeholder_id}tempParent=document.createElement("div");tempParent.innerHTML=this.getFlashHTML();targetElement.parentNode.replaceChild(tempParent.firstChild,targetElement);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement()}};SWFUpload.prototype.getFlashHTML=function(){return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.settings.flash_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload">','<param name="wmode" value="',this.settings.button_window_mode,'" />','<param name="movie" value="',this.settings.flash_url,'" />','<param name="quality" value="high" />','<param name="menu" value="false" />','<param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+this.getFlashVars()+'" />',"</object>"].join("")};SWFUpload.prototype.getFlashVars=function(){var paramString=this.buildParamString();var httpSuccessString=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;useQueryString=",encodeURIComponent(this.settings.use_query_string),"&amp;requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&amp;httpSuccess=",encodeURIComponent(httpSuccessString),"&amp;assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&amp;params=",encodeURIComponent(paramString),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),"&amp;fileTypes=",encodeURIComponent(this.settings.file_types),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&amp;fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonText=",encodeURIComponent(this.settings.button_text),"&amp;buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&amp;buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&amp;buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&amp;buttonAction=",encodeURIComponent(this.settings.button_action),"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&amp;buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("")};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName)}if(this.movieElement===null){throw"Could not find Flash element"}return this.movieElement};SWFUpload.prototype.buildParamString=function(){var postParams=this.settings.post_params;var paramStringPairs=[];if(typeof (postParams)==="object"){for(var name in postParams){if(postParams.hasOwnProperty(name)){paramStringPairs.push(encodeURIComponent(name.toString())+"="+encodeURIComponent(postParams[name].toString()))}}}return paramStringPairs.join("&amp;")};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var movieElement=null;movieElement=this.getMovieElement();if(movieElement&&typeof (movieElement.CallFunction)==="unknown"){for(var i in movieElement){try{if(typeof (movieElement[i])==="function"){movieElement[i]=null}}catch(ex1){}}try{movieElement.parentNode.removeChild(movieElement)}catch(ex){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true}catch(ex2){return false}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url:               ",this.settings.upload_url,"\n","\t","flash_url:                ",this.settings.flash_url,"\n","\t","use_query_string:         ",this.settings.use_query_string.toString(),"\n","\t","requeue_on_error:         ",this.settings.requeue_on_error.toString(),"\n","\t","http_success:             ",this.settings.http_success.join(", "),"\n","\t","assume_success_timeout:   ",this.settings.assume_success_timeout,"\n","\t","file_post_name:           ",this.settings.file_post_name,"\n","\t","post_params:              ",this.settings.post_params.toString(),"\n","\t","file_types:               ",this.settings.file_types,"\n","\t","file_types_description:   ",this.settings.file_types_description,"\n","\t","file_size_limit:          ",this.settings.file_size_limit,"\n","\t","file_upload_limit:        ",this.settings.file_upload_limit,"\n","\t","file_queue_limit:         ",this.settings.file_queue_limit,"\n","\t","debug:                    ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching:      ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id:    ",this.settings.button_placeholder_id.toString(),"\n","\t","button_placeholder:       ",(this.settings.button_placeholder?"Set":"Not Set"),"\n","\t","button_image_url:         ",this.settings.button_image_url.toString(),"\n","\t","button_width:             ",this.settings.button_width.toString(),"\n","\t","button_height:            ",this.settings.button_height.toString(),"\n","\t","button_text:              ",this.settings.button_text.toString(),"\n","\t","button_text_style:        ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding:  ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action:            ",this.settings.button_action.toString(),"\n","\t","button_disabled:          ",this.settings.button_disabled.toString(),"\n","\t","custom_settings:          ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned:  ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n","\t","file_queued_handler assigned:       ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","file_queue_error_handler assigned:  ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n","\t","upload_start_handler assigned:      ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned:   ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned:      ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned:    ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned:   ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","debug_handler assigned:             ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""))};SWFUpload.prototype.addSetting=function(name,value,default_value){if(value==undefined){return(this.settings[name]=default_value)}else{return(this.settings[name]=value)}};SWFUpload.prototype.getSetting=function(name){if(this.settings[name]!=undefined){return this.settings[name]}return""};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction('<invoke name="'+functionName+'" returntype="javascript">'+__flash__argumentsToXML(argumentArray,0)+"</invoke>");returnValue=eval(returnString)}catch(ex){throw"Call to "+functionName+" failed"}if(returnValue!=undefined&&typeof returnValue.post==="object"){returnValue=this.unescapeFilePostParams(returnValue)}return returnValue};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")};SWFUpload.prototype.startUpload=function(fileID){this.callFlash("StartUpload",[fileID])};SWFUpload.prototype.cancelUpload=function(fileID,triggerErrorEvent){if(triggerErrorEvent!==false){triggerErrorEvent=true}this.callFlash("CancelUpload",[fileID,triggerErrorEvent])};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")};SWFUpload.prototype.setStats=function(statsObject){this.callFlash("SetStats",[statsObject])};SWFUpload.prototype.getFile=function(fileID){if(typeof (fileID)==="number"){return this.callFlash("GetFileByIndex",[fileID])}else{return this.callFlash("GetFile",[fileID])}};SWFUpload.prototype.addFileParam=function(fileID,name,value){return this.callFlash("AddFileParam",[fileID,name,value])};SWFUpload.prototype.removeFileParam=function(fileID,name){this.callFlash("RemoveFileParam",[fileID,name])};SWFUpload.prototype.setUploadURL=function(url){this.settings.upload_url=url.toString();this.callFlash("SetUploadURL",[url])};SWFUpload.prototype.setPostParams=function(paramsObject){this.settings.post_params=paramsObject;this.callFlash("SetPostParams",[paramsObject])};SWFUpload.prototype.addPostParam=function(name,value){this.settings.post_params[name]=value;this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(name){delete this.settings.post_params[name];this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(types,description){this.settings.file_types=types;this.settings.file_types_description=description;this.callFlash("SetFileTypes",[types,description])};SWFUpload.prototype.setFileSizeLimit=function(fileSizeLimit){this.settings.file_size_limit=fileSizeLimit;this.callFlash("SetFileSizeLimit",[fileSizeLimit])};SWFUpload.prototype.setFileUploadLimit=function(fileUploadLimit){this.settings.file_upload_limit=fileUploadLimit;this.callFlash("SetFileUploadLimit",[fileUploadLimit])};SWFUpload.prototype.setFileQueueLimit=function(fileQueueLimit){this.settings.file_queue_limit=fileQueueLimit;this.callFlash("SetFileQueueLimit",[fileQueueLimit])};SWFUpload.prototype.setFilePostName=function(filePostName){this.settings.file_post_name=filePostName;this.callFlash("SetFilePostName",[filePostName])};SWFUpload.prototype.setUseQueryString=function(useQueryString){this.settings.use_query_string=useQueryString;this.callFlash("SetUseQueryString",[useQueryString])};SWFUpload.prototype.setRequeueOnError=function(requeueOnError){this.settings.requeue_on_error=requeueOnError;this.callFlash("SetRequeueOnError",[requeueOnError])};SWFUpload.prototype.setHTTPSuccess=function(http_status_codes){if(typeof http_status_codes==="string"){http_status_codes=http_status_codes.replace(" ","").split(",")}this.settings.http_success=http_status_codes;this.callFlash("SetHTTPSuccess",[http_status_codes])};SWFUpload.prototype.setAssumeSuccessTimeout=function(timeout_seconds){this.settings.assume_success_timeout=timeout_seconds;this.callFlash("SetAssumeSuccessTimeout",[timeout_seconds])};SWFUpload.prototype.setDebugEnabled=function(debugEnabled){this.settings.debug_enabled=debugEnabled;this.callFlash("SetDebugEnabled",[debugEnabled])};SWFUpload.prototype.setButtonImageURL=function(buttonImageURL){if(buttonImageURL==undefined){buttonImageURL=""}this.settings.button_image_url=buttonImageURL;this.callFlash("SetButtonImageURL",[buttonImageURL])};SWFUpload.prototype.setButtonDimensions=function(width,height){this.settings.button_width=width;this.settings.button_height=height;var movie=this.getMovieElement();if(movie!=undefined){movie.style.width=width+"px";movie.style.height=height+"px"}this.callFlash("SetButtonDimensions",[width,height])};SWFUpload.prototype.setButtonText=function(html){this.settings.button_text=html;this.callFlash("SetButtonText",[html])};SWFUpload.prototype.setButtonTextPadding=function(left,top){this.settings.button_text_top_padding=top;this.settings.button_text_left_padding=left;this.callFlash("SetButtonTextPadding",[left,top])};SWFUpload.prototype.setButtonTextStyle=function(css){this.settings.button_text_style=css;this.callFlash("SetButtonTextStyle",[css])};SWFUpload.prototype.setButtonDisabled=function(isDisabled){this.settings.button_disabled=isDisabled;this.callFlash("SetButtonDisabled",[isDisabled])};SWFUpload.prototype.setButtonAction=function(buttonAction){this.settings.button_action=buttonAction;this.callFlash("SetButtonAction",[buttonAction])};SWFUpload.prototype.setButtonCursor=function(cursor){this.settings.button_cursor=cursor;this.callFlash("SetButtonCursor",[cursor])};SWFUpload.prototype.queueEvent=function(handlerName,argumentArray){if(argumentArray==undefined){argumentArray=[]}else{if(!(argumentArray instanceof Array)){argumentArray=[argumentArray]}}var self=this;if(typeof this.settings[handlerName]==="function"){this.eventQueue.push(function(){this.settings[handlerName].apply(this,argumentArray)});setTimeout(function(){self.executeNextEvent()},0)}else{if(this.settings[handlerName]!==null){throw"Event handler "+handlerName+" is unknown or is not a function"}}};SWFUpload.prototype.executeNextEvent=function(){var f=this.eventQueue?this.eventQueue.shift():null;if(typeof (f)==="function"){f.apply(this)}};SWFUpload.prototype.unescapeFilePostParams=function(file){var reg=/[$]([0-9a-f]{4})/i;var unescapedPost={};var uk;if(file!=undefined){for(var k in file.post){if(file.post.hasOwnProperty(k)){uk=k;var match;while((match=reg.exec(uk))!==null){uk=uk.replace(match[0],String.fromCharCode(parseInt("0x"+match[1],16)))}unescapedPost[uk]=file.post[k]}}file.post=unescapedPost}return file};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface")}catch(ex){return false}};SWFUpload.prototype.flashReady=function(){var movieElement=this.getMovieElement();if(!movieElement){this.debug("Flash called back ready but the flash movie can't be found.");return }this.cleanUp(movieElement);this.queueEvent("swfupload_loaded_handler")};SWFUpload.prototype.cleanUp=function(movieElement){try{if(this.movieElement&&typeof (movieElement.CallFunction)==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var key in movieElement){try{if(typeof (movieElement[key])==="function"){movieElement[key]=null}}catch(ex){}}}}catch(ex1){}window.__flash__removeCallback=function(instance,name){try{if(instance){instance[name]=null}}catch(flashEx){}}};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")};SWFUpload.prototype.fileQueued=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("file_queued_handler",file)};SWFUpload.prototype.fileQueueError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("file_queue_error_handler",[file,errorCode,message])};SWFUpload.prototype.fileDialogComplete=function(numFilesSelected,numFilesQueued,numFilesInQueue){this.queueEvent("file_dialog_complete_handler",[numFilesSelected,numFilesQueued,numFilesInQueue])};SWFUpload.prototype.uploadStart=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("return_upload_start_handler",file)};SWFUpload.prototype.returnUploadStart=function(file){var returnValue;if(typeof this.settings.upload_start_handler==="function"){file=this.unescapeFilePostParams(file);returnValue=this.settings.upload_start_handler.call(this,file)}else{if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function"}}if(returnValue===undefined){returnValue=true}returnValue=!!returnValue;this.callFlash("ReturnUploadStart",[returnValue])};SWFUpload.prototype.uploadProgress=function(file,bytesComplete,bytesTotal){file=this.unescapeFilePostParams(file);this.queueEvent("upload_progress_handler",[file,bytesComplete,bytesTotal])};SWFUpload.prototype.uploadError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("upload_error_handler",[file,errorCode,message])};SWFUpload.prototype.uploadSuccess=function(file,serverData,responseReceived){file=this.unescapeFilePostParams(file);this.queueEvent("upload_success_handler",[file,serverData,responseReceived])};SWFUpload.prototype.uploadComplete=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("upload_complete_handler",file)};SWFUpload.prototype.debug=function(message){this.queueEvent("debug_handler",message)};SWFUpload.prototype.debugMessage=function(message){if(this.settings.debug){var exceptionMessage,exceptionValues=[];if(typeof message==="object"&&typeof message.name==="string"&&typeof message.message==="string"){for(var key in message){if(message.hasOwnProperty(key)){exceptionValues.push(key+": "+message[key])}}exceptionMessage=exceptionValues.join("\n")||"";exceptionValues=exceptionMessage.split("\n");exceptionMessage="EXCEPTION: "+exceptionValues.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(exceptionMessage)}else{SWFUpload.Console.writeLine(message)}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(message){var console,documentForm;try{console=document.getElementById("SWFUpload_Console");if(!console){documentForm=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(documentForm);console=document.createElement("textarea");console.id="SWFUpload_Console";console.style.fontFamily="monospace";console.setAttribute("wrap","off");console.wrap="off";console.style.overflow="auto";console.style.width="700px";console.style.height="350px";console.style.margin="5px";documentForm.appendChild(console)}console.value+=message+"\n";console.scrollTop=console.scrollHeight-console.clientHeight}catch(ex){alert("Exception: "+ex.name+" Message: "+ex.message)}};
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/licenses/Infusion-LICENSE.txt b/docs/include/jscripts/infusion_old/licenses/Infusion-LICENSE.txt
new file mode 100644 (file)
index 0000000..7de827b
--- /dev/null
@@ -0,0 +1,227 @@
+Fluid is available under either the terms of the New BSD license or the
+Educational Community License, Version 2.0. As a recipient of Fluid, you may
+choose which license to receive this code under (except as noted in per-module
+LICENSE files). All modules are Copyright 2007 University of Toronto except
+where noted otherwise in the code itself, or if the modules reside in a separate
+directory, they may contain explicit declarations of copyright in both the
+LICENSE file in the directory in which they reside and in the code itself. No
+external contributions are allowed under licenses which are fundamentally
+incompatible with the ECL or BSD licenses that Fluid is distributed under.
+
+The text of the ECL and BSD licenses is reproduced below.
+
+Educational Community License, Version 2.0
+*************************************
+Copyright 2007 University of Toronto
+
+Educational Community License, Version 2.0, April 2007
+
+The Educational Community License version 2.0 ("ECL") consists of the Apache 2.0
+license, modified to change the scope of the patent grant in section 3 to be
+specific to the needs of the education communities using this license. The
+original Apache 2.0 license can be found at:
+http://www.apache.org/licenses/LICENSE-2.0
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and
+distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright
+owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities
+that control, are controlled by, or are under common control with that entity.
+For the purposes of this definition, "control" means (i) the power, direct or
+indirect, to cause the direction or management of such entity, whether by
+contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
+outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including
+but not limited to software source code, documentation source, and configuration
+files.
+
+"Object" form shall mean any form resulting from mechanical transformation or
+translation of a Source form, including but not limited to compiled object code,
+generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made
+available under the License, as indicated by a copyright notice that is included
+in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that
+is based on (or derived from) the Work and for which the editorial revisions,
+annotations, elaborations, or other modifications represent, as a whole, an
+original work of authorship. For the purposes of this License, Derivative Works
+shall not include works that remain separable from, or merely link (or bind by
+name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version
+of the Work and any modifications or additions to that Work or Derivative Works
+thereof, that is intentionally submitted to Licensor for inclusion in the Work
+by the copyright owner or by an individual or Legal Entity authorized to submit
+on behalf of the copyright owner. For the purposes of this definition,
+"submitted" means any form of electronic, verbal, or written communication sent
+to the Licensor or its representatives, including but not limited to
+communication on electronic mailing lists, source code control systems, and
+issue tracking systems that are managed by, or on behalf of, the Licensor for
+the purpose of discussing and improving the Work, but excluding communication
+that is conspicuously marked or otherwise designated in writing by the copyright
+owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
+of whom a Contribution has been received by Licensor and subsequently
+incorporated within the Work.
+
+2. Grant of Copyright License.
+
+Subject to the terms and conditions of this License, each Contributor hereby
+grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+irrevocable copyright license to reproduce, prepare Derivative Works of,
+publicly display, publicly perform, sublicense, and distribute the Work and such
+Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+
+Subject to the terms and conditions of this License, each Contributor hereby
+grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+irrevocable (except as stated in this section) patent license to make, have
+made, use, offer to sell, sell, import, and otherwise transfer the Work, where
+such license applies only to those patent claims licensable by such Contributor
+that are necessarily infringed by their Contribution(s) alone or by combination
+of their Contribution(s) with the Work to which such Contribution(s) was
+submitted. If You institute patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that the Work or a
+Contribution incorporated within the Work constitutes direct or contributory
+patent infringement, then any patent licenses granted to You under this License
+for that Work shall terminate as of the date such litigation is filed. Any
+patent license granted hereby with respect to contributions by an individual
+employed by an institution or organization is limited to patent claims where the
+individual that is the author of the Work is also the inventor of the patent
+claims licensed, and where the organization or institution has the right to
+grant such license under applicable grant and research funding agreements. No
+other express or implied licenses are granted.
+
+4. Redistribution.
+
+You may reproduce and distribute copies of the Work or Derivative Works thereof
+in any medium, with or without modifications, and in Source or Object form,
+provided that You meet the following conditions:
+
+   1. You must give any other recipients of the Work or Derivative Works a copy
+of this License; and
+   2. You must cause any modified files to carry prominent notices stating that
+You changed the files; and
+   3. You must retain, in the Source form of any Derivative Works that You
+distribute, all copyright, patent, trademark, and attribution notices from
+the Source form of the Work, excluding those notices that do not pertain to
+any part of the Derivative Works; and
+   4. If the Work includes a "NOTICE" text file as part of its distribution,
+then any Derivative Works that You distribute must include a readable copy of
+the attribution notices contained within such NOTICE file, excluding those
+notices that do not pertain to any part of the Derivative Works, in at least
+one of the following places: within a NOTICE text file distributed as part of
+the Derivative Works; within the Source form or documentation, if provided
+along with the Derivative Works; or, within a display generated by the
+Derivative Works, if and wherever such third-party notices normally appear.
+The contents of the NOTICE file are for informational purposes only and do
+not modify the License. You may add Your own attribution notices within
+Derivative Works that You distribute, alongside or as an addendum to the
+NOTICE text from the Work, provided that such additional attribution notices
+cannot be construed as modifying the License.
+
+You may add Your own copyright statement to Your modifications and may provide
+additional or different license terms and conditions for use, reproduction, or
+distribution of Your modifications, or for any such Derivative Works as a whole,
+provided Your use, reproduction, and distribution of the Work otherwise complies
+with the conditions stated in this License.
+
+5. Submission of Contributions.
+
+Unless You explicitly state otherwise, any Contribution intentionally submitted
+for inclusion in the Work by You to the Licensor shall be under the terms and
+conditions of this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify the terms of
+any separate license agreement you may have executed with Licensor regarding
+such Contributions.
+
+6. Trademarks.
+
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+
+Unless required by applicable law or agreed to in writing, Licensor provides the
+Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
+including, without limitation, any warranties or conditions of TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
+solely responsible for determining the appropriateness of using or
+redistributing the Work and assume any risks associated with Your exercise of
+permissions under this License.
+
+8. Limitation of Liability.
+
+In no event and under no legal theory, whether in tort (including negligence),
+contract, or otherwise, unless required by applicable law (such as deliberate
+and grossly negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special, incidental,
+or consequential damages of any character arising as a result of this License or
+out of the use or inability to use the Work (including but not limited to
+damages for loss of goodwill, work stoppage, computer failure or malfunction, or
+any and all other commercial damages or losses), even if such Contributor has
+been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+
+While redistributing the Work or Derivative Works thereof, You may choose to
+offer, and charge a fee for, acceptance of support, warranty, indemnity, or
+other liability obligations and/or rights consistent with this License. However,
+in accepting such obligations, You may act only on Your own behalf and on Your
+sole responsibility, not on behalf of any other Contributor, and only if You
+agree to indemnify, defend, and hold each Contributor harmless for any liability
+incurred by, or claims asserted against, such Contributor by reason of your
+accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS FOR ECL 2.0
+
+The New BSD license
+**********************
+
+Copyright 2007 University of Toronto.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+    * Neither the name of the University of Toronto nor the names of its
+contributors may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+OF SUCH DAMAGE.
+
+END OF TERMS AND CONDITIONS FOR THE NEW BSD LICENSE
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/licenses/fastXmlPull-LICENSE.txt b/docs/include/jscripts/infusion_old/licenses/fastXmlPull-LICENSE.txt
new file mode 100644 (file)
index 0000000..585d49e
--- /dev/null
@@ -0,0 +1,525 @@
+
+The code inside the file
+    fastXmlPull.js
+in this folder is based on code taken from XML for <SCRIPT> (http://xmljs.sourceforge.net/),
+which is distributed under the terms of the GNU Lesser General Public Licence (LGPL) 
+(http://www.gnu.org/copyleft/lesser.html#TOC1) and the zlib/libpng License (http://www.opensource.org/licenses/zlib-license.php). 
+
+The text of these licenses is reproduced below.
+
+========================================================================
+The zlib/libpng License
+
+Copyright (c) 2000 - 2002, 2003 Michael Houghton (mike@idle.org), Raymond Irving and David Joham (djoham@yahoo.com)
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+    1. The origin of this software must not be misrepresented; you must not
+    claim that you wrote the original software. If you use this software
+    in a product, an acknowledgment in the product documentation would be
+    appreciated but is not required.
+
+    2. Altered source versions must be plainly marked as such, and must not be
+    misrepresented as being the original software.
+
+    3. This notice may not be removed or altered from any source
+    distribution.
+    
+========================================================================
+                 GNU LIBRARY GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+                   59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL.  It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it.  You can use it for
+your libraries, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library.  If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, 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 companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software.  To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+  Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs.  This
+license, the GNU Library General Public License, applies to certain
+designated libraries.  This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+  The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it.  Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program.  However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+  Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries.  We
+concluded that weaker conditions might promote sharing better.
+
+  However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves.  This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them.  (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.)  The hope is that this
+will lead to faster development of free libraries.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+  Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+
+                 GNU LIBRARY GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License").  Each licensee is
+addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+
+  6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    c) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    d) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the 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.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                           NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  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.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library 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
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public
+    License along with this library; if not, write to the 
+    Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
+    Boston, MA  02111-1307  USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/docs/include/jscripts/infusion_old/licenses/fckeditor-LICENSE.txt b/docs/include/jscripts/infusion_old/licenses/fckeditor-LICENSE.txt
new file mode 100644 (file)
index 0000000..dd4b7bc
--- /dev/null
@@ -0,0 +1,1246 @@
+FCKeditor - The text editor for Internet - http://www.fckeditor.net
+Copyright (C) 2003-2008 Frederico Caldeira Knabben
+
+Licensed under the terms of any of the following licenses at your
+choice:
+
+ - GNU General Public License Version 2 or later (the "GPL")
+   http://www.gnu.org/licenses/gpl.html
+   (See Appendix A)
+
+ - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+   http://www.gnu.org/licenses/lgpl.html
+   (See Appendix B)
+
+ - Mozilla Public License Version 1.1 or later (the "MPL")
+   http://www.mozilla.org/MPL/MPL-1.1.html
+   (See Appendix C)
+
+You are not required to, but if you want to explicitly declare the
+license you have chosen to be bound to when using, reproducing,
+modifying and distributing this software, just include a text file
+titled "legal.txt" in your version of this software, indicating your
+license choice. In any case, your choice will not restrict any
+recipient of your version of this software to use, reproduce, modify
+and distribute this software under any of the above licenses.
+
+Appendix A: The GPL License
+===========================
+
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+
+
+Appendix B: The LGPL License
+============================
+
+                 GNU LESSER GENERAL PUBLIC LICENSE
+                      Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+                 GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                           NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+
+
+Appendix C: The MPL License
+===========================
+
+                          MOZILLA PUBLIC LICENSE
+                                Version 1.1
+
+                              ---------------
+
+1. Definitions.
+
+     1.0.1. "Commercial Use" means distribution or otherwise making the
+     Covered Code available to a third party.
+
+     1.1. "Contributor" means each entity that creates or contributes to
+     the creation of Modifications.
+
+     1.2. "Contributor Version" means the combination of the Original
+     Code, prior Modifications used by a Contributor, and the Modifications
+     made by that particular Contributor.
+
+     1.3. "Covered Code" means the Original Code or Modifications or the
+     combination of the Original Code and Modifications, in each case
+     including portions thereof.
+
+     1.4. "Electronic Distribution Mechanism" means a mechanism generally
+     accepted in the software development community for the electronic
+     transfer of data.
+
+     1.5. "Executable" means Covered Code in any form other than Source
+     Code.
+
+     1.6. "Initial Developer" means the individual or entity identified
+     as the Initial Developer in the Source Code notice required by Exhibit
+     A.
+
+     1.7. "Larger Work" means a work which combines Covered Code or
+     portions thereof with code not governed by the terms of this License.
+
+     1.8. "License" means this document.
+
+     1.8.1. "Licensable" means having the right to grant, to the maximum
+     extent possible, whether at the time of the initial grant or
+     subsequently acquired, any and all of the rights conveyed herein.
+
+     1.9. "Modifications" means any addition to or deletion from the
+     substance or structure of either the Original Code or any previous
+     Modifications. When Covered Code is released as a series of files, a
+     Modification is:
+          A. Any addition to or deletion from the contents of a file
+          containing Original Code or previous Modifications.
+
+          B. Any new file that contains any part of the Original Code or
+          previous Modifications.
+
+     1.10. "Original Code" means Source Code of computer software code
+     which is described in the Source Code notice required by Exhibit A as
+     Original Code, and which, at the time of its release under this
+     License is not already Covered Code governed by this License.
+
+     1.10.1. "Patent Claims" means any patent claim(s), now owned or
+     hereafter acquired, including without limitation,  method, process,
+     and apparatus claims, in any patent Licensable by grantor.
+
+     1.11. "Source Code" means the preferred form of the Covered Code for
+     making modifications to it, including all modules it contains, plus
+     any associated interface definition files, scripts used to control
+     compilation and installation of an Executable, or source code
+     differential comparisons against either the Original Code or another
+     well known, available Covered Code of the Contributor's choice. The
+     Source Code can be in a compressed or archival form, provided the
+     appropriate decompression or de-archiving software is widely available
+     for no charge.
+
+     1.12. "You" (or "Your")  means an individual or a legal entity
+     exercising rights under, and complying with all of the terms of, this
+     License or a future version of this License issued under Section 6.1.
+     For legal entities, "You" includes any entity which controls, is
+     controlled by, or is under common control with You. For purposes of
+     this definition, "control" means (a) the power, direct or indirect,
+     to cause the direction or management of such entity, whether by
+     contract or otherwise, or (b) ownership of more than fifty percent
+     (50%) of the outstanding shares or beneficial ownership of such
+     entity.
+
+2. Source Code License.
+
+     2.1. The Initial Developer Grant.
+     The Initial Developer hereby grants You a world-wide, royalty-free,
+     non-exclusive license, subject to third party intellectual property
+     claims:
+          (a)  under intellectual property rights (other than patent or
+          trademark) Licensable by Initial Developer to use, reproduce,
+          modify, display, perform, sublicense and distribute the Original
+          Code (or portions thereof) with or without Modifications, and/or
+          as part of a Larger Work; and
+
+          (b) under Patents Claims infringed by the making, using or
+          selling of Original Code, to make, have made, use, practice,
+          sell, and offer for sale, and/or otherwise dispose of the
+          Original Code (or portions thereof).
+
+          (c) the licenses granted in this Section 2.1(a) and (b) are
+          effective on the date Initial Developer first distributes
+          Original Code under the terms of this License.
+
+          (d) Notwithstanding Section 2.1(b) above, no patent license is
+          granted: 1) for code that You delete from the Original Code; 2)
+          separate from the Original Code;  or 3) for infringements caused
+          by: i) the modification of the Original Code or ii) the
+          combination of the Original Code with other software or devices.
+
+     2.2. Contributor Grant.
+     Subject to third party intellectual property claims, each Contributor
+     hereby grants You a world-wide, royalty-free, non-exclusive license
+
+          (a)  under intellectual property rights (other than patent or
+          trademark) Licensable by Contributor, to use, reproduce, modify,
+          display, perform, sublicense and distribute the Modifications
+          created by such Contributor (or portions thereof) either on an
+          unmodified basis, with other Modifications, as Covered Code
+          and/or as part of a Larger Work; and
+
+          (b) under Patent Claims infringed by the making, using, or
+          selling of  Modifications made by that Contributor either alone
+          and/or in combination with its Contributor Version (or portions
+          of such combination), to make, use, sell, offer for sale, have
+          made, and/or otherwise dispose of: 1) Modifications made by that
+          Contributor (or portions thereof); and 2) the combination of
+          Modifications made by that Contributor with its Contributor
+          Version (or portions of such combination).
+
+          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
+          effective on the date Contributor first makes Commercial Use of
+          the Covered Code.
+
+          (d)    Notwithstanding Section 2.2(b) above, no patent license is
+          granted: 1) for any code that Contributor has deleted from the
+          Contributor Version; 2)  separate from the Contributor Version;
+          3)  for infringements caused by: i) third party modifications of
+          Contributor Version or ii)  the combination of Modifications made
+          by that Contributor with other software  (except as part of the
+          Contributor Version) or other devices; or 4) under Patent Claims
+          infringed by Covered Code in the absence of Modifications made by
+          that Contributor.
+
+3. Distribution Obligations.
+
+     3.1. Application of License.
+     The Modifications which You create or to which You contribute are
+     governed by the terms of this License, including without limitation
+     Section 2.2. The Source Code version of Covered Code may be
+     distributed only under the terms of this License or a future version
+     of this License released under Section 6.1, and You must include a
+     copy of this License with every copy of the Source Code You
+     distribute. You may not offer or impose any terms on any Source Code
+     version that alters or restricts the applicable version of this
+     License or the recipients' rights hereunder. However, You may include
+     an additional document offering the additional rights described in
+     Section 3.5.
+
+     3.2. Availability of Source Code.
+     Any Modification which You create or to which You contribute must be
+     made available in Source Code form under the terms of this License
+     either on the same media as an Executable version or via an accepted
+     Electronic Distribution Mechanism to anyone to whom you made an
+     Executable version available; and if made available via Electronic
+     Distribution Mechanism, must remain available for at least twelve (12)
+     months after the date it initially became available, or at least six
+     (6) months after a subsequent version of that particular Modification
+     has been made available to such recipients. You are responsible for
+     ensuring that the Source Code version remains available even if the
+     Electronic Distribution Mechanism is maintained by a third party.
+
+     3.3. Description of Modifications.
+     You must cause all Covered Code to which You contribute to contain a
+     file documenting the changes You made to create that Covered Code and
+     the date of any change. You must include a prominent statement that
+     the Modification is derived, directly or indirectly, from Original
+     Code provided by the Initial Developer and including the name of the
+     Initial Developer in (a) the Source Code, and (b) in any notice in an
+     Executable version or related documentation in which You describe the
+     origin or ownership of the Covered Code.
+
+     3.4. Intellectual Property Matters
+          (a) Third Party Claims.
+          If Contributor has knowledge that a license under a third party's
+          intellectual property rights is required to exercise the rights
+          granted by such Contributor under Sections 2.1 or 2.2,
+          Contributor must include a text file with the Source Code
+          distribution titled "LEGAL" which describes the claim and the
+          party making the claim in sufficient detail that a recipient will
+          know whom to contact. If Contributor obtains such knowledge after
+          the Modification is made available as described in Section 3.2,
+          Contributor shall promptly modify the LEGAL file in all copies
+          Contributor makes available thereafter and shall take other steps
+          (such as notifying appropriate mailing lists or newsgroups)
+          reasonably calculated to inform those who received the Covered
+          Code that new knowledge has been obtained.
+
+          (b) Contributor APIs.
+          If Contributor's Modifications include an application programming
+          interface and Contributor has knowledge of patent licenses which
+          are reasonably necessary to implement that API, Contributor must
+          also include this information in the LEGAL file.
+
+               (c)    Representations.
+          Contributor represents that, except as disclosed pursuant to
+          Section 3.4(a) above, Contributor believes that Contributor's
+          Modifications are Contributor's original creation(s) and/or
+          Contributor has sufficient rights to grant the rights conveyed by
+          this License.
+
+     3.5. Required Notices.
+     You must duplicate the notice in Exhibit A in each file of the Source
+     Code.  If it is not possible to put such notice in a particular Source
+     Code file due to its structure, then You must include such notice in a
+     location (such as a relevant directory) where a user would be likely
+     to look for such a notice.  If You created one or more Modification(s)
+     You may add your name as a Contributor to the notice described in
+     Exhibit A.  You must also duplicate this License in any documentation
+     for the Source Code where You describe recipients' rights or ownership
+     rights relating to Covered Code.  You may choose to offer, and to
+     charge a fee for, warranty, support, indemnity or liability
+     obligations to one or more recipients of Covered Code. However, You
+     may do so only on Your own behalf, and not on behalf of the Initial
+     Developer or any Contributor. You must make it absolutely clear than
+     any such warranty, support, indemnity or liability obligation is
+     offered by You alone, and You hereby agree to indemnify the Initial
+     Developer and every Contributor for any liability incurred by the
+     Initial Developer or such Contributor as a result of warranty,
+     support, indemnity or liability terms You offer.
+
+     3.6. Distribution of Executable Versions.
+     You may distribute Covered Code in Executable form only if the
+     requirements of Section 3.1-3.5 have been met for that Covered Code,
+     and if You include a notice stating that the Source Code version of
+     the Covered Code is available under the terms of this License,
+     including a description of how and where You have fulfilled the
+     obligations of Section 3.2. The notice must be conspicuously included
+     in any notice in an Executable version, related documentation or
+     collateral in which You describe recipients' rights relating to the
+     Covered Code. You may distribute the Executable version of Covered
+     Code or ownership rights under a license of Your choice, which may
+     contain terms different from this License, provided that You are in
+     compliance with the terms of this License and that the license for the
+     Executable version does not attempt to limit or alter the recipient's
+     rights in the Source Code version from the rights set forth in this
+     License. If You distribute the Executable version under a different
+     license You must make it absolutely clear that any terms which differ
+     from this License are offered by You alone, not by the Initial
+     Developer or any Contributor. You hereby agree to indemnify the
+     Initial Developer and every Contributor for any liability incurred by
+     the Initial Developer or such Contributor as a result of any such
+     terms You offer.
+
+     3.7. Larger Works.
+     You may create a Larger Work by combining Covered Code with other code
+     not governed by the terms of this License and distribute the Larger
+     Work as a single product. In such a case, You must make sure the
+     requirements of this License are fulfilled for the Covered Code.
+
+4. Inability to Comply Due to Statute or Regulation.
+
+     If it is impossible for You to comply with any of the terms of this
+     License with respect to some or all of the Covered Code due to
+     statute, judicial order, or regulation then You must: (a) comply with
+     the terms of this License to the maximum extent possible; and (b)
+     describe the limitations and the code they affect. Such description
+     must be included in the LEGAL file described in Section 3.4 and must
+     be included with all distributions of the Source Code. Except to the
+     extent prohibited by statute or regulation, such description must be
+     sufficiently detailed for a recipient of ordinary skill to be able to
+     understand it.
+
+5. Application of this License.
+
+     This License applies to code to which the Initial Developer has
+     attached the notice in Exhibit A and to related Covered Code.
+
+6. Versions of the License.
+
+     6.1. New Versions.
+     Netscape Communications Corporation ("Netscape") may publish revised
+     and/or new versions of the License from time to time. Each version
+     will be given a distinguishing version number.
+
+     6.2. Effect of New Versions.
+     Once Covered Code has been published under a particular version of the
+     License, You may always continue to use it under the terms of that
+     version. You may also choose to use such Covered Code under the terms
+     of any subsequent version of the License published by Netscape. No one
+     other than Netscape has the right to modify the terms applicable to
+     Covered Code created under this License.
+
+     6.3. Derivative Works.
+     If You create or use a modified version of this License (which you may
+     only do in order to apply it to code which is not already Covered Code
+     governed by this License), You must (a) rename Your license so that
+     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
+     "MPL", "NPL" or any confusingly similar phrase do not appear in your
+     license (except to note that your license differs from this License)
+     and (b) otherwise make it clear that Your version of the license
+     contains terms which differ from the Mozilla Public License and
+     Netscape Public License. (Filling in the name of the Initial
+     Developer, Original Code or Contributor in the notice described in
+     Exhibit A shall not of themselves be deemed to be modifications of
+     this License.)
+
+7. DISCLAIMER OF WARRANTY.
+
+     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
+     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
+     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
+     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
+     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
+     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
+     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
+     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+8. TERMINATION.
+
+     8.1.  This License and the rights granted hereunder will terminate
+     automatically if You fail to comply with terms herein and fail to cure
+     such breach within 30 days of becoming aware of the breach. All
+     sublicenses to the Covered Code which are properly granted shall
+     survive any termination of this License. Provisions which, by their
+     nature, must remain in effect beyond the termination of this License
+     shall survive.
+
+     8.2.  If You initiate litigation by asserting a patent infringement
+     claim (excluding declatory judgment actions) against Initial Developer
+     or a Contributor (the Initial Developer or Contributor against whom
+     You file such action is referred to as "Participant")  alleging that:
+
+     (a)  such Participant's Contributor Version directly or indirectly
+     infringes any patent, then any and all rights granted by such
+     Participant to You under Sections 2.1 and/or 2.2 of this License
+     shall, upon 60 days notice from Participant terminate prospectively,
+     unless if within 60 days after receipt of notice You either: (i)
+     agree in writing to pay Participant a mutually agreeable reasonable
+     royalty for Your past and future use of Modifications made by such
+     Participant, or (ii) withdraw Your litigation claim with respect to
+     the Contributor Version against such Participant.  If within 60 days
+     of notice, a reasonable royalty and payment arrangement are not
+     mutually agreed upon in writing by the parties or the litigation claim
+     is not withdrawn, the rights granted by Participant to You under
+     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
+     the 60 day notice period specified above.
+
+     (b)  any software, hardware, or device, other than such Participant's
+     Contributor Version, directly or indirectly infringes any patent, then
+     any rights granted to You by such Participant under Sections 2.1(b)
+     and 2.2(b) are revoked effective as of the date You first made, used,
+     sold, distributed, or had made, Modifications made by that
+     Participant.
+
+     8.3.  If You assert a patent infringement claim against Participant
+     alleging that such Participant's Contributor Version directly or
+     indirectly infringes any patent where such claim is resolved (such as
+     by license or settlement) prior to the initiation of patent
+     infringement litigation, then the reasonable value of the licenses
+     granted by such Participant under Sections 2.1 or 2.2 shall be taken
+     into account in determining the amount or value of any payment or
+     license.
+
+     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
+     all end user license agreements (excluding distributors and resellers)
+     which have been validly granted by You or any distributor hereunder
+     prior to termination shall survive termination.
+
+9. LIMITATION OF LIABILITY.
+
+     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
+     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
+     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
+     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
+     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
+     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
+     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
+     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
+     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
+     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
+     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
+     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+10. U.S. GOVERNMENT END USERS.
+
+     The Covered Code is a "commercial item," as that term is defined in
+     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+     software" and "commercial computer software documentation," as such
+     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
+     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
+     all U.S. Government End Users acquire Covered Code with only those
+     rights set forth herein.
+
+11. MISCELLANEOUS.
+
+     This License represents the complete agreement concerning subject
+     matter hereof. If any provision of this License is held to be
+     unenforceable, such provision shall be reformed only to the extent
+     necessary to make it enforceable. This License shall be governed by
+     California law provisions (except to the extent applicable law, if
+     any, provides otherwise), excluding its conflict-of-law provisions.
+     With respect to disputes in which at least one party is a citizen of,
+     or an entity chartered or registered to do business in the United
+     States of America, any litigation relating to this License shall be
+     subject to the jurisdiction of the Federal Courts of the Northern
+     District of California, with venue lying in Santa Clara County,
+     California, with the losing party responsible for costs, including
+     without limitation, court costs and reasonable attorneys' fees and
+     expenses. The application of the United Nations Convention on
+     Contracts for the International Sale of Goods is expressly excluded.
+     Any law or regulation which provides that the language of a contract
+     shall be construed against the drafter shall not apply to this
+     License.
+
+12. RESPONSIBILITY FOR CLAIMS.
+
+     As between Initial Developer and the Contributors, each party is
+     responsible for claims and damages arising, directly or indirectly,
+     out of its utilization of rights under this License and You agree to
+     work with Initial Developer and Contributors to distribute such
+     responsibility on an equitable basis. Nothing herein is intended or
+     shall be deemed to constitute any admission of liability.
+
+13. MULTIPLE-LICENSED CODE.
+
+     Initial Developer may designate portions of the Covered Code as
+     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
+     Developer permits you to utilize portions of the Covered Code under
+     Your choice of the NPL or the alternative licenses, if any, specified
+     by the Initial Developer in the file described in Exhibit A.
+
+EXHIBIT A -Mozilla Public License.
+
+     ``The contents of this file are subject to the Mozilla Public License
+     Version 1.1 (the "License"); you may not use this file except in
+     compliance with the License. You may obtain a copy of the License at
+     http://www.mozilla.org/MPL/
+
+     Software distributed under the License is distributed on an "AS IS"
+     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+     License for the specific language governing rights and limitations
+     under the License.
+
+     The Original Code is ______________________________________.
+
+     The Initial Developer of the Original Code is ________________________.
+     Portions created by ______________________ are Copyright (C) ______
+     _______________________. All Rights Reserved.
+
+     Contributor(s): ______________________________________.
+
+     Alternatively, the contents of this file may be used under the terms
+     of the _____ license (the  "[___] License"), in which case the
+     provisions of [______] License are applicable instead of those
+     above.  If you wish to allow use of your version of this file only
+     under the terms of the [____] License and not to allow others to use
+     your version of this file under the MPL, indicate your decision by
+     deleting  the provisions above and replace  them with the notice and
+     other provisions required by the [___] License.  If you do not delete
+     the provisions above, a recipient may use your version of this file
+     under either the MPL or the [___] License."
+
+     [NOTE: The text of this Exhibit A may differ slightly from the text of
+     the notices in the Source Code files of the Original Code. You should
+     use the text of this Exhibit A rather than the text found in the
+     Original Code Source Code for Your Modifications.]
diff --git a/docs/include/jscripts/infusion_old/licenses/jQuery-LICENSE.txt b/docs/include/jscripts/infusion_old/licenses/jQuery-LICENSE.txt
new file mode 100644 (file)
index 0000000..b857d46
--- /dev/null
@@ -0,0 +1,299 @@
+The MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+        GNU GENERAL PUBLIC LICENSE
+           Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+          Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+        GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+          NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
diff --git a/docs/include/jscripts/infusion_old/licenses/swfobject-LICENSE.txt b/docs/include/jscripts/infusion_old/licenses/swfobject-LICENSE.txt
new file mode 100644 (file)
index 0000000..bb35985
--- /dev/null
@@ -0,0 +1,4 @@
+SWFObject v2.1 <http://code.google.com/p/swfobject/>
+       Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
+       This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+       
\ No newline at end of file
diff --git a/docs/include/jscripts/infusion_old/licenses/swfupload-LICENSE.txt b/docs/include/jscripts/infusion_old/licenses/swfupload-LICENSE.txt
new file mode 100644 (file)
index 0000000..e3b1883
--- /dev/null
@@ -0,0 +1,22 @@
+
+The MIT License
+
+Copyright (c) 2006-2007 Lars Huring, Olov NilzÈn and Mammon Media
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/docs/include/jscripts/sha-1factory.js b/docs/include/jscripts/sha-1factory.js
new file mode 100644 (file)
index 0000000..00e8c30
--- /dev/null
@@ -0,0 +1,229 @@
+/*
+ * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
+ * in FIPS PUB 180-1
+ * Version 2.1 Copyright Paul Johnston 2000 - 2002.
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for details.
+ */
+
+var hexcase = 0;  /* hex output format. 0 - lowercase; 1 - uppercase        */
+var b64pad  = ""; /* base-64 pad character. "=" for strict RFC compliance   */
+var chrsz   = 8;  /* bits per input character. 8 - ASCII; 16 - Unicode      */
+
+/*
+ * These are the functions you'll usually want to call
+ * They take string arguments and return either hex or base-64 encoded strings
+ */
+function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));}
+function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length * chrsz));}
+function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length * chrsz));}
+function hex_hmac_sha1(key, data){ return binb2hex(core_hmac_sha1(key, data));}
+function b64_hmac_sha1(key, data){ return binb2b64(core_hmac_sha1(key, data));}
+function str_hmac_sha1(key, data){ return binb2str(core_hmac_sha1(key, data));}
+
+/*
+ * Perform a simple self-test to see if the VM is working
+ */
+function sha1_vm_test()
+{
+  return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d";
+}
+
+/*
+ * Calculate the SHA-1 of an array of big-endian words, and a bit length
+ */
+function core_sha1(x, len)
+{
+  /* append padding */
+  x[len >> 5] |= 0x80 << (24 - len % 32);
+  x[((len + 64 >> 9) << 4) + 15] = len;
+
+  var w = Array(80);
+  var a =  1732584193;
+  var b = -271733879;
+  var c = -1732584194;
+  var d =  271733878;
+  var e = -1009589776;
+
+  for(var i = 0; i < x.length; i += 16)
+  {
+    var olda = a;
+    var oldb = b;
+    var oldc = c;
+    var oldd = d;
+    var olde = e;
+
+    for(var j = 0; j < 80; j++)
+    {
+      if(j < 16) w[j] = x[i + j];
+      else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);
+      var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), 
+                       safe_add(safe_add(e, w[j]), sha1_kt(j)));
+      e = d;
+      d = c;
+      c = rol(b, 30);
+      b = a;
+      a = t;
+    }
+
+    a = safe_add(a, olda);
+    b = safe_add(b, oldb);
+    c = safe_add(c, oldc);
+    d = safe_add(d, oldd);
+    e = safe_add(e, olde);
+  }
+  return Array(a, b, c, d, e);
+  
+}
+
+/*
+ * Perform the appropriate triplet combination function for the current
+ * iteration
+ */
+function sha1_ft(t, b, c, d)
+{
+  if(t < 20) return (b & c) | ((~b) & d);
+  if(t < 40) return b ^ c ^ d;
+  if(t < 60) return (b & c) | (b & d) | (c & d);
+  return b ^ c ^ d;
+}
+
+/*
+ * Determine the appropriate additive constant for the current iteration
+ */
+function sha1_kt(t)
+{
+  return (t < 20) ?  1518500249 : (t < 40) ?  1859775393 :
+         (t < 60) ? -1894007588 : -899497514;
+}  
+
+/*
+ * Calculate the HMAC-SHA1 of a key and some data
+ */
+function core_hmac_sha1(key, data)
+{
+  var bkey = str2binb(key);
+  if(bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz);
+
+  var ipad = Array(16), opad = Array(16);
+  for(var i = 0; i < 16; i++) 
+  {
+    ipad[i] = bkey[i] ^ 0x36363636;
+    opad[i] = bkey[i] ^ 0x5C5C5C5C;
+  }
+
+  var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz);
+  return core_sha1(opad.concat(hash), 512 + 160);
+}
+
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+function safe_add(x, y)
+{
+  var lsw = (x & 0xFFFF) + (y & 0xFFFF);
+  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+  return (msw << 16) | (lsw & 0xFFFF);
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function rol(num, cnt)
+{
+  return (num << cnt) | (num >>> (32 - cnt));
+}
+
+/*
+ * Convert an 8-bit or 16-bit string to an array of big-endian words
+ * In 8-bit function, characters >255 have their hi-byte silently ignored.
+ */
+function str2binb(str)
+{
+  var bin = Array();
+  var mask = (1 << chrsz) - 1;
+  for(var i = 0; i < str.length * chrsz; i += chrsz)
+    bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i%32);
+  return bin;
+}
+
+/*
+ * Convert an array of big-endian words to a string
+ */
+function binb2str(bin)
+{
+  var str = "";
+  var mask = (1 << chrsz) - 1;
+  for(var i = 0; i < bin.length * 32; i += chrsz)
+    str += String.fromCharCode((bin[i>>5] >>> (24 - i%32)) & mask);
+  return str;
+}
+
+/*
+ * Convert an array of big-endian words to a hex string.
+ */
+function binb2hex(binarray)
+{
+  var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
+  var str = "";
+  for(var i = 0; i < binarray.length * 4; i++)
+  {
+    str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) +
+           hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8  )) & 0xF);
+  }
+  return str;
+}
+
+/*
+ * Convert an array of big-endian words to a base-64 string
+ */
+function binb2b64(binarray)
+{
+  var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+  var str = "";
+  for(var i = 0; i < binarray.length * 4; i += 3)
+  {
+    var triplet = (((binarray[i   >> 2] >> 8 * (3 -  i   %4)) & 0xFF) << 16)
+                | (((binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 )
+                |  ((binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF);
+    for(var j = 0; j < 4; j++)
+    {
+      if(i * 8 + j * 6 > binarray.length * 32) str += b64pad;
+      else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
+    }
+  }
+  return str;
+}
+
+
+/* 
+ * Verify passwords and its confirm
+ * password1: password
+ * password2: confirm password
+ */
+function verify_password(password1, password2)
+{
+       
+       var err = new Array();
+
+       if (password1 == "" || password2 == "")
+       {
+               err[err.length] = "missing_password";
+       }
+       if (password1 != password2)
+       {
+               err[err.length] = "PASSWORD_MISMATCH";
+       }
+       if (password1.length < 8)
+       {
+               err[err.length] = "PASSWORD_LENGTH";
+       }
+       if (password1.search(/[a-zA-Z]+/) +  password1.search(/[0-9]+/) + password1.search(/[_\-\/+!@#%^$*&)(|.]+/) < 0)
+       {
+               err[err.length] = "PASSWORD_CHARS";
+       }
+
+       return err;
+}      
diff --git a/docs/include/lib/mime.inc.php b/docs/include/lib/mime.inc.php
new file mode 100644 (file)
index 0000000..82e3b53
--- /dev/null
@@ -0,0 +1,182 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+$mime = array();\r
+$mime['ez']    = array('application/andrew-inset',   '');\r
+$mime['hqx']   = array('application/mac-binhex40',   '');\r
+$mime['cpt']   = array('application/mac-compactpro', '');\r
+$mime['bin']   = array('application/octet-stream',   'binary');\r
+$mime['dms']   = array('application/octet-stream',   'binary');\r
+$mime['lha']   = array('application/octet-stream',   'binary');\r
+$mime['lzh']   = array('application/octet-stream',   'binary');\r
+$mime['exe']   = array('application/octet-stream',   'binary');\r
+$mime['com']   = array('application/octet-stream',   'binary');\r
+$mime['class'] = array('application/octet-stream',   '');\r
+$mime['oda']   = array('application/oda',   '');\r
+$mime['pdf']   = array('application/pdf',   'pdf');\r
+$mime['ai']    = array('application/postscript',   '');\r
+$mime['eps']   = array('application/postscript',   '');\r
+$mime['ps']    = array('application/postscript',   'ps');\r
+$mime['rtf']   = array('application/rtf',   'rtf');\r
+$mime['smi']   = array('application/smil',   '');\r
+$mime['smil']  = array('application/smil',   '');\r
+$mime['mif']   = array('application/vnd.mif',   '');\r
+$mime['slc']   = array('application/vnd.wap.slc',   '');\r
+$mime['sic']   = array('application/vnd.wap.sic',   '');\r
+$mime['wmlc']  = array('application/vnd.wap.wmlc',   '');\r
+$mime['wmlsc'] = array('application/vnd.wap.wmlscriptc',   '');\r
+$mime['bcpio'] = array('application/x-bcpio',   '');\r
+$mime['bz2']   = array('application/x-bzip2',   '');\r
+$mime['vcd']   = array('application/x-cdlink',   '');\r
+$mime['pgn']   = array('application/x-chess-pgn',   '');\r
+$mime['cpio']  = array('application/x-cpio',   '');\r
+$mime['csh']   = array('application/x-csh',   '');\r
+$mime['dcr']   = array('application/x-director',   '');\r
+$mime['dir']   = array('application/x-director',   '');\r
+$mime['dxr']   = array('application/x-director',   '');\r
+$mime['dvi']   = array('application/x-dvi',   'dvi');\r
+$mime['spl']   = array('application/x-futuresplash',   '');\r
+$mime['gtar']  = array('application/x-gtar',   '');\r
+$mime['gz']    = array('application/x-gzip',   'zip');\r
+$mime['tgz']   = array('application/x-gzip',   'zip');\r
+$mime['hdf']   = array('application/x-hdf',   '');\r
+$mime['js']    = array('application/x-javascript',   '');\r
+$mime['kwd']   = array('application/x-kword',   '');\r
+$mime['kwt']   = array('application/x-kword',   '');\r
+$mime['ksp']   = array('application/x-kspread',   '');\r
+$mime['kpr']   = array('application/x-kpresenter',   '');\r
+$mime['kpt']   = array('application/x-kpresenter',   '');\r
+$mime['chrt']  = array('application/x-kchart',   '');\r
+$mime['kil']   = array('application/x-killustrator',   '');\r
+$mime['skp']   = array('application/x-koan',   '');\r
+$mime['skd']   = array('application/x-koan',   '');\r
+$mime['skt']   = array('application/x-koan',   '');\r
+$mime['skm']   = array('application/x-koan',   '');\r
+$mime['latex'] = array('application/x-latex',   '');\r
+$mime['nc']    = array('application/x-netcdf',   '');\r
+$mime['cdf']   = array('application/x-netcdf',   '');\r
+$mime['rpm']   = array('application/x-rpm',   '');\r
+$mime['sh']    = array('application/x-sh',   '');\r
+$mime['shar']  = array('application/x-shar',   '');\r
+$mime['swf']   = array('application/x-shockwave-flash',   'swf');\r
+$mime['sit']   = array('application/x-stuffit',   '');\r
+$mime['sv4cpio'] = array('application/x-sv4cpio',   '');\r
+$mime['sv4crc']  = array('application/x-sv4crc',   '');\r
+$mime['tar']   = array('application/x-tar',   '');\r
+$mime['tcl']   = array('application/x-tcl',   '');\r
+$mime['tex']   = array('application/x-tex',   '');\r
+$mime['texinfo'] = array('application/x-texinfo',   '');\r
+$mime['texi']  = array('application/x-texinfo',   '');\r
+$mime['t']     = array('application/x-troff',   '');\r
+$mime['tr']    = array('application/x-troff',   '');\r
+$mime['roff']  = array('application/x-troff',   '');\r
+$mime['man']   = array('application/x-troff-man',   '');\r
+$mime['me']    = array('application/x-troff-me',   '');\r
+$mime['ms']    = array('application/x-troff-ms',   '');\r
+$mime['ustar'] = array('application/x-ustar',   '');\r
+$mime['src']   = array('application/x-wais-source',   'src');\r
+$mime['zip']   = array('application/zip',   'zip');\r
+\r
+$mime['ogg']   = array('audio/x-ogg',  'audio');\r
+$mime['au']    = array('audio/basic',  'audio');\r
+$mime['snd']   = array('audio/basic',  'audio');\r
+$mime['mid']   = array('audio/midi',   'audio');\r
+$mime['midi']  = array('audio/midi',   'audio');\r
+$mime['kar']   = array('audio/midi',   'audio');\r
+$mime['mpga']  = array('audio/mpeg',   'audio');\r
+$mime['mp2']   = array('audio/mpeg',   'audio');\r
+$mime['mp3']   = array('audio/mpeg',   'audio');\r
+$mime['aif']   = array('audio/x-aiff',   'audio');\r
+$mime['aiff']  = array('audio/x-aiff',   'audio');\r
+$mime['aifc']  = array('audio/x-aiff',   'audio');\r
+$mime['ram']   = array('audio/x-pn-realaudio',   'audio');\r
+$mime['rm']    = array('audio/x-pn-realaudio',   'audio');\r
+$mime['ra']    = array('audio/x-realaudio',   'audio');\r
+$mime['wav']   = array('audio/x-wav',   'audio');\r
+\r
+$mime['pdb']   = array('chemical/x-pdb',   '');\r
+$mime['xyz']   = array('chemical/x-pdb',   '');\r
+\r
+$mime['gif']   = array('image/gif',   'image');\r
+$mime['ief']   = array('image/ief',   'image');\r
+$mime['jpeg']  = array('image/jpeg',   'image');\r
+$mime['jpg']   = array('image/jpeg',   'image');\r
+$mime['jpe']   = array('image/jpeg',   'image');\r
+$mime['png']   = array('image/png',   'image');\r
+$mime['tiff']  = array('image/tiff',   'image');\r
+$mime['tif']   = array('image/tiff',   'image');\r
+$mime['wbmp']  = array('image/vnd.wap.wbmp',   'image');\r
+$mime['bmp']   = array('image/ms-bmp', 'image');\r
+$mime['ras']   = array('image/x-cmu-raster',   'image');\r
+$mime['pnm']   = array('image/x-portable-anymap',   'image');\r
+$mime['pbm']   = array('image/x-portable-bitmap',   'image');\r
+$mime['pgm']   = array('image/x-portable-graymap',   'image');\r
+$mime['ppm']   = array('image/x-portable-pixmap',   'image');\r
+$mime['rgb']   = array('image/x-rgb',   'image');\r
+$mime['xbm']   = array('image/x-xbitmap',   'image');\r
+$mime['xpm']   = array('image/x-xpixmap',   'image');\r
+$mime['xwd']   = array('image/x-xwindowdump',   'image');\r
+$mime['igs']   = array('model/iges',   '');\r
+$mime['iges']  = array('model/iges',   '');\r
+$mime['msh']   = array('model/mesh',   '');\r
+$mime['mesh']  = array('model/mesh',   '');\r
+$mime['silo']  = array('model/mesh',   '');\r
+$mime['wrl']   = array('model/vrml',   '');\r
+$mime['vrml']  = array('model/vrml',   '');\r
+$mime['css']   = array('text/css',   '');\r
+$mime['asc']   = array('text/plain',   '');\r
+$mime['txt']   = array('text/plain',   'txt');\r
+$mime['sql']   = array('text/plain',   'sql2');\r
+$mime['rtx']   = array('text/richtext',   '');\r
+$mime['sgml']  = array('text/sgml',   '');\r
+$mime['sgm']   = array('text/sgml',   '');\r
+$mime['tsv']   = array('text/tab-separated-values',   '');\r
+$mime['sl']    = array('text/vnd.wap.sl',   '');\r
+$mime['si']    = array('text/vnd.wap.si',   '');\r
+$mime['wml']   = array('text/vnd.wap.wml',   '');\r
+$mime['wmls']  = array('text/vnd.wap.wmlscript',   '');\r
+$mime['etx']   = array('text/x-setext',   '');\r
+$mime['xml']   = array('text/xml',   'xml');\r
+$mime['mpeg']  = array('video/mpeg',   'video');\r
+$mime['mpg']   = array('video/mpeg',   'video');\r
+$mime['mpe']   = array('video/mpeg',   'video');\r
+$mime['qt']    = array('video/quicktime',   'qt');\r
+$mime['mov']   = array('video/quicktime',   'qt');\r
+$mime['wmv']   = array('video/x-ms-wmv',   'video');\r
+$mime['avi']   = array('video/x-msvideo',   'video');\r
+$mime['movie'] = array('video/x-sgi-movie',  'video');\r
+$mime['ice']   = array('x-conference/x-cooltalk',   '');\r
+$mime['html']  = array('text/html',   '');\r
+$mime['htm']   = array('text/html',   '');\r
+$mime['log']   = array('text/plain',   '');\r
+$mime['csv']   = array('text/plain',   'xls');\r
+\r
+// microsoft office\r
+$mime['xls']   = array('application/msexcel',   'xls');\r
+$mime['doc']   = array('application/msword',    'doc');\r
+$mime['mdb']   = array('application/msaccess',  'mdb');\r
+$mime['vsd']   = array('application/visio',     'vsd');\r
+$mime['mpp']   = array('application/msproject', 'mpp');\r
+$mime['ppt']   = array('application/vnd.ms-powerpoint',   'ppt');\r
+\r
+// open office\r
+$mime['oot']   = array('application/x-vnd.oasis.openoffice.text',   'oot');\r
+$mime['ott']   = array('application/x-vnd.oasis.openoffice.text',   'oot');\r
+$mime['oos']   = array('application/x-vnd.oasis.openoffice.spreadsheet',   'oos');\r
+$mime['ots']   = array('application/x-vnd.oasis.openoffice.spreadsheet',   'oos');\r
+$mime['ood']   = array('application/x-vnd.oasis.openoffice.drawing',   'ood');\r
+$mime['otd']   = array('application/x-vnd.oasis.openoffice.drawing',   'ood');\r
+$mime['oop']   = array('application/x-vnd.oasis.openoffice.presentation',   'oop');\r
+$mime['otp']   = array('application/x-vnd.oasis.openoffice.presentation',   'oop');\r
+\r
+$mime['psd']   = array('image/x-photoshop', 'psd');\r
+?>
\ No newline at end of file
diff --git a/docs/include/lib/output.inc.php b/docs/include/lib/output.inc.php
new file mode 100644 (file)
index 0000000..40d99a6
--- /dev/null
@@ -0,0 +1,944 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+require(AF_INCLUDE_PATH . 'classes/DAO/LanguageTextDAO.class.php');
+
+/**********************************************************************************/
+/* Output functions found in this file, in order:
+/*
+/*     - AC(term)
+/*
+/**********************************************************************************/
+
+/**
+* Converts language code to actual language message, caches them according to page url
+* @access      public
+* @param       args                            unlimited number of arguments allowed but first arg MUST be name of the language variable/term
+*                                                              i.e             $args[0] = the term to the format string $_template[term]
+*                                                                              $args[1..x] = optional arguments to the formatting string 
+* @return      string|array            full resulting message
+* @see         $db                             in include/vitals.inc.php
+* @see         cache()                         in include/phpCache/phpCache.inc.php
+* @see         cache_variable()        in include/phpCache/phpCache.inc.php
+* @author      Joel Kronenberg
+*/
+function _AT() {
+       global $_cache_template, $lang_et, $_rel_url;
+       static $_template;
+
+       $args = func_get_args();
+       
+       if ($args[0] == "") return "";
+       
+       $languageTextDAO = new LanguageTextDAO();
+       
+       // a feedback msg
+       if (!is_array($args[0])) {
+               /**
+                * Added functionality for translating language code String (AF_ERROR|AF_INFOS|AF_WARNING|AF_FEEDBACK).*
+                * to its text and returning the result. No caching needed.
+                * @author Jacek Materna
+                */
+
+               // Check for specific language prefix, extendible as needed
+               // 0002767:  a substring+in_array test should be faster than a preg_match test.
+               // replaced the preg_match with a test of the substring.
+               $sub_arg = substr($args[0], 0, 7); // 7 is the shortest type of msg (AF_INFO)
+               if (in_array($sub_arg, array('AF_ERRO','AF_INFO','AF_WARN','AF_FEED','AF_CONF'))) {
+                       global $_base_path, $addslashes;
+
+                       $args[0] = $addslashes($args[0]);
+                                       
+                       /* get $_msgs_new from the DB */
+                       $rows = $languageTextDAO->getMsgByTermAndLang($args[0], $_SESSION['lang']);
+                       $msgs = '';
+                                       
+                       if (is_array($rows)) 
+                       {
+                               $row = $rows[0];
+                               // do not cache key as a digit (no contstant(), use string)
+                               $msgs = str_replace('SITE_URL/', $_base_path, $row['text']);
+                               if (defined('AF_DEVEL') && AF_DEVEL) {
+                                       $msgs .= ' <small><small>('. $args[0] .')</small></small>';
+                               }
+                       }
+
+                       return $msgs;
+               }
+       }
+       
+       // a template variable
+       if (!isset($_template)) {
+               $url_parts = parse_url(AF_BASE_HREF);
+               $name = substr($_SERVER['PHP_SELF'], strlen($url_parts['path'])-1);
+
+               if ( !($lang_et = cache(120, 'lang', $_SESSION['lang'].'_'.$name)) ) {
+                       /* get $_template from the DB */
+                       $rows = $languageTextDAO->getAllTemplateByLang($_SESSION['lang']);
+                       
+                       if (is_array($rows))
+                       {
+                               foreach ($rows as $id => $row) 
+                               {
+                                       //Do not overwrite the variable that existed in the cache_template already.
+                                       //The edited terms (_c_template) will always be at the top of the resultset
+                                       //0003279
+                                       if (isset($_cache_template[$row['term']])){
+                                               continue;
+                                       }
+       
+                                       // saves us from doing an ORDER BY
+                                       if ($row['language_code'] == $_SESSION['lang']) {
+                                               $_cache_template[$row['term']] = stripslashes($row['text']);
+                                       } else if (!isset($_cache_template[$row['term']])) {
+                                               $_cache_template[$row['term']] = stripslashes($row['text']);
+                                       }
+                               }
+                       }
+               
+                       cache_variable('_cache_template');
+                       endcache(true, false);
+               }
+               $_template = $_cache_template;
+       }
+
+       $num_args = func_num_args();
+       if (is_array($args[0])) {
+               $args = $args[0];
+               $num_args = count($args);
+       }
+       $format   = array_shift($args);
+
+       if (isset($_template[$format]) && count($args) > 0) {
+               $outString      = vsprintf($_template[$format], $args);
+               $str = ob_get_contents();
+       } else {
+               $outString = '';
+       }
+
+       if ($outString === false) {
+               return ('[Error parsing language. Variable: <code>'.$format.'</code>. Language: <code>'.$_SESSION['lang'].'</code> ]');
+       }
+
+       if (empty($outString)) {
+
+               $rows = $languageTextDAO->getByTermAndLang($format, $_SESSION['lang']);
+               if (is_array($rows))
+               {
+                       $row = $rows[0];
+                       $_template[$row['term']] = stripslashes($row['text']);
+                       $outString = $_template[$row['term']];
+               }
+
+               if (empty($outString)) {
+                       return ('[ '.$format.' ]');
+               }
+       }
+
+       return $outString;
+}
+
+/* 
+       The following options were added as language dependant:
+       %D: A textual representation of a week, three letters Mon through Sun
+       %F: A full textual representation of a month, such as January or March January through December
+       %l (lowercase 'L'): A full textual representation of the day of the week Sunday through Saturday
+       %M: A short textual representation of a month, three letters Jan through Dec
+
+       Support for the following maybe added later:
+       ?? %S: English ordinal suffix for the day of the month, 2 characters st, nd, rd or th. Works well with j
+       ?? %a: Lowercase Ante meridiem and Post meridiem am or pm 
+       ?? %A: Uppercase Ante meridiem and Post meridiem AM or PM 
+
+       valid formAF_types:
+       AF_DATE_MYSQL_DATETIME:         YYYY-MM-DD HH:MM:SS
+       AF_DATE_MYSQL_TIMESTAMP_14:     YYYYMMDDHHMMSS
+       AF_DATE_UNIX_TIMESTAMP:         seconds since epoch
+       AF_DATE_INDEX_VALUE:            0-x, index into a date array
+*/
+function AF_date($format='%Y-%M-%d', $timestamp = '', $formAF_type=AF_DATE_MYSQL_DATETIME) {   
+       static $day_name_ext, $day_name_con, $month_name_ext, $month_name_con;
+       global $_config;
+
+       if (!isset($day_name_ext)) {
+               $day_name_ext = array(  'date_sunday', 
+                                                               'date_monday', 
+                                                               'date_tuesday', 
+                                                               'date_wednesday', 
+                                                               'date_thursday', 
+                                                               'date_friday',
+                                                               'date_saturday');
+
+               $day_name_con = array(  'date_sun', 
+                                                               'date_mon', 
+                                                               'date_tue', 
+                                                               'date_wed',
+                                                               'date_thu', 
+                                                               'date_fri', 
+                                                               'date_sat');
+
+               $month_name_ext = array('date_january', 
+                                                               'date_february', 
+                                                               'date_march', 
+                                                               'date_april', 
+                                                               'date_may',
+                                                               'date_june', 
+                                                               'date_july', 
+                                                               'date_august', 
+                                                               'date_september', 
+                                                               'date_october', 
+                                                               'date_november',
+                                                               'date_december');
+
+               $month_name_con = array('date_jan', 
+                                                               'date_feb', 
+                                                               'date_mar', 
+                                                               'date_apr', 
+                                                               'date_may_short',
+                                                               'date_jun', 
+                                                               'date_jul', 
+                                                               'date_aug', 
+                                                               'date_sep', 
+                                                               'date_oct', 
+                                                               'date_nov',
+                                                               'date_dec');
+       }
+
+       if ($formAF_type == AF_DATE_INDEX_VALUE) {
+               // apply timezone offset
+               apply_timezone($timestamp);
+       
+               if ($format == '%D') {
+                       return _AT($day_name_con[$timestamp-1]);
+               } else if ($format == '%l') {
+                       return _AT($day_name_ext[$timestamp-1]);
+               } else if ($format == '%F') {
+                       return _AT($month_name_ext[$timestamp-1]);
+               } else if ($format == '%M') {
+                       return _AT($month_name_con[$timestamp-1]);
+               }
+       }
+
+       if ($timestamp == '') {
+               $timestamp = time();
+               $formAF_type = AF_DATE_UNIX_TIMESTAMP;
+       }
+
+       /* convert the date to a Unix timestamp before we do anything with it */
+       if ($formAF_type == AF_DATE_MYSQL_DATETIME) {
+               $year   = substr($timestamp,0,4);
+               $month  = substr($timestamp,5,2);
+               $day    = substr($timestamp,8,2);
+               $hour   = substr($timestamp,11,2);
+               $min    = substr($timestamp,14,2);
+               $sec    = substr($timestamp,17,2);
+           $timestamp  = mktime($hour, $min, $sec, $month, $day, $year);
+
+       } else if ($formAF_type == AF_DATE_MYSQL_TIMESTAMP_14) {
+           $year               = substr($timestamp,0,4);
+           $month              = substr($timestamp,4,2);
+           $day                = substr($timestamp,6,2);
+               $hour           = substr($timestamp,8,2);
+           $minute             = substr($timestamp,10,2);
+           $second             = substr($timestamp,12,2);
+           $timestamp  = mktime($hour, $minute, $second, $month, $day, $year);  
+       }
+
+       // apply timezone offset
+       apply_timezone($timestamp);
+
+       /* pull out all the %X items from $format */
+       $first_token = strpos($format, '%');
+       if ($first_token === false) {
+               /* no tokens found */
+               return $timestamp;
+       } else {
+               $tokened_format = substr($format, $first_token);
+       }
+       $tokens = explode('%', $tokened_format);
+       array_shift($tokens);
+       $num_tokens = count($tokens);
+
+       $output = $format;
+       for ($i=0; $i<$num_tokens; $i++) {
+               $tokens[$i] = substr($tokens[$i],0,1);
+
+               if ($tokens[$i] == 'D') {
+                       $output = str_replace('%D', _AT($day_name_con[date('w', $timestamp)]),$output);
+               
+               } else if ($tokens[$i] == 'l') {
+                       $output = str_replace('%l', _AT($day_name_ext[date('w', $timestamp)]),$output);
+               
+               } else if ($tokens[$i] == 'F') {
+                       $output = str_replace('%F', _AT($month_name_ext[date('n', $timestamp)-1]),$output);             
+               
+               } else if ($tokens[$i] == 'M') {
+                       $output = str_replace('%M', _AT($month_name_con[date('n', $timestamp)-1]),$output);
+
+               } else {
+
+                       /* this token doesn't need translating */
+                       $value = date($tokens[$i], $timestamp);
+                       if ($value != $tokens[$i]) {
+                               $output = str_replace('%'.$tokens[$i], $value, $output);
+                       } /* else: this token isn't valid. so don't replace it. Eg. try %q */
+               }
+       }
+
+       return $output;
+}
+
+/**********************************************************************************************************/
+       /**
+       *       Transforms text based on formatting preferences.  Original $input is also changed (passed by reference).
+       *       Can be called as:
+       *       1) $output = AF_print($input, $name);
+       *          echo $output;
+       *
+       *       2) echo AF_print($input, $name); // prefered method
+       *
+       * @access       public
+       * @param        string $input                   text being transformed
+       * @param        string $name                    the unique name of this field (convension: table_name.field_name)
+       * @param        boolean $runtime_html   forcefully disables html formatting for $input (only used by fields that 
+       *                                                                       have the 'formatting' option
+       * @return       string                                  transformed $input
+       * @see          AF_FORMAT constants             in include/lib/constants.inc.php
+       * @see          query_bit()                             in include/vitals.inc.php
+       * @author       Joel Kronenberg
+       */
+       function AF_print($input, $name, $runtime_html = true) {
+               global $_field_formatting;
+
+               if (!isset($_field_formatting[$name])) {
+                       /* field not set, check if there's a global setting */
+                       $parts = explode('.', $name);
+                       
+                       /* check if wildcard is set: */
+                       if (isset($_field_formatting[$parts[0].'.*'])) {
+                               $name = $parts[0].'.*';
+                       } else {
+                               /* field not set, and there's no global setting */
+                               /* same as AF_FORMAF_NONE */
+                               return $input;
+                       }
+               }
+
+               if (query_bit($_field_formatting[$name], AF_FORMAF_QUOTES)) {
+                       $input = str_replace('"', '&quot;', $input);
+               }
+
+               if (query_bit($_field_formatting[$name], AF_FORMAF_CONTENT_DIR)) {
+                       $input = str_replace('CONTENT_DIR/', '', $input);
+               }
+
+               if (query_bit($_field_formatting[$name], AF_FORMAF_HTML) && $runtime_html) {
+                       /* what special things do we have to do if this is HTML ? remove unwanted HTML? validate? */
+               } else {
+                       $input = str_replace('<', '&lt;', $input);
+                       $input = nl2br($input);
+               }
+
+               /* this has to be here, only because AF_FORMAF_HTML is the only check that has an else-block */
+               if ($_field_formatting[$name] === AF_FORMAF_NONE) {
+                       return $input;
+               }
+
+               if (query_bit($_field_formatting[$name], AF_FORMAF_EMOTICONS)) {
+                       $input = smile_replace($input);
+               }
+
+               if (query_bit($_field_formatting[$name], AF_FORMAF_ATCODES)) {
+                       $input = trim(myCodes(' ' . $input . ' '));
+               }
+
+               if (query_bit($_field_formatting[$name], AF_FORMAF_LINKS)) {
+                       $input = trim(make_clickable(' ' . $input . ' '));
+               }
+
+               if (query_bit($_field_formatting[$name], AF_FORMAF_IMAGES)) {
+                       $input = trim(image_replace(' ' . $input . ' '));
+               }
+
+       
+               return $input;
+       }
+
+/********************************************************************************************/
+// Global variables for emoticons
+global $smile_pics;
+global $smile_codes;
+if (!isset($smile_pics)) {
+       $smile_pics[0] = $_base_path.'images/forum/smile.gif';
+       $smile_pics[1] = $_base_path.'images/forum/wink.gif';
+       $smile_pics[2] = $_base_path.'images/forum/frown.gif';
+       $smile_pics[3] = $_base_path.'images/forum/ohwell.gif';
+       $smile_pics[4] = $_base_path.'images/forum/tongue.gif';
+       $smile_pics[5] = $_base_path.'images/forum/51.gif';
+       $smile_pics[6] = $_base_path.'images/forum/52.gif';
+       $smile_pics[7] = $_base_path.'images/forum/54.gif';
+       $smile_pics[8] = $_base_path.'images/forum/27.gif';
+       $smile_pics[9] = $_base_path.'images/forum/19.gif';
+       $smile_pics[10] = $_base_path.'images/forum/3.gif';
+       $smile_pics[11] = $_base_path.'images/forum/56.gif';
+}
+
+if (!isset($smile_codes)) {
+       $smile_codes[0] = ':)';
+       $smile_codes[1] = ';)';
+       $smile_codes[2] = ':(';
+       $smile_codes[3] = '::ohwell::';
+       $smile_codes[4] = ':P';
+       $smile_codes[5] = '::evil::';
+       $smile_codes[6] = '::angry::';
+       $smile_codes[7] = '::lol::';
+       $smile_codes[8] = '::crazy::';
+       $smile_codes[9] = '::tired::';
+       $smile_codes[10] = '::confused::';
+       $smile_codes[11] = '::muah::';
+}
+
+/**
+* Replaces smile-code text into smilie image.
+* @access      public
+* @param       string $text            smile text to be transformed
+* @return      string                          transformed $text
+* @see         $smile_pics                     in include/lib/output.inc.php (above)
+* @see         $smile_codes            in include/lib/output.inc.php (above)
+* @author      Joel Kronenberg
+*/
+function smile_replace($text) {
+       global $smile_pics;
+       global $smile_codes;
+       static $smiles;
+
+       $smiles[0] = '<img src="'.$smile_pics[0].'" border="0" height="15" width="15" align="bottom" alt="'._AT('smile_smile').'" />';
+       $smiles[1] = '<img src="'.$smile_pics[1].'" border="0" height="15" width="15" align="bottom" alt="'._AT('smile_wink').'" />';
+       $smiles[2] = '<img src="'.$smile_pics[2].'" border="0" height="15" width="15" align="bottom" alt="'._AT('smile_frown').'" />';
+       $smiles[3]= '<img src="'.$smile_pics[3].'" border="0" height="15" width="15" align="bottom" alt="'._AT('smile_oh_well').'" />';
+       $smiles[4]= '<img src="'.$smile_pics[4].'" border="0" height="15" width="15" align="bottom" alt="'._AT('smile_tongue').'" />';
+       $smiles[5]= '<img src="'.$smile_pics[5].'" border="0" height="15" width="15" align="bottom" alt="'._AT('smile_evil').'" />';
+       $smiles[6]= '<img src="'.$smile_pics[6].'" border="0" height="15" width="15" align="bottom" alt="'._AT('smile_angry').'" />';
+       $smiles[7]= '<img src="'.$smile_pics[7].'" border="0" height="15" width="15" align="bottom" alt="'._AT('smile_lol').'" />';
+       $smiles[8]= '<img src="'.$smile_pics[8].'" border="0" height="15" width="15" align="bottom" alt="'._AT('smile_crazy').'" />';
+       $smiles[9]= '<img src="'.$smile_pics[9].'" border="0" height="15" width="15" align="bottom" alt="'._AT('smile_tired').'" />';
+       $smiles[10]= '<img src="'.$smile_pics[10].'" border="0" height="17" width="19" align="bottom" alt="'._AT('smile_confused').'" />';
+       $smiles[11]= '<img src="'.$smile_pics[11].'" border="0" height="15" width="15" align="bottom" alt="'._AT('smile_muah').'" />';
+
+       $text = str_replace($smile_codes[0],$smiles[0],$text);
+       $text = str_replace($smile_codes[1],$smiles[1],$text);
+       $text = str_replace($smile_codes[2],$smiles[2],$text);
+       $text = str_replace($smile_codes[3],$smiles[3],$text);
+       $text = str_replace($smile_codes[4],$smiles[4],$text);
+       $text = str_replace($smile_codes[5],$smiles[5],$text);
+       $text = str_replace($smile_codes[6],$smiles[6],$text);
+       $text = str_replace($smile_codes[7],$smiles[7],$text);
+       $text = str_replace($smile_codes[8],$smiles[8],$text);
+       $text = str_replace($smile_codes[9],$smiles[9],$text);
+       $text = str_replace($smile_codes[10],$smiles[10],$text);
+       $text = str_replace($smile_codes[11],$smiles[11],$text);
+
+       return $text;
+}
+
+
+/* Used specifically for the visual editor
+*/
+function smile_javascript () {
+       global $_base_path;
+       global $smile_pics;
+       global $smile_codes;
+
+       static $i = 0;
+
+       while ($smile_pics [$i]) {
+               echo 'case "'.$smile_codes[$i].'":'."\n";
+               echo 'pic = "'.$smile_pics[$i].'";'."\n";
+               echo 'break;'."\n";
+               $i++;
+       }
+}
+
+function myCodes($text, $html = false) {
+       global $_base_path;
+       global $HTTP_USER_AGENT;
+
+       if (substr($HTTP_USER_AGENT,0,11) == 'Mozilla/4.7') {
+               $text = str_replace('[quote]','</p><p class="block">',$text);
+               $text = str_replace('[/quote]','</p><p>',$text);
+
+               $text = str_replace('[reply]','</p><p class="block">',$text);
+               $text = str_replace('[/reply]','</p><p>',$text);
+       } else {
+               $text = str_replace('[quote]','<blockquote>',$text);
+               $text = str_replace('[/quote]','</blockquote><p>',$text);
+
+               $text = str_replace('[reply]','</p><blockquote class="block"><p>',$text);
+               $text = str_replace('[/reply]','</p></blockquote><p>',$text);
+       }
+
+       $text = str_replace('[b]','<strong>',$text);
+       $text = str_replace('[/b]','</strong>',$text);
+
+       $text = str_replace('[i]','<em>',$text);
+       $text = str_replace('[/i]','</em>',$text);
+
+       $text = str_replace('[u]','<u>',$text);
+       $text = str_replace('[/u]','</u>',$text);
+
+       $text = str_replace('[center]','<center>',$text);
+       $text = str_replace('[/center]','</center><p>',$text);
+
+       /* colours */
+       $text = str_replace('[blue]','<span style="color: blue;">',$text);
+       $text = str_replace('[/blue]','</span>',$text);
+
+       $text = str_replace('[orange]','<span style="color: orange;">',$text);
+       $text = str_replace('[/orange]','</span>',$text);
+
+       $text = str_replace('[red]','<span style="color: red;">',$text);
+       $text = str_replace('[/red]','</span>',$text);
+
+       $text = str_replace('[purple]','<span style="color: purple;">',$text);
+       $text = str_replace('[/purple]','</span>',$text);
+
+       $text = str_replace('[green]','<span style="color: green;">',$text);
+       $text = str_replace('[/green]','</span>',$text);
+
+       $text = str_replace('[gray]','<span style="color: gray;">',$text);
+       $text = str_replace('[/gray]','</span>',$text);
+
+       $text = str_replace('[op]','<span class="bigspacer"></span> <a href="',$text);
+       $text = str_replace('[/op]','">'._AT('view_entire_post').'</a>',$text);
+
+       $text = str_replace('[head1]','<h2>',$text);
+       $text = str_replace('[/head1]','</h2>',$text);
+
+       $text = str_replace('[head2]','<h3>',$text);
+       $text = str_replace('[/head2]','</h3>',$text);
+
+       $text = str_replace('[cid]',$_base_path.'content.php?cid='.$_SESSION['s_cid'],$text);
+
+       global $sequence_links;
+       if (isset($sequence_links['previous']) && $sequence_links['previous']['url']) {
+               $text = str_replace('[pid]', $sequence_links['previous']['url'], $text);
+       }
+       if (isset($sequence_links['next']) && $sequence_links['next']['url']) {
+               $text = str_replace('[nid]', $sequence_links['next']['url'], $text);
+       }
+       if (isset($sequence_links['resume']) && $sequence_links['resume']['url']) {
+               $text = str_replace('[nid]', $sequence_links['resume']['url'], $text);
+       }
+       if (isset($sequence_links['first']) && $sequence_links['first']['url']) {
+               $text = str_replace('[fid]', $sequence_links['first']['url'], $text);
+       }
+
+       /* contributed by Thomas M. Duffey <tduffey at homeboyz.com> */
+       $html = !$html ? 0 : 1;
+       $text = preg_replace("/\[code\]\s*(.*)\s*\[\\/code\]/Usei", "highlight_code(fix_quotes('\\1'), $html)", $text);
+
+       return $text;
+}
+
+/* contributed by Thomas M. Duffey <tduffey at homeboyz.com> */
+function highlight_code($code, $html) {
+       // XHTMLize PHP highlight_string output until it gets fixed in PHP
+       static $search = array(
+               '<br>',
+               '<font',
+               '</font>',
+               'color="');
+
+       static $replace = array(
+               '<br />',
+               '<span',
+               '</span>',
+               'style="color:');
+       if (!$html) {
+               $code = str_replace('&lt;', '<', $code);
+               $code = str_replace("\r", '', $code);
+       }
+
+       return str_replace($search, $replace, highlight_string($code, true));
+}
+
+/* contributed by Thomas M. Duffey <tduffey at homeboyz.com> */
+function fix_quotes($text){
+       return str_replace('\\"', '"', $text);
+}
+
+function embed_media($text) {
+       if (preg_match("/\[media(\|[0-9]+\|[0-9]+)?\]*/", $text)==0){
+               return $text;
+       }
+
+       $media_matches = Array();
+       
+       /*
+               First, we search though the text for all different kinds of media defined by media tags and store the results in $media_matches.
+               
+               Then the different replacements for the different media tags are stored in $media_replace.
+               
+               Lastly, we loop through all $media_matches / $media_replaces. (We choose $media_replace as index because $media_matches is multi-dimensioned.) It is important that for each $media_matches there is a $media_replace with the same index. For each media match we check the width/height, or we use the default value of 425x350. We then replace the height/width/media1/media2 parameter placeholders in $media_replace with the correct ones, before running a str_replace on $text, replacing the given media with its correct replacement.
+               
+       */
+       
+       // youtube videos
+       preg_match_all("#\[media[0-9a-z\|]*\]http://([a-z0-9\.]*)?youtube.com/watch\?v=([a-z0-9_-]+)\[/media\]#i",$text,$media_matches[1],PREG_SET_ORDER);
+       $media_replace[1] = '<object width="##WIDTH##" height="##HEIGHT##"><param name="movie" value="http://##MEDIA1##youtube.com/v/##MEDIA2##"></param><embed src="http://##MEDIA1##youtube.com/v/##MEDIA2##" type="application/x-shockwave-flash" width="##WIDTH##" height="##HEIGHT##"></embed></object>';
+               
+       // .mpg
+       preg_match_all("#\[media[0-9a-z\|]*\]([.\w\d]+[^\s\"]+).mpg\[/media\]#i",$text,$media_matches[2],PREG_SET_ORDER);
+       $media_replace[2] = "<object data=\"##MEDIA1##.mpg\" type=\"video/mpeg\" width=\"##WIDTH##\" height=\"##HEIGHT##\"><param name=\"src\" value=\"##MEDIA1##.mpg\"><param name=\"autoplay\" value=\"false\"><param name=\"autoStart\" value=\"0\"><a href=\"##MEDIA1##.mpg\">##MEDIA1##.mpg</a></object>";
+       
+       // .avi
+       preg_match_all("#\[media[0-9a-z\|]*\]([.\w\d]+[^\s\"]+).avi\[/media\]#i",$text,$media_matches[3],PREG_SET_ORDER);
+       $media_replace[3] = "<object data=\"##MEDIA1##.avi\" type=\"video/x-msvideo\" width=\"##WIDTH##\" height=\"##HEIGHT##\"><param name=\"src\" value=\"##MEDIA1##.avi\"><param name=\"autoplay\" value=\"false\"><param name=\"autoStart\" value=\"0\"><a href=\"##MEDIA1##.avi\">##MEDIA1##.avi</a></object>";
+       
+       // .wmv
+       preg_match_all("#\[media[0-9a-z\|]*\]([.\w\d]+[^\s\"]+).wmv\[/media\]#i",$text,$media_matches[4],PREG_SET_ORDER);
+       $media_replace[4] = "<object data=\"##MEDIA1##.wmv\" type=\"video/x-ms-wmv\" width=\"##WIDTH##\" height=\"##HEIGHT##\"><param name=\"src\" value=\"##MEDIA1##.wmv\"><param name=\"autoplay\" value=\"false\"><param name=\"autoStart\" value=\"0\"><a href=\"##MEDIA1##.wmv\">##MEDIA1##.wmv</a></object>";
+       
+       // .mov
+       preg_match_all("#\[media[0-9a-z\|]*\]([.\w\d]+[^\s\"]+).mov\[/media\]#i",$text,$media_matches[5],PREG_SET_ORDER);
+       $media_replace[5] = "<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\" width=\"##WIDTH##\" height=\"##HEIGHT##\"><param name=\"src\" value=\"##MEDIA1##.mov\"><param name=\"controller\" value=\"true\"><param name=\"autoplay\" value=\"false\"><!--[if gte IE 7]> <!--><object type=\"video/quicktime\" data=\"##MEDIA1##.mov\" width=\"##WIDTH##\" height=\"##HEIGHT##\"><param name=\"controller\" value=\"true\"><param name=\"autoplay\" value=\"false\"><a href=\"##MEDIA1##.mov\">##MEDIA1##.mov</a></object><!--<![endif]--><!--[if lt IE 7]><a href=\"##MEDIA1##.mov\">##MEDIA1##.mov</a><![endif]--></object>";
+       
+       // .swf
+       preg_match_all("#\[media[0-9a-z\|]*\]([.\w\d]+[^\s\"]+).swf\[/media\]#i",$text,$media_matches[6],PREG_SET_ORDER);
+       $media_replace[6] = "<object type=\"application/x-shockwave-flash\" data=\"##MEDIA1##.swf\" width=\"##WIDTH##\" height=\"##HEIGHT##\">  <param name=\"movie\" value=\"##MEDIA1##.swf\"><param name=\"loop\" value=\"false\"><a href=\"##MEDIA1##.swf\">##MEDIA1##.swf</a></object>";
+       
+       // .mp3
+       preg_match_all("#\[media[0-9a-z\|]*\](.+[^\s\"]+).mp3\[/media\]#i",$text,$media_matches[7],PREG_SET_ORDER);
+       $media_replace[7] = "<object type=\"audio/mpeg\" data=\"##MEDIA1##.mp3\" width=\"##WIDTH##\" height=\"##HEIGHT##\"><param name=\"src\" value=\"##MEDIA1##.mp3\"><param name=\"autoplay\" value=\"false\"><param name=\"autoStart\" value=\"0\"><a href=\"##MEDIA1##.mp3\">##MEDIA1##.mp3</a></object>";
+       
+       // .wav
+       preg_match_all("#\[media[0-9a-z\|]*\](.+[^\s\"]+).wav\[/media\]#i",$text,$media_matches[8],PREG_SET_ORDER);
+       $media_replace[8] ="<object type=\"audio/x-wav\" data=\"##MEDIA1##.wav\" width=\"##WIDTH##\" height=\"##HEIGHT##\"><param name=\"src\" value=\"##MEDIA1##.wav\"><param name=\"autoplay\" value=\"false\"><param name=\"autoStart\" value=\"0\"><a href=\"##MEDIA1##.wav\">##MEDIA1##.wav</a></object>";
+       
+       // .ogg
+       preg_match_all("#\[media[0-9a-z\|]*\](.+[^\s\"]+).ogg\[/media\]#i",$text,$media_matches[9],PREG_SET_ORDER);
+       $media_replace[9] ="<object type=\"application/ogg\" data=\"##MEDIA1##.ogg\" width=\"##WIDTH##\" height=\"##HEIGHT##\"><param name=\"src\" value=\"##MEDIA1##.ogg\"><a href=\"##MEDIA1##.ogg\">##MEDIA1##.ogg</a></object>";
+       
+       // .mid
+       preg_match_all("#\[media[0-9a-z\|]*\](.+[^\s\"]+).mid\[/media\]#i",$text,$media_matches[10],PREG_SET_ORDER);
+       $media_replace[10] ="<object type=\"application/x-midi\" data=\"##MEDIA1##.mid\" width=\"##WIDTH##\" height=\"##HEIGHT##\"><param name=\"src\" value=\"##MEDIA1##.mid\"><a href=\"##MEDIA1##.mid\">##MEDIA1##.mid</a></object>";
+       
+       $text = preg_replace("#\[media[0-9a-z\|]*\](.+[^\s\"]+).mid\[/media\]#i", "<object type=\"application/x-midi\" data=\"\\1.mid\" width=\"".$width."\" height=\"".$height."\"><param name=\"src\" value=\"\\1.mid\"><a href=\"\\1.mid\">\\1.mid</a></object>", $text);
+
+       // Executing the replace
+       for ($i=1;$i<=count($media_replace);$i++){
+               foreach($media_matches[$i] as $media)
+               {
+                       
+                       //find width and height for each matched media
+                       if (preg_match("/\[media\|([0-9]*)\|([0-9]*)\]*/", $media[0], $matches)) 
+                       {
+                               $width = $matches[1];
+                               $height = $matches[2];
+                       }
+                       else
+                       {
+                               $width = 425;
+                               $height = 350;
+                       }
+                       
+                       //replace media tags with embedded media for each media tag
+                       $media_input = $media_replace[$i];
+                       $media_input = str_replace("##WIDTH##","$width",$media_input);
+                       $media_input = str_replace("##HEIGHT##","$height",$media_input);
+                       $media_input = str_replace("##MEDIA1##","$media[1]",$media_input);
+                       $media_input = str_replace("##MEDIA2##","$media[2]",$media_input);
+                       $text = str_replace($media[0],$media_input,$text);
+               }
+       }
+               
+       return $text;
+}
+
+function make_clickable($text) {
+       $text = embed_media($text);
+
+       $text = preg_replace("/([\s])(http[s]?):\/\/([\^\s\<]*)([a-zA-Z0-9\#\?\/\&\=])/i", 
+                            "\\1<a href=\"\\2://\\3\\4\">\\3\\4</a>", $text);
+       
+       $text = preg_replace('/([_a-zA-Z0-9\-]+(\.[_a-zA-Z0-9\-]+)*'.
+                                               '\@'.'[_a-zA-Z0-9\-]+(\.[_a-zA-Z0-9\-]+)*'.'(\.[a-zA-Z]{1,6})+)/i',
+                                               "<a href=\"mailto:\\1\">\\1</a>",
+                                               $text);
+       
+       return $text;
+}
+
+function image_replace($text) {
+       /* image urls do not require http:// */
+       
+       $text = preg_replace("/\[image(\|)?([a-zA-Z0-9\s]*)\]".
+                            "[\s]*".
+                            "([a-zA-Z0-9\#\?\/\&\=\:\\\"\'\_\.\-]+)[\s]*".
+                            "((\[\/image\])|(.*\[\/image\]))/i",
+                                 "<img src=\"\\3\" alt=\"\\2\" />",
+                                 $text);
+       
+       return $text;
+}
+
+function formAF_final_output($text, $nl2br = true) {
+       global $_base_path;
+
+       $text = str_replace('CONTENT_DIR/', '', $text);
+
+       if ($nl2br) {
+               return nl2br(image_replace(make_clickable(myCodes(' '.$text, false))));
+       }
+       return image_replace(make_clickable(myCodes(' '.$text, true)));
+}
+
+/****************************************************************************************/
+/* @See: ./user/search.php & ./index.php */
+function highlight($input, $var) {//$input is the string, $var is the text to be highlighted
+       if ($var != "") {
+               $xtemp = "";
+               $i=0;
+               /*
+                       The following 'if' statement is a check to ensure that the search term is not part of the tag, '<strong class="highlight">'.  Words within this string are avoided in case a previously highlighted string is used for the haystack, $input.  To avoid any html breaks in the highlighted string, the search word is avoided completely.
+               */
+               if (strpos('<strong class="highlight">', $var) !== false) {
+                       return $input;
+               }
+               while($i<strlen($input)){
+                       if((($i + strlen($var)) <= strlen($input)) && (strcasecmp($var, substr($input, $i, strlen($var))) == 0)) {
+                               $xtemp .= '<strong class="highlight">' . substr($input, $i , strlen($var)) . '</strong>';
+                               $i += strlen($var);
+                       }
+                       else {
+                               $xtemp .= $input{$i};
+                               $i++;
+                       }
+               }
+               $input = $xtemp;
+       }
+       return $input;
+}
+
+
+/* @See: ./index.php */
+function formAF_content($input, $html = 0, $glossary, $simple = false) {
+       global $_base_path, $_config_defaults;
+
+       if (!$html) {
+               $input = str_replace('<', '&lt;', $input);
+               $input = str_replace('&lt;?php', '<?php', $input); // for bug #2087
+       }
+
+       /* do the glossary search and replace: */
+       if (is_array($glossary)) {
+               foreach ($glossary as $k => $v) {
+                       $k = urldecode($k);
+                       $v = str_replace("\n", '<br />', $v);
+                       $v = str_replace("\r", '', $v);
+
+                       /* escape special characters */
+                       $k = preg_quote($k);
+
+                       $k = str_replace('&lt;', '<', $k);
+                       $k = str_replace('/', '\/', $k);
+
+                       $original_term = $k;
+                       $term = $original_term;
+
+                       $term = '(\s*'.$term.'\s*)';
+                       $term = str_replace(' ','((<br \/>)*\s*)', $term); 
+
+                       $def = htmlspecialchars($v);            
+                       if ($simple) {
+                               $input = preg_replace
+                                               ("/(\[\?\])$term(\[\/\?\])/i",
+                                               '<a href="'.$simple.'glossary.html#'.urlencode($original_term).'" target="body" class="at-term">\\2</a>',
+                                               $input);
+                       } else {
+                               $input = preg_replace
+                                               ("/(\[\?\])$term(\[\/\?\])/i",
+                                               '\\2<sup><a href="'.$_base_path.'glossary/index.php?g_cid='.$_SESSION['s_cid'].SEP.'w='.urlencode($original_term).'#term" onmouseover="return overlib(\''.$def.'\', CAPTION, \''.addslashes($original_term).'\', AUTOSTATUS);" onmouseout="return nd();" onfocus="return overlib(\''.$def.'\', CAPTION, \''.addslashes($original_term).'\', AUTOSTATUS);" onblur="return nd();"><span style="color: blue; text-decoration: none;font-size:small; font-weight:bolder;">?</span></a></sup>',
+                                               $input);
+                       }
+               }
+       } else if (!$user_glossary) {
+               $input = str_replace(array('[?]','[/?]'), '', $input);
+       }
+
+       $input = str_replace('CONTENT_DIR', '', $input);
+
+       if (isset($_config_defaults['latex_server']) && $_config_defaults['latex_server']) {
+               // see: http://www.forkosh.com/mimetex.html
+               $input = preg_replace('/\[tex\](.*?)\[\/tex\]/sie', "'<img src=\"'.\$_config_defaults['latex_server'].rawurlencode('$1').'\" align=\"middle\">'", $input);
+       }
+
+       if ($html) {
+               $x = formAF_final_output($input, false);
+               return $x;
+       }
+
+       $output = formAF_final_output($input);
+
+       $output = '<p>'.$output.'</p>';
+
+       return $output;
+}
+
+/***********************************************************************
+       @See /include/Classes/Message/Message.class.php
+       Jacek Materna
+*/
+
+/**
+* Take a code as input and grab its language specific message. Also cache the resulting 
+* message. Return the message. Same as get_message but key value in cache is string
+* @access  public
+* @param   string $codes       Message Code to translate - > 'term' field in DB
+* @return  string                      The translated language specific message for code $code
+* @author  Jacek Materna
+*/
+function getTranslatedCodeStr($codes) {
+       
+       /* this is where we want to get the msgs from the database inside a static variable */
+       global $_cache_msgs_new;
+       static $_msgs_new;
+
+       if (!isset($_msgs_new)) {
+               if ( !($lang_et = cache(120, 'msgs_new', $_SESSION['lang'])) ) {
+                       global $db, $_base_path;
+
+                       $parent = Language::getParentCode($_SESSION['lang']);
+
+                       /* get $_msgs_new from the DB */
+                       $sql    = 'SELECT * FROM '.TABLE_PREFIX.'language_text WHERE variable="_msgs" AND (language_code="'.$_SESSION['lang'].'" OR language_code="'.$parent.'")';
+                       $result = @mysql_query($sql, $db);
+                       $i = 1;
+                       while ($row = @mysql_fetch_assoc($result)) {
+                               // do not cache key as a digit (no contstant(), use string)
+                               $_cache_msgs_new[$row['term']] = str_replace('SITE_URL/', $_base_path, $row['text']);
+                               if (AF_DEVEL) {
+                                       $_cache_msgs_new[$row['term']] .= ' <small><small>('.$row['term'].')</small></small>';
+                               }
+                       }
+
+                       cache_variable('_cache_msgs_new');
+                       endcache(true, false);
+               }
+               $_msgs_new = $_cache_msgs_new;
+       }
+
+       if (is_array($codes)) {
+               /* this is an array with terms to replace */            
+               $code           = array_shift($codes);
+
+               $message        = $_msgs_new[$code];
+               $terms          = $codes;
+
+               /* replace the tokens with the terms */
+               $message        = vsprintf($message, $terms);
+
+       } else {
+               $message = $_msgs_new[$codes];
+
+               if ($message == '') {
+                       /* the language for this msg is missing: */
+               
+                       $sql    = 'SELECT * FROM '.TABLE_PREFIX.'language_text WHERE variable="_msgs"';
+                       $result = @mysql_query($sql, $db);
+                       $i = 1;
+                       while ($row = @mysql_fetch_assoc($result)) {
+                               if (($row['term']) === $codes) {
+                                       $message = '['.$row['term'].']';
+                                       break;
+                               }
+                       }
+               }
+               $code = $codes;
+       }
+       return $message;
+}
+
+function html_get_list($array) {
+       $list = '';
+       foreach ($array as $value) {
+               $list .= '<li>'.$value.'</li>';
+       }
+       return $list;
+}
+
+/**
+ * print_paginator
+ *
+ * print out list of page links
+ */
+function print_paginator($current_page, $num_rows, $request_args, $rows_per_page = 50, $window = 5) {
+       $num_pages = ceil($num_rows / $rows_per_page);
+       $request_args = '?'.$request_args;
+
+    if ($num_rows) {
+               echo '<div class="paging">';
+           echo '<ul>';
+               
+               $i=max($current_page-$window - max($window-$num_pages+$current_page,0), 1);
+
+               if ($i > 1) {
+                       echo '<li><a href="'.$_SERVER['PHP_SELF'].$request_args.htmlspecialchars(SEP).'p=1">1</a></li>';
+                       if ($i > 2) {
+                       echo '<li>&hellip;</li>';
+                       }
+               }
+
+               for ($i; $i<= min($current_page+$window -min($current_page-$window,0),$num_pages); $i++) {
+                       if ($current_page == $i) {
+                               echo '<li><a href="'.$_SERVER['PHP_SELF'].$request_args.htmlspecialchars(SEP).'p='.$i.'" class="current"><em>'.$current_page.'</em></a></li>';
+                       } else {
+                               echo '<li><a href="'.$_SERVER['PHP_SELF'].$request_args.htmlspecialchars(SEP).'p='.$i.'">'.$i.'</a></li>';
+                       }
+               }
+        if ($i <= $num_pages) {
+                       if ($i < $num_pages) {
+                       echo '<li>&hellip;</li>';
+               }
+                       echo '<li><a href="'.$_SERVER['PHP_SELF'].$request_args.htmlspecialchars(SEP).'p='.$num_pages.'">'.$num_pages.'</a></li>';
+               }
+               echo '</ul>';
+               echo '</div>';
+       }
+}
+
+/**
+* apply_timezone
+* converts a unix timestamp into another UNIX timestamp with timezone offset added up.
+* Adds the user's timezone offset, then converts back to a MYSQL timestamp
+* Available both as a system config option, and a user preference, if both are set
+* they are added together
+* @param   date         MYSQL timestamp.
+* @return  date  MYSQL timestamp plus user's and/or system's timezone offset.
+* @author  Greg Gay  .
+*/
+function apply_timezone($timestamp){
+       global $_config;
+
+       if($_config['time_zone']){
+               $timestamp = ($timestamp + ($_config['time_zone']*3600));
+       }
+
+       if(isset($_SESSION['prefs']['PREF_TIMEZONE'])){
+               $timestamp = ($timestamp + ($_SESSION['prefs']['PREF_TIMEZONE']*3600));
+       }
+
+       return $timestamp;
+}
+?>
diff --git a/docs/include/lib/pclzip.lib.php b/docs/include/lib/pclzip.lib.php
new file mode 100644 (file)
index 0000000..7ee8a44
--- /dev/null
@@ -0,0 +1,5207 @@
+<?php
+// --------------------------------------------------------------------------------
+// PhpConcept Library - Zip Module 2.3
+// --------------------------------------------------------------------------------
+// License GNU/LGPL - Vincent Blavet - November 2004
+// http://www.phpconcept.net
+// --------------------------------------------------------------------------------
+//
+// Presentation :
+//   PclZip is a PHP library that manage ZIP archives.
+//   So far tests show that archives generated by PclZip are readable by
+//   WinZip application and other tools.
+//
+// Description :
+//   See readme.txt and http://www.phpconcept.net
+//
+// Warning :
+//   This library and the associated files are non commercial, non professional
+//   work.
+//   It should not have unexpected results. However if any damage is caused by
+//   this software the author can not be responsible.
+//   The use of this software is at the risk of the user.
+//
+// --------------------------------------------------------------------------------
+// $Id: pclzip.lib.php 5443 2005-09-12 15:28:54Z joel $
+// --------------------------------------------------------------------------------
+
+  // ----- Constants
+  define( 'PCLZIP_READ_BLOCK_SIZE', 2048 );
+  
+  // ----- File list separator
+  // In version 1.x of PclZip, the separator for file list is a space
+  // (which is not a very smart choice, specifically for windows paths !).
+  // A better separator should be a comma (,). This constant gives you the
+  // abilty to change that.
+  // However notice that changing this value, may have impact on existing
+  // scripts, using space separated filenames.
+  // Recommanded values for compatibility with older versions :
+  //define( 'PCLZIP_SEPARATOR', ' ' );
+  // Recommanded values for smart separation of filenames.
+  define( 'PCLZIP_SEPARATOR', ',' );
+
+  // ----- Error configuration
+  // 0 : PclZip Class integrated error handling
+  // 1 : PclError external library error handling. By enabling this
+  //     you must ensure that you have included PclError library.
+  // [2,...] : reserved for futur use
+  define( 'PCLZIP_ERROR_EXTERNAL', 0 );
+
+  // ----- Optional static temporary directory
+  //       By default temporary files are generated in the script current
+  //       path.
+  //       If defined :
+  //       - MUST BE terminated by a '/'.
+  //       - MUST be a valid, already created directory
+  //       Samples :
+  // define( 'PCLZIP_TEMPORARY_DIR', '/temp/' );
+  // define( 'PCLZIP_TEMPORARY_DIR', 'C:/Temp/' );
+  define( 'PCLZIP_TEMPORARY_DIR', '' );
+
+// --------------------------------------------------------------------------------
+// ***** UNDER THIS LINE NOTHING NEEDS TO BE MODIFIED *****
+// --------------------------------------------------------------------------------
+
+  // ----- Global variables
+  $g_pclzip_version = "2.3";
+
+  // ----- Error codes
+  //   -1 : Unable to open file in binary write mode
+  //   -2 : Unable to open file in binary read mode
+  //   -3 : Invalid parameters
+  //   -4 : File does not exist
+  //   -5 : Filename is too long (max. 255)
+  //   -6 : Not a valid zip file
+  //   -7 : Invalid extracted file size
+  //   -8 : Unable to create directory
+  //   -9 : Invalid archive extension
+  //  -10 : Invalid archive format
+  //  -11 : Unable to delete file (unlink)
+  //  -12 : Unable to rename file (rename)
+  //  -13 : Invalid header checksum
+  //  -14 : Invalid archive size
+  define( 'PCLZIP_ERR_USER_ABORTED', 2 );
+  define( 'PCLZIP_ERR_NO_ERROR', 0 );
+  define( 'PCLZIP_ERR_WRITE_OPEN_FAIL', -1 );
+  define( 'PCLZIP_ERR_READ_OPEN_FAIL', -2 );
+  define( 'PCLZIP_ERR_INVALID_PARAMETER', -3 );
+  define( 'PCLZIP_ERR_MISSING_FILE', -4 );
+  define( 'PCLZIP_ERR_FILENAME_TOO_LONG', -5 );
+  define( 'PCLZIP_ERR_INVALID_ZIP', -6 );
+  define( 'PCLZIP_ERR_BAD_EXTRACTED_FILE', -7 );
+  define( 'PCLZIP_ERR_DIR_CREATE_FAIL', -8 );
+  define( 'PCLZIP_ERR_BAD_EXTENSION', -9 );
+  define( 'PCLZIP_ERR_BAD_FORMAT', -10 );
+  define( 'PCLZIP_ERR_DELETE_FILE_FAIL', -11 );
+  define( 'PCLZIP_ERR_RENAME_FILE_FAIL', -12 );
+  define( 'PCLZIP_ERR_BAD_CHECKSUM', -13 );
+  define( 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP', -14 );
+  define( 'PCLZIP_ERR_MISSING_OPTION_VALUE', -15 );
+  define( 'PCLZIP_ERR_INVALID_OPTION_VALUE', -16 );
+  define( 'PCLZIP_ERR_ALREADY_A_DIRECTORY', -17 );
+  define( 'PCLZIP_ERR_UNSUPPORTED_COMPRESSION', -18 );
+  define( 'PCLZIP_ERR_UNSUPPORTED_ENCRYPTION', -19 );
+
+  // ----- Options values
+  define( 'PCLZIP_OPT_PATH', 77001 );
+  define( 'PCLZIP_OPT_ADD_PATH', 77002 );
+  define( 'PCLZIP_OPT_REMOVE_PATH', 77003 );
+  define( 'PCLZIP_OPT_REMOVE_ALL_PATH', 77004 );
+  define( 'PCLZIP_OPT_SET_CHMOD', 77005 );
+  define( 'PCLZIP_OPT_EXTRACT_AS_STRING', 77006 );
+  define( 'PCLZIP_OPT_NO_COMPRESSION', 77007 );
+  define( 'PCLZIP_OPT_BY_NAME', 77008 );
+  define( 'PCLZIP_OPT_BY_INDEX', 77009 );
+  define( 'PCLZIP_OPT_BY_EREG', 77010 );
+  define( 'PCLZIP_OPT_BY_PREG', 77011 );
+  define( 'PCLZIP_OPT_COMMENT', 77012 );
+  define( 'PCLZIP_OPT_ADD_COMMENT', 77013 );
+  define( 'PCLZIP_OPT_PREPEND_COMMENT', 77014 );
+  define( 'PCLZIP_OPT_EXTRACT_IN_OUTPUT', 77015 );
+  define( 'PCLZIP_OPT_REPLACE_NEWER', 77016 );
+  define( 'PCLZIP_OPT_STOP_ON_ERROR', 77017 );
+  // Having big trouble with crypt. Need to multiply 2 long int
+  // which is not correctly supported by PHP ...
+  //define( 'PCLZIP_OPT_CRYPT', 77018 );
+
+  // ----- Call backs values
+  define( 'PCLZIP_CB_PRE_EXTRACT', 78001 );
+  define( 'PCLZIP_CB_POST_EXTRACT', 78002 );
+  define( 'PCLZIP_CB_PRE_ADD', 78003 );
+  define( 'PCLZIP_CB_POST_ADD', 78004 );
+  /* For futur use
+  define( 'PCLZIP_CB_PRE_LIST', 78005 );
+  define( 'PCLZIP_CB_POST_LIST', 78006 );
+  define( 'PCLZIP_CB_PRE_DELETE', 78007 );
+  define( 'PCLZIP_CB_POST_DELETE', 78008 );
+  */
+
+  // --------------------------------------------------------------------------------
+  // Class : PclZip
+  // Description :
+  //   PclZip is the class that represent a Zip archive.
+  //   The public methods allow the manipulation of the archive.
+  // Attributes :
+  //   Attributes must not be accessed directly.
+  // Methods :
+  //   PclZip() : Object creator
+  //   create() : Creates the Zip archive
+  //   listContent() : List the content of the Zip archive
+  //   extract() : Extract the content of the archive
+  //   properties() : List the properties of the archive
+  // --------------------------------------------------------------------------------
+   class PclZip
+  {
+    // ----- Filename of the zip file
+    var $zipname = '';
+
+    // ----- File descriptor of the zip file
+    var $zip_fd = 0;
+
+    // ----- Internal error handling
+    var $error_code = 1;
+    var $error_string = '';
+
+  // --------------------------------------------------------------------------------
+  // Function : PclZip()
+  // Description :
+  //   Creates a PclZip object and set the name of the associated Zip archive
+  //   filename.
+  //   Note that no real action is taken, if the archive does not exist it is not
+  //   created. Use create() for that.
+  // --------------------------------------------------------------------------------
+  function PclZip($p_zipname)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::PclZip', "zipname=$p_zipname");
+
+    // ----- Tests the zlib
+    if (!function_exists('gzopen'))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 1, "zlib extension seems to be missing");
+      die('Abort '.basename(__FILE__).' : Missing zlib extensions');
+    }
+
+    // ----- Set the attributes
+    $this->zipname = $p_zipname;
+    $this->zip_fd = 0;
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 1);
+    return;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function :
+  //   create($p_filelist, $p_add_dir="", $p_remove_dir="")
+  //   create($p_filelist, $p_option, $p_option_value, ...)
+  // Description :
+  //   This method supports two different synopsis. The first one is historical.
+  //   This method creates a Zip Archive. The Zip file is created in the
+  //   filesystem. The files and directories indicated in $p_filelist
+  //   are added in the archive. See the parameters description for the
+  //   supported format of $p_filelist.
+  //   When a directory is in the list, the directory and its content is added
+  //   in the archive.
+  //   In this synopsis, the function takes an optional variable list of
+  //   options. See bellow the supported options.
+  // Parameters :
+  //   $p_filelist : An array containing file or directory names, or
+  //                 a string containing one filename or one directory name, or
+  //                 a string containing a list of filenames and/or directory
+  //                 names separated by spaces.
+  //   $p_add_dir : A path to add before the real path of the archived file,
+  //                in order to have it memorized in the archive.
+  //   $p_remove_dir : A path to remove from the real path of the file to archive,
+  //                   in order to have a shorter path memorized in the archive.
+  //                   When $p_add_dir and $p_remove_dir are set, $p_remove_dir
+  //                   is removed first, before $p_add_dir is added.
+  // Options :
+  //   PCLZIP_OPT_ADD_PATH :
+  //   PCLZIP_OPT_REMOVE_PATH :
+  //   PCLZIP_OPT_REMOVE_ALL_PATH :
+  //   PCLZIP_OPT_COMMENT :
+  //   PCLZIP_CB_PRE_ADD :
+  //   PCLZIP_CB_POST_ADD :
+  // Return Values :
+  //   0 on failure,
+  //   The list of the added files, with a status of the add action.
+  //   (see PclZip::listContent() for list entry format)
+  // --------------------------------------------------------------------------------
+//  function create($p_filelist, $p_add_dir="", $p_remove_dir="")
+  function create($p_filelist /*, options */)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::create', "filelist='$p_filelist', ...");
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Set default values
+    $v_options = array();
+    $v_add_path = "";
+    $v_remove_path = "";
+    $v_remove_all_path = false;
+    $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE;
+
+    // ----- Look for variable options arguments
+    $v_size = func_num_args();
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
+
+    // ----- Look for arguments
+    if ($v_size > 1) {
+      // ----- Get the arguments
+      $v_arg_list = &func_get_args();
+
+      // ----- Remove form the options list the first argument
+      array_shift($v_arg_list);
+      $v_size--;
+
+      // ----- Look for first arg
+      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options detected");
+
+        // ----- Parse the options
+        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
+                                            array (PCLZIP_OPT_REMOVE_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
+                                                   PCLZIP_OPT_ADD_PATH => 'optional',
+                                                   PCLZIP_CB_PRE_ADD => 'optional',
+                                                   PCLZIP_CB_POST_ADD => 'optional',
+                                                   PCLZIP_OPT_NO_COMPRESSION => 'optional',
+                                                   PCLZIP_OPT_COMMENT => 'optional'
+                                                   //, PCLZIP_OPT_CRYPT => 'optional'
+                                                                                                  ));
+        if ($v_result != 1) {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+          return 0;
+        }
+
+        // ----- Set the arguments
+        if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
+          $v_add_path = $v_options[PCLZIP_OPT_ADD_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
+          $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
+          $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
+        }
+      }
+
+      // ----- Look for 2 args
+      // Here we need to support the first historic synopsis of the
+      // method.
+      else {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
+
+        // ----- Get the first argument
+        $v_add_path = $v_arg_list[0];
+
+        // ----- Look for the optional second argument
+        if ($v_size == 2) {
+          $v_remove_path = $v_arg_list[1];
+        }
+        else if ($v_size > 2) {
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
+                                      "Invalid number / type of arguments");
+
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+          return 0;
+        }
+      }
+    }
+
+    // ----- Trace
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "add_path='$v_add_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_all_path?'true':'false')."'");
+
+    // ----- Look if the $p_filelist is really an array
+    $p_result_list = array();
+    if (is_array($p_filelist))
+    {
+      // ----- Call the create fct
+      $v_result = $this->privCreate($p_filelist, $p_result_list, $v_add_path, $v_remove_path, $v_remove_all_path, $v_options);
+    }
+
+    // ----- Look if the $p_filelist is a string
+    else if (is_string($p_filelist))
+    {
+      // ----- Create a list with the elements from the string
+      $v_list = explode(PCLZIP_SEPARATOR, $p_filelist);
+
+      // ----- Call the create fct
+      $v_result = $this->privCreate($v_list, $p_result_list, $v_add_path, $v_remove_path, $v_remove_all_path, $v_options);
+    }
+
+    // ----- Invalid variable
+    else
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist");
+      $v_result = PCLZIP_ERR_INVALID_PARAMETER;
+    }
+
+    if ($v_result != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return 0;
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_result_list);
+    return $p_result_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function :
+  //   add($p_filelist, $p_add_dir="", $p_remove_dir="")
+  //   add($p_filelist, $p_option, $p_option_value, ...)
+  // Description :
+  //   This method supports two synopsis. The first one is historical.
+  //   This methods add the list of files in an existing archive.
+  //   If a file with the same name already exists, it is added at the end of the
+  //   archive, the first one is still present.
+  //   If the archive does not exist, it is created.
+  // Parameters :
+  //   $p_filelist : An array containing file or directory names, or
+  //                 a string containing one filename or one directory name, or
+  //                 a string containing a list of filenames and/or directory
+  //                 names separated by spaces.
+  //   $p_add_dir : A path to add before the real path of the archived file,
+  //                in order to have it memorized in the archive.
+  //   $p_remove_dir : A path to remove from the real path of the file to archive,
+  //                   in order to have a shorter path memorized in the archive.
+  //                   When $p_add_dir and $p_remove_dir are set, $p_remove_dir
+  //                   is removed first, before $p_add_dir is added.
+  // Options :
+  //   PCLZIP_OPT_ADD_PATH :
+  //   PCLZIP_OPT_REMOVE_PATH :
+  //   PCLZIP_OPT_REMOVE_ALL_PATH :
+  //   PCLZIP_OPT_COMMENT :
+  //   PCLZIP_OPT_ADD_COMMENT :
+  //   PCLZIP_OPT_PREPEND_COMMENT :
+  //   PCLZIP_CB_PRE_ADD :
+  //   PCLZIP_CB_POST_ADD :
+  // Return Values :
+  //   0 on failure,
+  //   The list of the added files, with a status of the add action.
+  //   (see PclZip::listContent() for list entry format)
+  // --------------------------------------------------------------------------------
+//  function add($p_filelist, $p_add_dir="", $p_remove_dir="")
+  function add($p_filelist /* options */)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::add', "filelist='$p_filelist', ...");
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Set default values
+    $v_options = array();
+    $v_add_path = "";
+    $v_remove_path = "";
+    $v_remove_all_path = false;
+    $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE;
+
+    // ----- Look for variable options arguments
+    $v_size = func_num_args();
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
+
+    // ----- Look for arguments
+    if ($v_size > 1) {
+      // ----- Get the arguments
+      $v_arg_list = &func_get_args();
+
+      // ----- Remove form the options list the first argument
+      array_shift($v_arg_list);
+      $v_size--;
+
+      // ----- Look for first arg
+      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options detected");
+
+        // ----- Parse the options
+        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
+                                            array (PCLZIP_OPT_REMOVE_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
+                                                   PCLZIP_OPT_ADD_PATH => 'optional',
+                                                   PCLZIP_CB_PRE_ADD => 'optional',
+                                                   PCLZIP_CB_POST_ADD => 'optional',
+                                                   PCLZIP_OPT_NO_COMPRESSION => 'optional',
+                                                   PCLZIP_OPT_COMMENT => 'optional',
+                                                   PCLZIP_OPT_ADD_COMMENT => 'optional',
+                                                   PCLZIP_OPT_PREPEND_COMMENT => 'optional'
+                                                   //, PCLZIP_OPT_CRYPT => 'optional'
+                                                                                                  ));
+        if ($v_result != 1) {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+          return 0;
+        }
+
+        // ----- Set the arguments
+        if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
+          $v_add_path = $v_options[PCLZIP_OPT_ADD_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
+          $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
+          $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
+        }
+      }
+
+      // ----- Look for 2 args
+      // Here we need to support the first historic synopsis of the
+      // method.
+      else {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
+
+        // ----- Get the first argument
+        $v_add_path = $v_arg_list[0];
+
+        // ----- Look for the optional second argument
+        if ($v_size == 2) {
+          $v_remove_path = $v_arg_list[1];
+        }
+        else if ($v_size > 2) {
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
+
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+          return 0;
+        }
+      }
+    }
+
+    // ----- Trace
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "add_path='$v_add_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_all_path?'true':'false')."'");
+
+    // ----- Look if the $p_filelist is really an array
+    $p_result_list = array();
+    if (is_array($p_filelist))
+    {
+      // ----- Call the create fct
+      $v_result = $this->privAdd($p_filelist, $p_result_list, $v_add_path, $v_remove_path, $v_remove_all_path, $v_options);
+    }
+
+    // ----- Look if the $p_filelist is a string
+    else if (is_string($p_filelist))
+    {
+      // ----- Create a list with the elements from the string
+      $v_list = explode(PCLZIP_SEPARATOR, $p_filelist);
+
+      // ----- Call the create fct
+      $v_result = $this->privAdd($v_list, $p_result_list, $v_add_path, $v_remove_path, $v_remove_all_path, $v_options);
+    }
+
+    // ----- Invalid variable
+    else
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist");
+      $v_result = PCLZIP_ERR_INVALID_PARAMETER;
+    }
+
+    if ($v_result != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return 0;
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_result_list);
+    return $p_result_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : listContent()
+  // Description :
+  //   This public method, gives the list of the files and directories, with their
+  //   properties.
+  //   The properties of each entries in the list are (used also in other functions) :
+  //     filename : Name of the file. For a create or add action it is the filename
+  //                given by the user. For an extract function it is the filename
+  //                of the extracted file.
+  //     stored_filename : Name of the file / directory stored in the archive.
+  //     size : Size of the stored file.
+  //     compressed_size : Size of the file's data compressed in the archive
+  //                       (without the headers overhead)
+  //     mtime : Last known modification date of the file (UNIX timestamp)
+  //     comment : Comment associated with the file
+  //     folder : true | false
+  //     index : index of the file in the archive
+  //     status : status of the action (depending of the action) :
+  //              Values are :
+  //                ok : OK !
+  //                filtered : the file / dir is not extracted (filtered by user)
+  //                already_a_directory : the file can not be extracted because a
+  //                                      directory with the same name already exists
+  //                write_protected : the file can not be extracted because a file
+  //                                  with the same name already exists and is
+  //                                  write protected
+  //                newer_exist : the file was not extracted because a newer file exists
+  //                path_creation_fail : the file is not extracted because the folder
+  //                                     does not exists and can not be created
+  //                write_error : the file was not extracted because there was a
+  //                              error while writing the file
+  //                read_error : the file was not extracted because there was a error
+  //                             while reading the file
+  //                invalid_header : the file was not extracted because of an archive
+  //                                 format error (bad file header)
+  //   Note that each time a method can continue operating when there
+  //   is an action error on a file, the error is only logged in the file status.
+  // Return Values :
+  //   0 on an unrecoverable failure,
+  //   The list of the files in the archive.
+  // --------------------------------------------------------------------------------
+  function listContent()
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::listContent', "");
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return(0);
+    }
+
+    // ----- Call the extracting fct
+    $p_list = array();
+    if (($v_result = $this->privList($p_list)) != 1)
+    {
+      unset($p_list);
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
+      return(0);
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
+    return $p_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function :
+  //   extract($p_path="./", $p_remove_path="")
+  //   extract([$p_option, $p_option_value, ...])
+  // Description :
+  //   This method supports two synopsis. The first one is historical.
+  //   This method extract all the files / directories from the archive to the
+  //   folder indicated in $p_path.
+  //   If you want to ignore the 'root' part of path of the memorized files
+  //   you can indicate this in the optional $p_remove_path parameter.
+  //   By default, if a newer file with the same name already exists, the
+  //   file is not extracted.
+  //
+  //   If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH aoptions
+  //   are used, the path indicated in PCLZIP_OPT_ADD_PATH is append
+  //   at the end of the path value of PCLZIP_OPT_PATH.
+  // Parameters :
+  //   $p_path : Path where the files and directories are to be extracted
+  //   $p_remove_path : First part ('root' part) of the memorized path
+  //                    (if any similar) to remove while extracting.
+  // Options :
+  //   PCLZIP_OPT_PATH :
+  //   PCLZIP_OPT_ADD_PATH :
+  //   PCLZIP_OPT_REMOVE_PATH :
+  //   PCLZIP_OPT_REMOVE_ALL_PATH :
+  //   PCLZIP_CB_PRE_EXTRACT :
+  //   PCLZIP_CB_POST_EXTRACT :
+  // Return Values :
+  //   0 or a negative value on failure,
+  //   The list of the extracted files, with a status of the action.
+  //   (see PclZip::listContent() for list entry format)
+  // --------------------------------------------------------------------------------
+  //function extract($p_path="./", $p_remove_path="")
+  function extract(/* options */)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::extract", "");
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return(0);
+    }
+
+    // ----- Set default values
+    $v_options = array();
+    $v_path = "./";
+    $v_remove_path = "";
+    $v_remove_all_path = false;
+
+    // ----- Look for variable options arguments
+    $v_size = func_num_args();
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
+
+    // ----- Default values for option
+    $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
+
+    // ----- Look for arguments
+    if ($v_size > 0) {
+      // ----- Get the arguments
+      $v_arg_list = &func_get_args();
+
+      // ----- Look for first arg
+      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options");
+
+        // ----- Parse the options
+        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
+                                            array (PCLZIP_OPT_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
+                                                   PCLZIP_OPT_ADD_PATH => 'optional',
+                                                   PCLZIP_CB_PRE_EXTRACT => 'optional',
+                                                   PCLZIP_CB_POST_EXTRACT => 'optional',
+                                                   PCLZIP_OPT_SET_CHMOD => 'optional',
+                                                   PCLZIP_OPT_BY_NAME => 'optional',
+                                                   PCLZIP_OPT_BY_EREG => 'optional',
+                                                   PCLZIP_OPT_BY_PREG => 'optional',
+                                                   PCLZIP_OPT_BY_INDEX => 'optional',
+                                                   PCLZIP_OPT_EXTRACT_AS_STRING => 'optional',
+                                                   PCLZIP_OPT_EXTRACT_IN_OUTPUT => 'optional',
+                                                   PCLZIP_OPT_REPLACE_NEWER => 'optional'
+                                                   ,PCLZIP_OPT_STOP_ON_ERROR => 'optional'
+                                                                                                   ));
+        if ($v_result != 1) {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+          return 0;
+        }
+
+        // ----- Set the arguments
+        if (isset($v_options[PCLZIP_OPT_PATH])) {
+          $v_path = $v_options[PCLZIP_OPT_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
+          $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
+          $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
+          // ----- Check for '/' in last path char
+          if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) {
+            $v_path .= '/';
+          }
+          $v_path .= $v_options[PCLZIP_OPT_ADD_PATH];
+        }
+      }
+
+      // ----- Look for 2 args
+      // Here we need to support the first historic synopsis of the
+      // method.
+      else {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
+
+        // ----- Get the first argument
+        $v_path = $v_arg_list[0];
+
+        // ----- Look for the optional second argument
+        if ($v_size == 2) {
+          $v_remove_path = $v_arg_list[1];
+        }
+        else if ($v_size > 2) {
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
+
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
+          return 0;
+        }
+      }
+    }
+
+    // ----- Trace
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "path='$v_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_path?'true':'false')."'");
+
+    // ----- Call the extracting fct
+    $p_list = array();
+    $v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path,
+                                            $v_remove_all_path, $v_options);
+    if ($v_result < 1) {
+      unset($p_list);
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
+      return(0);
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
+    return $p_list;
+  }
+  // --------------------------------------------------------------------------------
+
+
+  // --------------------------------------------------------------------------------
+  // Function :
+  //   extractByIndex($p_index, $p_path="./", $p_remove_path="")
+  //   extractByIndex($p_index, [$p_option, $p_option_value, ...])
+  // Description :
+  //   This method supports two synopsis. The first one is historical.
+  //   This method is doing a partial extract of the archive.
+  //   The extracted files or folders are identified by their index in the
+  //   archive (from 0 to n).
+  //   Note that if the index identify a folder, only the folder entry is
+  //   extracted, not all the files included in the archive.
+  // Parameters :
+  //   $p_index : A single index (integer) or a string of indexes of files to
+  //              extract. The form of the string is "0,4-6,8-12" with only numbers
+  //              and '-' for range or ',' to separate ranges. No spaces or ';'
+  //              are allowed.
+  //   $p_path : Path where the files and directories are to be extracted
+  //   $p_remove_path : First part ('root' part) of the memorized path
+  //                    (if any similar) to remove while extracting.
+  // Options :
+  //   PCLZIP_OPT_PATH :
+  //   PCLZIP_OPT_ADD_PATH :
+  //   PCLZIP_OPT_REMOVE_PATH :
+  //   PCLZIP_OPT_REMOVE_ALL_PATH :
+  //   PCLZIP_OPT_EXTRACT_AS_STRING : The files are extracted as strings and
+  //     not as files.
+  //     The resulting content is in a new field 'content' in the file
+  //     structure.
+  //     This option must be used alone (any other options are ignored).
+  //   PCLZIP_CB_PRE_EXTRACT :
+  //   PCLZIP_CB_POST_EXTRACT :
+  // Return Values :
+  //   0 on failure,
+  //   The list of the extracted files, with a status of the action.
+  //   (see PclZip::listContent() for list entry format)
+  // --------------------------------------------------------------------------------
+  function extractByIndex($p_index /* $options */)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::extractByIndex", "index='$p_index', ...");
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return(0);
+    }
+
+    // ----- Set default values
+    $v_options = array();
+    $v_path = "./";
+    $v_remove_path = "";
+    $v_remove_all_path = false;
+
+    // ----- Look for variable options arguments
+    $v_size = func_num_args();
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
+
+    // ----- Default values for option
+    $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
+
+    // ----- Look for arguments
+    if ($v_size > 1) {
+      // ----- Get the arguments
+      $v_arg_list = &func_get_args();
+
+      // ----- Remove form the options list the first argument
+      array_shift($v_arg_list);
+      $v_size--;
+
+      // ----- Look for first arg
+      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options");
+
+        // ----- Parse the options
+        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
+                                            array (PCLZIP_OPT_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
+                                                   PCLZIP_OPT_EXTRACT_AS_STRING => 'optional',
+                                                   PCLZIP_OPT_ADD_PATH => 'optional',
+                                                   PCLZIP_CB_PRE_EXTRACT => 'optional',
+                                                   PCLZIP_CB_POST_EXTRACT => 'optional',
+                                                   PCLZIP_OPT_SET_CHMOD => 'optional',
+                                                   PCLZIP_OPT_REPLACE_NEWER => 'optional'
+                                                   ,PCLZIP_OPT_STOP_ON_ERROR => 'optional'
+                                                                                                  ));
+        if ($v_result != 1) {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+          return 0;
+        }
+
+        // ----- Set the arguments
+        if (isset($v_options[PCLZIP_OPT_PATH])) {
+          $v_path = $v_options[PCLZIP_OPT_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
+          $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
+          $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
+          // ----- Check for '/' in last path char
+          if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) {
+            $v_path .= '/';
+          }
+          $v_path .= $v_options[PCLZIP_OPT_ADD_PATH];
+        }
+        if (!isset($v_options[PCLZIP_OPT_EXTRACT_AS_STRING])) {
+          $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Option PCLZIP_OPT_EXTRACT_AS_STRING not set.");
+        }
+        else {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Option PCLZIP_OPT_EXTRACT_AS_STRING set.");
+        }
+      }
+
+      // ----- Look for 2 args
+      // Here we need to support the first historic synopsis of the
+      // method.
+      else {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
+
+        // ----- Get the first argument
+        $v_path = $v_arg_list[0];
+
+        // ----- Look for the optional second argument
+        if ($v_size == 2) {
+          $v_remove_path = $v_arg_list[1];
+        }
+        else if ($v_size > 2) {
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
+
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+          return 0;
+        }
+      }
+    }
+
+    // ----- Trace
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "index='$p_index', path='$v_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_path?'true':'false')."'");
+
+    // ----- Trick
+    // Here I want to reuse extractByRule(), so I need to parse the $p_index
+    // with privParseOptions()
+    $v_arg_atick = array (PCLZIP_OPT_BY_INDEX, $p_index);
+    $v_options_atick = array();
+    $v_result = $this->privParseOptions($v_arg_atick, sizeof($v_arg_atick), $v_options_atick,
+                                        array (PCLZIP_OPT_BY_INDEX => 'optional' ));
+    if ($v_result != 1) {
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+        return 0;
+    }
+    $v_options[PCLZIP_OPT_BY_INDEX] = $v_options_atick[PCLZIP_OPT_BY_INDEX];
+
+    // ----- Call the extracting fct
+    if (($v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, $v_remove_all_path, $v_options)) < 1) {
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
+        return(0);
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
+    return $p_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function :
+  //   delete([$p_option, $p_option_value, ...])
+  // Description :
+  // Parameters :
+  //   None
+  // Options :
+  //   PCLZIP_OPT_BY_INDEX :
+  // Return Values :
+  //   0 on failure,
+  //   The list of the files which are still present in the archive.
+  //   (see PclZip::listContent() for list entry format)
+  // --------------------------------------------------------------------------------
+  function delete(/* options */)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::delete", "");
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return(0);
+    }
+
+    // ----- Set default values
+    $v_options = array();
+
+    // ----- Look for variable options arguments
+    $v_size = func_num_args();
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
+
+    // ----- Look for no arguments
+    if ($v_size <= 0) {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing arguments");
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
+        return 0;
+    }
+
+    // ----- Get the arguments
+    $v_arg_list = &func_get_args();
+
+    // ----- Parse the options
+    $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
+                                        array (PCLZIP_OPT_BY_NAME => 'optional',
+                                               PCLZIP_OPT_BY_EREG => 'optional',
+                                               PCLZIP_OPT_BY_PREG => 'optional',
+                                               PCLZIP_OPT_BY_INDEX => 'optional' ));
+    if ($v_result != 1) {
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+        return 0;
+    }
+
+    // ----- Check that at least one rule is set
+    if (   (!isset($v_options[PCLZIP_OPT_BY_NAME]))
+        && (!isset($v_options[PCLZIP_OPT_BY_EREG]))
+        && (!isset($v_options[PCLZIP_OPT_BY_PREG]))
+        && (!isset($v_options[PCLZIP_OPT_BY_INDEX]))) {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "At least one filtering rule must be set");
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
+        return 0;
+    }
+
+    // ----- Call the delete fct
+    $v_list = array();
+    if (($v_result = $this->privDeleteByRule($v_list, $v_options)) != 1)
+    {
+      unset($v_list);
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
+      return(0);
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_list);
+    return $v_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : deleteByIndex()
+  // Description :
+  //   ***** Deprecated *****
+  //   delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered.
+  // --------------------------------------------------------------------------------
+  function deleteByIndex($p_index)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::deleteByIndex", "index='$p_index'");
+    
+    $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index);
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
+    return $p_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : properties()
+  // Description :
+  //   This method gives the properties of the archive.
+  //   The properties are :
+  //     nb : Number of files in the archive
+  //     comment : Comment associated with the archive file
+  //     status : not_exist, ok
+  // Parameters :
+  //   None
+  // Return Values :
+  //   0 on failure,
+  //   An array with the archive properties.
+  // --------------------------------------------------------------------------------
+  function properties()
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::properties", "");
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return(0);
+    }
+
+    // ----- Default properties
+    $v_prop = array();
+    $v_prop['comment'] = '';
+    $v_prop['nb'] = 0;
+    $v_prop['status'] = 'not_exist';
+
+    // ----- Look if file exists
+    if (@is_file($this->zipname))
+    {
+      // ----- Open the zip file
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+      if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
+      {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), 0);
+        return 0;
+      }
+
+      // ----- Read the central directory informations
+      $v_central_dir = array();
+      if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+        return 0;
+      }
+
+      // ----- Close the zip file
+      $this->privCloseFd();
+
+      // ----- Set the user attributes
+      $v_prop['comment'] = $v_central_dir['comment'];
+      $v_prop['nb'] = $v_central_dir['entries'];
+      $v_prop['status'] = 'ok';
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_prop);
+    return $v_prop;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : duplicate()
+  // Description :
+  //   This method creates an archive by copying the content of an other one. If
+  //   the archive already exist, it is replaced by the new one without any warning.
+  // Parameters :
+  //   $p_archive : The filename of a valid archive, or
+  //                a valid PclZip object.
+  // Return Values :
+  //   1 on success.
+  //   0 or a negative value on error (error code).
+  // --------------------------------------------------------------------------------
+  function duplicate($p_archive)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::duplicate", "");
+    $v_result = 1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Look if the $p_archive is a PclZip object
+    if ((is_object($p_archive)) && (get_class($p_archive) == 'pclzip'))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The parameter is valid PclZip object '".$p_archive->zipname."'");
+
+      // ----- Duplicate the archive
+      $v_result = $this->privDuplicate($p_archive->zipname);
+    }
+
+    // ----- Look if the $p_archive is a string (so a filename)
+    else if (is_string($p_archive))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The parameter is a filename '$p_archive'");
+
+      // ----- Check that $p_archive is a valid zip file
+      // TBC : Should also check the archive format
+      if (!is_file($p_archive)) {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'");
+        $v_result = PCLZIP_ERR_MISSING_FILE;
+      }
+      else {
+        // ----- Duplicate the archive
+        $v_result = $this->privDuplicate($p_archive);
+      }
+    }
+
+    // ----- Invalid variable
+    else
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add");
+      $v_result = PCLZIP_ERR_INVALID_PARAMETER;
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : merge()
+  // Description :
+  //   This method merge the $p_archive_to_add archive at the end of the current
+  //   one ($this).
+  //   If the archive ($this) does not exist, the merge becomes a duplicate.
+  //   If the $p_archive_to_add archive does not exist, the merge is a success.
+  // Parameters :
+  //   $p_archive_to_add : It can be directly the filename of a valid zip archive,
+  //                       or a PclZip object archive.
+  // Return Values :
+  //   1 on success,
+  //   0 or negative values on error (see below).
+  // --------------------------------------------------------------------------------
+  function merge($p_archive_to_add)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::merge", "");
+    $v_result = 1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return(0);
+    }
+
+    // ----- Look if the $p_archive_to_add is a PclZip object
+    if ((is_object($p_archive_to_add)) && (get_class($p_archive_to_add) == 'pclzip'))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The parameter is valid PclZip object");
+
+      // ----- Merge the archive
+      $v_result = $this->privMerge($p_archive_to_add);
+    }
+
+    // ----- Look if the $p_archive_to_add is a string (so a filename)
+    else if (is_string($p_archive_to_add))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The parameter is a filename");
+
+      // ----- Create a temporary archive
+      $v_object_archive = new PclZip($p_archive_to_add);
+
+      // ----- Merge the archive
+      $v_result = $this->privMerge($v_object_archive);
+    }
+
+    // ----- Invalid variable
+    else
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add");
+      $v_result = PCLZIP_ERR_INVALID_PARAMETER;
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+
+
+  // --------------------------------------------------------------------------------
+  // Function : errorCode()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function errorCode()
+  {
+    if (PCLZIP_ERROR_EXTERNAL == 1) {
+      return(PclErrorCode());
+    }
+    else {
+      return($this->error_code);
+    }
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : errorName()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function errorName($p_with_code=false)
+  {
+    $v_name = array ( PCLZIP_ERR_NO_ERROR => 'PCLZIP_ERR_NO_ERROR',
+                      PCLZIP_ERR_WRITE_OPEN_FAIL => 'PCLZIP_ERR_WRITE_OPEN_FAIL',
+                      PCLZIP_ERR_READ_OPEN_FAIL => 'PCLZIP_ERR_READ_OPEN_FAIL',
+                      PCLZIP_ERR_INVALID_PARAMETER => 'PCLZIP_ERR_INVALID_PARAMETER',
+                      PCLZIP_ERR_MISSING_FILE => 'PCLZIP_ERR_MISSING_FILE',
+                      PCLZIP_ERR_FILENAME_TOO_LONG => 'PCLZIP_ERR_FILENAME_TOO_LONG',
+                      PCLZIP_ERR_INVALID_ZIP => 'PCLZIP_ERR_INVALID_ZIP',
+                      PCLZIP_ERR_BAD_EXTRACTED_FILE => 'PCLZIP_ERR_BAD_EXTRACTED_FILE',
+                      PCLZIP_ERR_DIR_CREATE_FAIL => 'PCLZIP_ERR_DIR_CREATE_FAIL',
+                      PCLZIP_ERR_BAD_EXTENSION => 'PCLZIP_ERR_BAD_EXTENSION',
+                      PCLZIP_ERR_BAD_FORMAT => 'PCLZIP_ERR_BAD_FORMAT',
+                      PCLZIP_ERR_DELETE_FILE_FAIL => 'PCLZIP_ERR_DELETE_FILE_FAIL',
+                      PCLZIP_ERR_RENAME_FILE_FAIL => 'PCLZIP_ERR_RENAME_FILE_FAIL',
+                      PCLZIP_ERR_BAD_CHECKSUM => 'PCLZIP_ERR_BAD_CHECKSUM',
+                      PCLZIP_ERR_INVALID_ARCHIVE_ZIP => 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP',
+                      PCLZIP_ERR_MISSING_OPTION_VALUE => 'PCLZIP_ERR_MISSING_OPTION_VALUE',
+                      PCLZIP_ERR_INVALID_OPTION_VALUE => 'PCLZIP_ERR_INVALID_OPTION_VALUE',
+                      PCLZIP_ERR_UNSUPPORTED_COMPRESSION => 'PCLZIP_ERR_UNSUPPORTED_COMPRESSION',
+                      PCLZIP_ERR_UNSUPPORTED_ENCRYPTION => 'PCLZIP_ERR_UNSUPPORTED_ENCRYPTION' );
+
+    if (isset($v_name[$this->error_code])) {
+      $v_value = $v_name[$this->error_code];
+    }
+    else {
+      $v_value = 'NoName';
+    }
+
+    if ($p_with_code) {
+      return($v_value.' ('.$this->error_code.')');
+    }
+    else {
+      return($v_value);
+    }
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : errorInfo()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function errorInfo($p_full=false)
+  {
+    if (PCLZIP_ERROR_EXTERNAL == 1) {
+      return(PclErrorString());
+    }
+    else {
+      if ($p_full) {
+        return($this->errorName(true)." : ".$this->error_string);
+      }
+      else {
+        return($this->error_string." [code ".$this->error_code."]");
+      }
+    }
+  }
+  // --------------------------------------------------------------------------------
+
+
+// --------------------------------------------------------------------------------
+// ***** UNDER THIS LINE ARE DEFINED PRIVATE INTERNAL FUNCTIONS *****
+// *****                                                        *****
+// *****       THESES FUNCTIONS MUST NOT BE USED DIRECTLY       *****
+// --------------------------------------------------------------------------------
+
+
+
+  // --------------------------------------------------------------------------------
+  // Function : privCheckFormat()
+  // Description :
+  //   This method check that the archive exists and is a valid zip archive.
+  //   Several level of check exists. (futur)
+  // Parameters :
+  //   $p_level : Level of check. Default 0.
+  //              0 : Check the first bytes (magic codes) (default value))
+  //              1 : 0 + Check the central directory (futur)
+  //              2 : 1 + Check each file header (futur)
+  // Return Values :
+  //   true on success,
+  //   false on error, the error code is set.
+  // --------------------------------------------------------------------------------
+  function privCheckFormat($p_level=0)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCheckFormat", "");
+    $v_result = true;
+
+       // ----- Reset the file system cache
+    clearstatcache();
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Look if the file exits
+    if (!is_file($this->zipname)) {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '".$this->zipname."'");
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, false, PclZip::errorInfo());
+      return(false);
+    }
+
+    // ----- Check that the file is readeable
+    if (!is_readable($this->zipname)) {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'");
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, false, PclZip::errorInfo());
+      return(false);
+    }
+
+    // ----- Check the magic code
+    // TBC
+
+    // ----- Check the central header
+    // TBC
+
+    // ----- Check each file header
+    // TBC
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privParseOptions()
+  // Description :
+  //   This internal methods reads the variable list of arguments ($p_options_list,
+  //   $p_size) and generate an array with the options and values ($v_result_list).
+  //   $v_requested_options contains the options that can be present and those that
+  //   must be present.
+  //   $v_requested_options is an array, with the option value as key, and 'optional',
+  //   or 'mandatory' as value.
+  // Parameters :
+  //   See above.
+  // Return Values :
+  //   1 on success.
+  //   0 on failure.
+  // --------------------------------------------------------------------------------
+  function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privParseOptions", "");
+    $v_result=1;
+
+    // ----- Read the options
+    $i=0;
+    while ($i<$p_size) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Looking for table index $i, option = '".PclZipUtilOptionText($p_options_list[$i])."(".$p_options_list[$i].")'");
+
+      // ----- Check if the option is requested
+      if (!isset($v_requested_options[$p_options_list[$i]])) {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '".$p_options_list[$i]."' for this method");
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+        return PclZip::errorCode();
+      }
+
+      // ----- Look for next option
+      switch ($p_options_list[$i]) {
+        // ----- Look for options that request a path value
+        case PCLZIP_OPT_PATH :
+        case PCLZIP_OPT_REMOVE_PATH :
+        case PCLZIP_OPT_ADD_PATH :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], false);
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
+          $i++;
+        break;
+
+        // ----- Look for options that request an array of string for value
+        case PCLZIP_OPT_BY_NAME :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          if (is_string($p_options_list[$i+1])) {
+              $v_result_list[$p_options_list[$i]][0] = $p_options_list[$i+1];
+          }
+          else if (is_array($p_options_list[$i+1])) {
+              $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
+          }
+          else {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+          ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
+          $i++;
+        break;
+
+        // ----- Look for options that request an EREG or PREG expression
+        case PCLZIP_OPT_BY_EREG :
+        case PCLZIP_OPT_BY_PREG :
+        //case PCLZIP_OPT_CRYPT :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          if (is_string($p_options_list[$i+1])) {
+              $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
+          }
+          else {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
+          $i++;
+        break;
+
+        // ----- Look for options that takes a string
+        case PCLZIP_OPT_COMMENT :
+        case PCLZIP_OPT_ADD_COMMENT :
+        case PCLZIP_OPT_PREPEND_COMMENT :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE,
+                                            "Missing parameter value for option '"
+                                                                .PclZipUtilOptionText($p_options_list[$i])
+                                                                ."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          if (is_string($p_options_list[$i+1])) {
+              $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
+          }
+          else {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE,
+                                            "Wrong parameter value for option '"
+                                                                .PclZipUtilOptionText($p_options_list[$i])
+                                                                ."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
+          $i++;
+        break;
+
+        // ----- Look for options that request an array of index
+        case PCLZIP_OPT_BY_INDEX :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          $v_work_list = array();
+          if (is_string($p_options_list[$i+1])) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is a string '".$p_options_list[$i+1]."'");
+
+              // ----- Remove spaces
+              $p_options_list[$i+1] = strtr($p_options_list[$i+1], ' ', '');
+
+              // ----- Parse items
+              $v_work_list = explode(",", $p_options_list[$i+1]);
+          }
+          else if (is_integer($p_options_list[$i+1])) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is an integer '".$p_options_list[$i+1]."'");
+              $v_work_list[0] = $p_options_list[$i+1].'-'.$p_options_list[$i+1];
+          }
+          else if (is_array($p_options_list[$i+1])) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is an array");
+              $v_work_list = $p_options_list[$i+1];
+          }
+          else {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+          
+          // ----- Reduce the index list
+          // each index item in the list must be a couple with a start and
+          // an end value : [0,3], [5-5], [8-10], ...
+          // ----- Check the format of each item
+          $v_sort_flag=false;
+          $v_sort_value=0;
+          for ($j=0; $j<sizeof($v_work_list); $j++) {
+              // ----- Explode the item
+              $v_item_list = explode("-", $v_work_list[$j]);
+              $v_size_item_list = sizeof($v_item_list);
+              
+              // ----- TBC : Here we might check that each item is a
+              // real integer ...
+              
+              // ----- Look for single value
+              if ($v_size_item_list == 1) {
+                  // ----- Set the option value
+                  $v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0];
+                  $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[0];
+              }
+              elseif ($v_size_item_list == 2) {
+                  // ----- Set the option value
+                  $v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0];
+                  $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[1];
+              }
+              else {
+                  // ----- Error log
+                  PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Too many values in index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+                  // ----- Return
+                  //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+                  return PclZip::errorCode();
+              }
+
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extracted index item = [".$v_result_list[$p_options_list[$i]][$j]['start'].",".$v_result_list[$p_options_list[$i]][$j]['end']."]");
+
+              // ----- Look for list sort
+              if ($v_result_list[$p_options_list[$i]][$j]['start'] < $v_sort_value) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The list should be sorted ...");
+                  $v_sort_flag=true;
+
+                  // ----- TBC : An automatic sort should be writen ...
+                  // ----- Error log
+                  PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+                  // ----- Return
+                  //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+                  return PclZip::errorCode();
+              }
+              $v_sort_value = $v_result_list[$p_options_list[$i]][$j]['start'];
+          }
+          
+          // ----- Sort the items
+          if ($v_sort_flag) {
+              // TBC : To Be Completed
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "List sorting is not yet write ...");
+          }
+
+          // ----- Next option
+          $i++;
+        break;
+
+        // ----- Look for options that request no value
+        case PCLZIP_OPT_REMOVE_ALL_PATH :
+        case PCLZIP_OPT_EXTRACT_AS_STRING :
+        case PCLZIP_OPT_NO_COMPRESSION :
+        case PCLZIP_OPT_EXTRACT_IN_OUTPUT :
+        case PCLZIP_OPT_REPLACE_NEWER :
+        case PCLZIP_OPT_STOP_ON_ERROR :
+          $v_result_list[$p_options_list[$i]] = true;
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
+        break;
+
+        // ----- Look for options that request an octal value
+        case PCLZIP_OPT_SET_CHMOD :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
+          $i++;
+        break;
+
+        // ----- Look for options that request a call-back
+        case PCLZIP_CB_PRE_EXTRACT :
+        case PCLZIP_CB_POST_EXTRACT :
+        case PCLZIP_CB_PRE_ADD :
+        case PCLZIP_CB_POST_ADD :
+        /* for futur use
+        case PCLZIP_CB_PRE_DELETE :
+        case PCLZIP_CB_POST_DELETE :
+        case PCLZIP_CB_PRE_LIST :
+        case PCLZIP_CB_POST_LIST :
+        */
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          $v_function_name = $p_options_list[$i+1];
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "call-back ".PclZipUtilOptionText($p_options_list[$i])." = '".$v_function_name."'");
+
+          // ----- Check that the value is a valid existing function
+          if (!function_exists($v_function_name)) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '".$v_function_name."()' is not an existing function for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Set the attribute
+          $v_result_list[$p_options_list[$i]] = $v_function_name;
+          $i++;
+        break;
+
+        default :
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
+                                      "Unknown parameter '"
+                                                          .$p_options_list[$i]."'");
+
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+          return PclZip::errorCode();
+      }
+
+      // ----- Next options
+      $i++;
+    }
+
+    // ----- Look for mandatory options
+    if ($v_requested_options !== false) {
+      for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) {
+        // ----- Look for mandatory option
+        if ($v_requested_options[$key] == 'mandatory') {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Detect a mandatory option : ".PclZipUtilOptionText($key)."(".$key.")");
+          // ----- Look if present
+          if (!isset($v_result_list[$key])) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+        }
+      }
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privCreate()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privCreate($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCreate", "list, result_list, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
+    $v_result=1;
+    $v_list_detail = array();
+
+    // ----- Open the file in write mode
+    if (($v_result = $this->privOpenFd('wb')) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Add the list of files
+    $v_result = $this->privAddList($p_list, $p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options);
+
+    // ----- Close
+    $this->privCloseFd();
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privAdd()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privAdd($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAdd", "list, result_list, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
+    $v_result=1;
+    $v_list_detail = array();
+
+    // ----- Look if the archive exists or is empty
+    if ((!is_file($this->zipname)) || (filesize($this->zipname) == 0))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive does not exist, or is empty, create it.");
+
+      // ----- Do a create
+      $v_result = $this->privCreate($p_list, $p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options);
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Open the zip file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_result=$this->privOpenFd('rb')) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir = array();
+    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+    {
+      $this->privCloseFd();
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Go to beginning of File
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
+    @rewind($this->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
+
+    // ----- Creates a temporay file
+    $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
+
+    // ----- Open the temporary file in write mode
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
+    {
+      $this->privCloseFd();
+
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Copy the files from the archive to the temporary file
+    // TBC : Here I should better append the file and go back to erase the central dir
+    $v_size = $v_central_dir['offset'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+      $v_buffer = fread($this->zip_fd, $v_read_size);
+      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Swap the file descriptor
+    // Here is a trick : I swap the temporary fd with the zip fd, in order to use
+    // the following methods on the temporary fil and not the real archive
+    $v_swap = $this->zip_fd;
+    $this->zip_fd = $v_zip_temp_fd;
+    $v_zip_temp_fd = $v_swap;
+
+    // ----- Add the files
+    $v_header_list = array();
+    if (($v_result = $this->privAddFileList($p_list, $v_header_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options)) != 1)
+    {
+      fclose($v_zip_temp_fd);
+      $this->privCloseFd();
+      @unlink($v_zip_temp_name);
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Store the offset of the central dir
+    $v_offset = @ftell($this->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "New offset of central dir : $v_offset");
+
+    // ----- Copy the block of file headers from the old archive
+    $v_size = $v_central_dir['size'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+      $v_buffer = @fread($v_zip_temp_fd, $v_read_size);
+      @fwrite($this->zip_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Create the Central Dir files header
+    for ($i=0, $v_count=0; $i<sizeof($v_header_list); $i++)
+    {
+      // ----- Create the file header
+      if ($v_header_list[$i]['status'] == 'ok') {
+        if (($v_result = $this->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
+          fclose($v_zip_temp_fd);
+          $this->privCloseFd();
+          @unlink($v_zip_temp_name);
+
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+        $v_count++;
+      }
+
+      // ----- Transform the header to a 'usable' info
+      $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
+    }
+
+    // ----- Zip file comment
+    $v_comment = $v_central_dir['comment'];
+    if (isset($p_options[PCLZIP_OPT_COMMENT])) {
+      $v_comment = $p_options[PCLZIP_OPT_COMMENT];
+    }
+    if (isset($p_options[PCLZIP_OPT_ADD_COMMENT])) {
+      $v_comment = $v_comment.$p_options[PCLZIP_OPT_ADD_COMMENT];
+    }
+    if (isset($p_options[PCLZIP_OPT_PREPEND_COMMENT])) {
+      $v_comment = $p_options[PCLZIP_OPT_PREPEND_COMMENT].$v_comment;
+    }
+
+    // ----- Calculate the size of the central header
+    $v_size = @ftell($this->zip_fd)-$v_offset;
+
+    // ----- Create the central dir footer
+    if (($v_result = $this->privWriteCentralHeader($v_count+$v_central_dir['entries'], $v_size, $v_offset, $v_comment)) != 1)
+    {
+      // ----- Reset the file list
+      unset($v_header_list);
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Swap back the file descriptor
+    $v_swap = $this->zip_fd;
+    $this->zip_fd = $v_zip_temp_fd;
+    $v_zip_temp_fd = $v_swap;
+
+    // ----- Close
+    $this->privCloseFd();
+
+    // ----- Close the temporary file
+    @fclose($v_zip_temp_fd);
+
+    // ----- Delete the zip file
+    // TBC : I should test the result ...
+    @unlink($this->zipname);
+
+    // ----- Rename the temporary file
+    // TBC : I should test the result ...
+    //@rename($v_zip_temp_name, $this->zipname);
+    PclZipUtilRename($v_zip_temp_name, $this->zipname);
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privOpenFd()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function privOpenFd($p_mode)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privOpenFd", 'mode='.$p_mode);
+    $v_result=1;
+
+    // ----- Look if already open
+    if ($this->zip_fd != 0)
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->zipname.'\' already open');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Open the zip file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Open file in '.$p_mode.' mode');
+    if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0)
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in '.$p_mode.' mode');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privCloseFd()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function privCloseFd()
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCloseFd", "");
+    $v_result=1;
+
+    if ($this->zip_fd != 0)
+      @fclose($this->zip_fd);
+    $this->zip_fd = 0;
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privAddList()
+  // Description :
+  //   $p_add_dir and $p_remove_dir will give the ability to memorize a path which is
+  //   different from the real path of the file. This is usefull if you want to have PclTar
+  //   running in any directory, and memorize relative path from an other directory.
+  // Parameters :
+  //   $p_list : An array containing the file or directory names to add in the tar
+  //   $p_result_list : list of added files with their properties (specially the status field)
+  //   $p_add_dir : Path to add in the filename path archived
+  //   $p_remove_dir : Path to remove in the filename path archived
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddList", "list, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
+    $v_result=1;
+
+    // ----- Add the files
+    $v_header_list = array();
+    if (($v_result = $this->privAddFileList($p_list, $v_header_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options)) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Store the offset of the central dir
+    $v_offset = @ftell($this->zip_fd);
+
+    // ----- Create the Central Dir files header
+    for ($i=0,$v_count=0; $i<sizeof($v_header_list); $i++)
+    {
+      // ----- Create the file header
+      if ($v_header_list[$i]['status'] == 'ok') {
+        if (($v_result = $this->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+        $v_count++;
+      }
+
+      // ----- Transform the header to a 'usable' info
+      $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
+    }
+
+    // ----- Zip file comment
+    $v_comment = '';
+    if (isset($p_options[PCLZIP_OPT_COMMENT])) {
+      $v_comment = $p_options[PCLZIP_OPT_COMMENT];
+    }
+
+    // ----- Calculate the size of the central header
+    $v_size = @ftell($this->zip_fd)-$v_offset;
+
+    // ----- Create the central dir footer
+    if (($v_result = $this->privWriteCentralHeader($v_count, $v_size, $v_offset, $v_comment)) != 1)
+    {
+      // ----- Reset the file list
+      unset($v_header_list);
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privAddFileList()
+  // Description :
+  //   $p_add_dir and $p_remove_dir will give the ability to memorize a path which is
+  //   different from the real path of the file. This is usefull if you want to
+  //   run the lib in any directory, and memorize relative path from an other directory.
+  // Parameters :
+  //   $p_list : An array containing the file or directory names to add in the tar
+  //   $p_result_list : list of added files with their properties (specially the status field)
+  //   $p_add_dir : Path to add in the filename path archived
+  //   $p_remove_dir : Path to remove in the filename path archived
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privAddFileList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFileList", "list, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
+    $v_result=1;
+    $v_header = array();
+
+    // ----- Recuperate the current number of elt in list
+    $v_nb = sizeof($p_result_list);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Before add, list have $v_nb elements");
+
+    // ----- Loop on the files
+    for ($j=0; ($j<count($p_list)) && ($v_result==1); $j++)
+    {
+      // ----- Recuperate the filename
+      $p_filename = PclZipUtilTranslateWinPath($p_list[$j], false);
+
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for file [$p_filename]");
+
+      // ----- Skip empty file names
+      if ($p_filename == "")
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Skip empty filename");
+        continue;
+      }
+
+      // ----- Check the filename
+      if (!file_exists($p_filename))
+      {
+        // ----- Error log
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '$p_filename' does not exists");
+        PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '$p_filename' does not exists");
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+        return PclZip::errorCode();
+      }
+
+      /* This test is done later
+      // ----- Check the path length
+      if (strlen($p_filename) > 0xFF)
+      {
+        // ----- Error log
+        PclZip::privErrorLog(-5, "File name is too long (max. 255) : '$p_filename'");
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+        return PclZip::errorCode();
+      }
+      */
+
+      // ----- Look if it is a file or a dir with no all pathnre move
+      if ((is_file($p_filename)) || ((is_dir($p_filename)) && !$p_remove_all_dir)) {
+        // ----- Add the file
+        if (($v_result = $this->privAddFile($p_filename, $v_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options)) != 1)
+        {
+          // ----- Return status
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+
+        // ----- Store the file infos
+        $p_result_list[$v_nb++] = $v_header;
+      }
+
+      // ----- Look for directory
+      if (@is_dir($p_filename))
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "$p_filename is a directory");
+
+        // ----- Look for path
+        if ($p_filename != ".")
+          $v_path = $p_filename."/";
+        else
+          $v_path = "";
+
+        // ----- Read the directory for files and sub-directories
+        if ($p_hdir = @opendir($p_filename)) {
+          $p_hitem = @readdir($p_hdir); // '.' directory
+          $p_hitem = @readdir($p_hdir); // '..' directory
+          while (($p_hitem = @readdir($p_hdir)) !== false) {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for $p_hitem in the directory");
+
+            // ----- Look for a file
+            if (is_file($v_path.$p_hitem)) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Add the file '".$v_path.$p_hitem."'");
+
+              // ----- Add the file
+              if (($v_result = $this->privAddFile($v_path.$p_hitem, $v_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options)) != 1) {
+                // ----- Return status
+                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+                return $v_result;
+              }
+
+              // ----- Store the file infos
+              $p_result_list[$v_nb++] = $v_header;
+            }
+
+            // ----- Recursive call to privAddFileList()
+            else {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Add the directory '".$v_path.$p_hitem."'");
+
+              // ----- Need an array as parameter
+              $p_temp_list[0] = $v_path.$p_hitem;
+              $v_result = $this->privAddFileList($p_temp_list, $p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options);
+
+              // ----- Update the number of elements of the list
+              $v_nb = sizeof($p_result_list);
+            }
+          }
+        }
+
+        // ----- Free memory for the recursive loop
+        unset($p_temp_list);
+        unset($p_hdir);
+        unset($p_hitem);
+      }
+    }
+
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "After add, list have $v_nb elements");
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privAddFile()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privAddFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFile", "filename='$p_filename', add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
+    $v_result=1;
+
+    if ($p_filename == "")
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file list parameter (invalid or empty list)");
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Calculate the stored filename
+    $v_stored_filename = $p_filename;
+
+    // ----- Look for all path to remove
+    if ($p_remove_all_dir) {
+      $v_stored_filename = basename($p_filename);
+    }
+    // ----- Look for partial path remove
+    else if ($p_remove_dir != "")
+    {
+      if (substr($p_remove_dir, -1) != '/')
+        $p_remove_dir .= "/";
+
+      if ((substr($p_filename, 0, 2) == "./") || (substr($p_remove_dir, 0, 2) == "./"))
+      {
+        if ((substr($p_filename, 0, 2) == "./") && (substr($p_remove_dir, 0, 2) != "./"))
+          $p_remove_dir = "./".$p_remove_dir;
+        if ((substr($p_filename, 0, 2) != "./") && (substr($p_remove_dir, 0, 2) == "./"))
+          $p_remove_dir = substr($p_remove_dir, 2);
+      }
+
+      $v_compare = PclZipUtilPathInclusion($p_remove_dir, $p_filename);
+      if ($v_compare > 0)
+//      if (substr($p_filename, 0, strlen($p_remove_dir)) == $p_remove_dir)
+      {
+
+        if ($v_compare == 2) {
+          $v_stored_filename = "";
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Path to remove is the current folder");
+        }
+        else {
+          $v_stored_filename = substr($p_filename, strlen($p_remove_dir));
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Remove path '$p_remove_dir' in file '$p_filename' = '$v_stored_filename'");
+        }
+      }
+    }
+    // ----- Look for path to add
+    if ($p_add_dir != "")
+    {
+      if (substr($p_add_dir, -1) == "/")
+        $v_stored_filename = $p_add_dir.$v_stored_filename;
+      else
+        $v_stored_filename = $p_add_dir."/".$v_stored_filename;
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Add path '$p_add_dir' in file '$p_filename' = '$v_stored_filename'");
+    }
+
+    // ----- Filename (reduce the path of stored name)
+    $v_stored_filename = PclZipUtilPathReduction($v_stored_filename);
+
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Filename (reduced) '$v_stored_filename', strlen ".strlen($v_stored_filename));
+
+    // ----- Set the file properties
+    clearstatcache();
+    $p_header['version'] = 20;
+    $p_header['version_extracted'] = 10;
+    $p_header['flag'] = 0;
+    $p_header['compression'] = 0;
+    $p_header['mtime'] = filemtime($p_filename);
+    $p_header['crc'] = 0;
+    $p_header['compressed_size'] = 0;
+    $p_header['size'] = filesize($p_filename);
+    $p_header['filename_len'] = strlen($p_filename);
+    $p_header['extra_len'] = 0;
+    $p_header['comment_len'] = 0;
+    $p_header['disk'] = 0;
+    $p_header['internal'] = 0;
+//    $p_header['external'] = (is_file($p_filename)?0xFE49FFE0:0x41FF0010);
+    $p_header['external'] = (is_file($p_filename)?0x00000000:0x00000010);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header external extension '".sprintf("0x%X",$p_header['external'])."'");
+    $p_header['offset'] = 0;
+    $p_header['filename'] = $p_filename;
+    $p_header['stored_filename'] = $v_stored_filename;
+    $p_header['extra'] = '';
+    $p_header['comment'] = '';
+    $p_header['status'] = 'ok';
+    $p_header['index'] = -1;
+
+
+    // ----- Look for pre-add callback
+    if (isset($p_options[PCLZIP_CB_PRE_ADD])) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_ADD]."()') is defined for the extraction");
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_header, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      eval('$v_result = '.$p_options[PCLZIP_CB_PRE_ADD].'(PCLZIP_CB_PRE_ADD, $v_local_header);');
+      if ($v_result == 0) {
+        // ----- Change the file status
+        $p_header['status'] = "skipped";
+        $v_result = 1;
+      }
+
+      // ----- Update the informations
+      // Only some fields can be modified
+      if ($p_header['stored_filename'] != $v_local_header['stored_filename']) {
+        $p_header['stored_filename'] = PclZipUtilPathReduction($v_local_header['stored_filename']);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New stored filename is '".$p_header['stored_filename']."'");
+      }
+    }
+
+    // ----- Look for empty stored filename
+    if ($p_header['stored_filename'] == "") {
+      $p_header['status'] = "filtered";
+    }
+    
+    // ----- Check the path length
+    if (strlen($p_header['stored_filename']) > 0xFF) {
+      $p_header['status'] = 'filename_too_long';
+    }
+
+    // ----- Look if no error, or file not skipped
+    if ($p_header['status'] == 'ok') {
+
+      // ----- Look for a file
+      if (is_file($p_filename))
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "'".$p_filename."' is a file");
+        // ----- Open the source file
+        if (($v_file = @fopen($p_filename, "rb")) == 0) {
+          PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode");
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+          return PclZip::errorCode();
+        }
+
+        if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will not be compressed");
+          // ----- Read the file content
+          $v_content_compressed = @fread($v_file, $p_header['size']);
+
+          // ----- Calculate the CRC
+          $p_header['crc'] = @crc32($v_content_compressed);
+
+          // ----- Set header parameters
+          $p_header['compressed_size'] = $p_header['size'];
+          $p_header['compression'] = 0;
+        }
+        else {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will be compressed");
+          // ----- Read the file content
+          $v_content = @fread($v_file, $p_header['size']);
+
+          // ----- Calculate the CRC
+          $p_header['crc'] = @crc32($v_content);
+
+          // ----- Compress the file
+          $v_content_compressed = @gzdeflate($v_content);
+
+          // ----- Set header parameters
+          $p_header['compressed_size'] = strlen($v_content_compressed);
+          $p_header['compression'] = 8;
+        }
+        
+        // ----- Look for encryption
+        /*
+        if ((isset($p_options[PCLZIP_OPT_CRYPT]))
+                   && ($p_options[PCLZIP_OPT_CRYPT] != "")) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File need to be crypted ....");
+          
+          // Should be a random header
+          $v_header = 'xxxxxxxxxxxx';
+             $v_content_compressed = PclZipUtilZipEncrypt($v_content_compressed,
+                                                          $p_header['compressed_size'],
+                                                      $v_header,
+                                                                                                  $p_header['crc'],
+                                                                                                  "test");
+                                                                                                  
+          $p_header['compressed_size'] += 12;
+          $p_header['flag'] = 1;
+          
+          // ----- Add the header to the data
+          $v_content_compressed = $v_header.$v_content_compressed;
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Size after header : ".strlen($v_content_compressed)."");
+        }
+        */
+
+        // ----- Call the header generation
+        if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {
+          @fclose($v_file);
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+
+        // ----- Write the compressed (or not) content
+        $v_binary_data = pack('a'.$p_header['compressed_size'],
+                                     $v_content_compressed);
+        @fwrite($this->zip_fd, $v_binary_data, $p_header['compressed_size']);
+        
+        // ----- Close the file
+        @fclose($v_file);
+      }
+
+      // ----- Look for a directory
+      else {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "'".$p_filename."' is a folder");
+        // ----- Look for directory last '/'
+        if (@substr($p_header['stored_filename'], -1) != '/') {
+          $p_header['stored_filename'] .= '/';
+        }
+
+        // ----- Set the file properties
+        $p_header['size'] = 0;
+        //$p_header['external'] = 0x41FF0010;   // Value for a folder : to be checked
+        $p_header['external'] = 0x00000010;   // Value for a folder : to be checked
+
+        // ----- Call the header generation
+        if (($v_result = $this->privWriteFileHeader($p_header)) != 1)
+        {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+      }
+    }
+
+    // ----- Look for pre-add callback
+    if (isset($p_options[PCLZIP_CB_POST_ADD])) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_ADD]."()') is defined for the extraction");
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_header, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      eval('$v_result = '.$p_options[PCLZIP_CB_POST_ADD].'(PCLZIP_CB_POST_ADD, $v_local_header);');
+      if ($v_result == 0) {
+        // ----- Ignored
+        $v_result = 1;
+      }
+
+      // ----- Update the informations
+      // Nothing can be modified
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privWriteFileHeader()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privWriteFileHeader(&$p_header)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteFileHeader", 'file="'.$p_header['filename'].'", stored as "'.$p_header['stored_filename'].'"');
+    $v_result=1;
+
+    // TBC
+    //for(reset($p_header); $key = key($p_header); next($p_header)) {
+    //  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "header[$key] = ".$p_header[$key]);
+    //}
+
+    // ----- Store the offset position of the file
+    $p_header['offset'] = ftell($this->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'File offset of the header :'.$p_header['offset']);
+
+    // ----- Transform UNIX mtime to DOS format mdate/mtime
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
+    $v_date = getdate($p_header['mtime']);
+    $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2;
+    $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday'];
+
+    // ----- Packed data
+    $v_binary_data = pack("VvvvvvVVVvv", 0x04034b50,
+                             $p_header['version_extracted'], $p_header['flag'],
+                          $p_header['compression'], $v_mtime, $v_mdate,
+                          $p_header['crc'], $p_header['compressed_size'],
+                                                 $p_header['size'],
+                          strlen($p_header['stored_filename']),
+                                                 $p_header['extra_len']);
+
+    // ----- Write the first 148 bytes of the header in the archive
+    fputs($this->zip_fd, $v_binary_data, 30);
+
+    // ----- Write the variable fields
+    if (strlen($p_header['stored_filename']) != 0)
+    {
+      fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename']));
+    }
+    if ($p_header['extra_len'] != 0)
+    {
+      fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']);
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privWriteCentralFileHeader()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privWriteCentralFileHeader(&$p_header)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteCentralFileHeader", 'file="'.$p_header['filename'].'", stored as "'.$p_header['stored_filename'].'"');
+    $v_result=1;
+
+    // TBC
+    //for(reset($p_header); $key = key($p_header); next($p_header)) {
+    //  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "header[$key] = ".$p_header[$key]);
+    //}
+
+    // ----- Transform UNIX mtime to DOS format mdate/mtime
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
+    $v_date = getdate($p_header['mtime']);
+    $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2;
+    $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday'];
+
+    // ----- Packed data
+    $v_binary_data = pack("VvvvvvvVVVvvvvvVV", 0x02014b50,
+                             $p_header['version'], $p_header['version_extracted'],
+                          $p_header['flag'], $p_header['compression'],
+                                                 $v_mtime, $v_mdate, $p_header['crc'],
+                          $p_header['compressed_size'], $p_header['size'],
+                          strlen($p_header['stored_filename']),
+                                                 $p_header['extra_len'], $p_header['comment_len'],
+                          $p_header['disk'], $p_header['internal'],
+                                                 $p_header['external'], $p_header['offset']);
+
+    // ----- Write the 42 bytes of the header in the zip file
+    fputs($this->zip_fd, $v_binary_data, 46);
+
+    // ----- Write the variable fields
+    if (strlen($p_header['stored_filename']) != 0)
+    {
+      fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename']));
+    }
+    if ($p_header['extra_len'] != 0)
+    {
+      fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']);
+    }
+    if ($p_header['comment_len'] != 0)
+    {
+      fputs($this->zip_fd, $p_header['comment'], $p_header['comment_len']);
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privWriteCentralHeader()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteCentralHeader", 'nb_entries='.$p_nb_entries.', size='.$p_size.', offset='.$p_offset.', comment="'.$p_comment.'"');
+    $v_result=1;
+
+    // ----- Packed data
+    $v_binary_data = pack("VvvvvVVv", 0x06054b50, 0, 0, $p_nb_entries,
+                             $p_nb_entries, $p_size,
+                                                 $p_offset, strlen($p_comment));
+
+    // ----- Write the 22 bytes of the header in the zip file
+    fputs($this->zip_fd, $v_binary_data, 22);
+
+    // ----- Write the variable fields
+    if (strlen($p_comment) != 0)
+    {
+      fputs($this->zip_fd, $p_comment, strlen($p_comment));
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privList()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privList(&$p_list)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privList", "list");
+    $v_result=1;
+
+    // ----- Open the zip file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir = array();
+    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Go to beginning of Central Dir
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Offset : ".$v_central_dir['offset']."'");
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'");
+    @rewind($this->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'");
+    if (@fseek($this->zip_fd, $v_central_dir['offset']))
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'");
+
+    // ----- Read each entry
+    for ($i=0; $i<$v_central_dir['entries']; $i++)
+    {
+      // ----- Read the file header
+      if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1)
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+        return $v_result;
+      }
+      $v_header['index'] = $i;
+
+      // ----- Get the only interesting attributes
+      $this->privConvertHeader2FileInfo($v_header, $p_list[$i]);
+      unset($v_header);
+    }
+
+    // ----- Close the zip file
+    $this->privCloseFd();
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privConvertHeader2FileInfo()
+  // Description :
+  //   This function takes the file informations from the central directory
+  //   entries and extract the interesting parameters that will be given back.
+  //   The resulting file infos are set in the array $p_info
+  //     $p_info['filename'] : Filename with full path. Given by user (add),
+  //                           extracted in the filesystem (extract).
+  //     $p_info['stored_filename'] : Stored filename in the archive.
+  //     $p_info['size'] = Size of the file.
+  //     $p_info['compressed_size'] = Compressed size of the file.
+  //     $p_info['mtime'] = Last modification date of the file.
+  //     $p_info['comment'] = Comment associated with the file.
+  //     $p_info['folder'] = true/false : indicates if the entry is a folder or not.
+  //     $p_info['status'] = status of the action on the file.
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privConvertHeader2FileInfo($p_header, &$p_info)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privConvertHeader2FileInfo", "Filename='".$p_header['filename']."'");
+    $v_result=1;
+
+    // ----- Get the interesting attributes
+    $p_info['filename'] = $p_header['filename'];
+    $p_info['stored_filename'] = $p_header['stored_filename'];
+    $p_info['size'] = $p_header['size'];
+    $p_info['compressed_size'] = $p_header['compressed_size'];
+    $p_info['mtime'] = $p_header['mtime'];
+    $p_info['comment'] = $p_header['comment'];
+    $p_info['folder'] = (($p_header['external']&0x00000010)==0x00000010);
+    $p_info['index'] = $p_header['index'];
+    $p_info['status'] = $p_header['status'];
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privExtractByRule()
+  // Description :
+  //   Extract a file or directory depending of rules (by index, by name, ...)
+  // Parameters :
+  //   $p_file_list : An array where will be placed the properties of each
+  //                  extracted file
+  //   $p_path : Path to add while writing the extracted files
+  //   $p_remove_path : Path to remove (from the file memorized path) while writing the
+  //                    extracted files. If the path does not match the file path,
+  //                    the file is extracted with its memorized path.
+  //                    $p_remove_path does not apply to 'list' mode.
+  //                    $p_path and $p_remove_path are commulative.
+  // Return Values :
+  //   1 on success,0 or less on error (see error code list)
+  // --------------------------------------------------------------------------------
+  function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privExtractByRule", "path='$p_path', remove_path='$p_remove_path', remove_all_path='".($p_remove_all_path?'true':'false')."'");
+    $v_result=1;
+
+    // ----- Check the path
+    if (($p_path == "") || ((substr($p_path, 0, 1) != "/") && (substr($p_path, 0, 3) != "../") && (substr($p_path,1,2)!=":/")))
+      $p_path = "./".$p_path;
+
+    // ----- Reduce the path last (and duplicated) '/'
+    if (($p_path != "./") && ($p_path != "/"))
+    {
+      // ----- Look for the path end '/'
+      while (substr($p_path, -1) == "/")
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Destination path [$p_path] ends by '/'");
+        $p_path = substr($p_path, 0, strlen($p_path)-1);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Modified to [$p_path]");
+      }
+    }
+
+    // ----- Look for path to remove format (should end by /)
+    if (($p_remove_path != "") && (substr($p_remove_path, -1) != '/'))
+    {
+      $p_remove_path .= '/';
+    }
+    $p_remove_path_size = strlen($p_remove_path);
+
+    // ----- Open the zip file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_result = $this->privOpenFd('rb')) != 1)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir = array();
+    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+    {
+      // ----- Close the zip file
+      $this->privCloseFd();
+
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Start at beginning of Central Dir
+    $v_pos_entry = $v_central_dir['offset'];
+
+    // ----- Read each entry
+    $j_start = 0;
+    for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Read next file header entry : '$i'");
+
+      // ----- Read next Central dir entry
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Position before rewind : ".ftell($this->zip_fd)."'");
+      @rewind($this->zip_fd);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Position after rewind : ".ftell($this->zip_fd)."'");
+      if (@fseek($this->zip_fd, $v_pos_entry))
+      {
+        // ----- Close the zip file
+        $this->privCloseFd();
+
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+        return PclZip::errorCode();
+      }
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position after fseek : ".ftell($this->zip_fd)."'");
+
+      // ----- Read the file header
+      $v_header = array();
+      if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1)
+      {
+        // ----- Close the zip file
+        $this->privCloseFd();
+
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+        return $v_result;
+      }
+
+      // ----- Store the index
+      $v_header['index'] = $i;
+
+      // ----- Store the file position
+      $v_pos_entry = ftell($this->zip_fd);
+
+      // ----- Look for the specific extract rules
+      $v_extract = false;
+
+      // ----- Look for extract by name rule
+      if (   (isset($p_options[PCLZIP_OPT_BY_NAME]))
+          && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByName'");
+
+          // ----- Look if the filename is in the list
+          for ($j=0; ($j<sizeof($p_options[PCLZIP_OPT_BY_NAME])) && (!$v_extract); $j++) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Compare with file '".$p_options[PCLZIP_OPT_BY_NAME][$j]."'");
+
+              // ----- Look for a directory
+              if (substr($p_options[PCLZIP_OPT_BY_NAME][$j], -1) == "/") {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The searched item is a directory");
+
+                  // ----- Look if the directory is in the filename path
+                  if (   (strlen($v_header['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j]))
+                      && (substr($v_header['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
+                      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The directory is in the file path");
+                      $v_extract = true;
+                  }
+              }
+              // ----- Look for a filename
+              elseif ($v_header['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The file is the right one.");
+                  $v_extract = true;
+              }
+          }
+      }
+
+      // ----- Look for extract by ereg rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_EREG]))
+               && ($p_options[PCLZIP_OPT_BY_EREG] != "")) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract by ereg '".$p_options[PCLZIP_OPT_BY_EREG]."'");
+
+          if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header['stored_filename'])) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
+              $v_extract = true;
+          }
+      }
+
+      // ----- Look for extract by preg rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_PREG]))
+               && ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByEreg'");
+
+          if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
+              $v_extract = true;
+          }
+      }
+
+      // ----- Look for extract by index rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_INDEX]))
+               && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'");
+          
+          // ----- Look if the index is in the list
+          for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_extract); $j++) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Look if index '$i' is in [".$p_options[PCLZIP_OPT_BY_INDEX][$j]['start'].",".$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']."]");
+
+              if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found as part of an index range");
+                  $v_extract = true;
+              }
+              if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Do not look this index range for next loop");
+                  $j_start = $j+1;
+              }
+
+              if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Index range is greater than index, stop loop");
+                  break;
+              }
+          }
+      }
+
+      // ----- Look for no rule, which means extract all the archive
+      else {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with no rule (extract all)");
+          $v_extract = true;
+      }
+
+         // ----- Check compression method
+         if (   ($v_extract)
+             && (   ($v_header['compression'] != 8)
+                     && ($v_header['compression'] != 0))) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unsupported compression method (".$v_header['compression'].")");
+          $v_header['status'] = 'unsupported_compression';
+
+          // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
+          if (   (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
+                     && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped");
+
+              PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION,
+                                              "Filename '".$v_header['stored_filename']."' is "
+                                                          ."compressed by an unsupported compression "
+                                                          ."method (".$v_header['compression'].") ");
+
+              //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+              return PclZip::errorCode();
+                 }
+         }
+         
+         // ----- Check encrypted files
+         if (($v_extract) && (($v_header['flag'] & 1) == 1)) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unsupported file encryption");
+          $v_header['status'] = 'unsupported_encryption';
+
+          // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
+          if (   (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
+                     && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped");
+
+              PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION,
+                                              "Unsupported encryption for "
+                                                          ." filename '".$v_header['stored_filename']
+                                                                  ."'");
+
+              //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+              return PclZip::errorCode();
+                 }
+         }
+
+      // ----- Look for real extraction
+      if (($v_extract) && ($v_header['status'] != 'ok')) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "No need for extract");
+          $v_result = $this->privConvertHeader2FileInfo($v_header,
+                                                       $p_file_list[$v_nb_extracted++]);
+          if ($v_result != 1) {
+              $this->privCloseFd();
+              //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+              return $v_result;
+          }
+
+          $v_extract = false;
+      }
+      
+      // ----- Look for real extraction
+      if ($v_extract)
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file '".$v_header['filename']."', index '$i'");
+
+        // ----- Go to the file position
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'");
+        @rewind($this->zip_fd);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_fd)."'");
+        if (@fseek($this->zip_fd, $v_header['offset']))
+        {
+          // ----- Close the zip file
+          $this->privCloseFd();
+
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
+
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+          return PclZip::errorCode();
+        }
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'");
+
+        // ----- Look for extraction as string
+        if ($p_options[PCLZIP_OPT_EXTRACT_AS_STRING]) {
+
+          // ----- Extracting the file
+          $v_result1 = $this->privExtractFileAsString($v_header, $v_string);
+          if ($v_result1 < 1) {
+            $this->privCloseFd();
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1);
+            return $v_result1;
+          }
+
+          // ----- Get the only interesting attributes
+          if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted])) != 1)
+          {
+            // ----- Close the zip file
+            $this->privCloseFd();
+
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+            return $v_result;
+          }
+
+          // ----- Set the file content
+          $p_file_list[$v_nb_extracted]['content'] = $v_string;
+
+          // ----- Next extracted file
+          $v_nb_extracted++;
+          
+          // ----- Look for user callback abort
+          if ($v_result1 == 2) {
+               break;
+          }
+        }
+        // ----- Look for extraction in standard output
+        elseif (   (isset($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT]))
+                       && ($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) {
+          // ----- Extracting the file in standard output
+          $v_result1 = $this->privExtractFileInOutput($v_header, $p_options);
+          if ($v_result1 < 1) {
+            $this->privCloseFd();
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1);
+            return $v_result1;
+          }
+
+          // ----- Get the only interesting attributes
+          if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) {
+            $this->privCloseFd();
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+            return $v_result;
+          }
+
+          // ----- Look for user callback abort
+          if ($v_result1 == 2) {
+               break;
+          }
+        }
+        // ----- Look for normal extraction
+        else {
+          // ----- Extracting the file
+          $v_result1 = $this->privExtractFile($v_header,
+                                                     $p_path, $p_remove_path,
+                                                                                         $p_remove_all_path,
+                                                                                         $p_options);
+          if ($v_result1 < 1) {
+            $this->privCloseFd();
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1);
+            return $v_result1;
+          }
+
+          // ----- Get the only interesting attributes
+          if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1)
+          {
+            // ----- Close the zip file
+            $this->privCloseFd();
+
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+            return $v_result;
+          }
+
+          // ----- Look for user callback abort
+          if ($v_result1 == 2) {
+               break;
+          }
+        }
+      }
+    }
+
+    // ----- Close the zip file
+    $this->privCloseFd();
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privExtractFile()
+  // Description :
+  // Parameters :
+  // Return Values :
+  //
+  // 1 : ... ?
+  // PCLZIP_ERR_USER_ABORTED(2) : User ask for extraction stop in callback
+  // --------------------------------------------------------------------------------
+  function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFile', "path='$p_path', remove_path='$p_remove_path', remove_all_path='".($p_remove_all_path?'true':'false')."'");
+    $v_result=1;
+
+    // ----- Read the file header
+    if (($v_result = $this->privReadFileHeader($v_header)) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'");
+
+    // ----- Check that the file header is coherent with $p_entry info
+    if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) {
+        // TBC
+    }
+
+    // ----- Look for all path to remove
+    if ($p_remove_all_path == true) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "All path is removed");
+        // ----- Get the basename of the path
+        $p_entry['filename'] = basename($p_entry['filename']);
+    }
+
+    // ----- Look for path to remove
+    else if ($p_remove_path != "")
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Look for some path to remove");
+      if (PclZipUtilPathInclusion($p_remove_path, $p_entry['filename']) == 2)
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The folder is the same as the removed path '".$p_entry['filename']."'");
+
+        // ----- Change the file status
+        $p_entry['status'] = "filtered";
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+        return $v_result;
+      }
+
+      $p_remove_path_size = strlen($p_remove_path);
+      if (substr($p_entry['filename'], 0, $p_remove_path_size) == $p_remove_path)
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file '".$p_entry['filename']."'");
+
+        // ----- Remove the path
+        $p_entry['filename'] = substr($p_entry['filename'], $p_remove_path_size);
+
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Resulting file is '".$p_entry['filename']."'");
+      }
+    }
+
+    // ----- Add the path
+    if ($p_path != '')
+    {
+      $p_entry['filename'] = $p_path."/".$p_entry['filename'];
+    }
+
+    // ----- Look for pre-extract callback
+    if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_EXTRACT]."()') is defined for the extraction");
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);');
+      if ($v_result == 0) {
+        // ----- Change the file status
+        $p_entry['status'] = "skipped";
+        $v_result = 1;
+      }
+      
+      // ----- Look for abort result
+      if ($v_result == 2) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
+        // ----- This status is internal and will be changed in 'skipped'
+        $p_entry['status'] = "aborted";
+       $v_result = PCLZIP_ERR_USER_ABORTED;
+      }
+
+      // ----- Update the informations
+      // Only some fields can be modified
+      $p_entry['filename'] = $v_local_header['filename'];
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New filename is '".$p_entry['filename']."'");
+    }
+
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '".$p_entry['filename']."', size '$v_header[size]'");
+
+    // ----- Look if extraction should be done
+    if ($p_entry['status'] == 'ok') {
+
+    // ----- Look for specific actions while the file exist
+    if (file_exists($p_entry['filename']))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$p_entry['filename']."' already exists");
+
+      // ----- Look if file is a directory
+      if (is_dir($p_entry['filename']))
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is a directory");
+
+        // ----- Change the file status
+        $p_entry['status'] = "already_a_directory";
+        
+        // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
+        // For historical reason first PclZip implementation does not stop
+        // when this kind of error occurs.
+        if (   (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
+                   && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped");
+
+            PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY,
+                                            "Filename '".$p_entry['filename']."' is "
+                                                                ."already used by an existing directory");
+
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+               }
+      }
+      // ----- Look if file is write protected
+      else if (!is_writeable($p_entry['filename']))
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is write protected");
+
+        // ----- Change the file status
+        $p_entry['status'] = "write_protected";
+
+        // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
+        // For historical reason first PclZip implementation does not stop
+        // when this kind of error occurs.
+        if (   (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
+                   && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped");
+
+            PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL,
+                                            "Filename '".$p_entry['filename']."' exists "
+                                                                ."and is write protected");
+
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+               }
+      }
+
+      // ----- Look if the extracted file is older
+      else if (filemtime($p_entry['filename']) > $p_entry['mtime'])
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is newer (".date("l dS of F Y h:i:s A", filemtime($p_entry['filename'])).") than the extracted file (".date("l dS of F Y h:i:s A", $p_entry['mtime']).")");
+        // ----- Change the file status
+        if (   (isset($p_options[PCLZIP_OPT_REPLACE_NEWER]))
+                   && ($p_options[PCLZIP_OPT_REPLACE_NEWER]===true)) {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_REPLACE_NEWER is selected, file will be replaced");
+               }
+               else {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will not be replaced");
+            $p_entry['status'] = "newer_exist";
+
+            // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
+            // For historical reason first PclZip implementation does not stop
+            // when this kind of error occurs.
+            if (   (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
+                       && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
+                //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped");
+
+                PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL,
+                                    "Newer version of '".$p_entry['filename']."' exists "
+                                           ."and option PCLZIP_OPT_REPLACE_NEWER is not selected");
+
+                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+                return PclZip::errorCode();
+                   }
+               }
+      }
+      else {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is older than the extrated one - will be replaced by the extracted one (".date("l dS of F Y h:i:s A", filemtime($p_entry['filename'])).") than the extracted file (".date("l dS of F Y h:i:s A", $p_entry['mtime']).")");
+      }
+    }
+
+    // ----- Check the directory availability and create it if necessary
+    else {
+      if ((($p_entry['external']&0x00000010)==0x00000010) || (substr($p_entry['filename'], -1) == '/'))
+        $v_dir_to_check = $p_entry['filename'];
+      else if (!strstr($p_entry['filename'], "/"))
+        $v_dir_to_check = "";
+      else
+        $v_dir_to_check = dirname($p_entry['filename']);
+
+      if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to create path for '".$p_entry['filename']."'");
+
+        // ----- Change the file status
+        $p_entry['status'] = "path_creation_fail";
+
+        // ----- Return
+        ////--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+        //return $v_result;
+        $v_result = 1;
+      }
+    }
+    }
+
+    // ----- Look if extraction should be done
+    if ($p_entry['status'] == 'ok') {
+
+      // ----- Do the extraction (if not a folder)
+      if (!(($p_entry['external']&0x00000010)==0x00000010))
+      {
+        // ----- Look for not compressed file
+        if ($p_entry['compression'] == 0) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file");
+
+                 // ----- Opening destination file
+          if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0)
+          {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode");
+
+            // ----- Change the file status
+            $p_entry['status'] = "write_error";
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+            return $v_result;
+          }
+
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read '".$p_entry['size']."' bytes");
+
+          // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
+          $v_size = $p_entry['compressed_size'];
+          while ($v_size != 0)
+          {
+            $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read $v_read_size bytes");
+            $v_buffer = fread($this->zip_fd, $v_read_size);
+            $v_binary_data = pack('a'.$v_read_size, $v_buffer);
+            @fwrite($v_dest_file, $v_binary_data, $v_read_size);
+            $v_size -= $v_read_size;
+          }
+
+          // ----- Closing the destination file
+          fclose($v_dest_file);
+
+          // ----- Change the file mtime
+          touch($p_entry['filename'], $p_entry['mtime']);
+          
+
+        }
+        else {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file (Compression method ".$p_entry['compression'].")");
+          // ----- TBC
+          // Need to be finished
+          if (($p_entry['flag'] & 1) == 1) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File is encrypted");
+            /*
+              // ----- Read the encryption header
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read 12 encryption header bytes");
+              $v_encryption_header = @fread($this->zip_fd, 12);
+              
+              // ----- Read the encrypted & compressed file in a buffer
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read '".($p_entry['compressed_size']-12)."' compressed & encrypted bytes");
+              $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']-12);
+              
+              // ----- Decrypt the buffer
+              $this->privDecrypt($v_encryption_header, $v_buffer,
+                                            $p_entry['compressed_size']-12, $p_entry['crc']);
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Buffer is '".$v_buffer."'");
+              */
+          }
+          else {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read '".$p_entry['compressed_size']."' compressed bytes");
+              // ----- Read the compressed file in a buffer (one shot)
+              $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
+          }
+          
+          // ----- Decompress the file
+          $v_file_content = @gzinflate($v_buffer);
+          unset($v_buffer);
+          if ($v_file_content === FALSE) {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to inflate compressed file");
+
+            // ----- Change the file status
+            // TBC
+            $p_entry['status'] = "error";
+            
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+            return $v_result;
+          }
+          
+          // ----- Opening destination file
+          if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode");
+
+            // ----- Change the file status
+            $p_entry['status'] = "write_error";
+
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+            return $v_result;
+          }
+
+          // ----- Write the uncompressed data
+          @fwrite($v_dest_file, $v_file_content, $p_entry['size']);
+          unset($v_file_content);
+
+          // ----- Closing the destination file
+          @fclose($v_dest_file);
+
+          // ----- Change the file mtime
+          @touch($p_entry['filename'], $p_entry['mtime']);
+        }
+
+        // ----- Look for chmod option
+        if (isset($p_options[PCLZIP_OPT_SET_CHMOD])) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "chmod option activated '".$p_options[PCLZIP_OPT_SET_CHMOD]."'");
+
+          // ----- Change the mode of the file
+          @chmod($p_entry['filename'], $p_options[PCLZIP_OPT_SET_CHMOD]);
+        }
+
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done");
+      }
+    }
+
+       // ----- Change abort status
+       if ($p_entry['status'] == "aborted") {
+      $p_entry['status'] = "skipped";
+       }
+       
+    // ----- Look for post-extract callback
+    elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction");
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);');
+
+      // ----- Look for abort result
+      if ($v_result == 2) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
+       $v_result = PCLZIP_ERR_USER_ABORTED;
+      }
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privExtractFileInOutput()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privExtractFileInOutput(&$p_entry, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileInOutput', "");
+    $v_result=1;
+
+    // ----- Read the file header
+    if (($v_result = $this->privReadFileHeader($v_header)) != 1) {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'");
+
+    // ----- Check that the file header is coherent with $p_entry info
+    if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) {
+        // TBC
+    }
+
+    // ----- Look for pre-extract callback
+    if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_EXTRACT]."()') is defined for the extraction");
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);');
+      if ($v_result == 0) {
+        // ----- Change the file status
+        $p_entry['status'] = "skipped";
+        $v_result = 1;
+      }
+
+      // ----- Look for abort result
+      if ($v_result == 2) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
+        // ----- This status is internal and will be changed in 'skipped'
+        $p_entry['status'] = "aborted";
+       $v_result = PCLZIP_ERR_USER_ABORTED;
+      }
+
+      // ----- Update the informations
+      // Only some fields can be modified
+      $p_entry['filename'] = $v_local_header['filename'];
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New filename is '".$p_entry['filename']."'");
+    }
+
+    // ----- Trace
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '".$p_entry['filename']."', size '$v_header[size]'");
+
+    // ----- Look if extraction should be done
+    if ($p_entry['status'] == 'ok') {
+
+      // ----- Do the extraction (if not a folder)
+      if (!(($p_entry['external']&0x00000010)==0x00000010)) {
+        // ----- Look for not compressed file
+        if ($p_entry['compressed_size'] == $p_entry['size']) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file");
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes");
+
+          // ----- Read the file in a buffer (one shot)
+          $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
+
+          // ----- Send the file to the output
+          echo $v_buffer;
+          unset($v_buffer);
+        }
+        else {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file");
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Reading '".$p_entry['size']."' bytes");
+
+          // ----- Read the compressed file in a buffer (one shot)
+          $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
+          
+          // ----- Decompress the file
+          $v_file_content = gzinflate($v_buffer);
+          unset($v_buffer);
+
+          // ----- Send the file to the output
+          echo $v_file_content;
+          unset($v_file_content);
+        }
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done");
+      }
+    }
+
+       // ----- Change abort status
+       if ($p_entry['status'] == "aborted") {
+      $p_entry['status'] = "skipped";
+       }
+
+    // ----- Look for post-extract callback
+    elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction");
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);');
+
+      // ----- Look for abort result
+      if ($v_result == 2) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
+       $v_result = PCLZIP_ERR_USER_ABORTED;
+      }
+    }
+
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privExtractFileAsString()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privExtractFileAsString(&$p_entry, &$p_string)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileAsString', "p_entry['filename']='".$p_entry['filename']."'");
+    $v_result=1;
+
+    // ----- Read the file header
+    $v_header = array();
+    if (($v_result = $this->privReadFileHeader($v_header)) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'");
+
+    // ----- Check that the file header is coherent with $p_entry info
+    if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) {
+        // TBC
+    }
+
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file in string (with path) '".$p_entry['filename']."', size '$v_header[size]'");
+
+    // ----- Do the extraction (if not a folder)
+    if (!(($p_entry['external']&0x00000010)==0x00000010))
+    {
+      // ----- Look for not compressed file
+      if ($p_entry['compressed_size'] == $p_entry['size'])
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file");
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes");
+
+        // ----- Reading the file
+        $p_string = @fread($this->zip_fd, $p_entry['compressed_size']);
+      }
+      else
+      {
+        // ----- Trace
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file");
+
+        // ----- Reading the file
+        $v_data = @fread($this->zip_fd, $p_entry['compressed_size']);
+        
+        // ----- Decompress the file
+        if (($p_string = @gzinflate($v_data)) === FALSE) {
+            // TBC
+        }
+      }
+
+      // ----- Trace
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done");
+    }
+    else {
+        // TBC : error : can not extract a folder in a string
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privReadFileHeader()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privReadFileHeader(&$p_header)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadFileHeader", "");
+    $v_result=1;
+
+    // ----- Read the 4 bytes signature
+    $v_binary_data = @fread($this->zip_fd, 4);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary data is : '".sprintf("%08x", $v_binary_data)."'");
+    $v_data = unpack('Vid', $v_binary_data);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'");
+
+    // ----- Check signature
+    if ($v_data['id'] != 0x04034b50)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid File header");
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Read the first 42 bytes of the header
+    $v_binary_data = fread($this->zip_fd, 26);
+
+    // ----- Look for invalid block size
+    if (strlen($v_binary_data) != 26)
+    {
+      $p_header['filename'] = "";
+      $p_header['status'] = "invalid_header";
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid block size : ".strlen($v_binary_data));
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Extract the values
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Header : '".$v_binary_data."'");
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Header (Hex) : '".bin2hex($v_binary_data)."'");
+    $v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data);
+
+    // ----- Get filename
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "File name length : ".$v_data['filename_len']);
+    $p_header['filename'] = fread($this->zip_fd, $v_data['filename_len']);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Filename : \''.$p_header['filename'].'\'');
+
+    // ----- Get extra_fields
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extra field length : ".$v_data['extra_len']);
+    if ($v_data['extra_len'] != 0) {
+      $p_header['extra'] = fread($this->zip_fd, $v_data['extra_len']);
+    }
+    else {
+      $p_header['extra'] = '';
+    }
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Extra field : \''.bin2hex($p_header['extra']).'\'');
+
+    // ----- Extract properties
+    $p_header['version_extracted'] = $v_data['version'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version need to extract : ('.$p_header['version_extracted'].') \''.($p_header['version_extracted']/10).'.'.($p_header['version_extracted']%10).'\'');
+    $p_header['compression'] = $v_data['compression'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compression method : \''.$p_header['compression'].'\'');
+    $p_header['size'] = $v_data['size'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size : \''.$p_header['size'].'\'');
+    $p_header['compressed_size'] = $v_data['compressed_size'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compressed Size : \''.$p_header['compressed_size'].'\'');
+    $p_header['crc'] = $v_data['crc'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'CRC : \''.sprintf("0x%X", $p_header['crc']).'\'');
+    $p_header['flag'] = $v_data['flag'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Flag : \''.$p_header['flag'].'\'');
+
+    // ----- Recuperate date in UNIX format
+    $p_header['mdate'] = $v_data['mdate'];
+    $p_header['mtime'] = $v_data['mtime'];
+    if ($p_header['mdate'] && $p_header['mtime'])
+    {
+      // ----- Extract time
+      $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
+      $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
+      $v_seconde = ($p_header['mtime'] & 0x001F)*2;
+
+      // ----- Extract date
+      $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980;
+      $v_month = ($p_header['mdate'] & 0x01E0) >> 5;
+      $v_day = $p_header['mdate'] & 0x001F;
+
+      // ----- Get UNIX date format
+      $p_header['mtime'] = mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
+
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
+    }
+    else
+    {
+      $p_header['mtime'] = time();
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date is actual : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
+    }
+
+    // TBC
+    //for(reset($v_data); $key = key($v_data); next($v_data)) {
+    //  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Attribut[$key] = ".$v_data[$key]);
+    //}
+
+    // ----- Set the stored filename
+    $p_header['stored_filename'] = $p_header['filename'];
+
+    // ----- Set the status field
+    $p_header['status'] = "ok";
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privReadCentralFileHeader()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privReadCentralFileHeader(&$p_header)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadCentralFileHeader", "");
+    $v_result=1;
+
+    // ----- Read the 4 bytes signature
+    $v_binary_data = @fread($this->zip_fd, 4);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary data is : '".sprintf("%08x", $v_binary_data)."'");
+    $v_data = unpack('Vid', $v_binary_data);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'");
+
+    // ----- Check signature
+    if ($v_data['id'] != 0x02014b50)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid Central Dir File signature");
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Read the first 42 bytes of the header
+    $v_binary_data = fread($this->zip_fd, 42);
+
+    // ----- Look for invalid block size
+    if (strlen($v_binary_data) != 42)
+    {
+      $p_header['filename'] = "";
+      $p_header['status'] = "invalid_header";
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid block size : ".strlen($v_binary_data));
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Extract the values
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header : '".$v_binary_data."'");
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header (Hex) : '".bin2hex($v_binary_data)."'");
+    $p_header = unpack('vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $v_binary_data);
+
+    // ----- Get filename
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "File name length : ".$p_header['filename_len']);
+    if ($p_header['filename_len'] != 0)
+      $p_header['filename'] = fread($this->zip_fd, $p_header['filename_len']);
+    else
+      $p_header['filename'] = '';
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Filename : \''.$p_header['filename'].'\'');
+
+    // ----- Get extra
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Extra length : ".$p_header['extra_len']);
+    if ($p_header['extra_len'] != 0)
+      $p_header['extra'] = fread($this->zip_fd, $p_header['extra_len']);
+    else
+      $p_header['extra'] = '';
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Extra : \''.$p_header['extra'].'\'');
+
+    // ----- Get comment
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Comment length : ".$p_header['comment_len']);
+    if ($p_header['comment_len'] != 0)
+      $p_header['comment'] = fread($this->zip_fd, $p_header['comment_len']);
+    else
+      $p_header['comment'] = '';
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Comment : \''.$p_header['comment'].'\'');
+
+    // ----- Extract properties
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version : \''.($p_header['version']/10).'.'.($p_header['version']%10).'\'');
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version need to extract : \''.($p_header['version_extracted']/10).'.'.($p_header['version_extracted']%10).'\'');
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Size : \''.$p_header['size'].'\'');
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Compressed Size : \''.$p_header['compressed_size'].'\'');
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'CRC : \''.sprintf("0x%X", $p_header['crc']).'\'');
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Flag : \''.$p_header['flag'].'\'');
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Offset : \''.$p_header['offset'].'\'');
+
+    // ----- Recuperate date in UNIX format
+    if ($p_header['mdate'] && $p_header['mtime'])
+    {
+      // ----- Extract time
+      $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
+      $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
+      $v_seconde = ($p_header['mtime'] & 0x001F)*2;
+
+      // ----- Extract date
+      $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980;
+      $v_month = ($p_header['mdate'] & 0x01E0) >> 5;
+      $v_day = $p_header['mdate'] & 0x001F;
+
+      // ----- Get UNIX date format
+      $p_header['mtime'] = mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
+
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
+    }
+    else
+    {
+      $p_header['mtime'] = time();
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Date is actual : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
+    }
+
+    // ----- Set the stored filename
+    $p_header['stored_filename'] = $p_header['filename'];
+
+    // ----- Set default status to ok
+    $p_header['status'] = 'ok';
+
+    // ----- Look if it is a directory
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Internal (Hex) : '".sprintf("Ox%04X", $p_header['internal'])."'");
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "External (Hex) : '".sprintf("Ox%04X", $p_header['external'])."' (".(($p_header['external']&0x00000010)==0x00000010?'is a folder':'is a file').')');
+    if (substr($p_header['filename'], -1) == '/') {
+      //$p_header['external'] = 0x41FF0010;
+      $p_header['external'] = 0x00000010;
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Force folder external : \''.sprintf("Ox%04X", $p_header['external']).'\'');
+    }
+
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Header of filename : \''.$p_header['filename'].'\'');
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privCheckFileHeaders()
+  // Description :
+  // Parameters :
+  // Return Values :
+  //   1 on success,
+  //   0 on error;
+  // --------------------------------------------------------------------------------
+  function privCheckFileHeaders(&$p_local_header, &$p_central_header)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCheckFileHeaders", "");
+    $v_result=1;
+
+       // ----- Check the static values
+       // TBC
+       if ($p_local_header['filename'] != $p_central_header['filename']) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "filename" : TBC To Be Completed');
+       }
+       if ($p_local_header['version_extracted'] != $p_central_header['version_extracted']) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "version_extracted" : TBC To Be Completed');
+       }
+       if ($p_local_header['flag'] != $p_central_header['flag']) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "flag" : TBC To Be Completed');
+       }
+       if ($p_local_header['compression'] != $p_central_header['compression']) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "compression" : TBC To Be Completed');
+       }
+       if ($p_local_header['mtime'] != $p_central_header['mtime']) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "mtime" : TBC To Be Completed');
+       }
+       if ($p_local_header['filename_len'] != $p_central_header['filename_len']) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "filename_len" : TBC To Be Completed');
+       }
+
+       // ----- Look for flag bit 3
+       if (($p_local_header['flag'] & 8) == 8) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Purpose bit flag bit 3 set !');
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'File size, compression size and crc found in central header');
+        $p_local_header['size'] = $p_central_header['size'];
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size : \''.$p_local_header['size'].'\'');
+        $p_local_header['compressed_size'] = $p_central_header['compressed_size'];
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compressed Size : \''.$p_local_header['compressed_size'].'\'');
+        $p_local_header['crc'] = $p_central_header['crc'];
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'CRC : \''.sprintf("0x%X", $p_local_header['crc']).'\'');
+       }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privReadEndCentralDir()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privReadEndCentralDir(&$p_central_dir)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadEndCentralDir", "");
+    $v_result=1;
+
+    // ----- Go to the end of the zip file
+    $v_size = filesize($this->zipname);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Size of the file :$v_size");
+    @fseek($this->zip_fd, $v_size);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position at end of zip file : \''.ftell($this->zip_fd).'\'');
+    if (@ftell($this->zip_fd) != $v_size)
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->zipname.'\'');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- First try : look if this is an archive with no commentaries (most of the time)
+    // in this case the end of central dir is at 22 bytes of the file end
+    $v_found = 0;
+    if ($v_size > 26) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Look for central dir with no comment');
+      @fseek($this->zip_fd, $v_size-22);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position after min central position : \''.ftell($this->zip_fd).'\'');
+      if (($v_pos = @ftell($this->zip_fd)) != ($v_size-22))
+      {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\'');
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+        return PclZip::errorCode();
+      }
+
+      // ----- Read for bytes
+      $v_binary_data = @fread($this->zip_fd, 4);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Binary data is : '".sprintf("%08x", $v_binary_data)."'");
+      $v_data = @unpack('Vid', $v_binary_data);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'");
+
+      // ----- Check signature
+      if ($v_data['id'] == 0x06054b50) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found central dir at the default position.");
+        $v_found = 1;
+      }
+
+      $v_pos = ftell($this->zip_fd);
+    }
+
+    // ----- Go back to the maximum possible size of the Central Dir End Record
+    if (!$v_found) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Start extended search of end central dir');
+      $v_maximum_size = 65557; // 0xFFFF + 22;
+      if ($v_maximum_size > $v_size)
+        $v_maximum_size = $v_size;
+      @fseek($this->zip_fd, $v_size-$v_maximum_size);
+      if (@ftell($this->zip_fd) != ($v_size-$v_maximum_size))
+      {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\'');
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+        return PclZip::errorCode();
+      }
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position after max central position : \''.ftell($this->zip_fd).'\'');
+
+      // ----- Read byte per byte in order to find the signature
+      $v_pos = ftell($this->zip_fd);
+      $v_bytes = 0x00000000;
+      while ($v_pos < $v_size)
+      {
+        // ----- Read a byte
+        $v_byte = @fread($this->zip_fd, 1);
+
+        // -----  Add the byte
+        $v_bytes = ($v_bytes << 8) | Ord($v_byte);
+
+        // ----- Compare the bytes
+        if ($v_bytes == 0x504b0506)
+        {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Found End Central Dir signature at position : \''.ftell($this->zip_fd).'\'');
+          $v_pos++;
+          break;
+        }
+
+        $v_pos++;
+      }
+
+      // ----- Look if not found end of central dir
+      if ($v_pos == $v_size)
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to find End of Central Dir Record signature");
+
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature");
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+        return PclZip::errorCode();
+      }
+    }
+
+    // ----- Read the first 18 bytes of the header
+    $v_binary_data = fread($this->zip_fd, 18);
+
+    // ----- Look for invalid block size
+    if (strlen($v_binary_data) != 18)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid End of Central Dir Record size : ".strlen($v_binary_data));
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data));
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Extract the values
+    ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Central Dir Record : '".$v_binary_data."'");
+    ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Central Dir Record (Hex) : '".bin2hex($v_binary_data)."'");
+    $v_data = unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size', $v_binary_data);
+
+    // ----- Check the global size
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Comment length : ".$v_data['comment_size']);
+    if (($v_pos + $v_data['comment_size'] + 18) != $v_size) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The central dir is not at the end of the archive. Some trailing bytes exists after the archive.");
+
+         // ----- Removed in release 2.2 see readme file
+         // The check of the file size is a little too strict.
+         // Some bugs where found when a zip is encrypted/decrypted with 'crypt'.
+         // While decrypted, zip has training 0 bytes
+         if (0) {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT,
+                              'The central dir is not at the end of the archive.'
+                                                  .' Some trailing bytes exists after the archive.');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+         }
+    }
+
+    // ----- Get comment
+    if ($v_data['comment_size'] != 0)
+      $p_central_dir['comment'] = fread($this->zip_fd, $v_data['comment_size']);
+    else
+      $p_central_dir['comment'] = '';
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Comment : \''.$p_central_dir['comment'].'\'');
+
+    $p_central_dir['entries'] = $v_data['entries'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Nb of entries : \''.$p_central_dir['entries'].'\'');
+    $p_central_dir['disk_entries'] = $v_data['disk_entries'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Nb of entries for this disk : \''.$p_central_dir['disk_entries'].'\'');
+    $p_central_dir['offset'] = $v_data['offset'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Offset of Central Dir : \''.$p_central_dir['offset'].'\'');
+    $p_central_dir['size'] = $v_data['size'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size of Central Dir : \''.$p_central_dir['size'].'\'');
+    $p_central_dir['disk'] = $v_data['disk'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Disk number : \''.$p_central_dir['disk'].'\'');
+    $p_central_dir['disk_start'] = $v_data['disk_start'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Start disk number : \''.$p_central_dir['disk_start'].'\'');
+
+    // TBC
+    //for(reset($p_central_dir); $key = key($p_central_dir); next($p_central_dir)) {
+    //  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "central_dir[$key] = ".$p_central_dir[$key]);
+    //}
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privDeleteByRule()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privDeleteByRule(&$p_result_list, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDeleteByRule", "");
+    $v_result=1;
+    $v_list_detail = array();
+
+    // ----- Open the zip file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_result=$this->privOpenFd('rb')) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir = array();
+    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+    {
+      $this->privCloseFd();
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Go to beginning of File
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
+    @rewind($this->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
+
+    // ----- Scan all the files
+    // ----- Start at beginning of Central Dir
+    $v_pos_entry = $v_central_dir['offset'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'");
+    @rewind($this->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_fd)."'");
+    if (@fseek($this->zip_fd, $v_pos_entry))
+    {
+      // ----- Close the zip file
+      $this->privCloseFd();
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'");
+
+    // ----- Read each entry
+    $v_header_list = array();
+    $j_start = 0;
+    for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Read next file header entry (index '$i')");
+
+      // ----- Read the file header
+      $v_header_list[$v_nb_extracted] = array();
+      if (($v_result = $this->privReadCentralFileHeader($v_header_list[$v_nb_extracted])) != 1)
+      {
+        // ----- Close the zip file
+        $this->privCloseFd();
+
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+        return $v_result;
+      }
+
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename (index '$i') : '".$v_header_list[$v_nb_extracted]['stored_filename']."'");
+
+      // ----- Store the index
+      $v_header_list[$v_nb_extracted]['index'] = $i;
+
+      // ----- Look for the specific extract rules
+      $v_found = false;
+
+      // ----- Look for extract by name rule
+      if (   (isset($p_options[PCLZIP_OPT_BY_NAME]))
+          && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByName'");
+
+          // ----- Look if the filename is in the list
+          for ($j=0; ($j<sizeof($p_options[PCLZIP_OPT_BY_NAME])) && (!$v_found); $j++) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Compare with file '".$p_options[PCLZIP_OPT_BY_NAME][$j]."'");
+
+              // ----- Look for a directory
+              if (substr($p_options[PCLZIP_OPT_BY_NAME][$j], -1) == "/") {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The searched item is a directory");
+
+                  // ----- Look if the directory is in the filename path
+                  if (   (strlen($v_header_list[$v_nb_extracted]['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j]))
+                      && (substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
+                      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The directory is in the file path");
+                      $v_found = true;
+                  }
+                  elseif (   (($v_header_list[$v_nb_extracted]['external']&0x00000010)==0x00000010) /* Indicates a folder */
+                          && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
+                      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The entry is the searched directory");
+                      $v_found = true;
+                  }
+              }
+              // ----- Look for a filename
+              elseif ($v_header_list[$v_nb_extracted]['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The file is the right one.");
+                  $v_found = true;
+              }
+          }
+      }
+
+      // ----- Look for extract by ereg rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_EREG]))
+               && ($p_options[PCLZIP_OPT_BY_EREG] != "")) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract by ereg '".$p_options[PCLZIP_OPT_BY_EREG]."'");
+
+          if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header_list[$v_nb_extracted]['stored_filename'])) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
+              $v_found = true;
+          }
+      }
+
+      // ----- Look for extract by preg rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_PREG]))
+               && ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByEreg'");
+
+          if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
+              $v_found = true;
+          }
+      }
+
+      // ----- Look for extract by index rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_INDEX]))
+               && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'");
+
+          // ----- Look if the index is in the list
+          for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_found); $j++) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Look if index '$i' is in [".$p_options[PCLZIP_OPT_BY_INDEX][$j]['start'].",".$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']."]");
+
+              if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found as part of an index range");
+                  $v_found = true;
+              }
+              if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Do not look this index range for next loop");
+                  $j_start = $j+1;
+              }
+
+              if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Index range is greater than index, stop loop");
+                  break;
+              }
+          }
+      }
+
+      // ----- Look for deletion
+      if ($v_found)
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$v_header_list[$v_nb_extracted]['stored_filename']."', index '$i' need to be deleted");
+        unset($v_header_list[$v_nb_extracted]);
+      }
+      else
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$v_header_list[$v_nb_extracted]['stored_filename']."', index '$i' will not be deleted");
+        $v_nb_extracted++;
+      }
+    }
+
+    // ----- Look if something need to be deleted
+    if ($v_nb_extracted > 0) {
+
+        // ----- Creates a temporay file
+        $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
+
+        // ----- Creates a temporary zip archive
+        $v_temp_zip = new PclZip($v_zip_temp_name);
+
+        // ----- Open the temporary zip file in write mode
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary write mode");
+        if (($v_result = $v_temp_zip->privOpenFd('wb')) != 1) {
+            $this->privCloseFd();
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+            return $v_result;
+        }
+
+        // ----- Look which file need to be kept
+        for ($i=0; $i<sizeof($v_header_list); $i++) {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Keep entry index '$i' : '".$v_header_list[$i]['filename']."'");
+
+            // ----- Calculate the position of the header
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Offset='". $v_header_list[$i]['offset']."'");
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'");
+            @rewind($this->zip_fd);
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_fd)."'");
+            if (@fseek($this->zip_fd,  $v_header_list[$i]['offset'])) {
+                // ----- Close the zip file
+                $this->privCloseFd();
+                $v_temp_zip->privCloseFd();
+                @unlink($v_zip_temp_name);
+
+                // ----- Error log
+                PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
+
+                // ----- Return
+                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+                return PclZip::errorCode();
+            }
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'");
+
+            // ----- Read the file header
+            $v_local_header = array();
+            if (($v_result = $this->privReadFileHeader($v_local_header)) != 1) {
+                // ----- Close the zip file
+                $this->privCloseFd();
+                $v_temp_zip->privCloseFd();
+                @unlink($v_zip_temp_name);
+
+                // ----- Return
+                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+                return $v_result;
+            }
+            
+            // ----- Check that local file header is same as central file header
+            if ($this->privCheckFileHeaders($v_local_header,
+                                                       $v_header_list[$i]) != 1) {
+                // TBC
+            }
+            unset($v_local_header);
+
+            // ----- Write the file header
+            if (($v_result = $v_temp_zip->privWriteFileHeader($v_header_list[$i])) != 1) {
+                // ----- Close the zip file
+                $this->privCloseFd();
+                $v_temp_zip->privCloseFd();
+                @unlink($v_zip_temp_name);
+
+                // ----- Return
+                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+                return $v_result;
+            }
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Offset for this file is '".$v_header_list[$i]['offset']."'");
+
+            // ----- Read/write the data block
+            if (($v_result = PclZipUtilCopyBlock($this->zip_fd, $v_temp_zip->zip_fd, $v_header_list[$i]['compressed_size'])) != 1) {
+                // ----- Close the zip file
+                $this->privCloseFd();
+                $v_temp_zip->privCloseFd();
+                @unlink($v_zip_temp_name);
+
+                // ----- Return
+                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+                return $v_result;
+            }
+        }
+
+        // ----- Store the offset of the central dir
+        $v_offset = @ftell($v_temp_zip->zip_fd);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "New offset of central dir : $v_offset");
+
+        // ----- Re-Create the Central Dir files header
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Creates the new central directory");
+        for ($i=0; $i<sizeof($v_header_list); $i++) {
+            // ----- Create the file header
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Offset of file : ".$v_header_list[$i]['offset']);
+            if (($v_result = $v_temp_zip->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
+                $v_temp_zip->privCloseFd();
+                $this->privCloseFd();
+                @unlink($v_zip_temp_name);
+
+                // ----- Return
+                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+                return $v_result;
+            }
+
+            // ----- Transform the header to a 'usable' info
+            $v_temp_zip->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
+        }
+
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Creates the central directory footer");
+
+        // ----- Zip file comment
+        $v_comment = '';
+        if (isset($p_options[PCLZIP_OPT_COMMENT])) {
+          $v_comment = $p_options[PCLZIP_OPT_COMMENT];
+        }
+
+        // ----- Calculate the size of the central header
+        $v_size = @ftell($v_temp_zip->zip_fd)-$v_offset;
+
+        // ----- Create the central dir footer
+        if (($v_result = $v_temp_zip->privWriteCentralHeader(sizeof($v_header_list), $v_size, $v_offset, $v_comment)) != 1) {
+            // ----- Reset the file list
+            unset($v_header_list);
+            $v_temp_zip->privCloseFd();
+            $this->privCloseFd();
+            @unlink($v_zip_temp_name);
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+            return $v_result;
+        }
+
+        // ----- Close
+        $v_temp_zip->privCloseFd();
+        $this->privCloseFd();
+
+        // ----- Delete the zip file
+        // TBC : I should test the result ...
+        @unlink($this->zipname);
+
+        // ----- Rename the temporary file
+        // TBC : I should test the result ...
+        //@rename($v_zip_temp_name, $this->zipname);
+        PclZipUtilRename($v_zip_temp_name, $this->zipname);
+    
+        // ----- Destroy the temporary archive
+        unset($v_temp_zip);
+    }
+    
+    // ----- Remove every files : reset the file
+    else if ($v_central_dir['entries'] != 0) {
+        $this->privCloseFd();
+
+        if (($v_result = $this->privOpenFd('wb')) != 1) {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+
+        if (($v_result = $this->privWriteCentralHeader(0, 0, 0, '')) != 1) {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+
+        $this->privCloseFd();
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privDirCheck()
+  // Description :
+  //   Check if a directory exists, if not it creates it and all the parents directory
+  //   which may be useful.
+  // Parameters :
+  //   $p_dir : Directory path to check.
+  // Return Values :
+  //    1 : OK
+  //   -1 : Unable to create directory
+  // --------------------------------------------------------------------------------
+  function privDirCheck($p_dir, $p_is_dir=false)
+  {
+    $v_result = 1;
+
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDirCheck", "entry='$p_dir', is_dir='".($p_is_dir?"true":"false")."'");
+
+    // ----- Remove the final '/'
+    if (($p_is_dir) && (substr($p_dir, -1)=='/'))
+    {
+      $p_dir = substr($p_dir, 0, strlen($p_dir)-1);
+    }
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Looking for entry '$p_dir'");
+
+    // ----- Check the directory availability
+    if ((is_dir($p_dir)) || ($p_dir == ""))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, "'$p_dir' is a directory");
+      return 1;
+    }
+
+    // ----- Extract parent directory
+    $p_parent_dir = dirname($p_dir);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Parent directory is '$p_parent_dir'");
+
+    // ----- Just a check
+    if ($p_parent_dir != $p_dir)
+    {
+      // ----- Look for parent directory
+      if ($p_parent_dir != "")
+      {
+        if (($v_result = $this->privDirCheck($p_parent_dir)) != 1)
+        {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+      }
+    }
+
+    // ----- Create the directory
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Create directory '$p_dir'");
+    if (!@mkdir($p_dir, 0777))
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_DIR_CREATE_FAIL, "Unable to create directory '$p_dir'");
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result, "Directory '$p_dir' created");
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privMerge()
+  // Description :
+  //   If $p_archive_to_add does not exist, the function exit with a success result.
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privMerge(&$p_archive_to_add)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privMerge", "archive='".$p_archive_to_add->zipname."'");
+    $v_result=1;
+
+    // ----- Look if the archive_to_add exists
+    if (!is_file($p_archive_to_add->zipname))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive to add does not exist. End of merge.");
+
+      // ----- Nothing to merge, so merge is a success
+      $v_result = 1;
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Look if the archive exists
+    if (!is_file($this->zipname))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive does not exist, duplicate the archive_to_add.");
+
+      // ----- Do a duplicate
+      $v_result = $this->privDuplicate($p_archive_to_add->zipname);
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Open the zip file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_result=$this->privOpenFd('rb')) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir = array();
+    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+    {
+      $this->privCloseFd();
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Go to beginning of File
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in zip : ".ftell($this->zip_fd)."'");
+    @rewind($this->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in zip : ".ftell($this->zip_fd)."'");
+
+    // ----- Open the archive_to_add file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open archive_to_add in binary read mode");
+    if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1)
+    {
+      $this->privCloseFd();
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir_to_add = array();
+    if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1)
+    {
+      $this->privCloseFd();
+      $p_archive_to_add->privCloseFd();
+
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Go to beginning of File
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in archive_to_add : ".ftell($p_archive_to_add->zip_fd)."'");
+    @rewind($p_archive_to_add->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in archive_to_add : ".ftell($p_archive_to_add->zip_fd)."'");
+
+    // ----- Creates a temporay file
+    $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
+
+    // ----- Open the temporary file in write mode
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
+    {
+      $this->privCloseFd();
+      $p_archive_to_add->privCloseFd();
+
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Copy the files from the archive to the temporary file
+    // TBC : Here I should better append the file and go back to erase the central dir
+    $v_size = $v_central_dir['offset'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+      $v_buffer = fread($this->zip_fd, $v_read_size);
+      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Copy the files from the archive_to_add into the temporary file
+    $v_size = $v_central_dir_to_add['offset'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+      $v_buffer = fread($p_archive_to_add->zip_fd, $v_read_size);
+      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Store the offset of the central dir
+    $v_offset = @ftell($v_zip_temp_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "New offset of central dir : $v_offset");
+
+    // ----- Copy the block of file headers from the old archive
+    $v_size = $v_central_dir['size'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+      $v_buffer = @fread($this->zip_fd, $v_read_size);
+      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Copy the block of file headers from the archive_to_add
+    $v_size = $v_central_dir_to_add['size'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+      $v_buffer = @fread($p_archive_to_add->zip_fd, $v_read_size);
+      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Merge the file comments
+    $v_comment = $v_central_dir['comment'].' '.$v_central_dir_to_add['comment'];
+
+    // ----- Calculate the size of the (new) central header
+    $v_size = @ftell($v_zip_temp_fd)-$v_offset;
+
+    // ----- Swap the file descriptor
+    // Here is a trick : I swap the temporary fd with the zip fd, in order to use
+    // the following methods on the temporary fil and not the real archive fd
+    $v_swap = $this->zip_fd;
+    $this->zip_fd = $v_zip_temp_fd;
+    $v_zip_temp_fd = $v_swap;
+
+    // ----- Create the central dir footer
+    if (($v_result = $this->privWriteCentralHeader($v_central_dir['entries']+$v_central_dir_to_add['entries'], $v_size, $v_offset, $v_comment)) != 1)
+    {
+      $this->privCloseFd();
+      $p_archive_to_add->privCloseFd();
+      @fclose($v_zip_temp_fd);
+      $this->zip_fd = null;
+
+      // ----- Reset the file list
+      unset($v_header_list);
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Swap back the file descriptor
+    $v_swap = $this->zip_fd;
+    $this->zip_fd = $v_zip_temp_fd;
+    $v_zip_temp_fd = $v_swap;
+
+    // ----- Close
+    $this->privCloseFd();
+    $p_archive_to_add->privCloseFd();
+
+    // ----- Close the temporary file
+    @fclose($v_zip_temp_fd);
+
+    // ----- Delete the zip file
+    // TBC : I should test the result ...
+    @unlink($this->zipname);
+
+    // ----- Rename the temporary file
+    // TBC : I should test the result ...
+    //@rename($v_zip_temp_name, $this->zipname);
+    PclZipUtilRename($v_zip_temp_name, $this->zipname);
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privDuplicate()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privDuplicate($p_archive_filename)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDuplicate", "archive_filename='$p_archive_filename'");
+    $v_result=1;
+
+    // ----- Look if the $p_archive_filename exists
+    if (!is_file($p_archive_filename))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive to duplicate does not exist. End of duplicate.");
+
+      // ----- Nothing to duplicate, so duplicate is a success.
+      $v_result = 1;
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Open the zip file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_result=$this->privOpenFd('wb')) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Open the temporary file in write mode
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0)
+    {
+      $this->privCloseFd();
+
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Copy the files from the archive to the temporary file
+    // TBC : Here I should better append the file and go back to erase the central dir
+    $v_size = filesize($p_archive_filename);
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read $v_read_size bytes");
+      $v_buffer = fread($v_zip_temp_fd, $v_read_size);
+      @fwrite($this->zip_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Close
+    $this->privCloseFd();
+
+    // ----- Close the temporary file
+    @fclose($v_zip_temp_fd);
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privErrorLog()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function privErrorLog($p_error_code=0, $p_error_string='')
+  {
+    if (PCLZIP_ERROR_EXTERNAL == 1) {
+      PclError($p_error_code, $p_error_string);
+    }
+    else {
+      $this->error_code = $p_error_code;
+      $this->error_string = $p_error_string;
+    }
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privErrorReset()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function privErrorReset()
+  {
+    if (PCLZIP_ERROR_EXTERNAL == 1) {
+      PclErrorReset();
+    }
+    else {
+      $this->error_code = 0;
+      $this->error_string = '';
+    }
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privDecrypt()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privDecrypt($p_encryption_header, &$p_buffer, $p_size, $p_crc)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privDecrypt', "size=".$p_size."");
+    $v_result=1;
+    
+    // ----- To Be Modified ;-)
+    $v_pwd = "test";
+    
+    $p_buffer = PclZipUtilZipDecrypt($p_buffer, $p_size, $p_encryption_header,
+                                        $p_crc, $v_pwd);
+    
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  }
+  // End of class
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : PclZipUtilPathReduction()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function PclZipUtilPathReduction($p_dir)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathReduction", "dir='$p_dir'");
+    $v_result = "";
+
+    // ----- Look for not empty path
+    if ($p_dir != "")
+    {
+      // ----- Explode path by directory names
+      $v_list = explode("/", $p_dir);
+
+      // ----- Study directories from last to first
+      for ($i=sizeof($v_list)-1; $i>=0; $i--)
+      {
+        // ----- Look for current path
+        if ($v_list[$i] == ".")
+        {
+          // ----- Ignore this directory
+          // Should be the first $i=0, but no check is done
+        }
+        else if ($v_list[$i] == "..")
+        {
+          // ----- Ignore it and ignore the $i-1
+          $i--;
+        }
+        else if (($v_list[$i] == "") && ($i!=(sizeof($v_list)-1)) && ($i!=0))
+        {
+          // ----- Ignore only the double '//' in path,
+          // but not the first and last '/'
+        }
+        else
+        {
+          $v_result = $v_list[$i].($i!=(sizeof($v_list)-1)?"/".$v_result:"");
+        }
+      }
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : PclZipUtilPathInclusion()
+  // Description :
+  //   This function indicates if the path $p_path is under the $p_dir tree. Or,
+  //   said in an other way, if the file or sub-dir $p_path is inside the dir
+  //   $p_dir.
+  //   The function indicates also if the path is exactly the same as the dir.
+  //   This function supports path with duplicated '/' like '//', but does not
+  //   support '.' or '..' statements.
+  // Parameters :
+  // Return Values :
+  //   0 if $p_path is not inside directory $p_dir
+  //   1 if $p_path is inside directory $p_dir
+  //   2 if $p_path is exactly the same as $p_dir
+  // --------------------------------------------------------------------------------
+  function PclZipUtilPathInclusion($p_dir, $p_path)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathInclusion", "dir='$p_dir', path='$p_path'");
+    $v_result = 1;
+
+    // ----- Explode dir and path by directory separator
+    $v_list_dir = explode("/", $p_dir);
+    $v_list_dir_size = sizeof($v_list_dir);
+    $v_list_path = explode("/", $p_path);
+    $v_list_path_size = sizeof($v_list_path);
+
+    // ----- Study directories paths
+    $i = 0;
+    $j = 0;
+    while (($i < $v_list_dir_size) && ($j < $v_list_path_size) && ($v_result)) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Working on dir($i)='".$v_list_dir[$i]."' and path($j)='".$v_list_path[$j]."'");
+
+      // ----- Look for empty dir (path reduction)
+      if ($v_list_dir[$i] == '') {
+        $i++;
+        continue;
+      }
+      if ($v_list_path[$j] == '') {
+        $j++;
+        continue;
+      }
+
+      // ----- Compare the items
+      if (($v_list_dir[$i] != $v_list_path[$j]) && ($v_list_dir[$i] != '') && ( $v_list_path[$j] != ''))  {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Items ($i,$j) are different");
+        $v_result = 0;
+      }
+
+      // ----- Next items
+      $i++;
+      $j++;
+    }
+
+    // ----- Look if everything seems to be the same
+    if ($v_result) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Look for tie break");
+      // ----- Skip all the empty items
+      while (($j < $v_list_path_size) && ($v_list_path[$j] == '')) $j++;
+      while (($i < $v_list_dir_size) && ($v_list_dir[$i] == '')) $i++;
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Looking on dir($i)='".($i < $v_list_dir_size?$v_list_dir[$i]:'')."' and path($j)='".($j < $v_list_path_size?$v_list_path[$j]:'')."'");
+
+      if (($i >= $v_list_dir_size) && ($j >= $v_list_path_size)) {
+        // ----- There are exactly the same
+        $v_result = 2;
+      }
+      else if ($i < $v_list_dir_size) {
+        // ----- The path is shorter than the dir
+        $v_result = 0;
+      }
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : PclZipUtilCopyBlock()
+  // Description :
+  // Parameters :
+  //   $p_mode : read/write compression mode
+  //             0 : src & dest normal
+  //             1 : src gzip, dest normal
+  //             2 : src normal, dest gzip
+  //             3 : src & dest gzip
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function PclZipUtilCopyBlock($p_src, $p_dest, $p_size, $p_mode=0)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilCopyBlock", "size=$p_size, mode=$p_mode");
+    $v_result = 1;
+
+    if ($p_mode==0)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Src offset before read :".(@ftell($p_src)));
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Dest offset before write :".(@ftell($p_dest)));
+      while ($p_size != 0)
+      {
+        $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+        $v_buffer = @fread($p_src, $v_read_size);
+        @fwrite($p_dest, $v_buffer, $v_read_size);
+        $p_size -= $v_read_size;
+      }
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Src offset after read :".(@ftell($p_src)));
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Dest offset after write :".(@ftell($p_dest)));
+    }
+    else if ($p_mode==1)
+    {
+      while ($p_size != 0)
+      {
+        $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+        $v_buffer = @gzread($p_src, $v_read_size);
+        @fwrite($p_dest, $v_buffer, $v_read_size);
+        $p_size -= $v_read_size;
+      }
+    }
+    else if ($p_mode==2)
+    {
+      while ($p_size != 0)
+      {
+        $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+        $v_buffer = @fread($p_src, $v_read_size);
+        @gzwrite($p_dest, $v_buffer, $v_read_size);
+        $p_size -= $v_read_size;
+      }
+    }
+    else if ($p_mode==3)
+    {
+      while ($p_size != 0)
+      {
+        $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+        $v_buffer = @gzread($p_src, $v_read_size);
+        @gzwrite($p_dest, $v_buffer, $v_read_size);
+        $p_size -= $v_read_size;
+      }
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : PclZipUtilRename()
+  // Description :
+  //   This function tries to do a simple rename() function. If it fails, it
+  //   tries to copy the $p_src file in a new $p_dest file and then unlink the
+  //   first one.
+  // Parameters :
+  //   $p_src : Old filename
+  //   $p_dest : New filename
+  // Return Values :
+  //   1 on success, 0 on failure.
+  // --------------------------------------------------------------------------------
+  function PclZipUtilRename($p_src, $p_dest)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilRename", "source=$p_src, destination=$p_dest");
+    $v_result = 1;
+
+    // ----- Try to rename the files
+    if (!@rename($p_src, $p_dest)) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to rename file, try copy+unlink");
+
+      // ----- Try to copy & unlink the src
+      if (!@copy($p_src, $p_dest)) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to copy file");
+        $v_result = 0;
+      }
+      else if (!@unlink($p_src)) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to unlink old filename");
+        $v_result = 0;
+      }
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : PclZipUtilOptionText()
+  // Description :
+  //   Translate option value in text. Mainly for debug purpose.
+  // Parameters :
+  //   $p_option : the option value.
+  // Return Values :
+  //   The option text value.
+  // --------------------------------------------------------------------------------
+  function PclZipUtilOptionText($p_option)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilOptionText", "option='".$p_option."'");
+    
+    $v_list = get_defined_constants();
+    for (reset($v_list); $v_key = key($v_list); next($v_list)) {
+         $v_prefix = substr($v_key, 0, 10);
+         if ((($v_prefix == 'PCLZIP_OPT') || ($v_prefix == 'PCLZIP_CB_'))
+             && ($v_list[$v_key] == $p_option)) {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_key);
+          return $v_key;
+           }
+    }
+    
+    $v_result = 'Unknown';
+
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : PclZipUtilTranslateWinPath()
+  // Description :
+  //   Translate windows path by replacing '\' by '/' and optionally removing
+  //   drive letter.
+  // Parameters :
+  //   $p_path : path to translate.
+  //   $p_remove_disk_letter : true | false
+  // Return Values :
+  //   The path translated.
+  // --------------------------------------------------------------------------------
+  function PclZipUtilTranslateWinPath($p_path, $p_remove_disk_letter=true)
+  {
+    if (stristr(php_uname(), 'windows')) {
+      // ----- Look for potential disk letter
+      if (($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) {
+          $p_path = substr($p_path, $v_position+1);
+      }
+      // ----- Change potential windows directory separator
+      if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0,1) == '\\')) {
+          $p_path = strtr($p_path, '\\', '/');
+      }
+    }
+    return $p_path;
+  }
+  // --------------------------------------------------------------------------------
+
+
+?>
\ No newline at end of file
diff --git a/docs/include/page_constants.inc.php b/docs/include/page_constants.inc.php
new file mode 100644 (file)
index 0000000..0e58115
--- /dev/null
@@ -0,0 +1,198 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+/* constants to map privileges.privilege_id, used to load constant pages */\r
+\r
+define('AF_PRIV_HOME', 1);\r
+define('AF_PRIV_SYSTEM', 2);\r
+define('AF_PRIV_USER_MANAGEMENT', 3);\r
+define('AF_PRIV_LANGUAGE_MANAGEMENT', 4);\r
+define('AF_PRIV_TRANSLATION', 5);\r
+define('AF_PRIV_UPDATER', 6);\r
+define('AF_PRIV_PROFILE', 7);\r
+\r
+/* constants used for menu item generation. Used in class Menu (include/classes/Menu.class.php) */\r
+define('AF_NAV_PUBLIC', 'AF_NAV_PUBLIC');  // public menus, when no user login\r
+define('AF_NAV_TOP', 'AF_NAV_TOP');        // top tab menus\r
+\r
+include_once('classes/DAO/PrivilegesDAO.class.php');\r
+$priviledgesDAO = new PrivilegesDAO();\r
+\r
+if (isset($_SESSION['user_id']) && $_SESSION['user_id'] <> 0)\r
+{\r
+       $rows = $priviledgesDAO->getUserPrivileges($_SESSION['user_id']);\r
+}\r
+else\r
+{\r
+       $rows = $priviledgesDAO->getPublicPrivileges();\r
+}\r
+\r
+foreach ($rows as $row)\r
+       $privs[] = $row['privilege_id'];\r
+\r
+/* initialize pages accessed by public */\r
+//$_pages[AF_NAV_PUBLIC] = array('index.php' => array('parent'=>AF_NAV_PUBLIC));\r
+\r
+/* define all accessible pages */\r
+// 1. public pages\r
+$_pages['register.php']['title_var'] = 'registration';\r
+$_pages['register.php']['parent']    = AF_NAV_PUBLIC;\r
+$_pages['register.php']['guide']    = 'AF_HELP_REGISTRATION';\r
+\r
+$_pages['confirm.php']['title_var'] = 'confirm';\r
+$_pages['confirm.php']['parent']    = AF_NAV_PUBLIC;\r
+\r
+$_pages['login.php']['title_var'] = 'login';\r
+$_pages['login.php']['parent']    = AF_NAV_PUBLIC;\r
+$_pages['login.php']['guide']    = 'AF_HELP_LOGIN';\r
+$_pages['login.php']['children']  = array_merge(array('password_reminder.php'), isset($_pages['login.php']['children']) ? $_pages['login.php']['children'] : array());\r
+\r
+$_pages['logout.php']['title_var'] = 'logout';\r
+$_pages['logout.php']['parent']    = AF_NAV_PUBLIC;\r
+\r
+$_pages['password_reminder.php']['title_var'] = 'password_reminder';\r
+$_pages['password_reminder.php']['parent']    = 'login.php';\r
+$_pages['password_reminder.php']['guide']    = 'AF_HELP_PASSWORD_REMINDER';\r
+\r
+$_pages['oauth/oauth_authenticate.php']['title_var'] = 'oauth_authenticate';\r
+$_pages['login.php']['parent']    = AF_NAV_PUBLIC;\r
+$_pages['login.php']['guide']    = 'AF_HELP_OAUTH_AUTHENTICATE';\r
+\r
+// The scripts below need to be accessible by public. \r
+$_pages['guideline/view_guideline.php']['title_var'] = 'view_guideline';   // used in web service validation response\r
+$_pages['checker/suggestion.php']['title_var'] = 'details';\r
+$_pages['documentation/web_service_api.php']['title_var'] = 'web_service_api';\r
+$_pages['documentation/oauth_server_api.php']['title_var'] = 'oauth_server_api';\r
+\r
+// home pages\r
+if (in_array(AF_PRIV_HOME, $privs))\r
+{\r
+       $_pages['checker/index.php']['title_var'] = 'aframe';\r
+       $_pages['checker/index.php']['parent']    = AF_NAV_PUBLIC;\r
+       $_pages['checker/index.php']['guide']    = 'AF_HELP_INDEX';\r
+       \r
+       $_pages['checker/suggestion.php']['parent']    = AF_NAV_PUBLIC;\r
+       $_pages['checker/suggestion.php']['guide']    = 'AF_HELP_SUGGESTION';\r
+}\r
+\r
+// system pages\r
+if (in_array(AF_PRIV_SYSTEM, $privs))\r
+{\r
+       $_pages['system/index.php']['title_var'] = 'system';\r
+       $_pages['system/index.php']['parent']    = AF_NAV_PUBLIC;\r
+       $_pages['system/index.php']['guide']    = 'AF_HELP_SYSTEM';\r
+}\r
+\r
+// user pages\r
+if (in_array(AF_PRIV_USER_MANAGEMENT, $privs))\r
+{\r
+       $_pages['user/index.php']['title_var'] = 'users';\r
+       $_pages['user/index.php']['parent']    = AF_NAV_TOP;\r
+       $_pages['user/index.php']['children']  = array_merge(array('user/user_create_edit.php',\r
+                                                                  'user/user_group.php'), \r
+                                                            isset($_pages['user/index.php']['children']) ? $_pages['user/index.php']['children'] : array());\r
+       $_pages['user/index.php']['guide']    = 'AF_HELP_USER';\r
+\r
+       $_pages['user/user_create_edit.php']['title_var'] = 'create_user';\r
+       $_pages['user/user_create_edit.php']['parent']    = 'user/index.php';\r
+       $_pages['user/user_create_edit.php']['guide']    = 'AF_HELP_CREATE_EDIT_USER';\r
+       \r
+       $_pages['user/user_password.php']['title_var'] = 'change_password';\r
+       $_pages['user/user_password.php']['parent']    = 'user/index.php';\r
+       $_pages['user/user_password.php']['guide']    = 'AF_HELP_USER_PASSWORD';\r
+\r
+       $_pages['user/user_delete.php']['title_var'] = 'delete_user';\r
+       $_pages['user/user_delete.php']['parent']    = 'user/index.php';\r
+\r
+       $_pages['user/user_group.php']['title_var'] = 'user_group';\r
+       $_pages['user/user_group.php']['parent']    = 'user/index.php';\r
+       $_pages['user/user_group.php']['children']  = array_merge(array('user/user_group_create_edit.php'), \r
+                                                            isset($_pages['user/user_group.php']['children']) ? $_pages['user/user_group.php']['children'] : array());\r
+       $_pages['user/user_group.php']['guide']    = 'AF_HELP_USER_GROUP';\r
+       \r
+       $_pages['user/user_group_create_edit.php']['title_var'] = 'create_edit_user_group';\r
+       $_pages['user/user_group_create_edit.php']['parent']    = 'user/user_group.php';\r
+       $_pages['user/user_group_create_edit.php']['guide']    = 'AF_HELP_CREATE_EDIT_USER_GROUP';\r
+       \r
+       $_pages['user/user_group_delete.php']['title_var'] = 'delete_user_group';\r
+       $_pages['user/user_group_delete.php']['parent']    = 'user/user_group.php';\r
+}\r
+\r
+// language pages\r
+if (in_array(AF_PRIV_LANGUAGE_MANAGEMENT, $privs))\r
+{\r
+       $_pages['language/index.php']['title_var'] = 'language';\r
+       $_pages['language/index.php']['parent']    = AF_NAV_TOP;\r
+       $_pages['language/index.php']['children']  = array_merge(array('language/language_add_edit.php'), \r
+                                                            isset($_pages['language/index.php']['children']) ? $_pages['language/index.php']['children'] : array());\r
+       $_pages['language/index.php']['guide']    = 'AF_HELP_LANGUAGE';\r
+\r
+       $_pages['language/language_add_edit.php']['title_var'] = 'add_language';\r
+       $_pages['language/language_add_edit.php']['parent']    = 'language/index.php';\r
+       $_pages['language/language_add_edit.php']['guide']    = 'AF_HELP_ADD_EDIT_LANGUAGE';\r
+       \r
+       $_pages['language/language_delete.php']['title_var'] = 'delete_language';\r
+       $_pages['language/language_delete.php']['parent'] = 'language/index.php';\r
+}\r
+\r
+// translation\r
+if (in_array(AF_PRIV_TRANSLATION, $privs))\r
+{\r
+       $_pages['translation/index.php']['title_var'] = 'translation';\r
+       $_pages['translation/index.php']['parent']    = AF_NAV_TOP;\r
+       $_pages['translation/index.php']['guide']    = 'AF_HELP_TRANSLATION';\r
+}\r
+\r
+// profile pages\r
+if (in_array(AF_PRIV_PROFILE, $privs))\r
+{\r
+       $_pages['profile/index.php']['title_var'] = 'profile';\r
+       $_pages['profile/index.php']['parent']    = AF_NAV_TOP;\r
+       $_pages['profile/index.php']['guide']    = 'AF_HELP_PROFILE';\r
+       $_pages['profile/index.php']['children']  = array_merge(array('profile/change_password.php', \r
+                                                                     'profile/change_email.php'), \r
+                                                               isset($_pages['profile/index.php']['children']) ? $_pages['profile/index.php']['children'] : array());\r
+       \r
+       $_pages['profile/change_password.php']['title_var'] = 'change_password';\r
+       $_pages['profile/change_password.php']['parent']    = 'profile/index.php';\r
+       $_pages['profile/change_password.php']['guide']    = 'AF_HELP_CHANGE_PASSWORD';\r
+       \r
+       $_pages['profile/change_email.php']['title_var'] = 'change_email';\r
+       $_pages['profile/change_email.php']['parent']    = 'profile/index.php';\r
+       $_pages['profile/change_email.php']['guide']    = 'AF_HELP_CHANGE_EMAIL';\r
+}\r
+\r
+// updater pages\r
+if (in_array(AF_PRIV_UPDATER, $privs))\r
+{\r
+       $_pages['updater/index.php']['title_var'] = 'updater';\r
+       $_pages['updater/index.php']['parent']    = AF_NAV_TOP;\r
+       $_pages['updater/index.php']['guide']    = 'AF_HELP_UPDATER';\r
+       $_pages['updater/index.php']['children']  = array_merge(array('updater/myown_patches.php', \r
+                                                                     'updater/patch_create.php'), \r
+                                                               isset($_pages['updater/index.php']['children']) ? $_pages['updater/index.php']['children'] : array());\r
+       \r
+       $_pages['updater/myown_patches.php']['title_var'] = 'myown_updates';\r
+       $_pages['updater/myown_patches.php']['parent']    = 'updater/index.php';\r
+       $_pages['updater/myown_patches.php']['children']    = array('updater/patch_create.php');\r
+       \r
+       $_pages['updater/patch_create.php']['title_var'] = 'create_update';\r
+       $_pages['updater/patch_create.php']['parent']    = 'updater/index.php';\r
+       $_pages['updater/patch_create.php']['guide']    = 'AF_HELP_CREATE_UPDATE';\r
+\r
+       $_pages['updater/patch_edit.php']['title_var'] = 'edit_update';\r
+       $_pages['updater/patch_edit.php']['parent']    = 'updater/index.php';\r
+\r
+       $_pages['updater/patch_delete.php']['title_var'] = 'delete_update';\r
+       $_pages['updater/patch_delete.php']['parent']    = 'updater/index.php';\r
+}\r
+?>
\ No newline at end of file
diff --git a/docs/include/phpCache/ChangeLog b/docs/include/phpCache/ChangeLog
new file mode 100644 (file)
index 0000000..23ab95d
--- /dev/null
@@ -0,0 +1,30 @@
+phpCache 1.4:
+       - added $CACHE_HAS["function"] which tells phpCache what functions it can and cant use.  This is for compatibility with php3.
+       - added cache_purge() and cache_purge_all()
+       - cache expire variables and cache variables now have the same scope.  You can now access normal variables from the cache_expire_if() and vice-versa.
+       - Backported to PHP3, added cache_output() for outputting to the cache output (since php3 does not have output buffering).
+       - Storing key/object inside of the cache meta data.  For future use.
+       - Added support for CACHE_MAX_FILENAME_LEN.  If a filename length is longer than CACHE_MAX_FILENAME_LEN, an md5 of it will be used instead.  This prevents fs max file length from occuring if the url is very long. 
+
+phpCache 1.3:
+       - A few tweaks here and there.  Hi Becca!
+       - Cache time is now checked for a change.  If the cache time was changed, cache expires immediately (now you can get rid of those infinite caches without dynamic expressions or an rm :) ).
+       - Support for cache dir hashes.  Cache is now distributed over multiple dirs.  This will speed up sites that have thousands of cache pages.  GC was also redone.  If the GC probability is hit, it will be run on only ONE cache dir (not the entire structure!).  You should use gc.php if you want a complete cleanup, read the header for more information.
+       - phpCache no longer takes control of the output buffering, it just reads the existing content.  It should now be safe to let ob_start() use a different handler without any problems.
+       - Added KFC (Kentucky Fried Cache).  The name is cool eh?  It strips out various things that wont be needed once you get phpCache up and running.  See KentuckyFriedCache.pl for information.
+       
+phpCache 1.2:
+       - Added support for conditional expires.  See expire_mtime.php and expire_every10s.php for examples.
+       - Added support for infinite caching (pass a cache time of 0).  Thanks to Heath Boutwell for the idea.
+
+phpCache 1.1:
+       - Added support for caching headers.  cache_header().
+       - Added two new demos.  thumbnails.php and pager.php.
+       - Added support for cache_variable() that allows you to
+               maintain a variable state between the cache and the
+               uncached versions.  See pager.php
+       - Changed the default object key to use a md5sum of all the
+               passed data.
+
+phpCache 1.0:
+       Intial Release
diff --git a/docs/include/phpCache/LICENSE b/docs/include/phpCache/LICENSE
new file mode 100644 (file)
index 0000000..93d8561
--- /dev/null
@@ -0,0 +1,227 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+   59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+   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
diff --git a/docs/include/phpCache/README b/docs/include/phpCache/README
new file mode 100644 (file)
index 0000000..daba6e9
--- /dev/null
@@ -0,0 +1,33 @@
+phpCache v1.4 by nathan@0x00.org
+http://0x00.org/phpCache/
+
+NOTICE: I would like to hear success stories, please email me with any
+               timing results or whatever.  Before and after, duh.
+
+This is a little caching system for PHP, it allows you to cache blocks of
+code on pages.  There are four functions you need to worry about, all
+sorta documented in phpCache.inc.
+
+These are the basic functions (please see phpCache.inc for the rest):
+
+cache_all($cache_time);
+// Caches the block of code that follows scoped to everyone
+cache_session($cache_time);
+// Caches the block of code that follows scoped to the session
+
+cache($cache_time, $object_name, $object_key);
+// This is the primary function, both cache_all() and cache_session() call
+       this.  It allows you to tweak to storage settings so you can scope it
+       to different things.  If you don't understand this, don't use it.
+
+endcache($store);
+// This function *MUST* be called after all the cached data has been output.
+       It must be called in the block.  If $store is TRUE, the data will be
+       cached.  If it is false, it will not be cached.
+
+Note: All these functions (except endcache()) return 0 if the block needs to be executed.
+       ie: the cache has expired.
+
+Please see the scripts in the demo directory for samples.
+
+-nathan@0x00.org
diff --git a/docs/include/phpCache/gc.php b/docs/include/phpCache/gc.php
new file mode 100644 (file)
index 0000000..14acb4d
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/*
+   phpCache v1.4 - PHP caching engine 
+   Copyright (C) 2001 Nathan <nathan@0x00.org> 
+
+   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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+/* This script should be run periodically via a cron job or by hand.  phpCache *WILL* try to clean up the cache on its own, but it does not do a full pass of the entire cache structure like this does.  Running this once a day is recommended.  */
+
+       set_time_limit(0);
+       include("phpCache.inc");
+       $ret=cache_gc();
+       print "cache_gc(): $ret\n";
+?>
diff --git a/docs/include/phpCache/phpCache.inc.php b/docs/include/phpCache/phpCache.inc.php
new file mode 100644 (file)
index 0000000..5db76bb
--- /dev/null
@@ -0,0 +1,535 @@
+<?php
+/*
+   phpCache v1.4.1 - PHP caching engine 
+   Copyright (C) 2001 Nathan <nathan@0x00.org> 
+   '.1' Bug Fix By Joel Kronenberg <joel.kronenberg@utoronto.ca>
+
+   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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+if (defined('CACHE_DIR') && (CACHE_DIR != '')) {
+       define('CACHE_ON', 1); /* disable caching */
+} else {
+       define('CACHE_ON', 0); /* enable caching */
+}
+if (!defined('CACHE_DIR')) {
+       define('CACHE_DIR', '');
+}
+
+
+       $CACHE_DEBUG = 0;                       /* Default: 0 - Turn debugging on/off */
+
+       define('THIS_CACHE_DIR', CACHE_DIR . '/aframe_cache_' . DB_NAME);
+
+       define('CACHE_GC', .10);        /* Default: .10 - Probability of garbage collection */
+       define('CACHE_USE_STORAGE_HASH', 0);    /* Default: 1 - Use storage hashing.  This will increase peformance if you are caching many pages. */ 
+       define('CACHE_STORAGE_CREATED', 0);     /* Default: 0 - This is a peformance tweak.  If you set this to 1, phpCache will not check if storage structures have been created.  Don't change this unles you are *SURE* the cache storage has been created. */
+       define('CACHE_MAX_STORAGE_HASH', 23);   /* Don't touch this unless you know what you're doing */
+       define('CACHE_STORAGE_PERM',     0700); /* Default: 0700 - Default permissions for storage directories. */
+       define('CACHE_MAX_FILENAME_LEN', 250);  /* How long the cache storage filename can be before it will md5() the entire thing */
+
+       $CACHE_HAS=array(       'ob_start'      => function_exists('ob_start'),
+                                               'realpath'      => function_exists('realpath'),
+                                               'crc32'         => function_exists('crc32')
+                                       );
+
+       define('CACHE_VERSION', '1.4.1');
+       define('CACHE_STORAGE_CHECKFILE',       THIS_CACHE_DIR 
+                                                                               . '/.phpCache-storage-V'
+                                                                               . CACHE_VERSION
+                                                                               . '-HASH='
+                                                                               . CACHE_USE_STORAGE_HASH);
+
+       define('CACHE_INFO', 'phpCache v1.4.1 By nathan@0x00.org (.1 Bug Fix By joel.kronenberg@utoronto.ca)'); 
+
+       /* This resets the cache state */
+       function cache_reset() {
+               global $cache_pbufferlen, $cache_absfile, $cache_data, $cache_variables, $cache_headers, $cache_expire_cond, $cache_output_buffer;
+
+               cache_debug(__LINE__ .': $cache_absfile -> '.$cache_absfile);
+
+               $cache_pbufferlen = FALSE;
+               $cache_absfile = NULL;
+               $cache_data = array();
+               $cache_fp = NULL;
+               $cache_expire_cond = NULL;
+               $cache_variables=array();
+               $cache_headers=array();
+               $cache_output_buffer='';
+
+               cache_debug(__LINE__ .': $cache_absfile -> '.$cache_absfile);
+       }
+
+       /* Used to output to the cache output, should only be needed if you dont have output buffering (PHP3) */
+       function cache_output($str) {
+               global $cache_output_buffer;
+               if (!$GLOBALS["CACHE_HAS"]['ob_start']) {
+                       $cache_output_buffer.=$str;
+               }
+               print $str;
+       }
+
+       /* Saves a header state between caching */
+       function cache_header($header) {
+               global $cache_headers;
+               Header($header);
+               cache_debug('Adding header '.$header);
+               $cache_headers[]=$header;
+       }
+
+       /* This is a function used internally by phpCache to evaluate the conditional expiration.  This allows the eval() to have its own simulated namespace so it doesnt conflict with any others. */
+       function cache_eval_expire($cond, &$vars) {
+               extract($vars);
+               $EXPIRE=FALSE;
+               eval($cond);
+               return !!$EXPIRE;
+       }
+
+       /* Call this function before a call to cache() to evaluate a dynamic expiration on cache_expire_variable()'s */
+       function cache_expire_if($expr) {
+               global $cache_expire_cond;
+               $cache_expire_cond=$expr;
+       }
+
+       /* Call this function to add a variable to the expire variables store */
+       function cache_expire_variable($vn) {
+               cache_debug("Adding $vn to expire variable store");
+               cache_variable($vn);
+       }
+
+       /* duh ? */
+       function cache_debug($s) {
+               global $CACHE_DEBUG;
+               if ($CACHE_DEBUG) {
+                       print "Debug: $s<br>\n";
+               }
+       }
+
+       /* Saves a variable state between caching */
+       function cache_variable($vn) {
+               global $cache_variables;
+               cache_debug(__LINE__ . ": Adding $vn to the variable store");
+               $cache_variables[] = $vn;
+       }
+
+
+       /* Returns the default key used by the helper functions */
+       function cache_default_key() {
+               global $HTTP_POST_VARS, $HTTP_GET_VARS, $QUERY_STRING;
+               return md5("POST=" . serialize($HTTP_POST_VARS) . " GET=" . serialize($HTTP_GET_VARS) . "QS=" . $QUERY_STRING);
+       }
+
+       /* Returns the default object used by the helper functions */
+       function cache_default_object() {
+               global $REQUEST_URI, $SERVER_NAME, $SCRIPT_FILENAME;
+               if ($GLOBALS["CACHE_HAS"]["realpath"]) {
+                       $sfn=realpath($SCRIPT_FILENAME);
+               } else {
+                       $sfn=$SCRIPT_FILENAME;
+               }
+               $name="http://$SERVER_NAME/$sfn";
+               return $name;
+       }
+
+       /* Caches the current page based on the page name and the GET/POST
+               variables.  All must match or else it will not be fectched
+               from the cache! */
+       function cache_all($cachetime=120) {
+               $key=cache_default_key();
+               $object=cache_default_object();
+               return cache($cachetime, $object, $key);
+       }
+
+       /* Same as cache_all() but it throws the session_id() into
+               the equation */
+       function cache_session($cachetime=120) {
+               global $HTTP_POST_VARS, $HTTP_GET_VARS;
+               $key=cache_default_key() . 'SESSIONID=' . session_id();
+               $object=cache_default_object();
+               return cache($cachetime, $object, $key);
+       }
+
+       /* Manually purge an item in the cache */
+       function cache_purge($object, $key) {
+               $thefile=cache_storage($object, $key);
+               //cache_lock($thefile, TRUE);
+               if (is_file($thefile)) {
+                       $ret=@unlink($thefile);
+               }
+               else {
+                       $ret = false;
+               }
+               //cache_lock($thefile, FALSE);
+               return $ret;
+       }
+
+       /* Manually purge all items in the cache */
+       function cache_purge_all() {
+               return cache_gc(NULL, 1, TRUE);
+       }
+
+       /* Caches $object based on $key for $cachetime, will return 0 if the
+               object has expired or the object does not exist. */
+       function cache($cachetime, $object, $key=NULL) {
+               global $cache_pbufferlen, $cache_absfile, $cache_file, $cache_data, $cache_expire_cond;
+               cache_debug(__LINE__ .': $cache_absfile -> '.$cache_absfile);
+               if (!CACHE_ON) {
+                       cache_debug('Not caching, CACHE_ON is off');
+                       return 0;
+               }
+               $curtime=time();
+               cache_debug(__LINE__.': Caching based on <b>OBJECT</b>='.$object.' <b>KEY</b>='.$key);
+               $cache_absfile=cache_storage($object, $key);
+               cache_debug(__LINE__.': Got cache_storage: '.$cache_absfile);
+               if (($buff=cache_read($cache_absfile))) {
+                       cache_debug('Opened the cache file');
+                       $cdata=unserialize($buff);
+                       if (is_array($cdata)) {
+                               $curco = $cdata['cache_object'];
+                               if ($curco!=$cache_absfile) {
+                                       cache_debug("Holy shit that is not my cache file! why? got=$curco wanted=$cache_absfile");
+                               } else {
+                                       $expireit = FALSE;
+                                       if ($cache_expire_cond) {
+                                               $expireit=cache_eval_expire($cache_expire_cond, $cdata['variables']);
+                                       }
+                                       if ($cdata['cachetime'] != $cachetime) {
+                                               cache_debug('Expiring because cachetime changed');
+                                               $expireit=TRUE;
+                                       }
+                                       if (!$expireit && ($cdata['cachetime']=="0" || $cdata['expire']>=$curtime)) {
+                                               $expirein=$cdata['expire']-$curtime+1;
+                                               cache_debug('Cache expires in '.$expirein);
+                                               if (is_array($cdata['variables'])) {
+                                                       while (list($k,$v)=each($cdata['variables'])) {
+                                                               cache_debug("Restoring variable $k to value $v");
+                                                               $GLOBALS[$k]=$v;
+                                                       }
+                                               }
+                                               if (is_array($cdata['headers'])) {
+                                                       while(list(,$h)=each($cdata['headers'])) {
+                                                               cache_debug("Restoring header $h");
+                                                               Header("$h");
+                                                       }
+                                               }
+                                               print $cdata['content'];
+                                               $ret=$expirein;
+                                               if ($cdata['cachetime']=='0') $ret='INFINITE';
+                                               cache_reset();
+                                               return $ret; 
+                                       }
+                               }
+                       }
+               } else {
+                       cache_debug(__LINE__.': Failed to open previous cache of '.$cache_absfile);
+               }
+       
+               $oldum = umask();
+               umask(0077);
+               /* readlink() is not supported on win32, changed to is_link */
+               if (is_link($cache_absfile)) {
+                       cache_debug("$cache_absfile is a symlink! not caching!");
+                       $cache_absfile=NULL;
+               } else {
+                       cache_debug(__LINE__.': not a symlink');
+                       cache_debug(__LINE__.': Got cache_storage: '.$cache_absfile);
+                       @touch($cache_absfile);
+       
+                       /* cases probs on win32 */
+                       //cache_lock($cache_absfile, TRUE);
+                       /* */
+               }
+               umask($oldum);
+               $cache_data['expire']   = $curtime + $cachetime;
+               $cache_data['cachetime']= $cachetime;
+               $cache_data['curtime']  = $curtime;
+               $cache_data['version']  = CACHE_VERSION;
+               $cache_data['key']              = $key;
+               $cache_data['object']   = $object;
+
+               if ($GLOBALS['CACHE_HAS']['ob_start']) {
+                       $cache_pbufferlen = ob_get_length();
+                       /* If ob_get_length() returns false, output buffering was not on.  turn it on. */
+                       if (cache_iftype($cache_pbufferlen, FALSE)) {
+                               ob_start();
+                       }
+               } else {
+                       $cache_pbufferlen=FALSE;
+               }
+               cache_debug(__LINE__ .': $cache_absfile -> '.$cache_absfile);
+               return 0;
+       }
+
+       /* This *MUST* be at the end of a cache() block or else the cache
+               will not be stored! */ 
+       function endcache($store=TRUE, $send_output = TRUE) {
+               global $cache_pbufferlen, $cache_absfile, $cache_data, $cache_variables, $cache_headers, $cache_ob_handler, $cache_output_buffer;
+               cache_debug(__LINE__ .': $cache_absfile -> '.$cache_absfile);
+               if (!CACHE_ON) {
+                       cache_debug('Not caching, CACHE_ON is off');
+                       return 0;
+               } /* else */
+
+               if ($GLOBALS[CACHE_HAS]['ob_start']) {
+                       $content=ob_get_contents();
+                       if (cache_iftype($cache_pbufferlen,FALSE)) {
+                               /* Output buffering was off before this, we just need to turn it off again */
+
+                               /* JK's fix */
+                               if ($send_output) {
+                                       ob_end_flush();
+                                       cache_debug(__LINE__.': Content sent. flush()');
+                               } else {
+                                       ob_end_clean();
+                                       cache_debug(__LINE__.': Content ignored. clean()');
+                               }
+                               cache_debug(__LINE__ .': $cache_absfile -> '.$cache_absfile);
+                       } else {
+                               /* Output buffering was already on, so get our chunk of data for caching */
+                               $content=substr($content, $cache_pbufferlen);
+                       }
+               } else {
+                       $content=$cache_output_buffer;
+               }
+
+               if (!$store) {
+                       $cache_absfile=NULL;
+               }
+
+               if ($cache_absfile != NULL) {
+                       $cache_data['content'] = $content;
+                       $variables = array();
+                       foreach ($cache_variables as $vn) {
+                       //while(list(,$vn)=each($cache_variables)) {
+                               cache_debug(__LINE__ . ': Found variable: <b>'.$vn.'</b>');
+                               if (isset($GLOBALS[$vn])) {
+                                       $val=$GLOBALS[$vn];
+                                       cache_debug(__LINE__ . ': Setting variable '.$vn.' to '.$val);
+                                       $variables[$vn]=$val;
+                               }
+                       }
+                       $cache_data['cache_object'] = $cache_absfile;
+                       $cache_data['variables']        = $variables;
+                       $cache_data['headers']          = $cache_headers;
+                       $datas = serialize($cache_data);
+                       cache_write($cache_absfile, $datas);
+               } else {
+                       cache_debug(__LINE__ .': no variables found');
+                       cache_debug($cache_variables[0]);
+                       cache_debug(__LINE__ .': $cache_absfile -> '.$cache_absfile);
+               }
+               /* casues probs on win32 */
+               cache_lock($cache_absfile, FALSE);
+               /* */
+               cache_reset();
+
+               cache_debug(__LINE__ .': $cache_absfile -> '.$cache_absfile);
+               cache_debug(__LINE__. ': <b>Caching is done!</b><br>');
+       }
+
+       /* Obtain a lock on the cache storage, this can be stripped out
+               and changed to a different handler like a database or
+               whatever */
+       function cache_lock($file, $open=TRUE) {
+               static $fp;
+
+               if ($open) {
+                       cache_debug('trying to lock '.$file);
+                       $fp  = @fopen($file, 'r');
+                       if ($fp) {
+                               $ret = @flock($fp, LOCK_SH); /* get a shared lock */
+                       }
+               } else {
+                       cache_debug('trying to unlock '.$file);
+                       $ret = @flock($fp, LOCK_UN);
+                       @fclose($fp);
+                       $fp = NULL;
+               }
+               return $ret;
+       }
+
+       /* This is the function that writes out the cache */
+       function cache_write($file, $data) {
+               cache_debug(__LINE__.': Writing cache data to file: '.$file);
+               
+               $fp = fopen($file, 'wb+');
+               @flock($fp, LOCK_EX); /* get a shared lock */
+               if (!$fp) {
+                       cache_debug('Failed to open for write out to '.$file);
+                       return FALSE;
+               }
+               @fwrite($fp, $data, strlen($data));
+               @flock($fp, LOCK_UN); /* get a shared lock */
+               fclose($fp);
+
+               return TRUE;
+       }
+
+       /* This function reads in the cache, duh */
+       function cache_read($file) {
+               $fp = @fopen($file, 'r');
+               if (!$fp) {
+                       cache_debug(__LINE__.': Failed opening file '.realpath($file));
+                       return NULL;
+               }
+               flock($fp, 1);
+               $buff='';
+               while (($tmp=fread($fp, 4096))) {
+                       $buff.=$tmp;
+               }
+               fclose($fp);
+               return $buff;
+       }
+
+       /* This function is called automatically by phpCache to create the cache directory structure */
+       function cache_create_storage() {
+               $failed = 0;
+               $failed |= !@mkdir(THIS_CACHE_DIR, CACHE_STORAGE_PERM);
+               if (CACHE_USE_STORAGE_HASH) {
+                       for ($a=0; $a<CACHE_MAX_STORAGE_HASH; $a++) {
+                               $thedir=THIS_CACHE_DIR . "/$a/";
+                               $failed|=!@mkdir($thedir, CACHE_STORAGE_PERM);
+                               for ($b=0; $b<CACHE_MAX_STORAGE_HASH; $b++) {
+                                       $thedir=THIS_CACHE_DIR . "/$a/$b/";
+                                       $failed|=!@mkdir($thedir, CACHE_STORAGE_PERM);
+                                       for ($c=0; $c<CACHE_MAX_STORAGE_HASH; $c++) {
+                                               $thedir=THIS_CACHE_DIR . "/$a/$b/$c/";
+                                               $failed|=!@mkdir($thedir, CACHE_STORAGE_PERM);
+                                       }
+                               }
+                       }
+               }
+               return TRUE;
+       }
+
+       /* This function hashes the cache object and places it in a cache dir.  This function also handles the GC probability (note that it is run on only *ONE* dir to save time. */
+       function cache_storage($object, $key) {
+               $newobject=eregi_replace("[^A-Z,0-9,=]", 'X', $object);
+               $newkey=eregi_replace("[^A-Z,0-9,=]", 'X', $key);
+               $temp="${newobject}=${newkey}";
+               if (strlen($temp)>=CACHE_MAX_FILENAME_LEN) $temp="HUGE." . md5($temp);
+               $cacheobject = 'phpCache.' . $temp;
+               
+               $thedir=THIS_CACHE_DIR . '/';
+
+               if (CACHE_USE_STORAGE_HASH) {
+                       $chunksize=10;
+                       $ustr=md5($cacheobject);
+                       for ($i=0; $i<3; $i++) {
+                               if ($GLOBALS['CACHE_HAS']['crc32']) {
+                                       $thenum=abs(crc32(substr($ustr,$i,4)))%CACHE_MAX_STORAGE_HASH;
+                               } else {
+                                       $thenum=substr($ustr, $i, 4);
+                                       $thenum=(ord($thenum[0]) . ord($thenum[1]) . ord($thenum[2]) . ord($thenum[3]))%CACHE_MAX_STORAGE_HASH;
+                               }
+                               $thedir.= $thenum . '/';
+                       }
+               }
+               if (CACHE_GC>0) {
+                       $precision=100000;
+                       $r=(mt_rand()%$precision)/$precision;
+                       if ($r<=(CACHE_GC/100)) {
+                               cache_gc($thedir);
+                       }
+               }
+               $theloc = $thedir . $cacheobject;
+
+               return $theloc;
+       }
+
+       /* Cache garbage collection */
+       function cache_gc($dir=NULL, $start=1, $purgeall=FALSE) {
+               static $dirs=0, $files=0, $deleted=0, $ignored=0, $faileddelete=0, $empty=0;
+               if ($start==1) {
+                       cache_debug("Running GC on $dir");
+                       if (!function_exists("getcwd")) {
+                               $cwd=substr(`pwd`, 0, -1);
+                       } else {
+                               $cwd=getcwd();
+                       }
+                       $dirs=$files=$deleted=$ignored=$faileddelete=$empty=0;
+               }
+               if (cache_iftype($dir, NULL)) $dir=THIS_CACHE_DIR;
+               $dp=opendir($dir);
+               if (!$dp) {
+                       cache_debug("Error opening $dir for cleanup");
+                       return FALSE;
+               }
+               chdir($dir);
+               $dirs++;
+               while (!cache_iftype(($de=readdir($dp)),FALSE)) {
+                       if (is_dir($de)) {
+                               if ($de=='.' || $de=='..') continue;
+                               cache_gc($de, 0, $purgeall);
+                               chdir('..');
+                               continue;
+                       }
+
+                       if (eregi("^phpCache.", $de)) {
+                               $files++;
+                               $absfile=$de;
+                               $cachestuff=cache_read($absfile);
+                               $thecache=unserialize($cachestuff);
+                               if (is_array($thecache)) {
+                                       if ($purgeall || ($cdata["cachetime"]!="0" && $thecache["expire"]<=time())) {
+                                               cache_lock($absfile, TRUE);
+                                               if (@unlink($absfile)) {
+                                                       $deleted++;
+                                                       cache_debug("$dir Deleted $absfile");
+                                               } else {
+                                                       $faileddelete++;
+                                                       cache_debug("$dir Failed to delete $absfile");
+                                               }
+                                               cache_lock($absfile, FALSE);
+                                       } else {
+                                               cache_debug("$dir $absfile expires in " . ($thecache["expire"]-time()));
+                                       }
+                               } else {
+                                       cache_debug("$dir $absfile is empty, being processed in another process?");
+                                       $empty++;
+                               }
+                       } else {
+                               $ignored++;
+                       }
+               }
+               closedir($dp);
+               if ($start==1) {
+                       $str="$dir GC Processed: $dirs/dirs     $files/files    $deleted/deleted        $ignored/ignored        $faileddelete/faileddelete      $empty/empty";
+                       cache_debug($str);
+                       chdir($cwd);
+                       return $str;
+               }
+       }
+
+       function cache_iftype($a, $b) {
+               if (gettype($a)==gettype($b) && $a==$b) return TRUE;
+               return FALSE;
+       }
+
+       if (CACHE_ON && !CACHE_STORAGE_CREATED && !@stat(CACHE_STORAGE_CHECKFILE)) {
+               cache_debug('Creating cache storage');
+               cache_create_storage();
+               if (!@touch(CACHE_STORAGE_CHECKFILE)) {
+                       global $msg;
+               
+                       $msg->printErrors('CACHE_DIR_BAD');
+                       exit;
+               }
+       }
+
+       mt_srand(time(NULL));
+       cache_reset();
+
+?>
\ No newline at end of file
diff --git a/docs/include/securimage/LICENSE.txt b/docs/include/securimage/LICENSE.txt
new file mode 100644 (file)
index 0000000..9a749e6
--- /dev/null
@@ -0,0 +1,458 @@
+                 GNU LESSER GENERAL PUBLIC LICENSE
+                      Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+\f
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+\f
+                 GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+\f
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+\f
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+\f
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+\f
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+\f
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+\f
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                           NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
diff --git a/docs/include/securimage/README.txt b/docs/include/securimage/README.txt
new file mode 100644 (file)
index 0000000..9711d57
--- /dev/null
@@ -0,0 +1,57 @@
+NAME:
+
+    Securimage - A PHP class for creating and managing form CAPTCHA images
+
+VERSION: 1.0.2
+
+AUTHOR:
+
+    Drew Phillips <drew@drew-phillips.com>
+
+DOWNLOAD:
+
+    The latest version can always be
+    found at http://www.phpcaptcha.org
+
+DOCUMENTATION:
+
+    Online documentation of the class, methods, and variables can
+    be found at http://www.phpcaptcha.org/Securimage_Docs/
+
+REQUIREMENTS:
+    PHP 4.3.0
+    GD  2.0
+    FreeType (optional, required for TTF support)
+
+SYNOPSIS:
+
+    require_once 'securimage.php';
+
+    $image = new Securimage();
+
+    $image->show();
+
+    // Code Validation
+
+    $image = new Securimage();
+    if ($image->check($_POST['code']) == true) {
+      echo "Correct!";
+    } else {
+      echo "Sorry, wrong code.";
+    }
+
+DESCRIPTION:
+
+    What is Securimage?
+
+    Securimage is a PHP class that is used to generate and validate CAPTCHA images.
+    The classes uses an existing PHP session or creates its own if none is found to store the
+    CAPTCHA code.  Variables within the class are used to control the style and display of the image.
+    The class supports TTF fonts and effects for strengthening the security of the image.
+    If TTF support is not available, GD fonts can be used as well, but certain options such as
+    transparent text and angled letters cannot be used.
+
+
+COPYRIGHT:
+    Copyright (c) 2007 Drew Phillips. All rights reserved.
+    This software is released under the GNU Lesser General Public License.
diff --git a/docs/include/securimage/audio/0.wav b/docs/include/securimage/audio/0.wav
new file mode 100644 (file)
index 0000000..b01b8dd
Binary files /dev/null and b/docs/include/securimage/audio/0.wav differ
diff --git a/docs/include/securimage/audio/1.wav b/docs/include/securimage/audio/1.wav
new file mode 100644 (file)
index 0000000..f37f81e
Binary files /dev/null and b/docs/include/securimage/audio/1.wav differ
diff --git a/docs/include/securimage/audio/2.wav b/docs/include/securimage/audio/2.wav
new file mode 100644 (file)
index 0000000..66ed235
Binary files /dev/null and b/docs/include/securimage/audio/2.wav differ
diff --git a/docs/include/securimage/audio/3.wav b/docs/include/securimage/audio/3.wav
new file mode 100644 (file)
index 0000000..45bb85f
Binary files /dev/null and b/docs/include/securimage/audio/3.wav differ
diff --git a/docs/include/securimage/audio/4.wav b/docs/include/securimage/audio/4.wav
new file mode 100644 (file)
index 0000000..b21bb65
Binary files /dev/null and b/docs/include/securimage/audio/4.wav differ
diff --git a/docs/include/securimage/audio/5.wav b/docs/include/securimage/audio/5.wav
new file mode 100644 (file)
index 0000000..b7654b0
Binary files /dev/null and b/docs/include/securimage/audio/5.wav differ
diff --git a/docs/include/securimage/audio/6.wav b/docs/include/securimage/audio/6.wav
new file mode 100644 (file)
index 0000000..a8a23ad
Binary files /dev/null and b/docs/include/securimage/audio/6.wav differ
diff --git a/docs/include/securimage/audio/7.wav b/docs/include/securimage/audio/7.wav
new file mode 100644 (file)
index 0000000..f76c22b
Binary files /dev/null and b/docs/include/securimage/audio/7.wav differ
diff --git a/docs/include/securimage/audio/8.wav b/docs/include/securimage/audio/8.wav
new file mode 100644 (file)
index 0000000..c356cca
Binary files /dev/null and b/docs/include/securimage/audio/8.wav differ
diff --git a/docs/include/securimage/audio/9.wav b/docs/include/securimage/audio/9.wav
new file mode 100644 (file)
index 0000000..1d828f1
Binary files /dev/null and b/docs/include/securimage/audio/9.wav differ
diff --git a/docs/include/securimage/audio/A.wav b/docs/include/securimage/audio/A.wav
new file mode 100644 (file)
index 0000000..c3dcd8a
Binary files /dev/null and b/docs/include/securimage/audio/A.wav differ
diff --git a/docs/include/securimage/audio/B.wav b/docs/include/securimage/audio/B.wav
new file mode 100644 (file)
index 0000000..9f380c2
Binary files /dev/null and b/docs/include/securimage/audio/B.wav differ
diff --git a/docs/include/securimage/audio/C.wav b/docs/include/securimage/audio/C.wav
new file mode 100644 (file)
index 0000000..a9b81eb
Binary files /dev/null and b/docs/include/securimage/audio/C.wav differ
diff --git a/docs/include/securimage/audio/D.wav b/docs/include/securimage/audio/D.wav
new file mode 100644 (file)
index 0000000..66ee3a1
Binary files /dev/null and b/docs/include/securimage/audio/D.wav differ
diff --git a/docs/include/securimage/audio/E.wav b/docs/include/securimage/audio/E.wav
new file mode 100644 (file)
index 0000000..d8fe450
Binary files /dev/null and b/docs/include/securimage/audio/E.wav differ
diff --git a/docs/include/securimage/audio/F.wav b/docs/include/securimage/audio/F.wav
new file mode 100644 (file)
index 0000000..4046176
Binary files /dev/null and b/docs/include/securimage/audio/F.wav differ
diff --git a/docs/include/securimage/audio/G.wav b/docs/include/securimage/audio/G.wav
new file mode 100644 (file)
index 0000000..8700179
Binary files /dev/null and b/docs/include/securimage/audio/G.wav differ
diff --git a/docs/include/securimage/audio/H.wav b/docs/include/securimage/audio/H.wav
new file mode 100644 (file)
index 0000000..2e33c4e
Binary files /dev/null and b/docs/include/securimage/audio/H.wav differ
diff --git a/docs/include/securimage/audio/I.wav b/docs/include/securimage/audio/I.wav
new file mode 100644 (file)
index 0000000..cf60cd8
Binary files /dev/null and b/docs/include/securimage/audio/I.wav differ
diff --git a/docs/include/securimage/audio/J.wav b/docs/include/securimage/audio/J.wav
new file mode 100644 (file)
index 0000000..5fecfae
Binary files /dev/null and b/docs/include/securimage/audio/J.wav differ
diff --git a/docs/include/securimage/audio/K.wav b/docs/include/securimage/audio/K.wav
new file mode 100644 (file)
index 0000000..27e1d37
Binary files /dev/null and b/docs/include/securimage/audio/K.wav differ
diff --git a/docs/include/securimage/audio/L.wav b/docs/include/securimage/audio/L.wav
new file mode 100644 (file)
index 0000000..139f7cd
Binary files /dev/null and b/docs/include/securimage/audio/L.wav differ
diff --git a/docs/include/securimage/audio/M.wav b/docs/include/securimage/audio/M.wav
new file mode 100644 (file)
index 0000000..08d5cf5
Binary files /dev/null and b/docs/include/securimage/audio/M.wav differ
diff --git a/docs/include/securimage/audio/N.wav b/docs/include/securimage/audio/N.wav
new file mode 100644 (file)
index 0000000..fba6923
Binary files /dev/null and b/docs/include/securimage/audio/N.wav differ
diff --git a/docs/include/securimage/audio/O.wav b/docs/include/securimage/audio/O.wav
new file mode 100644 (file)
index 0000000..e5a3578
Binary files /dev/null and b/docs/include/securimage/audio/O.wav differ
diff --git a/docs/include/securimage/audio/P.wav b/docs/include/securimage/audio/P.wav
new file mode 100644 (file)
index 0000000..3b94c7a
Binary files /dev/null and b/docs/include/securimage/audio/P.wav differ
diff --git a/docs/include/securimage/audio/Q.wav b/docs/include/securimage/audio/Q.wav
new file mode 100644 (file)
index 0000000..c757e54
Binary files /dev/null and b/docs/include/securimage/audio/Q.wav differ
diff --git a/docs/include/securimage/audio/R.wav b/docs/include/securimage/audio/R.wav
new file mode 100644 (file)
index 0000000..c2e4b24
Binary files /dev/null and b/docs/include/securimage/audio/R.wav differ
diff --git a/docs/include/securimage/audio/S.wav b/docs/include/securimage/audio/S.wav
new file mode 100644 (file)
index 0000000..8edcf8d
Binary files /dev/null and b/docs/include/securimage/audio/S.wav differ
diff --git a/docs/include/securimage/audio/T.wav b/docs/include/securimage/audio/T.wav
new file mode 100644 (file)
index 0000000..e714a4a
Binary files /dev/null and b/docs/include/securimage/audio/T.wav differ
diff --git a/docs/include/securimage/audio/U.wav b/docs/include/securimage/audio/U.wav
new file mode 100644 (file)
index 0000000..f5f35d1
Binary files /dev/null and b/docs/include/securimage/audio/U.wav differ
diff --git a/docs/include/securimage/audio/V.wav b/docs/include/securimage/audio/V.wav
new file mode 100644 (file)
index 0000000..4234a96
Binary files /dev/null and b/docs/include/securimage/audio/V.wav differ
diff --git a/docs/include/securimage/audio/W.wav b/docs/include/securimage/audio/W.wav
new file mode 100644 (file)
index 0000000..f6fba71
Binary files /dev/null and b/docs/include/securimage/audio/W.wav differ
diff --git a/docs/include/securimage/audio/X.wav b/docs/include/securimage/audio/X.wav
new file mode 100644 (file)
index 0000000..a45fd4b
Binary files /dev/null and b/docs/include/securimage/audio/X.wav differ
diff --git a/docs/include/securimage/audio/Y.wav b/docs/include/securimage/audio/Y.wav
new file mode 100644 (file)
index 0000000..921ae5d
Binary files /dev/null and b/docs/include/securimage/audio/Y.wav differ
diff --git a/docs/include/securimage/audio/Z.wav b/docs/include/securimage/audio/Z.wav
new file mode 100644 (file)
index 0000000..1fa83a4
Binary files /dev/null and b/docs/include/securimage/audio/Z.wav differ
diff --git a/docs/include/securimage/elephant.ttf b/docs/include/securimage/elephant.ttf
new file mode 100644 (file)
index 0000000..024b076
Binary files /dev/null and b/docs/include/securimage/elephant.ttf differ
diff --git a/docs/include/securimage/gdfonts/automatic.gdf b/docs/include/securimage/gdfonts/automatic.gdf
new file mode 100644 (file)
index 0000000..3eee706
Binary files /dev/null and b/docs/include/securimage/gdfonts/automatic.gdf differ
diff --git a/docs/include/securimage/gdfonts/bubblebath.gdf b/docs/include/securimage/gdfonts/bubblebath.gdf
new file mode 100644 (file)
index 0000000..5dc6fea
Binary files /dev/null and b/docs/include/securimage/gdfonts/bubblebath.gdf differ
diff --git a/docs/include/securimage/gdfonts/caveman.gdf b/docs/include/securimage/gdfonts/caveman.gdf
new file mode 100644 (file)
index 0000000..4f72cdb
Binary files /dev/null and b/docs/include/securimage/gdfonts/caveman.gdf differ
diff --git a/docs/include/securimage/gdfonts/crass.gdf b/docs/include/securimage/gdfonts/crass.gdf
new file mode 100644 (file)
index 0000000..73420a9
Binary files /dev/null and b/docs/include/securimage/gdfonts/crass.gdf differ
diff --git a/docs/include/securimage/images/audio_icon.gif b/docs/include/securimage/images/audio_icon.gif
new file mode 100644 (file)
index 0000000..beafd51
Binary files /dev/null and b/docs/include/securimage/images/audio_icon.gif differ
diff --git a/docs/include/securimage/images/refresh.gif b/docs/include/securimage/images/refresh.gif
new file mode 100644 (file)
index 0000000..a10b247
Binary files /dev/null and b/docs/include/securimage/images/refresh.gif differ
diff --git a/docs/include/securimage/securimage.php b/docs/include/securimage/securimage.php
new file mode 100644 (file)
index 0000000..9d5f1e1
--- /dev/null
@@ -0,0 +1,954 @@
+<?php
+
+/**
+ * Project:     Securimage: A PHP class for creating and managing form CAPTCHA images<br />
+ * File:        securimage.php<br />
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or any later version.<br /><br />
+ *
+ * This library 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
+ * Lesser General Public License for more details.<br /><br />
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA<br /><br />
+ *
+ * Any modifications to the library should be indicated clearly in the source code
+ * to inform users that the changes are not a part of the original software.<br /><br />
+ *
+ * If you found this script useful, please take a quick moment to rate it.<br />
+ * http://www.hotscripts.com/rate/49400.html  Thanks.
+ *
+ * @link http://www.phpcaptcha.org Securimage PHP CAPTCHA
+ * @link http://www.phpcaptcha.org/latest.zip Download Latest Version
+ * @link http://www.phpcaptcha.org/Securimage_Docs/ Online Documentation
+ * @copyright 2007 Drew Phillips
+ * @author drew010 <drew@drew-phillips.com>
+ * @version 1.0.3.1 (March 24, 2008)
+ * @package Securimage
+ *
+ */
+
+/**
+  ChangeLog
+
+  1.0.3.1
+  - Error reading from wordlist in some cases caused words to be cut off 1 letter short
+
+  1.0.3
+  - Removed shadow_text from code which could cause an undefined property error due to removal from previous version
+
+  1.0.2
+  - Audible CAPTCHA Code wav files
+  - Create codes from a word list instead of random strings
+
+  1.0
+  - Added the ability to use a selected character set, rather than a-z0-9 only.
+  - Added the multi-color text option to use different colors for each letter.
+  - Switched to automatic session handling instead of using files for code storage
+  - Added GD Font support if ttf support is not available.  Can use internal GD fonts or load new ones.
+  - Added the ability to set line thickness
+  - Added option for drawing arced lines over letters
+  - Added ability to choose image type for output
+
+*/
+
+/**
+ * Output images in JPEG format
+ */
+define('SI_IMAGE_JPEG', 1);
+/**
+ * Output images in PNG format
+ */
+define('SI_IMAGE_PNG',  2);
+/**
+ * Output images in GIF format
+ * Must have GD >= 2.0.28!
+ */
+define('SI_IMAGE_GIF',  3);
+
+/**
+ * Securimage CAPTCHA Class.
+ *
+ * @package    Securimage
+ * @subpackage classes
+ *
+ */
+class Securimage {
+
+  /**
+   * The desired width of the CAPTCHA image.
+   *
+   * @var int
+   */
+  var $image_width = 175;
+
+  /**
+   * The desired width of the CAPTCHA image.
+   *
+   * @var int
+   */
+  var $image_height = 45;
+
+  /**
+   * The image format for output.<br />
+   * Valid options: SI_IMAGE_PNG, SI_IMAGE_JPG, SI_IMAGE_GIF
+   *
+   * @var int
+   */
+  var $image_type = SI_IMAGE_PNG;
+
+  /**
+   * The length of the code to generate.
+   *
+   * @var int
+   */
+  var $code_length = 4;
+
+  /**
+   * The character set for individual characters in the image.<br />
+   * Letters are converted to uppercase.<br />
+   * The font must support the letters or there may be problematic substitutions.
+   *
+   * @var string
+   */
+  var $charset = 'ABCDEFGHKLMNPRSTUVWYZ23456789';
+  //var $charset = '0123456789';
+
+  /**
+   * Create codes using this word list
+   *
+   * @var string  The path to the word list to use for creating CAPTCHA codes
+   */
+  var $wordlist_file = '../words/words.txt';
+
+  /**
+   * True to use a word list file instead of a random code
+   *
+   * @var bool
+   */
+  var $use_wordlist  = true;
+
+  /**
+   * Whether to use a GD font instead of a TTF font.<br />
+   * TTF offers more support and options, but use this if your PHP doesn't support TTF.<br />
+   *
+   * @var boolean
+   */
+  var $use_gd_font = false;
+
+  /**
+   * The GD font to use.<br />
+   * Internal gd fonts can be loaded by their number.<br />
+   * Alternatively, a file path can be given and the font will be loaded from file.
+   *
+   * @var mixed
+   */
+  var $gd_font_file = 'gdfonts/bubblebath.gdf';
+
+  /**
+   * The approximate size of the font in pixels.<br />
+   * This does not control the size of the font because that is determined by the GD font itself.<br />
+   * This is used to aid the calculations of positioning used by this class.<br />
+   *
+   * @var int
+   */
+  var $gd_font_size = 20;
+
+  // Note: These font options below do not apply if you set $use_gd_font to true with the exception of $text_color
+
+  /**
+   * The path to the TTF font file to load.
+   *
+   * @var string
+   */
+  var $ttf_file = "./elephant.ttf";
+
+  /**
+   * The font size.<br />
+   * Depending on your version of GD, this should be specified as the pixel size (GD1) or point size (GD2)<br />
+   *
+   * @var int
+   */
+  var $font_size = 24;
+
+  /**
+   * The minimum angle in degrees, with 0 degrees being left-to-right reading text.<br />
+   * Higher values represent a counter-clockwise rotation.<br />
+   * For example, a value of 90 would result in bottom-to-top reading text.
+   *
+   * @var int
+   */
+  var $text_angle_minimum = -20;
+
+  /**
+   * The minimum angle in degrees, with 0 degrees being left-to-right reading text.<br />
+   * Higher values represent a counter-clockwise rotation.<br />
+   * For example, a value of 90 would result in bottom-to-top reading text.
+   *
+   * @var int
+   */
+  var $text_angle_maximum = 20;
+
+  /**
+   * The X-Position on the image where letter drawing will begin.<br />
+   * This value is in pixels from the left side of the image.
+   *
+   * @var int
+   */
+  var $text_x_start = 8;
+
+  /**
+   * Letters can be spaced apart at random distances.<br />
+   * This is the minimum distance between two letters.<br />
+   * This should be <i>at least</i> as wide as a font character.<br />
+   * Small values can cause letters to be drawn over eachother.<br />
+   *
+   * @var int
+   */
+  var $text_minimum_distance = 30;
+
+  /**
+   * Letters can be spaced apart at random distances.<br />
+   * This is the maximum distance between two letters.<br />
+   * This should be <i>at least</i> as wide as a font character.<br />
+   * Small values can cause letters to be drawn over eachother.<br />
+   *
+   * @var int
+   */
+  var $text_maximum_distance = 33;
+
+  /**
+   * The background color for the image.<br />
+   * This should be specified in HTML hex format.<br />
+   * Make sure to include the preceding # sign!
+   *
+   * @var string
+   */
+  var $image_bg_color = "#e3daed";
+
+  /**
+   * The text color to use for drawing characters.<br />
+   * This value is ignored if $use_multi_text is set to true.<br />
+   * Make sure this contrasts well with the background color.<br />
+   * Specify the color in HTML hex format with preceding # sign
+   *
+   * @see Securimage::$use_multi_text
+   * @var string
+   */
+  var $text_color = "#ff0000";
+
+  /**
+   * Set to true to use multiple colors for each character.
+   *
+   * @see Securimage::$multi_text_color
+   * @var boolean
+   */
+  var $use_multi_text = true;
+
+  /**
+   * String of HTML hex colors to use.<br />
+   * Separate each possible color with commas.<br />
+   * Be sure to precede each value with the # sign.
+   *
+   * @var string
+   */
+  var $multi_text_color = "#0a68dd,#f65c47,#8d32fd";
+
+  /**
+   * Set to true to make the characters appear transparent.
+   *
+   * @see Securimage::$text_transparency_percentage
+   * @var boolean
+   */
+  var $use_transparent_text = true;
+
+  /**
+   * The percentage of transparency, 0 to 100.<br />
+   * A value of 0 is completely opaque, 100 is completely transparent (invisble)
+   *
+   * @see Securimage::$use_transparent_text
+   * @var int
+   */
+  var $text_transparency_percentage = 15;
+
+
+  // Line options
+  /**
+   * Draw vertical and horizontal lines on the image.
+   *
+   * @see Securimage::$line_color
+   * @see Securimage::$line_distance
+   * @see Securimage::$line_thickness
+   * @see Securimage::$draw_lines_over_text
+   * @var boolean
+   */
+  var $draw_lines = true;
+
+  /**
+   * The color of the lines drawn on the image.<br />
+   * Use HTML hex format with preceding # sign.
+   *
+   * @see Securimage::$draw_lines
+   * @var string
+   */
+  var $line_color = "#80BFFF";
+
+  /**
+   * How far apart to space the lines from eachother in pixels.
+   *
+   * @see Securimage::$draw_lines
+   * @var int
+   */
+  var $line_distance = 5;
+
+  /**
+   * How thick to draw the lines in pixels.<br />
+   * 1-3 is ideal depending on distance
+   *
+   * @see Securimage::$draw_lines
+   * @see Securimage::$line_distance
+   * @var int
+   */
+  var $line_thickness = 1;
+
+  /**
+   * Set to true to draw angled lines on the image in addition to the horizontal and vertical lines.
+   *
+   * @see Securimage::$draw_lines
+   * @var boolean
+   */
+  var $draw_angled_lines = false;
+
+  /**
+   * Draw the lines over the text.<br />
+   * If fales lines will be drawn before putting the text on the image.<br />
+   * This can make the image hard for humans to read depending on the line thickness and distance.
+   *
+   * @var boolean
+   */
+  var $draw_lines_over_text = false;
+
+  /**
+   * For added security, it is a good idea to draw arced lines over the letters to make it harder for bots to segment the letters.<br />
+   * Two arced lines will be drawn over the text on each side of the image.<br />
+   * This is currently expirimental and may be off in certain configurations.
+   *
+   * @var boolean
+   */
+  var $arc_linethrough = true;
+
+  /**
+   * The colors or color of the arced lines.<br />
+   * Use HTML hex notation with preceding # sign, and separate each value with a comma.<br />
+   * This should be similar to your font color for single color images.
+   *
+   * @var string
+   */
+  var $arc_line_colors = "#8080ff";
+
+  /**
+   * Full path to the WAV files to use to make the audio files, include trailing /.<br />
+   * Name Files  [A-Z0-9].wav
+   *
+   * @since 1.0.1
+   * @var string
+   */
+  var $audio_path = './audio/';
+
+
+  //END USER CONFIGURATION
+  //There should be no need to edit below unless you really know what you are doing.
+
+  /**
+   * The gd image resource.
+   *
+   * @access private
+   * @var resource
+   */
+  var $im;
+
+  /**
+   * The background image resource
+   *
+   * @access private
+   * @var resource
+   */
+  var $bgimg;
+
+  /**
+   * The code generated by the script
+   *
+   * @access private
+   * @var string
+   */
+  var $code;
+
+  /**
+   * The code that was entered by the user
+   *
+   * @access private
+   * @var string
+   */
+  var $code_entered;
+
+  /**
+   * Whether or not the correct code was entered
+   *
+   * @access private
+   * @var boolean
+   */
+  var $correct_code;
+
+  /**
+   * Class constructor.<br />
+   * Because the class uses sessions, this will attempt to start a session if there is no previous one.<br />
+   * If you do not start a session before calling the class, the constructor must be called before any
+   * output is sent to the browser.
+   *
+   * <code>
+   *   $securimage = new Securimage();
+   * </code>
+   *
+   */
+  function Securimage()
+  {
+    if ( session_id() == '' ) { // no session has been started yet, which is needed for validation
+      session_start();
+    }
+  }
+
+  /**
+   * Generate a code and output the image to the browser.
+   *
+   * <code>
+   *   
+   *   include 'securimage.php';
+   *   $securimage = new Securimage();
+   *   $securimage->show('bg.jpg');
+   *   
+   * </code>
+   *
+   * @param string $background_image  The path to an image to use as the background for the CAPTCHA
+   */
+  function show($background_image = "")
+  {
+    if($background_image != "" && is_readable($background_image)) {
+      $this->bgimg = $background_image;
+    }
+
+    $this->doImage();
+  }
+
+  /**
+   * Validate the code entered by the user.
+   *
+   * <code>
+   *   $code = $_POST['code'];
+   *   if ($securimage->check($code) == false) {
+   *     die("Sorry, the code entered did not match.");
+   *   } else {
+   *     $valid = true;
+   *   }
+   * </code>
+   * @param string $code  The code the user entered
+   * @return boolean  true if the code was correct, false if not
+   */
+  function check($code)
+  {
+    $this->code_entered = $code;
+    $this->validate();
+    return $this->correct_code;
+  }
+
+  /**
+   * Generate and output the image
+   *
+   * @access private
+   *
+   */
+  function doImage()
+  {
+    if($this->use_transparent_text == true || $this->bgimg != "") {
+      $this->im = imagecreatetruecolor($this->image_width, $this->image_height);
+      $bgcolor = imagecolorallocate($this->im, hexdec(substr($this->image_bg_color, 1, 2)), hexdec(substr($this->image_bg_color, 3, 2)), hexdec(substr($this->image_bg_color, 5, 2)));
+      imagefilledrectangle($this->im, 0, 0, imagesx($this->im), imagesy($this->im), $bgcolor);
+    } else { //no transparency
+      $this->im = imagecreate($this->image_width, $this->image_height);
+      $bgcolor = imagecolorallocate($this->im, hexdec(substr($this->image_bg_color, 1, 2)), hexdec(substr($this->image_bg_color, 3, 2)), hexdec(substr($this->image_bg_color, 5, 2)));
+    }
+
+    if($this->bgimg != "") { $this->setBackground(); }
+
+    $this->createCode();
+
+    if (!$this->draw_lines_over_text && $this->draw_lines) $this->drawLines();
+
+    $this->drawWord();
+
+    if ($this->arc_linethrough == true) $this->arcLines();
+
+    if ($this->draw_lines_over_text && $this->draw_lines) $this->drawLines();
+
+    $this->output();
+
+  }
+
+  /**
+   * Set the background of the CAPTCHA image
+   *
+   * @access private
+   *
+   */
+  function setBackground()
+  {
+    $dat = @getimagesize($this->bgimg);
+    if($dat == false) { return; }
+
+    switch($dat[2]) {
+      case 1:  $newim = @imagecreatefromgif($this->bgimg); break;
+      case 2:  $newim = @imagecreatefromjpeg($this->bgimg); break;
+      case 3:  $newim = @imagecreatefrompng($this->bgimg); break;
+      case 15: $newim = @imagecreatefromwbmp($this->bgimg); break;
+      case 16: $newim = @imagecreatefromxbm($this->bgimg); break;
+      default: return;
+    }
+
+    if(!$newim) return;
+
+    imagecopy($this->im, $newim, 0, 0, 0, 0, $this->image_width, $this->image_height);
+  }
+
+  /**
+   * Draw arced lines over the text
+   *
+   * @access private
+   *
+   */
+  function arcLines()
+  {
+    $colors = explode(',', $this->randomColor());
+    imagesetthickness($this->im, 3);
+
+    $color = $colors[rand(0, sizeof($colors) - 1)];
+    $linecolor = imagecolorallocate($this->im, hexdec(substr($color, 1, 2)), hexdec(substr($color, 3, 2)), hexdec(substr($color, 5, 2)));
+
+    $xpos   = $this->text_x_start + ($this->font_size * 2) + rand(-5, 5);
+    $width  = $this->image_width / 2.66 + rand(3, 10);
+    $height = $this->font_size * 2.14 - rand(3, 10);
+
+    if ( rand(0,100) % 2 == 0 ) {
+      $start = rand(0,66);
+      $ypos  = $this->image_height / 2 - rand(5, 15);
+      $xpos += rand(5, 15);
+    } else {
+      $start = rand(180, 246);
+      $ypos  = $this->image_height / 2 + rand(5, 15);
+    }
+
+    $end = $start + rand(75, 110);
+
+    imagearc($this->im, $xpos, $ypos, $width, $height, $start, $end, $linecolor);
+
+    $color = $colors[rand(0, sizeof($colors) - 1)];
+    $linecolor = imagecolorallocate($this->im, hexdec(substr($color, 1, 2)), hexdec(substr($color, 3, 2)), hexdec(substr($color, 5, 2)));
+
+    if ( rand(1,75) % 2 == 0 ) {
+      $start = rand(45, 111);
+      $ypos  = $this->image_height / 2 - rand(5, 15);
+      $xpos += rand(5, 15);
+    } else {
+      $start = rand(200, 250);
+      $ypos  = $this->image_height / 2 + rand(5, 15);
+    }
+
+    $end = $start + rand(75, 100);
+
+    imagearc($this->im, $this->image_width * .75, $ypos, $width, $height, $start, $end, $linecolor);
+  }
+
+  /**
+   * Draw lines on the image
+   *
+   * @access private
+   *
+   */
+  function drawLines()
+  {
+    $linecolor = imagecolorallocate($this->im, hexdec(substr($this->line_color, 1, 2)), hexdec(substr($this->line_color, 3, 2)), hexdec(substr($this->line_color, 5, 2)));
+    imagesetthickness($this->im, $this->line_thickness);
+
+    //vertical lines
+    for($x = 1; $x < $this->image_width; $x += $this->line_distance) {
+      imageline($this->im, $x, 0, $x, $this->image_height, $linecolor);
+    }
+
+    //horizontal lines
+    for($y = 11; $y < $this->image_height; $y += $this->line_distance) {
+      imageline($this->im, 0, $y, $this->image_width, $y, $linecolor);
+    }
+
+    if ($this->draw_angled_lines == true) {
+      for ($x = -($this->image_height); $x < $this->image_width; $x += $this->line_distance) {
+        imageline($this->im, $x, 0, $x + $this->image_height, $this->image_height, $linecolor);
+      }
+
+      for ($x = $this->image_width + $this->image_height; $x > 0; $x -= $this->line_distance) {
+        imageline($this->im, $x, 0, $x - $this->image_height, $this->image_height, $linecolor);
+      }
+    }
+  }
+
+  /**
+   * Draw the CAPTCHA code over the image
+   *
+   * @access private
+   *
+   */
+  function drawWord()
+  {
+    if ($this->use_gd_font == true) {
+      if (!is_int($this->gd_font_file)) { //is a file name
+        $font = @imageloadfont($this->gd_font_file);
+        if ($font == false) {
+          trigger_error("Failed to load GD Font file {$this->gd_font_file} ", E_USER_WARNING);
+          return;
+        }
+      } else { //gd font identifier
+        $font = $this->gd_font_file;
+      }
+
+      $color = imagecolorallocate($this->im, hexdec(substr($this->text_color, 1, 2)), hexdec(substr($this->text_color, 3, 2)), hexdec(substr($this->text_color, 5, 2)));
+      imagestring($this->im, $font, $this->text_x_start, ($this->image_height / 2) - ($this->gd_font_size / 2), $this->code, $color);
+
+    } else { //ttf font
+      if($this->use_transparent_text == true) {
+        $alpha = intval($this->text_transparency_percentage / 100 * 127);
+        $font_color = imagecolorallocatealpha($this->im, hexdec(substr($this->text_color, 1, 2)), hexdec(substr($this->text_color, 3, 2)), hexdec(substr($this->text_color, 5, 2)), $alpha);
+      } else { //no transparency
+        $font_color = imagecolorallocate($this->im, hexdec(substr($this->text_color, 1, 2)), hexdec(substr($this->text_color, 3, 2)), hexdec(substr($this->text_color, 5, 2)));
+      }
+
+      $x = $this->text_x_start;
+      $strlen = strlen($this->code);
+      $y_min = ($this->image_height / 2) + ($this->font_size / 2) - 2;
+      $y_max = ($this->image_height / 2) + ($this->font_size / 2) + 2;
+      $colors = explode(',', $this->multi_text_color);
+
+      for($i = 0; $i < $strlen; ++$i) {
+        $angle = rand($this->text_angle_minimum, $this->text_angle_maximum);
+        $y = rand($y_min, $y_max);
+        if ($this->use_multi_text == true) {
+          $idx = rand(0, sizeof($colors) - 1);
+          $r = substr($colors[$idx], 1, 2);
+          $g = substr($colors[$idx], 3, 2);
+          $b = substr($colors[$idx], 5, 2);
+          if($this->use_transparent_text == true) {
+            $font_color = imagecolorallocatealpha($this->im, "0x$r", "0x$g", "0x$b", $alpha);
+          } else {
+            $font_color = imagecolorallocate($this->im, "0x$r", "0x$g", "0x$b");
+          }
+        }
+               /* Will check if the FreeType library is loaded, if not, use the default PHP fonts.
+                * @customized by ATutor, Harris Wong
+                */
+               if (function_exists('imagettftext')) {
+                       @imagettftext($this->im, $this->font_size, $angle, $x, $y, $font_color, $this->ttf_file, $this->code{$i});
+               } else {
+                       $this->arc_linethrough = false; //no arcline then,too hard to see with the built in fonts and limited size
+                       imagestring($this->im, 5, $x, $y-15, $this->code{$i}, $font_color);
+               }
+
+        $x += rand($this->text_minimum_distance, $this->text_maximum_distance);
+      } //for loop
+    } //else ttf font
+  } //function
+
+  /**
+   * Create a code and save to the session
+   *
+   * @since 1.0.1
+   *
+   */
+  function createCode()
+  {
+    $this->code = false;
+
+    if ($this->use_wordlist && is_readable($this->wordlist_file)) {
+      $this->code = $this->readCodeFromFile();
+    }
+
+    if ($this->code == false) {
+      $this->code = $this->generateCode($this->code_length);
+    }
+
+    $this->saveData();
+  }
+
+  /**
+   * Generate a code
+   *
+   * @access private
+   * @param int $len  The code length
+   * @return string
+   */
+  function generateCode($len)
+  {
+    $code = '';
+
+    for($i = 1, $cslen = strlen($this->charset); $i <= $len; ++$i) {
+      $code .= strtoupper( $this->charset{rand(0, $cslen - 1)} );
+    }
+    return $code;
+  }
+
+  /**
+   * Reads a word list file to get a code
+   *
+   * @access private
+   * @since 1.0.2
+   * @return mixed  false on failure, a word on success
+   */
+  function readCodeFromFile()
+  {
+    $fp = @fopen($this->wordlist_file, 'rb');
+    if (!$fp) return false;
+
+    $fsize = filesize($this->wordlist_file);
+    if ($fsize < 32) return false; // too small of a list to be effective
+
+    if ($fsize < 128) {
+      $max = $fsize; // still pretty small but changes the range of seeking
+    } else {
+      $max = 128;
+    }
+
+    fseek($fp, rand(0, $fsize - $max), SEEK_SET);
+    $data = fread($fp, 128); // read a random 128 bytes from file
+    fclose($fp);
+    $data = preg_replace("/\r?\n/", "\n", $data);
+
+    $start = strpos($data, "\n", rand(0, 100)) + 1; // random start position
+    $end   = strpos($data, "\n", $start);           // find end of word
+
+    return strtolower(substr($data, $start, $end - $start)); // return substring in 128 bytes
+  }
+
+  /**
+   * Output image to the browser
+   *
+   * @access private
+   *
+   */
+  function output()
+  {
+    header("Expires: Sun, 1 Jan 2000 12:00:00 GMT");
+    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
+    header("Cache-Control: no-store, no-cache, must-revalidate");
+    header("Cache-Control: post-check=0, pre-check=0", false);
+    header("Pragma: no-cache");
+
+    switch($this->image_type)
+    {
+      case SI_IMAGE_JPEG:
+        header("Content-Type: image/jpeg");
+        imagejpeg($this->im, null, 90);
+        break;
+
+      case SI_IMAGE_GIF:
+        header("Content-Type: image/gif");
+        imagegif($this->im);
+        break;
+
+      default:
+        header("Content-Type: image/png");
+        imagepng($this->im);
+        break;
+    }
+
+    imagedestroy($this->im);
+  }
+
+  /**
+   * Get WAV file data of the spoken code.<br />
+   * This is appropriate for output to the browser as audio/x-wav
+   *
+   * @since 1.0.1
+   * @return string  WAV data
+   *
+   */
+  function getAudibleCode()
+  {
+    $letters = array();
+    $code    = $this->getCode();
+
+    if ($code == '') {
+      $this->createCode();
+      $code = $this->getCode();
+    }
+
+    for($i = 0; $i < strlen($code); ++$i) {
+      $letters[] = $code{$i};
+    }
+
+    return $this->generateWAV($letters);
+  }
+
+  /**
+   * Save the code in the session
+   *
+   * @access private
+   *
+   */
+  function saveData()
+  {
+    $_SESSION['securimage_code_value'] = strtolower($this->code);
+  }
+
+  /**
+   * Validate the code to the user code
+   *
+   * @access private
+   *
+   */
+  function validate()
+  {
+    if ( isset($_SESSION['securimage_code_value']) && !empty($_SESSION['securimage_code_value']) ) {
+      if ( $_SESSION['securimage_code_value'] == strtolower(trim($this->code_entered)) ) {
+        $this->correct_code = true;
+        $_SESSION['securimage_code_value'] = '';
+      } else {
+        $this->correct_code = false;
+      }
+    } else {
+      $this->correct_code = false;
+    }
+  }
+
+  /**
+   * Get the captcha code
+   *
+   * @since 1.0.1
+   * @return string
+   */
+  function getCode()
+  {
+    if (isset($_SESSION['securimage_code_value']) && !empty($_SESSION['securimage_code_value'])) {
+      return $_SESSION['securimage_code_value'];
+    } else {
+      return '';
+    }
+  }
+
+  /**
+   * Check if the user entered code was correct
+   *
+   * @access private
+   * @return boolean
+   */
+  function checkCode()
+  {
+    return $this->correct_code;
+  }
+
+  /**
+   * Generate a wav file by concatenating individual files
+   * @since 1.0.1
+   * @access private
+   * @param array $letters  Array of letters to build a file from
+   * @return string  WAV file data
+   */
+  function generateWAV($letters)
+  {
+    $first = true; // use first file to write the header...
+    $data_len    = 0;
+    $files       = array();
+    $out_data    = '';
+
+    foreach ($letters as $letter) {
+      $filename = $this->audio_path . strtoupper($letter) . '.wav';
+
+      $fp = fopen($filename, 'rb');
+
+      $file = array();
+
+      $data = fread($fp, filesize($filename)); // read file in
+
+      $header = substr($data, 0, 36);
+      $body   = substr($data, 44);
+
+
+      $data = unpack('NChunkID/VChunkSize/NFormat/NSubChunk1ID/VSubChunk1Size/vAudioFormat/vNumChannels/VSampleRate/VByteRate/vBlockAlign/vBitsPerSample', $header);
+
+      $file['sub_chunk1_id']   = $data['SubChunk1ID'];
+      $file['bits_per_sample'] = $data['BitsPerSample'];
+      $file['channels']        = $data['NumChannels'];
+      $file['format']          = $data['AudioFormat'];
+      $file['sample_rate']     = $data['SampleRate'];
+      $file['size']            = $data['ChunkSize'] + 8;
+      $file['data']            = $body;
+
+      if ( ($p = strpos($file['data'], 'LIST')) !== false) {
+        // If the LIST data is not at the end of the file, this will probably break your sound file
+        $info         = substr($file['data'], $p + 4, 8);
+        $data         = unpack('Vlength/Vjunk', $info);
+        $file['data'] = substr($file['data'], 0, $p);
+        $file['size'] = $file['size'] - (strlen($file['data']) - $p);
+      }
+
+      $files[] = $file;
+      $data    = null;
+      $header  = null;
+      $body    = null;
+
+      $data_len += strlen($file['data']);
+
+      fclose($fp);
+    }
+
+    $out_data = '';
+    for($i = 0; $i < sizeof($files); ++$i) {
+      if ($i == 0) { // output header
+        $out_data .= pack('C4VC8', ord('R'), ord('I'), ord('F'), ord('F'), $data_len + 36, ord('W'), ord('A'), ord('V'), ord('E'), ord('f'), ord('m'), ord('t'), ord(' '));
+
+        $out_data .= pack('VvvVVvv',
+                          16,
+                          $files[$i]['format'],
+                          $files[$i]['channels'],
+                          $files[$i]['sample_rate'],
+                          $files[$i]['sample_rate'] * (($files[$i]['bits_per_sample'] * $files[$i]['channels']) / 8),
+                          ($files[$i]['bits_per_sample'] * $files[$i]['channels']) / 8,
+                          $files[$i]['bits_per_sample'] );
+
+        $out_data .= pack('C4', ord('d'), ord('a'), ord('t'), ord('a'));
+
+        $out_data .= pack('V', $data_len);
+      }
+
+      $out_data .= $files[$i]['data'];
+    }
+
+    return $out_data;
+  }
+
+
+  /**
+   * Random color generation
+   * @return   a 6 digits color code string 
+   */
+  function randomColor(){
+         $str = '#';
+         for($i=0;$i<3;$i++){
+                 $str .= rand(0, 255);
+         }
+         return $str;
+  }
+
+} /* class Securimage */
+
+?>
diff --git a/docs/include/securimage/securimage_play.php b/docs/include/securimage/securimage_play.php
new file mode 100644 (file)
index 0000000..ab33cf8
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+$_user_location        = 'public';
+define('AT_INCLUDE_PATH', '../');
+require (AT_INCLUDE_PATH.'vitals.inc.php');
+session_start();
+
+include 'securimage.php';
+
+$img = new Securimage();
+
+header('Content-type: audio/x-wav');
+header('Content-Disposition: attachment; name="securimage.wav"');
+header('Cache-Control: no-store, no-cache, must-revalidate');
+header('Expires: Sun, 1 Jan 2000 12:00:00 GMT');
+header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT');
+
+echo $img->getAudibleCode();
+exit;
+
+?>
\ No newline at end of file
diff --git a/docs/include/securimage/securimage_show.php b/docs/include/securimage/securimage_show.php
new file mode 100644 (file)
index 0000000..8a13c66
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+$_user_location        = 'public';
+define('AF_INCLUDE_PATH', '../');
+require (AF_INCLUDE_PATH.'vitals.inc.php');
+session_start();
+
+include 'securimage.php';
+
+$img = new securimage();
+
+$img->show(); // alternate use:  $img->show('/path/to/background.jpg');
+?>
diff --git a/docs/include/vitals.inc.php b/docs/include/vitals.inc.php
new file mode 100644 (file)
index 0000000..54ce9ce
--- /dev/null
@@ -0,0 +1,311 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+define('AF_DEVEL', 0);
+define('AF_ERROR_REPORTING', E_ALL ^ E_NOTICE); // default is E_ALL ^ E_NOTICE, use E_ALL or E_ALL + E_STRICT for developing
+
+// Emulate register_globals off. src: http://php.net/manual/en/faq.misc.php#faq.misc.registerglobals
+function unregister_GLOBALS() {
+   if (!ini_get('register_globals')) { return; }
+
+   // Might want to change this perhaps to a nicer error
+   if (isset($_REQUEST['GLOBALS'])) { die('GLOBALS overwrite attempt detected'); }
+
+   // Variables that shouldn't be unset
+   $noUnset = array('GLOBALS','_GET','_POST','_COOKIE','_REQUEST','_SERVER','_ENV', '_FILES');
+   $input = array_merge($_GET,$_POST,$_COOKIE,$_SERVER,$_ENV,$_FILES,isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array());
+  
+   foreach ($input as $k => $v) {
+       if (!in_array($k, $noUnset) && isset($GLOBALS[$k])) { unset($GLOBALS[$k]); }
+   }
+}
+
+/*
+ * structure of this document (in order):
+ *
+ * 0. load config.inc.php
+ * 1. initilize db connection
+ * 2. load constants
+ * 3. initilize session
+ * 4. load $_config from table 'config'
+ * 5. start language block
+ * 6. load common libraries
+ * 7. initialize theme and template management
+ * 8. initialize a user instance without user id. 
+ *    if $_SESSION['user_id'] is set, it's assigned to instance in include/header.inc.php
+ * 9. register pages based on current user's priviledge 
+ ***/
+
+/**** 0. start system configuration options block ****/
+error_reporting(0);
+include_once(AF_INCLUDE_PATH.'config.inc.php');
+error_reporting(AF_ERROR_REPORTING);
+
+if (!defined('AF_INSTALL') || !AF_INSTALL) {
+       header('Cache-Control: no-store, no-cache, must-revalidate');
+       header('Pragma: no-cache');
+
+       $relative_path = substr(AF_INCLUDE_PATH, 0, -strlen('include/'));
+       header('Location: ' . $relative_path . 'install/not_installed.php');
+       exit;
+}
+/*** end system config block ****/
+
+/***** 1. database connection *****/
+//if (!defined('AF_REDIRECT_LOADED')){
+//     require_once(AF_INCLUDE_PATH.'lib/mysql_connect.inc.php');
+//}
+/***** end database connection ****/
+
+/*** 2. constants ***/
+require_once(AF_INCLUDE_PATH.'constants.inc.php');
+
+/*** 3. initilize session ***/
+       @set_time_limit(0);
+       @ini_set('session.gc_maxlifetime', '36000'); /* 10 hours */
+       @session_cache_limiter('private, must-revalidate');
+
+       session_name('CheckerID');
+       error_reporting(AF_ERROR_REPORTING);
+
+       ob_start();
+       session_set_cookie_params(0, $_base_path);
+       session_start();
+       $str = ob_get_contents();
+       ob_end_clean();
+       unregister_GLOBALS();
+
+/***** end session initilization block ****/
+       
+/***** 4. load $_config from table 'config' *****/
+require(AF_INCLUDE_PATH.'phpCache/phpCache.inc.php'); // cache library
+require(AF_INCLUDE_PATH.'classes/DAO/ThemesDAO.class.php');
+require(AF_INCLUDE_PATH.'classes/DAO/ConfigDAO.class.php');
+
+$configDAO = new ConfigDAO();
+$rows = $configDAO->getAll();
+if (is_array($rows))
+{
+       foreach ($rows as $id => $row)
+       {
+               $_config[$row['name']] = $row['value'];
+       }
+}
+
+// define as constants. more constants are defined in include/constants.inc.php
+define('EMAIL',                     $_config['contact_email']);
+define('SITE_NAME',                 $_config['site_name']);
+$MaxFileSize       = $_config['max_file_size']; 
+$IllegalExtentions = explode('|',$_config['illegal_extentions']);
+/***** end loading $_config *****/
+
+/***** 5. start language block *****/
+       // set current language
+       require(AF_INCLUDE_PATH . 'classes/Language/LanguageManager.class.php');
+       $languageManager = new LanguageManager();
+
+       $myLang =& $languageManager->getMyLanguage();
+
+       if ($myLang === FALSE) {
+               echo 'There are no languages installed!';
+               exit;
+       }
+
+       $myLang->saveToSession();
+
+       /* set right-to-left language */
+       $rtl = '';
+       if ($myLang->isRTL()) {
+               $rtl = 'rtl_'; /* basically the prefix to a rtl variant directory/filename. eg. rtl_atee */
+       }
+/***** end language block ****/
+
+/***** 6. load common libraries *****/
+       require(AF_INCLUDE_PATH.'lib/output.inc.php');           /* output functions */
+/***** end load common libraries ****/
+
+/***** 7. initialize theme and template management *****/
+       require(AF_INCLUDE_PATH.'classes/Savant2/Savant2.php');
+
+       // set default template paths:
+       $savant = new Savant2();
+
+       if (isset($_SESSION['prefs']['PREF_THEME']) && file_exists(AF_INCLUDE_PATH . '../themes/' . $_SESSION['prefs']['PREF_THEME']) && $_SESSION['user_id']>0) 
+       {
+               if (!is_dir(AF_INCLUDE_PATH . '../themes/' . $_SESSION['prefs']['PREF_THEME']))
+               {
+                       $_SESSION['prefs']['PREF_THEME'] = 'default';
+               } 
+               else 
+               {
+                       //check if enabled
+                       $themesDAO = new ThemesDAO();
+                       $row = $themesDAO->getByID($_SESSION['prefs']['PREF_THEME']);
+
+                       if ($row['status'] == 0) 
+                       {
+                               // get default
+                               $_SESSION['prefs']['PREF_THEME'] = get_default_theme();
+                       }
+               }
+       } else 
+       {
+               $_SESSION['prefs']['PREF_THEME'] = get_default_theme();
+       }
+
+       $savant->addPath('template', AF_INCLUDE_PATH . '../themes/' . $_SESSION['prefs']['PREF_THEME'] . '/');
+
+       require(AF_INCLUDE_PATH . '../themes/' . $_SESSION['prefs']['PREF_THEME'] . '/theme.cfg.php');
+
+       require(AF_INCLUDE_PATH.'classes/Message/Message.class.php');
+       $msg = new Message($savant);
+
+/***** end of initialize theme and template management *****/
+
+/***** 8. initialize user instance *****/
+// used as global var
+if (isset($_SESSION['user_id']) && $_SESSION['user_id'] > 0)
+{
+       // check if $_SESSION['user_id'] is valid
+       include_once(AF_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
+       $usersDAO = new UsersDAO();
+       $user = $usersDAO->getUserByID($_SESSION['user_id']);
+       
+       if (!$user)  // invalid user
+               unset($_SESSION['user_id']);
+       else
+       {
+               include_once(AF_INCLUDE_PATH.'classes/User.class.php');
+               $_current_user = new User($_SESSION['user_id']);
+       }
+}
+/***** end of initialize user instance *****/
+
+/*** 9. register pages based on user's priviledge ***/
+require_once(AF_INCLUDE_PATH.'page_constants.inc.php');
+
+/**
+ * This function is used for printing variables for debugging.
+ * @access  public
+ * @param   mixed $var The variable to output
+ * @param   string $title      The name of the variable, or some mark-up identifier.
+ * @author  Joel Kronenberg
+ */
+function debug($var, $title='') {
+       if (!defined('AF_DEVEL') || !AF_DEVEL) {
+               return;
+       }
+       
+       echo '<pre style="border: 1px black solid; padding: 0px; margin: 10px;" title="debugging box">';
+       if ($title) {
+               echo '<h4>'.$title.'</h4>';
+       }
+       
+       ob_start();
+       print_r($var);
+       $str = ob_get_contents();
+       ob_end_clean();
+
+       $str = str_replace('<', '&lt;', $str);
+
+       $str = str_replace('[', '<span style="color: red; font-weight: bold;">[', $str);
+       $str = str_replace(']', ']</span>', $str);
+       $str = str_replace('=>', '<span style="color: blue; font-weight: bold;">=></span>', $str);
+       $str = str_replace('Array', '<span style="color: purple; font-weight: bold;">Array</span>', $str);
+       echo $str;
+       echo '</pre>';
+}
+
+/**
+* This function is used for printing variables into log file for debugging.
+* @access  public
+* @param   mixed $var  The variable to output
+* @param   string $log The location of the log file. If not provided, use the default one.
+* @author  Cindy Qi Li
+*/
+function debug_to_log($var, $log='') {
+       if (!defined('AF_DEVEL') || !AF_DEVEL) {
+               return;
+       }
+       
+       if ($log == '') $log = AF_TEMP_DIR. 'debug.log';
+       $handle = fopen($log, 'a');
+       fwrite($handle, "\n\n");
+       fwrite($handle, date("F j, Y, g:i a"));
+       fwrite($handle, "\n");
+       fwrite($handle, var_export($var,1));
+       
+       fclose($handle);
+}
+
+/****************************************************/
+/* compute the $_my_uri variable                                       */
+       $bits     = explode(SEP, getenv('QUERY_STRING'));
+       $num_bits = count($bits);
+       $_my_uri  = '';
+
+       for ($i=0; $i<$num_bits; $i++) {
+//             if (    (strpos($bits[$i], 'enable=')   === 0) 
+//                     ||      (strpos($bits[$i], 'disable=')  === 0)
+//                     ||      (strpos($bits[$i], 'expand=')   === 0)
+//                     ||      (strpos($bits[$i], 'collapse=') === 0)
+//                     ||      (strpos($bits[$i], 'lang=')             === 0)
+//                     ) {
+               if (    (strpos($bits[$i], 'lang=')             === 0)
+                       ) {
+                       /* we don't want this variable added to $_my_uri */
+                       continue;
+               }
+
+               if (($_my_uri == '') && ($bits[$i] != '')) {
+                       $_my_uri .= '?';
+               } else if ($bits[$i] != ''){
+                       $_my_uri .= SEP;
+               }
+               $_my_uri .= $bits[$i];
+       }
+       if ($_my_uri == '') {
+               $_my_uri .= '?';
+       } else {
+               $_my_uri .= SEP;
+       }
+       $_my_uri = $_SERVER['PHP_SELF'].$_my_uri;
+
+function my_add_null_slashes( $string ) {
+    return mysql_real_escape_string(stripslashes($string));
+}
+
+function my_null_slashes($string) {
+       return $string;
+}
+
+if ( get_magic_quotes_gpc() == 1 ) {
+       $addslashes   = 'my_add_null_slashes';
+       $stripslashes = 'stripslashes';
+} else {
+       $addslashes   = 'mysql_real_escape_string';
+       $stripslashes = 'my_null_slashes';
+}
+
+function get_default_theme() {
+       $themesDAO = new ThemesDAO();
+       
+       $rows = $themesDAO->getDefaultTheme();
+
+       if (!is_dir(AF_INCLUDE_PATH . '../themes/' . $rows[0]['dir_name']))
+               return 'default';
+       else
+               return $rows[0]['dir_name'];
+}
+?>
diff --git a/docs/index.php b/docs/index.php
new file mode 100644 (file)
index 0000000..c04721b
--- /dev/null
@@ -0,0 +1,21 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', 'include/');\r
+\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include(AF_INCLUDE_PATH.'header.inc.php');\r
+\r
+// display footer\r
+include(AF_INCLUDE_PATH.'footer.inc.php');\r
+\r
+?>\r
diff --git a/docs/install/db/Copy of language_text.sql b/docs/install/db/Copy of language_text.sql
new file mode 100644 (file)
index 0000000..68087d8
--- /dev/null
@@ -0,0 +1,366 @@
+# Table structure for table 'language_text'
+#
+
+CREATE TABLE `AF_language_text` (
+  `language_code` varchar(5) NOT NULL default '',
+  `variable` varchar(30) NOT NULL default '',
+  `term` varchar(50) NOT NULL default '',
+  `text` blob NOT NULL,
+  `revised_date` datetime NOT NULL default '0000-00-00 00:00:00',
+  `context` text NOT NULL,
+  PRIMARY KEY  (`language_code`,`variable`,`term`)
+) TYPE=MyISAM;
+
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','aframe','AFrame',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','login','Login',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','register','Register',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','registration','Registration',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','required_field_text','<div class=\"required\" title=\"Required Field\">*</div> indicates required fields.',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','login_name','Login Name',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','20_max_chars','20 character maximum',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','15_max_chars','15 character maximum',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','contain_only','May contain only letters, numbers, underscores, hyphens or periods.',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','password','Password',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','combination','Use a combination of letters, numbers and symbols',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','password_again','Password Again',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','email_address','Email Address',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','first_name','First Name',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','last_name','Last Name',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','cancel','Cancel',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','copyright','Web site engine\'s code is copyright &copy; 2009',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','web_service_api','Web Service API',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','lesson_builder','Lesson Builder',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','logout','Logout',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','welcome','Welcome',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','profile','Profile',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','options','Options',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','input','Input',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','search','Search',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','web_service_id','Web Service ID',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_REGISTER_SUCCESS','You have registered successfully. Your web service ID is %s. This ID must be presented when using web service. This ID can always be retrieved from \"Profile\" page.',now(),'');
+
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','edit_profile','Edit Profile',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','consumer','Consumer',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','oauth_server','OAuth server',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','oauth_authenticate','OAuth User Authenticate',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','oauth_server_api','OAuth Server API',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','system','System',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','system_settings','System Settings',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','site_name','Site Name',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','contact_email','Contact Email',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','max_file_size','Maximum File Size',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','illegal_extentions','Illegal File Extensions',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','use_captcha','Allow the use of CAPTCHA',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','default_language','Default Language',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','latex_server','MimeTex Server for the LaTex service',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','latex_server_info','For production purposes, please install mimeTeX on your own server.',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','theme','Theme',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','default_use_captcha','Default: Disable',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','default_max_file_size','Default: 1048576',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','factory_default','Reset to Factory Defaults',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','image_validation_text','In the above image there are numbers and/or letters displayed.  Please type them into the following field.',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','audible_captcha','Audible Version of CAPTCHA',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','refresh_image','Refresh Image',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','image_validation_text2','This helps ensure a live person is registering on this system.',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','or','Or',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','','',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','','',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','','',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','','',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','','',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','','',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','','',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','','',now(),'');
+
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_INVALID_TOKEN_TYPE','Invalid token type.',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_SECRET_ERROR','Letters or numbers entered from the CAPTCHA image are incorrect. Try again.',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','','',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','','',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','','',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','','',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','','',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','','',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','','',now(),'');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','','',now(),'');
+
+
+
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_CONFIRM_DELETE_ITEM','Are you sure you want to delete the following items? <strong>%s</strong>','2009-03-17 15:19:54','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_CONFIRM_DELETE_LANG','Are you sure you want to delete the language (<strong>%s</strong>)?','2009-02-23 15:13:50','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_CONFIRM_DELETE_MYOWN_UPDATE','Are you sure you want to <strong>delete</strong> update <strong>%s</strong>?','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_CONFIRM_DELETE_USER','Are you sure you want to delete the following users? <strong>%s</strong>','2009-02-06 11:58:02','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_CONFIRM_DELETE_USER_GROUP','Are you sure you want to delete the following user groups? <strong>%s</strong>','2009-02-12 15:08:53','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_ACCOUNT_DISABLED','That account has been disabled.','2009-01-08 11:43:51','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_CANNOT_CONNECT','Cannot connect to URL: %s','2009-04-22 09:26:45','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_CANNOT_DEL_DEFAULT_LANG','Cannot delete default language <strong>%s</strong>. The system cannot run properly without it.','2009-02-23 15:47:44','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_CANNOT_UNZIP','Can NOT unzip the uploaded file.','2009-06-22 14:49:02','error msg');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_CHOOSE_ACTION','Please choose action for file <strong>%s</strong>','2009-06-22 14:49:02','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_CHOOSE_UNINSTALLED_UPDATE','Please choose an uninstalled update.','2009-06-22 14:49:02','Updater: error msg');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_CONFIRM_BAD','Your email address and account could not be confirmed.','2009-01-14 14:40:42','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_DB_NOT_UPDATED','Information could not be added to the database.','2009-01-09 11:34:42','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_EMAIL_EXISTS','An account with that email address already exists.','2009-01-09 11:34:42','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_EMAIL_INVALID','Email address was invalid.','2009-01-09 11:34:42','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_EMAIL_NOT_FOUND','No account found with that email address.','2009-01-14 14:40:42','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_EMPTY_FIELDS','The following required field(s) are empty:<br />\r\n%s.','2009-01-09 11:34:42','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_EMPTY_FIELD','Field cannot be empty. Data is not saved.','2009-01-09 11:34:42','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_EMPTY_SESSIONID','Empty Session ID.','2009-03-03 13:44:57','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_EMPTY_USER','Empty user.','2009-03-03 13:44:57','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_EMPTY_WEB_SERVICE_ID','Empty web service ID.','2009-03-04 14:53:18','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_FIRST_LAST_NAME_UNIQUE','First, second, and last names combination must be unique.','2009-01-09 11:34:42','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_INVALID_FORMAT','Invalid format.','2009-03-03 13:44:57','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_INVALID_LOGIN','Invalid login/password combination.','2009-01-08 11:43:51','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_INVALID_SESSION','Invalid session.','2009-03-03 13:44:57','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_INVALID_WEB_SERVICE_ID','Invalid web service ID.','2009-03-04 14:49:59','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_LANG_EMPTY','The text for this language has not been translated yet.','2009-02-24 13:57:01','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_LANG_EXISTS','The language you are trying to create already exists.','2009-02-24 09:20:45','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_LANG_WRONG_VERSION','The language pack you are trying to import is not compatible with this version of AFrame.','2009-02-24 13:58:25','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_LOGIN_CHARS','Your Login Name must only contain letters, numbers, periods, or underscores (_\'s).','2009-01-09 11:34:42','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_LOGIN_EXISTS','That login already exists, please choose another.','2009-01-09 11:34:42','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_NOT_LOCALHOST','Sorry, the IP address of localhost is not public. For security reasons, validating resources located at non-public IP addresses has been disabled in this service.','2009-04-22 09:26:45','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_NO_ACTION_SELECTED','No action selected.','2009-02-04 15:31:02','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_NO_ITEM_SELECTED','You must select an item before using a button.','2009-02-04 15:31:02','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_PAGE_NOT_FOUND','Page (%s) cannot be found','2008-12-12 13:28:09','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_PASSWORD_CHARS','The password must contain letters, numbers, and symbols.','2009-01-09 13:41:06','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_PASSWORD_LENGTH','Password must be at least 8 characters long.','2009-01-09 13:41:06','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_PASSWORD_MISMATCH','Passwords did not match.','2009-01-09 13:41:06','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_REMOVE_WRITE_PERMISSION','Please remove write permission from the listed files.','2009-06-22 14:49:02','error msg');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_SELECT_ONE_ITEM','Only <em>one</em> item must be selected.','2009-02-04 15:31:02','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_SENDING_ERROR','There was an error sending the email message.','2009-01-16 13:14:08','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_UPDATE_ALREADY_INSTALLED','The selected update is already installed.','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_UPDATE_DEPENDENCY','Due to update dependency, please install the listed updates before installing this update: %s','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_UPDATE_XML_NOT_FOUND','Update XML file is not found.','2009-06-22 14:49:02','error msg');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_ERROR_WRONG_PASSWORD','Incorrect password.','2009-01-16 10:29:47','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_ACCOUNT_CONFIRMED','Account has been confirmed.','2009-01-14 14:40:42','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_ACTION_COMPLETED_SUCCESSFULLY','Action completed successfully.','2009-01-16 11:29:41','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_CANCELLED','Successfully cancelled without any changes.','2009-01-14 14:40:42','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_CHANGE_TO_SAME_EMAIL','The email address is same as what you currently have.','2009-01-16 11:54:46','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_CONFIRMATION_SENT','An email confirmation message has been sent.','2009-01-14 14:40:42','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_CONFIRM_EMAIL2','An email with instructions on retrieving your password has been sent.','2009-01-16 13:14:08','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_CONFIRM_GOOD','Your email address has been confirmed successfully.','2009-01-14 14:40:42','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_IMPORT_LANG_SUCCESS','New language was successfully imported.','2009-02-24 13:58:25','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_LOGIN_SUCCESS','You have logged in successfully.','2009-01-08 11:43:51','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_LOGOUT','You have successfully been logged out.','2009-01-08 09:38:14','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_ONLY_ENGLISH','Only English language is defined in the system. There is no foreign languages to translate.','2009-02-18 11:52:10','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_PASSWORD_CHANGED','Password changed successfully.','2009-01-16 10:35:40','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_PROFILE_UPDATED','Your Profile was successfully updated.','2009-01-15 10:59:58','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_REGISTER_SUCCESS','You have registered successfully. Your web service ID is %s. This ID must be presented when using web service. This ID can always be retrieved from \"Profile\" page.','2009-03-04 13:30:45','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_REG_THANKS_CONFIRM','Thank-you for registering. Please follow the instructions in the email we sent you on how to confirm your account. You will need to confirm your account before you can login.','2009-01-09 14:07:11','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_UPDATE_CREATED_SUCCESSFULLY','The update has been created successfully.','2009-06-22 14:49:02','Updater: feedback msg');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_UPDATE_INSTALLED_SUCCESSFULLY','The update has been installed successfully.','2009-06-22 14:49:02','Updater: feedback msg');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_ADD_EDIT_LANGUAGE','<h2>Add/Edit Language</h2>\r\n\r\n  <p>Adding and Editing the language properties allows users to change the following:\r\n <ul>\r\n                <li>Language Code (3 digit ISO-639-2 language code)</li>\r\n            <li>Locale (two letter abritrary code to represent a variation of a language)</li>\r\n          <li>Character Set (should always be UTF-8)</li>\r\n             <li>Regular Expression (leave blank)</li>\r\n           <li>Language name translated</li>\r\n           <li>Language name in English</li>\r\n           <li>Status (enabled/disabled)</li>\r\n  </ul>\r\n       </p>\r\n        <p>When \"Status\" is set to enabled, the language is displayed in the selector at the bottom of AFrame pages, which allows users to switch to this language.</p>\r\n','2009-04-15 09:46:37','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_CHANGE_EMAIL','<h2>Change Email</h2>\r\n<p>This page allows users to change email addresses. </p>\r\n','2009-04-15 09:47:18','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_CHANGE_PASSWORD','<h2>Change Password</h2>\r\n<p>This page allows users to change passwords. The form authenticates users by checking their old password first, and then setting a new password and typing it again.</p>\r\n','2009-04-15 09:53:55','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_CREATE_EDIT_USER ','<h2>Create/Edit User</h2>\r\n\r\n<p>All fields on \"Create User\" and \"Edit User\" forms are required. Most fields are self-explanatory. When the \"Account Status\" field is set to disabled, the user is not able to login. </p>\r\n<p>User accounts can also be created by individuals using the Registration form available through the public pages of AFrame. The accounts created via the Registration form are automatically set to user group \"Regular User\". </p>','2009-06-04 13:00:03','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_CREATE_EDIT_USER_GROUP','<h2>Create/Edit User Group</h2>\r\n\r\n<p>All fields are relatively self-explanatory.</p>\r\n\r\n<p>There are six privileges provided by AFrame. Privileges are fixed and not changeable.\r\n  <dl>\r\n                <dt>Home</dt>\r\n               <dd>This is where user implements own functions.</dd>\r\n               <dt>User Management</dt>\r\n            <dd>Create, edit, delete users.</dd>\r\n                <dt>Language Management</dt>\r\n                <dd>Create, edit, delete, enable, disable languages.</dd>\r\n           <dt>Translation</dt>\r\n                <dd>Translate all AFrame terms into languages other than English, or edit existing English text.</dd>\r\n               <dt>Profile Management</dt>\r\n         <dd>Edit profile, change password or email.</dd>\r\n    </dl>\r\n</p>','2009-06-04 13:05:21','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_CREATE_UPDATE','<h2>Creating Update</h2>\r\n\r\n<p>If you happen to come across a bug you can fix, or have a new feature you would like added to the AFrame public distribution, you can use Create Update to put your changes into a form that can be easily added to the AFrame public code. Or, if you have a feature you are adding to one AFrame installation that you would like to have added to another, Create Update is ideal for reproducing your feature across installations. If you are creating new features that are not going to become part of the AFrame public source code, you can build them into a update so they can be reapplied from version to version as you upgrade your AFrame system. Creating updates does require knowledge of PHP, and of SQL if you plan on creating a update that changes the AFrame database. Please refer to the appropriate documentation for information on PHP and SQL. <p>\r\n\r\n<dl>\r\n    <dt>AFrame Update ID</dt>\r\n   <dd>The update id you give to your update must be different from all updates available for the particular version of AFrame it applies to. It is suggested you prefix your updates with a special identifier that represents the author or the authoring organization. If for example the University of Toronto is creating the update, a update ID might look like \"uoft_0002.\"</dd>\r\n     <dt>AFrame Version to Apply</dt>\r\n    <dd>This needs to be the exact version number of the AFrame version the update applies to (e.g 1.6). including any minor version numbers (e.g 1.6.1.2)  The exact version number can be found on the Administrator open screen under \"Statistics and Information.\" In most cases when applying a update created for an older version of AFrame, the \"AFrame version to Apply\" will need to be adjusted. Or, this can be adjusted manually in the patch.xml file included with the source code of the update.\r\n    </dd>\r\n       <dt>Description</dt>\r\n        <dd>This should be a detailed description of what the update does. Example might include \"fixes problem uploading files to filemanager\" for a bug fix, or \"added a timer function to tests\" for an added feature, or \"removes registration tab\" for a feature adjustment, etc. Include enough detail so those applying the update understand exactly what it will do..</dd>\r\n   <dt>SQL Statement</dt>\r\n      <dd>This optional field can be used to insert SQL commands which modify the AFrame database. It might be used to write an SQL statement to modify and existing table, such as changing a data type, or a field size, or to add or remove an field. It can also be used to insert SQL that generates a new table for a new feature created by a update, or it can be used to insert data into a table used by a feature created by the update. Any SQL can be included in this field. Be careful when running SQL, that that SQL is not going to interfere with upgrade SQL. If you are changing table structures and those same tables are being altered during an upgrade, the upgrade may fail.</dd>\r\n      <dt>Dependant Updates</dt>\r\n  <dd>It is common for later updates to require changes from earlier updates before they can be installed. If this is the case for the update you are creating, enter the update IDs into the Dependant Update ID field. Click on Add Dependent Update if additional dependencies are required. Be sure to check the updates on the opening screen of the Updater to see if the file you are modifying with your update is  being modified by an update.AFrame.ca update. If they are modifying the same files, you may need to include the ID numbers for those updates in the Dependant Updates for the update your are creating.</dd>\r\n      <dt>Files</dt>  \r\n    <dd>This area is where most AFrame updates are created. Click on <strong>Add File</strong>  to generate a update block. A update block can include one of four actions on the file being modified, as described below. As many update blocks as required can be added to a update. </dd>\r\n            <dl>\r\n        <dt>Add File</dt>\r\n   <dd>The <strong>Add</strong> action can be used to add a new file to AFrame. This action is often used in conjuction with other update blocks that alter or delete files, to add a replacement file for one deleted, or to perhaps add a required or include file needed by a modified section in the file being changed. In the <strong>File Name</strong> field enter the file name to be assigned to the file when it is installed. In the <strong>Directory</strong> field enter the <i>relative path</i> from the AFrame root directory in which the modified file is or will exist. Select  from <strong>Upload File</strong> using the Browse button to locate the file in your local computer\'s file system. Note that the upload file can have any name. It will be renamed to the file name listed in the File Name field when it is installed.</dd>\r\n     <dt>Alter File</dt>\r\n <dd>This option is used when you wish to make changes to a piece of code within an existing source code file. In the <strong>File Name</strong> field enter the name of the file in the AFrame source code that will be altered. In the <strong>Directory</strong> field enter the relative path to the directory in which the to be alter file exists, relative to the AFrame root directory. In the <strong>Code To Replace From</strong> field copy the code from the original file the will be replaced, or appended to, and in the <strong>Code To Replace To</strong> field enter to code that will replace the code above in the <i>From</i> field. Or, if you are adding code instead of replacing code, include the code from the field above so it gets added back if you are only using that code as a way of identifying a location in the file where new code is being added.</dd>\r\n     <dt>Delete File</dt>\r\n        <dd>This option will remove files from AFrame. In the <strong>File Name</strong>  field enter the name of the file to be deleted. In the <strong>Directory</strong> field enter the path to the directory in which the to be delete file exists, relative to the root directory of the AFrame installation. </dd>\r\n   <dt>Overwrite File</dt>\r\n     <dd>This option is used to replace an existing file in AFrame with a new one. In the <strong>File Name</strong>  field enter the name of the file to be replaced. In the <strong>Directory</strong> field enter the path to the directory in which the to be replaced file exists, relative to the root directory of the AFrame installation. In the <strong>Upload File</strong> field use the Browse button to choose a file from your local computer to replace the specified file. The upload file may be named anything. It will be renamed to the file it is replacing when the update is installed.</dd>\r\n     </dl>\r\n       <dt>Create Update</dt>\r\n      <dd>Click on this button to build the update into a downloadable zip file. This zip file can then be uploaded in the Upload field on the main Updater screen to apply a update to a system.</dd>\r\n    <dt>Save Update</dt>\r\n        <dd>Click on this button to save the developing update to the AFrame database for future reference. Though it is not required, you should save a copy of the update in this way, so it can be retrieved and edited if necessary. Or, if a update takes more than a single sitting to build, you can save it, then retrieve it later to continue.</dd>\r\n       <dt>Cancel</dt>\r\n     <dd>Press this button to ignore the latest changes to the update, and return to My Own Updates Screen.</dd>\r\n\r\n</dl>','2009-06-22 15:32:56','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_LANGUAGE','<h2>Language Management</h2>\r\n\r\n <p>AFrame can be displayed in many different languages! Through the Language Manager language packs can be selected and imported.</p>\r\n\r\n<h3>Managing Existing Languages</h3>\r\n   <p>Installed languages can be edited, deleted, or exported as an AFrame language pack for redistribution. When exporting a language, a download prompt will appear asking to download a zip file of the language pack.</p>\r\n  <p>Note that the English language (language code: eng) cannot be deleted. This is the base language pack that ensures AFrame runs properly. When other languages are installed, users can disable it if they don\'t want AFrame to be displayed in English.</p>\r\n     \r\n<h3>Importing Languages</h3>\r\n    <p>Language packs can be imported by retreiving the package and then importing it into AFrame.</p>\r\n  <ol>\r\n                <li>Visit <a href=\"http://www.atutor.ca/aframe/translate/index.php\" target=\"_new\">AFrame Language Packs</a> to download one of the available language packs for your version.</li>\r\n              <li>Use the <code>Browse...</code> button to find the downloaded language pack.</li>\r\n                <li>Use the <code>Import</code> button to import the language.</li>\r\n </ol>\r\n\r\n   <p>You can contribute to the AFrame community by exporting a language pack from your AFrame installation, and attaching it to a message in the atutor.ca <a href=\"http://atutor.ca/forum/4/1.html\">Translation Forum</a>. Also see the <a href=\"http://atutor.ca/atutor/docs/translate.php\">Translator Documentation</a> for further details about translating AFrame.</p>','2009-06-04 13:08:15','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_LOGIN','<h2>Login</h2>\r\n\r\n<p>A user may login to AFrame with their Login Name or Email address, and the Password entered during <a href=\"../register.php\">registration</a>. Logging in gives users access to use more functions provided to regular user.</p>\r\n','2009-04-15 09:51:28','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_PASSWORD_REMINDER','<h2>Forgot Your Password</h2>\r\n\r\n<p>If you have forgotten your password, use the <em>Forgot your password?</em> link on the Login screen. The form will email the login name to you, along with a link you must follow to change your password.</p>\r\n','2009-04-15 09:51:37','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_PROFILE','<h2>Profile</h2>\r\n<p>This section allows a user to change elements of his/her personal profile.</p>\r\n\r\n<p>Although the login name cannot be altered, password, email address, and other personal information are editable.</p>\r\n','2009-04-15 09:51:47','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_REGISTRATION','<h2>Register</h2>\r\n\r\n<p>In order for a user to login to the AFrame system and save results from accessibility reviews, manage translate or administer the system, a unique system account needs to be created.  Use the <em>Register</em> link on the login screen to access the registration form. If email-confirmation has been enabled by the system administrator, a message will be sent to the email address entered, containing a link that must be followed to confirm the new account. Once this has been done, the login name or email address, and the password entered during registration can now be used on the <a href=\"../login.php\">Login</a> screen.</p>','2009-04-15 09:52:02','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_TRANSLATION','<h2>Translation</h2>\r\n\r\n      <p>All fields are self-explanatory. Note that language drop down box lists all the languages defined in the current installation of AFrame, no matter the language status (enabled or disabled). If you are translating a new language for AFrame, first define the language using the Language management tool\'s Add Language feature. If you do not have access to the Language management tools, ask your AFrame administrators to add the language.</p>\r\n\r\n<p>You can contribute to the AFrame community by exporting a language pack from your AFrame installation, and attaching it to a message in the atutor.ca <a href=\"http://atutor.ca/forum/4/1.html\">Translation Forum</a>. Also see the <a href=\"http://atutor.ca/atutor/docs/translate.php\">Translator Documentation</a> for further details about translating AFrame.</p>','2009-06-04 13:17:38','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_UPDATER','<h2>Updater</h2>\r\n  <p>The Updater was introduce in AFrame 1.6 to allow administrators to update their systems with feature adjustments, security fixes, and other AFrame code changes in between AFrame releases. The Updater is included as a standard module with AFrame 1.6.1+, and installs as an extra module for 1.6.</p>\r\n<dl>\r\n        <dt>The Update List</dt>\r\n    <dd>On the opening screen of the Updater will appear a list of updates available for the version of AFrame you are using, along with a description of each update.  This list is retrieved from update.atutor.ca, as are the updates themselves, so you must be connected to the Internet. Updates are retrieved from update.atutor.ca by AFrame and applied as necessary. </dd>\r\n    <dt>File Permissions</dt>\r\n   <dd>In most cases you will be asked to temporarily grant write permission to the files that need to be updated or replaced, then once the update has been applied, you will be asked to change the permissions back to read only. It is important that you follow the instructions after updates have been applied, otherwise you run the risk of opening a security hole. \r\n </dd>\r\n       <dt>Types of Updates</dt>\r\n   <dd>Updates come in various forms. Some updates replace code in a file with new code. Others replace a file with a new file.  Others may do both on multiple files and multiple code changes. Other updates delete files that are no longer required.</dd>\r\n  <dt>Required and Non-Required Updates</dt>\r\n  <dd>In most cases you will want to install updates in the order they appear in the update list, but not all updates are required updates.  Some feature updates can be ignored if you do not need the features they would add or modify on your system. Other updates will have dependencies, requiring the administrator to install earlier updates before installing a later one. You will be prompted to install previous updates if there are dependencies.</dd>\r\n        <dt>Checks and File Backups</dt>\r\n    <dd>If you have made changes to a file the Updater wishes to change,  you will be prompted to continue or not. The updater compares your local file with the same file in the AFrame code repository, and if they differ the prompt will display. In many cases  the Updater can apply updates without changing the code you have modified, but if the code to be replaced was modified, the update will fail, or if the update replaces a file, your changes will be lost. In all cases the updater will create a backup of the files that were modified, identified by the filename plus the update number added as a suffix. Rename the file to its original name to restore that file back to its original state. You can list these files by clicking the view messages button next to the update listing after the update is installed. After you have confirmed that the updates were applied and are working properly, it is safe to delete the backup files, though it does not hurt to keep them around. </dd>\r\n    <dt>Private Updates</dt>\r\n    <dd>In some cases private updates can be applied by uploading a update file through the upload form below the update list.  Private updates are often those used to apply changes that are not being applied to the AFrame default source code, or to apply custom features, or to share updates between users, etc. When uploading a update, be sure the update id, defined in the patch.xml file, is unique . </dd>\r\n</dl>','2009-06-22 15:37:42','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_USER','<h2>User Management</h2>\r\n\r\n <p>This section allows administrators to manage all user accounts. Each user belongs to a user group to which privileges are assigned.</p>\r\n\r\n<p>There are three types of default user groups that are created when AFrame is installed. These are described below along with the default privileges associated with each groups. \r\n      <dl>\r\n                <dt>Administrator</dt>\r\n              <dd>Administrators have privileges to use the Home, manage users, languages and manage their own profile.</dd>\r\n              <dt>Regular User</dt>\r\n               <dd>Regular users have privileges to use the Home and manage their own profile.</dd>\r\n                <dt>Translator</dt>\r\n         <dd>Translators have privileges to use the Home, translate AFrame terms from English to other languages, and to manage their own profile. The languages that can be used in the system are defined by users who have \"Language Management\" privileges.</dd>\r\n       </dl>\r\n</p>\r\n\r\n<h3>Creating User Accounts</h3>\r\n\r\n<p>The users who belong to a group that has \"User Management\" privileges can manually add users to the system by using <em>Create User</em>.</p>\r\n<p>User accounts can also be created by individuals using the Registration form available through the public pages of AFrame. The accounts created via the Registration form are automatically set to user group \"Regular User\". </p>\r\n\r\n<h3>User Group</h3>\r\n\r\n<p><em>User Group</em> is used to create new user groups and edit existing user groups.</p>','2009-06-04 12:55:56','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_USER_GROUP ','<h2>User Group</h2>\r\n\r\n<p>The User Group section allows administrators to manage user groups. User groups define the privileges that are granted to the users who are members of a group. Note that \"Administrator\" and \"Regular User\" groups can not  be deleted. They must exist for AFrame\'s proper operations. All other groups are optional.</p>\r\n\r\n<p>There are three default user groups in AFrame. Below is a description of the default privileges that are granted to each group. The privileges in user groups are editable by users who are a member of a group that has the \"User Management\" privilege.\r\n<dl>\r\n<dt>Administrator</dt>\r\n<dd>Administrators have privileges to use the Home, manage users, languages and manage their own profile.</dd>\r\n<dt>Regular User</dt>\r\n<dd>Regular users have privileges to use the Home and manage their own profile. </dd>\r\n<dt>Translator</dt>\r\n<dd>Translators have privileges to use the Home, translate AFrame terms from English to other languages, and to manage their own profile. The languages that can be used in the system are defined by users who have \"Language Management\" privileges.</dd>\r\n</dl>\r\n</p>','2009-06-04 13:04:37','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_HELP_USER_PASSWORD ','<h2>Change Password</h2>\r\n\r\n<p>All fields are required and self-explanatory. Once the new password is set successfully, an email notification is sent to the user.</p>\r\n','2009-04-15 09:53:11','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_INFOS_INVALID_USER','You must <a href=\"login.php\">login</a> to use this section.','2009-01-15 16:13:14','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_msgs','AF_INFOS_UPDATE_INSTALLED_AND_REMOVE_PERMISSION','The update has been installed. Please remove write permission as instruction.','2009-06-22 14:49:02','Updater: info msg');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','15_max_chars','8 characters minimum, 15 characters maximum','2009-01-09 10:16:38','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','20_max_chars','20 character maximum','2009-01-09 10:16:38','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','aframe_documentation','AFrame Documentation','2009-06-16 10:25:25','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','aframe_handbook','AFrame Handbook','2009-01-28 15:28:06','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','aframe_version_to_apply','AFrame Version to Apply','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','aframe_whatis','AFrame provides a basic frame to build an application. It has build-in functions to support multiple languages, translation, user/user group managment, updater and user profile managment.','2009-05-29 08:55:24','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','copyright','Web site engine\'s code is copyright &copy; 2009','2009-05-25 10:57:43','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','add','Add','2009-03-24 13:47:37','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','add_a_file','Add A File','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','add_dependent_update','Add A Dependent Update','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','add_edit_group','Add/Edit Group','2009-04-08 15:20:56','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','add_edit_language','Add/Edit Language','2009-02-23 13:27:38','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','add_language','Add Language','2009-02-18 15:56:02','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','add_privileges','Add Privileges','2009-02-17 09:45:53','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','all','All','2008-11-27 09:49:41','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','alter','Alter','2009-06-22 14:49:02','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','available_updates','Available Updates','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','calendar','Calendar','2009-04-06 10:43:09','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','cancel','Cancel','2009-01-09 10:29:35','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','change_email','Change Email','2009-01-15 11:29:34','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','change_password','Change Password','2009-01-15 11:29:34','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','charset','Character Set','2009-02-20 11:43:44','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','choose_lang','Choose a language to translate','2008-11-26 10:11:15','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','close_popup','Close Popup','2009-01-28 15:28:06','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','code_to_replace_from','Code To Replace From','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','code_to_replace_to','Code To Replace To','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','combination','Use a combination of letters, numbers and symbols','2009-01-09 10:16:38','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','confirm_delete','Are you sure you want to delete these records?','2009-04-09 11:29:46','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','contain_only','May contain only letters, numbers, underscores, hyphens or periods.','2009-01-09 10:16:38','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','continue','Continue','2009-06-22 14:49:02','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','create_edit_update','Create/Edit Update','2009-06-22 14:49:01','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','create_edit_user','Create/Edit User','2009-02-05 10:25:08','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','create_edit_user_group','Create User Group','2009-02-18 11:13:36','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','create_update','Create Update','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','create_user','Create User','2009-01-21 15:58:32','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','date','Date','2009-02-27 16:07:19','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','date_created','Date Created','2009-02-17 12:02:27','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','delete','Delete','2009-01-22 16:02:07','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','delete_language','Delete Language','2009-02-18 15:56:02','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','delete_this_file','Delete This File','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','delete_update','Delete Update','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','delete_user','Delete User','2009-02-06 11:41:23','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','delete_user_group','Delete User Group','2009-02-12 15:08:53','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','dependent_updates','Dependent Updates','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','dependent_update_id','Dependent Update ID','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','dependent_update_not_installed','<br><span style=\"color: red\">Waring: Due to update dependency, please install the listed updates first: </span>','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','description','Description','2008-11-24 14:25:44','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','directory','Directory','2009-06-22 14:49:01','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','disable','Disable','2009-01-20 11:47:15','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','disabled','Disabled','2009-01-20 11:45:23','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','done','Done','2009-06-22 16:16:50','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','edit','Edit','2009-01-22 16:02:07','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','edit_function','Edit Function','2009-03-17 14:58:36','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','edit_profile','Edit Profile','2009-01-16 10:52:51','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','edit_update','Edit Update','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','email','Email','2009-02-04 11:51:16','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','email_address','Email Address','2009-01-09 10:40:36','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','email_confirmation_message','You have registered for an account on %1s. Please finish the registration process by confirming your email address by using the following link: %2s .','2009-01-14 13:25:55','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','email_confirmation_message2','To finish changing your account\'s email address on %1s, please confirm your email address by using the following link: %2s .','2009-01-16 11:07:44','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','email_confirmation_subject','Email Confirmation','2009-01-14 13:25:55','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','enable','Enable','2009-01-20 11:47:15','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','enabled','Enabled','2009-01-20 11:45:23','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','english_context','English Context','2008-12-01 13:18:57','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','english_text','English Text','2008-12-01 13:18:57','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','error','Error','2008-11-24 14:25:44','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','errors','Errors','2009-03-09 09:55:45','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','error_type','Error Type','2009-01-21 12:38:17','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','expand_add_privileges','Expand Add Privileges','2009-02-17 09:45:53','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','expected_result','Expected Result','2008-11-24 14:25:44','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','export','Export','2009-02-24 13:58:06','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','file','File','2009-06-22 14:49:01','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','files','Files','2009-06-22 14:49:01','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','file_name','File Name','2009-06-22 14:49:01','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','filter','Filter','2008-11-27 09:48:36','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','first_name','First Name','2009-01-09 10:40:36','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','get_my_update','Get My Update','2009-06-22 14:49:01','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','grant_write_permission','Please grant <strong>write</strong> permission to folders and files listed below:<p><strong>Note:</strong> To change permissions on Unix use <kbd>chmod a+rw</kbd> then the file name.</p>','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','handbook_toc','Handbook Toc','2009-01-28 15:28:06','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','import','Import','2009-02-18 15:56:02','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','import_a_new_lang','Import a New Language','2009-02-24 13:58:06','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','info','Information','2009-03-06 11:29:10','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','input','Input','2008-11-21 14:16:01','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','install','Install','2009-06-22 14:49:03','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','installed_date','Installed Date','2009-06-22 14:49:01','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','jump_to_content','Jump to Content','2009-05-25 10:17:46','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','language','Language','2009-04-14 10:35:06','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','lang_code','Language Code','2009-02-20 11:43:44','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','last_login','Last Login','2009-02-04 11:51:16','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','last_modified','Last Modified','2009-06-22 14:49:01','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','last_name','Last Name','2009-01-09 10:28:23','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','last_update','Last Update','2009-02-17 12:02:27','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','locale','Locale','2009-02-23 13:27:38','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','login_name_or_email','Login Name or Email','2009-01-09 10:40:36','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','login_text','Enter the Login Name (or email) and Password you chose at registration.<br /><br /><br />Not registered yet? <a href=\"register.php\" >Register</a> Or, <a href=\"password_reminder.php\">Forgot your password?</a><br /><br />','2009-01-29 14:24:45','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','logout','Logout','2009-01-08 09:31:41','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','msg_terms','Message Terms','2009-05-05 09:05:33','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','myown_updates','My Own Updates','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','na','N/A','2009-02-23 14:31:55','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','name','Name','2009-03-18 14:53:42','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','name_in_english','Language name in English','2009-02-20 11:43:44','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','name_in_language','Language name translated','2009-02-23 13:28:12','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','name_in_translated','Language name translated','2009-02-20 11:43:44','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','never','Never','2009-02-05 11:25:19','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','new_or_translated','New or Translated Terms','2008-11-27 09:48:36','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','new_password','New Password','2009-01-16 10:52:03','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','no','No','2009-01-21 12:38:17','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','none_found','None Found.','2009-01-21 15:06:01','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','not_installed','Not Installed','2009-06-22 14:49:03','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','no_results_found','No results found.','2009-01-21 12:38:17','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','overwrite','Overwrite','2009-06-22 14:49:01','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','password','Password','2009-01-09 10:40:36','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','password_again','New Password Again','2009-01-16 10:52:03','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','password_blurb','Enter your account\'s email address below and an email with instructions on retrieving your password will be sent to you. The email address must be the same as the one you used for registration.','2009-01-16 13:19:57','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','password_changed','Password Changed','2009-02-06 09:08:32','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','password_change_confirm','Your password on %s has been changed successfully. Go to %s to login.','2009-01-16 13:17:32','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','password_change_msg','Your password has been altered. Please use the information below.','2009-02-06 09:08:31','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','password_new_blurb','Enter a new password for your account.','2009-01-16 13:55:40','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','password_old','Old Password','2009-01-16 10:27:02','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','password_reminder','Password Reminder','2009-01-07 16:14:08','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','password_request2','Dear %1$s,\r\n\r\nYour login name is %1$s.\r\n\r\nTo set a new password, follow the link below.\r\n\r\n%4$s\r\n\r\n(If this link does not take you to the site, copy and paste it into the address bar of your internet browser)\r\n\r\nThe link will become invalid after %3$s days.','2009-01-16 13:05:25','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','privileges','Privileges','2009-02-12 14:15:23','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','profile','Profile','2009-01-15 10:02:55','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','published_date','Published Date','2009-01-21 12:38:17','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','register','Register','2009-01-08 09:30:56','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','registration','Registration','2009-01-08 15:51:23','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','relative_directory','Directory is relative directory to AFrame root, for example: docs/images/ or tools/tests/. Leave empty if it is AFrame root directory.','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','remove','Remove','2009-01-23 14:04:46','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','remove_write_permission','<span style=\"color:red\">Please <strong>REMOVE</strong> write permission on the listed folders and files for your security:</span><p><strong>Note:</strong> To remove permissions on Unix use <kbd>chmod 755</kbd> then the file name..</p>','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','repair_example','Repair Example','2008-11-24 14:25:44','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','replace_file','Replace File','2009-06-22 14:49:02','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','required_field','Required Field','2009-01-08 15:51:23','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','required_field_text','<div class=\"required\" title=\"Required Field\">*</div> indicates required fields.','2009-01-08 15:51:23','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','requirement','Requirement','2008-11-24 14:25:44','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','reset_filter','Reset Filter','2008-11-27 09:48:36','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','result','Result','2008-12-01 14:45:48','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','results_found','Results Found: %s','2008-11-27 09:48:36','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','return_to_handbook','Return to Handbook','2009-01-28 15:28:06','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','save','Save','2009-01-15 10:01:07','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','save_and_close','Save and Close','2009-04-09 11:36:31','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','search','Search','2009-01-28 15:28:06','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','search_phase','Search Phase','2008-12-01 13:18:57','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','search_str','Search String','2009-03-24 13:47:37','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','search_text','Search for terms that contains the given string. For example, search for phase \"desc\" returns all terms that contain string \"desc\".','2008-12-02 11:06:56','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','select','Select','2009-02-05 14:16:51','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','select_all','select/unselect all','2009-01-23 14:04:46','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','sent_via_aframe','Sent via an AFrame system at %s','2009-01-09 14:15:29','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','sql_statement','SQL Statement','2009-06-22 14:49:02','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','status','Status','2009-01-21 12:38:52','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','submit','Submit','2008-12-01 13:18:57','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','submit_no','No','2009-01-23 11:25:56','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','submit_yes','Yes','2009-01-23 11:25:56','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','the_follow_errors_occurred','The following errors occurred:','2008-12-15 09:25:06','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','title','Title','2009-01-20 11:45:23','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','translated_context','Translated Context','2008-12-01 13:18:57','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','translated_terms','Translated Terms','2008-11-27 09:48:36','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','translated_text','Translated Text','2008-12-01 13:18:57','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','translate_to','Translate to','2008-12-01 13:18:57','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','translation','Translation','2009-02-18 11:01:39','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','translator','Translator','2009-01-07 15:05:34','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','updated_terms','Updated Terms','2008-12-02 09:16:45','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','updater','Updater','2009-06-22 14:49:01','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','updater_alter_modified_files','The listed files have been modified locally. If you choose to proceed, your local file will be modified. The original\nfile will be backup before the modification. Please note that the modification on your customized code may break your customization.<br>','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','updater_overwrite_modified_files','The listed files have been modified locally. If you choose to proceed, the update file will be copied to your local machine. \nYou have to manually merge this file and your local copy.<br>','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','updater_show_backup_files','Below is the list of the backup files created by update installation. After ensuring AFrame works properly with the update, you may want to delete these files. If AFrame does not work properly with the update, you can always revert back to the old files by renaming the backup files \nto the original file names,  removing the [update_id].old portion of the file name. <br>','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','updater_show_update_files','Below is the list of the update files copied to your computer. \nPlease manually merge the change between the update files and your local copy. <br>','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','updates','Updates','2009-06-22 14:49:01','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','update_dependent_update_not_installed','<br /><span style=\"color: red\">Warning: There are update dependencies, please install the listed updates first: </span>','2009-06-22 14:49:03','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','update_local_file_not_exist','Cannot proceed. The listed files are not exist in your local machine. If you renamed them to your copy, in order to proceed, please rename back.<br>','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','upload','Upload','2009-06-22 14:49:01','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','upload_file','Upload File','2009-06-22 14:49:01','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','upload_update','Upload a zip file to install update:','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','user','User','2009-02-27 16:07:19','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','users','Users','2009-04-14 10:41:51','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','user_group','User Group','2009-02-04 11:51:16','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','user_status','User Status','2009-02-04 11:51:16','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','version_not_match','This update is for AFrame version %s. Does not match with your current AFrame version. The installation of it may break AFrame. Are you sure you want to proceed?','2009-06-22 14:49:02','Updater');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','view','View','2009-01-20 11:47:15','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','view_message','View Message','2009-06-22 14:49:01','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','warning','Warning','2009-05-29 16:19:57','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','web_service_api','Web Service API','2009-03-13 11:56:12','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','web_service_id','Web Service ID','2009-03-04 13:48:23','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','web_site','Web Site','2009-02-06 09:08:32','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','welcome','Welcome','2009-01-08 09:30:56','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','yes','Yes','2009-01-21 12:38:17','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','yyyy-mm-dd','yyyy-mm-dd','2009-01-21 15:06:01','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','match_all_words','Match All Words','2009-02-04 11:51:16','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','match_any_word','Match Any Word','2009-02-04 11:51:16','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','next_chapter','Next Chapter','2009-01-28 15:28:06','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','print_version','Print Version','2009-03-24 13:47:37','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','hide_contents','Hide Contents','2009-03-24 13:47:37','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','previous_chapter','Previous Chapter','2009-03-24 13:47:37','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','home','Home','2009-03-24 13:47:37','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','term_type','Term Type','2009-03-24 13:47:37','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','new_terms','New Terms','2009-03-24 13:47:37','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','interface_terms','Interface Terms','2009-03-24 13:47:37','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','system_update_id','System Update ID','2009-03-24 13:47:37','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','available_to','Available To','2009-03-24 13:47:37','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','author','Author','2009-03-24 13:47:37','');
+INSERT INTO `AF_language_text` VALUES ('eng', '_template','back_to','Back To:','2009-03-24 13:47:37','');
diff --git a/docs/install/db/db_schema.sql b/docs/install/db/db_schema.sql
new file mode 100644 (file)
index 0000000..e422200
--- /dev/null
@@ -0,0 +1,825 @@
+#########################################################\r
+# Database setup SQL for a new install of Transformable #\r
+#########################################################\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `config`\r
+# since 0.1\r
+\r
+CREATE TABLE `config` (\r
+  `name` CHAR( 30 ) NOT NULL default '',\r
+  `value` CHAR( 255 ) NOT NULL default '',\r
+  PRIMARY KEY ( `name` )\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `languages`\r
+# since 0.1\r
+\r
+CREATE TABLE `languages` (\r
+  `language_code` varchar(20) NOT NULL default '',\r
+  `charset` varchar(80) NOT NULL default '',\r
+  `reg_exp` varchar(124) NOT NULL default '',\r
+  `native_name` varchar(80) NOT NULL default '',\r
+  `english_name` varchar(80) NOT NULL default '',\r
+  `status` tinyint(3) unsigned NOT NULL default '0',\r
+  PRIMARY KEY  (`language_code`)\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `lang_codes`\r
+# since 0.1\r
+\r
+CREATE TABLE `lang_codes` (\r
+  `code_3letters` varchar(3) NOT NULL default '',\r
+  `direction` varchar(16) NOT NULL default '',\r
+  `code_2letters` varchar(2) default NULL,\r
+  `description` varchar(50) default NULL,\r
+  PRIMARY KEY  (`code_3letters`)\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `mail_queue`\r
+# since 0.1\r
+\r
+CREATE TABLE `mail_queue` (\r
+  `mail_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT ,\r
+  `to_email` VARCHAR( 50 ) NOT NULL default '',\r
+  `to_name` VARCHAR( 50 ) NOT NULL default '',\r
+  `from_email` VARCHAR( 50 ) NOT NULL default '',\r
+  `from_name` VARCHAR( 50 ) NOT NULL default '',\r
+  `char_set` VARCHAR( 20 ) NOT NULL default '',\r
+  `subject` VARCHAR(255) NOT NULL ,\r
+  `body` TEXT,\r
+  PRIMARY KEY ( `mail_id` )\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `oauth_client_servers`\r
+# since 0.1\r
+\r
+CREATE TABLE `oauth_client_servers` (\r
+  `oauth_server_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,\r
+  `oauth_server` VARCHAR(255) NOT NULL default '',\r
+  `consumer_key` TEXT NOT NULL ,\r
+  `consumer_secret` TEXT NOT NULL ,\r
+  `expire_threshold` INT NOT NULL default 0,\r
+  `create_date` datetime NOT NULL,\r
+  PRIMARY KEY ( `oauth_server_id` ),\r
+  UNIQUE INDEX idx_consumer ( `oauth_server` )\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `oauth_client_tokens`\r
+# since 0.1\r
+\r
+CREATE TABLE `oauth_client_tokens` (\r
+  `oauth_server_id` MEDIUMINT UNSIGNED NOT NULL,\r
+  `token` VARCHAR(50) NOT NULL default '',\r
+  `token_type` VARCHAR(50) NOT NULL NOT NULL default '',\r
+  `token_secret` TEXT NOT NULL,\r
+  `user_id` mediumint(8) unsigned NOT NULL ,\r
+  `assign_date` datetime NOT NULL,\r
+  PRIMARY KEY ( `oauth_server_id`, `token` )\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `oauth_server_consumers`\r
+# since 0.1\r
+\r
+CREATE TABLE `oauth_server_consumers` (\r
+  `consumer_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,\r
+  `consumer` VARCHAR(255) NOT NULL default '',\r
+  `consumer_key` TEXT NOT NULL ,\r
+  `consumer_secret` TEXT NOT NULL ,\r
+  `expire_threshold` INT NOT NULL default 0,\r
+  `create_date` datetime NOT NULL,\r
+  PRIMARY KEY ( `consumer_id` ),\r
+  UNIQUE INDEX idx_consumer ( `consumer` )\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `oauth_server_tokens`\r
+# since 0.1\r
+\r
+CREATE TABLE `oauth_server_tokens` (\r
+  `consumer_id` MEDIUMINT UNSIGNED NOT NULL,\r
+  `token` VARCHAR(50) NOT NULL default '',\r
+  `token_type` VARCHAR(50) NOT NULL NOT NULL default '',\r
+  `token_secret` TEXT NOT NULL,\r
+  `user_id` mediumint(8) unsigned NOT NULL ,\r
+  `assign_date` datetime NOT NULL,\r
+  PRIMARY KEY ( `consumer_id`, `token` )\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `patches`\r
+# since 0.1\r
+\r
+CREATE TABLE `patches` (\r
+       `patches_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,\r
+       `system_patch_id` VARCHAR(20) NOT NULL default '',\r
+       `applied_version` VARCHAR(10) NOT NULL default '',\r
+       `patch_folder` VARCHAR(250) NOT NULL default '',\r
+  `description` TEXT,\r
+       `available_to` VARCHAR(250) NOT NULL default '',\r
+  `sql_statement` text,\r
+  `status` varchar(20) NOT NULL default '',\r
+  `remove_permission_files` text,\r
+  `backup_files` text,\r
+  `patch_files` text,\r
+  `author` VARCHAR(255) NOT NULL,\r
+  `installed_date` datetime NOT NULL,\r
+       PRIMARY KEY  (`patches_id`)\r
+);\r
+\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `patches_files`\r
+# since 0.1\r
+\r
+CREATE TABLE `patches_files` (\r
+       `patches_files_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,\r
+       `patches_id` MEDIUMINT UNSIGNED NOT NULL default 0,\r
+       `action` VARCHAR(20) NOT NULL default '',\r
+       `name` TEXT,\r
+       `location` VARCHAR(250) NOT NULL default '',\r
+       PRIMARY KEY  (`patches_files_id`)\r
+);\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `patches_files_actions`\r
+# since 0.1\r
+\r
+CREATE TABLE `patches_files_actions` (\r
+       `patches_files_actions_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,\r
+       `patches_files_id` MEDIUMINT UNSIGNED NOT NULL default 0,\r
+       `action` VARCHAR(20) NOT NULL default '',\r
+       `code_from` TEXT,\r
+       `code_to` TEXT,\r
+       PRIMARY KEY  (`patches_files_actions_id`)\r
+);\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `myown_patches`\r
+# since 0.1\r
+\r
+CREATE TABLE `myown_patches` (\r
+       `myown_patch_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,\r
+       `system_patch_id` VARCHAR(20) NOT NULL default '',\r
+       `applied_version` VARCHAR(10) NOT NULL default '',\r
+  `description` TEXT,\r
+  `sql_statement` text,\r
+  `status` varchar(20) NOT NULL default '',\r
+  `last_modified` datetime NOT NULL,\r
+       PRIMARY KEY  (`myown_patch_id`)\r
+);\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `myown_patches_dependent`\r
+# since 0.1\r
+\r
+CREATE TABLE `myown_patches_dependent` (\r
+       `myown_patches_dependent_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,\r
+       `myown_patch_id` MEDIUMINT UNSIGNED NOT NULL,\r
+       `dependent_patch_id` VARCHAR(50) NOT NULL default '',\r
+       PRIMARY KEY  (`myown_patches_dependent_id`)\r
+);\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `myown_patches_files`\r
+# since 0.1\r
+\r
+CREATE TABLE `myown_patches_files` (\r
+       `myown_patches_files_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,\r
+       `myown_patch_id` MEDIUMINT UNSIGNED NOT NULL,\r
+       `action` VARCHAR(20) NOT NULL default '',\r
+       `name` VARCHAR(250) NOT NULL,\r
+       `location` VARCHAR(250) NOT NULL default '',\r
+       `code_from` TEXT,\r
+       `code_to` TEXT,\r
+       `uploaded_file` TEXT,\r
+       PRIMARY KEY  (`myown_patches_files_id`)\r
+);\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `privileges`\r
+# since 0.1\r
+\r
+CREATE TABLE `privileges` (\r
+  `privilege_id` mediumint(8) unsigned NOT NULL auto_increment,\r
+  `title_var` varchar(255) NOT NULL DEFAULT '',\r
+  `description` text,\r
+  `create_date` datetime NOT NULL,\r
+  `last_update` datetime,\r
+  `link` varchar(255) NOT NULL DEFAULT '',\r
+  `menu_sequence` tinyint(4) NOT NULL,\r
+  `open_to_public` tinyint(4) NOT NULL DEFAULT 0,\r
+  PRIMARY KEY  (`privilege_id`)\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `themes`\r
+# since 0.1\r
+\r
+CREATE TABLE `themes` (\r
+  `title` varchar(80) NOT NULL default '',\r
+  `version` varchar(10) NOT NULL default '',\r
+  `dir_name` varchar(20) NOT NULL default '',\r
+  `last_updated` date NOT NULL default '0000-00-00',\r
+  `extra_info` TEXT,\r
+  `status` tinyint(3) unsigned NOT NULL default '1',\r
+  PRIMARY KEY  (`title`)\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `users`\r
+# since 0.1\r
+CREATE TABLE `users` (\r
+  `user_id` mediumint(8) unsigned NOT NULL auto_increment,\r
+  `login` varchar(20) NOT NULL,\r
+  `password` varchar(40) NOT NULL,\r
+  `user_group_id` mediumint(8) NOT NULL,\r
+  `first_name` varchar(100),\r
+  `last_name` varchar(100),\r
+  `email` varchar(50),\r
+  `web_service_id` varchar(40) NOT NULL,\r
+  `status` tinyint(3) NOT NULL default '1',\r
+  `create_date` datetime NOT NULL,\r
+  `last_login` datetime,\r
+  `preferences` text,\r
+  PRIMARY KEY  (`user_id`)\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `user_groups`\r
+# since 0.1\r
+\r
+CREATE TABLE `user_groups` (\r
+  `user_group_id` mediumint(8) unsigned NOT NULL auto_increment,\r
+  `title` varchar(255) NOT NULL DEFAULT '',\r
+  `description` text,\r
+  `create_date` datetime NOT NULL,\r
+  `last_update` datetime,\r
+  PRIMARY KEY  (`user_group_id`)\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `user_group_privilege`\r
+# since 0.1\r
+\r
+CREATE TABLE `user_group_privilege` (\r
+  `user_group_id` mediumint(8) unsigned NOT NULL,\r
+  `privilege_id` mediumint(8) unsigned NOT NULL,\r
+  PRIMARY KEY  (`user_group_id`, `privilege_id`)\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;\r
+\r
+# --------------------------------------------------------\r
+# Table structure for table `user_links`\r
+# since 0.1\r
+CREATE TABLE `user_links` (\r
+  `user_link_id` mediumint(8) NOT NULL auto_increment,\r
+  `user_id` int(10) NOT NULL,\r
+  `URI` text,\r
+  `last_guideline_ids` varchar(50) NOT NULL,\r
+  `last_sessionID` varchar(40) NOT NULL,\r
+  `last_update` datetime NOT NULL,\r
+  PRIMARY KEY  (`user_link_id`)\r
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;\r
+\r
+-- Dumping data for table `languages`\r
+\r
+INSERT INTO `languages` (`language_code`, `charset`, `reg_exp`, `native_name`, `english_name`, `status`) VALUES\r
+('eng', 'utf-8', 'en([-_][[:alpha:]]{2})?|english', 'English', 'English', 1);\r
+\r
+-- Dumping data for table `lang_codes`\r
+\r
+INSERT INTO `lang_codes` (`code_3letters`, `direction`, `code_2letters`, `description`) VALUES\r
+('aar', 'ltr', 'aa', 'Afar'),\r
+('abk', 'ltr', 'ab', 'Abkhazian'),\r
+('ace', 'ltr', '', 'Achinese'),\r
+('ach', 'ltr', '', 'Acoli'),\r
+('ada', 'ltr', '', 'Adangme'),\r
+('ady', 'ltr', '', 'Adyghe'),\r
+('afa', 'ltr', '', 'Afro-Asiatic'),\r
+('afh', 'ltr', '', 'Afrihili'),\r
+('afr', 'ltr', 'af', 'Afrikaans'),\r
+('ain', 'ltr', '', 'Ainu'),\r
+('aka', 'ltr', 'ak', 'Akan'),\r
+('akk', 'ltr', '', 'Akkadian'),\r
+('alb', 'ltr', 'sq', 'Albanian'),\r
+('ale', 'ltr', '', 'Aleut'),\r
+('alg', 'ltr', '', 'Algonquianlanguages'),\r
+('alt', 'ltr', '', 'Southern'),\r
+('amh', 'ltr', 'am', 'Amharic'),\r
+('anp', 'ltr', '', 'Angika'),\r
+('apa', 'ltr', '', 'Apachelanguages'),\r
+('ang', 'ltr', '', 'English Old(ca.450-1100)'),\r
+('ara', 'rtl', 'ar', 'Arabic'),\r
+('arc', 'ltr', '', 'Aramaic'),\r
+('arg', 'ltr', 'an', 'Aragonese'),\r
+('arm', 'ltr', 'hy', 'Armenian'),\r
+('arn', 'ltr', '', 'Araucanian'),\r
+('arp', 'ltr', '', 'Arapaho'),\r
+('art', 'ltr', '', 'Artificial(Other)'),\r
+('arw', 'ltr', '', 'Arawak'),\r
+('asm', 'ltr', 'as', 'Assamese'),\r
+('ast', 'ltr', '', 'Asturian'),\r
+('ath', 'ltr', '', 'Athapascanlanguages'),\r
+('aus', 'ltr', '', 'Australianlanguages'),\r
+('ava', 'ltr', 'av', 'Avaric'),\r
+('ave', 'ltr', 'ae', 'Avestan'),\r
+('awa', 'ltr', '', 'Awadhi'),\r
+('aym', 'ltr', 'ay', 'Aymara'),\r
+('aze', 'ltr', 'az', 'Azerbaijani'),\r
+('bad', 'ltr', '', 'Banda'),\r
+('bai', 'ltr', '', 'Bamilekelanguages'),\r
+('bak', 'ltr', 'ba', 'Bashkir'),\r
+('bal', 'ltr', '', 'Baluchi'),\r
+('bam', 'ltr', 'bm', 'Bambara'),\r
+('ban', 'ltr', '', 'Balinese'),\r
+('baq', 'ltr', 'eu', 'Basque'),\r
+('bas', 'ltr', '', 'Basa'),\r
+('bat', 'ltr', '', 'Baltic'),\r
+('bej', 'ltr', '', 'Beja'),\r
+('bel', 'ltr', 'be', 'Belarusian'),\r
+('bem', 'ltr', '', 'Bemba'),\r
+('ben', 'ltr', 'bn', 'Bengali'),\r
+('ber', 'ltr', '', 'Berber(Other)'),\r
+('bho', 'ltr', '', 'Bhojpuri'),\r
+('bih', 'ltr', 'bh', 'Bihari'),\r
+('bik', 'ltr', '', 'Bikol'),\r
+('bin', 'ltr', '', 'Bini'),\r
+('bis', 'ltr', 'bi', 'Bislama'),\r
+('bla', 'ltr', '', 'Siksika'),\r
+('bnt', 'ltr', '', 'Bantu(Other)'),\r
+('tib', 'ltr', 'bo', 'Tibetan'),\r
+('bos', 'ltr', 'bs', 'Bosnian'),\r
+('bra', 'ltr', '', 'Braj'),\r
+('bre', 'ltr', 'br', 'Breton'),\r
+('btk', 'ltr', '', 'Batak(Indonesia)'),\r
+('bua', 'ltr', '', 'Buriat'),\r
+('bug', 'ltr', '', 'Buginese'),\r
+('bul', 'ltr', 'bg', 'Bulgarian'),\r
+('bur', 'ltr', 'my', 'Burmese'),\r
+('byn', 'ltr', '', 'Blin;Bilin'),\r
+('cad', 'ltr', '', 'Caddo'),\r
+('cai', 'ltr', '', 'CentralAmericanIndian'),\r
+('car', 'ltr', '', 'Caribcaribe'),\r
+('cat', 'ltr', 'ca', 'Catalan;Valencian'),\r
+('cau', 'ltr', '', 'Caucasian(Other)'),\r
+('ceb', 'ltr', '', 'Cebuano'),\r
+('cel', 'ltr', '', 'Celtic(Other)'),\r
+('cze', 'ltr', 'cs', 'Czech'),\r
+('ces', 'ltr', 'cs', 'Czech'),\r
+('cha', 'ltr', 'ch', 'Chamorro'),\r
+('chb', 'ltr', '', 'Chibcha'),\r
+('che', 'ltr', 'ce', 'Chechen'),\r
+('chg', 'ltr', '', 'Chagatai'),\r
+('chi', 'ltr', 'zh', 'Chinese'),\r
+('zho', 'ltr', 'zh', 'Chinese'),\r
+('chk', 'ltr', '', 'Chuukese'),\r
+('chm', 'ltr', '', 'Mari'),\r
+('chn', 'ltr', '', 'Chinookjargon'),\r
+('cho', 'ltr', '', 'Choctaw'),\r
+('chp', 'ltr', '', 'Chipewyan'),\r
+('chr', 'ltr', '', 'Cherokee'),\r
+('chu', 'ltr', 'cu', 'ChurchSlavic'),\r
+('chv', 'ltr', 'cv', 'Chuvash'),\r
+('chy', 'ltr', '', 'Cheyenne'),\r
+('cmc', 'ltr', '', 'Chamiclanguages'),\r
+('cop', 'ltr', '', 'Coptic'),\r
+('cor', 'ltr', 'kw', 'Cornish'),\r
+('cos', 'ltr', 'co', 'Corsican'),\r
+('cpp', 'ltr', '', 'Creoles'),\r
+('cre', 'ltr', 'cr', 'Cree'),\r
+('crh', 'ltr', '', 'CrimeanTatar'),\r
+('crp', 'ltr', '', 'Creolesandpidgins(Other)'),\r
+('csb', 'ltr', '', 'Kashubian'),\r
+('cus', 'ltr', '', 'Cushitic(Other)'),\r
+('wel', 'ltr', 'cy', 'Welsh'),\r
+('cym', 'ltr', 'cy', 'Welsh'),\r
+('dak', 'ltr', '', 'Dakota'),\r
+('dan', 'ltr', 'da', 'Danish'),\r
+('dar', 'ltr', '', 'Dargwa'),\r
+('day', 'ltr', '', 'Dayak'),\r
+('del', 'ltr', '', 'Delaware'),\r
+('den', 'ltr', '', 'Slave(Athapascan)'),\r
+('ger', 'ltr', 'de', 'German'),\r
+('deu', 'ltr', 'de', 'German'),\r
+('dgr', 'ltr', '', 'Dogrib'),\r
+('din', 'ltr', '', 'Dinka'),\r
+('div', 'ltr', 'dv', 'Divehi;Dhivehi'),\r
+('doi', 'ltr', '', 'Dogri'),\r
+('dra', 'ltr', '', 'Dravidian(Other)'),\r
+('dsb', 'ltr', '', 'LowerSorbian'),\r
+('dua', 'ltr', '', 'Duala'),\r
+('dut', 'ltr', 'nl', 'Dutch;Flemish'),\r
+('nld', 'ltr', 'nl', 'Dutch;Flemish'),\r
+('dyu', 'ltr', '', 'Dyula'),\r
+('dzo', 'ltr', 'dz', 'Dzongkha'),\r
+('efi', 'ltr', '', 'Efik'),\r
+('egy', 'ltr', '', 'Egyptian(Ancient)'),\r
+('eka', 'ltr', '', 'Ekajuk'),\r
+('elx', 'ltr', '', 'Elamite'),\r
+('cpe', 'ltr', '', 'Creolesandpidgins Englishbased(Other)'),\r
+('cpf', 'ltr', '', 'Creolesandpidgins French-based(Other)'),\r
+('dum', 'ltr', '', 'Dutch Middle(ca.1050-1350)'),\r
+('gre', 'ltr', 'el', 'Greek Modern(1453-)'),\r
+('ell', 'ltr', 'el', 'Greek Modern(1453-)'),\r
+('eng', 'ltr', 'en', 'English'),\r
+('epo', 'ltr', 'eo', 'Esperanto'),\r
+('est', 'ltr', 'et', 'Estonian'),\r
+('eus', 'ltr', 'eu', 'Basque'),\r
+('ewe', 'ltr', 'ee', 'Ewe'),\r
+('ewo', 'ltr', '', 'Ewondo'),\r
+('fan', 'ltr', '', 'Fang'),\r
+('fao', 'ltr', 'fo', 'Faroese'),\r
+('per', 'ltr', 'fa', 'Persian'),\r
+('fas', 'ltr', 'fa', 'Persian'),\r
+('fat', 'ltr', '', 'Fanti'),\r
+('fij', 'ltr', 'fj', 'Fijian'),\r
+('fil', 'ltr', '', 'Filipino'),\r
+('fin', 'ltr', 'fi', 'Finnish'),\r
+('fiu', 'ltr', '', 'Finno-Ugrian(Other)'),\r
+('fon', 'ltr', '', 'Fon'),\r
+('fre', 'ltr', 'fr', 'French'),\r
+('fra', 'ltr', 'fr', 'French'),\r
+('frr', 'ltr', '', 'NorthernFrisian'),\r
+('frs', 'ltr', '', 'EasternFrisian'),\r
+('fry', 'ltr', 'fy', 'WesternFrisian'),\r
+('ful', 'ltr', 'ff', 'Fulah'),\r
+('fur', 'ltr', '', 'Friulian'),\r
+('gaa', 'ltr', '', 'Ga'),\r
+('gay', 'ltr', '', 'Gayo'),\r
+('gba', 'ltr', '', 'Gbaya'),\r
+('gem', 'ltr', '', 'Germanic(Other)'),\r
+('kat', 'ltr', 'ka', 'Georgian'),\r
+('geo', 'ltr', 'ka', 'Georgian'),\r
+('gez', 'ltr', '', 'Geez'),\r
+('gil', 'ltr', '', 'Gilbertese'),\r
+('gla', 'ltr', 'gd', 'Gaelic'),\r
+('gle', 'ltr', 'ga', 'Irish'),\r
+('glg', 'ltr', 'gl', 'Galician'),\r
+('glv', 'ltr', 'gv', 'Manxmanx;'),\r
+('gon', 'ltr', '', 'Gondi'),\r
+('gor', 'ltr', '', 'Gorontalo'),\r
+('got', 'ltr', '', 'Gothic'),\r
+('grb', 'ltr', '', 'Grebo'),\r
+('frm', 'ltr', '', 'French Middle(ca.1400-1600)'),\r
+('fro', 'ltr', '', 'French Old(842-ca.1400)'),\r
+('grc', 'ltr', '', 'Greek Ancient(to1453)'),\r
+('grn', 'ltr', 'gn', 'Guarani'),\r
+('gsw', 'ltr', '', 'Alemanic'),\r
+('guj', 'ltr', 'gu', 'Gujarati'),\r
+('gwi', 'ltr', '', 'Gwich'),\r
+('hai', 'ltr', '', 'Haida'),\r
+('hat', 'ltr', 'ht', 'Haitian'),\r
+('hau', 'ltr', 'ha', 'Hausa'),\r
+('haw', 'ltr', '', 'Hawaiian'),\r
+('heb', 'rtl', 'he', 'Hebrew'),\r
+('her', 'ltr', 'hz', 'Herero'),\r
+('hil', 'ltr', '', 'Hiligaynon'),\r
+('him', 'ltr', '', 'Himachali'),\r
+('hin', 'ltr', 'hi', 'Hindi'),\r
+('hit', 'ltr', '', 'Hittite'),\r
+('hmn', 'ltr', '', 'Hmong'),\r
+('hmo', 'ltr', 'ho', 'HiriMotu'),\r
+('scr', 'ltr', 'hr', 'Croatian'),\r
+('hrv', 'ltr', 'hr', 'Croatian'),\r
+('hsb', 'ltr', '', 'UpperSorbian'),\r
+('hun', 'ltr', 'hu', 'Hungarian'),\r
+('hup', 'ltr', '', 'Hupa'),\r
+('iba', 'ltr', '', 'Iban'),\r
+('ibo', 'ltr', 'ig', 'Igbo'),\r
+('ice', 'ltr', 'is', 'Icelandic'),\r
+('isl', 'ltr', 'is', 'Icelandic'),\r
+('ido', 'ltr', 'io', 'Ido'),\r
+('iii', 'ltr', 'ii', 'SichuanYi'),\r
+('ijo', 'ltr', '', 'Ijo'),\r
+('iku', 'ltr', 'iu', 'Inuktitut'),\r
+('ile', 'ltr', 'ie', 'Interlingue'),\r
+('ilo', 'ltr', '', 'Iloko'),\r
+('ina', 'ltr', 'ia', 'Interlingua'),\r
+('inc', 'ltr', '', 'Indic(Other)'),\r
+('ind', 'ltr', 'id', 'Indonesian'),\r
+('ine', 'ltr', '', 'Indo-European(Other)'),\r
+('inh', 'ltr', '', 'Ingush'),\r
+('ipk', 'ltr', 'ik', 'Inupiaq'),\r
+('ira', 'ltr', '', 'Iranian(Other)'),\r
+('iro', 'ltr', '', 'Iroquoianlanguages'),\r
+('ita', 'ltr', 'it', 'Italian'),\r
+('jav', 'ltr', 'jv', 'Javanese'),\r
+('jbo', 'ltr', '', 'Lojban'),\r
+('jpn', 'ltr', 'ja', 'Japanese'),\r
+('jpr', 'ltr', '', 'Judeo-Persian'),\r
+('jrb', 'ltr', '', 'Judeo-Arabic'),\r
+('kaa', 'ltr', '', 'Kara-Kalpak'),\r
+('kab', 'ltr', '', 'Kabyle'),\r
+('kac', 'ltr', '', 'Kachin'),\r
+('kal', 'ltr', 'kl', 'Kalaallisut'),\r
+('kam', 'ltr', '', 'Kamba'),\r
+('kan', 'ltr', 'kn', 'Kannada'),\r
+('kar', 'ltr', '', 'Karen'),\r
+('kas', 'ltr', 'ks', 'Kashmiri'),\r
+('kau', 'ltr', 'kr', 'Kanuri'),\r
+('kaw', 'ltr', '', 'Kawi'),\r
+('kaz', 'ltr', 'kk', 'Kazakh'),\r
+('kbd', 'ltr', '', 'Kabardian'),\r
+('kha', 'ltr', '', 'Khasi'),\r
+('khi', 'ltr', '', 'Khoisan(Other)'),\r
+('khm', 'ltr', 'km', 'Khmer'),\r
+('kho', 'ltr', '', 'Khotanese'),\r
+('kik', 'ltr', 'ki', 'Kikuyu;'),\r
+('kin', 'ltr', 'rw', 'Kinyarwanda'),\r
+('kir', 'ltr', 'ky', 'Kirghiz'),\r
+('kmb', 'ltr', '', 'Kimbundu'),\r
+('kok', 'ltr', '', 'Konkani'),\r
+('kom', 'ltr', 'kv', 'Komi'),\r
+('kon', 'ltr', 'kg', 'Kongo'),\r
+('kor', 'ltr', 'ko', 'Korean'),\r
+('kos', 'ltr', '', 'Kosraean'),\r
+('kpe', 'ltr', '', 'Kpelle'),\r
+('krc', 'ltr', '', 'Karachay-Balkar'),\r
+('krl', 'ltr', '', 'Karelian'),\r
+('kro', 'ltr', '', 'Kru'),\r
+('kru', 'ltr', '', 'Kurukh'),\r
+('kua', 'ltr', 'kj', 'Kuanyama'),\r
+('kum', 'ltr', '', 'Kumyk'),\r
+('kur', 'ltr', 'ku', 'Kurdish'),\r
+('kut', 'ltr', '', 'Kutenai'),\r
+('lad', 'ltr', '', 'Ladino'),\r
+('lah', 'ltr', '', 'Lahnda'),\r
+('lam', 'ltr', '', 'Lamba'),\r
+('lao', 'ltr', 'lo', 'Lao'),\r
+('lat', 'ltr', 'la', 'Latin'),\r
+('lav', 'ltr', 'lv', 'Latvian'),\r
+('lez', 'ltr', '', 'Lezghian'),\r
+('lim', 'ltr', 'li', 'Limburgan'),\r
+('lin', 'ltr', 'ln', 'Lingala'),\r
+('lit', 'ltr', 'lt', 'Lithuanian'),\r
+('lol', 'ltr', '', 'Mongo'),\r
+('loz', 'ltr', '', 'Lozi'),\r
+('ltz', 'ltr', 'lb', 'Luxembourgish'),\r
+('lua', 'ltr', '', 'Luba-Lulua'),\r
+('lub', 'ltr', 'lu', 'Luba-Katanga'),\r
+('lug', 'ltr', 'lg', 'Ganda'),\r
+('lui', 'ltr', '', 'Luiseno'),\r
+('lun', 'ltr', '', 'Lunda'),\r
+('luo', 'ltr', '', 'Luo(KenyaandTanzania)'),\r
+('lus', 'ltr', '', 'lushai'),\r
+('mac', 'ltr', 'mk', 'Macedonian'),\r
+('mkd', 'ltr', 'mk', 'Macedonian'),\r
+('mad', 'ltr', '', 'Madurese'),\r
+('mag', 'ltr', '', 'Magahi'),\r
+('mah', 'ltr', 'mh', 'Marshallese'),\r
+('mai', 'ltr', '', 'Maithili'),\r
+('mak', 'ltr', '', 'Makasar'),\r
+('mal', 'ltr', 'ml', 'Malayalam'),\r
+('man', 'ltr', '', 'Mandingo'),\r
+('mao', 'ltr', 'mi', 'Maori'),\r
+('mri', 'ltr', 'mi', 'Maori'),\r
+('map', 'ltr', '', 'Austronesian(Other)'),\r
+('mar', 'ltr', 'mr', 'Marathi'),\r
+('mas', 'ltr', '', 'Masai'),\r
+('may', 'ltr', 'ms', 'Malay'),\r
+('msa', 'ltr', 'ms', 'Malay'),\r
+('mdf', 'ltr', '', 'Moksha'),\r
+('mdr', 'ltr', '', 'Mandar'),\r
+('men', 'ltr', '', 'Mende'),\r
+('mic', 'ltr', '', 'Mi''kmaq'),\r
+('min', 'ltr', '', 'Minangkabau'),\r
+('mis', 'ltr', '', 'Miscellaneouslanguages'),\r
+('mkh', 'ltr', '', 'Mon-Khmer(Other)'),\r
+('mlg', 'ltr', 'mg', 'Malagasy'),\r
+('mlt', 'ltr', 'mt', 'Maltese'),\r
+('mnc', 'ltr', '', 'Manchu'),\r
+('mni', 'ltr', '', 'Manipuri'),\r
+('mno', 'ltr', '', 'Manobolanguages'),\r
+('moh', 'ltr', '', 'Mohawk'),\r
+('mol', 'ltr', 'mo', 'Moldavian'),\r
+('mon', 'ltr', 'mn', 'Mongolian'),\r
+('mga', 'ltr', '', 'Irish Middle(900-1200)'),\r
+('mos', 'ltr', '', 'Mossi'),\r
+('mul', 'ltr', '', 'Multiple'),\r
+('mun', 'ltr', '', 'Mundalanguages'),\r
+('mus', 'ltr', '', 'Creek'),\r
+('mwl', 'ltr', '', 'Mirandese'),\r
+('mwr', 'ltr', '', 'Marwari'),\r
+('mya', 'ltr', 'my', 'Burmese'),\r
+('myn', 'ltr', '', 'Mayanlanguages'),\r
+('myv', 'ltr', '', 'Erzya'),\r
+('nah', 'ltr', '', 'Nahuatl'),\r
+('nai', 'ltr', '', 'NorthAmericanIndian'),\r
+('nap', 'ltr', '', 'Neapolitan'),\r
+('nau', 'ltr', 'na', 'Nauru'),\r
+('nav', 'ltr', 'nv', 'Navajo'),\r
+('ndo', 'ltr', 'ng', 'Ndonga'),\r
+('nds', 'ltr', '', 'LowGerman'),\r
+('nep', 'ltr', 'ne', 'Nepali'),\r
+('new', 'ltr', '', 'Newaria'),\r
+('nia', 'ltr', '', 'Nias'),\r
+('nic', 'ltr', '', 'Niger-Kordofanian(Other)s'),\r
+('niu', 'ltr', '', 'Niuean'),\r
+('nno', 'ltr', 'nn', 'Norwegian'),\r
+('nob', 'ltr', 'nb', 'Norwegian'),\r
+('nog', 'ltr', '', 'Nogai'),\r
+('non', 'ltr', '', 'Norse'),\r
+('nor', 'ltr', 'no', 'Norwegian'),\r
+('nqo', 'ltr', '', 'N''ko'),\r
+('nso', 'ltr', '', 'NorthernSotho'),\r
+('nub', 'ltr', '', 'Nubianlanguages'),\r
+('nwc', 'ltr', '', 'ClassicalNewari'),\r
+('nya', 'ltr', 'ny', 'Chichewa;Chewa'),\r
+('nym', 'ltr', '', 'Nyamwezi'),\r
+('nyn', 'ltr', '', 'Nyankole'),\r
+('nyo', 'ltr', '', 'Nyoro'),\r
+('oci', 'ltr', 'oc', 'Occitan(post1500)'),\r
+('oji', 'ltr', 'oj', 'Ojibwa'),\r
+('ori', 'ltr', 'or', 'Oriya'),\r
+('orm', 'ltr', 'om', 'Oromo'),\r
+('osa', 'ltr', '', 'Osage'),\r
+('oss', 'ltr', 'os', 'Ossetian'),\r
+('oto', 'ltr', '', 'Otomianlanguages'),\r
+('nbl', 'ltr', 'nr', 'Ndebele South'),\r
+('nde', 'ltr', 'nd', 'Ndebele North'),\r
+('ota', 'ltr', '', 'Turkish Ottoman(1500-1928)'),\r
+('paa', 'ltr', '', 'Papuan(Other)papoues'),\r
+('pag', 'ltr', '', 'Pangasinan'),\r
+('pal', 'ltr', '', 'Pahlavi'),\r
+('pam', 'ltr', '', 'Pampanga'),\r
+('pan', 'ltr', 'pa', 'Panjabi;Punjabi'),\r
+('pap', 'ltr', '', 'Papiamento'),\r
+('pau', 'ltr', '', 'Palauan'),\r
+('phi', 'ltr', '', 'Philippine(Other)philippines'),\r
+('phn', 'ltr', '', 'Phoenician'),\r
+('pli', 'ltr', 'pi', 'Pali'),\r
+('pol', 'ltr', 'pl', 'Polish'),\r
+('pon', 'ltr', '', 'Pohnpeian'),\r
+('por', 'ltr', 'pt', 'Portuguese'),\r
+('pra', 'ltr', '', 'Prakritlanguages'),\r
+('pus', 'ltr', 'ps', 'Pushto'),\r
+('que', 'ltr', 'qu', 'Quechua'),\r
+('raj', 'ltr', '', 'Rajasthani'),\r
+('rap', 'ltr', '', 'Rapanui'),\r
+('rar', 'ltr', '', 'Rarotongan'),\r
+('roa', 'ltr', 'R', 'omance(Other)romanes'),\r
+('roh', 'ltr', 'rm', 'Raeto-Romance'),\r
+('rom', 'ltr', '', 'Romany'),\r
+('rum', 'ltr', 'ro', 'Romanian'),\r
+('ron', 'ltr', 'ro', 'Romanian'),\r
+('run', 'ltr', 'rn', 'Rundi'),\r
+('rup', 'ltr', '', 'Aromanian'),\r
+('rus', 'ltr', 'ru', 'Russian'),\r
+('sad', 'ltr', '', 'Sandawe'),\r
+('sag', 'ltr', 'sg', 'Sango'),\r
+('sah', 'ltr', '', 'Yakut'),\r
+('sai', 'ltr', '', 'SouthAmericanIndian(Other)'),\r
+('sal', 'ltr', '', 'Salishanlanguages'),\r
+('sam', 'ltr', '', 'SamaritanAramaic'),\r
+('san', 'ltr', 'sa', 'Sanskrit'),\r
+('sas', 'ltr', '', 'Sasak'),\r
+('sat', 'ltr', '', 'Santali'),\r
+('scc', 'ltr', 'sr', 'Serbian'),\r
+('srp', 'ltr', 'sr', 'Serbian'),\r
+('scn', 'ltr', '', 'Sicilian'),\r
+('sco', 'ltr', '', 'Scots'),\r
+('sel', 'ltr', '', 'Selkup'),\r
+('peo', 'ltr', '', 'Persian Old(ca.600-400B.C.)'),\r
+('sem', 'ltr', '', 'Semitic(Other)'),\r
+('sgn', 'ltr', '', 'SignLanguages'),\r
+('shn', 'ltr', '', 'Shan'),\r
+('sid', 'ltr', '', 'Sidamo'),\r
+('sin', 'ltr', 'si', 'Sinhala'),\r
+('sio', 'ltr', '', 'Siouanlanguages'),\r
+('sit', 'ltr', '', 'Sino-Tibetan(Other)'),\r
+('sla', 'ltr', '', 'Slavic(Other)slaves'),\r
+('slo', 'ltr', 'sk', 'Slovak'),\r
+('slk', 'ltr', 'sk', 'Slovak'),\r
+('slv', 'ltr', 'sl', 'Slovenian'),\r
+('sma', 'ltr', '', 'SouthernSami'),\r
+('sme', 'ltr', 'se', 'NorthernSami'),\r
+('smi', 'ltr', '', 'Samilanguages(Other)'),\r
+('smj', 'ltr', '', 'LuleSami'),\r
+('smn', 'ltr', '', 'InariSami'),\r
+('smo', 'ltr', 'sm', 'Samoan'),\r
+('sms', 'ltr', '', 'SkoltSami'),\r
+('sna', 'ltr', 'sn', 'Shona'),\r
+('snd', 'ltr', 'sd', 'Sindhi'),\r
+('snk', 'ltr', '', 'Soninke'),\r
+('sog', 'ltr', '', 'Sogdian'),\r
+('som', 'ltr', 'so', 'Somali'),\r
+('son', 'ltr', '', 'Songhai'),\r
+('spa', 'ltr', 'es', 'Spanish;Castilian'),\r
+('srd', 'ltr', 'sc', 'Sardinian'),\r
+('srn', 'ltr', '', 'SrananTogosranan'),\r
+('srr', 'ltr', '', 'Serer'),\r
+('ssa', 'ltr', '', 'Nilo-Saharan(Other)'),\r
+('ssw', 'ltr', 'ss', 'Swati'),\r
+('suk', 'ltr', '', 'Sukuma'),\r
+('sun', 'ltr', 'su', 'Sundanese'),\r
+('sus', 'ltr', '', 'Susu'),\r
+('sux', 'ltr', '', 'Sumerian'),\r
+('swa', 'ltr', 'sw', 'Swahili'),\r
+('swe', 'ltr', 'sv', 'Swedish'),\r
+('syr', 'ltr', '', 'Syriac'),\r
+('tah', 'ltr', 'ty', 'Tahitian'),\r
+('tai', 'ltr', '', 'Tai(Other)'),\r
+('tam', 'ltr', 'ta', 'Tamil'),\r
+('tat', 'ltr', 'tt', 'Tatar'),\r
+('tel', 'ltr', 'te', 'Telugu'),\r
+('tem', 'ltr', '', 'Timne'),\r
+('sga', 'ltr', '', 'Irish Old(to900)'),\r
+('sot', 'ltr', 'st', 'Sotho Southern'),\r
+('ter', 'ltr', '', 'Tereno'),\r
+('tet', 'ltr', '', 'Tetum'),\r
+('tgk', 'ltr', 'tg', 'Tajik'),\r
+('tgl', 'ltr', 'tl', 'Tagalog'),\r
+('tha', 'ltr', 'th', 'Thai'),\r
+('bod', 'ltr', 'bo', 'Tibetan'),\r
+('tig', 'ltr', '', 'Tigre'),\r
+('tir', 'ltr', 'ti', 'Tigrinya'),\r
+('tiv', 'ltr', '', 'Tiv'),\r
+('tkl', 'ltr', '', 'Tokelau'),\r
+('tlh', 'ltr', '', 'Klingon'),\r
+('tli', 'ltr', '', 'Tlingit'),\r
+('tmh', 'ltr', '', 'Tamashek'),\r
+('tog', 'ltr', '', 'Tonga(Nyasa)'),\r
+('ton', 'ltr', 'to', 'Tonga(TongaIslands)'),\r
+('tpi', 'ltr', '', 'TokPisin'),\r
+('tsi', 'ltr', '', 'Tsimshian'),\r
+('tsn', 'ltr', 'tn', 'Tswana'),\r
+('tso', 'ltr', 'ts', 'Tsonga'),\r
+('tuk', 'ltr', 'tk', 'Turkmen'),\r
+('tum', 'ltr', '', 'Tumbuka'),\r
+('tup', 'ltr', '', 'Tupilanguages'),\r
+('tur', 'ltr', 'tr', 'Turkish'),\r
+('tut', 'ltr', '', 'Altaic(Other)'),\r
+('tvl', 'ltr', '', 'Tuvalu'),\r
+('twi', 'ltr', 'tw', 'Twi'),\r
+('tyv', 'ltr', '', 'Tuvinian'),\r
+('udm', 'ltr', '', 'Udmurt'),\r
+('uga', 'ltr', '', 'Ugaritic'),\r
+('uig', 'ltr', 'ug', 'Uighur'),\r
+('ukr', 'ltr', 'uk', 'Ukrainian'),\r
+('umb', 'ltr', '', 'Umbundu'),\r
+('und', 'ltr', '', 'Undetermined'),\r
+('urd', 'ltr', 'ur', 'Urdu'),\r
+('uzb', 'ltr', 'uz', 'Uzbek'),\r
+('vai', 'ltr', '', 'Vai'),\r
+('ven', 'ltr', 've', 'Venda'),\r
+('vie', 'ltr', 'vi', 'Vietnamese'),\r
+('vol', 'ltr', 'vo', 'VolapÂÂ\81k'),\r
+('vot', 'ltr', '', 'Votic'),\r
+('wak', 'ltr', '', 'Wakashanlanguages'),\r
+('wal', 'ltr', '', 'Walamo'),\r
+('war', 'ltr', '', 'Waray'),\r
+('was', 'ltr', '', 'Washo'),\r
+('wen', 'ltr', '', 'Sorbianlanguages'),\r
+('wln', 'ltr', 'wa', 'Walloon'),\r
+('wol', 'ltr', 'wo', 'Wolof'),\r
+('xal', 'ltr', '', 'Kalmyk'),\r
+('xho', 'ltr', 'xh', 'Xhosa'),\r
+('yao', 'ltr', '', 'Yao'),\r
+('yap', 'ltr', '', 'Yapese'),\r
+('yid', 'ltr', 'yi', 'Yiddish'),\r
+('yor', 'ltr', 'yo', 'Yoruba'),\r
+('ypk', 'ltr', '', 'Yupiklanguages'),\r
+('zap', 'ltr', '', 'Zapotec'),\r
+('zen', 'ltr', '', 'Zenaga'),\r
+('zha', 'ltr', 'za', 'Zhuang'),\r
+('znd', 'ltr', '', 'Zande'),\r
+('zul', 'ltr', 'zu', 'Zulu'),\r
+('zun', 'ltr', '', 'Zuni'),\r
+('zxx', 'ltr', '', 'Nolinguisticcontent');\r
+\r
+# insert the default theme\r
+INSERT INTO `themes` VALUES ('AFrame', '0.1', 'default', NOW(), 'This is the default AFrame theme and cannot be deleted as other themes inherit from it. Please do not alter this theme directly as it would complicate upgrading. Instead, create a new theme derived from this one.', 2);\r
+\r
+# insert privileges, user groups and user group privileges\r
+INSERT INTO `privileges` (`privilege_id`, `title_var`, `description`, `create_date`, `link`, `menu_sequence`, `open_to_public`) VALUES (1, 'home', 'Home', NOW(), 'home/index.php', 10, 1);\r
+INSERT INTO `privileges` (`privilege_id`, `title_var`, `description`, `create_date`, `link`, `menu_sequence`, `open_to_public`) VALUES (2, 'system', 'System configuration..', NOW(), 'system/index.php', 20, 0);\r
+INSERT INTO `privileges` (`privilege_id`, `title_var`, `description`, `create_date`, `link`, `menu_sequence`, `open_to_public`) VALUES (3, 'users', 'User management: Create, edit, delete users.', NOW(), 'user/index.php', 30, 0);\r
+INSERT INTO `privileges` (`privilege_id`, `title_var`, `description`, `create_date`, `link`, `menu_sequence`, `open_to_public`) VALUES (4, 'language', 'Language management: Create, edit, delete, enable, disable languages.', NOW(), 'language/index.php', 40, 0);\r
+INSERT INTO `privileges` (`privilege_id`, `title_var`, `description`, `create_date`, `link`, `menu_sequence`, `open_to_public`) VALUES (5, 'translation', 'Translation: Translate all Transformable terms into other languages.', NOW(), 'translation/index.php', 50, 0);\r
+INSERT INTO `privileges` (`privilege_id`, `title_var`, `description`, `create_date`, `link`, `menu_sequence`, `open_to_public`) VALUES (6, 'updater', 'Updater: Install, create, edit updates.', NOW(), 'updater/index.php', 60, 0);\r
+INSERT INTO `privileges` (`privilege_id`, `title_var`, `description`, `create_date`, `link`, `menu_sequence`, `open_to_public`) VALUES (7, 'profile', 'Profile management: Edit profile, change password or email.', NOW(), 'profile/index.php', 70, 0);\r
+\r
+INSERT INTO `user_groups` (`user_group_id`, `title`, `description`, `create_date`) VALUES (1, 'Administrator', 'Administrate users, user groups, languages and updates.', now());\r
+INSERT INTO `user_groups` (`user_group_id`, `title`, `description`, `create_date`) VALUES (2, 'User', 'Regular user.', now());\r
+INSERT INTO `user_groups` (`user_group_id`, `title`, `description`, `create_date`) VALUES (3, 'Translator', 'Translate AFrame terms into a foreign lanugage.', now());\r
+\r
+INSERT INTO `user_group_privilege` (`user_group_id`, `privilege_id`) VALUES (1, 1);\r
+INSERT INTO `user_group_privilege` (`user_group_id`, `privilege_id`) VALUES (1, 2);\r
+INSERT INTO `user_group_privilege` (`user_group_id`, `privilege_id`) VALUES (1, 3);\r
+INSERT INTO `user_group_privilege` (`user_group_id`, `privilege_id`) VALUES (1, 4);\r
+INSERT INTO `user_group_privilege` (`user_group_id`, `privilege_id`) VALUES (1, 5);\r
+INSERT INTO `user_group_privilege` (`user_group_id`, `privilege_id`) VALUES (1, 6);\r
+INSERT INTO `user_group_privilege` (`user_group_id`, `privilege_id`) VALUES (1, 7);\r
+INSERT INTO `user_group_privilege` (`user_group_id`, `privilege_id`) VALUES (2, 1);\r
+INSERT INTO `user_group_privilege` (`user_group_id`, `privilege_id`) VALUES (2, 7);\r
+INSERT INTO `user_group_privilege` (`user_group_id`, `privilege_id`) VALUES (3, 1);\r
+INSERT INTO `user_group_privilege` (`user_group_id`, `privilege_id`) VALUES (3, 4);\r
+INSERT INTO `user_group_privilege` (`user_group_id`, `privilege_id`) VALUES (3, 5);\r
+INSERT INTO `user_group_privilege` (`user_group_id`, `privilege_id`) VALUES (3, 7);\r
+\r
diff --git a/docs/install/db/language_text.sql b/docs/install/db/language_text.sql
new file mode 100644 (file)
index 0000000..8271e00
--- /dev/null
@@ -0,0 +1,320 @@
+# Table structure for table 'language_text'
+#
+
+CREATE TABLE `language_text` (
+  `language_code` varchar(5) NOT NULL default '',
+  `variable` varchar(30) NOT NULL default '',
+  `term` varchar(50) NOT NULL default '',
+  `text` blob NOT NULL,
+  `revised_date` datetime NOT NULL default '0000-00-00 00:00:00',
+  `context` text NOT NULL,
+  PRIMARY KEY  (`language_code`,`variable`,`term`)
+) TYPE=MyISAM;
+
+INSERT INTO `language_text` VALUES ('eng', '_template','aframe','AFrame',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','login','Login',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','register','Register',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','registration','Registration',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','required_field_text','<div class=\"required\" title=\"Required Field\">*</div> indicates required fields.',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','login_name','Login Name',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','20_max_chars','20 character maximum',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','15_max_chars','15 character maximum',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','contain_only','May contain only letters, numbers, underscores, hyphens or periods.',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','password','Password',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','combination','Use a combination of letters, numbers and symbols',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','password_again','Password Again',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','email_address','Email Address',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','first_name','First Name',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','last_name','Last Name',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','cancel','Cancel',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','copyright','Web site engine\'s code is copyright &copy; 2009',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','web_service_api','Web Service API',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','lesson_builder','Lesson Builder',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','logout','Logout',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','welcome','Welcome',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','profile','Profile',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','options','Options',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','input','Input',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','search','Search',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','web_service_id','Web Service ID',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_REGISTER_SUCCESS','You have registered successfully. Your web service ID is %s. This ID must be presented when using web service. This ID can always be retrieved from \"Profile\" page.',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_template','edit_profile','Edit Profile',now(),'');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_CONFIRM_DELETE_ITEM','Are you sure you want to delete the following items? <strong>%s</strong>','2009-03-17 15:19:54','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_CONFIRM_DELETE_LANG','Are you sure you want to delete the language (<strong>%s</strong>)?','2009-02-23 15:13:50','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_CONFIRM_DELETE_MYOWN_UPDATE','Are you sure you want to <strong>delete</strong> update <strong>%s</strong>?','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_CONFIRM_DELETE_USER','Are you sure you want to delete the following users? <strong>%s</strong>','2009-02-06 11:58:02','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_CONFIRM_DELETE_USER_GROUP','Are you sure you want to delete the following user groups? <strong>%s</strong>','2009-02-12 15:08:53','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_ACCOUNT_DISABLED','That account has been disabled.','2009-01-08 11:43:51','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_CANNOT_CONNECT','Cannot connect to URL: %s','2009-04-22 09:26:45','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_CANNOT_DEL_DEFAULT_LANG','Cannot delete default language <strong>%s</strong>. The system cannot run properly without it.','2009-02-23 15:47:44','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_CANNOT_UNZIP','Can NOT unzip the uploaded file.','2009-06-22 14:49:02','error msg');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_CHOOSE_ACTION','Please choose action for file <strong>%s</strong>','2009-06-22 14:49:02','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_CHOOSE_UNINSTALLED_UPDATE','Please choose an uninstalled update.','2009-06-22 14:49:02','Updater: error msg');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_CONFIRM_BAD','Your email address and account could not be confirmed.','2009-01-14 14:40:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_DB_NOT_UPDATED','Information could not be added to the database.','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMAIL_EXISTS','An account with that email address already exists.','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMAIL_INVALID','Email address was invalid.','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMAIL_NOT_FOUND','No account found with that email address.','2009-01-14 14:40:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMPTY_FIELDS','The following required field(s) are empty:<br />\r\n%s.','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMPTY_FIELD','Field cannot be empty. Data is not saved.','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMPTY_SESSIONID','Empty Session ID.','2009-03-03 13:44:57','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMPTY_USER','Empty user.','2009-03-03 13:44:57','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_EMPTY_WEB_SERVICE_ID','Empty web service ID.','2009-03-04 14:53:18','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_FIRST_LAST_NAME_UNIQUE','First, second, and last names combination must be unique.','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_INVALID_FORMAT','Invalid format.','2009-03-03 13:44:57','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_INVALID_LOGIN','Invalid login/password combination.','2009-01-08 11:43:51','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_INVALID_SESSION','Invalid session.','2009-03-03 13:44:57','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_INVALID_WEB_SERVICE_ID','Invalid web service ID.','2009-03-04 14:49:59','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_LANG_EMPTY','The text for this language has not been translated yet.','2009-02-24 13:57:01','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_LANG_EXISTS','The language you are trying to create already exists.','2009-02-24 09:20:45','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_LANG_WRONG_VERSION','The language pack you are trying to import is not compatible with this version of AFrame.','2009-02-24 13:58:25','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_LOGIN_CHARS','Your Login Name must only contain letters, numbers, periods, or underscores (_\'s).','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_LOGIN_EXISTS','That login already exists, please choose another.','2009-01-09 11:34:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_NOT_LOCALHOST','Sorry, the IP address of localhost is not public. For security reasons, validating resources located at non-public IP addresses has been disabled in this service.','2009-04-22 09:26:45','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_NO_ACTION_SELECTED','No action selected.','2009-02-04 15:31:02','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_NO_ITEM_SELECTED','You must select an item before using a button.','2009-02-04 15:31:02','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_PAGE_NOT_FOUND','Page (%s) cannot be found','2008-12-12 13:28:09','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_PASSWORD_CHARS','The password must contain letters, numbers, and symbols.','2009-01-09 13:41:06','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_PASSWORD_LENGTH','Password must be at least 8 characters long.','2009-01-09 13:41:06','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_PASSWORD_MISMATCH','Passwords did not match.','2009-01-09 13:41:06','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_REMOVE_WRITE_PERMISSION','Please remove write permission from the listed files.','2009-06-22 14:49:02','error msg');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_SELECT_ONE_ITEM','Only <em>one</em> item must be selected.','2009-02-04 15:31:02','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_SENDING_ERROR','There was an error sending the email message.','2009-01-16 13:14:08','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_UPDATE_ALREADY_INSTALLED','The selected update is already installed.','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_UPDATE_DEPENDENCY','Due to update dependency, please install the listed updates before installing this update: %s','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_UPDATE_XML_NOT_FOUND','Update XML file is not found.','2009-06-22 14:49:02','error msg');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_ERROR_WRONG_PASSWORD','Incorrect password.','2009-01-16 10:29:47','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_ACCOUNT_CONFIRMED','Account has been confirmed.','2009-01-14 14:40:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_ACTION_COMPLETED_SUCCESSFULLY','Action completed successfully.','2009-01-16 11:29:41','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_CANCELLED','Successfully cancelled without any changes.','2009-01-14 14:40:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_CHANGE_TO_SAME_EMAIL','The email address is same as what you currently have.','2009-01-16 11:54:46','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_CONFIRMATION_SENT','An email confirmation message has been sent.','2009-01-14 14:40:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_CONFIRM_EMAIL2','An email with instructions on retrieving your password has been sent.','2009-01-16 13:14:08','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_CONFIRM_GOOD','Your email address has been confirmed successfully.','2009-01-14 14:40:42','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_IMPORT_LANG_SUCCESS','New language was successfully imported.','2009-02-24 13:58:25','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_LOGIN_SUCCESS','You have logged in successfully.','2009-01-08 11:43:51','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_LOGOUT','You have successfully been logged out.','2009-01-08 09:38:14','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_ONLY_ENGLISH','Only English language is defined in the system. There is no foreign languages to translate.','2009-02-18 11:52:10','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_PASSWORD_CHANGED','Password changed successfully.','2009-01-16 10:35:40','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_PROFILE_UPDATED','Your Profile was successfully updated.','2009-01-15 10:59:58','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_REGISTER_SUCCESS','You have registered successfully. Your web service ID is %s. This ID must be presented when using web service. This ID can always be retrieved from \"Profile\" page.','2009-03-04 13:30:45','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_REG_THANKS_CONFIRM','Thank-you for registering. Please follow the instructions in the email we sent you on how to confirm your account. You will need to confirm your account before you can login.','2009-01-09 14:07:11','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_UPDATE_CREATED_SUCCESSFULLY','The update has been created successfully.','2009-06-22 14:49:02','Updater: feedback msg');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_FEEDBACK_UPDATE_INSTALLED_SUCCESSFULLY','The update has been installed successfully.','2009-06-22 14:49:02','Updater: feedback msg');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_ADD_EDIT_LANGUAGE','<h2>Add/Edit Language</h2>\r\n\r\n     <p>Adding and Editing the language properties allows users to change the following:\r\n <ul>\r\n                <li>Language Code (3 digit ISO-639-2 language code)</li>\r\n            <li>Locale (two letter abritrary code to represent a variation of a language)</li>\r\n          <li>Character Set (should always be UTF-8)</li>\r\n             <li>Regular Expression (leave blank)</li>\r\n           <li>Language name translated</li>\r\n           <li>Language name in English</li>\r\n           <li>Status (enabled/disabled)</li>\r\n  </ul>\r\n       </p>\r\n        <p>When \"Status\" is set to enabled, the language is displayed in the selector at the bottom of AFrame pages, which allows users to switch to this language.</p>\r\n','2009-04-15 09:46:37','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_CHANGE_EMAIL','<h2>Change Email</h2>\r\n<p>This page allows users to change email addresses. </p>\r\n','2009-04-15 09:47:18','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_CHANGE_PASSWORD','<h2>Change Password</h2>\r\n<p>This page allows users to change passwords. The form authenticates users by checking their old password first, and then setting a new password and typing it again.</p>\r\n','2009-04-15 09:53:55','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_CREATE_EDIT_USER ','<h2>Create/Edit User</h2>\r\n\r\n<p>All fields on \"Create User\" and \"Edit User\" forms are required. Most fields are self-explanatory. When the \"Account Status\" field is set to disabled, the user is not able to login. </p>\r\n<p>User accounts can also be created by individuals using the Registration form available through the public pages of AFrame. The accounts created via the Registration form are automatically set to user group \"Regular User\". </p>','2009-06-04 13:00:03','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_CREATE_EDIT_USER_GROUP','<h2>Create/Edit User Group</h2>\r\n\r\n<p>All fields are relatively self-explanatory.</p>\r\n\r\n<p>There are six privileges provided by AFrame. Privileges are fixed and not changeable.\r\n     <dl>\r\n                <dt>Home</dt>\r\n               <dd>This is where user implements own functions.</dd>\r\n               <dt>User Management</dt>\r\n            <dd>Create, edit, delete users.</dd>\r\n                <dt>Language Management</dt>\r\n                <dd>Create, edit, delete, enable, disable languages.</dd>\r\n           <dt>Translation</dt>\r\n                <dd>Translate all AFrame terms into languages other than English, or edit existing English text.</dd>\r\n               <dt>Profile Management</dt>\r\n         <dd>Edit profile, change password or email.</dd>\r\n    </dl>\r\n</p>','2009-06-04 13:05:21','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_CREATE_UPDATE','<h2>Creating Update</h2>\r\n\r\n<p>If you happen to come across a bug you can fix, or have a new feature you would like added to the AFrame public distribution, you can use Create Update to put your changes into a form that can be easily added to the AFrame public code. Or, if you have a feature you are adding to one AFrame installation that you would like to have added to another, Create Update is ideal for reproducing your feature across installations. If you are creating new features that are not going to become part of the AFrame public source code, you can build them into a update so they can be reapplied from version to version as you upgrade your AFrame system. Creating updates does require knowledge of PHP, and of SQL if you plan on creating a update that changes the AFrame database. Please refer to the appropriate documentation for information on PHP and SQL. <p>\r\n\r\n<dl>\r\n       <dt>AFrame Update ID</dt>\r\n   <dd>The update id you give to your update must be different from all updates available for the particular version of AFrame it applies to. It is suggested you prefix your updates with a special identifier that represents the author or the authoring organization. If for example the University of Toronto is creating the update, a update ID might look like \"uoft_0002.\"</dd>\r\n     <dt>AFrame Version to Apply</dt>\r\n    <dd>This needs to be the exact version number of the AFrame version the update applies to (e.g 1.6). including any minor version numbers (e.g 1.6.1.2)  The exact version number can be found on the Administrator open screen under \"Statistics and Information.\" In most cases when applying a update created for an older version of AFrame, the \"AFrame version to Apply\" will need to be adjusted. Or, this can be adjusted manually in the patch.xml file included with the source code of the update.\r\n    </dd>\r\n       <dt>Description</dt>\r\n        <dd>This should be a detailed description of what the update does. Example might include \"fixes problem uploading files to filemanager\" for a bug fix, or \"added a timer function to tests\" for an added feature, or \"removes registration tab\" for a feature adjustment, etc. Include enough detail so those applying the update understand exactly what it will do..</dd>\r\n   <dt>SQL Statement</dt>\r\n      <dd>This optional field can be used to insert SQL commands which modify the AFrame database. It might be used to write an SQL statement to modify and existing table, such as changing a data type, or a field size, or to add or remove an field. It can also be used to insert SQL that generates a new table for a new feature created by a update, or it can be used to insert data into a table used by a feature created by the update. Any SQL can be included in this field. Be careful when running SQL, that that SQL is not going to interfere with upgrade SQL. If you are changing table structures and those same tables are being altered during an upgrade, the upgrade may fail.</dd>\r\n      <dt>Dependant Updates</dt>\r\n  <dd>It is common for later updates to require changes from earlier updates before they can be installed. If this is the case for the update you are creating, enter the update IDs into the Dependant Update ID field. Click on Add Dependent Update if additional dependencies are required. Be sure to check the updates on the opening screen of the Updater to see if the file you are modifying with your update is  being modified by an update.AFrame.ca update. If they are modifying the same files, you may need to include the ID numbers for those updates in the Dependant Updates for the update your are creating.</dd>\r\n      <dt>Files</dt>  \r\n    <dd>This area is where most AFrame updates are created. Click on <strong>Add File</strong>  to generate a update block. A update block can include one of four actions on the file being modified, as described below. As many update blocks as required can be added to a update. </dd>\r\n            <dl>\r\n        <dt>Add File</dt>\r\n   <dd>The <strong>Add</strong> action can be used to add a new file to AFrame. This action is often used in conjuction with other update blocks that alter or delete files, to add a replacement file for one deleted, or to perhaps add a required or include file needed by a modified section in the file being changed. In the <strong>File Name</strong> field enter the file name to be assigned to the file when it is installed. In the <strong>Directory</strong> field enter the <i>relative path</i> from the AFrame root directory in which the modified file is or will exist. Select  from <strong>Upload File</strong> using the Browse button to locate the file in your local computer\'s file system. Note that the upload file can have any name. It will be renamed to the file name listed in the File Name field when it is installed.</dd>\r\n     <dt>Alter File</dt>\r\n <dd>This option is used when you wish to make changes to a piece of code within an existing source code file. In the <strong>File Name</strong> field enter the name of the file in the AFrame source code that will be altered. In the <strong>Directory</strong> field enter the relative path to the directory in which the to be alter file exists, relative to the AFrame root directory. In the <strong>Code To Replace From</strong> field copy the code from the original file the will be replaced, or appended to, and in the <strong>Code To Replace To</strong> field enter to code that will replace the code above in the <i>From</i> field. Or, if you are adding code instead of replacing code, include the code from the field above so it gets added back if you are only using that code as a way of identifying a location in the file where new code is being added.</dd>\r\n     <dt>Delete File</dt>\r\n        <dd>This option will remove files from AFrame. In the <strong>File Name</strong>  field enter the name of the file to be deleted. In the <strong>Directory</strong> field enter the path to the directory in which the to be delete file exists, relative to the root directory of the AFrame installation. </dd>\r\n   <dt>Overwrite File</dt>\r\n     <dd>This option is used to replace an existing file in AFrame with a new one. In the <strong>File Name</strong>  field enter the name of the file to be replaced. In the <strong>Directory</strong> field enter the path to the directory in which the to be replaced file exists, relative to the root directory of the AFrame installation. In the <strong>Upload File</strong> field use the Browse button to choose a file from your local computer to replace the specified file. The upload file may be named anything. It will be renamed to the file it is replacing when the update is installed.</dd>\r\n     </dl>\r\n       <dt>Create Update</dt>\r\n      <dd>Click on this button to build the update into a downloadable zip file. This zip file can then be uploaded in the Upload field on the main Updater screen to apply a update to a system.</dd>\r\n    <dt>Save Update</dt>\r\n        <dd>Click on this button to save the developing update to the AFrame database for future reference. Though it is not required, you should save a copy of the update in this way, so it can be retrieved and edited if necessary. Or, if a update takes more than a single sitting to build, you can save it, then retrieve it later to continue.</dd>\r\n       <dt>Cancel</dt>\r\n     <dd>Press this button to ignore the latest changes to the update, and return to My Own Updates Screen.</dd>\r\n\r\n</dl>','2009-06-22 15:32:56','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_LANGUAGE','<h2>Language Management</h2>\r\n\r\n    <p>AFrame can be displayed in many different languages! Through the Language Manager language packs can be selected and imported.</p>\r\n\r\n<h3>Managing Existing Languages</h3>\r\n   <p>Installed languages can be edited, deleted, or exported as an AFrame language pack for redistribution. When exporting a language, a download prompt will appear asking to download a zip file of the language pack.</p>\r\n  <p>Note that the English language (language code: eng) cannot be deleted. This is the base language pack that ensures AFrame runs properly. When other languages are installed, users can disable it if they don\'t want AFrame to be displayed in English.</p>\r\n     \r\n<h3>Importing Languages</h3>\r\n    <p>Language packs can be imported by retreiving the package and then importing it into AFrame.</p>\r\n  <ol>\r\n                <li>Visit <a href=\"http://www.atutor.ca/aframe/translate/index.php\" target=\"_new\">AFrame Language Packs</a> to download one of the available language packs for your version.</li>\r\n              <li>Use the <code>Browse...</code> button to find the downloaded language pack.</li>\r\n                <li>Use the <code>Import</code> button to import the language.</li>\r\n </ol>\r\n\r\n   <p>You can contribute to the AFrame community by exporting a language pack from your AFrame installation, and attaching it to a message in the atutor.ca <a href=\"http://atutor.ca/forum/4/1.html\">Translation Forum</a>. Also see the <a href=\"http://atutor.ca/atutor/docs/translate.php\">Translator Documentation</a> for further details about translating AFrame.</p>','2009-06-04 13:08:15','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_LOGIN','<h2>Login</h2>\r\n\r\n<p>A user may login to AFrame with their Login Name or Email address, and the Password entered during <a href=\"../register.php\">registration</a>. Logging in gives users access to use more functions provided to regular user.</p>\r\n','2009-04-15 09:51:28','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_PASSWORD_REMINDER','<h2>Forgot Your Password</h2>\r\n\r\n<p>If you have forgotten your password, use the <em>Forgot your password?</em> link on the Login screen. The form will email the login name to you, along with a link you must follow to change your password.</p>\r\n','2009-04-15 09:51:37','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_PROFILE','<h2>Profile</h2>\r\n<p>This section allows a user to change elements of his/her personal profile.</p>\r\n\r\n<p>Although the login name cannot be altered, password, email address, and other personal information are editable.</p>\r\n','2009-04-15 09:51:47','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_REGISTRATION','<h2>Register</h2>\r\n\r\n<p>In order for a user to login to the AFrame system and save results from accessibility reviews, manage translate or administer the system, a unique system account needs to be created.  Use the <em>Register</em> link on the login screen to access the registration form. If email-confirmation has been enabled by the system administrator, a message will be sent to the email address entered, containing a link that must be followed to confirm the new account. Once this has been done, the login name or email address, and the password entered during registration can now be used on the <a href=\"../login.php\">Login</a> screen.</p>','2009-04-15 09:52:02','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_TRANSLATION','<h2>Translation</h2>\r\n\r\n <p>All fields are self-explanatory. Note that language drop down box lists all the languages defined in the current installation of AFrame, no matter the language status (enabled or disabled). If you are translating a new language for AFrame, first define the language using the Language management tool\'s Add Language feature. If you do not have access to the Language management tools, ask your AFrame administrators to add the language.</p>\r\n\r\n<p>You can contribute to the AFrame community by exporting a language pack from your AFrame installation, and attaching it to a message in the atutor.ca <a href=\"http://atutor.ca/forum/4/1.html\">Translation Forum</a>. Also see the <a href=\"http://atutor.ca/atutor/docs/translate.php\">Translator Documentation</a> for further details about translating AFrame.</p>','2009-06-04 13:17:38','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_UPDATER','<h2>Updater</h2>\r\n     <p>The Updater was introduce in AFrame 1.6 to allow administrators to update their systems with feature adjustments, security fixes, and other AFrame code changes in between AFrame releases. The Updater is included as a standard module with AFrame 1.6.1+, and installs as an extra module for 1.6.</p>\r\n<dl>\r\n        <dt>The Update List</dt>\r\n    <dd>On the opening screen of the Updater will appear a list of updates available for the version of AFrame you are using, along with a description of each update.  This list is retrieved from update.atutor.ca, as are the updates themselves, so you must be connected to the Internet. Updates are retrieved from update.atutor.ca by AFrame and applied as necessary. </dd>\r\n    <dt>File Permissions</dt>\r\n   <dd>In most cases you will be asked to temporarily grant write permission to the files that need to be updated or replaced, then once the update has been applied, you will be asked to change the permissions back to read only. It is important that you follow the instructions after updates have been applied, otherwise you run the risk of opening a security hole. \r\n </dd>\r\n       <dt>Types of Updates</dt>\r\n   <dd>Updates come in various forms. Some updates replace code in a file with new code. Others replace a file with a new file.  Others may do both on multiple files and multiple code changes. Other updates delete files that are no longer required.</dd>\r\n  <dt>Required and Non-Required Updates</dt>\r\n  <dd>In most cases you will want to install updates in the order they appear in the update list, but not all updates are required updates.  Some feature updates can be ignored if you do not need the features they would add or modify on your system. Other updates will have dependencies, requiring the administrator to install earlier updates before installing a later one. You will be prompted to install previous updates if there are dependencies.</dd>\r\n        <dt>Checks and File Backups</dt>\r\n    <dd>If you have made changes to a file the Updater wishes to change,  you will be prompted to continue or not. The updater compares your local file with the same file in the AFrame code repository, and if they differ the prompt will display. In many cases  the Updater can apply updates without changing the code you have modified, but if the code to be replaced was modified, the update will fail, or if the update replaces a file, your changes will be lost. In all cases the updater will create a backup of the files that were modified, identified by the filename plus the update number added as a suffix. Rename the file to its original name to restore that file back to its original state. You can list these files by clicking the view messages button next to the update listing after the update is installed. After you have confirmed that the updates were applied and are working properly, it is safe to delete the backup files, though it does not hurt to keep them around. </dd>\r\n    <dt>Private Updates</dt>\r\n    <dd>In some cases private updates can be applied by uploading a update file through the upload form below the update list.  Private updates are often those used to apply changes that are not being applied to the AFrame default source code, or to apply custom features, or to share updates between users, etc. When uploading a update, be sure the update id, defined in the patch.xml file, is unique . </dd>\r\n</dl>','2009-06-22 15:37:42','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_USER','<h2>User Management</h2>\r\n\r\n    <p>This section allows administrators to manage all user accounts. Each user belongs to a user group to which privileges are assigned.</p>\r\n\r\n<p>There are three types of default user groups that are created when AFrame is installed. These are described below along with the default privileges associated with each groups. \r\n      <dl>\r\n                <dt>Administrator</dt>\r\n              <dd>Administrators have privileges to use the Home, manage users, languages and manage their own profile.</dd>\r\n              <dt>Regular User</dt>\r\n               <dd>Regular users have privileges to use the Home and manage their own profile.</dd>\r\n                <dt>Translator</dt>\r\n         <dd>Translators have privileges to use the Home, translate AFrame terms from English to other languages, and to manage their own profile. The languages that can be used in the system are defined by users who have \"Language Management\" privileges.</dd>\r\n       </dl>\r\n</p>\r\n\r\n<h3>Creating User Accounts</h3>\r\n\r\n<p>The users who belong to a group that has \"User Management\" privileges can manually add users to the system by using <em>Create User</em>.</p>\r\n<p>User accounts can also be created by individuals using the Registration form available through the public pages of AFrame. The accounts created via the Registration form are automatically set to user group \"Regular User\". </p>\r\n\r\n<h3>User Group</h3>\r\n\r\n<p><em>User Group</em> is used to create new user groups and edit existing user groups.</p>','2009-06-04 12:55:56','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_USER_GROUP ','<h2>User Group</h2>\r\n\r\n<p>The User Group section allows administrators to manage user groups. User groups define the privileges that are granted to the users who are members of a group. Note that \"Administrator\" and \"Regular User\" groups can not  be deleted. They must exist for AFrame\'s proper operations. All other groups are optional.</p>\r\n\r\n<p>There are three default user groups in AFrame. Below is a description of the default privileges that are granted to each group. The privileges in user groups are editable by users who are a member of a group that has the \"User Management\" privilege.\r\n<dl>\r\n<dt>Administrator</dt>\r\n<dd>Administrators have privileges to use the Home, manage users, languages and manage their own profile.</dd>\r\n<dt>Regular User</dt>\r\n<dd>Regular users have privileges to use the Home and manage their own profile. </dd>\r\n<dt>Translator</dt>\r\n<dd>Translators have privileges to use the Home, translate AFrame terms from English to other languages, and to manage their own profile. The languages that can be used in the system are defined by users who have \"Language Management\" privileges.</dd>\r\n</dl>\r\n</p>','2009-06-04 13:04:37','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_HELP_USER_PASSWORD ','<h2>Change Password</h2>\r\n\r\n<p>All fields are required and self-explanatory. Once the new password is set successfully, an email notification is sent to the user.</p>\r\n','2009-04-15 09:53:11','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_INFOS_INVALID_USER','You must <a href=\"login.php\">login</a> to use this section.','2009-01-15 16:13:14','');
+INSERT INTO `language_text` VALUES ('eng', '_msgs','AF_INFOS_UPDATE_INSTALLED_AND_REMOVE_PERMISSION','The update has been installed. Please remove write permission as instruction.','2009-06-22 14:49:02','Updater: info msg');
+INSERT INTO `language_text` VALUES ('eng', '_template','15_max_chars','8 characters minimum, 15 characters maximum','2009-01-09 10:16:38','');
+INSERT INTO `language_text` VALUES ('eng', '_template','20_max_chars','20 character maximum','2009-01-09 10:16:38','');
+INSERT INTO `language_text` VALUES ('eng', '_template','aframe_documentation','AFrame Documentation','2009-06-16 10:25:25','');
+INSERT INTO `language_text` VALUES ('eng', '_template','aframe_handbook','AFrame Handbook','2009-01-28 15:28:06','');
+INSERT INTO `language_text` VALUES ('eng', '_template','aframe_version_to_apply','AFrame Version to Apply','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','aframe_whatis','AFrame provides a basic frame to build an application. It has build-in functions to support multiple languages, translation, user/user group managment, updater and user profile managment.','2009-05-29 08:55:24','');
+INSERT INTO `language_text` VALUES ('eng', '_template','copyright','Web site engine\'s code is copyright &copy; 2009','2009-05-25 10:57:43','');
+INSERT INTO `language_text` VALUES ('eng', '_template','add','Add','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','add_a_file','Add A File','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','add_dependent_update','Add A Dependent Update','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','add_edit_group','Add/Edit Group','2009-04-08 15:20:56','');
+INSERT INTO `language_text` VALUES ('eng', '_template','add_edit_language','Add/Edit Language','2009-02-23 13:27:38','');
+INSERT INTO `language_text` VALUES ('eng', '_template','add_language','Add Language','2009-02-18 15:56:02','');
+INSERT INTO `language_text` VALUES ('eng', '_template','add_privileges','Add Privileges','2009-02-17 09:45:53','');
+INSERT INTO `language_text` VALUES ('eng', '_template','all','All','2008-11-27 09:49:41','');
+INSERT INTO `language_text` VALUES ('eng', '_template','alter','Alter','2009-06-22 14:49:02','');
+INSERT INTO `language_text` VALUES ('eng', '_template','available_updates','Available Updates','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','calendar','Calendar','2009-04-06 10:43:09','');
+INSERT INTO `language_text` VALUES ('eng', '_template','cancel','Cancel','2009-01-09 10:29:35','');
+INSERT INTO `language_text` VALUES ('eng', '_template','change_email','Change Email','2009-01-15 11:29:34','');
+INSERT INTO `language_text` VALUES ('eng', '_template','change_password','Change Password','2009-01-15 11:29:34','');
+INSERT INTO `language_text` VALUES ('eng', '_template','charset','Character Set','2009-02-20 11:43:44','');
+INSERT INTO `language_text` VALUES ('eng', '_template','choose_lang','Choose a language to translate','2008-11-26 10:11:15','');
+INSERT INTO `language_text` VALUES ('eng', '_template','close_popup','Close Popup','2009-01-28 15:28:06','');
+INSERT INTO `language_text` VALUES ('eng', '_template','code_to_replace_from','Code To Replace From','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','code_to_replace_to','Code To Replace To','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','combination','Use a combination of letters, numbers and symbols','2009-01-09 10:16:38','');
+INSERT INTO `language_text` VALUES ('eng', '_template','confirm_delete','Are you sure you want to delete these records?','2009-04-09 11:29:46','');
+INSERT INTO `language_text` VALUES ('eng', '_template','contain_only','May contain only letters, numbers, underscores, hyphens or periods.','2009-01-09 10:16:38','');
+INSERT INTO `language_text` VALUES ('eng', '_template','continue','Continue','2009-06-22 14:49:02','');
+INSERT INTO `language_text` VALUES ('eng', '_template','create_edit_update','Create/Edit Update','2009-06-22 14:49:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','create_edit_user','Create/Edit User','2009-02-05 10:25:08','');
+INSERT INTO `language_text` VALUES ('eng', '_template','create_edit_user_group','Create User Group','2009-02-18 11:13:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','create_update','Create Update','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','create_user','Create User','2009-01-21 15:58:32','');
+INSERT INTO `language_text` VALUES ('eng', '_template','date','Date','2009-02-27 16:07:19','');
+INSERT INTO `language_text` VALUES ('eng', '_template','date_created','Date Created','2009-02-17 12:02:27','');
+INSERT INTO `language_text` VALUES ('eng', '_template','delete','Delete','2009-01-22 16:02:07','');
+INSERT INTO `language_text` VALUES ('eng', '_template','delete_language','Delete Language','2009-02-18 15:56:02','');
+INSERT INTO `language_text` VALUES ('eng', '_template','delete_this_file','Delete This File','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','delete_update','Delete Update','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','delete_user','Delete User','2009-02-06 11:41:23','');
+INSERT INTO `language_text` VALUES ('eng', '_template','delete_user_group','Delete User Group','2009-02-12 15:08:53','');
+INSERT INTO `language_text` VALUES ('eng', '_template','dependent_updates','Dependent Updates','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','dependent_update_id','Dependent Update ID','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','dependent_update_not_installed','<br><span style=\"color: red\">Waring: Due to update dependency, please install the listed updates first: </span>','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','description','Description','2008-11-24 14:25:44','');
+INSERT INTO `language_text` VALUES ('eng', '_template','directory','Directory','2009-06-22 14:49:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','disable','Disable','2009-01-20 11:47:15','');
+INSERT INTO `language_text` VALUES ('eng', '_template','disabled','Disabled','2009-01-20 11:45:23','');
+INSERT INTO `language_text` VALUES ('eng', '_template','done','Done','2009-06-22 16:16:50','');
+INSERT INTO `language_text` VALUES ('eng', '_template','edit','Edit','2009-01-22 16:02:07','');
+INSERT INTO `language_text` VALUES ('eng', '_template','edit_function','Edit Function','2009-03-17 14:58:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','edit_profile','Edit Profile','2009-01-16 10:52:51','');
+INSERT INTO `language_text` VALUES ('eng', '_template','edit_update','Edit Update','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','email','Email','2009-02-04 11:51:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','email_address','Email Address','2009-01-09 10:40:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','email_confirmation_message','You have registered for an account on %1s. Please finish the registration process by confirming your email address by using the following link: %2s .','2009-01-14 13:25:55','');
+INSERT INTO `language_text` VALUES ('eng', '_template','email_confirmation_message2','To finish changing your account\'s email address on %1s, please confirm your email address by using the following link: %2s .','2009-01-16 11:07:44','');
+INSERT INTO `language_text` VALUES ('eng', '_template','email_confirmation_subject','Email Confirmation','2009-01-14 13:25:55','');
+INSERT INTO `language_text` VALUES ('eng', '_template','enable','Enable','2009-01-20 11:47:15','');
+INSERT INTO `language_text` VALUES ('eng', '_template','enabled','Enabled','2009-01-20 11:45:23','');
+INSERT INTO `language_text` VALUES ('eng', '_template','english_context','English Context','2008-12-01 13:18:57','');
+INSERT INTO `language_text` VALUES ('eng', '_template','english_text','English Text','2008-12-01 13:18:57','');
+INSERT INTO `language_text` VALUES ('eng', '_template','error','Error','2008-11-24 14:25:44','');
+INSERT INTO `language_text` VALUES ('eng', '_template','errors','Errors','2009-03-09 09:55:45','');
+INSERT INTO `language_text` VALUES ('eng', '_template','error_type','Error Type','2009-01-21 12:38:17','');
+INSERT INTO `language_text` VALUES ('eng', '_template','expand_add_privileges','Expand Add Privileges','2009-02-17 09:45:53','');
+INSERT INTO `language_text` VALUES ('eng', '_template','expected_result','Expected Result','2008-11-24 14:25:44','');
+INSERT INTO `language_text` VALUES ('eng', '_template','export','Export','2009-02-24 13:58:06','');
+INSERT INTO `language_text` VALUES ('eng', '_template','file','File','2009-06-22 14:49:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','files','Files','2009-06-22 14:49:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','file_name','File Name','2009-06-22 14:49:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','filter','Filter','2008-11-27 09:48:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','first_name','First Name','2009-01-09 10:40:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','get_my_update','Get My Update','2009-06-22 14:49:01','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','grant_write_permission','Please grant <strong>write</strong> permission to folders and files listed below:<p><strong>Note:</strong> To change permissions on Unix use <kbd>chmod a+rw</kbd> then the file name.</p>','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','handbook_toc','Handbook Toc','2009-01-28 15:28:06','');
+INSERT INTO `language_text` VALUES ('eng', '_template','import','Import','2009-02-18 15:56:02','');
+INSERT INTO `language_text` VALUES ('eng', '_template','import_a_new_lang','Import a New Language','2009-02-24 13:58:06','');
+INSERT INTO `language_text` VALUES ('eng', '_template','info','Information','2009-03-06 11:29:10','');
+INSERT INTO `language_text` VALUES ('eng', '_template','input','Input','2008-11-21 14:16:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','install','Install','2009-06-22 14:49:03','');
+INSERT INTO `language_text` VALUES ('eng', '_template','installed_date','Installed Date','2009-06-22 14:49:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','jump_to_content','Jump to Content','2009-05-25 10:17:46','');
+INSERT INTO `language_text` VALUES ('eng', '_template','language','Language','2009-04-14 10:35:06','');
+INSERT INTO `language_text` VALUES ('eng', '_template','lang_code','Language Code','2009-02-20 11:43:44','');
+INSERT INTO `language_text` VALUES ('eng', '_template','last_login','Last Login','2009-02-04 11:51:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','last_modified','Last Modified','2009-06-22 14:49:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','last_name','Last Name','2009-01-09 10:28:23','');
+INSERT INTO `language_text` VALUES ('eng', '_template','last_update','Last Update','2009-02-17 12:02:27','');
+INSERT INTO `language_text` VALUES ('eng', '_template','locale','Locale','2009-02-23 13:27:38','');
+INSERT INTO `language_text` VALUES ('eng', '_template','login_name_or_email','Login Name or Email','2009-01-09 10:40:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','login_text','Enter the Login Name (or email) and Password you chose at registration.<br /><br /><br />Not registered yet? <a href=\"register.php\" >Register</a> Or, <a href=\"password_reminder.php\">Forgot your password?</a><br /><br />','2009-01-29 14:24:45','');
+INSERT INTO `language_text` VALUES ('eng', '_template','logout','Logout','2009-01-08 09:31:41','');
+INSERT INTO `language_text` VALUES ('eng', '_template','msg_terms','Message Terms','2009-05-05 09:05:33','');
+INSERT INTO `language_text` VALUES ('eng', '_template','myown_updates','My Own Updates','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','na','N/A','2009-02-23 14:31:55','');
+INSERT INTO `language_text` VALUES ('eng', '_template','name','Name','2009-03-18 14:53:42','');
+INSERT INTO `language_text` VALUES ('eng', '_template','name_in_english','Language name in English','2009-02-20 11:43:44','');
+INSERT INTO `language_text` VALUES ('eng', '_template','name_in_language','Language name translated','2009-02-23 13:28:12','');
+INSERT INTO `language_text` VALUES ('eng', '_template','name_in_translated','Language name translated','2009-02-20 11:43:44','');
+INSERT INTO `language_text` VALUES ('eng', '_template','never','Never','2009-02-05 11:25:19','');
+INSERT INTO `language_text` VALUES ('eng', '_template','new_or_translated','New or Translated Terms','2008-11-27 09:48:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','new_password','New Password','2009-01-16 10:52:03','');
+INSERT INTO `language_text` VALUES ('eng', '_template','no','No','2009-01-21 12:38:17','');
+INSERT INTO `language_text` VALUES ('eng', '_template','none_found','None Found.','2009-01-21 15:06:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','not_installed','Not Installed','2009-06-22 14:49:03','');
+INSERT INTO `language_text` VALUES ('eng', '_template','no_results_found','No results found.','2009-01-21 12:38:17','');
+INSERT INTO `language_text` VALUES ('eng', '_template','overwrite','Overwrite','2009-06-22 14:49:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','password','Password','2009-01-09 10:40:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','password_again','New Password Again','2009-01-16 10:52:03','');
+INSERT INTO `language_text` VALUES ('eng', '_template','password_blurb','Enter your account\'s email address below and an email with instructions on retrieving your password will be sent to you. The email address must be the same as the one you used for registration.','2009-01-16 13:19:57','');
+INSERT INTO `language_text` VALUES ('eng', '_template','password_changed','Password Changed','2009-02-06 09:08:32','');
+INSERT INTO `language_text` VALUES ('eng', '_template','password_change_confirm','Your password on %s has been changed successfully. Go to %s to login.','2009-01-16 13:17:32','');
+INSERT INTO `language_text` VALUES ('eng', '_template','password_change_msg','Your password has been altered. Please use the information below.','2009-02-06 09:08:31','');
+INSERT INTO `language_text` VALUES ('eng', '_template','password_new_blurb','Enter a new password for your account.','2009-01-16 13:55:40','');
+INSERT INTO `language_text` VALUES ('eng', '_template','password_old','Old Password','2009-01-16 10:27:02','');
+INSERT INTO `language_text` VALUES ('eng', '_template','password_reminder','Password Reminder','2009-01-07 16:14:08','');
+INSERT INTO `language_text` VALUES ('eng', '_template','password_request2','Dear %1$s,\r\n\r\nYour login name is %1$s.\r\n\r\nTo set a new password, follow the link below.\r\n\r\n%4$s\r\n\r\n(If this link does not take you to the site, copy and paste it into the address bar of your internet browser)\r\n\r\nThe link will become invalid after %3$s days.','2009-01-16 13:05:25','');
+INSERT INTO `language_text` VALUES ('eng', '_template','privileges','Privileges','2009-02-12 14:15:23','');
+INSERT INTO `language_text` VALUES ('eng', '_template','profile','Profile','2009-01-15 10:02:55','');
+INSERT INTO `language_text` VALUES ('eng', '_template','published_date','Published Date','2009-01-21 12:38:17','');
+INSERT INTO `language_text` VALUES ('eng', '_template','register','Register','2009-01-08 09:30:56','');
+INSERT INTO `language_text` VALUES ('eng', '_template','registration','Registration','2009-01-08 15:51:23','');
+INSERT INTO `language_text` VALUES ('eng', '_template','relative_directory','Directory is relative directory to AFrame root, for example: docs/images/ or tools/tests/. Leave empty if it is AFrame root directory.','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','remove','Remove','2009-01-23 14:04:46','');
+INSERT INTO `language_text` VALUES ('eng', '_template','remove_write_permission','<span style=\"color:red\">Please <strong>REMOVE</strong> write permission on the listed folders and files for your security:</span><p><strong>Note:</strong> To remove permissions on Unix use <kbd>chmod 755</kbd> then the file name..</p>','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','repair_example','Repair Example','2008-11-24 14:25:44','');
+INSERT INTO `language_text` VALUES ('eng', '_template','replace_file','Replace File','2009-06-22 14:49:02','');
+INSERT INTO `language_text` VALUES ('eng', '_template','required_field','Required Field','2009-01-08 15:51:23','');
+INSERT INTO `language_text` VALUES ('eng', '_template','required_field_text','<div class=\"required\" title=\"Required Field\">*</div> indicates required fields.','2009-01-08 15:51:23','');
+INSERT INTO `language_text` VALUES ('eng', '_template','requirement','Requirement','2008-11-24 14:25:44','');
+INSERT INTO `language_text` VALUES ('eng', '_template','reset_filter','Reset Filter','2008-11-27 09:48:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','result','Result','2008-12-01 14:45:48','');
+INSERT INTO `language_text` VALUES ('eng', '_template','results_found','Results Found: %s','2008-11-27 09:48:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','return_to_handbook','Return to Handbook','2009-01-28 15:28:06','');
+INSERT INTO `language_text` VALUES ('eng', '_template','save','Save','2009-01-15 10:01:07','');
+INSERT INTO `language_text` VALUES ('eng', '_template','save_and_close','Save and Close','2009-04-09 11:36:31','');
+INSERT INTO `language_text` VALUES ('eng', '_template','search','Search','2009-01-28 15:28:06','');
+INSERT INTO `language_text` VALUES ('eng', '_template','search_phase','Search Phase','2008-12-01 13:18:57','');
+INSERT INTO `language_text` VALUES ('eng', '_template','search_str','Search String','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','search_text','Search for terms that contains the given string. For example, search for phase \"desc\" returns all terms that contain string \"desc\".','2008-12-02 11:06:56','');
+INSERT INTO `language_text` VALUES ('eng', '_template','select','Select','2009-02-05 14:16:51','');
+INSERT INTO `language_text` VALUES ('eng', '_template','select_all','select/unselect all','2009-01-23 14:04:46','');
+INSERT INTO `language_text` VALUES ('eng', '_template','sent_via_aframe','Sent via an AFrame system at %s','2009-01-09 14:15:29','');
+INSERT INTO `language_text` VALUES ('eng', '_template','sql_statement','SQL Statement','2009-06-22 14:49:02','');
+INSERT INTO `language_text` VALUES ('eng', '_template','status','Status','2009-01-21 12:38:52','');
+INSERT INTO `language_text` VALUES ('eng', '_template','submit','Submit','2008-12-01 13:18:57','');
+INSERT INTO `language_text` VALUES ('eng', '_template','submit_no','No','2009-01-23 11:25:56','');
+INSERT INTO `language_text` VALUES ('eng', '_template','submit_yes','Yes','2009-01-23 11:25:56','');
+INSERT INTO `language_text` VALUES ('eng', '_template','the_follow_errors_occurred','The following errors occurred:','2008-12-15 09:25:06','');
+INSERT INTO `language_text` VALUES ('eng', '_template','title','Title','2009-01-20 11:45:23','');
+INSERT INTO `language_text` VALUES ('eng', '_template','translated_context','Translated Context','2008-12-01 13:18:57','');
+INSERT INTO `language_text` VALUES ('eng', '_template','translated_terms','Translated Terms','2008-11-27 09:48:36','');
+INSERT INTO `language_text` VALUES ('eng', '_template','translated_text','Translated Text','2008-12-01 13:18:57','');
+INSERT INTO `language_text` VALUES ('eng', '_template','translate_to','Translate to','2008-12-01 13:18:57','');
+INSERT INTO `language_text` VALUES ('eng', '_template','translation','Translation','2009-02-18 11:01:39','');
+INSERT INTO `language_text` VALUES ('eng', '_template','translator','Translator','2009-01-07 15:05:34','');
+INSERT INTO `language_text` VALUES ('eng', '_template','updated_terms','Updated Terms','2008-12-02 09:16:45','');
+INSERT INTO `language_text` VALUES ('eng', '_template','updater','Updater','2009-06-22 14:49:01','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','updater_alter_modified_files','The listed files have been modified locally. If you choose to proceed, your local file will be modified. The original\nfile will be backup before the modification. Please note that the modification on your customized code may break your customization.<br>','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','updater_overwrite_modified_files','The listed files have been modified locally. If you choose to proceed, the update file will be copied to your local machine. \nYou have to manually merge this file and your local copy.<br>','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','updater_show_backup_files','Below is the list of the backup files created by update installation. After ensuring AFrame works properly with the update, you may want to delete these files. If AFrame does not work properly with the update, you can always revert back to the old files by renaming the backup files \nto the original file names,  removing the [update_id].old portion of the file name. <br>','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','updater_show_update_files','Below is the list of the update files copied to your computer. \nPlease manually merge the change between the update files and your local copy. <br>','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','updates','Updates','2009-06-22 14:49:01','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','update_dependent_update_not_installed','<br><span style=\"color: red\">Warning: There are update dependencies, please install the listed updates first: </span>','2009-06-22 14:49:03','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','update_local_file_not_exist','Cannot proceed. The listed files are not exist in your local machine. If you renamed them to your copy, in order to proceed, please rename back.<br>','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','upload','Upload','2009-06-22 14:49:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','upload_file','Upload File','2009-06-22 14:49:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','upload_update','Upload a zip file to install update:','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','user','User','2009-02-27 16:07:19','');
+INSERT INTO `language_text` VALUES ('eng', '_template','users','Users','2009-04-14 10:41:51','');
+INSERT INTO `language_text` VALUES ('eng', '_template','user_group','User Group','2009-02-04 11:51:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','user_status','User Status','2009-02-04 11:51:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','version_not_match','This update is for AFrame version %s. Does not match with your current AFrame version. The installation of it may break AFrame. Are you sure you want to proceed?','2009-06-22 14:49:02','Updater');
+INSERT INTO `language_text` VALUES ('eng', '_template','view','View','2009-01-20 11:47:15','');
+INSERT INTO `language_text` VALUES ('eng', '_template','view_message','View Message','2009-06-22 14:49:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','warning','Warning','2009-05-29 16:19:57','');
+INSERT INTO `language_text` VALUES ('eng', '_template','web_service_api','Web Service API','2009-03-13 11:56:12','');
+INSERT INTO `language_text` VALUES ('eng', '_template','web_service_id','Web Service ID','2009-03-04 13:48:23','');
+INSERT INTO `language_text` VALUES ('eng', '_template','web_site','Web Site','2009-02-06 09:08:32','');
+INSERT INTO `language_text` VALUES ('eng', '_template','welcome','Welcome','2009-01-08 09:30:56','');
+INSERT INTO `language_text` VALUES ('eng', '_template','yes','Yes','2009-01-21 12:38:17','');
+INSERT INTO `language_text` VALUES ('eng', '_template','yyyy-mm-dd','yyyy-mm-dd','2009-01-21 15:06:01','');
+INSERT INTO `language_text` VALUES ('eng', '_template','match_all_words','Match All Words','2009-02-04 11:51:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','match_any_word','Match Any Word','2009-02-04 11:51:16','');
+INSERT INTO `language_text` VALUES ('eng', '_template','next_chapter','Next Chapter','2009-01-28 15:28:06','');
+INSERT INTO `language_text` VALUES ('eng', '_template','print_version','Print Version','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','hide_contents','Hide Contents','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','previous_chapter','Previous Chapter','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','home','Home','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','term_type','Term Type','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','new_terms','New Terms','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','interface_terms','Interface Terms','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','system_update_id','System Update ID','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','available_to','Available To','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','author','Author','2009-03-24 13:47:37','');
+INSERT INTO `language_text` VALUES ('eng', '_template','back_to','Back To:','2009-03-24 13:47:37','');
diff --git a/docs/install/images/bad.gif b/docs/install/images/bad.gif
new file mode 100644 (file)
index 0000000..80a2e7b
Binary files /dev/null and b/docs/install/images/bad.gif differ
diff --git a/docs/install/images/feedback.gif b/docs/install/images/feedback.gif
new file mode 100644 (file)
index 0000000..a909231
Binary files /dev/null and b/docs/install/images/feedback.gif differ
diff --git a/docs/install/images/question.gif b/docs/install/images/question.gif
new file mode 100644 (file)
index 0000000..02fd449
Binary files /dev/null and b/docs/install/images/question.gif differ
diff --git a/docs/install/include/classes/sqlutility.php b/docs/install/include/classes/sqlutility.php
new file mode 100644 (file)
index 0000000..0f94e41
--- /dev/null
@@ -0,0 +1,165 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+
+class SqlUtility
+{
+       /**
+       * Function from phpMyAdmin (http://phpwizard.net/projects/phpMyAdmin/)
+       *
+       * Removes comment and splits large sql files into individual queries
+       *
+       * Last revision: September 23, 2001 - gandon
+       *
+       * @param   array    the splitted sql commands
+       * @param   string   the sql commands
+       * @return  boolean  always true
+       * @access  public
+       */
+       function splitSqlFile(&$ret, $sql)
+       {
+               $sql               = trim($sql);
+               $sql_len           = strlen($sql);
+               $char              = '';
+       $string_start      = '';
+       $in_string         = false;
+
+       for ($i = 0; $i < $sql_len; ++$i) {
+               $char = $sql[$i];
+
+           // We are in a string, check for not escaped end of
+                  // strings except for backquotes that can't be escaped
+           if ($in_string) {
+                       for (;;) {
+                               $i         = strpos($sql, $string_start, $i);
+                                       // No end of string found -> add the current
+                                       // substring to the returned array
+                       if (!$i) {
+                                               $ret[] = $sql;
+                       return true;
+                       }
+                                       // Backquotes or no backslashes before 
+                                       // quotes: it's indeed the end of the 
+                                       // string -> exit the loop
+                       else if ($string_start == '`' || $sql[$i-1] != '\\') {
+                                               $string_start      = '';
+                               $in_string         = false;
+                       break;
+                       }
+                       // one or more Backslashes before the presumed 
+                                       // end of string...
+                       else {
+                                               // first checks for escaped backslashes
+                       $j                     = 2;
+                       $escaped_backslash     = false;
+                                               while ($i-$j > 0 && $sql[$i-$j] == '\\') {
+                                                       $escaped_backslash = !$escaped_backslash;
+                               $j++;
+                       }
+                       // ... if escaped backslashes: it's really the 
+                                               // end of the string -> exit the loop
+                       if ($escaped_backslash) {
+                                                       $string_start  = '';
+                               $in_string     = false;
+                                                       break;
+                       }
+                       // ... else loop
+                       else {
+                                                       $i++;
+                       }
+                       } // end if...elseif...else
+               } // end for
+               } // end if (in string)
+               // We are not in a string, first check for delimiter...
+               else if ($char == ';') {
+                               // if delimiter found, add the parsed part to the returned array
+               $ret[]    = substr($sql, 0, $i);
+               $sql      = ltrim(substr($sql, min($i + 1, $sql_len)));
+                       $sql_len  = strlen($sql);
+               if ($sql_len) {
+                                       $i      = -1;
+               } else {
+                       // The submited statement(s) end(s) here
+                       return true;
+                               }
+               } // end else if (is delimiter)
+               // ... then check for start of a string,...
+               else if (($char == '"') || ($char == '\'') || ($char == '`')) {
+                               $in_string    = true;
+                               $string_start = $char;
+               } // end else if (is start of string)
+
+               // for start of a comment (and remove this comment if found)...
+               else if ($char == '#' || ($char == ' ' && $i > 1 && $sql[$i-2] . $sql[$i-1] == '--')) {
+               // starting position of the comment depends on the comment type
+                       $start_of_comment = (($sql[$i] == '#') ? $i : $i-2);
+               // if no "\n" exits in the remaining string, checks for "\r"
+               // (Mac eol style)
+                       $end_of_comment   = (strpos(' ' . $sql, "\012", $i+2))
+                              ? strpos(' ' . $sql, "\012", $i+2)
+                              : strpos(' ' . $sql, "\015", $i+2);
+                       if (!$end_of_comment) {
+                // no eol found after '#', add the parsed part to the returned
+                // array and exit
+                               $ret[]   = trim(substr($sql, 0, $i-1));
+                               return true;
+                               } else {
+                       $sql     = substr($sql, 0, $start_of_comment) . ltrim(substr($sql, $end_of_comment));
+                       $sql_len = strlen($sql);
+                       $i--;
+               } // end if...else
+               } // end else if (is comment)
+       } // end for
+
+       // add any rest to the returned array
+       if (!empty($sql) && trim($sql) != '') {
+                       $ret[] = $sql;
+       }
+       return true;
+       }
+
+       /**
+        * add a prefix.'_' to all tablenames in a query
+     * 
+     * @param   string  $query  valid MySQL query string
+     * @param   string  $prefix prefix to add to all table names
+        * @return  mixed   FALSE on failure
+        */
+       function prefixQuery($query, $prefix)
+       {
+               $pattern = "/^(INSERT INTO|REPLACE INTO|CREATE TABLE|ALTER TABLE|UPDATE)(\s)+([`]?)([^`\s]+)\\3(\s)+/siU";
+               $pattern2 = "/^(DROP TABLE)(\s)+([`]?)([^`\s]+)\\3(\s)?$/siU";
+               if (preg_match($pattern, $query, $matches) || preg_match($pattern2, $query, $matches)) {
+                       $replace = "\\1 ".$prefix."\\4\\5";
+                       $matches[0] = preg_replace($pattern, $replace, $query);
+
+                       if ($matches[1] == 'INSERT INTO') {
+                               $parts = explode(' ', $matches[0]);
+                               $size_of_parts = count($parts);
+                               if ($parts[$size_of_parts-2] == 'FROM') {
+                                       $parts[$size_of_parts-1] = $prefix . str_replace('`', '', $parts[$size_of_parts-1]);
+                                       $matches[0] = implode(' ', $parts);
+                               }
+                       } else if ($matches[1] == 'ALTER TABLE') {
+                               $parts = explode(' ', $matches[0]);
+                               if ($parts[3] == 'RENAME') {
+                                       $parts[4] = $prefix . str_replace('`', '', $parts[4]);
+                                       $matches[0] = implode(' ', $parts);
+                               }
+                       }
+
+                       return $matches;
+               }
+               return false;
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/install/include/common.inc.php b/docs/install/include/common.inc.php
new file mode 100644 (file)
index 0000000..52ea0c9
--- /dev/null
@@ -0,0 +1,255 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+error_reporting(E_ALL ^ E_NOTICE);
+
+/* aframe default configuration options */
+/* used on: step3.php, step4.php, step5.php */
+$_defaults['admin_username'] = 'admin';
+$_defaults['admin_password'] = '';
+$_defaults['admin_email'] = '';
+
+$_defaults['site_name'] = 'AFrame';
+$_defaults['header_img'] = '';
+$_defaults['header_logo'] = '';
+$_defaults['home_url'] = '';
+
+$_defaults['email_confirmation'] = 'TRUE';
+
+$_defaults['max_file_size'] = '1048576';
+$_defaults['ill_ext'] = 'exe, asp, php, php3, bat, cgi, pl, com, vbs, reg, pcd, pif, scr, bas, inf, vb, vbe, wsc, wsf, wsh';
+$_defaults['cache_dir'] = '';
+
+$_defaults['theme_categories'] = 'FALSE';
+$_defaults['content_dir'] = realpath('../').DIRECTORY_SEPARATOR.'temp';
+
+require('include/classes/sqlutility.php');
+
+
+function my_add_null_slashes( $string ) {
+    return @mysql_real_escape_string(stripslashes($string));
+}
+function my_null_slashes($string) {
+       return $string;
+}
+
+if ( get_magic_quotes_gpc() == 1 ) {
+       $addslashes   = 'my_add_null_slashes';
+       $stripslashes = 'stripslashes';
+} else {
+       $addslashes   = 'mysql_real_escape_string';
+       $stripslashes = 'my_null_slashes';
+}
+
+function queryFromFile($sql_file_path)
+{
+       global $db, $progress, $errors;
+
+       $tables = array();
+
+  if (!file_exists($sql_file_path)) {
+    $progress[] = $sql_file_path . ': file not exists.';
+    return false;
+  }
+
+  $sql_query = trim(fread(fopen($sql_file_path, 'r'), filesize($sql_file_path)));
+  SqlUtility::splitSqlFile($pieces, $sql_query);
+
+  foreach ($pieces as $piece) 
+  {
+       $piece = trim($piece);
+    // [0] contains the prefixed query
+    // [4] contains unprefixed table name
+
+
+               if ($_POST['tb_prefix'] || ($_POST['tb_prefix'] == '')) 
+                       $prefixed_query = SqlUtility::prefixQuery($piece, $_POST['tb_prefix']);
+               else
+                       $prefixed_query = $piece;
+
+               if ($prefixed_query != false ) 
+               {
+       $table = $_POST['tb_prefix'].$prefixed_query[4];
+      
+      if($prefixed_query[1] == 'CREATE TABLE')
+      {
+       if (mysql_query($prefixed_query[0],$db) !== false)
+                                       $progress[] = 'Table <strong>'.$table . '</strong> created successfully.';
+        else 
+                                       if (mysql_errno($db) == 1050)
+                                               $progress[] = 'Table <strong>'.$table . '</strong> already exists. Skipping.';
+                                       else
+                                               $errors[] = 'Table <strong>' . $table . '</strong> creation failed.';
+      }
+                       elseif($prefixed_query[1] == 'INSERT INTO')
+                               mysql_query($prefixed_query[0],$db);
+      elseif($prefixed_query[1] == 'REPLACE INTO')
+        mysql_query($prefixed_query[0],$db);
+      elseif($prefixed_query[1] == 'ALTER TABLE')
+      {
+                               if (mysql_query($prefixed_query[0],$db) !== false)
+                                       $progress[] = 'Table <strong>'.$table.'</strong> altered successfully.';
+                               else
+                                       if (mysql_errno($db) == 1060) 
+                                               $progress[] = 'Table <strong>'.$table . '</strong> fields already exists. Skipping.';
+                                       elseif (mysql_errno($db) == 1091) 
+                                               $progress[] = 'Table <strong>'.$table . '</strong> fields already dropped. Skipping.';
+                                       else
+                                               $errors[] = 'Table <strong>'.$table.'</strong> alteration failed.';
+      }
+      elseif($prefixed_query[1] == 'DROP TABLE')
+                               mysql_query($prefixed_query[1] . ' ' .$table,$db);
+      elseif($prefixed_query[1] == 'UPDATE')
+                mysql_query($prefixed_query[0],$db);
+               }
+       }
+       return true;
+}
+
+function print_errors( $errors ) {
+       ?>
+       <br />
+       <table border="0" class="errbox" cellpadding="3" cellspacing="2" width="90%" summary="" align="center">
+       <tr class="errbox">
+       <td>
+               <h3 class="err"><img src="images/bad.gif" align="top" alt="" class="img" /> Error</h3>
+               <?php
+                       echo '<ul>';
+                       foreach ($errors as $p) {
+                               echo '<li>'.$p.'</li>';
+                       }
+                       echo '</ul>';
+               ?>
+               </td>
+       </tr>
+       </table>        <br />
+<?php
+}
+
+function print_feedback( $feedback ) {
+       ?>
+       <br />
+       <table border="0" class="fbkbox" cellpadding="3" cellspacing="2" width="90%" summary="" align="center">
+       <tr class="fbkbox">
+       <td><h3 class="feedback2"><img src="images/feedback.gif" align="top" alt="" class="img" /> Feedback</h3>
+               <?php
+                       echo '<ul>';
+                       foreach ($feedback as $p) {
+                               echo '<li>'.$p.'</li>';
+                       }
+                       echo '</ul>';
+               ?></td>
+       </tr>
+       </table>
+       <br />
+<?php
+}
+
+function store_steps($step) {
+
+       global $stripslashes;
+
+       foreach($_POST as $key => $value) {
+               if (substr($key, 0, strlen('step')) == 'step') {
+                       continue;
+               } else if ($key == 'step') {
+                       continue;
+               } else if ($key == 'action') {
+                       continue;
+               } else if ($key == 'submit') {
+                       continue;
+               }
+
+               $_POST['step'.$step][$key] = urlencode($stripslashes($value));
+       }
+}
+
+
+function print_hidden($current_step) {
+       for ($i=1; $i<$current_step; $i++) {
+               if (is_array($_POST['step'.$i])) {
+                       foreach($_POST['step'.$i] as $key => $value) {
+                               echo '<input type="hidden" name="step'.$i.'['.$key.']" value="'.$value.'" />'."\n";
+                       }
+               }
+       }
+}
+
+function print_progress($step) {
+       global $install_steps;
+       
+       echo '<div class="install"><h3>Installation Progress</h3><p>';
+
+       $num_steps = count($install_steps);
+       for ($i=0; $i<$num_steps; $i++) {
+               if ($i == $step) {
+                       echo '<strong style="margin-left: 12px; color: #006699;">Step '.$i.': '.$install_steps[$i]['name'].'</strong>';
+               } else {
+                       echo '<small style="margin-left: 10px; color: gray;">';
+                       if ($step > $i) {
+                               echo '<img src="../images/check.gif" height="9" width="9" alt="Step Done!" /> ';
+                       } else {
+                               echo '<img src="../images/clr.gif" height="9" width="9" alt="" /> ';
+                       }
+                       echo 'Step '.$i.': '.$install_steps[$i]['name'].'</small>';
+               }
+               if ($i+1 < $num_steps) {
+                       echo '<br />';
+               }
+       }
+       echo '</p></div><br />';
+
+       echo '<h3>'.$install_steps[$step]['name'].'</h3>';
+}
+
+
+if (version_compare(phpversion(), '5.0') < 0) {
+       function scandir($dirstr) {
+               $files = array();
+               $fh = opendir($dirstr);
+               while (false !== ($filename = readdir($fh))) {
+                       array_push($files, $filename);
+               }
+               closedir($fh);
+               return $files;
+       }
+}
+
+/**
+ * This function is used for printing variables for debugging.
+ * @access  public
+ * @param   mixed $var The variable to output
+ * @param   string $title      The name of the variable, or some mark-up identifier.
+ * @author  Joel Kronenberg
+ */
+function debug($var, $title='') {
+       echo '<pre style="border: 1px black solid; padding: 0px; margin: 10px;" title="debugging box">';
+       if ($title) {
+               echo '<h4>'.$title.'</h4>';
+       }
+       
+       ob_start();
+       print_r($var);
+       $str = ob_get_contents();
+       ob_end_clean();
+
+       $str = str_replace('<', '&lt;', $str);
+
+       $str = str_replace('[', '<span style="color: red; font-weight: bold;">[', $str);
+       $str = str_replace(']', ']</span>', $str);
+       $str = str_replace('=>', '<span style="color: blue; font-weight: bold;">=></span>', $str);
+       $str = str_replace('Array', '<span style="color: purple; font-weight: bold;">Array</span>', $str);
+       echo $str;
+       echo '</pre>';
+}
+?>
\ No newline at end of file
diff --git a/docs/install/include/config_template.php b/docs/install/include/config_template.php
new file mode 100644 (file)
index 0000000..4993309
--- /dev/null
@@ -0,0 +1,96 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+function write_config_file($filename, $comments) {
+       global $config_template;
+
+       $tokens = array('{USER}',
+                                       '{PASSWORD}',
+                                       '{HOST}',
+                                       '{PORT}',
+                                       '{DBNAME}',
+                                       '{TABLE_PREFIX}',
+                                       '{TEMP_DIR}',
+                                       '{GENERATED_COMMENTS}',
+                               );
+
+               $values = array(urldecode($_POST['step2']['db_login']),
+                                       addslashes(urldecode($_POST['step2']['db_password'])),
+                                       $_POST['step2']['db_host'],
+                                       $_POST['step2']['db_port'],
+                                       $_POST['step2']['db_name'],
+                                       $_POST['step2']['tb_prefix'],
+                                       addslashes(urldecode($_POST['step4']['content_dir'])),
+                                       $comments,
+                               );
+
+       $config_template = str_replace($tokens, $values, $config_template);
+
+       if (!$handle = @fopen($filename, 'wb')) {
+         return false;
+    }
+       @ftruncate($handle,0);
+    if (!@fwrite($handle, $config_template, strlen($config_template))) {
+               return false;
+    }
+        
+    @fclose($handle);
+       return true;
+}
+
+$config_template = "<"."?php 
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+{GENERATED_COMMENTS}
+/************************************************************************/
+/************************************************************************/
+/* the database user name                                               */
+define('DB_USER',                      '{USER}');
+
+/* the database password                                                */
+define('DB_PASSWORD',                  '{PASSWORD}');
+
+/* the database host                                                    */
+define('DB_HOST',                      '{HOST}');
+
+/* the database tcp/ip port                                             */
+define('DB_PORT',                      '{PORT}');
+
+/* the database name                                                    */
+define('DB_NAME',                      '{DBNAME}');
+
+/* The prefix to add to table names to avoid conflicts with existing    */
+/* tables. Default: AF_                                                 */
+define('TABLE_PREFIX',                 '{TABLE_PREFIX}');
+
+/* Where the temporary files are located.  This includes all file       */
+/* manager and imported files.  If security is a concern, it is         */
+/* recommended that the temporary directory be moved outside of the web        */
+/* accessible area.                                                                                                            */
+define('AF_TEMP_DIR', '{TEMP_DIR}');
+
+/* DO NOT ALTER THIS LAST LINE                                          */
+define('AF_INSTALL', TRUE);
+
+?".">";
+
+?>
\ No newline at end of file
diff --git a/docs/install/include/footer.inc.php b/docs/install/include/footer.inc.php
new file mode 100644 (file)
index 0000000..0f66958
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+?>
+</div>
+<div style="margin-top: 20px; height: 30px; background-color: #354A81; padding: 10px">&nbsp;</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/install/include/header.inc.php b/docs/install/include/header.inc.php
new file mode 100644 (file)
index 0000000..4005734
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+error_reporting(E_ALL ^ E_NOTICE);
+
+if ($step < 3) {
+       error_reporting(0);
+       include('../include/config.inc.php');
+       error_reporting(E_ALL ^ E_NOTICE);
+       if (defined('AF_INSTALL')) {
+               echo 'AFrame appears to have been installed already.';
+               exit;
+       }
+}
+
+$install_steps[0] = array('name' => 'Introduction');
+$install_steps[1] = array('name' => 'Terms of Use');
+$install_steps[2] = array('name' => 'Database');
+$install_steps[3] = array('name' => 'Accounts & Preferences');
+$install_steps[4] = array('name' => 'Temporary Directory');
+$install_steps[5] = array('name' => 'Save Configuration');
+$install_steps[6] = array('name' => 'Anonymous Usage Collection');
+$install_steps[7] = array('name' => 'Done!');
+
+?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="utf-8"> 
+<head>
+       <title>AFrame Installation</title>
+       <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+       <link rel="stylesheet" href="stylesheet.css" type="text/css" />
+</head>
+<body>
+<div style="height: 70px; vertical-align: bottom; background-color: #354A81">
+       <h1 id="header">AFrame <?php echo $new_version; ?> Installation</h1>
+       <img src="../images/logo.png" height="29" width="84" alt="Logo" id="logo" />
+</div>
+<div style="clear: all"></div>
+<div class="content">
\ No newline at end of file
diff --git a/docs/install/include/step1.php b/docs/install/include/step1.php
new file mode 100644 (file)
index 0000000..9d88267
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+//clear session before using it
+unset($_SESSION['user_id']);
+unset($_SESSION['lang']);
+unset($_SESSION['prefs']);
+unset($_SESSION['token']);
+session_unset();
+$_SESSION = array();
+
+if (isset($_POST['submit'])) {
+       if ($_POST['submit'] == 'I Agree') {
+               unset($_POST['submit']);
+               $step++;
+               unset($_POST['action']);
+               return;
+       } else {
+               exit;
+       }
+}
+
+print_progress($step);
+?>
+<p>AFrame is licensed under the terms of the <a href="http://aframe.ca/services/licensing_gpl.php" target="_new">GNU General Public License (GPL)</a>, which essentially allows for the free distribution and modification of AFrame. AFrame has its own license that governs its use outside the bounds of the GPL.</p>
+
+<p>If you do not agree to the Terms of Use then you may not install and use AFrame.</p>
+
+<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
+       <input type="hidden" name="action" value="process" />
+       <input type="hidden" name="step" value="1" />
+       <input type="hidden" name="new_version" value="<?php echo $new_version; ?>" />
+       <div align="center">
+               <input type="submit" name="submit" class="button" value="I Agree" /> - <input type="submit" name="submit" class="button" value="I Disagree" /><br />
+       </div>
+</form>
\ No newline at end of file
diff --git a/docs/install/include/step2.php b/docs/install/include/step2.php
new file mode 100644 (file)
index 0000000..fd90c26
--- /dev/null
@@ -0,0 +1,139 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+if(isset($_POST['submit'])) {
+       unset($errors);
+       unset($progress);
+
+       //check DB & table connection
+
+       $db = @mysql_connect($_POST['db_host'] . ':' . $_POST['db_port'], $_POST['db_login'], $_POST['db_password']);
+       if (!$db) {
+               $errors[] = 'Unable to connect to database server.';
+       } else {
+               // check mysql version number
+               $sql = "SELECT VERSION() AS version";
+               $result = mysql_query($sql, $db);
+               $row = mysql_fetch_assoc($result);
+               if (version_compare($row['version'], '4.1.10', '>=') === FALSE) {
+                       $errors[] = 'MySQL version '.$row['version'].' was detected. AFrame requires version 4.1.10 or later.';
+               }
+
+               if (!isset($errors)){
+                       if (!mysql_select_db($_POST['db_name'], $db)) {
+                               $sql = "CREATE DATABASE $_POST[db_name] CHARACTER SET utf8 COLLATE utf8_general_ci";
+                               $result = mysql_query($sql, $db);
+                               if (!$result) {
+                                       $errors[] = 'Unable to select or create database <b>'.$_POST['db_name'].'</b>.';
+                               } else {
+                                       $progress[] = 'Database <b>'.$_POST['db_name'].'</b> created successfully.';
+                                       mysql_select_db($_POST['db_name'], $db);
+                               }
+                       } else {
+                               /* Check if the database that existed is in UTF-8, if not, ask for retry */
+                               $sql = "SHOW CREATE DATABASE $_POST[db_name]";
+                               $result = mysql_query($sql, $db);
+                               $row = mysql_fetch_assoc($result);
+                               
+                               if (!preg_match('/CHARACTER SET utf8/i', $row['Create Database'])){
+                                       $errors[] = 'Database <b>'.$_POST['db_name'].'</b> is not in UTF8.  Please set the database character set to UTF8 before continuing by using the following query: ALTER DATABASE `'.$_POST['db_name'].'` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci.  To use ALTER DATABASE, you need the ALTER privilege on the database.';
+                               }
+                       }
+               }
+
+               if (!isset($errors)) {
+                       $progress[] = 'Connected to database <b>'.$_POST['db_name'].'</b> successfully.';
+                       $errors = array();
+                       
+                       /* @See include/classes/dbmanager.php */
+                       queryFromFile('db/db_schema.sql');
+                       queryFromFile('db/language_text.sql');
+
+                       if (!$errors) {
+                               print_progress($step);
+
+                               unset($_POST['submit']);
+                               unset($_POST['action']);
+                               store_steps($step);
+                               print_feedback($progress);
+
+                               echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post" name="form">
+                               <input type="hidden" name="step" value="3" />';
+                               print_hidden(3);
+                               echo '<p align="center"><input type="submit" class="button" value="Next &raquo; " name="submit" /></p></form>';
+                               return;
+                       }
+               }
+
+       }
+}
+
+print_progress($step);
+
+
+echo '<p>Please enter your database information: </p>';
+
+
+if (isset($progress)) {
+       print_feedback($progress);
+}
+
+if (isset($errors)) {
+       print_errors($errors);
+}
+
+?>
+
+<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
+       <input type="hidden" name="action" value="process" />
+       <input type="hidden" name="step" value="2" />
+       <input type="hidden" name="new_version" value="<?php echo $_POST['new_version']; ?>" />
+
+       <table width="65%" class="tableborder" cellspacing="0" cellpadding="1" border="0" align="center">
+       <tr>
+               <td class="row1"><div class="required" title="Required Field">*</div><b><label for="db">Database Hostname:</label></b><br />
+                       Hostname of the database server. Default: <kbd>localhost</kbd></td>
+               <td class="row1" valign="middle"><input type="text" name="db_host" id="db" value="<?php if (!empty($_POST['db_host'])) { echo stripslashes(htmlspecialchars($_POST['db_host'])); } else { echo 'localhost'; } ?>" class="formfield" /></td>
+       </tr>
+       <tr>
+               <td class="row1"><div class="required" title="Required Field">*</div><b><label for="port">Database Port:</label></b><br />
+                       The port to the database server. Default: <kbd>3306</kbd></td>
+               <td class="row1"><input type="text" name="db_port" id="port" value="<?php if (!empty($_POST['db_port'])) { echo stripslashes(htmlspecialchars($_POST['db_port'])); } else { echo '3306'; } ?>" class="formfield" /></td>
+       </tr>
+       <tr>
+               <td class="row1"><div class="required" title="Required Field">*</div><b><label for="username">Database Username:</label></b><br />
+                       The username to the database server.</td>
+               <td class="row1"><input type="text" name="db_login" id="username" value="<?php echo stripslashes(htmlspecialchars($_POST['db_login'])); ?>" class="formfield" /></td>
+       </tr>
+       <tr>
+               <td class="row1"><div class="required" title="Required Field">*</div><b><label for="pass">Database Password:</label></b><br />
+                       The password to the database server.</td>
+               <td class="row1"><input type="text" name="db_password" id="pass" value="<?php echo stripslashes(htmlspecialchars($_POST['db_password'])); ?>" class="formfield" /></td>
+       </tr>
+       <tr>
+               <td class="row1"><div class="required" title="Required Field">*</div><b><label for="name">Database Name:</label></b><br />
+                       The name of the database to use. It will be created if it does not exist.<br />Default: <kbd>aframe</kbd></td>
+               <td class="row1"><input type="text" name="db_name" id="name" value="<?php if (!empty($_POST['db_name'])) { echo stripslashes(htmlspecialchars($_POST['db_name'])); } else { echo 'aframe'; } ?>" class="formfield" /></td>
+       </tr>
+       <tr>
+               <td class="row1"><div class="optional" title="Optional Field">?</div><b><label for="prefix">Table Prefix:</label></b><br />
+                       The prefix to add to table names to avoid conflicts with existing tables.<br />
+                       Default: <kbd>AF_</kbd></td>
+               <td class="row1"><input type="text" name="tb_prefix" id="prefix" value="<?php if (!empty($_POST['tb_prefix'])) { echo stripslashes(htmlspecialchars($_POST['tb_prefix'])); } else { echo 'AF_'; } ?>" class="formfield" /></td>
+       </tr>
+       </table>
+
+       <br /><br /><p align="center"><input type="submit" class="button" value="Next &raquo; " name="submit" /></p>
+
+</form>
diff --git a/docs/install/include/step3.php b/docs/install/include/step3.php
new file mode 100644 (file)
index 0000000..6e5b272
--- /dev/null
@@ -0,0 +1,172 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+if(isset($_POST['submit']) && ($_POST['action'] == 'process')) {
+       unset($errors);
+
+       $_POST['admin_username'] = trim($_POST['admin_username']);
+       $_POST['admin_email']    = trim($_POST['admin_email']);
+       $_POST['site_name']      = trim($_POST['site_name']);
+       $_POST['email']          = trim($_POST['email']);
+
+       /* Super Administrator Account checking: */
+       if ($_POST['admin_username'] == ''){
+               $errors[] = 'Administrator username cannot be empty.';
+       } else {
+               /* check for special characters */
+               if (!(preg_match("/^[a-zA-Z0-9_]([a-zA-Z0-9_])*$/", $_POST['admin_username']))){
+                       $errors[] = 'Administrator username is not valid.';
+               }
+       }
+       if ($_POST['form_admin_password_hidden'] == '') {
+               $errors[] = 'Administrator password cannot be empty.';
+       }
+       if ($_POST['admin_email'] == '') {
+               $errors[] = 'Administrator email cannot be empty.';
+       } else if (!preg_match("/^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,6}$/", $_POST['admin_email'])) {
+               $errors[] = 'Administrator email is not valid.';
+       }
+
+       /* System Preferences checking: */
+       if ($_POST['site_name'] == '') {
+               $errors[] = 'Site name cannot be empty.';
+       }
+       if ($_POST['email'] == '') {
+               $errors[] = 'Contact email cannot be empty.';
+       } else if (!preg_match("/^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,6}$/", $_POST['email'])) {
+               $errors[] = 'Contact email is not valid.';
+       }
+
+       if (!isset($errors)) {
+               $db = @mysql_connect($_POST['step2']['db_host'] . ':' . $_POST['step2']['db_port'], $_POST['step2']['db_login'], urldecode($_POST['step2']['db_password']));
+               @mysql_select_db($_POST['step2']['db_name'], $db);
+
+               $status = 3; // for instructor account
+
+               $sql = "INSERT INTO ".$_POST['step2']['tb_prefix']."users (login, password, user_group_id, email, web_service_id, create_date)
+               VALUES ('$_POST[admin_username]', '$_POST[form_admin_password_hidden]', 1, '$_POST[admin_email]', '".sha1(mt_rand() . microtime(TRUE))."', NOW())";
+               $result= mysql_query($sql, $db);
+
+               $_POST['site_name'] = $addslashes($_POST['site_name']);
+               $sql = "INSERT INTO ".$_POST['step2']['tb_prefix']."config (name, value) VALUES ('site_name', '$_POST[site_name]')";
+               $result = mysql_query($sql ,$db);
+
+               $_POST['email'] = $addslashes($_POST['email']);
+               $sql = "INSERT INTO ".$_POST['step2']['tb_prefix']."config (name, value) VALUES ('contact_email', '$_POST[email]')";
+               $result = mysql_query($sql ,$db);
+
+               unset($_POST['admin_username']);
+               unset($_POST['form_admin_password_hidden']);
+               unset($_POST['admin_email']);
+               unset($_POST['email']);
+               unset($_POST['site_name']);
+
+               unset($errors);
+               unset($_POST['submit']);
+               unset($action);
+               store_steps($step);
+               $step++;
+               return;
+       }
+}
+
+print_progress($step);
+
+if (isset($errors)) {
+       print_errors($errors);
+}
+
+if (isset($_POST['step1']['old_version']) && $_POST['upgrade_action']) {
+       $defaults['admin_username'] = urldecode($_POST['step1']['admin_username']);
+       $defaults['admin_email']    = urldecode($_POST['step1']['admin_email']);
+
+       $defaults['site_name']   = urldecode($_POST['step1']['site_name']);
+       $defaults['header_img']  = urldecode($_POST['step1']['header_img']);
+       $defaults['header_logo'] = urldecode($_POST['step1']['header_logo']);
+       $defaults['home_url']    = urldecode($_POST['step1']['home_url']);
+} else {
+       $defaults = $_defaults;
+}
+
+?>
+<script language="JavaScript" src="<?php echo AF_INCLUDE_PATH; ?>../../include/jscripts/sha-1factory.js" type="text/javascript"></script>
+
+<script type="text/javascript">
+function encrypt_password()
+{
+       document.form.form_admin_password_hidden.value = hex_sha1(document.form.admin_password.value);
+       document.form.admin_password.value = "";
+}
+</script>
+
+<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
+       <input type="hidden" name="action" value="process" />
+       <input type="hidden" name="form_admin_password_hidden" value="" />
+       <input type="hidden" name="form_account_password_hidden" value="" />
+       <input type="hidden" name="step" value="<?php echo $step; ?>" />
+       <?php print_hidden($step); ?>
+
+       <?php
+               /* detect mail settings. if sendmail_path is empty then use SMTP. */
+               if (@ini_get('sendmail_path') == '') { 
+                       echo '<input type="hidden" name="smtp" value="true" />';
+               } else {
+                       echo '<input type="hidden" name="smtp" value="false" />';
+               }
+       ?>
+       <br />
+               <table width="70%" class="tableborder" cellspacing="0" cellpadding="1" align="center">
+               <tr>
+                       <th colspan="2">Super Administrator Account</th>
+               </tr>
+               <tr>
+                       <td colspan="2" class="row1">The Super Administrator account is used for managing AFrame. The Super Administrator can also create additional Administrators each with their own privileges and roles. </td>
+               </tr>
+               <tr>
+                       <td class="row1"><div class="required" title="Required Field">*</div><b><label for="username">Administrator Username:</label></b><br />
+                       May contain only letters, numbers, or underscores.</td>
+                       <td class="row1"><input type="text" name="admin_username" id="username" maxlength="20" size="20" value="<?php if (!empty($_POST['admin_username'])) { echo stripslashes(htmlspecialchars($_POST['admin_username'])); } else { echo $defaults['admin_username']; } ?>" class="formfield" /></td>
+               </tr>
+               <tr>
+                       <td class="row1"><div class="required" title="Required Field">*</div><b><label for="password">Administrator Password:</label></b></td>
+                       <td class="row1"><input type="text" name="admin_password" id="password" maxlength="15" size="15" class="formfield" /></td>
+               </tr>
+               <tr>
+                       <td class="row1"><div class="required" title="Required Field">*</div><b><label for="email">Administrator Email:</label></b></td>
+                       <td class="row1"><input type="text" name="admin_email" id="email" size="40" value="<?php if (!empty($_POST['admin_email'])) { echo stripslashes(htmlspecialchars($_POST['admin_email'])); } else { echo $defaults['admin_email']; } ?>" class="formfield" /></td>
+               </tr>
+               </table>
+
+       <br />
+
+               <table width="70%" class="tableborder" cellspacing="0" cellpadding="1" align="center">
+               <tr>
+                       <th colspan="2">System Preferences</th>
+               </tr>
+               <tr>
+                       <td class="row1"><div class="required" title="Required Field">*</div><b><label for="sitename">Site Name:</label></b><br />
+                       The name of your course server website.<br />Default: <kbd><?php echo $defaults['site_name']; ?></kbd></td>
+                       <td class="row1"><input type="text" name="site_name" size="28" maxlength="60" id="sitename" value="<?php if (!empty($_POST['site_name'])) { echo stripslashes(htmlspecialchars($_POST['site_name'])); } else { echo $defaults['site_name']; } ?>" class="formfield" /></td>
+               </tr>
+               <tr>
+                       <td class="row1"><div class="required" title="Required Field">*</div><b><label for="cemail">Contact Email:</label></b><br />
+                       The email that will be used as the return email when needed.</td>
+                       <td class="row1"><input type="text" name="email" id="cemail" size="40" value="<?php if (!empty($_POST['email'])) { echo stripslashes(htmlspecialchars($_POST['email'])); } else { echo $defaults['email']; } ?>" class="formfield" /></td>
+               </tr>
+               </table>
+
+       <br />
+       <br />
+       <div align="center"><input type="submit" class="button" value=" Next &raquo;" name="submit" onclick="return encrypt_password();" /></div>
+</form>
\ No newline at end of file
diff --git a/docs/install/include/step4.php b/docs/install/include/step4.php
new file mode 100644 (file)
index 0000000..0c10415
--- /dev/null
@@ -0,0 +1,203 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+if (isset($_POST['submit'])) {
+       $_POST['content_dir'] = $stripslashes($_POST['content_dir']);
+
+       unset($errors);
+
+       if (!file_exists($_POST['content_dir']) || !realpath($_POST['content_dir'])) {
+               $errors[] = '<strong>Temporary Directory</strong> entered does not exist.';
+       } else if (!is_dir($_POST['content_dir'])) {
+               $errors[] = '<strong>Temporary Directory</strong> is not a directory.';
+       } else if (!is_writable($_POST['content_dir'])){
+               $errors[] = 'The Temporary Directory is not writable.';
+       } else {
+
+               $_POST['content_dir'] = realpath(urldecode($_POST['content_dir']));
+
+               if (!is_dir($_POST['content_dir'].'/import')) {
+                       if (!@mkdir($_POST['content_dir'].'/import')) {
+                               $errors[] = '<strong>'.$_POST['content_dir'].'/import</strong> directory does not exist and cannot be created.';  
+                       }
+               } else if (!is_writable($_POST['content_dir'].'/import')){
+                       $errors[] = '<strong>'.$_POST['content_dir'].'/import</strong> directory is not writable.';
+               } 
+
+               if (!is_dir($_POST['content_dir'].'/updater')) {
+                       if (!@mkdir($_POST['content_dir'].'/updater')) {
+                               $errors[] = '<strong>'.$_POST['content_dir'].'/updater</strong> directory does not exist and cannot be created.';  
+                       }
+               } else if (!is_writable($_POST['content_dir'].'/updater')){
+                       $errors[] = '<strong>'.$_POST['content_dir'].'/updater</strong> directory is not writable.';
+               }
+
+               // save blank index.html pages to those directories
+               @copy('../images/index.html', $_POST['content_dir'] . '/import/index.html');
+               @copy('../images/index.html', $_POST['content_dir'] . '/index.html');
+       }
+
+       if (!isset($errors)) {
+               unset($errors);
+               unset($_POST['submit']);
+               unset($action);
+
+               if (substr($_POST['content_dir'], -1) !='\\'){
+                       $_POST['content_dir'] .= DIRECTORY_SEPARATOR;
+               }
+
+               // kludge to fix the missing slashes when magic_quotes_gpc is On
+               if ($addslashes != 'mysql_real_escape_string') {
+                       $_POST['content_dir'] = addslashes($_POST['content_dir']);
+               }
+
+               store_steps($step);
+               $step++;
+               return;
+       } else {
+               // kludge to fix the missing slashes when magic_quotes_gpc is On
+               if ($addslashes != 'mysql_real_escape_string') {
+                       $_POST['content_dir'] = addslashes($_POST['content_dir']);
+               }
+       }
+}      
+
+print_progress($step);
+
+if (isset($errors)) {
+       print_errors($errors);
+}
+
+if (isset($_POST['step1']['old_version'])) 
+{
+       //get real path to old content
+
+       $old_install   = realpath('../../' . DIRECTORY_SEPARATOR . $_POST['step1']['old_path']);
+       $old_config_cd = urldecode($_POST['step1']['content_dir']); // this path may not exist
+       $new_install   = realpath('../');
+
+       $path_info = pathinfo($old_config_cd);
+       $content_dir_name = $path_info['basename'];
+
+       if ($new_install . DIRECTORY_SEPARATOR . $content_dir_name . DIRECTORY_SEPARATOR == $old_config_cd) {
+               // case 2
+               $copy_from     = $old_install . DIRECTORY_SEPARATOR . $content_dir_name;
+       } else {
+               // case 3 + 4
+               // it's outside
+               $copy_from = '';
+       }
+
+       $_defaults['content_dir'] = $old_config_cd;
+
+}
+else
+{
+       $defaults = $_defaults;
+       $blurb = '';
+       
+       // the following code checks to see if get.php is being executed, then sets $_POST['get_file'] appropriately:
+       $headers = array();
+       $path  = substr($_SERVER['PHP_SELF'], 0, -strlen('install/install.php')) . 'get.php/?test';
+       $port = isset($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : 80;
+       
+       $host = parse_url($_SERVER['HTTP_HOST']);
+       
+       if (isset($host['path'])) {
+               $host = $host['path'];
+       } else if (isset($host['host'])) {
+               $host = $host['host'];
+       } else {
+               $_SERVER['HTTP_HOST'];
+       }
+       if ($port == 443) {
+               // if we're using SSL, but don't know if support is compiled into PHP:
+               $fd = @fopen('https://'.$host.$path, 'rb');
+               print('https://'.$host.$path);
+               if ($fd === false) {
+                       $content = false;
+               } else {
+                       $content = @fread($fd, filesize($filename));
+                       @fclose($fd);
+               }
+       
+               if (strlen($content) == 0) {
+                       $headers[] = 'AFrame-Get: OK';
+               } else {
+                       $headers[] = '';
+               }
+       } else {
+               $fp   = @fsockopen($host, $port, $errno, $errstr, 15);
+               
+               if($fp) {
+                       $head = 'HEAD '.@$path. " HTTP/1.0\r\nHost: ".@$host."\r\n\r\n";
+                       fputs($fp, $head);
+                       while(!feof($fp)) {
+                               if ($header = trim(fgets($fp, 1024))) {
+                                       $headers[] = $header;
+                               }
+                       }
+               }
+       }
+       
+       if (in_array('AFrame-Get: OK', $headers)) {
+               $get_file = 'TRUE';
+       } else {
+               $get_file = 'FALSE';
+       }
+}
+
+?>
+<br />
+<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
+       <input type="hidden" name="step" value="<?php echo $step; ?>" />
+       <input type="hidden" name="copy_from" value="<?php echo $copy_from; ?>" />
+       <input type="hidden" name="get_file" value="<?php echo $get_file; ?>" />
+       <?php print_hidden($step); ?>
+
+<?php if (isset($_POST['step1']['old_version'])) : ?>
+       <input type="hidden" name="content_dir" value="<?php echo $_defaults['content_dir']; ?>" />
+       <table width="80%" class="tableborder" cellspacing="0" cellpadding="1" align="center">  
+       <tr>
+               <td class="row1">The temporary directory at <strong><?php echo $_defaults['content_dir']; ?> </strong> will be used for this installation. Please create it if it does not already exist.</td>
+       </tr>
+       </table>
+<?php elseif ($get_file == 'FALSE') : ?>
+       <input type="hidden" name="content_dir" value="<?php if (!empty($_POST['content_dir'])) { echo $_POST['content_dir']; } else { echo $_defaults['content_dir']; } ?>" />
+
+       <table width="80%" class="tableborder" cellspacing="0" cellpadding="1" align="center">  
+       <tr>
+               <td class="row1"><div class="required" title="Required Field">*</div><strong><label for="contentdir">Temporary Directory</label></strong>
+               <p>It has been detected that your webserver does not support the protected temporary directory feature. The temporary directory stores all of the temporary files.</p>
+               <p>Due to that restriction your temporary directory must exist within your AFrame installation directory and cannot be moved. Its path is specified below. Please create it if it does not already exist.</p>
+               <br /><br />
+               <input type="text" name="content_dir_disabled" id="contentdir" value="<?php if (!empty($_POST['content_dir'])) { echo $_POST['content_dir']; } else { echo $_defaults['content_dir']; } ?>" class="formfield" size="70" disabled="disabled" /></td>
+       </tr>
+       </table>
+<?php else: ?>
+       <table width="80%" class="tableborder" cellspacing="0" cellpadding="1" align="center">  
+       <tr>
+               <td class="row1"><div class="required" title="Required Field">*</div><strong><label for="contentdir">Temporary Directory</label></strong>
+               <p>Please specify where the temporary directory should be. The temporary directory stores all of the temporary files. As a security measure, the temporary directory should be placed <em>outside</em> of your AFrame installation (for example, to a non-web-accessible location that is not publically available).</p>
+               
+               <p>On a Windows machine, the path should look like <kbd>C:\temp</kbd>, while on Unix it should look like <kbd>/var/temp</kbd>.</p>
+               
+               <p>The directory you specify must be created if it does not already exist and be writeable by the webserver. On Unix machines issue the command <kbd>chmod a+rwx temp</kbd>, additionally the path may not contain any symbolic links.</p>
+
+               <input type="text" name="content_dir" id="contentdir" value="<?php if (!empty($_POST['content_dir'])) { echo $_POST['content_dir']; } else { echo $_defaults['content_dir']; } ?>" class="formfield" size="70" /></td>
+       </tr>
+       </table>
+<?php endif; ?>
+       <br /><br /><p align="center"><input type="submit" class="button" value=" Next &raquo;" name="submit" /></p>
+</form>
\ No newline at end of file
diff --git a/docs/install/include/step5.php b/docs/install/include/step5.php
new file mode 100644 (file)
index 0000000..31b52a0
--- /dev/null
@@ -0,0 +1,95 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+if (isset($_POST['submit']) && ($_POST['action'] == 'process')) {
+       unset($_POST['submit']);
+       unset($action);
+       store_steps($step);
+       $step++;
+       return;
+}
+
+$file = '../include/config.inc.php';
+
+unset($errors);
+unset($progress);
+
+if ( file_exists($file) ) {
+       @chmod($file, 0666);
+       if (!is_writeable($file)) {
+               $errors[] = '<strong>' . realpath($file) . '</strong> is not writeable.';
+       }else{
+               $progress[] = '<strong>' . realpath($file) . '</strong> is writeable.';
+       }
+} else {
+       $errors[] = '<strong>' . $file . '</strong> does not exist.';
+}
+
+print_progress($step);
+
+echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post" name="form">';
+echo ' <input type="hidden" name="action" value="process" />';
+
+if (isset($errors)) {
+       if (isset($progress)) {
+               print_feedback($progress);
+       }
+       print_errors($errors);
+
+       echo'<input type="hidden" name="step" value="'.$step.'" />';
+
+       unset($_POST['step']);
+       unset($_POST['action']);
+       unset($errors);
+       print_hidden($step);
+
+       echo '<p><strong>Note:</strong> To change permissions on Unix use <kbd>chmod a+rw</kbd> then the file name.</p>';
+
+       echo '<p align="center"><input type="submit" class="button" value=" Try Again " name="retry" />';
+
+} else {
+       require('include/config_template.php');
+               
+       $comments = '/*'.str_pad(' This file was generated by the AFrame '.$new_version. ' installation script.', 70, ' ').'*/
+/*'.str_pad(' File generated '.date('Y-m-d H:m:s'), 70, ' ').'*/';
+
+       if (!write_config_file('../include/config.inc.php', $comments)) {
+               echo '<input type="hidden" name="step" value="'.$step.'" />';
+
+               print_feedback($progress);
+
+               $errors[] = 'include/config.inc.php cannot be written! Please verify that the file exists and is writeable. On Unix issue the command <kbd>chmod a+rw include/config.inc.php</kbd> to make the file writeable. On Windows edit the file\'s properties ensuring that the <kbd>Read-only</kbd> attribute is <em>not</em> checked and that <kbd>Everyone</kbd> access permissions are given to that file.';
+               print_errors($errors);
+
+               echo '<p><strong>Note:</strong> To change permissions on Unix use <kbd>chmod a+rw</kbd> then the file name.</p>';
+
+               echo '<p align="center"><input type="submit" class="button" value=" Try Again " name="retry" />';
+
+       } else {
+               echo '<input type="hidden" name="step" value="'.$step.'" />';
+               print_hidden($step);
+
+               $progress[] =  'Data has been saved successfully.';
+
+               @chmod('../include/config.inc.php', 0444);
+
+               print_feedback($progress);
+
+               echo '<p align="center"><input type="submit" class="button" value=" Next &raquo; " name="submit" /></p>';
+               
+       }
+}
+
+echo '</form>';
+?>
diff --git a/docs/install/include/step6.php b/docs/install/include/step6.php
new file mode 100644 (file)
index 0000000..199ad6c
--- /dev/null
@@ -0,0 +1,155 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+require('../svn.php');
+
+$svn_data   = explode("\n", $svn_data);
+
+if (substr($svn_data[1], 0, 1) == 'r') {
+       $svn_data = $svn_data[1];
+} else if (substr($svn_data[2], 0, 1) == 'r') {
+       $svn_data = $svn_data[2];
+}
+
+if (count($svn_data) > 1) {
+       $build = 'unknown';
+       $build_date = date('Y-m-d H:i:s');
+} else {
+       $svn_data   = explode(' ', $svn_data);
+
+       $build      = $svn_data[0];
+       $build_date = $svn_data[4] .' '. $svn_data[5];
+}
+
+if (!$build) {
+       $build = 'unknown';
+}
+
+$os = php_uname('s') . ' '. php_uname('r'). ' '. php_uname('v'). ' '. php_uname('m');
+
+
+if (isset($_POST['submit'])) {
+       unset($_POST['submit']);
+       unset($action);
+
+       if ($_POST['log_yes']) {
+
+               $request  = '&upgrade=' . urlencode($stripslashes($_POST['log_upgrade']));
+               $request .= '&version=' . urlencode($stripslashes($new_version));
+               $request .= '&build='   . urlencode($stripslashes($build));
+               $request .= '&build_date=' . urlencode($stripslashes($build_date));
+               $request .= '&os='      . urlencode($stripslashes($_POST['log_os']));
+               $request .= '&server='  . urlencode($stripslashes($_POST['log_server']));
+               $request .= '&php='     . urlencode($stripslashes($_POST['log_php']));
+               $request .= '&mysql='   . urlencode($stripslashes($_POST['log_mysql']));
+
+               if ($_POST['step1']['old_path'] != '') {
+                       // get some usage data from this upgrade:
+                       $db     = @mysql_connect($_POST['step1']['db_host'] . ':' . $_POST['step1']['db_port'], $_POST['step1']['db_login'], urldecode($_POST['step1']['db_password']));
+                       @mysql_select_db($_POST['step1']['db_name'], $db);
+
+                       $db_size = 0; // db size in bytes
+                       $sql = 'SHOW TABLE STATUS';
+                       $result = mysql_query($sql, $db);
+                       while ($row = mysql_fetch_assoc($result)) {
+                               $db_size += $row['Data_length']+$row['Index_length'];
+                       }
+
+                       $request .= '&db='      . $db_size;     // db size in bytes
+               }
+
+               if ($_POST['log_url_yes']) {
+                       $request .= '&url=' . urlencode($stripslashes($_POST['log_url']));
+               }
+
+//             $header = "POST /install_log.php HTTP/1.1\r\n";
+//             $header .= "Host: aframe.ca\r\n";
+//             $header .= "Content-Type: application/x-www-form-urlencoded\r\n";
+//             $header .= "Content-Length: " . strlen($request) . "\r\n\r\n";
+//             $fp = fsockopen('www.aframe.ca', 80, $errno, $errstr, 30);
+//
+//             if ($fp) {
+//                     fputs($fp, $header . $request . "\r\n\r\n");
+//                     fclose($fp);
+//             }
+       }
+
+       store_steps($step);
+       $step++;
+       return;
+}
+
+print_progress($step);
+
+?>
+<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
+<input type="hidden" name="step" value="<?php echo $step; ?>" />
+<?php
+       if ($_POST['step1']['old_path'] != '') {
+               echo '<input type="hidden" name="log_upgrade" value="1" />';
+       } else {
+               echo '<input type="hidden" name="log_upgrade" value="0" />';
+       }
+               print_hidden($step);
+       ?>
+<br />
+       <table width="80%" class="tableborder" cellspacing="0" cellpadding="1" align="center">  
+       <tr>
+               <td class="row1" colspan="2">Submit the following information to the aframe.ca server anonymously? The information we gather helps us plan our development resources to better suit the needs of the community. You may optionally choose to send the URL of your AFrame installation.</td>
+       </tr>
+       <tr>
+               <td class="row1" width="20%"><b>AFrame Version:</b></td>
+               <td class="row1"><?php echo $new_version; ?> (build <?php echo $build . ' - '.$build_date; ?>)</td>
+       </tr>
+       <tr>
+               <td class="row1" nowrap="nowrap"><b>Operating System:</b></td>
+               <td class="row1"><?php echo $os; ?> <input type="hidden" name="log_os" value="<?php echo $os; ?>" /></td>
+       </tr>
+       <tr>
+               <td class="row1"><b>Web Server:</b></td>
+               <td class="row1"><?php echo $_SERVER['SERVER_SOFTWARE']; ?> <input type="hidden" name="log_server" value="<?php echo $_SERVER['SERVER_SOFTWARE']; ?>" /></td>
+       </tr>
+       <tr>
+               <td class="row1"><b>PHP Version:</b></td>
+               <td class="row1"><?php echo phpversion(); ?> <input type="hidden" name="log_php" value="<?php echo phpversion(); ?>" /></td>
+       </tr>
+       <tr>
+               <td class="row1"><b>MySQL Version:</b></td>
+               <td class="row1"><?php
+
+                       if ($_POST['step1']['old_path'] != '') {
+                               $db     = @mysql_connect($_POST['step1']['db_host'] . ':' . $_POST['step1']['db_port'], $_POST['step1']['db_login'], urldecode($_POST['step1']['db_password']));
+                       } else {
+                               $db     = @mysql_connect($_POST['step2']['db_host'] . ':' . $_POST['step2']['db_port'], $_POST['step2']['db_login'], $_POST['step2']['db_password']);
+                       }
+
+                       $sql    = 'SELECT VERSION() AS version';
+                       $result = @mysql_query($sql, $db);
+                       $row    = @mysql_fetch_assoc($result);
+                       echo $row['version'];
+                       ?> <input type="hidden" name="log_mysql" value="<?php echo $row['version']; ?>" /></td>
+       </tr>
+       <tr>
+               <td class="row1" valign="top"><div class="optional" title="Optional Field">?</div><b>Optional URL:</b></td>
+               <td class="row1"><?php
+                       $url = 'http' . ((isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) == 'on') ? 's' : '') . '://' . $_SERVER['SERVER_NAME'] . substr($_SERVER['PHP_SELF'], 0, -strlen('install/install.php'));
+                       echo $url; ?><input type="hidden" name="log_url" value="<?php echo $url; ?>" /><br />
+               <input type="checkbox" name="log_url_yes" value="1" id="url_yes" checked="checked"/><label for="url_yes">Include this URL as well.</label></td>
+       </tr>
+       </table>
+<input type="hidden" name="log_yes" value="1" />
+<br />
+<p align="center"><input type="submit" class="button" value=" Next &raquo; " name="submit" /></p>
+
+</form>
\ No newline at end of file
diff --git a/docs/install/include/step7.php b/docs/install/include/step7.php
new file mode 100644 (file)
index 0000000..0e6c3c3
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+print_progress($step);
+
+?>
+<p><strong>Congratulations on your installation of AFrame <?php echo $new_version; ?><i>!</i></strong></p>
+
+<p>For security reasons once you have confirmed that AFrame has installed correctly, you should delete the <kbd>install/</kbd> directory,
+and reset the permissions on the config.inc.php file to read only.</p>
+
+<br />
+
+<form method="get" action="../index.php">
+       <div align="center">
+               <input type="submit" name="submit" value="&raquo; Go To AFrame!" class="button" />
+       </div>
+</form>
\ No newline at end of file
diff --git a/docs/install/include/upgrade_header.php b/docs/install/include/upgrade_header.php
new file mode 100644 (file)
index 0000000..b894f44
--- /dev/null
@@ -0,0 +1,54 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+if (!defined('AF_INCLUDE_PATH')) { exit; }\r
+\r
+error_reporting(E_ALL ^ E_NOTICE);\r
+\r
+if ($step < 5) {\r
+       error_reporting(0);\r
+       include('../include/config.inc.php');\r
+       error_reporting(E_ALL ^ E_NOTICE);\r
+       if (defined('AF_INSTALL')) {\r
+               include_once(AF_INCLUDE_PATH.'common.inc.php');\r
+               echo print_meta_redirect();\r
+               exit;\r
+       }\r
+}\r
+\r
+$new_version = $new_version ? $new_version : $_POST['step1']['new_version'];\r
+\r
+$install_steps[0] = array('name' => 'Introduction');\r
+$install_steps[1] = array('name' => 'Locate Old Version');\r
+$install_steps[2] = array('name' => 'Database');\r
+$install_steps[3] = array('name' => 'New '.$new_version.' Configuration Options');\r
+$install_steps[4] = array('name' => 'Temporary Directory');\r
+$install_steps[5] = array('name' => 'Save Configuration');\r
+$install_steps[6] = array('name' => 'Anonymous Usage Collection');\r
+$install_steps[7] = array('name' => 'Done!');\r
+\r
+\r
+?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="utf-8"> \r
+<head>\r
+<title>AChecher Upgrade</title>\r
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
+<link rel="stylesheet" href="stylesheet.css" type="text/css" />\r
+</head>\r
+\r
+<body>\r
+<div style="height: 70px; vertical-align: bottom; background: #354A81">\r
+       <h1 id="header">AChecher <?php echo $new_version; ?> Upgrade</h1>\r
+       <img src="../images/header_logo_checker.gif" height="29" width="84" alt="AChecher Logo" id="logo" />\r
+</div>\r
+<div style="clear: all"></div>\r
+<div class="content">
\ No newline at end of file
diff --git a/docs/install/include/ustep1.php b/docs/install/include/ustep1.php
new file mode 100644 (file)
index 0000000..f0817f2
--- /dev/null
@@ -0,0 +1,211 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+session_unset();       //clear session before using it
+$_SESSION = array();
+print_progress($step);
+
+if (isset($_POST['submit']) && (trim($_POST['old_path']) != '')) {
+       if ((strpos($_POST['old_path'], '/') === false) && is_dir('../../'.$_POST['old_path'])) {
+               if ( file_exists('../../'.$_POST['old_path'] . '/include/config.inc.php') ) {
+                       
+                       require('../../'.$_POST['old_path'] . '/include/constants.inc.php');
+                       $progress[] = 'Found AFrame version <kbd><b>'.VERSION . '</b></kbd> in path <kbd><b>'.$_POST['old_path'].'</b></kbd>.';
+
+                       if (!version_compare(VERSION, $new_version, '<')) {
+                               $errors[] = 'The version upgrading (<kbd><b>'.VERSION.'</b></kbd>) is not older than the new version (<kbd><b>'.$new_version.'</b></kbd>).';
+                       }
+
+                       if (!$errors) {
+                               $progress[] = 'Will be upgrading from version <kbd><b>'.VERSION.'</b></kbd> to version <kbd><b>'.$new_version.'</b></kbd>.';
+                               print_feedback($progress);
+
+                               require('../../'.$_POST['old_path'] . '/include/config.inc.php');
+
+                               echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post" name="form">';
+                               echo '<input type="hidden" name="step" value="2" />';
+                               echo '<input type="hidden" name="old_path" value="'.$_POST['old_path'].'" />';
+
+                               echo '<input type="hidden" name="db_login" value="'.urlencode(DB_USER).'" />';
+                               echo '<input type="hidden" name="db_password" value="'.urlencode(DB_PASSWORD).'" />';
+                               echo '<input type="hidden" name="db_host" value="'.DB_HOST.'" />';
+                               if (defined('DB_PORT')) {
+                                       echo '<input type="hidden" name="db_port" value="'.DB_PORT.'" />';
+                               } else {
+                                       echo '<input type="hidden" name="db_port" value="3306" />';
+                               }
+                               echo '<input type="hidden" name="db_name" value="'.DB_NAME.'" />';
+
+                               if (defined('TABLE_PREFIX')) {
+                                       echo '<input type="hidden" name="tb_prefix" value="'.TABLE_PREFIX.'" />';
+                               } else {
+                                       echo '<input type="hidden" name="tb_prefix" value="" />';
+                               }
+                               if (defined('SITE_NAME')) {
+                                       echo '<input type="hidden" name="site_name" value="'.urlencode(SITE_NAME).'" />';
+                               } else {
+                                       echo '<input type="hidden" name="site_name" value="'.$_defaults['site_name'].'" />';
+                               }
+                               if (defined('HEADER_IMAGE')) {
+                                       echo '<input type="hidden" name="header_img" value="'.HEADER_IMAGE.'" />';
+                               } else {
+                                       echo '<input type="hidden" name="header_img" value="'.$_defaults['header_img'].'" />';
+                               }
+                               if (defined('HEADER_LOGO')) {
+                                       echo '<input type="hidden" name="header_logo" value="'.HEADER_LOGO.'" />';
+                               } else {
+                                       echo '<input type="hidden" name="header_logo" value="'.$_defaults['header_logo'].'" />';
+                               }
+                               if (defined('HOME_URL')) {
+                                       echo '<input type="hidden" name="home_url" value="'.HOME_URL.'" />';
+                               } else {
+                                       echo '<input type="hidden" name="home_url" value="'.$_defaults['home_url'].'" />';
+                               }
+
+                               if (defined('MAIL_USE_SMTP')) {
+                                       echo '<input type="hidden" name="smtp" value="'.(MAIL_USE_SMTP ? 'TRUE' : 'FALSE').'" />';
+                               } else {
+                                       echo '<input type="hidden" name="smtp" value="FALSE" />';
+                               }
+                               if (defined('AF_FORCE_GET_FILE')) {
+                                       echo '<input type="hidden" name="get_file" value="'.(AF_FORCE_GET_FILE ? 'TRUE' : 'FALSE').'" />';
+                               } else {
+                                       echo '<input type="hidden" name="get_file" value="FALSE" />';
+                               }
+                               echo '<input type="hidden" name="admin_password" value="'.urlencode(ADMIN_PASSWORD).'" />';
+
+                               if (defined('ADMIN_USERNAME')) {
+                                       echo '<input type="hidden" name="admin_username" value="'.ADMIN_USERNAME.'" />';
+                               } else {
+                                       echo '<input type="hidden" name="admin_username" value="'.$_defaults['admin_username'].'" />';
+                               }
+
+                               if (defined('ADMIN_EMAIL')) {
+                                       echo '<input type="hidden" name="admin_email" value="'.ADMIN_EMAIL.'" />';
+                               } else {
+                                       echo '<input type="hidden" name="admin_email" value="'.$_defaults['admin_email'].'" />';
+                               }
+                               if (defined('EMAIL')) {
+                                       echo '<input type="hidden" name="contact_email" value="'.EMAIL.'" />';
+                               } else if (defined('ADMIN_EMAIL')) {
+                                       echo '<input type="hidden" name="contact_email" value="'.ADMIN_EMAIL.'" />';
+                               } else {
+                                       echo '<input type="hidden" name="contact_email" value="'.$_defaults['admin_email'].'" />';
+                               }
+
+                               if (defined('AF_EMAIL_CONFIRMATION')) {
+                                       echo '<input type="hidden" name="email_confirmation" value="'.(AF_EMAIL_CONFIRMATION ? 'TRUE' : 'FALSE').'" />';
+                               } else {
+                                       echo '<input type="hidden" name="email_confirmation" value="FALSE" />';
+                               }
+
+                               if (isset($MaxFileSize)) {
+                                       echo '<input type="hidden" name="max_file_size" value="'.$MaxFileSize.'" />';
+                               } else {
+                                       echo '<input type="hidden" name="max_file_size" value="'.$_defaults['max_file_size'].'" />';
+                               }
+                               
+                               echo '<input type="hidden" name="ill_ext" value="' . $_defaults['ill_ext'] . '" />';
+
+                               if (defined('CACHE_DIR')) {
+                                       echo '<input type="hidden" name="cache_dir" value="' . CACHE_DIR . '" />';
+                               } else {
+                                       echo '<input type="hidden" name="cache_dir" value="' . $_defaults['cache_dir'] . '" />';
+                               }
+
+                               if (defined('AF_TEMP_DIR')) {
+                                       echo '<input type="hidden" name="content_dir" value="'.AF_TEMP_DIR.'" />';
+                               } else {
+                                       echo '<input type="hidden" name="content_dir" value="'.$_defaults['content_dir'].'" />';
+                               }
+                               echo '<input type="hidden" name="new_version" value="'.$new_version.'" />';
+                               echo '<input type="hidden" name="old_version" value="'.VERSION.'" />';
+                               echo '<p align="center"><input type="submit" class="button" value=" Next &raquo; " name="submit" /></p></form>';
+                               return;
+                       }
+               } else {
+                       $errors[] = 'Directory was found, but the old configuration file cannot be found.';
+               }
+       } else {
+               $errors[] = 'Directory does not exist relative to the new installation.';
+       }
+}
+
+if (isset($progress)) {
+       print_feedback($progress);
+}
+
+if (isset($errors)) {
+       print_errors($errors);
+}
+
+?>
+<p>Please specify the location of the old AFrame installation.</p>
+
+<ol>
+       <li>Release Candidate (RC) installations cannot be upgraded.</li>
+       <li>Depending on the size of the existing courses, some steps (particularly 2 and 6) of the upgrade may require considerable time to complete.</li>
+       <li>All installed language packs will be deleted.</li>
+       <li>Some installed themes may not be supported by this version.</li>
+       <li>All extra modules will have to be reinstalled before they can be enabled again.</li>
+</ol>
+
+<p>Select the old AFrame installation directory below.</p>
+
+<?php
+       $dirs = scandir('../../');
+       $path = realpath('../../').'/';
+       $current_dir = basename(realpath(getcwd() .'../../'));
+       foreach ($dirs as $key => $value) {
+               if ($value == '.' || $value == '..') {
+                       unset($dirs[$key]);
+               }
+               if ($current_dir == $value) {
+                       unset($dirs[$key]);
+                       continue;
+               }
+               if (!is_dir($path . $value) || !file_exists($path . $value . '/include/config.inc.php')) {
+                       unset($dirs[$key]);
+               }
+       }
+?>
+
+<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
+<input type="hidden" name="new_version" value="<?php echo $new_version; ?>" />
+<input type="hidden" name="step" value="1" />
+
+<table width="70%" class="tableborder" cellspacing="0" cellpadding="1" border="0" align="center">
+<tr>
+       <td class="row1"><div class="required" title="Required Field">*</div><b><label for="dir">Old Directory Name:</label></b><br />
+               The old directory must be at the same level as the current directory.</td>
+               <td class="row1" valign="middle">
+               <?php if ($dirs): ?>
+                       <select name="old_path">
+                               <?php foreach ($dirs as $dir): ?>
+                                       <option value="<?php echo htmlspecialchars($dir); ?>"><?php echo $dir; ?>/</option>
+                               <?php endforeach; ?>
+                       </select>
+               <?php else: ?>
+                       <em>None found.</em>
+               <?php endif; ?>
+               </td>
+</tr>
+</table>
+
+<br />
+
+<?php if ($dirs): ?>
+       <br /><p align="center"><input type="submit" class="button" value="Next &raquo; " name="submit" /></p>
+<?php endif; ?>
+
+</form>
\ No newline at end of file
diff --git a/docs/install/include/ustep2.php b/docs/install/include/ustep2.php
new file mode 100644 (file)
index 0000000..c117461
--- /dev/null
@@ -0,0 +1,160 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+ignore_user_abort(true); 
+@set_time_limit(0); 
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+function update_one_ver($up_file) {
+       global $progress;
+       $update_file = implode('_',$up_file);
+       queryFromFile('db/'.$update_file.'sql');
+       //$progress[] = 'Successful update from version '.$up_file[2].' to '.$up_file[4];
+       return $up_file[4];
+}
+
+$_POST['db_login'] = urldecode($_POST['db_login']);
+$_POST['db_password'] = urldecode($_POST['db_password']);
+
+       unset($errors);
+
+       //check DB & table connection
+
+       $db = @mysql_connect($_POST['db_host'] . ':' . $_POST['db_port'], $_POST['db_login'], urldecode($_POST['db_password']));
+
+       if (!$db) {
+               $error_no = mysql_errno();
+               if ($error_no == 2005) {
+                       $errors[] = 'Unable to connect to database server. Database with hostname '.$_POST['db_host'].' not found.';
+               } else {
+                       $errors[] = 'Unable to connect to database server. Wrong username/password combination.';
+               }
+       } else {
+               if (!mysql_select_db($_POST['db_name'], $db)) {
+                       $errors[] = 'Unable to connect to database <b>'.$_POST['db_name'].'</b>.';
+               }
+
+               $sql = "SELECT VERSION() AS version";
+               $result = mysql_query($sql, $db);
+               $row = mysql_fetch_assoc($result);
+               if (version_compare($row['version'], '4.0.2', '>=') === FALSE) {
+                       $errors[] = 'MySQL version '.$row['version'].' was detected. AFrame requires version 4.0.2 or later.';
+               }
+
+               if (!$errors) {
+                       $progress[] = 'Connected to database <b>'.$_POST['db_name'].'</b> successfully.';
+                       unset($errors);
+
+                       //Save all the course primary language into session variables iff it has not been set. 
+//                     if (!isset($_SESSION['course_info'])){
+//                             $sql = "SELECT a.course_id, a.title, l.language_code, l.char_set FROM ".$_POST['tb_prefix']."courses a left join ".$_POST['tb_prefix']."languages l ON l.language_code = a.primary_language";
+//                             $result = mysql_query($sql, $db);
+//                             while ($row = mysql_fetch_assoc($result)){
+//                                     $_SESSION['course_info'][$row['course_id']] = array('char_set'=>$row['char_set'], 'language_code'=>$row['language_code']);
+//                             }
+//                     }
+
+                       $sql = "DELETE FROM ".$_POST['tb_prefix']."languages WHERE language_code<>'eng'";
+                       @mysql_query($sql, $db);
+
+                       //get list of all update scripts minus sql extension
+                       $files = scandir('db'); 
+                       foreach ($files as $file) {
+                               if(count($file = explode('_',$file))==5) {
+                                       $file[4] = substr($file[4],0,-3);
+                                       $update_files[$file[2]] = $file;
+                               }
+                       }
+                       
+                       $curr_ver = $_POST['old_version'];
+                       ksort($update_files);
+                       foreach ($update_files as $up_file) {
+                               if(version_compare($curr_ver, $up_file[4], '<')) {
+                                       update_one_ver($up_file);
+                               }
+                       }
+                       
+                       /* reset all the accounts to English */
+//                     $sql = "UPDATE ".$_POST['tb_prefix']."users SET language='eng', creation_date=creation_date, last_login=last_login";
+//                     @mysql_query($sql, $db);
+
+                       queryFromFile('db/language_text.sql');
+
+                       if (!$errors) {
+                               print_progress($step);
+
+                               unset($_POST['submit']);
+                               store_steps(1);
+                               print_feedback($progress);
+
+                               echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post" name="form">
+                               <input type="hidden" name="step" value="3" />
+                               <input type="hidden" name="upgrade_action" value="true" />';
+                               echo '<input type="hidden" name="db_login" value="'.urlencode($_POST['db_login']).'" />';
+                               echo '<input type="hidden" name="db_password" value="'.urlencode($_POST['db_password']).'" />';
+                               echo '<input type="hidden" name="db_host" value="'.$_POST['db_host'].'" />';
+                               echo '<input type="hidden" name="db_name" value="'.$_POST['db_name'].'" />';
+                               echo '<input type="hidden" name="db_port" value="'.$_POST['db_port'].'" />';
+                               echo '<input type="hidden" name="tb_prefix" value="'.$_POST['tb_prefix'].'" />';
+                               echo '<input type="hidden" name="old_version" value="'.$_POST['old_version'].'" />';
+                               echo '<input type="hidden" name="new_version" value="'.$_POST['new_version'].'" />';
+                               print_hidden(2);
+                               echo '<p align="center"><input type="submit" class="button" value=" Next &raquo; " name="submit" /></p></form>';
+                               return;
+                       }
+               }
+       }
+
+       print_progress($step);
+
+       unset($_POST['submit']);
+       if (isset($progress)) {
+               print_feedback($progress);
+       }
+
+       if (isset($errors)) {
+               print_errors($errors);
+       }
+
+
+       echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post" name="form">
+       <input type="hidden" name="step" value="2" />';
+       store_steps(1);
+       print_hidden(2);
+       
+       if ($found_lang) {
+?>
+<table width="60%" class="tableborder" cellspacing="0" cellpadding="1" border="0" align="center">
+<tr>
+       <td colspan="2" class="row1"><p><small>All installed language packs and changes made to the default English language will be deleted. You will have to re-install any language packs by downloading the latest versions from aframe.ca. Some language packs may not currently be available.</small></p></td>
+</tr>
+<tr>
+       <td class="row1"><small><b><label for="dir">Continue with the upgrade?</label></b></small></td>
+               <td class="row1" valign="middle" nowrap="nowrap"><input type="radio" name="override" value="1" id="c2" /><label for="c2">Yes, Continue</label>, <input type="radio" name="override" value="0" id="c1" checked="checked" /><label for="c1">No, Cancel</label></td>
+</tr>
+</table><br />
+       <?php
+       }
+
+       echo '<input type="hidden" name="db_login" value="'.urlencode($_POST['db_login']).'" />';
+       echo '<input type="hidden" name="db_password" value="'.urlencode($_POST['db_password']).'" />';
+       echo '<input type="hidden" name="db_host" value="'.$_POST['db_host'].'" />';
+       echo '<input type="hidden" name="db_name" value="'.$_POST['db_name'].'" />';
+       echo '<input type="hidden" name="db_port" value="'.$_POST['db_port'].'" />';
+       echo '<input type="hidden" name="tb_prefix" value="'.$_POST['tb_prefix'].'" />';
+       echo '<input type="hidden" name="old_version" value="'.$_POST['old_version'].'" />';
+       echo '<input type="hidden" name="new_version" value="'.$_POST['new_version'].'" />';
+
+       echo '<p align="center"><input type="submit" class="button" value=" Retry " name="submit" /></p></form>';
+       return;
+?>
\ No newline at end of file
diff --git a/docs/install/include/ustep3.php b/docs/install/include/ustep3.php
new file mode 100644 (file)
index 0000000..f78e64d
--- /dev/null
@@ -0,0 +1,52 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+$_POST['db_login']    = urldecode($_POST['db_login']);
+$_POST['db_password'] = urldecode($_POST['db_password']);
+/* Destory session */
+session_unset();
+$_SESSION= array();
+if(isset($_POST['submit']) && ($_POST['action'] == 'process')) {
+       unset($errors);
+//     $db = @mysql_connect($_POST['step1']['db_host'] . ':' . $_POST['step1']['db_port'], $_POST['step1']['db_login'], urldecode($_POST['step1']['db_password']));
+//     @mysql_select_db($_POST['step1']['db_name'], $db);
+
+       if (!isset($errors)) {
+               unset($errors);
+               unset($_POST['submit']);
+               unset($action);
+               store_steps($step);
+               $step++;
+               return;
+       }
+}
+
+print_progress($step);
+
+if (isset($errors)) {
+       print_errors($errors);
+}
+
+
+?>
+
+<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
+       <input type="hidden" name="action" value="process" />
+       <input type="hidden" name="step" value="<?php echo $step; ?>" />
+       <?php print_hidden($step); ?>
+       <p>There are no new configuration options for this version.</p>
+       <br />
+       <br />
+       <div align="center"><input type="submit" class="button" value=" Next &raquo;" name="submit" /></div>
+</form>
\ No newline at end of file
diff --git a/docs/install/include/ustep4.php b/docs/install/include/ustep4.php
new file mode 100644 (file)
index 0000000..7438050
--- /dev/null
@@ -0,0 +1,91 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+if(isset($_POST['submit'])) {
+       unset($_POST['submit']);
+       unset($action);
+       store_steps($step);
+       $step++;
+       return;
+}
+
+$file = '../include/config.inc.php';
+
+unset($errors);
+unset($progress);
+
+if ( file_exists($file) ) {
+       @chmod($file, 0666);
+       if (!is_writeable($file)) {
+               $errors[] = '<strong>' . $file . '</strong> is not writeable. Use <kbd>chmod a+rw '.$file.'</kbd> to change permissions.';
+       }else{
+               $progress[] = '<strong>' . $file . '</strong> is writeable.';
+       }
+} else {
+       $errors[] = '<strong>' . $file . '</strong> does not exist.';
+}
+
+print_progress($step);
+
+echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post" name="form">';
+
+if (isset($errors)) {
+       if (isset($progress)) {
+               print_feedback($progress);
+       }
+       print_errors($errors);
+
+       echo'<input type="hidden" name="step" value="'.$step.'" />';
+
+       unset($_POST['step']);
+       unset($_POST['action']);
+       unset($errors);
+       print_hidden($step);
+
+       echo '<p><strong>Note:</strong> To change permissions on Unix use <kbd>chmod a+rw</kbd> then the file name.</p>';
+
+       echo '<p align="center"><input type="submit" class="button" value=" Try Again " name="retry" />';
+
+} else {
+
+       if (!copy('../../'.$_POST['step1']['old_path'] . '/include/config.inc.php', '../include/config.inc.php')) {
+               echo '<input type="hidden" name="step" value="'.$step.'" />';
+
+               print_feedback($progress);
+
+               $errors[] = 'include/config.inc.php cannot be written! Please verify that the file exists and is writeable. On Unix issue the command <kbd>chmod a+rw include/config.inc.php</kbd> to make the file writeable. On Windows edit the file\'s properties ensuring that the <kbd>Read-only</kbd> attribute is <em>not</em> checked and that <kbd>Everyone</kbd> access permissions are given to that file.';
+               print_errors($errors);
+
+               echo '<p><strong>Note:</strong> To change permissions on Unix use <kbd>chmod a+rw</kbd> then the file name.</p>';
+
+               echo '<p align="center"><input type="submit" class="button" value=" Try Again " name="retry" />';
+
+       } else {
+               echo '<input type="hidden" name="step" value="'.$step.'" />';
+               print_hidden($step);
+
+               $progress[] =  'Data has been saved successfully.';
+
+               @chmod('../include/config.inc.php', 0444);
+
+               print_feedback($progress);
+
+               echo '<p align="center"><input type="submit" class="button" value=" Next &raquo; " name="submit" /></p>';
+               
+       }
+}
+
+?>
+
+</form>
\ No newline at end of file
diff --git a/docs/install/include/ustep5.php b/docs/install/include/ustep5.php
new file mode 100644 (file)
index 0000000..5bc414c
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+print_progress($step);
+
+?>
+<p><strong>Congratulations on your upgrade of AFrame <?php echo $new_version; ?><i>!</i></strong></p>
+
+<p>It is important that you login as the AFrame administrator to review and set any new System Configuration options.</p>
+<p>For security reasons,  after you have confirmed the installation was successful, it is also important that you delete the <kbd>install/</kbd> directory and reset the<kbd> /include/config.inc.php</kbd> file to read-only. On Linux/Unix systems, use <kbd>chmod a-w include/config.inc.php</kbd>.</p>
+<p>See the <a href="http://www.aframe.ca/forum/18/1.html">Support Forums</a> on <a href="http://www.aframe.ca/aframe/">aframe.ca</a> for additional help &amp; support.</p>
+
+<br />
+
+<form method="get" action="../checker/index.php">
+       <div align="center">
+               <input type="submit" name="submit" value="&raquo; Go To AFrame!" class="button" />
+       </div>
+</form>
\ No newline at end of file
diff --git a/docs/install/index.php b/docs/install/index.php
new file mode 100644 (file)
index 0000000..a334afe
--- /dev/null
@@ -0,0 +1,293 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', 'include/');
+error_reporting(E_ALL ^ E_NOTICE);
+
+require('../include/constants.inc.php');
+
+$new_version = VERSION;
+
+header('Cache-Control: no-store, no-cache, must-revalidate');
+header('Pragma: no-cache');
+
+$session_error = '';
+error_reporting(E_ALL);
+ob_start();
+session_start();
+$session_error = ob_get_contents();
+ob_end_clean();
+error_reporting(E_ALL ^ E_NOTICE);
+
+require(AF_INCLUDE_PATH.'header.inc.php');
+$bad  = '<img src="images/bad.gif" width="14" height="13" border="0" alt="Bad" title="Bad" />';
+$good = '<img src="images/feedback.gif" width="16" height="13" border="0" alt="Good" title="Good" />';
+
+$no_good = FALSE;
+$not_as_good = FALSE;
+?>
+<h3>Welcome to the AFrame Installation</h3>
+<p>This process will step you through your AFrame installation or upgrade.</p>
+<p>During this process be sure not to use your browser's <em>Refresh</em> or <em>Reload</em> feature as it may complicate the installation process.</p>
+
+<h4>Requirements</h4>
+<p>Please review the requirements below before proceeding.</p>
+               <table class="data" style="width: 75%; max-width: 600px;">
+               <tbody>
+               <tr>
+                       <th scope="col">File Integrity</th>
+                       <th scope="col">Detected</th>
+                       <th scope="col">Status</th>
+               </tr>
+               <tr>
+                       <td>Case Sensitivity</td>
+                       <td><?php if (file_exists('../include/vitals.inc.php') && file_exists('../include/VITALS.inc.php')) {
+                                               echo 'Ignored</td><td align="center">';
+                                               echo $good;
+                                       } else if (file_exists('../include/vitals.inc.php')) {
+                                               echo 'Enforced</td><td align="center">';
+                                               echo $good;
+                                       } else {
+                                               echo 'Enforced</td><td align="center">';
+                                               echo $bad;
+                                               $no_good = TRUE;
+                                       } ?></td>
+               </tr>
+               </tbody>
+               <tbody>
+               <tr>
+                       <th scope="col">PHP Options</th>
+                       <th scope="col">Detected</th>
+                       <th scope="col">Status</th>
+               </tr>
+               <tr>
+                       <td>PHP 5.0.0+</td>
+                       <td><?php echo phpversion(); ?></td>
+                       <td align="center"><?php        if (version_compare(phpversion(), '5.0.0', '>=')) {
+                                                       echo $good;
+                                               } else {
+                                                       echo $bad;
+                                                       $no_good = TRUE;
+                                               } ?></td>
+               </tr>
+               <tr>
+                       <td><kbd>mysql</kbd></td>
+                       <td><?php if (extension_loaded('mysql')) {
+                                               echo 'Enabled</td><td align="center">';
+                                               echo $good;
+                                       } else {
+                                               echo 'Disabled</td><td align="center">';
+                                               echo $bad;
+                                               $no_good = TRUE;
+                                       } ?></td>
+               </tr>
+               <tr>
+                       <td><kbd>safe_mode = Off</kbd></td>
+                       <td><?php if (ini_get('safe_mode')) {
+                                                       echo 'On</td><td align="center">'; 
+                                                       echo $bad;
+                                                       $no_good = TRUE;
+                                               } else {
+                                                       echo 'Off</td><td align="center">';
+                                                       echo $good;
+                                               } ?></td>
+               </tr>
+               <tr>
+                       <td><kbd>file_uploads = On</kbd></td>
+                       <td><?php if (ini_get('file_uploads')) {
+                                                       echo 'On</td><td align="center">';
+                                                       echo $good;
+                                               } else {
+                                                       echo 'Off</td><td align="center">';
+                                                       echo $bad;
+                                                       $no_good = TRUE;
+                                               } ?></td>
+               </tr>
+               <tr>
+                       <td><kbd>upload_max_filesize</kbd> &gt;= 2 MB</td>
+                       <td><?php echo $filesize = ini_get('upload_max_filesize'); ?></td>
+                       <td align="center"><?php 
+                               $filesize_int = intval($filesize);
+                               if ("$filesize_int" == $filesize) {
+                                       // value is in Bytes
+                                       if ($filesize_int < 2 * 1024 * 1024) {
+                                               echo $bad;
+                                       } else {
+                                               echo $good;
+                                       }
+                               } else if (stristr($filesize, 'M') !== FALSE) {
+                                       // value is in MegaBytes
+                                       if ($filesize_int < 2) {
+                                               echo $bad;
+                                       } else {
+                                               echo $good;
+                                       }
+                               } else if (stristr($filesize, 'K') !== FALSE) {
+                                       // value is in KiloBytes
+                                       if ($filesize_int < 2 * 1024) {
+                                               echo $bad;
+                                       } else {
+                                               echo $good;
+                                       }
+                               } else if (stristr($filesize, 'G') !== FALSE) {
+                                       // value is in GigaBytes
+                                       echo $good;
+                               } else {
+                                       // not set?
+                               }
+                               ?></td>
+               </tr>
+               <tr>
+                       <td><kbd>post_max_size</kbd> &gt;= 8 MB</td>
+                       <td><?php echo $filesize = ini_get('post_max_size'); ?></td>
+                       <td align="center"><?php 
+                               $filesize_int = intval($filesize);
+                               if ("$filesize_int" == $filesize) {
+                                       // value is in Bytes
+                                       if ($filesize_int < 8 * 1024 * 1024) {
+                                               echo $bad;
+                                       } else {
+                                               echo $good;
+                                       }
+                               } else if (stristr($filesize, 'M') !== FALSE) {
+                                       // value is in MegaBytes
+                                       if ($filesize_int < 8) {
+                                               echo $bad;
+                                       } else {
+                                               echo $good;
+                                       }
+                               } else if (stristr($filesize, 'K') !== FALSE) {
+                                       // value is in KiloBytes
+                                       if ($filesize_int < 8 * 1024) {
+                                               echo $bad;
+                                       } else {
+                                               echo $good;
+                                       }
+                               } else if (stristr($filesize, 'G') !== FALSE) {
+                                       // value is in GigaBytes
+                                       echo $good;
+                               } else {
+                                       // not set?
+                               }
+                               ?></td>
+               </tr>
+               <tr>
+                       <td><kbd>.</kbd> in <kbd>include_path</kbd></td>
+                       <td><?php
+                               $include_path = explode(PATH_SEPARATOR, ini_get('include_path'));
+                               if (in_array('.', $include_path)) {
+                                       echo 'Enabled</td><td align="center">';
+                                       echo $good;
+                               } else {
+                                       echo 'Disabled</td><td align="center">';
+                                       echo $bad;
+                                       $no_good = TRUE;                                        
+                               }
+                       ?></td>
+               </tr>
+               </tbody>
+               <tbody>
+               <tr>
+                       <th scope="col">MySQL Options</th>
+                       <th scope="col">Detected</th>
+                       <th scope="col">Status</th>
+               </tr>
+               <tr>
+                       <td>MySQL 4.1.10+</td>
+                       <td><?php if (defined('MYSQL_NUM')) {
+                                               $mysql_version = mysql_get_client_info();
+                                               echo 'Found  Version '.$mysql_version.'</td><td align="center">';
+                                               echo $good;
+                                       } else {
+                                               echo 'Not Found</td><td align="center">';
+                                               echo $bad;
+                                               $no_good = TRUE;
+                                       } ?></td>
+               </tr>
+               </tbody>
+               </table>
+<br />
+
+<?php if ($no_good): ?>
+       <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
+       <tr>
+               <td class="row1"><strong>Your server does not meet the minimum requirements!<br />
+                                               Please correct the above errors to continue.</strong></td>
+       </tr>
+       </table>
+<?php elseif ($not_as_good): ?>
+       <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
+       <tr>
+               <td class="row1"><strong>AFrame has indicated that the 'mbstring' library is missing from the PHP.  <br />
+                                               We strongly encourage you to install the 'mbstring' library before continuing, however, if you choose not to install the library from PHP, a third party library within AFrame will be used.  <br/><br/>
+                                               For production systems, we strongly encourage you to install the PHP with <a href="http://ca.php.net/manual/en/ref.mbstring.php" target="php_site">mbstring</a> support.  <br/><br/>
+                                               You may choose to by pass the mbstring check for the installation at your own risk by clicking <a href="javascript:void(0);" onclick="javascript:document.form.next.disabled=false;">continue</a>.</strong></td>
+               <td class="row1"></td>
+       </tr>
+       <tr>
+               <td align="right" class="row1" nowrap="nowrap"><strong>New Installation &raquo;</strong></td>
+               <td class="row1" width="150" align="center">
+               <div id=''>
+                       <form action="install.php" method="post" name="form">
+                       <input type="hidden" name="new_version" value="<?php echo $new_version; ?>" />
+                       <input type="submit" class="button" value="  Install  " name="next" disabled="disabled" />
+                       </form>
+               </div>
+               </td>
+       </tr>
+       </table>
+       <table cellspacing="0" cellpadding="10" align="center" width="45%">
+       <tr>
+               <td align="center"><b>Or</b></td>
+       </tr>
+       </table>
+       <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
+       <tr>
+               <td class="row1"><strong>Upgrading from previous AFrame must have mbstring library installed.</strong></td>
+               <td class="row1"></td>
+       </tr>
+       <tr>
+               <td align="right" class="row1" nowrap="nowrap"><strong>Upgrade an Existing Installation &raquo;</strong></td>
+               <td class="row1" width="150" align="center">
+                       <input type="button" class="button" value="Upgrade" name="next" disabled="disabled"/>
+               </td>
+       </tr>
+       </table>
+<?php else: ?>
+       <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
+       <tr>
+               <td align="right" class="row1" nowrap="nowrap"><strong>New Installation &raquo;</strong></td>
+               <td class="row1" width="150" align="center"><form action="install.php" method="post" name="form">
+               <input type="hidden" name="new_version" value="<?php echo $new_version; ?>" />
+               <input type="submit" class="button" value="  Install  " name="next" />
+               </form></td>
+       </tr>
+       </table>
+       
+       <table cellspacing="0" cellpadding="10" align="center" width="45%">
+       <tr>
+               <td align="center"><b>Or</b></td>
+       </tr>
+       </table>
+       <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
+       <tr>
+               <td align="right" class="row1" nowrap="nowrap"><strong>Upgrade an Existing Installation &raquo;</strong></td>
+               <td class="row1" width="150" align="center"><form action="upgrade.php" method="post" name="form">
+               <input type="hidden" name="new_version" value="<?php echo $new_version; ?>" />
+               <input type="submit" class="button" value="Upgrade" name="next" />
+               </form></td>
+       </tr>
+       </table>
+       
+<?php endif; ?>
+
+<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
diff --git a/docs/install/install.php b/docs/install/install.php
new file mode 100644 (file)
index 0000000..7845fd5
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', 'include/');
+require(AF_INCLUDE_PATH.'common.inc.php');
+
+if (!$new_version = $_POST['new_version']) {
+       $new_version = $_POST['step2']['new_version'];
+}
+
+$step = intval($_POST['step']);
+
+if ($step == 0) {
+       $step = 1;
+}
+
+if ($_POST['submit'] == 'I Disagree'){
+       Header ("Location: index.php");
+}
+
+require(AF_INCLUDE_PATH.'header.inc.php');
+
+/* agree to terms of use */
+if ($step == 1) {
+       require(AF_INCLUDE_PATH.'step1.php');
+}
+
+/* db */
+if ($step == 2) {
+       require(AF_INCLUDE_PATH.'step2.php');
+}
+
+/* create admin accounts and sytem preference */
+if ($step == 3) {      
+       require(AF_INCLUDE_PATH.'step3.php');
+}
+
+/* accounts & preferences */
+if ($step == 4) {      
+       require(AF_INCLUDE_PATH.'step4.php');
+}
+
+/* directory permissions and generating the config.inc.php file */
+if ($step == 5) {      
+       require(AF_INCLUDE_PATH.'step5.php');
+}
+
+/* anonymous data collection */
+if ($step == 6) {      
+       require(AF_INCLUDE_PATH.'step6.php');
+}
+
+/* done! */
+if ($step == 7) {      
+       require(AF_INCLUDE_PATH.'step7.php');
+}
+
+require(AF_INCLUDE_PATH.'footer.inc.php');
+?>
\ No newline at end of file
diff --git a/docs/install/not_installed.php b/docs/install/not_installed.php
new file mode 100644 (file)
index 0000000..5f2a949
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', 'include/');
+error_reporting(E_ALL ^ E_NOTICE);
+
+require('../include/constants.inc.php');
+
+$new_version = VERSION;
+
+header('Cache-Control: no-store, no-cache, must-revalidate');
+header('Pragma: no-cache');
+
+require(AF_INCLUDE_PATH.'header.inc.php');
+?>
+
+
+<p>AFrame does not appear to be installed. <a href="index.php">Continue on to the installation</a>.</p>
+
+
+<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/install/stylesheet.css b/docs/install/stylesheet.css
new file mode 100644 (file)
index 0000000..f931b84
--- /dev/null
@@ -0,0 +1,502 @@
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto                     */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/* main body attributes */
+body {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       color: black;
+       background-color: white;
+       background-image: url();
+       margin-bottom: 0px;
+       margin-top: 0px;
+       margin-left: 0px;
+       margin-right: 0px;
+       font-size: small;
+}
+
+code {
+       font-size: x-small;
+       color: black;
+}
+
+kbd {
+  padding: 0px 1px 0px 1px;
+  border-width: 1px 2px 2px 1px;
+  border-style: solid;
+  background: #faf6f6;
+  color: #000;
+  border-color:  #edd #baa #baa #eed;
+  font-size: small;
+  white-space: nowrap;
+}
+
+/* paragraph attributes */
+p {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       color: black;
+       margin-bottom: 10px;
+       margin-top: 0px;
+       margin-left: 5px;
+       margin-right: 0px;
+       font-size: small;
+}
+
+p.heading {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       font-weight: bold;
+       font-size: 1em;
+       color: black;
+       margin-bottom: 10px;
+       margin-top: 0px;
+       margin-left: 5px;
+       margin-right: 0px;
+}
+
+p.error {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       font-weight: bold;
+       color: red;
+       margin-bottom: 10px;
+       margin-top: 0px;
+       margin-left: 5px;
+       margin-right: 0px;
+}
+
+h1#header {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       color: white;
+       float: left;
+       display: inline;
+       margin: 10px;
+}
+
+
+/* list attributes */
+ul {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       margin-bottom: 5px;
+       margin-top: 0px;
+       margin-right: 0px;
+}
+
+li {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       margin-bottom: 0px;
+       margin-top: 0px;
+       margin-right: 0px;
+}
+li.important{
+       color: red;
+}
+
+/* link attributes */
+a:link {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       color: #384F89;
+       border-bottom: 1px solid #384F89;
+       text-decoration: none;
+}
+a:visited {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       color: #51286C;
+}
+a:hover {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       color: black;
+}
+
+/* formfield attributes */
+.formfield {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       color: black;
+       border:  #003399  solid 1px;
+       padding: 2px;
+}
+
+.formfield:focus {
+       border:  #0033FF  solid 1px;
+}
+
+form {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       margin-bottom: 0px;
+       margin-top: 0px;
+       margin-left: 0px;
+       margin-right: 0px;
+}
+
+/* main submit button */
+.button {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-color: #F8F8F8;
+       font-weight: bold;
+       border:  #354A81  solid 1px;
+}
+.button:hover, .button:focus {
+       cursor: pointer;
+       border:  #354AFF solid 1px;
+       color:  #0000FF;
+}
+
+/* small submit button at top */
+.button2 {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-color: #F8F8F8;
+       font-size: 0.7em;
+       border-top:  #354A81  solid 1px;
+       border-bottom: #354A81  solid 1px;
+       border-right: #354A81  solid 1px;
+       border-left: #354A81  solid 1px;
+}
+
+/* table border */
+.tableborder {
+       border-left: 1px #98AAB1 solid;
+       border-right: 1px #98AAB1 solid;
+       border-top: 1px #98AAB1 solid;
+}
+
+/* user menu at top */
+.topbar {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-image: url('images/cellpic1.gif');
+       background-repeat: repeat-x;
+       background-color: #D1D7DC;
+       text-align: center;
+       padding: 3px;
+}
+
+/* breadcrumbs */
+td.breadcrumbs {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-image: url('images/cellpic3.gif');
+       color: #FFFFFF;
+       background-color: #006699;
+       height: 26px;
+}
+.breadcrumbs { 
+       font-family: Verdana, Arial, Helvetica, sans-serif; 
+       color: white
+       text-decoration: none;  
+       letter-spacing: 1px; 
+}
+a.breadcrumbs { 
+       font-family: Verdana, Arial, Helvetica, sans-serif; 
+       color: #CCCCCC;
+       text-decoration: none;  
+}
+a.breadcrumbs:hover { 
+       font-family: Verdana, Arial, Helvetica, sans-serif; 
+       color: #CCCC00;
+       text-decoration: none; 
+}
+a.breadcrumbs:visited {
+       font-family: Verdana, Arial, Helvetica, sans-serif; 
+       color : #CCCCCC;
+       text-decoration: none; 
+}
+
+/* 
+td.rowpic {
+               background-color: #FFFFFF;
+               background-image: url('images/cellpic2.jpg');
+               background-repeat: repeat-y;
+}
+*/
+
+/* the menu */
+td.row1, table.row1 { 
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       font-weight: normal;
+       background-color: #EFEFEF;
+       vertical-align: top;    
+       padding: 8px;
+       border-bottom: 1px #98AAB1 solid;
+}
+
+/* menu titles*/
+td.cat, th {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-image: url('images/cellpic1.gif');
+       background-repeat: repeat-x;
+       background-color:#D1D7DC; 
+       height: 25px;
+       text-align: center;
+       font-weight: bold;
+       padding-top: 3px;
+       padding-left: 5px;
+       padding-right: 5px;
+       white-space: nowrap;
+}
+td.cat2 {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-image: url('images/cellpic1.gif');
+       background-repeat: repeat;
+       text-align: center;
+       font-weight: bold;
+       padding: 1px;
+       border: 1px #98AAB1 solid;
+}
+td.cat2b {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-image: url('images/cellpic1.gif');
+       background-repeat: repeat;
+       text-align: center;
+       font-weight: bold;
+       height: 27px;
+       padding: 1px;
+       border: 1px #98AAB1 solid;
+}
+td.cat2c {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-image: url('images/cellpic1.gif');
+       background-repeat: repeat;
+       text-align: center;
+       font-weight: bold;
+       height: 27px;
+       padding: 1px;
+       border: 1px #98AAB1 solid;
+}
+td.cat2d {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-image: url('images/cellpic1.gif');
+       background-repeat: repeat;
+       text-align: center;
+       font-weight: bold;
+       height: 27px;
+       padding: 1px;
+       border: 1px #98AAB1 solid;
+}
+td.cat2e {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-image: url('images/cellpic1.gif');
+       background-repeat: repeat;
+       text-align: center;
+       font-weight: bold;
+       height: 27px;
+       padding: 1px;
+       border: 1px #98AAB1 solid;
+}
+table.cat2 {
+font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-image: url('images/cellpic1.gif');
+       background-repeat: repeat-x;
+       /*Remove this attribute, to fix Opera menu display problem*/
+       /*height: 27px;*/
+       text-align: center;
+       font-weight: bold;
+       border: 1px #98AAB1 solid;
+}
+table.cat3 {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-color: ;
+}
+
+/* various line breaks */
+td.row2 { 
+       background-color: #98AAB1; 
+       font-weight: normal;
+       height: 1px;
+}
+td.row3 {
+       background-color: #006699;
+       font-weight: normal;
+       height: 1px;
+}
+td.row4 {
+       background-color: #f3f3f2;
+       font-weight: normal;
+       height: 1px;
+}
+
+/* align text to the left */
+.left {
+       text-align: left;
+}
+
+/* pipe attribute  */
+.spacer {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       color: #006699;
+       font-size: 0.65em;
+}
+
+/* previous/next text attribute */
+.bigspacer {
+       color: #006699;
+}
+
+.bodyline { 
+       background-color: #FFFFFF; 
+       border: 1px #98AAB1 solid; 
+}
+/* date attributes */
+small.date {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       color: #006699; 
+       margin-bottom: 0px;
+       margin-top: 0px;
+       margin-left: 5px;
+       margin-right: 0px;
+       font-size: 0.7em;
+}
+
+.menuimage {
+       vertical-align: middle;
+       margin-top: 0px;
+}
+
+/* page breakline */
+hr {
+       color: #98AAB1;
+       background-color: white;
+       height: 1px;
+}
+
+/* box around a forum reply */
+.block {
+       position: relative;
+       font-size: 0.9em;
+       background-color: #FFFFFF;
+       border: 1px dotted #98AAB1;
+       padding: 5px;
+       margin-right: 5px;
+       margin-left: 15px;
+       margin-bottom: 0px;
+}
+
+
+select.dropdown {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+    background-color: #F1F3F1;                            
+}                                                             
+  
+h1, h2, h3, h4, h5, h6 {
+       margin-top: 0px;
+       margin-bottom: 0px;
+       margin-left: 5px;
+}
+
+h3 {
+       border-bottom: 1px solid #354A81;
+}
+
+
+.content {
+       padding: 20px;
+       font-size: small;
+}
+
+/* error box */
+table.errbox{
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-color: #FF0000;
+       border: 2px #EEEEEE solid;
+}
+tr.errbox {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-color: white;
+       vertical-align:top;
+       font-size: smaller;
+}
+h3.err {
+       color: red;
+       border: 0px;
+}
+
+h3.good {
+       color: green;
+       border: 0px;
+}
+
+
+ /* feedback box */
+table.fbkbox{
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-color: #30B626;
+       border: 2px #EEEEEE solid;
+}
+tr.fbkbox{
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       background-color: white;
+       vertical-align: top;
+       font-size: smaller;
+}
+img#logo {
+       padding: 10px;
+       background-color: #eeeeee;
+       border: 1px solid #cccccc;
+       margin: 10px;
+       float: right;
+}
+
+div.install {
+       border: 1px solid #354A81;
+}
+
+div.install h3 {
+       background-color: #354A81;
+       margin-left: 0px;
+       padding: 2px;
+       color: white;
+       border: 0px;
+}
+div.install p {
+       font-size: small;
+}
+div.suggested {
+       font-weight: bold;
+       color: blue;
+       border: 1px solid #e3e3e3;
+}
+
+/* for data tables */
+table.data {
+       border: 1px solid #f0f0f0;
+       width: 90%; 
+       margin-left: auto;
+       margin-right: auto;
+       border-spacing: 0px;
+       border-collapse: collapse;
+} 
+
+table.data th {
+       background-color: #fafafa;
+       border-bottom: 1px solid #f0f0f0;
+       padding: 2px;
+       white-space: nowrap;
+       border-top: 1px solid #f0f0f0;
+}
+
+table.data td {
+       padding: 3px;
+}
+
+div.required {
+       font-weight: bold;
+       color: red;
+       font-size: x-large;
+       float: left;
+       position: relative;
+       margin-top: -3px;
+       height: 15px;
+       padding-right: 0px;
+}
+div.optional {
+       font-weight: bold;
+       color: red;
+       font-size: large;
+       float: left;
+       position: relative;
+       margin-top: -3px;
+       height: 15px;
+       padding-right: 3px;
+}
\ No newline at end of file
diff --git a/docs/install/upgrade.php b/docs/install/upgrade.php
new file mode 100644 (file)
index 0000000..37379ae
--- /dev/null
@@ -0,0 +1,74 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', '../include/');
+
+if (isset($_POST['new_version'])) {
+       $new_version = $_POST['new_version'];
+}
+
+if (isset($_POST['step'])) {
+       $step = intval($_POST['step']);
+}
+
+if (!isset($step) || ($step == 0)) {
+       $step = 1;
+}
+
+require('include/common.inc.php');
+
+if (($step == 2) && isset($_POST['override']) && ($_POST['override'] == 0)) {
+       header('Location: index.php');
+       exit;
+}
+session_start();
+require('include/upgrade_header.php');
+
+if ($step == 1) {
+       if (!$new_version) {
+               echo 'You cannot access this page directly. <a href="index.php">Upgrade from here</a> using the <em>Upgrade</em> button.';
+               require('include/footer.php');
+               exit;
+       }
+       // in:  select directory
+       // out: confirm verions
+       require('include/ustep1.php');
+}
+if ($step == 2) {
+       // in:  update database
+       // out: -
+       require('include/ustep2.php');
+}
+if ($step == 3) {
+       // in:  display version specific notices
+       // out: update database with new options
+       require('include/ustep3.php');
+}
+if ($step == 4) {
+       // in:  determine where the old content dir is and if it has to be copied
+       // out: try to create the directory and set permissions
+       require('include/step4.php');
+}
+if ($step == 5) {
+       // in:  copy the config file
+       // out: -
+       require('include/ustep4.php');
+}
+/* anonymous data collection */
+if ($step == 6) {      
+       require('include/step6.php');
+}
+if ($step == 7) {
+       require('include/ustep5.php');
+}
+require('include/footer.inc.php');
+?>
\ No newline at end of file
diff --git a/docs/language/index.php b/docs/language/index.php
new file mode 100644 (file)
index 0000000..67b2b6e
--- /dev/null
@@ -0,0 +1,73 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');\r
+include_once(AF_INCLUDE_PATH.'classes/Language/LanguageEditor.class.php');\r
+\r
+$languagesDAO = new LanguagesDAO();\r
+\r
+if (isset($_POST['id']))\r
+{\r
+       $pieces = explode('_', $_POST['id'], 2);\r
+       $lang_code = $pieces[0];\r
+}\r
+\r
+if ( (isset($_POST['delete']) || isset($_POST['export']) || isset($_POST['edit'])) && !isset($_POST['id']))\r
+{\r
+       $msg->addError('NO_ITEM_SELECTED');\r
+} \r
+else if ($_POST['delete'])\r
+{\r
+       global $msg;\r
+\r
+       if ($lang_code == DEFAULT_LANGUAGE_CODE)\r
+       {\r
+               $msg->addError(array('CANNOT_DEL_DEFAULT_LANG', DEFAULT_LANGUAGE_CODE));\r
+       }\r
+       \r
+       if (!$msg->containsErrors())\r
+       {\r
+               $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');\r
+               header('Location: language_delete.php?id='.$_POST['id']);\r
+               exit;\r
+       }\r
+}\r
+else if ($_POST['edit'])\r
+{\r
+       header('Location: language_add_edit.php?id='.$_POST['id']);\r
+       exit;\r
+}\r
+else if (isset($_POST['export'])) \r
+{\r
+       $language =& $languageManager->getLanguage($lang_code);\r
+       if ($language === FALSE) {\r
+               $msg->addError('ITEM_NOT_FOUND');\r
+       } else {\r
+               $languageEditor = new LanguageEditor($language);\r
+               $languageEditor->export();\r
+       }\r
+}\r
+\r
+if (isset($_POST['import']) && is_uploaded_file($_FILES['file']['tmp_name'])) {\r
+       $languageManager->import($_FILES['file']['tmp_name']);\r
+\r
+       header('Location: index.php');\r
+       exit;\r
+}\r
+\r
+// interface\r
+$savant->assign('rows', $languagesDAO->getAll());\r
+$savant->display('language/index.tmpl.php');\r
+\r
+?>\r
diff --git a/docs/language/index_inline_editor_submit.php b/docs/language/index_inline_editor_submit.php
new file mode 100644 (file)
index 0000000..16bd971
--- /dev/null
@@ -0,0 +1,34 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');\r
+\r
+if ($_POST['value'] == '')\r
+{\r
+       $rtn['status'] = 'fail';\r
+       $rtn['error'][] = _AT('AF_ERROR_EMPTY_FIELD');\r
+}\r
+\r
+if (isset($_POST['field']) && isset($_POST['value']) && $_POST['value'] <> '')\r
+{\r
+       $languagesDAO = new LanguagesDAO();\r
+\r
+       // Format of $_POST['field']: [fieldName]|[language_code]|[charset]\r
+       $pieces = explode(':', $_POST['field']);\r
+       $languagesDAO->UpdateField($pieces[1], $pieces[2], $pieces[0], $_POST['value']);\r
+       $rtn['status'] = 'success';\r
+}\r
+\r
+echo json_encode($rtn);\r
+?>\r
diff --git a/docs/language/language_add_edit.php b/docs/language/language_add_edit.php
new file mode 100644 (file)
index 0000000..1fdaa91
--- /dev/null
@@ -0,0 +1,88 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/LangCodesDAO.class.php');\r
+include_once(AF_INCLUDE_PATH.'classes/Language/LanguageUtility.class.php');\r
+\r
+if (isset($_GET["id"])) \r
+{\r
+       $pieces = explode('_', $_GET['id'], 2);\r
+       $lang_code = $pieces[0];\r
+       $charset = $pieces[1];\r
+}\r
+\r
+$languagesDAO = new LanguagesDAO();\r
+$langCodesDAO = new LangCodesDAO();\r
+\r
+// handle submits\r
+if (isset($_POST['cancel'])) \r
+{\r
+       $msg->addFeedback('CANCELLED');\r
+       header('Location: index.php');\r
+       exit;\r
+} \r
+else if (isset($_POST['save']))\r
+{\r
+       if (isset($_GET["id"]))  // edit existing guideline\r
+       {\r
+               if ($languagesDAO->Update($lang_code, \r
+                                     $charset,\r
+                                     '',\r
+                                     $addslashes(trim($_POST['native_name'])),\r
+                                     $addslashes(trim($_POST['english_name'])),\r
+                                     $_POST['status']))\r
+               {\r
+                       $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');\r
+                       header('Location: index.php');\r
+                       exit;\r
+               }\r
+       }\r
+       else  // create a new guideline\r
+       {\r
+               if (isset($_POST['locale']) && $_POST['locale'] <> '')\r
+                       $language_code = $_POST['lang_code'] . AF_LANGUAGE_LOCALE_SEP. $_POST['locale'];\r
+               else\r
+                       $language_code = $_POST['lang_code'];\r
+\r
+               if ($languagesDAO->Create($language_code, \r
+                                     $addslashes(trim($_POST['charset'])),\r
+                                     '',\r
+                                     $addslashes(trim($_POST['native_name'])),\r
+                                     $addslashes(trim($_POST['english_name'])),\r
+                                     $_POST['status']))\r
+               {\r
+                       $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');\r
+                       header('Location: index.php');\r
+                       exit;\r
+               }\r
+       }\r
+}\r
+\r
+// interface display\r
+if (isset($lang_code) && isset($charset))\r
+{\r
+       // edit existing guideline\r
+       $row = $languagesDAO->getByLangCodeAndCharset($lang_code, $charset);\r
+       $row['lang_code'] = LanguageUtility::getParentCode($row['language_code']);\r
+       $row['locale'] = LanguageUtility::getLocale($row['language_code']);\r
+\r
+       $savant->assign('row', $row);\r
+}\r
+\r
+$savant->assign('rows_lang', $langCodesDAO->GetAll());\r
+\r
+$savant->display('language/language_add_edit.tmpl.php');\r
+?>\r
diff --git a/docs/language/language_delete.php b/docs/language/language_delete.php
new file mode 100644 (file)
index 0000000..4d73ee4
--- /dev/null
@@ -0,0 +1,54 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');\r
+\r
+if (isset($_REQUEST['id']))\r
+{\r
+       $pieces = explode('_', $_REQUEST['id'], 2);\r
+       $lang_code = $pieces[0];\r
+       $charset = $pieces[1];\r
+}\r
+\r
+$languagesDAO = new LanguagesDAO();\r
+\r
+if (isset($_POST['submit_no'])) \r
+{\r
+       $msg->addFeedback('CANCELLED');\r
+       header('Location: index.php');\r
+       exit;\r
+} \r
+else if (isset($_POST['submit_yes']))\r
+{\r
+       if ($languagesDAO->Delete($lang_code))\r
+       {\r
+               $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');\r
+               header('Location: index.php');\r
+               exit;\r
+       }\r
+}\r
+\r
+$row = $languagesDAO->getByLangCodeAndCharset($lang_code, $charset);\r
+\r
+unset($hidden_vars);\r
+$hidden_vars['id'] = $_REQUEST['id'];\r
+\r
+require(AF_INCLUDE_PATH.'header.inc.php');\r
+\r
+$msg->addConfirm(array('DELETE_LANG', $row['native_name']), $hidden_vars);\r
+$msg->printConfirm();\r
+\r
+require(AF_INCLUDE_PATH.'footer.inc.php');\r
+?>\r
diff --git a/docs/login.php b/docs/login.php
new file mode 100644 (file)
index 0000000..f7c2e8c
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', 'include/');
+require (AF_INCLUDE_PATH.'vitals.inc.php');
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/UsersDAO.class.php');
+
+$usersDAO = new UsersDAO();
+
+// $_SESSION['token'] is used to encrypt the password from web form
+if (!isset($_SESSION['token']))
+       $_SESSION['token'] = sha1(mt_rand() . microtime(TRUE));
+
+if (isset($_POST['submit']))
+{
+       $user_id = $usersDAO->Validate($addslashes($_POST['form_login']), $addslashes($_POST['form_password_hidden']));
+
+       if (!$user_id)
+       {
+               $msg->addError('INVALID_LOGIN');
+       }
+       else
+       {
+               if ($usersDAO->getStatus($user_id) == AF_STATUS_DISABLED)
+               {
+                       $msg->addError('ACCOUNT_DISABLED');
+               }
+               else
+               {
+                       $usersDAO->setLastLogin($user_id);
+                       $_SESSION['user_id'] = $user_id;
+                       $msg->addFeedback('LOGIN_SUCCESS');
+                       header('Location: index.php');
+                       exit;
+               }
+       }
+       
+}
+
+global $onload;
+$onload = 'document.form.form_login.focus();';
+
+//header('P3P: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"');
+$savant->display('login.tmpl.php');
+?>
diff --git a/docs/logout.php b/docs/logout.php
new file mode 100644 (file)
index 0000000..cfee0f5
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', 'include/');
+require(AF_INCLUDE_PATH.'vitals.inc.php');
+
+// unset all session variables
+session_unset();
+$_SESSION = array();
+
+$msg->addFeedback('LOGOUT');
+header('Location: index.php');
+exit;
+?>
\ No newline at end of file
diff --git a/docs/oauth/access_token.php b/docs/oauth/access_token.php
new file mode 100644 (file)
index 0000000..9a2cdb8
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+define('AF_INCLUDE_PATH', '../include/');
+require_once(AF_INCLUDE_PATH.'vitals.inc.php');
+require_once("common.inc.php");
+
+try {
+       $req = OAuthRequest::from_request();
+       $token = $oauth_server->fetch_access_token($req);
+       print $token;
+} catch (OAuthException $e) {
+       print($e->getMessage() . "\n<hr />\n");
+       print_r($req);
+       die();
+}
+
+?>
diff --git a/docs/oauth/authorization.php b/docs/oauth/authorization.php
new file mode 100644 (file)
index 0000000..444132d
--- /dev/null
@@ -0,0 +1,78 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+//// unset $_SESSION['user_id'] to avoid page redirecting in vitals.inc.php
+//if (isset($_SESSION['user_id']))
+//{
+//     $_SESSION['current_user'] = $_SESSION['user_id'];
+//     unset($_SESSION['user_id']);
+//}
+
+define('AF_INCLUDE_PATH', '../include/');
+require (AF_INCLUDE_PATH.'vitals.inc.php');
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/UsersDAO.class.php');
+require_once(AF_INCLUDE_PATH. 'classes/DAO/OAuthServerTokensDAO.class.php');
+
+$usersDAO = new UsersDAO();
+$oAuthServerTokensDAO = new OAuthServerTokensDAO();
+
+// Validation input parameters
+if ($_REQUEST['oauth_token'] == '')
+{
+       echo 'error='.urlencode('Empty oauth token.');
+       exit;
+}
+
+$token_row = $oAuthServerTokensDAO->getByTokenAndType($_REQUEST['oauth_token'], 'request');
+if (!is_array($token_row))
+{
+       echo 'error='.urlencode('Invalid oauth token.');
+       exit;
+}
+
+// $_SESSION['token'] is used to encrypt the password from web form
+if (!isset($_SESSION['token']))
+       $_SESSION['token'] = sha1(mt_rand() . microtime(TRUE));
+
+if (isset($_POST['submit']))
+{
+       $user_id = $usersDAO->Validate($addslashes($_POST['form_login']), $addslashes($_POST['form_password_hidden']));
+
+       if (!$user_id)
+       {
+               $msg->addError('INVALID_LOGIN');
+       }
+       else
+       {
+               if ($usersDAO->getStatus($user_id) == AF_STATUS_DISABLED)
+               {
+                       $msg->addError('ACCOUNT_DISABLED');
+               }
+               else
+               {
+                       $oAuthServerTokensDAO->updateUserIDByToken($_REQUEST['oauth_token'], $user_id);
+                       
+                       if (isset($_REQUEST['oauth_callback']))
+                               header('Location: '.$_REQUEST['oauth_callback']);
+                       else
+                               echo 'User is authenticated successfully.';
+                       
+                       exit;
+               }
+       }
+       
+}
+
+//header('P3P: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"');
+$savant->display('login.tmpl.php');
+?>
diff --git a/docs/oauth/classes/MyOAuthServer.class.php b/docs/oauth/classes/MyOAuthServer.class.php
new file mode 100644 (file)
index 0000000..5f1b84c
--- /dev/null
@@ -0,0 +1,150 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+if (!defined('AF_INCLUDE_PATH')) exit;\r
+\r
+require_once(AF_INCLUDE_PATH."../oauth/lib/OAuth.php");\r
+require_once(AF_INCLUDE_PATH.'classes/DAO/OAuthServerConsumersDAO.class.php');\r
+require_once(AF_INCLUDE_PATH.'classes/DAO/OAuthServerTokensDAO.class.php');\r
+require_once(AF_INCLUDE_PATH.'classes/Utility.class.php');\r
+\r
+class MyOAuthServer extends OAuthServer {\r
+  public function get_signature_methods() {\r
+    return $this->signature_methods;\r
+  }\r
+}\r
+\r
+class MyOAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod_RSA_SHA1 {\r
+  public function fetch_private_cert(&$request) {\r
+    $cert = <<<EOD\r
+-----BEGIN PRIVATE KEY-----\r
+MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALRiMLAh9iimur8V\r
+A7qVvdqxevEuUkW4K+2KdMXmnQbG9Aa7k7eBjK1S+0LYmVjPKlJGNXHDGuy5Fw/d\r
+7rjVJ0BLB+ubPK8iA/Tw3hLQgXMRRGRXXCn8ikfuQfjUS1uZSatdLB81mydBETlJ\r
+hI6GH4twrbDJCR2Bwy/XWXgqgGRzAgMBAAECgYBYWVtleUzavkbrPjy0T5FMou8H\r
+X9u2AC2ry8vD/l7cqedtwMPp9k7TubgNFo+NGvKsl2ynyprOZR1xjQ7WgrgVB+mm\r
+uScOM/5HVceFuGRDhYTCObE+y1kxRloNYXnx3ei1zbeYLPCHdhxRYW7T0qcynNmw\r
+rn05/KO2RLjgQNalsQJBANeA3Q4Nugqy4QBUCEC09SqylT2K9FrrItqL2QKc9v0Z\r
+zO2uwllCbg0dwpVuYPYXYvikNHHg+aCWF+VXsb9rpPsCQQDWR9TT4ORdzoj+Nccn\r
+qkMsDmzt0EfNaAOwHOmVJ2RVBspPcxt5iN4HI7HNeG6U5YsFBb+/GZbgfBT3kpNG\r
+WPTpAkBI+gFhjfJvRw38n3g/+UeAkwMI2TJQS4n8+hid0uus3/zOjDySH3XHCUno\r
+cn1xOJAyZODBo47E+67R4jV1/gzbAkEAklJaspRPXP877NssM5nAZMU0/O/NGCZ+\r
+3jPgDUno6WbJn5cqm8MqWhW1xGkImgRk+fkDBquiq4gPiT898jusgQJAd5Zrr6Q8\r
+AO/0isr/3aa6O6NLQxISLKcPDk2NOccAfS/xOtfOz4sJYM3+Bs4Io9+dZGSDCA54\r
+Lw03eHTNQghS0A==\r
+-----END PRIVATE KEY-----\r
+EOD;\r
+    return $cert;\r
+  }\r
+\r
+  public function fetch_public_cert(&$request) {\r
+    $cert = <<<EOD\r
+-----BEGIN CERTIFICATE-----\r
+MIIBpjCCAQ+gAwIBAgIBATANBgkqhkiG9w0BAQUFADAZMRcwFQYDVQQDDA5UZXN0\r
+IFByaW5jaXBhbDAeFw03MDAxMDEwODAwMDBaFw0zODEyMzEwODAwMDBaMBkxFzAV\r
+BgNVBAMMDlRlc3QgUHJpbmNpcGFsMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB\r
+gQC0YjCwIfYoprq/FQO6lb3asXrxLlJFuCvtinTF5p0GxvQGu5O3gYytUvtC2JlY\r
+zypSRjVxwxrsuRcP3e641SdASwfrmzyvIgP08N4S0IFzEURkV1wp/IpH7kH41Etb\r
+mUmrXSwfNZsnQRE5SYSOhh+LcK2wyQkdgcMv11l4KoBkcwIDAQABMA0GCSqGSIb3\r
+DQEBBQUAA4GBAGZLPEuJ5SiJ2ryq+CmEGOXfvlTtEL2nuGtr9PewxkgnOjZpUy+d\r
+4TvuXJbNQc8f4AMWL/tO9w0Fk80rWKp9ea8/df4qMq5qlFWlx6yOLQxumNOmECKb\r
+WpkUQDIDJEoFUzKMVuJf4KO/FJ345+BNLGgbJ6WujreoM1X/gYfdnJ/J\r
+-----END CERTIFICATE-----\r
+EOD;\r
+    return $cert;\r
+  }\r
+} \r
+\r
+/**\r
+ * OAuth data store\r
+ */\r
+class MyOAuthDataStore extends OAuthDataStore {/*{{{*/\r
+    private $oauthServerConsumersDAO;\r
+    private $oauthServerTokensDAO;\r
+    \r
+    function __construct() {/*{{{*/\r
+        $this->oauthServerConsumersDAO = new OAuthServerConsumersDAO();\r
+        $this->oauthServerTokensDAO = new OAuthServerTokensDAO();\r
+    }\r
+\r
+    function lookup_consumer($consumer_key) {/*{{{*/\r
+        $consumer_row = $this->oauthServerConsumersDAO->getByConsumerKey($consumer_key);\r
+        \r
+       if (is_array($consumer_row)) \r
+               return new OAuthConsumer($consumer_key, $consumer_row[0]['consumer_secret'], NULL);\r
+        else\r
+               return NULL;\r
+    }\r
+\r
+    function lookup_token($consumer, $token_type, $token) {/*{{{*/\r
+        if ($token == '') return NULL;\r
+        \r
+       $token_row = $this->oauthServerTokensDAO->getByToken($consumer->key, $token);\r
+        if ($token_row[0]['token_type'] == $token_type) \r
+               return $token_row[0]['token'];\r
+        else \r
+               return NULL;\r
+    }\r
+\r
+    function lookup_nonce($consumer, $token, $nonce, $timestamp) {/*{{{*/\r
+        if ($nonce == '') return NULL;\r
+        \r
+       $row_token = $this->oauthServerTokensDAO->getByToken($consumer->key, $token);\r
+        if ($row_token[0]['nonce'] == $nonce) \r
+               return $nonce;\r
+        else \r
+               return NULL;\r
+    }/*}}}*/\r
+\r
+    function lookup_authenticate_request_token($token) {\r
+       $token_row = $this->oauthServerTokensDAO->getByTokenAndType($token, 'request');\r
+       if ($token_row[0]['user_id'] > 0) return true;\r
+       else return false;\r
+    }\r
+    \r
+    function lookup_expire_threshold($consumer) {\r
+       $consumer_row = $this->oauthServerConsumersDAO->getByConsumerKey($consumer->key);\r
+       return $consumer_row[0]['expire_threshold'];\r
+    }\r
+    \r
+    function new_request_token($consumer) {/*{{{*/\r
+        $token = Utility::getRandomStr(18);\r
+        $token_secret = Utility::getRandomStr(18);\r
+        \r
+        // save token into db\r
+        // Problem: need $user_id\r
+        $consumer_row = $this->oauthServerConsumersDAO->getByConsumerKey($consumer->key);\r
+        \r
+        $this->oauthServerTokensDAO->Create($consumer_row[0]['consumer_id'], $token, 'request',\r
+             $token_secret, 0);\r
+        $request_token = new OAuthToken($token, $token_secret);\r
+        \r
+        return $request_token;\r
+    }/*}}}*/\r
+\r
+    function new_access_token($token, $consumer) {/*{{{*/\r
+        $access_token_key = Utility::getRandomStr(18);\r
+        $access_token_secret = Utility::getRandomStr(18);\r
+            \r
+        $request_token_row = $this->oauthServerTokensDAO->getByTokenAndType($token, 'request');\r
+        \r
+        $this->oauthServerTokensDAO->Create($request_token_row[0]['consumer_id'], $access_token_key, 'access',\r
+             $access_token_secret, $request_token_row[0]['user_id']);\r
+        $this->oauthServerTokensDAO->deleteByTokenAndType($token, 'request');\r
+        \r
+               $access_token = new OAuthToken($access_token_key, $access_token_secret);\r
+        \r
+               return $access_token;\r
+    }/*}}}*/\r
+}/*}}}*/\r
+\r
+?>
\ No newline at end of file
diff --git a/docs/oauth/common.inc.php b/docs/oauth/common.inc.php
new file mode 100644 (file)
index 0000000..f060b06
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+require_once("lib/OAuth.php");
+require_once("classes/MyOAuthServer.class.php");
+
+/*
+ * Config Section
+ */
+//$domain = $_SERVER['HTTP_HOST'];
+//$base = "/oauth/example";
+//$base_url = "http://$domain$base";
+
+/**
+ * Default objects
+ */
+$oauth_server = new MyOAuthServer(new MyOAuthDataStore());
+$hmac_method = new OAuthSignatureMethod_HMAC_SHA1();
+$plaintext_method = new OAuthSignatureMethod_PLAINTEXT();
+$rsa_method = new MyOAuthSignatureMethod_RSA_SHA1();
+
+$oauth_server->add_signature_method($hmac_method);
+$oauth_server->add_signature_method($plaintext_method);
+$oauth_server->add_signature_method($rsa_method);
+
+$sig_methods = $oauth_server->get_signature_methods();
+?>
diff --git a/docs/oauth/lib/OAuth.php b/docs/oauth/lib/OAuth.php
new file mode 100644 (file)
index 0000000..590cdbf
--- /dev/null
@@ -0,0 +1,799 @@
+<?php
+// Modified from http://oauth.googlecode.com/svn/code/php/
+
+// vim: foldmethod=marker
+if (!defined('AF_INCLUDE_PATH')) exit;
+
+require_once(AF_INCLUDE_PATH. 'classes/DAO/OAuthServerConsumersDAO.class.php');
+
+/* Generic exception class
+ */
+class OAuthException extends Exception {
+  function __construct($exception)
+  {
+       echo 'error='.urlencode($exception);
+       exit;
+  }
+}
+
+class OAuthConsumer {
+  public $key;
+  public $secret;
+
+  function __construct($key, $secret, $callback_url=NULL) {
+    // check if the consumer is registered
+       $oAuthServerConsumersDAO = new OAuthServerConsumersDAO();
+       $consumer = $oAuthServerConsumersDAO->getByConsumerKeyAndSecret($key, $secret);
+       
+       if (!is_array($consumer)) throw new OAuthException('Consumer is not registered.');
+       else {
+               $this->key = $key;
+           $this->secret = $secret;
+           $this->callback_url = $callback_url;
+       }
+  }
+
+  function __toString() {
+    return "OAuthConsumer[key=$this->key,secret=$this->secret]";
+  }
+}
+
+class OAuthToken {
+  // access tokens and request tokens
+  public $key;
+  public $secret;
+
+  /**
+   * key = the token
+   * secret = the token secret
+   */
+  function __construct($key, $secret) {
+    $this->key = $key;
+    $this->secret = $secret;
+  }
+
+  /**
+   * generates the basic string serialization of a token that a server
+   * would respond to request_token and access_token calls with
+   */
+  function to_string() {
+    return "oauth_token=" .
+           OAuthUtil::urlencode_rfc3986($this->key) .
+           "&oauth_token_secret=" .
+           OAuthUtil::urlencode_rfc3986($this->secret);
+  }
+
+  function __toString() {
+    return $this->to_string();
+  }
+}
+
+class OAuthSignatureMethod {
+  public function check_signature(&$request, $consumer, $token, $signature) {
+    $built = $this->build_signature($request, $consumer, $token);
+    return $built == $signature;
+  }
+}
+
+class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod {
+  function get_name() {
+    return "HMAC-SHA1";
+  }
+
+  public function build_signature($request, $consumer, $token) {
+    $base_string = $request->get_signature_base_string();
+    $request->base_string = $base_string;
+
+    $key_parts = array(
+      $consumer->secret,
+      ($token) ? $token->secret : ""
+    );
+
+    $key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
+    $key = implode('&', $key_parts);
+
+    return base64_encode(hash_hmac('sha1', $base_string, $key, true));
+  }
+}
+
+class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod {
+  public function get_name() {
+    return "PLAINTEXT";
+  }
+
+  public function build_signature($request, $consumer, $token) {
+    $sig = array(
+      OAuthUtil::urlencode_rfc3986($consumer->secret)
+    );
+
+    if ($token) {
+      array_push($sig, OAuthUtil::urlencode_rfc3986($token->secret));
+    } else {
+      array_push($sig, '');
+    }
+
+    $raw = implode("&", $sig);
+    // for debug purposes
+    $request->base_string = $raw;
+
+    return OAuthUtil::urlencode_rfc3986($raw);
+  }
+}
+
+class OAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod {
+  public function get_name() {
+    return "RSA-SHA1";
+  }
+
+  protected function fetch_public_cert(&$request) {
+    // not implemented yet, ideas are:
+    // (1) do a lookup in a table of trusted certs keyed off of consumer
+    // (2) fetch via http using a url provided by the requester
+    // (3) some sort of specific discovery code based on request
+    //
+    // either way should return a string representation of the certificate
+    throw Exception("fetch_public_cert not implemented");
+  }
+
+  protected function fetch_private_cert(&$request) {
+    // not implemented yet, ideas are:
+    // (1) do a lookup in a table of trusted certs keyed off of consumer
+    //
+    // either way should return a string representation of the certificate
+    throw Exception("fetch_private_cert not implemented");
+  }
+
+  public function build_signature(&$request, $consumer, $token) {
+    $base_string = $request->get_signature_base_string();
+    $request->base_string = $base_string;
+
+    // Fetch the private key cert based on the request
+    $cert = $this->fetch_private_cert($request);
+
+    // Pull the private key ID from the certificate
+    $privatekeyid = openssl_get_privatekey($cert);
+
+    // Sign using the key
+    $ok = openssl_sign($base_string, $signature, $privatekeyid);
+
+    // Release the key resource
+    openssl_free_key($privatekeyid);
+
+    return base64_encode($signature);
+  }
+
+  public function check_signature(&$request, $consumer, $token, $signature) {
+    $decoded_sig = base64_decode($signature);
+
+    $base_string = $request->get_signature_base_string();
+
+    // Fetch the public key cert based on the request
+    $cert = $this->fetch_public_cert($request);
+
+    // Pull the public key ID from the certificate
+    $publickeyid = openssl_get_publickey($cert);
+
+    // Check the computed signature against the one passed in the query
+    $ok = openssl_verify($base_string, $decoded_sig, $publickeyid);
+
+    // Release the key resource
+    openssl_free_key($publickeyid);
+
+    return $ok == 1;
+  }
+}
+
+class OAuthRequest {
+  private $parameters;
+  private $http_method;
+  private $http_url;
+  // for debug purposes
+  public $base_string;
+  public static $version = '1.0';
+  public static $POST_INPUT = 'php://input';
+
+  function __construct($http_method, $http_url, $parameters=NULL) {
+    @$parameters or $parameters = array();
+    $this->parameters = $parameters;
+    $this->http_method = $http_method;
+    $this->http_url = $http_url;
+  }
+
+
+  /**
+   * attempt to build up a request from what was passed to the server
+   */
+  public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) {
+    $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")
+              ? 'http'
+              : 'https';
+    @$http_url or $http_url = $scheme .
+                              '://' . $_SERVER['HTTP_HOST'] .
+                              ':' .
+                              $_SERVER['SERVER_PORT'] .
+                              $_SERVER['REQUEST_URI'];
+    @$http_method or $http_method = $_SERVER['REQUEST_METHOD'];
+
+    // We weren't handed any parameters, so let's find the ones relevant to
+    // this request.
+    // If you run XML-RPC or similar you should use this to provide your own
+    // parsed parameter-list
+    if (!$parameters) {
+      // Find request headers
+      $request_headers = OAuthUtil::get_headers();
+
+      // Parse the query-string to find GET parameters
+      $parameters = OAuthUtil::parse_parameters($_SERVER['QUERY_STRING']);
+
+      // It's a POST request of the proper content-type, so parse POST
+      // parameters and add those overriding any duplicates from GET
+      if ($http_method == "POST"
+          && @strstr($request_headers["Content-Type"],
+                     "application/x-www-form-urlencoded")
+          ) {
+        $post_data = OAuthUtil::parse_parameters(
+          file_get_contents(self::$POST_INPUT)
+        );
+        $parameters = array_merge($parameters, $post_data);
+      }
+
+      // We have a Authorization-header with OAuth data. Parse the header
+      // and add those overriding any duplicates from GET or POST
+      if (@substr($request_headers['Authorization'], 0, 6) == "OAuth ") {
+        $header_parameters = OAuthUtil::split_header(
+          $request_headers['Authorization']
+        );
+        $parameters = array_merge($parameters, $header_parameters);
+      }
+
+    }
+
+    return new OAuthRequest($http_method, $http_url, $parameters);
+  }
+
+  /**
+   * pretty much a helper function to set up the request
+   */
+  public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters=NULL) {
+    @$parameters or $parameters = array();
+    $defaults = array("oauth_version" => OAuthRequest::$version,
+                      "oauth_nonce" => OAuthRequest::generate_nonce(),
+                      "oauth_timestamp" => OAuthRequest::generate_timestamp(),
+                      "oauth_consumer_key" => $consumer->key);
+    if ($token)
+      $defaults['oauth_token'] = $token->key;
+
+    $parameters = array_merge($defaults, $parameters);
+
+    return new OAuthRequest($http_method, $http_url, $parameters);
+  }
+
+  public function set_parameter($name, $value, $allow_duplicates = true) {
+    if ($allow_duplicates && isset($this->parameters[$name])) {
+      // We have already added parameter(s) with this name, so add to the list
+      if (is_scalar($this->parameters[$name])) {
+        // This is the first duplicate, so transform scalar (string)
+        // into an array so we can add the duplicates
+        $this->parameters[$name] = array($this->parameters[$name]);
+      }
+
+      $this->parameters[$name][] = $value;
+    } else {
+      $this->parameters[$name] = $value;
+    }
+  }
+
+  public function get_parameter($name) {
+    return isset($this->parameters[$name]) ? $this->parameters[$name] : null;
+  }
+
+  public function get_parameters() {
+    return $this->parameters;
+  }
+
+  public function unset_parameter($name) {
+    unset($this->parameters[$name]);
+  }
+
+  /**
+   * The request parameters, sorted and concatenated into a normalized string.
+   * @return string
+   */
+  public function get_signable_parameters() {
+    // Grab all parameters
+    $params = $this->parameters;
+
+    // Remove oauth_signature if present
+    // Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.")
+    if (isset($params['oauth_signature'])) {
+      unset($params['oauth_signature']);
+    }
+
+    return OAuthUtil::build_http_query($params);
+  }
+
+  /**
+   * Returns the base string of this request
+   *
+   * The base string defined as the method, the url
+   * and the parameters (normalized), each urlencoded
+   * and the concated with &.
+   */
+  public function get_signature_base_string() {
+    $parts = array(
+      $this->get_normalized_http_method(),
+      $this->get_normalized_http_url(),
+      $this->get_signable_parameters()
+    );
+
+    $parts = OAuthUtil::urlencode_rfc3986($parts);
+
+    return implode('&', $parts);
+  }
+
+  /**
+   * just uppercases the http method
+   */
+  public function get_normalized_http_method() {
+    return strtoupper($this->http_method);
+  }
+
+  /**
+   * parses the url and rebuilds it to be
+   * scheme://host/path
+   */
+  public function get_normalized_http_url() {
+    $parts = parse_url($this->http_url);
+
+    $port = @$parts['port'];
+    $scheme = $parts['scheme'];
+    $host = $parts['host'];
+    $path = @$parts['path'];
+
+    $port or $port = ($scheme == 'https') ? '443' : '80';
+
+    if (($scheme == 'https' && $port != '443')
+        || ($scheme == 'http' && $port != '80')) {
+      $host = "$host:$port";
+    }
+    return "$scheme://$host$path";
+  }
+
+  /**
+   * builds a url usable for a GET request
+   */
+  public function to_url() {
+    $post_data = $this->to_postdata();
+    $out = $this->get_normalized_http_url();
+    if ($post_data) {
+      $out .= '?'.$post_data;
+    }
+    return $out;
+  }
+
+  /**
+   * builds the data one would send in a POST request
+   */
+  public function to_postdata() {
+    return OAuthUtil::build_http_query($this->parameters);
+  }
+
+  /**
+   * builds the Authorization: header
+   */
+  public function to_header() {
+    $out ='Authorization: OAuth realm=""';
+    $total = array();
+    foreach ($this->parameters as $k => $v) {
+      if (substr($k, 0, 5) != "oauth") continue;
+      if (is_array($v)) {
+        throw new OAuthException('Arrays not supported in headers');
+      }
+      $out .= ',' .
+              OAuthUtil::urlencode_rfc3986($k) .
+              '="' .
+              OAuthUtil::urlencode_rfc3986($v) .
+              '"';
+    }
+    return $out;
+  }
+
+  public function __toString() {
+    return $this->to_url();
+  }
+
+
+  public function sign_request($signature_method, $consumer, $token) {
+    $this->set_parameter(
+      "oauth_signature_method",
+      $signature_method->get_name(),
+      false
+    );
+    $signature = $this->build_signature($signature_method, $consumer, $token);
+    $this->set_parameter("oauth_signature", $signature, false);
+  }
+
+  public function build_signature($signature_method, $consumer, $token) {
+    $signature = $signature_method->build_signature($this, $consumer, $token);
+    return $signature;
+  }
+
+  /**
+   * util function: current timestamp
+   */
+  private static function generate_timestamp() {
+    return time();
+  }
+
+  /**
+   * util function: current nonce
+   */
+  private static function generate_nonce() {
+    $mt = microtime();
+    $rand = mt_rand();
+
+    return md5($mt . $rand); // md5s look nicer than numbers
+  }
+}
+
+class OAuthServer {
+  protected $timestamp_threshold; // in seconds, five minutes
+  protected $version = 1.0;             // hi blaine
+  protected $signature_methods = array();
+
+  protected $data_store;
+
+  function __construct($data_store) {
+    $this->data_store = $data_store;
+  }
+
+  public function add_signature_method($signature_method) {
+    $this->signature_methods[$signature_method->get_name()] =
+      $signature_method;
+  }
+
+  // high level functions
+
+  /**
+   * process a request_token request
+   * returns the request token on success
+   */
+  public function fetch_request_token(&$request) {
+    $this->get_version($request);
+
+    $consumer = $this->get_consumer($request);
+
+    // no token required for the initial token request
+    $token = NULL;
+
+    $this->check_signature($request, $consumer, $token);
+
+    $new_token = $this->data_store->new_request_token($consumer);
+
+    return $new_token;
+  }
+
+  /**
+   * process an access_token request
+   * returns the access token on success
+   */
+  public function fetch_access_token(&$request) {
+    $this->get_version($request);
+
+    $consumer = $this->get_consumer($request);
+
+    // requires authorized request token
+    $token = $this->get_token($request, $consumer, "request");
+
+    $this->check_signature($request, $consumer, $token);
+
+    if ($this->data_store->lookup_authenticate_request_token($token))
+    {
+       $new_token = $this->data_store->new_access_token($token, $consumer);
+       return $new_token;
+    }
+    else
+       throw new OAuthException("User authenticate is not performed.");
+  }
+
+  /**
+   * verify an api call, checks all the parameters
+   */
+  public function verify_request(&$request) {
+    $this->get_version($request);
+    $consumer = $this->get_consumer($request);
+    $token = $this->get_token($request, $consumer, "access");
+    $this->check_signature($request, $consumer, $token);
+    return array($consumer, $token);
+  }
+
+  // Internals from here
+  /**
+   * version 1
+   */
+  private function get_version(&$request) {
+    $version = $request->get_parameter("oauth_version");
+    if (!$version) {
+      $version = 1.0;
+    }
+    if ($version && $version != $this->version) {
+      throw new OAuthException("OAuth version '$version' not supported");
+    }
+    return $version;
+  }
+
+  /**
+   * figure out the signature with some defaults
+   */
+  private function get_signature_method(&$request) {
+    $signature_method =
+        @$request->get_parameter("oauth_signature_method");
+    if (!$signature_method) {
+      $signature_method = "PLAINTEXT";
+    }
+    if (!in_array($signature_method,
+                  array_keys($this->signature_methods))) {
+      throw new OAuthException(
+        "Signature method '$signature_method' not supported " .
+        "try one of the following: " .
+        implode(", ", array_keys($this->signature_methods))
+      );
+    }
+    return $this->signature_methods[$signature_method];
+  }
+
+  /**
+   * try to find the consumer for the provided request's consumer key
+   */
+  private function get_consumer(&$request) {
+    $consumer_key = @$request->get_parameter("oauth_consumer_key");
+    if (!$consumer_key) {
+      throw new OAuthException("Invalid consumer key");
+    }
+
+    $consumer = $this->data_store->lookup_consumer($consumer_key);
+    if (!$consumer) {
+      throw new OAuthException("Invalid consumer");
+    }
+
+    return $consumer;
+  }
+
+  /**
+   * try to find the token for the provided request's token key
+   */
+  private function get_token(&$request, $consumer, $token_type="access") {
+    $token_field = @$request->get_parameter('oauth_token');
+    $token = $this->data_store->lookup_token(
+      $consumer, $token_type, $token_field
+    );
+    if (!$token) {
+      throw new OAuthException("Invalid $token_type token: $token_field");
+    }
+    return $token;
+  }
+
+  /**
+   * all-in-one function to check the signature on a request
+   * should guess the signature method appropriately
+   */
+  private function check_signature(&$request, $consumer, $token) {
+    // this should probably be in a different method
+    $timestamp = @$request->get_parameter('oauth_timestamp');
+    $nonce = @$request->get_parameter('oauth_nonce');
+       
+    $this->timestamp_threshold = $this->data_store->lookup_expire_threshold($consumer);
+    
+    $this->check_timestamp($timestamp);
+    $this->check_nonce($consumer, $token, $nonce, $timestamp);
+    
+    $signature_method = $this->get_signature_method($request);
+
+    $signature = $request->get_parameter('oauth_signature');
+    $valid_sig = $signature_method->check_signature(
+      $request,
+      $consumer,
+      $token,
+      $signature
+    );
+
+    if (!$valid_sig) {
+      throw new OAuthException("Invalid signature");
+    }
+  }
+
+  /**
+   * check that the timestamp is new enough
+   */
+  private function check_timestamp($timestamp) {
+    // verify that timestamp is recentish
+    // when threshold is 0, never expire
+    $now = time();
+    if ($this->timestamp_threshold <> 0 && $now - $timestamp > $this->timestamp_threshold) {
+      throw new OAuthException(
+        "Expired timestamp, yours $timestamp, ours $now"
+      );
+    }
+  }
+
+  /**
+   * check that the nonce is not repeated
+   */
+  private function check_nonce($consumer, $token, $nonce, $timestamp) {
+    // verify that the nonce is uniqueish
+    $found = $this->data_store->lookup_nonce(
+      $consumer,
+      $token,
+      $nonce,
+      $timestamp
+    );
+    if ($found) {
+      throw new OAuthException("Nonce already used: $nonce");
+    }
+  }
+
+}
+
+class OAuthDataStore {
+  function lookup_consumer($consumer_key) {
+    // implement me
+  }
+
+  function lookup_token($consumer, $token_type, $token) {
+    // implement me
+  }
+
+  function lookup_nonce($consumer, $token, $nonce, $timestamp) {
+    // implement me
+  }
+
+  function new_request_token($consumer) {
+    // return a new token attached to this consumer
+  }
+
+  function new_access_token($token, $consumer) {
+    // return a new access token attached to this consumer
+    // for the user associated with this token if the request token
+    // is authorized
+    // should also invalidate the request token
+  }
+
+}
+
+class OAuthUtil {
+  public static function urlencode_rfc3986($input) {
+  if (is_array($input)) {
+    return array_map(array('OAuthUtil', 'urlencode_rfc3986'), $input);
+  } else if (is_scalar($input)) {
+    return str_replace(
+      '+',
+      ' ',
+      str_replace('%7E', '~', rawurlencode($input))
+    );
+  } else {
+    return '';
+  }
+}
+
+
+  // This decode function isn't taking into consideration the above
+  // modifications to the encoding process. However, this method doesn't
+  // seem to be used anywhere so leaving it as is.
+  public static function urldecode_rfc3986($string) {
+    return urldecode($string);
+  }
+
+  // Utility function for turning the Authorization: header into
+  // parameters, has to do some unescaping
+  // Can filter out any non-oauth parameters if needed (default behaviour)
+  public static function split_header($header, $only_allow_oauth_parameters = true) {
+    $pattern = '/(([-_a-z]*)=("([^"]*)"|([^,]*)),?)/';
+    $offset = 0;
+    $params = array();
+    while (preg_match($pattern, $header, $matches, PREG_OFFSET_CAPTURE, $offset) > 0) {
+      $match = $matches[0];
+      $header_name = $matches[2][0];
+      $header_content = (isset($matches[5])) ? $matches[5][0] : $matches[4][0];
+      if (preg_match('/^oauth_/', $header_name) || !$only_allow_oauth_parameters) {
+        $params[$header_name] = OAuthUtil::urldecode_rfc3986($header_content);
+      }
+      $offset = $match[1] + strlen($match[0]);
+    }
+
+    if (isset($params['realm'])) {
+      unset($params['realm']);
+    }
+
+    return $params;
+  }
+
+  // helper to try to sort out headers for people who aren't running apache
+  public static function get_headers() {
+    if (function_exists('apache_request_headers')) {
+      // we need this to get the actual Authorization: header
+      // because apache tends to tell us it doesn't exist
+      return apache_request_headers();
+    }
+    // otherwise we don't have apache and are just going to have to hope
+    // that $_SERVER actually contains what we need
+    $out = array();
+    foreach ($_SERVER as $key => $value) {
+      if (substr($key, 0, 5) == "HTTP_") {
+        // this is chaos, basically it is just there to capitalize the first
+        // letter of every word that is not an initial HTTP and strip HTTP
+        // code from przemek
+        $key = str_replace(
+          " ",
+          "-",
+          ucwords(strtolower(str_replace("_", " ", substr($key, 5))))
+        );
+        $out[$key] = $value;
+      }
+    }
+    return $out;
+  }
+
+  // This function takes a input like a=b&a=c&d=e and returns the parsed
+  // parameters like this
+  // array('a' => array('b','c'), 'd' => 'e')
+  public static function parse_parameters( $input ) {
+    if (!isset($input) || !$input) return array();
+
+    $pairs = explode('&', $input);
+
+    $parsed_parameters = array();
+    foreach ($pairs as $pair) {
+      $split = explode('=', $pair, 2);
+      $parameter = OAuthUtil::urldecode_rfc3986($split[0]);
+      $value = isset($split[1]) ? OAuthUtil::urldecode_rfc3986($split[1]) : '';
+
+      if (isset($parsed_parameters[$parameter])) {
+        // We have already recieved parameter(s) with this name, so add to the list
+        // of parameters with this name
+
+        if (is_scalar($parsed_parameters[$parameter])) {
+          // This is the first duplicate, so transform scalar (string) into an array
+          // so we can add the duplicates
+          $parsed_parameters[$parameter] = array($parsed_parameters[$parameter]);
+        }
+
+        $parsed_parameters[$parameter][] = $value;
+      } else {
+        $parsed_parameters[$parameter] = $value;
+      }
+    }
+    return $parsed_parameters;
+  }
+
+  public static function build_http_query($params) {
+    if (!$params) return '';
+
+    // Urlencode both keys and values
+    $keys = OAuthUtil::urlencode_rfc3986(array_keys($params));
+    $values = OAuthUtil::urlencode_rfc3986(array_values($params));
+    $params = array_combine($keys, $values);
+
+    // Parameters are sorted by name, using lexicographical byte value ordering.
+    // Ref: Spec: 9.1.1 (1)
+    uksort($params, 'strcmp');
+
+    $pairs = array();
+    foreach ($params as $parameter => $value) {
+      if (is_array($value)) {
+        // If two or more parameters share the same name, they are sorted by their value
+        // Ref: Spec: 9.1.1 (1)
+        natsort($value);
+        foreach ($value as $duplicate_value) {
+          $pairs[] = $parameter . '=' . $duplicate_value;
+        }
+      } else {
+        $pairs[] = $parameter . '=' . $value;
+      }
+    }
+    // For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61)
+    // Each name-value pair is separated by an '&' character (ASCII code 38)
+    return implode('&', $pairs);
+  }
+}
+
+?>
diff --git a/docs/oauth/register_consumer.php b/docs/oauth/register_consumer.php
new file mode 100644 (file)
index 0000000..e0bfa36
--- /dev/null
@@ -0,0 +1,52 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+require_once(AF_INCLUDE_PATH.'vitals.inc.php');\r
+require_once(AF_INCLUDE_PATH.'classes/Utility.class.php');\r
+require_once(AF_INCLUDE_PATH.'classes/DAO/OAuthServerConsumersDAO.class.php');\r
+\r
+if (!isset($_GET['consumer']))\r
+{\r
+       echo "error=".urlencode('Empty parameter: consumer.');\r
+       return;\r
+}\r
+else\r
+{\r
+       $consumer = $_GET['consumer'];\r
+       $expire_threshold = intval($_GET['expire']);\r
+       \r
+       $oAuthServerConsumersDAO = new OAuthServerConsumersDAO();\r
+       \r
+       $consumer_info = $oAuthServerConsumersDAO->getByConsumer($consumer);\r
+       \r
+       if (!is_array($consumer_info))\r
+       { // new consumer. save consumer and generate consumer key and secret\r
+               $consumer_id = $oAuthServerConsumersDAO->Create($consumer, $expire_threshold);\r
+               $consumer_info = $oAuthServerConsumersDAO->get($consumer_id);\r
+       }\r
+       else \r
+       { // existing consumer\r
+               if ($expire_threshold <> $consumer_info[0]['expire_threshold'])\r
+               {\r
+                       $oAuthServerConsumersDAO->updateExpireThreshold($consumer, $expire_threshold);\r
+                       $consumer_info[0]['expire_threshold'] = $expire_threshold;\r
+               }\r
+               $consumer_info = $consumer_info[0];\r
+       }\r
+       \r
+       $consumer_key = $consumer_info['consumer_key'];\r
+       $consumer_secret = $consumer_info['consumer_secret'];\r
+       \r
+       echo 'consumer_key='.$consumer_key.'&consumer_secret='.$consumer_secret.'&expire='.$expire_threshold;\r
+}\r
+?>
\ No newline at end of file
diff --git a/docs/oauth/request_token.php b/docs/oauth/request_token.php
new file mode 100644 (file)
index 0000000..63aca10
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+define('AF_INCLUDE_PATH', '../include/');
+require_once(AF_INCLUDE_PATH.'vitals.inc.php');
+require_once("common.inc.php");
+
+try {
+  $req = OAuthRequest::from_request();
+  $token = $oauth_server->fetch_request_token($req);
+  print $token;
+} catch (OAuthException $e) {
+  print($e->getMessage() . "\n<hr />\n");
+  print_r($req);
+  die();
+}
+
+?>
diff --git a/docs/oauth_client.php b/docs/oauth_client.php
new file mode 100644 (file)
index 0000000..889792e
--- /dev/null
@@ -0,0 +1,150 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', 'include/');\r
+require_once(AF_INCLUDE_PATH.'vitals.inc.php');\r
+require_once(AF_INCLUDE_PATH.'classes/Utility.class.php');\r
+require_once("oauth/lib/OAuth.php");\r
+\r
+require_once(AF_INCLUDE_PATH.'classes/DAO/OAuthClientServersDAO.class.php');\r
+require_once(AF_INCLUDE_PATH.'classes/DAO/OAuthClientTokensDAO.class.php');\r
+\r
+// This part should be moved into include/constants.inc.php\r
+$oauth_server_url = "http://localhost/aframe/";\r
+\r
+$register_consumer_url = $oauth_server_url.'oauth/register_consumer.php';\r
+$request_token_url = $oauth_server_url.'oauth/request_token.php';\r
+$authorization_url = $oauth_server_url.'oauth/authorization.php';\r
+$access_token_url = $oauth_server_url.'oauth/access_token.php';\r
+\r
+//$client_callback_url = AF_BASE_HREF.'index.php';\r
+$client_callback_url = 'http://www.google.ca';\r
+\r
+// initialize oauth client\r
+$oAuthClientServersDAO = new OAuthClientServersDAO();\r
+$oAuthClientTokensDAO = new OAuthClientTokensDAO();\r
+\r
+$server_info = $oAuthClientServersDAO->getByOauthServer($oauth_server_url);\r
+$expire_threshold = 0;\r
+$sig_method = new OAuthSignatureMethod_HMAC_SHA1(); // use HMAC signature method as default\r
+\r
+// 1. register consumer\r
+$oauth_server_response = file_get_contents($register_consumer_url.'?consumer='.urlencode(AF_BASE_HREF).'&expire='.$expire_threshold);\r
+debug('register consumer - request: '.$register_consumer_url.'?consumer='.urlencode(AF_BASE_HREF).'&expire='.$expire_threshold);\r
+debug('register consumer - OAUTH response'.$oauth_server_response);\r
+\r
+// handle OAUTH response on register consumer\r
+foreach (explode('&', $oauth_server_response) as $rtn)\r
+{\r
+       $rtn_pair = explode('=', $rtn);\r
+       \r
+       if ($rtn_pair[0] == 'consumer_key') $consumer_key = $rtn_pair[1];\r
+       if ($rtn_pair[0] == 'consumer_secret') $consumer_secret = $rtn_pair[1];\r
+       if ($rtn_pair[0] == 'expire_threshold') $expire_threshold = $rtn_pair[1];\r
+       if ($rtn_pair[0] == 'error') $error = $rtn_pair[1];\r
+}\r
+\r
+if ($error <> '') echo $error;\r
+else\r
+{\r
+       if (!is_array($server_info))\r
+       { // new oauth server. save server and according consmer key/secret to communicating with this server.  \r
+               $oAuthClientServersDAO->Create($oauth_server_url, $consumer_key, $consumer_secret, $expire_threshold);\r
+       }\r
+       else if ($server_info[0]['expire_threshold'] <> $expire_threshold)\r
+       {\r
+               $oAuthClientServersDAO->Update($oauth_server_url, $consumer_key, $consumer_secret, $expire_threshold);\r
+       }\r
+       else\r
+       {\r
+               $consumer_key = $server_info[0]['consumer_key'];\r
+               $consumer_secret = $server_info[0]['consumer_secret'];\r
+               $expire_threshold = $server_info[0]['expire_threshold'];\r
+       }\r
+}\r
+\r
+$consumer = new OAuthConsumer($consumer_key, $consumer_secret, $client_callback_url);\r
+\r
+debug('consumer: '.$consumer);\r
+debug('--- END OF REGISTERING CONSUMER ---');\r
+\r
+// 2. get request token\r
+$req_req = OAuthRequest::from_consumer_and_token($consumer, NULL, "GET", $request_token_url);\r
+$req_req->sign_request($sig_method, $consumer, NULL);\r
+\r
+$oauth_server_response = file_get_contents($req_req);\r
+\r
+debug('request token - request: '."\n".$req_req);\r
+debug('request token - response: '."\n".$oauth_server_response);\r
+\r
+// handle OAUTH response on request token\r
+$server_info = $oAuthClientServersDAO->getByOauthServer($oauth_server_url);\r
+\r
+foreach (explode('&', $oauth_server_response) as $rtn)\r
+{\r
+       $rtn_pair = explode('=', $rtn);\r
+       \r
+       if ($rtn_pair[0] == 'oauth_token') $request_token_key = $rtn_pair[1];\r
+       if ($rtn_pair[0] == 'oauth_token_secret') $request_token_secret = $rtn_pair[1];\r
+       if ($rtn_pair[0] == 'error') $error = $rtn_pair[1];\r
+}\r
+\r
+if ($error == '' && strlen($request_token_key) > 0 && strlen($request_token_secret) > 0)\r
+{\r
+       $oAuthClientTokensDAO->Create($server_info[0]['oauth_server_id'], $request_token_key, 'request', $request_token_secret, 0);\r
+}\r
+else\r
+{\r
+       echo $error;\r
+}\r
+//$request_token_key = '67adbd3067564a7ebe';\r
+//$request_token_secret = '8fc6f5eeae0af5d90e';\r
+$request_token = new OAuthToken($request_token_key, $request_token_secret);\r
+\r
+debug('--- END OF REQESTING REQUEST TOKEN ---');\r
+\r
+//// 3. authorization\r
+//// update oauth_client_tokens.user_id\r
+//$auth_req = $authorization_url.'?oauth_token='.$oauth_token.'&oauth_callback='.urlencode($client_callback_url);\r
+//header('Location: '.$auth_req);\r
+\r
+// 4. get access token\r
+$access_req = OAuthRequest::from_consumer_and_token($consumer, $request_token, "GET", $access_token_url);\r
+$access_req->sign_request($sig_method, $consumer, NULL);\r
+\r
+$oauth_server_response = file_get_contents($access_req);\r
+\r
+debug('access token - request: '."\n".$access_req);\r
+debug('access token - response: '."\n".$oauth_server_response);\r
+\r
+// handle OAUTH response on access token\r
+foreach (explode('&', $oauth_server_response) as $rtn)\r
+{\r
+       $rtn_pair = explode('=', $rtn);\r
+       \r
+       if ($rtn_pair[0] == 'oauth_token') $access_token_key = $rtn_pair[1];\r
+       if ($rtn_pair[0] == 'oauth_token_secret') $access_token_secret = $rtn_pair[1];\r
+       if ($rtn_pair[0] == 'error') $error = $rtn_pair[1];\r
+}\r
+\r
+if ($error == '' && strlen($access_token_key) > 0 && strlen($access_token_secret) > 0)\r
+{\r
+       $token_info = $oAuthClientTokensDAO->getByTokenAndType($request_token_key, 'request');\r
+       $oAuthClientTokensDAO->Create($token_info[0]['oauth_server_id'], $access_token_key, 'access', $access_token_secret, $token_info[0]['user_id']);\r
+       $oAuthClientTokensDAO->deleteByTokenAndType($request_token_key, 'request');\r
+}\r
+else\r
+{\r
+       echo $error;\r
+}\r
+debug('--- END OF REQESTING ACCESS TOKEN ---');\r
+?>
\ No newline at end of file
diff --git a/docs/profile/change_email.php b/docs/profile/change_email.php
new file mode 100644 (file)
index 0000000..92e4d9e
--- /dev/null
@@ -0,0 +1,125 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', '../include/');
+require(AF_INCLUDE_PATH.'vitals.inc.php');
+require_once(AF_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
+
+global $_current_user;
+
+if (!isset($_current_user)) 
+{
+       require(AF_INCLUDE_PATH.'header.inc.php');
+       $msg->printInfos('INVALID_USER');
+       require(AF_INCLUDE_PATH.'footer.inc.php');
+       exit;
+}
+
+if (isset($_POST['cancel'])) 
+{
+       $msg->addFeedback('CANCELLED');
+       Header('Location: ../index.php');
+       exit;
+}
+
+if (isset($_POST['submit'])) 
+{
+       $this_password = $_POST['form_password_hidden'];
+
+       // password check
+       if (!empty($this_password)) 
+       {
+               //check if old password entered is correct
+               if ($row = $_current_user->getInfo()) 
+               {
+                       if ($row['password'] != $this_password) 
+                       {
+                               $msg->addError('WRONG_PASSWORD');
+                               Header('Location: change_email.php');
+                               exit;
+                       }
+               }
+       } 
+       else 
+       {
+               $msg->addError(array('EMPTY_FIELDS', _AT('password')));
+               header('Location: change_email.php');
+               exit;
+       }
+               
+       // email check
+       if ($_POST['email'] == '') 
+       {
+               $msg->addError(array('EMPTY_FIELDS', _AT('email')));
+       } 
+       else 
+       {
+               if(!preg_match("/^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,6}$/i", $_POST['email'])) 
+               {
+                       $msg->addError('EMAIL_INVALID');
+               }
+               
+               $usersDAO = new UsersDAO();
+               $row = $usersDAO->getUserByEmail($_POST['email']);
+               if ($row['user_id'] > 0 && $row['user_id'] <> $_SESSION['user_id'])
+               {
+                       $msg->addError('EMAIL_EXISTS');
+               }
+       }
+
+       if (!$msg->containsErrors()) 
+       {
+               if (defined('AF_EMAIL_CONFIRMATION') && AF_EMAIL_CONFIRMATION) 
+               {
+                       //send confirmation email
+                       $row    = $_current_user->getInfo();
+
+                       if ($row['email'] != $_POST['email']) {
+                               $code = substr(md5($_POST['email'] . $row['creation_date'] . $_SESSION['user_id']), 0, 10);
+                               $confirmation_link = AF_BASE_HREF . 'confirm.php?id='.$_SESSION['user_id'].SEP .'e='.urlencode($_POST['email']).SEP.'m='.$code;
+
+                               /* send the email confirmation message: */
+                               require(AF_INCLUDE_PATH . 'classes/phpmailer/aframemailer.class.php');
+                               $mail = new AFrameMailer();
+
+                               $mail->From     = $_config['contact_email'];
+                               $mail->AddAddress($_POST['email']);
+                               $mail->Subject = SITE_NAME . ' - ' . _AT('email_confirmation_subject');
+                               $mail->Body    = _AT('email_confirmation_message2', $_config['site_name'], $confirmation_link);
+
+                               $mail->Send();
+
+                               $msg->addFeedback('CONFIRM_EMAIL');
+                       } else {
+                               $msg->addFeedback('CHANGE_TO_SAME_EMAIL');
+                       }
+               } else {
+
+               //insert into database
+               $_current_user->setEmail($addslashes($_POST[email]));
+
+               $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
+               }
+       }
+}
+
+$row = $_current_user->getInfo();
+
+if (!isset($_POST['submit'])) {
+       $_POST = $row;
+}
+
+/* template starts here */
+$savant->assign('row', $row);
+$savant->display('profile/change_email.tmpl.php');
+
+?>
\ No newline at end of file
diff --git a/docs/profile/change_password.php b/docs/profile/change_password.php
new file mode 100644 (file)
index 0000000..3dffa18
--- /dev/null
@@ -0,0 +1,85 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', '../include/');
+require(AF_INCLUDE_PATH.'vitals.inc.php');
+
+global $_current_user;
+
+if (!isset($_current_user)) {
+       require(AF_INCLUDE_PATH.'header.inc.php');
+       $msg->printInfos('INVALID_USER');
+       require(AF_INCLUDE_PATH.'footer.inc.php');
+       exit;
+}
+
+if (isset($_POST['cancel'])) {
+       $msg->addFeedback('CANCELLED');
+       Header('Location: ../index.php');
+       exit;
+}
+
+if (isset($_POST['submit'])) {
+       if (!empty($_POST['form_old_password_hidden']))
+       {
+               //check if old password entered is correct
+               if ($row = $_current_user->getInfo()) 
+               {
+                       if ($row['password'] != $_POST['form_old_password_hidden']) 
+                       {
+                               $msg->addError('WRONG_PASSWORD');
+                               Header('Location: change_password.php');
+                               exit;
+                       }
+               }
+       }
+       else
+       {
+               $msg->addError(array('EMPTY_FIELDS', _AT('password')));
+               header('Location: change_password.php');
+               exit;
+       }
+
+       /* password check: password is verified front end by javascript. here is to handle the errors from javascript */
+       if ($_POST['password_error'] <> "")
+       {
+               $pwd_errors = explode(",", $_POST['password_error']);
+
+               foreach ($pwd_errors as $pwd_error)
+               {
+                       if ($pwd_error == "missing_password")
+                               $missing_fields[] = _AT('password');
+                       else
+                               $msg->addError($pwd_error);
+               }
+       }
+
+       if (!$msg->containsErrors()) {
+               // insert into the db.
+               $password   = $addslashes($_POST['form_password_hidden']);
+
+               if (!$_current_user->setPassword($password)) 
+               {
+                       require(AF_INCLUDE_PATH.'header.inc.php');
+                       $msg->printErrors('DB_NOT_UPDATED');
+                       require(AF_INCLUDE_PATH.'footer.inc.php');
+                       exit;
+               }
+
+               $msg->addFeedback('PASSWORD_CHANGED');
+       }
+}
+
+/* template starts here */
+$savant->display('profile/change_password.tmpl.php');
+
+?>
\ No newline at end of file
diff --git a/docs/profile/index.php b/docs/profile/index.php
new file mode 100644 (file)
index 0000000..d280642
--- /dev/null
@@ -0,0 +1,88 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', '../include/');
+require(AF_INCLUDE_PATH.'vitals.inc.php');
+require_once(AF_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
+
+global $_current_user;
+
+if (!isset($_current_user))
+{
+       require(AF_INCLUDE_PATH.'header.inc.php');
+       $msg->printInfos('INVALID_USER');
+       require(AF_INCLUDE_PATH.'footer.inc.php');
+       exit;
+}
+
+if (isset($_POST['cancel'])) {
+       $msg->addFeedback('CANCELLED');
+       Header('Location: ../index.php');
+       exit;
+}
+
+if (isset($_POST['submit'])) {
+       $missing_fields = array();
+
+       if (!$_POST['first_name']) {
+               $missing_fields[] = _AT('first_name');
+       }
+
+       if (!$_POST['last_name']) {
+               $missing_fields[] = _AT('last_name');
+       }
+
+       $_POST['first_name'] = str_replace('<', '', $_POST['first_name']);
+       $_POST['last_name'] = str_replace('<', '', $_POST['last_name']);
+
+       $usersDAO = new UsersDAO();
+       if ($usersDAO->getUserByName($_POST['first_name'], $_POST['last_name']))
+       {
+               $msg->addError('FIRST_LAST_NAME_UNIQUE');
+       }
+
+       if ($missing_fields) {
+               $missing_fields = implode(', ', $missing_fields);
+               $msg->addError(array('EMPTY_FIELDS', $missing_fields));
+       }
+       $login = strtolower($_POST['login']);
+
+       if (!$msg->containsErrors()) {
+               // insert into the db.
+               if (!$_current_user->setName($addslashes($_POST['first_name']), $addslashes($_POST['last_name']))) 
+               {
+                       $msg->printErrors('DB_NOT_UPDATED');
+                       exit;
+               }
+
+               $msg->addFeedback('PROFILE_UPDATED');
+
+               header('Location: index.php');
+               exit;
+       }
+}
+
+$row = $_current_user->getInfo();
+
+if (!isset($_POST['submit'])) {
+       $_POST = $row;
+}
+
+/* template starts here */
+
+$savant->assign('row', $row);
+
+global $onload;
+$onload = 'document.form.first_name.focus();';
+
+$savant->display('profile/index.tmpl.php');
+?>
\ No newline at end of file
diff --git a/docs/register.php b/docs/register.php
new file mode 100644 (file)
index 0000000..ddaaae2
--- /dev/null
@@ -0,0 +1,106 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', 'include/');
+require(AF_INCLUDE_PATH.'vitals.inc.php');
+include(AF_INCLUDE_PATH."securimage/securimage.php");
+
+if (isset($_POST['cancel'])) {
+       header('Location: index.php');
+       exit;
+} else if (isset($_POST['submit'])) {
+       require_once(AF_INCLUDE_PATH. 'classes/DAO/UsersDAO.class.php');
+       $usersDAO = new UsersDAO();
+       
+       /* password check: password is verified front end by javascript. here is to handle the errors from javascript */
+       if ($_POST['password_error'] <> "")
+       {
+               $pwd_errors = explode(",", $_POST['password_error']);
+
+               foreach ($pwd_errors as $pwd_error)
+               {
+                       if ($pwd_error == "missing_password")
+                               $missing_fields[] = _AT('password');
+                       else
+                               $msg->addError($pwd_error);
+               }
+       }
+       //CAPTCHA
+       if ($_config['use_captcha']==AF_STATUS_ENABLED){
+               $img = new Securimage();
+               $valid = $img->check($_POST['secret']);
+               if (!$valid)
+                       $msg->addError('SECRET_ERROR');
+       }
+
+       if (!$msg->containsErrors())
+       {
+               $user_id = $usersDAO->Create(AF_USER_GROUP_USER,
+                  $_POST['login'],
+                             $_POST['form_password_hidden'],
+                             $_POST['email'],
+                             $_POST['first_name'],
+                             $_POST['last_name'],
+                             '');
+               
+               if (is_int($user_id) && $user_id > 0)
+               {
+                       if (defined('AF_EMAIL_CONFIRMATION') && AF_EMAIL_CONFIRMATION) {
+                               $msg->addFeedback('REG_THANKS_CONFIRM');
+       
+                               $code = substr(md5($_POST['email'] . $now . $user_id), 0, 10);
+                               
+                               $confirmation_link = $_base_href . 'confirm.php?id='.$user_id.SEP.'m='.$code;
+       
+                               /* send the email confirmation message: */
+                               require(AF_INCLUDE_PATH . 'classes/phpmailer/aframemailer.class.php');
+                               $mail = new AFrameMailer();
+       
+                               $mail->From     = $_config['contact_email'];
+                               $mail->AddAddress($_POST['email']);
+                               $mail->Subject = SITE_NAME . ' - ' . _AT('email_confirmation_subject');
+                               $mail->Body    = _AT('email_confirmation_message', SITE_NAME, $confirmation_link)."\n\n";
+       
+                               $mail->Send();
+                       } 
+                       else 
+                       {
+                               // auto login
+                               $usersDAO->setLastLogin($user_id);
+                               $_SESSION['user_id'] = $user_id;
+                               
+                               // show web service ID in success message
+                               $row = $usersDAO->getUserByID($user_id);
+                               $msg->addFeedback(array('REGISTER_SUCCESS', $row['web_service_id']));
+                               header('Location: index.php');
+                               exit;
+                       }
+               }
+       }
+}
+
+/*****************************/
+/* template starts down here */
+
+global $onload;
+$onload = 'document.form.login.focus();';
+
+$savant->assign('title', _AT('registration'));
+$savant->assign('submit_button_text', _AT('register'));
+$savant->assign('show_user_group', false);
+$savant->assign('show_status', false);
+$savant->assign('show_password', true);
+if ($_config['use_captcha'] == AF_STATUS_ENABLED) $savant->assign('use_captcha', true);
+
+$savant->display('register.tmpl.php');
+
+?>
\ No newline at end of file
diff --git a/docs/svn.php b/docs/svn.php
new file mode 100644 (file)
index 0000000..43d248c
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/* created by the bundle script.                     */
+/* the resulting file will look something like this: */
+/* $svn_data = '
+------------------------------------------------------------------------
+r0001 | cindy | 2008-09-09 16:27:14 -0500 (Tue, 9 Sep 2008)
+------------------------------------------------------------------------';
+*/
+
+
+$svn_data = '
+------------------------------------------------------------------------
+r0001 | cindy | 2008-09-09 16:27:14 -0500 (Tue, 9 Sep 2008)
+------------------------------------------------------------------------';
+?>
\ No newline at end of file
diff --git a/docs/system/index.php b/docs/system/index.php
new file mode 100644 (file)
index 0000000..cdf87aa
--- /dev/null
@@ -0,0 +1,121 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', '../include/');
+include_once(AF_INCLUDE_PATH.'vitals.inc.php');
+include_once(AF_INCLUDE_PATH.'classes/DAO/ConfigDAO.class.php');
+include_once(AF_INCLUDE_PATH.'classes/DAO/ThemesDAO.class.php');
+include_once(AF_INCLUDE_PATH.'classes/Utility.class.php');
+
+// handle submit
+if (isset($_POST['cancel'])) {
+       $msg->addFeedback('CANCELLED');
+       header('Location: index.php');
+       exit;
+} else if (isset($_POST['submit']) || isset($_POST['factory_default'])) {
+       if (isset($_POST['submit']))
+       {
+               $missing_fields = array();
+       
+               $_POST['site_name']          = trim($_POST['site_name']);
+               $_POST['contact_email']      = trim($_POST['contact_email']);
+               $_POST['default_language']   = trim($_POST['default_language']);
+               $_POST['max_file_size']      = intval($_POST['max_file_size']);
+               $_POST['max_file_size']      = max(0, $_POST['max_file_size']);
+               $_POST['illegal_extentions'] = str_replace(array('  ', ' '), array(' ','|'), $_POST['illegal_extentions']);
+               $_POST['latex_server']       = (trim($_POST['latex_server'])==''?$_config['latex_server']:trim($_POST['latex_server']));
+               $_POST['use_captcha']        = $_POST['use_captcha'] ? 1 : 0;
+       
+               //check that all values have been set   
+               if (!$_POST['site_name']) {
+                       $missing_fields[] = _AT('site_name');
+               }
+       
+               /* email check */
+               if (!$_POST['contact_email']) {
+                       $missing_fields[] = _AT('contact_email');
+               } else if (!preg_match("/^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,6}$/", $_POST['contact_email'])) {
+                       $msg->addError('EMAIL_INVALID');        
+               }
+       
+               if ($missing_fields) {
+                       $missing_fields = implode(', ', $missing_fields);
+                       $msg->addError(array('EMPTY_FIELDS', $missing_fields));
+               }
+
+               if (!$msg->containsErrors()) {
+                       $_config['site_name'] = $addslashes($_POST['site_name']);
+                       $_config['contact_email'] = $addslashes($_POST['contact_email']);
+                       $_config['default_language'] = $addslashes($_POST['default_language']);
+                       $_config['max_file_size'] = $_POST['max_file_size'];
+                       $_config['illegal_extentions'] = $addslashes($_POST['illegal_extentions']);
+                       $_config['latex_server'] = $addslashes($_POST['latex_server']);
+                       $_config['use_captcha'] = $_POST['use_captcha'];
+               }
+               
+               // set $_config['pref_defaults']
+               $pref_defaults['PREF_THEME'] = $addslashes($_POST['theme']);
+               $_config['pref_defaults'] = serialize($pref_defaults);
+       }
+       else
+       {
+               // don't reset 'site name' and 'contact email'
+               $_config['default_language'] = $_config_defaults['default_language'];
+               $_config['max_file_size'] = $_config_defaults['max_file_size'];
+               $_config['illegal_extentions'] = $_config_defaults['illegal_extentions'];
+               $_config['latex_server'] = $_config_defaults['latex_server'];
+               $_config['use_captcha'] = $_config_defaults['use_captcha'];
+               $_config['pref_defaults'] = $_config_defaults['pref_defaults'];
+       }
+               
+       if (!$msg->containsErrors()) {
+               $configDAO = new ConfigDAO();
+               foreach ($_config as $name => $value) {
+                       // the isset() is needed to avoid overridding settings that don't get set here (ie. modules)
+                       if (stripslashes($value) != $_config_defaults[$name]) {
+                               $configDAO->Replace($name, $value);
+                       } else {
+                               $configDAO->Delete($name);
+                       }
+               }
+
+               // set $_config['pref_defaults'] into session variable
+               $pref_defaults = unserialize($_config['pref_defaults']);
+               if (is_array($pref_defaults))
+                       foreach ($pref_defaults as $name => $value)
+                               $pref_defaults[$name] = $value;
+               
+               Utility::assign_session_prefs($pref_defaults);
+               
+               $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
+
+               header('Location: '.$_SERVER['PHP_SELF']);
+               exit;
+       }
+}
+// end of handle submit
+
+/*****************************/
+/* template starts down here */
+
+// get all enabled themes
+$themesDAO = new ThemesDAO();
+$theme_rows = $themesDAO->getEnabledTheme();
+$savant->assign('enabled_themes', $theme_rows);
+
+$savant->assign('title', _AT("system_settings"));
+$savant->assign('config', $_config);
+$savant->assign('languageManager', $languageManager);
+
+$savant->display('system/index.tmpl.php');
+
+?>
\ No newline at end of file
diff --git a/docs/temp/debug.log b/docs/temp/debug.log
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/temp/updater/patch.xml b/docs/temp/updater/patch.xml
new file mode 100644 (file)
index 0000000..b371896
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?> \r
+<patch>\r
+       <system_patch_id>01</system_patch_id>\r
+       <applied_version>0.1</applied_version>\r
+       <description>this is a test</description>\r
+       <dependent_patches>\r
+               <dependent_patch>02</dependent_patch>\r
+\r
+       </dependent_patches>\r
+\r
+       <sql>\r
+test\r
+       </sql>\r
+\r
+       <files>\r
+               <file>\r
+                       <action>alter</action>\r
+                       <name>sdf</name>\r
+                       <location>sdf</location>\r
+                       <action_detail>\r
+                               <type>replace</type>\r
+                               <code_from>sdfasdf</code_from>\r
+                               <code_to></code_to>\r
+                       </action_detail>\r
+\r
+\r
+               </file>\r
+\r
+               <file>\r
+                       <action>delete</action>\r
+                       <name>sdf</name>\r
+                       <location>sadf</location>\r
+\r
+               </file>\r
+\r
+\r
+       </files>\r
+</patch>
\ No newline at end of file
diff --git a/docs/themes/default/change_password.tmpl.php b/docs/themes/default/change_password.tmpl.php
new file mode 100644 (file)
index 0000000..32f8fe0
--- /dev/null
@@ -0,0 +1,93 @@
+<?php 
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+global $onload;
+$onload = 'document.form.password.focus();';
+
+require(AF_INCLUDE_PATH.'header.inc.php'); 
+?>
+
+<script language="JavaScript" src="include/jscripts/sha-1factory.js" type="text/javascript"></script>
+
+<script type="text/javascript">
+function encrypt_password()
+{
+       document.form.password_error.value = "";
+
+       err = verify_password(document.form.password.value, document.form.password2.value);
+       
+       if (err.length > 0)
+       {
+               document.form.password_error.value = err;
+       }
+       else
+       {
+               document.form.form_password_hidden.value = hex_sha1(document.form.password.value);
+               document.form.password.value = "";
+               document.form.password2.value = "";
+       }
+}
+</script>
+
+<div class="center-input-form">
+<fieldset class="group_form"><legend class="group_form"><?php echo _AT('password_reminder'); ?></legend>
+
+       <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
+               <input type="hidden" name="form_change" value="true" />
+               <input type="hidden" name="id" value="<?php echo $this->id; ?>" />
+               <input type="hidden" name="g" value="<?php echo $this->g; ?>" />
+               <input type="hidden" name="h" value="<?php echo $this->h; ?>" />
+               <input type="hidden" name="form_password_hidden" value="" />
+               <input type="hidden" name="password_error" value="" />
+
+               <table class="form-data" align="center" width="60%">
+                       <tr>
+                               <td colspan="2" align="left"><?php echo _AT('password_new_blurb'); ?></td>
+                       </tr>
+                       
+                       <tr><td><br /></td></tr>
+
+                       <tr>
+                               <td align="left">
+                                       <div class="required" title="<?php echo _AT('required_field'); ?>">*</div>
+                                       <label for="password"><?php echo _AT('new_password'); ?></label>:
+                               </td>
+                               <td align="left">
+                                       <input id="password" name="password" type="password" size="25" maxlength="15" value="<?php echo stripslashes(htmlspecialchars($_POST['password'])); ?>" />
+                               </td>
+                       </tr>
+               
+                       <tr>
+                               <td align="left">
+                                       <div class="required" title="<?php echo _AT('required_field'); ?>">*</div>
+                                       <label for="password2"><?php echo _AT('password_again'); ?></label>:
+                               </td>
+                               <td align="left">
+                                       <input id="password2" name="password2" type="password" size="25" maxlength="15" value="<?php echo stripslashes(htmlspecialchars($_POST['password2'])); ?>" />
+                               </td>
+                       </tr>
+
+                       <tr>
+                               <td colspan="2">
+                                       <p class="submit_button">
+                                               <input type="submit" name="submit" value="<?php echo _AT('submit'); ?>" onClick="encrypt_password()" />
+                                               <input type="submit" name="cancel" value=" <?php echo _AT('cancel'); ?> " />
+                                       </p>
+                               </td>
+                       </tr>
+               </table>
+       </form>
+
+</fieldset>
+</div>
+
+<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/themes/default/confirmmessage.tmpl.php b/docs/themes/default/confirmmessage.tmpl.php
new file mode 100644 (file)
index 0000000..9a9347c
--- /dev/null
@@ -0,0 +1,39 @@
+<?php  
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+global $_base_href;
+// header
+?>
+
+<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
+<?php if(isset($this->hidden_vars)): ?>
+       <?php echo $this->hidden_vars; ?>
+<?php endif; ?>
+
+<div class="input-form">
+       <div class="row">
+               <?php if (is_array($this->item)) : ?>
+                       <?php foreach($this->item as $e) : ?>
+                               <p><?php echo $e; ?></p>
+                       <?php endforeach; ?>
+               <?php endif; ?>
+       </div>
+
+       <div class="row buttons">
+               <input type="submit" name="submit_yes" value="<?php echo $this->button_yes_text; ?>" /> 
+<?php if(!$this->hide_button_no): ?>
+               <input type="submit" name="submit_no" value="<?php echo $this->button_no_text; ?>" />
+<?php endif; ?>
+       </div>
+</div>
+</form>
\ No newline at end of file
diff --git a/docs/themes/default/errormessage.tmpl.php b/docs/themes/default/errormessage.tmpl.php
new file mode 100644 (file)
index 0000000..50598fc
--- /dev/null
@@ -0,0 +1,26 @@
+<?php 
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+global $_base_href;
+// header
+?>
+<div id="error">
+       <h4><?php echo _AT('the_follow_errors_occurred'); ?></h4>
+       <?php if (is_array($this->item)) : ?>
+               <ul>
+               <?php foreach($this->item as $e) : ?>
+                       <li><?php echo $e; ?></li>
+               <?php endforeach; ?>
+               </ul>
+       <?php endif; ?>
+</div>
\ No newline at end of file
diff --git a/docs/themes/default/feedbackmessage.tmpl.php b/docs/themes/default/feedbackmessage.tmpl.php
new file mode 100644 (file)
index 0000000..81f0629
--- /dev/null
@@ -0,0 +1,25 @@
+<?php 
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+global $_base_href;
+// header
+?>
+<div id="feedback">
+       <?php if (is_array($this->item)) : ?>
+               <ul>
+               <?php foreach($this->item as $e) : ?>
+                       <li><?php echo $e; ?></li>
+               <?php endforeach; ?>
+               </ul>
+       <?php endif; ?>
+</div>
\ No newline at end of file
diff --git a/docs/themes/default/forms.css b/docs/themes/default/forms.css
new file mode 100644 (file)
index 0000000..53dbd1b
--- /dev/null
@@ -0,0 +1,138 @@
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+div.center-input-form {
+       width: 95%; 
+       /* border: thin #CCCCCC solid; */
+       margin: 1em;
+       line-height:100%;
+       /* background-color: #F8F8F8; */
+       padding:1em;
+}
+
+div.center-input-form div.row {
+       background-color: #F8F8F8;
+}
+
+div.center-input-form p.submit_button
+{
+       text-align: center;
+}
+
+div.left-col {
+       width: 65%; 
+       float: left; 
+       clear:left;
+       min-width:550px;
+       margin-left:auto;
+       margin-right:auto;
+
+}
+
+div.right-col {
+       width: 25%; 
+       float:right;
+       clear:right;
+       margin-right:3em;
+       margin-top:-.8em;
+       min-width:255px;
+
+}
+
+div.input-form {
+       width: 95%; 
+       margin-left:auto; 
+       margin-right:auto;
+       /* border: thin #CCCCCC solid; */
+       margin-bottom: 20px;
+       line-height:150%;
+       /* background-color: #F8F8F8; */
+}
+
+div.input-form div.row {
+       background-color: #F8F8F8;
+       padding:8px;
+}
+
+div.input-form div.row h3 {
+       margin-left: 0px;
+}
+
+div.input-form .footer {
+       border-top: 1px solid #F9F6F2;
+}
+
+div.input-form p {
+       margin-left: 0px;
+}
+
+div.input-form input {
+       z-index: 2;
+}
+div.input-form textarea {
+       border: 1px solid #595241;
+       width: 100%;
+       padding: 2px;
+       margin-right: 2px;
+}
+div.input-form input[type=text], div.input-form input[type=password] {
+       border: 1px solid #595241;
+       padding: 2px;
+       max-width: 60%;
+       background-color:white;
+}
+
+div.input-form textarea:focus, div.input-form  input[type=password]:focus, div.input-form  input[type=text]:focus{
+       border:1px solid #A50707;
+       background-color: #FFDAB9;
+       padding: 2px;
+}
+
+input[type=checkbox]{
+       background-color: #FFDAB9;
+       text-align:center;
+}
+
+div.input-form div.buttons {
+       text-align: right;
+       padding:8px;
+}
+div.input-form div.buttons input {
+       /* background-color: #efefef; */
+       font-weight: normal;
+       /* border:  #AAA  solid 1px; */
+}
+.formfield:focus{
+       background-color: #FFDAB9;
+}
+
+div.validator-output-form {
+       width: 95%; 
+       margin-left:1em; 
+       margin-right:auto;
+       padding: 10px 10px 20px 10px;
+       /* border: thin #CCCCCC solid; */
+       margin-bottom: 30px;
+       line-height:100%;
+       /*background-color: #F8F8F8; */
+       float: left; 
+       clear:left;
+}
+
+div.output-form {
+       width: 95%; 
+       margin-left:auto; 
+       margin-right:auto;
+       /* border: thin #CCCCCC solid; */
+       margin-bottom: 30px;
+       line-height:100%;
+       /* background-color: #F8F8F8; */
+}
diff --git a/docs/themes/default/handbook_styles.css b/docs/themes/default/handbook_styles.css
new file mode 100644 (file)
index 0000000..6ce2543
--- /dev/null
@@ -0,0 +1,159 @@
+pre {\r
+       font-family: Verdana, Arial, sans-serif;\r
+}\r
+body{\r
+       background-color: #fafafa;\r
+    font-family: Verdana, Arial,sans-serif;\r
+       font-size: small;\r
+       line-height:150%;\r
+}\r
+h1,h2,h3,p, table, ul {\r
+    font-family: Verdana,Arial,sans-serif;\r
+}\r
+h1 {\r
+       border-bottom: 1px dashed #cfcfcf;\r
+       margin-left: -5px;\r
+       padding-left: 15px;\r
+       margin-right: -5px;\r
+       padding-right: 15px;\r
+}\r
+h2{\r
+       color: #666;\r
+       border-bottom: 1px dashed #cfcfcf;\r
+       margin-left: -5px;\r
+       padding-left: 15px;\r
+       margin-right: -5px;\r
+       padding-right: 15px;\r
+}\r
+a {\r
+       text-decoration: none;\r
+       border-bottom: 1px solid;\r
+       font-weight: bold;\r
+}\r
+a:hover {\r
+       border-bottom: 0px;\r
+}\r
+td,th {\r
+       font-size: 100%;\r
+       padding: 10px;\r
+}\r
+\r
+kbd {\r
+       padding: 0px 1px 0px 1px;\r
+       border-width: 1px 2px 2px 1px;\r
+       border-style: solid;\r
+       border-color: #edd #baa #baa #eed;\r
+       white-space: pre;\r
+}\r
+\r
+code {\r
+    font-family: Verdana,Arial,sans-serif;\r
+       background-color: #efefef;\r
+       padding: 0px 4px 0px 4px;\r
+       border-width: 1px 1px 1px 1px;\r
+       border-style: solid;\r
+       border-color: #edd #baa #baa #eed;              \r
+}\r
+\r
+\r
+div#toc {\r
+       color: #f0f0f0;\r
+       padding-bottom: 15px;\r
+}\r
+\r
+div#toc ul {\r
+       list-style: none;\r
+}\r
+div#toc li {\r
+       padding-top: 2px;\r
+       padding-bottom: 0px;\r
+}\r
+\r
+ol {\r
+       margin-top: 0px;\r
+}\r
+\r
+ol li {\r
+       padding-bottom: 3px;\r
+}\r
+\r
+dl {\r
+       margin: 0 10px\r
+}\r
+dl dd { \r
+       padding-top: 0px;\r
+       padding-left: 5px;\r
+       margin-left: 5%;\r
+       border-left: 1px solid #d0d0d0;\r
+       margin-bottom: 10px;\r
+}\r
+\r
+dd p {\r
+       margin-top: 0px;\r
+       margin-bottom: 0px;\r
+}\r
+dd p:last-child {\r
+       padding-bottom: 0px;\r
+}\r
+acronym {\r
+       cursor: help;\r
+}\r
+a[href*="http"] {\r
+       padding-right: 8px;\r
+       background-image: url('link-out.gif');\r
+       background-repeat: no-repeat;\r
+       background-position: right 4px;\r
+       margin-right: 2px;\r
+}\r
+div#nav-links {\r
+       margin-left: 20px;\r
+       margin-right: 20px;\r
+       margin-bottom: 20px;\r
+}\r
+div#nav-links a {\r
+       color: black;\r
+       text-decoration: none;\r
+       border-bottom: 1px solid;\r
+}\r
+pre {\r
+       padding: 10px;\r
+       background:#F6EAD6 none repeat scroll 0 0;\r
+       border:1px solid black;\r
+       font-family:"Bitstream Vera Sans Mono",monospace;\r
+       margin-top:1em;\r
+}\r
+div.seq {\r
+       font-size: smaller;\r
+       padding: 5px;\r
+       border: 1px dashed #cfcfcf;\r
+}\r
+div.tag {\r
+       margin: 10px;\r
+       font-size: smaller;\r
+       padding: 5px;\r
+       line-height: 110%;\r
+       color: #cfcfcf;\r
+}\r
+div.add-note {\r
+       background-color: #f0f0f0;\r
+       padding: 5px;\r
+}\r
+div.add-note h3 {\r
+       margin-top: 0px;\r
+       margin-bottom: 0px;\r
+}\r
+div.note {\r
+       background-color: #fefefe;\r
+       padding: 5px;\r
+       margin-bottom: 5px;\r
+}\r
+div.note h4 {\r
+       margin-top: 0px;\r
+       margin-bottom: 0px;\r
+}\r
+div.note h5 {\r
+       margin-top: 0px;\r
+       margin-bottom: 0px;\r
+       float: right;\r
+       font-weight: normal;\r
+}\r
diff --git a/docs/themes/default/home/index.tmpl.php b/docs/themes/default/home/index.tmpl.php
new file mode 100644 (file)
index 0000000..7e5663f
--- /dev/null
@@ -0,0 +1,18 @@
+<?php 
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+require(AF_INCLUDE_PATH.'header.inc.php'); 
+?>
+
+This is AFrame home page!
+
+<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/themes/default/images/add.gif b/docs/themes/default/images/add.gif
new file mode 100644 (file)
index 0000000..3d9e239
Binary files /dev/null and b/docs/themes/default/images/add.gif differ
diff --git a/docs/themes/default/images/add_group.gif b/docs/themes/default/images/add_group.gif
new file mode 100644 (file)
index 0000000..0f2ee69
Binary files /dev/null and b/docs/themes/default/images/add_group.gif differ
diff --git a/docs/themes/default/images/arrow.gif b/docs/themes/default/images/arrow.gif
new file mode 100644 (file)
index 0000000..150d06e
Binary files /dev/null and b/docs/themes/default/images/arrow.gif differ
diff --git a/docs/themes/default/images/arrow_ltr.gif b/docs/themes/default/images/arrow_ltr.gif
new file mode 100644 (file)
index 0000000..651857e
Binary files /dev/null and b/docs/themes/default/images/arrow_ltr.gif differ
diff --git a/docs/themes/default/images/atrclogo.gif b/docs/themes/default/images/atrclogo.gif
new file mode 100644 (file)
index 0000000..7b811fe
Binary files /dev/null and b/docs/themes/default/images/atrclogo.gif differ
diff --git a/docs/themes/default/images/delete.gif b/docs/themes/default/images/delete.gif
new file mode 100644 (file)
index 0000000..2ca8b23
Binary files /dev/null and b/docs/themes/default/images/delete.gif differ
diff --git a/docs/themes/default/images/edit.gif b/docs/themes/default/images/edit.gif
new file mode 100644 (file)
index 0000000..137a605
Binary files /dev/null and b/docs/themes/default/images/edit.gif differ
diff --git a/docs/themes/default/images/guide.gif b/docs/themes/default/images/guide.gif
new file mode 100644 (file)
index 0000000..124c24a
Binary files /dev/null and b/docs/themes/default/images/guide.gif differ
diff --git a/docs/themes/default/images/guide.jpg b/docs/themes/default/images/guide.jpg
new file mode 100644 (file)
index 0000000..d9c6629
Binary files /dev/null and b/docs/themes/default/images/guide.jpg differ
diff --git a/docs/themes/default/images/logo.png b/docs/themes/default/images/logo.png
new file mode 100644 (file)
index 0000000..1b59298
Binary files /dev/null and b/docs/themes/default/images/logo.png differ
diff --git a/docs/themes/default/images/navl.gif b/docs/themes/default/images/navl.gif
new file mode 100644 (file)
index 0000000..b1579b3
Binary files /dev/null and b/docs/themes/default/images/navl.gif differ
diff --git a/docs/themes/default/images/navlh.gif b/docs/themes/default/images/navlh.gif
new file mode 100644 (file)
index 0000000..279dc71
Binary files /dev/null and b/docs/themes/default/images/navlh.gif differ
diff --git a/docs/themes/default/images/navr.gif b/docs/themes/default/images/navr.gif
new file mode 100644 (file)
index 0000000..d4043a6
Binary files /dev/null and b/docs/themes/default/images/navr.gif differ
diff --git a/docs/themes/default/images/navrh.gif b/docs/themes/default/images/navrh.gif
new file mode 100644 (file)
index 0000000..dc8b1a9
Binary files /dev/null and b/docs/themes/default/images/navrh.gif differ
diff --git a/docs/themes/default/images/sort.gif b/docs/themes/default/images/sort.gif
new file mode 100644 (file)
index 0000000..39311ec
Binary files /dev/null and b/docs/themes/default/images/sort.gif differ
diff --git a/docs/themes/default/include/footer.tmpl.php b/docs/themes/default/include/footer.tmpl.php
new file mode 100644 (file)
index 0000000..fe0f6fc
--- /dev/null
@@ -0,0 +1,97 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+
+global $languageManager, $_my_uri;
+
+if($languageManager->getNumEnabledLanguages() > 1)
+{
+?>
+
+<div align="center" id="lang" style="clear: left"><br />
+<?php
+
+       if ($languageManager->getNumEnabledLanguages() > 5) {
+               echo '<form method="get" action="'.htmlspecialchars($_my_uri, ENT_QUOTES).'">';
+               echo '<label for="lang" style="display:none;">'._AT('translate_to').' </label>';
+               $languageManager->printDropdown($_SESSION['lang'], 'lang', 'lang');
+               echo ' <input type="submit" name="submit_language" class="button" value="'._AT('translate').'" />';
+               echo '</form>';
+       } else {
+               echo '<small><label for="lang">'._AT('translate_to').' </label></small>';
+               $languageManager->printList($_SESSION['lang'], 'lang', 'lang', htmlspecialchars($_my_uri));
+       }
+?>
+<br/><br/><br/>
+</div>
+<?php } ?>
+
+<div style="margin-left:auto; margin-right:auto; width:20em;">
+       <small><?php echo _AT("copyright"); ?></small><br />
+</div>
+
+</div> <!--  end center-content div -->
+<div class="bottom"><span></span></div><!--  bottom for liquid-round theme -->
+</div> <!-- end liquid-round div -->
+
+<div style="margin-left: auto; margin-right: auto; width: 6em;">
+       <a href="http://atrc.utoronto.ca/"><img src="<?php echo $this->base_path.'themes/'.$this->theme; ?>/images/atrclogo.gif" width="84" height="52" alt="Adaptive Technology Resource Centre" title="Adaptive Technology Resource Centre" border="0" /></a>
+</div>
+
+<script language="javascript" type="text/javascript">
+//<!--
+var selected;
+function rowselect(obj) {
+       obj.className = 'selected';
+       if (selected && selected != obj.id)
+               document.getElementById(selected).className = '';
+       selected = obj.id;
+}
+function rowselectbox(obj, checked, handler) {
+       var functionDemo = new Function(handler + ";");
+       functionDemo();
+
+       if (checked)
+               obj.className = 'selected';
+       else
+               obj.className = '';
+}
+//-->
+</script>
+<div align="center" style="clear:both;margin-left:auto; width:30em;margin-right:auto;">
+       <a href="documentation/web_service_api.php" title="<?php echo _AT("web_service_api"); ?>" target="_new"><?php echo _AT('web_service_api'); ?></a>
+       &nbsp;&nbsp;&nbsp;&nbsp;
+       <a href="documentation/oauth_server_api.php" title="<?php echo _AT("oauth_server_api"); ?>" target="_new"><?php echo _AT('oauth_server_api'); ?></a>
+</div>
+</body>
+</html>
+
+<?php
+// Timer, calculate how much time to load the page
+// starttime is in include/header.inc.php
+$mtime = microtime(); 
+$mtime = explode(" ", $mtime); 
+$mtime = $mtime[1] + $mtime[0]; 
+$endtime = $mtime; 
+$totaltime = ($endtime - $starttime); 
+
+if (defined('AF_DEVEL') && AF_DEVEL) 
+{
+       debug(TABLE_PREFIX, 'TABLE_PREFIX');
+       debug(DB_NAME, 'DB_NAME');
+       debug($totaltime. ' seconds.', "TIME USED"); 
+       debug($_SESSION);
+}
+// Timer Ends
+
+?>
diff --git a/docs/themes/default/include/handbook_footer.tmpl.php b/docs/themes/default/include/handbook_footer.tmpl.php
new file mode 100644 (file)
index 0000000..b8389ec
--- /dev/null
@@ -0,0 +1,29 @@
+<?php \r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+?>\r
+\r
+<div class="seq">\r
+       <?php if (isset($this->prev_page)): ?>\r
+               <?php echo _AT('previous_chapter'); ?>: <a href="frame_content.php?p=<?php echo $this->prev_page; ?>" accesskey="," title="<?php echo _AT($this->pages[$this->prev_page]['title_var']); ?> Alt+,"><?php echo _AT($this->pages[$this->prev_page]['title_var']); ?></a><br />\r
+       <?php endif; ?>\r
+\r
+       <?php if (isset($this->next_page)): ?>\r
+               <?php echo _AT('next_chapter'); ?>: <a href="frame_content.php?p=<?php echo $this->next_page; ?>" accesskey="," title="<?php echo _AT($this->pages[$this->next_page]['title_var']); ?> Alt+,"><?php echo _AT($this->pages[$this->next_page]['title_var']); ?></a><br />\r
+       <?php endif; ?>\r
+</div>\r
+\r
+<div class="tag">\r
+       All text is available under the terms of the GNU Free Documentation License. \r
+</div>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/docs/themes/default/include/handbook_header.tmpl.php b/docs/themes/default/include/handbook_header.tmpl.php
new file mode 100644 (file)
index 0000000..c91ca3f
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="<?php echo DEFAULT_LANGUAGE_CODE; ?>">
+<head>
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+       <title><?php _AT('transformable_documentation'); ?></title>
+       <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/handbook_styles.css" type="text/css" />
+</head>
+
+<body onload="doparent();">
+<script type="text/javascript">
+// <!--
+function doparent() {
+       if (parent.toc && parent.toc.highlight) parent.toc.highlight('id<?php echo $this->this_page; ?>');
+}
+// -->
+</script>
+
+<div class="seq">
+       <?php if (isset($this->prev_page)): ?>
+               <?php echo _AT('previous_chapter'); ?>: <a href="frame_content.php?p=<?php echo $this->prev_page; ?>" accesskey="," title="<?php echo _AT($this->pages[$this->prev_page]['title_var']); ?> Alt+,"><?php echo _AT($this->pages[$this->prev_page]['title_var']); ?></a><br />
+       <?php endif; ?>
+
+       <?php if (isset($this->next_page)): ?>
+               <?php echo _AT('next_chapter'); ?>: <a href="frame_content.php?p=<?php echo $this->next_page; ?>" accesskey="," title="<?php echo _AT($this->pages[$this->next_page]['title_var']); ?> Alt+,"><?php echo _AT($this->pages[$this->next_page]['title_var']); ?></a><br />
+       <?php endif; ?>
+</div>
diff --git a/docs/themes/default/include/header.tmpl.php b/docs/themes/default/include/header.tmpl.php
new file mode 100644 (file)
index 0000000..dc1e9a8
--- /dev/null
@@ -0,0 +1,230 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+if (!defined('AF_INCLUDE_PATH')) { exit; }
+/* available header.tmpl.php variables:
+ * $this->lang_code                    the ISO language code
+ * SITE_NAME                           the site name from the config file
+ * $this->page_title           the name of this page to use in the <title>
+ * top_level_pages           array(array('url', 'title'))     the top level pages. Transformable default creates tabs.
+ * current_top_level_page    string                           full url to the current top level page in "top_leve_pages"
+ * path                      array(array('url', 'title'))     the breadcrumb path to the current page.
+ * sub_menus                 array(array('url', 'title'))     the sub level menus.
+ * current_page              string                           full url to the current sub level page in the "sub_level_pages"
+ * section_title             string                           the name of the current section. either name of the course, administration, my start page, etc.
+ * page_title                string                           the title of the current page.
+ * user_name                 string                           name of login user
+ * $this->lang_charset         the ISO language character set
+ * $this->base_path                    the absolute path to this Transformable installation
+ * $this->theme                                the directory name of the current theme
+ * $this->img                          the theme image
+ * $this->custom_head          the custom head script used in <head> section
+ * $this->$onload                      the html body onload event
+
+ * $this->content_base_href    the <base href> to use for this page
+ * $this->rtl_css                      if set, the path to the RTL style sheet
+ * $this->icon                 the path to a course icon
+ * $this->banner_style         -deprecated-
+ * $this->base_href                    the full url to this Transformable installation
+ * $this->onload                       javascript onload() calls
+ * $this->img                          the absolute path to this theme's images/ directory
+ * $this->sequence_links       associative array of 'previous', 'next', and/or 'resume' links
+ * $this->path                         associative array of path to this page: aka bread crumbs
+ * $this->rel_url                      the relative url from the installation root to this page
+ * $this->nav_courses          associative array of this user's enrolled courses
+ * $this->section_title                the title of this section (course, public, admin, my start page)
+ * $this->top_level_pages      associative array of the top level navigation
+ * $this->current_top_level_page       the full path to the current top level page with file name
+ * $this->sub_level_pages                      associate array of sub level navigation
+ * $this->back_to_page                         if set, the path and file name to the part of this page (if parent is not a top level nav)
+ * $this->current_sub_level_page       the full path to the current sub level page with file name
+ * $this->guide                                the full path and file name to the guide page
+ * ======================================
+ * back_to_page              array('url', 'title')            the link back to the part of the current page, if needed.
+ */
+
+$lang_charset = "UTF-8";
+
+//Timer
+$mtime = microtime(); 
+$mtime = explode(' ', $mtime); 
+$mtime = $mtime[1] + $mtime[0]; 
+$starttime = $mtime; 
+//Timer Ends
+
+?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo DEFAULT_LANGUAGE_CODE; ?>" lang="<?php echo DEFAULT_LANGUAGE_CODE; ?>"> 
+
+<head>
+       <title><?php echo SITE_NAME; ?> : <?php echo $this->page_title; ?></title>
+       <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $this->lang_charset; ?>" />
+       <meta name="Generator" content="Transformable - Copyright 2009 by ATRC http://atrc.utoronto.ca/" />
+       <meta name="keywords" content="Transformable,free, open source, accessibility checker, accessibility reviewer, accessibility evaluator, accessibility evaluation, WCAG evaluation, 508 evaluation, BITV evaluation, evaluate accessibility, test accessibility, review accessibility, ATRC, WCAG 2, STANCA, BITV, Section 508." />
+       <meta name="description" content="Transformable is a Web accessibility evalution tool designed to help Web content developers and Web application developers ensure their Web content is accessible to everyone regardless to the technology they may be using, or their abilities or disabilities." />
+       <base href="<?php echo $this->base_path; ?>" />
+       <link rel="shortcut icon" href="<?php echo $this->base_path; ?>images/favicon.ico" type="image/x-icon" />
+       <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/forms.css" type="text/css" />
+       <link rel="stylesheet" href="<?php echo $this->base_path.'themes/'.$this->theme; ?>/styles.css" type="text/css" />
+<?php echo $this->rtl_css; ?>
+       <script src="<?php echo $this->base_path; ?>include/jscripts/handleResponse.js" type="text/javascript"></script>
+       <script src="<?php echo $this->base_path; ?>include/jscripts/infusion/InfusionAll.js" type="text/javascript"></script>
+       <script language="javascript" type="text/javascript">
+       //<!--
+       jQuery.noConflict();
+
+       var newwindow;
+       function popup(url) 
+       {
+               newwindow=window.open(url,'popup','height=600,width=800,scrollbars=yes,resizable=yes');
+               if (window.focus) {newwindow.focus()}
+       }
+       
+       function toggleToc(objId) {
+               var toc = document.getElementById(objId);
+               if (toc == null) return;
+
+               if (toc.style.display == 'none')
+               {
+                       toc.style.display = '';
+                       document.getElementById("toggle_image").src = "images/arrow-open.png";
+                       document.getElementById("toggle_image").alt = "Collapse";
+                       document.getElementById("toggle_image").title = "Collapse";
+               }
+               else
+               {
+                       toc.style.display = 'none';
+                       document.getElementById("toggle_image").src = "images/arrow-closed.png";
+                       document.getElementById("toggle_image").alt = "Expand";
+                       document.getElementById("toggle_image").title = "Expand";
+               }
+       }
+
+       //-->
+       </script>
+       <?php echo $this->custom_head; ?>
+</head>
+
+<body onload="<?php echo $this->onload; ?>">
+
+<?php if (isset($this->show_jump_to_report)){ ?>
+<a href="checker/index.php#output_div"><img src="images/clr.gif" height="1" width="1" alt="<?php echo _AT("jump_to_report"); ?>" border="0" /></a>
+<?php } ?>
+<div id="liquid-round"><div class="top"><span></span></div>
+<div class="center-content">
+               <div id="logo">
+                       <a href="http://www.atutor.ca/"><img width="100" src="<?php echo $this->base_path.'themes/'.$this->theme; ?>/images/logo.png" height="30" alt="AFrame Logo" style="border:none;" /></a>
+               </div>
+       <div id="banner">
+
+       <span id="logininfo">
+        <?php
+        if (isset($this->user_name))
+        {
+          echo _AT('welcome'). ' '.$this->user_name;
+        ?>
+                               &nbsp;&nbsp;
+                               <a href="<?php echo AF_BASE_HREF; ?>logout.php" ><?php echo _AT('logout'); ?></a>
+        <?php
+        }
+        else
+        {
+        ?>
+                               <a href="<?php echo AF_BASE_HREF; ?>login.php" ><?php echo _AT('login'); ?></a>
+                               &nbsp;&nbsp;
+                               <a href="<?php echo AF_BASE_HREF; ?>register.php" ><?php echo _AT('register'); ?></a>
+        <?php
+        }
+        ?>
+       </span>
+               
+       </div>
+
+       <div class="topnavlistcontainer">
+       <!-- the main navigation. in our case, tabs -->
+               <ul class="navigation">
+                       <?php foreach ($this->top_level_pages as $page): ?>
+                               <?php if ($page['url'] == $this->current_top_level_page): ?>
+                                       <li class="navigation"><a href="<?php echo $page['url']; ?>" title="<?php echo $page['title']; ?>" class="active"><span><?php echo $page['title']; ?></span></a></li>
+                               <?php else: ?>
+                                       <li class="navigation"><a href="<?php echo $page['url']; ?>"  title="<?php echo $page['title']; ?>"><span><?php echo $page['title']; ?></span></a></li>
+                               <?php endif; ?>
+                       <?php endforeach; ?>
+               </ul>
+       </div>
+
+<!--
+       <div class="topnavlistcontainer">
+               <ul class="topnavlist">
+                       <?php foreach ($this->top_level_pages as $page): ?>
+                               <?php if ($page['url'] == $this->current_top_level_page): ?>
+                                       <li><a href="<?php echo $page['url']; ?>" title="<?php echo $page['title']; ?>" class="active"><?php echo $page['title']; ?></a></li>
+                               <?php else: ?>
+                                       <li><a href="<?php echo $page['url']; ?>"  title="<?php echo $page['title']; ?>"><?php echo $page['title']; ?></a></li>
+                               <?php endif; ?>
+                       <?php endforeach; ?>
+               </ul>
+       </div>
+-->
+       <!-- the sub navigation and guide -->
+       <div id="sub-menu">
+               <!-- guide -->
+               <?php if (isset($this->guide)) {?>
+               <div>
+                       <a href="<?php echo $this->guide; ?>" onclick="popup('<?php echo $this->guide; ?>'); return false;" id="guide" target="_new"><em><?php echo $this->page_title; ?></em></a>
+               </div>
+               <?php }?>
+
+               <!-- the sub navigation -->
+               <div id="sub-navigation">
+               <?php if ($this->sub_menus): ?>
+                       <?php if (isset($this->back_to_page)): ?>
+                               <a href="<?php echo $this->back_to_page['url']; ?>" id="back-to"><?php echo _AT('back_to').' '.$this->back_to_page['title']; ?></a> | 
+                       <?php endif; ?>
+       
+                       <?php $num_pages = count($this->sub_menus); ?>
+                       <?php for ($i=0; $i<$num_pages; $i++): ?>
+                               <?php if ($this->sub_menus[$i]['url'] == $this->current_page): ?>
+                                       <strong><?php echo $this->sub_menus[$i]['title']; ?></strong>
+                               <?php else: ?>
+                                       <a href="<?php echo $this->sub_menus[$i]['url']; ?>"><?php echo $this->sub_menus[$i]['title']; ?></a>
+                               <?php endif; ?>
+                               <?php if ($i < $num_pages-1): ?>
+                                       |
+                               <?php endif; ?>
+                       <?php endfor; ?>
+               <?php else: ?>
+                       &nbsp;
+               <?php endif; ?>
+               </div>
+       </div>
+
+<!--<div>
+        the bread crumbs 
+       <div id="breadcrumbs">
+               <?php if (is_array($this->path)) {?>
+               <?php foreach ($this->path as $page){ ?>
+                       <a href="<?php echo $page['url']; ?>"><?php echo $page['title']; ?></a> > 
+               <?php }} echo $this->page_title; ?>
+       </div>
+
+       <?php if (isset($this->guide)) {?>
+               <a href="<?php echo $this->guide; ?>" id="guide" onclick="poptastic('<?php echo $this->guide; ?>'); return false;" target="_new"><em><?php echo $this->page_title; ?></em></a>
+       <?php } ?>
+</div>
+-->
+<a name="content" title="<?php echo _AT("content_start"); ?>"></a>
+
+<div id="rtn-msg">
+</div>
+
+<?php global $msg; $msg->printAll();?>
diff --git a/docs/themes/default/infomessage.tmpl.php b/docs/themes/default/infomessage.tmpl.php
new file mode 100644 (file)
index 0000000..ae12854
--- /dev/null
@@ -0,0 +1,23 @@
+<?php  
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+global $_base_href; ?>
+
+<div id="info">
+       <?php if (is_array($this->item)) : ?>
+               <ul>
+               <?php foreach($this->item as $i) : ?>
+                       <li><?php echo $i; ?></li>
+               <?php endforeach; ?>
+               </ul>
+       <?php endif; ?>
+</div>
\ No newline at end of file
diff --git a/docs/themes/default/language/index.tmpl.php b/docs/themes/default/language/index.tmpl.php
new file mode 100644 (file)
index 0000000..7c08c70
--- /dev/null
@@ -0,0 +1,126 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+global $_custom_css;\r
+$_custom_css = AF_BASE_HREF."include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css";\r
+\r
+include(AF_INCLUDE_PATH.'header.inc.php');\r
+?>\r
+<div id="editable_table">\r
+<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form1">\r
+<h2 align="center"><?php echo $this->title ;?></h2>\r
+\r
+<table class="data" rules="rows">\r
+\r
+<thead>\r
+       <tr>\r
+               <th scope="col">&nbsp;</th>\r
+               <th scope="col"><?php echo _AT('name_in_translated');?></th>\r
+               <th scope="col"><?php echo _AT('name_in_english');?></th>\r
+               <th scope="col"><?php echo _AT('lang_code');?></th>\r
+               <th scope="col"><?php echo _AT('charset');?></th>\r
+               <th scope="col"><?php echo _AT('status');?></th>\r
+       </tr>\r
+</thead>\r
+\r
+<tfoot>\r
+       <tr>\r
+               <td colspan="6">\r
+                       <input type="submit" name="edit" value="<?php echo _AT('edit'); ?>" />\r
+                       <input type="submit" name="export" value="<?php echo _AT('export'); ?>" />\r
+                       <input type="submit" name="delete" value="<?php echo _AT('delete'); ?>" />\r
+               </td>\r
+       </tr>\r
+</tfoot>\r
+\r
+<tbody>\r
+<?php foreach ($this->rows as $row) {?>\r
+       <tr onmousedown="document.form1['m<?php echo $row["language_code"]."_".$row["charset"]; ?>'].checked = true; rowselect(this);" \r
+           onkeydown="document.form1['m<?php echo $row["language_code"]."_".$row["charset"]; ?>'].checked = true; rowselect(this);"\r
+           id="r_<?php echo $row["language_code"]."_".$row["charset"]; ?>">\r
+               <td><input type="radio" name="id" value="<?php echo $row["language_code"]."_".$row["charset"]; ?>" id="m<?php echo $row['language_code']."_".$row["charset"]; ?>" \r
+                          onmouseup="this.checked=!this.checked" onkeyup="this.checked=!this.checked" /></td>\r
+               <td><label for="m<?php echo $row["language_code"]."_".$row["charset"]; ?>"><span class="inlineEdits" id="<?php echo "native_name:".$row["language_code"].":".$row["charset"]; ?>"><?php echo $row["native_name"]; ?></span></label></td>\r
+               <td><span class="inlineEdits" id="<?php echo "english_name:".$row["language_code"].":".$row["charset"]; ?>"><?php echo $row['english_name']; ?></span></td>\r
+               <td><?php echo $row['language_code']; ?></td>\r
+               <td><?php echo $row['charset']; ?></td>\r
+               <td><?php if ($row['status']) echo _AT('enabled'); else echo _AT('disabled'); ?></td>\r
+       </tr>\r
+<?php }?>\r
+</tbody>\r
+\r
+</table>\r
+</form>\r
+</div>\r
+<br /><br />\r
+\r
+<form name="import_form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data">\r
+<div class="input-form">\r
+       <div class="row">\r
+               <h2><label for="file"><?php echo _AT('import_a_new_lang') ;?></label></h2>\r
+       </div>\r
+       \r
+       <div class="row">\r
+               <input type="file" name="file" id="file" size="50"/>\r
+               <input type="submit" name="import" value="<?php echo _AT('import'); ?>" onclick="javascript: return validate_filename(); " />\r
+       </div>\r
+</div>\r
+</form>\r
+\r
+<script type="text/javascript">\r
+<!--\r
+\r
+String.prototype.trim = function() {\r
+       return this.replace(/^\s+|\s+$/g,"");\r
+}\r
+\r
+// This function validates if and only if a zip file is given\r
+function validate_filename() {\r
+  // check file type\r
+  var file = document.import_form.file.value;\r
+  if (!file || file.trim()=='') {\r
+    alert('Please select a language pack zip file.');\r
+    return false;\r
+  }\r
+  \r
+  if(file.slice(file.lastIndexOf(".")).toLowerCase() != '.zip') {\r
+    alert('Please upload ZIP file only!');\r
+    return false;\r
+  }\r
+}\r
+\r
+jQuery(document).ready(function () {\r
+       var tableEdit = fluid.inlineEdits("#editable_table", {\r
+               selectors : {\r
+                       text : "span",\r
+                       editables : "td:has(span.inlineEdits)"\r
+               },\r
+               defaultViewText: "",\r
+               useTooltip: true,\r
+               listeners: {\r
+                       afterFinishEdit : function (newValue, oldValue, editNode, viewNode) {\r
+                               if (newValue != oldValue)\r
+                                       rtn = jQuery.post("<?php echo AF_BASE_HREF; ?>language/index_inline_editor_submit.php", { "field":viewNode.id, "value":newValue }, \r
+                                                         function(data) {handleResponse(data, viewNode, oldValue); }, "json");\r
+                       }\r
+               }\r
+       });\r
+});\r
+\r
+//  End -->\r
+//-->\r
+</script>\r
+\r
+<?php \r
+// display footer\r
+include(AF_INCLUDE_PATH.'footer.inc.php');\r
+?>
\ No newline at end of file
diff --git a/docs/themes/default/language/language_add_edit.tmpl.php b/docs/themes/default/language/language_add_edit.tmpl.php
new file mode 100644 (file)
index 0000000..4301952
--- /dev/null
@@ -0,0 +1,136 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+global $onload;\r
+$onload = "initial();";\r
+\r
+include(AF_INCLUDE_PATH.'header.inc.php');\r
+?>\r
+\r
+<form name="input_form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?><?php if (isset($_GET["id"])) echo '?id='.$_GET["id"]; ?>" >\r
+<?php if (isset($this->row["language_code"])) {?>\r
+<input type="hidden" name="language_code" value="<?php echo $this->row["language_code"]; ?>" />
+<input type="hidden" name="charset" value="<?php echo $this->row["charset"]; ?>" />\r
+<?php }?>\r
+\r
+<div class="center-input-form">\r
+\r
+<fieldset class="group_form"><legend class="group_form"><?php echo _AT('add_edit_language'); ?></legend>\r
+       <table class="form-data" align="center">\r
+               <tr>\r
+                       <td colspan="2" align="left"><?php echo _AT('required_field_text') ;?><br /><br /></td>\r
+               </tr>\r
+\r
+               <tr align="left">\r
+                       <th><div class="required" title="<?php echo _AT('required_field'); ?>">*</div>\r
+                       <label for="lang_code"><?php echo _AT('lang_code'); ?></label></th>\r
+                       <td>\r
+<?php if (isset($this->row['language_code'])) echo $this->row['lang_code']; else {?>\r
+                       <select name="lang_code" id="lang_code">\r
+                               <option value="-1">-- <?php echo _AT('select');?> --</option>\r
+<?php \r
+       foreach ($this->rows_lang as $row_lang)\r
+       {\r
+?>\r
+                               <option value="<?php echo $row_lang['code_3letters']; ?>" <?php if ((isset($_POST["lang_code"]) && $_REQUEST["lang_code"] == $row_lang['code_3letters']) || (!isset($_REQUEST["lang_code"]) && $this->row["lang_code"] == $row_lang['code_3letters'])) echo 'selected="selected"'; ?>><?php echo $row_lang["description"]. ' - '. $row_lang['code_3letters']; ?></option>\r
+<?php\r
+       }\r
+?>\r
+                       </select>\r
+<?php }?>\r
+                       </td>\r
+               </tr>\r
+\r
+               <tr align="left">\r
+                       <th><label for="locale">&nbsp;&nbsp;&nbsp;<?php echo _AT('locale'); ?></label></th>\r
+                       <td>\r
+<?php if (isset($this->row['language_code'])) if ($this->row['locale'] == '') echo _AT('na'); else echo $this->row['locale']; else {?>\r
+                               <input id="locale" name="locale" type="text" size="2" maxlength="2" value="<?php if (isset($_POST['locale'])) echo $_POST['locale']; else echo $this->row['locale']; ?>" />\r
+<?php }?>\r
+                       </td>\r
+               </tr>\r
+\r
+               <tr align="left">\r
+                       <th><div class="required" title="<?php echo _AT('required_field'); ?>">*</div>\r
+                       <label for="charset"><?php echo _AT('charset'); ?></label></th>\r
+                       <td>\r
+<?php if (isset($this->row['language_code'])) echo $this->row['charset']; else {?>\r
+                               <input type="text" name="charset" id="charset" value="<?php if (isset($_POST['charset'])) echo $_POST['charset']; else if (isset($this->row["charset"])) echo $this->row["charset"]; else echo DEFAULT_CHARSET; ?>" />\r
+<?php }?>\r
+                       </td>\r
+               </tr>\r
+\r
+               <tr align="left">\r
+                       <th><div class="required" title="<?php echo _AT('required_field'); ?>">*</div>\r
+                       <label for="native_name"><?php echo _AT('name_in_language'); ?></label></th>\r
+                       <td><input type="text" name="native_name" id="native_name" value="<?php if (isset($_POST['native_name'])) echo $_POST['native_name']; else echo $this->row["native_name"]; ?>" /></td>\r
+               </tr>\r
+\r
+               <tr align="left">\r
+                       <th><div class="required" title="<?php echo _AT('required_field'); ?>">*</div>\r
+                       <label for="english_name"><?php echo _AT('name_in_english'); ?></label></th>\r
+                       <td><input type="text" name="english_name" id="english_name" value="<?php if (isset($_POST['english_name'])) echo $_POST['english_name']; else echo $this->row["english_name"]; ?>" /></td>\r
+               </tr>\r
+\r
+               <tr align="left">\r
+                       <th>&nbsp;&nbsp;&nbsp;<?php echo _AT("status"); ?></th>\r
+                       <td>\r
+                               <input type="radio" name="status" id="statusD" value="0" <?php if ((isset($_POST['status']) && $_POST['status']==0) || (!isset($_POST['status']) && $this->row['status']==0)) echo 'checked="checked"'; ?> /><label for="statusD"><?php echo _AT('disabled'); ?></label> \r
+                               <input type="radio" name="status" id="statusE" value="1" <?php if ((isset($_POST['status']) && $_POST['status']==1) || (!isset($_POST['status']) && $this->row['status']==1) || (!isset($_POST['status']) && !isset($this->row['status']))) echo 'checked="checked"'; ?> /><label for="statusE"><?php echo _AT('enabled'); ?></label>\r
+                       </td>\r
+               </tr>\r
+\r
+               <tr>\r
+                       <td colspan="2">\r
+                       <p class="submit_button">\r
+                       <input type="submit" name="save" value="<?php echo _AT('save'); ?>" />\r
+                       <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?>" />\r
+                       </p>\r
+                       </td>\r
+               </tr>\r
+       </table>\r
+       \r
+</fieldset>\r
+</div>\r
+</form>\r
+\r
+<script type="text/JavaScript">\r
+//<!--\r
+\r
+function initial()\r
+{\r
+       // set cursor focus\r
+       document.input_form.lang_code.focus();\r
+}\r
+\r
+function CheckAll(element_name, selectall_checkbox_name) {\r
+       for (var i=0;i<document.input_form.elements.length;i++) {\r
+               var e = document.input_form.elements[i];\r
+               if ((e.name == element_name) && (e.type=='checkbox')) {\r
+                       e.checked = document.input_form[selectall_checkbox_name].checked;\r
+                       togglerowhighlight(document.getElementById("r" + e.id), e.id);\r
+               }\r
+       }\r
+}\r
+\r
+function togglerowhighlight(obj, boxid) {\r
+       if (document.getElementById(boxid).checked) {\r
+               obj.className = 'selected';\r
+       } else {\r
+               obj.className = '';\r
+       }\r
+}\r
+//  End -->\r
+//-->\r
+</script>\r
+\r
+<?php include(AF_INCLUDE_PATH.'footer.inc.php'); ?>\r
diff --git a/docs/themes/default/login.tmpl.php b/docs/themes/default/login.tmpl.php
new file mode 100644 (file)
index 0000000..d442a94
--- /dev/null
@@ -0,0 +1,70 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+global $onload;\r
+$onload = 'document.form.form_login.focus();';\r
+\r
+include(AF_INCLUDE_PATH.'header.inc.php');\r
+?>\r
+\r
+<script language="JavaScript" src="include/jscripts/sha-1factory.js" type="text/javascript"></script>\r
+\r
+<script type="text/javascript">\r
+/* \r
+ * Encrypt login password with sha1\r
+ */\r
+function encrypt_password() {\r
+       document.form.form_password_hidden.value = hex_sha1(hex_sha1(document.form.form_password.value) + "<?php echo $_SESSION['token']; ?>");\r
+       document.form.form_password.value = "";\r
+       return true;\r
+}\r
+</script>\r
+\r
+<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">\r
+<?php if (isset($_REQUEST['oauth_token'])) {?>\r
+<input type="hidden" name="oauth_token" value="<?php echo $_REQUEST['oauth_token']; ?>" />\r
+<?php }?>\r
+<?php if (isset($_REQUEST['oauth_callback'])) {?>\r
+<input type="hidden" name="oauth_callback" value="<?php echo $_REQUEST['oauth_callback']; ?>" />\r
+<?php }?>\r
+<input type="hidden" name="form_password_hidden" value="" />\r
+\r
+       <div class="center-input-form">\r
+               <fieldset class="group_form"><legend class="group_form"><?php echo _AT('login') ;?></legend>\r
+                       <table  align="center" width="90%">\r
+                               <tr>\r
+                                       <td colspan="2" align="left"><br /><?php echo _AT('login_text'). _AT('required_field_text') ;?><br /><br /><br /><br /></td>\r
+                               </tr>\r
+\r
+                               <tr>\r
+                                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="login"><?php echo _AT('login_name_or_email'); ?></label></td>\r
+                                       <td><input type="text" name="form_login" size="50" id="login"  class="formfield" style="max-width:70%;width:70%;"/><br /></td>\r
+                               </tr>\r
+                               \r
+                               <tr>\r
+                                       <td align="left"><div class="required" align="right" title="<?php echo _AT('required_field'); ?>">*</div><label for="pass"><?php echo _AT('password'); ?></label></td>\r
+                                       <td><input type="password" class="formfield" name="form_password" size="50" id="pass" style="max-width:70%;width:70%;"/></td>\r
+                               </tr>\r
+\r
+                               <tr>\r
+                                       <td colspan="2">\r
+                                       <p class="submit_button">\r
+                                               <input type="submit" name="submit" value="<?php echo _AT('login'); ?>" class="submit" onclick="return encrypt_password();" /> \r
+                                       </p>\r
+                                       </td>\r
+                               </tr>\r
+                       </table>\r
+               </fieldset>                     \r
+       </div>\r
+</form>\r
+\r
+<?php include(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/themes/default/password_reminder.tmpl.php b/docs/themes/default/password_reminder.tmpl.php
new file mode 100644 (file)
index 0000000..be75984
--- /dev/null
@@ -0,0 +1,56 @@
+<?php 
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+global $onload;
+$onload = 'document.form.form_email.focus();';
+
+require(AF_INCLUDE_PATH.'header.inc.php'); 
+?>
+
+<div class="center-input-form">
+<fieldset class="group_form"><legend class="group_form"><?php echo _AT('password_reminder'); ?></legend>
+
+       <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
+               <input type="hidden" name="form_password_reminder" value="true" />
+
+               <table class="form-data" align="center" width="60%">
+                       <tr>
+                               <td colspan="2" align="left"><?php echo _AT('password_blurb'); ?></td>
+                       </tr>
+                       
+                       <tr><td><br /></td></tr>
+
+                       <tr>
+                               <td align="left">
+                                       <div class="required" title="<?php echo _AT('required_field'); ?>">*</div>
+                                       <label for="email"><?php echo _AT('email_address'); ?></label>:
+                               </td>
+                               <td align="left">
+                                       <input type="text" name="form_email" id="email" size="60" />
+                               </td>
+                       </tr>
+               
+                       <tr>
+                               <td colspan="2">
+                                       <p class="submit_button">
+                                               <input type="submit" name="submit" value="<?php echo _AT('submit'); ?>" onclick="encrypt_password()" />
+                                               <input type="submit" name="cancel" value=" <?php echo _AT('cancel'); ?> " />
+                                       </p>
+                               </td>
+                       </tr>
+               </table>
+       </form>
+
+</fieldset>
+</div>
+
+<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/themes/default/password_reminder_feedback.tmpl.php b/docs/themes/default/password_reminder_feedback.tmpl.php
new file mode 100644 (file)
index 0000000..48784cf
--- /dev/null
@@ -0,0 +1,16 @@
+<?php 
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+require(AF_INCLUDE_PATH.'header.inc.php'); 
+
+require(AF_INCLUDE_PATH.'footer.inc.php'); 
+?>
\ No newline at end of file
diff --git a/docs/themes/default/profile/change_email.tmpl.php b/docs/themes/default/profile/change_email.tmpl.php
new file mode 100644 (file)
index 0000000..5108bba
--- /dev/null
@@ -0,0 +1,70 @@
+<?php 
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+global $onload;
+$onload = 'document.form.form_password.focus();';
+require(AF_INCLUDE_PATH.'header.inc.php'); 
+
+?>
+
+<script language="JavaScript" type="text/javascript" src="include/jscripts/sha-1factory.js"></script>
+
+<script type="text/javascript">
+function encrypt_password()
+{
+       document.form.form_password_hidden.value = hex_sha1(document.form.form_password.value);
+       document.form.form_password.value = "";
+}
+</script>
+
+<div class="center-input-form">
+<fieldset class="group_form"><legend class="group_form"><?php echo _AT('change_email'); ?></legend>
+
+       <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
+               <input type="hidden" name="form_password_hidden" value="" />
+       
+               <table class="form-data" align="center">
+                       <tr>
+                               <td align="left">
+                                       <div class="required" title="<?php echo _AT('required_field'); ?>">*</div>
+                                       <label for="form_password"><?php echo _AT('password'); ?></label>
+                               </td>
+                               <td align="left">
+                                       <input id="form_password" name="form_password" type="password" size="15" maxlength="15" value="" />
+                               </td>
+                       </tr>
+
+                       <tr>
+                               <td align="left">
+                                       <div class="required" title="<?php echo _AT('required_field'); ?>">*</div>
+                                       <label for="email"><?php echo _AT('email_address'); ?></label>
+                               </td>
+                               <td align="left">
+                                       <input id="email" name="email" type="text" size="50" maxlength="50" value="<?php echo stripslashes(htmlspecialchars($_POST['email'])); ?>" />
+                               </td>
+                       </tr>
+               
+                       <tr>
+                               <td colspan="2">
+                                       <p class="submit_button">
+                                               <input type="submit" name="submit" value="<?php echo _AT('submit'); ?>" onclick="encrypt_password()" />
+                                               <input type="submit" name="cancel" value=" <?php echo _AT('cancel'); ?> " />
+                                       </p>
+                               </td>
+                       </tr>
+               </table>
+       </form>
+
+</fieldset>
+</div>
+
+<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/themes/default/profile/change_password.tmpl.php b/docs/themes/default/profile/change_password.tmpl.php
new file mode 100644 (file)
index 0000000..7e817d7
--- /dev/null
@@ -0,0 +1,107 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+global $onload;
+$onload = 'document.form.old_password.focus();';
+
+require(AF_INCLUDE_PATH.'header.inc.php');
+?>
+
+<script
+       language="JavaScript" src="include/jscripts/sha-1factory.js" type="text/javascript"></script>
+
+<script type="text/javascript">
+function encrypt_password()
+{
+       document.form.password_error.value = "";
+
+       document.form.form_old_password_hidden.value = hex_sha1(document.form.old_password.value);
+       document.form.old_password.value = "";
+
+       // verify new password
+       err = verify_password(document.form.password.value, document.form.password2.value);
+       
+       if (err.length > 0)
+       {
+               document.form.password_error.value = err;
+       }
+       else
+       {
+               document.form.form_password_hidden.value = hex_sha1(document.form.password.value);
+               document.form.password.value = "";
+               document.form.password2.value = "";
+       }
+}
+</script>
+
+<div class="center-input-form">
+<fieldset class="group_form"><legend class="group_form"><?php echo _AT('change_password'); ?></legend>
+
+       <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
+               <input type="hidden" name="form_change" value="true" /> 
+               <input name="password_error" type="hidden" /> 
+               <input type="hidden" name="form_old_password_hidden" value="" /> 
+               <input type="hidden" name="form_password_hidden" value="" />
+
+               <table class="form-data" align="center">
+                       <tr>
+                               <td align="left">
+                                       <div class="required" title="<?php echo _AT('required_field'); ?>">*</div>
+                                       <label for="old_password"><?php echo _AT('password_old'); ?></label>:
+                               </td>
+                               <td align="left">
+                                       <input id="old_password" name="old_password" type="password" size="25" maxlength="15" />
+                               </td>
+                       </tr>
+               
+                       <tr>
+                               <td align="left">
+                                       <div class="required" title="<?php echo _AT('required_field'); ?>">*</div>
+                                       <label for="password"><?php echo _AT('new_password'); ?></label>:
+                               </td>
+                               <td align="left">
+                                       <input id="password" name="password" type="password" size="25" maxlength="15" />
+                               </td>
+                       </tr>
+               
+                       <tr>
+                               <td colspan="2">
+                                       <small>&middot; <?php echo _AT('combination'); ?><br />
+                                       &middot; <?php echo _AT('15_max_chars'); ?></small>
+                               </td>
+                       </tr>
+               
+                       <tr>
+                               <td align="left">
+                                       <div class="required" title="<?php echo _AT('required_field'); ?>">*</div>
+                                       <label for="password2"><?php echo _AT('password_again'); ?></label>:
+                               </td>
+                               <td align="left">
+                                       <input id="password2" name="password2" type="password" size="25" maxlength="15" />
+                               </td>
+                       </tr>
+               
+                       <tr>
+                               <td colspan="2">
+                                       <p class="submit_button">
+                                               <input type="submit" name="submit" value="<?php echo _AT('submit'); ?>" onclick="encrypt_password()" />
+                                               <input type="submit" name="cancel" value=" <?php echo _AT('cancel'); ?> " />
+                                       </p>
+                               </td>
+                       </tr>
+               </table>
+       </form>
+
+</fieldset>
+</div>
+
+<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/themes/default/profile/index.tmpl.php b/docs/themes/default/profile/index.tmpl.php
new file mode 100644 (file)
index 0000000..8d9755e
--- /dev/null
@@ -0,0 +1,64 @@
+<?php 
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+require(AF_INCLUDE_PATH.'header.inc.php'); 
+?>
+
+<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="form">
+<input name="password_error" type="hidden" />
+<input type="hidden" name="form_password_hidden" value="" />
+
+<div class="center-input-form">
+<fieldset class="group_form"><legend class="group_form"><?php echo _AT('edit_profile'); ?></legend>
+
+       <table class="form-data" align="center">
+               <tr>
+                       <td colspan="2" align="left"><?php echo _AT('required_field_text') ;?><br /><br /><br /></td>
+               </tr>
+
+               <tr>
+                       <th align="left"><?php echo _AT('login_name'); ?>:</th>
+                       <td align="left"><?php echo stripslashes(htmlspecialchars($_POST['login'])); ?></td>
+               </tr>
+
+               <tr>
+                       <th align="left"><?php echo _AT('web_service_id'); ?>:</th>
+                       <td align="left"><?php echo $_POST['web_service_id']; ?></td>
+               </tr>
+
+               <tr><td><br /></td></tr>
+
+               <tr>
+                       <th align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="first_name"><?php echo _AT('first_name'); ?></label>:</th>
+                       <td align="left"><input id="first_name" name="first_name" type="text" value="<?php echo stripslashes(htmlspecialchars($_POST['first_name'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <th align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="last_name"><?php echo _AT('last_name'); ?></label>:</th>
+                       <td align="left"><input id="last_name" name="last_name" type="text" value="<?php echo stripslashes(htmlspecialchars($_POST['last_name'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td colspan="2">
+                       <p class="submit_button">
+                               <input type="submit" name="submit" value="<?php echo _AT('save'); ?>" class="submit" /> 
+                               <input type="submit" name="cancel" value=" <?php echo _AT('cancel'); ?> "  class="submit" />
+                       </p>
+                       </td>
+               </tr>
+       </table>
+</fieldset>
+
+</div>
+</form>
+
+<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/themes/default/readme.txt b/docs/themes/default/readme.txt
new file mode 100644 (file)
index 0000000..dbb10f1
--- /dev/null
@@ -0,0 +1,8 @@
+\r
+Theme: AFrame Default Theme\r
+Date:          December 2008\r
+\r
+Installing:     See section "Installing a New Theme" in the themes_readme.txt file located in the themes/ top directory.\r
+\r
+Licence:       Falls under the GPL agreement.  See http://www.gnu.org/copyleft/gpl.html.\r
+       
\ No newline at end of file
diff --git a/docs/themes/default/register.tmpl.php b/docs/themes/default/register.tmpl.php
new file mode 100644 (file)
index 0000000..c849ca4
--- /dev/null
@@ -0,0 +1,181 @@
+<?php 
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/*
+ * Called by "register.php" and "user/user_create_edit.php
+ * 
+ * Accept parameters:
+ * 
+ * show_user_group: true/false. Indicates whether show section "User Group"
+ *                  Set to true when admin creates/edits user; set to false at new registration.
+ *                  The new user registered via registration form is automatically set into group "User" 
+ * show_password:  true/false. Indicates whether show section "Password" & "Password Again"
+ *                 Set to true when admin creates new user or new user registration; 
+ *                 Set to false when admin edits existing user.
+ * show_status: true/false. Indicates whether show section "status"
+ *              Set to true when admin creates/edits user; set to false at new registration.
+ * user_row: only need when edit existing user.
+ * all_user_groups: display selections in dropdown list box "User Group"
+ * title: page title
+ * submit_button_text: button text for submit button. "Register" at registration, "Save" at admin creating/editing user
+ */
+$default_user_group_id = AF_USER_GROUP_USER;
+
+require(AF_INCLUDE_PATH.'header.inc.php'); 
+?>
+
+<script language="JavaScript" src="include/jscripts/sha-1factory.js" type="text/javascript"></script>
+
+<script type="text/javascript">
+function encrypt_password()
+{
+       document.form.password_error.value = "";
+
+       err = verify_password(document.form.form_password1.value, document.form.form_password2.value);
+       
+       if (err.length > 0)
+       {
+               document.form.password_error.value = err;
+       }
+       else
+       {
+               document.form.form_password_hidden.value = hex_sha1(document.form.form_password1.value);
+               document.form.form_password1.value = "";
+               document.form.form_password2.value = "";
+       }
+}
+</script>
+
+<form method="post" action="<?php $id_str = ''; if (isset($_GET['id'])) $id_str='?id='.$_GET['id']; echo $_SERVER['PHP_SELF'].$id_str; ?>" name="form">
+<input name="password_error" type="hidden" />
+<input type="hidden" name="form_password_hidden" value="" />
+
+<div class="center-input-form">
+<fieldset class="group_form"><legend class="group_form"><?php echo $this->title; ?></legend>
+
+       <table class="form-data" align="center">
+               <tr>
+                       <td colspan="2" align="left"><br/><?php echo _AT('required_field_text') ;?><br /><br /><br/></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="login"><?php echo _AT('login_name'); ?></label>:</td>
+                       <td align="left"><input id="login" name="login" type="text" maxlength="20" size="30" value="<?php if (isset($_POST['login'])) echo stripslashes(htmlspecialchars($_POST['login'])); else echo stripslashes(htmlspecialchars($this->user_row['login'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left" colspan="2">
+                               <small>&middot; <?php echo _AT('contain_only'); ?><br />
+                                          &middot; <?php echo _AT('20_max_chars'); ?></small>
+                       </td>
+               </tr>
+               
+               <?php if ($this->show_user_group) { ?>
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="user_group_id"><?php echo _AT('user_group'); ?>:</label>:</td>
+                       <td align="left">
+                       <select name="user_group_id" id="user_group_id">
+                               <option value="-1">- <?php echo _AT('select'); ?> -</option>
+                               <?php foreach ($this->all_user_groups as $user_group) {?>
+                               <option value="<?php echo $user_group['user_group_id']; ?>" <?php if ((isset($_POST['user_group_id']) && $_POST['user_group_id']==$user_group['user_group_id']) || (!isset($_POST['user_group_id']) && !isset($this->user_row['user_group_id']) && $user_group['user_group_id'] == $default_user_group_id) || (!isset($_POST['user_group_id']) && isset($this->user_row['user_group_id']) && $this->user_row['user_group_id'] == $user_group['user_group_id'] )) echo 'selected="selected"'; ?>><?php echo $user_group['title']; ?></option>
+                               <?php } ?>
+                       </select>
+                       </td>
+               </tr>
+               <?php } ?>
+
+               <?php if ($this->show_password) { ?>
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="form_password1"><?php echo _AT('password'); ?></label>:</td>
+                       <td align="left"><input id="form_password1" name="form_password1" type="password" size="15" maxlength="15" /></td>
+               </tr>
+
+               <tr>
+                       <td colspan="2" align="left"><small>&middot; <?php echo _AT('combination'); ?><br />
+                                  &middot; <?php echo _AT('15_max_chars'); ?></small></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="form_password2"><?php echo _AT('password_again'); ?></label>:</td>
+                       <td align="left"><input id="form_password2" name="form_password2" type="password" size="15" maxlength="15" /></td>
+               </tr>
+
+               <?php if ($this->use_captcha) { ?>
+               <tr>
+                       <td colspan="2">
+                       <div class="required" title="<?php echo _AT('required_field'); ?>">*</div>
+                       <?php echo _AT('image_validation_text'); ?>
+                       </td>
+               </tr>
+               <tr>
+                       <td>
+                       <label for="secret"><img src="<?php echo AF_INCLUDE_PATH; ?>securimage/securimage_show.php?sid=<?php echo md5(uniqid(time())); ?>" id="simage" align="left" /></label>
+                       <a href="<?php echo AF_INCLUDE_PATH; ?>securimage/securimage_play.php" title="<?php echo _AT('audible_captcha'); ?>"><img src="<?php echo AF_INCLUDE_PATH; ?>securimage/images/audio_icon.gif" alt="<?php echo _AT('audible_captcha'); ?>" onclick="this.blur()" align="top" border="0"></a><br>
+                       <a href="#" title="<?php echo _AT('refresh_image'); ?>" onclick="document.getElementById('simage').src = '<?php echo AF_INCLUDE_PATH; ?>securimage/securimage_show.php?sid=' + Math.random(); return false"><img src="<?php echo AF_INCLUDE_PATH; ?>securimage/images/refresh.gif" alt="<?php echo _AT('refresh_image'); ?>" onclick="this.blur()" align="bottom" border="0"></a>
+                       </td>
+                       <td><input id="secret" name="secret" type="text" size="6" maxlength="6" value="" /></td>
+               </tr>
+               <tr>
+                       <td><small><?php echo _AT('image_validation_text2'); ?><br /></td>
+               </tr>
+               <?php }} ?>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="email"><?php echo _AT('email_address'); ?></label>:</td>
+                       <td align="left"><input id="email" name="email" type="text" size="50" maxlength="50" value="<?php if (isset($_POST['email'])) echo stripslashes(htmlspecialchars($_POST['email'])); else echo stripslashes(htmlspecialchars($this->user_row['email'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="first_name"><?php echo _AT('first_name'); ?></label>:</td>
+                       <td align="left"><input id="first_name" name="first_name" type="text" value="<?php if (isset($_POST['first_name'])) echo stripslashes(htmlspecialchars($_POST['first_name'])); else echo stripslashes(htmlspecialchars($this->user_row['first_name'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="last_name"><?php echo _AT('last_name'); ?></label>:</td>
+                       <td align="left"><input id="last_name" name="last_name" type="text" value="<?php if (isset($_POST['last_name'])) echo stripslashes(htmlspecialchars($_POST['last_name'])); else echo stripslashes(htmlspecialchars($this->user_row['last_name'])); ?>" /></td>
+               </tr>
+
+               <?php if ($this->show_status) {?>
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><?php echo _AT('status'); ?>:</td>
+                       <td align="left">
+                               <input type="radio" name="status" id="statusD" value="<?php echo AF_STATUS_DISABLED; ?>" <?php if ((isset($_POST['status']) && $_POST['status']==0) || (!isset($_POST['status']) && $this->user_row['status']==AF_STATUS_DISABLED)) echo 'checked="checked"'; ?> /><label for="statusD"><?php echo _AT('disabled'); ?></label> 
+                               <input type="radio" name="status" id="statusE" value="<?php echo AF_STATUS_ENABLED; ?>" <?php if ((isset($_POST['status']) && $_POST['status']==1) || (!isset($_POST['status']) && $this->user_row['status']==AF_STATUS_ENABLED)) echo 'checked="checked"'; ?> /><label for="statusE"><?php echo _AT('enabled'); ?></label>
+                               <?php if (defined('AF_EMAIL_CONFIRMATION') && AF_EMAIL_CONFIRMATION) {?>
+                               <input type="radio" name="status" id="statusU" value="<?php echo AF_STATUS_UNCONFIRMED; ?>" <?php if ((isset($_POST['status']) && $_POST['status']==1) || (!isset($_POST['status']) && $this->user_row['status']==AF_STATUS_UNCONFIRMED)) echo 'checked="checked"'; ?> /><label for="statusU"><?php echo _AT('enabled'); ?></label>
+                               <?php }?>
+                       </td>
+               </tr>
+               <?php }?>
+               
+               <?php if (isset($this->user_row['web_service_id'])) {?>
+               <tr>
+                       <td align="left"><?php echo _AT('web_service_id'); ?>:</td>
+                       <td align="left"><?php echo $this->user_row['web_service_id']; ?></td>
+               </tr>
+               <?php }?>
+
+               <tr>
+                       <td colspan="2">
+                       <p class="submit_button">
+                               <input type="submit" name="submit" value="<?php echo $this->submit_button_text; ?>" class="submit" onclick="return encrypt_password();" /> 
+                               <input type="submit" name="cancel" value=" <?php echo _AT('cancel'); ?> "  class="submit" />
+                       </p>
+                       </td>
+               </tr>
+       </table>
+</fieldset>
+
+</div>
+</form>
+
+<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/themes/default/rtl.css b/docs/themes/default/rtl.css
new file mode 100644 (file)
index 0000000..4e06fdf
--- /dev/null
@@ -0,0 +1,16 @@
+/* for right to left languages */
+html, body {
+       direction: rtl;
+}
+
+.img-size-tree {
+       vertical-align: middle;
+       margin-top: 0px;
+       height:1.45em;
+       width:1.45em;
+       float: right;
+}
+
+div.box {
+       line-height:150%;
+}
\ No newline at end of file
diff --git a/docs/themes/default/style_popup.css b/docs/themes/default/style_popup.css
new file mode 100644 (file)
index 0000000..70fc236
--- /dev/null
@@ -0,0 +1,142 @@
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto                     */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+a:link, a:visited  {\r
+       color: #006699;\r
+}\r
+a:hover {\r
+       color: #888888;\r
+}\r
+\r
+li {\r
+       font-family: Verdana, Helvetica, sans-serif;\r
+    /*line-height: 12pt; */\r
+       padding-bottom: 5px; \r
+       padding: 2px;\r
+}\r
+\r
+ul {\r
+       list-style-position: outside;\r
+       list-style-image: url('/images/bullet.gif');\r
+       margin-top: 0px;\r
+}\r
+ol {\r
+       list-style-position: outside;\r
+       list-style-image: none;\r
+       margin-top: 0px;\r
+}\r
+\r
+h1,h2,h3,h4,h5,h6 {\r
+       margin-bottom: 0px;\r
+       margin-top: 0px;\r
+       color: #152065;\r
+}\r
+\r
+form {\r
+       margin-bottom: 0px;\r
+       margin-top: 0px;\r
+}\r
+\r
+\r
+.small {\r
+       font-family: Verdana, Helvetica, sans-serif;\r
+       color: black;\r
+       text-align: right;\r
+       vertical-align: bottom;\r
+}\r
+\r
+hr {\r
+       color: #006699;\r
+       background-color: #006699;\r
+       margin-top: 0px;\r
+       margin-bottom: 0px;\r
+       height:1px;\r
+       border: 0px;\r
+}\r
+\r
+.input {\r
+       font-family: Helvetica, sans-serif;\r
+       border-right: #006699 dashed 1px;\r
+       border-left: #006699 dashed 1px;\r
+       border-top: #006699 dashed 1px;\r
+       border-bottom: #006699 dashed 1px;\r
+}\r
+.input2 {\r
+       font-family: Helvetica, sans-serif;\r
+       border-right: #006699 dashed 1px;\r
+       border-left: #006699 dashed 1px;\r
+       border-top: #006699 dashed 1px;\r
+       border-bottom: #006699 dashed 1px;\r
+}\r
+\r
+\r
+.good {\r
+  font-family: Arial, Verdana, Helvetica, sans-serif;\r
+  font-size : 14px;\r
+  color : white;\r
+  background: green;\r
+  font-weight : bold;\r
+  padding: 4px;\r
+ }\r
+\r
+.selected {\r
+ font-family : Arial, Helvetica, Arial Cyr, Arial Ua, sans-serif;\r
+  font-size : 14px;\r
+  color : black;\r
+  background: #E6E6E6;\r
+  font-weight : bold;\r
+  padding: 2px;\r
+  width: 45%;\r
+}\r
+\r
+table.box2 {\r
+       background-color: #FFFFFF;\r
+       color: #006699;\r
+}\r
+\r
+th.box {\r
+       border-bottom: #006699 solid 1px;\r
+       color: white;\r
+  background-color: #006699;\r
+}\r
+\r
+h2 {\r
+       border-bottom: 1px dashed #006699;\r
+       margin-bottom: 10px;\r
+       padding-bottom: 4px;\r
+       width: 98%;\r
+}\r
+\r
+h5.heading2 {\r
+       letter-spacing: 3px;\r
+       /* text-transform: uppercase;  */\r
+       background-color: #eeeeee; \r
+       color: #006699; \r
+       font-weight: bold; \r
+       font-size: small; \r
+       padding-right: 3px; \r
+       padding-left: 3px; \r
+       text-align: center;\r
+}\r
+\r
+table.box {\r
+       background-color: white;\r
+       border-right: #006699 solid 1px;\r
+       border-left: #006699 solid 1px;\r
+       border-top: #006699 solid 1px;\r
+       margin-right: 50px;\r
+       margin-bottom: 10px;\r
+}\r
+\r
+table.box th, table.box td {\r
+       border-bottom: #006699 solid 1px;\r
+       font-size: smaller;\r
+}\r
diff --git a/docs/themes/default/styles.css b/docs/themes/default/styles.css
new file mode 100644 (file)
index 0000000..c624282
--- /dev/null
@@ -0,0 +1,1118 @@
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto                     */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+html,body{
+       height:100%;
+}
+
+
+/* main body attributes */
+body {
+       font-family: Verdana, Helevetica, Arial, sans-serif;
+       margin:0px;
+       font-size: small;
+       background-color: white;
+}
+
+p {
+    text-align: justify;
+    line-height: 150%;
+       font-size: 1em;
+}
+
+p a {
+    text-decoration: underline;
+}
+
+p a:visited {
+       color: #3F2670;
+    background-color: transparent;
+}
+
+p a:active {
+       color: #A50707;
+    background-color: transparent;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    color: #A50707;
+    clear: right;
+    font: 100% Verdana, Helvetica, Arial, sans-serif;
+       font-weight: bold;
+    margin: 0;
+    padding-top: 0.5em;
+    /*border-bottom: 1px solid #B8AE9C;*/
+}
+
+h1 {
+    font-size: 160%;
+       color: #000;
+
+}
+
+h2 {
+    font-size: 120%;
+}
+h3 {
+    font-size: 100%;
+}
+
+h4 {
+    font-size: 90%;
+    margin:0 0 0 2em;
+}
+
+
+h5 {
+    font-size: 100%;
+}
+
+p.subgroup {
+       margin:0 0 0 2em;
+}
+
+/* list attributes */
+ul {
+       font-family: Verdana, Helevetica, Arial, sans-serif;
+       margin-bottom: 0px;
+       margin-top: 0px;
+       margin-right: 0px;
+}
+
+li {
+       font-family: Verdana, Helevetica, Arial, sans-serif;
+       margin-bottom: 0px;
+       margin-top: 0px;
+       margin-right: 0px;
+}
+ul.msg {
+       line-height: 150%
+}
+
+li.msg_err, li.msg_info {
+       font-family: Verdana, Helevetica, Arial, sans-serif;
+       margin-bottom: 30px;
+       margin-top: 0px;
+       margin-right: 10px;
+       margin-left: 10px;
+       font-size: 110%;
+       list-style: none;
+}
+
+/* span attributes */
+span.err_type{
+  padding: .1em .5em;
+  font-size: smaller;
+}
+
+span.msg{
+       font-family: Verdana, Helevetica, Arial, sans-serif;
+  line-height: 150%;
+}
+
+span.congrats_msg{
+  line-height: 120%;
+  color: green;
+  padding: 1em 1em;
+  font-size: large;
+  font-weight: bold;
+  white-space:nowrap;
+}
+
+span.info_msg{
+  line-height: 100%;
+  color: blue;
+  padding: 1em 1em;
+  font-size: large;
+  font-weight: bold;
+}
+
+span.padding_left {
+  padding-left: 1em;
+}
+
+em {
+       font-weight: bold;
+}
+
+span.small_font {
+       font-size: smaller;
+}
+
+/* link attributes */
+a:link, a:visited  {
+       color: #1A4A72;
+}
+a:hover {
+       color: #932318;
+color:#ffffff;
+}
+a:active {
+       color: #932318;
+}
+/* align text to the left */
+.left {
+       text-align: left;
+}
+
+/* main submit button */
+
+input[type=button] {
+       cursor:pointer;
+       border:outset 1px #ccc;
+       background:#999;
+       color:#666;
+       font-weight:bold;
+       padding: 1px 2px;
+       background:url(images/formbg.gif) repeat-x left top;
+}
+
+input[type=submit] {
+       cursor:pointer;
+       border:outset 1px #ccc;
+       background:#999;
+       color:#666;
+       font-weight:bold;
+       padding: 1px 2px;
+       background:url(images/formbg.gif) repeat-x left top;
+}
+input[type=text] {
+       cursor:pointer;
+       border-bottom:solid 1px #ccc;
+       border-right:solid 1px #ccc;
+       border-top:solid 1px #000;
+       border-left:solid 1px #000;
+       font-weight:bold;
+       background:#fff;
+       padding: 1px 2px;
+}
+.button:focus {
+       border:1px solid #A50707;
+       background-color:  #FFDAB9;     
+}
+/* small submit button at top */
+.button2 {
+       font-family: Verdana, Helevetica, Arial, sans-serif;
+       background-color: #E9F4F3;
+
+}
+.button2:focus {
+       background-color: #E9F4F3;
+       border:  #ACCFCC  solid 1px;
+}
+
+.center {
+       text-align: center;
+}
+
+/* paging */
+div.paging {
+   width: 100%;
+   text-align: center;
+   margin: 0.5em auto;
+}
+div.paging ul {
+   list-style: none;
+   display: inline;
+   padding: 0px;
+   border: 1px solid #000;
+}
+div.paging li { 
+       display: inline; 
+       padding-left: 2px; 
+       padding-right: 2px;
+       padding-top: 0px;
+       padding-bottom: 0px;
+}
+
+div.paging li a {
+       text-decoration: none;
+       padding-left: 4px;
+       padding-right: 4px;
+       border-left: 1px solid white;
+       border-right: 1px solid white;
+}
+
+div.paging li a:hover, div.paging li a.current {
+   background-color: #F7F3ED;
+   border-left: 1px solid #000;
+   border-right: 1px solid #000;
+}
+
+/***************************************************************/
+/* NEW STUFF */
+
+table.tabbed-table {
+       width: 100%;
+       border:thin black solid;
+}
+table.tabbed-table th#left-empty-tab {
+       background-color: transparent;
+       width: 15px;
+       border-bottom: 1px solid #B8AE9C;
+}
+table.tabbed-table th#right-empty-tab {
+       text-align: right;
+       background-color: transparent;
+       border-bottom: 1px solid #B8AE9C;
+       width: 400px;
+       padding-right: 5px;
+}
+table.tabbed-table th#right-empty-tab a {
+       text-decoration: underline;
+}
+table.tabbed-table th.tab-spacer {
+       background-color: transparent;
+       width: 5px;
+       border-bottom: 1px solid #B8AE9C;
+}
+
+table.tabbed-table th.tab {
+       padding-top: 2px;
+       padding-bottom: 2px;
+       width: 110px;
+       background-color: #E9F4F3;
+       border-bottom: 1px solid #B8AE9C;
+       border-left: 1px solid #B8AE9C;
+       border-top: 1px solid #B8AE9C;
+       border-right: 1px solid #B8AE9C;
+}
+table.tabbed-table th.tab:hover {
+       background-color: #ACCFCC;
+}
+
+table.tabbed-table th.tab a:focus {
+       color: white;
+}
+table.tabbed-table th.selected {
+       padding-top: 2px;
+       padding-bottom: 2px;
+       width: 110px;
+       background-color: #ACCFCC;
+       border-left: 1px solid #B8AE9C;
+       border-top: 1px solid #B8AE9C;
+       border-right: 1px solid #B8AE9C;
+}
+
+table.tabbed-table a, table.tabbed-table a:visited, table.tabbed-table a:hover {
+       color: black;
+       text-decoration: none;
+}
+
+#banner h1 {
+       display: inline; 
+       font-size: 130%;
+}
+#banner {
+       /* border: thin #365D95 solid; */
+       margin: 1.5em 1em 0em 1em;
+       /* border-bottom: black 1px solid; */
+       padding-top:4px;
+       padding-left:4px; 
+       vertical-align:middle;
+}
+#banner a:visited {
+       color: #365D95;
+}
+
+#banner a:hover {
+       color: white; background-color: #365D95
+}
+#banner a:active {
+       color: white; background-color: #365D95
+}
+#banner #logininfo {
+       font-size: 8pt; 
+       font-weight:bold;
+       margin-left: 10px; 
+       margin-top: 2px; 
+       position: absolute; 
+       left: 0px; 
+       top: 0px; 
+       color: black; 
+       background-color: white; 
+       padding-left: 5px; 
+       padding-right: 5px;
+}
+#banner #versioninfo {
+       font-size: 8pt; 
+       margin-right: 10px; 
+       margin-top: 2px; 
+       position: absolute; 
+       right: 0px; 
+       top: 0px; 
+       color: black; 
+       background-color: white; 
+       padding-left: 5px; 
+       padding-right: 5px;
+}
+
+h2 #title {
+       padding: 0px 0px 0px 0px;
+       margin: 0px 0px 0px 0px; 
+       color: #053188;
+}
+
+a#back-to {
+       padding-left: 20px;
+       background-image: url(images/back.gif);
+       background-repeat: no-repeat;
+       background-position: 0px 0px;
+}
+
+
+
+div#breadcrumbs {
+    /* The path bar, including breadcrumbs and add to favorites */
+  font-size: 0.85em;
+       margin: 0em 2em 1em 2em;
+       padding-left:4px; 
+}
+h2.page-title {
+       clear:right;
+       margin-bottom: 10px;
+       padding:0px;
+}
+
+h1 {
+       margin-bottom: 5px;
+}
+
+div#sub-menu {
+       color: #555;
+       background-color:#E6E6E6; 
+       padding-top: 5px; 
+       font-size:0.85em; 
+       border-bottom:1px solid black;
+       margin-bottom: 1em; 
+       height:2em;
+}
+
+div#sub-navigation {
+       padding: 3px;
+       float:left;
+}
+
+div#guide {
+       padding-right: 5px;
+       float:right;
+}
+
+div#sub-navigation strong {
+       color: black;
+}
+
+div#help {
+       border-left: 1px solid black;
+       border-right: 1px solid black;
+       border-bottom: 1px solid black;
+       padding-left: 5px;
+       padding-right: 5px;
+       padding-bottom: 5px;
+       background-color: #F7F3ED;
+       margin-left: 5px;
+       margin-right: 5px;
+       font-size: small;
+}
+
+h3#help-title {
+       margin-left: 5px;
+       margin-right: 5px;
+       border-left: 1px solid black;
+       border-right: 1px solid black;
+       padding: 1px;
+       background-color: #F7F3ED;
+}
+.line {
+       border-bottom: 1px solid black;
+}
+div#help p {
+       padding: 0px;
+       margin: 0px;
+}
+
+div#toctoggle {
+       float: left;
+       padding-left: 10px;
+}
+
+h1#section-title {
+       float: left;
+       white-space:nowrap;
+       margin-left:1em;
+       margin-bottom: -0.5em;
+}
+
+div#top-links {
+       float:right;
+       padding-right: 5px;
+       margin-right:205px;
+       margin-top:1em;
+       white-space:nowrap;
+}
+
+div#top-links a:link, div#top-links a:visited {
+       text-decoration:none;
+       margin-left:10px;
+}
+div#top-links a:focus{
+       color:black;
+       background-color:#F6EAD6;
+}
+
+/* for filter tables */
+table.filter {
+       clear:left;
+       margin-left: auto; 
+       margin-right: auto;
+       text-align: left;
+} 
+
+table.filter th {
+       font-weight: bold;
+}
+
+table.filter td {
+       padding: 5px;
+       white-space: nowrap;
+}
+
+/* for data tables */
+table.data {
+       clear:right;
+       width: 95%; 
+       margin-left: 2em;; 
+       margin-right: auto;
+       text-align: left;
+
+
+} 
+
+table.data th {
+       background-color: #F6EAD6;
+       padding: 3px;
+       white-space: nowrap;
+}
+
+table.data th a {
+       color: #595241;
+       padding-right: 15px;
+       margin-right: 15px;
+       background-image: url('../default/images/sort.gif');
+       background-repeat: no-repeat;
+       background-position: right;
+}
+
+table.data tbody {
+       border-top: 1px solid #B8AE9C;
+       border-bottom: 1px solid #B8AE9C;
+}
+
+table.data tbody th {
+       text-align: left;
+       background-color: #F7F3ED;
+       cursor: auto;
+}
+
+table.data td {
+       padding: 3px;
+}
+
+table.data tbody tr:hover {
+       background-color: #efefef;
+       cursor: pointer;
+}
+
+table.data tbody tr.selected {
+       background-color: #E9F4F3;
+       cursor: auto;
+}
+
+table.data tfoot {
+       background-color: #F7F3ED;
+       /*border-top: 1px solid #B8AE9C;*/
+}
+
+table.data tfoot tr:first-child td {
+       /*border-top: 1px solid #B8AE9C;*/
+       padding: 5px;
+       background-image: url('images/arrow_ltr.gif');
+       background-repeat: no-repeat;
+       background-position: 4px 5px;
+       padding-left: 40px;
+}
+
+table.data.static tfoot td, table.data.static tfoot tr:first-child td {
+       border-top: 1px solid #B8AE9C;
+       padding: 15px;
+       background-image: none;
+       padding-left: 0px;
+}
+
+/*buttons*/
+table.data tfoot input {
+       background-color: #efefef;
+       font-weight: normal;
+       border:  #AAA  solid 1px;
+}
+
+table.data tfoot input:focus {
+       background-color: #FFDAB9;
+       border:  #AAA  solid 1px;
+}
+
+
+/* used for static tables with no form elements: */
+table.data.static tbody tr:hover {
+       background-color: transparent;
+       cursor: auto;
+}
+
+
+/* report styles */
+#errors{
+       width:95%;
+       border:thin #cccccc solid;
+       padding:1em;
+}
+#likely_problems{
+       width:95%;
+       border:thin #cccccc solid;
+       padding:1em;
+}
+#potential_problems{
+       width:95%;
+       border:thin #cccccc solid;
+       padding:1em;
+}
+#html_validation_result{
+        white-space:nowrap;
+       width:95%;
+       border:thin #cccccc solid;
+       padding:1em;
+}
+/* feedback /errors */
+
+
+div#error {
+       width: 50%;
+       margin-left: auto;
+       margin-right: auto;
+       margin-top: 15px;
+       margin-bottom: 15px;
+       border: 1px solid #DD0000;
+       padding: 5px;
+       background-color: #F4DCDC;
+       color: #A50707;
+       background-color: #F4DCDC;
+       padding-left: 25px;
+       font-weight: bold;
+}
+div#error h4 {
+       color: black;
+       margin-left: 0px;
+}
+
+div#error ul, div#feedback ul, div#help ul {
+       position: relative;
+       list-style: none;
+       margin-left: 0px;
+       padding-left: 0px;
+}
+
+div#error ul li{
+       margin-top: 5px;
+}
+
+div#feedback {
+       width: 50%;
+       margin-left: auto;
+       margin-right: auto;
+       margin-top: 15px;
+       margin-bottom: 15px;
+       border: 1px solid #17B506;
+       padding: 5px;
+       background-color: #F2FCF0;
+       color: #595241;
+       font-weight: bold;
+}
+
+div#help {
+       width: 50%;
+       margin-left: auto;
+       margin-right: auto;
+       margin-top: 15px;
+       margin-bottom: 15px;
+       border: 1px solid #ACCFCC;
+       padding: 5px;
+       background-color: #E9F4F3;
+       color: #024C41;
+}
+
+div#info {
+       width: 50%;
+       margin-left: auto;
+       margin-right: auto;
+       margin-top: 15px;
+       margin-bottom: 15px;
+       border: 1px solid #B8AE9C;
+       padding: 5px;
+       background-color: #EFE6FF;
+       color: #595241;
+       font-weight: bold;
+}
+
+div#warning {
+       width: 50%;
+       margin-left: auto;
+       margin-right: auto;
+       margin-top: 15px;
+       margin-bottom: 15px;
+       border: 1px solid #FF8400;
+       padding: 5px;
+       background-color: #FFF6ED;
+       color: #D95900;
+       font-weight: bold;
+}
+acronym {
+       cursor: help;
+}
+
+div.required {
+       font-weight: bold;
+       color: red;
+       font-size: large;
+       float: left;
+       position: relative;
+       margin-top: -5px;
+       height: 15px;
+       padding-right: 2px;
+  text-align: left;
+}
+
+form {
+       clear: none;
+       display:inline;
+}
+
+h3.indent {
+       width: 90%;
+       padding: 0px 0px 10px 60px;
+}
+
+h4.box {
+       font-size:0.85em;
+       padding: 2px;
+}
+
+div.box {
+       padding: 5px;
+       background-color: #F5F5F5;
+       color: black;
+       border: 1px solid #B8AE9C;
+
+       font-size:0.85em;
+       font-weight: normal;
+       padding:2px;
+}
+
+h5.box { 
+    background-color: #6F7172;
+    border: 1px solid #B8AE9C;
+    border-style: solid solid none solid;
+    color: Black;
+    padding: 0em 1em 0em 1em;
+    
+    display: inline;
+       font-size:  1em;
+    height: 1em;
+}
+
+div.box a:link {
+       text-decoration: none;
+}
+
+div.box a:visited {
+       color: #2A6C28;
+       text-decoration: none;
+}
+
+div.box a:hover {
+       text-decoration: underline;
+}
+
+.boxDetails {
+    text-align: right;
+}
+
+div.box .content {
+    padding: 1em;
+       font-size:  1em;
+}
+
+div.box a.close {
+    float: right;
+    text-transform: none;
+    border-left: 1pt solid #B8AE9C;
+    padding: 0em 0.2em;
+}
+
+div.box h1, 
+div.box h2, 
+div.box h3, 
+div.box h4 {
+    margin: 0;
+    padding: 0;
+}
+
+div.box .even {
+    background-color: #F7F3ED;
+}
+
+div.box .odd {
+    background-color: transparent;
+}
+
+fieldset {
+       margin-bottom: 10pt;
+}
+#shortcuts legend {
+}
+#shortcuts ul {
+       position: relative;
+       margin-top: 0pt;
+       margin-bottom: 0pt;
+       margin-left: 0pt;
+       list-style-type:  none;
+       padding-left: 0pt; 
+}
+
+a#guide {
+       background-image: url(images/guide.jpg); background-repeat: no-repeat; background-position: 0px 0px;
+       background-color: #eee;
+       padding: 2px 10px 2px 26px;
+       border: 1px solid #ccc;
+       float:right;
+       text-decoration:none;
+       font-size:0.85em;
+}
+div#content-text {
+       padding-right: 5pt;
+       line-height:150%;
+}
+
+div#content-text li {
+       margin-left: 15pt;
+}
+
+div#content-info {
+       margin: 5pt;
+       font-size: small;
+       color: #b8ae9c;
+       clear: both;
+}
+
+div#container {
+       text-align: left;
+       margin: 0px auto;
+       padding: 0px;
+       border:0;
+       width: 95%;
+}
+
+div#menutoggle{
+       text-align: right; 
+       padding-bottom: 10px; 
+       padding-right: 10px; 
+       float: left; 
+       margin-top: 10px; 
+       padding-right: 5px; 
+       font-size:0.95em;
+}
+
+pre.code {
+       padding: 10px;
+       background:#F6EAD6 none repeat scroll 0 0;
+       border:1px solid black;
+       font-family:"Bitstream Vera Sans Mono",monospace;
+       margin-top:1em;
+       line-height: 150%;
+}
+
+/*** header ***/
+div.topnavlistcontainer {
+       margin-left:auto; 
+       margin-right:auto;
+  margin-bottom:1em;
+/*     border: thin #CCCCCC solid;*/
+       line-height:100%;
+/*     background-color: #365D95;*/
+       background-position:  top right;
+       background-repeat: no-repeat;
+}
+ul.topnavlist {
+       padding-top: 10px;
+       white-space: nowrap;
+       margin-left:0px;
+       margin-left:0px;
+       list-style-position:inside;
+       list-style: disc inside;
+}
+
+ul.topnavlist li {
+       list-style: none;
+       list-style-position:inside;
+
+       display: inline;
+       margin: 0px;
+}
+
+ul.topnavlist li a:hover, ul.topnavlist li a:focus, ul.topnavlist li a.active {
+    background-color: #E6E6E6;
+    color: black;
+       text-decoration:none;
+}
+
+ul.topnavlist li a {
+    /* The normal, unselected tabs. They are all links */
+    color: #555;
+       font-weight:bold;
+    height: 1.5em;
+    padding: 0em 2em 0em;
+       text-decoration:none;
+       background-color:white;
+}
+
+ul.topnavlist li a.selected {
+    /* The selected tab. There's only one of these */
+    color: #555;
+    font-weight: normal;
+}
+
+/*  form fields grouping for WCAG 2.0 conformance*/
+fieldset.group_form{
+       margin:.5em;
+       border:thin #6D7B8D solid;
+       min-height: 170px;
+       padding:.5em;
+       background-color:#F8F8F8;;
+
+}
+
+legend.group_form{
+       border:thin #6D7B8D solid;
+       background-color: #ffa20c;
+       font-weight: 600;
+       color: black;
+       padding:.2em;
+}
+
+/* highlight active links for WCAG 2.0 conformance */
+a:active,a:hover,a:focus{
+       background-color:#F6EAD6;
+       color:#000000;
+}
+
+code.input {
+  margin-bottom: 2ex;
+  background-color: white;
+  line-height: 130%;
+}
+
+code.input strong {
+  color: red;
+  padding-left: .5ex;
+  padding-right: .5ex;
+  font-weight: bolder;
+}
+
+p.helpwanted {
+  padding: 0;
+  margin-left:  auto;
+  margin-right: 5px;
+  color:        #888;
+  text-align:       right;
+}
+
+p.helpwanted a {
+  color: #88f;
+  text-decoration: none;
+}
+
+.selected {
+ font-family : Arial, Helvetica, Arial Cyr, Arial Ua, sans-serif;
+  font-size : 14px;
+  color : black;
+  background: #E6E6E6;
+  font-weight : bold;
+  padding: 2px;
+  width: 45%;
+}
+
+table.form-data th,table.form-data td {
+       padding: 4px;
+}
+table.form-data{
+width:80%;
+}
+th.box {
+       border-bottom: #006699 solid 1px;
+       color: white;
+  background-color: #006699;
+}
+
+table.box {
+       background-color: white;
+       border-right: #006699 solid 1px;
+       border-left: #006699 solid 1px;
+       border-top: #006699 solid 1px;
+       margin-right: 500px;
+       margin-bottom: 10px;
+}
+
+table.box th, table.box td {
+       border-bottom: #006699 solid 1px;
+       font-size: smaller;
+}
+
+#source ol {
+       background:#F6EAD6 none repeat scroll 0 0;
+       border:1px solid black;
+       font-family:"Bitstream Vera Sans Mono",monospace;
+       list-style-position:inside;
+       list-style-type:decimal;
+       margin-top:1em;
+       line-height: 200%;
+}
+
+img.inline-badge {
+       float:left;
+       margin-left:3em;
+       padding:12px;
+}
+
+pre.badgeSnippet {
+       margin-bottom:2em;
+       margin-left:108px;
+       padding-left:3em;
+}
+
+/* Liquid Round theme elements */
+
+#liquid-round {
+        width:85em;
+       margin:0px auto;
+       background:#fff url(images/leftside.gif) repeat-y left top;
+}
+
+.top {
+       width:100%;
+       height:15px;
+       background:url(images/top.gif) no-repeat left top;
+}
+.top span {
+       display:block;
+       position:relative;
+       height:20px;
+       background:url(images/top-right.gif) no-repeat right top;
+}
+
+.center-content {
+       position:relative;
+       background:url(images/rightside.gif) repeat-y right top;
+       padding:1px 5px 1px 5px;
+       margin:-1px 0 -50px 0;
+}
+
+
+.bottom {
+       width:85em;
+       margin-left:auto;
+       margin-right:auto;
+       height:60px;
+       background:url(images/bottom.gif) no-repeat left bottom;
+}
+.bottom span {
+       display:block;
+       position:relative;
+       height:60px;
+       background:url(images/bottom-right.gif) no-repeat right top;
+}
+
+
+/* Navigation tab style */
+.navigation a
+{
+       color: #000;
+       font-weight:bold;
+       background: #ffa20c url(images/navl.gif) left top no-repeat;
+       text-decoration: none;
+       padding-left: 10px;
+} 
+
+.navigation a span
+{
+       background: url(images/navr.gif) right top no-repeat;
+       padding-right: 10px;
+} 
+.navigation a:hover
+{
+       color: #fff;
+       background: #781351 url(images/navlh.gif) left top no-repeat;
+       padding-left: 10px
+}
+
+.navigation a:hover span
+{
+       background: url(images/navrh.gif) right top no-repeat;
+       padding-right: 10px
+}
+.navigation a:active span
+{
+       background: url(images/navrh.gif) right top no-repeat;
+       padding-right: 10px
+}
+
+.navigation ul
+{
+       list-style: none;
+       padding: 0;
+       margin: 0
+}
+
+.navigation li
+{
+       list-style: none;
+       list-style-position:inside;
+       display: inline;
+       float: left;
+       margin: 0;
+}
+#logo{
+       float:right;
+       margin-right:1em;
+       margin-top:-1em;
+}
+
+
+ul.navigation li a:hover, ul.navigation li a:focus, ul.navigation li a.active {
+       background-color: #781351; 
+       background: #781351 url(images/navlh.gif) left top no-repeat;
+       color: white;
+       text-decoration:none;
+}
+
+ul.navigation li a.active span{
+       background-color: #781351; 
+       background: #781351 url(images/navrh.gif) right top no-repeat;
+       padding-right: 10px;
+}
+
diff --git a/docs/themes/default/system/index.tmpl.php b/docs/themes/default/system/index.tmpl.php
new file mode 100644 (file)
index 0000000..dcba0b8
--- /dev/null
@@ -0,0 +1,151 @@
+<?php 
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/*
+ * Called by "system/index.php"
+ * 
+ * Accept parameters:
+ * 
+ * show_user_group: true/false. Indicates whether show section "User Group"
+ *                  Set to true when admin creates/edits user; set to false at new registration.
+ *                  The new user registered via registration form is automatically set into group "User" 
+ * show_password:  true/false. Indicates whether show section "Password" & "Password Again"
+ *                 Set to true when admin creates new user or new user registration; 
+ *                 Set to false when admin edits existing user.
+ * show_status: true/false. Indicates whether show section "status"
+ *              Set to true when admin creates/edits user; set to false at new registration.
+ * user_row: only need when edit existing user.
+ * all_user_groups: display selections in dropdown list box "User Group"
+ * title: page title
+ * submit_button_text: button text for submit button. "Register" at registration, "Save" at admin creating/editing user
+ */
+
+global $onload;
+$onload = 'document.form.site_name.focus();';
+
+require(AF_INCLUDE_PATH.'header.inc.php'); 
+?>
+
+<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="form">
+
+<div class="center-input-form">
+<fieldset class="group_form"><legend class="group_form"><?php echo $this->title; ?></legend>
+
+       <table class="form-data" align="center">
+               <tr>
+                       <td colspan="2" align="left"><br/><?php echo _AT('required_field_text') ;?><br /><br /><br/></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="site_name"><?php echo _AT('site_name'); ?></label>:</td>
+                       <td align="left"><input id="site_name" name="site_name" type="text" maxlength="20" size="30" value="<?php if (isset($_POST['site_name'])) echo stripslashes(htmlspecialchars($_POST['site_name'])); else echo stripslashes(htmlspecialchars($this->config['site_name'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="contact_email"><?php echo _AT('contact_email'); ?></label>:</td>
+                       <td align="left"><input id="contact_email" name="contact_email" type="text" size="50" maxlength="50" value="<?php if (isset($_POST['contact_email'])) echo stripslashes(htmlspecialchars($_POST['contact_email'])); else echo stripslashes(htmlspecialchars($this->config['contact_email'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><label for="theme"><?php echo _AT('theme'); ?></label>:</td>
+                       <td align="left">
+                               <select name="theme" id="theme"><?php
+                                       if (isset($_POST['theme']))
+                                               $selected_theme = $_POST['theme'];
+                                       else
+                                               $selected_theme = $_SESSION['prefs']['PREF_THEME'];
+                                               
+                                       foreach ($this->enabled_themes as $theme) {
+                                               if (!$theme) {
+                                                       continue;
+                                               }
+
+                                               if ($theme_fldr == $selected_theme) {
+                                                       echo '<option value="'.$theme['dir_name'].'" selected="selected">'.$theme['title'].'</option>';
+                                               } else {
+                                                       echo '<option value="'.$theme['dir_name'].'">'.$theme['title'].'</option>';
+                                               }
+                                       }
+                               ?>
+                               </select>
+                       </td>
+               </tr>
+
+               <tr>
+                       <td align="left"><label for="default_language"><?php echo _AT('default_language'); ?></label>:</td>
+                       <td align="left">
+               <?php if (!empty($_POST['default_language'])) { 
+                               $select_lang = $_POST['default_language']; 
+                       } else { 
+                               $select_lang = $_config['default_language'];
+                       } 
+                       $this->languageManager->printDropdown($select_lang, 'default_language', 'default_language'); ?>
+                       </td>
+               </tr>
+
+               <tr>
+                       <td align="left"><?php echo _AT('use_captcha'); ?>:</td>
+                       <td align="left">
+                               <input type="radio" name="use_captcha" id="statusD" value="<?php echo AF_STATUS_DISABLED; ?>" <?php if ((isset($_POST['use_captcha']) && $_POST['use_captcha']==AF_STATUS_DISABLED) || (!isset($_POST['use_captcha']) && $this->config['use_captcha']==AF_STATUS_DISABLED)) echo 'checked="checked"'; ?> /><label for="statusD"><?php echo _AT('disabled'); ?></label> 
+                               <input type="radio" name="use_captcha" id="statusE" value="<?php echo AF_STATUS_ENABLED; ?>" <?php if ((isset($_POST['use_captcha']) && $_POST['use_captcha']==AF_STATUS_ENABLED) || (!isset($_POST['use_captcha']) && $this->config['use_captcha']==AF_STATUS_ENABLED)) echo 'checked="checked"'; ?> /><label for="statusE"><?php echo _AT('enabled'); ?></label>
+                       </td>
+               </tr>
+               
+               <tr>
+                       <td align="left" colspan="2">
+                               <small>&middot; <?php echo _AT('default_use_captcha'); ?></small>
+                       </td>
+               </tr>
+               
+               <tr>
+                       <td align="left"><label for="max_file_size"><?php echo _AT('max_file_size'); ?></label>:</td>
+                       <td align="left"><input id="max_file_size" name="max_file_size" type="text" value="<?php if (isset($_POST['max_file_size'])) echo stripslashes(htmlspecialchars($_POST['max_file_size'])); else echo stripslashes(htmlspecialchars($this->config['max_file_size'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left" colspan="2">
+                               <small>&middot; <?php echo _AT('default_max_file_size'); ?></small>
+                       </td>
+               </tr>
+               
+               <tr>
+                       <td align="left"><label for="illegal_extentions"><?php echo _AT('illegal_extentions'); ?></label>:</td>
+                       <td align="left"><textarea name="illegal_extentions" cols="50" id="illegal_extentions" rows="2" class="formfield" ><?php if ($this->config['illegal_extentions']) { echo str_replace('|',' ',$this->config['illegal_extentions']); }?></textarea></td>
+               </tr>
+
+               <tr>
+                       <td align="left"><label for="latex_server"><?php echo _AT('latex_server'); ?></label>:</td>
+                       <td align="left"><input id="latex_server" name="latex_server" size="50" type="text" value="<?php if (isset($_POST['latex_server'])) echo stripslashes(htmlspecialchars($_POST['latex_server'])); else echo stripslashes(htmlspecialchars($this->config['latex_server'])); ?>" /></td>
+               </tr>
+
+               <tr>
+                       <td align="left" colspan="2">
+                               <small>&middot; <?php echo _AT('latex_server_info'); ?></small>
+                       </td>
+               </tr>
+               
+               <tr>
+                       <td colspan="2">
+                       <p class="submit_button">
+                               <input type="submit" name="submit" value="<?php echo _AT('submit'); ?>" class="submit" /> 
+                               <input type="submit" name="cancel" value=" <?php echo _AT('cancel'); ?> "  class="submit" />
+                               <input type="submit" name="factory_default" value=" <?php echo _AT('factory_default'); ?> "  class="submit" />
+                       </p>
+                       </td>
+               </tr>
+       </table>
+</fieldset>
+
+</div>
+</form>
+
+<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/themes/default/theme.cfg.php b/docs/themes/default/theme.cfg.php
new file mode 100644 (file)
index 0000000..b085c3c
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/* This is the default configuration file for the default theme. */
+
+/* The theme's name. */
+$_theme['name'] = 'Default 0.1';
+
+/* The theme's version number. */
+$_theme['version'] = '0.1';
+
+/* Which version of AFrame is this theme intended for. */
+$_theme['aframe-version'] = '0.1';
+
+/* author information */
+$_theme['author_name']  = 'Transformable';
+$_theme['author_url']   = 'http://atrc.utoronto.ca/';
+$_theme['author_email'] = '';
+
+?>
diff --git a/docs/themes/default/theme_info.xml b/docs/themes/default/theme_info.xml
new file mode 100644 (file)
index 0000000..bc1324a
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>\r
+\r
+<theme>\r
+       <title>Default</title>\r
+       <version>0.1</version>\r
+       <last_updated>2008-12-12</last_updated>\r
+       <extra_info>This is AFrame default theme.</extra_info>\r
+</theme>\r
+\r
diff --git a/docs/themes/default/updater/index.tmpl.php b/docs/themes/default/updater/index.tmpl.php
new file mode 100644 (file)
index 0000000..8258ff9
--- /dev/null
@@ -0,0 +1,155 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+//include(AF_INCLUDE_PATH.'header.inc.php');\r
+global $dependent_patches;\r
+\r
+if (isset($this->javascript_run_now)) echo $this->javascript_run_now;\r
+?>\r
+\r
+<div class="center-input-form">\r
+<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">\r
+<fieldset class="group_form"><legend class="group_form"><?php echo _AT("updates"); ?></legend>\r
+\r
+<table class="data" rules="rows">\r
+<thead>\r
+       <tr>\r
+               <th scope="col">&nbsp;</th>\r
+               <th scope="col"><?php echo _AT('system_update_id');?></th>\r
+               <th scope="col"><?php echo _AT('description');?></th>\r
+               <th scope="col"><?php echo _AT('status');?></th>\r
+               <th scope="col"><?php echo _AT('available_to');?></th>\r
+               <th scope="col"><?php echo _AT('author');?></th>\r
+               <th scope="col"><?php echo _AT('installed_date');?></th>\r
+               <th scope="col"><?php echo _AT('view_message');?></th>\r
+       </tr>\r
+</thead>\r
+\r
+<?php if ($this->num_of_patches == 0){?>\r
+<tbody>\r
+<tr>\r
+       <td colspan="8">\r
+<?php echo _AT('none_found'); ?>\r
+       </td>\r
+</tr>\r
+</tbody>\r
+\r
+<?php } else { ?>\r
+<tfoot>\r
+<tr>\r
+       <td colspan="8">\r
+               <input type="submit" name="install" value="<?php echo _AT('install'); ?>" />\r
+       </td>\r
+</tr>\r
+</tfoot>\r
+<tbody>\r
+<?php  if (is_array($this->patches_in_db))\r
+               foreach ($this->patches_in_db as $row)\r
+                               print_patch_row($row, $row['patches_id'], false);\r
+       \r
+       $array_id = 0;\r
+       // display un-installed patches\r
+       if(is_array($this->patch_list_array))\r
+       {\r
+               foreach ($this->patch_list_array as $row_num => $new_patch)\r
+               {\r
+                       if (!is_patch_installed($new_patch['system_patch_id']))\r
+                       {\r
+                               $dependent_patches_installed = true;\r
+                               $dependent_patches = "";\r
+                               \r
+                               // check if the dependent patches are installed\r
+                               if (is_array($new_patch["dependent_patches"]))\r
+                               {\r
+                                       \r
+                                       foreach ($new_patch["dependent_patches"] as $num => $dependent_patch)\r
+                                       {\r
+                                               if (!is_patch_installed($dependent_patch))\r
+                                               {\r
+                                                       $dependent_patches_installed = false;\r
+                                                       $dependent_patches .= $dependent_patch. ", ";\r
+                                               }\r
+                                       }\r
+                                       \r
+                                       // remove the last comma in the string\r
+                                       if ($dependent_patches <> "") $dependent_patches = substr($dependent_patches, 0, -2);\r
+                               }\r
+\r
+                               // display patch row\r
+                               if ($dependent_patches_installed)\r
+                                       print_patch_row($new_patch, $array_id++, true);\r
+                               else\r
+                               {\r
+                                       print_patch_row($new_patch, $array_id++, false);\r
+                                       $dependent_patches_installed = true;\r
+                               }\r
+                       }\r
+                       else\r
+                               $array_id++;\r
+               }\r
+       }\r
+?>\r
+</tbody>\r
+\r
+<?php } ?>\r
+</table>\r
+</fieldset>\r
+\r
+</form>\r
+</div>\r
+\r
+<div class="center-input-form">\r
+<form name="frm_upload" enctype="multipart/form-data" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" >\r
+       <fieldset class="group_form"><legend class="group_form"><?php echo _AT("upload"); ?></legend>\r
+       \r
+               <div class="row"><label for="patchfile"><?php echo _AT("upload_update"); ?></label></div>\r
+\r
+               <div class="row">\r
+                       <input type="hidden" name="MAX_FILE_SIZE" value="52428800" />\r
+                       <input type="file" name="patchfile"  id="patchfile" size="50" />\r
+               </div>\r
+               \r
+               <div class="row buttons">\r
+                       <input type="submit" name="install_upload" value="Install" onclick="javascript: return validate_filename(); " class="submit" />\r
+                       <input type="hidden" name="uploading" value="1" />\r
+               </div>\r
+       </fieldset>\r
+</form>\r
+</div>\r
+\r
+<script language="JavaScript" type="text/javascript">\r
+<!--\r
+\r
+String.prototype.trim = function() {\r
+       return this.replace(/^\s+|\s+$/g,"");\r
+}\r
+\r
+// This function validates if and only if a zip file is given\r
+function validate_filename() {\r
+  // check file type\r
+  var file = document.frm_upload.patchfile.value;\r
+  if (!file || file.trim()=='') {\r
+    alert('Please give a zip file!');\r
+    return false;\r
+  }\r
+  \r
+  if(file.slice(file.lastIndexOf(".")).toLowerCase() != '.zip') {\r
+    alert('Please upload ZIP file only!');\r
+    return false;\r
+  }\r
+}\r
+\r
+//  End -->\r
+//-->\r
+</script>\r
+\r
+<?php require (AF_INCLUDE_PATH.'footer.inc.php'); ?>\r
diff --git a/docs/themes/default/updater/myown_patches.tmpl.php b/docs/themes/default/updater/myown_patches.tmpl.php
new file mode 100644 (file)
index 0000000..a0c0d41
--- /dev/null
@@ -0,0 +1,95 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+global $_custom_css;\r
+$_custom_css = AF_BASE_HREF."include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css";\r
+\r
+require(AF_INCLUDE_PATH.'header.inc.php'); \r
+?>\r
+\r
+<div class="center-input-form">\r
+<fieldset class="group_form"><legend class="group_form"><?php echo _AT("myown_updates"); ?></legend>\r
+\r
+<form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">\r
+<table class="data" rules="rows" id="editable_table">\r
+\r
+<thead>\r
+<tr>\r
+       <th scope="col">&nbsp;</th>\r
+       <th scope="col"><?php echo _AT('system_update_id'); ?></th>\r
+       <th scope="col"><?php echo _AT('aframe_version_to_apply'); ?></th>\r
+       <th scope="col"><?php echo _AT('description'); ?></th>\r
+       <th scope="col"><?php echo _AT('last_modified'); ?></th>\r
+</tr>\r
+</thead>\r
+<?php if (!is_array($this->patch_rows)) { ?>\r
+<tbody>\r
+       <tr>\r
+               <td colspan="5"><?php echo _AT('none_found'); ?></td>\r
+       </tr>\r
+</tbody>\r
+<?php } else { ?>\r
+<tfoot>\r
+<tr>\r
+       <td colspan="5">\r
+               <div class="row buttons">\r
+               <input type="submit" name="edit" value="<?php echo _AT('edit'); ?>" /> \r
+               <input type="submit" name="remove" value="<?php echo _AT('remove'); ?>" /> \r
+               </div>\r
+       </td>\r
+</tr>\r
+</tfoot>\r
+<tbody>\r
+<?php foreach ($this->patch_rows as $row) { ?>\r
+               <tr onmousedown="document.form['m<?php echo $row['myown_patch_id']; ?>'].checked = true; rowselect(this);" onkeydown="document.form['m<?php echo $row['myown_patch_id']; ?>'].checked = true; rowselect(this);" id="r_<?php echo $row['myown_patch_id']; ?>">\r
+                       <td width="10"><input type="radio" name="myown_patch_id" value="<?php echo $row['myown_patch_id']; ?>" id="m<?php echo $row['myown_patch_id']; ?>" <?php if ($row['myown_patch_id']==$_POST['myown_patch_id']) echo 'checked'; ?> /></td>\r
+                       <td><label for="m<?php echo $row['myown_patch_id']; ?>"><span id="<?php echo 'system_patch_id-'.$row['myown_patch_id']; ?>" class="inlineEdits"><?php echo $row['system_patch_id']; ?></span></label></td>\r
+                       <td><span id="<?php echo 'applied_version-'.$row['myown_patch_id']; ?>" class="inlineEdits"><?php echo $row['applied_version']; ?></span></td>\r
+                       <td><span id="<?php echo 'description-'.$row['myown_patch_id']; ?>" class="inlineEdits"><?php echo $row['description']; ?></span></td>\r
+                       <td><?php echo $row['last_modified']; ?></td>\r
+               </tr>\r
+<?php } // end of foreach ?>\r
+</tbody>\r
+<?php } // end of else ?>\r
+\r
+</table>\r
+\r
+</form>\r
+\r
+</fieldset>\r
+</div>\r
+\r
+<script language="JavaScript" type="text/javascript">\r
+//<!--\r
+jQuery(document).ready(function () {\r
+       var tableEdit = fluid.inlineEdits("#editable_table", {\r
+               selectors : {\r
+                       text : "span",\r
+                       editables : "td:has(span.inlineEdits)"\r
+               },\r
+               defaultViewText: "",\r
+               useTooltip: true,\r
+               listeners: {\r
+                       afterFinishEdit : function (newValue, oldValue, editNode, viewNode) {\r
+                               if (newValue != oldValue)\r
+                                       rtn = jQuery.post("<?php echo AF_BASE_HREF; ?>updater/myown_patches_inline_editor_submit.php", \r
+                                         { "field":viewNode.id, "value":newValue }, \r
+                                 function(data) { handleResponse(data, viewNode, oldValue); }, \r
+                                 "json");\r
+                       }\r
+               }\r
+       });\r
+});\r
+//-->\r
+</script>\r
+\r
+<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>\r
diff --git a/docs/themes/default/updater/patch_create_edit.tmpl.php b/docs/themes/default/updater/patch_create_edit.tmpl.php
new file mode 100644 (file)
index 0000000..4cbe4f9
--- /dev/null
@@ -0,0 +1,344 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+require ('include/json.inc.php');\r
+require (AF_INCLUDE_PATH.'header.inc.php');\r
+?>\r
+\r
+<h2 align="center"><?php echo _AT("create_edit_update"); ?></h2>\r
+\r
+<form enctype="multipart/form-data" action='<?php echo $this->url; ?>' method="post" name="form" target="messageIFrame">\r
+\r
+<div class="input-form">\r
+<fieldset class="group_form"><legend class="group_form"><?php echo _AT('create_edit_update'); ?></legend>\r
+\r
+<iframe id="messageIFrame" name="messageIFrame" src='' style='width:1px;height:1px;border:0' onload="show_message()"></iframe>\r
+<div id="messageDIV"></div>\r
+       <table class="form-data">\r
+               <tr>\r
+                       <td colspan="2" align="left"><?php echo _AT('required_field_text') ;?><br /><br/></td>\r
+               </tr>\r
+\r
+               <tr>\r
+                       <th align="left" style="width: 25%">\r
+                               <div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="system_patch_id"><?php echo _AT('system_update_id'); ?>:</label><br />\r
+                       </th>\r
+                       <td align="left"><input id="system_patch_id" name="system_patch_id" type="text" maxlength="100" size="30" value="<?php echo $this->patch_row['system_patch_id']; ?>" /></td>\r
+               </tr>\r
+               \r
+               <tr><th align="left" colspan="2"><small>&middot; <?php echo _AT('contain_only'); ?></small></th></tr>\r
+\r
+               <tr>\r
+                       <th align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="aframe_version_to_apply"><?php echo _AT('aframe_version_to_apply'); ?>:</label></th>\r
+                       <td align="left"><input id="aframe_version_to_apply" name="aframe_version_to_apply" type="text" maxlength="100" size="30" value="<?php echo $this->patch_row['applied_version']; ?>" /></td>\r
+               </tr>\r
+\r
+               <tr>\r
+                       <th align="left"><label for="description"><?php echo _AT('description'); ?>:</label></th>\r
+                       <td align="left"><textarea id="description" name="description" cols="40" rows="4"><?php echo $this->patch_row['description']; ?></textarea></td>\r
+               </tr>\r
+\r
+               <tr>\r
+                       <th align="left"><label for="sql_statement"><?php echo _AT('sql_statement'); ?>:</label></th>\r
+                       <td align="left"><textarea id="sql_statement" name="sql_statement" cols="40" rows="8"><?php echo $this->patch_row['sql_statement']; ?></textarea></td>\r
+               </tr>\r
+       </table>\r
+       \r
+       <h2><label for="dependent_patches"><?php echo _AT('dependent_updates'); ?></label></h2><br/>\r
+       \r
+       <table id="dependent_patches" class="data" rules="rows" style="width:50%">\r
+               <thead>\r
+               <tr>\r
+                       <th><label for="dependent_patch"><?php echo _AT('dependent_update_id'); ?></label></th>\r
+               </tr>\r
+               </thead>\r
+       \r
+               <tfoot>\r
+               <tr>\r
+                       <td><input type="button" name="add_dependent_patch" value="<?php echo _AT('add_dependent_update'); ?>" onclick="add_dependent()" /></td>\r
+               </tr>\r
+               </tfoot>\r
+\r
+               <tbody>\r
+<?php\r
+// when edit existing patch\r
+if (is_array($this->dependent_rows))  \r
+{\r
+       $num_of_dependents = count($this->dependent_rows);\r
+       foreach ($this->dependent_rows as $row_patch_dependent)\r
+       {\r
+       ?>\r
+                       <tr>\r
+                               <td><input id="dependent_patch" name="dependent_patch[]" value="<?php echo $row_patch_dependent['dependent_patch_id']; ?>" type="text" maxlength="100" size="100" style="max-width:100%; display:block" /></td>\r
+                       </tr>\r
+       <?php\r
+       }\r
+}\r
+\r
+// when creating new patch\r
+if ($num_of_dependents == 0)\r
+{\r
+?>\r
+               <tr>\r
+                       <td><input id="dependent_patch" name="dependent_patch[]" type="text" maxlength="100" size="100" style="max-width:100%; display:block" /></td>\r
+               </tr>\r
+<?php\r
+}\r
+?>\r
+               </tbody>\r
+       </table>\r
+       \r
+       \r
+       <h2><label for="filesDiv"><?php echo _AT('files'); ?></label></h2>\r
+       <small>&middot; <?php echo _AT('relative_directory'); ?></small>\r
+\r
+       <div id="filesDiv" class="row">\r
+       </div>\r
+\r
+       <div class="row"  style="float:left">\r
+               <input type="button" name="add_a_file" value="<?php echo _AT('add_a_file'); ?>" onclick="add_file()" />\r
+       </div>\r
+       \r
+       <br /><br />\r
+       \r
+       <div class="row">\r
+               <input type="submit" name="create" value=" <?php echo _AT('create_update'); ?> " accesskey="c" />\r
+               <input type="submit" name="save" value=" <?php echo _AT('save'); ?> " accesskey="s" onclick="document.form.target=''; "/>\r
+               <input type="button" name="cancel" value=" <?php echo _AT('cancel'); ?> " onclick="location.href='updater/myown_patches.php'" />\r
+       </div>\r
+       \r
+</fieldset>\r
+</div>\r
+</form>\r
+\r
+<script language="JavaScript" type="text/javascript">\r
+//<!--\r
+\r
+myescape = function(/*string*/ str) {\r
+    return str.replace(/(['"\.*+?^${}()|[\]\/\\])/g, "\\$1").replace(/\n/g, '\\n');\r
+}\r
+\r
+function show_message()\r
+{\r
+       var messageDIV = document.getElementById("messageDIV"); \r
+       var i = document.getElementById("messageIFrame"); \r
+       \r
+  if (i.contentDocument) {\r
+      var d = i.contentDocument;\r
+  } else if (i.contentWindow) {\r
+      var d = i.contentWindow.document;\r
+  } else {\r
+      var d = window.frames[id].document;\r
+  }    \r
+       messageDIV.innerHTML = d.body.innerHTML;\r
+}\r
+\r
+function add_dependent() {\r
+  var dependentPatchesTable = document.getElementById("dependent_patches").tBodies[0];\r
+  var dependentPatch = dependentPatchesTable.rows[dependentPatchesTable.rows.length - 1].cloneNode(true);\r
+  dependentPatchesTable.appendChild(dependentPatch);\r
+  dependentPatch.cells[0].firstChild.value='';\r
+  \r
+  var dependents = document.form["dependent_patch[]"];\r
+  dependents[dependents.length - 1].focus();\r
+    // document.form['dependent_patch['+ pos +']'].focus();\r
+}\r
+\r
+var num_of_files = 0;\r
+function add_file(filedata) {\r
+       var newDiv = document.createElement("div");\r
+       \r
+       newDiv.innerHTML = ACTION_HTML_TEMPLATE.replace(/\{1\}/g, num_of_files);\r
+       document.getElementById("filesDiv").appendChild(newDiv);\r
+       \r
+       document.form['rb_action[' +num_of_files +']'][0].focus();\r
+       \r
+       if(filedata) {\r
+               var srcElement = null;\r
+\r
+               if(filedata.action=="add") {\r
+                       // set focus on radio button "add"\r
+                       document.form['rb_action[' +num_of_files +']'][0].checked = true;\r
+                       document.form['rb_action[' +num_of_files +']'][0].focus();\r
+\r
+                       // set value\r
+                       srcElement = document.form['rb_action[' +num_of_files +']'][0];\r
+                       document.form['add_filename[' +num_of_files +']'].value = filedata.name;\r
+                       document.form['add_dir[' +num_of_files +']'].value = filedata.location;\r
+                       \r
+                       // set uploaded file\r
+                       if (filedata.uploaded_file != "")\r
+                       {\r
+                               document.form['add_uploaded_file[' +num_of_files +']'].value = filedata.uploaded_file;\r
+                               var tables = newDiv.getElementsByTagName('TABLE');\r
+                               tables[0].rows[2].style.display='';    // display the row of uploaded file\r
+                               tables[0].rows[2].cells[1].innerHTML=filedata.uploaded_file;    // display uploaded file name\r
+                               tables[0].rows[3].cells[0].innerHTML='<?php echo _AT("replace_file"); ?>';    // change label from "upload file" to "replace file"\r
+                       }\r
+                       \r
+                       // set uploaded file\r
+               } else if(filedata.action=="alter") {\r
+                       document.form['rb_action[' +num_of_files +']'][1].checked = true;\r
+                       document.form['rb_action[' +num_of_files +']'][1].focus();\r
+\r
+                       srcElement = document.form['rb_action[' +num_of_files +']'][1];\r
+                       document.form['alter_filename[' +num_of_files +']'].value = filedata.name;\r
+                       document.form['alter_dir[' +num_of_files +']'].value = filedata.location;\r
+                       document.form['alter_code_from[' +num_of_files +']'].value = filedata.code_from;\r
+                       document.form['alter_code_to[' +num_of_files +']'].value = filedata.code_to;\r
+               } else if(filedata.action=="delete") {\r
+                       document.form['rb_action[' +num_of_files +']'][2].checked = true;\r
+                       document.form['rb_action[' +num_of_files +']'][2].focus();\r
+\r
+                       srcElement = document.form['rb_action[' +num_of_files +']'][2];\r
+                       document.form['delete_filename[' +num_of_files +']'].value = filedata.name;\r
+                       document.form['delete_dir[' +num_of_files +']'].value = filedata.location;\r
+               } if(filedata.action=="overwrite") {\r
+                       document.form['rb_action[' +num_of_files +']'][3].checked = true;\r
+                       document.form['rb_action[' +num_of_files +']'][3].focus();\r
+\r
+                       srcElement = document.form['rb_action[' +num_of_files +']'][3];\r
+                       document.form['overwrite_filename[' +num_of_files +']'].value = filedata.name;\r
+                       document.form['overwrite_dir[' +num_of_files +']'].value = filedata.location;\r
+\r
+                       // set uploaded file\r
+                       if (filedata.uploaded_file != "")\r
+                       {\r
+                               document.form['overwrite_uploaded_file[' +num_of_files +']'].value = filedata.uploaded_file;\r
+                               var tables = newDiv.getElementsByTagName('TABLE');\r
+                               tables[3].rows[2].style.display='';    // display the row of uploaded file\r
+                               tables[3].rows[2].cells[1].innerHTML=filedata.uploaded_file;    // display uploaded file name\r
+                               tables[3].rows[3].cells[0].innerHTML='<?php echo _AT("replace_file"); ?>';    // change label from "upload file" to "replace file"\r
+                       }\r
+                       \r
+               }\r
+               \r
+               show_content({srcElement:srcElement});\r
+       }\r
+\r
+       num_of_files++;\r
+}\r
+\r
+function del_file(evt) {\r
+       var target =(evt.srcElement)?evt.srcElement:evt.currentTarget;\r
+       var div =  target.parentNode.parentNode ;\r
+       div.parentNode.removeChild(div);\r
+}\r
+\r
+function show_content(evt) {\r
+       var target =(evt.srcElement)?evt.srcElement:evt.currentTarget;\r
+       var tables = target.parentNode.parentNode.getElementsByTagName('TABLE');\r
+       tables[0].style.display='none';\r
+       tables[1].style.display='none';\r
+       tables[2].style.display='none';\r
+       tables[3].style.display='none';\r
+       if(target.value == 'add') tables[0].style.display='';\r
+       if(target.value == 'alter') tables[1].style.display='';\r
+       if(target.value == 'delete') tables[2].style.display='';\r
+       if(target.value == 'overwrite') tables[3].style.display='';\r
+}\r
+\r
+var ACTION_HTML_TEMPLATE = ' \\r
+<div style="border-width:thin; border-style:solid; padding: 5px 5px 5px 5px; margin:5px 5px 5px 5px"> \\r
+       <div style="float:left">Action:  \\r
+               <input type="radio" name="rb_action[{1}]" value="add" id="add[{1}]" checked onclick="show_content(event);" /><label for="add[{1}]"><?php echo addslashes(_AT("add")); ?></label> \\r
+               <input type="radio" name="rb_action[{1}]" value="alter" id="alter[{1}]" onclick="show_content(event);" /><label for="alter[{1}]"><?php echo addslashes(_AT("alter")); ?></label> \\r
+               <input type="radio" name="rb_action[{1}]" value="delete" id="delete[{1}]" onclick="show_content(event);" /><label for="delete[{1}]"><?php echo addslashes(_AT("delete")); ?></label> \\r
+               <input type="radio" name="rb_action[{1}]" value="overwrite" id="overwrite[{1}]" onclick="show_content(event);" /><label for="overwrite[{1}]"><?php echo addslashes(_AT("overwrite")); ?></label> \\r
+       </div> \\r
+       <br /><br /> \\r
+       <div> \\r
+       <table style="display:" width="100%"> \\r
+               <tr> \\r
+                       <td width="150px"><?php echo addslashes(_AT("file_name")); ?></td> \\r
+                       <td><input name="add_filename[{1}]" type="text"  /></td> \\r
+               </tr> \\r
+               <tr> \\r
+                       <td><?php echo addslashes(_AT("directory")); ?></td> \\r
+                       <td><input name="add_dir[{1}]" type="text"  /></td> \\r
+               </tr> \\r
+               <tr style="display: none"> \\r
+                       <td><?php echo addslashes(_AT("file")); ?></td> \\r
+                       <td></td> \\r
+                       <td><INPUT TYPE="hidden" NAME="add_uploaded_file[{1}]" SIZE="40" style="max-width:100%" /></td> \\r
+               </tr> \\r
+               <tr> \\r
+                       <td><?php echo addslashes(_AT("upload_file")); ?></td> \\r
+                       <td><INPUT TYPE="file" NAME="add_upload_file[{1}]" SIZE="40" style="max-width:100%" /></td> \\r
+               </tr> \\r
+       </table> \\r
+       <table style="display: none" width="100%"> \\r
+               <tr> \\r
+                       <td width="150px"><?php echo addslashes(_AT("file_name")); ?></td> \\r
+                       <td><input name="alter_filename[{1}]" type="text" maxlength="100" size="100" /></td> \\r
+               </tr> \\r
+               <tr> \\r
+                       <td><?php echo addslashes(_AT("directory")); ?></td> \\r
+                       <td><input name="alter_dir[{1}]" type="text" maxlength="100" size="100" style="max-width:100%" /></td> \\r
+               </tr> \\r
+               <tr> \\r
+                       <td><?php echo addslashes(_AT("code_to_replace_from")); ?></td> \\r
+                       <td><textarea name="alter_code_from[{1}]" rows="5" cols="120" style="max-width:100%"></textarea></td> \\r
+               </tr> \\r
+               <tr> \\r
+                       <td><?php echo addslashes(_AT("code_to_replace_to")); ?></td> \\r
+                       <td><textarea name="alter_code_to[{1}]" rows="5" cols="120" style="max-width:100%"></textarea></td> \\r
+               </tr> \\r
+       </table> \\r
+       <table style="display: none" width="100%"> \\r
+               <tr> \\r
+                       <td width="150px"><?php echo addslashes(_AT("file_name")); ?></td> \\r
+                       <td><input name="delete_filename[{1}]" type="text" maxlength="100" size="100" /></td> \\r
+               </tr> \\r
+               <tr> \\r
+                       <td><?php echo addslashes(_AT("directory")); ?></td> \\r
+                       <td><input name="delete_dir[{1}]" type="text" maxlength="100" size="100" /></td> \\r
+               </tr> \\r
+       </table> \\r
+       <table style="display: none" width="100%"> \\r
+               <tr> \\r
+                       <td width="150px"><?php echo addslashes(_AT("file_name")); ?></td> \\r
+                       <td><input name="overwrite_filename[{1}]" type="text" /></td> \\r
+               </tr> \\r
+               <tr> \\r
+                       <td><?php echo addslashes(_AT("directory")); ?></td> \\r
+                       <td><input name="overwrite_dir[{1}]" type="text" maxlength="100" size="100" /></td> \\r
+               </tr> \\r
+               <tr id="overwrite_uploaded_file" style="display:none"> \\r
+                       <td><?php echo addslashes(_AT("file")); ?></td> \\r
+                       <td></td> \\r
+                       <td><INPUT type="hidden" NAME="overwrite_uploaded_file[{1}]" SIZE="40" style="max-width:100%" /></td> \\r
+               </tr> \\r
+               <tr> \\r
+                       <td><?php echo addslashes(_AT("upload_file")); ?></td> \\r
+                       <td><INPUT TYPE="file" NAME="overwrite_upload_file[{1}]" SIZE="40" style="max-width:100%" /></td> \\r
+               </tr> \\r
+       </table> \\r
+       </div> \\r
+       <div class="row" style="float:left"> \\r
+               <input type="button" value="<?php echo addslashes(_AT("delete_this_file")); ?>" onclick="del_file(event)" /> \\r
+       </div> \\r
+       <br /><br /> \\r
+</div> \\r
+';\r
+\r
+var patch_files = <?php echo json_encode_result($this->file_rows); ?>;\r
+\r
+window.onload = function() {\r
+       for(var i=0; i < patch_files.length; i++) {\r
+               add_file(patch_files[i]);\r
+       }\r
+}\r
+//-->\r
+</script>\r
+       \r
+<?php require (AF_INCLUDE_PATH.'footer.inc.php'); ?>\r
diff --git a/docs/themes/default/user/index.tmpl.php b/docs/themes/default/user/index.tmpl.php
new file mode 100644 (file)
index 0000000..65d8f77
--- /dev/null
@@ -0,0 +1,216 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+global $_custom_css;\r
+$_custom_css = AF_BASE_HREF."include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css";\r
+\r
+include(AF_INCLUDE_PATH.'header.inc.php');\r
+?>\r
+\r
+<div class="center-input-form">\r
+       <form name="filter_form" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>" >\r
+       <fieldset class="group_form"><legend class="group_form"><?php echo _AT("filter"); ?></legend>\r
+               <table class="filter">\r
+               <tr>\r
+                       <td colspan="2"><h2><?php echo _AT('results_found', $this->num_results); ?></h2></td>\r
+               </tr>\r
+\r
+               <tr>\r
+                       <th><?php echo _AT('user_status'); ?>:</th>\r
+                       <td>\r
+                       <input type="radio" name="status" value="0" id="s0" <?php if ($_GET['status'] == AF_STATUS_DISABLED) { echo 'checked="checked"'; } ?> /><label for="s0"><?php echo _AT('disabled'); ?></label> \r
+                       <input type="radio" name="status" value="1" id="s1" <?php if ($_GET['status'] == AF_STATUS_ENABLED) { echo 'checked="checked"'; } ?> /><label for="s1"><?php echo _AT('enabled'); ?></label> \r
+                       <input type="radio" name="status" value="" id="s" <?php if ($_GET['status'] === '') { echo 'checked="checked"'; } ?> /><label for="s"><?php echo _AT('all'); ?></label>\r
+                       </td>\r
+               </tr>\r
+\r
+               <?php if (is_array($this->all_user_groups)) { ?>\r
+               <tr>\r
+                       <th><label for="user_group_id"><?php echo _AT('user_group'); ?></label>:</th>\r
+                       <td>\r
+                       <select name="user_group_id" id="user_group_id">\r
+                               <option value="-1">- <?php echo _AT('select'); ?> -</option>\r
+                               <?php foreach ($this->all_user_groups as $user_group) {?>\r
+                               <option value="<?php echo $user_group['user_group_id']; ?>" <?php if($_GET['user_group_id']==$user_group['user_group_id']) { echo 'selected="selected"';}?>><?php echo $user_group['title']; ?></option>\r
+                               <?php } ?>\r
+                       </select>\r
+                       </td>\r
+               </tr>\r
+               <?php } ?>\r
+\r
+               <tr>\r
+                       <th><label for="search"><?php echo _AT('search'); ?>:</label></th>\r
+                       <td><input type="text" name="search" id="search" size="40" value="<?php echo htmlspecialchars($_GET['search']); ?>" /><br /><small>&middot; <?php echo _AT('login_name').', '._AT('first_name').', '._AT('last_name') .', '._AT('email'); ?></small></td>\r
+               </tr>\r
+\r
+               <tr>\r
+                       <td colspan="2" align="center">\r
+                       <input type="radio" name="include" value="all" id="match_all" <?php echo $this->checked_include_all; ?> /><label for="match_all"><?php echo _AT('match_all_words'); ?></label> \r
+                       <input type="radio" name="include" value="one" id="match_one" <?php echo $this->checked_include_one; ?> /><label for="match_one"><?php echo _AT('match_any_word'); ?></label>\r
+                       </td>\r
+               </tr>\r
+\r
+               <tr>\r
+                       <td colspan="2"><p class="submit_button">\r
+                       <input type="submit" name="filter" value="<?php echo _AT('filter'); ?>" />\r
+                       <input type="submit" name="reset_filter" value="<?php echo _AT('reset_filter'); ?>" />\r
+                       </p></td>\r
+               </tr>\r
+               </table>\r
+       </fieldset>\r
+</form>\r
+</div>\r
+       \r
+<div id="output_div" class="output-form">\r
+<fieldset class="group_form"><legend class="group_form"><?php echo _AT("users"); ?></legend>\r
+<?php print_paginator($this->page, $this->num_results, $this->page_string . htmlspecialchars(SEP) . $this->order .'='. $this->col, $this->results_per_page); ?>\r
+\r
+<form name="form" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">\r
+<input type="hidden" name="status" value="<?php echo $_GET['status']; ?>" />\r
+<input type="hidden" name="search" value="<?php echo htmlspecialchars($_GET['search']); ?>" />\r
+<input type="hidden" name="include" value="<?php echo htmlspecialchars($_GET['include']); ?>" />\r
+\r
+<table summary="Edit, change passwords, or delete users" class="data" rules="rows" id="editable_table">\r
+<colgroup>\r
+       <?php if ($this->col == 'login'): ?>\r
+               <col />\r
+               <col class="sort" />\r
+               <col span="<?php echo 5 + $this->col_counts; ?>" />\r
+       <?php elseif($this->col == 'public_field'): ?>\r
+               <col span="<?php echo 1 + $this->col_counts; ?>" />\r
+               <col class="sort" />\r
+               <col span="6" />\r
+       <?php elseif($this->col == 'first_name'): ?>\r
+               <col span="<?php echo 2 + $this->col_counts; ?>" />\r
+               <col class="sort" />\r
+               <col span="5" />\r
+       <?php elseif($this->col == 'last_name'): ?>\r
+               <col span="<?php echo 3 + $this->col_counts; ?>" />\r
+               <col class="sort" />\r
+               <col span="4" />\r
+       <?php elseif($this->col == 'user_group'): ?>\r
+               <col span="<?php echo 4 + $this->col_counts; ?>" />\r
+               <col class="sort" />\r
+               <col span="3" />\r
+       <?php elseif($this->col == 'email'): ?>\r
+               <col span="<?php echo 5 + $this->col_counts; ?>" />\r
+               <col class="sort" />\r
+               <col span="2" />\r
+       <?php elseif($this->col == 'status'): ?>\r
+               <col span="<?php echo 6 + $this->col_counts; ?>" />\r
+               <col class="sort" />\r
+               <col />\r
+       <?php elseif($this->col == 'last_login'): ?>\r
+               <col span="<?php echo 7 + $this->col_counts; ?>" />\r
+               <col class="sort" />\r
+       <?php endif; ?>\r
+</colgroup>\r
+<thead>\r
+<tr>\r
+       <th scope="col" align="left" width="5%"><input type="checkbox" value="<?php echo _AT('select_all'); ?>" id="all" title="<?php echo _AT('select_all'); ?>" name="selectall" onclick="CheckAll();" /></th>\r
+\r
+       <th scope="col" width="15%"><a href="user/index.php?<?php echo $this->orders[$this->order]; ?>=login<?php echo $page_string; ?>"><?php echo _AT('login_name');      ?></a></th>\r
+       <th scope="col" width="15%"><a href="user/index.php?<?php echo $this->orders[$this->order]; ?>=first_name<?php echo $page_string; ?>"><?php echo _AT('first_name'); ?></a></th>\r
+       <th scope="col" width="10%"><a href="user/index.php?<?php echo $this->orders[$this->order]; ?>=last_name<?php echo $page_string; ?>"><?php echo _AT('last_name');   ?></a></th>\r
+       <th scope="col" width="10%"><a href="user/index.php?<?php echo $this->orders[$this->order]; ?>=user_group<?php echo $page_string; ?>"><?php echo _AT('user_group'); ?></a></th>\r
+       <th scope="col" width="15%"><a href="user/index.php?<?php echo $this->orders[$this->order]; ?>=email<?php echo $page_string; ?>"><?php echo _AT('email');           ?></a></th>\r
+       <th scope="col" width="10%"><a href="user/index.php?<?php echo $this->orders[$this->order]; ?>=status<?php echo $page_string; ?>"><?php echo _AT('user_status'); ?></a></th>\r
+       <th scope="col" width="20%"><a href="user/index.php?<?php echo $this->orders[$this->order]; ?>=last_login<?php echo $page_string; ?>"><?php echo _AT('last_login'); ?></a></th>\r
+</tr>\r
+\r
+</thead>\r
+<?php if ($this->num_results > 0): ?>\r
+       <tfoot>\r
+       <tr>\r
+               <td colspan="<?php echo 8 + $this->col_counts; ?>">\r
+                       <input type="submit" name="edit" value="<?php echo _AT('edit'); ?>" /> \r
+                       <input type="submit" name="password" value="<?php echo _AT('password'); ?>" />\r
+                       <input type="submit" name="delete" value="<?php echo _AT('delete'); ?>" />\r
+               </td>\r
+       </tr>\r
+       </tfoot>\r
+       <tbody>\r
+               <?php if (is_array($this->user_rows)){ foreach ($this->user_rows as $row) {?>\r
+                       <tr onmousedown="document.form['m<?php echo $row['user_id']; ?>'].checked = !document.form['m<?php echo $row['user_id']; ?>'].checked; togglerowhighlight(this, 'm<?php echo $row['user_id']; ?>');" \r
+                           onkeydown="document.form['m<?php echo $row['user_id']; ?>'].checked = !document.form['m<?php echo $row['user_id']; ?>'].checked; togglerowhighlight(this, 'm<?php echo $row['user_id']; ?>');"\r
+                           id="rm<?php echo $row['user_id']; ?>">\r
+                               <td><input type="checkbox" name="id[]" value="<?php echo $row['user_id']; ?>" id="m<?php echo $row['user_id']; ?>" \r
+                                          onmouseup="this.checked=!this.checked" onkeyup="this.checked=!this.checked" /></td>\r
+                               <td><label for="m<?php echo $row['user_id']; ?>"><span class="inlineEdits" id="<?php echo "login-".$row['user_id']; ?>"><?php echo $row['login']; ?></span></label></td>\r
+                               <td><span class="inlineEdits" id="<?php echo "first_name-".$row['user_id']; ?>"><?php echo $row['first_name']; ?></span></td>\r
+                               <td><span class="inlineEdits" id="<?php echo "last_name-".$row['user_id']; ?>"><?php echo $row['last_name']; ?></span></td>\r
+                               <td><?php echo $row['user_group']; ?></td>\r
+                               <td><span class="inlineEdits" id="<?php echo "email-".$row['user_id']; ?>"><?php echo $row['email']; ?></span></td>\r
+                               <td><?php echo get_status_by_code($row['status']); ?></td>\r
+                               <td nowrap="nowrap">\r
+                                       <?php if ($row['last_login'] == 0): ?>\r
+                                               <?php echo _AT('never'); ?>\r
+                                       <?php else: ?>\r
+                                               <?php \r
+                                               echo $row['last_login'];\r
+                                       ?>\r
+                                       <?php endif; ?>\r
+                               </td>\r
+                       </tr>\r
+               <?php }} ?>\r
+       </tbody>\r
+<?php else: ?>\r
+       <tr>\r
+               <td colspan="<?php echo 8 + $this->col_counts; ?>"><?php echo _AT('none_found'); ?></td>\r
+       </tr>\r
+<?php endif; ?>\r
+</table>\r
+</form>\r
+</fieldset>\r
+</div>\r
+\r
+<script language="JavaScript" type="text/javascript">\r
+//<!--\r
+function CheckAll() {\r
+       for (var i=0;i<document.form.elements.length;i++)       {\r
+               var e = document.form.elements[i];\r
+               if ((e.name == 'id[]') && (e.type=='checkbox')) {\r
+                       e.checked = document.form.selectall.checked;\r
+                       togglerowhighlight(document.getElementById("r" + e.id), e.id);\r
+               }\r
+       }\r
+}\r
+\r
+function togglerowhighlight(obj, boxid) {\r
+       if (document.getElementById(boxid).checked) {\r
+               obj.className = 'selected';\r
+       } else {\r
+               obj.className = '';\r
+       }\r
+}\r
+\r
+jQuery(document).ready(function () {\r
+       var tableEdit = fluid.inlineEdits("#editable_table", {\r
+               selectors : {\r
+                       text : "span",\r
+                       editables : "td:has(span.inlineEdits)"\r
+               },\r
+               defaultViewText: "",\r
+               useTooltip: true,\r
+               listeners: {\r
+                       afterFinishEdit : function (newValue, oldValue, editNode, viewNode) {\r
+                               if (newValue != oldValue)\r
+                                       rtn = jQuery.post("<?php echo AF_BASE_HREF; ?>user/index_inline_editor_submit.php", { "field":viewNode.id, "value":newValue }, \r
+                                         function(data) { handleResponse(data, viewNode, oldValue); }, "json");\r
+                       }\r
+               }\r
+       });\r
+});\r
+\r
+//-->\r
+</script>\r
+<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/themes/default/user/user_group.tmpl.php b/docs/themes/default/user/user_group.tmpl.php
new file mode 100644 (file)
index 0000000..d0ed3a8
--- /dev/null
@@ -0,0 +1,128 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+global $_custom_css;\r
+$_custom_css = AF_BASE_HREF."include/jscripts/infusion/components/inlineEdit/css/InlineEdit.css";\r
+\r
+include(AF_INCLUDE_PATH.'header.inc.php');\r
+?>\r
+\r
+<form name="form" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">\r
+\r
+<table summary="<?php echo _AT("user_group"); ?>" class="data" rules="rows" id="editable_table">\r
+       <thead>\r
+       <tr>\r
+               <th scope="col" align="left"><input type="checkbox" value="<?php echo _AT('select_all'); ?>" id="all" title="<?php echo _AT('select_all'); ?>" name="selectall" onclick="CheckAll();" /></th>\r
+       \r
+               <th scope="col"><?php echo _AT('title'); ?></th>\r
+               <th scope="col"><?php echo _AT('description'); ?></th>\r
+               <th scope="col"><?php echo _AT('privileges'); ?></th>\r
+       </tr>\r
+       \r
+       </thead>\r
+<?php if (is_array($this->user_group_rows)): ?>\r
+       <tfoot>\r
+       <tr>\r
+               <td colspan="4">\r
+                       <input type="submit" name="edit" value="<?php echo _AT('edit'); ?>" /> \r
+                       <input type="submit" name="delete" value="<?php echo _AT('delete'); ?>" />\r
+               </td>\r
+       </tr>\r
+       </tfoot>\r
+       <tbody>\r
+               <?php foreach ($this->user_group_rows as $row) \r
+                       {\r
+                       // get privileges\r
+                       $privileges = $this->privilegesDAO->getUserGroupPrivileges($row['user_group_id']);\r
+                       \r
+                       if (is_array($privileges))\r
+                       {\r
+                               $priv_str = '<ul>';\r
+                               foreach ($privileges as $priv)  $priv_str .= '<li>'. $priv['privilege_desc'].'</li>';\r
+                               $priv_str .= '</ul>';\r
+                       }\r
+               ?>\r
+                       <tr onmousedown="document.form['m<?php echo $row['user_group_id']; ?>'].checked = !document.form['m<?php echo $row['user_group_id']; ?>'].checked; togglerowhighlight(this, 'm<?php echo $row['user_group_id']; ?>');" \r
+                           onkeydown="document.form['m<?php echo $row['user_group_id']; ?>'].checked = !document.form['m<?php echo $row['user_group_id']; ?>'].checked; togglerowhighlight(this, 'm<?php echo $row['user_group_id']; ?>');"\r
+                           id="rm<?php echo $row['user_group_id']; ?>">\r
+                               <td><input type="checkbox" name="id[]" value="<?php echo $row['user_group_id']; ?>" id="m<?php echo $row['user_group_id']; ?>" \r
+                                          onmouseup="this.checked=!this.checked" onkeyup="this.checked=!this.checked" /></td>\r
+                               <td width='20%'><label for="m<?php echo $row['user_group_id']; ?>"><span id="<?php echo 'title-'.$row['user_group_id']?>" class="inlineEdits"><?php echo $row['title']; ?></span></label></td>\r
+                               <td width='30%'><span id="<?php echo 'description-'.$row['user_group_id']?>" class="inlineEdits"><?php echo $row['description']; ?></span></td>\r
+                               <td><?php echo $priv_str; ?></td>\r
+                       </tr>\r
+               <?php } ?>\r
+       </tbody>\r
+<?php else: ?>\r
+       <tr>\r
+               <td colspan="4"><?php echo _AT('none_found'); ?></td>\r
+       </tr>\r
+<?php endif; ?>\r
+</table>\r
+</form>\r
+<br/><br/>\r
+\r
+<script language="JavaScript" type="text/javascript">\r
+//<!--\r
+function CheckAll() {\r
+       for (var i=0;i<document.form.elements.length;i++)       {\r
+               var e = document.form.elements[i];\r
+               if ((e.name == 'id[]') && (e.type=='checkbox')) {\r
+                       e.checked = document.form.selectall.checked;\r
+                       togglerowhighlight(document.getElementById("r" + e.id), e.id);\r
+               }\r
+       }\r
+}\r
+\r
+function togglerowhighlight(obj, boxid) {\r
+       if (document.getElementById(boxid).checked) {\r
+               obj.className = 'selected';\r
+       } else {\r
+               obj.className = '';\r
+       }\r
+}\r
+\r
+jQuery(document).ready(function () {\r
+       var tableEdit = fluid.inlineEdits("#editable_table", {\r
+               selectors : {\r
+                       text : "span",\r
+                       editables : "td:has(span.inlineEdits)"\r
+               },\r
+               defaultViewText: "",\r
+               useTooltip: true,\r
+               listeners: {\r
+                       afterFinishEdit : function (newValue, oldValue, editNode, viewNode) \r
+                       {\r
+                               if (newValue != oldValue)\r
+                               {\r
+                                       rtn = jQuery.post("<?php echo AF_BASE_HREF; ?>user/user_group_inline_editor_submit.php", { "field":viewNode.id, "value":newValue }, \r
+                                         function(data) \r
+                                         {\r
+                                               if (data.status=="fail")\r
+                                               {\r
+                                                 for (var i = 0; i < tableEdit.length; i++) \r
+                                                     {\r
+                                                   if(tableEdit[i].editField[0] == editNode) \r
+                                                     tableEdit[i].updateModelValue(oldValue);\r
+                                                 }\r
+                                                   }\r
+                                               \r
+                                       handleResponse(data); \r
+                                         }, "json");\r
+                               }\r
+                       }\r
+               }\r
+       });\r
+});\r
+//-->\r
+</script>\r
+<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/themes/default/user/user_group_create_edit.tmpl.php b/docs/themes/default/user/user_group_create_edit.tmpl.php
new file mode 100644 (file)
index 0000000..395d531
--- /dev/null
@@ -0,0 +1,173 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+global $onload;\r
+$onload = "initial();";\r
+\r
+include(AF_INCLUDE_PATH.'header.inc.php');\r
+?>\r
+\r
+<form name="input_form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?><?php if (isset($_GET["id"])) echo '?id='.$_GET["id"]; ?>" >\r
+<?php if (isset($this->user_group_row["user_group_id"])) {?>\r
+<input type="hidden" name="user_group_id" value="<?php echo $this->user_group_row["user_group_id"]; ?>" />
+<?php }?>\r
+\r
+<div class="input-form">\r
+\r
+<fieldset class="group_form"><legend class="group_form"><?php echo _AT('create_edit_user_group'); ?></legend>\r
+       <table class="form-data">\r
+               <tr>\r
+                       <td colspan="2" align="left"><?php echo _AT('required_field_text') ;?><br /><br /></td>\r
+               </tr>\r
+\r
+               <tr>\r
+                       <th align="left"><div class="required" title="<?php echo _AT('required_field'); ?>">*</div><label for="title"><?php echo _AT('title'); ?></label></th>\r
+                       <td><input type="text" name="title" size="100" id="title" value="<?php if (isset($_POST['title'])) echo $_POST['title']; else echo $this->user_group_row["title"]; ?>" /></td>\r
+               </tr>\r
+\r
+               <tr>\r
+                       <th align="left"><label for="description"><?php echo _AT('description'); ?></label></th>\r
+                       <td><textarea rows="3" cols="30" name="description" id="description"><?php if (isset($_POST['description'])) echo $_POST['description']; else echo $this->user_group_row["description"]; ?></textarea></td>\r
+               </tr>\r
+\r
+               <?php if (isset($this->user_group_row['user_group_id'])) {?>\r
+               <tr>\r
+                       <th align="left"><?php echo _AT('date_created'); ?></th>\r
+                       <td>\r
+                               <?php echo $this->user_group_row['create_date']; ?>\r
+                       </td>\r
+               </tr>\r
+\r
+               <tr>\r
+                       <th align="left"><?php echo _AT('last_update'); ?></th>\r
+                       <td>\r
+                               <?php echo $this->user_group_row['last_update']; ?>\r
+                       </td>\r
+               </tr>\r
+               <?php }?>\r
+       </table>\r
+       <br />\r
+       \r
+       <!-- section of displaying existing checks in current guideline -->\r
+       <?php if (is_array($this->privs_rows)) { ?>\r
+               <h2><?php echo _AT('privileges');?></h2>\r
+               <table class="data" rules="rows" >\r
+                       <thead>\r
+                       <tr>\r
+                               <th align="left"><input type="checkbox" value="<?php echo _AT('select_all'); ?>" id="all_del" title="<?php echo _AT('select_all'); ?>" name="selectall_delprivileges" onclick="CheckAll('del_privileges_id[]','selectall_delprivileges');" /></th>\r
+                               <th><?php echo _AT('privileges'); ?></th>\r
+                       </tr>\r
+                       </thead>\r
+                       \r
+                       <tfoot>\r
+                               <tr>\r
+                                       <td colspan="4">\r
+                                               <input type="submit" name="remove" value="<?php echo _AT('remove'); ?>" />\r
+                                       </td>\r
+                               </tr>\r
+                       </tfoot>\r
+\r
+                       <tbody>\r
+       <?php foreach ($this->privs_rows as $privs_row) { ?>\r
+                       <tr onmousedown="document.input_form['del_privileges_<?php echo $privs_row['privilege_id']; ?>'].checked = !document.input_form['del_privileges_<?php echo $privs_row['privilege_id']; ?>'].checked; togglerowhighlight(this, 'del_privileges_<?php echo $privs_row['privilege_id']; ?>');" \r
+                           onkeydown="document.input_form['del_privileges_<?php echo $privs_row['privilege_id']; ?>'].checked = !document.input_form['del_privileges_<?php echo $privs_row['privilege_id']; ?>'].checked; togglerowhighlight(this, 'del_privileges_<?php echo $privs_row['privilege_id']; ?>');"\r
+                           id="rdel_privileges_<?php echo $privs_row['privilege_id']; ?>">\r
+                               <td><input type="checkbox" name="del_privileges_id[]" value="<?php echo $privs_row['privilege_id']; ?>" id="del_privileges_<?php echo $privs_row['privilege_id']; ?>" \r
+                                          onmouseup="this.checked=!this.checked" onkeyup="this.checked=!this.checked" \r
+                                          <?php if (is_array($_POST['del_privileges_id']) && in_array($privs_row['privilege_id'], $_POST['del_privileges_id'])) echo 'checked="checked"';?> /></td>\r
+                               <td><label for="del_privileges_<?php echo $privs_row['privilege_id']; ?>"><?php echo $privs_row['description']; ?></label></td>\r
+                       </tr>\r
+       <?php } // end of foreach?>\r
+                       </tbody>\r
+               </table>\r
+       <?php } ?>\r
+\r
+       <!-- section of displaying privileges to add -->\r
+       <div class="row">\r
+               <h2>\r
+                       <img src="images/arrow-closed.png" alt="<?php echo _AT("expand_add_privileges"); ?>" title="<?php echo _AT("expand_add_privileges"); ?>" id="toggle_image" border="0" />\r
+                       <a href="javascript:toggleToc('div_add_privs')"><?php echo _AT("add_privileges"); ?></a>\r
+               </h2>\r
+       </div>\r
+       \r
+       <div id="div_add_privs">\r
+       <?php \r
+       if (!is_array($this->privs_to_add_rows)){ \r
+               echo _AT('none_found');\r
+       } \r
+       else {?>\r
+               <table class="data" rules="rows" >\r
+                       <thead>\r
+                       <tr>\r
+                               <th align="left"><input type="checkbox" value="<?php echo _AT('select_all'); ?>" id="all_add" title="<?php echo _AT('select_all'); ?>" name="selectall_addprivileges" onclick="CheckAll('add_privileges_id[]','selectall_addprivileges');" /></th>\r
+                               <th><?php echo _AT('privileges'); ?></th>\r
+                       </tr>\r
+                       </thead>\r
+                       \r
+                       <tbody>\r
+       <?php foreach ($this->privs_to_add_rows as $privileges_to_add_row) { ?>\r
+                       <tr onmousedown="document.input_form['add_privileges_<?php echo $privileges_to_add_row['privilege_id']; ?>'].checked = !document.input_form['add_privileges_<?php echo $privileges_to_add_row['privilege_id']; ?>'].checked; togglerowhighlight(this, 'add_privileges_<?php echo $privileges_to_add_row['privilege_id']; ?>');" \r
+                           onkeydown="document.input_form['add_privileges_<?php echo $privileges_to_add_row['privilege_id']; ?>'].checked = !document.input_form['add_privileges_<?php echo $privileges_to_add_row['privilege_id']; ?>'].checked; togglerowhighlight(this, 'add_privileges_<?php echo $privileges_to_add_row['privilege_id']; ?>');"\r
+                           id="radd_privileges_<?php echo $privileges_to_add_row['privilege_id']; ?>">\r
+                               <td><input type="checkbox" name="add_privileges_id[]" value="<?php echo $privileges_to_add_row['privilege_id']; ?>" id="add_privileges_<?php echo $privileges_to_add_row['privilege_id']; ?>" \r
+                                          onmouseup="this.checked=!this.checked" onkeyup="this.checked=!this.checked" \r
+                                          <?php if (is_array($_POST['add_privileges_id']) && in_array($privileges_to_add_row['privilege_id'], $_POST['add_privileges_id'])) echo 'checked="checked"';?> /></td>\r
+                               <td><label for="add_privileges_<?php echo $privileges_to_add_row['privilege_id']; ?>"><?php echo $privileges_to_add_row['description']; ?></label></td>\r
+                       </tr>\r
+       <?php } // end of foreach?>\r
+                       </tbody>\r
+               </table>\r
+       <?php } // end of if?>\r
+       </div>\r
+       \r
+       <div class="row">\r
+               <input type="submit" name="save" value="<?php echo _AT('save'); ?>" />\r
+               <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?>" />\r
+       </div>\r
+</fieldset>\r
+</div>\r
+</form>\r
+\r
+<script type="text/JavaScript">\r
+//<!--\r
+\r
+function initial()\r
+{\r
+       // hide guideline div\r
+       document.getElementById("div_add_privs").style.display = 'none';\r
+\r
+       // set cursor focus\r
+       document.input_form.title.focus();\r
+}\r
+\r
+function CheckAll(element_name, selectall_checkbox_name) {\r
+       for (var i=0;i<document.input_form.elements.length;i++) {\r
+               var e = document.input_form.elements[i];\r
+               if ((e.name == element_name) && (e.type=='checkbox')) {\r
+                       e.checked = document.input_form[selectall_checkbox_name].checked;\r
+                       togglerowhighlight(document.getElementById("r" + e.id), e.id);\r
+               }\r
+       }\r
+}\r
+\r
+function togglerowhighlight(obj, boxid) {\r
+       if (document.getElementById(boxid).checked) {\r
+               obj.className = 'selected';\r
+       } else {\r
+               obj.className = '';\r
+       }\r
+}\r
+//  End -->\r
+//-->\r
+</script>\r
+\r
+<?php include(AF_INCLUDE_PATH.'footer.inc.php'); ?>\r
diff --git a/docs/themes/default/user/user_password.tmpl.php b/docs/themes/default/user/user_password.tmpl.php
new file mode 100644 (file)
index 0000000..6156dd5
--- /dev/null
@@ -0,0 +1,83 @@
+<?php 
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+global $onload;
+$onload = 'document.form.password.focus();';
+
+require(AF_INCLUDE_PATH.'header.inc.php'); 
+?>
+
+<script language="JavaScript" src="include/jscripts/sha-1factory.js" type="text/javascript"></script>
+
+<script type="text/javascript">
+function encrypt_password()
+{
+       document.form.password_error.value = "";
+
+       err = verify_password(document.form.password.value, document.form.password2.value);
+       
+       if (err.length > 0)
+       {
+               document.form.password_error.value = err;
+       }
+       else
+       {
+               document.form.form_password_hidden.value = hex_sha1(document.form.password.value);
+               document.form.password.value = "";
+               document.form.password2.value = "";
+       }
+}
+</script>
+
+<div class="center-input-form">
+<fieldset class="group_form"><legend class="group_form"><?php echo _AT('change_password'); ?></legend>
+
+       <form action="<?php echo $_SERVER['PHP_SELF']; ?>?id=<?php echo $_GET['id']; ?>" method="post" name="form">
+               <input type="hidden" name="form_password_hidden" value="" />
+               <input type="hidden" name="password_error" value="" />
+
+               <table class="form-data" align="center">
+                       <tr>
+                               <td align="left">
+                                       <div class="required" title="<?php echo _AT('required_field'); ?>">*</div>
+                                       <label for="password"><?php echo _AT('new_password'); ?></label>:
+                               </td>
+                               <td align="left">
+                                       <input id="password" name="password" type="password" size="25" maxlength="15" value="<?php echo stripslashes(htmlspecialchars($_POST['password'])); ?>" />
+                               </td>
+                       </tr>
+               
+                       <tr>
+                               <td align="left">
+                                       <div class="required" title="<?php echo _AT('required_field'); ?>">*</div>
+                                       <label for="password2"><?php echo _AT('password_again'); ?></label>:
+                               </td>
+                               <td align="left">
+                                       <input id="password2" name="password2" type="password" size="25" maxlength="15" value="<?php echo stripslashes(htmlspecialchars($_POST['password2'])); ?>" />
+                               </td>
+                       </tr>
+
+                       <tr>
+                               <td colspan="2">
+                                       <p class="submit_button">
+                                               <input type="submit" name="submit" value="<?php echo _AT('submit'); ?>" onclick="encrypt_password()" />
+                                               <input type="submit" name="cancel" value=" <?php echo _AT('cancel'); ?> " />
+                                       </p>
+                               </td>
+                       </tr>
+               </table>
+       </form>
+
+</fieldset>
+</div>
+
+<?php require(AF_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file
diff --git a/docs/themes/default/warningmessage.tmpl.php b/docs/themes/default/warningmessage.tmpl.php
new file mode 100644 (file)
index 0000000..aee47c4
--- /dev/null
@@ -0,0 +1,25 @@
+<?php  
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+global $_base_href;
+?>
+
+<div id="warning">
+       <?php if (is_array($this->item)) : ?>
+               <ul>
+               <?php foreach($this->item as $e) : ?>
+                       <li><?php echo $e; ?></li>
+               <?php endforeach; ?>
+               </ul>
+       <?php endif; ?>
+</div>
\ No newline at end of file
diff --git a/docs/translation/index.php b/docs/translation/index.php
new file mode 100644 (file)
index 0000000..58bfc71
--- /dev/null
@@ -0,0 +1,288 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', '../include/');
+
+include_once(AF_INCLUDE_PATH.'vitals.inc.php');
+include_once(AF_INCLUDE_PATH.'classes/DAO/DAO.class.php');
+include_once(AF_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');
+include_once(AF_INCLUDE_PATH.'classes/DAO/LanguageTextDAO.class.php');
+
+global $msg, $addslashes;
+
+$dao = new DAO();
+$languagesDAO = new LanguagesDAO();
+$languageTextDAO = new LanguageTextDAO();
+
+if (isset($_REQUEST['reset_filter'])) unset($_REQUEST);
+
+if (isset($_REQUEST['submit']) || isset($_REQUEST['search']))
+{
+       if (isset($_REQUEST['submit']))
+       {
+               if (isset($_REQUEST['term_type']) && $_REQUEST['term_type'] <> '') $term_type = $_REQUEST['term_type'];
+               
+               $sql = "SELECT * FROM ".TABLE_PREFIX."language_text 
+                                               WHERE language_code='".DEFAULT_LANGUAGE_CODE."'";
+               
+               if ($term_type <> '') $sql .= " AND variable = '".$term_type."'";
+               
+               if (isset($_REQUEST['new_or_translated']) && ($_REQUEST['new_or_translated'] == 1 || $_REQUEST['new_or_translated'] == 2))
+               {
+                       $subquery = "(SELECT term FROM ".TABLE_PREFIX."language_text
+                                                                               WHERE language_code='".$_REQUEST['lang_code']."'
+                                                                                 AND text <> '')";
+                       
+                       if ($_REQUEST['new_or_translated'] == 1) $sql .= " AND term NOT IN ".$subquery;
+                       if ($_REQUEST['new_or_translated'] == 2) $sql .= " AND term IN ".$subquery;
+               }
+               
+               if (isset($_REQUEST['new_or_translated']) && $_REQUEST['new_or_translated'] == 3)
+               {
+                       $sql = "select * from ".TABLE_PREFIX."language_text a 
+                                                       where language_code='".DEFAULT_LANGUAGE_CODE."' 
+                                                               and exists (select 1 from ".TABLE_PREFIX."language_text b 
+                                                                                                               where language_code = '".$_REQUEST['lang_code']."' 
+                                                                                                                       and a.term = b.term 
+                                                                                                                       and a.revised_date > b.revised_date)";
+               }
+       }
+       
+       if (isset($_REQUEST['search']))
+       {
+               $sql = "SELECT * FROM ".TABLE_PREFIX."language_text 
+                                               WHERE language_code='".DEFAULT_LANGUAGE_CODE."'
+                                                 AND lower(term) like '%".$addslashes(strtolower(trim($_REQUEST['search_phase'])))."%'";
+       }
+       
+       $rows = $dao->execute($sql);
+       
+       if (is_array($rows)) $num_results = count($rows);
+       else $num_results = 0;
+}
+
+if (isset($_REQUEST["save"]))
+{
+       $sql_save       = "REPLACE INTO ".TABLE_PREFIX."language_text VALUES ('".$_POST["lang_code"]."', '".$_POST["variable"]."', '".$_POST["term"]."', '".$addslashes($_POST["translated_text"])."', NOW(), '')";
+
+       $trans = get_html_translation_table(HTML_ENTITIES);
+       $trans = array_flip($trans);
+       $sql_save = strtr($sql_save, $trans);
+
+       if (!$dao->execute($sql_save)) {
+               $success_error = '<div class="error">Error: changes not saved!</div>';
+       }
+       else {
+               $success_error = '<div class="feedback2"">Success: changes saved.</div>';
+       }
+}
+
+//$rows_lang = $languagesDAO->getAllExceptLangCode(DEFAULT_LANGUAGE_CODE);                             
+$rows_lang = $languagesDAO->getAll();                          
+
+include(AF_INCLUDE_PATH.'header.inc.php');
+?>
+
+<form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
+       <div class="input-form">
+               <div class="row">
+                       <div class="required" title="<?php echo _AT('required_field'); ?>">*</div>
+                       <label for="lang_code"><?php echo _AT('choose_lang'); ?></label>:
+                       <select name="lang_code" id="lang_code"> 
+<?php 
+debug($rows_lang);
+debug($_REQUEST["lang_code"]); 
+foreach ($rows_lang as $row_lang)
+       {
+?>
+                               <option value="<?php echo $row_lang['language_code']; ?>" <?php if ((isset($_REQUEST["lang_code"]) && $_REQUEST["lang_code"] == $row_lang['language_code']) || (!isset($_REQUEST["lang_code"]) && $row_lang['language_code'] == $_SESSION['lang'])) echo 'selected="selected"'; ?>><?php echo $row_lang["english_name"]; ?></option>
+<?php
+       }
+?>
+                       </select>
+               </div>
+
+<?php  ?>
+       <fieldset class="group_form"><legend class="group_form"><?php echo _AT('filter'); ?></legend>
+
+<?php if (isset($num_results)) { ?>
+               <div class="row">
+                       <h2><?php echo _AT('results_found', $num_results); ?></h2>
+               </div>
+<?php } ?>
+
+               <div>
+                       <?php echo _AT('new_or_translated'); ?><br />
+                       <input type="radio" name="new_or_translated" value="0" id="u0" <?php if (!isset($_REQUEST['new_or_translated']) || $_REQUEST['new_or_translated'] == 0) { echo 'checked="checked"'; } ?> /><label for="u0"><?php echo _AT('all'); ?></label> 
+                       <input type="radio" name="new_or_translated" value="1" id="u1" <?php if ($_REQUEST['new_or_translated'] == 1) { echo 'checked="checked"'; } ?> /><label for="u1"><?php echo _AT('new_terms'); ?></label> 
+                       <input type="radio" name="new_or_translated" value="2" id="u2" <?php if ($_REQUEST['new_or_translated'] == 2) { echo 'checked="checked"'; } ?> /><label for="u2"><?php echo _AT('translated_terms'); ?></label> 
+                       <input type="radio" name="new_or_translated" value="3" id="u3" <?php if ($_REQUEST['new_or_translated'] == 3) { echo 'checked="checked"'; } ?> /><label for="u3"><?php echo _AT('updated_terms'); ?></label> 
+               </div>
+
+               <div>
+                       <?php echo _AT('term_type'); ?><br />
+                       <input type="radio" name="term_type" value="" id="t0" <?php if (!isset($_REQUEST['term_type']) || $_REQUEST['term_type'] == "") { echo 'checked="checked"'; } ?> /><label for="t0"><?php echo _AT('all'); ?></label> 
+                       <input type="radio" name="term_type" value="_template" id="t1" <?php if ($_REQUEST['term_type'] == "_template") { echo 'checked="checked"'; } ?> /><label for="t1"><?php echo _AT('interface_terms'); ?></label> 
+                       <input type="radio" name="term_type" value="_msgs" id="t2" <?php if ($_REQUEST['term_type'] == "_msgs") { echo 'checked="checked"'; } ?> /><label for="t2"><?php echo _AT('msg_terms'); ?></label> 
+               </div>
+
+               <div>
+                       <input type="submit" name="submit" value="<?php echo _AT('submit'); ?>" class="submit" />
+                       <input type="submit" name="reset_filter" value="<?php echo _AT('reset_filter'); ?>" class="submit" />
+               </div>
+
+               <div>
+                       <label for="search_phase"><?php echo _AT('or'). ",<br /><br />" . _AT('search_text'); ?></label>
+               </div>
+
+               <div>
+                       <input size="60" type="text" name="search_phase" id="search_phase" value="<?php echo htmlspecialchars(stripslashes($_REQUEST['search_phase'])); ?>" /> 
+               </div>
+
+               <div>
+                       <input type="submit" name="search" value="<?php echo _AT('search_phase'); ?>" class="submit" /> 
+               </div>
+       </fieldset>
+       
+       </div>
+</form>
+
+<?php 
+if (isset($_REQUEST['selected_term'])) 
+{
+       $sql_english    = "SELECT * FROM ".TABLE_PREFIX."language_text WHERE language_code='".DEFAULT_LANGUAGE_CODE."' AND term='".$_REQUEST["selected_term"]."'";
+       if ($_REQUEST["term_type"] <> "") $sql_english .= " AND variable='".$_REQUEST["term_type"]."' ";
+
+       $rows_english = $dao->execute($sql_english);
+       $row_english = $rows_english[0];
+
+       $rows_selected = $languageTextDAO->getByTermAndLang($_REQUEST["selected_term"], $_REQUEST["lang_code"]);
+       
+function trans_form() {
+       global $row_english, $rows_selected;
+       global $langs;
+       global $success_error;
+       global $db;
+       global $addslashes;
+
+       if (!is_array($rows_selected)) // add new term
+               $add_new = true;
+       else // update existing one
+       {
+               $row_selected = $rows_selected[0];
+               $add_new = false;
+       }
+?>
+<br />
+<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>#anchor">
+       <input type="hidden" name="selected_term" value="<?php echo $_REQUEST['selected_term']; ?>" />
+       <input type="hidden" name="lang_code" value="<?php echo $_REQUEST['lang_code']; ?>" />
+       <input type="hidden" name="new_or_translated" value="<?php echo $_REQUEST['new_or_translated']; ?>" />
+       <input type="hidden" name="term_type" value="<?php echo $_REQUEST['term_type']; ?>" />
+       <input type="hidden" name="search_phase" value="<?php echo htmlspecialchars(stripslashes($_REQUEST['search_phase'])); ?>" />
+       <input type="hidden" name="variable" value="<?php echo $row_english['variable']; ?>" />
+       <input type="hidden" name="term" value="<?php echo $row_english['term']; ?>" />
+<?php if (isset($_REQUEST["submit"])) { ?>
+       <input type="hidden" name="submit" value="1" />
+<?php } ?>
+<?php if (isset($_REQUEST["search"])) { ?>
+       <input type="hidden" name="search" value="1" />
+<?php } ?>
+
+       <table border="0" cellspacing="0" cellpadding="2" width="100%" align="left" class="box">
+       <tr>
+               <th class="box" colspan="2">Edit</th>
+       </tr>
+
+       <?php if ($row_english['context'] <> "") { ?>
+       <tr>
+               <td align="right" style="font:bold"><?php echo _AT('english_context'); ?>:</td>
+               <td><?php echo htmlspecialchars(stripslashes($row_english['context'])); ?></td>
+       </tr>
+       <tr>
+               <td align="right" style="font:bold"><?php echo _AT('translated_context'); ?>:</td>
+               <td><input type="text" name="translated_context" class="input" value="<?php echo htmlspecialchars(stripslashes($row_selected['context'])); ?>" size="45" /></td>
+       </tr>
+       <?php } ?>
+
+       <tr>
+               <td valign="top" align="right" nowrap="nowrap" style="font:bold"><?php echo _AT('english_text'); ?>:</td>
+               <td><?php echo nl2br(htmlspecialchars(stripslashes($row_english['text']))); ?></td>
+       </tr>
+       <tr>
+               <td valign="top" align="right" nowrap="nowrap" style="font: bold"><label for="translated_text"><?php echo _AT('translated_text'); ?></label>:</td>
+               <td><textarea rows="4" cols="75" name="translated_text" id="translated_text" class="input2"><?php echo htmlspecialchars(stripslashes($row_selected['text']));?></textarea></td>
+       </tr>
+       <tr>
+               <td colspan="2" align="center"><input type="submit" name="save" value="Save ALT-S" class="submit" accesskey="s" />
+               </td>
+       </tr>
+       </table>
+       </form>
+
+       <?php
+               echo $success_error;
+       }
+}
+//displaying templates
+if ($num_results > 0)
+{
+       echo '<h3 class="indent">'. _AT("result") .'</h3>'."\n";
+       echo '<div class="input-form">'."\n";
+       echo '<br /><ul>'."\n";
+       if (is_array($rows))
+       {
+               if (isset($_REQUEST["submit"]))
+                       $submits = htmlspecialchars(SEP)."submit=1";
+               if (isset($_REQUEST["search"]))
+                       $submits .= htmlspecialchars(SEP)."search=1";
+
+               foreach ($rows as $row) 
+               {
+                       if ($row['term'] == $_REQUEST["selected_term"])
+                               echo '<li>'."\n".'<a name="anchor" title="anchor"></a>'."\n";
+                       else
+                               echo '<li>'."\n";
+       
+//                     if ($row['term'] == $_REQUEST["search_phase"]) {
+                               echo '<a href="'.$_SERVER['PHP_SELF'].'?selected_term='.$row['term'].htmlspecialchars(SEP).'lang_code='.$_REQUEST['lang_code'].htmlspecialchars(SEP).'new_or_translated='.$_REQUEST["new_or_translated"].htmlspecialchars(SEP).'term_type='.$_REQUEST["term_type"].htmlspecialchars(SEP).'search_phase='.$_REQUEST["search_phase"].$submits.'#anchor" ';
+                               if ($row['term'] == $_REQUEST["selected_term"]) echo 'class="selected"';
+                               echo '>';
+                               echo $row['term'];
+                               echo '</a>'."\n";
+//                     } 
+       
+                       // display if the term is new or translated
+                       $rows_check = $languageTextDAO->getByTermAndLang($row['term'], $_REQUEST['lang_code']);
+                       $row_check = $rows_check[0];
+                       
+                       // check if the term is new
+                       if ($row_check['text'] == '')
+                               echo '&nbsp;<small>*New*</small>'."\n";
+                       
+                       // compare revised_date to see if the term is updated since last translation
+                       if ($row_check['revised_date'] <> '' && $row['revised_date'] > $row_check['revised_date'])
+                               echo '&nbsp;<small>*Updated*</small>'."\n";
+                               
+                       echo '<br /><br/>';
+                       // display translation form
+                       if ($row['term'] == $_REQUEST["selected_term"]) trans_form();
+                       
+                       echo '</li>'."\n";
+               }
+       }
+       echo '</ul>'."\n";
+       echo '</div>'."\n";
+}
+
+include(AF_INCLUDE_PATH.'footer.inc.php'); 
+?>
diff --git a/docs/updater/classes/Patch.class.php b/docs/updater/classes/Patch.class.php
new file mode 100644 (file)
index 0000000..07da322
--- /dev/null
@@ -0,0 +1,785 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* Patch
+* Class for patch installation
+* @access      public
+* @author      Cindy Qi Li
+* @package     Patch
+*/
+
+define('AF_INCLUDE_PATH', '../../');
+
+require_once(AF_INCLUDE_PATH. "classes/DAO/PatchesDAO.class.php");
+require_once(AF_INCLUDE_PATH. "classes/DAO/PatchesFilesDAO.class.php");
+require_once(AF_INCLUDE_PATH. "classes/DAO/PatchesFilesActionsDAO.class.php");
+
+class Patch {
+
+       // all private
+       var $patch_array = array();           // the patch data
+       var $patch_summary_array = array();   // patch summary information 
+       var $patch_id;                        // current patches.patches_id
+       var $patch_file_id;                   // current patches_files.patches_files_id
+       
+       var $need_access_to_folders = array();// folders that need to have write permission
+       var $need_access_to_files = array();  // files that need to have write permission
+       var $backup_files = array();          // backup files
+       var $patch_files = array();           // patch files
+
+       var $errors = array();                // error messages
+       var $baseURL;                         // patch folder at UPDATE_SERVER (defined in include/constants.inc.php)
+       var $backup_suffix;                   // suffix appended for backup files
+       var $patch_suffix;                    // suffix appended for patch files copied from UPDATE_SERVER (defined in include/constants.inc.php)
+       var $skipFilesModified = false;       // if set to true, report error for files that have been modified by user
+       var $module_content_dir;              // content folder used to create patch.sql
+       var $svn_server_connected;            // flag indicating if can connect to svn server, if not, consider all files manipulated by patch as modified
+
+       // constant, URL of user's ATutor release version in SVN 
+       var $sql_file = 'patch.sql';
+       var $relative_to_root = '../';   // relative path from updater/ to root
+       
+       var $patchesDAO;                      // DAO for table "patches"
+       var $patchesFilesDAO;                 // DAO for table "patches_files"
+       var $patchesFilesActionsDAO;          // DAO for table "patches_files_actions"
+       
+       /**
+       * Constructor: Initialize object members
+       * @access  public
+       * @param   $patch_array The name of the file to find charset definition
+       *          $patch_summary_array
+       *          $skipFilesModified
+       * @author  Cindy Qi Li
+       */
+       function Patch($patch_array, $patch_summary_array, $skipFilesModified, $patch_folder) 
+       {
+               // add relative path to move to AFrame root folder
+               for ($i = 0; $i < count($patch_array[files]); $i++)
+               {
+                       $patch_array[files][$i]['location'] = $this->relative_to_root . $patch_array[files][$i]['location'];
+               }
+               
+               $this->patch_array = $patch_array; 
+               $this->patch_summary_array = $patch_summary_array;
+
+               $this->baseURL = $patch_folder;
+               $this ->backup_suffix = $patch_array['system_patch_id'] . ".old";
+               $this ->patch_suffix = $patch_array['system_patch_id'];
+               $this->skipFilesModified = $skipFilesModified;
+               
+               $this->module_content_dir = AF_TEMP_DIR . "updater";
+               $this->patchesDAO = new PatchesDAO();
+               $this->patchesFilesDAO = new PatchesFilesDAO();
+               $this->patchesFilesActionsDAO = new PatchesFilesActionsDAO();
+               
+               session_start();
+               
+               if (!is_array($_SESSION['remove_permission'])) $_SESSION['remove_permission']=array();
+               
+       }
+
+       /**
+       * Main process to apply patch.
+       * @access  public
+       * @return  true  if patch is successfully applied
+       *          false if failed
+       * @author  Cindy Qi Li
+       */
+       function applyPatch() 
+       {
+               global $msg;
+               
+               // Checks on 
+               // 1. if svn server is up. If not, consider all files manipulated by patch as modified
+               // 2. if the local file is customized by user
+               // 3. if script has write priviledge on local file/folder
+               // 4. if dependent patches have been installed
+               if (!$this->pingDomain(SVN_TAG_FOLDER)) 
+               {
+                       $msg->addInfo('CANNOT_CONNECT_SVN_SERVER');
+                       $msg->printInfos();
+                       $this->svn_server_connected = false;
+               }
+               else
+                       $this->svn_server_connected = true;
+               
+               if (!$this->checkDependentPatches()) return false;
+
+               if (!$this->checkAppliedVersion()) return false;
+
+               if (!$this->skipFilesModified && $this->hasFilesModified()) return false;
+               
+               if (!$this->checkPriviledge()) return false;
+               // End of check
+
+               if (strlen(trim($this->patch_array['sql'])) > 0) $this->runSQL();
+
+               // Start applying patch
+               $this->createPatchesRecord($this->patch_summary_array);
+
+               // if no file action defined, update database and return true
+               if (!is_array($this->patch_array[files])) 
+               {
+                       $updateInfo = array("status"=>"Installed");
+                       $this->patchesDAO->UpdateByArray($this->patch_id, $updateInfo);
+       
+                       return true;
+               }
+               
+               foreach ($this->patch_array[files] as $row_num => $patch_file)
+               {
+                       $this->createPatchesFilesRecord($this->patch_array['files'][$row_num]);
+
+                       if ($patch_file['action'] == 'alter')
+                       {
+                               $this->alterFile($row_num);
+                       }
+                       else if ($patch_file['action'] == 'add')
+                       {
+                               $this->addFile($row_num);
+                       }
+                       else if ($patch_file['action'] == 'delete')
+                       {
+                               $this->deleteFile($row_num);
+                       }
+                       else if ($patch_file['action'] == 'overwrite')
+                       {
+                               $this->overwriteFile($row_num);
+                       }
+               }
+               
+               // if only has backup files info, patch is considered successfully installed
+               // if has permission to remove, considered partly installed
+               $updateInfo = array();
+
+               if (count($this->backup_files) > 0)
+               {
+                       foreach($this->backup_files as $backup_file)
+                               $backup_files .= $backup_file. '|';
+               
+                       $updateInfo = array("backup_files"=>mysql_real_escape_string($backup_files));
+               }
+       
+               if (count($this->patch_files) > 0)
+               {
+                       foreach($this->patch_files as $patch_file)
+                               $patch_files .= $patch_file. '|';
+               
+                       $updateInfo = array_merge($updateInfo, array("patch_files"=>mysql_real_escape_string($patch_files)));
+               }
+       
+               if (is_array($_SESSION['remove_permission']) && count($_SESSION['remove_permission']))
+               {
+                       foreach($_SESSION['remove_permission'] as $remove_permission_file)
+                               $remove_permission_files .= $remove_permission_file. '|';
+
+                       $updateInfo = array_merge($updateInfo, array("remove_permission_files"=>mysql_real_escape_string($remove_permission_files), "status"=>"Partly Installed"));
+               }
+               else
+               {
+                       $updateInfo = array_merge($updateInfo, array("status"=>"Installed"));
+               } 
+
+               $this->patchesDAO->UpdateByArray($this->patch_id, $updateInfo);
+               
+               unset($_SESSION['remove_permission']);
+
+               return true;
+       }
+
+       /**
+       * return patch array
+       * @access  public
+       * @return  patch array
+       * @author  Cindy Qi Li
+       */
+       function getPatchArray() 
+       {
+               return $this->patch_array;
+       }
+       
+       /**
+       * return patch id processed by this object
+       * @access  public
+       * @return  patch id
+       * @author  Cindy Qi Li
+       */
+       function getPatchID() 
+       {
+               return $this->patch_id;
+       }
+       
+       /**
+       * Check if script has write permission to the files and folders that need to be written
+       * if no permission, warn user to give permission
+       * @access  private
+       * @return  true  if there are files or folders that script has no permission
+       *          false if permissions are in place
+       * @author  Cindy Qi Li
+       */
+       function checkPriviledge()
+       {
+               global $id, $who;
+               
+               // no file action is defined, return true;
+               if (!is_array($this->patch_array[files])) return true;
+               
+               foreach ($this->patch_array[files] as $row_num => $patch_file)
+               {
+                       $real_location = realpath($patch_file['location']);
+                       
+                       if (!is_writable($patch_file['location']) && !in_array($real_location, $this->need_access_to_folders))
+                       {
+                               $this->need_access_to_folders[] = $real_location;
+
+                               if (!in_array($real_location, $_SESSION['remove_permission']))
+                                       $_SESSION['remove_permission'][] = $real_location;
+                       }
+
+                       if ($patch_file['action'] == 'alter' || $patch_file['action'] == 'delete' || $patch_file['action'] == 'overwrite')
+                       {
+                               $file = $patch_file['location'] . "/" . $patch_file['name'];
+
+                               $real_file = realpath($file);
+                               if (file_exists($file) && !is_writable($file) && !in_array($real_file, $this->need_access_to_files))
+                               {
+                                       $this->need_access_to_files[] = $real_file;
+
+                                       if (!in_array($real_file, $_SESSION['remove_permission']) && $patch_file['action'] <> 'delete')
+                                               $_SESSION['remove_permission'][] = $real_file;
+                               }
+                       }
+               }
+               
+               if (count($this->need_access_to_folders) > 0 || count($this->need_access_to_files) > 0)
+               {
+                       $this->errors[] = _AT('grant_write_permission');
+                       
+                       foreach($this->need_access_to_folders as $folder)
+                       {
+                               $this->errors[0] .= '<strong>'. $folder . "</strong><br />";
+                       }
+
+                       foreach($this->need_access_to_files as $file)
+                       {
+                               $this->errors[0] .= '<strong>'. $file . "</strong><br />";
+                       }
+
+                       $notes = '<form action="'. $_SERVER['PHP_SELF'].'?id='.$id.'&who='. $who .'" method="post" name="skip_files_modified">
+                 <div class="row buttons">
+                               <input type="submit" name="yes" value="'._AT('continue').'" accesskey="y" />
+                               <input type="submit" name="no" value="'. _AT('cancel'). '" />
+                               <input type="hidden" name="install" value="' . $_POST['install'] . '" />
+                               <input type="hidden" name="install_upload" value="' . $_POST['install_upload'] . '" />
+                               <input type="hidden" name="ignore_version" value="' . $_POST['ignore_version'] . '" />
+                       </div>
+                       </form>';
+                       
+                       print_errors($this->errors, $notes);
+               
+                       unset($this->errors);
+                       return false;
+               }
+               
+               return true;
+       }
+       
+       /**
+       * Check if AFrame version is same as "applied version" defined in the patch.
+       * @access  private
+       * @return  true  if versions match
+       *          false if versions don't match
+       * @author  Cindy Qi Li
+       */
+       function checkAppliedVersion()
+       {
+               global $msg;
+               
+               if ($this->patch_summary_array["applied_version"] <> VERSION)
+               {
+                               $this->errors[] = _AT("version_not_match", $this->patch_summary_array["applied_version"]);
+                               
+                               $notes = '
+                         <form action="'. $_SERVER['PHP_SELF'].'?id='.$_POST['id'].'&who='. $_POST['who'] .'" method="post" name="skip_files_modified">
+                         <div class="row buttons">
+                                       <input type="submit" name="ignore_version" value="'._AT('yes').'" accesskey="y" />
+                                       <input type="submit" name="not_ignore_version" value="'. _AT('no'). '" />
+                                       <input type="hidden" name="install" value="' . $_POST['install'] . '" />
+                                       <input type="hidden" name="install_upload" value="' . $_POST['install_upload'] . '" />
+                               </div>
+                               </form>';
+
+                       print_errors($this->errors, $notes);
+               
+                       unset($this->errors);
+                       
+                       return false;
+               }
+
+               return true;
+       }
+
+       /**
+       * Check if all the dependent patches have been installed.
+       * @access  private
+       * @return  true  if all the dependent patches have been installed
+       *          false if any dependent patch has not been installed.
+       * @author  Cindy Qi Li
+       */
+       function checkDependentPatches()
+       {
+               global $msg;
+               
+               $dependent_patches_installed = true;
+               
+               // if no dependent patch defined, return true
+               if (!is_array($this->patch_summary_array["dependent_patches"])) return true;
+               
+               foreach($this->patch_summary_array["dependent_patches"] as $num => $dependent_patch)
+               {
+                       if (!is_patch_installed($dependent_patch))
+                       {
+                               $dependent_patches_installed = false;
+                               $dependent_patches .= $dependent_patch. ", ";
+                       }
+               }
+               
+               if (!$dependent_patches_installed)
+               {
+                       $errors = array('UPDATE_DEPENDENCY', substr($dependent_patches, 0, -2));
+                       $msg->addError($errors);
+                       return false;
+               }
+               
+               return true;
+       }
+       
+       /**
+       * Loop thru all the patch files that will be overwitten or altered, 
+       * to find out if they are modified by user. If it's modified, warn user.
+       * @access  private
+       * @return  true  if there are files being modified
+       *          false if no file is modified
+       * @author  Cindy Qi Li
+       */
+       function hasFilesModified()
+       {
+               $overwrite_modified_files = false;
+               $alter_modified_files = false;
+               $has_not_exist_files = false;
+               
+               // no file action is defined, return nothing is modified (false)
+               if (!is_array($this->patch_array[files])) return false;
+               
+               foreach ($this->patch_array[files] as $row_num => $patch_file)
+               {
+                       if ($patch_file["action"]=='alter' || $patch_file["action"]=='overwrite')
+                       {
+                               if (!file_exists($patch_file['location'] . $patch_file['name']))
+                               {
+                                       $not_exist_files .= $patch_file['location'] . $patch_file['name'] . '<br />';
+                                       $has_not_exist_files = true;
+                               }
+                               else if ($this->isFileModified($patch_file['location'], $patch_file['name']))
+                               {
+                                       if ($patch_file['action']=='overwrite')
+                                       {
+                                               $overwrite_files .= realpath($patch_file['location'] . $patch_file['name']) . '<br />';
+                                               $overwrite_modified_files = true;
+                                       }
+                                       if ($patch_file['action']=='alter')
+                                       {
+                                               $alter_files .= realpath($patch_file['location'] . $patch_file['name']) . '<br />';
+                                               $alter_modified_files = true;
+                                       }
+                               }
+                       }
+               }
+
+               if ($has_not_exist_files) $this->errors[] = _AT('update_local_file_not_exist'). $not_exist_files;
+               if ($overwrite_modified_files)    $this->errors[] = _AT('updater_overwrite_modified_files') . $overwrite_files;
+               if ($alter_modified_files)    $this->errors[] = _AT('updater_alter_modified_files') . $alter_files;
+               if (count($this->errors) > 0)
+               {
+                       if ($has_not_exist_files)
+                               $notes = '';
+                       else
+                               $notes = '
+                         <form action="'. $_SERVER['PHP_SELF'].'?id='.$_POST['id'].'&who='. $_POST['who'] .'" method="post" name="skip_files_modified">
+                         <div class="row buttons">
+                                       <input type="submit" name="yes" value="'._AT('yes').'" accesskey="y" />
+                                       <input type="submit" name="no" value="'. _AT('no'). '" />
+                                       <input type="hidden" name="install" value="' . $_POST['install'] . '" />
+                                       <input type="hidden" name="install_upload" value="' . $_POST['install_upload'] . '" />
+                                       <input type="hidden" name="ignore_version" value="' . $_POST['ignore_version'] . '" />
+                               </div>
+                               </form>';
+
+                       print_errors($this->errors, $notes);
+               
+                       unset($this->errors);
+                       return true;
+               }
+               
+               return false;
+       }
+
+       /**
+       * Compare user's local file with SVN backup for user's AFrame version,
+       * if different, check table AF_patches_files to see if user's local file
+       * was altered by previous patch installation. If it is, return false 
+       * (not modified), otherwise, return true (modified).
+       * @access  private
+       * @param   $folder  folder of the file to be compared
+       *          $file    name of the file to be compared
+       * @return  true     if the file is modified
+       *          false    if the file is not modified
+       * @author  Cindy Qi Li
+       */
+       function isFileModified($folder, $file)
+       {
+               global $db;
+
+               if (!$this->svn_server_connected) return true;
+               
+               $svn_file = SVN_TAG_FOLDER . 'aframe_' . str_replace('.', '_', VERSION) .
+                           str_replace(substr($this->relative_to_root, 0, -1), '' , $folder) .$file;
+               $local_file = $folder.$file;
+
+               // if svn script does not exist, consider the script is modified
+               if (!file_get_contents($svn_file)) return true;
+
+               // check if the local file has been modified by user. if it is, don't overwrite
+               if ($this->compareFiles($svn_file, $local_file) <> 0 && $this->patchesFilesDAO->getNumOfUpdatesOnFile($file) == 0)
+               {
+                       // check if the file was changed by previous installed patches
+                       return true;
+               }
+               return false;
+       }
+
+       /**
+       * Run SQL defined in patch.xml
+       * @access  private
+       * @author  Cindy Qi Li
+       */
+       function runSQL()
+       {
+               // run sql
+               // As sqlutility.class.php reads sql from a file, write sql to module content folder
+               $patch_sql_file = $this->module_content_dir . '/' . $this->sql_file;
+
+               $fp = fopen($patch_sql_file, 'w');
+               fwrite($fp, trim($this->patch_array['sql']));
+               fclose($fp);
+
+               require(AF_INCLUDE_PATH . 'classes/sqlutility.class.php');
+               $sqlUtility = new SqlUtility();
+       
+               $sqlUtility->queryFromFile($patch_sql_file, TABLE_PREFIX);
+               
+               @unlink($patch_sql_file);
+               
+               return true;
+       }
+               
+       /**
+       * Copy file from UPDATE_SERVER (defined in include/constants.inc.php) to user's computer
+       * @access  private
+       * @param   $row_num     row number of patch record to be processed
+       * @author  Cindy Qi Li
+       */
+       function addFile($row_num)
+       {
+               $this->copyFile($this->baseURL . preg_replace('/.php$/', '.new', $this->patch_array['files'][$row_num]['name']), $this->patch_array['files'][$row_num]['location'].$this->patch_array['files'][$row_num]['name']);
+               
+               return true;
+       }
+       
+       /**
+       * Delete file, backup before deletion
+       * @access  private
+       * @param   $row_num     row number of patch record to be processed
+       * @author  Cindy Qi Li
+       */
+       function deleteFile($row_num)
+       {
+               $local_file = $this->patch_array['files'][$row_num]['location'].$this->patch_array['files'][$row_num]['name'];
+               $backup_file = $local_file . "." . $this->backup_suffix;
+               
+               if (file_exists($local_file))
+               {
+                       // move file to backup
+                       $this->copyFile($local_file, $backup_file);
+                       $this->backup_files[] = realpath($backup_file);
+                       @unlink($local_file);
+               }
+               
+               return true;
+               
+       }
+       
+       /**
+       * Alter file based on <action_detail>
+       * If user's local file is modified and user agrees to proceed with applying patch,
+       * alter user's local file.
+       * @access  private
+       * @param   $row_num     row number of patch record to be processed
+       * @author  Cindy Qi Li
+       */
+       function alterFile($row_num)
+       {
+               $local_file = $this->patch_array['files'][$row_num]['location'].$this->patch_array['files'][$row_num]['name'];
+               
+               // backup user's file
+               $backup_file = $local_file . "." . $this->backup_suffix;
+               
+               // Checking existence of $backup_file is to fix the bug when there are multiple alter/delete actions 
+               // on the same file, the following backups overwrite the first backup which results in the loss of the
+               // original code.
+               if (!file_exists($backup_file))
+               {
+                       $this->copyFile($local_file, $backup_file);
+                       $this->backup_files[] = realpath($backup_file);
+               }
+               
+               $local_file_content = file_get_contents($local_file);
+
+               // Modify user's file
+               foreach ($this->patch_array['files'][$row_num]['action_detail'] as $garbage => $alter_file_action)
+               {
+                       if ($alter_file_action['type'] == 'delete')
+                               $modified_local_file_content = $this->strReplace($alter_file_action['code_from'], '', $local_file_content);
+
+                       if ($alter_file_action['type'] == 'replace')
+                               $modified_local_file_content = $this->strReplace($alter_file_action['code_from'], $alter_file_action['code_to'], $local_file_content);
+                               
+                       // when code_from is not found, add in warning
+                       if ($modified_local_file_content == $local_file_content)  
+                       {
+                               for ($i = 0; $i < count($this->backup_files); $i++)
+                                       if ($this->backup_files[$i] == realpath($backup_file))
+                                               $this->backup_files[$i] .= ' '._AT("chunks_not_found");
+                       }
+                       else
+                               $local_file_content = $modified_local_file_content;
+
+                       $this->createPatchesFilesActionsRecord($alter_file_action);
+               }
+
+               $fp = fopen($local_file, 'w');
+               fwrite($fp, $local_file_content);
+               fclose($fp);
+
+               return true;
+       }
+       
+       /**
+       * Fetch file from UPDATE_SERVER (defined in include/constants.inc.php) and overwrite 
+       * user's local file if the local file is not modified
+       * If user's local file is modified and user agrees to proceed with applying patch,
+       * copy the new file to user's local for them to merge manually.
+       * @access  private
+       * @param   $row_num     row number of patch record to be processed
+       * @author  Cindy Qi Li
+       */
+       function overwriteFile($row_num)
+       {
+               $local_file = $this->patch_array['files'][$row_num]['location'].$this->patch_array['files'][$row_num]['name'];
+               $patch_file = $this->baseURL . preg_replace('/.php$/', '.new', $this->patch_array['files'][$row_num]['name']);
+               
+               // if local file is modified and user agrees to proceed with applying patch,
+               // copy the new file to user's local for them to merge manually
+               if ($this->skipFilesModified && $this->isFileModified($this->patch_array['files'][$row_num]['location'], $this->patch_array['files'][$row_num]['name']))
+               {
+                       $local_patch_file = $local_file . "." . $this->patch_suffix;
+
+                       $this->copyFile($patch_file, $local_patch_file);
+                       
+                       $this->patch_files[] = realpath($local_patch_file);
+               }
+               else
+               {
+                       $backup_file = $local_file . "." . $this->backup_suffix;
+                       
+                       // backup user's file
+                       $this->copyFile($local_file, $backup_file);
+                       $this->backup_files[] = realpath($backup_file);
+                       
+                       // overwrite user's file
+                       $this->copyFile($patch_file, $local_file);
+               }
+               
+               return true;
+       }
+       
+       /**
+       * Copy file $src to $dest. $src can be a local file or a remote file
+       * @access  private
+       * @param   $src location of the source file
+       *          $dest        location of the destination file
+       * @author  Cindy Qi Li
+       */
+       function copyFile($src, $dest)
+       {
+               $content = file_get_contents($src);
+               $fp = fopen($dest, 'w');
+               fwrite($fp, $content);
+               fclose($fp);
+               
+               return true;
+       }
+       
+       /**
+       * Compare files $src against $dest
+       * @access  private
+       * @param   $src location of the source file
+       *          $dest        location of the destination file
+       * @return  Returns < 0 if $src is less than $dest ; > 0 if $src is greater than $dest, and 0 if they are equal.
+       * @author  Cindy Qi Li
+       */
+       function compareFiles($src, $dest)
+       {
+               // use preg_replace to delete 
+               // 1. the line starting with // $Id:
+               // 2. the line starting with $lm = '$LastChangedDate, ending with ;
+               // These lines are created by SVN. It could be different in different copies of the same file.
+               $pattern = '/\/\/ \$Id.*\$|\$lm = \'\$LastChangedDate.*;/';
+               
+               $src_content = preg_replace($pattern, '', file_get_contents($src));
+               $dest_content = preg_replace($pattern, '', file_get_contents($dest));
+
+               return strcasecmp($src_content, $dest_content);
+       }
+       
+       /**
+       * Replace single/multiple lines of string. 
+       * This function handles different new line character at windows/unix platform
+       * @access  private
+       * @param   $search      String to replace from
+       *          $replace     String to replace to
+       *          $subject Subject to be handled  
+       * @return  return replaced string, if nothing is replaced, return original subject
+       * @author  Cindy Qi Li
+       */
+       function strReplace($search, $replace, $subject)
+       {
+               // Note: DO NOT change the order of the array elements. 
+               // "\n\r", "\r\n" must come before "\n", "\r" in the array, 
+               // otherwise, the new line replace underneath would wrongly replace "\n\r" to "\r\r" or "\n\n"
+               $new_line_array = array("\n\r", "\r\n", "\r", "\n");
+               
+               foreach ($new_line_array as $new_line)
+               {
+                       if (preg_match('/'.preg_quote($new_line).'/', $search) > 0)   $search_new_lines[] = $new_line;
+                       if (preg_match('/'.preg_quote($new_line).'/', $replace) > 0)   $replace_new_lines[] = $new_line;
+                       if (preg_match('/'.preg_quote($new_line).'/', $subject) > 0)   $subject_new_lines[] = $new_line;
+               }
+
+               // replace new line chars in $search, $replace, $subject to the last new line in $subject
+               if (is_array($subject_new_lines)) $new_line_replace_to = array_pop($subject_new_lines);
+
+               if ($new_line_replace_to <> '')
+               {
+                       if (count($search_new_lines) > 0)
+                               foreach ($search_new_lines as $new_line)
+                                       if ($new_line <> $new_line_replace_to)
+                                               $search = preg_replace('/'.preg_quote($new_line).'/', $new_line_replace_to, $search);
+                       
+                       if (count($replace_new_lines) > 0)
+                               foreach ($replace_new_lines as $new_line)
+                                       if ($new_line <> $new_line_replace_to)
+                                               $replace = preg_replace('/'.preg_quote($new_line).'/', $new_line_replace_to, $replace);
+                       
+                       if (count($subject_new_lines) > 0)
+                               foreach ($subject_new_lines as $new_line)
+                                       $subject = preg_replace('/'.preg_quote($new_line).'/', $new_line_replace_to, $subject);
+               }
+               
+               return preg_replace('/'. preg_quote($search, '/') .'/', $replace, $subject);
+       }
+       
+       /**
+       * Check if the server is down
+       * @access  private
+       * @param   $domain      Server Domain
+       * @return  return false if server is down, otherwise, return true
+       * @author  Cindy Qi Li
+       */
+       function pingDomain($domain)
+       {
+    $file = @fopen ($domain, 'r');
+
+    if (!$file) 
+       return false;
+
+    return true;
+       }
+
+       /**
+       * Insert record into table patches
+       * @access  private
+       * @param   $patch_summary_array Patch summary information
+       * @author  Cindy Qi Li
+       */
+       function createPatchesRecord($patch_summary_array)
+       {
+               $this->patch_id = $this->patchesDAO->Create($patch_summary_array["system_patch_id"],
+                                          $patch_summary_array["applied_version"],
+                                          $patch_summary_array["patch_folder"],
+                                          $patch_summary_array["description"],
+                                          $patch_summary_array["available_to"],
+                                          $patch_summary_array["sql"],
+                                          $patch_summary_array["status"],
+                                          '',
+                                          '',
+                                          '',
+                                          $patch_summary_array["author"]);
+
+               return true;
+       }
+
+       /**
+       * Insert record into table patches_files
+       * @access  private
+       * @param   $patch_files_array   Patch information
+       * @author  Cindy Qi Li
+       */
+       function createPatchesFilesRecord($patch_files_array)
+       {
+               $this->patch_file_id = $this->patchesFilesDAO->Create($this->patch_id,
+                               $patch_files_array['action'],
+                               $patch_files_array['name'],
+                               $patch_files_array['location']);
+
+               return true;
+       }
+
+       /**
+       * Insert record into table patches_files_actions
+       * @access  private
+       * @param   $patch_files_actions_array   alter file actions and contents
+       * @author  Cindy Qi Li
+       */
+       function createPatchesFilesActionsRecord($patch_files_actions_array)
+       {
+               $this->patchesFilesActionsDAO->Create($this->patch_file_id,
+                               $patch_files_actions_array['type'],
+                               $patch_files_actions_array['code_from'],
+                               $patch_files_actions_array['code_to']);
+
+               return true;
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/docs/updater/classes/PatchCreator.class.php b/docs/updater/classes/PatchCreator.class.php
new file mode 100644 (file)
index 0000000..9182153
--- /dev/null
@@ -0,0 +1,361 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* Patch
+* Class to create a zipped patch package
+* zipped patch package contains patch.xml, the files to be added, overwritten
+* @access      public
+* @author      Cindy Qi Li
+* @package     PatchCreator
+*/
+
+define('AF_INCLUDE_PATH', '../../include/');
+require_once (AF_INCLUDE_PATH.'vitals.inc.php');
+
+require_once(AF_INCLUDE_PATH. "../updater/include/patch_xml_template.inc.php");
+require_once(AF_INCLUDE_PATH."classes/DAO/MyownPatchesDAO.class.php");
+require_once(AF_INCLUDE_PATH."classes/DAO/MyownPatchesDependentDAO.class.php");
+require_once(AF_INCLUDE_PATH."classes/DAO/MyownPatchesFilesDAO.class.php");
+
+class PatchCreator {
+
+       // all private
+       var $patch_info_array = array();           // the patch info data
+       var $patch_xml_file;                       // location of patch.xml
+       var $current_patch_id;                     // current myown_patches.myown_patch_id
+       var $version_folder;                       // version folder. underneath updater content folder, to hold all patch folders and corresponding upload files
+       var $patch_folder;                         // patch folder. underneath version folder, to hold all upload files
+       
+       var $myownPatchesDAO;                      // DAO object for table "myown_patches"
+       var $myownPatchesDependentDAO;             // DAO object for table "myown_patches_dependent"
+       var $myownPatchesFilesDAO;                 // DAO object for table "myown_patches_files"
+       
+       /**
+       * Constructor: Initialize object members
+       * @author  Cindy Qi Li
+       * @access  public
+       * @param   $patch_info_array    All information to create a patch. Example:
+       * Array
+       * (
+       *     [system_patch_id] => Patch001
+       *     [aframe_version_to_apply] => 1.6
+       *     [description] => this is a sample patch info array
+       *     [sql_statement] => 
+       *     [dependent_patches] => Array
+       *     (
+       *         [0] => P2
+       *         [1] => P3
+       *     )
+       *     [files] => Array
+       *         (
+       *             [0] => Array
+       *                 (
+       *                     [file_name] => script1.php
+       *                     [action] => add
+       *                     [directory] => admin/
+       *                     [upload_tmp_name] => C:\xampp\tmp\php252.tmp
+       *                 )
+       * 
+       *             [1] => Array
+       *                 (
+       *                     [file_name] => script2.php
+       *                     [action] => delete
+       *                     [directory] => tools/
+       *                 )
+       *         )
+       * 
+       * )
+       */
+       
+       function PatchCreator($patch_info_array, $patch_id)
+       {
+               // add slashes if magic_quotes_gpc is off
+               if (!get_magic_quotes_gpc())
+               {
+                       $patch_info_array["description"] = addslashes($patch_info_array["description"]);
+                       $patch_info_array["sql_statement"] = addslashes($patch_info_array["sql_statement"]);
+                       
+                       for ($i = 0; $i < count($patch_info_array["files"]); $i++)
+                       {
+                               $patch_info_array["files"][$i]["directory"] = addslashes($patch_info_array["files"][$i]["directory"]);
+                               $patch_info_array["files"][$i]["upload_tmp_name"] = addslashes($patch_info_array["files"][$i]["upload_tmp_name"]);
+                               $patch_info_array["files"][$i]["code_from"] = addslashes($patch_info_array["files"][$i]["code_from"]);
+                               $patch_info_array["files"][$i]["code_to"] = addslashes($patch_info_array["files"][$i]["code_to"]);
+                       }
+               }
+               
+               $this->patch_info_array = $patch_info_array; 
+               $this->current_patch_id = $patch_id;
+               
+               $this->patch_xml_file = AF_TEMP_DIR . "updater/patch.xml";
+
+               $this->version_folder = AF_TEMP_DIR . "updater/" . str_replace('.', '_', $this->patch_info_array["aframe_version_to_apply"]) . "/";
+               $this->patch_folder = $this->version_folder . $this->patch_info_array["system_patch_id"] . "/";
+               
+               $this->myownPatchesDAO = new MyownPatchesDAO();
+               $this->myownPatchesDependentDAO = new MyownPatchesDependentDAO();
+               $this->myownPatchesFilesDAO = new MyownPatchesFilesDAO();
+       }
+
+       /**
+       * Create Patch
+       * @access  public
+       * @return  true if created successfully
+       *          false if error happens
+       * @author  Cindy Qi Li
+       */
+       function create_patch()
+       {
+               // save patch info into database & save uploaded files into content folder
+               $this->saveInfo();
+               
+               // create patch.xml into $this->patch_xml_file
+               $fp = fopen($this->patch_xml_file,'w');
+               fwrite($fp,$this->createXML());
+               fclose($fp);
+               
+               // create zip package and force download
+               $this->createZIP();
+
+               // clean up
+               unlink($this->patch_xml_file);
+               
+               return true;
+       }
+
+       /**
+       * Save patch info into database & save uploaded files into content folder
+       * @access  public
+       * @return  xml string
+       * @author  Cindy Qi Li
+       */
+       function saveInfo() 
+       {
+               global $db;
+               
+               if ($this->current_patch_id == 0)
+               {
+                       $this->current_patch_id = $this->myownPatchesDAO->Create(
+                               $this->patch_info_array["system_patch_id"], 
+                               $this->patch_info_array["aframe_version_to_apply"], 
+                               $this->patch_info_array["description"], 
+                               $this->patch_info_array["sql_statement"]);
+               }
+               else
+               {
+                       $this->myownPatchesDAO->Update($this->current_patch_id, 
+                                   $this->patch_info_array["system_patch_id"],
+                                   $this->patch_info_array["aframe_version_to_apply"],
+                                   $this->patch_info_array["description"],
+                                   $this->patch_info_array["sql_statement"]);
+               }
+
+               if ($this->current_patch_id == 0)
+               {
+                       $this->current_patch_id = mysql_insert_id();
+               }
+               else // delete records for current_patch_id in tables myown_patches_dependent & myown_patches_files
+               {
+                       $this->myownPatchesDependentDAO->DeleteByPatchID($this->current_patch_id);
+                       $this->myownPatchesFilesDAO->DeleteByPatchID($this->current_patch_id);
+               }
+               
+               // insert records into table myown_patches_dependent
+               if (is_array($this->patch_info_array["dependent_patches"]))
+               {
+                       foreach ($this->patch_info_array["dependent_patches"] as $dependent_patch)
+                       {
+                               $this->myownPatchesDependentDAO->Create($this->current_patch_id, $dependent_patch);
+                       }
+               }
+               
+               // insert records into table myown_patches_files
+               if (is_array($this->patch_info_array["files"]))
+               {
+                       foreach ($this->patch_info_array["files"] as $file_info)
+                       {
+                               if ($file_info["upload_tmp_name"] <> "")
+                                       $upload_to = $this->saveFile($file_info);
+                               else
+                                       $upload_to = "";
+                               
+                               $this->myownPatchesFilesDAO->Create($this->current_patch_id, 
+                                       $file_info["action"], 
+                                       $file_info["file_name"], 
+                                       $file_info["directory"], 
+                                       $file_info["code_from"], 
+                                       $file_info["code_to"],
+                                       $upload_to);
+                       }
+               }
+       }
+
+       /**
+       * Save upload file into content folder
+       * @access  private
+       * @return  xml string
+       * @author  Cindy Qi Li
+       */
+       function saveFile($file_info) 
+       {
+               // mkdir() function cannot create folder recursively, so have to acomplish the creation of patch folder by 2 steps.
+               if (!file_exists($this->version_folder))        mkdir($this->version_folder);
+               if (!file_exists($this->patch_folder))  mkdir($this->patch_folder);
+               
+               $upload_to = $this->patch_folder . $file_info['file_name'];
+               
+               // copy uploaded file into content folder
+               copy($file_info["upload_tmp_name"], $upload_to);
+               
+               return realpath($upload_to);
+       }
+
+       /**
+       * Create patch.xml.
+       * @access  private
+       * @return  xml string
+       * @author  Cindy Qi Li
+       */
+       function createXML() 
+       {
+               global $patch_xml, $dependent_patch_xml;
+               global $patch_action_detail_xml, $patch_file_xml;
+               
+               // generate content of <dependent_patches> section
+               if (is_array($this->patch_info_array["dependent_patches"]))
+               {
+                       foreach ($this->patch_info_array["dependent_patches"] as $dependent_patch)
+                               $dependent_patches .= str_replace('{DEPENDENT_PATCH}', $dependent_patch, $dependent_patch_xml);
+               }
+               
+               // generate content of <files> section
+               if (is_array($this->patch_info_array["files"]))
+               {
+                       foreach ($this->patch_info_array["files"] as $file_info)
+                       {
+                               $action_details = "";
+                               
+                               if ($file_info["action"] == "alter")
+                               {
+                                       $action_details .= str_replace(array('{TYPE}', '{CODE_FROM}', '{CODE_TO}'), 
+                                                                         array('replace', 
+                                                                                               htmlspecialchars(stripslashes($file_info["code_from"]), ENT_QUOTES), 
+                                                                                               htmlspecialchars(stripslashes($file_info["code_to"]), ENT_QUOTES)),
+                                                                         $patch_action_detail_xml);
+                               }
+                               
+                               $xml_files .= str_replace(array('{ACTION}', '{NAME}', '{LOCATION}', '{ACTION_DETAILS}'), 
+                                                                         array($file_info["action"], $file_info["file_name"], $file_info["directory"], $action_details),
+                                                                         $patch_file_xml);
+                       }
+               }
+
+               // generate patch.xml
+               return str_replace(array('{system_patch_id}', 
+                                        '{APPLIED_VERSION}', 
+                                        '{DESCRIPTION}', 
+                                        '{SQL}', 
+                                        '{DEPENDENT_PATCHES}',
+                                        '{FILES}'), 
+                                                                array($this->patch_info_array["system_patch_id"], 
+                                                                      $this->patch_info_array["aframe_version_to_apply"], 
+                                                                      htmlspecialchars(stripslashes($this->htmlNewLine($this->patch_info_array["description"])), ENT_QUOTES), 
+                                                                      htmlspecialchars(stripslashes($this->patch_info_array["sql_statement"]), ENT_QUOTES), 
+                                                                      $dependent_patches,
+                                                                      $xml_files),
+                                                                $patch_xml);
+       }
+
+       /**
+       * Create xml for section <files> in patch.xml.
+       * @access  private
+       * @return  xml string
+       * @author  Cindy Qi Li
+       */
+       function createXMLFiles($file_info)
+       {
+               
+               $action_details = "";
+               
+               if ($file_info["action"] == "alter")
+               {
+                       $action_details .= str_replace(array('{TYPE}', '{CODE_FROM}', '{CODE_TO}'), 
+                                                         array('replace', 
+                                                                               htmlspecialchars(stripslashes($file_info["code_from"]), ENT_QUOTES), 
+                                                                               htmlspecialchars(stripslashes($file_info["code_to"]), ENT_QUOTES)),
+                                                         $patch_action_detail_xml);
+               }
+               
+               return str_replace(array('{ACTION}', '{NAME}', '{LOCATION}', '{ACTION_DETAILS}'), 
+                                                         array($file_info["action"], $file_info["file_name"], $file_info["directory"], $action_details),
+                                                         $patch_file_xml);
+       }
+       
+       /**
+       * Create zip file which contains patch.xml and the files to be added, overwritten, altered; and force to download
+       * @access  private
+       * @return  true   if successful
+       *          false  if errors
+       * @author  Cindy Qi Li
+       */
+       function createZIP() 
+       {
+               require_once(AF_INCLUDE_PATH . '/classes/zipfile.class.php');
+
+               $zipfile = new zipfile();
+       
+               $zipfile->add_file(file_get_contents($this->patch_xml_file), 'patch.xml');
+
+               if (is_array($this->patch_info_array["files"]))
+               {
+                       foreach ($this->patch_info_array["files"] as $file_info)
+                       {
+                               if ($file_info["upload_tmp_name"] <> '')
+                               {
+                                       $file_name = preg_replace('/.php$/', '.new', $file_info['file_name']);
+                                       $zipfile->add_file(file_get_contents($file_info['upload_tmp_name']), $file_name);
+                               }
+                       }
+               }
+
+               $zipfile->send_file($this->patch_info_array["system_patch_id"]);
+       }
+
+       /**
+       * replace new line string to html tag <br />
+       * @access  private
+       * @return  converted string
+       * @author  Cindy Qi Li
+       */
+       function htmlNewLine($str)
+       {
+               $new_line_array = array("\n", "\r", "\n\r", "\r\n");
+
+               $found_match = false;
+               
+               if (strlen(trim($str))==0) return "";
+               
+               foreach ($new_line_array as $new_line)
+                       if (preg_match('/'.preg_quote($new_line).'/', $str) > 0)
+                       {
+                               $search_new_line = $new_line;
+                               $found_match = true;
+                       }
+                
+               if ($found_match)
+                       return preg_replace('/'. preg_quote($search_new_line) .'/', "<br />", $str);
+               else
+                       return $str;
+       }
+}
+?>
\ No newline at end of file
diff --git a/docs/updater/classes/PatchListParser.class.php b/docs/updater/classes/PatchListParser.class.php
new file mode 100644 (file)
index 0000000..935daa8
--- /dev/null
@@ -0,0 +1,130 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* PatchListParser
+* Class for parsing XML patch list info
+* @access      public
+* @author      Cindy Qi Li
+* @package     Patch
+*/
+class PatchListParser {
+
+       // all private
+       var $parser; // the XML handler
+       var $patch_rows = array(); // the patch data
+       var $character_data; // tmp variable for storing the data
+       var $element_path; // array of element paths (basically a stack)
+       var $row_num;
+       var $dependent_patches_num;
+
+       function PatchListParser() {
+               $this->parser = xml_parser_create(''); 
+
+               xml_set_object($this->parser, $this);
+               xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false); /* conform to W3C specs */
+               xml_set_element_handler($this->parser, 'startElement', 'endElement');
+               xml_set_character_data_handler($this->parser, 'characterData');
+       }
+
+       // public
+       function parse($xml_data) {
+               $this->element_path   = array();
+               $this->patch_rows  = array();
+               $this->character_data = '';
+               $this->row_num        = 0;
+               xml_parse($this->parser, $xml_data, TRUE);
+       }
+
+       // private
+       function startElement($parser, $name, $attributes) 
+       {
+               array_push($this->element_path, $name);
+   }
+
+       // private
+       /* called when an element ends */
+       /* removed the current element from the $path */
+       function endElement($parser, $name) {
+               if ($this->element_path == array('patch_list', 'patch', 'system_patch_id')) 
+               {
+                       $this->patch_rows[$this->row_num]['system_patch_id'] = trim($this->character_data);
+               } 
+               else if ($this->element_path === array('patch_list', 'patch', 'applied_version')) 
+               {
+                       $this->patch_rows[$this->row_num]['applied_version'] = trim($this->character_data);
+               } 
+               else if ($this->element_path === array('patch_list', 'patch', 'patch_folder')) 
+               {
+                       $this->patch_rows[$this->row_num]['patch_folder'] = trim($this->character_data);
+               } 
+               else if ($this->element_path === array('patch_list', 'patch', 'description')) 
+               {
+                       $this->patch_rows[$this->row_num]['description'] = trim($this->character_data);
+               } 
+               else if ($this->element_path === array('patch_list', 'patch', 'available_to')) 
+               {
+                       $this->patch_rows[$this->row_num]['available_to'] = trim($this->character_data);
+               } 
+               else if ($this->element_path === array('patch_list', 'patch', 'author')) 
+               {
+                       $this->patch_rows[$this->row_num]['author'] = trim($this->character_data);
+               } 
+               else if ($this->element_path === array('patch_list', 'patch', 'dependent_patches', 'dependent_patch')) 
+               {
+                       $this->patch_rows[$this->row_num]['dependent_patches'][$this->dependent_patches_num++] = trim($this->character_data);
+               }
+               else if ($this->element_path === array('patch_list', 'patch')) 
+               {
+                       $this->row_num++;
+                       $this->dependent_patches_num = 0;
+               }
+
+               array_pop($this->element_path);
+               $this->character_data = '';
+       }
+
+       // private
+       function characterData($parser, $data){
+               $this->character_data .= $data;
+       }
+
+       // public
+       function getNumPathes() 
+       {
+               return count($this->patch_rows);
+       }
+
+       // public
+       function getParsedArray() 
+       {
+               return $this->patch_rows;
+       }
+
+       // public
+       // return parsed array only for given name & version
+       function getMyParsedArrayForVersion($version, $who='public') 
+       {
+               $my_array = array();
+
+               // filter out the patch for given version
+               foreach ($this->patch_rows as $key => $row) 
+               {
+           if ($row['applied_version'] == $version && $row['available_to']==$who)
+               array_push($my_array, $row);
+               }
+               
+               return $my_array;
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/docs/updater/classes/PatchParser.class.php b/docs/updater/classes/PatchParser.class.php
new file mode 100644 (file)
index 0000000..e20e5fd
--- /dev/null
@@ -0,0 +1,137 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+/**
+* PatchParser
+* Class for parsing XML patch info (patch.xml)
+* @access      public
+* @author      Cindy Qi Li
+* @package     Patch
+*/
+class PatchParser {
+
+       // all private
+       var $parser; // the XML handler
+       var $patch_row = array(); // the patch data
+       var $character_data; // tmp variable for storing the data
+       var $element_path; // array of element paths (basically a stack)
+       var $file_num;
+       var $action_detail_num;
+       var $dependent_patches_num;
+
+       function PatchParser() {
+               $this->parser = xml_parser_create(''); 
+
+               xml_set_object($this->parser, $this);
+               xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false); /* conform to W3C specs */
+               xml_set_element_handler($this->parser, 'startElement', 'endElement');
+               xml_set_character_data_handler($this->parser, 'characterData');
+       }
+
+       // public
+       function parse($xml_data) {
+               $this->element_path   = array();
+               $this->patch_row  = array();
+               $this->character_data = '';
+               $this->file_num = 0;
+               $this->action_detail_num = 0;
+               $this->dependent_patches_num = 0;
+               
+               xml_parse($this->parser, $xml_data, TRUE);
+       }
+
+       // private
+       function startElement($parser, $name, $attributes) 
+       {
+               array_push($this->element_path, $name);
+  }
+
+       // private
+       /* called when an element ends */
+       /* removed the current element from the $path */
+       function endElement($parser, $name)
+       {
+               if ($this->element_path == array('patch', 'system_patch_id')) 
+               {
+                       $this->patch_row['system_patch_id'] = trim($this->character_data);
+               }
+               if ($this->element_path == array('patch', 'applied_version')) 
+               {
+                       $this->patch_row['applied_version'] = trim($this->character_data);
+               }
+               if ($this->element_path == array('patch', 'sequence')) 
+               {
+                       $this->patch_row['sequence'] = trim($this->character_data);
+               }
+               if ($this->element_path == array('patch', 'description')) 
+               {
+                       $this->patch_row['description'] = trim($this->character_data);
+               }
+               if ($this->element_path === array('patch', 'dependent_patches', 'dependent_patch')) 
+               {
+                       $this->patch_row['dependent_patches'][$this->dependent_patches_num++] = trim($this->character_data);
+               }
+               if ($this->element_path == array('patch', 'sql')) 
+               {
+                       $this->patch_row['sql'] = trim($this->character_data);
+               }
+               else if ($this->element_path === array('patch', 'files', 'file', 'action')) 
+               {
+                       $this->patch_row['files'][$this->file_num]['action'] = trim($this->character_data);
+               } 
+               else if ($this->element_path === array('patch', 'files', 'file', 'name')) 
+               {
+                       $this->patch_row['files'][$this->file_num]['name'] = trim($this->character_data);
+               } 
+               else if ($this->element_path === array('patch', 'files', 'file', 'location')) 
+               {
+                       $this->patch_row['files'][$this->file_num]['location'] = trim($this->character_data);
+               } 
+               else if ($this->element_path === array('patch', 'files', 'file', 'action_detail', 'type')) 
+               {
+                       $this->patch_row['files'][$this->file_num]['action_detail'][$this->action_detail_num]['type'] = trim($this->character_data);
+               } 
+               else if ($this->element_path === array('patch', 'files', 'file', 'action_detail', 'code_from')) 
+               {
+                       $this->patch_row['files'][$this->file_num]['action_detail'][$this->action_detail_num]['code_from'] = trim($this->character_data);
+               } 
+               else if ($this->element_path === array('patch', 'files', 'file', 'action_detail', 'code_to')) 
+               {
+                       $this->patch_row['files'][$this->file_num]['action_detail'][$this->action_detail_num]['code_to'] = trim($this->character_data);
+               } 
+               else if ($this->element_path === array('patch', 'files', 'file')) 
+               {
+                       $this->file_num++;
+               }
+               else if ($this->element_path === array('patch', 'files', 'file', 'action_detail')) 
+               {
+                       $this->action_detail_num++;
+               }
+
+               array_pop($this->element_path);
+               $this->character_data = '';
+       }
+
+       // private
+  function characterData($parser, $data)
+  {
+               $this->character_data .= $data;
+       }
+
+       // public
+       function getParsedArray() 
+       {
+               return $this->patch_row;
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/docs/updater/include/common.inc.php b/docs/updater/include/common.inc.php
new file mode 100644 (file)
index 0000000..30ec239
--- /dev/null
@@ -0,0 +1,75 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+function print_errors( $errors, $notes='' ) {\r
+       ?>\r
+       <div class="input-form">\r
+       <table style="align:center; padding: 3px; background-color: #F8F8F8; border: 0">\r
+       <tr>\r
+               <td>\r
+               <h3><img src="images/bad.gif" align="top" alt="" class="img" /> Warning</h3>\r
+               <?php\r
+                       echo '<ul>';\r
+                       foreach ($errors as $p) {\r
+                               echo '<li>'.$p.'</li>';\r
+                       }\r
+                       echo '</ul>';\r
+               ?>\r
+               </td>\r
+       </tr>\r
+       <tr>\r
+               <td>\r
+               <?php echo $notes; ?>\r
+               </td>\r
+       </tr>\r
+       </table>\r
+       </div>\r
+<?php\r
+}\r
+\r
+function print_feedback( $feedback, $notes='' ) {\r
+?>\r
+       <div class="input-form">\r
+       <table style="align:center; padding: 3px; background-color: #F8F8F8; border: 0">\r
+       <tr>\r
+       <td><h3><img src="images/feedback.gif" align="top" alt="" class="img" /> <?php echo _AT('AF_FEEDBACK_UPDATE_INSTALLED_SUCCESSFULLY')?></h3>\r
+               <?php\r
+                       echo '<ul>';\r
+                       foreach ($feedback as $p) {\r
+                               echo '<li>'.$p.'</li>';\r
+                       }\r
+                       echo '</ul>';\r
+               ?></td>\r
+       </tr>\r
+       <tr>\r
+               <td>\r
+               <?php echo $notes; ?>\r
+               </td>\r
+       </tr>\r
+       </table>\r
+       </div>\r
+<?php\r
+}\r
+\r
+/**\r
+ * Check if the patch has been installed\r
+ */\r
+function is_patch_installed($patch_id)\r
+{\r
+       $patchesDAO = new PatchesDAO();\r
+       $rows = $patchesDAO->getInstalledPatchByIDAndVersion($patch_id, VERSION);\r
+\r
+       if (is_array($rows)) return true;\r
+       else return false;\r
+}\r
+\r
+?>\r
diff --git a/docs/updater/include/json.inc.php b/docs/updater/include/json.inc.php
new file mode 100644 (file)
index 0000000..9800d9a
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+// my simple JSON encode/decode function, similar to PHP5.2 
+function json_encode_result($phpdata) {
+       if (!$phpdata) return "[]";
+       
+       if(is_array($phpdata)) 
+               return php2js_array($phpdata);
+       else
+               return php2js_object($phpdata);
+}
+
+
+//function json_decode($jsonata) {
+//     return $phpdata;
+//}
+
+
+// convert a PHP object to javascript object
+function php2js_object($phpobj) {
+       $str = ""; 
+       
+       if (!is_array($phpobj)) return "[]";
+       
+       foreach($phpobj as $col => $val) {
+         if($str == "")
+           $str = $col .":'" . escapeString($val) . "'";
+         else
+           $str = $str . "," . $col .":'" . escapeString($val) . "'";
+       }
+       
+       return "{" . $str . "}";
+}
+
+// convert a PHP object to javascript object
+function php2js_array($phparr) {
+       $str = "";
+
+  if (!is_array($phparr)) return "[]";
+
+       foreach ($phparr as $e) {
+         if($str == "") 
+                       $str = php2js_object($e) ;
+         else
+           $str = $str . "," . php2js_object($e);
+       }
+       
+       return "[" . $str . "]";
+}
+
+function escapeString($string) {
+    $escape = array(
+    "\r\n" => '\n',
+    "\r"   => '\n',
+    "\n"   => '\n',
+    "/"    => '\/'
+    );
+
+    return str_replace(array_keys($escape), array_values($escape), addslashes($string));
+}      
+
+?>
\ No newline at end of file
diff --git a/docs/updater/include/patch_xml_template.inc.php b/docs/updater/include/patch_xml_template.inc.php
new file mode 100644 (file)
index 0000000..54ccc79
--- /dev/null
@@ -0,0 +1,54 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+$patch_xml =\r
+'<?xml version="1.0" encoding="ISO-8859-1"?> \r
+<patch>\r
+       <system_patch_id>{system_patch_id}</system_patch_id>\r
+       <applied_version>{APPLIED_VERSION}</applied_version>\r
+       <description>{DESCRIPTION}</description>\r
+       <dependent_patches>\r
+{DEPENDENT_PATCHES}\r
+       </dependent_patches>\r
+\r
+       <sql>\r
+{SQL}\r
+       </sql>\r
+\r
+       <files>\r
+{FILES}\r
+       </files>\r
+</patch>';\r
+\r
+$dependent_patch_xml = \r
+'              <dependent_patch>{DEPENDENT_PATCH}</dependent_patch>\r
+';     \r
+\r
+$patch_file_xml = \r
+'              <file>\r
+                       <action>{ACTION}</action>\r
+                       <name>{NAME}</name>\r
+                       <location>{LOCATION}</location>\r
+{ACTION_DETAILS}\r
+               </file>\r
+\r
+';     \r
+\r
+$patch_action_detail_xml = \r
+'                      <action_detail>\r
+                               <type>{TYPE}</type>\r
+                               <code_from>{CODE_FROM}</code_from>\r
+                               <code_to>{CODE_TO}</code_to>\r
+                       </action_detail>\r
+\r
+';\r
+?>\r
diff --git a/docs/updater/index.php b/docs/updater/index.php
new file mode 100644 (file)
index 0000000..ebc81d3
--- /dev/null
@@ -0,0 +1,325 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+\r
+require (AF_INCLUDE_PATH.'vitals.inc.php');\r
+require_once('classes/PatchListParser.class.php');\r
+require_once(AF_INCLUDE_PATH. 'classes/Utility.class.php');\r
+require_once(AF_INCLUDE_PATH. 'classes/DAO/PatchesDAO.class.php');\r
+require_once('include/common.inc.php');\r
+\r
+set_time_limit(0);\r
+\r
+$patchesDAO = new PatchesDAO();\r
+\r
+/**\r
+ * Generate html of each patch row at main patch page\r
+ */\r
+function print_patch_row($patch_row, $row_id, $enable_radiotton)\r
+{\r
+       global $id, $patch_id;   // current selected patch\r
+       global $dependent_patches;\r
+\r
+       if ($dependent_patches =="")\r
+               $description = $patch_row["description"];\r
+       else\r
+               $description = $patch_row["description"] . _AT('update_dependent_update_not_installed') . "<span style='color: red'>" . $dependent_patches . "</span>";\r
+?>\r
+       <tr <?php if ($enable_radiotton) echo 'onkeydown="document.form[\'m'. $row_id.'\'].checked = true; rowselect(this);" onmousedown="document.form[\'m'. $row_id.'\'].checked = true; rowselect(this);" id="r_'. $row_id .'"'; ?>>\r
+               <td><input type="radio" name="id" value="<?php echo $row_id; ?>" id="m_<?php echo $patch_row["system_patch_id"]; ?>" <?php if (!$enable_radiotton) echo 'disabled="disabled" '; if (strcmp($row_id, $id) == 0 || strcmp($row_id, $patch_id) == 0) echo "checked "?> /></td>\r
+               <td><label for="m_<?php echo $patch_row["system_patch_id"]; ?>"><?php echo $patch_row["system_patch_id"]; ?></label></td>\r
+               <td><?php echo $description; ?></td>\r
+               <td><?php if (!isset($patch_row['status'])) echo _AT("not_installed"); else echo $patch_row["status"]; ?></td>\r
+               <td><?php echo $patch_row["available_to"]; ?></td>\r
+               <td><?php echo $patch_row["author"]; ?></td>\r
+               <td><?php if (isset($patch_row['status'])) echo ($patch_row["installed_date"]=='0000-00-00 00:00:00')?_AT('na'):$patch_row["installed_date"]; ?></td>\r
+               <td>\r
+               <?php \r
+               if (preg_match('/Installed/', $patch_row["status"]) > 0 && ($patch_row["remove_permission_files"]<> "" || $patch_row["backup_files"]<>"" || $patch_row["patch_files"]<> ""))\r
+                       echo '\r
+                 <div class="row buttons">\r
+                               <input type="button" align="middle" name="info" value="'._AT('view_message').'" onclick="location.href=\''. $_SERVER['PHP_SELF'] .'?patch_id='.$row_id.'\'" />\r
+                       </div>';\r
+               ?>\r
+               </td>\r
+       </tr>\r
+<?php\r
+}\r
+\r
+// split a string by given delimiter and return an array\r
+function get_array_by_delimiter($subject, $delimiter)\r
+{\r
+       return preg_split('/'.preg_quote($delimiter).'/', $subject, -1, PREG_SPLIT_NO_EMPTY);\r
+}\r
+\r
+$skipFilesModified = false;\r
+\r
+if ($_POST['yes'])  $skipFilesModified = true;\r
+\r
+if ($_POST['no'])\r
+{\r
+       unset($_SESSION['remove_permission']);\r
+       $msg->addFeedback('CANCELLED');\r
+       header('Location: index.php');\r
+       exit;\r
+}\r
+\r
+require (AF_INCLUDE_PATH.'header.inc.php');\r
+\r
+if (trim($_POST['who']) != '') $who = trim($_POST['who']);\r
+elseif (trim($_REQUEST['who']) != '') $who = trim($_REQUEST['who']);\r
+else $who = "public";\r
+\r
+// check the connection to server update.atutor.ca\r
+$connection_test_file = UPDATE_SERVER . '/index.php';\r
+$connection = @file_get_contents($connection_test_file);\r
+\r
+if (!$connection) \r
+{\r
+       $infos = array('CANNOT_CONNECT_PATCH_SERVER', UPDATE_SERVER);\r
+       $msg->addInfo($infos);\r
+       $server_connected = false;\r
+}\r
+else\r
+       $server_connected = true;\r
+\r
+// get patch list if successfully connect to patch server\r
+if ($server_connected)\r
+{\r
+       $patch_folder = UPDATE_SERVER . '/patch/' . str_replace('.', '_', VERSION) . '/';\r
+       $patch_list_xml = @file_get_contents($patch_folder . 'patch_list.xml');\r
+       \r
+       if ($patch_list_xml) \r
+       {\r
+               $patchListParser = new PatchListParser();\r
+               $patchListParser->parse($patch_list_xml);\r
+               $patch_list_array = $patchListParser->getMyParsedArrayForVersion(VERSION);\r
+       }\r
+}\r
+// end of get patch list\r
+\r
+$module_content_folder = AF_TEMP_DIR . "updater/temp";\r
+if (!is_dir($module_content_folder)) mkdir($module_content_folder);\r
+\r
+if ($_POST['install_upload'] && $_POST['uploading'])\r
+{\r
+       include_once(AF_INCLUDE_PATH . 'lib/pclzip.lib.php');\r
+       \r
+       // clean up module content folder\r
+       Utility::clearDir($module_content_folder);\r
+       \r
+       // 1. unzip uploaded file to module's content directory\r
+       $archive = new PclZip($_FILES['patchfile']['tmp_name']);\r
+\r
+       if ($archive->extract(PCLZIP_OPT_PATH, $module_content_folder) == 0)\r
+       {\r
+           Utility::clearDir($module_content_folder);\r
+           $msg->addError('CANNOT_UNZIP');\r
+       }\r
+}\r
+\r
+// Installation process\r
+if ($_POST['install'] || $_POST['install_upload'] && !isset($_POST["not_ignore_version"]))\r
+{\r
+       \r
+       if (isset($_POST['id'])) $id=$_POST['id'];\r
+       else $id = $_REQUEST['id'];\r
+\r
+       if ($_POST['install'] && $id == "")\r
+       {\r
+               $msg->addError('CHOOSE_UNINSTALLED_PATCH');\r
+       }\r
+       else\r
+       {\r
+               if ($_POST['install'])\r
+               {\r
+                       $patchURL = $patch_folder . $patch_list_array[$id][patch_folder] . "/";\r
+               }\r
+               else if ($_POST['install_upload'])\r
+               {\r
+                       $patchURL = $module_content_folder . "/";\r
+               }\r
+                       \r
+               $patch_xml = @file_get_contents($patchURL . 'patch.xml');\r
+               \r
+               if ($patch_xml === FALSE) \r
+               {\r
+                       $msg->addError('PATCH_XML_NOT_FOUND');\r
+               }\r
+               else\r
+               {\r
+                       require_once('classes/PatchParser.class.php');\r
+                       require_once('classes/Patch.class.php');\r
+                       \r
+                       $patchParser = new PatchParser();\r
+                       $patchParser->parse($patch_xml);\r
+                       \r
+                       $patch_array = $patchParser->getParsedArray();\r
+\r
+                       if ($_POST["ignore_version"]) $patch_array["applied_version"] = VERSION;\r
+                       \r
+                       if ($_POST["install_upload"])\r
+                       {\r
+                               $current_patch_list = array('system_patch_id' => $patch_array['system_patch_id'],\r
+                                                                                                                                               'applied_version' => $patch_array['applied_version'],\r
+                                                                                                                                               'patch_folder' => $patchURL,\r
+                                                                                                                                               'available_to' => 'private',\r
+                                                                                                                                               'author' => $patch_array['author'],\r
+                                                                                                                                               'sql' => $patch_array['sql'],\r
+                                                                                                                                               'description' => $patch_array['description'],\r
+                                                                                                                                               'dependent_patches' => $patch_array['dependent_patches']);\r
+                       }\r
+\r
+                       if ($_POST["install"])\r
+                       {\r
+                               $current_patch_list = $patch_list_array[$id];\r
+                               $current_patch_list["sql"] = $patch_array["sql"];\r
+                       }\r
+\r
+                       if ($_POST["install_upload"] && is_patch_installed($patch_array["system_patch_id"]))\r
+                               $msg->addError('UPDATE_ALREADY_INSTALLED');\r
+                       else\r
+                       {\r
+                               $patch = new Patch($patch_array, $current_patch_list, $skipFilesModified, $patchURL);\r
+                       \r
+                               if ($patch->applyPatch())  $patch_id = $patch->getPatchID();\r
+                       }\r
+               }\r
+       }\r
+}\r
+// end of patch installation\r
+\r
+// display permission and backup files message\r
+if (isSet($_REQUEST['patch_id']))  $patch_id = $_REQUEST['patch_id'];\r
+elseif ($_POST['patch_id']) $patch_id=$_POST['patch_id'];\r
+\r
+if ($patch_id > 0)\r
+{\r
+       // clicking on button "Done" at displaying remove permission info page\r
+       if ($_POST['done'])\r
+       {\r
+               $permission_files = array();\r
+               \r
+               if (is_array($_SESSION['remove_permission']))\r
+               {\r
+                       foreach ($_SESSION['remove_permission'] as $file)\r
+                       {\r
+                               if (is_writable($file))  $permission_files[] = $file;\r
+                       }\r
+               }\r
+               \r
+               if (count($permission_files) == 0)\r
+               {\r
+                       $updateInfo = array("remove_permission_files"=>"", "status"=>"Installed");\r
+               \r
+                       $patchesDAO->UpdateByArray($patch_id, $updateInfo);\r
+               }\r
+               else\r
+               {\r
+                       foreach($permission_files as $permission_file)\r
+                               $remove_permission_files .= $permission_file. '|';\r
+               \r
+                       $updateInfo = array("remove_permission_files"=>preg_quote($remove_permission_files), "status"=>"Partly Installed");\r
+                       \r
+                       $patchesDAO->UpdateByArray($patch_id, $updateInfo);\r
+               }\r
+       \r
+       }\r
+       \r
+       // display remove permission info\r
+       unset($_SESSION['remove_permission']);\r
+\r
+       $row = $patchesDAO->getByID($patch_id);\r
+       \r
+       if ($row["remove_permission_files"]<> "")\r
+       {\r
+               $remove_permission_files = $_SESSION['remove_permission'] = get_array_by_delimiter($row["remove_permission_files"], "|");\r
+\r
+               if (count($_SESSION['remove_permission']) > 0)\r
+               {\r
+                       if ($_POST['done']) $msg->printErrors('REMOVE_WRITE_PERMISSION');\r
+                       else $msg->printInfos('PATCH_INSTALLED_AND_REMOVE_PERMISSION');\r
+                       \r
+                       $feedbacks[] = _AT('remove_write_permission');\r
+                       \r
+                       foreach($remove_permission_files as $remove_permission_file)\r
+                               if ($remove_permission_file <> "") $feedbacks[count($feedbacks)-1] .= "<strong>" . $remove_permission_file . "</strong><br />";\r
+\r
+                       $notes = '<form action="'. $_SERVER['PHP_SELF'].'?patch_id='.$patch_id.'" method="post" name="remove_permission">\r
+                 <div class="row buttons">\r
+                               <input type="hidden" name="patch_id" value="'.$patch_id.'" />\r
+                               <input type="submit" name="done" value="'._AT('done').'" accesskey="d" />\r
+                       </div>\r
+                       </form>';\r
+               }\r
+\r
+               print_errors($feedbacks, $notes);\r
+       }\r
+\r
+       // display backup file info after remove permission step\r
+       if ($row["remove_permission_files"] == "")\r
+       {\r
+               $msg->printFeedbacks('PATCH_INSTALLED_SUCCESSFULLY');\r
+               \r
+               if ($row["backup_files"]<> "")\r
+               {\r
+                       $backup_files = get_array_by_delimiter($row["backup_files"], "|");\r
+       \r
+                       if (count($backup_files) > 0)\r
+                       {\r
+                               $feedbacks[] = _AT('updater_show_backup_files');\r
+                               \r
+                               foreach($backup_files as $backup_file)\r
+                                       if ($backup_file <> "") $feedbacks[count($feedbacks)-1] .= "<strong>" . $backup_file . "</strong><br />";\r
+                       }\r
+               }\r
+\r
+               if ($row["patch_files"]<> "")\r
+               {\r
+                       $patch_files = get_array_by_delimiter($row["patch_files"], "|");\r
+       \r
+                       if (count($patch_files) > 0)\r
+                       {\r
+                               $feedbacks[] = _AT('updater_show_patch_files');\r
+                               \r
+                               foreach($patch_files as $patch_file)\r
+                                       if ($patch_file <> "") $feedbacks[count($feedbacks)-1] .= "<strong>" . $patch_file . "</strong><br />";\r
+                                       \r
+                       }\r
+               }\r
+               \r
+               if (count($feedbacks)> 0)\r
+                       print_feedback($feedbacks);\r
+               else\r
+                       print_feedback(array());\r
+       }\r
+}\r
+\r
+$msg->printAll();\r
+\r
+// display installed patches\r
+$rows = $patchesDAO->getPatchByVersion(VERSION);\r
+\r
+if (is_array($rows)) $num_of_patches_in_db = count($rows);\r
+else $num_of_patches_in_db = 0;\r
+\r
+$num_of_patches = $num_of_patches_in_db + count($patch_list_array);\r
+\r
+$savant->assign('num_of_patches', $num_of_patches);\r
+$savant->assign('patches_in_db', $rows);\r
+$savant->assign('patch_list_array', $patch_list_array);\r
+$savant->assign('patches_in_db', $rows);\r
+$savant->assign('patches_in_db', $rows);\r
+\r
+$savant->display('updater/index.tmpl.php');\r
+?>\r
diff --git a/docs/updater/myown_patches.php b/docs/updater/myown_patches.php
new file mode 100644 (file)
index 0000000..853d12e
--- /dev/null
@@ -0,0 +1,38 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+\r
+require (AF_INCLUDE_PATH.'vitals.inc.php');\r
+require_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');\r
+\r
+if (isset($_POST['remove'], $_POST['myown_patch_id'])) \r
+{\r
+       header('Location: patch_delete.php?myown_patch_id='.$_POST['myown_patch_id']);\r
+       exit;\r
+} \r
+else if (isset($_POST['edit'], $_POST['myown_patch_id'])) \r
+{\r
+       header('Location: patch_edit.php?myown_patch_id='.$_POST['myown_patch_id']);\r
+       exit;\r
+} \r
+else if (!empty($_POST) && !isset($_POST['myown_patch_id'])) {\r
+       $msg->addError('NO_ITEM_SELECTED');\r
+}\r
+\r
+$myownPatchesDAO = new MyownPatchesDAO();\r
+$patch_rows = $myownPatchesDAO->getAll();\r
+\r
+$savant->assign('patch_rows', $patch_rows);\r
+\r
+$savant->display('updater/myown_patches.tmpl.php');\r
+?>\r
diff --git a/docs/updater/myown_patches_inline_editor_submit.php b/docs/updater/myown_patches_inline_editor_submit.php
new file mode 100644 (file)
index 0000000..f5cbf81
--- /dev/null
@@ -0,0 +1,37 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');\r
+\r
+if (isset($_POST['field']))\r
+{\r
+       $myownPatchesDAO = new MyownPatchesDAO();\r
+       \r
+       // Format of $_POST['field']: [fieldName]|[user_id]\r
+       $pieces = explode('-', $_POST['field']);\r
+       $status = $myownPatchesDAO->UpdateField($pieces[1], $pieces[0], $_POST['value']);\r
+       \r
+       if (is_array($status))\r
+       {\r
+               $rtn['status'] = 'fail';\r
+               foreach ($status as $err)\r
+                       $rtn['error'][] = $err;\r
+       }\r
+       else\r
+       {\r
+               $rtn['status'] = 'success';\r
+       }\r
+       echo json_encode($rtn);\r
+}\r
+?>\r
diff --git a/docs/updater/patch_create.php b/docs/updater/patch_create.php
new file mode 100644 (file)
index 0000000..7393b08
--- /dev/null
@@ -0,0 +1,20 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+require (AF_INCLUDE_PATH.'vitals.inc.php');\r
+\r
+// URL called by form action\r
+$savant->assign('url', dirname($_SERVER['PHP_SELF']) . "/patch_creator.php");\r
+\r
+$savant->display('updater/patch_create_edit.tmpl.php');\r
+?>\r
diff --git a/docs/updater/patch_creator.php b/docs/updater/patch_creator.php
new file mode 100644 (file)
index 0000000..ca25851
--- /dev/null
@@ -0,0 +1,128 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+require_once (AF_INCLUDE_PATH.'vitals.inc.php');\r
+\r
+if ($_POST['create'] || $_POST['save'])\r
+{\r
+       if (isset($_REQUEST["myown_patch_id"])) $patch_id = $_REQUEST["myown_patch_id"];\r
+       else $patch_id = 0;\r
+       \r
+       // check missing fields\r
+       if (!isset($_POST["system_patch_id"]) || trim($_POST["system_patch_id"]) == "")\r
+               $missing_fields[] = _AT("system_update_id");\r
+\r
+       if (!isset($_POST["aframe_version_to_apply"]) || trim($_POST["aframe_version_to_apply"]) == "")\r
+               $missing_fields[] = _AT("aframe_version_to_apply");\r
+\r
+       // only check missing upload file when creating a update. don't check when save\r
+       if (is_array($_POST['rb_action']) && $_POST['create'])\r
+       {\r
+               foreach ($_POST['rb_action'] as $i=>$action)\r
+               {\r
+                       // must upload a file if action is add or overwrite\r
+                       if ($action == "add" && $_FILES['add_upload_file']['name'][$i] == "" && $_POST['add_uploaded_file'] == "")\r
+                               $missing_fields[] = _AT("upload_file") . " for ". _AT("file_name") . " <strong>" . $_POST['add_filename'][$i] . "</strong>";\r
+       \r
+                       if ($action == "overwrite" && $_FILES['overwrite_upload_file']['name'][$i] == "" && $_POST['overwrite_uploaded_file'] == "")\r
+                               $missing_fields[] = _AT("upload_file") . " for ". _AT("file_name") . " <strong>" . $_POST['overwrite_filename'][$i] . "</strong>";\r
+               }\r
+       }\r
+       // end of checking missing fields\r
+\r
+       if ($missing_fields) \r
+       {\r
+               $missing_fields = implode(', ', $missing_fields);\r
+               $msg->addError(array('EMPTY_FIELDS', $missing_fields));\r
+       }\r
+\r
+       // main process\r
+       if (!$msg->containsErrors()) \r
+       {\r
+               $patch_info = array("system_patch_id"=>$_POST["system_patch_id"],\r
+                             "aframe_version_to_apply"=>$_POST["aframe_version_to_apply"],\r
+                             "description"=>$_POST["description"],\r
+                             "sql_statement"=>$_POST["sql_statement"]);\r
+\r
+               // remove empty dependent patches\r
+               if (is_array($_POST["dependent_patch"]))\r
+               {\r
+                       foreach ($_POST["dependent_patch"] as $dependent_patch)\r
+                               if (trim($dependent_patch) <> "")\r
+                                       $dependent_patches[] = $dependent_patch;\r
+               }\r
+               \r
+               if (is_array($dependent_patches))\r
+                       $patch_info["dependent_patches"] = $dependent_patches;\r
+                       \r
+               if (is_array($_POST['rb_action']))\r
+               {\r
+                       foreach ($_POST['rb_action'] as $i=>$action)\r
+                       {\r
+                               if ($action == "add" && $_POST['add_filename'][$i] <> "")\r
+                               {\r
+                                       if ($_FILES['add_upload_file']['tmp_name'][$i] <> "")\r
+                                               $upload_file = $_FILES['add_upload_file']['tmp_name'][$i];\r
+                                       else\r
+                                               $upload_file = $_POST['add_uploaded_file'][$i];\r
+                                       \r
+                                       $patch_info["files"][] = array("action"=>$action,\r
+                                                                    "file_name"=>$_POST['add_filename'][$i],\r
+                                                              "directory"=>$_POST['add_dir'][$i],\r
+                                                              "upload_tmp_name"=>$upload_file);\r
+                               }\r
+                               \r
+                               if ($action == "alter" && $_POST['alter_filename'][$i] <> "")\r
+                                       $patch_info["files"][] = array("action"=>$action,\r
+                                                                                      "file_name"=>$_POST['alter_filename'][$i],\r
+                                                              "directory"=>$_POST['alter_dir'][$i],\r
+                                                              "code_from"=>$_POST['alter_code_from'][$i],\r
+                                                              "code_to"=>$_POST['alter_code_to'][$i]);\r
+       \r
+                               if ($action == "delete" && $_POST['delete_filename'][$i] <> "")\r
+                                       $patch_info["files"][] = array("action"=>$action,\r
+                                                                    "file_name"=>$_POST['delete_filename'][$i],\r
+                                                              "directory"=>$_POST['delete_dir'][$i]);\r
+       \r
+                               if ($action == "overwrite" && $_POST['overwrite_filename'][$i] <> "")\r
+                               {\r
+                                       if ($_FILES['overwrite_upload_file']['tmp_name'][$i] <> "")\r
+                                               $upload_file = $_FILES['overwrite_upload_file']['tmp_name'][$i];\r
+                                       else\r
+                                               $upload_file = $_POST['overwrite_uploaded_file'][$i];\r
+                                       \r
+                                       $patch_info["files"][] = array("action"=>$action,\r
+                                                                    "file_name"=>$_POST['overwrite_filename'][$i],\r
+                                                              "directory"=>$_POST['overwrite_dir'][$i],\r
+                                                              "upload_tmp_name"=>$upload_file);\r
+                               }\r
+                       }\r
+               }\r
+\r
+               require_once("classes/PatchCreator.class.php");\r
+               \r
+               $patch_creator = new PatchCreator($patch_info, $patch_id);\r
+               \r
+               if ($_POST['create'])\r
+                       $patch_creator->create_patch();\r
+               else if ($_POST['save'])\r
+               {\r
+                       $patch_creator->saveInfo();\r
+                       header('Location: myown_patches.php');\r
+               }\r
+\r
+       }\r
+}\r
+\r
+$msg->printErrors();\r
+?>\r
diff --git a/docs/updater/patch_delete.php b/docs/updater/patch_delete.php
new file mode 100644 (file)
index 0000000..c659363
--- /dev/null
@@ -0,0 +1,61 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+require(AF_INCLUDE_PATH.'vitals.inc.php');\r
+require_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');\r
+require_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesDependentDAO.class.php');\r
+require_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesFilesDAO.class.php');\r
+\r
+$myownPatchesDAO = new MyownPatchesDAO();\r
+\r
+if (isset($_POST['submit_no'])) {\r
+       $msg->addFeedback('CANCELLED');\r
+       header('Location: myown_patches.php');\r
+       exit;\r
+} else if (isset($_POST['submit_yes'])) {\r
+       /* delete has been confirmed, delete this category */\r
+       $myown_patch_id = intval($_POST['myown_patch_id']);\r
+\r
+       $myownPatchesDependentDAO = new MyownPatchesDependentDAO();\r
+       $myownPatchesFilesDAO = new MyownPatchesFilesDAO();\r
+       \r
+       $myownPatchesDAO->Delete($myown_patch_id);\r
+       $myownPatchesDependentDAO->DeleteByPatchID($myown_patch_id);\r
+       $myownPatchesFilesDAO->DeleteByPatchID($myown_patch_id);\r
+\r
+       $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');\r
+       header('Location: myown_patches.php');\r
+       exit;\r
+}\r
+\r
+//require('../../include/header.inc.php');\r
+require(AF_INCLUDE_PATH.'header.inc.php');\r
+\r
+$_GET['myown_patch_id'] = intval($_GET['myown_patch_id']); \r
+$row = $myownPatchesDAO->getByID($_GET[myown_patch_id]);\r
+\r
+if (!$row) {\r
+       $msg->printErrors('ITEM_NOT_FOUND');\r
+} else {\r
+       $hidden_vars['system_patch_id']= $row['system_patch_id'];\r
+       $hidden_vars['myown_patch_id']  = $row['myown_patch_id'];\r
+\r
+       $confirm = array('DELETE_MYOWN_UPDATE', $row['system_patch_id']);\r
+       $msg->addConfirm($confirm, $hidden_vars);\r
+       \r
+       $msg->printConfirm();\r
+}\r
+\r
+require(AF_INCLUDE_PATH.'footer.inc.php');\r
+\r
+?>
\ No newline at end of file
diff --git a/docs/updater/patch_edit.php b/docs/updater/patch_edit.php
new file mode 100644 (file)
index 0000000..a29a5f0
--- /dev/null
@@ -0,0 +1,39 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+require(AF_INCLUDE_PATH.'vitals.inc.php');\r
+require_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesDAO.class.php');\r
+require_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesDependentDAO.class.php');\r
+require_once(AF_INCLUDE_PATH.'classes/DAO/MyownPatchesFilesDAO.class.php');\r
\r
+if (!isset($_REQUEST["myown_patch_id"]))\r
+{\r
+       $msg->addError('NO_ITEM_SELECTED');\r
+       exit;\r
+}\r
+\r
+$myown_patch_id = $_REQUEST["myown_patch_id"];\r
+\r
+$myownPatchesDAO = new MyownPatchesDAO();\r
+$myownPatchesDependentDAO = new MyownPatchesDependentDAO();\r
+$myownPatchesFilesDAO = new MyownPatchesFilesDAO();\r
+\r
+// URL called by form action\r
+$savant->assign('url', dirname($_SERVER['PHP_SELF']) . "/patch_creator.php?myown_patch_id=" . $myown_patch_id);\r
+\r
+$savant->assign('patch_row', $myownPatchesDAO->getByID($myown_patch_id));\r
+$savant->assign('dependent_rows', $myownPatchesDependentDAO->getByPatchID($myown_patch_id));\r
+$savant->assign('file_rows', $myownPatchesFilesDAO->getByPatchID($myown_patch_id));\r
+\r
+$savant->display('updater/patch_create_edit.tmpl.php');\r
+?>\r
diff --git a/docs/updater/sample_patch.xml b/docs/updater/sample_patch.xml
new file mode 100644 (file)
index 0000000..2be52d0
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?> \r
+<patch>\r
+       <atutor_patch_id>00001</atutor_patch_id>\r
+       <applied_version>1.6</applied_version>\r
+       <author>&lt;a href=&quot;http://atutor.ca&quot;&gt;ATutor&lt;/a&gt;</author>\r
+       <description>Sample patch XML</description>\r
+       <dependent_patches>\r
+               <dependent_patch>00002</dependent_patch>\r
+               <dependent_patch>00003</dependent_patch>\r
+       </dependent_patches>\r
+       \r
+       <sql>\r
+               ALTER TABLE `tests` ADD `description` TEXT NOT NULL AFTER `title`;\r
+       </sql>\r
+\r
+       <files>\r
+               <file>\r
+                       <action>alter</action>\r
+                       <name>create_test.php</name>\r
+                       <location>tools/tests/</location>\r
+                       <action_detail>\r
+                               <type>delete</type>\r
+                               <code_from></code_from>\r
+                       </action_detail>\r
+                               \r
+                       <action_detail>\r
+                               <type>replace</type>\r
+                               <code_from></code_from>\r
+                               <code_to></code_to>\r
+                       </action_detail>\r
+               </file>\r
+       \r
+               <file>\r
+                       <action>add</action>\r
+                       <name>calendar.gif</name>\r
+                       <location>docs/images/</location>\r
+               </file>\r
+\r
+               <file>\r
+                       <action>delete</action>\r
+                       <name>results_all_csv.php</name>\r
+                       <location>tools/tests/</location>\r
+               </file>\r
+\r
+               <file>\r
+                       <action>overwrite</action>\r
+                       <name>results_all.php</name>\r
+                       <location>tools/tests/</location>\r
+               </file>\r
+       </files>\r
+</patch> \r
diff --git a/docs/updater/sample_patch_list.xml b/docs/updater/sample_patch_list.xml
new file mode 100644 (file)
index 0000000..02b3f31
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1"?> \r
+<patch_list>\r
+       <patch>\r
+               <system_patch_id>00001</system_patch_id>\r
+               <applied_version>1.6</applied_version>\r
+               <patch_folder>1_6-1</patch_folder>\r
+               <description>Patch No. 1 for ATutor 1.6</description>\r
+               <available_to>public</available_to>\r
+               <author>&lt;a href=&quot;http://atutor.ca&quot;&gt;ATutor&lt;/a&gt;</author>\r
+               <dependent_patches></dependent_patches>\r
+       </patch>\r
+       \r
+       <patch>\r
+               <system_patch_id>00002</system_patch_id>\r
+               <applied_version>1.6</applied_version>\r
+               <patch_folder>1_6-2</patch_folder>\r
+               <description>Patch No. 2 for ATutor 1.6</description>\r
+               <available_to>public</available_to>\r
+               <author>&lt;a href=&quot;http://atutor.ca&quot;&gt;ATutor&lt;/a&gt;</author>\r
+               <dependent_patches>\r
+                       <dependent_patch>00001</dependent_patch>\r
+                       <dependent_patch>00003</dependent_patch>\r
+               </dependent_patches>\r
+       </patch>\r
+</patch_list> \r
diff --git a/docs/updater/xml_special_chars.txt b/docs/updater/xml_special_chars.txt
new file mode 100644 (file)
index 0000000..a720315
--- /dev/null
@@ -0,0 +1,5 @@
+&lt;   <       less than
+&gt;   >       greater than
+&amp;  &       ampersand 
+&apos;         '       apostrophe
+&quot;         "       quotation mark
\ No newline at end of file
diff --git a/docs/user/index.php b/docs/user/index.php
new file mode 100644 (file)
index 0000000..b608895
--- /dev/null
@@ -0,0 +1,169 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include(AF_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');\r
+\r
+// initialize constants\r
+$results_per_page = 50;\r
+$dao = new DAO();\r
+\r
+// handle submit\r
+if ( (isset($_GET['edit']) || isset($_GET['password'])) && (isset($_GET['id']) && count($_GET['id']) > 1) ) {\r
+       $msg->addError('SELECT_ONE_ITEM');\r
+} else if (isset($_GET['edit'], $_GET['id'])) {\r
+       header('Location: user_create_edit.php?id='.$_GET['id'][0]);\r
+       exit;\r
+} else if (isset($_GET['password'], $_GET['id'])) {\r
+       header('Location: user_password.php?id='.$_GET['id'][0]);\r
+       exit;\r
+} else if ( isset($_GET['delete'], $_GET['id'])) {\r
+       $ids = implode(',', $_GET['id']);\r
+       header('Location: user_delete.php?id='.$ids);\r
+       exit;\r
+} else if (isset($_GET['edit']) || isset($_GET['delete']) || isset($_GET['password'])) {\r
+       $msg->addError('NO_ITEM_SELECTED');\r
+}\r
+\r
+// page initialize\r
+if ($_GET['reset_filter']) {\r
+       unset($_GET);\r
+}\r
+\r
+$page_string = '';\r
+$orders = array('asc' => 'desc', 'desc' => 'asc');\r
+$cols   = array('login' => 1, 'public_field' => 1, 'first_name' => 1, 'last_name' => 1, 'user_group' => 1, 'email' => 1, 'status' => 1);\r
+\r
+if (isset($_GET['asc'])) {\r
+       $order = 'asc';\r
+       $col   = isset($cols[$_GET['asc']]) ? $_GET['asc'] : 'login';\r
+} else if (isset($_GET['desc'])) {\r
+       $order = 'desc';\r
+       $col   = isset($cols[$_GET['desc']]) ? $_GET['desc'] : 'login';\r
+} else {\r
+       // no order set\r
+       $order = 'asc';\r
+       $col   = 'login';\r
+}\r
+if (isset($_GET['status']) && ($_GET['status'] != '')) {\r
+       $_GET['status'] = intval($_GET['status']);\r
+       $status = '=' . intval($_GET['status']);\r
+       $page_string .= htmlspecialchars(SEP).'status'.$status;\r
+} else {\r
+       $status = '<>-1';\r
+       $_GET['status'] = '';\r
+}\r
+\r
+if (isset($_GET['include']) && $_GET['include'] == 'one') {\r
+       $checked_include_one = ' checked="checked"';\r
+       $page_string .= htmlspecialchars(SEP).'include=one';\r
+} else {\r
+       $_GET['include'] = 'all';\r
+       $checked_include_all = ' checked="checked"';\r
+       $page_string .= htmlspecialchars(SEP).'include=all';\r
+}\r
+\r
+if ($_GET['search']) {\r
+       $page_string .= htmlspecialchars(SEP).'search='.urlencode($stripslashes($_GET['search']));\r
+       $search = $addslashes($_GET['search']);\r
+       $search = explode(' ', $search);\r
+\r
+       if ($_GET['include'] == 'all') {\r
+               $predicate = 'AND ';\r
+       } else {\r
+               $predicate = 'OR ';\r
+       }\r
+\r
+       $sql = '';\r
+       foreach ($search as $term) {\r
+               $term = trim($term);\r
+               $term = str_replace(array('%','_'), array('\%', '\_'), $term);\r
+               if ($term) {\r
+                       $term = '%'.$term.'%';\r
+                       $sql .= "((U.first_name LIKE '$term') OR (U.last_name LIKE '$term') OR (U.email LIKE '$term') OR (U.login LIKE '$term')) $predicate";\r
+               }\r
+       }\r
+       $sql = '('.substr($sql, 0, -strlen($predicate)).')';\r
+       $search = $sql;\r
+} else {\r
+       $search = '1';\r
+}\r
+\r
+if ($_GET['user_group_id'] && $_GET['user_group_id'] <> -1) {\r
+       $user_group_sql = "U.user_group_id = ".$_GET['user_group_id'];\r
+       $page_string .= htmlspecialchars(SEP).'user_group_id='.urlencode($_GET['user_group_id']);\r
+}\r
+else\r
+{\r
+       $user_group_sql = '1';\r
+}\r
+\r
+$sql   = "SELECT COUNT(user_id) AS cnt FROM ".TABLE_PREFIX."users U WHERE status $status AND $search AND $user_group_sql";\r
+\r
+$rows = $dao->execute($sql);\r
+$num_results = $rows[0]['cnt'];\r
+\r
+$num_pages = max(ceil($num_results / $results_per_page), 1);\r
+$page = intval($_GET['p']);\r
+if (!$page) {\r
+       $page = 1;\r
+}      \r
+$count  = (($page-1) * $results_per_page) + 1;\r
+$offset = ($page-1)*$results_per_page;\r
+\r
+if ( isset($_GET['apply_all']) && $_GET['change_status'] >= -1) {\r
+       $offset = 0;\r
+       $results_per_page = 999999;\r
+}\r
+\r
+$sql = "SELECT U.user_id, U.login, U.first_name, U.last_name, UG.title user_group, U.email, U.status, U.last_login AS last_login \r
+          FROM ".TABLE_PREFIX."users U, ".TABLE_PREFIX."user_groups UG\r
+          WHERE U.user_group_id = UG.user_group_id\r
+          AND U.status $status AND $search AND $user_group_sql ORDER BY $col $order LIMIT $offset, $results_per_page";\r
+\r
+$user_rows = $dao->execute($sql);\r
+\r
+if ( isset($_GET['apply_all']) && $_GET['change_status'] >= -1) {\r
+       $ids = '';\r
+       while ($row = mysql_fetch_assoc($result)) {\r
+               $ids .= $row['user_id'].','; \r
+       }\r
+       $ids = substr($ids,0,-1);\r
+       $status = intval($_GET['change_status']);\r
+\r
+       if ($status==-1) {\r
+               header('Location: user_delete.php?id='.$ids);\r
+               exit;\r
+       } else {\r
+               header('Location: user_status.php?ids='.$ids.'&status='.$status);\r
+               exit;\r
+       }\r
+}\r
+\r
+$userGroupsDAO = new UserGroupsDAO();\r
+\r
+$savant->assign('user_rows', $user_rows);\r
+$savant->assign('all_user_groups', $userGroupsDAO->getAll());\r
+$savant->assign('results_per_page', $results_per_page);\r
+$savant->assign('num_results', $num_results);\r
+$savant->assign('checked_include_all', $checked_include_all);\r
+$savant->assign('col_counts', $col_counts);\r
+$savant->assign('page',$page);\r
+$savant->assign('page_string', $page_string);\r
+$savant->assign('orders', $orders);\r
+$savant->assign('order', $order);\r
+$savant->assign('col', $col);\r
+\r
+$savant->display('user/index.tmpl.php');\r
+\r
+?>\r
diff --git a/docs/user/index_inline_editor_submit.php b/docs/user/index_inline_editor_submit.php
new file mode 100644 (file)
index 0000000..67b82b4
--- /dev/null
@@ -0,0 +1,44 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');\r
+\r
+if ($_POST['value'] == '')\r
+{\r
+       $rtn['status'] = 'fail';\r
+       $rtn['error'][] = _AT('AF_ERROR_EMPTY_FIELD');\r
+}\r
+\r
+if (isset($_POST['field']) && isset($_POST['value']) && $_POST['value'] <> '')\r
+{\r
+       $usersDAO = new UsersDAO();\r
+       \r
+       // Format of $_POST['field']: [fieldName]|[user_id]\r
+       $pieces = explode('-', $_POST['field']);\r
+       $status = $usersDAO->UpdateField($pieces[1], $pieces[0], $_POST['value']);\r
+       \r
+       if (is_array($status))\r
+       {\r
+               $rtn['status'] = 'fail';\r
+               foreach ($status as $err)\r
+                       $rtn['error'][] = $err;\r
+       }\r
+       else\r
+       {\r
+               $rtn['status'] = 'success';\r
+       }\r
+}\r
+\r
+echo json_encode($rtn);\r
+?>\r
diff --git a/docs/user/user_create_edit.php b/docs/user/user_create_edit.php
new file mode 100644 (file)
index 0000000..5774302
--- /dev/null
@@ -0,0 +1,128 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', '../include/');
+include_once(AF_INCLUDE_PATH.'vitals.inc.php');
+include_once(AF_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
+include_once(AF_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');
+
+// handle submit
+if (isset($_POST['cancel'])) {
+       header('Location: index.php');
+       exit;
+} else if (isset($_POST['submit'])) {
+       require_once(AF_INCLUDE_PATH. 'classes/DAO/UsersDAO.class.php');
+       $usersDAO = new UsersDAO();
+       
+       /* password check: password is verified front end by javascript. here is to handle the errors from javascript */
+       if ($_POST['password_error'] <> "")
+       {
+               $pwd_errors = explode(",", $_POST['password_error']);
+
+               foreach ($pwd_errors as $pwd_error)
+               {
+                       if ($pwd_error == "missing_password")
+                               $missing_fields[] = _AT('password');
+                       else
+                               $msg->addError($pwd_error);
+               }
+       }
+       else
+       {
+               if (!isset($_GET['id']))  // create new user
+               {
+                       $user_id = $usersDAO->Create($_POST['user_group_id'],
+                         $_POST['login'],
+                                     $_POST['form_password_hidden'],
+                                     $_POST['email'],
+                                     $_POST['first_name'],
+                                     $_POST['last_name'],
+                                     $_POST['status']);
+                       
+                       if (is_int($user_id) && $user_id > 0)
+                       {
+                               if (defined('AF_EMAIL_CONFIRMATION') && AF_EMAIL_CONFIRMATION) {
+                                       $msg->addFeedback('REG_THANKS_CONFIRM');
+               
+                                       $code = substr(md5($_POST['email'] . $now . $user_id), 0, 10);
+                                       
+                                       $confirmation_link = $_base_href . 'confirm.php?id='.$user_id.SEP.'m='.$code;
+               
+                                       /* send the email confirmation message: */
+                                       require(AF_INCLUDE_PATH . 'classes/phpmailer/aframemailer.class.php');
+                                       $mail = new AFrameMailer();
+               
+                                       $mail->From     = $_config['contact_email'];
+                                       $mail->AddAddress($_POST['email']);
+                                       $mail->Subject = SITE_NAME . ' - ' . _AT('email_confirmation_subject');
+                                       $mail->Body    = _AT('email_confirmation_message', SITE_NAME, $confirmation_link)."\n\n";
+               
+                                       $mail->Send();
+                               } 
+                               else 
+                               {
+                                       $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
+                                       header('Location: index.php');
+                                       exit;
+                               }
+                       }
+               }
+               else  // edit existing user
+               {
+                       if ($usersDAO->Update($_GET['id'], 
+                                         $_POST['user_group_id'],
+                                 $_POST['login'],
+                                         $_POST['email'],
+                                         $_POST['first_name'],
+                                         $_POST['last_name'],
+                                         $_POST['status']))
+                       
+                       {
+                               $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
+                               header('Location: index.php');
+                               exit;
+                       }
+               }
+       }
+}
+// end of handle submit
+
+// initialize page 
+$userGroupsDAO = new UserGroupsDAO();
+
+if (isset($_GET['id'])) // edit existing user
+{
+       $usersDAO = new UsersDAO();
+       $savant->assign('user_row', $usersDAO->getUserByID($_GET['id']));
+       $savant->assign('show_password', false);
+       
+}
+else  // create new user
+{
+       $savant->assign('show_password', true);
+       
+}
+/*****************************/
+/* template starts down here */
+
+global $onload;
+$onload = 'document.form.login.focus();';
+
+$savant->assign('show_user_group', true);
+$savant->assign('show_status', true);
+$savant->assign('all_user_groups', $userGroupsDAO->getAll());
+$savant->assign('title', _AT('create_edit_user'));
+$savant->assign('submit_button_text', _AT('save'));
+
+$savant->display('register.tmpl.php');
+
+?>
\ No newline at end of file
diff --git a/docs/user/user_delete.php b/docs/user/user_delete.php
new file mode 100644 (file)
index 0000000..cf868a0
--- /dev/null
@@ -0,0 +1,56 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');\r
+\r
+$usersDAO = new UsersDAO();\r
+\r
+$ids = explode(',', $_REQUEST['id']);\r
+\r
+if (isset($_POST['submit_no'])) \r
+{\r
+       $msg->addFeedback('CANCELLED');\r
+       header('Location: index.php');\r
+       exit;\r
+} \r
+else if (isset($_POST['submit_yes']))\r
+{\r
+       foreach($ids as $id) \r
+       {\r
+               $usersDAO->Delete($id);\r
+       }\r
+\r
+       $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');\r
+       header('Location: index.php');\r
+       exit;\r
+}\r
+\r
+require(AF_INCLUDE_PATH.'header.inc.php');\r
+\r
+unset($hidden_vars);\r
+\r
+foreach($ids as $id) \r
+{\r
+       $names[] = $usersDAO->getUserName($id);\r
+}\r
+\r
+$names_html = '<ul>'.html_get_list($names).'</ul>';\r
+$hidden_vars['id'] = $_REQUEST['id'];\r
+\r
+$msg->addConfirm(array('DELETE_USER', $names_html), $hidden_vars);\r
+$msg->printConfirm();\r
+\r
+require(AF_INCLUDE_PATH.'footer.inc.php');\r
+?>\r
diff --git a/docs/user/user_group.php b/docs/user/user_group.php
new file mode 100644 (file)
index 0000000..312784c
--- /dev/null
@@ -0,0 +1,53 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+include_once(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/PrivilegesDAO.class.php');\r
+\r
+// handle submit\r
+if ( isset($_GET['edit']) && isset($_GET['id']) && count($_GET['id']) > 1) {\r
+       $msg->addError('SELECT_ONE_ITEM');\r
+} else if (isset($_GET['edit'], $_GET['id'])) {\r
+       header('Location: user_group_create_edit.php?id='.$_GET['id'][0]);\r
+       exit;\r
+} else if ( isset($_GET['delete'], $_GET['id'])) {\r
+       // cannot delete "admin" and "user" groups\r
+       foreach ($_GET['id'] as $id)\r
+       {\r
+               if ($id == AF_USER_GROUP_ADMIN || $id == AF_USER_GROUP_USER)\r
+               {\r
+                       $msg->addError('USER_GROUP_CANNOT_DELETE');\r
+                       break;\r
+               }\r
+       }\r
+       \r
+       if (!$msg->containsErrors())\r
+       {\r
+               $ids = implode(',', $_GET['id']);\r
+               header('Location: user_group_delete.php?id='.$ids);\r
+               exit;\r
+       }\r
+} else if (isset($_GET['edit']) || isset($_GET['delete']) ) {\r
+       $msg->addError('NO_ITEM_SELECTED');\r
+}\r
+\r
+$userGroupsDAO = new UserGroupsDAO();\r
+$privilegesDAO = new PrivilegesDAO();\r
+\r
+$savant->assign('user_group_rows', $userGroupsDAO->getAll());\r
+$savant->assign('privilegesDAO', $privilegesDAO);\r
+\r
+$savant->display('user/user_group.tmpl.php');\r
+\r
+?>\r
diff --git a/docs/user/user_group_create_edit.php b/docs/user/user_group_create_edit.php
new file mode 100644 (file)
index 0000000..d40744a
--- /dev/null
@@ -0,0 +1,113 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/UserGroupPrivilegeDAO.class.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/PrivilegesDAO.class.php');\r
+\r
+unset($id);  // clean up the temporary id values set by vitals.inc.php\r
+\r
+if (isset($_GET["id"])) $id = intval($_GET["id"]);\r
+\r
+$userGroupsDAO = new UserGroupsDAO();\r
+\r
+// handle submits\r
+if (isset($_POST['cancel'])) \r
+{\r
+       $msg->addFeedback('CANCELLED');\r
+       header('Location: user_group.php');\r
+       exit;\r
+} \r
+else if (isset($_POST['save']))\r
+{\r
+       $title = $addslashes(trim($_POST['title']));    \r
+       \r
+       if ($title == '')\r
+       {\r
+               $msg->addError(array('EMPTY_FIELDS', _AT('title')));\r
+       }\r
+       \r
+       if (!$msg->containsErrors())\r
+       {\r
+               if (isset($id))  // edit existing user group\r
+               {\r
+                       $userGroupsDAO->update($id,\r
+                                              $title, \r
+                                              $addslashes(trim($_POST['description'])));\r
+               }\r
+               else  // create a new user group\r
+               {\r
+                       $id = $userGroupsDAO->Create($title, \r
+                                              $addslashes(trim($_POST['description'])));\r
+               }\r
+                                              \r
+               if (!$msg->containsErrors())\r
+               {\r
+                       // add checks\r
+                       if (is_array($_POST['add_privileges_id'])) \r
+                       {\r
+                               $userGroupPrivilegeDAO = new UserGroupPrivilegeDAO();\r
+\r
+                               foreach ($_POST['add_privileges_id'] as $add_priv_id)\r
+                                       $userGroupPrivilegeDAO->Create($id, $add_priv_id);\r
+                       }\r
+                       \r
+                       $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');\r
+                       header('Location: user_group.php');\r
+                       exit;\r
+               }\r
+       }\r
+}\r
+else if (isset($_POST['remove']))\r
+{\r
+       $userGroupPrivilegeDAO = new UserGroupPrivilegeDAO();\r
+       \r
+       if (is_array($_POST['del_privileges_id']))\r
+       {\r
+               foreach ($_POST['del_privileges_id'] as $del_priv_id)\r
+                       $userGroupPrivilegeDAO->Delete($id, $del_priv_id);\r
+       }\r
+}\r
+\r
+// interface display\r
+if (!isset($id))\r
+{\r
+       // create user group\r
+       $privilegesDAO = new PrivilegesDAO();\r
+       \r
+       $savant->assign('privs_to_add_rows', $privilegesDAO->getAll());\r
+}\r
+else\r
+{\r
+       // edit existing user group\r
+       $privilegesDAO = new PrivilegesDAO();\r
+       $privs_rows = $privilegesDAO->getUserGroupPrivileges($id);\r
+\r
+       // get privs that are not in user group\r
+       unset($str_existing_privs);\r
+       if (is_array($privs_rows))\r
+       {\r
+               foreach($privs_rows as $priv_row)\r
+                       $str_existing_privs .= $priv_row['privilege_id'] .',';\r
+               $str_existing_privs = substr($str_existing_privs, 0, -1);\r
+       }\r
+       \r
+       $savant->assign('user_group_row', $userGroupsDAO->getUserGroupByID($id));\r
+       $savant->assign('privs_rows', $privs_rows);\r
+       $savant->assign('privs_to_add_rows', $privilegesDAO->getAllPrivsExceptListed($str_existing_privs));\r
+}\r
+\r
+$savant->display('user/user_group_create_edit.tmpl.php');\r
+?>\r
diff --git a/docs/user/user_group_delete.php b/docs/user/user_group_delete.php
new file mode 100644 (file)
index 0000000..2fdcf89
--- /dev/null
@@ -0,0 +1,57 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');\r
+\r
+$userGroupsDAO = new UserGroupsDAO();\r
+\r
+$ids = explode(',', $_REQUEST['id']);\r
+\r
+if (isset($_POST['submit_no'])) \r
+{\r
+       $msg->addFeedback('CANCELLED');\r
+       header('Location: user_group.php');\r
+       exit;\r
+} \r
+else if (isset($_POST['submit_yes']))\r
+{\r
+       foreach($ids as $id) \r
+       {\r
+               $userGroupsDAO->Delete($id);\r
+       }\r
+\r
+       $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');\r
+       header('Location: user_group.php');\r
+       exit;\r
+}\r
+\r
+require(AF_INCLUDE_PATH.'header.inc.php');\r
+\r
+unset($hidden_vars);\r
+\r
+foreach($ids as $id) \r
+{\r
+       $row = $userGroupsDAO->getUserGroupByID($id);\r
+       $names[] = $row['title'];\r
+}\r
+\r
+$names_html = '<ul>'.html_get_list($names).'</ul>';\r
+$hidden_vars['id'] = $_REQUEST['id'];\r
+\r
+$msg->addConfirm(array('DELETE_USER_GROUP', $names_html), $hidden_vars);\r
+$msg->printConfirm();\r
+\r
+require(AF_INCLUDE_PATH.'footer.inc.php');\r
+?>\r
diff --git a/docs/user/user_group_inline_editor_submit.php b/docs/user/user_group_inline_editor_submit.php
new file mode 100644 (file)
index 0000000..da7e8f9
--- /dev/null
@@ -0,0 +1,38 @@
+<?php\r
+/************************************************************************/\r
+/* AFrame                                                               */\r
+/************************************************************************/\r
+/* Copyright (c) 2009                                                   */\r
+/* Adaptive Technology Resource Centre / University of Toronto          */\r
+/*                                                                      */\r
+/* This program is free software. You can redistribute it and/or        */\r
+/* modify it under the terms of the GNU General Public License          */\r
+/* as published by the Free Software Foundation.                        */\r
+/************************************************************************/\r
+\r
+define('AF_INCLUDE_PATH', '../include/');\r
+include(AF_INCLUDE_PATH.'vitals.inc.php');\r
+include_once(AF_INCLUDE_PATH.'classes/DAO/UserGroupsDAO.class.php');\r
+\r
+if (isset($_POST['field']))\r
+{\r
+       $userGroupsDAO = new UserGroupsDAO();\r
+       \r
+       // Format of $_POST['field']: [fieldName]|[user_id]\r
+       $pieces = explode('-', $_POST['field']);\r
+       $status = $userGroupsDAO->UpdateField($pieces[1], $pieces[0], $_POST['value']);\r
+       \r
+       if (is_array($status))\r
+       {\r
+               $rtn['status'] = 'fail';\r
+               foreach ($status as $err)\r
+                       $rtn['error'][] = $err;\r
+       }\r
+       else\r
+       {\r
+               $rtn['status'] = 'success';\r
+       }\r
+}\r
+\r
+echo json_encode($rtn);\r
+?>\r
diff --git a/docs/user/user_password.php b/docs/user/user_password.php
new file mode 100644 (file)
index 0000000..30b11f3
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+/************************************************************************/
+/* AFrame                                                               */
+/************************************************************************/
+/* Copyright (c) 2009                                                   */
+/* Adaptive Technology Resource Centre / University of Toronto          */
+/*                                                                      */
+/* 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.                        */
+/************************************************************************/
+
+define('AF_INCLUDE_PATH', '../include/');
+include_once(AF_INCLUDE_PATH.'vitals.inc.php');
+include_once(AF_INCLUDE_PATH.'classes/DAO/UsersDAO.class.php');
+
+if (isset($_POST['cancel'])) {
+       $msg->addFeedback('CANCELLED');
+       Header('Location: ../index.php');
+       exit;
+}
+
+if (isset($_POST['submit'])) {
+       /* password check: password is verified front end by javascript. here is to handle the errors from javascript */
+       if ($_POST['password_error'] <> "")
+       {
+               $pwd_errors = explode(",", $_POST['password_error']);
+
+               foreach ($pwd_errors as $pwd_error)
+               {
+                       if ($pwd_error == "missing_password")
+                               $missing_fields[] = _AT('password');
+                       else
+                               $msg->addError($pwd_error);
+               }
+       }
+
+       if (!$msg->containsErrors()) {
+               // insert into the db.
+               $password   = $addslashes($_POST['form_password_hidden']);
+               
+               $usersDAO = new UsersDAO();
+
+               if (!$usersDAO->setPassword($_GET['id'], $password)) 
+               {
+                       require(AF_INCLUDE_PATH.'header.inc.php');
+                       $msg->printErrors('DB_NOT_UPDATED');
+                       require(AF_INCLUDE_PATH.'footer.inc.php');
+                       exit;
+               }
+
+               // send email to user
+               $user_row = $usersDAO->getUserByID($_GET['id']);
+
+               $tmp_message  = _AT('password_change_msg')."\n\n";
+               $tmp_message .= _AT('web_site').' : '.AF_BASE_HREF."\n";
+               $tmp_message .= _AT('login_name').' : '.$user_row['login']."\n";
+               
+               require(AF_INCLUDE_PATH . 'classes/phpmailer/aframemailer.class.php');
+               $mail = new AFrameMailer;
+               $mail->From     = $_config['contact_email'];
+               $mail->AddAddress($user_row['email']);
+               $mail->Subject = $_config['site_name'] . ': ' . _AT('password_changed');
+               $mail->Body    = $tmp_message;
+
+               if(!$mail->Send()) 
+               {
+                  $msg->addError('SENDING_ERROR');
+               }
+               else
+               {
+                       $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
+               }
+               
+               header('Location: index.php');
+               exit;
+       }
+}
+
+/* template starts here */
+$savant->display('user/user_password.tmpl.php');
+
+?>
\ No newline at end of file