├── src ├── public │ ├── font-awesome │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── less │ │ │ ├── fixed-width.less │ │ │ ├── screen-reader.less │ │ │ ├── larger.less │ │ │ ├── list.less │ │ │ ├── core.less │ │ │ ├── stacked.less │ │ │ ├── font-awesome.less │ │ │ ├── bordered-pulled.less │ │ │ ├── rotated-flipped.less │ │ │ ├── path.less │ │ │ ├── animated.less │ │ │ └── mixins.less │ │ ├── scss │ │ │ ├── _fixed-width.scss │ │ │ ├── _screen-reader.scss │ │ │ ├── _larger.scss │ │ │ ├── _list.scss │ │ │ ├── _core.scss │ │ │ ├── font-awesome.scss │ │ │ ├── _stacked.scss │ │ │ ├── _bordered-pulled.scss │ │ │ ├── _rotated-flipped.scss │ │ │ ├── _path.scss │ │ │ ├── _animated.scss │ │ │ └── _mixins.scss │ │ └── HELP-US-OUT.txt │ ├── eonasdan-bootstrap-datetimepicker │ │ ├── src │ │ │ ├── nuget │ │ │ │ ├── NuGet.exe │ │ │ │ ├── install.ps1 │ │ │ │ ├── Bootstrap.v3.Datetimepicker.CSS.nuspec │ │ │ │ └── Bootstrap.v3.Datetimepicker.nuspec │ │ │ ├── sass │ │ │ │ ├── bootstrap-datetimepicker-build.scss │ │ │ │ └── _bootstrap-datetimepicker.scss │ │ │ └── less │ │ │ │ ├── bootstrap-datetimepicker-build.less │ │ │ │ └── _bootstrap-datetimepicker.less │ │ ├── docs │ │ │ ├── Version 4 Changelog.md │ │ │ ├── Version 4 Contributors guide.md │ │ │ ├── FAQ.md │ │ │ ├── Events.md │ │ │ ├── Extras.md │ │ │ ├── Installing.md │ │ │ ├── ContributorsGuide.md │ │ │ ├── ChangeLog.md │ │ │ ├── Options.md │ │ │ └── index.md │ │ ├── component.json │ │ ├── composer.json │ │ ├── bower.json │ │ ├── mkdocs.yml │ │ ├── LICENSE │ │ ├── .bower.json │ │ ├── package.json │ │ ├── CONTRIBUTING.md │ │ ├── README.md │ │ ├── build │ │ │ └── css │ │ │ │ ├── bootstrap-datetimepicker-standalone.css │ │ │ │ ├── bootstrap-datetimepicker.min.css │ │ │ │ └── bootstrap-datetimepicker.css │ │ ├── tasks │ │ │ └── bump_version.js │ │ └── Gruntfile.js │ ├── priceformat │ │ └── price_format.min.js │ ├── css │ │ └── data-grid.css │ └── js │ │ └── data-grid.js ├── GridController.php ├── GridServiceProvider.php ├── Helpers.php ├── views │ ├── pesquisaAvancada.blade.php │ └── grid.blade.php └── Grid.php ├── composer.json ├── LICENSE.md └── README.md /src/public/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rafwell/laravel-grid/HEAD/src/public/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/public/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rafwell/laravel-grid/HEAD/src/public/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/public/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rafwell/laravel-grid/HEAD/src/public/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/public/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rafwell/laravel-grid/HEAD/src/public/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/public/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rafwell/laravel-grid/HEAD/src/public/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/src/nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rafwell/laravel-grid/HEAD/src/public/eonasdan-bootstrap-datetimepicker/src/nuget/NuGet.exe -------------------------------------------------------------------------------- /src/public/font-awesome/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/public/font-awesome/less/screen-reader.less: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { .sr-only(); } 5 | .sr-only-focusable { .sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /src/public/font-awesome/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/public/font-awesome/scss/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { @include sr-only(); } 5 | .sr-only-focusable { @include sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /src/GridController.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

The page has moved to: 6 | this page

-------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap-datetimepicker", 3 | "version": "4.17.37", 4 | "main": ["build/css/bootstrap-datetimepicker.min.css","build/js/bootstrap-datetimepicker.min.js"], 5 | "dependencies": { 6 | "jquery" : ">=1.8.3", 7 | "moment": ">=2.9.0" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/docs/Version 4 Contributors guide.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

The page has moved to: 6 | this page

-------------------------------------------------------------------------------- /src/public/font-awesome/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /src/public/font-awesome/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/public/font-awesome/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/public/font-awesome/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/public/font-awesome/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/src/sass/bootstrap-datetimepicker-build.scss: -------------------------------------------------------------------------------- 1 | // Import bootstrap variables including default color palette and fonts 2 | //@import "../../node_modules/bootstrap/less/variables.less"; 3 | 4 | .sr-only { 5 | position: absolute; 6 | width: 1px; 7 | height: 1px; 8 | margin: -1px; 9 | padding: 0; 10 | overflow: hidden; 11 | clip: rect(0,0,0,0); 12 | border: 0; 13 | } 14 | 15 | // Import datepicker component 16 | @import "_bootstrap-datetimepicker"; 17 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rafwell/laravel-grid", 3 | "description": "Um componente simples para geração de grids poderosos com Laravel.", 4 | "authors": [{ 5 | "name": "Rafael Alves", 6 | "email": "rafaotec@gmail.com" 7 | }], 8 | "require": { 9 | "maatwebsite/excel": "^3.1" 10 | }, 11 | "minimum-stability": "dev", 12 | "license": "MIT", 13 | "autoload": { 14 | "psr-4": { 15 | "Rafwell\\Grid\\": "src/" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/public/font-awesome/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/public/font-awesome/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/public/font-awesome/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | @import "screen-reader"; 19 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/src/less/bootstrap-datetimepicker-build.less: -------------------------------------------------------------------------------- 1 | // Import bootstrap variables including default color palette and fonts 2 | @import "bootstrap/less/variables.less"; 3 | 4 | // Import datepicker component 5 | @import "_bootstrap-datetimepicker.less"; 6 | 7 | //this is here so the compiler doesn't complain about a missing bootstrap mixin 8 | .sr-only { 9 | position: absolute; 10 | width: 1px; 11 | height: 1px; 12 | margin: -1px; 13 | padding: 0; 14 | overflow: hidden; 15 | clip: rect(0,0,0,0); 16 | border: 0; 17 | } 18 | -------------------------------------------------------------------------------- /src/public/font-awesome/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/public/font-awesome/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/public/font-awesome/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | @import "screen-reader.less"; 19 | -------------------------------------------------------------------------------- /src/public/font-awesome/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .@{fa-css-prefix}-pull-left { float: left; } 11 | .@{fa-css-prefix}-pull-right { float: right; } 12 | 13 | .@{fa-css-prefix} { 14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .@{fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /src/public/font-awesome/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .#{$fa-css-prefix}-pull-left { float: left; } 11 | .#{$fa-css-prefix}-pull-right { float: right; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .#{$fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /src/public/font-awesome/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /src/public/font-awesome/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eonasdan/bootstrap-datetimepicker", 3 | "type": "component", 4 | "version": "4.17.37", 5 | "description": "Date/time picker widget based on twitter bootstrap", 6 | "keywords": [ 7 | "bootstrap", 8 | "datetimepicker" 9 | ], 10 | "homepage": "http://eonasdan.github.io/bootstrap-datetimepicker/", 11 | "license": "MIT", 12 | "require": { 13 | "robloach/component-installer": "*", 14 | "components/jquery": ">=1.9.1", 15 | "moment/moment": ">=2.8" 16 | }, 17 | "extra": { 18 | "component": { 19 | "scripts": [ 20 | "src/js/bootstrap-datetimepicker.js" 21 | ], 22 | "files": [ 23 | "build/js/bootstrap-datetimepicker.min.js", 24 | "build/css/bootstrap-datetimepicker.min.css" 25 | ] 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/public/font-awesome/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /src/public/font-awesome/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /src/public/font-awesome/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/public/font-awesome/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eonasdan-bootstrap-datetimepicker", 3 | "version": "4.17.37", 4 | "main": [ 5 | "build/css/bootstrap-datetimepicker.min.css", 6 | "build/js/bootstrap-datetimepicker.min.js" 7 | ], 8 | "dependencies": { 9 | "jquery": ">=1.8.3", 10 | "moment": ">=2.9.0", 11 | "moment-timezone": ">=0.4.0" 12 | }, 13 | "homepage": "https://github.com/Eonasdan/bootstrap-datetimepicker", 14 | "authors": [ 15 | "Eonasdan" 16 | ], 17 | "description": "bootstrap3 datetimepicker", 18 | "keywords": [ 19 | "twitter-bootstrap", 20 | "bootstrap", 21 | "datepicker", 22 | "datetimepicker", 23 | "timepicker", 24 | "moment" 25 | ], 26 | "license": "MIT", 27 | "private": false, 28 | "ignore": [ 29 | "**/.*", 30 | "node_modules", 31 | "bower_components", 32 | "test", 33 | "tests" 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: Bootstrap 3 Datepicker 2 | theme: bootstrap 3 | extra_javascript: ['//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.js','//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/src/js/bootstrap-datetimepicker.js'] 4 | extra_css: ['//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/build/css/bootstrap-datetimepicker.css'] 5 | repo_url: https://github.com/Eonasdan/bootstrap-datetimepicker 6 | pages: 7 | - ['index.md', 'Usage'] 8 | - ['Installing.md', 'Installing'] 9 | - ['Functions.md', 'Functions'] 10 | - ['Options.md', 'Options'] 11 | - ['Events.md', 'Events'] 12 | - ['Changelog.md', 'Change Log'] 13 | - ['ContributorsGuide.md', 'Dev Guide'] 14 | - ['Extras.md', 'Extras'] 15 | - ['FAQ.md', 'FAQs'] 16 | - ['Version 4 Changelog.md', ''] 17 | - ['Version 4 Contributors guide.md', ''] -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Rafael Alves de Souza 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Jonathan Peterson (@Eonasdan) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/docs/FAQ.md: -------------------------------------------------------------------------------- 1 | # FAQs 2 | 3 | # How do I disable the date or time element 4 | How do I format ...; How do I add seconds; etc. 5 | 6 | The picker uses the `format` option to decide what components to show. Set `format` to `LT`, `LTS` or another valid [MomentJs format string](http://momentjs.com/docs/#/displaying/format/) to display certain components 7 | 8 | # How do I change the language/locale 9 | 10 | The picker uses MomentJs to determine the language string. You can use `moment-with-locales` or you can include whatever local file you need. Set the picker's `locale` option to `de` or whatever the locale string is. 11 | 12 | # How do I change the styles? The picker closes. 13 | 14 | Set `debug:true` which will force the picker to stay open, even `onBlur`. You can hide the picker manually by calling `hide()` 15 | 16 | # How do I change the start of the week? 17 | 18 | Start of the week is based on the [`locale` provided](Options.md#locale). This is defined by moment's locales. If you want to change it, create your own locale file or override. [See moment's docs](http://momentjs.com/docs/#/i18n/). 19 | 20 | # How I use the picker as birthday picker? 21 | 22 | Use the [`viewMode`](Options.md#viewmode) option to `'years'` -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eonasdan-bootstrap-datetimepicker", 3 | "version": "4.17.37", 4 | "main": [ 5 | "build/css/bootstrap-datetimepicker.min.css", 6 | "build/js/bootstrap-datetimepicker.min.js" 7 | ], 8 | "dependencies": { 9 | "jquery": ">=1.8.3", 10 | "moment": ">=2.9.0", 11 | "moment-timezone": ">=0.4.0" 12 | }, 13 | "homepage": "https://github.com/Eonasdan/bootstrap-datetimepicker", 14 | "authors": [ 15 | "Eonasdan" 16 | ], 17 | "description": "bootstrap3 datetimepicker", 18 | "keywords": [ 19 | "twitter-bootstrap", 20 | "bootstrap", 21 | "datepicker", 22 | "datetimepicker", 23 | "timepicker", 24 | "moment" 25 | ], 26 | "license": "MIT", 27 | "private": false, 28 | "ignore": [ 29 | "**/.*", 30 | "node_modules", 31 | "bower_components", 32 | "test", 33 | "tests" 34 | ], 35 | "_release": "4.17.37", 36 | "_resolution": { 37 | "type": "version", 38 | "tag": "4.17.37", 39 | "commit": "fd8bd86dd78f789fb742798b7d49aba0a957af62" 40 | }, 41 | "_source": "https://github.com/Eonasdan/bootstrap-datetimepicker.git", 42 | "_target": "^4.17.37", 43 | "_originalSource": "eonasdan-bootstrap-datetimepicker", 44 | "_direct": true 45 | } -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Jonathan Peterson" 4 | }, 5 | "bugs": { 6 | "url": "https://github.com/eonasdan/bootstrap-datetimepicker/issues" 7 | }, 8 | "dependencies": { 9 | "moment": "~2.8", 10 | "moment-timezone" : "~0.4", 11 | "bootstrap": "^3.3", 12 | "jquery": ">=1.8.3 <2.2.0" 13 | }, 14 | "description": "A date/time picker component designed to work with Bootstrap 3 and Momentjs. For usage, installation and demos see Project Site on GitHub", 15 | "devDependencies": { 16 | "grunt": "latest", 17 | "grunt-contrib-jasmine": "^0.7.0", 18 | "grunt-contrib-jshint": "latest", 19 | "grunt-contrib-less": "latest", 20 | "grunt-contrib-uglify": "latest", 21 | "grunt-jscs": "latest", 22 | "grunt-string-replace": "latest", 23 | "load-grunt-tasks": "latest", 24 | "grunt-nuget": "^0.1.4" 25 | }, 26 | "homepage": "http://eonasdan.github.io/bootstrap-datetimepicker/", 27 | "keywords": [ 28 | "twitter-bootstrap", 29 | "bootstrap", 30 | "datepicker", 31 | "datetimepicker", 32 | "timepicker", 33 | "moment" 34 | ], 35 | "license": "MIT", 36 | "main": "src/js/bootstrap-datetimepicker.js", 37 | "name": "eonasdan-bootstrap-datetimepicker", 38 | "repository": { 39 | "type": "git", 40 | "url": "https://github.com/eonasdan/bootstrap-datetimepicker.git" 41 | }, 42 | "version": "4.17.37" 43 | } 44 | -------------------------------------------------------------------------------- /src/GridServiceProvider.php: -------------------------------------------------------------------------------- 1 | loadViewsFrom(__DIR__.'/views', 'grid'); 18 | $this->publishes([ 19 | __DIR__.'/public' => public_path('vendor/rafwell/data-grid'), 20 | ]); 21 | view()->share('grid_css_files',[ 22 | 'vendor/rafwell/data-grid/css/data-grid.css?'.md5('vendor/rafwell/data-grid/css/data-grid.css') 23 | ]); 24 | view()->share('grid_js_files',[ 25 | 'vendor/rafwell/data-grid/js/data-grid.js?'.md5('vendor/rafwell/data-grid/js/data-grid.js') 26 | ]); 27 | } 28 | 29 | /** 30 | * Register the application services. 31 | * 32 | * @return void 33 | */ 34 | public function register() 35 | { 36 | /* 37 | * Register the service provider for the dependency. 38 | */ 39 | $this->app->register('Maatwebsite\Excel\ExcelServiceProvider'); 40 | /* 41 | * Create aliases for the dependency. 42 | */ 43 | $loader = \Illuminate\Foundation\AliasLoader::getInstance(); 44 | $loader->alias('Excel', 'Maatwebsite\Excel\Facades\Excel'); 45 | 46 | } 47 | 48 | /** 49 | * Get the services provided by the provider. 50 | * 51 | * @return array 52 | */ 53 | public function provides() 54 | { 55 | return [Connection::class]; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/public/font-awesome/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | .fa-icon-rotate(@degrees, @rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})"; 16 | -webkit-transform: rotate(@degrees); 17 | -ms-transform: rotate(@degrees); 18 | transform: rotate(@degrees); 19 | } 20 | 21 | .fa-icon-flip(@horiz, @vert, @rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)"; 23 | -webkit-transform: scale(@horiz, @vert); 24 | -ms-transform: scale(@horiz, @vert); 25 | transform: scale(@horiz, @vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | .sr-only() { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | .sr-only-focusable() { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/public/font-awesome/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | @mixin fa-icon-rotate($degrees, $rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})"; 16 | -webkit-transform: rotate($degrees); 17 | -ms-transform: rotate($degrees); 18 | transform: rotate($degrees); 19 | } 20 | 21 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)"; 23 | -webkit-transform: scale($horiz, $vert); 24 | -ms-transform: scale($horiz, $vert); 25 | transform: scale($horiz, $vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | @mixin sr-only { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | @mixin sr-only-focusable { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Submitting Issues 2 | ================= 3 | 4 | If you are submitting a bug, please test and/or fork [this jsfiddle](http://jsfiddle.net/Eonasdan/0Ltv25o8/) demonstrating the issue. Code issues and fringe case bugs that do not include a jsfiddle (or similar) will be closed. 5 | 6 | Issues that are submitted without a description (title only) will be closed with no further explanation. 7 | 8 | Contributing code 9 | ================= 10 | 11 | To contribute, fork the library and install grunt and dependencies. You need [node](http://nodejs.org/); use [nvm](https://github.com/creationix/nvm) or [nenv](https://github.com/ryuone/nenv) to install it. 12 | 13 | ```bash 14 | git clone https://github.com/Eonasdan/bootstrap-datetimepicker.git 15 | cd bootstrap-datetimepicker 16 | npm install -g grunt-cli 17 | npm install 18 | git checkout development # all patches against development branch, please! 19 | grunt # this runs tests and jshint 20 | ``` 21 | 22 | Very important notes 23 | ==================== 24 | 25 | * **Pull requests to the `master` branch will be closed.** Please submit all pull requests to the `development` branch. 26 | * **Do not include the minified files in your pull request.** Don't worry, we'll build them when we cut a release. 27 | * Pull requests that do not include a description (title only) and the following will be closed: 28 | * What the change does 29 | * A use case (for new features or enhancements) 30 | 31 | Grunt tasks 32 | =========== 33 | 34 | We use Grunt for managing the build. Here are some useful Grunt tasks: 35 | 36 | * `grunt` The default task lints the code and runs the tests. You should make sure you do this before submitting a PR. 37 | * `grunt build` Compiles the less stylesheet and minifies the javascript source in build directory. 38 | * `grunt build:travis` Compliles and runs the jasmine/travis tests. **All PR's MUST pass tests in place** -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/docs/Events.md: -------------------------------------------------------------------------------- 1 | ## Events 2 | 3 | ### dp.hide 4 | 5 | Fired when the widget is hidden. 6 | 7 | Parameters: 8 | 9 | ``` 10 | e = { 11 | date //the currently set date. Type: moment object (clone) 12 | } 13 | ``` 14 | 15 | Emitted from: 16 | 17 | * toggle() 18 | * hide() 19 | * disable() 20 | 21 | ---------------------- 22 | 23 | ### dp.show 24 | 25 | Fired when the widget is shown. 26 | 27 | Parameters: 28 | 29 | No parameters are include, listen to `dp.change` instead 30 | 31 | Emitted from: 32 | 33 | * toggle() 34 | * show() 35 | 36 | ---------------------- 37 | 38 | ### dp.change 39 | 40 | Fired when the date is changed. 41 | 42 | Parameters: 43 | 44 | ``` 45 | e = { 46 | date, //date the picker changed to. Type: moment object (clone) 47 | oldDate //previous date. Type: moment object (clone) or false in the event of a null 48 | } 49 | ``` 50 | 51 | Emitted from: 52 | 53 | * toggle() **Note**: Only fired when using `useCurrent` 54 | * show() **Note**: Only fired when using `useCurrent` or when or the date is changed to comply with date rules (min/max etc) 55 | * date(newDate) 56 | * minDate(minDate) 57 | * maxDate(maxDate) 58 | * daysOfWeekDisabled() 59 | 60 | ---------------------- 61 | 62 | ### dp.error 63 | 64 | Fired when a selected date fails to pass validation. 65 | 66 | Parameters: 67 | 68 | ``` 69 | e = { 70 | date //the invalid date. Type: moment object (clone) 71 | } 72 | ``` 73 | 74 | Emmited from: 75 | 76 | * minDate(minDate) 77 | * maxDate(maxDate) 78 | * daysOfWeekDisabled() 79 | * setValue() *private function* 80 | 81 | ---------------------- 82 | 83 | ### dp.update 84 | 85 | 4.14.30 86 | 87 | Fired (in most cases) when the `viewDate` changes. E.g. Next and Previous buttons, selecting a year. 88 | 89 | Parameters: 90 | 91 | ``` 92 | e = { 93 | change, //Change type as a momentjs format token. Type: string e.g. yyyy on year change 94 | viewDate //new viewDate. Type: moment object 95 | } 96 | ``` -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/src/nuget/Bootstrap.v3.Datetimepicker.CSS.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bootstrap.v3.Datetimepicker.CSS 5 | 4.0.0 6 | Bootstrap 3 Datetimepicker CSS 7 | Eonasdan 8 | Eonasdan 9 | https://github.com/Eonasdan/bootstrap-datetimepicker 10 | false 11 | A date/time picker component designed to work with Bootstrap 3 and Momentjs. 12 | 13 | For usage, installation and demos see Project Site on GitHub 14 | 15 | For LESS version install Bootstrap.v3.Datetimepicker 16 | 17 | Check the change log on Github at https://github.com/Eonasdan/bootstrap-datetimepicker/wiki/Change-Log 18 | 19 | IMPORANT! The Nuget packages will be depreciated in an upcoming release. Moving forward, Asp.Net/Nuget will NOT be delivering content packages like this one and you will need to use bower. See https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1128 for more 20 | 21 | bootstrap date time picker datetimepicker datepicker jquery 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/src/nuget/Bootstrap.v3.Datetimepicker.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bootstrap.v3.Datetimepicker 5 | 4.0.0 6 | Bootstrap 3 Datetimepicker 7 | Eonasdan 8 | Eonasdan 9 | https://github.com/Eonasdan/bootstrap-datetimepicker 10 | false 11 | A date/time picker component designed to work with Bootstrap 3 and Momentjs. 12 | 13 | For usage, installation and demos see Project Site on GitHub 14 | 15 | For CSS version install Bootstrap.v3.Datetimepicker.CSS 16 | 17 | Check the change log on Github at https://github.com/Eonasdan/bootstrap-datetimepicker/wiki/Change-Log 18 | 19 | IMPORANT! The Nuget packages will be depreciated in an upcoming release. Moving forward, Asp.Net/Nuget will NOT be delivering content packages like this one and you will need to use bower. See https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1128 for more 20 | 21 | bootstrap date time picker datetimepicker datepicker jquery 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/README.md: -------------------------------------------------------------------------------- 1 | # Bootstrap 3 Date/Time Picker 2 | ![GitHub version](https://badge.fury.io/gh/Eonasdan%2Fbootstrap-datetimepicker.png)   ![Travis](https://travis-ci.org/Eonasdan/bootstrap-datetimepicker.svg?branch=development)   [![Stories in Ready](https://badge.waffle.io/Eonasdan/bootstrap-datetimepicker.png?label=ready&title=Ready)](https://waffle.io/Eonasdan/bootstrap-datetimepicker) 3 | 4 | ![DateTimePicker](http://i.imgur.com/nfnvh5g.png) 5 | 6 | ## [View the manual and demos](http://eonasdan.github.io/bootstrap-datetimepicker/) 7 | 8 | # v4.17.37 9 | 10 | Is the current stable release. The latest and greatest changes are available from the [development branch](https://github.com/Eonasdan/bootstrap-datetimepicker/tree/development) 11 | 12 | # Version 5 13 | 14 | IMPORANT! The Nuget packages will be depreciated in this release. Moving forward, Asp.Net/Nuget will **NOT** be delivering content packages like this one and you will need to use bower. See [this issue for more]( https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1128) 15 | 16 | v5 is [in planning](https://github.com/Eonasdan/bootstrap-datetimepicker/issues/841). We welcome your suggestions. 17 | 18 | A major update is a great time to make be able to make breaking changes. 19 | 20 | ## Submitting Issues 21 | If you have issues, please check the following first: 22 | * Have you read the docs? 23 | * Do you have the latest version of momentjs? 24 | * Do you have the latest version of jQuery? 25 | * Please test and/or fork [this jsfiddle](http://jsfiddle.net/Eonasdan/0Ltv25o8/) with an example of your issue before you post an issue here. 26 | * Please indicate which version of the picker you are using (this can be found at the top of any included file) 27 | 28 | ## Where do you use this? 29 | I'd love to know if your public site is using this plugin and list your logo on the documentation site. Please email me `me at eonasdan dot com`. 30 | 31 | ##Priority support is available at an hourly rate. 32 | 33 | If you have an urgent request, bug or need installation help, please contact me at `me at eonasdan dot com` for a quote. 34 | 35 | ## [Installation instructions](http://eonasdan.github.io/bootstrap-datetimepicker/Installing/) 36 | 37 | ## [Change Log](http://eonasdan.github.io/bootstrap-datetimepicker/Changelog/) 38 | -------------------------------------------------------------------------------- /src/public/priceformat/price_format.min.js: -------------------------------------------------------------------------------- 1 | (function(e){e.fn.priceFormat=function(t){var n={prefix:"US$ ",suffix:"",centsSeparator:".",thousandsSeparator:",",limit:false,centsLimit:2,clearPrefix:false,clearSufix:false,allowNegative:false,insertPlusSign:false,clearOnEmpty:false};var t=e.extend(n,t);return this.each(function(){function m(e){if(n.is("input"))n.val(e);else n.html(e)}function g(){if(n.is("input"))r=n.val();else r=n.html();return r}function y(e){var t="";for(var n=0;n0;m--){char_=h.substr(m-1,1);f++;if(f%3==0)char_=a+char_;i=char_+i}if(i.substr(0,1)==a)i=i.substring(1,i.length);r=l==0?i:i+u+c}if(p&&(h!=0||c!=0)){if(t.indexOf("-")!=-1&&t.indexOf("+")=48&&t<=57||t>=96&&t<=105)i=true;if(t==8)i=true;if(t==9)i=true;if(t==13)i=true;if(t==46)i=true;if(t==37)i=true;if(t==39)i=true;if(p&&(t==189||t==109||t==173))i=true;if(d&&(t==187||t==107||t==61))i=true;if(!i){e.preventDefault();e.stopPropagation();if(s!=o)m(o)}}function S(){var e=g();var t=w(e);if(e!=t)m(t);if(parseFloat(e)==0&&v)m("")}function x(){n.val(s+g())}function T(){n.val(g()+o)}function N(){if(e.trim(s)!=""&&c){var t=g().split(s);m(t[1])}}function C(){if(e.trim(o)!=""&&h){var t=g().split(o);m(t[0])}}var n=e(this);var r="";var i=/[0-9]/;if(n.is("input"))r=n.val();else r=n.html();var s=t.prefix;var o=t.suffix;var u=t.centsSeparator;var a=t.thousandsSeparator;var f=t.limit;var l=t.centsLimit;var c=t.clearPrefix;var h=t.clearSuffix;var p=t.allowNegative;var d=t.insertPlusSign;var v=t.clearOnEmpty;if(d)p=true;n.bind("keydown.price_format",E);n.bind("keyup.price_format",S);n.bind("focusout.price_format",S);if(c){n.bind("focusout.price_format",function(){N()});n.bind("focusin.price_format",function(){x()})}if(h){n.bind("focusout.price_format",function(){C()});n.bind("focusin.price_format",function(){T()})}if(g().length>0){S();N();C()}})};e.fn.unpriceFormat=function(){return e(this).unbind(".price_format")};e.fn.unmask=function(){var t;var n="";if(e(this).is("input"))t=e(this).val();else t=e(this).html();for(var r in t){if(!isNaN(t[r])||t[r]=="-")n+=t[r]}return n}})(jQuery) -------------------------------------------------------------------------------- /src/Helpers.php: -------------------------------------------------------------------------------- 1 | "input-group") do 20 | text_field(method, :value => formatted_date, :class => "form-control datepicker", :"data-date-format" => "YYYY-MM-DD") + 21 | @template.content_tag(:span, @template.content_tag(:span, "", :class => "glyphicon glyphicon-calendar") ,:class => "input-group-addon") 22 | end 23 | end 24 | 25 | def datetime_select(method, options = {}, html_options = {}) 26 | existing_time = @object.send(method) 27 | formatted_time = existing_time.to_time.strftime("%F %I:%M %p") if existing_time.present? 28 | @template.content_tag(:div, :class => "input-group") do 29 | text_field(method, :value => formatted_time, :class => "form-control datetimepicker", :"data-date-format" => "YYYY-MM-DD hh:mm A") + 30 | @template.content_tag(:span, @template.content_tag(:span, "", :class => "glyphicon glyphicon-calendar") ,:class => "input-group-addon") 31 | end 32 | end 33 | end 34 | end 35 | end 36 | ``` 37 | 38 | The time format used here is ActiveRecord-friendly, which means it will be parsed correctly when passed in through `params` to your record. 39 | 40 | That's all there is to it! Now all of your forms that use `datetime_select` or `date_select` will be automatically updated: 41 | 42 | ```erb 43 | <% form_for @post do |f| %> 44 |
45 | 46 | <%= f.datetime_select :published_at %> 47 |
48 | <% end %> 49 | ``` 50 | 51 | ## IE 7 52 | 53 | by [EquilibriumCST](https://github.com/EquilibriumCST) 54 | 55 | I succeed to run this widget under IE7. 56 | Here is what I did. 57 | 58 | 1. gliphicons are not working under IE7 so add [this css file](https://github.com/coliff/bootstrap-ie7). And this enables the icons. 59 | 60 | 2. Z-index problem with IE 7. I added position: relative and `z-index: 10` to the parent container. Otherwise popup is shown under the next elements. 61 | 62 | 3. JS events were not working well. 63 | 64 | If you open the datetimepicker widget and click on some button or date inside it, widget is automatically closed. 65 | So I added `debug: true` as an option when initializing the widget. Why I did this? I saw on line 1121 from bootsrap-datetimepicker.js the code `'blur': options.debug ? '' : hide`. 66 | And now widget window is not closed on every click inside it, but now you can't close it anyway :) 67 | And closing should be done manually. I've added this document click handler. If you click something outside the widget, now closing works. 68 | 69 | ``` 70 | $(document).click(function(e){ 71 | var target = $(e.target); 72 | if(target.parents('.bootstrap-datetimepicker-widget').length < 1 && !target.hasClass('datetimepickerInput') && !target.hasClass('datepickerIcon') && !target.hasClass('clockpickerIcon')){ 73 | if($('.bootstrap-datetimepicker-widget').length > 0){ 74 | $('#startDate').data('DateTimePicker').hide(); 75 | $('#startTime').data('DateTimePicker').hide(); 76 | $('.datetimepickerInput').blur(); 77 | } 78 | } 79 | }); 80 | ``` 81 | 82 | 83 | But if you have more than one widget on the page like I did, clicking on one widget does'n close the other. Added below lines and now all works fine. 84 | 85 | ``` 86 | $('#widget1').on("dp.show",function (e) { 87 | $('#widget2).data('DateTimePicker').hide(); 88 | }); 89 | 90 | $('#widget2').on("dp.show",function (e) { 91 | $('#widget1).data('DateTimePicker').hide(); 92 | }); 93 | ``` 94 | 95 | I hope this will help to the others who are fighting with the old IE versions :) -------------------------------------------------------------------------------- /src/public/css/data-grid.css: -------------------------------------------------------------------------------- 1 | .grid-container{ 2 | margin-bottom: 10px; 3 | } 4 | .grid-container .pesquisa{ 5 | margin-bottom: 15px; 6 | display: inline-block; 7 | width: 100%; 8 | } 9 | .grid-container .pesquisa form{ 10 | width: auto; 11 | position:relative; 12 | float: left; 13 | } 14 | 15 | .grid-container .pesquisa .total-info{ 16 | height: 34px; 17 | line-height: 34px; 18 | display: inline-block; 19 | vertical-align: middle; 20 | float: left; 21 | } 22 | 23 | .grid-container .pesquisa .input-pesquisar{ 24 | width: 250px; 25 | padding-right: 35px; 26 | float: left; 27 | margin-right: 5px; 28 | } 29 | .grid-container .pesquisa .bt-pesquisar{ 30 | position: absolute; 31 | top: 0; 32 | left: 210px; 33 | margin-right: 5px; 34 | } 35 | .grid-container .pesquisa .bt-limpar-pesquisa{ 36 | float: left; 37 | margin-right: 5px; 38 | } 39 | 40 | .grid-container .pesquisa .bt-pesquisa-avancada{ 41 | float: left; 42 | margin-right: 5px; 43 | } 44 | 45 | .grid-container .nav-pagination{ 46 | width: 221px; 47 | float: right; 48 | } 49 | 50 | .grid-container .pesquisa-avancada .input-group-addon, 51 | .grid-container .pesquisa-avancada .datetimepicker{ 52 | font-size: 12px; 53 | color: #707478; 54 | } 55 | .grid-container .pesquisa-avancada .campos{ 56 | margin-left: -2.5px; 57 | margin-bottom: 15px; 58 | } 59 | .grid-container .pesquisa-avancada .campos:after{ 60 | content: ' '; 61 | display: table; 62 | width: 100%; 63 | } 64 | .grid-container .pesquisa-avancada .campo{ 65 | float: left; 66 | padding-left: 5px; 67 | width: 25%; 68 | height: 60px; 69 | margin-bottom: 10px; 70 | } 71 | .grid-container .pesquisa-avancada .campo.duplo{ 72 | width: 50%; 73 | } 74 | 75 | .grid-container .pesquisa-avancada .campo.duplo .de, 76 | .grid-container .pesquisa-avancada .campo.duplo .ate{ 77 | width: 50%; 78 | float: left; 79 | position: relative; 80 | } 81 | 82 | .grid-container .pesquisa-avancada .campo.duplo .ate{ 83 | padding-left: 5px; 84 | } 85 | 86 | .grid-container .pesquisa-avancada .campo.duplo .de .datetimepicker input, 87 | .grid-container .pesquisa-avancada .campo.duplo .ate .datetimepicker input{ 88 | padding-left: 45px; 89 | } 90 | .grid-container .pesquisa-avancada .campo.duplo .de .input.datetimepicker:before{ 91 | content: 'de:'; 92 | background-color: #eee; 93 | position: absolute; 94 | z-index: 4; 95 | padding: 7px 8px 8px 8px; 96 | border-radius: 4px 0px 0px 4px; 97 | vertical-align: middle; 98 | top: 1px; 99 | left: 1px; 100 | width: 37px; 101 | height: 32px; 102 | border-right: 1px solid #ccc; 103 | } 104 | 105 | .grid-container .pesquisa-avancada .campo.duplo .ate .input.datetimepicker:before{ 106 | content: 'até:'; 107 | background-color: #eee; 108 | position: absolute; 109 | z-index: 4; 110 | padding: 7px 8px 8px 8px; 111 | border-radius: 4px 0px 0px 4px; 112 | vertical-align: middle; 113 | top: 1px; 114 | left: 1px; 115 | width: 37px; 116 | height: 32px; 117 | border-right: 1px solid #ccc; 118 | } 119 | 120 | .grid-container .pesquisa-avancada form{ 121 | width: 100%; 122 | } 123 | .grid-container .pesquisa-avancada .remover{ 124 | opacity: 0; 125 | } 126 | .grid-container .pesquisa-avancada .pesquisado .remover{ 127 | opacity: 1; 128 | cursor: pointer; 129 | } 130 | .grid-container .pesquisa-avancada form .input-group.money, 131 | .grid-container .pesquisa-avancada form .input-group.integer, 132 | .grid-container .pesquisa-avancada form .input-group.numeric{ 133 | margin-bottom: 10px; 134 | } 135 | 136 | .grid-container table .acao{ 137 | float: left; 138 | margin: 0px 3px 3px 0px; 139 | } 140 | 141 | .grid-container table .nenhum-registro-encontrado{ 142 | text-align: center; 143 | } 144 | 145 | .grid-container table thead tr th .setas{ 146 | vertical-align: middle; 147 | margin-left: 0px; 148 | padding-top: 3px; 149 | float: left; 150 | margin-right: 4px; 151 | } 152 | 153 | .grid-container .acoes-em-massa select{ 154 | width: auto; 155 | margin: 0px 10px 10px 0px; 156 | } 157 | .grid-container table thead tr th .seta-cima:before { 158 | content: ""; 159 | display: inline-block; 160 | vertical-align: middle; 161 | width: 0; 162 | height: 0; 163 | border-left: 4px solid transparent; 164 | border-right: 4px solid transparent; 165 | border-bottom: 4px solid #000; 166 | width: auto; 167 | float: left; 168 | } 169 | 170 | .grid-container table thead tr th .seta-baixo:before { 171 | content: ""; 172 | display: inline-block; 173 | vertical-align: middle; 174 | margin-right: 0px; 175 | width: 0; 176 | height: 0; 177 | border-left: 4px solid transparent; 178 | border-right: 4px solid transparent; 179 | border-top: 4px solid #000; 180 | float: left; 181 | margin-left: -8px; 182 | margin-top: 6px; 183 | } 184 | .grid-container .exibindo-registros-info{ 185 | margin-bottom: 10px; 186 | } 187 | .grid-container .exibindo-registros-info select{ 188 | border: 1px solid #cecece; 189 | background-color: #fff; 190 | border-radius: 4px; 191 | } 192 | 193 | .grid-container .bt-exportar{ 194 | text-decoration: none; 195 | } 196 | 197 | .grid-container .pesquisa.pesquisa-simples{ 198 | width: auto; 199 | } -------------------------------------------------------------------------------- /src/views/pesquisaAvancada.blade.php: -------------------------------------------------------------------------------- 1 |
2 | $opts){ 4 | if(!is_array($opts)) $opts = ['tipo'=>$opts]; 5 | if(!isset($opts['rotulo'])) $opts['rotulo'] = ucwords(str_replace('-', ' ', str_slug($campo))); 6 | switch ($opts['tipo']){ 7 | case 'text': ?> 8 |
9 | 10 | 11 |
12 | 15 |
16 | 17 | 23 |
24 | 28 |
29 |
30 | 31 |
32 | 33 | 34 | 35 | 36 |
37 |
38 |
39 | 40 |
41 | 42 | 43 | 44 | 45 |
46 |
47 |
48 | 51 |
52 |
53 | 54 |
55 | de: 56 | 57 |
58 |
59 |
60 | 61 |
62 | até: 63 | 64 |
65 |
66 |
67 | 71 |
72 |
73 | 74 |
75 | de: 76 | 77 |
78 |
79 |
80 | 81 |
82 | até: 83 | 84 |
85 |
86 |
87 | 91 |
-------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | 'use strict'; 3 | grunt.initConfig({ 4 | pkg: grunt.file.readJSON('package.json'), 5 | 6 | uglify : { 7 | target: { 8 | files: { 9 | 'build/js/bootstrap-datetimepicker.min.js' : 'src/js/bootstrap-datetimepicker.js' 10 | } 11 | }, 12 | options: { 13 | mangle: true, 14 | compress: { 15 | dead_code: false // jshint ignore:line 16 | }, 17 | output: { 18 | ascii_only: true // jshint ignore:line 19 | }, 20 | report: 'min', 21 | preserveComments: 'some' 22 | } 23 | }, 24 | 25 | jshint: { 26 | all: [ 27 | 'Gruntfile.js', 'src/js/*.js', 'test/*.js' 28 | ], 29 | options: { 30 | 'browser' : true, 31 | 'node' : true, 32 | 'jquery' : true, 33 | 'boss' : false, 34 | 'curly' : true, 35 | 'debug' : false, 36 | 'devel' : false, 37 | 'eqeqeq' : true, 38 | 'bitwise' : true, 39 | 'eqnull' : true, 40 | 'evil' : false, 41 | 'forin' : true, 42 | 'immed' : false, 43 | 'laxbreak' : false, 44 | 'newcap' : true, 45 | 'noarg' : true, 46 | 'noempty' : false, 47 | 'nonew' : false, 48 | 'onevar' : true, 49 | 'plusplus' : false, 50 | 'regexp' : false, 51 | 'undef' : true, 52 | 'sub' : true, 53 | 'strict' : true, 54 | 'unused' : true, 55 | 'white' : true, 56 | 'es3' : true, 57 | 'camelcase' : true, 58 | 'quotmark' : 'single', 59 | 'globals': { 60 | 'define': false, 61 | 'moment': false, 62 | // Jasmine 63 | 'jasmine': false, 64 | 'describe': false, 65 | 'xdescribe': false, 66 | 'expect': false, 67 | 'it': false, 68 | 'xit': false, 69 | 'spyOn': false, 70 | 'beforeEach': false, 71 | 'afterEach': false 72 | } 73 | } 74 | }, 75 | 76 | jscs: { 77 | all: [ 78 | 'Gruntfile.js', 'src/js/*.js', 'test/*.js' 79 | ], 80 | options: { 81 | config: '.jscs.json' 82 | } 83 | }, 84 | 85 | less: { 86 | production: { 87 | options: { 88 | cleancss: true, 89 | compress: true, 90 | paths: 'node_modules' 91 | }, 92 | files: { 93 | 'build/css/bootstrap-datetimepicker.min.css': 'src/less/bootstrap-datetimepicker-build.less' 94 | } 95 | }, 96 | development: { 97 | options: { 98 | paths: 'node_modules' 99 | }, 100 | files: { 101 | 'build/css/bootstrap-datetimepicker.css': 'src/less/bootstrap-datetimepicker-build.less' 102 | } 103 | } 104 | }, 105 | 106 | jasmine: { 107 | customTemplate: { 108 | src: 'src/js/*.js', 109 | options: { 110 | specs: 'test/*Spec.js', 111 | helpers: 'test/*Helper.js', 112 | styles: [ 113 | 'node_modules/bootstrap/dist/css/bootstrap.min.css', 114 | 'build/css/bootstrap-datetimepicker.min.css' 115 | ], 116 | vendor: [ 117 | 'node_modules/jquery/dist/jquery.min.js', 118 | 'node_modules/moment/min/moment-with-locales.min.js', 119 | 'node_modules/bootstrap/dist/js/bootstrap.min.js' 120 | ], 121 | display: 'none', 122 | summary: 'true' 123 | } 124 | } 125 | }, 126 | 127 | nugetpack: { 128 | less: { 129 | src: 'src/nuget/Bootstrap.v3.Datetimepicker.nuspec', 130 | dest: 'build/nuget', 131 | options: { 132 | version: '<%= pkg.version %>' 133 | } 134 | }, 135 | css: { 136 | src: 'src/nuget/Bootstrap.v3.Datetimepicker.CSS.nuspec', 137 | dest: 'build/nuget', 138 | options: { 139 | version: '<%= pkg.version %>' 140 | } 141 | } 142 | } 143 | }); 144 | 145 | grunt.loadTasks('tasks'); 146 | 147 | grunt.loadNpmTasks('grunt-contrib-jasmine'); 148 | grunt.loadNpmTasks('grunt-nuget'); 149 | 150 | // These plugins provide necessary tasks. 151 | require('load-grunt-tasks')(grunt); 152 | 153 | // Default task. 154 | grunt.registerTask('default', ['jshint', 'jscs', 'less', 'jasmine']); 155 | 156 | // travis build task 157 | grunt.registerTask('build:travis', [ 158 | // code style 159 | 'jshint', 'jscs', 160 | // build 161 | 'uglify', 'less', 162 | // tests 163 | 'jasmine' 164 | ]); 165 | 166 | // Task to be run when building 167 | grunt.registerTask('build', [ 168 | 'jshint', 'jscs', 'uglify', 'less' 169 | ]); 170 | 171 | grunt.registerTask('test', ['jshint', 'jscs', 'uglify', 'less', 'jasmine']); 172 | 173 | grunt.registerTask('docs', 'Generate docs', function () { 174 | grunt.util.spawn({ 175 | cmd: 'mkdocs', 176 | args: ['build', '--clean'] 177 | }); 178 | }); 179 | 180 | grunt.registerTask('release', function (version) { 181 | if (!version || version.split('.').length !== 3) { 182 | grunt.fail.fatal('malformed version. Use grunt release:1.2.3'); 183 | } 184 | 185 | grunt.task.run([ 186 | 'bump_version:' + version, 187 | 'build:travis', 188 | 'docs' 189 | ]); 190 | }); 191 | }; 192 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/docs/Installing.md: -------------------------------------------------------------------------------- 1 | # Minimal Requirements 2 | 3 | 1. jQuery 4 | 2. Moment.js 5 | 3. Bootstrap.js (transition and collapse are required if you're not using the full Bootstrap) 6 | 4. Bootstrap Datepicker script 7 | 5. Bootstrap CSS 8 | 6. Bootstrap Datepicker CSS 9 | 7. Locales: Moment's locale files are [here](https://github.com/moment/moment/tree/master/locale) 10 | 11 | # Installation Guides 12 | * [Bower](#bower-) 13 | * [Nuget](#nuget) 14 | * [Rails](#rails-) 15 | * [Angular](#angular-wrapper) 16 | * [Meteor.js](#meteorjs) 17 | * [Manual](#manual) 18 | 19 | ## [bower](http://bower.io) ![Bower version](https://badge.fury.io/bo/eonasdan-bootstrap-datetimepicker.png) 20 | 21 | Run the following command: 22 | ``` 23 | bower install eonasdan-bootstrap-datetimepicker#latest --save 24 | ``` 25 | 26 | Include necessary scripts and styles: 27 | ```html 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | ``` 38 | ## Nuget 39 | ### [LESS](https://www.nuget.org/packages/Bootstrap.v3.Datetimepicker/): ![NuGet version](https://badge.fury.io/nu/Bootstrap.v3.Datetimepicker.png) 40 | ``` 41 | PM> Install-Package Bootstrap.v3.Datetimepicker 42 | ``` 43 | 44 | ### [CSS](https://www.nuget.org/packages/Bootstrap.v3.Datetimepicker.CSS/): ![NuGet version](https://badge.fury.io/nu/Bootstrap.v3.Datetimepicker.CSS.png) 45 | ``` 46 | PM> Install-Package Bootstrap.v3.Datetimepicker.CSS 47 | ``` 48 | 49 | ```html 50 | 51 | 52 | 53 | 54 | 55 | 56 | 61 | 62 | ``` 63 | 64 | ## [Rails](http://rubygems.org/gems/bootstrap3-datetimepicker-rails) ![Gem Version](https://badge.fury.io/rb/bootstrap3-datetimepicker-rails.png) 65 | 66 | Add the following to your `Gemfile`: 67 | ```ruby 68 | gem 'momentjs-rails', '>= 2.9.0' 69 | gem 'bootstrap3-datetimepicker-rails', '~> 4.14.30' 70 | ``` 71 | Note: You may need to change the version number above to the version number on the badge above. 72 | Read the rest of the install instructions @ 73 | [TrevorS/bootstrap3-datetimepicker-rails](https://github.com/TrevorS/bootstrap3-datetimepicker-rails) 74 | 75 | 76 | ## Angular Wrapper 77 | Follow the link [here](https://gist.github.com/eugenekgn/f00c4d764430642dca4b) 78 | 79 | ## Meteor.js 80 | 81 | This widget has been package for the [Meteor.js](http://www.meteor.com/) platform, to install it use meteorite as follows: 82 | 83 | `$ mrt add tsega:bootstrap3-datetimepicker` 84 | 85 | For more detail see the package page on [Atmosphere](http://atmospherejs.com/package/bootstrap3-datetimepicker) 86 | 87 | ## Manual 88 | 89 | ### Acquire [jQuery](http://jquery.com) 90 | ### Acquire [Moment.js](https://github.com/moment/moment) 91 | ### Bootstrap 3 collapse and transition plugins 92 | Make sure to include *.JS files for plugins [collapse](http://getbootstrap.com/javascript/#collapse) and [transitions](http://getbootstrap.com/javascript/#transitions). They are included with [bootstrap in js/ directory](https://github.com/twbs/bootstrap/tree/master/js) 93 | Alternatively you could include the whole bundle of bootstrap plugins from [bootstrap.js](https://github.com/twbs/bootstrap/tree/master/dist/js) 94 | 95 | ```html 96 | 97 | 98 | 99 | 100 | 101 | 102 | ``` 103 | 104 | ## Knockout 105 | 106 | ``` 107 | ko.bindingHandlers.dateTimePicker = { 108 | init: function (element, valueAccessor, allBindingsAccessor) { 109 | //initialize datepicker with some optional options 110 | var options = allBindingsAccessor().dateTimePickerOptions || {}; 111 | $(element).datetimepicker(options); 112 | 113 | //when a user changes the date, update the view model 114 | ko.utils.registerEventHandler(element, "dp.change", function (event) { 115 | var value = valueAccessor(); 116 | if (ko.isObservable(value)) { 117 | if (event.date != null && !(event.date instanceof Date)) { 118 | value(event.date.toDate()); 119 | } else { 120 | value(event.date); 121 | } 122 | } 123 | }); 124 | 125 | ko.utils.domNodeDisposal.addDisposeCallback(element, function () { 126 | var picker = $(element).data("DateTimePicker"); 127 | if (picker) { 128 | picker.destroy(); 129 | } 130 | }); 131 | }, 132 | update: function (element, valueAccessor, allBindings, viewModel, bindingContext) { 133 | 134 | var picker = $(element).data("DateTimePicker"); 135 | //when the view model is updated, update the widget 136 | if (picker) { 137 | var koDate = ko.utils.unwrapObservable(valueAccessor()); 138 | 139 | //in case return from server datetime i am get in this form for example /Date(93989393)/ then fomat this 140 | koDate = (typeof (koDate) !== 'object') ? new Date(parseFloat(koDate.replace(/[^0-9]/g, ''))) : koDate; 141 | 142 | picker.date(koDate); 143 | } 144 | } 145 | }; 146 | ``` 147 | 148 | ### CSS styles 149 | 150 | #### Using LESS 151 | ```css 152 | @import "/path/to/bootstrap/less/variables"; 153 | @import "/path/to/bootstrap-datetimepicker/src/less/bootstrap-datetimepicker-build.less"; 154 | 155 | // [...] your custom styles and variables 156 | ``` 157 | 158 | Using CSS (default color palette) 159 | ```html 160 | 161 | ``` -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Datetimepicker for Bootstrap 3 3 | * version : 4.17.37 4 | * https://github.com/Eonasdan/bootstrap-datetimepicker/ 5 | */.bootstrap-datetimepicker-widget{list-style:none}.bootstrap-datetimepicker-widget.dropdown-menu{margin:2px 0;padding:4px;width:19em}@media (min-width:768px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}@media (min-width:992px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}@media (min-width:1200px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}.bootstrap-datetimepicker-widget.dropdown-menu:before,.bootstrap-datetimepicker-widget.dropdown-menu:after{content:'';display:inline-block;position:absolute}.bootstrap-datetimepicker-widget.dropdown-menu.bottom:before{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);top:-7px;left:7px}.bootstrap-datetimepicker-widget.dropdown-menu.bottom:after{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid white;top:-6px;left:8px}.bootstrap-datetimepicker-widget.dropdown-menu.top:before{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,0.2);bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.dropdown-menu.top:after{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid white;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget .list-unstyled{margin:0}.bootstrap-datetimepicker-widget a[data-action]{padding:6px 0}.bootstrap-datetimepicker-widget a[data-action]:active{box-shadow:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:54px;font-weight:bold;font-size:1.2em;margin:0}.bootstrap-datetimepicker-widget button[data-action]{padding:6px}.bootstrap-datetimepicker-widget .btn[data-action="incrementHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Increment Hours"}.bootstrap-datetimepicker-widget .btn[data-action="incrementMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Increment Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="decrementHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Decrement Hours"}.bootstrap-datetimepicker-widget .btn[data-action="decrementMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Decrement Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="showHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Show Hours"}.bootstrap-datetimepicker-widget .btn[data-action="showMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Show Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="togglePeriod"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Toggle AM/PM"}.bootstrap-datetimepicker-widget .btn[data-action="clear"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Clear the picker"}.bootstrap-datetimepicker-widget .btn[data-action="today"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Set the date to today"}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget .picker-switch::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Toggle Date and Time Screens"}.bootstrap-datetimepicker-widget .picker-switch td{padding:0;margin:0;height:auto;width:auto;line-height:inherit}.bootstrap-datetimepicker-widget .picker-switch td span{line-height:2.5;height:2.5em;width:100%}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget table td,.bootstrap-datetimepicker-widget table th{text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget table th{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget table th.picker-switch{width:145px}.bootstrap-datetimepicker-widget table th.disabled,.bootstrap-datetimepicker-widget table th.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget table th.prev::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Previous Month"}.bootstrap-datetimepicker-widget table th.next::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Next Month"}.bootstrap-datetimepicker-widget table thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget table thead tr:first-child th:hover{background:#eee}.bootstrap-datetimepicker-widget table td{height:54px;line-height:54px;width:54px}.bootstrap-datetimepicker-widget table td.cw{font-size:.8em;height:20px;line-height:20px;color:#777}.bootstrap-datetimepicker-widget table td.day{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget table td.day:hover,.bootstrap-datetimepicker-widget table td.hour:hover,.bootstrap-datetimepicker-widget table td.minute:hover,.bootstrap-datetimepicker-widget table td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget table td.old,.bootstrap-datetimepicker-widget table td.new{color:#777}.bootstrap-datetimepicker-widget table td.today{position:relative}.bootstrap-datetimepicker-widget table td.today:before{content:'';display:inline-block;border:solid transparent;border-width:0 0 7px 7px;border-bottom-color:#337ab7;border-top-color:rgba(0,0,0,0.2);position:absolute;bottom:4px;right:4px}.bootstrap-datetimepicker-widget table td.active,.bootstrap-datetimepicker-widget table td.active:hover{background-color:#337ab7;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget table td.active.today:before{border-bottom-color:#fff}.bootstrap-datetimepicker-widget table td.disabled,.bootstrap-datetimepicker-widget table td.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget table td span{display:inline-block;width:54px;height:54px;line-height:54px;margin:2px 1.5px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget table td span:hover{background:#eee}.bootstrap-datetimepicker-widget table td span.active{background-color:#337ab7;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget table td span.old{color:#777}.bootstrap-datetimepicker-widget table td span.disabled,.bootstrap-datetimepicker-widget table td span.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget.usetwentyfour td.hour{height:27px;line-height:27px}.bootstrap-datetimepicker-widget.wider{width:21em}.bootstrap-datetimepicker-widget .datepicker-decades .decade{line-height:1.8em !important}.input-group.date .input-group-addon{cursor:pointer}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0} -------------------------------------------------------------------------------- /src/public/js/data-grid.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('.grid-container .select-pagina').change(function(){ 3 | window.location.href = $(this).attr('data-url')+'&pagina='+$(this).val(); 4 | }); 5 | $('.grid-container .bt-limpar-pesquisa').click(function(){ 6 | var $form = $(this).closest('form'); 7 | $form.find('[name=pesquisar]').val(''); 8 | $form.submit(); 9 | }); 10 | 11 | $('.grid input[type="checkbox"].selecionar-todos').click(function(){ 12 | if($(this).is(':checked')){ 13 | $(this).closest('table').find('tbody input[type="checkbox"].grid-checkbox').prop('checked', true); 14 | }else{ 15 | $(this).closest('table').find('tbody input[type="checkbox"].grid-checkbox').prop('checked', false); 16 | } 17 | }); 18 | 19 | $('.grid input[type="checkbox"].grid-checkbox').click(function(){ 20 | if($(this).is(':checked') && $(this).closest('table').find('tbody input[type="checkbox"].grid-checkbox').not(':checked').length===0){ 21 | $(this).closest('table').find('input[type="checkbox"].selecionar-todos').prop('checked', true); 22 | }else{ 23 | $(this).closest('table').find('input[type="checkbox"].selecionar-todos').prop('checked', false); 24 | } 25 | }); 26 | 27 | $('.grid-container .acoes-em-massa select').change(function(){ 28 | if($(this).val()){ 29 | if($(this).closest('.grid-container').find('table tbody input[type="checkbox"].grid-checkbox:checked').length>0){ 30 | if(confirm('Deseja realmente aplicar esta ação aos itens selecionados?')){ 31 | var $form = $('
').attr('id', 'grid-form-acao-em-massa').attr('action', $(this).val()).attr('method', 'post'); 32 | $form.append(''); 33 | $form.append(''); 34 | $(this).closest('.grid-container').find('table tbody input[type="checkbox"].grid-checkbox:checked').each(function(){ 35 | $form.append(''); 36 | }); 37 | $('body').append($form); 38 | $('#grid-form-acao-em-massa').submit(); 39 | }else{ 40 | $(this).find('option:selected').prop('selected', false); 41 | $(this).find('option').first().prop('selected', true); 42 | return false; 43 | } 44 | }else{ 45 | alert('Selecione ao menos um item para aplicar a ação!'); 46 | $(this).find('option:selected').prop('selected', false); 47 | $(this).find('option').first().prop('selected', true); 48 | return false; 49 | } 50 | } 51 | }); 52 | 53 | $('.grid-container .pesquisa-avancada .datetimepicker.date').datetimepicker({ 54 | format: 'DD/MM/YYYY' 55 | }); 56 | 57 | $('.grid-container .pesquisa-avancada .datetimepicker.datetime').datetimepicker(); 58 | 59 | $('.grid-container .pesquisa-avancada .integer input').keydown(function (e) { 60 | // Allow: backspace, delete, tab, escape, enter and . 61 | if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110]) !== -1 || 62 | // Allow: Ctrl+A 63 | (e.keyCode == 65 && e.ctrlKey === true) || 64 | // Allow: Ctrl+C 65 | (e.keyCode == 67 && e.ctrlKey === true) || 66 | // Allow: Ctrl+X 67 | (e.keyCode == 88 && e.ctrlKey === true) || 68 | // Allow: home, end, left, right 69 | (e.keyCode >= 35 && e.keyCode <= 39)) { 70 | // let it happen, don't do anything 71 | return; 72 | } 73 | // Ensure that it is a number and stop the keypress 74 | if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) { 75 | e.preventDefault(); 76 | } 77 | }); 78 | 79 | $('.grid-container .pesquisa-avancada .numeric input').keydown(function (e) { 80 | // Allow: backspace, delete, tab, escape, enter and , 81 | if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 188]) !== -1 || 82 | // Allow: Ctrl+A 83 | (e.keyCode == 65 && e.ctrlKey === true) || 84 | // Allow: Ctrl+C 85 | (e.keyCode == 67 && e.ctrlKey === true) || 86 | // Allow: Ctrl+X 87 | (e.keyCode == 88 && e.ctrlKey === true) || 88 | // Allow: home, end, left, right 89 | (e.keyCode >= 35 && e.keyCode <= 39)) { 90 | // let it happen, don't do anything 91 | if($(this).val().indexOf(',')>=0 && e.keyCode==188) e.preventDefault(); 92 | else return; 93 | } 94 | // Ensure that it is a number and stop the keypress 95 | if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) { 96 | e.preventDefault(); 97 | } 98 | }); 99 | 100 | $('.grid-container .pesquisa-avancada .money input').priceFormat({ 101 | prefix: 'R$ ', 102 | centsSeparator: ',', 103 | thousandsSeparator: '.', 104 | clearPrefix: true, 105 | allowNegative:true, 106 | clearOnEmpty: true 107 | }); 108 | 109 | $('.grid-container .pesquisa-avancada .campo .remover').click(function(){ 110 | $(this).closest('.campo').not('.duplo').find('input, select').val(''); 111 | $(this).closest('.de').find('input, select').val(''); 112 | $(this).closest('.ate').find('input, select').val(''); 113 | $(this).closest('form').submit(); 114 | }); 115 | 116 | $('.grid-container .exibindo-registros-info select').change(function(){ 117 | window.location = $(this).attr('data-url')+'®istros-por-pagina='+$(this).val(); 118 | }); 119 | 120 | $('.grid-container select[name=exportar]').change(function(){ 121 | if($(this).val()){ 122 | $(this).closest('.grid-container').find('.bt-exportar').attr('href', $(this).closest('.grid-container').find('.bt-exportar').attr('data-href')+'&exportar='+$(this).val() ); 123 | }else{ 124 | $(this).closest('.grid-container').find('.bt-exportar').attr('href', '#'); 125 | } 126 | }); 127 | 128 | $('.grid-container .bt-exportar').click(function(e){ 129 | if($(this).attr('href')=='#'){ 130 | e.preventDefault(); 131 | alert('Selecione um formato para a exportação!'); 132 | return false; 133 | } 134 | }); 135 | 136 | $('.grid-container .pesquisa-avancada form').submit(function(e){ 137 | erros = ''; 138 | $(this).find('.integer input').each(function(){ 139 | if($(this).val().search(/[^0-9]/)>=0){ 140 | erros+='Informe um número inteiro válido no campo "'+$(this).closest('.campo').find('label').text()+'".\n'; 141 | } 142 | }); 143 | 144 | $(this).find('.numeric input').each(function(){ 145 | if($(this).val().search(/[^0-9\.,]/)>=0){ 146 | erros+='Informe um número válido no campo "'+$(this).closest('.campo').find('label').text()+'".\n'; 147 | } 148 | }); 149 | 150 | if(erros){ 151 | e.preventDefault(); 152 | alert(erros); 153 | } 154 | }); 155 | }); -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/docs/ContributorsGuide.md: -------------------------------------------------------------------------------- 1 | This guide is aimed to contributors wishing to understand the internals of the code in order to change/evolve the component. 2 | 3 | **Note:** this guide refers to **version 4** which is currently in beta and will be updated as we progress 4 | 5 | ## Introduction 6 | This component consists actually of 2 subcomponent UI widgets one for the date and one for the time selection process. The developers can configure which of those are needed and also the granularity that the component will allow the users to select a date/time. Developers also choose the format that the selected datetime will be displayed in the input field. 7 | The component uses on `jQuery`, `moment.js` and `bootstrap` libraries. 8 | 9 | ## Code 10 | ### Private variables 11 | 12 | * `element` - Holds the DOM element this instance is attached to 13 | 14 | * `options` - Holds an object with the curently set options for the specific instance of the component. Don't directly change the properties of that object use the public API methods instead. DO NOT expose this object or its properties outside of the component. 15 | 16 | * `picker` - Reference variable to the created instance `(this)` 17 | 18 | * `date` - Holds the moment object for the model value of the component. **DON'T** directly change this variable unless you **REALLY** know what you are doing. Use `setValue()` function to set it. It handles all component logic for updating the model value and emitting all the appropriate events 19 | 20 | * `viewDate` - Holds the currently selected value that the user has selected through the widget. This is not the model value this is the view value. Changing this usually requires a subsequent call to `update()` function 21 | 22 | * `unset` - A `boolean` variable that holds wheather the components model value is set or not. Model's value starts as `unset = true` and if is either set by the user or programmatically through the api to a valid value then it is set to `false`. If subsequent events lead to an invalid value then this variable is set to `true` again. Setting this variable usually takes place in the `setValue()` function. 23 | 24 | * `input` - Hold the DOM input element this instance is attached to 25 | 26 | * `component` - Holds a reference to the .input-group DOM element that the widget is attached or false if it is attached directly on an input field 27 | 28 | * `widget` - Holds a reference to the DOM element containing the widget or `false` if the widget is hidden 29 | 30 | * `use24hours` - Holds whether the component uses 24 hours format or not. This is initialized on the `format()` function 31 | 32 | * `minViewModeNumber` - Holds the Numeric equivelant of the options.minViewMode parameter 33 | 34 | * `format` - Holds the current format string that is used for formating the date model value. Note this is not the same thing as the `options.format` as the second could be set to `false` in which case the first takes the locale's `L` or `LT` value 35 | 36 | * `currentViewMode` - Hold the state of the current viewMode for the DatePicker subcomponent 37 | 38 | * `actions` - An object containing all the functions that can be called when the users clicks on the widget 39 | 40 | * `datePickerModes` - An array of objects with configuration parameters for the different views of the DatePicker subcomponent 41 | 42 | * `viewModes` - An array of strings containing all the possible strings that `options.viewMode` can take through `viewMode()` public api function 43 | 44 | * `directionModes` - An array of strings containing all the possible strings that `options.direction` can take through `direction()` public api function 45 | 46 | * `orientationModes` - An array of strings containing all the possible strings that `options.orientation` can take through `orientation()` public api function 47 | 48 | ### Private functions 49 | 50 | #### Widget related 51 | 52 | * `getDatePickerTemplate()` - returns a string containing the html code for the date picker subcomponent 53 | 54 | * `getTimePickerTemplate()` - returns a string containing the html code for the time picker subcomponent 55 | 56 | * `getTemplate()` - returns a string with containing the html code for all the DateTimePicker component 57 | 58 | * `place()` - handles the placement of the widget's dropdown 59 | 60 | * `updateMonths()` - updates the html subpage related to the months for Date picker view 61 | 62 | * `updateYears()` - updates the html subpage related to the years for Date picker view 63 | 64 | * `fillDate()` - updates the html subpage related to the days for Date picker view 65 | 66 | * `fillHours()` - Creates the hours spans for the hours subview of the Time subcomponent 67 | 68 | * `fillMinutes()` - Creates the minutes spans for the hours subview of the Time subcomponent 69 | 70 | * `fillSeconds()` - Creates the seconds spans for the hours subview of the Time subcomponent 71 | 72 | * `fillTime()` - Creates the main subview of the Time subcomponent 73 | 74 | * `update()` - updates the UI of part of the widget 75 | 76 | * `fillDow()` - Creates the day names in the days subview on the Date subcomponent 77 | 78 | * `fillMonths()` - Creates the month spans for the months subview of the Date subcomponent 79 | 80 | * `createWidget()` - creates the UI widget end attaches widget event listeners 81 | 82 | * `destroyWidget()` - destroys the UI widget DOM element and detaches widget event listeners 83 | 84 | * `showMode(dir)` - toggles between the various subpage related views of the DateTimePicker 85 | 86 | #### Events related 87 | 88 | * `notifyEvent(e)` - Use this function when you want to send en event to listener this could be used as a filter later 89 | 90 | * `stopEvent(e)` - Shortcut for stopping propagation of events 91 | 92 | * `doAction(e)` - Proxy function to call all the UI related click events 93 | 94 | * `keydown(e)` - Function to trap 95 | 96 | * `change(e)` - Listener function to track change events occuring on the `input` dom element the component is attached to 97 | 98 | * `attachDatePickerElementEvents()` - Attaches listeners to the existing DOM elements the component is attached to. Called upon construction of each datetimepicker instance 99 | 100 | * `detachDatePickerElementEvents()` - Detaches listeners from the DOM element the component is attached to. Called on `destroy()` 101 | 102 | * `attachDatePickerWidgetEvents()` - Attaches listeners on the components widget. Called on `show()` 103 | 104 | * `detachDatePickerWidgetEvents()` - Detaches listeners on the components widget. Called on `hide()` 105 | 106 | #### Model related 107 | 108 | * `setValue(targetMoment)` - Sets the model value of the component takes a moment object. An `error` event will be emmited if the `targetMoment` does not pass the configured validations. Otherwise the `date` variable will be set and the relevant events will be fired. 109 | 110 | * `isValid(targetMoment, granularity)` - returns `true` if the `targetMoment` moment object is valid according to the components set validation rules (`min/maxDates`, `disabled/enabledDates` and `daysOfWeekDisabled`). You may pass a second variable to check only up the the specific granularity `year, month, day, hour, minute, second` 111 | 112 | #### Utilities 113 | 114 | * `indexGivenDates (givenDatesArray)` - Function that takes the array from `enabledDates()` and `disabledDates()` public functions and stores them as object keys to enable quick lookup 115 | 116 | * `isInEnableDates(date)` - Checks whether if the given moment object exists in the `options.enabledDates` object 117 | 118 | * `isInDisableDates(date)` - Checks whether if the given moment object exists in the `options.disabledDates` array 119 | 120 | * `dataToOptions()` - Parses `data-date-*` options set on the input dom element the component is attached to and returns an object with them 121 | 122 | * `isInFixed()` - Checks if the dom element or its parents has a fixed position css rule. 123 | 124 | * `parseInputDate(date)` - Parses a date parameter with moment using the component's `options.format` and `options.useStrict`. It returns a `moment` object or false if `parsedMoment#isValid()` returns `false`. Use this to parse date inputs from outside the component (public API calls). 125 | 126 | * `init()` - Initializes the component. Called when the component instance is created 127 | -------------------------------------------------------------------------------- /src/views/grid.blade.php: -------------------------------------------------------------------------------- 1 |
2 | @if ($pesquisaAvancada && $pesquisaAvancadaAberta === true) 3 |
4 |
5 | @foreach($camposRequest as $campo=>$valor) 6 | @if ($campo<>'pesquisar') 7 | 8 | @endif 9 | @endforeach 10 |
11 | Pesquisa avançada 12 | @include('grid::pesquisaAvancada', ['campos'=>$pesquisaAvancadaCampos]) 13 | 16 | 17 | @if ($total>0) 18 | Página {{$paginaAtual}} de {{$totalPaginas}}. Total de {{$total}} registro{{$total>1 ? 's': ''}}. 19 | @endif 20 |
21 |
22 |
23 | @else 24 |
25 |
26 | @foreach($camposRequest as $campo=>$valor) 27 | @if ($campo<>'pesquisar') 28 | 29 | @endif 30 | @endforeach 31 | 32 | 33 | @if (isset($valorPesquisado) && $valorPesquisado<>'') 34 | 35 | @endif 36 | @if ($pesquisaAvancada && $pesquisaAvancadaAberta === false) 37 | 38 | @endif 39 |
40 | @if ($total>0) 41 | Página {{$paginaAtual}} de {{$totalPaginas}}. Total de {{$total}} registro{{$total>1 ? 's': ''}}. 42 | @endif 43 |
44 | @endif 45 | 46 |
47 |
48 | @if($acoesEmMassa) 49 |
50 | 56 |
57 | @endif 58 |
59 |
60 |
61 | Exibindo 62 | 67 | registros por página. 68 |
69 |
70 |
71 |
72 | 73 | 74 | 75 | @if($checkbox['exibir']) 76 | 79 | @endif 80 | @foreach ($campos as $k=>$v) 81 | 88 | @endforeach 89 | @if (isset($acoes)) 90 | 91 | @endif 92 | 93 | 94 | 95 | @if (isset($linhas) && count($linhas)>0) 96 | @foreach ($linhas as $linha) 97 | 98 | @if($checkbox['exibir']) 99 | 102 | @endif 103 | @foreach ($campos as $k=>$v) 104 | 105 | @endforeach 106 | @if (isset($acoes)) 107 | 134 | @endif 135 | 136 | @endforeach 137 | @else 138 | 139 | 142 | 143 | @endif 144 | 145 |
77 | 78 | 82 |
83 | 84 | 85 |
86 | {{$v['rotulo']}} 87 |
Ações
100 | 101 | {!!$linha[$v['alias']]!!} 108 | @foreach ($linha['gridAcoes'] as $acao) 109 | @if($acao['metodo']=='GET') 110 | 111 | @if (isset($acao['icone'])) 112 | 113 | @endif 114 | @if ($acao['somenteIcone']===false) 115 | {{$acao['titulo']}} 116 | @endif 117 | 118 | @else 119 |
> 120 | {{csrf_field()}} 121 | 122 | 130 |
131 | @endif 132 | @endforeach 133 |
140 | Nenhum registro encontrado. 141 |
146 |
147 | @if (isset($linhas) && count($linhas)>0) 148 |
149 |
150 | @if($permiteExportacao) 151 |
152 | 157 | Exportar 158 |
159 | @endif 160 |
161 |
162 | @if ($totalPaginas>1) 163 | 178 | @endif 179 |
180 |
181 | @endif 182 |
-------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Sobre o projeto 2 | **rafwell/laravel-grid** é um componente para criação de grids poderosos, com poucas linhas de código. O componente está pronto para funcionar com seu projeto em Bootstrap 3, possui funcionalidades de exportação para Excel ou XLS, pesquisa avançada ou simples, ordenação e ações em linha ou em massa. 3 | 4 | ## Aviso legal 5 | Uma nova versão deste pacote foi lançada, em um repositório separado para que você possa rodar os dois em simultâneo e realizar a migraço da maneira mais suave possível. Na nova versão temos suporte para multi-idioma e o código fonte está 100% em inglês. Novas funcionalidades só serão incluídas no novo repositório, deixando este depreciado. Este é o link [rafwell/laravel-simplegrid](https://github.com/rafwell/laravel-simplegrid). 6 | 7 | ## Disclaimer 8 | A new version of this package will released! The new version support multi-language features to expand our limits! This one repository was descontinued when the new is ready. All current features will be work on the new version, small modifications on structure (for best use) and the code will be rewriten to english. With this, it will not be possible to maintain a compatibility between the current and the new. However, because it is another repository, and another namespace, you can work with the two simultaneously, performing the migration smoothly. Here's the link for the new repository [rafwell/laravel-simplegrid](https://github.com/rafwell/laravel-simplegrid). 9 | 10 | ## Compatibilidade 11 | **rafwell/laravel-grid** é compatível com Laravel 5.2+ 12 | 13 | ## Instalação 14 | 1. Adicione a dependência ao seu composer.json ```composer require "rafwell/laravel-grid"```. 15 | 2. Adicione ao seu ```app/config/app.ph``` o seguinte provider: 16 | ``` 17 | Rafwell\Grid\GridServiceProvider::class 18 | ``` 19 | 3. Execute: ```php artisan vendor:publish``` 20 | 4. Inclua na sua view ou layout os arquivos js e css. Aqui espero que você já tenha o bootstrap configurado e funcionando no seu ambiente. Este pacote já inclui a versão necessária de cada componente para perfeita utilização, para sua comodidade. Mas você pode usar o CDN do distribuidor se preferir. 21 | 22 | ### JS e CSS de terceiros 23 | Este pacote foi escrito para trabalhar com bootstrap 3 e Jquery. Utilizamos os seguintes auxiliares, que você deve ter em seu projeto, para correta utilização das funções do sistema: 24 | 25 | * [Datetimepicker](https://eonasdan.github.io/bootstrap-datetimepicker/), para pesquisa avançada em campos date e datetime. 26 | * [Priceformat](http://jquerypriceformat.com/), para pesquisa avançada em campos money. 27 | * [Fontawesome](http://fontawesome.io/), para icones. 28 | 29 | Provavelmente você já tem esses componentes em seu sistema, pois são bem comuns em sistemas web. 30 | #### Arquivos JS 31 | ``` 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | ``` 40 | #### Arquivos CSS 41 | ``` 42 | 43 | 44 | 45 | 46 | 47 | 48 | ``` 49 | 50 | ## Um exemplo simples 51 | No seu controller: 52 | ``` 53 | use Rafwell\Grid\Grid; 54 | ``` 55 | Na sua função: 56 | ``` 57 | //Produto é um model para a tabela produtos 58 | $Grid = (new Grid(Produto::query(), 'ProdutoGridId')) 59 | ->campos([ 60 | 'id'=>'Código',//id é a coluna no banco de dados e 'Código' é como ela será exibida na tela 61 | 'descricao'=>'Descrição', 62 | 'status'=>[ //Exemplo utilizando campos calculados dentro do banco de dados 63 | 'rotulo'=>'Ativo', 64 | 'campo'=>"case when ativo = 1 then 'Sim' else 'Não' end" 65 | ], 66 | 'created_at'=>'Data Criação', 67 | 'preco'=>'Preço' 68 | ]) 69 | ->acao('Editar', 'admin/produtos/{id}/edit') //Botão editar, entre chaves "{}" qualquer campo que foi utilizado acima, inclusive os calculados. Neste caso: id, descricao ou status 70 | ->acao('Excluir', 'admin/produtos/{id}', false, false, 'DELETE', 'Deseja realmente excluir este registro?') 71 | ->pesquisaAvancada([ 72 | 'id'=>['rotulo'=>'Código','tipo'=>'integer'], 73 | 'created_at'=>['rotulo'=>'Data Criação','tipo'=>'date'], 74 | 'descricao'=>['rotulo'=>'Descrição','tipo'=>'text'], 75 | 'preco'=>['rotulo'=>'Preço','tipo'=>'money'], 76 | 77 | ])->trataLinha(function($linha){ 78 | $linha['created_at'] = date('d/m/Y', strtotime($linha['created_at'])); 79 | //O campo preço está sendo formatado via mutators dentro do model Produto 80 | return $linha; 81 | }); 82 | ``` 83 | Quando $Grid->make() é chamado, um sql semelhante a este será executado: 84 | ``` 85 | select 86 | id, 87 | descricao, 88 | status 89 | from ( 90 | select 91 | id, 92 | descricao, 93 | (case when ativo = 1 then 'Sim' else 'Não' end) as status 94 | from produtos 95 | ) s 96 | ``` 97 | Finalmente, exiba o grid na sua view: 98 | ``` 99 | {!!$grid!!} 100 | ``` 101 | A visualização será semelhante a isto: 102 | ![Imagem 1 - Grid simples](https://s31.postimg.org/5me80xvrf/Captura_de_tela_de_2016_08_01_20_23_54.png) 103 | 104 | ## Um exemplo um pouco mais completo 105 | No exemplo acima, ao realizar uma pesquisa na caixa de buscas todos os campos visíveis no grid são concatenados e pesquisados sob um like '%string%'. Na pesquisa avançada é possível pesquisar campo a campo, strings, inteiros, decimais, datas e horas, com a simples inclusão de uma chamada à função pesquisaAvancada. 106 | 107 | ``` 108 | //Produto é o model da tabela produtos 109 | $Grid = (new Grid(Produto::query(), 'ProdutoGridId')) 110 | ->campos([ 111 | 'id'=>'Código',//id é a coluna no banco de dados e 'Código' é como ela será exibida na tela 112 | 'descricao'=>'Descrição', 113 | 'status'=>[ //Exemplo utilizando campos calculados dentro do banco de dados 114 | 'rotulo'=>'Ativo', 115 | 'campo'=>"case when ativo = 1 then 'Sim' else 'Não' end" 116 | ], 117 | 'created_at'=>'Data Criação', 118 | 'preco'=>'Preço' 119 | ]) 120 | ->acao('Editar', 'admin/produtos/{id}/edit') //Botão editar, entre chaves "{}" qualquer campo que foi utilizado acima, inclusive os calculados. Neste caso: id, descricao ou status 121 | ->acao('Excluir', 'admin/produtos/{id}', false, false, 'DELETE', 'Deseja realmente excluir este registro?') 122 | ->pesquisaAvancada([ 123 | 'id'=>['rotulo'=>'Código','tipo'=>'integer'], 124 | 'created_at'=>['rotulo'=>'Data Criação','tipo'=>'date'], 125 | 'descricao'=>['rotulo'=>'Descrição','tipo'=>'text'], 126 | 'preco'=>['rotulo'=>'Preço','tipo'=>'money'], 127 | 128 | ])->trataLinha(function($linha){ 129 | $linha['created_at'] = date('d/m/Y', strtotime($linha['created_at'])); 130 | //O campo preço está sendo formatado via mutators dentro do model Produto 131 | return $linha; 132 | }); 133 | 134 | return view('suaview',[ 135 | 'grid'=>$Grid->make(), 136 | ]); 137 | ``` 138 | O resultado incluirá um botão de pesquisa avançada que quando clicado, exibirá o grid da seguinte maneira: 139 | ![Imagem 2 - Pesquisa avançada](https://s32.postimg.org/5k1ncfw11/Captura_de_tela_de_2016_08_01_20_21_04.png) 140 | 141 | ## Tratando ações em linha 142 | Em alguns casos você pode não querer exibir alguma ação em uma determinada linha. Por exemplo, para um orçamento aprovado, você pode permitir sua exclusão. Para solucionar este cenário, temos a função trataLinha, que pode alterar elementos do grid, inclusive as ações. Esta função é chamada a cada linha e você pode fazer sua verificação e tomar as ações necessárias: 143 | ``` 144 | ->trataLinha(function($linha){ 145 | if($linha['status_proposta_id'] === 2){ 146 | unset($linha['gridAcoes']['Excluir']); 147 | } 148 | return $linha; 149 | }) 150 | ``` 151 | ## License 152 | 153 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information. 154 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/src/sass/_bootstrap-datetimepicker.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Datetimepicker for Bootstrap 3 3 | * ! version : 4.7.14 4 | * https://github.com/Eonasdan/bootstrap-datetimepicker/ 5 | */ 6 | $bs-datetimepicker-timepicker-font-size: 1.2em !default; 7 | $bs-datetimepicker-active-bg: $btn-primary-bg !default; 8 | $bs-datetimepicker-active-color: $btn-primary-color !default; 9 | $bs-datetimepicker-border-radius: $border-radius-base !default; 10 | $bs-datetimepicker-btn-hover-bg: $gray-lighter !default; 11 | $bs-datetimepicker-disabled-color: $gray-light !default; 12 | $bs-datetimepicker-alternate-color: $gray-light !default; 13 | $bs-datetimepicker-secondary-border-color: #ccc !default; 14 | $bs-datetimepicker-secondary-border-color-rgba: rgba(0, 0, 0, 0.2) !default; 15 | $bs-datetimepicker-primary-border-color: white !default; 16 | $bs-datetimepicker-text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25) !default; 17 | 18 | .bootstrap-datetimepicker-widget { 19 | list-style: none; 20 | 21 | &.dropdown-menu { 22 | margin: 2px 0; 23 | padding: 4px; 24 | width: 19em; 25 | 26 | &.timepicker-sbs { 27 | @media (min-width: $screen-sm-min) { 28 | width: 38em; 29 | } 30 | 31 | @media (min-width: $screen-md-min) { 32 | width: 38em; 33 | } 34 | 35 | @media (min-width: $screen-lg-min) { 36 | width: 38em; 37 | } 38 | } 39 | 40 | &:before, &:after { 41 | content: ''; 42 | display: inline-block; 43 | position: absolute; 44 | } 45 | 46 | &.bottom { 47 | &:before { 48 | border-left: 7px solid transparent; 49 | border-right: 7px solid transparent; 50 | border-bottom: 7px solid $bs-datetimepicker-secondary-border-color; 51 | border-bottom-color: $bs-datetimepicker-secondary-border-color-rgba; 52 | top: -7px; 53 | left: 7px; 54 | } 55 | 56 | &:after { 57 | border-left: 6px solid transparent; 58 | border-right: 6px solid transparent; 59 | border-bottom: 6px solid $bs-datetimepicker-primary-border-color; 60 | top: -6px; 61 | left: 8px; 62 | } 63 | } 64 | 65 | &.top { 66 | &:before { 67 | border-left: 7px solid transparent; 68 | border-right: 7px solid transparent; 69 | border-top: 7px solid $bs-datetimepicker-secondary-border-color; 70 | border-top-color: $bs-datetimepicker-secondary-border-color-rgba; 71 | bottom: -7px; 72 | left: 6px; 73 | } 74 | 75 | &:after { 76 | border-left: 6px solid transparent; 77 | border-right: 6px solid transparent; 78 | border-top: 6px solid $bs-datetimepicker-primary-border-color; 79 | bottom: -6px; 80 | left: 7px; 81 | } 82 | } 83 | 84 | &.pull-right { 85 | &:before { 86 | left: auto; 87 | right: 6px; 88 | } 89 | 90 | &:after { 91 | left: auto; 92 | right: 7px; 93 | } 94 | } 95 | } 96 | 97 | .list-unstyled { 98 | margin: 0; 99 | } 100 | 101 | a[data-action] { 102 | padding: 6px 0; 103 | } 104 | 105 | a[data-action]:active { 106 | box-shadow: none; 107 | } 108 | 109 | .timepicker-hour, .timepicker-minute, .timepicker-second { 110 | width: 54px; 111 | font-weight: bold; 112 | font-size: $bs-datetimepicker-timepicker-font-size; 113 | margin: 0; 114 | } 115 | 116 | button[data-action] { 117 | padding: 6px; 118 | } 119 | 120 | .btn[data-action="incrementHours"]::after { 121 | @extend .sr-only; 122 | content: "Increment Hours"; 123 | } 124 | 125 | .btn[data-action="incrementMinutes"]::after { 126 | @extend .sr-only; 127 | content: "Increment Minutes"; 128 | } 129 | 130 | .btn[data-action="decrementHours"]::after { 131 | @extend .sr-only; 132 | content: "Decrement Hours"; 133 | } 134 | 135 | .btn[data-action="decrementMinutes"]::after { 136 | @extend .sr-only; 137 | content: "Decrement Minutes"; 138 | } 139 | 140 | .btn[data-action="showHours"]::after { 141 | @extend .sr-only; 142 | content: "Show Hours"; 143 | } 144 | 145 | .btn[data-action="showMinutes"]::after { 146 | @extend .sr-only; 147 | content: "Show Minutes"; 148 | } 149 | 150 | .btn[data-action="togglePeriod"]::after { 151 | @extend .sr-only; 152 | content: "Toggle AM/PM"; 153 | } 154 | 155 | .btn[data-action="clear"]::after { 156 | @extend .sr-only; 157 | content: "Clear the picker"; 158 | } 159 | 160 | .btn[data-action="today"]::after { 161 | @extend .sr-only; 162 | content: "Set the date to today"; 163 | } 164 | 165 | .picker-switch { 166 | text-align: center; 167 | 168 | &::after { 169 | @extend .sr-only; 170 | content: "Toggle Date and Time Screens"; 171 | } 172 | 173 | td { 174 | padding: 0; 175 | margin: 0; 176 | height: auto; 177 | width: auto; 178 | line-height: inherit; 179 | 180 | span { 181 | line-height: 2.5; 182 | height: 2.5em; 183 | width: 100%; 184 | } 185 | } 186 | } 187 | 188 | table { 189 | width: 100%; 190 | margin: 0; 191 | 192 | 193 | & td, 194 | & th { 195 | text-align: center; 196 | border-radius: $bs-datetimepicker-border-radius; 197 | } 198 | 199 | & th { 200 | height: 20px; 201 | line-height: 20px; 202 | width: 20px; 203 | 204 | &.picker-switch { 205 | width: 145px; 206 | } 207 | 208 | &.disabled, 209 | &.disabled:hover { 210 | background: none; 211 | color: $bs-datetimepicker-disabled-color; 212 | cursor: not-allowed; 213 | } 214 | 215 | &.prev::after { 216 | @extend .sr-only; 217 | content: "Previous Month"; 218 | } 219 | 220 | &.next::after { 221 | @extend .sr-only; 222 | content: "Next Month"; 223 | } 224 | } 225 | 226 | & thead tr:first-child th { 227 | cursor: pointer; 228 | 229 | &:hover { 230 | background: $bs-datetimepicker-btn-hover-bg; 231 | } 232 | } 233 | 234 | & td { 235 | height: 54px; 236 | line-height: 54px; 237 | width: 54px; 238 | 239 | &.cw { 240 | font-size: .8em; 241 | height: 20px; 242 | line-height: 20px; 243 | color: $bs-datetimepicker-alternate-color; 244 | } 245 | 246 | &.day { 247 | height: 20px; 248 | line-height: 20px; 249 | width: 20px; 250 | } 251 | 252 | &.day:hover, 253 | &.hour:hover, 254 | &.minute:hover, 255 | &.second:hover { 256 | background: $bs-datetimepicker-btn-hover-bg; 257 | cursor: pointer; 258 | } 259 | 260 | &.old, 261 | &.new { 262 | color: $bs-datetimepicker-alternate-color; 263 | } 264 | 265 | &.today { 266 | position: relative; 267 | 268 | &:before { 269 | content: ''; 270 | display: inline-block; 271 | border: 0 0 7px 7px solid transparent; 272 | border-bottom-color: $bs-datetimepicker-active-bg; 273 | border-top-color: $bs-datetimepicker-secondary-border-color-rgba; 274 | position: absolute; 275 | bottom: 4px; 276 | right: 4px; 277 | } 278 | } 279 | 280 | &.active, 281 | &.active:hover { 282 | background-color: $bs-datetimepicker-active-bg; 283 | color: $bs-datetimepicker-active-color; 284 | text-shadow: $bs-datetimepicker-text-shadow; 285 | } 286 | 287 | &.active.today:before { 288 | border-bottom-color: #fff; 289 | } 290 | 291 | &.disabled, 292 | &.disabled:hover { 293 | background: none; 294 | color: $bs-datetimepicker-disabled-color; 295 | cursor: not-allowed; 296 | } 297 | 298 | span { 299 | display: inline-block; 300 | width: 54px; 301 | height: 54px; 302 | line-height: 54px; 303 | margin: 2px 1.5px; 304 | cursor: pointer; 305 | border-radius: $bs-datetimepicker-border-radius; 306 | 307 | &:hover { 308 | background: $bs-datetimepicker-btn-hover-bg; 309 | } 310 | 311 | &.active { 312 | background-color: $bs-datetimepicker-active-bg; 313 | color: $bs-datetimepicker-active-color; 314 | text-shadow: $bs-datetimepicker-text-shadow; 315 | } 316 | 317 | &.old { 318 | color: $bs-datetimepicker-alternate-color; 319 | } 320 | 321 | &.disabled, 322 | &.disabled:hover { 323 | background: none; 324 | color: $bs-datetimepicker-disabled-color; 325 | cursor: not-allowed; 326 | } 327 | } 328 | } 329 | } 330 | 331 | &.usetwentyfour { 332 | td.hour { 333 | height: 27px; 334 | line-height: 27px; 335 | } 336 | } 337 | } 338 | 339 | .input-group.date { 340 | & .input-group-addon { 341 | cursor: pointer; 342 | } 343 | } -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/src/less/_bootstrap-datetimepicker.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Datetimepicker for Bootstrap 3 3 | * version : 4.17.37 4 | * https://github.com/Eonasdan/bootstrap-datetimepicker/ 5 | */ 6 | @bs-datetimepicker-timepicker-font-size: 1.2em; 7 | @bs-datetimepicker-active-bg: @btn-primary-bg; 8 | @bs-datetimepicker-active-color: @btn-primary-color; 9 | @bs-datetimepicker-border-radius: @border-radius-base; 10 | @bs-datetimepicker-btn-hover-bg: @gray-lighter; 11 | @bs-datetimepicker-disabled-color: @gray-light; 12 | @bs-datetimepicker-alternate-color: @gray-light; 13 | @bs-datetimepicker-secondary-border-color: #ccc; 14 | @bs-datetimepicker-secondary-border-color-rgba: rgba(0, 0, 0, 0.2); 15 | @bs-datetimepicker-primary-border-color: white; 16 | @bs-datetimepicker-text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 17 | 18 | .bootstrap-datetimepicker-widget { 19 | list-style: none; 20 | 21 | &.dropdown-menu { 22 | margin: 2px 0; 23 | padding: 4px; 24 | width: 19em; 25 | 26 | &.timepicker-sbs { 27 | @media (min-width: @screen-sm-min) { 28 | width: 38em; 29 | } 30 | 31 | @media (min-width: @screen-md-min) { 32 | width: 38em; 33 | } 34 | 35 | @media (min-width: @screen-lg-min) { 36 | width: 38em; 37 | } 38 | } 39 | 40 | &:before, &:after { 41 | content: ''; 42 | display: inline-block; 43 | position: absolute; 44 | } 45 | 46 | &.bottom { 47 | &:before { 48 | border-left: 7px solid transparent; 49 | border-right: 7px solid transparent; 50 | border-bottom: 7px solid @bs-datetimepicker-secondary-border-color; 51 | border-bottom-color: @bs-datetimepicker-secondary-border-color-rgba; 52 | top: -7px; 53 | left: 7px; 54 | } 55 | 56 | &:after { 57 | border-left: 6px solid transparent; 58 | border-right: 6px solid transparent; 59 | border-bottom: 6px solid @bs-datetimepicker-primary-border-color; 60 | top: -6px; 61 | left: 8px; 62 | } 63 | } 64 | 65 | &.top { 66 | &:before { 67 | border-left: 7px solid transparent; 68 | border-right: 7px solid transparent; 69 | border-top: 7px solid @bs-datetimepicker-secondary-border-color; 70 | border-top-color: @bs-datetimepicker-secondary-border-color-rgba; 71 | bottom: -7px; 72 | left: 6px; 73 | } 74 | 75 | &:after { 76 | border-left: 6px solid transparent; 77 | border-right: 6px solid transparent; 78 | border-top: 6px solid @bs-datetimepicker-primary-border-color; 79 | bottom: -6px; 80 | left: 7px; 81 | } 82 | } 83 | 84 | &.pull-right { 85 | &:before { 86 | left: auto; 87 | right: 6px; 88 | } 89 | 90 | &:after { 91 | left: auto; 92 | right: 7px; 93 | } 94 | } 95 | } 96 | 97 | .list-unstyled { 98 | margin: 0; 99 | } 100 | 101 | a[data-action] { 102 | padding: 6px 0; 103 | } 104 | 105 | a[data-action]:active { 106 | box-shadow: none; 107 | } 108 | 109 | .timepicker-hour, .timepicker-minute, .timepicker-second { 110 | width: 54px; 111 | font-weight: bold; 112 | font-size: @bs-datetimepicker-timepicker-font-size; 113 | margin: 0; 114 | } 115 | 116 | button[data-action] { 117 | padding: 6px; 118 | } 119 | 120 | .btn[data-action="incrementHours"]::after { 121 | .sr-only(); 122 | content: "Increment Hours"; 123 | } 124 | 125 | .btn[data-action="incrementMinutes"]::after { 126 | .sr-only(); 127 | content: "Increment Minutes"; 128 | } 129 | 130 | .btn[data-action="decrementHours"]::after { 131 | .sr-only(); 132 | content: "Decrement Hours"; 133 | } 134 | 135 | .btn[data-action="decrementMinutes"]::after { 136 | .sr-only(); 137 | content: "Decrement Minutes"; 138 | } 139 | 140 | .btn[data-action="showHours"]::after { 141 | .sr-only(); 142 | content: "Show Hours"; 143 | } 144 | 145 | .btn[data-action="showMinutes"]::after { 146 | .sr-only(); 147 | content: "Show Minutes"; 148 | } 149 | 150 | .btn[data-action="togglePeriod"]::after { 151 | .sr-only(); 152 | content: "Toggle AM/PM"; 153 | } 154 | 155 | .btn[data-action="clear"]::after { 156 | .sr-only(); 157 | content: "Clear the picker"; 158 | } 159 | 160 | .btn[data-action="today"]::after { 161 | .sr-only(); 162 | content: "Set the date to today"; 163 | } 164 | 165 | .picker-switch { 166 | text-align: center; 167 | 168 | &::after { 169 | .sr-only(); 170 | content: "Toggle Date and Time Screens"; 171 | } 172 | 173 | td { 174 | padding: 0; 175 | margin: 0; 176 | height: auto; 177 | width: auto; 178 | line-height: inherit; 179 | 180 | span { 181 | line-height: 2.5; 182 | height: 2.5em; 183 | width: 100%; 184 | } 185 | } 186 | } 187 | 188 | table { 189 | width: 100%; 190 | margin: 0; 191 | 192 | 193 | & td, 194 | & th { 195 | text-align: center; 196 | border-radius: @bs-datetimepicker-border-radius; 197 | } 198 | 199 | & th { 200 | height: 20px; 201 | line-height: 20px; 202 | width: 20px; 203 | 204 | &.picker-switch { 205 | width: 145px; 206 | } 207 | 208 | &.disabled, 209 | &.disabled:hover { 210 | background: none; 211 | color: @bs-datetimepicker-disabled-color; 212 | cursor: not-allowed; 213 | } 214 | 215 | &.prev::after { 216 | .sr-only(); 217 | content: "Previous Month"; 218 | } 219 | 220 | &.next::after { 221 | .sr-only(); 222 | content: "Next Month"; 223 | } 224 | } 225 | 226 | & thead tr:first-child th { 227 | cursor: pointer; 228 | 229 | &:hover { 230 | background: @bs-datetimepicker-btn-hover-bg; 231 | } 232 | } 233 | 234 | & td { 235 | height: 54px; 236 | line-height: 54px; 237 | width: 54px; 238 | 239 | &.cw { 240 | font-size: .8em; 241 | height: 20px; 242 | line-height: 20px; 243 | color: @bs-datetimepicker-alternate-color; 244 | } 245 | 246 | &.day { 247 | height: 20px; 248 | line-height: 20px; 249 | width: 20px; 250 | } 251 | 252 | &.day:hover, 253 | &.hour:hover, 254 | &.minute:hover, 255 | &.second:hover { 256 | background: @bs-datetimepicker-btn-hover-bg; 257 | cursor: pointer; 258 | } 259 | 260 | &.old, 261 | &.new { 262 | color: @bs-datetimepicker-alternate-color; 263 | } 264 | 265 | &.today { 266 | position: relative; 267 | 268 | &:before { 269 | content: ''; 270 | display: inline-block; 271 | border: solid transparent; 272 | border-width: 0 0 7px 7px; 273 | border-bottom-color: @bs-datetimepicker-active-bg; 274 | border-top-color: @bs-datetimepicker-secondary-border-color-rgba; 275 | position: absolute; 276 | bottom: 4px; 277 | right: 4px; 278 | } 279 | } 280 | 281 | &.active, 282 | &.active:hover { 283 | background-color: @bs-datetimepicker-active-bg; 284 | color: @bs-datetimepicker-active-color; 285 | text-shadow: @bs-datetimepicker-text-shadow; 286 | } 287 | 288 | &.active.today:before { 289 | border-bottom-color: #fff; 290 | } 291 | 292 | &.disabled, 293 | &.disabled:hover { 294 | background: none; 295 | color: @bs-datetimepicker-disabled-color; 296 | cursor: not-allowed; 297 | } 298 | 299 | span { 300 | display: inline-block; 301 | width: 54px; 302 | height: 54px; 303 | line-height: 54px; 304 | margin: 2px 1.5px; 305 | cursor: pointer; 306 | border-radius: @bs-datetimepicker-border-radius; 307 | 308 | &:hover { 309 | background: @bs-datetimepicker-btn-hover-bg; 310 | } 311 | 312 | &.active { 313 | background-color: @bs-datetimepicker-active-bg; 314 | color: @bs-datetimepicker-active-color; 315 | text-shadow: @bs-datetimepicker-text-shadow; 316 | } 317 | 318 | &.old { 319 | color: @bs-datetimepicker-alternate-color; 320 | } 321 | 322 | &.disabled, 323 | &.disabled:hover { 324 | background: none; 325 | color: @bs-datetimepicker-disabled-color; 326 | cursor: not-allowed; 327 | } 328 | } 329 | } 330 | } 331 | 332 | &.usetwentyfour { 333 | td.hour { 334 | height: 27px; 335 | line-height: 27px; 336 | } 337 | } 338 | 339 | &.wider { 340 | width: 21em; 341 | } 342 | 343 | & .datepicker-decades .decade { 344 | line-height: 1.8em !important; 345 | } 346 | } 347 | 348 | .input-group.date { 349 | & .input-group-addon { 350 | cursor: pointer; 351 | } 352 | } 353 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Datetimepicker for Bootstrap 3 3 | * version : 4.17.37 4 | * https://github.com/Eonasdan/bootstrap-datetimepicker/ 5 | */ 6 | .bootstrap-datetimepicker-widget { 7 | list-style: none; 8 | } 9 | .bootstrap-datetimepicker-widget.dropdown-menu { 10 | margin: 2px 0; 11 | padding: 4px; 12 | width: 19em; 13 | } 14 | @media (min-width: 768px) { 15 | .bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs { 16 | width: 38em; 17 | } 18 | } 19 | @media (min-width: 992px) { 20 | .bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs { 21 | width: 38em; 22 | } 23 | } 24 | @media (min-width: 1200px) { 25 | .bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs { 26 | width: 38em; 27 | } 28 | } 29 | .bootstrap-datetimepicker-widget.dropdown-menu:before, 30 | .bootstrap-datetimepicker-widget.dropdown-menu:after { 31 | content: ''; 32 | display: inline-block; 33 | position: absolute; 34 | } 35 | .bootstrap-datetimepicker-widget.dropdown-menu.bottom:before { 36 | border-left: 7px solid transparent; 37 | border-right: 7px solid transparent; 38 | border-bottom: 7px solid #cccccc; 39 | border-bottom-color: rgba(0, 0, 0, 0.2); 40 | top: -7px; 41 | left: 7px; 42 | } 43 | .bootstrap-datetimepicker-widget.dropdown-menu.bottom:after { 44 | border-left: 6px solid transparent; 45 | border-right: 6px solid transparent; 46 | border-bottom: 6px solid white; 47 | top: -6px; 48 | left: 8px; 49 | } 50 | .bootstrap-datetimepicker-widget.dropdown-menu.top:before { 51 | border-left: 7px solid transparent; 52 | border-right: 7px solid transparent; 53 | border-top: 7px solid #cccccc; 54 | border-top-color: rgba(0, 0, 0, 0.2); 55 | bottom: -7px; 56 | left: 6px; 57 | } 58 | .bootstrap-datetimepicker-widget.dropdown-menu.top:after { 59 | border-left: 6px solid transparent; 60 | border-right: 6px solid transparent; 61 | border-top: 6px solid white; 62 | bottom: -6px; 63 | left: 7px; 64 | } 65 | .bootstrap-datetimepicker-widget.dropdown-menu.pull-right:before { 66 | left: auto; 67 | right: 6px; 68 | } 69 | .bootstrap-datetimepicker-widget.dropdown-menu.pull-right:after { 70 | left: auto; 71 | right: 7px; 72 | } 73 | .bootstrap-datetimepicker-widget .list-unstyled { 74 | margin: 0; 75 | } 76 | .bootstrap-datetimepicker-widget a[data-action] { 77 | padding: 6px 0; 78 | } 79 | .bootstrap-datetimepicker-widget a[data-action]:active { 80 | box-shadow: none; 81 | } 82 | .bootstrap-datetimepicker-widget .timepicker-hour, 83 | .bootstrap-datetimepicker-widget .timepicker-minute, 84 | .bootstrap-datetimepicker-widget .timepicker-second { 85 | width: 54px; 86 | font-weight: bold; 87 | font-size: 1.2em; 88 | margin: 0; 89 | } 90 | .bootstrap-datetimepicker-widget button[data-action] { 91 | padding: 6px; 92 | } 93 | .bootstrap-datetimepicker-widget .btn[data-action="incrementHours"]::after { 94 | position: absolute; 95 | width: 1px; 96 | height: 1px; 97 | margin: -1px; 98 | padding: 0; 99 | overflow: hidden; 100 | clip: rect(0, 0, 0, 0); 101 | border: 0; 102 | content: "Increment Hours"; 103 | } 104 | .bootstrap-datetimepicker-widget .btn[data-action="incrementMinutes"]::after { 105 | position: absolute; 106 | width: 1px; 107 | height: 1px; 108 | margin: -1px; 109 | padding: 0; 110 | overflow: hidden; 111 | clip: rect(0, 0, 0, 0); 112 | border: 0; 113 | content: "Increment Minutes"; 114 | } 115 | .bootstrap-datetimepicker-widget .btn[data-action="decrementHours"]::after { 116 | position: absolute; 117 | width: 1px; 118 | height: 1px; 119 | margin: -1px; 120 | padding: 0; 121 | overflow: hidden; 122 | clip: rect(0, 0, 0, 0); 123 | border: 0; 124 | content: "Decrement Hours"; 125 | } 126 | .bootstrap-datetimepicker-widget .btn[data-action="decrementMinutes"]::after { 127 | position: absolute; 128 | width: 1px; 129 | height: 1px; 130 | margin: -1px; 131 | padding: 0; 132 | overflow: hidden; 133 | clip: rect(0, 0, 0, 0); 134 | border: 0; 135 | content: "Decrement Minutes"; 136 | } 137 | .bootstrap-datetimepicker-widget .btn[data-action="showHours"]::after { 138 | position: absolute; 139 | width: 1px; 140 | height: 1px; 141 | margin: -1px; 142 | padding: 0; 143 | overflow: hidden; 144 | clip: rect(0, 0, 0, 0); 145 | border: 0; 146 | content: "Show Hours"; 147 | } 148 | .bootstrap-datetimepicker-widget .btn[data-action="showMinutes"]::after { 149 | position: absolute; 150 | width: 1px; 151 | height: 1px; 152 | margin: -1px; 153 | padding: 0; 154 | overflow: hidden; 155 | clip: rect(0, 0, 0, 0); 156 | border: 0; 157 | content: "Show Minutes"; 158 | } 159 | .bootstrap-datetimepicker-widget .btn[data-action="togglePeriod"]::after { 160 | position: absolute; 161 | width: 1px; 162 | height: 1px; 163 | margin: -1px; 164 | padding: 0; 165 | overflow: hidden; 166 | clip: rect(0, 0, 0, 0); 167 | border: 0; 168 | content: "Toggle AM/PM"; 169 | } 170 | .bootstrap-datetimepicker-widget .btn[data-action="clear"]::after { 171 | position: absolute; 172 | width: 1px; 173 | height: 1px; 174 | margin: -1px; 175 | padding: 0; 176 | overflow: hidden; 177 | clip: rect(0, 0, 0, 0); 178 | border: 0; 179 | content: "Clear the picker"; 180 | } 181 | .bootstrap-datetimepicker-widget .btn[data-action="today"]::after { 182 | position: absolute; 183 | width: 1px; 184 | height: 1px; 185 | margin: -1px; 186 | padding: 0; 187 | overflow: hidden; 188 | clip: rect(0, 0, 0, 0); 189 | border: 0; 190 | content: "Set the date to today"; 191 | } 192 | .bootstrap-datetimepicker-widget .picker-switch { 193 | text-align: center; 194 | } 195 | .bootstrap-datetimepicker-widget .picker-switch::after { 196 | position: absolute; 197 | width: 1px; 198 | height: 1px; 199 | margin: -1px; 200 | padding: 0; 201 | overflow: hidden; 202 | clip: rect(0, 0, 0, 0); 203 | border: 0; 204 | content: "Toggle Date and Time Screens"; 205 | } 206 | .bootstrap-datetimepicker-widget .picker-switch td { 207 | padding: 0; 208 | margin: 0; 209 | height: auto; 210 | width: auto; 211 | line-height: inherit; 212 | } 213 | .bootstrap-datetimepicker-widget .picker-switch td span { 214 | line-height: 2.5; 215 | height: 2.5em; 216 | width: 100%; 217 | } 218 | .bootstrap-datetimepicker-widget table { 219 | width: 100%; 220 | margin: 0; 221 | } 222 | .bootstrap-datetimepicker-widget table td, 223 | .bootstrap-datetimepicker-widget table th { 224 | text-align: center; 225 | border-radius: 4px; 226 | } 227 | .bootstrap-datetimepicker-widget table th { 228 | height: 20px; 229 | line-height: 20px; 230 | width: 20px; 231 | } 232 | .bootstrap-datetimepicker-widget table th.picker-switch { 233 | width: 145px; 234 | } 235 | .bootstrap-datetimepicker-widget table th.disabled, 236 | .bootstrap-datetimepicker-widget table th.disabled:hover { 237 | background: none; 238 | color: #777777; 239 | cursor: not-allowed; 240 | } 241 | .bootstrap-datetimepicker-widget table th.prev::after { 242 | position: absolute; 243 | width: 1px; 244 | height: 1px; 245 | margin: -1px; 246 | padding: 0; 247 | overflow: hidden; 248 | clip: rect(0, 0, 0, 0); 249 | border: 0; 250 | content: "Previous Month"; 251 | } 252 | .bootstrap-datetimepicker-widget table th.next::after { 253 | position: absolute; 254 | width: 1px; 255 | height: 1px; 256 | margin: -1px; 257 | padding: 0; 258 | overflow: hidden; 259 | clip: rect(0, 0, 0, 0); 260 | border: 0; 261 | content: "Next Month"; 262 | } 263 | .bootstrap-datetimepicker-widget table thead tr:first-child th { 264 | cursor: pointer; 265 | } 266 | .bootstrap-datetimepicker-widget table thead tr:first-child th:hover { 267 | background: #eeeeee; 268 | } 269 | .bootstrap-datetimepicker-widget table td { 270 | height: 54px; 271 | line-height: 54px; 272 | width: 54px; 273 | } 274 | .bootstrap-datetimepicker-widget table td.cw { 275 | font-size: .8em; 276 | height: 20px; 277 | line-height: 20px; 278 | color: #777777; 279 | } 280 | .bootstrap-datetimepicker-widget table td.day { 281 | height: 20px; 282 | line-height: 20px; 283 | width: 20px; 284 | } 285 | .bootstrap-datetimepicker-widget table td.day:hover, 286 | .bootstrap-datetimepicker-widget table td.hour:hover, 287 | .bootstrap-datetimepicker-widget table td.minute:hover, 288 | .bootstrap-datetimepicker-widget table td.second:hover { 289 | background: #eeeeee; 290 | cursor: pointer; 291 | } 292 | .bootstrap-datetimepicker-widget table td.old, 293 | .bootstrap-datetimepicker-widget table td.new { 294 | color: #777777; 295 | } 296 | .bootstrap-datetimepicker-widget table td.today { 297 | position: relative; 298 | } 299 | .bootstrap-datetimepicker-widget table td.today:before { 300 | content: ''; 301 | display: inline-block; 302 | border: solid transparent; 303 | border-width: 0 0 7px 7px; 304 | border-bottom-color: #337ab7; 305 | border-top-color: rgba(0, 0, 0, 0.2); 306 | position: absolute; 307 | bottom: 4px; 308 | right: 4px; 309 | } 310 | .bootstrap-datetimepicker-widget table td.active, 311 | .bootstrap-datetimepicker-widget table td.active:hover { 312 | background-color: #337ab7; 313 | color: #ffffff; 314 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 315 | } 316 | .bootstrap-datetimepicker-widget table td.active.today:before { 317 | border-bottom-color: #fff; 318 | } 319 | .bootstrap-datetimepicker-widget table td.disabled, 320 | .bootstrap-datetimepicker-widget table td.disabled:hover { 321 | background: none; 322 | color: #777777; 323 | cursor: not-allowed; 324 | } 325 | .bootstrap-datetimepicker-widget table td span { 326 | display: inline-block; 327 | width: 54px; 328 | height: 54px; 329 | line-height: 54px; 330 | margin: 2px 1.5px; 331 | cursor: pointer; 332 | border-radius: 4px; 333 | } 334 | .bootstrap-datetimepicker-widget table td span:hover { 335 | background: #eeeeee; 336 | } 337 | .bootstrap-datetimepicker-widget table td span.active { 338 | background-color: #337ab7; 339 | color: #ffffff; 340 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 341 | } 342 | .bootstrap-datetimepicker-widget table td span.old { 343 | color: #777777; 344 | } 345 | .bootstrap-datetimepicker-widget table td span.disabled, 346 | .bootstrap-datetimepicker-widget table td span.disabled:hover { 347 | background: none; 348 | color: #777777; 349 | cursor: not-allowed; 350 | } 351 | .bootstrap-datetimepicker-widget.usetwentyfour td.hour { 352 | height: 27px; 353 | line-height: 27px; 354 | } 355 | .bootstrap-datetimepicker-widget.wider { 356 | width: 21em; 357 | } 358 | .bootstrap-datetimepicker-widget .datepicker-decades .decade { 359 | line-height: 1.8em !important; 360 | } 361 | .input-group.date .input-group-addon { 362 | cursor: pointer; 363 | } 364 | .sr-only { 365 | position: absolute; 366 | width: 1px; 367 | height: 1px; 368 | margin: -1px; 369 | padding: 0; 370 | overflow: hidden; 371 | clip: rect(0, 0, 0, 0); 372 | border: 0; 373 | } 374 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/docs/ChangeLog.md: -------------------------------------------------------------------------------- 1 | # Version 4 2 | 3 | ## 4.17.37 4 | 5 | ### New Features 6 | 7 | * Momentjs TZ intergration #1242 thanks @bodrick 8 | * Independent CSS file, in case you don't want bootstrap for some reason 9 | 10 | ### Bug Squashing 11 | 12 | * Slight changes decade view 13 | * Moved all tooltip text to `tooltips` 14 | * fixed #1212 15 | 16 | ## 4.15.35 17 | 18 | ### New Features 19 | 20 | `tooltips` allows custom, localized text to be included for icon tooltips 21 | 22 | ### Bug Squashing 23 | 24 | fixed #1066 25 | 26 | fixed #1087 `sideBySide` properly supports `toolbarPlacement [top, bottom]` 27 | 28 | fixed #1119 29 | 30 | fixed #1069 added input.blur() 31 | 32 | fixed #1049 fixed doc example 33 | 34 | fixed #999 picker now looks for an element with `.input-group-addon` 35 | 36 | 37 | ## 4.14.30 38 | 39 | ### New Features 40 | 41 | `disabledTimeIntervals` #644 42 | 43 | `allowInputToggle` #929 44 | 45 | `focusOnShow` #884 46 | 47 | public `viewDate` function #872 48 | 49 | `enabledHours` and `disabledHours`. 50 | 51 | `dp.update` fires when `viewDate` is changed (in most cases) #937 52 | 53 | `viewMode` now supports a decades view. 54 | 55 | **Note**: because the year picker shows 12 years at a time, I've elected to make this view show blocks of 12 years 56 | 57 | **Note**: when selecting a decade the `viewDate` will change to the **center** of the selected years 58 | 59 | `parseInputDate` #1095 60 | 61 | ### Bug Squashing 62 | 63 | fixed #815 by adding `.wider` when using both seconds and am/pm. 64 | 65 | fixed #816 changed both min/max date to move the selected date inside. 66 | 67 | fixed #855 #881 `fillDate`, `fillMonths`, `fillDow` uses `startOf('day')`, which will hopefully fix the DST issues. 68 | 69 | fixed #885 `daysOfWeekDisabled` will move the date to a valid date if `useCurrent` is `true`. Today button will check if the DoW is disabled. 70 | 71 | fixed #906 72 | 73 | fixed #912 if `useCurrent:false` month and year view will no longer have the current month/year selected. 74 | 75 | fixed #914 `use24hours` will ignore anything in side of `[]` in the format string. 76 | 77 | fixed #916 added titles to all icons. At some point the text should be moved to the icon's array, but this would probably be a breaking change. 78 | 79 | fixed #940 added -1 tab index to am/pm selector 80 | 81 | ### Other Changes 82 | 83 | changed in/decrement behavior to check if the new date is valid at that granularity (hours, minutes, seconds). will also validate as before 84 | 85 | ## 4.7.14 86 | 87 | Added several in new features: 88 | 89 | `keybinds`, `inline`, `debug`, `clear()`, `showClose`, `ingoreReadOnly`, `datepickerInput` and `keepInvalid`. 90 | 91 | Bug squashing 92 | 93 | ## 4.0.0 94 | 95 | #### Changes for using the component 96 | 97 | * Defined a [Public API](https://github.com/Eonasdan/bootstrap-datetimepicker/wiki/Version-4-Public-API) and hidden rest of functions, variables so that all configuration options can be changed dynamically. 98 | 99 | * `set/getDate()` is now replaced with an overloaded `date()` function. Use it without a parameter to get the currently set date or with a parameter to set the date. 100 | 101 | * `hide()`, `show()`, `toggle()`, `enable()`, `disable()` and the rest of setter functions now support chaining. ie `$('#id').data('DateTimePicker').format('DD-MM-YYYY').minDate(moment()).defaultDate(moment()).show()` works 102 | 103 | * Replaced previous - next buttons in Date subviews with configurable icons 104 | 105 | * Changed `language` option name to `locale` to be inline with moment naming 106 | 107 | * Implemented #402 all data-date-* variables are more readable and also match with the ones in the configuration object 108 | 109 | * `options.direction` and `options.orientation` were merged into a single object `options.widgetPositioning` with `vertical` and `horizontal` keys that take a string value of `'auto', 'top', 'bottom'` and `'auto', 'left', 'right'` respectively. Note that the `'up'` option was renamed to `'top'` 110 | 111 | #### Added functionality 112 | 113 | * added a second way to define options as data attributes. Instead of adding distinct `data-date-*` config options you can now also pass a `data-date-options` attribute containing an object just the same as the options object that `element.datetimepicker` constructor call takes 114 | 115 | * also added a `options()` public api function to get/set that takes an option object and applies it to the component in one call 116 | 117 | * Implemented [#130](https://github.com/Eonasdan/bootstrap-datetimepicker/issues/130) by introducing a boolean `options.calendarWeeks` and `calendarWeeks()` api function 118 | 119 | * Implemented [#328](https://github.com/Eonasdan/bootstrap-datetimepicker/issues/328), [#426](https://github.com/Eonasdan/bootstrap-datetimepicker/issues/426) 120 | 121 | * Implemented [#432](https://github.com/Eonasdan/bootstrap-datetimepicker/issues/432). Widget DOM element is now lazily added only when shown and removed from the document when hidden. 122 | 123 | * Implemented [#141](https://github.com/Eonasdan/bootstrap-datetimepicker/issues/141) and [#283](https://github.com/Eonasdan/bootstrap-datetimepicker/issues/283) 124 | 125 | 126 | #### Contributors related internal code changes 127 | 128 | * Refactor all UI click functions and put them as functions in the actions array private variable 129 | 130 | * Refactor template building process to seperate functions according to what they do 131 | 132 | * Remove some styles that where hardcoded in the javascript code 133 | 134 | * Refactor all code that changes the picker.date to change it through the setValue function to allow one place for validation logic (min/max/weekdaysenabled etc) and also one place for emmiting dp.change events 135 | 136 | * The v4beta branch code includes all fixes up to v.3.1.2 137 | 138 | * Added `toggle()` to the public API which toggles the visibility of the DateTimePicker 139 | 140 | * Refactored set function to be included in the setValue function 141 | 142 | * Added a testing framework using jasmine and phantom.js 143 | 144 | # Version 3 145 | 146 | ## 3.0.0 147 | 148 | 149 | * Fix for #170, #179, #183: Changed event to `dp.-`. This should fix the double change event firing. 150 | * Fix for #192: `setDate` now fires `dp.change` 151 | * Fix for #182: Picker will **not** set the default date if the input field has a value 152 | * Fix for #169: Seconds doesn't get reset when changing the date (Thanks to PR #174) 153 | * Fix for #168 z-index fix for BS modal 154 | * Fix for #155 Picker properly displays the active year and month 155 | * Fix for #154 CSS update to fix the collapse jump 156 | * Fix for #150 and #75 `minViewMode` and `viewMode` work properly 157 | * Fix for #147 AM/PM won't toggle when selecting a value from the hours grid 158 | * Fix for #44 Finally! It's here!! Thanks to @ruiwei and his code on #210 picker will adjust the positioning of the widget. 159 | 160 | #### Manually merged PR 161 | 162 | * PR #178 When using `minuteStepping` the minute select grid will only show available steppings 163 | * PR #195, #197 Using the `data-OPTION` has been changed to `data-date-OPTION`. These options are expected to be on the `input-group` if you're using the `input-group` **or** the a bare input field if you're not using the `input-group` 164 | * PR #184 The option `sideBySide` change be used to display both the d and the timepicker side by side 165 | * PR #143 Added option `daysOfWeekDisabled: []`. For example, use `daysOfWeekDisabled: [0,6]` to disable Sunday and Saturday 166 | 167 | #### **Other Changes** 168 | * Changed picker width to 300px if using seconds and am/pm 169 | * Added option `useCurrent`, thanks to @ruiwei. When true, picker will set the value to the current date/time (respects picker's format) 170 | * Added option `showToday`, thanks to @ruiwei. When true, picker will display a small arrow to indicate today's date. 171 | * Changed `startDate` to `minDate` and `endDate` to `maxDate` to make it more clear what these options do. 172 | 173 | # Version 2 174 | 175 | #### 2.1.32 (Hotfix) 176 | 177 | * Fix for #151: When a bad date value or the picker is cleared, the plugin will not longer attempt to reset it back to the previous date 178 | * Fix for #140: `setDate` can be given `null` to force clear the picker 179 | 180 | #### 2.1.30 181 | ##### Important! `build.less` file name has been been changed to `bootstrap-datetimepicker-build.less` to prevent collisions 182 | 183 | * Fix for #135: `setStartDate` and `setEndDate` should now properly set. 184 | * Fix for #133: Typed in date now respects en/disabled dates 185 | * Fix for #132: En/disable picker function works again 186 | * Fix for #117, #119, #128, #121: double event `change` event issues should be fixed 187 | * Fix for #112: `change` function no longer sets the input to a blank value if the passed in date is invalid 188 | 189 | * Enhancement for #103: Increated the `z-index` of the widget 190 | 191 | #### 2.1.20 192 | * Fix for #83: Changes to the picker should fire native `change` event for knockout and the like as well as `change.dp` which contains the old date and the new date 193 | * Fix for #78: Script has been update for breaking changes in Moment 2.4.0 194 | * Fix for #73: IE8 should be working now 195 | 196 | * Enhancement for #79: `minuteStepping` option takes a number (default is 1). Changing the minutes in the time picker will step by this number. 197 | * Enhancement for #74 and #65: `useMinutes` and `useSeconds` are now options. Disabling seconds will hide the seconds spinner. Disabling minutes will display `00` and hide the arrows 198 | * Enhancement for #67: Picker will now attempt to convert all `data-OPTION` into its appropriate option 199 | 200 | #### 2.1.11 201 | * Fix for #51, #60 202 | * Fix for #52: Picker has its own `moment` object since moment 2.4.0 has removed global reference 203 | * Fix for #57: New option for `useStrict`. When validating dates in `update` and `change`, the picker can use a stricter formatting validation 204 | * Fix for #61: Picker should now properly take formatted date. Should also have correct start of the week for locales. 205 | * Fix for #62: Default format will properly validate time picker only. 206 | 207 | #### 2.1.5 208 | * Custom icons, such as Font Awesome, are now supported. (#49) 209 | * If more then one `input-group-addon` is present use `datepickerbutton` to identify where the picker should popup from. (#48) 210 | * New Event: `error.dp`. Fires when Moment cannot parse the date or when the timepicker cannot change because of a `disabledDates` setting. Returns a Moment date object. The specific error can be found be using `invalidAt()`. For more information see [Moment's docs](http://momentjs.com/docs/#/parsing/is-valid/) 211 | * Fix for #42, plugin will now check for `A` or `a` in the format string to determine if the AM/PM selector should display. 212 | * Fix for #45, fixed null/empty and invalid dates 213 | * Fix for #46, fixed active date highlighting 214 | * Fix for #47, `change.dp` event to also include the previous date. 215 | 216 | ####2.0.1 217 | * New event `error.dp` fires when plugin cannot parse date or when increase/descreasing hours/minutes to a disabled date. 218 | * Minor fixes 219 | 220 | ####2.0.0 221 | * `disabledDates` is now an option to set the disabled dates. It accepts date objects like `new Date("November 12, 2013 00:00:00")` and `12/25/2013' and `moment` date objects 222 | * Events are easier to use -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/docs/Options.md: -------------------------------------------------------------------------------- 1 | ## Options 2 | 3 | ### format 4 | 5 | Default: false 6 | 7 | See [momentjs' docs](http://momentjs.com/docs/#/displaying/format/) for valid formats. Format also dictates what components are shown, e.g. `MM/dd/YYYY` will not display the time picker. 8 | 9 | ---------------------- 10 | 11 | 12 | ### dayViewHeaderFormat 13 | 14 | Default: 'MMMM YYYY' 15 | 16 | Changes the heading of the datepicker when in "days" view. 17 | 18 | ![Datepicker Header](img/dpheader.png) 19 | 20 | ---------------------- 21 | 22 | 23 | ### extraFormats 24 | 25 | Default: false 26 | 27 | Allows for several input formats to be valid. See [this PR](https://github.com/Eonasdan/bootstrap-datetimepicker/pull/666). 28 | 29 | ---------------------- 30 | 31 | 32 | ### stepping 33 | 34 | Default: 1 35 | 36 | Number of minutes the up/down arrow's will move the minutes value in the time picker 37 | 38 | ---------------------- 39 | 40 | 41 | ### minDate 42 | 43 | Default: false 44 | Accepts: date, moment, string 45 | 46 | Prevents date/time selections before this date. 47 | 48 | #### `minDate` will override `defaultDate` and `useCurrent` if either of these settings are the same day since both options are invalid according to the rules you've selected. 49 | 50 | ---------------------- 51 | 52 | 53 | ### maxDate 54 | 55 | Default: false 56 | Accepts: date, moment, string 57 | 58 | Prevents date/time selections after this date. 59 | 60 | #### `maxDate` will override `defaultDate` and `useCurrent` if either of these settings are the same day since both options are invalid according to the rules you've selected. 61 | 62 | ---------------------- 63 | 64 | 65 | ### useCurrent 66 | 67 | Default: true 68 | 69 | On show, will set the picker to the current date/time 70 | 71 | ---------------------- 72 | 73 | 74 | ### collapse 75 | 76 | Default: true 77 | 78 | Using a Bootstraps collapse to switch between date/time pickers. 79 | 80 | ---------------------- 81 | 82 | 83 | ### locale 84 | 85 | Default: moment.locale() 86 | Accepts: string, moment.local('locale') 87 | 88 | See [momentjs](https://github.com/moment/moment/tree/develop/locale) for valid locales. 89 | 90 | You must include `moment-with-locales.js` or a local js file. 91 | 92 | ---------------------- 93 | 94 | 95 | ### defaultDate 96 | 97 | Default: false 98 | Accepts: date, moment, string 99 | 100 | Sets the picker default date/time. Overrides `useCurrent` 101 | 102 | ---------------------- 103 | 104 | 105 | ### disabledDates 106 | 107 | Default: false 108 | Accepts: array of [date, moment, string] 109 | 110 | Disables selection of dates in the array, e.g. holidays 111 | 112 | ---------------------- 113 | 114 | 115 | ### enabledDates 116 | 117 | Default: false 118 | Accepts: array of [date, moment, string] 119 | 120 | Disables selection of dates **NOT** in the array, e.g. holidays 121 | 122 | ---------------------- 123 | 124 | 125 | ### icons 126 | 127 | Default: { 128 | time: 'glyphicon glyphicon-time', 129 | date: 'glyphicon glyphicon-calendar', 130 | up: 'glyphicon glyphicon-chevron-up', 131 | down: 'glyphicon glyphicon-chevron-down', 132 | previous: 'glyphicon glyphicon-chevron-left', 133 | next: 'glyphicon glyphicon-chevron-right', 134 | today: 'glyphicon glyphicon-screenshot', 135 | clear: 'glyphicon glyphicon-trash', 136 | close: 'glyphicon glyphicon-remove' 137 | } 138 | Accepts: object with all or some of the parameters above 139 | 140 | Change the default icons for the pickers functions. 141 | 142 | ### useStrict 143 | 144 | Default: false 145 | 146 | Defines if moment should use strict date parsing when considering a date to be valid 147 | 148 | ---------------------- 149 | 150 | 151 | ### sideBySide 152 | 153 | Default: false 154 | 155 | Shows the picker side by side when using the time and date together. 156 | 157 | ![SideBySide](img/sideBySide.png) 158 | 159 | ---------------------- 160 | 161 | 162 | ### daysOfWeekDisabled 163 | 164 | Default: [] 165 | Accepts: array of numbers from 0-6 166 | 167 | Disables the section of days of the week, e.g. weekends. 168 | 169 | ---------------------- 170 | 171 | 172 | ### calendarWeeks 173 | 174 | Default: false 175 | 176 | Shows the week of the year to the left of first day of the week. 177 | 178 | ![calendarWeek](img/calendarWeeks.png) 179 | 180 | ---------------------- 181 | 182 | 183 | ### viewMode 184 | 185 | Default: 'days' 186 | Accepts: 'decades','years','months','days' 187 | 188 | The default view to display when the picker is shown. 189 | 190 | **Note**: To limit the picker to selecting, for instance the year and month, use `format: MM/YYYY` 191 | 192 | ---------------------- 193 | 194 | 195 | ### toolbarPlacement 196 | 197 | Default: 'default' 198 | Accepts: 'default', 'top', 'bottom' 199 | 200 | Changes the placement of the icon toolbar. 201 | 202 | ![toolbarPlacement](img/toolbarPlacement.png) 203 | 204 | ---------------------- 205 | 206 | 207 | ### showTodayButton 208 | 209 | Default: false 210 | 211 | Show the "Today" button in the icon toolbar. 212 | 213 | Clicking the "Today" button will set the calendar view and set the date to `now`. 214 | 215 | ---------------------- 216 | 217 | 218 | ### showClear 219 | 220 | Default: false 221 | 222 | Show the "Clear" button in the icon toolbar. 223 | 224 | Clicking the "Clear" button will set the calendar to null. 225 | 226 | ---------------------- 227 | 228 | ### showClose 229 | 230 | Default: false 231 | 232 | Show the "Close" button in the icon toolbar. 233 | 234 | Clicking the "Close" button will call `hide()` 235 | 236 | ---------------------- 237 | 238 | 239 | ### widgetPositioning 240 | 241 | Default: { 242 | horizontal: 'auto' 243 | vertical: 'auto' 244 | } 245 | Accepts: object with the all or one of the parameters above 246 | horizontal: 'auto', 'left', 'right' 247 | vertical: 'auto', 'top', 'bottom' 248 | 249 | ### widgetParent 250 | 251 | Default: null 252 | Accepts: string or jQuery object 253 | 254 | On picker show, places the widget at the identifier (string) or jQuery object **if** the element has css `position: 'relative'` 255 | 256 | ---------------------- 257 | 258 | 259 | ### keepOpen 260 | 261 | Default: false 262 | 263 | Will cause the date picker to stay open after selecting a date if no time components are being used. 264 | 265 | ---------------------- 266 | 267 | 268 | ### inline 269 | 270 | Default: false 271 | 272 | Will display the picker inline without the need of a input field. This will also hide borders and shadows. 273 | 274 | ---------------------- 275 | 276 | 277 | ### keepInvalid 278 | 279 | Default: false 280 | 281 | Will cause the date picker to **not** revert or overwrite invalid dates. 282 | 283 | ---------------------- 284 | 285 | 286 | ### keyBinds 287 | 288 | Default: up: function (widget) { 289 | if (widget.find('.datepicker').is(':visible')) { 290 | this.date(this.date().clone().subtract(7, 'd')); 291 | } else { 292 | this.date(this.date().clone().add(1, 'm')); 293 | } 294 | }, 295 | down: function (widget) { 296 | if (!widget) { 297 | this.show(); 298 | } 299 | else if (widget.find('.datepicker').is(':visible')) { 300 | this.date(this.date().clone().add(7, 'd')); 301 | } else { 302 | this.date(this.date().clone().subtract(1, 'm')); 303 | } 304 | }, 305 | 'control up': function (widget) { 306 | if (widget.find('.datepicker').is(':visible')) { 307 | this.date(this.date().clone().subtract(1, 'y')); 308 | } else { 309 | this.date(this.date().clone().add(1, 'h')); 310 | } 311 | }, 312 | 'control down': function (widget) { 313 | if (widget.find('.datepicker').is(':visible')) { 314 | this.date(this.date().clone().add(1, 'y')); 315 | } else { 316 | this.date(this.date().clone().subtract(1, 'h')); 317 | } 318 | }, 319 | left: function (widget) { 320 | if (widget.find('.datepicker').is(':visible')) { 321 | this.date(this.date().clone().subtract(1, 'd')); 322 | } 323 | }, 324 | right: function (widget) { 325 | if (widget.find('.datepicker').is(':visible')) { 326 | this.date(this.date().clone().add(1, 'd')); 327 | } 328 | }, 329 | pageUp: function (widget) { 330 | if (widget.find('.datepicker').is(':visible')) { 331 | this.date(this.date().clone().subtract(1, 'M')); 332 | } 333 | }, 334 | pageDown: function (widget) { 335 | if (widget.find('.datepicker').is(':visible')) { 336 | this.date(this.date().clone().add(1, 'M')); 337 | } 338 | }, 339 | enter: function () { 340 | this.hide(); 341 | }, 342 | escape: function () { 343 | this.hide(); 344 | }, 345 | 'control space': function (widget) { 346 | if (widget.find('.timepicker').is(':visible')) { 347 | widget.find('.btn[data-action="togglePeriod"]').click(); 348 | } 349 | }, 350 | t: function () { 351 | this.date(moment()); 352 | }, 353 | 'delete': function () { 354 | this.clear(); 355 | } 356 | 357 | Allows for custom events to fire on keyboard press. 358 | 359 | ---------------------- 360 | 361 | 362 | ### debug 363 | 364 | 4.7.14 365 | 366 | Default: false 367 | 368 | Will cause the date picker to stay open after a `blur` event. 369 | 370 | ---------------------- 371 | 372 | 373 | ### ignoreReadonly 374 | 375 | 4.7.14 376 | 377 | Default: false 378 | 379 | Allow date picker show event to fire even when the associated input element has the `readonly="readonly"`property. 380 | 381 | ---------------------- 382 | 383 | 384 | ### disabledTimeIntervals 385 | 386 | 4.14.30 387 | 388 | Default: false 389 | 390 | Disables time selection between the given `moments` 391 | 392 | ---------------------- 393 | 394 | 395 | ### allowInputToggle 396 | 397 | 4.14.30 398 | 399 | Default: false 400 | 401 | If `true`, the picker will show on textbox focus and icon click when used in a button group 402 | 403 | ---------------------- 404 | 405 | 406 | ### focusOnShow 407 | 408 | 4.14.30 409 | 410 | Default: true 411 | 412 | If `false`, the textbox will not be given focus when the picker is shown 413 | 414 | ---------------------- 415 | 416 | 417 | ### enabledHours 418 | 419 | 4.14.30 420 | 421 | Default: false 422 | 423 | Will allow or disallow hour selections (much like `disabledTimeIntervals`) but will affect all days 424 | 425 | ---------------------- 426 | 427 | 428 | ### disabledHours 429 | 430 | 4.14.30 431 | 432 | Default: false 433 | 434 | Will allow or disallow hour selections (much like `disabledTimeIntervals`) but will affect all days 435 | 436 | ---------------------- 437 | 438 | 439 | ### viewDate 440 | 441 | 4.14.30 442 | 443 | Default: false 444 | 445 | This will change the `viewDate` without changing or setting the selected date. 446 | 447 | ---------------------- 448 | 449 | 450 | ### tooltips 451 | 452 | 4.15.35 453 | 454 | ``` 455 | tooltips: { 456 | today: 'Go to today', 457 | clear: 'Clear selection', 458 | close: 'Close the picker', 459 | selectMonth: 'Select Month', 460 | prevMonth: 'Previous Month', 461 | nextMonth: 'Next Month', 462 | selectYear: 'Select Year', 463 | prevYear: 'Previous Year', 464 | nextYear: 'Next Year', 465 | selectDecade: 'Select Decade', 466 | prevDecade: 'Previous Decade', 467 | nextDecade: 'Next Decade', 468 | prevCentury: 'Previous Century', 469 | nextCentury: 'Next Century' 470 | } 471 | ``` 472 | 473 | This will change the `tooltips` over each icon to a custom string 474 | -------------------------------------------------------------------------------- /src/public/eonasdan-bootstrap-datetimepicker/docs/index.md: -------------------------------------------------------------------------------- 1 | #Bootstrap 3 Datepicker v4 Docs 2 | 3 |
4 | Note 5 | All functions are accessed via the data attribute e.g. $('#datetimepicker').data("DateTimePicker").FUNCTION() 6 |
7 | 8 | ### Minimum Setup 9 | 10 |
11 |
12 |
13 |
14 |
15 | 16 | 17 | 18 | 19 |
20 |
21 |
22 | 27 |
28 |
29 | 30 | #### Code 31 | 32 | ``` 33 |
34 |
35 |
36 |
37 |
38 | 39 | 40 | 41 | 42 |
43 |
44 |
45 | 50 |
51 |
52 | ``` 53 | 54 | ---------------------- 55 | 56 | ### Using Locales 57 | 58 |
59 |
60 |
61 |
62 |
63 | 64 | 65 | 66 | 67 |
68 |
69 |
70 | 77 |
78 |
79 | 80 | #### Code 81 | 82 | ``` 83 |
84 |
85 |
86 |
87 |
88 | 89 | 90 | 91 | 92 |
93 |
94 |
95 | 102 |
103 |
104 | ``` 105 | 106 | ---------------------- 107 | 108 | ### Custom Formats 109 | 110 |
111 |
112 |
113 |
114 |
115 | 116 | 117 | 118 | 119 |
120 |
121 |
122 | 129 |
130 |
131 | 132 | #### Code 133 | 134 | ``` 135 |
136 |
137 |
138 |
139 |
140 | 141 | 142 | 143 | 144 |
145 |
146 |
147 | 154 |
155 |
156 | ``` 157 | 158 | ---------------------- 159 | 160 | ### No Icon (input field only): 161 | 162 |
163 |
164 |
165 | 166 |
167 | 172 |
173 |
174 | 175 | #### Code 176 | 177 | ``` 178 | 179 |
180 |
181 |
182 | 183 |
184 | 189 |
190 |
191 | ``` 192 | 193 | ---------------------- 194 | 195 | ### Enabled/Disabled Dates 196 | 197 |
198 |
199 |
200 |
201 |
202 | 203 | 204 | 205 | 206 |
207 |
208 |
209 | 221 |
222 |
223 | 224 | #### Code 225 | 226 | ``` 227 |
228 |
229 |
230 |
231 |
232 | 233 | 234 | 235 | 236 |
237 |
238 |
239 | 251 |
252 |
253 | ``` 254 | 255 | ---------------------- 256 | 257 | ### Linked Pickers 258 | 259 |
260 |
261 |
262 |
263 | 264 | 265 | 266 | 267 |
268 |
269 |
270 |
271 |
272 |
273 | 274 | 275 | 276 | 277 |
278 |
279 |
280 |
281 | 295 | 296 | #### Code 297 | 298 | ``` 299 |
300 |
301 |
302 |
303 | 304 | 305 | 306 | 307 |
308 |
309 |
310 |
311 |
312 |
313 | 314 | 315 | 316 | 317 |
318 |
319 |
320 |
321 | 335 | ``` 336 | 337 | ---------------------- 338 | 339 | ### Custom Icons 340 | 341 |
342 |
343 |
344 |
345 | 346 | 347 | 348 | 349 | 350 |
351 |
352 |
353 | 365 |
366 | 367 | #### Code 368 | 369 | ``` 370 |
371 |
372 |
373 |
374 | 375 | 376 | 377 | 378 | 379 |
380 |
381 |
382 | 394 |
395 | ``` 396 | 397 | ---------------------- 398 | 399 | ### View Mode 400 | 401 |
402 |
403 |
404 |
405 | 406 | 407 | 408 | 409 | 410 |
411 |
412 |
413 | 420 |
421 | 422 | #### Code 423 | 424 | ``` 425 |
426 |
427 |
428 |
429 | 430 | 431 | 432 | 433 | 434 |
435 |
436 |
437 | 444 |
445 | ``` 446 | 447 | ---------------------- 448 | 449 | ### Min View Mode 450 | 451 |
452 |
453 |
454 |
455 | 456 | 457 | 458 | 459 | 460 |
461 |
462 |
463 | 471 |
472 | 473 | #### Code 474 | 475 | ``` 476 |
477 |
478 |
479 |
480 | 481 | 482 | 483 | 484 | 485 |
486 |
487 |
488 | 496 |
497 | 498 | ``` 499 | 500 | ---------------------- 501 | 502 | ### Disabled Days of the Week 503 | 504 |
505 |
506 |
507 |
508 | 509 | 510 | 511 | 512 | 513 |
514 |
515 |
516 | 523 |
524 | 525 | #### Code 526 | 527 | ``` 528 |
529 |
530 |
531 |
532 | 533 | 534 | 535 | 536 | 537 |
538 |
539 |
540 | 547 |
548 | ``` 549 | 550 | ---------------------- 551 | 552 | ### Inline 553 | 554 |
555 |
556 |
557 |
558 |
559 |
560 |
561 |
562 | 570 |
571 | 572 | #### Code 573 | 574 | ``` 575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 |
583 | 591 |
592 | ``` -------------------------------------------------------------------------------- /src/Grid.php: -------------------------------------------------------------------------------- 1 | false, 'campo'=>false]; 23 | public $acoesEmMassa; 24 | public $pesquisaAvancada = false; 25 | public $pesquisaAvancadaAberta = false; 26 | public $pesquisaAvancadaCampos = []; 27 | public $nrRegistrosPorPaginaDisponiveis = [10,20,30,50,100,200]; 28 | public $nrRegistrosPorPagina = 10; 29 | public $trataLinhaClosure; 30 | public $exportacao = true; 31 | public $exibirRegistrosExcluidos = false; 32 | public $ordemPadrao = []; //['campo', 'direcao'] 33 | private $driverName = ''; 34 | private $permiteExportacao = true; 35 | 36 | function __construct($query, $id){ 37 | $this->query = $query; 38 | $this->id = $id; 39 | $this->Request = Request::capture(); 40 | $this->driverName = strtolower($this->query->getConnection()->getPdo()->getAttribute(\PDO::ATTR_DRIVER_NAME)); 41 | return $this; 42 | } 43 | 44 | public function campos($campos){ 45 | foreach($campos as $k=>$v){ 46 | if(is_string($v)){ 47 | $v = [ 48 | 'rotulo'=>$v, 49 | 'campo'=>$k 50 | ]; 51 | 52 | } 53 | $strrpos = strrpos($k, '.'); 54 | if($strrpos!==false){ 55 | $v['alias'] = substr($k, $strrpos+1); 56 | }else{ 57 | $v['alias'] = $k; 58 | } 59 | 60 | $campos[$k] = $v; 61 | } 62 | 63 | foreach($campos as $k=>$v){ 64 | $strrpos = strrpos($k, '.'); 65 | if($strrpos!==false){ 66 | $k = substr($k, $strrpos+1); 67 | } 68 | $this->camposSelect[$k] = $k; 69 | } 70 | 71 | $this->campos = $campos; 72 | 73 | return $this; 74 | } 75 | 76 | public function acaoCampos($campos){ 77 | $this->acaoCampos = $campos; 78 | 79 | foreach($campos as $k){ 80 | $strrpos = strrpos($k, '.'); 81 | if($strrpos!==false){ 82 | $k = substr($k, $strrpos+1); 83 | } 84 | $this->camposSelect[$k] = $k; 85 | } 86 | 87 | return $this; 88 | } 89 | 90 | public function acao($titulo, $url, $icone = false, $somenteIcone = false, $metodo = 'GET', $confirm = false){ 91 | $this->acoes[$titulo] = [ 92 | 'titulo'=>$titulo, 93 | 'url'=>$url, 94 | 'icone'=>$icone, 95 | 'somenteIcone'=>$somenteIcone, 96 | 'metodo'=>strtoupper($metodo), 97 | 'confirm'=>$confirm 98 | ]; 99 | return $this; 100 | } 101 | 102 | public function acaoEmMassa($titulo, $url){ 103 | $this->acoesEmMassa[$titulo] = [ 104 | 'titulo'=>$titulo, 105 | 'url'=>$url 106 | ]; 107 | return $this; 108 | } 109 | 110 | public function trataURLParametros($parametros){ 111 | $parametrosStr = ''; 112 | $parametros['grid'] = $this->id; 113 | $parametrosStr = http_build_query($parametros); 114 | 115 | if(strlen($parametrosStr)>0) $parametrosStr='?'.$parametrosStr; 116 | 117 | return $parametrosStr; 118 | } 119 | 120 | public function checkbox($exibir, $campo){ 121 | $this->checkbox['exibir'] = $exibir; 122 | $this->checkbox['campo'] = $campo; 123 | return $this; 124 | } 125 | 126 | public function getUrl($tipo = ''){ 127 | $urlAtual = $this->Request->fullUrl(); 128 | 129 | if( strpos($urlAtual, '?') !== false) 130 | $urlAtual = substr($urlAtual, strpos($urlAtual, '?')+1 ); 131 | else 132 | $urlAtual = ''; 133 | 134 | parse_str($urlAtual, $parametros); 135 | 136 | if(isset($parametros['grid']) && $parametros['grid']!=$this->id){ 137 | unset($parametros['pagina']); 138 | unset($parametros['pesquisar']); 139 | unset($parametros['ordem']); 140 | unset($parametros['direcao']); 141 | } 142 | 143 | switch ($tipo) { 144 | case 'paginaAnterior': 145 | if ($this->paginaAtual>1){ 146 | $parametros['pagina'] = $this->paginaAtual-1; 147 | }else{ 148 | $parametros['pagina'] = 1; 149 | } 150 | break; 151 | case 'proximaPagina': 152 | if($this->paginaAtual<$this->totalPaginas){ 153 | $parametros['pagina'] = $this->paginaAtual+1; 154 | }else{ 155 | $parametros['pagina'] = $this->paginaAtual; 156 | } 157 | break; 158 | case 'paginacao': 159 | unset($parametros['pagina']); 160 | break; 161 | case 'pesquisa-avancada': 162 | $parametros['pesquisa-avancada'] = 'true'; 163 | unset($parametros['pesquisar']); 164 | break; 165 | case 'pesquisa-simples': 166 | unset($parametros['pesquisa-avancada']); 167 | unset($parametros['pesquisar']); 168 | break; 169 | case 'registros-por-pagina': 170 | unset($parametros['registros-por-pagina']); 171 | break; 172 | } 173 | 174 | $url = $this->Request->url().$this->trataURLParametros($parametros); 175 | 176 | return $url; 177 | } 178 | 179 | public function getCamposRequest(){ 180 | $urlAtual = $this->getUrl(); 181 | 182 | if( strpos($urlAtual, '?') !== false) 183 | $urlAtual = substr($urlAtual, strpos($urlAtual, '?')+1 ); 184 | else 185 | $urlAtual = ''; 186 | 187 | parse_str($urlAtual, $parametros); 188 | 189 | return $parametros; 190 | 191 | } 192 | 193 | public function trataLinha($closure){ 194 | $this->trataLinhaClosure = $closure; 195 | return $this; 196 | } 197 | 198 | public function pesquisaAvancada($opts){ 199 | $this->pesquisaAvancada = true; 200 | $this->pesquisaAvancadaCampos = $opts; 201 | foreach($opts as $k=>$v){ 202 | $strrpos = strrpos($k, '.'); 203 | if($strrpos!==false){ 204 | $k = substr($k, $strrpos+1); 205 | } 206 | 207 | if(is_array($v) && isset($v['where']) && $v['where']!==false) 208 | continue; 209 | 210 | $this->camposSelect[$k] = $k; 211 | } 212 | 213 | foreach ($this->pesquisaAvancadaCampos as $key => &$campo) { 214 | if(is_string($campo)){ 215 | $campo = [ 216 | 'rotulo'=>ucwords( str_replace('_', ' ', $key) ), 217 | 'tipo'=>$campo 218 | ]; 219 | } 220 | 221 | if(!isset($campo['where'])) 222 | $campo['where'] = false; 223 | else{ 224 | $campo['somenteWhereSub'] = true; 225 | } 226 | 227 | if(!isset($campo['somenteWhereSub'])) 228 | $campo['somenteWhereSub'] = false; 229 | } 230 | 231 | return $this; 232 | } 233 | 234 | public function permiteExportacao($bool){ 235 | $this->permiteExportacao = $bool; 236 | return $this; 237 | } 238 | 239 | public function exportacao($bool){ 240 | $this->exportacao = $bool; 241 | return $this; 242 | } 243 | 244 | public function ordemPadrao(array $ordem){ 245 | $this->ordemPadrao[] = [$ordem[0], (isset($ordem[1]) ? $ordem[1] : 'asc')]; 246 | return $this; 247 | } 248 | 249 | public function exibirRegistrosExcluidos($bool){ 250 | $this->exibirRegistrosExcluidos = $bool; 251 | return $this; 252 | } 253 | 254 | public function make(){ 255 | $campos = $this->campos; 256 | 257 | $selectCampos = []; 258 | 259 | 260 | foreach($campos as $k=>$v){ 261 | if(strpos($v['campo'], ' ')!==false){ 262 | $v['campo'] = '('.$v['campo'].')'; 263 | } 264 | if($v['campo'] <> $v['alias']){ 265 | switch ($this->driverName) { 266 | case 'odbc': 267 | $selectCampos[] = $v['campo'].' as ['.$v['alias'].']'; 268 | break; 269 | default: 270 | $selectCampos[] = $v['campo'].' as '.$v['alias']; 271 | break; 272 | } 273 | } 274 | else 275 | $selectCampos[] = $v['campo']; 276 | } 277 | 278 | if(isset($this->acaoCampos)){ 279 | foreach($this->acaoCampos as $campo){ 280 | $this->camposAdicionais[$campo] = $campo; 281 | } 282 | } 283 | 284 | foreach($this->pesquisaAvancadaCampos as $campo=>$opts){ 285 | if($opts['where']!==false || $opts['somenteWhereSub']===true) continue; 286 | $this->camposAdicionais[$campo] = $campo; 287 | } 288 | 289 | if(isset($this->camposAdicionais)){ 290 | foreach($this->camposAdicionais as $campoAdicional){ 291 | $existe = false; 292 | foreach($this->campos as $campo){ 293 | if($campo['alias']==$campoAdicional || $campo['campo']== $campoAdicional){ 294 | $existe = true; 295 | break; 296 | } 297 | } 298 | if(!$existe){ 299 | $selectCampos[] = $campoAdicional; 300 | } 301 | } 302 | } 303 | 304 | for($i=0;$iquery->getBindings(); 310 | $subQuery = clone($this->query); 311 | $subQuery = $subQuery->select($selectCampos); 312 | 313 | $this->query = $this->query->getModel()->newQuery(); 314 | 315 | if($this->Request->grid==$this->id){ 316 | //Paginação 317 | $this->paginaAtual = $this->Request->pagina ? $this->Request->pagina : 1; 318 | 319 | if(isset($this->Request->pesquisar)){ 320 | if(is_string($this->Request->pesquisar)){ 321 | //busca simples 322 | $this->valorPesquisado = htmlentities($this->Request->pesquisar); 323 | 324 | $whereBusca = ''; 325 | 326 | foreach($this->campos as $campo=>$rotulo){ 327 | if($strrpos = strrpos($campo, '.')) 328 | $campo = substr($campo, $strrpos+1); 329 | 330 | switch ($this->driverName) { 331 | case 'odbc': 332 | $whereBusca.='+'.$campo; 333 | break; 334 | case 'sqlsrv': 335 | $whereBusca.="+COALESCE(CAST($campo AS NVARCHAR(MAX)), '')"; 336 | break; 337 | default: 338 | $whereBusca.=",COALESCE($campo, '')"; 339 | break; 340 | } 341 | } 342 | 343 | if($whereBusca){ 344 | switch ($this->driverName) { 345 | case 'odbc': 346 | case 'sqlsrv': 347 | //sqlserver < 2012 não tem a função concat 348 | $whereBusca = substr($whereBusca, 1); 349 | break; 350 | default: 351 | $whereBusca = 'CONCAT('.substr($whereBusca, 1).')'; 352 | break; 353 | } 354 | $this->query->where(DB::raw($whereBusca), 'like', '%'.$this->Request->pesquisar.'%'); 355 | 356 | } 357 | }else{ 358 | //where busca avançada 359 | for($i=0;$iRequest->pesquisar);$i++){ 360 | 361 | foreach($this->Request->pesquisar[$i] as $campo=>$valor){ 362 | if($this->pesquisaAvancadaCampos[$campo]['somenteWhereSub']===true) 363 | $queryBusca =& $subQuery; 364 | else 365 | $queryBusca =& $this->query; 366 | 367 | $campoAux = $campo; 368 | 369 | if(is_string($valor)){ 370 | $this->valorPesquisado[$campo] = $valor; 371 | 372 | if($valor!=='' && $this->pesquisaAvancadaCampos[$campo]['where']===false){ 373 | if(is_string($this->pesquisaAvancadaCampos[$campo]) || $this->pesquisaAvancadaCampos[$campo]['tipo']=='text') 374 | $queryBusca->where($campoAux, 'like', '%'.$valor.'%'); 375 | else 376 | $queryBusca->where($campoAux, $valor); 377 | } 378 | $valorTratado = $valor; 379 | }else{ 380 | if(isset($valor['de']) && $valor['de']!=='') 381 | $valorAux = $valor['de']; 382 | else 383 | if(isset($valor['ate']) && $valor['ate']!=='') 384 | $valorAux = $valor['ate']; 385 | else 386 | $valorAux = ''; 387 | 388 | 389 | switch ($this->pesquisaAvancadaCampos[$campo]['tipo']) { 390 | case 'date': 391 | $valorTratado = Helpers::converteData($valorAux); 392 | break; 393 | case 'datetime': 394 | $valorTratado = Helpers::converteDataHora($valorAux); 395 | break; 396 | case 'money': 397 | $valorTratado = Helpers::converteMoedaReaisMoney($valorAux); 398 | break; 399 | case 'integer': 400 | $valorTratado = (int) $valorAux; 401 | break; 402 | 403 | case 'numeric': 404 | $valorTratado = str_replace(',', '.', $valorAux); 405 | break; 406 | } 407 | 408 | if(isset($valor['de']) && $valor['de']!==''){ 409 | $this->valorPesquisado[$campo.'_de'] = $valorAux; 410 | if($this->pesquisaAvancadaCampos[$campo]['where']===false) 411 | $queryBusca->where($campoAux, '>=', $valorTratado); 412 | } 413 | 414 | if(isset($valor['ate']) && $valor['ate']!==''){ 415 | $this->valorPesquisado[$campo.'_ate'] = $valorAux; 416 | if($this->pesquisaAvancadaCampos[$campo]['where']===false) 417 | $queryBusca->where($campoAux, '<=', $valorTratado); 418 | } 419 | } 420 | 421 | if($this->pesquisaAvancadaCampos[$campo]['where']){ 422 | call_user_func($this->pesquisaAvancadaCampos[$campo]['where'], $this, $queryBusca, $valorTratado, $campoAux); 423 | } 424 | } 425 | } 426 | } 427 | } 428 | 429 | //Busca avançada 430 | if($this->Request['pesquisa-avancada']) $this->pesquisaAvancadaAberta = true; 431 | } 432 | 433 | if(method_exists($subQuery->getModel(), 'getQualifiedDeletedAtColumn')){ 434 | $posicaoDeletedAt = mb_strpos($subQuery->toSql(), '`'.$subQuery->getModel()->getTable().'`.`deleted_at` '); 435 | if($posicaoDeletedAt!==false && $this->exibirRegistrosExcluidos === false){ 436 | $deleted_at = mb_substr($subQuery->toSql(), $posicaoDeletedAt); 437 | 438 | if(mb_strpos($deleted_at, ' ')!==false){ 439 | //Algumas queries tem group by 440 | $deleted_at = mb_substr($deleted_at, 0, mb_strpos($deleted_at, 'null')+4); 441 | } 442 | 443 | $subQuery->whereRaw($deleted_at); 444 | }else{ 445 | $subQuery->withTrashed(); 446 | } 447 | $this->query->withTrashed(); 448 | } 449 | 450 | if($removedScopes = $subQuery->removedScopes()){ 451 | $this->query->withoutGlobalScopes($removedScopes); 452 | } 453 | 454 | $this->query->select('*'); 455 | 456 | $bindings2 = $subQuery->getBindings(); 457 | $bindings = $this->query->getBindings(); 458 | $bindings = array_merge($bindings2, $bindings); 459 | 460 | $this->query->from( DB::raw('('.$subQuery->toSql().') '.$this->query->getModel()->getTable().' ') ); 461 | 462 | $this->query->setBindings($bindings); 463 | 464 | //Antes de paginar, contar as linhas 465 | 466 | $this->total = $this->query->count(); 467 | 468 | $this->nrRegistrosPorPagina = (int) $this->Request->get('registros-por-pagina'); 469 | if(!$this->nrRegistrosPorPagina) 470 | $this->nrRegistrosPorPagina = $this->nrRegistrosPorPaginaDisponiveis[0]; 471 | 472 | $this->totalPaginas = intval(ceil(($this->total/$this->nrRegistrosPorPagina))); 473 | 474 | if($this->paginaAtual>$this->totalPaginas) 475 | $this->paginaAtual = $this->totalPaginas; 476 | 477 | //ordenação 478 | 479 | if(isset($this->Request->ordem) && isset($this->Request->direcao)){ 480 | if($strrpos = strrpos($this->Request->ordem, '.')) 481 | $this->Request->ordem = substr($this->Request->ordem, $strrpos+1); 482 | 483 | $this->query->orderBy($this->Request->ordem, ($this->Request->direcao == 'crescente' ? 'asc' : 'desc')); 484 | }else 485 | if($this->ordemPadrao){ 486 | foreach($this->ordemPadrao as $ordem){ 487 | $this->query->orderBy($ordem[0], $ordem[1]); 488 | } 489 | } 490 | 491 | if(!$this->exportacao || ($this->exportacao && ($this->Request->get('exportar')!='xls' && $this->Request->get('exportar')!='csv'))) 492 | $this->query->skip(($this->paginaAtual-1)*$this->nrRegistrosPorPagina)->take($this->nrRegistrosPorPagina); 493 | 494 | //executar query 495 | 496 | $linhas = $this->query->get()->toArray(); 497 | 498 | if($this->exportacao && ($this->Request->get('exportar')=='xls' || $this->Request->get('exportar')=='csv')){ 499 | array_unshift($linhas, $this->campos); 500 | $excel = \App::make('excel'); 501 | 502 | $excel->create($this->id.' - '.Carbon::now(), function($excel) use($linhas) { 503 | $excel->sheet('Sheetname', function($sheet) use($linhas){ 504 | for($i=0; $i$v){ 508 | $cabecalho[] = $v['rotulo']; 509 | } 510 | $sheet->appendRow($cabecalho); 511 | }else{ 512 | $sheet->appendRow($linhas[$i]); 513 | } 514 | } 515 | }); 516 | 517 | })->download( $this->Request->get('exportar') ); 518 | 519 | } 520 | $nrLinhas = count($linhas); 521 | 522 | //parser das ações 523 | if(isset($this->acoes)){ 524 | for($i = 0; $i<$nrLinhas; $i++){ 525 | foreach($this->acoes as $acao){ 526 | if(strpos($acao['url'], '{')!==false){ 527 | //Existe variável para substituir na url 528 | foreach($linhas[$i] as $campo=>$valor){ 529 | if($campo<>'gridAcoes' && (is_string($valor) || is_numeric($valor))) 530 | $acao['url'] = str_replace('{'.$campo.'}', $valor, $acao['url']); 531 | } 532 | } 533 | $linhas[$i]['gridAcoes'][$acao['titulo']] = $acao; 534 | } 535 | } 536 | } 537 | 538 | if($this->trataLinhaClosure){ 539 | for($i = 0; $itrataLinhaClosure, $linhas[$i]); 541 | } 542 | } 543 | 544 | //renderiza o grid 545 | return \View::make('grid::grid', [ 546 | 'linhas'=>$linhas, 547 | 'total'=>$this->total, 548 | 'campos'=>$this->campos, 549 | 'acoes'=>$this->acoes, 550 | 'paginaAtual'=>$this->paginaAtual, 551 | 'totalPaginas'=>$this->totalPaginas, 552 | 'id'=>$this->id, 553 | 'urlPaginaAnterior'=>$this->getUrl('paginaAnterior'), 554 | 'urlProximaPagina'=>$this->getUrl('proximaPagina'), 555 | 'url'=>$this->getUrl(), 556 | 'valorPesquisado'=>$this->valorPesquisado, 557 | 'camposRequest'=>$this->getCamposRequest(), 558 | 'urlPaginacao'=>$this->getUrl('paginacao'), 559 | 'checkbox'=>$this->checkbox, 560 | 'acoesEmMassa'=>$this->acoesEmMassa, 561 | 'pesquisaAvancada'=>$this->pesquisaAvancada, 562 | 'pesquisaAvancadaAberta'=>$this->pesquisaAvancadaAberta, 563 | 'pesquisaAvancadaCampos'=>$this->pesquisaAvancadaCampos, 564 | 'urlPesquisaAvancada'=>$this->getUrl('pesquisa-avancada'), 565 | 'urlPesquisaSimples'=>$this->getUrl('pesquisa-simples'), 566 | 'nrRegistrosPorPagina'=>$this->nrRegistrosPorPagina, 567 | 'nrRegistrosPorPaginaDisponiveis'=>$this->nrRegistrosPorPaginaDisponiveis, 568 | 'urlRegistrosPorPagina'=>$this->getUrl('registros-por-pagina'), 569 | 'exportacao'=>$this->exportacao, 570 | 'permiteExportacao'=>$this->permiteExportacao, 571 | 'urlExportacao'=>$this->getUrl('urlExportacao') 572 | ]); 573 | } 574 | 575 | } --------------------------------------------------------------------------------