From a10fbba14a0568258fa50d5185b194b54d104fb0 Mon Sep 17 00:00:00 2001 From: Thilina Hasantha Date: Thu, 4 Aug 2016 14:27:59 +0530 Subject: [PATCH] IceHrm v18.0 --- core-ext/config.base.php | 13 +- core-ext/model/models.base.php | 64 +- core-ext/popups.php | 70 +- core-ext/scripts/icehrm_master_data.sql | 302 +- core-ext/scripts/icehrm_sample_data.sql | 22 +- core-ext/scripts/icehrmdb.sql | 462 +- .../scripts/upgrade_v16.0.PRO_v18.0.PRO.sql | 481 + .../api/AttendanceActionManager.php | 4 +- .../attendance/api/AttendanceAdminManager.php | 76 + ext/admin/attendance/dashboard.html | 8 +- ext/admin/attendance/index.php | 23 +- .../api/Company_structureAdminManager.php | 16 +- ext/admin/company_structure/dashboard.html | 8 +- ext/admin/company_structure/index.php | 6 +- ext/admin/company_structure/lib.js | 3 +- .../employees/api/EmployeesActionManager.php | 4 +- .../employees/api/EmployeesAdminManager.php | 20 + .../employees/customTemplates/myDetails.html | 116 +- ext/admin/employees/dashboard.html | 8 +- ext/admin/employees/index.php | 32 +- ext/admin/employees/lib.js | 2 +- .../fieldnames/api/FieldnamesAdminManager.php | 27 +- ext/admin/fieldnames/index.php | 15 +- ext/admin/fieldnames/lib.js | 71 +- ext/admin/jobs/index.php | 9 +- ext/admin/loans/index.php | 6 +- ext/admin/meta.json | 2 +- .../metadata/api/MetadataAdminManager.php | 57 +- ext/admin/modules/index.php | 4 +- ext/admin/permissions/dashboard.html | 8 +- ext/admin/permissions/index.php | 4 +- .../projects/api/ProjectsAdminManager.php | 49 +- ext/admin/projects/dashboard.html | 8 +- ext/admin/projects/index.php | 8 +- ext/admin/projects/lib.js | 15 +- ext/admin/qualifications/index.php | 14 +- ext/admin/reports/dashboard.html | 8 +- ext/admin/reports/index.php | 9 +- ext/admin/reports/lib.js | 288 +- ext/admin/reports/meta.json | 2 +- .../reportClasses/ActiveEmployeeReport.php | 2 +- .../EmployeeAttendanceReport.php | 2 +- .../EmployeeLeaveEntitlementReport.php | 5 +- .../reportClasses/EmployeeLeavesReport.php | 2 +- .../reportClasses/EmployeeTimeSheetData.php | 6 +- .../reportClasses/EmployeeTimeTrackReport.php | 5 +- .../reportClasses/EmployeeTimesheetReport.php | 68 +- .../reports/reportClasses/ExpenseReport.php | 5 +- .../reports/reportClasses/OvertimeReport.php | 5 +- .../reports/reportClasses/ReportBuilder.php | 179 +- .../reportClasses/ReportBuilderInterface.php | 14 + .../reportClasses/TravelRequestReport.php | 2 +- .../reports/templates/form_template.html | 6 +- ext/admin/salary/api/SalaryAdminManager.php | 51 +- ext/admin/salary/index.php | 2 +- ext/admin/salary/lib.js | 196 - ext/admin/settings/dashboard.html | 8 +- ext/admin/settings/index.php | 6 +- ext/admin/settings/lib.js | 3 +- .../settings/templates/form_template.html | 6 +- ext/admin/travel/api/TravelActionManager.php | 10 +- ext/admin/travel/api/TravelAdminManager.php | 31 +- ext/admin/travel/dashboard.html | 8 +- ext/admin/travel/index.php | 41 +- ext/admin/travel/lib.js | 12 +- ext/admin/users/dashboard.html | 8 +- ext/admin/users/index.php | 6 +- ext/admin/users/lib.js | 10 +- .../api/AttendanceActionManager.php | 42 +- ext/modules/attendance/dashboard.html | 8 +- ext/modules/attendance/index.php | 4 +- ext/modules/attendance/lib.js | 209 + ext/modules/dashboard/index.php | 4 +- ext/modules/dependents/index.php | 4 +- ext/modules/emergency_contact/index.php | 4 +- .../employees/api/EmployeesActionManager.php | 62 +- .../employees/customTemplates/myDetails.html | 12 + ext/modules/employees/dashboard.html | 8 +- ext/modules/employees/index.php | 6 +- ext/modules/employees/lib.js | 14 + ext/modules/loans/index.php | 4 +- ext/modules/meta.json | 3 +- .../projects/api/ProjectsModulesManager.php | 14 + ext/modules/projects/dashboard.html | 10 +- ext/modules/projects/index.php | 4 +- ext/modules/projects/lib.js | 7 +- ext/modules/qualifications/index.php | 10 +- ext/modules/qualifications/lib.js | 2 +- ext/modules/salary/index.php | 4 +- .../api/Time_sheetsModulesManager.php | 2 + .../customTemplates/time_entry_form.html | 4 +- ext/modules/time_sheets/dashboard.html | 6 +- ext/modules/time_sheets/index.php | 30 +- ext/modules/time_sheets/lib.js | 11 +- .../time_sheets/templates/form_template.html | 6 +- .../travel/api/TravelActionManager.php | 42 +- ext/modules/travel/dashboard.html | 8 +- ext/modules/travel/index.php | 45 +- ext/modules/travel/lib.js | 78 +- phpdox.xml | 6 +- phpunit.xml | 26 +- readme.md | 8 + src/api/AdapterBase.js | 166 +- src/api/Base.js | 1030 +- src/api/FormValidation.js | 346 +- src/app/data/placeholder.txt | 1 - src/app/install/index.php | 2 +- src/classes/ApprovalStatus.php | 163 + src/classes/ApproveActionManager.php | 129 +- src/classes/BaseService.php | 1294 +- src/classes/FileService.php | 3 + src/classes/LanguageManager.php | 75 + src/classes/ModuleBuilder.php | 4 +- src/classes/NotificationManager.php | 2 +- src/classes/ReportHandler.php | 93 +- src/classes/StatusChangeLogManager.php | 72 + src/classes/UIManager.php | 21 +- src/composer/composer.json | 5 +- src/composer/composer.lock | 180 +- src/composer/vendor/composer/ClassLoader.php | 8 +- src/composer/vendor/composer/LICENSE | 21 + .../vendor/composer/autoload_namespaces.php | 1 + .../vendor/composer/autoload_psr4.php | 2 + .../vendor/composer/autoload_real.php | 34 +- .../vendor/composer/autoload_static.php | 62 + src/composer/vendor/composer/installed.json | 181 + .../vendor/gettext/gettext/CONTRIBUTING.md | 17 + src/composer/vendor/gettext/gettext/LICENSE | 21 + src/composer/vendor/gettext/gettext/README.md | 401 + .../vendor/gettext/gettext/composer.json | 46 + .../gettext/gettext/src/BaseTranslator.php | 23 + .../gettext/gettext/src/Extractors/Blade.php | 24 + .../gettext/gettext/src/Extractors/Csv.php | 44 + .../gettext/src/Extractors/CsvDictionary.php | 38 + .../gettext/src/Extractors/Extractor.php | 80 + .../src/Extractors/ExtractorInterface.php | 26 + .../gettext/gettext/src/Extractors/Jed.php | 55 + .../gettext/gettext/src/Extractors/JsCode.php | 42 + .../gettext/gettext/src/Extractors/Json.php | 26 + .../gettext/src/Extractors/JsonDictionary.php | 26 + .../gettext/gettext/src/Extractors/Mo.php | 128 + .../gettext/src/Extractors/PhpArray.php | 33 + .../gettext/src/Extractors/PhpCode.php | 127 + .../gettext/gettext/src/Extractors/Po.php | 199 + .../gettext/gettext/src/Extractors/Twig.php | 43 + .../gettext/gettext/src/Extractors/Xliff.php | 72 + .../gettext/gettext/src/Extractors/Yaml.php | 27 + .../gettext/src/Extractors/YamlDictionary.php | 27 + .../gettext/gettext/src/Generators/Csv.php | 47 + .../gettext/src/Generators/CsvDictionary.php | 34 + .../gettext/src/Generators/Generator.php | 22 + .../src/Generators/GeneratorInterface.php | 29 + .../gettext/gettext/src/Generators/Jed.php | 61 + .../gettext/gettext/src/Generators/Json.php | 26 + .../gettext/src/Generators/JsonDictionary.php | 26 + .../gettext/gettext/src/Generators/Mo.php | 134 + .../gettext/src/Generators/PhpArray.php | 40 + .../gettext/gettext/src/Generators/Po.php | 134 + .../gettext/gettext/src/Generators/Xliff.php | 87 + .../gettext/gettext/src/Generators/Yaml.php | 28 + .../gettext/src/Generators/YamlDictionary.php | 28 + .../gettext/gettext/src/GettextTranslator.php | 161 + .../vendor/gettext/gettext/src/Merge.php | 221 + .../gettext/gettext/src/Translation.php | 480 + .../gettext/gettext/src/Translations.php | 409 + .../vendor/gettext/gettext/src/Translator.php | 264 + .../gettext/src/TranslatorInterface.php | 103 + .../gettext/src/Utils/DictionaryTrait.php | 55 + .../gettext/src/Utils/FunctionsScanner.php | 110 + .../src/Utils/HeadersExtractorTrait.php | 67 + .../src/Utils/HeadersGeneratorTrait.php | 29 + .../gettext/src/Utils/JsFunctionsScanner.php | 220 + .../src/Utils/MultidimensionalArrayTrait.php | 95 + .../gettext/src/Utils/ParsedFunction.php | 148 + .../gettext/src/Utils/PhpFunctionsScanner.php | 160 + .../gettext/src/Utils/StringReader.php | 51 + .../vendor/gettext/gettext/src/autoloader.php | 13 + .../gettext/src/translator_functions.php | 156 + src/composer/vendor/gettext/languages/LICENSE | 22 + .../gettext/languages/UNICODE-LICENSE.txt | 50 + .../vendor/gettext/languages/bin/export.cmd | 3 + .../vendor/gettext/languages/bin/export.php | 234 + .../vendor/gettext/languages/bin/export.sh | 3 + .../vendor/gettext/languages/composer.json | 38 + .../vendor/gettext/languages/src/Category.php | 108 + .../vendor/gettext/languages/src/CldrData.php | 320 + .../gettext/languages/src/Exporter/Docs.php | 55 + .../languages/src/Exporter/Exporter.php | 128 + .../gettext/languages/src/Exporter/Html.php | 61 + .../gettext/languages/src/Exporter/Json.php | 63 + .../gettext/languages/src/Exporter/Php.php | 55 + .../gettext/languages/src/Exporter/Po.php | 31 + .../languages/src/Exporter/Prettyjson.php | 25 + .../gettext/languages/src/Exporter/Xml.php | 54 + .../languages/src/FormulaConverter.php | 154 + .../vendor/gettext/languages/src/Language.php | 366 + .../gettext/languages/src/autoloader.php | 12 + .../src/cldr-data/main/en-US/languages.json | 636 + .../src/cldr-data/main/en-US/scripts.json | 239 + .../src/cldr-data/main/en-US/territories.json | 324 + .../src/cldr-data/supplemental/plurals.json | 844 + src/composer/vendor/twig/twig/.editorconfig | 18 + src/composer/vendor/twig/twig/.gitignore | 5 + src/composer/vendor/twig/twig/.travis.yml | 39 + src/composer/vendor/twig/twig/CHANGELOG | 821 + src/composer/vendor/twig/twig/LICENSE | 31 + src/composer/vendor/twig/twig/README.rst | 15 + src/composer/vendor/twig/twig/composer.json | 46 + .../vendor/twig/twig/doc/advanced.rst | 872 + .../vendor/twig/twig/doc/advanced_legacy.rst | 887 + src/composer/vendor/twig/twig/doc/api.rst | 552 + .../vendor/twig/twig/doc/coding_standards.rst | 101 + .../vendor/twig/twig/doc/deprecated.rst | 160 + .../vendor/twig/twig/doc/filters/abs.rst | 18 + .../vendor/twig/twig/doc/filters/batch.rst | 51 + .../twig/twig/doc/filters/capitalize.rst | 11 + .../twig/doc/filters/convert_encoding.rst | 28 + .../vendor/twig/twig/doc/filters/date.rst | 94 + .../twig/twig/doc/filters/date_modify.rst | 23 + .../vendor/twig/twig/doc/filters/default.rst | 33 + .../vendor/twig/twig/doc/filters/escape.rst | 116 + .../vendor/twig/twig/doc/filters/first.rst | 25 + .../vendor/twig/twig/doc/filters/format.rst | 16 + .../vendor/twig/twig/doc/filters/index.rst | 37 + .../vendor/twig/twig/doc/filters/join.rst | 23 + .../twig/twig/doc/filters/json_encode.rst | 21 + .../vendor/twig/twig/doc/filters/keys.rst | 11 + .../vendor/twig/twig/doc/filters/last.rst | 25 + .../vendor/twig/twig/doc/filters/length.rst | 11 + .../vendor/twig/twig/doc/filters/lower.rst | 10 + .../vendor/twig/twig/doc/filters/merge.rst | 48 + .../vendor/twig/twig/doc/filters/nl2br.rst | 22 + .../twig/twig/doc/filters/number_format.rst | 45 + .../vendor/twig/twig/doc/filters/raw.rst | 36 + .../vendor/twig/twig/doc/filters/replace.rst | 19 + .../vendor/twig/twig/doc/filters/reverse.rst | 47 + .../vendor/twig/twig/doc/filters/round.rst | 37 + .../vendor/twig/twig/doc/filters/slice.rst | 71 + .../vendor/twig/twig/doc/filters/sort.rst | 18 + .../vendor/twig/twig/doc/filters/split.rst | 53 + .../twig/twig/doc/filters/striptags.rst | 15 + .../vendor/twig/twig/doc/filters/title.rst | 11 + .../vendor/twig/twig/doc/filters/trim.rst | 29 + .../vendor/twig/twig/doc/filters/upper.rst | 10 + .../twig/twig/doc/filters/url_encode.rst | 34 + .../twig/twig/doc/functions/attribute.rst | 26 + .../vendor/twig/twig/doc/functions/block.rst | 15 + .../twig/twig/doc/functions/constant.rst | 18 + .../vendor/twig/twig/doc/functions/cycle.rst | 28 + .../vendor/twig/twig/doc/functions/date.rst | 52 + .../vendor/twig/twig/doc/functions/dump.rst | 69 + .../twig/twig/doc/functions/include.rst | 80 + .../vendor/twig/twig/doc/functions/index.rst | 20 + .../vendor/twig/twig/doc/functions/max.rst | 20 + .../vendor/twig/twig/doc/functions/min.rst | 20 + .../vendor/twig/twig/doc/functions/parent.rst | 20 + .../vendor/twig/twig/doc/functions/random.rst | 29 + .../vendor/twig/twig/doc/functions/range.rst | 45 + .../vendor/twig/twig/doc/functions/source.rst | 32 + .../doc/functions/template_from_string.rst | 32 + src/composer/vendor/twig/twig/doc/index.rst | 19 + .../vendor/twig/twig/doc/installation.rst | 116 + .../vendor/twig/twig/doc/internals.rst | 138 + src/composer/vendor/twig/twig/doc/intro.rst | 85 + src/composer/vendor/twig/twig/doc/recipes.rst | 518 + .../vendor/twig/twig/doc/tags/autoescape.rst | 83 + .../vendor/twig/twig/doc/tags/block.rst | 11 + src/composer/vendor/twig/twig/doc/tags/do.rst | 12 + .../vendor/twig/twig/doc/tags/embed.rst | 178 + .../vendor/twig/twig/doc/tags/extends.rst | 268 + .../vendor/twig/twig/doc/tags/filter.rst | 21 + .../vendor/twig/twig/doc/tags/flush.rst | 17 + .../vendor/twig/twig/doc/tags/for.rst | 172 + .../vendor/twig/twig/doc/tags/from.rst | 8 + src/composer/vendor/twig/twig/doc/tags/if.rst | 76 + .../vendor/twig/twig/doc/tags/import.rst | 57 + .../vendor/twig/twig/doc/tags/include.rst | 86 + .../vendor/twig/twig/doc/tags/index.rst | 24 + .../vendor/twig/twig/doc/tags/macro.rst | 86 + .../vendor/twig/twig/doc/tags/sandbox.rst | 30 + .../vendor/twig/twig/doc/tags/set.rst | 78 + .../vendor/twig/twig/doc/tags/spaceless.rst | 37 + .../vendor/twig/twig/doc/tags/use.rst | 124 + .../vendor/twig/twig/doc/tags/verbatim.rst | 24 + .../vendor/twig/twig/doc/templates.rst | 900 + .../vendor/twig/twig/doc/tests/constant.rst | 22 + .../vendor/twig/twig/doc/tests/defined.rst | 30 + .../twig/twig/doc/tests/divisibleby.rst | 14 + .../vendor/twig/twig/doc/tests/empty.rst | 11 + .../vendor/twig/twig/doc/tests/even.rst | 10 + .../vendor/twig/twig/doc/tests/index.rst | 15 + .../vendor/twig/twig/doc/tests/iterable.rst | 19 + .../vendor/twig/twig/doc/tests/null.rst | 12 + .../vendor/twig/twig/doc/tests/odd.rst | 10 + .../vendor/twig/twig/doc/tests/sameas.rst | 14 + .../vendor/twig/twig/ext/twig/.gitignore | 30 + .../vendor/twig/twig/ext/twig/config.m4 | 8 + .../vendor/twig/twig/ext/twig/config.w32 | 8 + .../vendor/twig/twig/ext/twig/php_twig.h | 35 + src/composer/vendor/twig/twig/ext/twig/twig.c | 1127 ++ .../vendor/twig/twig/lib/Twig/Autoloader.php | 54 + .../twig/twig/lib/Twig/BaseNodeVisitor.php | 62 + .../twig/twig/lib/Twig/Cache/Filesystem.php | 96 + .../vendor/twig/twig/lib/Twig/Cache/Null.php | 48 + .../twig/twig/lib/Twig/CacheInterface.php | 56 + .../vendor/twig/twig/lib/Twig/Compiler.php | 277 + .../twig/twig/lib/Twig/CompilerInterface.php | 36 + .../vendor/twig/twig/lib/Twig/Environment.php | 1381 ++ .../vendor/twig/twig/lib/Twig/Error.php | 272 + .../twig/twig/lib/Twig/Error/Loader.php | 31 + .../twig/twig/lib/Twig/Error/Runtime.php | 20 + .../twig/twig/lib/Twig/Error/Syntax.php | 53 + .../twig/lib/Twig/ExistsLoaderInterface.php | 29 + .../twig/twig/lib/Twig/ExpressionParser.php | 647 + .../vendor/twig/twig/lib/Twig/Extension.php | 79 + .../twig/twig/lib/Twig/Extension/Core.php | 1547 ++ .../twig/twig/lib/Twig/Extension/Debug.php | 61 + .../twig/twig/lib/Twig/Extension/Escaper.php | 102 + .../lib/Twig/Extension/GlobalsInterface.php | 22 + .../Twig/Extension/InitRuntimeInterface.php | 22 + .../twig/lib/Twig/Extension/Optimizer.php | 29 + .../twig/twig/lib/Twig/Extension/Profiler.php | 46 + .../twig/twig/lib/Twig/Extension/Sandbox.php | 97 + .../twig/twig/lib/Twig/Extension/Staging.php | 94 + .../twig/lib/Twig/Extension/StringLoader.php | 41 + .../twig/twig/lib/Twig/ExtensionInterface.php | 87 + .../Twig/FileExtensionEscapingStrategy.php | 58 + .../vendor/twig/twig/lib/Twig/Filter.php | 84 + .../twig/twig/lib/Twig/Filter/Function.php | 40 + .../twig/twig/lib/Twig/Filter/Method.php | 42 + .../vendor/twig/twig/lib/Twig/Filter/Node.php | 42 + .../twig/lib/Twig/FilterCallableInterface.php | 24 + .../twig/twig/lib/Twig/FilterInterface.php | 43 + .../vendor/twig/twig/lib/Twig/Function.php | 74 + .../twig/twig/lib/Twig/Function/Function.php | 41 + .../twig/twig/lib/Twig/Function/Method.php | 43 + .../twig/twig/lib/Twig/Function/Node.php | 42 + .../lib/Twig/FunctionCallableInterface.php | 24 + .../twig/twig/lib/Twig/FunctionInterface.php | 40 + .../vendor/twig/twig/lib/Twig/Lexer.php | 411 + .../twig/twig/lib/Twig/LexerInterface.php | 32 + .../twig/twig/lib/Twig/Loader/Array.php | 95 + .../twig/twig/lib/Twig/Loader/Chain.php | 138 + .../twig/twig/lib/Twig/Loader/Filesystem.php | 260 + .../twig/twig/lib/Twig/Loader/String.php | 63 + .../twig/twig/lib/Twig/LoaderInterface.php | 53 + .../vendor/twig/twig/lib/Twig/Markup.php | 37 + .../vendor/twig/twig/lib/Twig/Node.php | 231 + .../twig/twig/lib/Twig/Node/AutoEscape.php | 34 + .../vendor/twig/twig/lib/Twig/Node/Block.php | 39 + .../twig/lib/Twig/Node/BlockReference.php | 32 + .../vendor/twig/twig/lib/Twig/Node/Body.php | 19 + .../twig/twig/lib/Twig/Node/CheckSecurity.php | 78 + .../vendor/twig/twig/lib/Twig/Node/Do.php | 33 + .../vendor/twig/twig/lib/Twig/Node/Embed.php | 42 + .../twig/twig/lib/Twig/Node/Expression.php | 20 + .../twig/lib/Twig/Node/Expression/Array.php | 81 + .../lib/Twig/Node/Expression/AssignName.php | 23 + .../twig/lib/Twig/Node/Expression/Binary.php | 35 + .../lib/Twig/Node/Expression/Binary/Add.php | 18 + .../lib/Twig/Node/Expression/Binary/And.php | 18 + .../Node/Expression/Binary/BitwiseAnd.php | 18 + .../Twig/Node/Expression/Binary/BitwiseOr.php | 18 + .../Node/Expression/Binary/BitwiseXor.php | 18 + .../Twig/Node/Expression/Binary/Concat.php | 18 + .../lib/Twig/Node/Expression/Binary/Div.php | 18 + .../Twig/Node/Expression/Binary/EndsWith.php | 30 + .../lib/Twig/Node/Expression/Binary/Equal.php | 17 + .../Twig/Node/Expression/Binary/FloorDiv.php | 24 + .../Twig/Node/Expression/Binary/Greater.php | 17 + .../Node/Expression/Binary/GreaterEqual.php | 17 + .../lib/Twig/Node/Expression/Binary/In.php | 28 + .../lib/Twig/Node/Expression/Binary/Less.php | 17 + .../Twig/Node/Expression/Binary/LessEqual.php | 17 + .../Twig/Node/Expression/Binary/Matches.php | 28 + .../lib/Twig/Node/Expression/Binary/Mod.php | 18 + .../lib/Twig/Node/Expression/Binary/Mul.php | 18 + .../Twig/Node/Expression/Binary/NotEqual.php | 17 + .../lib/Twig/Node/Expression/Binary/NotIn.php | 28 + .../lib/Twig/Node/Expression/Binary/Or.php | 18 + .../lib/Twig/Node/Expression/Binary/Power.php | 28 + .../lib/Twig/Node/Expression/Binary/Range.php | 28 + .../Node/Expression/Binary/StartsWith.php | 30 + .../lib/Twig/Node/Expression/Binary/Sub.php | 18 + .../Twig/Node/Expression/BlockReference.php | 46 + .../twig/lib/Twig/Node/Expression/Call.php | 253 + .../lib/Twig/Node/Expression/Conditional.php | 31 + .../lib/Twig/Node/Expression/Constant.php | 23 + .../Node/Expression/ExtensionReference.php | 32 + .../twig/lib/Twig/Node/Expression/Filter.php | 39 + .../Twig/Node/Expression/Filter/Default.php | 43 + .../lib/Twig/Node/Expression/Function.php | 38 + .../twig/lib/Twig/Node/Expression/GetAttr.php | 63 + .../lib/Twig/Node/Expression/MethodCall.php | 41 + .../twig/lib/Twig/Node/Expression/Name.php | 98 + .../twig/lib/Twig/Node/Expression/Parent.php | 42 + .../lib/Twig/Node/Expression/TempName.php | 26 + .../twig/lib/Twig/Node/Expression/Test.php | 35 + .../Twig/Node/Expression/Test/Constant.php | 46 + .../lib/Twig/Node/Expression/Test/Defined.php | 54 + .../Twig/Node/Expression/Test/Divisibleby.php | 33 + .../lib/Twig/Node/Expression/Test/Even.php | 32 + .../lib/Twig/Node/Expression/Test/Null.php | 31 + .../lib/Twig/Node/Expression/Test/Odd.php | 32 + .../lib/Twig/Node/Expression/Test/Sameas.php | 29 + .../twig/lib/Twig/Node/Expression/Unary.php | 27 + .../lib/Twig/Node/Expression/Unary/Neg.php | 18 + .../lib/Twig/Node/Expression/Unary/Not.php | 18 + .../lib/Twig/Node/Expression/Unary/Pos.php | 18 + .../vendor/twig/twig/lib/Twig/Node/Flush.php | 31 + .../vendor/twig/twig/lib/Twig/Node/For.php | 106 + .../twig/twig/lib/Twig/Node/ForLoop.php | 50 + .../vendor/twig/twig/lib/Twig/Node/If.php | 61 + .../vendor/twig/twig/lib/Twig/Node/Import.php | 49 + .../twig/twig/lib/Twig/Node/Include.php | 83 + .../vendor/twig/twig/lib/Twig/Node/Macro.php | 118 + .../vendor/twig/twig/lib/Twig/Node/Module.php | 403 + .../vendor/twig/twig/lib/Twig/Node/Print.php | 34 + .../twig/twig/lib/Twig/Node/Sandbox.php | 42 + .../twig/lib/Twig/Node/SandboxedPrint.php | 51 + .../vendor/twig/twig/lib/Twig/Node/Set.php | 96 + .../twig/twig/lib/Twig/Node/SetTemp.php | 35 + .../twig/twig/lib/Twig/Node/Spaceless.php | 35 + .../vendor/twig/twig/lib/Twig/Node/Text.php | 34 + .../twig/twig/lib/Twig/NodeInterface.php | 31 + .../twig/lib/Twig/NodeOutputInterface.php | 19 + .../twig/twig/lib/Twig/NodeTraverser.php | 89 + .../twig/lib/Twig/NodeVisitor/Escaper.php | 157 + .../twig/lib/Twig/NodeVisitor/Optimizer.php | 271 + .../lib/Twig/NodeVisitor/SafeAnalysis.php | 154 + .../twig/lib/Twig/NodeVisitor/Sandbox.php | 82 + .../twig/lib/Twig/NodeVisitorInterface.php | 47 + .../vendor/twig/twig/lib/Twig/Parser.php | 394 + .../twig/twig/lib/Twig/ParserInterface.php | 31 + .../lib/Twig/Profiler/Dumper/Blackfire.php | 68 + .../twig/lib/Twig/Profiler/Dumper/Html.php | 43 + .../twig/lib/Twig/Profiler/Dumper/Text.php | 68 + .../lib/Twig/Profiler/Node/EnterProfile.php | 40 + .../lib/Twig/Profiler/Node/LeaveProfile.php | 34 + .../Twig/Profiler/NodeVisitor/Profiler.php | 72 + .../twig/twig/lib/Twig/Profiler/Profile.php | 160 + .../twig/lib/Twig/Sandbox/SecurityError.php | 19 + .../Sandbox/SecurityNotAllowedFilterError.php | 31 + .../SecurityNotAllowedFunctionError.php | 31 + .../Sandbox/SecurityNotAllowedTagError.php | 31 + .../twig/lib/Twig/Sandbox/SecurityPolicy.php | 119 + .../Twig/Sandbox/SecurityPolicyInterface.php | 24 + .../twig/twig/lib/Twig/SimpleFilter.php | 117 + .../twig/twig/lib/Twig/SimpleFunction.php | 107 + .../vendor/twig/twig/lib/Twig/SimpleTest.php | 69 + .../vendor/twig/twig/lib/Twig/Template.php | 614 + .../twig/twig/lib/Twig/TemplateInterface.php | 48 + .../vendor/twig/twig/lib/Twig/Test.php | 37 + .../twig/twig/lib/Twig/Test/Function.php | 38 + .../lib/Twig/Test/IntegrationTestCase.php | 232 + .../vendor/twig/twig/lib/Twig/Test/Method.php | 40 + .../vendor/twig/twig/lib/Twig/Test/Node.php | 40 + .../twig/twig/lib/Twig/Test/NodeTestCase.php | 64 + .../twig/lib/Twig/TestCallableInterface.php | 22 + .../twig/twig/lib/Twig/TestInterface.php | 27 + .../vendor/twig/twig/lib/Twig/Token.php | 216 + .../vendor/twig/twig/lib/Twig/TokenParser.php | 33 + .../twig/lib/Twig/TokenParser/AutoEscape.php | 79 + .../twig/twig/lib/Twig/TokenParser/Block.php | 69 + .../twig/twig/lib/Twig/TokenParser/Do.php | 30 + .../twig/twig/lib/Twig/TokenParser/Embed.php | 54 + .../twig/lib/Twig/TokenParser/Extends.php | 40 + .../twig/twig/lib/Twig/TokenParser/Filter.php | 49 + .../twig/twig/lib/Twig/TokenParser/Flush.php | 30 + .../twig/twig/lib/Twig/TokenParser/For.php | 123 + .../twig/twig/lib/Twig/TokenParser/From.php | 62 + .../twig/twig/lib/Twig/TokenParser/If.php | 82 + .../twig/twig/lib/Twig/TokenParser/Import.php | 37 + .../twig/lib/Twig/TokenParser/Include.php | 63 + .../twig/twig/lib/Twig/TokenParser/Macro.php | 56 + .../twig/lib/Twig/TokenParser/Sandbox.php | 56 + .../twig/twig/lib/Twig/TokenParser/Set.php | 71 + .../twig/lib/Twig/TokenParser/Spaceless.php | 47 + .../twig/twig/lib/Twig/TokenParser/Use.php | 64 + .../twig/twig/lib/Twig/TokenParserBroker.php | 142 + .../lib/Twig/TokenParserBrokerInterface.php | 46 + .../twig/lib/Twig/TokenParserInterface.php | 43 + .../vendor/twig/twig/lib/Twig/TokenStream.php | 155 + .../lib/Twig/Util/DeprecationCollector.php | 82 + .../lib/Twig/Util/TemplateDirIterator.php | 26 + .../vendor/twig/twig/phpunit.xml.dist | 25 + .../twig/test/Twig/Tests/AutoloaderTest.php | 24 + .../test/Twig/Tests/Cache/FilesystemTest.php | 193 + .../twig/test/Twig/Tests/CompilerTest.php | 33 + .../twig/test/Twig/Tests/EnvironmentTest.php | 529 + .../twig/twig/test/Twig/Tests/ErrorTest.php | 144 + .../test/Twig/Tests/ExpressionParserTest.php | 368 + .../test/Twig/Tests/Extension/CoreTest.php | 158 + .../test/Twig/Tests/Extension/SandboxTest.php | 220 + .../twig/test/Twig/Tests/FileCachingTest.php | 63 + .../FileExtensionEscapingStrategyTest.php | 51 + .../twig/test/Twig/Tests/FilesystemHelper.php | 30 + .../Tests/Fixtures/autoescape/filename.test | 18 + .../test/Twig/Tests/Fixtures/errors/base.html | 1 + .../Twig/Tests/Fixtures/errors/index.html | 7 + ...ltiline_array_with_undefined_variable.test | 18 + ...e_array_with_undefined_variable_again.test | 18 + ...line_function_with_undefined_variable.test | 12 + ...tiline_function_with_unknown_argument.test | 9 + ...multiline_tag_with_undefined_variable.test | 12 + .../syntax_error_in_reused_template.test | 10 + .../Fixtures/exceptions/unclosed_tag.test | 20 + .../Fixtures/exceptions/undefined_parent.test | 8 + .../undefined_template_in_child_template.test | 15 + .../Fixtures/exceptions/undefined_trait.test | 9 + .../Tests/Fixtures/expressions/array.test | 61 + .../Fixtures/expressions/array_call.test | 14 + .../Tests/Fixtures/expressions/binary.test | 46 + .../Tests/Fixtures/expressions/bitwise.test | 14 + .../Fixtures/expressions/comparison.test | 14 + .../Fixtures/expressions/divisibleby.test | 17 + .../Tests/Fixtures/expressions/dotdot.test | 20 + .../Tests/Fixtures/expressions/ends_with.test | 26 + .../Tests/Fixtures/expressions/grouping.test | 8 + .../Tests/Fixtures/expressions/literals.test | 22 + .../Fixtures/expressions/magic_call.test | 27 + .../Tests/Fixtures/expressions/matches.test | 12 + .../Fixtures/expressions/method_call.test | 28 + .../expressions/negative_numbers.test | 18 + .../expressions/operators_as_variables.test | 16 + .../Tests/Fixtures/expressions/postfix.test | 22 + .../Tests/Fixtures/expressions/sameas.test | 21 + .../Fixtures/expressions/starts_with.test | 27 + .../Tests/Fixtures/expressions/strings.test | 10 + .../expressions/ternary_operator.test | 18 + .../expressions/ternary_operator_noelse.test | 10 + .../expressions/ternary_operator_nothen.test | 10 + .../two_word_operators_as_variables.test | 8 + .../Tests/Fixtures/expressions/unary.test | 12 + .../expressions/unary_macro_arguments.test | 22 + .../expressions/unary_precedence.test | 14 + .../test/Twig/Tests/Fixtures/filters/abs.test | 30 + .../Twig/Tests/Fixtures/filters/batch.test | 31 + .../Tests/Fixtures/filters/batch_float.test | 29 + .../filters/batch_with_empty_fill.test | 37 + .../filters/batch_with_exact_elements.test | 33 + .../Fixtures/filters/batch_with_fill.test | 37 + .../Fixtures/filters/batch_with_keys.test | 10 + .../filters/batch_with_zero_elements.test | 10 + .../Fixtures/filters/convert_encoding.test | 10 + .../Twig/Tests/Fixtures/filters/date.test | 90 + .../Fixtures/filters/date_default_format.test | 14 + .../filters/date_default_format_interval.test | 16 + .../Fixtures/filters/date_immutable.test | 37 + .../Tests/Fixtures/filters/date_interval.test | 19 + .../Tests/Fixtures/filters/date_modify.test | 14 + .../Fixtures/filters/date_namedargs.test | 13 + .../Twig/Tests/Fixtures/filters/default.test | 150 + .../Fixtures/filters/dynamic_filter.test | 10 + .../Twig/Tests/Fixtures/filters/escape.test | 8 + .../Fixtures/filters/escape_html_attr.test | 8 + .../filters/escape_non_supported_charset.test | 8 + .../Twig/Tests/Fixtures/filters/first.test | 17 + .../Tests/Fixtures/filters/force_escape.test | 18 + .../Twig/Tests/Fixtures/filters/format.test | 8 + .../Twig/Tests/Fixtures/filters/join.test | 12 + .../Tests/Fixtures/filters/json_encode.test | 12 + .../Twig/Tests/Fixtures/filters/last.test | 17 + .../Twig/Tests/Fixtures/filters/length.test | 14 + .../Tests/Fixtures/filters/length_utf8.test | 12 + .../Twig/Tests/Fixtures/filters/merge.test | 18 + .../Twig/Tests/Fixtures/filters/nl2br.test | 14 + .../Tests/Fixtures/filters/number_format.test | 18 + .../filters/number_format_default.test | 21 + .../Twig/Tests/Fixtures/filters/replace.test | 12 + .../Fixtures/filters/replace_invalid_arg.test | 8 + .../Twig/Tests/Fixtures/filters/reverse.test | 18 + .../Twig/Tests/Fixtures/filters/round.test | 22 + .../Twig/Tests/Fixtures/filters/slice.test | 54 + .../Twig/Tests/Fixtures/filters/sort.test | 12 + .../Tests/Fixtures/filters/special_chars.test | 8 + .../Twig/Tests/Fixtures/filters/split.test | 20 + .../Tests/Fixtures/filters/split_utf8.test | 24 + .../Twig/Tests/Fixtures/filters/trim.test | 12 + .../Tests/Fixtures/filters/urlencode.test | 16 + .../filters/urlencode_deprecated.test | 16 + .../Tests/Fixtures/functions/attribute.test | 18 + .../Twig/Tests/Fixtures/functions/block.test | 12 + .../Tests/Fixtures/functions/constant.test | 10 + .../Twig/Tests/Fixtures/functions/cycle.test | 16 + .../Twig/Tests/Fixtures/functions/date.test | 25 + .../Fixtures/functions/date_namedargs.test | 11 + .../Twig/Tests/Fixtures/functions/dump.test | 16 + .../Tests/Fixtures/functions/dump_array.test | 19 + .../Fixtures/functions/dynamic_function.test | 10 + .../functions/include/assignment.test | 13 + .../functions/include/autoescaping.test | 10 + .../Fixtures/functions/include/basic.test | 17 + .../functions/include/expression.test | 17 + .../functions/include/ignore_missing.test | 10 + .../Fixtures/functions/include/missing.test | 8 + .../functions/include/missing_nested.test | 16 + .../Fixtures/functions/include/sandbox.test | 13 + .../functions/include/sandbox_disabling.test | 16 + .../sandbox_disabling_ignore_missing.test | 13 + .../functions/include/template_instance.test | 10 + .../functions/include/templates_as_array.test | 12 + .../functions/include/with_context.test | 16 + .../functions/include/with_variables.test | 12 + .../Twig/Tests/Fixtures/functions/max.test | 12 + .../Twig/Tests/Fixtures/functions/min.test | 12 + .../Twig/Tests/Fixtures/functions/range.test | 8 + .../recursive_block_with_inheritance.test | 21 + .../Twig/Tests/Fixtures/functions/source.test | 17 + .../Fixtures/functions/special_chars.test | 8 + .../functions/template_from_string.test | 15 + .../Tests/Fixtures/macros/default_values.test | 16 + .../Tests/Fixtures/macros/nested_calls.test | 18 + .../Fixtures/macros/reserved_variables.test | 14 + .../Twig/Tests/Fixtures/macros/simple.test | 22 + .../Twig/Tests/Fixtures/macros/varargs.test | 21 + .../Fixtures/macros/varargs_argument.test | 8 + .../Tests/Fixtures/macros/with_filters.test | 14 + .../regression/combined_debug_info.test | 15 + .../Fixtures/regression/empty_token.test | 8 + .../Tests/Fixtures/regression/issue_1143.test | 23 + .../Fixtures/regression/multi_word_tests.test | 10 + .../regression/simple_xml_element.test | 19 + .../regression/strings_like_numbers.test | 8 + .../Tests/Fixtures/tags/autoescape/basic.test | 26 + .../Fixtures/tags/autoescape/blocks.test | 12 + .../tags/autoescape/double_escaping.test | 10 + .../Fixtures/tags/autoescape/functions.test | 83 + .../Fixtures/tags/autoescape/literal.test | 45 + .../Fixtures/tags/autoescape/nested.test | 26 + .../Fixtures/tags/autoescape/objects.test | 26 + .../Tests/Fixtures/tags/autoescape/raw.test | 10 + .../tags/autoescape/strategy.legacy.test | 11 + .../Fixtures/tags/autoescape/strategy.test | 11 + .../Tests/Fixtures/tags/autoescape/type.test | 69 + .../tags/autoescape/with_filters.test | 131 + .../autoescape/with_filters_arguments.test | 23 + .../autoescape/with_pre_escape_filters.test | 68 + .../with_preserves_safety_filters.test | 50 + .../Twig/Tests/Fixtures/tags/block/basic.test | 11 + .../tags/block/block_unique_name.test | 11 + .../Fixtures/tags/block/special_chars.test | 10 + .../Twig/Tests/Fixtures/tags/embed/basic.test | 35 + .../Tests/Fixtures/tags/embed/error_line.test | 16 + .../Tests/Fixtures/tags/embed/multiple.test | 50 + .../Tests/Fixtures/tags/embed/nested.test | 42 + .../Fixtures/tags/embed/with_extends.test | 57 + .../Tests/Fixtures/tags/filter/basic.test | 10 + .../Fixtures/tags/filter/json_encode.test | 8 + .../Tests/Fixtures/tags/filter/multiple.test | 10 + .../Tests/Fixtures/tags/filter/nested.test | 16 + .../Fixtures/tags/filter/with_for_tag.test | 13 + .../Fixtures/tags/filter/with_if_tag.test | 29 + .../Tests/Fixtures/tags/for/condition.test | 14 + .../Twig/Tests/Fixtures/tags/for/context.test | 18 + .../Twig/Tests/Fixtures/tags/for/else.test | 23 + .../Fixtures/tags/for/inner_variables.test | 17 + .../Twig/Tests/Fixtures/tags/for/keys.test | 11 + .../Fixtures/tags/for/keys_and_values.test | 11 + .../Tests/Fixtures/tags/for/loop_context.test | 19 + .../Fixtures/tags/for/loop_context_local.test | 10 + .../Fixtures/tags/for/loop_not_defined.test | 10 + .../tags/for/loop_not_defined_cond.test | 9 + .../Tests/Fixtures/tags/for/nested_else.test | 17 + .../Twig/Tests/Fixtures/tags/for/objects.test | 43 + .../Fixtures/tags/for/objects_countable.test | 47 + .../Tests/Fixtures/tags/for/recursive.test | 18 + .../Twig/Tests/Fixtures/tags/for/values.test | 11 + .../test/Twig/Tests/Fixtures/tags/from.test | 14 + .../Twig/Tests/Fixtures/tags/if/basic.test | 22 + .../Tests/Fixtures/tags/if/expression.test | 22 + .../Tests/Fixtures/tags/include/basic.test | 16 + .../Fixtures/tags/include/expression.test | 16 + .../Fixtures/tags/include/ignore_missing.test | 10 + .../Tests/Fixtures/tags/include/missing.test | 8 + .../Fixtures/tags/include/missing_nested.test | 16 + .../Tests/Fixtures/tags/include/only.test | 16 + .../tags/include/template_instance.test | 10 + .../tags/include/templates_as_array.test | 12 + .../Fixtures/tags/include/with_variables.test | 12 + .../Fixtures/tags/inheritance/basic.test | 14 + .../Fixtures/tags/inheritance/block_expr.test | 32 + .../tags/inheritance/block_expr2.test | 34 + .../tags/inheritance/conditional.test | 14 + .../Fixtures/tags/inheritance/dynamic.test | 14 + .../Fixtures/tags/inheritance/empty.test | 10 + .../tags/inheritance/extends_as_array.test | 12 + .../extends_as_array_with_empty_name.test | 12 + .../extends_as_array_with_null_name.test | 12 + .../Fixtures/tags/inheritance/multiple.test | 12 + .../tags/inheritance/multiple_dynamic.test | 22 + .../tags/inheritance/nested_blocks.test | 22 + .../nested_blocks_parent_only.test | 15 + .../tags/inheritance/nested_inheritance.test | 16 + .../Fixtures/tags/inheritance/parent.test | 12 + .../tags/inheritance/parent_change.test | 16 + .../tags/inheritance/parent_in_a_block.test | 8 + .../tags/inheritance/parent_isolation.test | 20 + .../tags/inheritance/parent_nested.test | 28 + .../inheritance/parent_without_extends.test | 8 + .../parent_without_extends_but_traits.test | 14 + .../tags/inheritance/template_instance.test | 14 + .../Tests/Fixtures/tags/inheritance/use.test | 44 + .../Twig/Tests/Fixtures/tags/macro/basic.test | 17 + .../Fixtures/tags/macro/endmacro_name.test | 16 + .../Tests/Fixtures/tags/macro/external.test | 17 + .../Twig/Tests/Fixtures/tags/macro/from.test | 18 + .../tags/macro/from_with_reserved_name.test | 9 + .../Tests/Fixtures/tags/macro/global.test | 14 + .../tags/macro/import_with_reserved_nam.test | 11 + .../Fixtures/tags/macro/reserved_name.test | 10 + .../Fixtures/tags/macro/self_import.test | 17 + .../Fixtures/tags/macro/special_chars.test | 14 + .../Fixtures/tags/macro/super_globals.test | 14 + .../Tests/Fixtures/tags/raw/basic.legacy.test | 10 + .../tags/raw/mixed_usage_with_raw.legacy.test | 10 + .../tags/raw/whitespace_control.legacy.test | 56 + .../Fixtures/tags/sandbox/not_valid1.test | 11 + .../Fixtures/tags/sandbox/not_valid2.test | 14 + .../Tests/Fixtures/tags/sandbox/simple.test | 22 + .../Twig/Tests/Fixtures/tags/set/basic.test | 20 + .../Fixtures/tags/set/capture-empty.test | 9 + .../Twig/Tests/Fixtures/tags/set/capture.test | 10 + .../Tests/Fixtures/tags/set/expression.test | 12 + .../Tests/Fixtures/tags/spaceless/simple.test | 12 + .../Tests/Fixtures/tags/special_chars.test | 8 + .../Twig/Tests/Fixtures/tags/trim_block.test | 74 + .../Twig/Tests/Fixtures/tags/use/aliases.test | 12 + .../Twig/Tests/Fixtures/tags/use/basic.test | 12 + .../Twig/Tests/Fixtures/tags/use/deep.test | 22 + .../Tests/Fixtures/tags/use/deep_empty.test | 10 + .../Tests/Fixtures/tags/use/inheritance.test | 25 + .../Tests/Fixtures/tags/use/inheritance2.test | 24 + .../Tests/Fixtures/tags/use/multiple.test | 21 + .../Fixtures/tags/use/multiple_aliases.test | 23 + .../Tests/Fixtures/tags/use/parent_block.test | 24 + .../Fixtures/tags/use/parent_block2.test | 24 + .../Fixtures/tags/use/parent_block3.test | 38 + .../Tests/Fixtures/tags/verbatim/basic.test | 10 + .../tags/verbatim/mixed_usage_with_raw.test | 10 + .../tags/verbatim/whitespace_control.test | 56 + .../test/Twig/Tests/Fixtures/tests/array.test | 24 + .../Twig/Tests/Fixtures/tests/constant.test | 14 + .../Twig/Tests/Fixtures/tests/defined.test | 108 + .../test/Twig/Tests/Fixtures/tests/empty.test | 45 + .../test/Twig/Tests/Fixtures/tests/even.test | 14 + .../test/Twig/Tests/Fixtures/tests/in.test | 128 + .../Tests/Fixtures/tests/in_with_objects.test | 19 + .../Twig/Tests/Fixtures/tests/iterable.test | 19 + .../test/Twig/Tests/Fixtures/tests/odd.test | 10 + .../twig/test/Twig/Tests/IntegrationTest.php | 229 + .../Tests/LegacyFixtures/test.legacy.test | 8 + .../test/Twig/Tests/LegacyIntegrationTest.php | 54 + .../twig/twig/test/Twig/Tests/LexerTest.php | 300 + .../twig/test/Twig/Tests/Loader/ArrayTest.php | 97 + .../twig/test/Twig/Tests/Loader/ChainTest.php | 79 + .../test/Twig/Tests/Loader/FilesystemTest.php | 175 + .../array_inheritance_empty_parent.html.twig | 3 + ...y_inheritance_nonexistent_parent.html.twig | 3 + .../array_inheritance_null_parent.html.twig | 3 + .../array_inheritance_valid_parent.html.twig | 3 + .../Fixtures/inheritance/parent.html.twig | 1 + .../inheritance/spare_parent.html.twig | 1 + .../Tests/Loader/Fixtures/named/index.html | 1 + .../Loader/Fixtures/named_bis/index.html | 1 + .../Loader/Fixtures/named_final/index.html | 1 + .../Fixtures/named_quater/named_absolute.html | 1 + .../Loader/Fixtures/named_ter/index.html | 1 + .../Tests/Loader/Fixtures/normal/index.html | 1 + .../Loader/Fixtures/normal_bis/index.html | 1 + .../Loader/Fixtures/normal_final/index.html | 1 + .../Loader/Fixtures/normal_ter/index.html | 1 + .../Fixtures/themes/theme1/blocks.html.twig | 3 + .../Fixtures/themes/theme2/blocks.html.twig | 3 + .../test/Twig/Tests/NativeExtensionTest.php | 33 + .../test/Twig/Tests/Node/AutoEscapeTest.php | 32 + .../Twig/Tests/Node/BlockReferenceTest.php | 31 + .../twig/test/Twig/Tests/Node/BlockTest.php | 39 + .../twig/twig/test/Twig/Tests/Node/DoTest.php | 32 + .../Twig/Tests/Node/Expression/ArrayTest.php | 37 + .../Tests/Node/Expression/AssignNameTest.php | 29 + .../Tests/Node/Expression/Binary/AddTest.php | 34 + .../Tests/Node/Expression/Binary/AndTest.php | 34 + .../Node/Expression/Binary/ConcatTest.php | 34 + .../Tests/Node/Expression/Binary/DivTest.php | 34 + .../Node/Expression/Binary/FloorDivTest.php | 34 + .../Tests/Node/Expression/Binary/ModTest.php | 34 + .../Tests/Node/Expression/Binary/MulTest.php | 34 + .../Tests/Node/Expression/Binary/OrTest.php | 34 + .../Tests/Node/Expression/Binary/SubTest.php | 34 + .../Twig/Tests/Node/Expression/CallTest.php | 116 + .../Tests/Node/Expression/ConditionalTest.php | 38 + .../Tests/Node/Expression/ConstantTest.php | 30 + .../Twig/Tests/Node/Expression/FilterTest.php | 154 + .../Tests/Node/Expression/FunctionTest.php | 110 + .../Tests/Node/Expression/GetAttrTest.php | 50 + .../Twig/Tests/Node/Expression/NameTest.php | 35 + .../Node/Expression/PHP53/FilterInclude.php | 6 + .../Node/Expression/PHP53/FunctionInclude.php | 6 + .../Node/Expression/PHP53/TestInclude.php | 6 + .../Twig/Tests/Node/Expression/ParentTest.php | 28 + .../Twig/Tests/Node/Expression/TestTest.php | 82 + .../Tests/Node/Expression/Unary/NegTest.php | 32 + .../Tests/Node/Expression/Unary/NotTest.php | 31 + .../Tests/Node/Expression/Unary/PosTest.php | 31 + .../twig/test/Twig/Tests/Node/ForTest.php | 191 + .../twig/twig/test/Twig/Tests/Node/IfTest.php | 88 + .../twig/test/Twig/Tests/Node/ImportTest.php | 40 + .../twig/test/Twig/Tests/Node/IncludeTest.php | 83 + .../twig/test/Twig/Tests/Node/MacroTest.php | 70 + .../twig/test/Twig/Tests/Node/ModuleTest.php | 183 + .../twig/test/Twig/Tests/Node/PrintTest.php | 29 + .../twig/test/Twig/Tests/Node/SandboxTest.php | 44 + .../Twig/Tests/Node/SandboxedPrintTest.php | 33 + .../twig/test/Twig/Tests/Node/SetTest.php | 69 + .../test/Twig/Tests/Node/SpacelessTest.php | 37 + .../twig/test/Twig/Tests/Node/TextTest.php | 28 + .../Twig/Tests/NodeVisitor/OptimizerTest.php | 124 + .../twig/twig/test/Twig/Tests/ParserTest.php | 196 + .../Tests/Profiler/Dumper/AbstractTest.php | 101 + .../Tests/Profiler/Dumper/BlackfireTest.php | 32 + .../Twig/Tests/Profiler/Dumper/HtmlTest.php | 30 + .../Twig/Tests/Profiler/Dumper/TextTest.php | 30 + .../test/Twig/Tests/Profiler/ProfileTest.php | 100 + .../twig/test/Twig/Tests/TemplateTest.php | 693 + .../twig/test/Twig/Tests/TokenStreamTest.php | 70 + .../twig/test/Twig/Tests/escapingTest.php | 320 + .../vendor/twig/twig/test/bootstrap.php | 13 + src/css/style.css | 4 + src/data.php | 33 +- src/footer.php | 5 +- src/header.php | 53 +- src/images/clone.png | Bin 0 -> 603 bytes src/images/file-icons/_blank.png | Bin 0 -> 446 bytes src/images/file-icons/_page.png | Bin 0 -> 710 bytes src/images/file-icons/csv.png | Bin 0 -> 480 bytes src/images/file-icons/html.png | Bin 0 -> 536 bytes src/images/file-icons/pdf.png | Bin 0 -> 3478 bytes src/images/log.png | Bin 0 -> 611 bytes src/include.common.php | 2 +- src/includes.inc.php | 11 + src/js/app-global.js | 4 +- src/js/downloadify/images/download.png | Bin 0 -> 2500 bytes src/js/downloadify/js/downloadify.min.js | 3 + src/js/downloadify/js/swfobject.js | 4 + src/js/downloadify/media/downloadify.swf | Bin 0 -> 2625 bytes src/js/jquery-ui.js | 16617 ++++++++++++++++ src/lang/de.po | 1601 ++ src/lang/en.po | 1602 ++ src/lang/es.po | 1601 ++ src/lang/fr.po | 1601 ++ src/lang/hi.po | 1601 ++ src/lang/it.po | 1601 ++ src/lang/ja.po | 1601 ++ src/lang/pl.po | 1601 ++ src/lang/si.po | 1601 ++ src/lang/zh.po | 1601 ++ src/model/models.base.php | 58 + src/model/models.inc.php | 63 +- src/modulejslibs.inc.php | 2 +- src/modules.php | 2 - src/popups.php | 104 +- src/server.includes.inc.php | 5 + src/service.php | 6 +- src/templates/app/profile_info.html | 2 +- src/templates/app/switched_profile_info.html | 2 +- src/templates/datagroup_template.html | 2 +- src/templates/fields/datagroup.html | 4 +- src/templates/fields/fileupload.html | 6 +- src/templates/filter_template.html | 2 +- src/templates/form_template.html | 4 +- src/templates/menu/menuButtonHelp.html | 4 +- src/templates/menu/menuButtonProfile.html | 4 +- src/templates/menu/menuButtonQuick.html | 2 +- .../menu/menuButtonSwitchProfile.html | 2 +- src/themecss/AdminLTE.css | 1312 +- src/themecss/adminLTENew/AdminLTE.css | 4915 +++++ src/utils/CalendarTools.php | 6 + test/TestTemplate.php | 65 +- test/bootstrap.php | 46 +- test/test.config.php | 20 +- test/test.includes.php | 46 +- 882 files changed, 90619 insertions(+), 2546 deletions(-) create mode 100644 core-ext/scripts/upgrade_v16.0.PRO_v18.0.PRO.sql delete mode 100644 src/app/data/placeholder.txt create mode 100644 src/classes/ApprovalStatus.php create mode 100644 src/classes/LanguageManager.php create mode 100644 src/classes/StatusChangeLogManager.php create mode 100644 src/composer/vendor/composer/LICENSE create mode 100644 src/composer/vendor/composer/autoload_static.php create mode 100644 src/composer/vendor/gettext/gettext/CONTRIBUTING.md create mode 100644 src/composer/vendor/gettext/gettext/LICENSE create mode 100644 src/composer/vendor/gettext/gettext/README.md create mode 100644 src/composer/vendor/gettext/gettext/composer.json create mode 100644 src/composer/vendor/gettext/gettext/src/BaseTranslator.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/Blade.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/Csv.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/CsvDictionary.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/Extractor.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/ExtractorInterface.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/Jed.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/JsCode.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/Json.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/JsonDictionary.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/Mo.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/PhpArray.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/PhpCode.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/Po.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/Twig.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/Xliff.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/Yaml.php create mode 100644 src/composer/vendor/gettext/gettext/src/Extractors/YamlDictionary.php create mode 100644 src/composer/vendor/gettext/gettext/src/Generators/Csv.php create mode 100644 src/composer/vendor/gettext/gettext/src/Generators/CsvDictionary.php create mode 100644 src/composer/vendor/gettext/gettext/src/Generators/Generator.php create mode 100644 src/composer/vendor/gettext/gettext/src/Generators/GeneratorInterface.php create mode 100644 src/composer/vendor/gettext/gettext/src/Generators/Jed.php create mode 100644 src/composer/vendor/gettext/gettext/src/Generators/Json.php create mode 100644 src/composer/vendor/gettext/gettext/src/Generators/JsonDictionary.php create mode 100644 src/composer/vendor/gettext/gettext/src/Generators/Mo.php create mode 100644 src/composer/vendor/gettext/gettext/src/Generators/PhpArray.php create mode 100644 src/composer/vendor/gettext/gettext/src/Generators/Po.php create mode 100644 src/composer/vendor/gettext/gettext/src/Generators/Xliff.php create mode 100644 src/composer/vendor/gettext/gettext/src/Generators/Yaml.php create mode 100644 src/composer/vendor/gettext/gettext/src/Generators/YamlDictionary.php create mode 100644 src/composer/vendor/gettext/gettext/src/GettextTranslator.php create mode 100644 src/composer/vendor/gettext/gettext/src/Merge.php create mode 100644 src/composer/vendor/gettext/gettext/src/Translation.php create mode 100644 src/composer/vendor/gettext/gettext/src/Translations.php create mode 100644 src/composer/vendor/gettext/gettext/src/Translator.php create mode 100644 src/composer/vendor/gettext/gettext/src/TranslatorInterface.php create mode 100644 src/composer/vendor/gettext/gettext/src/Utils/DictionaryTrait.php create mode 100644 src/composer/vendor/gettext/gettext/src/Utils/FunctionsScanner.php create mode 100644 src/composer/vendor/gettext/gettext/src/Utils/HeadersExtractorTrait.php create mode 100644 src/composer/vendor/gettext/gettext/src/Utils/HeadersGeneratorTrait.php create mode 100644 src/composer/vendor/gettext/gettext/src/Utils/JsFunctionsScanner.php create mode 100644 src/composer/vendor/gettext/gettext/src/Utils/MultidimensionalArrayTrait.php create mode 100644 src/composer/vendor/gettext/gettext/src/Utils/ParsedFunction.php create mode 100644 src/composer/vendor/gettext/gettext/src/Utils/PhpFunctionsScanner.php create mode 100644 src/composer/vendor/gettext/gettext/src/Utils/StringReader.php create mode 100644 src/composer/vendor/gettext/gettext/src/autoloader.php create mode 100644 src/composer/vendor/gettext/gettext/src/translator_functions.php create mode 100644 src/composer/vendor/gettext/languages/LICENSE create mode 100644 src/composer/vendor/gettext/languages/UNICODE-LICENSE.txt create mode 100644 src/composer/vendor/gettext/languages/bin/export.cmd create mode 100644 src/composer/vendor/gettext/languages/bin/export.php create mode 100755 src/composer/vendor/gettext/languages/bin/export.sh create mode 100644 src/composer/vendor/gettext/languages/composer.json create mode 100644 src/composer/vendor/gettext/languages/src/Category.php create mode 100644 src/composer/vendor/gettext/languages/src/CldrData.php create mode 100644 src/composer/vendor/gettext/languages/src/Exporter/Docs.php create mode 100644 src/composer/vendor/gettext/languages/src/Exporter/Exporter.php create mode 100644 src/composer/vendor/gettext/languages/src/Exporter/Html.php create mode 100644 src/composer/vendor/gettext/languages/src/Exporter/Json.php create mode 100644 src/composer/vendor/gettext/languages/src/Exporter/Php.php create mode 100644 src/composer/vendor/gettext/languages/src/Exporter/Po.php create mode 100644 src/composer/vendor/gettext/languages/src/Exporter/Prettyjson.php create mode 100644 src/composer/vendor/gettext/languages/src/Exporter/Xml.php create mode 100644 src/composer/vendor/gettext/languages/src/FormulaConverter.php create mode 100644 src/composer/vendor/gettext/languages/src/Language.php create mode 100644 src/composer/vendor/gettext/languages/src/autoloader.php create mode 100644 src/composer/vendor/gettext/languages/src/cldr-data/main/en-US/languages.json create mode 100644 src/composer/vendor/gettext/languages/src/cldr-data/main/en-US/scripts.json create mode 100644 src/composer/vendor/gettext/languages/src/cldr-data/main/en-US/territories.json create mode 100644 src/composer/vendor/gettext/languages/src/cldr-data/supplemental/plurals.json create mode 100644 src/composer/vendor/twig/twig/.editorconfig create mode 100644 src/composer/vendor/twig/twig/.gitignore create mode 100644 src/composer/vendor/twig/twig/.travis.yml create mode 100644 src/composer/vendor/twig/twig/CHANGELOG create mode 100644 src/composer/vendor/twig/twig/LICENSE create mode 100644 src/composer/vendor/twig/twig/README.rst create mode 100644 src/composer/vendor/twig/twig/composer.json create mode 100644 src/composer/vendor/twig/twig/doc/advanced.rst create mode 100644 src/composer/vendor/twig/twig/doc/advanced_legacy.rst create mode 100644 src/composer/vendor/twig/twig/doc/api.rst create mode 100644 src/composer/vendor/twig/twig/doc/coding_standards.rst create mode 100644 src/composer/vendor/twig/twig/doc/deprecated.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/abs.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/batch.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/capitalize.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/convert_encoding.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/date.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/date_modify.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/default.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/escape.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/first.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/format.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/index.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/join.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/json_encode.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/keys.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/last.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/length.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/lower.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/merge.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/nl2br.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/number_format.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/raw.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/replace.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/reverse.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/round.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/slice.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/sort.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/split.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/striptags.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/title.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/trim.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/upper.rst create mode 100644 src/composer/vendor/twig/twig/doc/filters/url_encode.rst create mode 100644 src/composer/vendor/twig/twig/doc/functions/attribute.rst create mode 100644 src/composer/vendor/twig/twig/doc/functions/block.rst create mode 100644 src/composer/vendor/twig/twig/doc/functions/constant.rst create mode 100644 src/composer/vendor/twig/twig/doc/functions/cycle.rst create mode 100644 src/composer/vendor/twig/twig/doc/functions/date.rst create mode 100644 src/composer/vendor/twig/twig/doc/functions/dump.rst create mode 100644 src/composer/vendor/twig/twig/doc/functions/include.rst create mode 100644 src/composer/vendor/twig/twig/doc/functions/index.rst create mode 100644 src/composer/vendor/twig/twig/doc/functions/max.rst create mode 100644 src/composer/vendor/twig/twig/doc/functions/min.rst create mode 100644 src/composer/vendor/twig/twig/doc/functions/parent.rst create mode 100644 src/composer/vendor/twig/twig/doc/functions/random.rst create mode 100644 src/composer/vendor/twig/twig/doc/functions/range.rst create mode 100644 src/composer/vendor/twig/twig/doc/functions/source.rst create mode 100644 src/composer/vendor/twig/twig/doc/functions/template_from_string.rst create mode 100644 src/composer/vendor/twig/twig/doc/index.rst create mode 100644 src/composer/vendor/twig/twig/doc/installation.rst create mode 100644 src/composer/vendor/twig/twig/doc/internals.rst create mode 100644 src/composer/vendor/twig/twig/doc/intro.rst create mode 100644 src/composer/vendor/twig/twig/doc/recipes.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/autoescape.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/block.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/do.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/embed.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/extends.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/filter.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/flush.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/for.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/from.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/if.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/import.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/include.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/index.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/macro.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/sandbox.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/set.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/spaceless.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/use.rst create mode 100644 src/composer/vendor/twig/twig/doc/tags/verbatim.rst create mode 100644 src/composer/vendor/twig/twig/doc/templates.rst create mode 100644 src/composer/vendor/twig/twig/doc/tests/constant.rst create mode 100644 src/composer/vendor/twig/twig/doc/tests/defined.rst create mode 100644 src/composer/vendor/twig/twig/doc/tests/divisibleby.rst create mode 100644 src/composer/vendor/twig/twig/doc/tests/empty.rst create mode 100644 src/composer/vendor/twig/twig/doc/tests/even.rst create mode 100644 src/composer/vendor/twig/twig/doc/tests/index.rst create mode 100644 src/composer/vendor/twig/twig/doc/tests/iterable.rst create mode 100644 src/composer/vendor/twig/twig/doc/tests/null.rst create mode 100644 src/composer/vendor/twig/twig/doc/tests/odd.rst create mode 100644 src/composer/vendor/twig/twig/doc/tests/sameas.rst create mode 100644 src/composer/vendor/twig/twig/ext/twig/.gitignore create mode 100644 src/composer/vendor/twig/twig/ext/twig/config.m4 create mode 100644 src/composer/vendor/twig/twig/ext/twig/config.w32 create mode 100644 src/composer/vendor/twig/twig/ext/twig/php_twig.h create mode 100644 src/composer/vendor/twig/twig/ext/twig/twig.c create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Autoloader.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/BaseNodeVisitor.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Cache/Filesystem.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Cache/Null.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/CacheInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Compiler.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/CompilerInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Environment.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Error.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Error/Loader.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Error/Runtime.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Error/Syntax.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/ExpressionParser.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Extension.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Extension/Core.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Extension/Debug.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Extension/Escaper.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Extension/GlobalsInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Extension/InitRuntimeInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Extension/Optimizer.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Extension/Profiler.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Extension/Sandbox.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Extension/Staging.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Extension/StringLoader.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/ExtensionInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Filter.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Filter/Function.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Filter/Method.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Filter/Node.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/FilterCallableInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/FilterInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Function.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Function/Function.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Function/Method.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Function/Node.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/FunctionCallableInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/FunctionInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Lexer.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/LexerInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Loader/Array.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Loader/Chain.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Loader/Filesystem.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Loader/String.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/LoaderInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Markup.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/AutoEscape.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Block.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/BlockReference.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Body.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Do.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Embed.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Array.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/AssignName.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Add.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/And.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseAnd.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseOr.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/BitwiseXor.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Concat.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Div.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/EndsWith.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Equal.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Greater.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/In.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Less.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/LessEqual.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Matches.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mod.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Mul.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotEqual.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Or.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Power.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Range.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/StartsWith.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Sub.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Call.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Filter/Default.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Function.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Name.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Parent.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/TempName.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Test.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Test/Constant.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Test/Even.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Test/Null.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Test/Odd.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Not.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Pos.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Flush.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/For.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/ForLoop.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/If.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Import.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Include.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Macro.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Module.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Print.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Sandbox.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Set.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/SetTemp.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Spaceless.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Node/Text.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/NodeInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/NodeOutputInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/NodeTraverser.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/NodeVisitorInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Parser.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/ParserInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Profiler/Dumper/Text.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Profiler/Profile.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Sandbox/SecurityError.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFunctionError.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedTagError.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicyInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/SimpleFilter.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/SimpleFunction.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/SimpleTest.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Template.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TemplateInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Test.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Test/Function.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Test/Method.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Test/Node.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TestCallableInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TestInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Token.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/Block.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/Do.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/Embed.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/Extends.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/Filter.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/Flush.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/For.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/From.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/If.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/Import.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/Include.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/Macro.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/Set.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParser/Use.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParserBroker.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenParserInterface.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/TokenStream.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php create mode 100644 src/composer/vendor/twig/twig/lib/Twig/Util/TemplateDirIterator.php create mode 100644 src/composer/vendor/twig/twig/phpunit.xml.dist create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/AutoloaderTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Cache/FilesystemTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/CompilerTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/ErrorTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/FilesystemHelper.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/filename.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/errors/base.html create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/errors/index.html create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable_again.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_function_with_undefined_variable.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_function_with_unknown_argument.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_tag_with_undefined_variable.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/syntax_error_in_reused_template.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/unclosed_tag.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_parent.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_template_in_child_template.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_trait.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array_call.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/comparison.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/divisibleby.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/dotdot.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/grouping.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/literals.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/magic_call.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/matches.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/method_call.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/negative_numbers.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/operators_as_variables.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/postfix.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/sameas.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/starts_with.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/strings.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_noelse.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_nothen.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/two_word_operators_as_variables.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_macro_arguments.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_precedence.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/abs.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_float.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_empty_fill.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_exact_elements.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_fill.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_keys.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_zero_elements.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/convert_encoding.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format_interval.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_immutable.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_interval.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_modify.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_namedargs.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/dynamic_filter.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_html_attr.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_non_supported_charset.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/first.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/force_escape.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/format.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/join.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/json_encode.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/last.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length_utf8.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/merge.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/nl2br.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format_default.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace_invalid_arg.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/reverse.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/round.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/slice.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/sort.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/special_chars.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split_utf8.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/trim.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode_deprecated.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/constant.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/cycle.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date_namedargs.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump_array.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dynamic_function.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/assignment.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/autoescaping.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/basic.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/expression.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/ignore_missing.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing_nested.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling_ignore_missing.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/template_instance.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/templates_as_array.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_context.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_variables.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/max.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/min.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/range.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/recursive_block_with_inheritance.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/source.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/special_chars.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/default_values.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/nested_calls.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/reserved_variables.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/simple.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/varargs.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/varargs_argument.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/with_filters.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/combined_debug_info.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/empty_token.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/issue_1143.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/multi_word_tests.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/strings_like_numbers.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/basic.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/blocks.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/double_escaping.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/functions.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/literal.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/nested.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/objects.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/raw.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.legacy.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/type.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters_arguments.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_pre_escape_filters.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_preserves_safety_filters.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/basic.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/block_unique_name.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/special_chars.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/basic.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/error_line.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/multiple.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/nested.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/with_extends.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/basic.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/json_encode.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/multiple.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/nested.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_for_tag.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/condition.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/context.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/else.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/inner_variables.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys_and_values.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context_local.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined_cond.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/nested_else.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects_countable.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/recursive.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/values.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/from.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/basic.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/expression.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/basic.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/expression.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/ignore_missing.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing_nested.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/only.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/template_instance.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/templates_as_array.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/with_variables.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/basic.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr2.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/conditional.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/dynamic.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/empty.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_empty_name.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_null_name.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple_dynamic.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks_parent_only.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_inheritance.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_change.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_in_a_block.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_isolation.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_nested.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_without_extends.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_without_extends_but_traits.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/template_instance.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/use.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/basic.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/endmacro_name.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/external.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from_with_reserved_name.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/global.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/import_with_reserved_nam.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/reserved_name.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/self_import.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/special_chars.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/super_globals.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/basic.legacy.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/mixed_usage_with_raw.legacy.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/whitespace_control.legacy.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/sandbox/not_valid1.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/sandbox/not_valid2.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/sandbox/simple.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/basic.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture-empty.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/expression.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/spaceless/simple.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/special_chars.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/trim_block.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/aliases.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/basic.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep_empty.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance2.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple_aliases.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block2.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block3.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/basic.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/mixed_usage_with_raw.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/whitespace_control.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/array.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/constant.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/empty.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/even.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/iterable.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/odd.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/test.legacy.test create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/LegacyIntegrationTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/LexerTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/ArrayTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/inheritance/array_inheritance_empty_parent.html.twig create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/inheritance/array_inheritance_nonexistent_parent.html.twig create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/inheritance/array_inheritance_null_parent.html.twig create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/inheritance/array_inheritance_valid_parent.html.twig create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/inheritance/parent.html.twig create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/inheritance/spare_parent.html.twig create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named/index.html create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_bis/index.html create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_final/index.html create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_quater/named_absolute.html create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/named_ter/index.html create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal/index.html create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal_bis/index.html create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal_final/index.html create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/normal_ter/index.html create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/themes/theme1/blocks.html.twig create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Loader/Fixtures/themes/theme2/blocks.html.twig create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/NativeExtensionTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/DoTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/ArrayTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/FilterInclude.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/FunctionInclude.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/TestInclude.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/ForTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/IfTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/SetTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Node/TextTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/ParserTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/BlackfireTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/HtmlTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/TextTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/TemplateTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php create mode 100644 src/composer/vendor/twig/twig/test/Twig/Tests/escapingTest.php create mode 100644 src/composer/vendor/twig/twig/test/bootstrap.php create mode 100644 src/images/clone.png create mode 100755 src/images/file-icons/_blank.png create mode 100755 src/images/file-icons/_page.png create mode 100644 src/images/file-icons/csv.png create mode 100644 src/images/file-icons/html.png create mode 100644 src/images/file-icons/pdf.png create mode 100644 src/images/log.png create mode 100755 src/js/downloadify/images/download.png create mode 100755 src/js/downloadify/js/downloadify.min.js create mode 100755 src/js/downloadify/js/swfobject.js create mode 100755 src/js/downloadify/media/downloadify.swf create mode 100644 src/js/jquery-ui.js create mode 100644 src/lang/de.po create mode 100644 src/lang/en.po create mode 100644 src/lang/es.po create mode 100644 src/lang/fr.po create mode 100644 src/lang/hi.po create mode 100644 src/lang/it.po create mode 100644 src/lang/ja.po create mode 100644 src/lang/pl.po create mode 100644 src/lang/si.po create mode 100644 src/lang/zh.po create mode 100755 src/themecss/adminLTENew/AdminLTE.css diff --git a/core-ext/config.base.php b/core-ext/config.base.php index 54789f1b..56fd565c 100644 --- a/core-ext/config.base.php +++ b/core-ext/config.base.php @@ -9,9 +9,9 @@ define('HOME_LINK_ADMIN', CLIENT_BASE_URL."?g=admin&n=dashboard&m=admin_Admin"); define('HOME_LINK_OTHERS', CLIENT_BASE_URL."?g=modules&n=dashboard&m=module_Personal_Information"); //Version -define('VERSION', '16.1.OS'); -define('CACHE_VALUE', '16.1.OS'); -define('VERSION_DATE', '02/05/2016'); +define('VERSION', '18.0.OS'); +define('CACHE_VALUE', '18.0.OS'); +define('VERSION_DATE', '04/08/2016'); if(!defined('CONTACT_EMAIL')){define('CONTACT_EMAIL','icehrm@gamonoid.com');} if(!defined('KEY_PREFIX')){define('KEY_PREFIX','IceHrm');} @@ -19,3 +19,10 @@ if(!defined('APP_SEC')){define('APP_SEC','dbcs234d2s111');} define('UI_SHOW_SWITCH_PROFILE', true); define('CRON_LOG', '/var/log/nginx/icehrmcron.log'); + +define('MEMCACHE_HOST', '127.0.0.1'); +define('MEMCACHE_PORT', '11211'); + +if(!defined('WK_HTML_PATH')){ + define('WK_HTML_PATH', '/usr/bin/wkhtmltopdf'); +} diff --git a/core-ext/model/models.base.php b/core-ext/model/models.base.php index d5bf88fd..823cbcfa 100644 --- a/core-ext/model/models.base.php +++ b/core-ext/model/models.base.php @@ -1,6 +1,19 @@ $v){ + if(in_array($k,$this->keysToIgnore )){ + continue; + } + + if(is_array($v) || is_object($v)){ + continue; + } + + $keys[$k] = $k; + } + + return $keys; + } + + public function getCustomFields($obj){ + $keys = array(); + $objKeys = $this->getObjectKeys(); + foreach($obj as $k=>$v){ + if(isset($objKeys[$k])){ + continue; + } + + if(is_array($v) || is_object($v)){ + continue; + } + + if(in_array($k,$this->keysToIgnore )){ + continue; + } + + $keys[$k] = $k; + } + + return $keys; + + } +} diff --git a/core-ext/popups.php b/core-ext/popups.php index 7a6d2fc7..a96b05dd 100644 --- a/core-ext/popups.php +++ b/core-ext/popups.php @@ -118,8 +118,8 @@

Step 1:
Please get your Instance Key from here:
- - http://icehrm.com/generateInstanceKey.php?id=getInstanceId()?> + + https://icehrm.com/generateInstanceKey.php?id=getInstanceId()?>
Step 2:
@@ -151,36 +151,36 @@ user_level == 'Admin'){?> - -

- - \ No newline at end of file + + + + diff --git a/core-ext/scripts/icehrm_master_data.sql b/core-ext/scripts/icehrm_master_data.sql index b423cc05..96e25cdd 100644 --- a/core-ext/scripts/icehrm_master_data.sql +++ b/core-ext/scripts/icehrm_master_data.sql @@ -791,46 +791,45 @@ INSERT INTO `WorkDays` (`id`, `name`, `status`, `country`) VALUES (7, 'Sunday', 'Non-working Day',NULL); -INSERT INTO `Reports` (`id`, `name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`) VALUES - (1, 'Employee Details Report', 'This report list all employee details and you can filter employees by department, employment status or job title', '[\r\n[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"allow-null":true}],\r\n[ "employment_status", {"label":"Employment Status","type":"select2","remote-source":["EmploymentStatus","id","name"],"allow-null":true}],\r\n[ "job_title", {"label":"Job Title","type":"select2","remote-source":["JobTitle","id","name"],"allow-null":true}]\r\n]', 'Select id, employee_id as ''Employee ID'',\r\nconcat(`first_name`,'' '',`middle_name`,'' '', `last_name`) as ''Name'',\r\n(SELECT name from Nationality where id = nationality) as ''Nationality'',\r\nbirthday as ''Birthday'',\r\ngender as ''Gender'',\r\nmarital_status as ''Marital Status'',\r\nssn_num as ''SSN Number'',\r\nnic_num as ''NIC Number'',\r\nother_id as ''Other IDs'',\r\ndriving_license as ''Driving License Number'',\r\n(SELECT name from EmploymentStatus where id = employment_status) as ''Employment Status'',\r\n(SELECT name from JobTitles where id = job_title) as ''Job Title'',\r\n(SELECT name from PayGrades where id = pay_grade) as ''Pay Grade'',\r\nwork_station_id as ''Work Station ID'',\r\naddress1 as ''Address 1'',\r\naddress2 as ''Address 2'',\r\ncity as ''City'',\r\n(SELECT name from Country where code = country) as ''Country'',\r\n(SELECT name from Province where id = province) as ''Province'',\r\npostal_code as ''Postal Code'',\r\nhome_phone as ''Home Phone'',\r\nmobile_phone as ''Mobile Phone'',\r\nwork_phone as ''Work Phone'',\r\nwork_email as ''Work Email'',\r\nprivate_email as ''Private Email'',\r\njoined_date as ''Joined Date'',\r\nconfirmation_date as ''Confirmation Date'',\r\n(SELECT title from CompanyStructures where id = department) as ''Department'',\r\n(SELECT concat(`first_name`,'' '',`middle_name`,'' '', `last_name`,'' [Employee ID:'',`employee_id`,'']'') from Employees e1 where e1.id = e.supervisor) as ''Supervisor'' \r\nFROM Employees e _where_', '["department","employment_status","job_title"]', 'Query', 'Employee Information'), - (3, 'Employee Time Entry Report', 'This report list all employee time entries by employee, date range and project', '[\r\n[ "employee", {"label":"Employee","type":"select2multi","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "project", {"label":"Project","type":"select","allow-null":true,"remote-source":["Project","id","name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'EmployeeTimesheetReport', '["employee","date_start","date_end","status"]', 'Class','Time Management'), - (4, 'Employee Attendance Report', 'This report list all employee attendance entries by employee and date range', '[\r\n[ "employee", {"label":"Employee","type":"select2multi","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'EmployeeAttendanceReport', '["employee","date_start","date_end"]', 'Class','Time Management'), - (5, 'Employee Time Tracking Report', 'This report list employee working hours and attendance details for each day for a given period ', '[\r\n[ "employee", {"label":"Employee","type":"select2","allow-null":false,"remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'EmployeeTimeTrackReport', '["employee","date_start","date_end"]', 'Class','Time Management'); +REPLACE INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Employee Details Report', 'This report list all employee details and you can filter employees by department, employment status or job title', '[\r\n[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"allow-null":true}],\r\n[ "employment_status", {"label":"Employment Status","type":"select2","remote-source":["EmploymentStatus","id","name"],"allow-null":true}],\r\n[ "job_title", {"label":"Job Title","type":"select2","remote-source":["JobTitle","id","name"],"allow-null":true}]\r\n]', 'Select id, employee_id as ''Employee ID'',\r\nconcat(`first_name`,'' '',`middle_name`,'' '', `last_name`) as ''Name'',\r\n(SELECT name from Nationality where id = nationality) as ''Nationality'',\r\nbirthday as ''Birthday'',\r\ngender as ''Gender'',\r\nmarital_status as ''Marital Status'',\r\nssn_num as ''SSN Number'',\r\nnic_num as ''NIC Number'',\r\nother_id as ''Other IDs'',\r\ndriving_license as ''Driving License Number'',\r\n(SELECT name from EmploymentStatus where id = employment_status) as ''Employment Status'',\r\n(SELECT name from JobTitles where id = job_title) as ''Job Title'',\r\n(SELECT name from PayGrades where id = pay_grade) as ''Pay Grade'',\r\nwork_station_id as ''Work Station ID'',\r\naddress1 as ''Address 1'',\r\naddress2 as ''Address 2'',\r\ncity as ''City'',\r\n(SELECT name from Country where code = country) as ''Country'',\r\n(SELECT name from Province where id = province) as ''Province'',\r\npostal_code as ''Postal Code'',\r\nhome_phone as ''Home Phone'',\r\nmobile_phone as ''Mobile Phone'',\r\nwork_phone as ''Work Phone'',\r\nwork_email as ''Work Email'',\r\nprivate_email as ''Private Email'',\r\njoined_date as ''Joined Date'',\r\nconfirmation_date as ''Confirmation Date'',\r\n(SELECT title from CompanyStructures where id = department) as ''Department'',\r\n(SELECT concat(`first_name`,'' '',`middle_name`,'' '', `last_name`,'' [Employee ID:'',`employee_id`,'']'') from Employees e1 where e1.id = e.supervisor) as ''Supervisor'' \r\nFROM Employees e _where_', '["department","employment_status","job_title"]', 'Query', 'Employee Information','CSV'), + ('Employee Attendance Report', 'This report list all employee attendance entries by employee and date range', '[\r\n[ "employee", {"label":"Employee","type":"select2multi","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'EmployeeAttendanceReport', '["employee","date_start","date_end"]', 'Class','Time Management','CSV'), + ('Employee Time Tracking Report', 'This report list employee working hours and attendance details for each day for a given period ', '[\r\n[ "employee", {"label":"Employee","type":"select2","allow-null":false,"remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'EmployeeTimeTrackReport', '["employee","date_start","date_end"]', 'Class','Time Management','CSV'); -INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`) VALUES + +REPLACE INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Employee Time Entry Report', 'View employee time entries by date range and project', + '[\r\n[ "employee", {"label":"Employee","type":"select2multi","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "client", {"label":"Select Client","type":"select","allow-null":true,"null-label":"Not Selected","remote-source":["Client","id","name"]}],\r\n[ "project", {"label":"Or Project","type":"select","allow-null":true,"null-label":"All Projects","remote-source":["Project","id","name","getAllProjects"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', + 'EmployeeTimesheetReport', '["employee","client","project","date_start","date_end","status"]', 'Class','Time Management','CSV'); + + +REPLACE INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES ('Active Employee Report', 'This report list employees who are currently active based on joined date and termination date ', '[\r\n[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"allow-null":true}]\r\n]', 'ActiveEmployeeReport', - '["department"]', 'Class','Employee Information'); + '["department"]', 'Class','Employee Information','CSV'); -INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`, `report_group`) VALUES +REPLACE INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`, `report_group`,`output`) VALUES ('New Hires Employee Report', 'This report list employees who are joined between given two dates ', '[[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"allow-null":true}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'NewHiresEmployeeReport', - '["department","date_start","date_end"]', 'Class','Employee Information'); + '["department","date_start","date_end"]', 'Class','Employee Information','CSV'); -INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`, `report_group`) VALUES +REPLACE INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`, `report_group`,`output`) VALUES ('Terminated Employee Report', 'This report list employees who are terminated between given two dates ', '[[ "department", {"label":"Department","type":"select2","remote-source":["CompanyStructure","id","title"],"allow-null":true}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'TerminatedEmployeeReport', - '["department","date_start","date_end"]', 'Class','Employee Information'); + '["department","date_start","date_end"]', 'Class','Employee Information','CSV'); REPLACE INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`) VALUES ('Travel Request Report', 'This report list employees travel requests for a specified period', '[\r\n[ "employee", {"label":"Employee","type":"select2multi","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}],\r\n[ "status", {"label":"Status","type":"select","source":[["NULL","All Statuses"],["Approved","Approved"],["Pending","Pending"],["Rejected","Rejected"],["Cancellation Requested","Cancellation Requested"],["Cancelled","Cancelled"]]}]\r\n]', 'TravelRequestReport', - '["employee","date_start","date_end","status"]', 'Class', 'Travel and Expense Management'); + '["employee","date_start","date_end","status"]', 'Class', 'Travel and Expense Management','CSV'); -INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`) VALUES - ('Employee Time Sheet Report', 'This report list all employee time sheets by employee and date range', '[\r\n[ "employee", {"label":"Employee","type":"select2multi","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}],\r\n[ "status", {"label":"Status","allow-null":true,"null-label":"All Status","type":"select","source":[["Approved","Approved"],["Pending","Pending"],["Rejected","Rejected"]]}]\r\n]', 'EmployeeTimeSheetData', '["employee","date_start","date_end","status"]', 'Class','Time Management'); - - -INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`) VALUES -('Overtime Report', 'This report list all employee attendance entries by employee with overtime calculations', '[\r\n[ "employee", {"label":"Employee","type":"select2multi","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'OvertimeReport', '["employee","date_start","date_end"]', 'Class','Time Management'); - -INSERT INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`) VALUES - ('Overtime Summary Report', 'This report list all employee attendance entries by employee with overtime calculation summary', '[\r\n[ "employee", {"label":"Employee","type":"select2multi","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'OvertimeSummaryReport', '["employee","date_start","date_end"]', 'Class','Time Management'); +REPLACE INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Employee Time Sheet Report', 'This report list all employee time sheets by employee and date range', '[\r\n[ "employee", {"label":"Employee","type":"select2multi","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}],\r\n[ "status", {"label":"Status","allow-null":true,"null-label":"All Status","type":"select","source":[["Approved","Approved"],["Pending","Pending"],["Rejected","Rejected"]]}]\r\n]', 'EmployeeTimeSheetData', '["employee","date_start","date_end","status"]', 'Class','Time Management','CSV'); @@ -871,7 +870,7 @@ REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES ('LDAP: Version 3', '1', 'Are you using LDAP v3','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'), ('LDAP: User Filter', '', 'e.g: uid={}, we will replace {} with actual username provided by the user at the time of login',''); -REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES +INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES ('Recruitment: Show Quick Apply', '1', 'Show quick apply button when candidates are applying for jobs. Quick apply allow candidates to apply with minimum amount of information','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'), ('Recruitment: Show Apply', '1', 'Show apply button when candidates are applying for jobs','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'); @@ -888,24 +887,33 @@ INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES ('Leave: Allow Indirect Admins to Approve', '0', 'Allow indirect admins to approve leave requests','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'); INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES - ('Attendance: Overtime Calculation Class', 'BasicOvertimeCalculator', 'Set the method used to calculate overtime','["value", {"label":"Value","type":"select","source":[["BasicOvertimeCalculator","BasicOvertimeCalculator"],["CaliforniaOvertimeCalculator","CaliforniaOvertimeCalculator"]]}]'); + ('Expense: Allow Indirect Admins to Approve', '0', 'Allow indirect admins to approve expense requests','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'); +INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES + ('Travel: Allow Indirect Admins to Approve', '0', 'Allow indirect admins to approve travel requests','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'); INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES + ('Attendance: Overtime Calculation Class', 'BasicOvertimeCalculator', 'Set the method used to calculate overtime','["value", {"label":"Value","type":"select","source":[["BasicOvertimeCalculator","BasicOvertimeCalculator"],["CaliforniaOvertimeCalculator","CaliforniaOvertimeCalculator"]]}]'); + +REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES + ('Attendance: Overtime Calculation Period', 'Daily', 'Set the period for overtime calculation. (Affects attendance sheets)','["value", {"label":"Value","type":"select","source":[["Daily","Daily"],["Weekly","Weekly"]]}]'); + + +REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES ('Attendance: Overtime Start Hour', '8', 'Overtime calculation will start after an employee work this number of hours per day, 0 to indicate no overtime', ''), ('Attendance: Double time Start Hour', '12', 'Double time calculation will start after an employee work this number of hours per day, 0 to indicate no double time', ''); -INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES +REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES ('Attendance: Work Week Start Day', '0', 'Set the starting day of the work week','["value", {"label":"Value","type":"select","source":[["0","Sunday"],["1","Monday"],["2","Tuesday"],["3","Wednesday"],["4","Thursday"],["5","Friday"],["6","Saturday"]]}]'); -INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES +REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES ('System: Allowed Countries', '', 'Only these countries will be allowed in select boxes','["value", {"label":"Value","type":"select2multi","remote-source":["Country","id","name"]}]'); -INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES +REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES ('System: Allowed Currencies', '', 'Only these currencies will be allowed in select boxes','["value", {"label":"Value","type":"select2multi","remote-source":["CurrencyType","id","code+name"]}]'); -INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES +REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES ('System: Allowed Nationality', '', 'Only these nationalities will be allowed in select boxes','["value", {"label":"Value","type":"select2multi","remote-source":["Nationality","id","name"]}]'); @@ -986,12 +994,204 @@ INSERT INTO `JobTitles` (`id`, `code`, `name`, `description`, `specification`) V INSERT INTO `Languages` (`id`, `name`, `description`) VALUES - (1, 'English', 'English'), - (2, 'French', 'French'), - (3, 'German', 'German'), - (4, 'Chinese', 'Chinese'); + (1, 'en', 'English'), + (2, 'fr', 'French'), + (3, 'de', 'German'), + (4, 'zh', 'Chinese'), + (5, 'aa', 'Afar'), + (6, 'ab', 'Abkhaz'), + (7, 'ae', 'Avestan'), + (8, 'af', 'Afrikaans'), + (9, 'ak', 'Akan'), + (10, 'am', 'Amharic'), + (11, 'an', 'Aragonese'), + (12, 'ar', 'Arabic'), + (13, 'as', 'Assamese'), + (14, 'av', 'Avaric'), + (15, 'ay', 'Aymara'), + (16, 'az', 'Azerbaijani'), + (17, 'ba', 'Bashkir'), + (18, 'be', 'Belarusian'), + (19, 'bg', 'Bulgarian'), + (20, 'bh', 'Bihari'), + (21, 'bi', 'Bislama'), + (22, 'bm', 'Bambara'), + (23, 'bn', 'Bengali'), + (24, 'bo', 'Tibetan Standard, Tibetan, Central'), + (25, 'br', 'Breton'), + (26, 'bs', 'Bosnian'), + (27, 'ca', 'Catalan; Valencian'), + (28, 'ce', 'Chechen'), + (29, 'ch', 'Chamorro'), + (30, 'co', 'Corsican'), + (31, 'cr', 'Cree'), + (32, 'cs', 'Czech'), + (33, 'cu', 'Old Church Slavonic, Church Slavic, Church Slavonic, Old Bulgarian, Old Slavonic'), + (34, 'cv', 'Chuvash'), + (35, 'cy', 'Welsh'), + (36, 'da', 'Danish'), + (37, 'dv', 'Divehi; Dhivehi; Maldivian;'), + (38, 'dz', 'Dzongkha'), + (39, 'ee', 'Ewe'), + (40, 'el', 'Greek, Modern'), + (41, 'eo', 'Esperanto'), + (42, 'es', 'Spanish; Castilian'), + (43, 'et', 'Estonian'), + (44, 'eu', 'Basque'), + (45, 'fa', 'Persian'), + (46, 'ff', 'Fula; Fulah; Pulaar; Pular'), + (47, 'fi', 'Finnish'), + (48, 'fj', 'Fijian'), + (49, 'fo', 'Faroese'), + (50, 'fy', 'Western Frisian'), + (51, 'ga', 'Irish'), + (52, 'gd', 'Scottish Gaelic; Gaelic'), + (53, 'gl', 'Galician'), + (54, 'gn', 'Guaraní'), + (55, 'gu', 'Gujarati'), + (56, 'gv', 'Manx'), + (57, 'ha', 'Hausa'), + (58, 'he', 'Hebrew (modern)'), + (59, 'hi', 'Hindi'), + (60, 'ho', 'Hiri Motu'), + (61, 'hr', 'Croatian'), + (62, 'ht', 'Haitian; Haitian Creole'), + (63, 'hu', 'Hungarian'), + (64, 'hy', 'Armenian'), + (65, 'hz', 'Herero'), + (66, 'ia', 'Interlingua'), + (67, 'id', 'Indonesian'), + (68, 'ie', 'Interlingue'), + (69, 'ig', 'Igbo'), + (70, 'ii', 'Nuosu'), + (71, 'ik', 'Inupiaq'), + (72, 'io', 'Ido'), + (73, 'is', 'Icelandic'), + (74, 'it', 'Italian'), + (75, 'iu', 'Inuktitut'), + (76, 'ja', 'Japanese (ja)'), + (77, 'jv', 'Javanese (jv)'), + (78, 'ka', 'Georgian'), + (79, 'kg', 'Kongo'), + (80, 'ki', 'Kikuyu, Gikuyu'), + (81, 'kj', 'Kwanyama, Kuanyama'), + (82, 'kk', 'Kazakh'), + (83, 'kl', 'Kalaallisut, Greenlandic'), + (84, 'km', 'Khmer'), + (85, 'kn', 'Kannada'), + (86, 'ko', 'Korean'), + (87, 'kr', 'Kanuri'), + (88, 'ks', 'Kashmiri'), + (89, 'ku', 'Kurdish'), + (90, 'kv', 'Komi'), + (91, 'kw', 'Cornish'), + (92, 'ky', 'Kirghiz, Kyrgyz'), + (93, 'la', 'Latin'), + (94, 'lb', 'Luxembourgish, Letzeburgesch'), + (95, 'lg', 'Luganda'), + (96, 'li', 'Limburgish, Limburgan, Limburger'), + (97, 'ln', 'Lingala'), + (98, 'lo', 'Lao'), + (99, 'lt', 'Lithuanian'), + (100, 'lu', 'Luba-Katanga'), + (101, 'lv', 'Latvian'), + (102, 'mg', 'Malagasy'), + (103, 'mh', 'Marshallese'), + (104, 'mi', 'Maori'), + (105, 'mk', 'Macedonian'), + (106, 'ml', 'Malayalam'), + (107, 'mn', 'Mongolian'), + (108, 'mr', 'Marathi (Mara?hi)'), + (109, 'ms', 'Malay'), + (110, 'mt', 'Maltese'), + (111, 'my', 'Burmese'), + (112, 'na', 'Nauru'), + (113, 'nb', 'Norwegian Bokmål'), + (114, 'nd', 'North Ndebele'), + (115, 'ne', 'Nepali'), + (116, 'ng', 'Ndonga'), + (117, 'nl', 'Dutch'), + (118, 'nn', 'Norwegian Nynorsk'), + (119, 'no', 'Norwegian'), + (120, 'nr', 'South Ndebele'), + (121, 'nv', 'Navajo, Navaho'), + (122, 'ny', 'Chichewa; Chewa; Nyanja'), + (123, 'oc', 'Occitan'), + (124, 'oj', 'Ojibwe, Ojibwa'), + (125, 'om', 'Oromo'), + (126, 'or', 'Oriya'), + (127, 'os', 'Ossetian, Ossetic'), + (128, 'pa', 'Panjabi, Punjabi'), + (129, 'pi', 'Pali'), + (130, 'pl', 'Polish'), + (131, 'ps', 'Pashto, Pushto'), + (132, 'pt', 'Portuguese'), + (133, 'qu', 'Quechua'), + (134, 'rm', 'Romansh'), + (135, 'rn', 'Kirundi'), + (136, 'ro', 'Romanian, Moldavian, Moldovan'), + (137, 'ru', 'Russian'), + (138, 'rw', 'Kinyarwanda'), + (139, 'sa', 'Sanskrit (Sa?sk?ta)'), + (140, 'sc', 'Sardinian'), + (141, 'sd', 'Sindhi'), + (142, 'se', 'Northern Sami'), + (143, 'sg', 'Sango'), + (144, 'si', 'Sinhala, Sinhalese'), + (145, 'sk', 'Slovak'), + (146, 'sl', 'Slovene'), + (147, 'sm', 'Samoan'), + (148, 'sn', 'Shona'), + (149, 'so', 'Somali'), + (150, 'sq', 'Albanian'), + (151, 'sr', 'Serbian'), + (152, 'ss', 'Swati'), + (153, 'st', 'Southern Sotho'), + (154, 'su', 'Sundanese'), + (155, 'sv', 'Swedish'), + (156, 'sw', 'Swahili'), + (157, 'ta', 'Tamil'), + (158, 'te', 'Telugu'), + (159, 'tg', 'Tajik'), + (160, 'th', 'Thai'), + (161, 'ti', 'Tigrinya'), + (162, 'tk', 'Turkmen'), + (163, 'tl', 'Tagalog'), + (164, 'tn', 'Tswana'), + (165, 'to', 'Tonga (Tonga Islands)'), + (166, 'tr', 'Turkish'), + (167, 'ts', 'Tsonga'), + (168, 'tt', 'Tatar'), + (169, 'tw', 'Twi'), + (170, 'ty', 'Tahitian'), + (171, 'ug', 'Uighur, Uyghur'), + (172, 'uk', 'Ukrainian'), + (173, 'ur', 'Urdu'), + (174, 'uz', 'Uzbek'), + (175, 've', 'Venda'), + (176, 'vi', 'Vietnamese'), + (177, 'vo', 'Volapük'), + (178, 'wa', 'Walloon'), + (179, 'wo', 'Wolof'), + (180, 'xh', 'Xhosa'), + (181, 'yi', 'Yiddish'), + (182, 'yo', 'Yoruba'), + (183, 'za', 'Zhuang, Chuang'), + (184, 'zu', 'Zulu'); +INSERT INTO `SupportedLanguages` (`name`, `description`) VALUES + ('en', 'English'), + ('de', 'German'), + ('fr', 'French'), + ('pl', 'Polish'), + ('it', 'Italian'), + ('si', 'Sinhala'), + ('zh', 'Chinese'), + ('ja', 'Japanese'), + ('hi', 'Hindi'), + ('es', 'Spanish'); + INSERT INTO `LeavePeriods` (`id`, `name`, `date_start`, `date_end`, `status`) VALUES (3, 'Year 2015', '2015-01-01', '2015-12-31', 'Active'), (4, 'Year 2016', '2016-01-01', '2016-12-31', 'Active'), @@ -1117,7 +1317,7 @@ INSERT INTO `UserRoles` VALUES INSERT INTO `Users` VALUES -(1,'admin','icehrm+admin@web-stalk.com','21232f297a57a5a743894a0e4a801fc3',1,NULL,'Admin','',NULL,NULL,NULL,NULL); +(1,'admin','icehrm+admin@web-stalk.com','21232f297a57a5a743894a0e4a801fc3',1,NULL,'Admin','',NULL,NULL,NULL,NULL,NULL); INSERT INTO `SalaryComponentType` (`id`,`code`, `name`) VALUES @@ -1263,3 +1463,41 @@ INSERT INTO `PayrollColumnTemplates` (`name`,`columns`) VALUES ('All Columns','[\"1\",\"2\",\"3\",\"4\"]'), ('All Time Management Columns','[\"1\",\"2\",\"3\"]'); + + +INSERT INTO `DataImport` (`name`, `dataType`, `details`, `columns`, `updated`, `created`) VALUES + ('Sage50 Import - Employee Data', 'Sage50Employees', '', '[{"name":"employee_id","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"Yes","id":"columns_7"},{"name":"title","title":"title","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_1"},{"name":"initial","title":"Initial","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_2"},{"name":"first_name","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_3"},{"name":"middle_name","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_4"},{"name":"middle_name","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_5"},{"name":"last_name","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_6"},{"name":"address1","title":"Address1","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_8"},{"name":"address3","title":"Address3","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_10"},{"name":"address2","title":"Address2","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_9"},{"name":"address4","title":"Address4","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_11"},{"name":"address5","title":"Address5","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_12"},{"name":"postal_code","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_13"},{"name":"home_phone","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_14"},{"name":"mobile_phone","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_15"},{"name":"private_email","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_16"},{"name":"gender","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_17"},{"name":"marital_status","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_18"},{"name":"previous_surname","title":"Previous Surname","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_19"},{"name":"birthday","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_20"},{"name":"disabled","title":"Disabled","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_21"},{"name":"nationality","title":"Nationality","type":"Reference","dependOn":"Nationality","dependOnField":"name","isKeyField":"Yes","idField":"No","id":"columns_22"},{"name":"ethnicity","title":"Ethnicity","type":"Normal","dependOn":"Ethnicity","dependOnField":"name","isKeyField":"Yes","idField":"No","id":"columns_23"},{"name":"EmergencyContact/name","title":"","type":"Attached","dependOn":"EmergencyContact","dependOnField":"name","isKeyField":"Yes","idField":"No","id":"columns_24"},{"name":"EmergencyContact/relationship","title":"","type":"Attached","dependOn":"EmergencyContact","dependOnField":"relationship","isKeyField":"No","idField":"No","id":"columns_25"},{"name":"EmergencyContact/home_phone","title":"","type":"Attached","dependOn":"EmergencyContact","dependOnField":"home_phone","isKeyField":"No","idField":"No","id":"columns_26"},{"name":"tax_code","title":"Tax Code","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_27"},{"name":"wk1_mth1_basis","title":"Wk1Mth1 Basis","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_28"},{"name":"NI_category","title":"NI Category","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_29"},{"name":"nic_num","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_30"},{"name":"ssn_num","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_31"},{"name":"job_title","title":"","type":"Reference","dependOn":"JobTitle","dependOnField":"name","isKeyField":"Yes","idField":"No","id":"columns_32"},{"name":"employment_status","title":"","type":"Reference","dependOn":"EmploymentStatus","dependOnField":"name","isKeyField":"Yes","idField":"No","id":"columns_33"},{"name":"pay_frequency","title":"Pay Frequency","type":"Reference","dependOn":"PayFrequency","dependOnField":"name","isKeyField":"Yes","idField":"No","id":"columns_34"},{"name":"contracted_hours","title":"Contracted Hours","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_35"},{"name":"joined_date","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_36"},{"name":"termination_date","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_37"},{"name":"CompanyStructure/title","title":"","type":"Reference","dependOn":"CompanyStructure","dependOnField":"title","isKeyField":"Yes","idField":"No","id":"columns_38"},{"name":"cost_centre_reference","title":"Cost Centre","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_39"},{"name":"employee_notes","title":"Employee Notes","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_40"}]', '2016-06-03 00:26:32', '2016-06-03 00:26:32'); + + + + +REPLACE INTO `UserReports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Time Entry Report', 'View your time entries by date range and project', + '[\r\n[ "client", {"label":"Select Client","type":"select","allow-null":true,"null-label":"Not Selected","remote-source":["Client","id","name"]}],\r\n[ "project", {"label":"Or Project","type":"select","allow-null":true,"null-label":"All Projects","remote-source":["Project","id","name","getAllProjects"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', + 'EmployeeTimesheetReport', '["client","project","date_start","date_end","status"]', 'Class','Time Management','CSV'); + +REPLACE INTO `UserReports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Attendance Report', 'View your attendance entries by date range', '[\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'EmployeeAttendanceReport', '["date_start","date_end"]', 'Class','Time Management','CSV'); + +REPLACE INTO `UserReports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Time Tracking Report', 'View your working hours and attendance details for each day for a given period ', '[\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'EmployeeTimeTrackReport', '["date_start","date_end"]', 'Class','Time Management','CSV'); + + +REPLACE INTO `UserReports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Travel Request Report', 'View travel requests for a specified period', + '[\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}],\r\n[ "status", {"label":"Status","type":"select","source":[["NULL","All Statuses"],["Approved","Approved"],["Pending","Pending"],["Rejected","Rejected"],["Cancellation Requested","Cancellation Requested"],["Cancelled","Cancelled"]]}]\r\n]', + 'TravelRequestReport', + '["date_start","date_end","status"]', 'Class', 'Travel and Expense Management','CSV'); + + +REPLACE INTO `UserReports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Time Sheet Report', 'This report list all employee time sheets by employee and date range', + '[\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}],\r\n[ "status", {"label":"Status","allow-null":true,"null-label":"All Status","type":"select","source":[["Approved","Approved"],["Pending","Pending"],["Rejected","Rejected"]]}]\r\n]', + 'EmployeeTimeSheetData', + '["date_start","date_end","status"]', 'Class','Time Management','CSV'); + + +REPLACE INTO `UserReports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Client Project Time Report', 'View your time entries for projects under a given client', + '[\r\n[ "client", {"label":"Select Client","type":"select","allow-null":false,"remote-source":["Client","id","name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', + 'ClientProjectTimeReport', '["client","date_start","date_end","status"]', 'Class','Time Management','PDF'); diff --git a/core-ext/scripts/icehrm_sample_data.sql b/core-ext/scripts/icehrm_sample_data.sql index 7bfc578c..2996cac8 100644 --- a/core-ext/scripts/icehrm_sample_data.sql +++ b/core-ext/scripts/icehrm_sample_data.sql @@ -43,6 +43,10 @@ INSERT INTO `Employees` (`id`, `employee_id`, `first_name`, `middle_name`, `last (15, CONCAT('EMP', RAND()), generate_fname(), '', generate_fname(), 10, '1979-07-15 18:30:00', 'Female', 'Single', '158-06-2292', '158-06-2292', '', '', NULL, 1, 5, 2, '', '1164', 'Walnut Avenue', 'Rochelle Park', 'US', 35, '7662', '201-474-8048', '201-474-8048', '201-474-8048', 'icehrm+user2@web-stalk.com', 'icehrm+user2@web-stalk.com', '2006-07-12 18:30:00', '0000-00-00 00:00:00', 2, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +UPDATE `Employees` set supervisor = 2, indirect_supervisors = '[3,4]', approver1 = 5, approver2 = 6, approver3 = 7 where id = 1; +UPDATE `Employees` set supervisor = 1, indirect_supervisors = '[3,4]', approver1 = 5, approver2 = 6 where id = 2; +UPDATE `Employees` set supervisor = 2, indirect_supervisors = '[1,4]', approver1 = 5 where id = 3; + INSERT INTO `EmergencyContacts` (`id`, `employee`, `name`, `relationship`, `home_phone`, `work_phone`, `mobile_phone`) VALUES (1, 1, 'Emma Owns', 'Mother', '+874463422', '+874463422', '+874463422'), (2, 2, 'Casey Watson', 'Sister', '231-453-876', '231-453-876', '231-453-876'); @@ -129,7 +133,13 @@ INSERT INTO `Users` (`id`, `username`, `email`, `password`, `employee`,`default_ (2, 'manager', 'icehrm+manager@web-stalk.com', '4048bb914a704a0728549a26b92d8550', 2,NULL, 'Manager','', '2013-01-03 02:47:37', '2013-01-03 02:47:37', '2013-01-03 02:47:37'), (3, 'user1', 'icehrm+user1@web-stalk.com', '4048bb914a704a0728549a26b92d8550', 3,NULL, 'Employee','', '2013-01-03 02:48:32', '2013-01-03 02:48:32', '2013-01-03 02:48:32'), (4, 'user2', 'icehrm+user2@web-stalk.com', '4048bb914a704a0728549a26b92d8550', 4,NULL, 'Employee','', '2013-01-03 02:58:55', '2013-01-03 02:58:55', '2013-01-03 02:58:55'), -(5, 'user3', 'icehrm+user3@web-stalk.com', '4048bb914a704a0728549a26b92d8550', NULL,NULL, 'Other','["1"]', '2013-01-03 02:58:55', '2013-01-03 02:58:55', '2013-01-03 02:58:55'); +(5, 'user3', 'icehrm+user3@web-stalk.com', '4048bb914a704a0728549a26b92d8550', NULL,NULL, 'Other','["1"]', '2013-01-03 02:58:55', '2013-01-03 02:58:55', '2013-01-03 02:58:55'), +(6, 'user4', 'icehrm+user4@web-stalk.com', '4048bb914a704a0728549a26b92d8550', 5,NULL, 'Manager','', '2013-01-03 02:58:55', '2013-01-03 02:58:55', '2013-01-03 02:58:55'), +(7, 'user5', 'icehrm+user5@web-stalk.com', '4048bb914a704a0728549a26b92d8550', 6,NULL, 'Employee','', '2013-01-03 02:58:55', '2013-01-03 02:58:55', '2013-01-03 02:58:55'), +(8, 'user6', 'icehrm+user6@web-stalk.com', '4048bb914a704a0728549a26b92d8550', 7,NULL, 'Employee','', '2013-01-03 02:58:55', '2013-01-03 02:58:55', '2013-01-03 02:58:55'), +(9, 'user7', 'icehrm+user7@web-stalk.com', '4048bb914a704a0728549a26b92d8550', 8,NULL, 'Employee','', '2013-01-03 02:58:55', '2013-01-03 02:58:55', '2013-01-03 02:58:55'), +(10, 'user8', 'icehrm+user8@web-stalk.com', '4048bb914a704a0728549a26b92d8550', 9,NULL, 'Employee','', '2013-01-03 02:58:55', '2013-01-03 02:58:55', '2013-01-03 02:58:55'), +(11, 'user9', 'icehrm+user9@web-stalk.com', '4048bb914a704a0728549a26b92d8550', 10,NULL, 'Employee','', '2013-01-03 02:58:55', '2013-01-03 02:58:55', '2013-01-03 02:58:55'); INSERT INTO `Job` VALUES (1,'Software Engineer','More than 375,000 users world-wide rely on our software for their daily business as it makes creating graphical presentations so much easier, faster and more enjoyable. Among our customers are many renowned consulting companies and large international corporations.','More than 375,000 users world-wide rely on our software for their daily business as it makes creating graphical presentations so much easier, faster and more enjoyable. Among our customers are many renowned consulting companies and large international corporations.\n\nWe follow our own strategy and do not have to make compromises with regard to code quality and beauty, because think-cell is profitable and has no outside investors. We are flourishing without program managers, meetings, and marketing-driven deadlines. Our code quality is extraordinarily high because we only release software when it is ready. We are willing to do the leg work of developing sophisticated algorithms and refining our user interface, which makes working with think-cell’s software so satisfying.','Challenging C++ coding with high personal responsibility\nWork with a competent and creative team in a modern loft office in Berlin\nFamily-friendly working hours, no deadlines\nAbove-average salary (we offer our developers EUR 120,000 annually after one year of employment)\nFree supply of drinks, fruits, sweets and snacks\nFlat hierarchies and plenty of room for your ideas\nA full-time company nanny who is available for free when children are sick, or when you just feel like spending an evening out','[\"Health plan\",\"Paid vacations\"]',226,2,NULL,'JC001',1,NULL,7,14,9,151,'Yes',3500,5500,'job, engineer','Active','0000-00-00 00:00:00',NULL,'Text Only',1), @@ -191,10 +201,13 @@ INSERT INTO `Attendance` (`employee`,`in_time`,`out_time`,`note`) VALUES (3, FROM_UNIXTIME((UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 23 DAY))) + FLOOR(28800 + (RAND() * 3600)),'%Y-%m-%d %T'), FROM_UNIXTIME((UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 23 DAY))) + FLOOR(57600 + (RAND() * 21600)),'%Y-%m-%d %T'), ''), (3, FROM_UNIXTIME((UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 22 DAY))) + FLOOR(28800 + (RAND() * 3600)),'%Y-%m-%d %T'), FROM_UNIXTIME((UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 22 DAY))) + FLOOR(57600 + (RAND() * 21600)),'%Y-%m-%d %T'), ''); +INSERT INTO `PayslipTemplates` (`id`, `name`, `data`, `status`, `created`, `updated`) VALUES + (1, 'Basic', '[{"type":"Company Logo","payrollColumn":"NULL","label":"","text":"","fontSize":"Normal","fontStyle":"Normal","fontColor":"#000000","status":"Show","id":"data_1"},{"type":"Company Name","payrollColumn":"NULL","label":"","text":"","fontSize":"Normal","fontStyle":"Normal","fontColor":"","status":"Show","id":"data_2"},{"type":"Separators","payrollColumn":"NULL","label":"","text":"","fontSize":"Normal","fontStyle":"Normal","fontColor":"","status":"Show","id":"data_8"},{"type":"Payroll Column","payrollColumn":"5","label":"","text":"","fontSize":"Normal","fontStyle":"Normal","fontColor":"","status":"Show","id":"data_3"},{"type":"Payroll Column","payrollColumn":"6","label":"","text":"","fontSize":"Normal","fontStyle":"Normal","fontColor":"","status":"Show","id":"data_4"},{"type":"Payroll Column","payrollColumn":"17","label":"","text":"","fontSize":"Normal","fontStyle":"Normal","fontColor":"","status":"Show","id":"data_5"},{"type":"Separators","payrollColumn":"NULL","label":"","text":"","fontSize":"Normal","fontStyle":"Normal","fontColor":"","status":"Show","id":"data_9"},{"type":"Payroll Column","payrollColumn":"18","label":"","text":"","fontSize":"Normal","fontStyle":"Normal","fontColor":"","status":"Show","id":"data_6"},{"type":"Separators","payrollColumn":"NULL","label":"","text":"","fontSize":"Normal","fontStyle":"Normal","fontColor":"","status":"Show","id":"data_10"},{"type":"Text","payrollColumn":"NULL","label":"","text":"Big Company Ltd. is a limited company registered in England and Wales. Registered number: 1234567. Registered office: 123 Some Street, Somewhere, Someshire.","fontSize":"Normal","fontStyle":"Normal","fontColor":"","status":"Show","id":"data_7"}]', NULL, '2016-06-30 03:37:12', '2016-06-30 03:37:12'); + INSERT INTO `Payroll` VALUES - (1,'2016-03',4,1,1,'[\"5\",\"8\",\"9\",\"10\",\"6\",\"7\",\"4\",\"3\",\"2\",\"1\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\"]','2016-03-01','2016-03-31','Draft'), - (2,'2016-03-Weekly',2,1,2,'[\"1\",\"2\",\"3\"]','2016-03-01','2016-03-31','Draft'); + (1,'2016-03',4,1,1,'[\"5\",\"8\",\"9\",\"10\",\"6\",\"7\",\"4\",\"3\",\"2\",\"1\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\"]','2016-03-01','2016-03-31','Draft', 1), + (2,'2016-03-Weekly',2,1,2,'[\"1\",\"2\",\"3\"]','2016-03-01','2016-03-31','Draft', 1); INSERT INTO `PayrollColumns` VALUES (5,'Basic Salary',NULL,'[\"1\"]','[]','[]','[]',5,'No','Yes','0.00',NULL,NULL), @@ -276,12 +289,11 @@ INSERT INTO `EmployeeLeaveDays` VALUES (17,3,FROM_UNIXTIME((UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 21 DAY))),'%Y-%m-%d'),'Full Day'), (18,3,FROM_UNIXTIME((UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 22 DAY))),'%Y-%m-%d'),'Full Day'); - - INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES ('Instance : ID', '0847429146712c108e23c435e8f93b4d', '',''), ('Instance: Key', 'UQHEYBx9H1eNR66nhNCNCz1WCDDhkjtx1OuJbO3ZQMt+8tfSGvuOH/YEHntRajY=', '',''); + /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; diff --git a/core-ext/scripts/icehrmdb.sql b/core-ext/scripts/icehrmdb.sql index 61ab8615..b11cabc0 100644 --- a/core-ext/scripts/icehrmdb.sql +++ b/core-ext/scripts/icehrmdb.sql @@ -7,6 +7,7 @@ create table `CompanyStructures` ( `country` varchar(2) not null default '0', `parent` bigint(20) NULL, `timezone` varchar(100) not null default 'Europe/London', + `heads` varchar(255) NULL default NULL, CONSTRAINT `Fk_CompanyStructures_Own` FOREIGN KEY (`parent`) REFERENCES `CompanyStructures` (`id`), primary key (`id`) ) engine=innodb default charset=utf8; @@ -93,6 +94,13 @@ create table `Languages` ( primary key (`id`) ) engine=innodb default charset=utf8; +create table `SupportedLanguages` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) default null, + `description` varchar(100) default null, + primary key (`id`) +) engine=innodb default charset=utf8; + create table `Nationality` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(100) default null, @@ -106,65 +114,68 @@ CREATE TABLE `PayFrequency` ( ) ENGINE=InnoDB default charset=utf8; create table `Employees` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `employee_id` varchar(50) default null, - `first_name` varchar(100) default '' not null, - `middle_name` varchar(100) default null, - `last_name` varchar(100) default null, - `nationality` bigint(20) default null, - `birthday` date default '0000-00-00', - `gender` enum('Male','Female') default NULL, - `marital_status` enum('Married','Single','Divorced','Widowed','Other') default NULL, - `ssn_num` varchar(100) default NULL, - `nic_num` varchar(100) default NULL, - `other_id` varchar(100) default NULL, - `driving_license` varchar(100) default NULL, - `driving_license_exp_date` date default '0000-00-00', - `employment_status` bigint(20) default null, - `job_title` bigint(20) default null, - `pay_grade` bigint(20) null, - `work_station_id` varchar(100) default NULL, - `address1` varchar(100) default NULL, - `address2` varchar(100) default NULL, - `city` varchar(150) default NULL, - `country` char(2) default null, - `province` bigint(20) default null, - `postal_code` varchar(20) default null, - `home_phone` varchar(50) default null, - `mobile_phone` varchar(50) default null, - `work_phone` varchar(50) default null, - `work_email` varchar(100) default null, - `private_email` varchar(100) default null, - `joined_date` date default '0000-00-00', - `confirmation_date` date default '0000-00-00', - `supervisor` bigint(20) default null, - `indirect_supervisors` varchar(250) default null, - `department` bigint(20) default null, - `custom1` varchar(250) default null, - `custom2` varchar(250) default null, - `custom3` varchar(250) default null, - `custom4` varchar(250) default null, - `custom5` varchar(250) default null, - `custom6` varchar(250) default null, - `custom7` varchar(250) default null, - `custom8` varchar(250) default null, - `custom9` varchar(250) default null, - `custom10` varchar(250) default null, - `termination_date` date default '0000-00-00', - `notes` text default null, - `status` enum('Active','Terminated') default 'Active', - `ethnicity` bigint(20) default null, - `immigration_status` bigint(20) default null, - CONSTRAINT `Fk_Employee_Nationality` FOREIGN KEY (`nationality`) REFERENCES `Nationality` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, - CONSTRAINT `Fk_Employee_JobTitle` FOREIGN KEY (`job_title`) REFERENCES `JobTitles` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, - CONSTRAINT `Fk_Employee_EmploymentStatus` FOREIGN KEY (`employment_status`) REFERENCES `EmploymentStatus` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, - CONSTRAINT `Fk_Employee_Country` FOREIGN KEY (`country`) REFERENCES `Country` (`code`) ON DELETE SET NULL ON UPDATE CASCADE, - CONSTRAINT `Fk_Employee_Province` FOREIGN KEY (`province`) REFERENCES `Province` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, - CONSTRAINT `Fk_Employee_Supervisor` FOREIGN KEY (`supervisor`) REFERENCES `Employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, - CONSTRAINT `Fk_Employee_CompanyStructures` FOREIGN KEY (`department`) REFERENCES `CompanyStructures` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, - CONSTRAINT `Fk_Employee_PayGrades` FOREIGN KEY (`pay_grade`) REFERENCES `PayGrades` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, - primary key (`id`), - unique key `employee_id` (`employee_id`) + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee_id` varchar(50) default null, + `first_name` varchar(100) default '' not null, + `middle_name` varchar(100) default null, + `last_name` varchar(100) default null, + `nationality` bigint(20) default null, + `birthday` date default '0000-00-00', + `gender` enum('Male','Female') default NULL, + `marital_status` enum('Married','Single','Divorced','Widowed','Other') default NULL, + `ssn_num` varchar(100) default NULL, + `nic_num` varchar(100) default NULL, + `other_id` varchar(100) default NULL, + `driving_license` varchar(100) default NULL, + `driving_license_exp_date` date default '0000-00-00', + `employment_status` bigint(20) default null, + `job_title` bigint(20) default null, + `pay_grade` bigint(20) null, + `work_station_id` varchar(100) default NULL, + `address1` varchar(100) default NULL, + `address2` varchar(100) default NULL, + `city` varchar(150) default NULL, + `country` char(2) default null, + `province` bigint(20) default null, + `postal_code` varchar(20) default null, + `home_phone` varchar(50) default null, + `mobile_phone` varchar(50) default null, + `work_phone` varchar(50) default null, + `work_email` varchar(100) default null, + `private_email` varchar(100) default null, + `joined_date` date default '0000-00-00', + `confirmation_date` date default '0000-00-00', + `supervisor` bigint(20) default null, + `indirect_supervisors` varchar(250) default null, + `department` bigint(20) default null, + `custom1` varchar(250) default null, + `custom2` varchar(250) default null, + `custom3` varchar(250) default null, + `custom4` varchar(250) default null, + `custom5` varchar(250) default null, + `custom6` varchar(250) default null, + `custom7` varchar(250) default null, + `custom8` varchar(250) default null, + `custom9` varchar(250) default null, + `custom10` varchar(250) default null, + `termination_date` date default '0000-00-00', + `notes` text default null, + `status` enum('Active','Terminated') default 'Active', + `ethnicity` bigint(20) default null, + `immigration_status` bigint(20) default null, + `approver1` bigint(20) default null, + `approver2` bigint(20) default null, + `approver3` bigint(20) default null, + CONSTRAINT `Fk_Employee_Nationality` FOREIGN KEY (`nationality`) REFERENCES `Nationality` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_Employee_JobTitle` FOREIGN KEY (`job_title`) REFERENCES `JobTitles` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_Employee_EmploymentStatus` FOREIGN KEY (`employment_status`) REFERENCES `EmploymentStatus` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_Employee_Country` FOREIGN KEY (`country`) REFERENCES `Country` (`code`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_Employee_Province` FOREIGN KEY (`province`) REFERENCES `Province` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_Employee_Supervisor` FOREIGN KEY (`supervisor`) REFERENCES `Employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_Employee_CompanyStructures` FOREIGN KEY (`department`) REFERENCES `CompanyStructures` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_Employee_PayGrades` FOREIGN KEY (`pay_grade`) REFERENCES `PayGrades` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + primary key (`id`), + unique key `employee_id` (`employee_id`) ) engine=innodb default charset=utf8; @@ -199,22 +210,24 @@ create table `UserRoles` ( ) engine=innodb default charset=utf8; create table `Users` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `username` varchar(100) default null, - `email` varchar(100) default null, - `password` varchar(100) default null, - `employee` bigint(20) null, - `default_module` bigint(20) null, - `user_level` enum('Admin','Employee','Manager','Other') default NULL, - `user_roles` text null, - `last_login` timestamp default '0000-00-00 00:00:00', - `last_update` timestamp default '0000-00-00 00:00:00', - `created` timestamp default '0000-00-00 00:00:00', - `login_hash` varchar(64) default null, - CONSTRAINT `Fk_User_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, - primary key (`id`), - unique key `username` (`username`), - INDEX login_hash_index (`login_hash`) + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `username` varchar(100) default null, + `email` varchar(100) default null, + `password` varchar(100) default null, + `employee` bigint(20) null, + `default_module` bigint(20) null, + `user_level` enum('Admin','Employee','Manager','Other') default NULL, + `user_roles` text null, + `last_login` timestamp default '0000-00-00 00:00:00', + `last_update` timestamp default '0000-00-00 00:00:00', + `created` timestamp default '0000-00-00 00:00:00', + `login_hash` varchar(64) default null, + `lang` bigint(20) default null, + CONSTRAINT `Fk_User_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `Fk_User_SupportedLanguages` FOREIGN KEY (`lang`) REFERENCES `SupportedLanguages` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + primary key (`id`), + unique key `username` (`username`), + INDEX login_hash_index (`login_hash`) ) engine=innodb default charset=utf8; @@ -387,32 +400,32 @@ create table `HoliDays` ( ) engine=innodb default charset=utf8; create table `EmployeeLeaves` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `employee` bigint(20) NOT NULL, - `leave_type` bigint(20) NOT NULL, - `leave_period` bigint(20) NOT NULL, - `date_start` date default '0000-00-00', - `date_end` date default '0000-00-00', - `details` text default null, - `status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending', - `attachment` varchar(100) NULL, - CONSTRAINT `Fk_EmployeeLeaves_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `Fk_EmployeeLeaves_LeaveTypes` FOREIGN KEY (`leave_type`) REFERENCES `LeaveTypes` (`id`), - CONSTRAINT `Fk_EmployeeLeaves_LeavePeriods` FOREIGN KEY (`leave_period`) REFERENCES `LeavePeriods` (`id`), - primary key (`id`) + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `leave_type` bigint(20) NOT NULL, + `leave_period` bigint(20) NOT NULL, + `date_start` date default '0000-00-00', + `date_end` date default '0000-00-00', + `details` text default null, + `status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending', + `attachment` varchar(100) NULL, + CONSTRAINT `Fk_EmployeeLeaves_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeLeaves_LeaveTypes` FOREIGN KEY (`leave_type`) REFERENCES `LeaveTypes` (`id`), + CONSTRAINT `Fk_EmployeeLeaves_LeavePeriods` FOREIGN KEY (`leave_period`) REFERENCES `LeavePeriods` (`id`), + primary key (`id`) ) engine=innodb default charset=utf8; create table `EmployeeLeaveLog` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `employee_leave` bigint(20) NOT NULL, - `user_id` bigint(20) NULL, - `data` varchar(500) NOT NULL, - `status_from` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending', - `status_to` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending', - `created` timestamp default '0000-00-00 00:00:00', - CONSTRAINT `Fk_EmployeeLeaveLog_EmployeeLeaves` FOREIGN KEY (`employee_leave`) REFERENCES `EmployeeLeaves` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `Fk_EmployeeLeaveLog_Users` FOREIGN KEY (`user_id`) REFERENCES `Users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, - primary key (`id`) + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee_leave` bigint(20) NOT NULL, + `user_id` bigint(20) NULL, + `data` varchar(500) NOT NULL, + `status_from` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending', + `status_to` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending', + `created` timestamp default '0000-00-00 00:00:00', + CONSTRAINT `Fk_EmployeeLeaveLog_EmployeeLeaves` FOREIGN KEY (`employee_leave`) REFERENCES `EmployeeLeaves` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeLeaveLog_Users` FOREIGN KEY (`user_id`) REFERENCES `Users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, + primary key (`id`) ) engine=innodb default charset=utf8; create table `EmployeeLeaveDays` ( @@ -454,7 +467,7 @@ create table `Projects` ( `client` bigint(20) NULL, `details` text default null, `created` timestamp default '0000-00-00 00:00:00', - `status` enum('Active','Inactive') default 'Active', + `status` enum('Active','On Hold','Completed', 'Dropped') default 'Active', CONSTRAINT `Fk_Projects_Client` FOREIGN KEY (`client`) REFERENCES `Clients` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, primary key (`id`) ) engine=innodb default charset=utf8; @@ -612,6 +625,7 @@ create table `Reports` ( `paramOrder` varchar(500) NOT NULL, `type` enum('Query','Class') default 'Query', `report_group` varchar(500) NULL, + `output` varchar(15) NOT NULL default 'CSV', primary key (`id`), UNIQUE KEY `Reports_Name` (`name`) ) engine=innodb default charset=utf8; @@ -764,25 +778,25 @@ create table `EmployeeImmigrations` ( create table `EmployeeTravelRecords` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `employee` bigint(20) NOT NULL, - `type` enum('Local','International') default 'Local', - `purpose` varchar(200) NOT NULL, - `travel_from` varchar(200) NOT NULL, - `travel_to` varchar(200) NOT NULL, - `travel_date` datetime NULL default '0000-00-00 00:00:00', - `return_date` datetime NULL default '0000-00-00 00:00:00', - `details` varchar(500) default null, - `funding` decimal(10,3) NULL, - `currency` bigint(20) NULL, - `attachment1` varchar(100) NULL, - `attachment2` varchar(100) NULL, - `attachment3` varchar(100) NULL, - `created` timestamp NULL default '0000-00-00 00:00:00', - `updated` timestamp NULL default '0000-00-00 00:00:00', - `status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending', - CONSTRAINT `Fk_EmployeeTravelRecords_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - primary key (`id`) + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `type` enum('Local','International') default 'Local', + `purpose` varchar(200) NOT NULL, + `travel_from` varchar(200) NOT NULL, + `travel_to` varchar(200) NOT NULL, + `travel_date` datetime NULL default '0000-00-00 00:00:00', + `return_date` datetime NULL default '0000-00-00 00:00:00', + `details` varchar(500) default null, + `funding` decimal(10,3) NULL, + `currency` bigint(20) NULL, + `attachment1` varchar(100) NULL, + `attachment2` varchar(100) NULL, + `attachment3` varchar(100) NULL, + `created` timestamp NULL default '0000-00-00 00:00:00', + `updated` timestamp NULL default '0000-00-00 00:00:00', + `status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending', + CONSTRAINT `Fk_EmployeeTravelRecords_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) ) engine=innodb default charset=utf8; @@ -818,7 +832,13 @@ create table `CustomFields` ( `display` enum('Form','Table and Form','Hidden') default 'Form', `created` DATETIME default '0000-00-00 00:00:00', `updated` DATETIME default '0000-00-00 00:00:00', - primary key (`id`) + `field_type` varchar(20) NULL, + `field_label` varchar(50) NULL, + `field_validation` varchar(50) NULL, + `field_options` varchar(500) NULL, + `display_order` int(11) default 0, + primary key (`id`), + unique key `CustomFields_name` (`type`,`name`) ) engine=innodb default charset=utf8; @@ -926,16 +946,17 @@ CREATE TABLE `PayrollColumnTemplates` ( ) ENGINE=InnoDB default charset=utf8; create table `Payroll` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `name` varchar(200) NULL, - `pay_period` bigint(20) NOT NULL, - `department` bigint(20) NOT NULL, - `column_template` bigint(20) NOT NULL, - `columns` varchar(500) DEFAULT NULL, - `date_start` DATE NULL default '0000-00-00', - `date_end` DATE NULL default '0000-00-00', - `status` enum('Draft','Completed','Processing') default 'Draft', - primary key (`id`) + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(200) NULL, + `pay_period` bigint(20) NOT NULL, + `department` bigint(20) NOT NULL, + `column_template` bigint(20) NULL, + `columns` varchar(500) DEFAULT NULL, + `date_start` DATE NULL default '0000-00-00', + `date_end` DATE NULL default '0000-00-00', + `status` enum('Draft','Completed','Processing') default 'Draft', + `payslipTemplate` bigint(20) NULL, + primary key (`id`) ) engine=innodb default charset=utf8; @@ -1210,26 +1231,26 @@ create table `ExpensesPaymentMethods` ( create table `EmployeeExpenses` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `employee` bigint(20) NOT NULL, - `expense_date` date NULL default '0000-00-00', - `payment_method` bigint(20) NOT NULL, - `transaction_no` varchar(300) NOT NULL, - `payee` varchar(500) NOT NULL, - `category` bigint(20) NOT NULL, - `notes` text, - `amount` decimal(10,3) NULL, - `currency` bigint(20) NULL, - `attachment1` varchar(100) NULL, - `attachment2` varchar(100) NULL, - `attachment3` varchar(100) NULL, - `created` timestamp NULL default '0000-00-00 00:00:00', - `updated` timestamp NULL default '0000-00-00 00:00:00', - `status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled') default 'Pending', - CONSTRAINT `Fk_EmployeeExpenses_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `Fk_EmployeeExpenses_pm` FOREIGN KEY (`payment_method`) REFERENCES `ExpensesPaymentMethods` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `Fk_EmployeeExpenses_category` FOREIGN KEY (`category`) REFERENCES `ExpensesCategories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - primary key (`id`) + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `expense_date` date NULL default '0000-00-00', + `payment_method` bigint(20) NOT NULL, + `transaction_no` varchar(300) NOT NULL, + `payee` varchar(500) NOT NULL, + `category` bigint(20) NOT NULL, + `notes` text, + `amount` decimal(10,3) NULL, + `currency` bigint(20) NULL, + `attachment1` varchar(100) NULL, + `attachment2` varchar(100) NULL, + `attachment3` varchar(100) NULL, + `created` timestamp NULL default '0000-00-00 00:00:00', + `updated` timestamp NULL default '0000-00-00 00:00:00', + `status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending', + CONSTRAINT `Fk_EmployeeExpenses_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeExpenses_pm` FOREIGN KEY (`payment_method`) REFERENCES `ExpensesPaymentMethods` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeExpenses_category` FOREIGN KEY (`category`) REFERENCES `ExpensesCategories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) ) engine=innodb default charset=utf8; @@ -1257,3 +1278,146 @@ create table `EmployeeDataHistory` ( ) engine=innodb default charset=utf8; +create table `EmployeeAttendanceSheets` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `date_start` date NOT NULL, + `date_end` date NOT NULL, + `status` enum('Approved','Pending','Rejected','Submitted') default 'Pending', + CONSTRAINT `Fk_EmployeeAttendanceSheets_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + UNIQUE KEY `EmployeeAttendanceSheetsKey` (`employee`,`date_start`,`date_end`), + KEY `EmployeeAttendanceSheets_date_end` (`date_end`), + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `CustomFieldValues` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `type` varchar(20) not null, + `name` varchar(60) not null, + `object_id` varchar(60) not null, + `value` text default NULL, + `updated` timestamp default '0000-00-00 00:00:00', + `created` timestamp default '0000-00-00 00:00:00', + primary key (`id`), + UNIQUE key `CustomFields_type_name_object_id` (`type`,`name`,`object_id`), + INDEX `CustomFields_type_object_id` (`type`,`object_id`) +) engine=innodb default charset=utf8; + + +create table `DataImport` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(60) not null, + `dataType` varchar(60) not null, + `details` text default NULL, + `columns` text default NULL, + `updated` timestamp default '0000-00-00 00:00:00', + `created` timestamp default '0000-00-00 00:00:00', + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `DataImportFiles` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(60) not null, + `data_import_definition` varchar(200) not null, + `status` varchar(15) null, + `file` varchar(100) null, + `details` text default NULL, + `updated` timestamp default '0000-00-00 00:00:00', + `created` timestamp default '0000-00-00 00:00:00', + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `UserReports` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `details` text default null, + `parameters` text default null, + `query` text default null, + `paramOrder` varchar(500) NOT NULL, + `type` enum('Query','Class') default 'Query', + `report_group` varchar(500) NULL, + `output` varchar(15) NOT NULL default 'CSV', + primary key (`id`), + UNIQUE KEY `UserReports_Name` (`name`) +) engine=innodb default charset=utf8; + + +create table `ReportFiles` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NULL, + `name` varchar(100) NOT NULL, + `attachment` varchar(100) NOT NULL, + `created` timestamp default '0000-00-00 00:00:00', + unique key `ReportFiles_attachment` (`attachment`), + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `PayslipTemplates` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `data` longtext NULL, + `status` enum('Show','Hide') default 'Show', + `created` timestamp default '0000-00-00 00:00:00', + `updated` timestamp default '0000-00-00 00:00:00', + primary key (`id`) +) engine=innodb default charset=utf8; + +create table `EmployeeApprovals` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `type` varchar(100) NOT NULL, + `element` bigint(20) NOT NULL, + `approver` bigint(20) NULL, + `level` int(11) default 0, + `status` int(11) default 0, + `active` int(11) default 0, + `created` timestamp default '0000-00-00 00:00:00', + `updated` timestamp default '0000-00-00 00:00:00', + UNIQUE key `EmployeeApprovals_type_element_level` (`type`,`element`,`level`), + INDEX `EmployeeApprovals_type_element_status_level` (`type`,`element`,`status`,`level`), + INDEX `EmployeeApprovals_type_element` (`type`,`element`), + INDEX `EmployeeApprovals_type` (`type`), + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `StatusChangeLogs` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `type` varchar(100) NOT NULL, + `element` bigint(20) NOT NULL, + `user_id` bigint(20) NULL, + `data` varchar(500) NOT NULL, + `status_from` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending', + `status_to` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending', + `created` timestamp default '0000-00-00 00:00:00', + INDEX `EmployeeApprovals_type_element` (`type`,`element`), + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `OvertimeCategories` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(500) NOT NULL, + `created` timestamp NULL default '0000-00-00 00:00:00', + `updated` timestamp NULL default '0000-00-00 00:00:00', + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `EmployeeOvertime` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `start_time` timestamp NULL default '0000-00-00 00:00:00', + `end_time` timestamp NULL default '0000-00-00 00:00:00', + `category` bigint(20) NOT NULL, + `project` bigint(20) NULL, + `notes` text NULL, + `created` timestamp NULL default '0000-00-00 00:00:00', + `updated` timestamp NULL default '0000-00-00 00:00:00', + `status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending', + CONSTRAINT `Fk_EmployeeOvertime_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeOvertime_Category` FOREIGN KEY (`category`) REFERENCES `OvertimeCategories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; diff --git a/core-ext/scripts/upgrade_v16.0.PRO_v18.0.PRO.sql b/core-ext/scripts/upgrade_v16.0.PRO_v18.0.PRO.sql new file mode 100644 index 00000000..4cc1c64f --- /dev/null +++ b/core-ext/scripts/upgrade_v16.0.PRO_v18.0.PRO.sql @@ -0,0 +1,481 @@ +create table `EmployeeAttendanceSheets` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `date_start` date NOT NULL, + `date_end` date NOT NULL, + `status` enum('Approved','Pending','Rejected','Submitted') default 'Pending', + CONSTRAINT `Fk_EmployeeAttendanceSheets_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + UNIQUE KEY `EmployeeAttendanceSheetsKey` (`employee`,`date_start`,`date_end`), + KEY `EmployeeAttendanceSheets_date_end` (`date_end`), + primary key (`id`) +) engine=innodb default charset=utf8; + +REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES + ('Attendance: Overtime Calculation Period', 'Daily', 'Set the period for overtime calculation. (Affects attendance sheets)','["value", {"label":"Value","type":"select","source":[["Daily","Daily"],["Weekly","Weekly"]]}]'); + + + +ALTER TABLE `CustomFields` ADD unique key `CustomFields_name` (`type`,`name`); +Alter table `Reports` ADD COLUMN `output` varchar(15) NOT NULL default 'CSV'; +Update Reports set output = 'CSV'; + +create table `CustomFieldValues` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `type` varchar(20) not null, + `name` varchar(60) not null, + `object_id` varchar(60) not null, + `value` text default NULL, + `updated` timestamp default '0000-00-00 00:00:00', + `created` timestamp default '0000-00-00 00:00:00', + primary key (`id`), + UNIQUE key `CustomFields_type_name_object_id` (`type`,`name`,`object_id`), + INDEX `CustomFields_type_object_id` (`type`,`object_id`) +) engine=innodb default charset=utf8; + + +ALTER TABLE `CustomFields` ADD COLUMN `field_type` varchar(20) NULL; +ALTER TABLE `CustomFields` ADD COLUMN `field_label` varchar(50) NULL; +ALTER TABLE `CustomFields` ADD COLUMN `field_validation` varchar(50) NULL; +ALTER TABLE `CustomFields` ADD COLUMN `field_options` varchar(500) NULL; +ALTER TABLE `CustomFields` ADD COLUMN `display_order` int(11) default 0; + + + +create table `DataImport` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(60) not null, + `dataType` varchar(60) not null, + `details` text default NULL, + `columns` text default NULL, + `updated` timestamp default '0000-00-00 00:00:00', + `created` timestamp default '0000-00-00 00:00:00', + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `DataImportFiles` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(60) not null, + `data_import_definition` varchar(200) not null, + `status` varchar(15) null, + `file` varchar(100) null, + `details` text default NULL, + `updated` timestamp default '0000-00-00 00:00:00', + `created` timestamp default '0000-00-00 00:00:00', + primary key (`id`) +) engine=innodb default charset=utf8; + + +INSERT INTO `DataImport` (`id`, `name`, `dataType`, `details`, `columns`, `updated`, `created`) VALUES +(1, 'Sage50 Import - Employee Data', 'Sage50Employees', '', '[{"name":"employee_id","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"Yes","id":"columns_7"},{"name":"title","title":"title","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_1"},{"name":"initial","title":"Initial","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_2"},{"name":"first_name","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_3"},{"name":"middle_name","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_4"},{"name":"middle_name","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_5"},{"name":"last_name","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_6"},{"name":"address1","title":"Address1","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_8"},{"name":"address3","title":"Address3","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_10"},{"name":"address2","title":"Address2","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_9"},{"name":"address4","title":"Address4","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_11"},{"name":"address5","title":"Address5","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_12"},{"name":"postal_code","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_13"},{"name":"home_phone","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_14"},{"name":"mobile_phone","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_15"},{"name":"private_email","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_16"},{"name":"gender","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_17"},{"name":"marital_status","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_18"},{"name":"previous_surname","title":"Previous Surname","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_19"},{"name":"birthday","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_20"},{"name":"disabled","title":"Disabled","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_21"},{"name":"nationality","title":"Nationality","type":"Reference","dependOn":"Nationality","dependOnField":"name","isKeyField":"Yes","idField":"No","id":"columns_22"},{"name":"ethnicity","title":"Ethnicity","type":"Normal","dependOn":"Ethnicity","dependOnField":"name","isKeyField":"Yes","idField":"No","id":"columns_23"},{"name":"EmergencyContact/name","title":"","type":"Attached","dependOn":"EmergencyContact","dependOnField":"name","isKeyField":"Yes","idField":"No","id":"columns_24"},{"name":"EmergencyContact/relationship","title":"","type":"Attached","dependOn":"EmergencyContact","dependOnField":"relationship","isKeyField":"No","idField":"No","id":"columns_25"},{"name":"EmergencyContact/home_phone","title":"","type":"Attached","dependOn":"EmergencyContact","dependOnField":"home_phone","isKeyField":"No","idField":"No","id":"columns_26"},{"name":"tax_code","title":"Tax Code","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_27"},{"name":"wk1_mth1_basis","title":"Wk1Mth1 Basis","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_28"},{"name":"NI_category","title":"NI Category","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_29"},{"name":"nic_num","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_30"},{"name":"ssn_num","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_31"},{"name":"job_title","title":"","type":"Reference","dependOn":"JobTitle","dependOnField":"name","isKeyField":"Yes","idField":"No","id":"columns_32"},{"name":"employment_status","title":"","type":"Reference","dependOn":"EmploymentStatus","dependOnField":"name","isKeyField":"Yes","idField":"No","id":"columns_33"},{"name":"pay_frequency","title":"Pay Frequency","type":"Reference","dependOn":"PayFrequency","dependOnField":"name","isKeyField":"Yes","idField":"No","id":"columns_34"},{"name":"contracted_hours","title":"Contracted Hours","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_35"},{"name":"joined_date","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_36"},{"name":"termination_date","title":"","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_37"},{"name":"CompanyStructure/title","title":"","type":"Reference","dependOn":"CompanyStructure","dependOnField":"title","isKeyField":"Yes","idField":"No","id":"columns_38"},{"name":"cost_centre_reference","title":"Cost Centre","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_39"},{"name":"employee_notes","title":"Employee Notes","type":"Normal","dependOn":"NULL","dependOnField":"","isKeyField":"No","idField":"No","id":"columns_40"}]', '2016-06-03 00:26:32', '2016-06-03 00:26:32'); + + +create table `UserReports` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `details` text default null, + `parameters` text default null, + `query` text default null, + `paramOrder` varchar(500) NOT NULL, + `type` enum('Query','Class') default 'Query', + `report_group` varchar(500) NULL, + `output` varchar(15) NOT NULL default 'CSV', + primary key (`id`), + UNIQUE KEY `UserReports_Name` (`name`) +) engine=innodb default charset=utf8; + + + +REPLACE INTO `UserReports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Time Entry Report', 'View your time entries by date range and project', + '[\r\n[ "client", {"label":"Select Client","type":"select","allow-null":true,"null-label":"Not Selected","remote-source":["Client","id","name"]}],\r\n[ "project", {"label":"Or Project","type":"select","allow-null":true,"null-label":"All Projects","remote-source":["Project","id","name","getAllProjects"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', + 'EmployeeTimesheetReport', '["client","project","date_start","date_end","status"]', 'Class','Time Management','CSV'); + +REPLACE INTO `UserReports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Attendance Report', 'View your attendance entries by date range', '[\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'EmployeeAttendanceReport', '["date_start","date_end"]', 'Class','Time Management','CSV'); + +REPLACE INTO `UserReports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Time Tracking Report', 'View your working hours and attendance details for each day for a given period ', '[\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', 'EmployeeTimeTrackReport', '["date_start","date_end"]', 'Class','Time Management','CSV'); + + +REPLACE INTO `UserReports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Travel Request Report', 'View travel requests for a specified period', + '[\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}],\r\n[ "status", {"label":"Status","type":"select","source":[["NULL","All Statuses"],["Approved","Approved"],["Pending","Pending"],["Rejected","Rejected"],["Cancellation Requested","Cancellation Requested"],["Cancelled","Cancelled"]]}]\r\n]', + 'TravelRequestReport', + '["date_start","date_end","status"]', 'Class', 'Travel and Expense Management','CSV'); + + +REPLACE INTO `UserReports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Time Sheet Report', 'This report list all employee time sheets by employee and date range', + '[\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}],\r\n[ "status", {"label":"Status","allow-null":true,"null-label":"All Status","type":"select","source":[["Approved","Approved"],["Pending","Pending"],["Rejected","Rejected"]]}]\r\n]', + 'EmployeeTimeSheetData', + '["date_start","date_end","status"]', 'Class','Time Management','CSV'); + + +REPLACE INTO `UserReports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Client Project Time Report', 'View your time entries for projects under a given client', + '[\r\n[ "client", {"label":"Select Client","type":"select","allow-null":false,"remote-source":["Client","id","name"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', + 'ClientProjectTimeReport', '["client","date_start","date_end","status"]', 'Class','Time Management','PDF'); + + + + + + +REPLACE INTO `Reports` (`name`, `details`, `parameters`, `query`, `paramOrder`, `type`,`report_group`,`output`) VALUES + ('Employee Time Entry Report', 'View employee time entries by date range and project', + '[\r\n[ "employee", {"label":"Employee","type":"select2multi","allow-null":true,"null-label":"All Employees","remote-source":["Employee","id","first_name+last_name"]}],\r\n[ "client", {"label":"Select Client","type":"select","allow-null":true,"null-label":"Not Selected","remote-source":["Client","id","name"]}],\r\n[ "project", {"label":"Or Project","type":"select","allow-null":true,"null-label":"All Projects","remote-source":["Project","id","name","getAllProjects"]}],\r\n[ "date_start", {"label":"Start Date","type":"date"}],\r\n[ "date_end", {"label":"End Date","type":"date"}]\r\n]', + 'EmployeeTimesheetReport', '["employee","client","project","date_start","date_end","status"]', 'Class','Time Management','CSV'); + + +Alter table `Projects` MODIFY COLUMN `status` enum('Active','On Hold','Completed', 'Dropped') default 'Active'; + +REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES +('System: Reset Module Names', '0', 'Select this to reset module names in Database','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'); + + + + + + +create table `ReportFiles` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NULL, + `name` varchar(100) NOT NULL, + `attachment` varchar(100) NOT NULL, + `created` timestamp default '0000-00-00 00:00:00', + unique key `ReportFiles_attachment` (`attachment`), + primary key (`id`) +) engine=innodb default charset=utf8; + + +INSERT IGNORE into ReportFiles (`name`,`attachment`,`created`) SELECT filename,name,SUBSTRING_INDEX(SUBSTRING_INDEX(name,'-',-5),'_',1) from Files where file_group ='Report'; + +Update Settings set value = '1' where name = 'System: Reset Module Names'; + +create table `PayslipTemplates` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `data` longtext NULL, + `status` enum('Show','Hide') default 'Show', + `created` timestamp default '0000-00-00 00:00:00', + `updated` timestamp default '0000-00-00 00:00:00', + primary key (`id`) +) engine=innodb default charset=utf8; + + +Alter table `Payroll` add column `payslipTemplate` bigint(20) NULL; + +Alter table `Payroll` modify column `column_template` bigint(20) NULL; + + +Alter table `Employees` add column `approver1` bigint(20) default null; +Alter table `Employees` add column `approver2` bigint(20) default null; +Alter table `Employees` add column `approver3` bigint(20) default null; + +create table `EmployeeApprovals` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `type` varchar(100) NOT NULL, + `element` bigint(20) NOT NULL, + `approver` bigint(20) NULL, + `level` int(11) default 0, + `status` int(11) default 0, + `active` int(11) default 0, + `created` timestamp default '0000-00-00 00:00:00', + `updated` timestamp default '0000-00-00 00:00:00', + UNIQUE key `EmployeeApprovals_type_element_level` (`type`,`element`,`level`), + INDEX `EmployeeApprovals_type_element_status_level` (`type`,`element`,`status`,`level`), + INDEX `EmployeeApprovals_type_element` (`type`,`element`), + INDEX `EmployeeApprovals_type` (`type`), + primary key (`id`) +) engine=innodb default charset=utf8; + +Alter table `EmployeeExpenses` modify column `status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending'; +Alter table `EmployeeTravelRecords` modify column `status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending'; + + +Alter table `EmployeeLeaves` modify column `status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending'; + +Alter table `EmployeeLeaveLog` modify column `status_from` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending'; +Alter table `EmployeeLeaveLog` modify column `status_to` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending'; + + +create table `StatusChangeLogs` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `type` varchar(100) NOT NULL, + `element` bigint(20) NOT NULL, + `user_id` bigint(20) NULL, + `data` varchar(500) NOT NULL, + `status_from` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending', + `status_to` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending', + `created` timestamp default '0000-00-00 00:00:00', + INDEX `EmployeeApprovals_type_element` (`type`,`element`), + primary key (`id`) +) engine=innodb default charset=utf8; + + + +create table `OvertimeCategories` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(500) NOT NULL, + `created` timestamp NULL default '0000-00-00 00:00:00', + `updated` timestamp NULL default '0000-00-00 00:00:00', + primary key (`id`) +) engine=innodb default charset=utf8; + + +create table `EmployeeOvertime` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `employee` bigint(20) NOT NULL, + `start_time` timestamp NULL default '0000-00-00 00:00:00', + `end_time` timestamp NULL default '0000-00-00 00:00:00', + `category` bigint(20) NOT NULL, + `project` bigint(20) NULL, + `notes` text NULL, + `created` timestamp NULL default '0000-00-00 00:00:00', + `updated` timestamp NULL default '0000-00-00 00:00:00', + `status` enum('Approved','Pending','Rejected','Cancellation Requested','Cancelled','Processing') default 'Pending', + CONSTRAINT `Fk_EmployeeOvertime_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `Fk_EmployeeOvertime_Category` FOREIGN KEY (`category`) REFERENCES `OvertimeCategories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + primary key (`id`) +) engine=innodb default charset=utf8; + + + + + + +ALTER table `Payroll` modify column `column_template` bigint(20) NULL; + + +ALTER table `CompanyStructures` add column `heads` varchar(255) NULL default NULL; + +ALTER table `CustomFields` add column `display_section` varchar(50) NULL; + + + +INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES + ('Expense: Allow Indirect Admins to Approve', '0', 'Allow indirect admins to approve expense requests','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'); + +INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES + ('Travel: Allow Indirect Admins to Approve', '0', 'Allow indirect admins to approve travel requests','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'); + +INSERT INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES + ('Overtime: Allow Indirect Admins to Approve', '0', 'Allow indirect admins to approve overtime requests','["value", {"label":"Value","type":"select","source":[["1","Yes"],["0","No"]]}]'); + + + +Update `Languages` set name = 'en' where name = 'English'; +Update `Languages` set name = 'fr' where name = 'French'; +Update `Languages` set name = 'de' where name = 'German'; +Update `Languages` set name = 'zh' where name = 'Chinese'; + +INSERT INTO `Languages` (`id`, `name`, `description`) VALUES +(5, 'aa', 'Afar'), +(6, 'ab', 'Abkhaz'), +(7, 'ae', 'Avestan'), +(8, 'af', 'Afrikaans'), +(9, 'ak', 'Akan'), +(10, 'am', 'Amharic'), +(11, 'an', 'Aragonese'), +(12, 'ar', 'Arabic'), +(13, 'as', 'Assamese'), +(14, 'av', 'Avaric'), +(15, 'ay', 'Aymara'), +(16, 'az', 'Azerbaijani'), +(17, 'ba', 'Bashkir'), +(18, 'be', 'Belarusian'), +(19, 'bg', 'Bulgarian'), +(20, 'bh', 'Bihari'), +(21, 'bi', 'Bislama'), +(22, 'bm', 'Bambara'), +(23, 'bn', 'Bengali'), +(24, 'bo', 'Tibetan Standard, Tibetan, Central'), +(25, 'br', 'Breton'), +(26, 'bs', 'Bosnian'), +(27, 'ca', 'Catalan; Valencian'), +(28, 'ce', 'Chechen'), +(29, 'ch', 'Chamorro'), +(30, 'co', 'Corsican'), +(31, 'cr', 'Cree'), +(32, 'cs', 'Czech'), +(33, 'cu', 'Church Slavic'), +(34, 'cv', 'Chuvash'), +(35, 'cy', 'Welsh'), +(36, 'da', 'Danish'), +(37, 'dv', 'Divehi; Dhivehi; Maldivian;'), +(38, 'dz', 'Dzongkha'), +(39, 'ee', 'Ewe'), +(40, 'el', 'Greek, Modern'), +(41, 'eo', 'Esperanto'), +(42, 'es', 'Spanish; Castilian'), +(43, 'et', 'Estonian'), +(44, 'eu', 'Basque'), +(45, 'fa', 'Persian'), +(46, 'ff', 'Fula; Fulah; Pulaar; Pular'), +(47, 'fi', 'Finnish'), +(48, 'fj', 'Fijian'), +(49, 'fo', 'Faroese'), +(50, 'fy', 'Western Frisian'), +(51, 'ga', 'Irish'), +(52, 'gd', 'Scottish Gaelic; Gaelic'), +(53, 'gl', 'Galician'), +(55, 'gu', 'Gujarati'), +(56, 'gv', 'Manx'), +(57, 'ha', 'Hausa'), +(58, 'he', 'Hebrew (modern)'), +(59, 'hi', 'Hindi'), +(60, 'ho', 'Hiri Motu'), +(61, 'hr', 'Croatian'), +(62, 'ht', 'Haitian; Haitian Creole'), +(63, 'hu', 'Hungarian'), +(64, 'hy', 'Armenian'), +(65, 'hz', 'Herero'), +(66, 'ia', 'Interlingua'), +(67, 'id', 'Indonesian'), +(68, 'ie', 'Interlingue'), +(69, 'ig', 'Igbo'), +(70, 'ii', 'Nuosu'), +(71, 'ik', 'Inupiaq'), +(72, 'io', 'Ido'), +(73, 'is', 'Icelandic'), +(74, 'it', 'Italian'), +(75, 'iu', 'Inuktitut'), +(76, 'ja', 'Japanese (ja)'), +(77, 'jv', 'Javanese (jv)'), +(78, 'ka', 'Georgian'), +(79, 'kg', 'Kongo'), +(80, 'ki', 'Kikuyu, Gikuyu'), +(81, 'kj', 'Kwanyama, Kuanyama'), +(82, 'kk', 'Kazakh'), +(83, 'kl', 'Kalaallisut, Greenlandic'), +(84, 'km', 'Khmer'), +(85, 'kn', 'Kannada'), +(86, 'ko', 'Korean'), +(87, 'kr', 'Kanuri'), +(88, 'ks', 'Kashmiri'), +(89, 'ku', 'Kurdish'), +(90, 'kv', 'Komi'), +(91, 'kw', 'Cornish'), +(92, 'ky', 'Kirghiz, Kyrgyz'), +(93, 'la', 'Latin'), +(94, 'lb', 'Luxembourgish, Letzeburgesch'), +(95, 'lg', 'Luganda'), +(96, 'li', 'Limburgish, Limburgan, Limburger'), +(97, 'ln', 'Lingala'), +(98, 'lo', 'Lao'), +(99, 'lt', 'Lithuanian'), +(100, 'lu', 'Luba-Katanga'), +(101, 'lv', 'Latvian'), +(102, 'mg', 'Malagasy'), +(103, 'mh', 'Marshallese'), +(104, 'mi', 'Maori'), +(105, 'mk', 'Macedonian'), +(106, 'ml', 'Malayalam'), +(107, 'mn', 'Mongolian'), +(108, 'mr', 'Marathi (Mara?hi)'), +(109, 'ms', 'Malay'), +(110, 'mt', 'Maltese'), +(111, 'my', 'Burmese'), +(112, 'na', 'Nauru'), +(113, 'nb', 'Norwegian Bokmål'), +(114, 'nd', 'North Ndebele'), +(115, 'ne', 'Nepali'), +(116, 'ng', 'Ndonga'), +(117, 'nl', 'Dutch'), +(118, 'nn', 'Norwegian Nynorsk'), +(119, 'no', 'Norwegian'), +(120, 'nr', 'South Ndebele'), +(121, 'nv', 'Navajo, Navaho'), +(122, 'ny', 'Chichewa; Chewa; Nyanja'), +(123, 'oc', 'Occitan'), +(124, 'oj', 'Ojibwe, Ojibwa'), +(125, 'om', 'Oromo'), +(126, 'or', 'Oriya'), +(127, 'os', 'Ossetian, Ossetic'), +(128, 'pa', 'Panjabi, Punjabi'), +(129, 'pi', 'Pali'), +(130, 'pl', 'Polish'), +(131, 'ps', 'Pashto, Pushto'), +(132, 'pt', 'Portuguese'), +(133, 'qu', 'Quechua'), +(134, 'rm', 'Romansh'), +(135, 'rn', 'Kirundi'), +(136, 'ro', 'Romanian, Moldavian, Moldovan'), +(137, 'ru', 'Russian'), +(138, 'rw', 'Kinyarwanda'), +(139, 'sa', 'Sanskrit (Sa?sk?ta)'), +(140, 'sc', 'Sardinian'), +(141, 'sd', 'Sindhi'), +(142, 'se', 'Northern Sami'), +(143, 'sg', 'Sango'), +(144, 'si', 'Sinhala, Sinhalese'), +(145, 'sk', 'Slovak'), +(146, 'sl', 'Slovene'), +(147, 'sm', 'Samoan'), +(148, 'sn', 'Shona'), +(149, 'so', 'Somali'), +(150, 'sq', 'Albanian'), +(151, 'sr', 'Serbian'), +(152, 'ss', 'Swati'), +(153, 'st', 'Southern Sotho'), +(154, 'su', 'Sundanese'), +(155, 'sv', 'Swedish'), +(156, 'sw', 'Swahili'), +(157, 'ta', 'Tamil'), +(158, 'te', 'Telugu'), +(159, 'tg', 'Tajik'), +(160, 'th', 'Thai'), +(161, 'ti', 'Tigrinya'), +(162, 'tk', 'Turkmen'), +(163, 'tl', 'Tagalog'), +(164, 'tn', 'Tswana'), +(165, 'to', 'Tonga (Tonga Islands)'), +(166, 'tr', 'Turkish'), +(167, 'ts', 'Tsonga'), +(168, 'tt', 'Tatar'), +(169, 'tw', 'Twi'), +(170, 'ty', 'Tahitian'), +(171, 'ug', 'Uighur, Uyghur'), +(172, 'uk', 'Ukrainian'), +(173, 'ur', 'Urdu'), +(174, 'uz', 'Uzbek'), +(175, 've', 'Venda'), +(176, 'vi', 'Vietnamese'), +(178, 'wa', 'Walloon'), +(179, 'wo', 'Wolof'), +(180, 'xh', 'Xhosa'), +(181, 'yi', 'Yiddish'), +(182, 'yo', 'Yoruba'), +(183, 'za', 'Zhuang, Chuang'), +(184, 'zu', 'Zulu'); + + +create table `SupportedLanguages` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `name` varchar(100) default null, + `description` varchar(100) default null, + primary key (`id`) +) engine=innodb default charset=utf8; + + +INSERT INTO `SupportedLanguages` (`name`, `description`) VALUES +('en', 'English'), +('de', 'German'), +('fr', 'French'), +('pl', 'Polish'), +('it', 'Italian'), +('si', 'Sinhala'), +('zh', 'Chinese'), +('ja', 'Japanese'), +('hi', 'Hindi'), +('es', 'Spanish'); + + +Alter table `Users` add column varchar(100) default null; + +REPLACE INTO `Settings` (`name`, `value`, `description`, `meta`) VALUES + ('System: Language', 'en', 'Current Language','["value", {"label":"Value","type":"select2","allow-null":false,"remote-source":["SupportedLanguage","name","description"]}]'); + + + diff --git a/ext/admin/attendance/api/AttendanceActionManager.php b/ext/admin/attendance/api/AttendanceActionManager.php index 8c30f95c..e1a8f656 100644 --- a/ext/admin/attendance/api/AttendanceActionManager.php +++ b/ext/admin/attendance/api/AttendanceActionManager.php @@ -41,7 +41,7 @@ class AttendanceActionManager extends SubActionManager{ //check if dates are differnet if(!empty($outDate) && $inDate != $outDate){ - return new IceResponse(IceResponse::ERROR,"Attendance entry should be within a single day"); + return new IceResponse(IceResponse::ERROR,LanguageManager::tran("Attendance entry should be within a single day")); } //compare dates @@ -102,4 +102,4 @@ class AttendanceActionManager extends SubActionManager{ } -} \ No newline at end of file +} diff --git a/ext/admin/attendance/api/AttendanceAdminManager.php b/ext/admin/attendance/api/AttendanceAdminManager.php index 43bfe808..e797da77 100644 --- a/ext/admin/attendance/api/AttendanceAdminManager.php +++ b/ext/admin/attendance/api/AttendanceAdminManager.php @@ -38,6 +38,8 @@ if (!class_exists('AttendanceAdminManager')) { $this->addCalculationHook('AttendanceUtil_getTimeWorkedHours','Total Hours from Attendance','AttendanceUtil','getTimeWorkedHours'); $this->addCalculationHook('AttendanceUtil_getRegularWorkedHours','Total Regular Hours from Attendance','AttendanceUtil','getRegularWorkedHours'); $this->addCalculationHook('AttendanceUtil_getOverTimeWorkedHours','Total Overtime Hours from Attendance','AttendanceUtil','getOverTimeWorkedHours'); + $this->addCalculationHook('AttendanceUtil_getWeeklyRegularWorkedHours','Total Weekly Regular Hours from Attendance','AttendanceUtil','getWeeklyBasedRegularHours'); + $this->addCalculationHook('AttendanceUtil_getWeeklyOverTimeWorkedHours','Total Weekly Overtime Hours from Attendance','AttendanceUtil','getWeeklyBasedOvertimeHours'); } } @@ -249,6 +251,80 @@ if (!class_exists('AttendanceUtil')) { $atSum = $this->getAttendanceSummary($employeeId, $startDate, $endDate); return round(($atSum['o']/60)/60,2); } + + public function getWeeklyBasedRegularHours($employeeId, $startDate, $endDate){ + $atSum = $this->getWeeklyBasedOvertimeSummary($employeeId, $startDate, $endDate); + return round(($atSum['r']/60)/60,2); + } + + public function getWeeklyBasedOvertimeHours($employeeId, $startDate, $endDate){ + $atSum = $this->getWeeklyBasedOvertimeSummary($employeeId, $startDate, $endDate); + return round(($atSum['o']/60)/60,2); + } + + public function getWeeklyBasedOvertimeSummary($employeeId, $startDate, $endDate){ + + $attendance = new Attendance(); + $atTimeByWeek = array(); + + //Find weeks starting from sunday and ending from saturday in day period + + $weeks = $this->getWeeklyDays($startDate,$endDate); + foreach($weeks as $k=>$week){ + $startTime = $week[0]." 00:00:00"; + $endTime = $week[count($week) - 1]." 23:59:59"; + $atts = $attendance->Find("employee = ? and in_time >= ? and out_time <= ?",array($employeeId, $startTime, $endTime)); + foreach($atts as $atEntry){ + if($atEntry->out_time == "0000-00-00 00:00:00" || empty($atEntry->out_time)){ + continue; + } + if(!isset($atTimeByWeek[$k])){ + $atTimeByWeek[$k] = 0; + } + + $diff = strtotime($atEntry->out_time) - strtotime($atEntry->in_time); + if($diff < 0){ + $diff = 0; + } + + $atTimeByWeek[$k] += $diff; + } + } + + $overtimeStarts = SettingsManager::getInstance()->getSetting('Attendance: Overtime Start Hour'); + $overtimeStarts = (is_numeric($overtimeStarts))?floatval($overtimeStarts)*60*60*5:0; + $regTime = 0; + $overTime = 0; + foreach($atTimeByWeek as $value){ + if($value > $overtimeStarts){ + $regTime += $overtimeStarts; + $overTime = $value - $overtimeStarts; + }else{ + $regTime += $value; + } + } + + return array('r'=>$regTime,'o'=>$overTime); + + } + + private function getWeeklyDays($startDate,$endDate){ + $start = new DateTime($startDate); + $end = new DateTime($endDate.' 23:59'); + $interval = new DateInterval('P1D'); + $dateRange = new DatePeriod($start, $interval, $end); + + $weekNumber = 1; + $weeks = array(); + foreach ($dateRange as $date) { + $weeks[$weekNumber][] = $date->format('Y-m-d'); + if ($date->format('w') == 6) { + $weekNumber++; + } + } + + return $weeks; + } } } diff --git a/ext/admin/attendance/dashboard.html b/ext/admin/attendance/dashboard.html index a60691c3..cd710126 100644 --- a/ext/admin/attendance/dashboard.html +++ b/ext/admin/attendance/dashboard.html @@ -2,17 +2,17 @@

- Attendance + Attendance

- #_numberOfAttendanceLastWeek_# Entries Last Week + #_numberOfAttendanceLastWeek_# Entries Last Week

- Monitor Attendance + Monitor Attendance
- \ No newline at end of file + diff --git a/ext/admin/attendance/index.php b/ext/admin/attendance/index.php index 4301f9c0..591c4ef5 100644 --- a/ext/admin/attendance/index.php +++ b/ext/admin/attendance/index.php @@ -28,11 +28,8 @@ include APP_BASE_PATH.'modulejslibs.inc.php'; ?>
@@ -52,20 +49,6 @@ include APP_BASE_PATH.'modulejslibs.inc.php';
- @@ -79,4 +62,4 @@ modJsList['tabAttendanceStatus'].setShowAddNew(false); var modJs = modJsList['tabAttendance']; - \ No newline at end of file + diff --git a/ext/admin/company_structure/api/Company_structureAdminManager.php b/ext/admin/company_structure/api/Company_structureAdminManager.php index bfdf4fb0..ad740d18 100644 --- a/ext/admin/company_structure/api/Company_structureAdminManager.php +++ b/ext/admin/company_structure/api/Company_structureAdminManager.php @@ -87,6 +87,20 @@ if (!class_exists('CompanyStructure')) { } } } + + public static function isHeadOfCompanyStructure($companyStructureId, $profileId){ + $companyStructure = new CompanyStructure(); + $companyStructure->Load("id = ?",array($companyStructureId)); + + if(isset($companyStructure->heads) && !empty($companyStructure->heads)){ + $heads = json_decode($companyStructure->heads); + if(is_array($heads) && !empty($heads) && in_array($profileId, $heads)){ + return true; + } + } + + return false; + } } } @@ -108,4 +122,4 @@ if (!class_exists('Timezone')) { } } -} \ No newline at end of file +} diff --git a/ext/admin/company_structure/dashboard.html b/ext/admin/company_structure/dashboard.html index 8398f192..af363157 100644 --- a/ext/admin/company_structure/dashboard.html +++ b/ext/admin/company_structure/dashboard.html @@ -2,16 +2,16 @@
-

Company

+

Company

- #_numberOfCompanyStuctures_# Departments + #_numberOfCompanyStuctures_# Departments

- Manage Company + Manage Company
- \ No newline at end of file + diff --git a/ext/admin/company_structure/index.php b/ext/admin/company_structure/index.php index 4e629453..4cf95df2 100644 --- a/ext/admin/company_structure/index.php +++ b/ext/admin/company_structure/index.php @@ -54,8 +54,8 @@ path.link {
@@ -93,4 +93,4 @@ modJsList['tabCompanyGraph'] = new CompanyGraphAdapter('CompanyStructure'); var modJs = modJsList['tabCompanyStructure']; - \ No newline at end of file + diff --git a/ext/admin/company_structure/lib.js b/ext/admin/company_structure/lib.js index f5f81126..34d97f94 100644 --- a/ext/admin/company_structure/lib.js +++ b/ext/admin/company_structure/lib.js @@ -43,7 +43,8 @@ CompanyStructureAdapter.method('getFormFields', function() { [ "type", {"label":"Type","type":"select","source":[["Company","Company"],["Head Office","Head Office"],["Regional Office","Regional Office"],["Department","Department"],["Unit","Unit"],["Sub Unit","Sub Unit"],["Other","Other"]]}], [ "country", {"label":"Country","type":"select2","remote-source":["Country","code","name"]}], [ "timezone", {"label":"Time Zone","type":"select2","allow-null":false,"remote-source":["Timezone","name","details"]}], - [ "parent", {"label":"Parent Structure","type":"select","allow-null":true,"remote-source":["CompanyStructure","id","title"]}] + [ "parent", {"label":"Parent Structure","type":"select","allow-null":true,"remote-source":["CompanyStructure","id","title"]}], + [ "heads", {"label":"Heads","type":"select2multi","allow-null":true,"remote-source":["Employee","id","first_name+last_name"]}] ]; }); diff --git a/ext/admin/employees/api/EmployeesActionManager.php b/ext/admin/employees/api/EmployeesActionManager.php index 2a518cf2..5d006cc7 100644 --- a/ext/admin/employees/api/EmployeesActionManager.php +++ b/ext/admin/employees/api/EmployeesActionManager.php @@ -35,7 +35,7 @@ class EmployeesActionManager extends SubActionManager{ $ok = $employee->Save(); if(!$ok){ - return new IceResponse(IceResponse::ERROR, "Error occured while activating employee"); + return new IceResponse(IceResponse::ERROR, "Error occurred while activating employee"); } return new IceResponse(IceResponse::SUCCESS, $employee); @@ -161,4 +161,4 @@ class EmployeesActionManager extends SubActionManager{ } return $data; } -} \ No newline at end of file +} diff --git a/ext/admin/employees/api/EmployeesAdminManager.php b/ext/admin/employees/api/EmployeesAdminManager.php index b7fd7f9a..7305a2c8 100644 --- a/ext/admin/employees/api/EmployeesAdminManager.php +++ b/ext/admin/employees/api/EmployeesAdminManager.php @@ -30,6 +30,7 @@ if (!class_exists('EmployeesAdminManager')) { public function setupModuleClassDefinitions(){ $this->addModelClass('Employee'); $this->addModelClass('EmploymentStatus'); + $this->addModelClass('EmployeeApproval'); } public function getDashboardItemData(){ @@ -288,6 +289,25 @@ if (!class_exists('EmploymentStatus')) { } } +if (!class_exists('EmployeeApproval')) { + class EmployeeApproval extends ICEHRM_Record { + + var $_table = 'EmployeeApprovals'; + + public function getAdminAccess(){ + return array("get","element","save","delete"); + } + + public function getManagerAccess(){ + return array("get","element","save"); + } + + public function getUserAccess(){ + return array(); + } + } +} + if (!class_exists('EmployeeRestEndPoint')) { class EmployeeRestEndPoint extends RestEndPoint{ diff --git a/ext/admin/employees/customTemplates/myDetails.html b/ext/admin/employees/customTemplates/myDetails.html index d0f87640..f26802b4 100644 --- a/ext/admin/employees/customTemplates/myDetails.html +++ b/ext/admin/employees/customTemplates/myDetails.html @@ -56,8 +56,7 @@

Personal Information

-
-
+
@@ -74,10 +73,7 @@
-
-
-
- +
@@ -90,16 +86,14 @@
-
-
+
- +
-

Contact Information

-
-
+

Contact Information

+
@@ -116,9 +110,6 @@
-
-
-
@@ -135,16 +126,14 @@
-
-
-
+
+
- +
-

Job Details

-
-
+

Job Details

+
@@ -161,56 +150,57 @@
-
-
-
-
-
-
+
+
- - + + +
+ +
+ + \ No newline at end of file + diff --git a/ext/admin/employees/dashboard.html b/ext/admin/employees/dashboard.html index 74c34b49..2c67daed 100644 --- a/ext/admin/employees/dashboard.html +++ b/ext/admin/employees/dashboard.html @@ -3,17 +3,17 @@

- People + People

- #_numberOfEmployees_# Employees + #_numberOfEmployees_# Employees

- Manage Employees + Manage Employees
- \ No newline at end of file + diff --git a/ext/admin/employees/index.php b/ext/admin/employees/index.php index 144daf5a..4e486aa1 100644 --- a/ext/admin/employees/index.php +++ b/ext/admin/employees/index.php @@ -11,30 +11,30 @@ $customFields = BaseService::getInstance()->getCustomFields("Employee"); @@ -287,9 +316,9 @@ include('configureUIManager.php');

- + -    +   

diff --git a/src/images/clone.png b/src/images/clone.png new file mode 100644 index 0000000000000000000000000000000000000000..6db0919d69adf12d085f4c835f7355b224fd1025 GIT binary patch literal 603 zcmV-h0;K(kP)WdKcYATc!{L3L*!GB7YTATcpIGch_bG$1Q5F)%RM{uz1z000McNliru z(*^_#AOOU|dk_Es010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00FZ} zL_t(|+ND#?D@0Kg|Gmd7$k)csAa=?}BKBipEkbHi%0j}5IcJ|WDypQ{?bMAeQ$1_T9ozA)E-SfM@^E>we|6E28tfexNz2mrQZwKDi-m)Eb z!T^&e#uy>&!ybs0JRHBP49sQ@N4;9#oW-ro$j+xZq1~hN1d1 zjL+Q8;W=L4vK*#^TyYRsmR(RNhF+N+AYB9jHWbKGG>T0UcoT=6n zh}BW+O>_#u{EJMfjK!;`!iIR2K0u$h#*@mImz6{rc%JtmSU{hx>7rT{@$Ih5q5ysO z-M~B@U54=ikoTuxx$s-irf!}{s$$EsFqiCw5CUs^m)|weBG@wMN+PdD08DQjE1lX6Be%Cd|1{1~?fLIKeT0HPo_uhOMh3nf_G*>Dz3;qFrU+?Jm^2ED25R?D_002ovPDHLkV1k=L1|t9f literal 0 HcmV?d00001 diff --git a/src/images/file-icons/_blank.png b/src/images/file-icons/_blank.png new file mode 100755 index 0000000000000000000000000000000000000000..65e156ae3b18d42c4cfdc9deb369a56e691abe13 GIT binary patch literal 446 zcmV;v0YUzWP)+iyg~H;c|O%JB|Wy;B!0<=6p=9 z9|!xM)Fk3JC(8q|B3JP^BUos)U~i`vZbaRLmFn3dB{aaa#EPLE%)@Rk4p%x$Nk+6; z=Fxs=pe%Z$)JG3yd>`%x!y>j7Mf`D(!5<R9Eqo}hM3X*K_QU?p8JXflLoD=;PzbFu0P#8jJ> z2RWofkWoE>nFKo(Xz6K61xXWZm1qaQ(oBEdtieR>6|u7gWKF^iCQ8BPUton`_%?dK oxP2HkPQjD#{Q5B}@81Fp04=b<{907*qoM6N<$g8YWOg#Z8m literal 0 HcmV?d00001 diff --git a/src/images/file-icons/_page.png b/src/images/file-icons/_page.png new file mode 100755 index 0000000000000000000000000000000000000000..5773b8088ec0a44fc5509f380ed921d8069747af GIT binary patch literal 710 zcmV;%0y+JOP)Qp4e#0a8DjgSzcN)aVR6cwn`gv3c4 z-^*t^Esx|b*YugAMYZ(VZp`NcCc&htte2;0!<940N`PJyEy2xm0sY&?5cz6OpHl79#U(0#h! z!o7!20Nx?SRk+i`xH@8BGQ;p-dBM#XVq?AZAtCvnAW*+D?Er=;@x`k`>v60uOrhP?v2{~0RI0V1K7wCeg{3hQ zYgc9=d!2})YSMSVn>jf`6an3=#Fo%PZp<%@e!0Ct( zF#+g|B_)DzfCBP`28GvXcfhS6nG8)J$zos>f~LJeN;`uTG>JBAkD)j_Ls46a{GRvN z0+Q*QNSV~~0R#cvwoUS1ZSRr=heAwI)k?C6Y*6}- z!Qv#y2q&q%es=(YA41l(i9n{IIDwhbD~n`cb<%}~;%KSA+JF48{oV6S(>hW{j(#gT s*`*+L&>NpWt6t;S`C0Rh-+v1*0B&OA3b(3000SaNLh0L01FWS01FWTe`H^g00004XF*Lt006O%3;baP0002GP)t-s z01&Q%n!J0Jymphla*@Aoj=yP)!DWiVVTi+Bgv3~a#Z`dFg`K|R?fl{F{NU>R-s$_? z==hb+-j=+_x$m{a`a*)57t;+55{Q$rKdX>BX|NnlMy05_4`TPI(`u_F#{`C0% z^7sDm_Wtkm{jf@zlOL=espj4MBkCI|)z)rlw`A+Rey?)4GW48yE9nyq%HYgu0= Wa~z72@L8t-0000^A^BP>3xrkd{H%Iw?1yr_yfa?C<@yghWJ7b!%ttD(G}b8nZp+PZI8guYIDraEr9 zB~hjxHdgWG)GAnvSdY|WpxRtoP`;&qzp9Ak%%|edv&_7uq@0dkSTTNjb~i#XNJuw8 zQdTZpin*?wetmK$F+Att#?!)vu(4=tfq5oUo4dQckBNlv=E48<>h9jF^9!M8zU$`NS375{tAd@v(CuB!-Gw!B*YEhLoc5^6!V?D>`Ic};*-5Pw_*jles} zvAkhgwuCe1w0NAlek2c}ZMWqegx%luZplse>hh?CHkT4Ynq5=u9d`?umqJx7v|DZh a=+GMDT^1I7{xw|y0000KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0008PNkl1wk%$alNSBIHINis%9Lm_GgY;{r5xD_IW)IT6Q=}NbC zFM@8}DkzBEYl{eKx)55FR7+?;7>xn@12U70lbN}bGxy$ejti5L67bu+yN8GO{e+`4 z#uPU;HomJ*O+8_)buP=8Bnj49{^|8{TI<^j3k&a+N~NLq9)L!pfd;6ZIYS{bmEmCU zO0`<81m^(AD}^eR5M$WAcW-HbfB$TfBrElLeW3SCT=dU2n`BuAA_(B~n)JhuNtR#3oIgi49uq|o)>;psj{hKp zkn_%o_a5&(gg^k&%wab-;o(CHNBU6|p|$oW4FC`klu{gTEF$D{IpXFs=oeo=D}~SJ zQKA6CV+JQ7k5UBX93dXV=3R1tG6q$M08Sf(5C|b~j2ESF-~T|GWE}jsPWk6ws0EL@ zv`R20oC0K7MwVrG?@?Ogzx;~cH`jTvdXaK#iNSEl-?x8d%35&le+-Oaa`P6WPd{Vw z{uP!kzJ*CsoO6s`K95m3_~P?Z2GZ$t#2AAp#Q}lQ<#(8UsYQ2Z2j?8lIYI~+W3bjb z0676DSF6<(5y=5Tl!AO7Nz=!=IVxG=I9^YZWbfYr0A;X9^Gqx&kN^Mx07*qoM6N<$ Ef(6cgC;$Ke literal 0 HcmV?d00001 diff --git a/src/images/log.png b/src/images/log.png new file mode 100644 index 0000000000000000000000000000000000000000..c674fc6a8eda789197c187116c665422308a4a17 GIT binary patch literal 611 zcmV-p0-XJcP))V%ahg;z+leId{HuMge^K{83e_)wo)#5k(Qr zs7a#{(P%VKN-@cEvOFWpGSV!?7=tlpyz_duQ13syQ;#1#`LepYx+x;6qAOG?6?CP7 z)*1zf2u>W%O{ZKg7w6~aN2jOXhT1vTtk>$B5AHv_$A2ixvP~z_(vv(_$v9CV1d{O$ z$@u0@Q!8%MirWArH;Kx#9Br&cLG-ZE(pRKJe;y7k|d;1?9c#N@VYo-JMXW!5G`RfO7cXl~GK3*_utr-jkRIAll z1ZN%ESTl>Tw$|g>)93Vhy(NO8C~(f>$9oVYAB^J#xR*oW&2x}j xN+qtZuerLq;^N|h%galWBq2@H@!{cN_zh%bTj?8iformat("Y-m-d H:i:s"); $dateTimeNow = date("Y-m-d H:i:s"); -$diffHoursBetweenServerTimezoneWithGMT = (strtotime($dateTimeNow) - (strtotime($dateTimeColomboStr) - 5.5*60*60))/(60*60); \ No newline at end of file +$diffHoursBetweenServerTimezoneWithGMT = (strtotime($dateTimeNow) - (strtotime($dateTimeColomboStr) - 5.5*60*60))/(60*60); diff --git a/src/includes.inc.php b/src/includes.inc.php index 26577995..2f88882c 100644 --- a/src/includes.inc.php +++ b/src/includes.inc.php @@ -124,3 +124,14 @@ if(is_dir(MODULE_PATH.'/customTemplates/')){ } +foreach($fieldTemplates as $k=>$v){ + $fieldTemplates[$k] = LanguageManager::translateTnrText($v); +} + +foreach($templates as $k=>$v){ + $templates[$k] = LanguageManager::translateTnrText($v); +} + +foreach($customTemplates as $k=>$v){ + $customTemplates[$k] = LanguageManager::translateTnrText($v); +} \ No newline at end of file diff --git a/src/js/app-global.js b/src/js/app-global.js index 1eaa5300..41b60734 100644 --- a/src/js/app-global.js +++ b/src/js/app-global.js @@ -77,7 +77,7 @@ function download(name, closeCallback, closeCallbackData){ var fileParts; var viewableImages = ["png","jpg","gif","bmp","jpge"]; - if(data['filename'].indexOf("https:") == 0){ + if(data['filename'].indexOf("https:") == 0 || data['filename'].indexOf("http:") == 0){ fileParts = data['filename'].split("?"); fileParts = fileParts[0].split("."); @@ -156,4 +156,4 @@ function nl2br(str, is_xhtml) { return (str + '') .replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + breakTag + '$2'); -} \ No newline at end of file +} diff --git a/src/js/downloadify/images/download.png b/src/js/downloadify/images/download.png new file mode 100755 index 0000000000000000000000000000000000000000..d2fabbf5a2bae5496b4d5db6fbd4c5338ff46cff GIT binary patch literal 2500 zcmV;#2|MnEsHmv0u&|t*o~o*Io}QqtuCA)8tm5M0 z!otI+r>L~FwydnKsHm#3v9YhOu(!9khlhx{xw)I0od5s-$jHfecXwxJXI@@jkB^Uj zet&awbI#7sZ*Om+qNBdPzV*cn*8l(rnn^@KRCwClS!=Gwk|h{OAv>yII7nhNf?*KJNibeVBKp7+NjBU+7XVy(U<{iGuz?6)h?W}& zQNsWjkLL!Lcl(=_;ydW>Yi3W`mis@e9vk^~W8XMrovCH@b zKo5%yGP5?0Tc*NZO(C-$vuk)x_HZx`abmfwFqn%&w6VPk1s+`T7lsO|Q9x=KDO@L@ z2lfSqSg^L)KwFR(lmm^1+?Mrft&7c5e+m+0)CSCd+93D9*-B;z~U zXDsTvJx*wGS~6I4g(M%<9r*!sG07{~SJfV>%A12dt2~7gwcrsJSXHH9%0>ze_vDF9 z%6wI!6jo?1PD}2Kejv%>bAZ3j=ks5mpW4so=Z}VC@4O*1TF)L2*lbG~Hc&m|QJr;~LlJurv^hok+CK$hvWakOS z4oQ}_U@VbjA^MmsUPUq%y+ec zgY5A$8D^Is&74`}d!CE%ypExbr4~Elx9A+7O$W8GW3s*D?8)b)fF72bXf|2nI1Tey z=UHsIdCaciIq6`#+VUmmF3E2$4Q4D&c3Lh^0pk0&hyy#I>6qt7py7!}$hiShzH5BH zZF5xh$9xC{N%X;8wlQ>Fhi=RYT`$#!BTC^>2|i7m4Hrd{Z~%QWndo6S(ZW!h;8>Zg$&A*C!UNXaFq%w8e5g(M1nSl| zE6r6V{e8{2{=e=Oek>_1FND>JLl9<9lDJ&dF;t2(hcAtEyVzb6#PQ zQ00t%(&e%~1@y2KrSWkaHC5F_SO&}rwlg2j$;097*fLn!EAzxY=h5jV+D{UA_+3r@ z71yaNCI^AcW&MevhfP-*cqW?$L2hGrV%h5P#6NshE{<3`7>oQ`JKRKj%WH>Qgbj9{ z1Ic=Jm-Q`|^)sp+b~)7!zlMuGUy#A9>$zD;aWCSSMJy_NCEyAO%yKWZ^8@^p_kijJ| z-s`%7fT=MnhKnLeImGl@JCtCRr3IxvVlaA_T9JMD|87>{qFJ@!R!VGQ*Kzgr;Pk>$OnS zXC%=?*C!g1)TLn5NTM$VLq`(jLogI15&y3ZBzY4}^7bl{muy$R8lY<1wxWmQ5u3!v z#!pr&w6-1@=%GzkP1`m+o*OFO**7c2&)V62O(I!u?{F-oR4iw^Js`H*FBxsBb5ZA* z?g2jc<-DDjy_}V0rt%3LdK#lA^U*6y@3@t}wwFd3-xpm!ofAn8`>+g`P80Nnv;30L zrrIBEfCrcSLI2Tw^nq;my-mKQEu%;N3O>4EDS!3-TZx^cqH2FUC;IM=ey*yjS?*$A zRsDEp%V<-bd8?|{En?9wb~}Hw+il2qjgXz4*?sJkL{*c1Cl~Qb8LYV@lHsqZZy^>& zSsu!XZ6|){$Y@igymf5*7O`qpVc2ZKaMRJyrU>~G=G{14dstLCVHd}nM^*ZCLB8jj zrpZ#@V4pX=S(x;C?-cD%)O-8h_YG}VL&FQTjnpr?pf`0*^G)&V`edD%+}3`Tph{7{n)xxc_RUxwmOojGjqE;AJFd z(IotXUke5o5{h8ZInmw(gR2$c|39G%GTaG8NEhT%bapMxmk92E1sDM8vG0LscT3>_ O0000 + is released under the MIT License +*/ +var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab+JCW$?cC$cOh zc4RBIWG9muk3~tB7AG{R5h*{qX*RRzX3$MnT?7RhOfeYrCv;a7Xi?A(nkmpt(M8ce z&|O>iT#|kyGiZf`Jdf|5d+vA6A?ZED{|%w=YlH?dnvb4C2>rPC_ZXp>c0-w7oi8Nz zwl&?H2JQYx)3RFA>GbaI?)dJlaihJJo|u}NN@ph1laphB7&G^EOWqsP&8s7`PJnr8 z*4t{!QVl)9bh&19totJ)UereYBxtMC)|`-ydYWosGvNe`!X>>N*FlsbW(CA*`b|QPa-a)$%25y`t zI(z1rGFv@fH@4HQw$bR+AtwbwIg8IOVIf+bnx>jf+Mey`FLYzq-Qv{BF!eT-E#qCp zv5omPS>Ni&TXZ(R?D$S}Cr8<$vx~Bxn4Cx@CNmQmHw|W;Nx#RoXMqCFqWQ=_d^0G= z9UUD#5BQ+MBK+skKd&R_7yo(p$}m*?4}p0|Ni*bzs_diR^oe1Fz>Ji(yiF%i1dSsO z)O|$e3`3)`&hHp%qs!rbobIrK33+xC%T`;}w}P&xW2u@c&Fxz>+iuJI!84nLTtq`P zTbjHtmRoJrqQr0xV2Y*M=d^C|imFk`1?toa6+m633T;!pP6J}Nm0itr!%JzrrEiI@Uo3)7 z+X0hWc{fB4h@I9vRpgFl%{ibhLtipFCe7;>Z67N|3LP2r6n0q2lh;~NPs%|PzHq1t z8+sYwIb*w}QHyqYstjk-g07Npw~cl`wBUGS9}cS4PiYnBWRu>xec=b4)2_2?E?dsu zxxJZtlwB=nvvaxmeBt4vg~i9krRCC-mDO@(ZT;!9kDtr6dV?xkP4)8^+O}@AzG$0P zXJ>bB|3{gL$y>KSxO4a3)XnsL0z8^f9sx#kJR?F8j0Wv?ZznYt8-ym7dIG?xbrSRkKvR z@135Uc6&1Uu5sSIyA7H%;F+iDw0-$q&;n};xo)XD)CHdZA3-jhouX-{HJD$v>hR?7 zTZTJPg4^P5Yln`z)@fzG+-T&Qs@4d&{mXa=xXsCe3Ay4z?r{V_j#^Zq0Fbh@S}GPd zOY8Ynzbma(0!yW}a(;8Z^mN(pifd28UUqwMB3;&^c~5YTsK|91WV=HRYjXXCKUZ3M zQp{KKVlKO!%NOx}U~RRyN?}w@i)RVrz4)1j!1xxmDiFG0v{}3JP(|(1dww?b%TPiO z^S*mtw&cow>)0)t4qLp*=N0z8jeGB@f-jv%}tII)qk%+1{=w3;YocPQnIB8#V9~y}|6x>XxW&(!MQtOHO zaY6}0*Y@Kv9OGjo78sNS6zh%+4_=4+gn$OH|D(7Re-O{c=i<5ed^{9e1?zD9Iv*A> z-xUfA-H~WdZ(qL@zytoluyn2;`!@*Y2=)<9AXp?mKfw~=gGB5iI7GxSArT@*iP%GM zFA@8Q*iXb55eJAkNW?hd&lB+i5ib(q5)m#FAwh&8B3vQDRU#ybaEqB=|PL9}xZy!FLJ1NBAj%rwRU$;2DDN6Fe(Lv6RPB0ZR|D^avBYK=2~r z9ur(7c!}U;f=dKHA$Wzv$^=&kUL$y&;HQK^bs&0f1SfHv;gN?++7 zwuhTjc6D0$&{i&#W;iC^x0OLpoVAs6p7@ci#69tWt(*t3noV7>l~`$xvz0*Ar{rwq zB11UJyscaU1&+h{I4O{U(;PG-wh|eR1J$s163KacSe}Y_>c4HJ`xjsuk*5Il2q7N_ z>uxd@`WO3Avu~qdE4_;a{Ic*Tz#o(zVmHboFBojav#qYc61L3%i`z3254!P>y!gY- zC?EwE{E~<4^^oK=u@MI)@;)h$^iby{ z7Pmg{St__{dg->Y_pqN^BaSwIup=^e;z8H9m>nB#~0N_AmT(l6wtcK8YPm()V?e|K*z` z29baLE62mRYBxZ^!+|Jz9-pgz^tD`hqpU-+5qKs@HNGY$@vGzmz=)892&%9D??*?@ zQ6e#b99D+_MU+b6DSq|k+Zq8FsgWA5toQ%*=*UTR;PTPYA@CAmtn~tG!v|1kM%$sX zUU(NwO}~Q#oCT4%Lzq|{I;aUX@f9Rf_!ytbng{CO zF?z%C9w_VIM*nz*J%X=B*rC0=~PpN>}<>ac92m#i> z|DX>VndNrqa#VVb-y!G??vgq?f&e&i-}y0QCO?e5sLSA3+C} literal 0 HcmV?d00001 diff --git a/src/js/jquery-ui.js b/src/js/jquery-ui.js new file mode 100644 index 00000000..31ee9cd8 --- /dev/null +++ b/src/js/jquery-ui.js @@ -0,0 +1,16617 @@ +/*! jQuery UI - v1.11.4 - 2015-03-11 +* http://jqueryui.com +* Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define([ "jquery" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { +/*! + * jQuery UI Core 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/ui-core/ + */ + + +// $.ui might exist from components with no dependencies, e.g., $.ui.position +$.ui = $.ui || {}; + +$.extend( $.ui, { + version: "1.11.4", + + keyCode: { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 + } +}); + +// plugins +$.fn.extend({ + scrollParent: function( includeHidden ) { + var position = this.css( "position" ), + excludeStaticParent = position === "absolute", + overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, + scrollParent = this.parents().filter( function() { + var parent = $( this ); + if ( excludeStaticParent && parent.css( "position" ) === "static" ) { + return false; + } + return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) ); + }).eq( 0 ); + + return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent; + }, + + uniqueId: (function() { + var uuid = 0; + + return function() { + return this.each(function() { + if ( !this.id ) { + this.id = "ui-id-" + ( ++uuid ); + } + }); + }; + })(), + + removeUniqueId: function() { + return this.each(function() { + if ( /^ui-id-\d+$/.test( this.id ) ) { + $( this ).removeAttr( "id" ); + } + }); + } +}); + +// selectors +function focusable( element, isTabIndexNotNaN ) { + var map, mapName, img, + nodeName = element.nodeName.toLowerCase(); + if ( "area" === nodeName ) { + map = element.parentNode; + mapName = map.name; + if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { + return false; + } + img = $( "img[usemap='#" + mapName + "']" )[ 0 ]; + return !!img && visible( img ); + } + return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ? + !element.disabled : + "a" === nodeName ? + element.href || isTabIndexNotNaN : + isTabIndexNotNaN) && + // the element and all of its ancestors must be visible + visible( element ); +} + +function visible( element ) { + return $.expr.filters.visible( element ) && + !$( element ).parents().addBack().filter(function() { + return $.css( this, "visibility" ) === "hidden"; + }).length; +} + +$.extend( $.expr[ ":" ], { + data: $.expr.createPseudo ? + $.expr.createPseudo(function( dataName ) { + return function( elem ) { + return !!$.data( elem, dataName ); + }; + }) : + // support: jQuery <1.8 + function( elem, i, match ) { + return !!$.data( elem, match[ 3 ] ); + }, + + focusable: function( element ) { + return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); + }, + + tabbable: function( element ) { + var tabIndex = $.attr( element, "tabindex" ), + isTabIndexNaN = isNaN( tabIndex ); + return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); + } +}); + +// support: jQuery <1.8 +if ( !$( "" ).outerWidth( 1 ).jquery ) { + $.each( [ "Width", "Height" ], function( i, name ) { + var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], + type = name.toLowerCase(), + orig = { + innerWidth: $.fn.innerWidth, + innerHeight: $.fn.innerHeight, + outerWidth: $.fn.outerWidth, + outerHeight: $.fn.outerHeight + }; + + function reduce( elem, size, border, margin ) { + $.each( side, function() { + size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; + if ( border ) { + size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; + } + if ( margin ) { + size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; + } + }); + return size; + } + + $.fn[ "inner" + name ] = function( size ) { + if ( size === undefined ) { + return orig[ "inner" + name ].call( this ); + } + + return this.each(function() { + $( this ).css( type, reduce( this, size ) + "px" ); + }); + }; + + $.fn[ "outer" + name] = function( size, margin ) { + if ( typeof size !== "number" ) { + return orig[ "outer" + name ].call( this, size ); + } + + return this.each(function() { + $( this).css( type, reduce( this, size, true, margin ) + "px" ); + }); + }; + }); +} + +// support: jQuery <1.8 +if ( !$.fn.addBack ) { + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) +if ( $( "" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { + $.fn.removeData = (function( removeData ) { + return function( key ) { + if ( arguments.length ) { + return removeData.call( this, $.camelCase( key ) ); + } else { + return removeData.call( this ); + } + }; + })( $.fn.removeData ); +} + +// deprecated +$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); + +$.fn.extend({ + focus: (function( orig ) { + return function( delay, fn ) { + return typeof delay === "number" ? + this.each(function() { + var elem = this; + setTimeout(function() { + $( elem ).focus(); + if ( fn ) { + fn.call( elem ); + } + }, delay ); + }) : + orig.apply( this, arguments ); + }; + })( $.fn.focus ), + + disableSelection: (function() { + var eventType = "onselectstart" in document.createElement( "div" ) ? + "selectstart" : + "mousedown"; + + return function() { + return this.bind( eventType + ".ui-disableSelection", function( event ) { + event.preventDefault(); + }); + }; + })(), + + enableSelection: function() { + return this.unbind( ".ui-disableSelection" ); + }, + + zIndex: function( zIndex ) { + if ( zIndex !== undefined ) { + return this.css( "zIndex", zIndex ); + } + + if ( this.length ) { + var elem = $( this[ 0 ] ), position, value; + while ( elem.length && elem[ 0 ] !== document ) { + // Ignore z-index if position is set to a value where z-index is ignored by the browser + // This makes behavior of this function consistent across browsers + // WebKit always returns auto if the element is positioned + position = elem.css( "position" ); + if ( position === "absolute" || position === "relative" || position === "fixed" ) { + // IE returns 0 when zIndex is not specified + // other browsers return a string + // we ignore the case of nested elements with an explicit value of 0 + //
+ value = parseInt( elem.css( "zIndex" ), 10 ); + if ( !isNaN( value ) && value !== 0 ) { + return value; + } + } + elem = elem.parent(); + } + } + + return 0; + } +}); + +// $.ui.plugin is deprecated. Use $.widget() extensions instead. +$.ui.plugin = { + add: function( module, option, set ) { + var i, + proto = $.ui[ module ].prototype; + for ( i in set ) { + proto.plugins[ i ] = proto.plugins[ i ] || []; + proto.plugins[ i ].push( [ option, set[ i ] ] ); + } + }, + call: function( instance, name, args, allowDisconnected ) { + var i, + set = instance.plugins[ name ]; + + if ( !set ) { + return; + } + + if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) { + return; + } + + for ( i = 0; i < set.length; i++ ) { + if ( instance.options[ set[ i ][ 0 ] ] ) { + set[ i ][ 1 ].apply( instance.element, args ); + } + } + } +}; + + +/*! + * jQuery UI Widget 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/jQuery.widget/ + */ + + +var widget_uuid = 0, + widget_slice = Array.prototype.slice; + +$.cleanData = (function( orig ) { + return function( elems ) { + var events, elem, i; + for ( i = 0; (elem = elems[i]) != null; i++ ) { + try { + + // Only trigger remove when necessary to save time + events = $._data( elem, "events" ); + if ( events && events.remove ) { + $( elem ).triggerHandler( "remove" ); + } + + // http://bugs.jquery.com/ticket/8235 + } catch ( e ) {} + } + orig( elems ); + }; +})( $.cleanData ); + +$.widget = function( name, base, prototype ) { + var fullName, existingConstructor, constructor, basePrototype, + // proxiedPrototype allows the provided prototype to remain unmodified + // so that it can be used as a mixin for multiple widgets (#8876) + proxiedPrototype = {}, + namespace = name.split( "." )[ 0 ]; + + name = name.split( "." )[ 1 ]; + fullName = namespace + "-" + name; + + if ( !prototype ) { + prototype = base; + base = $.Widget; + } + + // create selector for plugin + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { + return !!$.data( elem, fullName ); + }; + + $[ namespace ] = $[ namespace ] || {}; + existingConstructor = $[ namespace ][ name ]; + constructor = $[ namespace ][ name ] = function( options, element ) { + // allow instantiation without "new" keyword + if ( !this._createWidget ) { + return new constructor( options, element ); + } + + // allow instantiation without initializing for simple inheritance + // must use "new" keyword (the code above always passes args) + if ( arguments.length ) { + this._createWidget( options, element ); + } + }; + // extend with the existing constructor to carry over any static properties + $.extend( constructor, existingConstructor, { + version: prototype.version, + // copy the object used to create the prototype in case we need to + // redefine the widget later + _proto: $.extend( {}, prototype ), + // track widgets that inherit from this widget in case this widget is + // redefined after a widget inherits from it + _childConstructors: [] + }); + + basePrototype = new base(); + // we need to make the options hash a property directly on the new instance + // otherwise we'll modify the options hash on the prototype that we're + // inheriting from + basePrototype.options = $.widget.extend( {}, basePrototype.options ); + $.each( prototype, function( prop, value ) { + if ( !$.isFunction( value ) ) { + proxiedPrototype[ prop ] = value; + return; + } + proxiedPrototype[ prop ] = (function() { + var _super = function() { + return base.prototype[ prop ].apply( this, arguments ); + }, + _superApply = function( args ) { + return base.prototype[ prop ].apply( this, args ); + }; + return function() { + var __super = this._super, + __superApply = this._superApply, + returnValue; + + this._super = _super; + this._superApply = _superApply; + + returnValue = value.apply( this, arguments ); + + this._super = __super; + this._superApply = __superApply; + + return returnValue; + }; + })(); + }); + constructor.prototype = $.widget.extend( basePrototype, { + // TODO: remove support for widgetEventPrefix + // always use the name + a colon as the prefix, e.g., draggable:start + // don't prefix for widgets that aren't DOM-based + widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name + }, proxiedPrototype, { + constructor: constructor, + namespace: namespace, + widgetName: name, + widgetFullName: fullName + }); + + // If this widget is being redefined then we need to find all widgets that + // are inheriting from it and redefine all of them so that they inherit from + // the new version of this widget. We're essentially trying to replace one + // level in the prototype chain. + if ( existingConstructor ) { + $.each( existingConstructor._childConstructors, function( i, child ) { + var childPrototype = child.prototype; + + // redefine the child widget using the same prototype that was + // originally used, but inherit from the new version of the base + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); + }); + // remove the list of existing child constructors from the old constructor + // so the old child constructors can be garbage collected + delete existingConstructor._childConstructors; + } else { + base._childConstructors.push( constructor ); + } + + $.widget.bridge( name, constructor ); + + return constructor; +}; + +$.widget.extend = function( target ) { + var input = widget_slice.call( arguments, 1 ), + inputIndex = 0, + inputLength = input.length, + key, + value; + for ( ; inputIndex < inputLength; inputIndex++ ) { + for ( key in input[ inputIndex ] ) { + value = input[ inputIndex ][ key ]; + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { + // Clone objects + if ( $.isPlainObject( value ) ) { + target[ key ] = $.isPlainObject( target[ key ] ) ? + $.widget.extend( {}, target[ key ], value ) : + // Don't extend strings, arrays, etc. with objects + $.widget.extend( {}, value ); + // Copy everything else by reference + } else { + target[ key ] = value; + } + } + } + } + return target; +}; + +$.widget.bridge = function( name, object ) { + var fullName = object.prototype.widgetFullName || name; + $.fn[ name ] = function( options ) { + var isMethodCall = typeof options === "string", + args = widget_slice.call( arguments, 1 ), + returnValue = this; + + if ( isMethodCall ) { + this.each(function() { + var methodValue, + instance = $.data( this, fullName ); + if ( options === "instance" ) { + returnValue = instance; + return false; + } + if ( !instance ) { + return $.error( "cannot call methods on " + name + " prior to initialization; " + + "attempted to call method '" + options + "'" ); + } + if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { + return $.error( "no such method '" + options + "' for " + name + " widget instance" ); + } + methodValue = instance[ options ].apply( instance, args ); + if ( methodValue !== instance && methodValue !== undefined ) { + returnValue = methodValue && methodValue.jquery ? + returnValue.pushStack( methodValue.get() ) : + methodValue; + return false; + } + }); + } else { + + // Allow multiple hashes to be passed on init + if ( args.length ) { + options = $.widget.extend.apply( null, [ options ].concat(args) ); + } + + this.each(function() { + var instance = $.data( this, fullName ); + if ( instance ) { + instance.option( options || {} ); + if ( instance._init ) { + instance._init(); + } + } else { + $.data( this, fullName, new object( options, this ) ); + } + }); + } + + return returnValue; + }; +}; + +$.Widget = function( /* options, element */ ) {}; +$.Widget._childConstructors = []; + +$.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + defaultElement: "
", + options: { + disabled: false, + + // callbacks + create: null + }, + _createWidget: function( options, element ) { + element = $( element || this.defaultElement || this )[ 0 ]; + this.element = $( element ); + this.uuid = widget_uuid++; + this.eventNamespace = "." + this.widgetName + this.uuid; + + this.bindings = $(); + this.hoverable = $(); + this.focusable = $(); + + if ( element !== this ) { + $.data( element, this.widgetFullName, this ); + this._on( true, this.element, { + remove: function( event ) { + if ( event.target === element ) { + this.destroy(); + } + } + }); + this.document = $( element.style ? + // element within the document + element.ownerDocument : + // element is window or document + element.document || element ); + this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); + } + + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + + this._create(); + this._trigger( "create", null, this._getCreateEventData() ); + this._init(); + }, + _getCreateOptions: $.noop, + _getCreateEventData: $.noop, + _create: $.noop, + _init: $.noop, + + destroy: function() { + this._destroy(); + // we can probably remove the unbind calls in 2.0 + // all event bindings should go through this._on() + this.element + .unbind( this.eventNamespace ) + .removeData( this.widgetFullName ) + // support: jquery <1.6.3 + // http://bugs.jquery.com/ticket/9413 + .removeData( $.camelCase( this.widgetFullName ) ); + this.widget() + .unbind( this.eventNamespace ) + .removeAttr( "aria-disabled" ) + .removeClass( + this.widgetFullName + "-disabled " + + "ui-state-disabled" ); + + // clean up events and states + this.bindings.unbind( this.eventNamespace ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + }, + _destroy: $.noop, + + widget: function() { + return this.element; + }, + + option: function( key, value ) { + var options = key, + parts, + curOption, + i; + + if ( arguments.length === 0 ) { + // don't return a reference to the internal hash + return $.widget.extend( {}, this.options ); + } + + if ( typeof key === "string" ) { + // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + options = {}; + parts = key.split( "." ); + key = parts.shift(); + if ( parts.length ) { + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); + for ( i = 0; i < parts.length - 1; i++ ) { + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; + curOption = curOption[ parts[ i ] ]; + } + key = parts.pop(); + if ( arguments.length === 1 ) { + return curOption[ key ] === undefined ? null : curOption[ key ]; + } + curOption[ key ] = value; + } else { + if ( arguments.length === 1 ) { + return this.options[ key ] === undefined ? null : this.options[ key ]; + } + options[ key ] = value; + } + } + + this._setOptions( options ); + + return this; + }, + _setOptions: function( options ) { + var key; + + for ( key in options ) { + this._setOption( key, options[ key ] ); + } + + return this; + }, + _setOption: function( key, value ) { + this.options[ key ] = value; + + if ( key === "disabled" ) { + this.widget() + .toggleClass( this.widgetFullName + "-disabled", !!value ); + + // If the widget is becoming disabled, then nothing is interactive + if ( value ) { + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + } + } + + return this; + }, + + enable: function() { + return this._setOptions({ disabled: false }); + }, + disable: function() { + return this._setOptions({ disabled: true }); + }, + + _on: function( suppressDisabledCheck, element, handlers ) { + var delegateElement, + instance = this; + + // no suppressDisabledCheck flag, shuffle arguments + if ( typeof suppressDisabledCheck !== "boolean" ) { + handlers = element; + element = suppressDisabledCheck; + suppressDisabledCheck = false; + } + + // no element argument, shuffle and use this.element + if ( !handlers ) { + handlers = element; + element = this.element; + delegateElement = this.widget(); + } else { + element = delegateElement = $( element ); + this.bindings = this.bindings.add( element ); + } + + $.each( handlers, function( event, handler ) { + function handlerProxy() { + // allow widgets to customize the disabled handling + // - disabled as an array instead of boolean + // - disabled class as method for disabling individual parts + if ( !suppressDisabledCheck && + ( instance.options.disabled === true || + $( this ).hasClass( "ui-state-disabled" ) ) ) { + return; + } + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + + // copy the guid so direct unbinding works + if ( typeof handler !== "string" ) { + handlerProxy.guid = handler.guid = + handler.guid || handlerProxy.guid || $.guid++; + } + + var match = event.match( /^([\w:-]*)\s*(.*)$/ ), + eventName = match[1] + instance.eventNamespace, + selector = match[2]; + if ( selector ) { + delegateElement.delegate( selector, eventName, handlerProxy ); + } else { + element.bind( eventName, handlerProxy ); + } + }); + }, + + _off: function( element, eventName ) { + eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + + this.eventNamespace; + element.unbind( eventName ).undelegate( eventName ); + + // Clear the stack to avoid memory leaks (#10056) + this.bindings = $( this.bindings.not( element ).get() ); + this.focusable = $( this.focusable.not( element ).get() ); + this.hoverable = $( this.hoverable.not( element ).get() ); + }, + + _delay: function( handler, delay ) { + function handlerProxy() { + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + var instance = this; + return setTimeout( handlerProxy, delay || 0 ); + }, + + _hoverable: function( element ) { + this.hoverable = this.hoverable.add( element ); + this._on( element, { + mouseenter: function( event ) { + $( event.currentTarget ).addClass( "ui-state-hover" ); + }, + mouseleave: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-hover" ); + } + }); + }, + + _focusable: function( element ) { + this.focusable = this.focusable.add( element ); + this._on( element, { + focusin: function( event ) { + $( event.currentTarget ).addClass( "ui-state-focus" ); + }, + focusout: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-focus" ); + } + }); + }, + + _trigger: function( type, event, data ) { + var prop, orig, + callback = this.options[ type ]; + + data = data || {}; + event = $.Event( event ); + event.type = ( type === this.widgetEventPrefix ? + type : + this.widgetEventPrefix + type ).toLowerCase(); + // the original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[ 0 ]; + + // copy original event properties over to the new event + orig = event.originalEvent; + if ( orig ) { + for ( prop in orig ) { + if ( !( prop in event ) ) { + event[ prop ] = orig[ prop ]; + } + } + } + + this.element.trigger( event, data ); + return !( $.isFunction( callback ) && + callback.apply( this.element[0], [ event ].concat( data ) ) === false || + event.isDefaultPrevented() ); + } +}; + +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { + if ( typeof options === "string" ) { + options = { effect: options }; + } + var hasOptions, + effectName = !options ? + method : + options === true || typeof options === "number" ? + defaultEffect : + options.effect || defaultEffect; + options = options || {}; + if ( typeof options === "number" ) { + options = { duration: options }; + } + hasOptions = !$.isEmptyObject( options ); + options.complete = callback; + if ( options.delay ) { + element.delay( options.delay ); + } + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { + element[ method ]( options ); + } else if ( effectName !== method && element[ effectName ] ) { + element[ effectName ]( options.duration, options.easing, callback ); + } else { + element.queue(function( next ) { + $( this )[ method ](); + if ( callback ) { + callback.call( element[ 0 ] ); + } + next(); + }); + } + }; +}); + +var widget = $.widget; + + +/*! + * jQuery UI Mouse 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/mouse/ + */ + + +var mouseHandled = false; +$( document ).mouseup( function() { + mouseHandled = false; +}); + +var mouse = $.widget("ui.mouse", { + version: "1.11.4", + options: { + cancel: "input,textarea,button,select,option", + distance: 1, + delay: 0 + }, + _mouseInit: function() { + var that = this; + + this.element + .bind("mousedown." + this.widgetName, function(event) { + return that._mouseDown(event); + }) + .bind("click." + this.widgetName, function(event) { + if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { + $.removeData(event.target, that.widgetName + ".preventClickEvent"); + event.stopImmediatePropagation(); + return false; + } + }); + + this.started = false; + }, + + // TODO: make sure destroying one instance of mouse doesn't mess with + // other instances of mouse + _mouseDestroy: function() { + this.element.unbind("." + this.widgetName); + if ( this._mouseMoveDelegate ) { + this.document + .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate) + .unbind("mouseup." + this.widgetName, this._mouseUpDelegate); + } + }, + + _mouseDown: function(event) { + // don't let more than one widget handle mouseStart + if ( mouseHandled ) { + return; + } + + this._mouseMoved = false; + + // we may have missed mouseup (out of window) + (this._mouseStarted && this._mouseUp(event)); + + this._mouseDownEvent = event; + + var that = this, + btnIsLeft = (event.which === 1), + // event.target.nodeName works around a bug in IE 8 with + // disabled inputs (#7620) + elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(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() { + that.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; + } + } + + // Click event may never have fired (Gecko & Opera) + if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { + $.removeData(event.target, this.widgetName + ".preventClickEvent"); + } + + // these delegates are required to keep context + this._mouseMoveDelegate = function(event) { + return that._mouseMove(event); + }; + this._mouseUpDelegate = function(event) { + return that._mouseUp(event); + }; + + this.document + .bind( "mousemove." + this.widgetName, this._mouseMoveDelegate ) + .bind( "mouseup." + this.widgetName, this._mouseUpDelegate ); + + event.preventDefault(); + + mouseHandled = true; + return true; + }, + + _mouseMove: function(event) { + // Only check for mouseups outside the document if you've moved inside the document + // at least once. This prevents the firing of mouseup in the case of IE<9, which will + // fire a mousemove event if content is placed under the cursor. See #7778 + // Support: IE <9 + if ( this._mouseMoved ) { + // IE mouseup check - mouseup happened when mouse was out of window + if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { + return this._mouseUp(event); + + // Iframe mouseup check - mouseup occurred in another document + } else if ( !event.which ) { + return this._mouseUp( event ); + } + } + + if ( event.which || event.button ) { + this._mouseMoved = true; + } + + 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) { + this.document + .unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate ) + .unbind( "mouseup." + this.widgetName, this._mouseUpDelegate ); + + if (this._mouseStarted) { + this._mouseStarted = false; + + if (event.target === this._mouseDownEvent.target) { + $.data(event.target, this.widgetName + ".preventClickEvent", true); + } + + this._mouseStop(event); + } + + mouseHandled = false; + 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; + }, + + // These are placeholder methods, to be overriden by extending plugin + _mouseStart: function(/* event */) {}, + _mouseDrag: function(/* event */) {}, + _mouseStop: function(/* event */) {}, + _mouseCapture: function(/* event */) { return true; } +}); + + +/*! + * jQuery UI Position 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/position/ + */ + +(function() { + +$.ui = $.ui || {}; + +var cachedScrollbarWidth, supportsOffsetFractions, + max = Math.max, + abs = Math.abs, + round = Math.round, + rhorizontal = /left|center|right/, + rvertical = /top|center|bottom/, + roffset = /[\+\-]\d+(\.[\d]+)?%?/, + rposition = /^\w+/, + rpercent = /%$/, + _position = $.fn.position; + +function getOffsets( offsets, width, height ) { + return [ + parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), + parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) + ]; +} + +function parseCss( element, property ) { + return parseInt( $.css( element, property ), 10 ) || 0; +} + +function getDimensions( elem ) { + var raw = elem[0]; + if ( raw.nodeType === 9 ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: 0, left: 0 } + }; + } + if ( $.isWindow( raw ) ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: elem.scrollTop(), left: elem.scrollLeft() } + }; + } + if ( raw.preventDefault ) { + return { + width: 0, + height: 0, + offset: { top: raw.pageY, left: raw.pageX } + }; + } + return { + width: elem.outerWidth(), + height: elem.outerHeight(), + offset: elem.offset() + }; +} + +$.position = { + scrollbarWidth: function() { + if ( cachedScrollbarWidth !== undefined ) { + return cachedScrollbarWidth; + } + var w1, w2, + div = $( "
" ), + innerDiv = div.children()[0]; + + $( "body" ).append( div ); + w1 = innerDiv.offsetWidth; + div.css( "overflow", "scroll" ); + + w2 = innerDiv.offsetWidth; + + if ( w1 === w2 ) { + w2 = div[0].clientWidth; + } + + div.remove(); + + return (cachedScrollbarWidth = w1 - w2); + }, + getScrollInfo: function( within ) { + var overflowX = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-x" ), + overflowY = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-y" ), + hasOverflowX = overflowX === "scroll" || + ( overflowX === "auto" && within.width < within.element[0].scrollWidth ), + hasOverflowY = overflowY === "scroll" || + ( overflowY === "auto" && within.height < within.element[0].scrollHeight ); + return { + width: hasOverflowY ? $.position.scrollbarWidth() : 0, + height: hasOverflowX ? $.position.scrollbarWidth() : 0 + }; + }, + getWithinInfo: function( element ) { + var withinElement = $( element || window ), + isWindow = $.isWindow( withinElement[0] ), + isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; + return { + element: withinElement, + isWindow: isWindow, + isDocument: isDocument, + offset: withinElement.offset() || { left: 0, top: 0 }, + scrollLeft: withinElement.scrollLeft(), + scrollTop: withinElement.scrollTop(), + + // support: jQuery 1.6.x + // jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows + width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(), + height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight() + }; + } +}; + +$.fn.position = function( options ) { + if ( !options || !options.of ) { + return _position.apply( this, arguments ); + } + + // make a copy, we don't want to modify arguments + options = $.extend( {}, options ); + + var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, + target = $( options.of ), + within = $.position.getWithinInfo( options.within ), + scrollInfo = $.position.getScrollInfo( within ), + collision = ( options.collision || "flip" ).split( " " ), + offsets = {}; + + dimensions = getDimensions( target ); + if ( target[0].preventDefault ) { + // force left top to allow flipping + options.at = "left top"; + } + targetWidth = dimensions.width; + targetHeight = dimensions.height; + targetOffset = dimensions.offset; + // clone to reuse original targetOffset later + basePosition = $.extend( {}, targetOffset ); + + // force my and at to have valid horizontal and vertical positions + // if a value is missing or invalid, it will be converted to center + $.each( [ "my", "at" ], function() { + var pos = ( options[ this ] || "" ).split( " " ), + horizontalOffset, + verticalOffset; + + if ( pos.length === 1) { + pos = rhorizontal.test( pos[ 0 ] ) ? + pos.concat( [ "center" ] ) : + rvertical.test( pos[ 0 ] ) ? + [ "center" ].concat( pos ) : + [ "center", "center" ]; + } + pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; + pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; + + // calculate offsets + horizontalOffset = roffset.exec( pos[ 0 ] ); + verticalOffset = roffset.exec( pos[ 1 ] ); + offsets[ this ] = [ + horizontalOffset ? horizontalOffset[ 0 ] : 0, + verticalOffset ? verticalOffset[ 0 ] : 0 + ]; + + // reduce to just the positions without the offsets + options[ this ] = [ + rposition.exec( pos[ 0 ] )[ 0 ], + rposition.exec( pos[ 1 ] )[ 0 ] + ]; + }); + + // normalize collision option + if ( collision.length === 1 ) { + collision[ 1 ] = collision[ 0 ]; + } + + if ( options.at[ 0 ] === "right" ) { + basePosition.left += targetWidth; + } else if ( options.at[ 0 ] === "center" ) { + basePosition.left += targetWidth / 2; + } + + if ( options.at[ 1 ] === "bottom" ) { + basePosition.top += targetHeight; + } else if ( options.at[ 1 ] === "center" ) { + basePosition.top += targetHeight / 2; + } + + atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); + basePosition.left += atOffset[ 0 ]; + basePosition.top += atOffset[ 1 ]; + + return this.each(function() { + var collisionPosition, using, + elem = $( this ), + elemWidth = elem.outerWidth(), + elemHeight = elem.outerHeight(), + marginLeft = parseCss( this, "marginLeft" ), + marginTop = parseCss( this, "marginTop" ), + collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width, + collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height, + position = $.extend( {}, basePosition ), + myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); + + if ( options.my[ 0 ] === "right" ) { + position.left -= elemWidth; + } else if ( options.my[ 0 ] === "center" ) { + position.left -= elemWidth / 2; + } + + if ( options.my[ 1 ] === "bottom" ) { + position.top -= elemHeight; + } else if ( options.my[ 1 ] === "center" ) { + position.top -= elemHeight / 2; + } + + position.left += myOffset[ 0 ]; + position.top += myOffset[ 1 ]; + + // if the browser doesn't support fractions, then round for consistent results + if ( !supportsOffsetFractions ) { + position.left = round( position.left ); + position.top = round( position.top ); + } + + collisionPosition = { + marginLeft: marginLeft, + marginTop: marginTop + }; + + $.each( [ "left", "top" ], function( i, dir ) { + if ( $.ui.position[ collision[ i ] ] ) { + $.ui.position[ collision[ i ] ][ dir ]( position, { + targetWidth: targetWidth, + targetHeight: targetHeight, + elemWidth: elemWidth, + elemHeight: elemHeight, + collisionPosition: collisionPosition, + collisionWidth: collisionWidth, + collisionHeight: collisionHeight, + offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], + my: options.my, + at: options.at, + within: within, + elem: elem + }); + } + }); + + if ( options.using ) { + // adds feedback as second argument to using callback, if present + using = function( props ) { + var left = targetOffset.left - position.left, + right = left + targetWidth - elemWidth, + top = targetOffset.top - position.top, + bottom = top + targetHeight - elemHeight, + feedback = { + target: { + element: target, + left: targetOffset.left, + top: targetOffset.top, + width: targetWidth, + height: targetHeight + }, + element: { + element: elem, + left: position.left, + top: position.top, + width: elemWidth, + height: elemHeight + }, + horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", + vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" + }; + if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { + feedback.horizontal = "center"; + } + if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { + feedback.vertical = "middle"; + } + if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { + feedback.important = "horizontal"; + } else { + feedback.important = "vertical"; + } + options.using.call( this, props, feedback ); + }; + } + + elem.offset( $.extend( position, { using: using } ) ); + }); +}; + +$.ui.position = { + fit: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, + outerWidth = within.width, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = withinOffset - collisionPosLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, + newOverRight; + + // element is wider than within + if ( data.collisionWidth > outerWidth ) { + // element is initially over the left side of within + if ( overLeft > 0 && overRight <= 0 ) { + newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; + position.left += overLeft - newOverRight; + // element is initially over right side of within + } else if ( overRight > 0 && overLeft <= 0 ) { + position.left = withinOffset; + // element is initially over both left and right sides of within + } else { + if ( overLeft > overRight ) { + position.left = withinOffset + outerWidth - data.collisionWidth; + } else { + position.left = withinOffset; + } + } + // too far left -> align with left edge + } else if ( overLeft > 0 ) { + position.left += overLeft; + // too far right -> align with right edge + } else if ( overRight > 0 ) { + position.left -= overRight; + // adjust based on position and margin + } else { + position.left = max( position.left - collisionPosLeft, position.left ); + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollTop : within.offset.top, + outerHeight = data.within.height, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = withinOffset - collisionPosTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, + newOverBottom; + + // element is taller than within + if ( data.collisionHeight > outerHeight ) { + // element is initially over the top of within + if ( overTop > 0 && overBottom <= 0 ) { + newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset; + position.top += overTop - newOverBottom; + // element is initially over bottom of within + } else if ( overBottom > 0 && overTop <= 0 ) { + position.top = withinOffset; + // element is initially over both top and bottom of within + } else { + if ( overTop > overBottom ) { + position.top = withinOffset + outerHeight - data.collisionHeight; + } else { + position.top = withinOffset; + } + } + // too far up -> align with top + } else if ( overTop > 0 ) { + position.top += overTop; + // too far down -> align with bottom edge + } else if ( overBottom > 0 ) { + position.top -= overBottom; + // adjust based on position and margin + } else { + position.top = max( position.top - collisionPosTop, position.top ); + } + } + }, + flip: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.offset.left + within.scrollLeft, + outerWidth = within.width, + offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = collisionPosLeft - offsetLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, + myOffset = data.my[ 0 ] === "left" ? + -data.elemWidth : + data.my[ 0 ] === "right" ? + data.elemWidth : + 0, + atOffset = data.at[ 0 ] === "left" ? + data.targetWidth : + data.at[ 0 ] === "right" ? + -data.targetWidth : + 0, + offset = -2 * data.offset[ 0 ], + newOverRight, + newOverLeft; + + if ( overLeft < 0 ) { + newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; + if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { + position.left += myOffset + atOffset + offset; + } + } else if ( overRight > 0 ) { + newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; + if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { + position.left += myOffset + atOffset + offset; + } + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.offset.top + within.scrollTop, + outerHeight = within.height, + offsetTop = within.isWindow ? within.scrollTop : within.offset.top, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = collisionPosTop - offsetTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, + top = data.my[ 1 ] === "top", + myOffset = top ? + -data.elemHeight : + data.my[ 1 ] === "bottom" ? + data.elemHeight : + 0, + atOffset = data.at[ 1 ] === "top" ? + data.targetHeight : + data.at[ 1 ] === "bottom" ? + -data.targetHeight : + 0, + offset = -2 * data.offset[ 1 ], + newOverTop, + newOverBottom; + if ( overTop < 0 ) { + newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; + if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) { + position.top += myOffset + atOffset + offset; + } + } else if ( overBottom > 0 ) { + newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; + if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { + position.top += myOffset + atOffset + offset; + } + } + } + }, + flipfit: { + left: function() { + $.ui.position.flip.left.apply( this, arguments ); + $.ui.position.fit.left.apply( this, arguments ); + }, + top: function() { + $.ui.position.flip.top.apply( this, arguments ); + $.ui.position.fit.top.apply( this, arguments ); + } + } +}; + +// fraction support test +(function() { + var testElement, testElementParent, testElementStyle, offsetLeft, i, + body = document.getElementsByTagName( "body" )[ 0 ], + div = document.createElement( "div" ); + + //Create a "fake body" for testing based on method used in jQuery.support + testElement = document.createElement( body ? "div" : "body" ); + testElementStyle = { + visibility: "hidden", + width: 0, + height: 0, + border: 0, + margin: 0, + background: "none" + }; + if ( body ) { + $.extend( testElementStyle, { + position: "absolute", + left: "-1000px", + top: "-1000px" + }); + } + for ( i in testElementStyle ) { + testElement.style[ i ] = testElementStyle[ i ]; + } + testElement.appendChild( div ); + testElementParent = body || document.documentElement; + testElementParent.insertBefore( testElement, testElementParent.firstChild ); + + div.style.cssText = "position: absolute; left: 10.7432222px;"; + + offsetLeft = $( div ).offset().left; + supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11; + + testElement.innerHTML = ""; + testElementParent.removeChild( testElement ); +})(); + +})(); + +var position = $.ui.position; + + +/*! + * jQuery UI Accordion 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/accordion/ + */ + + +var accordion = $.widget( "ui.accordion", { + version: "1.11.4", + options: { + active: 0, + animate: {}, + collapsible: false, + event: "click", + header: "> li > :first-child,> :not(li):even", + heightStyle: "auto", + icons: { + activeHeader: "ui-icon-triangle-1-s", + header: "ui-icon-triangle-1-e" + }, + + // callbacks + activate: null, + beforeActivate: null + }, + + hideProps: { + borderTopWidth: "hide", + borderBottomWidth: "hide", + paddingTop: "hide", + paddingBottom: "hide", + height: "hide" + }, + + showProps: { + borderTopWidth: "show", + borderBottomWidth: "show", + paddingTop: "show", + paddingBottom: "show", + height: "show" + }, + + _create: function() { + var options = this.options; + this.prevShow = this.prevHide = $(); + this.element.addClass( "ui-accordion ui-widget ui-helper-reset" ) + // ARIA + .attr( "role", "tablist" ); + + // don't allow collapsible: false and active: false / null + if ( !options.collapsible && (options.active === false || options.active == null) ) { + options.active = 0; + } + + this._processPanels(); + // handle negative values + if ( options.active < 0 ) { + options.active += this.headers.length; + } + this._refresh(); + }, + + _getCreateEventData: function() { + return { + header: this.active, + panel: !this.active.length ? $() : this.active.next() + }; + }, + + _createIcons: function() { + var icons = this.options.icons; + if ( icons ) { + $( "" ) + .addClass( "ui-accordion-header-icon ui-icon " + icons.header ) + .prependTo( this.headers ); + this.active.children( ".ui-accordion-header-icon" ) + .removeClass( icons.header ) + .addClass( icons.activeHeader ); + this.headers.addClass( "ui-accordion-icons" ); + } + }, + + _destroyIcons: function() { + this.headers + .removeClass( "ui-accordion-icons" ) + .children( ".ui-accordion-header-icon" ) + .remove(); + }, + + _destroy: function() { + var contents; + + // clean up main element + this.element + .removeClass( "ui-accordion ui-widget ui-helper-reset" ) + .removeAttr( "role" ); + + // clean up headers + this.headers + .removeClass( "ui-accordion-header ui-accordion-header-active ui-state-default " + + "ui-corner-all ui-state-active ui-state-disabled ui-corner-top" ) + .removeAttr( "role" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "aria-selected" ) + .removeAttr( "aria-controls" ) + .removeAttr( "tabIndex" ) + .removeUniqueId(); + + this._destroyIcons(); + + // clean up content panels + contents = this.headers.next() + .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom " + + "ui-accordion-content ui-accordion-content-active ui-state-disabled" ) + .css( "display", "" ) + .removeAttr( "role" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-labelledby" ) + .removeUniqueId(); + + if ( this.options.heightStyle !== "content" ) { + contents.css( "height", "" ); + } + }, + + _setOption: function( key, value ) { + if ( key === "active" ) { + // _activate() will handle invalid values and update this.options + this._activate( value ); + return; + } + + if ( key === "event" ) { + if ( this.options.event ) { + this._off( this.headers, this.options.event ); + } + this._setupEvents( value ); + } + + this._super( key, value ); + + // setting collapsible: false while collapsed; open first panel + if ( key === "collapsible" && !value && this.options.active === false ) { + this._activate( 0 ); + } + + if ( key === "icons" ) { + this._destroyIcons(); + if ( value ) { + this._createIcons(); + } + } + + // #5332 - opacity doesn't cascade to positioned elements in IE + // so we need to add the disabled class to the headers and panels + if ( key === "disabled" ) { + this.element + .toggleClass( "ui-state-disabled", !!value ) + .attr( "aria-disabled", value ); + this.headers.add( this.headers.next() ) + .toggleClass( "ui-state-disabled", !!value ); + } + }, + + _keydown: function( event ) { + if ( event.altKey || event.ctrlKey ) { + return; + } + + var keyCode = $.ui.keyCode, + length = this.headers.length, + currentIndex = this.headers.index( event.target ), + 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: + this._eventHandler( event ); + break; + case keyCode.HOME: + toFocus = this.headers[ 0 ]; + break; + case keyCode.END: + toFocus = this.headers[ length - 1 ]; + break; + } + + if ( toFocus ) { + $( event.target ).attr( "tabIndex", -1 ); + $( toFocus ).attr( "tabIndex", 0 ); + toFocus.focus(); + event.preventDefault(); + } + }, + + _panelKeyDown: function( event ) { + if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) { + $( event.currentTarget ).prev().focus(); + } + }, + + refresh: function() { + var options = this.options; + this._processPanels(); + + // was collapsed or no panel + if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) { + options.active = false; + this.active = $(); + // active false only when collapsible is true + } else if ( options.active === false ) { + this._activate( 0 ); + // was active, but active panel is gone + } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { + // all remaining panel are disabled + if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) { + options.active = false; + this.active = $(); + // activate previous panel + } else { + this._activate( Math.max( 0, options.active - 1 ) ); + } + // was active, active panel still exists + } else { + // make sure active index is correct + options.active = this.headers.index( this.active ); + } + + this._destroyIcons(); + + this._refresh(); + }, + + _processPanels: function() { + var prevHeaders = this.headers, + prevPanels = this.panels; + + this.headers = this.element.find( this.options.header ) + .addClass( "ui-accordion-header ui-state-default ui-corner-all" ); + + this.panels = this.headers.next() + .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" ) + .filter( ":not(.ui-accordion-content-active)" ) + .hide(); + + // Avoid memory leaks (#10056) + if ( prevPanels ) { + this._off( prevHeaders.not( this.headers ) ); + this._off( prevPanels.not( this.panels ) ); + } + }, + + _refresh: function() { + var maxHeight, + options = this.options, + heightStyle = options.heightStyle, + parent = this.element.parent(); + + this.active = this._findActive( options.active ) + .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" ) + .removeClass( "ui-corner-all" ); + this.active.next() + .addClass( "ui-accordion-content-active" ) + .show(); + + this.headers + .attr( "role", "tab" ) + .each(function() { + var header = $( this ), + headerId = header.uniqueId().attr( "id" ), + panel = header.next(), + panelId = panel.uniqueId().attr( "id" ); + header.attr( "aria-controls", panelId ); + panel.attr( "aria-labelledby", headerId ); + }) + .next() + .attr( "role", "tabpanel" ); + + this.headers + .not( this.active ) + .attr({ + "aria-selected": "false", + "aria-expanded": "false", + tabIndex: -1 + }) + .next() + .attr({ + "aria-hidden": "true" + }) + .hide(); + + // make sure at least one header is in the tab order + if ( !this.active.length ) { + this.headers.eq( 0 ).attr( "tabIndex", 0 ); + } else { + this.active.attr({ + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + }) + .next() + .attr({ + "aria-hidden": "false" + }); + } + + this._createIcons(); + + this._setupEvents( options.event ); + + if ( heightStyle === "fill" ) { + maxHeight = parent.height(); + this.element.siblings( ":visible" ).each(function() { + var elem = $( this ), + position = elem.css( "position" ); + + if ( position === "absolute" || position === "fixed" ) { + return; + } + maxHeight -= elem.outerHeight( true ); + }); + + this.headers.each(function() { + maxHeight -= $( this ).outerHeight( true ); + }); + + this.headers.next() + .each(function() { + $( this ).height( Math.max( 0, maxHeight - + $( this ).innerHeight() + $( this ).height() ) ); + }) + .css( "overflow", "auto" ); + } else if ( heightStyle === "auto" ) { + maxHeight = 0; + this.headers.next() + .each(function() { + maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() ); + }) + .height( maxHeight ); + } + }, + + _activate: function( index ) { + var active = this._findActive( index )[ 0 ]; + + // trying to activate the already active panel + if ( active === this.active[ 0 ] ) { + return; + } + + // trying to collapse, simulate a click on the currently active header + active = active || this.active[ 0 ]; + + this._eventHandler({ + target: active, + currentTarget: active, + preventDefault: $.noop + }); + }, + + _findActive: function( selector ) { + return typeof selector === "number" ? this.headers.eq( selector ) : $(); + }, + + _setupEvents: function( event ) { + var events = { + keydown: "_keydown" + }; + if ( event ) { + $.each( event.split( " " ), function( index, eventName ) { + events[ eventName ] = "_eventHandler"; + }); + } + + this._off( this.headers.add( this.headers.next() ) ); + this._on( this.headers, events ); + this._on( this.headers.next(), { keydown: "_panelKeyDown" }); + this._hoverable( this.headers ); + this._focusable( this.headers ); + }, + + _eventHandler: function( event ) { + var options = this.options, + active = this.active, + clicked = $( event.currentTarget ), + clickedIsActive = clicked[ 0 ] === active[ 0 ], + collapsing = clickedIsActive && options.collapsible, + toShow = collapsing ? $() : clicked.next(), + toHide = active.next(), + eventData = { + oldHeader: active, + oldPanel: toHide, + newHeader: collapsing ? $() : clicked, + newPanel: toShow + }; + + event.preventDefault(); + + if ( + // click on active header, but not collapsible + ( clickedIsActive && !options.collapsible ) || + // allow canceling activation + ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { + return; + } + + options.active = collapsing ? false : this.headers.index( clicked ); + + // when the call to ._toggle() comes after the class changes + // it causes a very odd bug in IE 8 (see #6720) + this.active = clickedIsActive ? $() : clicked; + this._toggle( eventData ); + + // switch classes + // corner classes on the previously active header stay after the animation + active.removeClass( "ui-accordion-header-active ui-state-active" ); + if ( options.icons ) { + active.children( ".ui-accordion-header-icon" ) + .removeClass( options.icons.activeHeader ) + .addClass( options.icons.header ); + } + + if ( !clickedIsActive ) { + clicked + .removeClass( "ui-corner-all" ) + .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" ); + if ( options.icons ) { + clicked.children( ".ui-accordion-header-icon" ) + .removeClass( options.icons.header ) + .addClass( options.icons.activeHeader ); + } + + clicked + .next() + .addClass( "ui-accordion-content-active" ); + } + }, + + _toggle: function( data ) { + var toShow = data.newPanel, + toHide = this.prevShow.length ? this.prevShow : data.oldPanel; + + // handle activating a panel during the animation for another activation + this.prevShow.add( this.prevHide ).stop( true, true ); + this.prevShow = toShow; + this.prevHide = toHide; + + if ( this.options.animate ) { + this._animate( toShow, toHide, data ); + } else { + toHide.hide(); + toShow.show(); + this._toggleComplete( data ); + } + + toHide.attr({ + "aria-hidden": "true" + }); + toHide.prev().attr({ + "aria-selected": "false", + "aria-expanded": "false" + }); + // if we're switching panels, remove the old header from the tab order + // if we're opening from collapsed state, remove the previous header from the tab order + // if we're collapsing, then keep the collapsing header in the tab order + if ( toShow.length && toHide.length ) { + toHide.prev().attr({ + "tabIndex": -1, + "aria-expanded": "false" + }); + } else if ( toShow.length ) { + this.headers.filter(function() { + return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0; + }) + .attr( "tabIndex", -1 ); + } + + toShow + .attr( "aria-hidden", "false" ) + .prev() + .attr({ + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + }); + }, + + _animate: function( toShow, toHide, data ) { + var total, easing, duration, + that = this, + adjust = 0, + boxSizing = toShow.css( "box-sizing" ), + down = toShow.length && + ( !toHide.length || ( toShow.index() < toHide.index() ) ), + animate = this.options.animate || {}, + options = down && animate.down || animate, + complete = function() { + that._toggleComplete( data ); + }; + + if ( typeof options === "number" ) { + duration = options; + } + if ( typeof options === "string" ) { + easing = options; + } + // fall back from options to animation in case of partial down settings + easing = easing || options.easing || animate.easing; + duration = duration || options.duration || animate.duration; + + if ( !toHide.length ) { + return toShow.animate( this.showProps, duration, easing, complete ); + } + if ( !toShow.length ) { + return toHide.animate( this.hideProps, duration, easing, complete ); + } + + total = toShow.show().outerHeight(); + toHide.animate( this.hideProps, { + duration: duration, + easing: easing, + step: function( now, fx ) { + fx.now = Math.round( now ); + } + }); + toShow + .hide() + .animate( this.showProps, { + duration: duration, + easing: easing, + complete: complete, + step: function( now, fx ) { + fx.now = Math.round( now ); + if ( fx.prop !== "height" ) { + if ( boxSizing === "content-box" ) { + adjust += fx.now; + } + } else if ( that.options.heightStyle !== "content" ) { + fx.now = Math.round( total - toHide.outerHeight() - adjust ); + adjust = 0; + } + } + }); + }, + + _toggleComplete: function( data ) { + var toHide = data.oldPanel; + + toHide + .removeClass( "ui-accordion-content-active" ) + .prev() + .removeClass( "ui-corner-top" ) + .addClass( "ui-corner-all" ); + + // Work around for rendering bug in IE (#5421) + if ( toHide.length ) { + toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className; + } + this._trigger( "activate", null, data ); + } +}); + + +/*! + * jQuery UI Menu 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/menu/ + */ + + +var menu = $.widget( "ui.menu", { + version: "1.11.4", + defaultElement: "
    ", + delay: 300, + options: { + icons: { + submenu: "ui-icon-carat-1-e" + }, + items: "> *", + menus: "ul", + position: { + my: "left-1 top", + at: "right top" + }, + role: "menu", + + // callbacks + blur: null, + focus: null, + select: null + }, + + _create: function() { + this.activeMenu = this.element; + + // Flag used to prevent firing of the click handler + // as the event bubbles up through nested menus + this.mouseHandled = false; + this.element + .uniqueId() + .addClass( "ui-menu ui-widget ui-widget-content" ) + .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length ) + .attr({ + role: this.options.role, + tabIndex: 0 + }); + + if ( this.options.disabled ) { + this.element + .addClass( "ui-state-disabled" ) + .attr( "aria-disabled", "true" ); + } + + this._on({ + // Prevent focus from sticking to links inside menu after clicking + // them (focus should always stay on UL during navigation). + "mousedown .ui-menu-item": function( event ) { + event.preventDefault(); + }, + "click .ui-menu-item": function( event ) { + var target = $( event.target ); + if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) { + this.select( event ); + + // Only set the mouseHandled flag if the event will bubble, see #9469. + if ( !event.isPropagationStopped() ) { + this.mouseHandled = true; + } + + // Open submenu on click + if ( target.has( ".ui-menu" ).length ) { + this.expand( event ); + } else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) { + + // Redirect focus to the menu + this.element.trigger( "focus", [ true ] ); + + // If the active item is on the top level, let it stay active. + // Otherwise, blur the active item since it is no longer visible. + if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) { + clearTimeout( this.timer ); + } + } + } + }, + "mouseenter .ui-menu-item": function( event ) { + // Ignore mouse events while typeahead is active, see #10458. + // Prevents focusing the wrong item when typeahead causes a scroll while the mouse + // is over an item in the menu + if ( this.previousFilter ) { + return; + } + var target = $( event.currentTarget ); + // Remove ui-state-active class from siblings of the newly focused menu item + // to avoid a jump caused by adjacent elements both having a class with a border + target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" ); + this.focus( event, target ); + }, + mouseleave: "collapseAll", + "mouseleave .ui-menu": "collapseAll", + focus: function( event, keepActiveItem ) { + // If there's already an active item, keep it active + // If not, activate the first item + var item = this.active || this.element.find( this.options.items ).eq( 0 ); + + if ( !keepActiveItem ) { + this.focus( event, item ); + } + }, + blur: function( event ) { + this._delay(function() { + if ( !$.contains( this.element[0], this.document[0].activeElement ) ) { + this.collapseAll( event ); + } + }); + }, + keydown: "_keydown" + }); + + this.refresh(); + + // Clicks outside of a menu collapse any open menus + this._on( this.document, { + click: function( event ) { + if ( this._closeOnDocumentClick( event ) ) { + this.collapseAll( event ); + } + + // Reset the mouseHandled flag + this.mouseHandled = false; + } + }); + }, + + _destroy: function() { + // Destroy (sub)menus + this.element + .removeAttr( "aria-activedescendant" ) + .find( ".ui-menu" ).addBack() + .removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" ) + .removeAttr( "role" ) + .removeAttr( "tabIndex" ) + .removeAttr( "aria-labelledby" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-disabled" ) + .removeUniqueId() + .show(); + + // Destroy menu items + this.element.find( ".ui-menu-item" ) + .removeClass( "ui-menu-item" ) + .removeAttr( "role" ) + .removeAttr( "aria-disabled" ) + .removeUniqueId() + .removeClass( "ui-state-hover" ) + .removeAttr( "tabIndex" ) + .removeAttr( "role" ) + .removeAttr( "aria-haspopup" ) + .children().each( function() { + var elem = $( this ); + if ( elem.data( "ui-menu-submenu-carat" ) ) { + elem.remove(); + } + }); + + // Destroy menu dividers + this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" ); + }, + + _keydown: function( event ) { + var match, prev, character, skip, + preventDefault = true; + + switch ( event.keyCode ) { + case $.ui.keyCode.PAGE_UP: + this.previousPage( event ); + break; + case $.ui.keyCode.PAGE_DOWN: + this.nextPage( event ); + break; + case $.ui.keyCode.HOME: + this._move( "first", "first", event ); + break; + case $.ui.keyCode.END: + this._move( "last", "last", event ); + break; + case $.ui.keyCode.UP: + this.previous( event ); + break; + case $.ui.keyCode.DOWN: + this.next( event ); + break; + case $.ui.keyCode.LEFT: + this.collapse( event ); + break; + case $.ui.keyCode.RIGHT: + if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { + this.expand( event ); + } + break; + case $.ui.keyCode.ENTER: + case $.ui.keyCode.SPACE: + this._activate( event ); + break; + case $.ui.keyCode.ESCAPE: + this.collapse( event ); + break; + default: + preventDefault = false; + prev = this.previousFilter || ""; + character = String.fromCharCode( event.keyCode ); + skip = false; + + clearTimeout( this.filterTimer ); + + if ( character === prev ) { + skip = true; + } else { + character = prev + character; + } + + match = this._filterMenuItems( character ); + match = skip && match.index( this.active.next() ) !== -1 ? + this.active.nextAll( ".ui-menu-item" ) : + match; + + // If no matches on the current filter, reset to the last character pressed + // to move down the menu to the first item that starts with that character + if ( !match.length ) { + character = String.fromCharCode( event.keyCode ); + match = this._filterMenuItems( character ); + } + + if ( match.length ) { + this.focus( event, match ); + this.previousFilter = character; + this.filterTimer = this._delay(function() { + delete this.previousFilter; + }, 1000 ); + } else { + delete this.previousFilter; + } + } + + if ( preventDefault ) { + event.preventDefault(); + } + }, + + _activate: function( event ) { + if ( !this.active.is( ".ui-state-disabled" ) ) { + if ( this.active.is( "[aria-haspopup='true']" ) ) { + this.expand( event ); + } else { + this.select( event ); + } + } + }, + + refresh: function() { + var menus, items, + that = this, + icon = this.options.icons.submenu, + submenus = this.element.find( this.options.menus ); + + this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length ); + + // Initialize nested menus + submenus.filter( ":not(.ui-menu)" ) + .addClass( "ui-menu ui-widget ui-widget-content ui-front" ) + .hide() + .attr({ + role: this.options.role, + "aria-hidden": "true", + "aria-expanded": "false" + }) + .each(function() { + var menu = $( this ), + item = menu.parent(), + submenuCarat = $( "" ) + .addClass( "ui-menu-icon ui-icon " + icon ) + .data( "ui-menu-submenu-carat", true ); + + item + .attr( "aria-haspopup", "true" ) + .prepend( submenuCarat ); + menu.attr( "aria-labelledby", item.attr( "id" ) ); + }); + + menus = submenus.add( this.element ); + items = menus.find( this.options.items ); + + // Initialize menu-items containing spaces and/or dashes only as dividers + items.not( ".ui-menu-item" ).each(function() { + var item = $( this ); + if ( that._isDivider( item ) ) { + item.addClass( "ui-widget-content ui-menu-divider" ); + } + }); + + // Don't refresh list items that are already adapted + items.not( ".ui-menu-item, .ui-menu-divider" ) + .addClass( "ui-menu-item" ) + .uniqueId() + .attr({ + tabIndex: -1, + role: this._itemRole() + }); + + // Add aria-disabled attribute to any disabled menu item + items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" ); + + // If the active item has been removed, blur the menu + if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { + this.blur(); + } + }, + + _itemRole: function() { + return { + menu: "menuitem", + listbox: "option" + }[ this.options.role ]; + }, + + _setOption: function( key, value ) { + if ( key === "icons" ) { + this.element.find( ".ui-menu-icon" ) + .removeClass( this.options.icons.submenu ) + .addClass( value.submenu ); + } + if ( key === "disabled" ) { + this.element + .toggleClass( "ui-state-disabled", !!value ) + .attr( "aria-disabled", value ); + } + this._super( key, value ); + }, + + focus: function( event, item ) { + var nested, focused; + this.blur( event, event && event.type === "focus" ); + + this._scrollIntoView( item ); + + this.active = item.first(); + focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" ); + // Only update aria-activedescendant if there's a role + // otherwise we assume focus is managed elsewhere + if ( this.options.role ) { + this.element.attr( "aria-activedescendant", focused.attr( "id" ) ); + } + + // Highlight active parent menu item, if any + this.active + .parent() + .closest( ".ui-menu-item" ) + .addClass( "ui-state-active" ); + + if ( event && event.type === "keydown" ) { + this._close(); + } else { + this.timer = this._delay(function() { + this._close(); + }, this.delay ); + } + + nested = item.children( ".ui-menu" ); + if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) { + this._startOpening(nested); + } + this.activeMenu = item.parent(); + + this._trigger( "focus", event, { item: item } ); + }, + + _scrollIntoView: function( item ) { + var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; + if ( this._hasScroll() ) { + borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0; + paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0; + offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; + scroll = this.activeMenu.scrollTop(); + elementHeight = this.activeMenu.height(); + itemHeight = item.outerHeight(); + + if ( offset < 0 ) { + this.activeMenu.scrollTop( scroll + offset ); + } else if ( offset + itemHeight > elementHeight ) { + this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight ); + } + } + }, + + blur: function( event, fromFocus ) { + if ( !fromFocus ) { + clearTimeout( this.timer ); + } + + if ( !this.active ) { + return; + } + + this.active.removeClass( "ui-state-focus" ); + this.active = null; + + this._trigger( "blur", event, { item: this.active } ); + }, + + _startOpening: function( submenu ) { + clearTimeout( this.timer ); + + // Don't open if already open fixes a Firefox bug that caused a .5 pixel + // shift in the submenu position when mousing over the carat icon + if ( submenu.attr( "aria-hidden" ) !== "true" ) { + return; + } + + this.timer = this._delay(function() { + this._close(); + this._open( submenu ); + }, this.delay ); + }, + + _open: function( submenu ) { + var position = $.extend({ + of: this.active + }, this.options.position ); + + clearTimeout( this.timer ); + this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) ) + .hide() + .attr( "aria-hidden", "true" ); + + submenu + .show() + .removeAttr( "aria-hidden" ) + .attr( "aria-expanded", "true" ) + .position( position ); + }, + + collapseAll: function( event, all ) { + clearTimeout( this.timer ); + this.timer = this._delay(function() { + // If we were passed an event, look for the submenu that contains the event + var currentMenu = all ? this.element : + $( event && event.target ).closest( this.element.find( ".ui-menu" ) ); + + // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway + if ( !currentMenu.length ) { + currentMenu = this.element; + } + + this._close( currentMenu ); + + this.blur( event ); + this.activeMenu = currentMenu; + }, this.delay ); + }, + + // With no arguments, closes the currently active menu - if nothing is active + // it closes all menus. If passed an argument, it will search for menus BELOW + _close: function( startMenu ) { + if ( !startMenu ) { + startMenu = this.active ? this.active.parent() : this.element; + } + + startMenu + .find( ".ui-menu" ) + .hide() + .attr( "aria-hidden", "true" ) + .attr( "aria-expanded", "false" ) + .end() + .find( ".ui-state-active" ).not( ".ui-state-focus" ) + .removeClass( "ui-state-active" ); + }, + + _closeOnDocumentClick: function( event ) { + return !$( event.target ).closest( ".ui-menu" ).length; + }, + + _isDivider: function( item ) { + + // Match hyphen, em dash, en dash + return !/[^\-\u2014\u2013\s]/.test( item.text() ); + }, + + collapse: function( event ) { + var newItem = this.active && + this.active.parent().closest( ".ui-menu-item", this.element ); + if ( newItem && newItem.length ) { + this._close(); + this.focus( event, newItem ); + } + }, + + expand: function( event ) { + var newItem = this.active && + this.active + .children( ".ui-menu " ) + .find( this.options.items ) + .first(); + + if ( newItem && newItem.length ) { + this._open( newItem.parent() ); + + // Delay so Firefox will not hide activedescendant change in expanding submenu from AT + this._delay(function() { + this.focus( event, newItem ); + }); + } + }, + + next: function( event ) { + this._move( "next", "first", event ); + }, + + previous: function( event ) { + this._move( "prev", "last", event ); + }, + + isFirstItem: function() { + return this.active && !this.active.prevAll( ".ui-menu-item" ).length; + }, + + isLastItem: function() { + return this.active && !this.active.nextAll( ".ui-menu-item" ).length; + }, + + _move: function( direction, filter, event ) { + var next; + if ( this.active ) { + if ( direction === "first" || direction === "last" ) { + next = this.active + [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" ) + .eq( -1 ); + } else { + next = this.active + [ direction + "All" ]( ".ui-menu-item" ) + .eq( 0 ); + } + } + if ( !next || !next.length || !this.active ) { + next = this.activeMenu.find( this.options.items )[ filter ](); + } + + this.focus( event, next ); + }, + + nextPage: function( event ) { + var item, base, height; + + if ( !this.active ) { + this.next( event ); + return; + } + if ( this.isLastItem() ) { + return; + } + if ( this._hasScroll() ) { + base = this.active.offset().top; + height = this.element.height(); + this.active.nextAll( ".ui-menu-item" ).each(function() { + item = $( this ); + return item.offset().top - base - height < 0; + }); + + this.focus( event, item ); + } else { + this.focus( event, this.activeMenu.find( this.options.items ) + [ !this.active ? "first" : "last" ]() ); + } + }, + + previousPage: function( event ) { + var item, base, height; + if ( !this.active ) { + this.next( event ); + return; + } + if ( this.isFirstItem() ) { + return; + } + if ( this._hasScroll() ) { + base = this.active.offset().top; + height = this.element.height(); + this.active.prevAll( ".ui-menu-item" ).each(function() { + item = $( this ); + return item.offset().top - base + height > 0; + }); + + this.focus( event, item ); + } else { + this.focus( event, this.activeMenu.find( this.options.items ).first() ); + } + }, + + _hasScroll: function() { + return this.element.outerHeight() < this.element.prop( "scrollHeight" ); + }, + + select: function( event ) { + // TODO: It should never be possible to not have an active item at this + // point, but the tests don't trigger mouseenter before click. + this.active = this.active || $( event.target ).closest( ".ui-menu-item" ); + var ui = { item: this.active }; + if ( !this.active.has( ".ui-menu" ).length ) { + this.collapseAll( event, true ); + } + this._trigger( "select", event, ui ); + }, + + _filterMenuItems: function(character) { + var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ), + regex = new RegExp( "^" + escapedCharacter, "i" ); + + return this.activeMenu + .find( this.options.items ) + + // Only match on items, not dividers or other content (#10571) + .filter( ".ui-menu-item" ) + .filter(function() { + return regex.test( $.trim( $( this ).text() ) ); + }); + } +}); + + +/*! + * jQuery UI Autocomplete 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/autocomplete/ + */ + + +$.widget( "ui.autocomplete", { + version: "1.11.4", + defaultElement: "", + options: { + appendTo: null, + autoFocus: false, + delay: 300, + minLength: 1, + position: { + my: "left top", + at: "left bottom", + collision: "none" + }, + source: null, + + // callbacks + change: null, + close: null, + focus: null, + open: null, + response: null, + search: null, + select: null + }, + + requestIndex: 0, + pending: 0, + + _create: function() { + // Some browsers only repeat keydown events, not keypress events, + // so we use the suppressKeyPress flag to determine if we've already + // handled the keydown event. #7269 + // Unfortunately the code for & in keypress is the same as the up arrow, + // so we use the suppressKeyPressRepeat flag to avoid handling keypress + // events when we know the keydown event was used to modify the + // search term. #7799 + var suppressKeyPress, suppressKeyPressRepeat, suppressInput, + nodeName = this.element[ 0 ].nodeName.toLowerCase(), + isTextarea = nodeName === "textarea", + isInput = nodeName === "input"; + + this.isMultiLine = + // Textareas are always multi-line + isTextarea ? true : + // Inputs are always single-line, even if inside a contentEditable element + // IE also treats inputs as contentEditable + isInput ? false : + // All other element types are determined by whether or not they're contentEditable + this.element.prop( "isContentEditable" ); + + this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ]; + this.isNewMenu = true; + + this.element + .addClass( "ui-autocomplete-input" ) + .attr( "autocomplete", "off" ); + + this._on( this.element, { + keydown: function( event ) { + if ( this.element.prop( "readOnly" ) ) { + suppressKeyPress = true; + suppressInput = true; + suppressKeyPressRepeat = true; + return; + } + + suppressKeyPress = false; + suppressInput = false; + suppressKeyPressRepeat = false; + var keyCode = $.ui.keyCode; + switch ( event.keyCode ) { + case keyCode.PAGE_UP: + suppressKeyPress = true; + this._move( "previousPage", event ); + break; + case keyCode.PAGE_DOWN: + suppressKeyPress = true; + this._move( "nextPage", event ); + break; + case keyCode.UP: + suppressKeyPress = true; + this._keyEvent( "previous", event ); + break; + case keyCode.DOWN: + suppressKeyPress = true; + this._keyEvent( "next", event ); + break; + case keyCode.ENTER: + // when menu is open and has focus + if ( this.menu.active ) { + // #6055 - Opera still allows the keypress to occur + // which causes forms to submit + suppressKeyPress = true; + event.preventDefault(); + this.menu.select( event ); + } + break; + case keyCode.TAB: + if ( this.menu.active ) { + this.menu.select( event ); + } + break; + case keyCode.ESCAPE: + if ( this.menu.element.is( ":visible" ) ) { + if ( !this.isMultiLine ) { + this._value( this.term ); + } + this.close( event ); + // Different browsers have different default behavior for escape + // Single press can mean undo or clear + // Double press in IE means clear the whole form + event.preventDefault(); + } + break; + default: + suppressKeyPressRepeat = true; + // search timeout should be triggered before the input value is changed + this._searchTimeout( event ); + break; + } + }, + keypress: function( event ) { + if ( suppressKeyPress ) { + suppressKeyPress = false; + if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { + event.preventDefault(); + } + return; + } + if ( suppressKeyPressRepeat ) { + return; + } + + // replicate some key handlers to allow them to repeat in Firefox and Opera + var keyCode = $.ui.keyCode; + switch ( event.keyCode ) { + case keyCode.PAGE_UP: + this._move( "previousPage", event ); + break; + case keyCode.PAGE_DOWN: + this._move( "nextPage", event ); + break; + case keyCode.UP: + this._keyEvent( "previous", event ); + break; + case keyCode.DOWN: + this._keyEvent( "next", event ); + break; + } + }, + input: function( event ) { + if ( suppressInput ) { + suppressInput = false; + event.preventDefault(); + return; + } + this._searchTimeout( event ); + }, + focus: function() { + this.selectedItem = null; + this.previous = this._value(); + }, + blur: function( event ) { + if ( this.cancelBlur ) { + delete this.cancelBlur; + return; + } + + clearTimeout( this.searching ); + this.close( event ); + this._change( event ); + } + }); + + this._initSource(); + this.menu = $( "
      " ) + .addClass( "ui-autocomplete ui-front" ) + .appendTo( this._appendTo() ) + .menu({ + // disable ARIA support, the live region takes care of that + role: null + }) + .hide() + .menu( "instance" ); + + this._on( this.menu.element, { + mousedown: function( event ) { + // prevent moving focus out of the text field + event.preventDefault(); + + // IE doesn't prevent moving focus even with event.preventDefault() + // so we set a flag to know when we should ignore the blur event + this.cancelBlur = true; + this._delay(function() { + delete this.cancelBlur; + }); + + // clicking on the scrollbar causes focus to shift to the body + // but we can't detect a mouseup or a click immediately afterward + // so we have to track the next mousedown and close the menu if + // the user clicks somewhere outside of the autocomplete + var menuElement = this.menu.element[ 0 ]; + if ( !$( event.target ).closest( ".ui-menu-item" ).length ) { + this._delay(function() { + var that = this; + this.document.one( "mousedown", function( event ) { + if ( event.target !== that.element[ 0 ] && + event.target !== menuElement && + !$.contains( menuElement, event.target ) ) { + that.close(); + } + }); + }); + } + }, + menufocus: function( event, ui ) { + var label, item; + // support: Firefox + // Prevent accidental activation of menu items in Firefox (#7024 #9118) + if ( this.isNewMenu ) { + this.isNewMenu = false; + if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) { + this.menu.blur(); + + this.document.one( "mousemove", function() { + $( event.target ).trigger( event.originalEvent ); + }); + + return; + } + } + + item = ui.item.data( "ui-autocomplete-item" ); + if ( false !== this._trigger( "focus", event, { item: item } ) ) { + // use value to match what will end up in the input, if it was a key event + if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) { + this._value( item.value ); + } + } + + // Announce the value in the liveRegion + label = ui.item.attr( "aria-label" ) || item.value; + if ( label && $.trim( label ).length ) { + this.liveRegion.children().hide(); + $( "
      " ).text( label ).appendTo( this.liveRegion ); + } + }, + menuselect: function( event, ui ) { + var item = ui.item.data( "ui-autocomplete-item" ), + previous = this.previous; + + // only trigger when focus was lost (click on menu) + if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) { + this.element.focus(); + this.previous = previous; + // #6109 - IE triggers two focus events and the second + // is asynchronous, so we need to reset the previous + // term synchronously and asynchronously :-( + this._delay(function() { + this.previous = previous; + this.selectedItem = item; + }); + } + + if ( false !== this._trigger( "select", event, { item: item } ) ) { + this._value( item.value ); + } + // reset the term after the select event + // this allows custom select handling to work properly + this.term = this._value(); + + this.close( event ); + this.selectedItem = item; + } + }); + + this.liveRegion = $( "", { + role: "status", + "aria-live": "assertive", + "aria-relevant": "additions" + }) + .addClass( "ui-helper-hidden-accessible" ) + .appendTo( this.document[ 0 ].body ); + + // turning off autocomplete prevents the browser from remembering the + // value when navigating through history, so we re-enable autocomplete + // if the page is unloaded before the widget is destroyed. #7790 + this._on( this.window, { + beforeunload: function() { + this.element.removeAttr( "autocomplete" ); + } + }); + }, + + _destroy: function() { + clearTimeout( this.searching ); + this.element + .removeClass( "ui-autocomplete-input" ) + .removeAttr( "autocomplete" ); + this.menu.element.remove(); + this.liveRegion.remove(); + }, + + _setOption: function( key, value ) { + this._super( key, value ); + if ( key === "source" ) { + this._initSource(); + } + if ( key === "appendTo" ) { + this.menu.element.appendTo( this._appendTo() ); + } + if ( key === "disabled" && value && this.xhr ) { + this.xhr.abort(); + } + }, + + _appendTo: function() { + var element = this.options.appendTo; + + if ( element ) { + element = element.jquery || element.nodeType ? + $( element ) : + this.document.find( element ).eq( 0 ); + } + + if ( !element || !element[ 0 ] ) { + element = this.element.closest( ".ui-front" ); + } + + if ( !element.length ) { + element = this.document[ 0 ].body; + } + + return element; + }, + + _initSource: function() { + var array, url, + that = this; + if ( $.isArray( this.options.source ) ) { + array = this.options.source; + this.source = function( request, response ) { + response( $.ui.autocomplete.filter( array, request.term ) ); + }; + } else if ( typeof this.options.source === "string" ) { + url = this.options.source; + this.source = function( request, response ) { + if ( that.xhr ) { + that.xhr.abort(); + } + that.xhr = $.ajax({ + url: url, + data: request, + dataType: "json", + success: function( data ) { + response( data ); + }, + error: function() { + response([]); + } + }); + }; + } else { + this.source = this.options.source; + } + }, + + _searchTimeout: function( event ) { + clearTimeout( this.searching ); + this.searching = this._delay(function() { + + // Search if the value has changed, or if the user retypes the same value (see #7434) + var equalValues = this.term === this._value(), + menuVisible = this.menu.element.is( ":visible" ), + modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey; + + if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) { + this.selectedItem = null; + this.search( null, event ); + } + }, this.options.delay ); + }, + + search: function( value, event ) { + value = value != null ? value : this._value(); + + // always save the actual value, not the one passed as an argument + this.term = this._value(); + + if ( value.length < this.options.minLength ) { + return this.close( event ); + } + + if ( this._trigger( "search", event ) === false ) { + return; + } + + return this._search( value ); + }, + + _search: function( value ) { + this.pending++; + this.element.addClass( "ui-autocomplete-loading" ); + this.cancelSearch = false; + + this.source( { term: value }, this._response() ); + }, + + _response: function() { + var index = ++this.requestIndex; + + return $.proxy(function( content ) { + if ( index === this.requestIndex ) { + this.__response( content ); + } + + this.pending--; + if ( !this.pending ) { + this.element.removeClass( "ui-autocomplete-loading" ); + } + }, this ); + }, + + __response: function( content ) { + if ( content ) { + content = this._normalize( content ); + } + this._trigger( "response", null, { content: content } ); + if ( !this.options.disabled && content && content.length && !this.cancelSearch ) { + this._suggest( content ); + this._trigger( "open" ); + } else { + // use ._close() instead of .close() so we don't cancel future searches + this._close(); + } + }, + + close: function( event ) { + this.cancelSearch = true; + this._close( event ); + }, + + _close: function( event ) { + if ( this.menu.element.is( ":visible" ) ) { + this.menu.element.hide(); + this.menu.blur(); + this.isNewMenu = true; + this._trigger( "close", event ); + } + }, + + _change: function( event ) { + if ( this.previous !== this._value() ) { + this._trigger( "change", event, { item: this.selectedItem } ); + } + }, + + _normalize: function( items ) { + // assume all items have the right format when the first item is complete + if ( items.length && items[ 0 ].label && items[ 0 ].value ) { + return items; + } + return $.map( items, function( item ) { + if ( typeof item === "string" ) { + return { + label: item, + value: item + }; + } + return $.extend( {}, item, { + label: item.label || item.value, + value: item.value || item.label + }); + }); + }, + + _suggest: function( items ) { + var ul = this.menu.element.empty(); + this._renderMenu( ul, items ); + this.isNewMenu = true; + this.menu.refresh(); + + // size and position menu + ul.show(); + this._resizeMenu(); + ul.position( $.extend({ + of: this.element + }, this.options.position ) ); + + if ( this.options.autoFocus ) { + this.menu.next(); + } + }, + + _resizeMenu: function() { + var ul = this.menu.element; + ul.outerWidth( Math.max( + // Firefox wraps long text (possibly a rounding bug) + // so we add 1px to avoid the wrapping (#7513) + ul.width( "" ).outerWidth() + 1, + this.element.outerWidth() + ) ); + }, + + _renderMenu: function( ul, items ) { + var that = this; + $.each( items, function( index, item ) { + that._renderItemData( ul, item ); + }); + }, + + _renderItemData: function( ul, item ) { + return this._renderItem( ul, item ).data( "ui-autocomplete-item", item ); + }, + + _renderItem: function( ul, item ) { + return $( "
    • " ).text( item.label ).appendTo( ul ); + }, + + _move: function( direction, event ) { + if ( !this.menu.element.is( ":visible" ) ) { + this.search( null, event ); + return; + } + if ( this.menu.isFirstItem() && /^previous/.test( direction ) || + this.menu.isLastItem() && /^next/.test( direction ) ) { + + if ( !this.isMultiLine ) { + this._value( this.term ); + } + + this.menu.blur(); + return; + } + this.menu[ direction ]( event ); + }, + + widget: function() { + return this.menu.element; + }, + + _value: function() { + return this.valueMethod.apply( this.element, arguments ); + }, + + _keyEvent: function( keyEvent, event ) { + if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { + this._move( keyEvent, event ); + + // prevents moving cursor to beginning/end of the text field in some browsers + event.preventDefault(); + } + } +}); + +$.extend( $.ui.autocomplete, { + escapeRegex: function( value ) { + return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); + }, + filter: function( array, term ) { + var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" ); + return $.grep( array, function( value ) { + return matcher.test( value.label || value.value || value ); + }); + } +}); + +// live region extension, adding a `messages` option +// NOTE: This is an experimental API. We are still investigating +// a full solution for string manipulation and internationalization. +$.widget( "ui.autocomplete", $.ui.autocomplete, { + options: { + messages: { + noResults: "No search results.", + results: function( amount ) { + return amount + ( amount > 1 ? " results are" : " result is" ) + + " available, use up and down arrow keys to navigate."; + } + } + }, + + __response: function( content ) { + var message; + this._superApply( arguments ); + if ( this.options.disabled || this.cancelSearch ) { + return; + } + if ( content && content.length ) { + message = this.options.messages.results( content.length ); + } else { + message = this.options.messages.noResults; + } + this.liveRegion.children().hide(); + $( "
      " ).text( message ).appendTo( this.liveRegion ); + } +}); + +var autocomplete = $.ui.autocomplete; + + +/*! + * jQuery UI Button 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/button/ + */ + + +var lastActive, + baseClasses = "ui-button ui-widget ui-state-default ui-corner-all", + typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", + formResetHandler = function() { + var form = $( this ); + setTimeout(function() { + form.find( ":ui-button" ).button( "refresh" ); + }, 1 ); + }, + radioGroup = function( radio ) { + var name = radio.name, + form = radio.form, + radios = $( [] ); + if ( name ) { + name = name.replace( /'/g, "\\'" ); + if ( form ) { + radios = $( form ).find( "[name='" + name + "'][type=radio]" ); + } else { + radios = $( "[name='" + name + "'][type=radio]", radio.ownerDocument ) + .filter(function() { + return !this.form; + }); + } + } + return radios; + }; + +$.widget( "ui.button", { + version: "1.11.4", + defaultElement: "").addClass(this._triggerClass). + html(!buttonImage ? buttonText : $("").attr( + { src:buttonImage, alt:buttonText, title:buttonText }))); + input[isRTL ? "before" : "after"](inst.trigger); + inst.trigger.click(function() { + if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) { + $.datepicker._hideDatepicker(); + } else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) { + $.datepicker._hideDatepicker(); + $.datepicker._showDatepicker(input[0]); + } else { + $.datepicker._showDatepicker(input[0]); + } + return false; + }); + } + }, + + /* Apply the maximum length for the date format. */ + _autoSize: function(inst) { + if (this._get(inst, "autoSize") && !inst.inline) { + var findMax, max, maxI, i, + date = new Date(2009, 12 - 1, 20), // Ensure double digits + dateFormat = this._get(inst, "dateFormat"); + + if (dateFormat.match(/[DM]/)) { + findMax = function(names) { + max = 0; + maxI = 0; + for (i = 0; i < names.length; i++) { + if (names[i].length > max) { + max = names[i].length; + maxI = i; + } + } + return maxI; + }; + date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ? + "monthNames" : "monthNamesShort")))); + date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ? + "dayNames" : "dayNamesShort"))) + 20 - date.getDay()); + } + inst.input.attr("size", this._formatDate(inst, date).length); + } + }, + + /* Attach an inline date picker to a div. */ + _inlineDatepicker: function(target, inst) { + var divSpan = $(target); + if (divSpan.hasClass(this.markerClassName)) { + return; + } + divSpan.addClass(this.markerClassName).append(inst.dpDiv); + $.data(target, "datepicker", inst); + this._setDate(inst, this._getDefaultDate(inst), true); + this._updateDatepicker(inst); + this._updateAlternate(inst); + //If disabled option is true, disable the datepicker before showing it (see ticket #5665) + if( inst.settings.disabled ) { + this._disableDatepicker( target ); + } + // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements + // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height + inst.dpDiv.css( "display", "block" ); + }, + + /* Pop-up the date picker in a "dialog" box. + * @param input element - ignored + * @param date string or Date - the initial date to display + * @param onSelect function - the function to call when a date is selected + * @param settings object - update the dialog date picker instance's settings (anonymous object) + * @param pos int[2] - coordinates for the dialog's position within the screen or + * event - with x/y coordinates or + * leave empty for default (screen centre) + * @return the manager object + */ + _dialogDatepicker: function(input, date, onSelect, settings, pos) { + var id, browserWidth, browserHeight, scrollX, scrollY, + inst = this._dialogInst; // internal instance + + if (!inst) { + this.uuid += 1; + id = "dp" + this.uuid; + this._dialogInput = $(""); + this._dialogInput.keydown(this._doKeyDown); + $("body").append(this._dialogInput); + inst = this._dialogInst = this._newInst(this._dialogInput, false); + inst.settings = {}; + $.data(this._dialogInput[0], "datepicker", inst); + } + datepicker_extendRemove(inst.settings, settings || {}); + date = (date && date.constructor === Date ? this._formatDate(inst, date) : date); + this._dialogInput.val(date); + + this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null); + if (!this._pos) { + browserWidth = document.documentElement.clientWidth; + browserHeight = document.documentElement.clientHeight; + scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; + scrollY = document.documentElement.scrollTop || document.body.scrollTop; + this._pos = // should use actual width/height below + [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY]; + } + + // move input on screen for focus, but hidden behind dialog + this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px"); + inst.settings.onSelect = onSelect; + this._inDialog = true; + this.dpDiv.addClass(this._dialogClass); + this._showDatepicker(this._dialogInput[0]); + if ($.blockUI) { + $.blockUI(this.dpDiv); + } + $.data(this._dialogInput[0], "datepicker", inst); + return this; + }, + + /* Detach a datepicker from its control. + * @param target element - the target input field or division or span + */ + _destroyDatepicker: function(target) { + var nodeName, + $target = $(target), + inst = $.data(target, "datepicker"); + + if (!$target.hasClass(this.markerClassName)) { + return; + } + + nodeName = target.nodeName.toLowerCase(); + $.removeData(target, "datepicker"); + if (nodeName === "input") { + inst.append.remove(); + inst.trigger.remove(); + $target.removeClass(this.markerClassName). + unbind("focus", this._showDatepicker). + unbind("keydown", this._doKeyDown). + unbind("keypress", this._doKeyPress). + unbind("keyup", this._doKeyUp); + } else if (nodeName === "div" || nodeName === "span") { + $target.removeClass(this.markerClassName).empty(); + } + + if ( datepicker_instActive === inst ) { + datepicker_instActive = null; + } + }, + + /* Enable the date picker to a jQuery selection. + * @param target element - the target input field or division or span + */ + _enableDatepicker: function(target) { + var nodeName, inline, + $target = $(target), + inst = $.data(target, "datepicker"); + + if (!$target.hasClass(this.markerClassName)) { + return; + } + + nodeName = target.nodeName.toLowerCase(); + if (nodeName === "input") { + target.disabled = false; + inst.trigger.filter("button"). + each(function() { this.disabled = false; }).end(). + filter("img").css({opacity: "1.0", cursor: ""}); + } else if (nodeName === "div" || nodeName === "span") { + inline = $target.children("." + this._inlineClass); + inline.children().removeClass("ui-state-disabled"); + inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). + prop("disabled", false); + } + this._disabledInputs = $.map(this._disabledInputs, + function(value) { return (value === target ? null : value); }); // delete entry + }, + + /* Disable the date picker to a jQuery selection. + * @param target element - the target input field or division or span + */ + _disableDatepicker: function(target) { + var nodeName, inline, + $target = $(target), + inst = $.data(target, "datepicker"); + + if (!$target.hasClass(this.markerClassName)) { + return; + } + + nodeName = target.nodeName.toLowerCase(); + if (nodeName === "input") { + target.disabled = true; + inst.trigger.filter("button"). + each(function() { this.disabled = true; }).end(). + filter("img").css({opacity: "0.5", cursor: "default"}); + } else if (nodeName === "div" || nodeName === "span") { + inline = $target.children("." + this._inlineClass); + inline.children().addClass("ui-state-disabled"); + inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). + prop("disabled", true); + } + this._disabledInputs = $.map(this._disabledInputs, + function(value) { return (value === target ? null : value); }); // delete entry + this._disabledInputs[this._disabledInputs.length] = target; + }, + + /* Is the first field in a jQuery collection disabled as a datepicker? + * @param target element - the target input field or division or span + * @return boolean - true if disabled, false if enabled + */ + _isDisabledDatepicker: function(target) { + if (!target) { + return false; + } + for (var i = 0; i < this._disabledInputs.length; i++) { + if (this._disabledInputs[i] === target) { + return true; + } + } + return false; + }, + + /* Retrieve the instance data for the target control. + * @param target element - the target input field or division or span + * @return object - the associated instance data + * @throws error if a jQuery problem getting data + */ + _getInst: function(target) { + try { + return $.data(target, "datepicker"); + } + catch (err) { + throw "Missing instance data for this datepicker"; + } + }, + + /* Update or retrieve the settings for a date picker attached to an input field or division. + * @param target element - the target input field or division or span + * @param name object - the new settings to update or + * string - the name of the setting to change or retrieve, + * when retrieving also "all" for all instance settings or + * "defaults" for all global defaults + * @param value any - the new value for the setting + * (omit if above is an object or to retrieve a value) + */ + _optionDatepicker: function(target, name, value) { + var settings, date, minDate, maxDate, + inst = this._getInst(target); + + if (arguments.length === 2 && typeof name === "string") { + return (name === "defaults" ? $.extend({}, $.datepicker._defaults) : + (inst ? (name === "all" ? $.extend({}, inst.settings) : + this._get(inst, name)) : null)); + } + + settings = name || {}; + if (typeof name === "string") { + settings = {}; + settings[name] = value; + } + + if (inst) { + if (this._curInst === inst) { + this._hideDatepicker(); + } + + date = this._getDateDatepicker(target, true); + minDate = this._getMinMaxDate(inst, "min"); + maxDate = this._getMinMaxDate(inst, "max"); + datepicker_extendRemove(inst.settings, settings); + // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided + if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) { + inst.settings.minDate = this._formatDate(inst, minDate); + } + if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) { + inst.settings.maxDate = this._formatDate(inst, maxDate); + } + if ( "disabled" in settings ) { + if ( settings.disabled ) { + this._disableDatepicker(target); + } else { + this._enableDatepicker(target); + } + } + this._attachments($(target), inst); + this._autoSize(inst); + this._setDate(inst, date); + this._updateAlternate(inst); + this._updateDatepicker(inst); + } + }, + + // change method deprecated + _changeDatepicker: function(target, name, value) { + this._optionDatepicker(target, name, value); + }, + + /* Redraw the date picker attached to an input field or division. + * @param target element - the target input field or division or span + */ + _refreshDatepicker: function(target) { + var inst = this._getInst(target); + if (inst) { + this._updateDatepicker(inst); + } + }, + + /* Set the dates for a jQuery selection. + * @param target element - the target input field or division or span + * @param date Date - the new date + */ + _setDateDatepicker: function(target, date) { + var inst = this._getInst(target); + if (inst) { + this._setDate(inst, date); + this._updateDatepicker(inst); + this._updateAlternate(inst); + } + }, + + /* Get the date(s) for the first entry in a jQuery selection. + * @param target element - the target input field or division or span + * @param noDefault boolean - true if no default date is to be used + * @return Date - the current date + */ + _getDateDatepicker: function(target, noDefault) { + var inst = this._getInst(target); + if (inst && !inst.inline) { + this._setDateFromField(inst, noDefault); + } + return (inst ? this._getDate(inst) : null); + }, + + /* Handle keystrokes. */ + _doKeyDown: function(event) { + var onSelect, dateStr, sel, + inst = $.datepicker._getInst(event.target), + handled = true, + isRTL = inst.dpDiv.is(".ui-datepicker-rtl"); + + inst._keyEvent = true; + if ($.datepicker._datepickerShowing) { + switch (event.keyCode) { + case 9: $.datepicker._hideDatepicker(); + handled = false; + break; // hide on tab out + case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." + + $.datepicker._currentClass + ")", inst.dpDiv); + if (sel[0]) { + $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]); + } + + onSelect = $.datepicker._get(inst, "onSelect"); + if (onSelect) { + dateStr = $.datepicker._formatDate(inst); + + // trigger custom callback + onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); + } else { + $.datepicker._hideDatepicker(); + } + + return false; // don't submit the form + case 27: $.datepicker._hideDatepicker(); + break; // hide on escape + case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ? + -$.datepicker._get(inst, "stepBigMonths") : + -$.datepicker._get(inst, "stepMonths")), "M"); + break; // previous month/year on page up/+ ctrl + case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ? + +$.datepicker._get(inst, "stepBigMonths") : + +$.datepicker._get(inst, "stepMonths")), "M"); + break; // next month/year on page down/+ ctrl + case 35: if (event.ctrlKey || event.metaKey) { + $.datepicker._clearDate(event.target); + } + handled = event.ctrlKey || event.metaKey; + break; // clear on ctrl or command +end + case 36: if (event.ctrlKey || event.metaKey) { + $.datepicker._gotoToday(event.target); + } + handled = event.ctrlKey || event.metaKey; + break; // current on ctrl or command +home + case 37: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D"); + } + handled = event.ctrlKey || event.metaKey; + // -1 day on ctrl or command +left + if (event.originalEvent.altKey) { + $.datepicker._adjustDate(event.target, (event.ctrlKey ? + -$.datepicker._get(inst, "stepBigMonths") : + -$.datepicker._get(inst, "stepMonths")), "M"); + } + // next month/year on alt +left on Mac + break; + case 38: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, -7, "D"); + } + handled = event.ctrlKey || event.metaKey; + break; // -1 week on ctrl or command +up + case 39: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D"); + } + handled = event.ctrlKey || event.metaKey; + // +1 day on ctrl or command +right + if (event.originalEvent.altKey) { + $.datepicker._adjustDate(event.target, (event.ctrlKey ? + +$.datepicker._get(inst, "stepBigMonths") : + +$.datepicker._get(inst, "stepMonths")), "M"); + } + // next month/year on alt +right + break; + case 40: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, +7, "D"); + } + handled = event.ctrlKey || event.metaKey; + break; // +1 week on ctrl or command +down + default: handled = false; + } + } else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home + $.datepicker._showDatepicker(this); + } else { + handled = false; + } + + if (handled) { + event.preventDefault(); + event.stopPropagation(); + } + }, + + /* Filter entered characters - based on date format. */ + _doKeyPress: function(event) { + var chars, chr, + inst = $.datepicker._getInst(event.target); + + if ($.datepicker._get(inst, "constrainInput")) { + chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat")); + chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode); + return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1); + } + }, + + /* Synchronise manual entry and field/alternate field. */ + _doKeyUp: function(event) { + var date, + inst = $.datepicker._getInst(event.target); + + if (inst.input.val() !== inst.lastVal) { + try { + date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), + (inst.input ? inst.input.val() : null), + $.datepicker._getFormatConfig(inst)); + + if (date) { // only if valid + $.datepicker._setDateFromField(inst); + $.datepicker._updateAlternate(inst); + $.datepicker._updateDatepicker(inst); + } + } + catch (err) { + } + } + return true; + }, + + /* Pop-up the date picker for a given input field. + * If false returned from beforeShow event handler do not show. + * @param input element - the input field attached to the date picker or + * event - if triggered by focus + */ + _showDatepicker: function(input) { + input = input.target || input; + if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger + input = $("input", input.parentNode)[0]; + } + + if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here + return; + } + + var inst, beforeShow, beforeShowSettings, isFixed, + offset, showAnim, duration; + + inst = $.datepicker._getInst(input); + if ($.datepicker._curInst && $.datepicker._curInst !== inst) { + $.datepicker._curInst.dpDiv.stop(true, true); + if ( inst && $.datepicker._datepickerShowing ) { + $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] ); + } + } + + beforeShow = $.datepicker._get(inst, "beforeShow"); + beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {}; + if(beforeShowSettings === false){ + return; + } + datepicker_extendRemove(inst.settings, beforeShowSettings); + + inst.lastVal = null; + $.datepicker._lastInput = input; + $.datepicker._setDateFromField(inst); + + if ($.datepicker._inDialog) { // hide cursor + input.value = ""; + } + if (!$.datepicker._pos) { // position below input + $.datepicker._pos = $.datepicker._findPos(input); + $.datepicker._pos[1] += input.offsetHeight; // add the height + } + + isFixed = false; + $(input).parents().each(function() { + isFixed |= $(this).css("position") === "fixed"; + return !isFixed; + }); + + offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]}; + $.datepicker._pos = null; + //to avoid flashes on Firefox + inst.dpDiv.empty(); + // determine sizing offscreen + inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"}); + $.datepicker._updateDatepicker(inst); + // fix width for dynamic number of date pickers + // and adjust position before showing + offset = $.datepicker._checkOffset(inst, offset, isFixed); + inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ? + "static" : (isFixed ? "fixed" : "absolute")), display: "none", + left: offset.left + "px", top: offset.top + "px"}); + + if (!inst.inline) { + showAnim = $.datepicker._get(inst, "showAnim"); + duration = $.datepicker._get(inst, "duration"); + inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 ); + $.datepicker._datepickerShowing = true; + + if ( $.effects && $.effects.effect[ showAnim ] ) { + inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration); + } else { + inst.dpDiv[showAnim || "show"](showAnim ? duration : null); + } + + if ( $.datepicker._shouldFocusInput( inst ) ) { + inst.input.focus(); + } + + $.datepicker._curInst = inst; + } + }, + + /* Generate the date picker content. */ + _updateDatepicker: function(inst) { + this.maxRows = 4; //Reset the max number of rows being displayed (see #7043) + datepicker_instActive = inst; // for delegate hover events + inst.dpDiv.empty().append(this._generateHTML(inst)); + this._attachHandlers(inst); + + var origyearshtml, + numMonths = this._getNumberOfMonths(inst), + cols = numMonths[1], + width = 17, + activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ); + + if ( activeCell.length > 0 ) { + datepicker_handleMouseover.apply( activeCell.get( 0 ) ); + } + + inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""); + if (cols > 1) { + inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em"); + } + inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") + + "Class"]("ui-datepicker-multi"); + inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") + + "Class"]("ui-datepicker-rtl"); + + if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) { + inst.input.focus(); + } + + // deffered render of the years select (to avoid flashes on Firefox) + if( inst.yearshtml ){ + origyearshtml = inst.yearshtml; + setTimeout(function(){ + //assure that inst.yearshtml didn't change. + if( origyearshtml === inst.yearshtml && inst.yearshtml ){ + inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml); + } + origyearshtml = inst.yearshtml = null; + }, 0); + } + }, + + // #6694 - don't focus the input if it's already focused + // this breaks the change event in IE + // Support: IE and jQuery <1.9 + _shouldFocusInput: function( inst ) { + return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" ); + }, + + /* Check positioning to remain on screen. */ + _checkOffset: function(inst, offset, isFixed) { + var dpWidth = inst.dpDiv.outerWidth(), + dpHeight = inst.dpDiv.outerHeight(), + inputWidth = inst.input ? inst.input.outerWidth() : 0, + inputHeight = inst.input ? inst.input.outerHeight() : 0, + viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()), + viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop()); + + offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0); + offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0; + offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0; + + // now check if datepicker is showing outside window viewport - move to a better place if so. + offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? + Math.abs(offset.left + dpWidth - viewWidth) : 0); + offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? + Math.abs(dpHeight + inputHeight) : 0); + + return offset; + }, + + /* Find an object's position on the screen. */ + _findPos: function(obj) { + var position, + inst = this._getInst(obj), + isRTL = this._get(inst, "isRTL"); + + while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) { + obj = obj[isRTL ? "previousSibling" : "nextSibling"]; + } + + position = $(obj).offset(); + return [position.left, position.top]; + }, + + /* Hide the date picker from view. + * @param input element - the input field attached to the date picker + */ + _hideDatepicker: function(input) { + var showAnim, duration, postProcess, onClose, + inst = this._curInst; + + if (!inst || (input && inst !== $.data(input, "datepicker"))) { + return; + } + + if (this._datepickerShowing) { + showAnim = this._get(inst, "showAnim"); + duration = this._get(inst, "duration"); + postProcess = function() { + $.datepicker._tidyDialog(inst); + }; + + // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed + if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) { + inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess); + } else { + inst.dpDiv[(showAnim === "slideDown" ? "slideUp" : + (showAnim === "fadeIn" ? "fadeOut" : "hide"))]((showAnim ? duration : null), postProcess); + } + + if (!showAnim) { + postProcess(); + } + this._datepickerShowing = false; + + onClose = this._get(inst, "onClose"); + if (onClose) { + onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]); + } + + this._lastInput = null; + if (this._inDialog) { + this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }); + if ($.blockUI) { + $.unblockUI(); + $("body").append(this.dpDiv); + } + } + this._inDialog = false; + } + }, + + /* Tidy up after a dialog display. */ + _tidyDialog: function(inst) { + inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar"); + }, + + /* Close date picker if clicked elsewhere. */ + _checkExternalClick: function(event) { + if (!$.datepicker._curInst) { + return; + } + + var $target = $(event.target), + inst = $.datepicker._getInst($target[0]); + + if ( ( ( $target[0].id !== $.datepicker._mainDivId && + $target.parents("#" + $.datepicker._mainDivId).length === 0 && + !$target.hasClass($.datepicker.markerClassName) && + !$target.closest("." + $.datepicker._triggerClass).length && + $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) || + ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) { + $.datepicker._hideDatepicker(); + } + }, + + /* Adjust one of the date sub-fields. */ + _adjustDate: function(id, offset, period) { + var target = $(id), + inst = this._getInst(target[0]); + + if (this._isDisabledDatepicker(target[0])) { + return; + } + this._adjustInstDate(inst, offset + + (period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning + period); + this._updateDatepicker(inst); + }, + + /* Action for current link. */ + _gotoToday: function(id) { + var date, + target = $(id), + inst = this._getInst(target[0]); + + if (this._get(inst, "gotoCurrent") && inst.currentDay) { + inst.selectedDay = inst.currentDay; + inst.drawMonth = inst.selectedMonth = inst.currentMonth; + inst.drawYear = inst.selectedYear = inst.currentYear; + } else { + date = new Date(); + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + } + this._notifyChange(inst); + this._adjustDate(target); + }, + + /* Action for selecting a new month/year. */ + _selectMonthYear: function(id, select, period) { + var target = $(id), + inst = this._getInst(target[0]); + + inst["selected" + (period === "M" ? "Month" : "Year")] = + inst["draw" + (period === "M" ? "Month" : "Year")] = + parseInt(select.options[select.selectedIndex].value,10); + + this._notifyChange(inst); + this._adjustDate(target); + }, + + /* Action for selecting a day. */ + _selectDay: function(id, month, year, td) { + var inst, + target = $(id); + + if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) { + return; + } + + inst = this._getInst(target[0]); + inst.selectedDay = inst.currentDay = $("a", td).html(); + inst.selectedMonth = inst.currentMonth = month; + inst.selectedYear = inst.currentYear = year; + this._selectDate(id, this._formatDate(inst, + inst.currentDay, inst.currentMonth, inst.currentYear)); + }, + + /* Erase the input field and hide the date picker. */ + _clearDate: function(id) { + var target = $(id); + this._selectDate(target, ""); + }, + + /* Update the input field with the selected date. */ + _selectDate: function(id, dateStr) { + var onSelect, + target = $(id), + inst = this._getInst(target[0]); + + dateStr = (dateStr != null ? dateStr : this._formatDate(inst)); + if (inst.input) { + inst.input.val(dateStr); + } + this._updateAlternate(inst); + + onSelect = this._get(inst, "onSelect"); + if (onSelect) { + onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback + } else if (inst.input) { + inst.input.trigger("change"); // fire the change event + } + + if (inst.inline){ + this._updateDatepicker(inst); + } else { + this._hideDatepicker(); + this._lastInput = inst.input[0]; + if (typeof(inst.input[0]) !== "object") { + inst.input.focus(); // restore focus + } + this._lastInput = null; + } + }, + + /* Update any alternate field to synchronise with the main field. */ + _updateAlternate: function(inst) { + var altFormat, date, dateStr, + altField = this._get(inst, "altField"); + + if (altField) { // update alternate field too + altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat"); + date = this._getDate(inst); + dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst)); + $(altField).each(function() { $(this).val(dateStr); }); + } + }, + + /* Set as beforeShowDay function to prevent selection of weekends. + * @param date Date - the date to customise + * @return [boolean, string] - is this date selectable?, what is its CSS class? + */ + noWeekends: function(date) { + var day = date.getDay(); + return [(day > 0 && day < 6), ""]; + }, + + /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition. + * @param date Date - the date to get the week for + * @return number - the number of the week within the year that contains this date + */ + iso8601Week: function(date) { + var time, + checkDate = new Date(date.getTime()); + + // Find Thursday of this week starting on Monday + checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); + + time = checkDate.getTime(); + checkDate.setMonth(0); // Compare with Jan 1 + checkDate.setDate(1); + return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1; + }, + + /* Parse a string value into a date object. + * See formatDate below for the possible formats. + * + * @param format string - the expected format of the date + * @param value string - the date in the above format + * @param settings Object - attributes include: + * shortYearCutoff number - the cutoff year for determining the century (optional) + * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) + * dayNames string[7] - names of the days from Sunday (optional) + * monthNamesShort string[12] - abbreviated names of the months (optional) + * monthNames string[12] - names of the months (optional) + * @return Date - the extracted date value or null if value is blank + */ + parseDate: function (format, value, settings) { + if (format == null || value == null) { + throw "Invalid arguments"; + } + + value = (typeof value === "object" ? value.toString() : value + ""); + if (value === "") { + return null; + } + + var iFormat, dim, extra, + iValue = 0, + shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff, + shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp : + new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)), + dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, + dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, + monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, + monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, + year = -1, + month = -1, + day = -1, + doy = -1, + literal = false, + date, + // Check whether a format character is doubled + lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); + if (matches) { + iFormat++; + } + return matches; + }, + // Extract a number from the string value + getNumber = function(match) { + var isDoubled = lookAhead(match), + size = (match === "@" ? 14 : (match === "!" ? 20 : + (match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))), + minSize = (match === "y" ? size : 1), + digits = new RegExp("^\\d{" + minSize + "," + size + "}"), + num = value.substring(iValue).match(digits); + if (!num) { + throw "Missing number at position " + iValue; + } + iValue += num[0].length; + return parseInt(num[0], 10); + }, + // Extract a name from the string value and convert to an index + getName = function(match, shortNames, longNames) { + var index = -1, + names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) { + return [ [k, v] ]; + }).sort(function (a, b) { + return -(a[1].length - b[1].length); + }); + + $.each(names, function (i, pair) { + var name = pair[1]; + if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) { + index = pair[0]; + iValue += name.length; + return false; + } + }); + if (index !== -1) { + return index + 1; + } else { + throw "Unknown name at position " + iValue; + } + }, + // Confirm that a literal character matches the string value + checkLiteral = function() { + if (value.charAt(iValue) !== format.charAt(iFormat)) { + throw "Unexpected literal at position " + iValue; + } + iValue++; + }; + + for (iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) { + if (format.charAt(iFormat) === "'" && !lookAhead("'")) { + literal = false; + } else { + checkLiteral(); + } + } else { + switch (format.charAt(iFormat)) { + case "d": + day = getNumber("d"); + break; + case "D": + getName("D", dayNamesShort, dayNames); + break; + case "o": + doy = getNumber("o"); + break; + case "m": + month = getNumber("m"); + break; + case "M": + month = getName("M", monthNamesShort, monthNames); + break; + case "y": + year = getNumber("y"); + break; + case "@": + date = new Date(getNumber("@")); + year = date.getFullYear(); + month = date.getMonth() + 1; + day = date.getDate(); + break; + case "!": + date = new Date((getNumber("!") - this._ticksTo1970) / 10000); + year = date.getFullYear(); + month = date.getMonth() + 1; + day = date.getDate(); + break; + case "'": + if (lookAhead("'")){ + checkLiteral(); + } else { + literal = true; + } + break; + default: + checkLiteral(); + } + } + } + + if (iValue < value.length){ + extra = value.substr(iValue); + if (!/^\s+/.test(extra)) { + throw "Extra/unparsed characters found in date: " + extra; + } + } + + if (year === -1) { + year = new Date().getFullYear(); + } else if (year < 100) { + year += new Date().getFullYear() - new Date().getFullYear() % 100 + + (year <= shortYearCutoff ? 0 : -100); + } + + if (doy > -1) { + month = 1; + day = doy; + do { + dim = this._getDaysInMonth(year, month - 1); + if (day <= dim) { + break; + } + month++; + day -= dim; + } while (true); + } + + date = this._daylightSavingAdjust(new Date(year, month - 1, day)); + if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) { + throw "Invalid date"; // E.g. 31/02/00 + } + return date; + }, + + /* Standard date formats. */ + ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601) + COOKIE: "D, dd M yy", + ISO_8601: "yy-mm-dd", + RFC_822: "D, d M y", + RFC_850: "DD, dd-M-y", + RFC_1036: "D, d M y", + RFC_1123: "D, d M yy", + RFC_2822: "D, d M yy", + RSS: "D, d M y", // RFC 822 + TICKS: "!", + TIMESTAMP: "@", + W3C: "yy-mm-dd", // ISO 8601 + + _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000), + + /* Format a date object into a string value. + * The format can be combinations of the following: + * d - day of month (no leading zero) + * dd - day of month (two digit) + * o - day of year (no leading zeros) + * oo - day of year (three digit) + * D - day name short + * DD - day name long + * m - month of year (no leading zero) + * mm - month of year (two digit) + * M - month name short + * MM - month name long + * y - year (two digit) + * yy - year (four digit) + * @ - Unix timestamp (ms since 01/01/1970) + * ! - Windows ticks (100ns since 01/01/0001) + * "..." - literal text + * '' - single quote + * + * @param format string - the desired format of the date + * @param date Date - the date value to format + * @param settings Object - attributes include: + * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) + * dayNames string[7] - names of the days from Sunday (optional) + * monthNamesShort string[12] - abbreviated names of the months (optional) + * monthNames string[12] - names of the months (optional) + * @return string - the date in the above format + */ + formatDate: function (format, date, settings) { + if (!date) { + return ""; + } + + var iFormat, + dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, + dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, + monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, + monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, + // Check whether a format character is doubled + lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); + if (matches) { + iFormat++; + } + return matches; + }, + // Format a number, with leading zero if necessary + formatNumber = function(match, value, len) { + var num = "" + value; + if (lookAhead(match)) { + while (num.length < len) { + num = "0" + num; + } + } + return num; + }, + // Format a name, short or long as requested + formatName = function(match, value, shortNames, longNames) { + return (lookAhead(match) ? longNames[value] : shortNames[value]); + }, + output = "", + literal = false; + + if (date) { + for (iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) { + if (format.charAt(iFormat) === "'" && !lookAhead("'")) { + literal = false; + } else { + output += format.charAt(iFormat); + } + } else { + switch (format.charAt(iFormat)) { + case "d": + output += formatNumber("d", date.getDate(), 2); + break; + case "D": + output += formatName("D", date.getDay(), dayNamesShort, dayNames); + break; + case "o": + output += formatNumber("o", + Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3); + break; + case "m": + output += formatNumber("m", date.getMonth() + 1, 2); + break; + case "M": + output += formatName("M", date.getMonth(), monthNamesShort, monthNames); + break; + case "y": + output += (lookAhead("y") ? date.getFullYear() : + (date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100); + break; + case "@": + output += date.getTime(); + break; + case "!": + output += date.getTime() * 10000 + this._ticksTo1970; + break; + case "'": + if (lookAhead("'")) { + output += "'"; + } else { + literal = true; + } + break; + default: + output += format.charAt(iFormat); + } + } + } + } + return output; + }, + + /* Extract all possible characters from the date format. */ + _possibleChars: function (format) { + var iFormat, + chars = "", + literal = false, + // Check whether a format character is doubled + lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); + if (matches) { + iFormat++; + } + return matches; + }; + + for (iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) { + if (format.charAt(iFormat) === "'" && !lookAhead("'")) { + literal = false; + } else { + chars += format.charAt(iFormat); + } + } else { + switch (format.charAt(iFormat)) { + case "d": case "m": case "y": case "@": + chars += "0123456789"; + break; + case "D": case "M": + return null; // Accept anything + case "'": + if (lookAhead("'")) { + chars += "'"; + } else { + literal = true; + } + break; + default: + chars += format.charAt(iFormat); + } + } + } + return chars; + }, + + /* Get a setting value, defaulting if necessary. */ + _get: function(inst, name) { + return inst.settings[name] !== undefined ? + inst.settings[name] : this._defaults[name]; + }, + + /* Parse existing date and initialise date picker. */ + _setDateFromField: function(inst, noDefault) { + if (inst.input.val() === inst.lastVal) { + return; + } + + var dateFormat = this._get(inst, "dateFormat"), + dates = inst.lastVal = inst.input ? inst.input.val() : null, + defaultDate = this._getDefaultDate(inst), + date = defaultDate, + settings = this._getFormatConfig(inst); + + try { + date = this.parseDate(dateFormat, dates, settings) || defaultDate; + } catch (event) { + dates = (noDefault ? "" : dates); + } + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + inst.currentDay = (dates ? date.getDate() : 0); + inst.currentMonth = (dates ? date.getMonth() : 0); + inst.currentYear = (dates ? date.getFullYear() : 0); + this._adjustInstDate(inst); + }, + + /* Retrieve the default date shown on opening. */ + _getDefaultDate: function(inst) { + return this._restrictMinMax(inst, + this._determineDate(inst, this._get(inst, "defaultDate"), new Date())); + }, + + /* A date may be specified as an exact value or a relative one. */ + _determineDate: function(inst, date, defaultDate) { + var offsetNumeric = function(offset) { + var date = new Date(); + date.setDate(date.getDate() + offset); + return date; + }, + offsetString = function(offset) { + try { + return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), + offset, $.datepicker._getFormatConfig(inst)); + } + catch (e) { + // Ignore + } + + var date = (offset.toLowerCase().match(/^c/) ? + $.datepicker._getDate(inst) : null) || new Date(), + year = date.getFullYear(), + month = date.getMonth(), + day = date.getDate(), + pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, + matches = pattern.exec(offset); + + while (matches) { + switch (matches[2] || "d") { + case "d" : case "D" : + day += parseInt(matches[1],10); break; + case "w" : case "W" : + day += parseInt(matches[1],10) * 7; break; + case "m" : case "M" : + month += parseInt(matches[1],10); + day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); + break; + case "y": case "Y" : + year += parseInt(matches[1],10); + day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); + break; + } + matches = pattern.exec(offset); + } + return new Date(year, month, day); + }, + newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) : + (typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime())))); + + newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate); + if (newDate) { + newDate.setHours(0); + newDate.setMinutes(0); + newDate.setSeconds(0); + newDate.setMilliseconds(0); + } + return this._daylightSavingAdjust(newDate); + }, + + /* Handle switch to/from daylight saving. + * Hours may be non-zero on daylight saving cut-over: + * > 12 when midnight changeover, but then cannot generate + * midnight datetime, so jump to 1AM, otherwise reset. + * @param date (Date) the date to check + * @return (Date) the corrected date + */ + _daylightSavingAdjust: function(date) { + if (!date) { + return null; + } + date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0); + return date; + }, + + /* Set the date(s) directly. */ + _setDate: function(inst, date, noChange) { + var clear = !date, + origMonth = inst.selectedMonth, + origYear = inst.selectedYear, + newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date())); + + inst.selectedDay = inst.currentDay = newDate.getDate(); + inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth(); + inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear(); + if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) { + this._notifyChange(inst); + } + this._adjustInstDate(inst); + if (inst.input) { + inst.input.val(clear ? "" : this._formatDate(inst)); + } + }, + + /* Retrieve the date(s) directly. */ + _getDate: function(inst) { + var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null : + this._daylightSavingAdjust(new Date( + inst.currentYear, inst.currentMonth, inst.currentDay))); + return startDate; + }, + + /* Attach the onxxx handlers. These are declared statically so + * they work with static code transformers like Caja. + */ + _attachHandlers: function(inst) { + var stepMonths = this._get(inst, "stepMonths"), + id = "#" + inst.id.replace( /\\\\/g, "\\" ); + inst.dpDiv.find("[data-handler]").map(function () { + var handler = { + prev: function () { + $.datepicker._adjustDate(id, -stepMonths, "M"); + }, + next: function () { + $.datepicker._adjustDate(id, +stepMonths, "M"); + }, + hide: function () { + $.datepicker._hideDatepicker(); + }, + today: function () { + $.datepicker._gotoToday(id); + }, + selectDay: function () { + $.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this); + return false; + }, + selectMonth: function () { + $.datepicker._selectMonthYear(id, this, "M"); + return false; + }, + selectYear: function () { + $.datepicker._selectMonthYear(id, this, "Y"); + return false; + } + }; + $(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]); + }); + }, + + /* Generate the HTML for the current state of the date picker. */ + _generateHTML: function(inst) { + var maxDraw, prevText, prev, nextText, next, currentText, gotoDate, + controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin, + monthNames, monthNamesShort, beforeShowDay, showOtherMonths, + selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate, + cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows, + printDate, dRow, tbody, daySettings, otherMonth, unselectable, + tempDate = new Date(), + today = this._daylightSavingAdjust( + new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time + isRTL = this._get(inst, "isRTL"), + showButtonPanel = this._get(inst, "showButtonPanel"), + hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"), + navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"), + numMonths = this._getNumberOfMonths(inst), + showCurrentAtPos = this._get(inst, "showCurrentAtPos"), + stepMonths = this._get(inst, "stepMonths"), + isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1), + currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) : + new Date(inst.currentYear, inst.currentMonth, inst.currentDay))), + minDate = this._getMinMaxDate(inst, "min"), + maxDate = this._getMinMaxDate(inst, "max"), + drawMonth = inst.drawMonth - showCurrentAtPos, + drawYear = inst.drawYear; + + if (drawMonth < 0) { + drawMonth += 12; + drawYear--; + } + if (maxDate) { + maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(), + maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate())); + maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw); + while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) { + drawMonth--; + if (drawMonth < 0) { + drawMonth = 11; + drawYear--; + } + } + } + inst.drawMonth = drawMonth; + inst.drawYear = drawYear; + + prevText = this._get(inst, "prevText"); + prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText, + this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)), + this._getFormatConfig(inst))); + + prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ? + "" + prevText + "" : + (hideIfNoPrevNext ? "" : "" + prevText + "")); + + nextText = this._get(inst, "nextText"); + nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText, + this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)), + this._getFormatConfig(inst))); + + next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ? + "" + nextText + "" : + (hideIfNoPrevNext ? "" : "" + nextText + "")); + + currentText = this._get(inst, "currentText"); + gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today); + currentText = (!navigationAsDateFormat ? currentText : + this.formatDate(currentText, gotoDate, this._getFormatConfig(inst))); + + controls = (!inst.inline ? "" : ""); + + buttonPanel = (showButtonPanel) ? "
      " + (isRTL ? controls : "") + + (this._isInRange(inst, gotoDate) ? "" : "") + (isRTL ? "" : controls) + "
      " : ""; + + firstDay = parseInt(this._get(inst, "firstDay"),10); + firstDay = (isNaN(firstDay) ? 0 : firstDay); + + showWeek = this._get(inst, "showWeek"); + dayNames = this._get(inst, "dayNames"); + dayNamesMin = this._get(inst, "dayNamesMin"); + monthNames = this._get(inst, "monthNames"); + monthNamesShort = this._get(inst, "monthNamesShort"); + beforeShowDay = this._get(inst, "beforeShowDay"); + showOtherMonths = this._get(inst, "showOtherMonths"); + selectOtherMonths = this._get(inst, "selectOtherMonths"); + defaultDate = this._getDefaultDate(inst); + html = ""; + dow; + for (row = 0; row < numMonths[0]; row++) { + group = ""; + this.maxRows = 4; + for (col = 0; col < numMonths[1]; col++) { + selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay)); + cornerClass = " ui-corner-all"; + calender = ""; + if (isMultiMonth) { + calender += "
      "; + } + calender += "
      " + + (/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") + + (/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") + + this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate, + row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers + "
      " + + ""; + thead = (showWeek ? "" : ""); + for (dow = 0; dow < 7; dow++) { // days of the week + day = (dow + firstDay) % 7; + thead += ""; + } + calender += thead + ""; + daysInMonth = this._getDaysInMonth(drawYear, drawMonth); + if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) { + inst.selectedDay = Math.min(inst.selectedDay, daysInMonth); + } + leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7; + curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate + numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043) + this.maxRows = numRows; + printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays)); + for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows + calender += ""; + tbody = (!showWeek ? "" : ""); + for (dow = 0; dow < 7; dow++) { // create date picker days + daySettings = (beforeShowDay ? + beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]); + otherMonth = (printDate.getMonth() !== drawMonth); + unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] || + (minDate && printDate < minDate) || (maxDate && printDate > maxDate); + tbody += ""; // display selectable date + printDate.setDate(printDate.getDate() + 1); + printDate = this._daylightSavingAdjust(printDate); + } + calender += tbody + ""; + } + drawMonth++; + if (drawMonth > 11) { + drawMonth = 0; + drawYear++; + } + calender += "
      " + this._get(inst, "weekHeader") + "= 5 ? " class='ui-datepicker-week-end'" : "") + ">" + + "" + dayNamesMin[day] + "
      " + + this._get(inst, "calculateWeek")(printDate) + "" + // actions + (otherMonth && !showOtherMonths ? " " : // display for other months + (unselectable ? "" + printDate.getDate() + "" : "" + printDate.getDate() + "")) + "
      " + (isMultiMonth ? "
      " + + ((numMonths[0] > 0 && col === numMonths[1]-1) ? "
      " : "") : ""); + group += calender; + } + html += group; + } + html += buttonPanel; + inst._keyEvent = false; + return html; + }, + + /* Generate the month and year header. */ + _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, + secondary, monthNames, monthNamesShort) { + + var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear, + changeMonth = this._get(inst, "changeMonth"), + changeYear = this._get(inst, "changeYear"), + showMonthAfterYear = this._get(inst, "showMonthAfterYear"), + html = "
      ", + monthHtml = ""; + + // month selection + if (secondary || !changeMonth) { + monthHtml += "" + monthNames[drawMonth] + ""; + } else { + inMinYear = (minDate && minDate.getFullYear() === drawYear); + inMaxYear = (maxDate && maxDate.getFullYear() === drawYear); + monthHtml += ""; + } + + if (!showMonthAfterYear) { + html += monthHtml + (secondary || !(changeMonth && changeYear) ? " " : ""); + } + + // year selection + if ( !inst.yearshtml ) { + inst.yearshtml = ""; + if (secondary || !changeYear) { + html += "" + drawYear + ""; + } else { + // determine range of years to display + years = this._get(inst, "yearRange").split(":"); + thisYear = new Date().getFullYear(); + determineYear = function(value) { + var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) : + (value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) : + parseInt(value, 10))); + return (isNaN(year) ? thisYear : year); + }; + year = determineYear(years[0]); + endYear = Math.max(year, determineYear(years[1] || "")); + year = (minDate ? Math.max(year, minDate.getFullYear()) : year); + endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); + inst.yearshtml += ""; + + html += inst.yearshtml; + inst.yearshtml = null; + } + } + + html += this._get(inst, "yearSuffix"); + if (showMonthAfterYear) { + html += (secondary || !(changeMonth && changeYear) ? " " : "") + monthHtml; + } + html += "
      "; // Close datepicker_header + return html; + }, + + /* Adjust one of the date sub-fields. */ + _adjustInstDate: function(inst, offset, period) { + var year = inst.drawYear + (period === "Y" ? offset : 0), + month = inst.drawMonth + (period === "M" ? offset : 0), + day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0), + date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day))); + + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + if (period === "M" || period === "Y") { + this._notifyChange(inst); + } + }, + + /* Ensure a date is within any min/max bounds. */ + _restrictMinMax: function(inst, date) { + var minDate = this._getMinMaxDate(inst, "min"), + maxDate = this._getMinMaxDate(inst, "max"), + newDate = (minDate && date < minDate ? minDate : date); + return (maxDate && newDate > maxDate ? maxDate : newDate); + }, + + /* Notify change of month/year. */ + _notifyChange: function(inst) { + var onChange = this._get(inst, "onChangeMonthYear"); + if (onChange) { + onChange.apply((inst.input ? inst.input[0] : null), + [inst.selectedYear, inst.selectedMonth + 1, inst]); + } + }, + + /* Determine the number of months to show. */ + _getNumberOfMonths: function(inst) { + var numMonths = this._get(inst, "numberOfMonths"); + return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths)); + }, + + /* Determine the current maximum date - ensure no time components are set. */ + _getMinMaxDate: function(inst, minMax) { + return this._determineDate(inst, this._get(inst, minMax + "Date"), null); + }, + + /* Find the number of days in a given month. */ + _getDaysInMonth: function(year, month) { + return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); + }, + + /* Find the day of the week of the first of a month. */ + _getFirstDayOfMonth: function(year, month) { + return new Date(year, month, 1).getDay(); + }, + + /* Determines if we should allow a "next/prev" month display change. */ + _canAdjustMonth: function(inst, offset, curYear, curMonth) { + var numMonths = this._getNumberOfMonths(inst), + date = this._daylightSavingAdjust(new Date(curYear, + curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1)); + + if (offset < 0) { + date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); + } + return this._isInRange(inst, date); + }, + + /* Is the given date in the accepted range? */ + _isInRange: function(inst, date) { + var yearSplit, currentYear, + minDate = this._getMinMaxDate(inst, "min"), + maxDate = this._getMinMaxDate(inst, "max"), + minYear = null, + maxYear = null, + years = this._get(inst, "yearRange"); + if (years){ + yearSplit = years.split(":"); + currentYear = new Date().getFullYear(); + minYear = parseInt(yearSplit[0], 10); + maxYear = parseInt(yearSplit[1], 10); + if ( yearSplit[0].match(/[+\-].*/) ) { + minYear += currentYear; + } + if ( yearSplit[1].match(/[+\-].*/) ) { + maxYear += currentYear; + } + } + + return ((!minDate || date.getTime() >= minDate.getTime()) && + (!maxDate || date.getTime() <= maxDate.getTime()) && + (!minYear || date.getFullYear() >= minYear) && + (!maxYear || date.getFullYear() <= maxYear)); + }, + + /* Provide the configuration settings for formatting/parsing. */ + _getFormatConfig: function(inst) { + var shortYearCutoff = this._get(inst, "shortYearCutoff"); + shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff : + new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); + return {shortYearCutoff: shortYearCutoff, + dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"), + monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")}; + }, + + /* Format the given date for display. */ + _formatDate: function(inst, day, month, year) { + if (!day) { + inst.currentDay = inst.selectedDay; + inst.currentMonth = inst.selectedMonth; + inst.currentYear = inst.selectedYear; + } + var date = (day ? (typeof day === "object" ? day : + this._daylightSavingAdjust(new Date(year, month, day))) : + this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); + return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst)); + } +}); + +/* + * Bind hover events for datepicker elements. + * Done via delegate so the binding only occurs once in the lifetime of the parent div. + * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. + */ +function datepicker_bindHover(dpDiv) { + var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; + return dpDiv.delegate(selector, "mouseout", function() { + $(this).removeClass("ui-state-hover"); + if (this.className.indexOf("ui-datepicker-prev") !== -1) { + $(this).removeClass("ui-datepicker-prev-hover"); + } + if (this.className.indexOf("ui-datepicker-next") !== -1) { + $(this).removeClass("ui-datepicker-next-hover"); + } + }) + .delegate( selector, "mouseover", datepicker_handleMouseover ); +} + +function datepicker_handleMouseover() { + if (!$.datepicker._isDisabledDatepicker( datepicker_instActive.inline? datepicker_instActive.dpDiv.parent()[0] : datepicker_instActive.input[0])) { + $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); + $(this).addClass("ui-state-hover"); + if (this.className.indexOf("ui-datepicker-prev") !== -1) { + $(this).addClass("ui-datepicker-prev-hover"); + } + if (this.className.indexOf("ui-datepicker-next") !== -1) { + $(this).addClass("ui-datepicker-next-hover"); + } + } +} + +/* jQuery extend now ignores nulls! */ +function datepicker_extendRemove(target, props) { + $.extend(target, props); + for (var name in props) { + if (props[name] == null) { + target[name] = props[name]; + } + } + return target; +} + +/* Invoke the datepicker functionality. + @param options string - a command, optionally followed by additional parameters or + Object - settings for attaching new datepicker functionality + @return jQuery object */ +$.fn.datepicker = function(options){ + + /* Verify an empty collection wasn't passed - Fixes #6976 */ + if ( !this.length ) { + return this; + } + + /* Initialise the date picker. */ + if (!$.datepicker.initialized) { + $(document).mousedown($.datepicker._checkExternalClick); + $.datepicker.initialized = true; + } + + /* Append datepicker main container to body if not exist. */ + if ($("#"+$.datepicker._mainDivId).length === 0) { + $("body").append($.datepicker.dpDiv); + } + + var otherArgs = Array.prototype.slice.call(arguments, 1); + if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) { + return $.datepicker["_" + options + "Datepicker"]. + apply($.datepicker, [this[0]].concat(otherArgs)); + } + if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") { + return $.datepicker["_" + options + "Datepicker"]. + apply($.datepicker, [this[0]].concat(otherArgs)); + } + return this.each(function() { + typeof options === "string" ? + $.datepicker["_" + options + "Datepicker"]. + apply($.datepicker, [this].concat(otherArgs)) : + $.datepicker._attachDatepicker(this, options); + }); +}; + +$.datepicker = new Datepicker(); // singleton instance +$.datepicker.initialized = false; +$.datepicker.uuid = new Date().getTime(); +$.datepicker.version = "1.11.4"; + +var datepicker = $.datepicker; + + +/*! + * jQuery UI Draggable 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/draggable/ + */ + + +$.widget("ui.draggable", $.ui.mouse, { + version: "1.11.4", + widgetEventPrefix: "drag", + options: { + addClasses: true, + appendTo: "parent", + axis: false, + connectToSortable: false, + containment: false, + cursor: "auto", + cursorAt: false, + 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, + + // callbacks + drag: null, + start: null, + stop: null + }, + _create: function() { + + if ( this.options.helper === "original" ) { + this._setPositionRelative(); + } + if (this.options.addClasses){ + this.element.addClass("ui-draggable"); + } + if (this.options.disabled){ + this.element.addClass("ui-draggable-disabled"); + } + this._setHandleClassName(); + + this._mouseInit(); + }, + + _setOption: function( key, value ) { + this._super( key, value ); + if ( key === "handle" ) { + this._removeHandleClassName(); + this._setHandleClassName(); + } + }, + + _destroy: function() { + if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) { + this.destroyOnClear = true; + return; + } + this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" ); + this._removeHandleClassName(); + this._mouseDestroy(); + }, + + _mouseCapture: function(event) { + var o = this.options; + + this._blurActiveElement( event ); + + // among others, prevent a drag on a resizable-handle + if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) { + return false; + } + + //Quit if we're not on a valid handle + this.handle = this._getHandle(event); + if (!this.handle) { + return false; + } + + this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix ); + + return true; + + }, + + _blockFrames: function( selector ) { + this.iframeBlocks = this.document.find( selector ).map(function() { + var iframe = $( this ); + + return $( "
      " ) + .css( "position", "absolute" ) + .appendTo( iframe.parent() ) + .outerWidth( iframe.outerWidth() ) + .outerHeight( iframe.outerHeight() ) + .offset( iframe.offset() )[ 0 ]; + }); + }, + + _unblockFrames: function() { + if ( this.iframeBlocks ) { + this.iframeBlocks.remove(); + delete this.iframeBlocks; + } + }, + + _blurActiveElement: function( event ) { + var document = this.document[ 0 ]; + + // Only need to blur if the event occurred on the draggable itself, see #10527 + if ( !this.handleElement.is( event.target ) ) { + return; + } + + // support: IE9 + // IE9 throws an "Unspecified error" accessing document.activeElement from an