From 2c082b5b9c94159afccc9c85341d4f39b4ffefa9 Mon Sep 17 00:00:00 2001 From: Taiwo Ladipo Date: Wed, 3 Oct 2018 12:58:24 +0100 Subject: [PATCH] (Assets): Remove common assets, use assets from `cricket-base` --- composer.json | 110 +- composer.lock | 73 +- gulpfile-config.js | 44 + gulpfile.js | 215 +++ package.json | 39 + src/asset-files/css/reports.css | 1261 ----------------- src/asset-files/css/styles.css | 8 + .../datepicker/bootstrap-datepicker.min.js | 8 - .../bootstrap-datepicker3.standalone.min.css | 7 - .../{ => js}/widgets/report-filter-form.js | 0 src/asset-files/less/filter-form.less | 8 + src/asset-files/less/styles.less | 1 + .../bootstrap-validator/dist/validator.js | 394 ----- .../bootstrap-validator/dist/validator.min.js | 9 - src/assets/DatePickerAsset.php | 24 - src/assets/ReportsAsset.php | 19 + src/assets/SQLReportErrorAsset.php | 4 +- src/assets/SQLReportFilterFormAsset.php | 11 +- src/generators/SQLReportFilterFactory.php | 12 +- src/views/default/error.php | 2 +- src/views/default/exception.php | 4 +- src/views/default/view.php | 2 +- 22 files changed, 481 insertions(+), 1774 deletions(-) create mode 100644 gulpfile-config.js create mode 100644 gulpfile.js create mode 100644 package.json delete mode 100644 src/asset-files/css/reports.css create mode 100644 src/asset-files/css/styles.css delete mode 100644 src/asset-files/datepicker/bootstrap-datepicker.min.js delete mode 100644 src/asset-files/datepicker/bootstrap-datepicker3.standalone.min.css rename src/asset-files/{ => js}/widgets/report-filter-form.js (100%) create mode 100644 src/asset-files/less/filter-form.less create mode 100644 src/asset-files/less/styles.less delete mode 100755 src/asset-files/plugins/bootstrap-validator/dist/validator.js delete mode 100755 src/asset-files/plugins/bootstrap-validator/dist/validator.min.js delete mode 100644 src/assets/DatePickerAsset.php create mode 100644 src/assets/ReportsAsset.php diff --git a/composer.json b/composer.json index 788caa6..a84fa9c 100644 --- a/composer.json +++ b/composer.json @@ -1,61 +1,61 @@ { - "name": "cottacush/cricket-reports", - "description": "Cricket Report Module", - "keywords": [ - "yii2", - "framework", - "basic", - "report template", - "admin portal" - ], - "homepage": "https://github.com/cottacush/cricket-reports", - "type": "library", - "license": "MIT", - "minimum-stability": "stable", - "require": { - "cottacush/yii2-widgets": "^1.0", - "hashids/hashids": "^1.0", - "yii2tech/csv-grid": "^1.0", - "kartik-v/yii2-widget-select2": "v2.1.1" + "name": "cottacush/cricket-reports", + "description": "Cricket Report Module", + "keywords": [ + "yii2", + "framework", + "basic", + "report template", + "admin portal" + ], + "homepage": "https://github.com/cottacush/cricket-reports", + "type": "library", + "license": "MIT", + "minimum-stability": "stable", + "require": { + "hashids/hashids": "^1.0", + "yii2tech/csv-grid": "^1.0", + "kartik-v/yii2-widget-select2": "v2.1.1", + "cottacush/cricket-base": "^0.5.0" + }, + "authors": [ + { + "name": "Cotta & Cush Developers", + "email": "developers@cottacush.com", + "homepage": "http://cottacush.com", + "role": "Developer" }, - "authors": [ - { - "name": "Cotta & Cush Developers", - "email": "developers@cottacush.com", - "homepage": "http://cottacush.com", - "role": "Developer" - }, - { - "name": "Taiwo Ladipo", - "email": "taiwo.ladipo@cottacush.com", - "role": "Software Engineer" - }, - { - "name": "Olawale Lawal", - "email": "wale@cottacush.com", - "role": "Software Engineer" - } - ], - "require-dev": { - "phpunit/phpunit": "~4.0||~5.0", - "scrutinizer/ocular": "~1.1", - "squizlabs/php_codesniffer": "~2.3" + { + "name": "Taiwo Ladipo", + "email": "taiwo.ladipo@cottacush.com", + "role": "Software Engineer" }, - "autoload": { - "psr-4": { - "CottaCush\\Cricket\\Report\\": "src" - } - }, - "scripts": { - "test": "phpunit" + { + "name": "Olawale Lawal", + "email": "wale@cottacush.com", + "role": "Software Engineer" + } + ], + "require-dev": { + "phpunit/phpunit": "~4.0||~5.0", + "scrutinizer/ocular": "~1.1", + "squizlabs/php_codesniffer": "~2.3" + }, + "autoload": { + "psr-4": { + "CottaCush\\Cricket\\Report\\": "src" + } + }, + "scripts": { + "test": "phpunit" + }, + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" }, - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, - "asset-installer-paths": { - "npm-asset-library": "vendor/npm", - "bower-asset-library": "vendor/bower" - } + "asset-installer-paths": { + "npm-asset-library": "vendor/npm", + "bower-asset-library": "vendor/bower" } + } } diff --git a/composer.lock b/composer.lock index 1ac2cb3..7c296d6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8a76f78572931a2d6ad4f82a86507110", + "content-hash": "9ba1c86d8735ed32962cdfa1db0a5ab8", "packages": [ { "name": "bower-asset/bootstrap", @@ -368,6 +368,77 @@ ], "time": "2017-07-16T21:13:23+00:00" }, + { + "name": "cottacush/cricket-base", + "version": "v0.4", + "source": { + "type": "git", + "url": "https://github.com/CottaCush/cricket-base.git", + "reference": "cf65ef6f1cc089c1a926fe2abbe5ebd52018bdbf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CottaCush/cricket-base/zipball/cf65ef6f1cc089c1a926fe2abbe5ebd52018bdbf", + "reference": "cf65ef6f1cc089c1a926fe2abbe5ebd52018bdbf", + "shasum": "" + }, + "require": { + "cottacush/yii2-widgets": "^1.0", + "hashids/hashids": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0||~5.0", + "scrutinizer/ocular": "~1.1", + "squizlabs/php_codesniffer": "~2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "asset-installer-paths": { + "npm-asset-library": "vendor/npm", + "bower-asset-library": "vendor/bower" + } + }, + "autoload": { + "psr-4": { + "CottaCush\\Cricket\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cotta & Cush Developers", + "email": "developers@cottacush.com", + "homepage": "http://cottacush.com", + "role": "Developer" + }, + { + "name": "Taiwo Ladipo", + "email": "taiwo.ladipo@cottacush.com", + "role": "Software Engineer" + }, + { + "name": "Olawale Lawal", + "email": "wale@cottacush.com", + "role": "Software Engineer" + } + ], + "description": "Cricket Base Module", + "homepage": "https://github.com/cottacush/cricket-base", + "keywords": [ + "admin portal", + "basic", + "framework", + "report template", + "yii2" + ], + "time": "2018-09-27T13:04:33+00:00" + }, { "name": "cottacush/yii2-widgets", "version": "v1.2.3", diff --git a/gulpfile-config.js b/gulpfile-config.js new file mode 100644 index 0000000..d0ce68a --- /dev/null +++ b/gulpfile-config.js @@ -0,0 +1,44 @@ +/* Import Node.js modules */ +var environments = require('gulp-environments'), + autoprefixer = require('autoprefixer'); + + +var config = { + sourceDir: "./src/asset-files/", + buildDir: "./src/asset-files/", + styles: { + lessDir: "./src/asset-files/less", + lessFiles: ['./src/asset-files/less/styles.less'], + scssDir: "./src/asset-files/scss/", + scssFiles: "./src/asset-files/scss/**/*.scss", + destinationDir: "./src/asset-files/css", + mapsDir: "./maps", // relative to the destination directory + postcss: [ + autoprefixer({browsers: ["last 5 versions", "> .5% in NG", "not ie < 11"]}) + ] + }, + scripts: { + sourceDir: "./src/asset-files/js", + sourceFiles: ["./src/asset-files/js/**/*.js"], + destinationDir: "./src/asset-files/js" + }, + images: { + sourceDir: "./src/asset-files/img", + sourceFiles: "./src/asset-files/img/**/*", + destinationDir: "./src/asset-files/img" + }, + publicAssets: { + sourceDir: "", + sourceFiles: [], + destinationDir: "" + }, +}; + +/* Add sourcemaps on all environments except production */ +config.sourcemaps = !(environments.production()); + +/* Minify build files on all environments except development */ +config.minify = !(environments.development()); + + +module.exports = config; diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..2e9282a --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,215 @@ +/* Import our Node.js modules */ +const gulp = require('gulp'), + cssmin = require('gulp-cssmin'), + environments = require('gulp-environments'), + gulpif = require('gulp-if'), + imagemin = require('gulp-imagemin'), + less = require('gulp-less'), + sass = require('gulp-sass'), + postcss = require('gulp-postcss'), + rename = require('gulp-rename'), + rimraf = require('rimraf'), + sourcemaps = require('gulp-sourcemaps'), + path = require('path'), + config = require('./gulpfile-config'); + + +/* Declare our environments */ +const development = environments.development, + local = environments.make('local'), + develop = environments.make('develop'), + staging = environments.make('staging'), + production = environments.production; + +// re-set `local` environment to `development` +if (local()) { + environments.current(development); +} + +/* Set gulp.series and gulp.parallel to constants for convenience sake */ +const series = gulp.series, + parallel = gulp.parallel; + +/* Extract some config properties for convenience */ +const shouldAddSourcemaps = config.sourcemaps, + shouldMinify = config.minify; + +gulp.task('clean', function () { + return cleanStyles(); +}); + +/* Declare our gulp tasks */ +gulp.task('build', series(cleanStyles, series(series(lessStyles, scssStyles), minifyStyles))); +gulp.task('default', series('build', watch)); + +/* Describe our gulp tasks */ +gulp.task('build').description = 'Cleans the styles folder then compile styles, minify images'; +gulp.task('default').description = 'Run the build task and watch for any changes'; + + +function cleanStyles(done) { + rimraf(config.styles.destinationDir, done); +} +cleanStyles.description = 'Cleans the styles folder'; + +function lessStyles() { + let sConfig = config.styles, + files = sConfig.lessFiles, + source = sConfig.lessDir, + dest = sConfig.destinationDir, + mapsDir = sConfig.mapsDir, + postcssConfig = sConfig.postcss; + + return compileLess(source, dest, files, mapsDir, postcssConfig); +} +lessStyles.description = 'Compiles Less files to CSS; adds source maps if specified'; + +function scssStyles() { + let sConfig = config.styles, + files = sConfig.scssFiles, + source = sConfig.scssDir, + dest = sConfig.destinationDir, + mapsDir = sConfig.mapsDir, + postcssConfig = sConfig.postcss; + + return compileSass(source, dest, files, mapsDir, postcssConfig) +} +scssStyles.description = 'Compiles Sass files to CSS; adds source maps if specified'; + + +function minifyStyles(done) { + if (shouldMinify) { + let dir = config.styles.destinationDir; + return minifyCSS(dir, dir, false); + } + done(); +} +minifyStyles.description = 'Minify CSS files'; + +function publicAssets() { + let aConfig = config.publicAssets, + files = aConfig.sourceFiles, + dest = aConfig.destinationDir; + + return copy(files, dest); +} +publicAssets.description = 'Copy public assets from the app into the build folder'; + + +function images() { + let iConfig = config.images, + sourceDir = iConfig.sourceDir, + destDir = iConfig.destinationDir; + + return minifyImages(sourceDir, destDir); +} +images.description = 'Minify images back into the same (source) folder'; + + +function watch(done) { + if (development()) { + gulp.watch(path.join(config.styles.lessDir, '**/*.less'), lessStyles); + gulp.watch(config.images.sourceFiles).on('add', images); + gulp.watch(config.publicAssets.sourceFiles, publicAssets); + } + done(); +} +watch.description = 'Watch relevant files and re-run their tasks (only in development environment)'; + + +/** + * Generic function to compile LESS files + * @param {String} sourceDir a string representing the path to the directory for the LESS files + * @param {String} destDir a string representing the path to the directory where the compiled files would be saved + * @param {String|Array} files string or array of strings representing the glob match for the source files + * @param {String} mapsDir the directory where sourcemaps would be stored (relative to the destination directory) + * @param {Array} postcssConfig an array of postcss processors + * @returns {*} the gulp stream + */ +function compileLess(sourceDir, destDir, files, mapsDir, postcssConfig) { + return compileStyles(sourceDir, destDir, files, mapsDir, less, postcssConfig); +} + +/** + * Generic function to compile Sass files + * @param {String} sourceDir a string representing the path to the directory for the Sass files + * @param {String} destDir a string representing the path to the directory where the compiled files would be saved + * @param {String|Array} files string or array of strings representing the glob match for the source files + * @param {String} mapsDir the directory where sourcemaps would be stored (relative to the destination directory) + * @param {Array} postcssConfig an array of postcss processors + * @returns {*} the gulp stream + */ +function compileSass(sourceDir, destDir, files, mapsDir, postcssConfig) { + return compileStyles(sourceDir, destDir, files, mapsDir, function () { + return sass().on('error', sass.logError); + }, postcssConfig); +} + +/** + * A generic function to compile both LESS and Sass files + * @param {String} sourceDir a string representing the path to the directory for the source files + * @param {String} destDir a string representing the path to the directory where the compiled files would be saved + * @param {String|Array} files string or array of strings representing the glob match for the source files + * @param {String} mapsDir the directory where sourcemaps would be stored (relative to the destination directory) + * @param {Function} buildFxn the build function to use. could be less or sass functions + * @param {Array} postcssConfig an array of postcss processors + */ +function compileStyles(sourceDir, destDir, files, mapsDir, buildFxn, postcssConfig) { + return gulp.src(files, {base: sourceDir}) + .pipe(gulpif(shouldAddSourcemaps, sourcemaps.init())) + .pipe(buildFxn()) + .pipe(postcss(postcssConfig)) + .pipe(gulpif(shouldAddSourcemaps, sourcemaps.write(mapsDir))) + .pipe(gulp.dest(destDir)); +} + +/** + * A generic function to copy files/directories to a different directory + * @param {String|Array} source a string or array of string representing the glob match for the source files/folders + * @param {String} destination the new directory to copy + */ +function copy(source, destination) { + return gulp.src(source) + .pipe(gulp.dest(destination)); +} + + +/** + * Generic function to minify CSS files + * @param {string} sourceDir a string representing the path to the directory for the source files + * @param {string} destDir a string representing the path to the directory where the minified files would be saved + * @param {boolean} shouldRename determine whether the new file should be renamed or not + * @returns {*} the gulp stream + */ +function minifyCSS(sourceDir, destDir, shouldRename) { + let files = [path.join(sourceDir, '**/*.css'), path.join('!' + sourceDir, '**/*.min.css')]; + return minify(files, destDir, cssmin, shouldRename); +} + +/** + * A generic function to minify images + * @param {string} sourceDir a string representing the path to the directory for the source files + * @param {string} destDir a string representing the path to the directory where the minified files would be saved + * @returns {*} the gulp stream + */ +function minifyImages(sourceDir, destDir) { + let files = path.join(sourceDir, '**/*'); + return minify(files, destDir, imagemin, false); +} + +/** + * A generic function to minify different types of files + * @param {string|array} source a string or array of strings representing the glob match for the source files/folders + * @param {string} destDir a string representing the path to the directory where the minified files would be saved + * @param {function} minifyFxn the minify function to use + * @param {boolean} shouldRename determine whether the new file should be renamed or not + */ +function minify(source, destDir, minifyFxn, shouldRename) { + if ('undefined' === typeof shouldRename) { + shouldRename = true; + } + return gulp.src(source) + .pipe(minifyFxn()) + .pipe(gulpif((shouldRename), rename({suffix: '.min'}))) + .pipe(gulp.dest(destDir)); +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..a4d22cb --- /dev/null +++ b/package.json @@ -0,0 +1,39 @@ +{ + "name": "cricket-reports", + "version": "1.0.0", + "description": "cricket reports", + "main": "", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/CottaCush/cricket-reports.git" + }, + "keywords": [ + "cricket", + "reports", + "reporting" + ], + "author": "Developers@cottacush.com ", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/CottaCush/cricket-reports/issues" + }, + "homepage": "https://github.com/CottaCush/cricket-reports#readme", + "dependencies": { + "autoprefixer": "^9.1.5", + "gulp": "github:gulpjs/gulp#4.0", + "gulp-cssmin": "^0.2.0", + "gulp-environments": "^0.1.2", + "gulp-if": "^2.0.2", + "gulp-imagemin": "^4.1.0", + "gulp-less": "^4.0.1", + "gulp-postcss": "^8.0.0", + "gulp-rename": "^1.4.0", + "gulp-sass": "^4.0.1", + "gulp-sourcemaps": "^2.6.4", + "path": "^0.12.7", + "rimraf": "^2.6.2" + } +} diff --git a/src/asset-files/css/reports.css b/src/asset-files/css/reports.css deleted file mode 100644 index 7c64e2c..0000000 --- a/src/asset-files/css/reports.css +++ /dev/null @@ -1,1261 +0,0 @@ -.reports-wrapper .form-control { - box-shadow: none; -} - -.reports-wrapper .form-control.auto-height { - height: auto; -} - -.reports-wrapper .form-control:focus { - box-shadow: none; -} - -.reports-wrapper .form-control::-moz-placeholder, -.reports-wrapper .form-control:-ms-input-placeholder, -.reports-wrapper .form-control::-webkit-input-placeholder { - color: #bbb; - opacity: 1; -} - -.reports-wrapper .form-control:not(select) { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; -} - -.reports-wrapper .modal-open .modal { - overflow-x: hidden; - overflow-y: auto; -} - -.reports-wrapper .modal-dialog { - position: relative; - width: auto; - margin: 10px; -} - -.reports-wrapper .modal-content { - border: 0; -} - -.reports-wrapper .modal-content .row { - padding: 15px 0; -} - -.reports-wrapper .modal-header, -.reports-wrapper .modal-footer { - padding-top: 10px; - padding-bottom: 10px; -} - -.reports-wrapper .modal-header { - border-bottom-color: transparent; -} - -.reports-wrapper .modal-header .close { - margin-top: -5px; - font-size: 35px; - font-weight: 400; -} - -.reports-wrapper .modal-footer .btn + .btn { - margin-bottom: 0; - margin-left: 5px; -} - -.reports-wrapper .modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} - -@media (min-width: 992px) { - .reports-wrapper .modal-lg { - width: 900px; - } -} - -.reports-wrapper .row { - margin-right: -15px; - margin-left: -15px; -} - -.reports-wrapper .col-xs-1, -.reports-wrapper .col-sm-1, -.reports-wrapper .col-md-1, -.reports-wrapper .col-lg-1, -.reports-wrapper .col-xs-2, -.reports-wrapper .col-sm-2, -.reports-wrapper .col-md-2, -.reports-wrapper .col-lg-2, -.reports-wrapper .col-xs-3, -.reports-wrapper .col-sm-3, -.reports-wrapper .col-md-3, -.reports-wrapper .col-lg-3, -.reports-wrapper .col-xs-4, -.reports-wrapper .col-sm-4, -.reports-wrapper .col-md-4, -.reports-wrapper .col-lg-4, -.reports-wrapper .col-xs-5, -.reports-wrapper .col-sm-5, -.reports-wrapper .col-md-5, -.reports-wrapper .col-lg-5, -.reports-wrapper .col-xs-6, -.reports-wrapper .col-sm-6, -.reports-wrapper .col-md-6, -.reports-wrapper .col-lg-6, -.reports-wrapper .col-xs-7, -.reports-wrapper .col-sm-7, -.reports-wrapper .col-md-7, -.reports-wrapper .col-lg-7, -.reports-wrapper .col-xs-8, -.reports-wrapper .col-sm-8, -.reports-wrapper .col-md-8, -.reports-wrapper .col-lg-8, -.reports-wrapper .col-xs-9, -.reports-wrapper .col-sm-9, -.reports-wrapper .col-md-9, -.reports-wrapper .col-lg-9, -.reports-wrapper .col-xs-10, -.reports-wrapper .col-sm-10, -.reports-wrapper .col-md-10, -.reports-wrapper .col-lg-10, -.reports-wrapper .col-xs-11, -.reports-wrapper .col-sm-11, -.reports-wrapper .col-md-11, -.reports-wrapper .col-lg-11, -.reports-wrapper .col-xs-12, -.reports-wrapper .col-sm-12, -.reports-wrapper .col-md-12, -.reports-wrapper .col-lg-12 { - position: relative; - min-height: 1px; - padding-right: 15px; - padding-left: 15px; -} - -.reports-wrapper .col-xs-1, -.reports-wrapper .col-xs-2, -.reports-wrapper .col-xs-3, -.reports-wrapper .col-xs-4, -.reports-wrapper .col-xs-5, -.reports-wrapper .col-xs-6, -.reports-wrapper .col-xs-7, -.reports-wrapper .col-xs-8, -.reports-wrapper .col-xs-9, -.reports-wrapper .col-xs-10, -.reports-wrapper .col-xs-11, -.reports-wrapper .col-xs-12 { - float: left; -} - -.reports-wrapper .col-xs-12 { - width: 100%; -} - -.reports-wrapper .col-xs-11 { - width: 91.66666667%; -} - -.reports-wrapper .col-xs-10 { - width: 83.33333333%; -} - -.reports-wrapper .col-xs-9 { - width: 75%; -} - -.reports-wrapper .col-xs-8 { - width: 66.66666667%; -} - -.reports-wrapper .col-xs-7 { - width: 58.33333333%; -} - -.reports-wrapper .col-xs-6 { - width: 50%; -} - -.reports-wrapper .col-xs-5 { - width: 41.66666667%; -} - -.reports-wrapper .col-xs-4 { - width: 33.33333333%; -} - -.reports-wrapper .col-xs-3 { - width: 25%; -} - -.reports-wrapper .col-xs-2 { - width: 16.66666667%; -} - -.reports-wrapper .col-xs-1 { - width: 8.33333333%; -} - -.reports-wrapper .col-xs-pull-12 { - right: 100%; -} - -.reports-wrapper .col-xs-pull-11 { - right: 91.66666667%; -} - -.reports-wrapper .col-xs-pull-10 { - right: 83.33333333%; -} - -.reports-wrapper .col-xs-pull-9 { - right: 75%; -} - -.reports-wrapper .col-xs-pull-8 { - right: 66.66666667%; -} - -.reports-wrapper .col-xs-pull-7 { - right: 58.33333333%; -} - -.reports-wrapper .col-xs-pull-6 { - right: 50%; -} - -.reports-wrapper .col-xs-pull-5 { - right: 41.66666667%; -} - -.reports-wrapper .col-xs-pull-4 { - right: 33.33333333%; -} - -.reports-wrapper .col-xs-pull-3 { - right: 25%; -} - -.reports-wrapper .col-xs-pull-2 { - right: 16.66666667%; -} - -.reports-wrapper .col-xs-pull-1 { - right: 8.33333333%; -} - -.reports-wrapper .col-xs-pull-0 { - right: auto; -} - -.reports-wrapper .col-xs-push-12 { - left: 100%; -} - -.reports-wrapper .col-xs-push-11 { - left: 91.66666667%; -} - -.reports-wrapper .col-xs-push-10 { - left: 83.33333333%; -} - -.reports-wrapper .col-xs-push-9 { - left: 75%; -} - -.reports-wrapper .col-xs-push-8 { - left: 66.66666667%; -} - -.reports-wrapper .col-xs-push-7 { - left: 58.33333333%; -} - -.reports-wrapper .col-xs-push-6 { - left: 50%; -} - -.reports-wrapper .col-xs-push-5 { - left: 41.66666667%; -} - -.reports-wrapper .col-xs-push-4 { - left: 33.33333333%; -} - -.reports-wrapper .col-xs-push-3 { - left: 25%; -} - -.reports-wrapper .col-xs-push-2 { - left: 16.66666667%; -} - -.reports-wrapper .col-xs-push-1 { - left: 8.33333333%; -} - -.reports-wrapper .col-xs-push-0 { - left: auto; -} - -.reports-wrapper .col-xs-offset-12 { - margin-left: 100%; -} - -.reports-wrapper .col-xs-offset-11 { - margin-left: 91.66666667%; -} - -.reports-wrapper .col-xs-offset-10 { - margin-left: 83.33333333%; -} - -.reports-wrapper .col-xs-offset-9 { - margin-left: 75%; -} - -.reports-wrapper .col-xs-offset-8 { - margin-left: 66.66666667%; -} - -.reports-wrapper .col-xs-offset-7 { - margin-left: 58.33333333%; -} - -.reports-wrapper .col-xs-offset-6 { - margin-left: 50%; -} - -.reports-wrapper .col-xs-offset-5 { - margin-left: 41.66666667%; -} - -.reports-wrapper .col-xs-offset-4 { - margin-left: 33.33333333%; -} - -.reports-wrapper .col-xs-offset-3 { - margin-left: 25%; -} - -.reports-wrapper .col-xs-offset-2 { - margin-left: 16.66666667%; -} - -.reports-wrapper .col-xs-offset-1 { - margin-left: 8.33333333%; -} - -.reports-wrapper .col-xs-offset-0 { - margin-left: 0; -} - -@media (min-width: 768px) { - .reports-wrapper .col-sm-1, - .reports-wrapper .col-sm-2, - .reports-wrapper .col-sm-3, - .reports-wrapper .col-sm-4, - .reports-wrapper .col-sm-5, - .reports-wrapper .col-sm-6, - .reports-wrapper .col-sm-7, - .reports-wrapper .col-sm-8, - .reports-wrapper .col-sm-9, - .reports-wrapper .col-sm-10, - .reports-wrapper .col-sm-11, - .reports-wrapper .col-sm-12 { - float: left; - } - - .reports-wrapper .col-sm-12 { - width: 100%; - } - - .reports-wrapper .col-sm-11 { - width: 91.66666667%; - } - - .reports-wrapper .col-sm-10 { - width: 83.33333333%; - } - - .reports-wrapper .col-sm-9 { - width: 75%; - } - - .reports-wrapper .col-sm-8 { - width: 66.66666667%; - } - - .reports-wrapper .col-sm-7 { - width: 58.33333333%; - } - - .reports-wrapper .col-sm-6 { - width: 50%; - } - - .reports-wrapper .col-sm-5 { - width: 41.66666667%; - } - - .reports-wrapper .col-sm-4 { - width: 33.33333333%; - } - - .reports-wrapper .col-sm-3 { - width: 25%; - } - - .reports-wrapper .col-sm-2 { - width: 16.66666667%; - } - - .reports-wrapper .col-sm-1 { - width: 8.33333333%; - } - - .reports-wrapper .col-sm-pull-12 { - right: 100%; - } - - .reports-wrapper .col-sm-pull-11 { - right: 91.66666667%; - } - - .reports-wrapper .col-sm-pull-10 { - right: 83.33333333%; - } - - .reports-wrapper .col-sm-pull-9 { - right: 75%; - } - - .reports-wrapper .col-sm-pull-8 { - right: 66.66666667%; - } - - .reports-wrapper .col-sm-pull-7 { - right: 58.33333333%; - } - - .reports-wrapper .col-sm-pull-6 { - right: 50%; - } - - .reports-wrapper .col-sm-pull-5 { - right: 41.66666667%; - } - - .reports-wrapper .col-sm-pull-4 { - right: 33.33333333%; - } - - .reports-wrapper .col-sm-pull-3 { - right: 25%; - } - - .reports-wrapper .col-sm-pull-2 { - right: 16.66666667%; - } - - .reports-wrapper .col-sm-pull-1 { - right: 8.33333333%; - } - - .reports-wrapper .col-sm-pull-0 { - right: auto; - } - - .reports-wrapper .col-sm-push-12 { - left: 100%; - } - - .reports-wrapper .col-sm-push-11 { - left: 91.66666667%; - } - - .reports-wrapper .col-sm-push-10 { - left: 83.33333333%; - } - - .reports-wrapper .col-sm-push-9 { - left: 75%; - } - - .reports-wrapper .col-sm-push-8 { - left: 66.66666667%; - } - - .reports-wrapper .col-sm-push-7 { - left: 58.33333333%; - } - - .reports-wrapper .col-sm-push-6 { - left: 50%; - } - - .reports-wrapper .col-sm-push-5 { - left: 41.66666667%; - } - - .reports-wrapper .col-sm-push-4 { - left: 33.33333333%; - } - - .reports-wrapper .col-sm-push-3 { - left: 25%; - } - - .reports-wrapper .col-sm-push-2 { - left: 16.66666667%; - } - - .reports-wrapper .col-sm-push-1 { - left: 8.33333333%; - } - - .reports-wrapper .col-sm-push-0 { - left: auto; - } - - .reports-wrapper .col-sm-offset-12 { - margin-left: 100%; - } - - .reports-wrapper .col-sm-offset-11 { - margin-left: 91.66666667%; - } - - .reports-wrapper .col-sm-offset-10 { - margin-left: 83.33333333%; - } - - .reports-wrapper .col-sm-offset-9 { - margin-left: 75%; - } - - .reports-wrapper .col-sm-offset-8 { - margin-left: 66.66666667%; - } - - .reports-wrapper .col-sm-offset-7 { - margin-left: 58.33333333%; - } - - .reports-wrapper .col-sm-offset-6 { - margin-left: 50%; - } - - .reports-wrapper .col-sm-offset-5 { - margin-left: 41.66666667%; - } - - .reports-wrapper .col-sm-offset-4 { - margin-left: 33.33333333%; - } - - .reports-wrapper .col-sm-offset-3 { - margin-left: 25%; - } - - .reports-wrapper .col-sm-offset-2 { - margin-left: 16.66666667%; - } - - .reports-wrapper .col-sm-offset-1 { - margin-left: 8.33333333%; - } - - .reports-wrapper .col-sm-offset-0 { - margin-left: 0; - } -} - -@media (min-width: 992px) { - .reports-wrapper .col-md-1, - .reports-wrapper .col-md-2, - .reports-wrapper .col-md-3, - .reports-wrapper .col-md-4, - .reports-wrapper .col-md-5, - .reports-wrapper .col-md-6, - .reports-wrapper .col-md-7, - .reports-wrapper .col-md-8, - .reports-wrapper .col-md-9, - .reports-wrapper .col-md-10, - .reports-wrapper .col-md-11, - .reports-wrapper .col-md-12 { - float: left; - } - - .reports-wrapper .col-md-12 { - width: 100%; - } - - .reports-wrapper .col-md-11 { - width: 91.66666667%; - } - - .reports-wrapper .col-md-10 { - width: 83.33333333%; - } - - .reports-wrapper .col-md-9 { - width: 75%; - } - - .reports-wrapper .col-md-8 { - width: 66.66666667%; - } - - .reports-wrapper .col-md-7 { - width: 58.33333333%; - } - - .reports-wrapper .col-md-6 { - width: 50%; - } - - .reports-wrapper .col-md-5 { - width: 41.66666667%; - } - - .reports-wrapper .col-md-4 { - width: 33.33333333%; - } - - .reports-wrapper .col-md-3 { - width: 25%; - } - - .reports-wrapper .col-md-2 { - width: 16.66666667%; - } - - .reports-wrapper .col-md-1 { - width: 8.33333333%; - } - - .reports-wrapper .col-md-pull-12 { - right: 100%; - } - - .reports-wrapper .col-md-pull-11 { - right: 91.66666667%; - } - - .reports-wrapper .col-md-pull-10 { - right: 83.33333333%; - } - - .reports-wrapper .col-md-pull-9 { - right: 75%; - } - - .reports-wrapper .col-md-pull-8 { - right: 66.66666667%; - } - - .reports-wrapper .col-md-pull-7 { - right: 58.33333333%; - } - - .reports-wrapper .col-md-pull-6 { - right: 50%; - } - - .reports-wrapper .col-md-pull-5 { - right: 41.66666667%; - } - - .reports-wrapper .col-md-pull-4 { - right: 33.33333333%; - } - - .reports-wrapper .col-md-pull-3 { - right: 25%; - } - - .reports-wrapper .col-md-pull-2 { - right: 16.66666667%; - } - - .reports-wrapper .col-md-pull-1 { - right: 8.33333333%; - } - - .reports-wrapper .col-md-pull-0 { - right: auto; - } - - .reports-wrapper .col-md-push-12 { - left: 100%; - } - - .reports-wrapper .col-md-push-11 { - left: 91.66666667%; - } - - .reports-wrapper .col-md-push-10 { - left: 83.33333333%; - } - - .reports-wrapper .col-md-push-9 { - left: 75%; - } - - .reports-wrapper .col-md-push-8 { - left: 66.66666667%; - } - - .reports-wrapper .col-md-push-7 { - left: 58.33333333%; - } - - .reports-wrapper .col-md-push-6 { - left: 50%; - } - - .reports-wrapper .col-md-push-5 { - left: 41.66666667%; - } - - .reports-wrapper .col-md-push-4 { - left: 33.33333333%; - } - - .reports-wrapper .col-md-push-3 { - left: 25%; - } - - .reports-wrapper .col-md-push-2 { - left: 16.66666667%; - } - - .reports-wrapper .col-md-push-1 { - left: 8.33333333%; - } - - .reports-wrapper .col-md-push-0 { - left: auto; - } - - .reports-wrapper .col-md-offset-12 { - margin-left: 100%; - } - - .reports-wrapper .col-md-offset-11 { - margin-left: 91.66666667%; - } - - .reports-wrapper .col-md-offset-10 { - margin-left: 83.33333333%; - } - - .reports-wrapper .col-md-offset-9 { - margin-left: 75%; - } - - .reports-wrapper .col-md-offset-8 { - margin-left: 66.66666667%; - } - - .reports-wrapper .col-md-offset-7 { - margin-left: 58.33333333%; - } - - .reports-wrapper .col-md-offset-6 { - margin-left: 50%; - } - - .reports-wrapper .col-md-offset-5 { - margin-left: 41.66666667%; - } - - .reports-wrapper .col-md-offset-4 { - margin-left: 33.33333333%; - } - - .reports-wrapper .col-md-offset-3 { - margin-left: 25%; - } - - .reports-wrapper .col-md-offset-2 { - margin-left: 16.66666667%; - } - - .reports-wrapper .col-md-offset-1 { - margin-left: 8.33333333%; - } - - .reports-wrapper .col-md-offset-0 { - margin-left: 0; - } -} - -@media (min-width: 1200px) { - .reports-wrapper .col-lg-1, - .reports-wrapper .col-lg-2, - .reports-wrapper .col-lg-3, - .reports-wrapper .col-lg-4, - .reports-wrapper .col-lg-5, - .reports-wrapper .col-lg-6, - .reports-wrapper .col-lg-7, - .reports-wrapper .col-lg-8, - .reports-wrapper .col-lg-9, - .reports-wrapper .col-lg-10, - .reports-wrapper .col-lg-11, - .reports-wrapper .col-lg-12 { - float: left; - } - - .reports-wrapper .col-lg-12 { - width: 100%; - } - - .reports-wrapper .col-lg-11 { - width: 91.66666667%; - } - - .reports-wrapper .col-lg-10 { - width: 83.33333333%; - } - - .reports-wrapper .col-lg-9 { - width: 75%; - } - - .reports-wrapper .col-lg-8 { - width: 66.66666667%; - } - - .reports-wrapper .col-lg-7 { - width: 58.33333333%; - } - - .reports-wrapper .col-lg-6 { - width: 50%; - } - - .reports-wrapper .col-lg-5 { - width: 41.66666667%; - } - - .reports-wrapper .col-lg-4 { - width: 33.33333333%; - } - - .reports-wrapper .col-lg-3 { - width: 25%; - } - - .reports-wrapper .col-lg-2 { - width: 16.66666667%; - } - - .reports-wrapper .col-lg-1 { - width: 8.33333333%; - } - - .reports-wrapper .col-lg-pull-12 { - right: 100%; - } - - .reports-wrapper .col-lg-pull-11 { - right: 91.66666667%; - } - - .reports-wrapper .col-lg-pull-10 { - right: 83.33333333%; - } - - .reports-wrapper .col-lg-pull-9 { - right: 75%; - } - - .reports-wrapper .col-lg-pull-8 { - right: 66.66666667%; - } - - .reports-wrapper .col-lg-pull-7 { - right: 58.33333333%; - } - - .reports-wrapper .col-lg-pull-6 { - right: 50%; - } - - .reports-wrapper .col-lg-pull-5 { - right: 41.66666667%; - } - - .reports-wrapper .col-lg-pull-4 { - right: 33.33333333%; - } - - .reports-wrapper .col-lg-pull-3 { - right: 25%; - } - - .reports-wrapper .col-lg-pull-2 { - right: 16.66666667%; - } - - .reports-wrapper .col-lg-pull-1 { - right: 8.33333333%; - } - - .reports-wrapper .col-lg-pull-0 { - right: auto; - } - - .reports-wrapper .col-lg-push-12 { - left: 100%; - } - - .reports-wrapper .col-lg-push-11 { - left: 91.66666667%; - } - - .reports-wrapper .col-lg-push-10 { - left: 83.33333333%; - } - - .reports-wrapper .col-lg-push-9 { - left: 75%; - } - - .reports-wrapper .col-lg-push-8 { - left: 66.66666667%; - } - - .reports-wrapper .col-lg-push-7 { - left: 58.33333333%; - } - - .reports-wrapper .col-lg-push-6 { - left: 50%; - } - - .reports-wrapper .col-lg-push-5 { - left: 41.66666667%; - } - - .reports-wrapper .col-lg-push-4 { - left: 33.33333333%; - } - - .reports-wrapper .col-lg-push-3 { - left: 25%; - } - - .reports-wrapper .col-lg-push-2 { - left: 16.66666667%; - } - - .reports-wrapper .col-lg-push-1 { - left: 8.33333333%; - } - - .reports-wrapper .col-lg-push-0 { - left: auto; - } - - .reports-wrapper .col-lg-offset-12 { - margin-left: 100%; - } - - .reports-wrapper .col-lg-offset-11 { - margin-left: 91.66666667%; - } - - .reports-wrapper .col-lg-offset-10 { - margin-left: 83.33333333%; - } - - .reports-wrapper .col-lg-offset-9 { - margin-left: 75%; - } - - .reports-wrapper .col-lg-offset-8 { - margin-left: 66.66666667%; - } - - .reports-wrapper .col-lg-offset-7 { - margin-left: 58.33333333%; - } - - .reports-wrapper .col-lg-offset-6 { - margin-left: 50%; - } - - .reports-wrapper .col-lg-offset-5 { - margin-left: 41.66666667%; - } - - .reports-wrapper .col-lg-offset-4 { - margin-left: 33.33333333%; - } - - .reports-wrapper .col-lg-offset-3 { - margin-left: 25%; - } - - .reports-wrapper .col-lg-offset-2 { - margin-left: 16.66666667%; - } - - .reports-wrapper .col-lg-offset-1 { - margin-left: 8.33333333%; - } - - .reports-wrapper .col-lg-offset-0 { - margin-left: 0; - } -} - -.reports-wrapper .pull-right { - float: right !important; -} - -.reports-wrapper .pull-left { - float: left !important; -} - -.reports-wrapper .hide { - display: none !important; -} - -.reports-wrapper .show { - display: block !important; -} - -.reports-wrapper .empty-state__icon { - font-size: 80px !important; -} - -.reports-wrapper .empty-state__title { - color: #000; -} - -.reports-wrapper .form-group { - padding-bottom: 20px; -} - -.reports-wrapper .form-control { - width: 100%; - display: block; -} - -.reports-wrapper label { - display: inline-block; - max-width: 100%; - margin-bottom: 5px; - font-weight: bold; -} - -.reports-wrapper .close { - float: right; - font-size: 21px; - font-weight: bold; - line-height: 1; - color: #000; - text-shadow: 0 1px 0 #fff; - opacity: 0.2; - filter: alpha(opacity=20); -} - -.reports-wrapper .close:hover, -.reports-wrapper .close:focus { - color: #000; - text-decoration: none; - cursor: pointer; - opacity: 0.5; - filter: alpha(opacity=50); -} - -.reports-wrapper button.close { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} - -.reports-wrapper .modal-open { - overflow: hidden; -} - -.reports-wrapper .modal { - display: none; - overflow: hidden; - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1050; - -webkit-overflow-scrolling: touch; - outline: 0; - background: rgba(0, 0, 0, 0.6); -} - -.reports-wrapper .modal.fade .modal-dialog { - -webkit-transform: translate(0, -25%); - -ms-transform: translate(0, -25%); - -o-transform: translate(0, -25%); - transform: translate(0, -25%); - -webkit-transition: -webkit-transform 0.3s ease-out; - -moz-transition: -moz-transform 0.3s ease-out; - -o-transition: -o-transform 0.3s ease-out; - transition: transform 0.3s ease-out; -} - -.reports-wrapper .modal.in .modal-dialog { - -webkit-transform: translate(0, 0); - -ms-transform: translate(0, 0); - -o-transform: translate(0, 0); - transform: translate(0, 0); -} - -.reports-wrapper .modal-open .modal { - overflow-x: hidden; - overflow-y: auto; -} - -.reports-wrapper .modal-dialog { - position: relative; - width: auto; - margin: 10px; -} - -.reports-wrapper .modal-content { - position: relative; - background-color: #fff; - border: 1px solid #999; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 6px; - -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); - box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); - background-clip: padding-box; - outline: 0; -} - -.reports-wrapper .modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - background-color: #000; -} - -.reports-wrapper .modal-backdrop.fade { - opacity: 0; - filter: alpha(opacity=0); -} - -.reports-wrapper .modal-backdrop.in { - opacity: 0.5; - filter: alpha(opacity=50); -} - -.reports-wrapper .modal-header { - padding: 15px; - border-bottom: 1px solid #e5e5e5; -} - -.reports-wrapper .modal-header .close { - margin-top: -2px; -} - -.reports-wrapper .modal-title { - margin: 0; - line-height: 1.42857143; -} - -.reports-wrapper .modal-body { - position: relative; - padding: 15px; -} - -.reports-wrapper .modal-footer { - padding: 15px; - text-align: right; - border-top: 1px solid #e5e5e5; - position: relative; -} - -.reports-wrapper .modal-footer .btn + .btn { - margin-left: 5px; - margin-bottom: 0; -} - -.reports-wrapper .modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} - -.reports-wrapper .modal-footer .btn-block + .btn-block { - margin-left: 0; -} - -.reports-wrapper .modal-footer button, -.reports-wrapper .modal-footer .btn { - float: none; - width: auto; -} - -.reports-wrapper .modal-scrollbar-measure { - position: absolute; - top: -9999px; - width: 50px; - height: 50px; - overflow: scroll; -} - -@media (min-width: 768px) { - .reports-wrapper .modal-dialog { - width: 600px; - margin: 30px auto; - } - - .reports-wrapper .modal-content { - -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); - box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); - } - - .reports-wrapper .modal-sm { - width: 300px; - } -} - -.reports-wrapper .report-error { - text-align: center; - padding: 80px 0; -} - -.reports-wrapper .report-error__icon { - font-size: 80px; -} - -.cricket-radio-inline { - position: relative; - display: inline-block !important; - margin-bottom: 0; - padding-left: 20px; - vertical-align: middle; - font-weight: normal; - cursor: pointer; -} - -.cricket-radio-inline + .cricket-radio-inline { - margin-top: 0; - margin-left: 10px; -} - -.cricket-radio-inline input[type="radio"]{ - position: absolute; - margin-left: -20px; - margin-top: 4px; -} \ No newline at end of file diff --git a/src/asset-files/css/styles.css b/src/asset-files/css/styles.css new file mode 100644 index 0000000..b990388 --- /dev/null +++ b/src/asset-files/css/styles.css @@ -0,0 +1,8 @@ +.cricket-wrapper .select2-selection { + height: 38px; + outline: none; + background: #fff; + border-radius: 1px; +} + +/*# sourceMappingURL=maps/styles.css.map */ diff --git a/src/asset-files/datepicker/bootstrap-datepicker.min.js b/src/asset-files/datepicker/bootstrap-datepicker.min.js deleted file mode 100644 index 7222794..0000000 --- a/src/asset-files/datepicker/bootstrap-datepicker.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * Datepicker for Bootstrap v1.8.0 (https://github.com/uxsolutions/bootstrap-datepicker) - * - * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0) - */ - -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a,b){return a.getUTCFullYear()===b.getUTCFullYear()&&a.getUTCMonth()===b.getUTCMonth()&&a.getUTCDate()===b.getUTCDate()}function f(c,d){return function(){return d!==b&&a.fn.datepicker.deprecated(d),this[c].apply(this,arguments)}}function g(a){return a&&!isNaN(a.getTime())}function h(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");c=new RegExp("^"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function i(b){var c={};if(q[b]||(b=b.split("-")[0],q[b])){var d=q[b];return a.each(p,function(a,b){b in d&&(c[b]=d[b])}),c}}var j=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;c]/g)||[]).length<=0)return!0;var d=a(c);return d.length>0}catch(a){return!1}},_process_options:function(b){this._o=a.extend({},this._o,b);var e=this.o=a.extend({},this._o),f=e.language;q[f]||(f=f.split("-")[0],q[f]||(f=o.language)),e.language=f,e.startView=this._resolveViewName(e.startView),e.minViewMode=this._resolveViewName(e.minViewMode),e.maxViewMode=this._resolveViewName(e.maxViewMode),e.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,e.startView)),e.multidate!==!0&&(e.multidate=Number(e.multidate)||!1,e.multidate!==!1&&(e.multidate=Math.max(0,e.multidate))),e.multidateSeparator=String(e.multidateSeparator),e.weekStart%=7,e.weekEnd=(e.weekStart+6)%7;var g=r.parseFormat(e.format);e.startDate!==-(1/0)&&(e.startDate?e.startDate instanceof Date?e.startDate=this._local_to_utc(this._zero_time(e.startDate)):e.startDate=r.parseDate(e.startDate,g,e.language,e.assumeNearbyYear):e.startDate=-(1/0)),e.endDate!==1/0&&(e.endDate?e.endDate instanceof Date?e.endDate=this._local_to_utc(this._zero_time(e.endDate)):e.endDate=r.parseDate(e.endDate,g,e.language,e.assumeNearbyYear):e.endDate=1/0),e.daysOfWeekDisabled=this._resolveDaysOfWeek(e.daysOfWeekDisabled||[]),e.daysOfWeekHighlighted=this._resolveDaysOfWeek(e.daysOfWeekHighlighted||[]),e.datesDisabled=e.datesDisabled||[],a.isArray(e.datesDisabled)||(e.datesDisabled=e.datesDisabled.split(",")),e.datesDisabled=a.map(e.datesDisabled,function(a){return r.parseDate(a,g,e.language,e.assumeNearbyYear)});var h=String(e.orientation).toLowerCase().split(/\s+/g),i=e.orientation.toLowerCase();if(h=a.grep(h,function(a){return/^auto|left|right|top|bottom$/.test(a)}),e.orientation={x:"auto",y:"auto"},i&&"auto"!==i)if(1===h.length)switch(h[0]){case"top":case"bottom":e.orientation.y=h[0];break;case"left":case"right":e.orientation.x=h[0]}else i=a.grep(h,function(a){return/^left|right$/.test(a)}),e.orientation.x=i[0]||"auto",i=a.grep(h,function(a){return/^top|bottom$/.test(a)}),e.orientation.y=i[0]||"auto";else;if(e.defaultViewDate instanceof Date||"string"==typeof e.defaultViewDate)e.defaultViewDate=r.parseDate(e.defaultViewDate,g,e.language,e.assumeNearbyYear);else if(e.defaultViewDate){var j=e.defaultViewDate.year||(new Date).getFullYear(),k=e.defaultViewDate.month||0,l=e.defaultViewDate.day||1;e.defaultViewDate=c(j,k,l)}else e.defaultViewDate=d()},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var c,d,e,f=0;ff?(this.picker.addClass("datepicker-orient-right"),n+=m-b):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var p,q=this.o.orientation.y;if("auto"===q&&(p=-g+o-c,q=p<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+q),"top"===q?o-=c+parseInt(this.picker.css("padding-top")):o+=l,this.o.rtl){var r=f-(n+m);this.picker.css({top:o,right:r,zIndex:j})}else this.picker.css({top:o,left:n,zIndex:j});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var b=this.dates.copy(),c=[],d=!1;return arguments.length?(a.each(arguments,a.proxy(function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)},this)),d=!0):(c=this.isInput?this.element.val():this.element.data("date")||this.inputField.val(),c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy(function(a){return r.parseDate(a,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),c=a.grep(c,a.proxy(function(a){return!this.dateWithinRange(a)||!a},this),!0),this.dates.replace(c),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDatethis.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),d?(this.setValue(),this.element.change()):this.dates.length&&String(b)!==String(this.dates)&&d&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&b.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var b=this.o.weekStart,c="";for(this.o.calendarWeeks&&(c+=' ');b";c+="",this.picker.find(".datepicker-days thead").append(c)}},fillMonths:function(){for(var a,b=this._utc_to_local(this.viewDate),c="",d=0;d<12;d++)a=b&&b.getMonth()===d?" focused":"",c+=''+q[this.o.language].monthsShort[d]+"";this.picker.find(".datepicker-months td").html(c)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],f=this.viewDate.getUTCFullYear(),g=this.viewDate.getUTCMonth(),h=d();return b.getUTCFullYear()f||b.getUTCFullYear()===f&&b.getUTCMonth()>g)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&e(b,h)&&c.push("today"),this.dates.contains(b)!==-1&&c.push("active"),this.dateWithinRange(b)||c.push("disabled"),this.dateIsDisabled(b)&&c.push("disabled","disabled-date"),a.inArray(b.getUTCDay(),this.o.daysOfWeekHighlighted)!==-1&&c.push("highlighted"),this.range&&(b>this.range[0]&&bh)&&j.push("disabled"),t===r&&j.push("focused"),i!==a.noop&&(l=i(new Date(t,0,1)),l===b?l={}:"boolean"==typeof l?l={enabled:l}:"string"==typeof l&&(l={classes:l}),l.enabled===!1&&j.push("disabled"),l.classes&&(j=j.concat(l.classes.split(/\s+/))),l.tooltip&&(k=l.tooltip)),m+='"+t+"";o.find(".datepicker-switch").text(p+"-"+q),o.find("td").html(m)},fill:function(){var d,e,f=new Date(this.viewDate),g=f.getUTCFullYear(),h=f.getUTCMonth(),i=this.o.startDate!==-(1/0)?this.o.startDate.getUTCFullYear():-(1/0),j=this.o.startDate!==-(1/0)?this.o.startDate.getUTCMonth():-(1/0),k=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,m=q[this.o.language].today||q.en.today||"",n=q[this.o.language].clear||q.en.clear||"",o=q[this.o.language].titleFormat||q.en.titleFormat;if(!isNaN(g)&&!isNaN(h)){this.picker.find(".datepicker-days .datepicker-switch").text(r.formatDate(f,o,this.o.language)),this.picker.find("tfoot .today").text(m).css("display",this.o.todayBtn===!0||"linked"===this.o.todayBtn?"table-cell":"none"),this.picker.find("tfoot .clear").text(n).css("display",this.o.clearBtn===!0?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var p=c(g,h,0),s=p.getUTCDate();p.setUTCDate(s-(p.getUTCDay()-this.o.weekStart+7)%7);var t=new Date(p);p.getUTCFullYear()<100&&t.setUTCFullYear(p.getUTCFullYear()),t.setUTCDate(t.getUTCDate()+42),t=t.valueOf();for(var u,v,w=[];p.valueOf()"),this.o.calendarWeeks)){var x=new Date(+p+(this.o.weekStart-u-7)%7*864e5),y=new Date(Number(x)+(11-x.getUTCDay())%7*864e5),z=new Date(Number(z=c(y.getUTCFullYear(),0,1))+(11-z.getUTCDay())%7*864e5),A=(y-z)/864e5/7+1;w.push(''+A+"")}v=this.getClassNames(p),v.push("day");var B=p.getUTCDate();this.o.beforeShowDay!==a.noop&&(e=this.o.beforeShowDay(this._utc_to_local(p)),e===b?e={}:"boolean"==typeof e?e={enabled:e}:"string"==typeof e&&(e={classes:e}),e.enabled===!1&&v.push("disabled"),e.classes&&(v=v.concat(e.classes.split(/\s+/))),e.tooltip&&(d=e.tooltip),e.content&&(B=e.content)),v=a.isFunction(a.uniqueSort)?a.uniqueSort(v):a.unique(v),w.push(''+B+""),d=null,u===this.o.weekEnd&&w.push(""),p.setUTCDate(p.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(w.join(""));var C=q[this.o.language].monthsTitle||q.en.monthsTitle||"Months",D=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?C:g).end().find("tbody span").removeClass("active");if(a.each(this.dates,function(a,b){b.getUTCFullYear()===g&&D.eq(b.getUTCMonth()).addClass("active")}),(gk)&&D.addClass("disabled"),g===i&&D.slice(0,j).addClass("disabled"),g===k&&D.slice(l+1).addClass("disabled"),this.o.beforeShowMonth!==a.noop){var E=this;a.each(D,function(c,d){var e=new Date(g,c,1),f=E.o.beforeShowMonth(e);f===b?f={}:"boolean"==typeof f?f={enabled:f}:"string"==typeof f&&(f={classes:f}),f.enabled!==!1||a(d).hasClass("disabled")||a(d).addClass("disabled"),f.classes&&a(d).addClass(f.classes),f.tooltip&&a(d).prop("title",f.tooltip)})}this._fill_yearsView(".datepicker-years","year",10,g,i,k,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,g,i,k,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,g,i,k,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var a,b,c=new Date(this.viewDate),d=c.getUTCFullYear(),e=c.getUTCMonth(),f=this.o.startDate!==-(1/0)?this.o.startDate.getUTCFullYear():-(1/0),g=this.o.startDate!==-(1/0)?this.o.startDate.getUTCMonth():-(1/0),h=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,i=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,j=1;switch(this.viewMode){case 4:j*=10;case 3:j*=10;case 2:j*=10;case 1:a=Math.floor(d/j)*jh;break;case 0:a=d<=f&&e=h&&e>i}this.picker.find(".prev").toggleClass("disabled",a),this.picker.find(".next").toggleClass("disabled",b)}},click:function(b){b.preventDefault(),b.stopPropagation();var e,f,g,h;e=a(b.target),e.hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),e.hasClass("today")&&!e.hasClass("day")&&(this.setViewMode(0),this._setDate(d(),"linked"===this.o.todayBtn?null:"view")),e.hasClass("clear")&&this.clearDates(),e.hasClass("disabled")||(e.hasClass("month")||e.hasClass("year")||e.hasClass("decade")||e.hasClass("century"))&&(this.viewDate.setUTCDate(1),f=1,1===this.viewMode?(h=e.parent().find("span").index(e),g=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(h)):(h=0,g=Number(e.text()),this.viewDate.setUTCFullYear(g)),this._trigger(r.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(c(g,h,f)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(b){var c=a(b.currentTarget),d=c.data("date"),e=new Date(d);this.o.updateViewDate&&(e.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),e.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(e)},navArrowsClick:function(b){var c=a(b.currentTarget),d=c.hasClass("prev")?-1:1;0!==this.viewMode&&(d*=12*r.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,d),this._trigger(r.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a||this.dates.clear(),b!==-1?(this.o.multidate===!0||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(b):this.o.multidate===!1?(this.dates.clear(),this.dates.push(a)):this.dates.push(a),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),(!b&&this.o.updateViewDate||"view"===b)&&(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),b&&"view"===b||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||b&&"date"!==b||this.hide()},moveDay:function(a,b){var c=new Date(a);return c.setUTCDate(a.getUTCDate()+b),c},moveWeek:function(a,b){return this.moveDay(a,7*b)},moveMonth:function(a,b){if(!g(a))return this.o.defaultViewDate;if(!b)return a;var c,d,e=new Date(a.valueOf()),f=e.getUTCDate(),h=e.getUTCMonth(),i=Math.abs(b);if(b=b>0?1:-1,1===i)d=b===-1?function(){return e.getUTCMonth()===h}:function(){return e.getUTCMonth()!==c},c=h+b,e.setUTCMonth(c),c=(c+12)%12;else{for(var j=0;j0},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(!this.picker.is(":visible"))return void(40!==a.keyCode&&27!==a.keyCode||(this.show(),a.stopPropagation()));var b,c,d=!1,e=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault(),a.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;b=37===a.keyCode||38===a.keyCode?-1:1,0===this.viewMode?a.ctrlKey?(c=this.moveAvailableDate(e,b,"moveYear"),c&&this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveAvailableDate(e,b,"moveMonth"),c&&this._trigger("changeMonth",this.viewDate)):37===a.keyCode||39===a.keyCode?c=this.moveAvailableDate(e,b,"moveDay"):this.weekOfDateIsDisabled(e)||(c=this.moveAvailableDate(e,b,"moveWeek")):1===this.viewMode?(38!==a.keyCode&&40!==a.keyCode||(b*=4),c=this.moveAvailableDate(e,b,"moveMonth")):2===this.viewMode&&(38!==a.keyCode&&40!==a.keyCode||(b*=4),c=this.moveAvailableDate(e,b,"moveYear")),c&&(this.focusDate=this.viewDate=c,this.setValue(),this.fill(),a.preventDefault());break;case 13:if(!this.o.forceParse)break;e=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(e),d=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),a.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}d&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))},setViewMode:function(a){this.viewMode=a,this.picker.children("div").hide().filter(".datepicker-"+r.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var l=function(b,c){a.data(b,"datepicker",this),this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,this.keepEmptyValues=c.keepEmptyValues,delete c.keepEmptyValues,n.call(a(this.inputs),c).on("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a.data(b,"datepicker")}),this.updateDates()};l.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},clearDates:function(){a.each(this.pickers,function(a,b){b.clearDates()})},dateUpdated:function(c){if(!this.updating){this.updating=!0;var d=a.data(c.target,"datepicker");if(d!==b){var e=d.getUTCDate(),f=this.keepEmptyValues,g=a.inArray(c.target,this.inputs),h=g-1,i=g+1,j=this.inputs.length;if(g!==-1){if(a.each(this.pickers,function(a,b){b.getUTCDate()||b!==d&&f||b.setUTCDate(e)}),e=0&&ethis.dates[i])for(;ithis.dates[i];)this.pickers[i++].setUTCDate(e);this.updateDates(),delete this.updating}}}},destroy:function(){a.map(this.pickers,function(a){a.destroy()}),a(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:f("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var m=a.fn.datepicker,n=function(c){var d=Array.apply(null,arguments);d.shift();var e;if(this.each(function(){var b=a(this),f=b.data("datepicker"),g="object"==typeof c&&c;if(!f){var j=h(this,"date"),m=a.extend({},o,j,g),n=i(m.language),p=a.extend({},o,n,j,g);b.hasClass("input-daterange")||p.inputs?(a.extend(p,{inputs:p.inputs||b.find("input").toArray()}),f=new l(this,p)):f=new k(this,p),b.data("datepicker",f)}"string"==typeof c&&"function"==typeof f[c]&&(e=f[c].apply(f,d))}),e===b||e instanceof k||e instanceof l)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+c+" function)");return e};a.fn.datepicker=n;var o=a.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:a.noop,beforeShowMonth:a.noop,beforeShowYear:a.noop,beforeShowDecade:a.noop,beforeShowCentury:a.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-(1/0),startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"«",rightArrow:"»"},showWeekDays:!0},p=a.fn.datepicker.locale_opts=["format","rtl","weekStart"];a.fn.datepicker.Constructor=k;var q=a.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},r={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(a){if("function"==typeof a.toValue&&"function"==typeof a.toDisplay)return a;var b=a.replace(this.validParts,"\0").split("\0"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(c,e,f,g){function h(a,b){return b===!0&&(b=10),a<100&&(a+=2e3,a>(new Date).getFullYear()+b&&(a-=100)),a}function i(){var a=this.slice(0,j[n].length),b=j[n].slice(0,a.length);return a.toLowerCase()===b.toLowerCase()}if(!c)return b;if(c instanceof Date)return c;if("string"==typeof e&&(e=r.parseFormat(e)),e.toValue)return e.toValue(c,e,f);var j,l,m,n,o,p={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},s={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(c in s&&(c=s[c]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(c)){for(j=c.match(/([\-+]\d+)([dmwy])/gi),c=new Date,n=0;n'+o.templates.leftArrow+''+o.templates.rightArrow+"", - contTemplate:'',footTemplate:''};r.template='
'+r.headTemplate+""+r.footTemplate+'
'+r.headTemplate+r.contTemplate+r.footTemplate+'
'+r.headTemplate+r.contTemplate+r.footTemplate+'
'+r.headTemplate+r.contTemplate+r.footTemplate+'
'+r.headTemplate+r.contTemplate+r.footTemplate+"
",a.fn.datepicker.DPGlobal=r,a.fn.datepicker.noConflict=function(){return a.fn.datepicker=m,this},a.fn.datepicker.version="1.8.0",a.fn.datepicker.deprecated=function(a){var b=window.console;b&&b.warn&&b.warn("DEPRECATED: "+a)},a(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(b){var c=a(this);c.data("datepicker")||(b.preventDefault(),n.call(c,"show"))}),a(function(){n.call(a('[data-provide="datepicker-inline"]'))})}); \ No newline at end of file diff --git a/src/asset-files/datepicker/bootstrap-datepicker3.standalone.min.css b/src/asset-files/datepicker/bootstrap-datepicker3.standalone.min.css deleted file mode 100644 index da328c1..0000000 --- a/src/asset-files/datepicker/bootstrap-datepicker3.standalone.min.css +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * Datepicker for Bootstrap v1.8.0 (https://github.com/uxsolutions/bootstrap-datepicker) - * - * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0) - */ - -.datepicker{border-radius:4px;direction:ltr}.datepicker-inline{width:220px}.datepicker-rtl{direction:rtl}.datepicker-rtl.dropdown-menu{left:auto}.datepicker-rtl table tr td span{float:right}.datepicker-dropdown{top:0;left:0;padding:4px}.datepicker-dropdown:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid rgba(0,0,0,.15);border-top:0;border-bottom-color:rgba(0,0,0,.2);position:absolute}.datepicker-dropdown:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;border-top:0;position:absolute}.datepicker-dropdown.datepicker-orient-left:before{left:6px}.datepicker-dropdown.datepicker-orient-left:after{left:7px}.datepicker-dropdown.datepicker-orient-right:before{right:6px}.datepicker-dropdown.datepicker-orient-right:after{right:7px}.datepicker-dropdown.datepicker-orient-bottom:before{top:-7px}.datepicker-dropdown.datepicker-orient-bottom:after{top:-6px}.datepicker-dropdown.datepicker-orient-top:before{bottom:-7px;border-bottom:0;border-top:7px solid rgba(0,0,0,.15)}.datepicker-dropdown.datepicker-orient-top:after{bottom:-6px;border-bottom:0;border-top:6px solid #fff}.datepicker table{margin:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.datepicker table tr td,.datepicker table tr th{text-align:center;width:30px;height:30px;border-radius:4px;border:none}.table-striped .datepicker table tr td,.table-striped .datepicker table tr th{background-color:transparent}.datepicker table tr td.new,.datepicker table tr td.old{color:#777}.datepicker table tr td.day:hover,.datepicker table tr td.focused{background:#eee;cursor:pointer}.datepicker table tr td.disabled,.datepicker table tr td.disabled:hover{background:0 0;color:#777;cursor:default}.datepicker table tr td.highlighted{color:#000;background-color:#d9edf7;border-color:#85c5e5;border-radius:0}.datepicker table tr td.highlighted.focus,.datepicker table tr td.highlighted:focus{color:#000;background-color:#afd9ee;border-color:#298fc2}.datepicker table tr td.highlighted:hover{color:#000;background-color:#afd9ee;border-color:#52addb}.datepicker table tr td.highlighted.active,.datepicker table tr td.highlighted:active{color:#000;background-color:#afd9ee;border-color:#52addb}.datepicker table tr td.highlighted.active.focus,.datepicker table tr td.highlighted.active:focus,.datepicker table tr td.highlighted.active:hover,.datepicker table tr td.highlighted:active.focus,.datepicker table tr td.highlighted:active:focus,.datepicker table tr td.highlighted:active:hover{color:#000;background-color:#91cbe8;border-color:#298fc2}.datepicker table tr td.highlighted.disabled.focus,.datepicker table tr td.highlighted.disabled:focus,.datepicker table tr td.highlighted.disabled:hover,.datepicker table tr td.highlighted[disabled].focus,.datepicker table tr td.highlighted[disabled]:focus,.datepicker table tr td.highlighted[disabled]:hover,fieldset[disabled] .datepicker table tr td.highlighted.focus,fieldset[disabled] .datepicker table tr td.highlighted:focus,fieldset[disabled] .datepicker table tr td.highlighted:hover{background-color:#d9edf7;border-color:#85c5e5}.datepicker table tr td.highlighted.focused{background:#afd9ee}.datepicker table tr td.highlighted.disabled,.datepicker table tr td.highlighted.disabled:active{background:#d9edf7;color:#777}.datepicker table tr td.today{color:#000;background-color:#ffdb99;border-color:#ffb733}.datepicker table tr td.today.focus,.datepicker table tr td.today:focus{color:#000;background-color:#ffc966;border-color:#b37400}.datepicker table tr td.today:hover{color:#000;background-color:#ffc966;border-color:#f59e00}.datepicker table tr td.today.active,.datepicker table tr td.today:active{color:#000;background-color:#ffc966;border-color:#f59e00}.datepicker table tr td.today.active.focus,.datepicker table tr td.today.active:focus,.datepicker table tr td.today.active:hover,.datepicker table tr td.today:active.focus,.datepicker table tr td.today:active:focus,.datepicker table tr td.today:active:hover{color:#000;background-color:#ffbc42;border-color:#b37400}.datepicker table tr td.today.disabled.focus,.datepicker table tr td.today.disabled:focus,.datepicker table tr td.today.disabled:hover,.datepicker table tr td.today[disabled].focus,.datepicker table tr td.today[disabled]:focus,.datepicker table tr td.today[disabled]:hover,fieldset[disabled] .datepicker table tr td.today.focus,fieldset[disabled] .datepicker table tr td.today:focus,fieldset[disabled] .datepicker table tr td.today:hover{background-color:#ffdb99;border-color:#ffb733}.datepicker table tr td.today.focused{background:#ffc966}.datepicker table tr td.today.disabled,.datepicker table tr td.today.disabled:active{background:#ffdb99;color:#777}.datepicker table tr td.range{color:#000;background-color:#eee;border-color:#bbb;border-radius:0}.datepicker table tr td.range.focus,.datepicker table tr td.range:focus{color:#000;background-color:#d5d5d5;border-color:#7c7c7c}.datepicker table tr td.range:hover{color:#000;background-color:#d5d5d5;border-color:#9d9d9d}.datepicker table tr td.range.active,.datepicker table tr td.range:active{color:#000;background-color:#d5d5d5;border-color:#9d9d9d}.datepicker table tr td.range.active.focus,.datepicker table tr td.range.active:focus,.datepicker table tr td.range.active:hover,.datepicker table tr td.range:active.focus,.datepicker table tr td.range:active:focus,.datepicker table tr td.range:active:hover{color:#000;background-color:#c3c3c3;border-color:#7c7c7c}.datepicker table tr td.range.disabled.focus,.datepicker table tr td.range.disabled:focus,.datepicker table tr td.range.disabled:hover,.datepicker table tr td.range[disabled].focus,.datepicker table tr td.range[disabled]:focus,.datepicker table tr td.range[disabled]:hover,fieldset[disabled] .datepicker table tr td.range.focus,fieldset[disabled] .datepicker table tr td.range:focus,fieldset[disabled] .datepicker table tr td.range:hover{background-color:#eee;border-color:#bbb}.datepicker table tr td.range.focused{background:#d5d5d5}.datepicker table tr td.range.disabled,.datepicker table tr td.range.disabled:active{background:#eee;color:#777}.datepicker table tr td.range.highlighted{color:#000;background-color:#e4eef3;border-color:#9dc1d3}.datepicker table tr td.range.highlighted.focus,.datepicker table tr td.range.highlighted:focus{color:#000;background-color:#c1d7e3;border-color:#4b88a6}.datepicker table tr td.range.highlighted:hover{color:#000;background-color:#c1d7e3;border-color:#73a6c0}.datepicker table tr td.range.highlighted.active,.datepicker table tr td.range.highlighted:active{color:#000;background-color:#c1d7e3;border-color:#73a6c0}.datepicker table tr td.range.highlighted.active.focus,.datepicker table tr td.range.highlighted.active:focus,.datepicker table tr td.range.highlighted.active:hover,.datepicker table tr td.range.highlighted:active.focus,.datepicker table tr td.range.highlighted:active:focus,.datepicker table tr td.range.highlighted:active:hover{color:#000;background-color:#a8c8d8;border-color:#4b88a6}.datepicker table tr td.range.highlighted.disabled.focus,.datepicker table tr td.range.highlighted.disabled:focus,.datepicker table tr td.range.highlighted.disabled:hover,.datepicker table tr td.range.highlighted[disabled].focus,.datepicker table tr td.range.highlighted[disabled]:focus,.datepicker table tr td.range.highlighted[disabled]:hover,fieldset[disabled] .datepicker table tr td.range.highlighted.focus,fieldset[disabled] .datepicker table tr td.range.highlighted:focus,fieldset[disabled] .datepicker table tr td.range.highlighted:hover{background-color:#e4eef3;border-color:#9dc1d3}.datepicker table tr td.range.highlighted.focused{background:#c1d7e3}.datepicker table tr td.range.highlighted.disabled,.datepicker table tr td.range.highlighted.disabled:active{background:#e4eef3;color:#777}.datepicker table tr td.range.today{color:#000;background-color:#f7ca77;border-color:#f1a417}.datepicker table tr td.range.today.focus,.datepicker table tr td.range.today:focus{color:#000;background-color:#f4b747;border-color:#815608}.datepicker table tr td.range.today:hover{color:#000;background-color:#f4b747;border-color:#bf800c}.datepicker table tr td.range.today.active,.datepicker table tr td.range.today:active{color:#000;background-color:#f4b747;border-color:#bf800c}.datepicker table tr td.range.today.active.focus,.datepicker table tr td.range.today.active:focus,.datepicker table tr td.range.today.active:hover,.datepicker table tr td.range.today:active.focus,.datepicker table tr td.range.today:active:focus,.datepicker table tr td.range.today:active:hover{color:#000;background-color:#f2aa25;border-color:#815608}.datepicker table tr td.range.today.disabled.focus,.datepicker table tr td.range.today.disabled:focus,.datepicker table tr td.range.today.disabled:hover,.datepicker table tr td.range.today[disabled].focus,.datepicker table tr td.range.today[disabled]:focus,.datepicker table tr td.range.today[disabled]:hover,fieldset[disabled] .datepicker table tr td.range.today.focus,fieldset[disabled] .datepicker table tr td.range.today:focus,fieldset[disabled] .datepicker table tr td.range.today:hover{background-color:#f7ca77;border-color:#f1a417}.datepicker table tr td.range.today.disabled,.datepicker table tr td.range.today.disabled:active{background:#f7ca77;color:#777}.datepicker table tr td.selected,.datepicker table tr td.selected.highlighted{color:#fff;background-color:#777;border-color:#555;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.datepicker table tr td.selected.focus,.datepicker table tr td.selected.highlighted.focus,.datepicker table tr td.selected.highlighted:focus,.datepicker table tr td.selected:focus{color:#fff;background-color:#5e5e5e;border-color:#161616}.datepicker table tr td.selected.highlighted:hover,.datepicker table tr td.selected:hover{color:#fff;background-color:#5e5e5e;border-color:#373737}.datepicker table tr td.selected.active,.datepicker table tr td.selected.highlighted.active,.datepicker table tr td.selected.highlighted:active,.datepicker table tr td.selected:active{color:#fff;background-color:#5e5e5e;border-color:#373737}.datepicker table tr td.selected.active.focus,.datepicker table tr td.selected.active:focus,.datepicker table tr td.selected.active:hover,.datepicker table tr td.selected.highlighted.active.focus,.datepicker table tr td.selected.highlighted.active:focus,.datepicker table tr td.selected.highlighted.active:hover,.datepicker table tr td.selected.highlighted:active.focus,.datepicker table tr td.selected.highlighted:active:focus,.datepicker table tr td.selected.highlighted:active:hover,.datepicker table tr td.selected:active.focus,.datepicker table tr td.selected:active:focus,.datepicker table tr td.selected:active:hover{color:#fff;background-color:#4c4c4c;border-color:#161616}.datepicker table tr td.selected.disabled.focus,.datepicker table tr td.selected.disabled:focus,.datepicker table tr td.selected.disabled:hover,.datepicker table tr td.selected.highlighted.disabled.focus,.datepicker table tr td.selected.highlighted.disabled:focus,.datepicker table tr td.selected.highlighted.disabled:hover,.datepicker table tr td.selected.highlighted[disabled].focus,.datepicker table tr td.selected.highlighted[disabled]:focus,.datepicker table tr td.selected.highlighted[disabled]:hover,.datepicker table tr td.selected[disabled].focus,.datepicker table tr td.selected[disabled]:focus,.datepicker table tr td.selected[disabled]:hover,fieldset[disabled] .datepicker table tr td.selected.focus,fieldset[disabled] .datepicker table tr td.selected.highlighted.focus,fieldset[disabled] .datepicker table tr td.selected.highlighted:focus,fieldset[disabled] .datepicker table tr td.selected.highlighted:hover,fieldset[disabled] .datepicker table tr td.selected:focus,fieldset[disabled] .datepicker table tr td.selected:hover{background-color:#777;border-color:#555}.datepicker table tr td.active,.datepicker table tr td.active.highlighted{color:#fff;background-color:#337ab7;border-color:#2e6da4;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.datepicker table tr td.active.focus,.datepicker table tr td.active.highlighted.focus,.datepicker table tr td.active.highlighted:focus,.datepicker table tr td.active:focus{color:#fff;background-color:#286090;border-color:#122b40}.datepicker table tr td.active.highlighted:hover,.datepicker table tr td.active:hover{color:#fff;background-color:#286090;border-color:#204d74}.datepicker table tr td.active.active,.datepicker table tr td.active.highlighted.active,.datepicker table tr td.active.highlighted:active,.datepicker table tr td.active:active{color:#fff;background-color:#286090;border-color:#204d74}.datepicker table tr td.active.active.focus,.datepicker table tr td.active.active:focus,.datepicker table tr td.active.active:hover,.datepicker table tr td.active.highlighted.active.focus,.datepicker table tr td.active.highlighted.active:focus,.datepicker table tr td.active.highlighted.active:hover,.datepicker table tr td.active.highlighted:active.focus,.datepicker table tr td.active.highlighted:active:focus,.datepicker table tr td.active.highlighted:active:hover,.datepicker table tr td.active:active.focus,.datepicker table tr td.active:active:focus,.datepicker table tr td.active:active:hover{color:#fff;background-color:#204d74;border-color:#122b40}.datepicker table tr td.active.disabled.focus,.datepicker table tr td.active.disabled:focus,.datepicker table tr td.active.disabled:hover,.datepicker table tr td.active.highlighted.disabled.focus,.datepicker table tr td.active.highlighted.disabled:focus,.datepicker table tr td.active.highlighted.disabled:hover,.datepicker table tr td.active.highlighted[disabled].focus,.datepicker table tr td.active.highlighted[disabled]:focus,.datepicker table tr td.active.highlighted[disabled]:hover,.datepicker table tr td.active[disabled].focus,.datepicker table tr td.active[disabled]:focus,.datepicker table tr td.active[disabled]:hover,fieldset[disabled] .datepicker table tr td.active.focus,fieldset[disabled] .datepicker table tr td.active.highlighted.focus,fieldset[disabled] .datepicker table tr td.active.highlighted:focus,fieldset[disabled] .datepicker table tr td.active.highlighted:hover,fieldset[disabled] .datepicker table tr td.active:focus,fieldset[disabled] .datepicker table tr td.active:hover{background-color:#337ab7;border-color:#2e6da4}.datepicker table tr td span{display:block;width:23%;height:54px;line-height:54px;float:left;margin:1%;cursor:pointer;border-radius:4px}.datepicker table tr td span.focused,.datepicker table tr td span:hover{background:#eee}.datepicker table tr td span.disabled,.datepicker table tr td span.disabled:hover{background:0 0;color:#777;cursor:default}.datepicker table tr td span.active,.datepicker table tr td span.active.disabled,.datepicker table tr td span.active.disabled:hover,.datepicker table tr td span.active:hover{color:#fff;background-color:#337ab7;border-color:#2e6da4;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.datepicker table tr td span.active.disabled.focus,.datepicker table tr td span.active.disabled:focus,.datepicker table tr td span.active.disabled:hover.focus,.datepicker table tr td span.active.disabled:hover:focus,.datepicker table tr td span.active.focus,.datepicker table tr td span.active:focus,.datepicker table tr td span.active:hover.focus,.datepicker table tr td span.active:hover:focus{color:#fff;background-color:#286090;border-color:#122b40}.datepicker table tr td span.active.disabled:hover,.datepicker table tr td span.active.disabled:hover:hover,.datepicker table tr td span.active:hover,.datepicker table tr td span.active:hover:hover{color:#fff;background-color:#286090;border-color:#204d74}.datepicker table tr td span.active.active,.datepicker table tr td span.active.disabled.active,.datepicker table tr td span.active.disabled:active,.datepicker table tr td span.active.disabled:hover.active,.datepicker table tr td span.active.disabled:hover:active,.datepicker table tr td span.active:active,.datepicker table tr td span.active:hover.active,.datepicker table tr td span.active:hover:active{color:#fff;background-color:#286090;border-color:#204d74}.datepicker table tr td span.active.active.focus,.datepicker table tr td span.active.active:focus,.datepicker table tr td span.active.active:hover,.datepicker table tr td span.active.disabled.active.focus,.datepicker table tr td span.active.disabled.active:focus,.datepicker table tr td span.active.disabled.active:hover,.datepicker table tr td span.active.disabled:active.focus,.datepicker table tr td span.active.disabled:active:focus,.datepicker table tr td span.active.disabled:active:hover,.datepicker table tr td span.active.disabled:hover.active.focus,.datepicker table tr td span.active.disabled:hover.active:focus,.datepicker table tr td span.active.disabled:hover.active:hover,.datepicker table tr td span.active.disabled:hover:active.focus,.datepicker table tr td span.active.disabled:hover:active:focus,.datepicker table tr td span.active.disabled:hover:active:hover,.datepicker table tr td span.active:active.focus,.datepicker table tr td span.active:active:focus,.datepicker table tr td span.active:active:hover,.datepicker table tr td span.active:hover.active.focus,.datepicker table tr td span.active:hover.active:focus,.datepicker table tr td span.active:hover.active:hover,.datepicker table tr td span.active:hover:active.focus,.datepicker table tr td span.active:hover:active:focus,.datepicker table tr td span.active:hover:active:hover{color:#fff;background-color:#204d74;border-color:#122b40}.datepicker table tr td span.active.disabled.disabled.focus,.datepicker table tr td span.active.disabled.disabled:focus,.datepicker table tr td span.active.disabled.disabled:hover,.datepicker table tr td span.active.disabled.focus,.datepicker table tr td span.active.disabled:focus,.datepicker table tr td span.active.disabled:hover,.datepicker table tr td span.active.disabled:hover.disabled.focus,.datepicker table tr td span.active.disabled:hover.disabled:focus,.datepicker table tr td span.active.disabled:hover.disabled:hover,.datepicker table tr td span.active.disabled:hover[disabled].focus,.datepicker table tr td span.active.disabled:hover[disabled]:focus,.datepicker table tr td span.active.disabled:hover[disabled]:hover,.datepicker table tr td span.active.disabled[disabled].focus,.datepicker table tr td span.active.disabled[disabled]:focus,.datepicker table tr td span.active.disabled[disabled]:hover,.datepicker table tr td span.active:hover.disabled.focus,.datepicker table tr td span.active:hover.disabled:focus,.datepicker table tr td span.active:hover.disabled:hover,.datepicker table tr td span.active:hover[disabled].focus,.datepicker table tr td span.active:hover[disabled]:focus,.datepicker table tr td span.active:hover[disabled]:hover,.datepicker table tr td span.active[disabled].focus,.datepicker table tr td span.active[disabled]:focus,.datepicker table tr td span.active[disabled]:hover,fieldset[disabled] .datepicker table tr td span.active.disabled.focus,fieldset[disabled] .datepicker table tr td span.active.disabled:focus,fieldset[disabled] .datepicker table tr td span.active.disabled:hover,fieldset[disabled] .datepicker table tr td span.active.disabled:hover.focus,fieldset[disabled] .datepicker table tr td span.active.disabled:hover:focus,fieldset[disabled] .datepicker table tr td span.active.disabled:hover:hover,fieldset[disabled] .datepicker table tr td span.active.focus,fieldset[disabled] .datepicker table tr td span.active:focus,fieldset[disabled] .datepicker table tr td span.active:hover,fieldset[disabled] .datepicker table tr td span.active:hover.focus,fieldset[disabled] .datepicker table tr td span.active:hover:focus,fieldset[disabled] .datepicker table tr td span.active:hover:hover{background-color:#337ab7;border-color:#2e6da4}.datepicker table tr td span.new,.datepicker table tr td span.old{color:#777}.datepicker .datepicker-switch{width:145px}.datepicker .datepicker-switch,.datepicker .next,.datepicker .prev,.datepicker tfoot tr th{cursor:pointer}.datepicker .datepicker-switch:hover,.datepicker .next:hover,.datepicker .prev:hover,.datepicker tfoot tr th:hover{background:#eee}.datepicker .next.disabled,.datepicker .prev.disabled{visibility:hidden}.datepicker .cw{font-size:10px;width:12px;padding:0 2px 0 5px;vertical-align:middle}.input-group.date .input-group-addon{cursor:pointer}.input-daterange{width:100%}.input-daterange input{text-align:center}.input-daterange input:first-child{border-radius:3px 0 0 3px}.input-daterange input:last-child{border-radius:0 3px 3px 0}.input-daterange .input-group-addon{width:auto;min-width:16px;padding:4px 5px;line-height:1.42857143;border-width:1px 0;margin-left:-5px;margin-right:-5px}.datepicker.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);-moz-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;color:#333;font-size:13px;line-height:1.42857143}.datepicker.datepicker-inline td,.datepicker.datepicker-inline th,.datepicker.dropdown-menu td,.datepicker.dropdown-menu th{padding:0 5px} \ No newline at end of file diff --git a/src/asset-files/widgets/report-filter-form.js b/src/asset-files/js/widgets/report-filter-form.js similarity index 100% rename from src/asset-files/widgets/report-filter-form.js rename to src/asset-files/js/widgets/report-filter-form.js diff --git a/src/asset-files/less/filter-form.less b/src/asset-files/less/filter-form.less new file mode 100644 index 0000000..b786602 --- /dev/null +++ b/src/asset-files/less/filter-form.less @@ -0,0 +1,8 @@ +.cricket-wrapper { + .select2-selection { + height: 38px; + outline: none; + background: #fff; + border-radius: 1px; + } +} \ No newline at end of file diff --git a/src/asset-files/less/styles.less b/src/asset-files/less/styles.less new file mode 100644 index 0000000..bf22f8e --- /dev/null +++ b/src/asset-files/less/styles.less @@ -0,0 +1 @@ +@import "filter-form.less"; \ No newline at end of file diff --git a/src/asset-files/plugins/bootstrap-validator/dist/validator.js b/src/asset-files/plugins/bootstrap-validator/dist/validator.js deleted file mode 100755 index b881fea..0000000 --- a/src/asset-files/plugins/bootstrap-validator/dist/validator.js +++ /dev/null @@ -1,394 +0,0 @@ -/*! - * Validator v0.11.9 for Bootstrap 3, by @1000hz - * Copyright 2017 Cina Saffary - * Licensed under http://opensource.org/licenses/MIT - * - * https://github.com/1000hz/bootstrap-validator - */ - -+function ($) { - 'use strict'; - - // VALIDATOR CLASS DEFINITION - // ========================== - - function getValue($el) { - return $el.is('[type="checkbox"]') ? $el.prop('checked') : - $el.is('[type="radio"]') ? !!$('[name="' + $el.attr('name') + '"]:checked').length : - $el.is('select[multiple]') ? ($el.val() || []).length : - $el.val() - } - - var Validator = function (element, options) { - this.options = options - this.validators = $.extend({}, Validator.VALIDATORS, options.custom) - this.$element = $(element) - this.$btn = $('button[type="submit"], input[type="submit"]') - .filter('[form="' + this.$element.attr('id') + '"]') - .add(this.$element.find('input[type="submit"], button[type="submit"]')) - - this.update() - - this.$element.on('input.bs.validator change.bs.validator focusout.bs.validator', $.proxy(this.onInput, this)) - this.$element.on('submit.bs.validator', $.proxy(this.onSubmit, this)) - this.$element.on('reset.bs.validator', $.proxy(this.reset, this)) - - this.$element.find('[data-match]').each(function () { - var $this = $(this) - var target = $this.attr('data-match') - - $(target).on('input.bs.validator', function (e) { - getValue($this) && $this.trigger('input.bs.validator') - }) - }) - - // run validators for fields with values, but don't clobber server-side errors - this.$inputs.filter(function () { - return getValue($(this)) && !$(this).closest('.has-error').length - }).trigger('focusout') - - this.$element.attr('novalidate', true) // disable automatic native validation - } - - Validator.VERSION = '0.11.9' - - Validator.INPUT_SELECTOR = ':input:not([type="hidden"], [type="submit"], [type="reset"], button)' - - Validator.FOCUS_OFFSET = 20 - - Validator.DEFAULTS = { - delay: 500, - html: false, - disable: true, - focus: true, - custom: {}, - errors: { - match: 'Does not match', - minlength: 'Not long enough' - }, - feedback: { - success: 'glyphicon-ok', - error: 'glyphicon-remove' - } - } - - Validator.VALIDATORS = { - 'native': function ($el) { - var el = $el[0] - if (el.checkValidity) { - return !el.checkValidity() && !el.validity.valid && (el.validationMessage || "error!") - } - }, - 'match': function ($el) { - var target = $el.attr('data-match') - return $el.val() !== $(target).val() && Validator.DEFAULTS.errors.match - }, - 'minlength': function ($el) { - var minlength = $el.attr('data-minlength') - return $el.val().length < minlength && Validator.DEFAULTS.errors.minlength - } - } - - Validator.prototype.update = function () { - var self = this - - this.$inputs = this.$element.find(Validator.INPUT_SELECTOR) - .add(this.$element.find('[data-validate="true"]')) - .not(this.$element.find('[data-validate="false"]') - .each(function () { self.clearErrors($(this)) }) - ) - - this.toggleSubmit() - - return this - } - - Validator.prototype.onInput = function (e) { - var self = this - var $el = $(e.target) - var deferErrors = e.type !== 'focusout' - - if (!this.$inputs.is($el)) return - - this.validateInput($el, deferErrors).done(function () { - self.toggleSubmit() - }) - } - - Validator.prototype.validateInput = function ($el, deferErrors) { - var value = getValue($el) - var prevErrors = $el.data('bs.validator.errors') - - if ($el.is('[type="radio"]')) $el = this.$element.find('input[name="' + $el.attr('name') + '"]') - - var e = $.Event('validate.bs.validator', {relatedTarget: $el[0]}) - this.$element.trigger(e) - if (e.isDefaultPrevented()) return - - var self = this - - return this.runValidators($el).done(function (errors) { - $el.data('bs.validator.errors', errors) - - errors.length - ? deferErrors ? self.defer($el, self.showErrors) : self.showErrors($el) - : self.clearErrors($el) - - if (!prevErrors || errors.toString() !== prevErrors.toString()) { - e = errors.length - ? $.Event('invalid.bs.validator', {relatedTarget: $el[0], detail: errors}) - : $.Event('valid.bs.validator', {relatedTarget: $el[0], detail: prevErrors}) - - self.$element.trigger(e) - } - - self.toggleSubmit() - - self.$element.trigger($.Event('validated.bs.validator', {relatedTarget: $el[0]})) - }) - } - - - Validator.prototype.runValidators = function ($el) { - var errors = [] - var deferred = $.Deferred() - - $el.data('bs.validator.deferred') && $el.data('bs.validator.deferred').reject() - $el.data('bs.validator.deferred', deferred) - - function getValidatorSpecificError(key) { - return $el.attr('data-' + key + '-error') - } - - function getValidityStateError() { - var validity = $el[0].validity - return validity.typeMismatch ? $el.attr('data-type-error') - : validity.patternMismatch ? $el.attr('data-pattern-error') - : validity.stepMismatch ? $el.attr('data-step-error') - : validity.rangeOverflow ? $el.attr('data-max-error') - : validity.rangeUnderflow ? $el.attr('data-min-error') - : validity.valueMissing ? $el.attr('data-required-error') - : null - } - - function getGenericError() { - return $el.attr('data-error') - } - - function getErrorMessage(key) { - return getValidatorSpecificError(key) - || getValidityStateError() - || getGenericError() - } - - $.each(this.validators, $.proxy(function (key, validator) { - var error = null - if ((getValue($el) || $el.attr('required')) && - ($el.attr('data-' + key) !== undefined || key == 'native') && - (error = validator.call(this, $el))) { - error = getErrorMessage(key) || error - !~errors.indexOf(error) && errors.push(error) - } - }, this)) - - if (!errors.length && getValue($el) && $el.attr('data-remote')) { - this.defer($el, function () { - var data = {} - data[$el.attr('name')] = getValue($el) - $.get($el.attr('data-remote'), data) - .fail(function (jqXHR, textStatus, error) { errors.push(getErrorMessage('remote') || error) }) - .always(function () { deferred.resolve(errors)}) - }) - } else deferred.resolve(errors) - - return deferred.promise() - } - - Validator.prototype.validate = function () { - var self = this - - $.when(this.$inputs.map(function (el) { - return self.validateInput($(this), false) - })).then(function () { - self.toggleSubmit() - self.focusError() - }) - - return this - } - - Validator.prototype.focusError = function () { - if (!this.options.focus) return - - var $input = this.$element.find(".has-error :input:first") - if ($input.length === 0) return - - $('html, body').animate({scrollTop: $input.offset().top - Validator.FOCUS_OFFSET}, 250) - $input.focus() - } - - Validator.prototype.showErrors = function ($el) { - var method = this.options.html ? 'html' : 'text' - var errors = $el.data('bs.validator.errors') - var $group = $el.closest('.form-group') - var $block = $group.find('.help-block.with-errors') - var $feedback = $group.find('.form-control-feedback') - - if (!errors.length) return - - errors = $('
    ') - .addClass('list-unstyled') - .append($.map(errors, function (error) { return $('
  • ')[method](error) })) - - $block.data('bs.validator.originalContent') === undefined && $block.data('bs.validator.originalContent', $block.html()) - $block.empty().append(errors) - $group.addClass('has-error has-danger') - - $group.hasClass('has-feedback') - && $feedback.removeClass(this.options.feedback.success) - && $feedback.addClass(this.options.feedback.error) - && $group.removeClass('has-success') - } - - Validator.prototype.clearErrors = function ($el) { - var $group = $el.closest('.form-group') - var $block = $group.find('.help-block.with-errors') - var $feedback = $group.find('.form-control-feedback') - - $block.html($block.data('bs.validator.originalContent')) - $group.removeClass('has-error has-danger has-success') - - $group.hasClass('has-feedback') - && $feedback.removeClass(this.options.feedback.error) - && $feedback.removeClass(this.options.feedback.success) - && getValue($el) - && $feedback.addClass(this.options.feedback.success) - && $group.addClass('has-success') - } - - Validator.prototype.hasErrors = function () { - function fieldErrors() { - return !!($(this).data('bs.validator.errors') || []).length - } - - return !!this.$inputs.filter(fieldErrors).length - } - - Validator.prototype.isIncomplete = function () { - function fieldIncomplete() { - var value = getValue($(this)) - return !(typeof value == "string" ? $.trim(value) : value) - } - - return !!this.$inputs.filter('[required]').filter(fieldIncomplete).length - } - - Validator.prototype.onSubmit = function (e) { - this.validate() - if (this.isIncomplete() || this.hasErrors()) e.preventDefault() - } - - Validator.prototype.toggleSubmit = function () { - if (!this.options.disable) return - this.$btn.toggleClass('disabled', this.isIncomplete() || this.hasErrors()) - } - - Validator.prototype.defer = function ($el, callback) { - callback = $.proxy(callback, this, $el) - if (!this.options.delay) return callback() - window.clearTimeout($el.data('bs.validator.timeout')) - $el.data('bs.validator.timeout', window.setTimeout(callback, this.options.delay)) - } - - Validator.prototype.reset = function () { - this.$element.find('.form-control-feedback') - .removeClass(this.options.feedback.error) - .removeClass(this.options.feedback.success) - - this.$inputs - .removeData(['bs.validator.errors', 'bs.validator.deferred']) - .each(function () { - var $this = $(this) - var timeout = $this.data('bs.validator.timeout') - window.clearTimeout(timeout) && $this.removeData('bs.validator.timeout') - }) - - this.$element.find('.help-block.with-errors') - .each(function () { - var $this = $(this) - var originalContent = $this.data('bs.validator.originalContent') - - $this - .removeData('bs.validator.originalContent') - .html(originalContent) - }) - - this.$btn.removeClass('disabled') - - this.$element.find('.has-error, .has-danger, .has-success').removeClass('has-error has-danger has-success') - - return this - } - - Validator.prototype.destroy = function () { - this.reset() - - this.$element - .removeAttr('novalidate') - .removeData('bs.validator') - .off('.bs.validator') - - this.$inputs - .off('.bs.validator') - - this.options = null - this.validators = null - this.$element = null - this.$btn = null - this.$inputs = null - - return this - } - - // VALIDATOR PLUGIN DEFINITION - // =========================== - - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var options = $.extend({}, Validator.DEFAULTS, $this.data(), typeof option == 'object' && option) - var data = $this.data('bs.validator') - - if (!data && option == 'destroy') return - if (!data) $this.data('bs.validator', (data = new Validator(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.validator - - $.fn.validator = Plugin - $.fn.validator.Constructor = Validator - - - // VALIDATOR NO CONFLICT - // ===================== - - $.fn.validator.noConflict = function () { - $.fn.validator = old - return this - } - - - // VALIDATOR DATA-API - // ================== - - $(window).on('load', function () { - $('form[data-toggle="validator"]').each(function () { - var $form = $(this) - Plugin.call($form, $form.data()) - }) - }) - -}(jQuery); diff --git a/src/asset-files/plugins/bootstrap-validator/dist/validator.min.js b/src/asset-files/plugins/bootstrap-validator/dist/validator.min.js deleted file mode 100755 index f3a9e70..0000000 --- a/src/asset-files/plugins/bootstrap-validator/dist/validator.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Validator v0.11.9 for Bootstrap 3, by @1000hz - * Copyright 2017 Cina Saffary - * Licensed under http://opensource.org/licenses/MIT - * - * https://github.com/1000hz/bootstrap-validator - */ - -+function(a){"use strict";function b(b){return b.is('[type="checkbox"]')?b.prop("checked"):b.is('[type="radio"]')?!!a('[name="'+b.attr("name")+'"]:checked').length:b.is("select[multiple]")?(b.val()||[]).length:b.val()}function c(b){return this.each(function(){var c=a(this),e=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b),f=c.data("bs.validator");(f||"destroy"!=b)&&(f||c.data("bs.validator",f=new d(this,e)),"string"==typeof b&&f[b]())})}var d=function(c,e){this.options=e,this.validators=a.extend({},d.VALIDATORS,e.custom),this.$element=a(c),this.$btn=a('button[type="submit"], input[type="submit"]').filter('[form="'+this.$element.attr("id")+'"]').add(this.$element.find('input[type="submit"], button[type="submit"]')),this.update(),this.$element.on("input.bs.validator change.bs.validator focusout.bs.validator",a.proxy(this.onInput,this)),this.$element.on("submit.bs.validator",a.proxy(this.onSubmit,this)),this.$element.on("reset.bs.validator",a.proxy(this.reset,this)),this.$element.find("[data-match]").each(function(){var c=a(this),d=c.attr("data-match");a(d).on("input.bs.validator",function(){b(c)&&c.trigger("input.bs.validator")})}),this.$inputs.filter(function(){return b(a(this))&&!a(this).closest(".has-error").length}).trigger("focusout"),this.$element.attr("novalidate",!0)};d.VERSION="0.11.9",d.INPUT_SELECTOR=':input:not([type="hidden"], [type="submit"], [type="reset"], button)',d.FOCUS_OFFSET=20,d.DEFAULTS={delay:500,html:!1,disable:!0,focus:!0,custom:{},errors:{match:"Does not match",minlength:"Not long enough"},feedback:{success:"glyphicon-ok",error:"glyphicon-remove"}},d.VALIDATORS={"native":function(a){var b=a[0];return b.checkValidity?!b.checkValidity()&&!b.validity.valid&&(b.validationMessage||"error!"):void 0},match:function(b){var c=b.attr("data-match");return b.val()!==a(c).val()&&d.DEFAULTS.errors.match},minlength:function(a){var b=a.attr("data-minlength");return a.val().length").addClass("list-unstyled").append(a.map(d,function(b){return a("
  • ")[c](b)})),void 0===f.data("bs.validator.originalContent")&&f.data("bs.validator.originalContent",f.html()),f.empty().append(d),e.addClass("has-error has-danger"),e.hasClass("has-feedback")&&g.removeClass(this.options.feedback.success)&&g.addClass(this.options.feedback.error)&&e.removeClass("has-success"))},d.prototype.clearErrors=function(a){var c=a.closest(".form-group"),d=c.find(".help-block.with-errors"),e=c.find(".form-control-feedback");d.html(d.data("bs.validator.originalContent")),c.removeClass("has-error has-danger has-success"),c.hasClass("has-feedback")&&e.removeClass(this.options.feedback.error)&&e.removeClass(this.options.feedback.success)&&b(a)&&e.addClass(this.options.feedback.success)&&c.addClass("has-success")},d.prototype.hasErrors=function(){function b(){return!!(a(this).data("bs.validator.errors")||[]).length}return!!this.$inputs.filter(b).length},d.prototype.isIncomplete=function(){function c(){var c=b(a(this));return!("string"==typeof c?a.trim(c):c)}return!!this.$inputs.filter("[required]").filter(c).length},d.prototype.onSubmit=function(a){this.validate(),(this.isIncomplete()||this.hasErrors())&&a.preventDefault()},d.prototype.toggleSubmit=function(){this.options.disable&&this.$btn.toggleClass("disabled",this.isIncomplete()||this.hasErrors())},d.prototype.defer=function(b,c){return c=a.proxy(c,this,b),this.options.delay?(window.clearTimeout(b.data("bs.validator.timeout")),void b.data("bs.validator.timeout",window.setTimeout(c,this.options.delay))):c()},d.prototype.reset=function(){return this.$element.find(".form-control-feedback").removeClass(this.options.feedback.error).removeClass(this.options.feedback.success),this.$inputs.removeData(["bs.validator.errors","bs.validator.deferred"]).each(function(){var b=a(this),c=b.data("bs.validator.timeout");window.clearTimeout(c)&&b.removeData("bs.validator.timeout")}),this.$element.find(".help-block.with-errors").each(function(){var b=a(this),c=b.data("bs.validator.originalContent");b.removeData("bs.validator.originalContent").html(c)}),this.$btn.removeClass("disabled"),this.$element.find(".has-error, .has-danger, .has-success").removeClass("has-error has-danger has-success"),this},d.prototype.destroy=function(){return this.reset(),this.$element.removeAttr("novalidate").removeData("bs.validator").off(".bs.validator"),this.$inputs.off(".bs.validator"),this.options=null,this.validators=null,this.$element=null,this.$btn=null,this.$inputs=null,this};var e=a.fn.validator;a.fn.validator=c,a.fn.validator.Constructor=d,a.fn.validator.noConflict=function(){return a.fn.validator=e,this},a(window).on("load",function(){a('form[data-toggle="validator"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery); \ No newline at end of file diff --git a/src/assets/DatePickerAsset.php b/src/assets/DatePickerAsset.php deleted file mode 100644 index c67ebd9..0000000 --- a/src/assets/DatePickerAsset.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @author Olawale Lawal - */ -class DatePickerAsset extends BaseReportsAsset -{ - public $css = [ - 'datepicker/bootstrap-datepicker3.standalone.min.css' - ]; - - public $js = [ - 'datepicker/bootstrap-datepicker.min.js' - ]; - - public $depends = [ - 'yii\web\JqueryAsset' - ]; -} diff --git a/src/assets/ReportsAsset.php b/src/assets/ReportsAsset.php new file mode 100644 index 0000000..ae2c8be --- /dev/null +++ b/src/assets/ReportsAsset.php @@ -0,0 +1,19 @@ + + * @package CottaCush\Cricket\Report\Assets + */ +class ReportsAsset extends BaseReportsAsset +{ + public $css = [ + 'css/styles.css' + ]; + + public $depends = [ + 'CottaCush\Cricket\Assets\CricketAsset' + ]; +} diff --git a/src/assets/SQLReportErrorAsset.php b/src/assets/SQLReportErrorAsset.php index 1e80e4b..83fd28c 100644 --- a/src/assets/SQLReportErrorAsset.php +++ b/src/assets/SQLReportErrorAsset.php @@ -9,7 +9,7 @@ */ class SQLReportErrorAsset extends BaseReportsAsset { - public $css = [ - 'css/reports.css' + public $depends = [ + 'CottaCush\Cricket\Report\Assets\ReportsAsset' ]; } diff --git a/src/assets/SQLReportFilterFormAsset.php b/src/assets/SQLReportFilterFormAsset.php index 91d77d6..59d63b4 100644 --- a/src/assets/SQLReportFilterFormAsset.php +++ b/src/assets/SQLReportFilterFormAsset.php @@ -11,15 +11,12 @@ class SQLReportFilterFormAsset extends BaseReportsAsset { public $js = [ - 'widgets/report-filter-form.js', - 'plugins/bootstrap-validator/dist/validator.min.js' - ]; - - public $css = [ - 'css/reports.css' + self::ASSETS_JS_PATH . '/widgets/report-filter-form.js', ]; public $depends = [ - 'CottaCush\Cricket\Report\Assets\DatePickerAsset', + 'CottaCush\Cricket\Report\Assets\ReportsAsset', + 'CottaCush\Cricket\Assets\DatePickerAsset', + 'CottaCush\Cricket\Assets\BootstrapValidatorAsset', ]; } diff --git a/src/generators/SQLReportFilterFactory.php b/src/generators/SQLReportFilterFactory.php index 5154186..1a355da 100644 --- a/src/generators/SQLReportFilterFactory.php +++ b/src/generators/SQLReportFilterFactory.php @@ -59,7 +59,11 @@ public function createWidget($value = null) case PlaceholderType::TYPE_DATE: return Html::beginTag('div', ['class' => 'form-group col-sm-6']) . Html::label($description, $name, ['class' => 'control-label']) . - Html::textInput($name, $value, ['class' => 'form-control date-picker', 'required' => true]) . + Html::textInput( + $name, + $value, + ['class' => 'form-control date-picker', 'required' => true, 'autocomplete' => "off"] + ) . Html::endTag('div'); break; @@ -77,7 +81,11 @@ public function createWidget($value = null) default: return Html::beginTag('div', ['class' => 'form-group col-sm-6']) . Html::label($description, $name, ['class' => 'control-label']) . - Html::textInput($name, $value, ['class' => 'form-control', 'required' => true]) . + Html::textInput( + $name, + $value, + ['class' => 'form-control', 'required' => true, 'autocomplete' => "off"] + ) . Html::endTag('div'); break; } diff --git a/src/views/default/error.php b/src/views/default/error.php index 21a3f01..29cb886 100644 --- a/src/views/default/error.php +++ b/src/views/default/error.php @@ -10,7 +10,7 @@ 'Error' ]; -echo Html::beginTag('div', ['class' => 'reports-wrapper']); +echo Html::beginTag('div', ['class' => 'cricket-wrapper']); echo ReportErrorWidget::widget([ 'report' => $report, 'details' => $details, diff --git a/src/views/default/exception.php b/src/views/default/exception.php index 4243bf2..105b5f3 100644 --- a/src/views/default/exception.php +++ b/src/views/default/exception.php @@ -7,8 +7,8 @@ $this->params['breadcrumbs'] = []; -echo Html::beginTag('div', ['class' => 'reports-wrapper']); -echo '

     

    '.EmptyStateWidget::widget([ +echo Html::beginTag('div', ['class' => 'cricket-wrapper']); +echo '

     

    ' . EmptyStateWidget::widget([ 'icon' => $icon, 'description' => Html::tag('h3', $message) ]); diff --git a/src/views/default/view.php b/src/views/default/view.php index 80a2442..0b7e890 100644 --- a/src/views/default/view.php +++ b/src/views/default/view.php @@ -23,7 +23,7 @@ ] ); -echo Html::beginTag('div', ['class' => 'reports-wrapper']); +echo Html::beginTag('div', ['class' => 'cricket-wrapper']); if ($hasPlaceholders && !$hasPlaceholdersReplaced) { echo SQLReportFilterWidget::widget([ 'report' => $report,'excludeBootstrapAssets' => $excludeBootstrapAssets