Merge remote-tracking branch 'upstream/master'

This commit is contained in:
BudBak
2019-11-20 10:15:58 +05:30
1051 changed files with 314 additions and 156364 deletions
@@ -1,17 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>core-java-date-operations</artifactId>
<version>${project.parent.version}</version>
<packaging>jar</packaging>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>core-java-date-operations</artifactId>
<version>${project.parent.version}</version>
<packaging>jar</packaging>
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-java</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-java</relativePath>
</parent>
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-java</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-java</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${joda-time.version}</version>
</dependency>
<dependency>
<groupId>com.darwinsys</groupId>
<artifactId>hirondelle-date4j</artifactId>
<version>${hirondelle-date4j.version}</version>
</dependency>
</dependencies>
<properties>
<joda-time.version>2.10</joda-time.version>
<hirondelle-date4j.version>1.5.1</hirondelle-date4j.version>
</properties>
</project>
@@ -0,0 +1,55 @@
package com.baeldung.date.comparison;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
import org.apache.commons.lang3.time.DateUtils;
import hirondelle.date4j.DateTime;
public class DateComparisonUtils {
public static boolean isSameDayUsingLocalDate(Date date1, Date date2) {
LocalDate localDate1 = date1.toInstant()
.atZone(ZoneId.systemDefault())
.toLocalDate();
LocalDate localDate2 = date2.toInstant()
.atZone(ZoneId.systemDefault())
.toLocalDate();
return localDate1.isEqual(localDate2);
}
public static boolean isSameDayUsingSimpleDateFormat(Date date1, Date date2) {
SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMdd");
return fmt.format(date1)
.equals(fmt.format(date2));
}
public static boolean isSameDayUsingCalendar(Date date1, Date date2) {
Calendar calendar1 = Calendar.getInstance();
calendar1.setTime(date1);
Calendar calendar2 = Calendar.getInstance();
calendar2.setTime(date2);
return calendar1.get(Calendar.YEAR) == calendar2.get(Calendar.YEAR) && calendar1.get(Calendar.MONTH) == calendar2.get(Calendar.MONTH) && calendar1.get(Calendar.DAY_OF_MONTH) == calendar2.get(Calendar.DAY_OF_MONTH);
}
public static boolean isSameDayUsingApacheCommons(Date date1, Date date2) {
return DateUtils.isSameDay(date1, date2);
}
public static boolean isSameDayUsingJoda(Date date1, Date date2) {
org.joda.time.LocalDate localDate1 = new org.joda.time.LocalDate(date1);
org.joda.time.LocalDate localDate2 = new org.joda.time.LocalDate(date2);
return localDate1.equals(localDate2);
}
public static boolean isSameDayUsingDate4j(Date date1, Date date2) {
DateTime dateObject1 = DateTime.forInstant(date1.getTime(), TimeZone.getDefault());
DateTime dateObject2 = DateTime.forInstant(date2.getTime(), TimeZone.getDefault());
return dateObject1.isSameDayAs(dateObject2);
}
}
@@ -0,0 +1,53 @@
package com.baeldung.date.comparison;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
import org.junit.Test;
public class DateComparisonUtilsUnitTest {
private Date day1Morning = toDate(LocalDateTime.of(2019, 10, 19, 6, 30, 40));
private Date day1Evening = toDate(LocalDateTime.of(2019, 10, 19, 18, 30, 50));
private Date day2Morning = toDate(LocalDateTime.of(2019, 10, 20, 6, 30, 50));
private Date toDate(LocalDateTime localDateTime) {
return Date.from(localDateTime.atZone(ZoneId.systemDefault())
.toInstant());
}
@Test
public void givenDatesWithDifferentTime_whenIsSameDay_thenReturnsTrue() {
assertTrue(DateComparisonUtils.isSameDayUsingLocalDate(day1Morning, day1Evening));
assertTrue(DateComparisonUtils.isSameDayUsingSimpleDateFormat(day1Morning, day1Evening));
assertTrue(DateComparisonUtils.isSameDayUsingCalendar(day1Morning, day1Evening));
assertTrue(DateComparisonUtils.isSameDayUsingApacheCommons(day1Morning, day1Evening));
assertTrue(DateComparisonUtils.isSameDayUsingJoda(day1Morning, day1Evening));
assertTrue(DateComparisonUtils.isSameDayUsingDate4j(day1Morning, day1Evening));
}
@Test
public void givenDates_whenIsDifferentDay_thenReturnsFalse() {
assertFalse(DateComparisonUtils.isSameDayUsingLocalDate(day1Morning, day2Morning));
assertFalse(DateComparisonUtils.isSameDayUsingLocalDate(day1Evening, day2Morning));
assertFalse(DateComparisonUtils.isSameDayUsingSimpleDateFormat(day1Morning, day2Morning));
assertFalse(DateComparisonUtils.isSameDayUsingSimpleDateFormat(day1Evening, day2Morning));
assertFalse(DateComparisonUtils.isSameDayUsingCalendar(day1Morning, day2Morning));
assertFalse(DateComparisonUtils.isSameDayUsingCalendar(day1Evening, day2Morning));
assertFalse(DateComparisonUtils.isSameDayUsingApacheCommons(day1Morning, day2Morning));
assertFalse(DateComparisonUtils.isSameDayUsingApacheCommons(day1Evening, day2Morning));
assertFalse(DateComparisonUtils.isSameDayUsingJoda(day1Morning, day2Morning));
assertFalse(DateComparisonUtils.isSameDayUsingJoda(day1Evening, day2Morning));
assertFalse(DateComparisonUtils.isSameDayUsingDate4j(day1Morning, day2Morning));
assertFalse(DateComparisonUtils.isSameDayUsingDate4j(day1Evening, day2Morning));
}
}
@@ -18,6 +18,11 @@ npm-debug.log.*
######################
.sass-cache/
######################
# Bower
######################
bower_components
######################
# Eclipse
######################
@@ -23,6 +23,10 @@ We use [Gulp][] as our build system. Install the Gulp command-line tool globally
yarn global add gulp-cli
Besides that we should download our bower dependencies:
bower instal
Run the following commands in two separate terminals to create a blissful development experience where your browser
auto-refreshes when files change on your hard drive.
@@ -1,20 +0,0 @@
{
"name": "angular-aria",
"version": "1.5.8",
"license": "MIT",
"main": "./angular-aria.js",
"ignore": [],
"dependencies": {
"angular": "1.5.8"
},
"homepage": "https://github.com/angular/bower-angular-aria",
"_release": "1.5.8",
"_resolution": {
"type": "version",
"tag": "v1.5.8",
"commit": "91710f3ee26d4e2858af0c91ec462aa43360da47"
},
"_source": "https://github.com/angular/bower-angular-aria.git",
"_target": "1.5.8",
"_originalSource": "angular-aria"
}
@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2016 Angular
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -1,67 +0,0 @@
# packaged angular-aria
This repo is for distribution on `npm` and `bower`. The source for this module is in the
[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngAria).
Please file issues and pull requests against that repo.
## Install
You can install this package either with `npm` or with `bower`.
### npm
```shell
npm install angular-aria
```
Then add `ngAria` as a dependency for your app:
```javascript
angular.module('myApp', [require('angular-aria')]);
```
### bower
```shell
bower install angular-aria
```
Add a `<script>` to your `index.html`:
```html
<script src="/bower_components/angular-aria/angular-aria.js"></script>
```
Then add `ngAria` as a dependency for your app:
```javascript
angular.module('myApp', ['ngAria']);
```
## Documentation
Documentation is available on the
[AngularJS docs site](http://docs.angularjs.org/api/ngAria).
## License
The MIT License
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -1,14 +0,0 @@
/*
AngularJS v1.5.8
(c) 2010-2016 Google, Inc. http://angularjs.org
License: MIT
*/
(function(t,p){'use strict';var b="BUTTON A INPUT TEXTAREA SELECT DETAILS SUMMARY".split(" "),l=function(a,c){if(-1!==c.indexOf(a[0].nodeName))return!0};p.module("ngAria",["ng"]).provider("$aria",function(){function a(a,b,m,h){return function(d,f,e){var q=e.$normalize(b);!c[q]||l(f,m)||e[q]||d.$watch(e[a],function(a){a=h?!a:!!a;f.attr(b,a)})}}var c={ariaHidden:!0,ariaChecked:!0,ariaReadonly:!0,ariaDisabled:!0,ariaRequired:!0,ariaInvalid:!0,ariaValue:!0,tabindex:!0,bindKeypress:!0,bindRoleForClick:!0};
this.config=function(a){c=p.extend(c,a)};this.$get=function(){return{config:function(a){return c[a]},$$watchExpr:a}}}).directive("ngShow",["$aria",function(a){return a.$$watchExpr("ngShow","aria-hidden",[],!0)}]).directive("ngHide",["$aria",function(a){return a.$$watchExpr("ngHide","aria-hidden",[],!1)}]).directive("ngValue",["$aria",function(a){return a.$$watchExpr("ngValue","aria-checked",b,!1)}]).directive("ngChecked",["$aria",function(a){return a.$$watchExpr("ngChecked","aria-checked",b,!1)}]).directive("ngReadonly",
["$aria",function(a){return a.$$watchExpr("ngReadonly","aria-readonly",b,!1)}]).directive("ngRequired",["$aria",function(a){return a.$$watchExpr("ngRequired","aria-required",b,!1)}]).directive("ngModel",["$aria",function(a){function c(c,h,d,f){return a.config(h)&&!d.attr(c)&&(f||!l(d,b))}function g(a,c){return!c.attr("role")&&c.attr("type")===a&&"INPUT"!==c[0].nodeName}function k(a,c){var d=a.type,f=a.role;return"checkbox"===(d||f)||"menuitemcheckbox"===f?"checkbox":"radio"===(d||f)||"menuitemradio"===
f?"radio":"range"===d||"progressbar"===f||"slider"===f?"range":""}return{restrict:"A",require:"ngModel",priority:200,compile:function(b,h){var d=k(h,b);return{pre:function(a,e,c,b){"checkbox"===d&&(b.$isEmpty=function(a){return!1===a})},post:function(f,e,b,n){function h(){return n.$modelValue}function k(a){e.attr("aria-checked",b.value==n.$viewValue)}function l(){e.attr("aria-checked",!n.$isEmpty(n.$viewValue))}var m=c("tabindex","tabindex",e,!1);switch(d){case "radio":case "checkbox":g(d,e)&&e.attr("role",
d);c("aria-checked","ariaChecked",e,!1)&&f.$watch(h,"radio"===d?k:l);m&&e.attr("tabindex",0);break;case "range":g(d,e)&&e.attr("role","slider");if(a.config("ariaValue")){var p=!e.attr("aria-valuemin")&&(b.hasOwnProperty("min")||b.hasOwnProperty("ngMin")),r=!e.attr("aria-valuemax")&&(b.hasOwnProperty("max")||b.hasOwnProperty("ngMax")),s=!e.attr("aria-valuenow");p&&b.$observe("min",function(a){e.attr("aria-valuemin",a)});r&&b.$observe("max",function(a){e.attr("aria-valuemax",a)});s&&f.$watch(h,function(a){e.attr("aria-valuenow",
a)})}m&&e.attr("tabindex",0)}!b.hasOwnProperty("ngRequired")&&n.$validators.required&&c("aria-required","ariaRequired",e,!1)&&b.$observe("required",function(){e.attr("aria-required",!!b.required)});c("aria-invalid","ariaInvalid",e,!0)&&f.$watch(function(){return n.$invalid},function(a){e.attr("aria-invalid",!!a)})}}}}}]).directive("ngDisabled",["$aria",function(a){return a.$$watchExpr("ngDisabled","aria-disabled",b,!1)}]).directive("ngMessages",function(){return{restrict:"A",require:"?ngMessages",
link:function(a,b,g,k){b.attr("aria-live")||b.attr("aria-live","assertive")}}}).directive("ngClick",["$aria","$parse",function(a,c){return{restrict:"A",compile:function(g,k){var m=c(k.ngClick,null,!0);return function(c,d,f){if(!l(d,b)&&(a.config("bindRoleForClick")&&!d.attr("role")&&d.attr("role","button"),a.config("tabindex")&&!d.attr("tabindex")&&d.attr("tabindex",0),a.config("bindKeypress")&&!f.ngKeypress))d.on("keypress",function(a){function b(){m(c,{$event:a})}var d=a.which||a.keyCode;32!==d&&
13!==d||c.$apply(b)})}}}}]).directive("ngDblclick",["$aria",function(a){return function(c,g,k){!a.config("tabindex")||g.attr("tabindex")||l(g,b)||g.attr("tabindex",0)}}])})(window,window.angular);
//# sourceMappingURL=angular-aria.min.js.map
File diff suppressed because one or more lines are too long
@@ -1,10 +0,0 @@
{
"name": "angular-aria",
"version": "1.5.8",
"license": "MIT",
"main": "./angular-aria.js",
"ignore": [],
"dependencies": {
"angular": "1.5.8"
}
}
@@ -1,2 +0,0 @@
require('./angular-aria');
module.exports = 'ngAria';
@@ -1,34 +0,0 @@
{
"name": "angular-aria",
"version": "1.5.8",
"description": "AngularJS module for making accessibility easy",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.js.git"
},
"keywords": [
"angular",
"framework",
"browser",
"accessibility",
"a11y",
"client-side"
],
"author": "Angular Core Team <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/angular/angular.js/issues"
},
"homepage": "http://angularjs.org",
"jspm": {
"shim": {
"angular-aria": {
"deps": ["angular"]
}
}
}
}
@@ -1,31 +0,0 @@
{
"author": {
"name": "https://github.com/angular-ui/bootstrap/graphs/contributors"
},
"name": "angular-bootstrap",
"keywords": [
"angular",
"angular-ui",
"bootstrap"
],
"license": "MIT",
"ignore": [],
"description": "Native AngularJS (Angular) directives for Bootstrap.",
"version": "1.3.3",
"main": [
"./ui-bootstrap-tpls.js"
],
"dependencies": {
"angular": ">=1.4.0"
},
"homepage": "https://github.com/angular-ui/bootstrap-bower",
"_release": "1.3.3",
"_resolution": {
"type": "version",
"tag": "1.3.3",
"commit": "d45246707f5bf9533e3824861a29abd36757db45"
},
"_source": "https://github.com/angular-ui/bootstrap-bower.git",
"_target": "1.3.3",
"_originalSource": "angular-bootstrap"
}
@@ -1,120 +0,0 @@
### UI Bootstrap - [AngularJS](http://angularjs.org/) directives specific to [Bootstrap](http://getbootstrap.com)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/angular-ui/bootstrap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://secure.travis-ci.org/angular-ui/bootstrap.svg)](http://travis-ci.org/angular-ui/bootstrap)
[![devDependency Status](https://david-dm.org/angular-ui/bootstrap/dev-status.svg?branch=master)](https://david-dm.org/angular-ui/bootstrap#info=devDependencies)
### Quick links
- [Demo](#demo)
- [Installation](#installation)
- [NPM](#install-with-npm)
- [Bower](#install-with-bower)
- [NuGet](#install-with-nuget)
- [Custom](#custom-build)
- [Manual](#manual-download)
- [Support](#support)
- [FAQ](#faq)
- [Supported browsers](#supported-browsers)
- [Need help?](#need-help)
- [Found a bug?](#found-a-bug)
- [Contributing to the project](#contributing-to-the-project)
- [Development, meeting minutes, roadmap and more.](#development-meeting-minutes-roadmap-and-more)
# Demo
Do you want to see directives in action? Visit http://angular-ui.github.io/bootstrap/!
# Installation
Installation is easy as UI Bootstrap has minimal dependencies - only the AngularJS and Twitter Bootstrap's CSS are required.
Note: Since version 0.13.0, UI Bootstrap depends on [ngAnimate](https://docs.angularjs.org/api/ngAnimate) for transitions and animations, such as the accordion, carousel, etc. Include `ngAnimate` in the module dependencies for your app in order to enable animation.
#### Install with NPM
```sh
$ npm install angular-ui-bootstrap
```
This will install AngularJS and Bootstrap NPM packages.
#### Install with Bower
```sh
$ bower install angular-bootstrap
```
Note: do not install 'angular-ui-bootstrap'. A separate repository - [bootstrap-bower](https://github.com/angular-ui/bootstrap-bower) - hosts the compiled javascript file and bower.json.
#### Install with NuGet
To install AngularJS UI Bootstrap, run the following command in the Package Manager Console
```sh
PM> Install-Package Angular.UI.Bootstrap
```
#### Custom build
Head over to http://angular-ui.github.io/bootstrap/ and hit the *Custom build* button to create your own custom UI Bootstrap build, just the way you like it.
#### Manual download
After downloading dependencies (or better yet, referencing them from your favorite CDN) you need to download build version of this project. All the files and their purposes are described here:
https://github.com/angular-ui/bootstrap/tree/gh-pages#build-files
Don't worry, if you are not sure which file to take, opt for `ui-bootstrap-tpls-[version].min.js`.
### Adding dependency to your project
When you are done downloading all the dependencies and project files the only remaining part is to add dependencies on the `ui.bootstrap` AngularJS module:
```js
angular.module('myModule', ['ui.bootstrap']);
```
If you're a Browserify or Webpack user, you can do:
```js
var uibs = require('angular-ui-bootstrap');
angular.module('myModule', [uibs]);
```
# Support
## FAQ
https://github.com/angular-ui/bootstrap/wiki/FAQ
## Supported browsers
Directives from this repository are automatically tested with the following browsers:
* Chrome (stable and canary channel)
* Firefox
* IE 9 and 10
* Opera
* Safari
Modern mobile browsers should work without problems.
## Need help?
Need help using UI Bootstrap?
* Live help in the IRC (`#angularjs` channel at the `freenode` network). Use this [webchat](https://webchat.freenode.net/) or your own IRC client.
* Ask a question in [StackOverflow](http://stackoverflow.com/) under the [angular-ui-bootstrap](http://stackoverflow.com/questions/tagged/angular-ui-bootstrap) tag.
**Please do not create new issues in this repository to ask questions about using UI Bootstrap**
## Found a bug?
Please take a look at [CONTRIBUTING.md](CONTRIBUTING.md#you-think-youve-found-a-bug) and submit your issue [here](https://github.com/angular-ui/bootstrap/issues/new).
----
# Contributing to the project
We are always looking for the quality contributions! Please check the [CONTRIBUTING.md](CONTRIBUTING.md) for the contribution guidelines.
# Development, meeting minutes, roadmap and more.
Head over to the [Wiki](https://github.com/angular-ui/bootstrap/wiki) for notes on development for UI Bootstrap, meeting minutes from the UI Bootstrap team, roadmap plans, project philosophy and more.
@@ -1,19 +0,0 @@
{
"author": {
"name": "https://github.com/angular-ui/bootstrap/graphs/contributors"
},
"name": "angular-bootstrap",
"keywords": [
"angular",
"angular-ui",
"bootstrap"
],
"license": "MIT",
"ignore": [],
"description": "Native AngularJS (Angular) directives for Bootstrap.",
"version": "1.3.3",
"main": ["./ui-bootstrap-tpls.js"],
"dependencies": {
"angular": ">=1.4.0"
}
}
@@ -1,2 +0,0 @@
require('./ui-bootstrap-tpls');
module.exports = 'ui.bootstrap';
@@ -1,23 +0,0 @@
{
"name": "angular-ui-bootstrap",
"version": "1.3.3",
"description": "Bootstrap widgets for Angular",
"main": "index.js",
"homepage": "http://angular-ui.github.io/bootstrap/",
"repository": {
"type": "git",
"url": "https://github.com/angular-ui/bootstrap.git"
},
"keywords": [
"angular",
"bootstrap",
"angular-ui",
"components",
"client-side"
],
"author": "https://github.com/angular-ui/bootstrap/graphs/contributors",
"peerDependencies": {
"angular": ">= 1.4.0-beta.0 || >= 1.5.0-beta.0"
},
"license": "MIT"
}
@@ -1,115 +0,0 @@
/* Include this file in your html if you are using the CSP mode. */
.ng-animate.item:not(.left):not(.right) {
-webkit-transition: 0s ease-in-out left;
transition: 0s ease-in-out left
}
.uib-datepicker .uib-title {
width: 100%;
}
.uib-day button, .uib-month button, .uib-year button {
min-width: 100%;
}
.uib-left, .uib-right {
width: 100%
}
.uib-position-measure {
display: block !important;
visibility: hidden !important;
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}
.uib-position-scrollbar-measure {
position: absolute !important;
top: -9999px !important;
width: 50px !important;
height: 50px !important;
overflow: scroll !important;
}
.uib-position-body-scrollbar-measure {
overflow: scroll !important;
}
.uib-datepicker-popup.dropdown-menu {
display: block;
float: none;
margin: 0;
}
.uib-button-bar {
padding: 10px 9px 2px;
}
[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,
[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,
[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,
[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,
[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,
[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,
[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,
[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,
[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,
[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,
[uib-popover-popup].popover.top-left > .arrow,
[uib-popover-popup].popover.top-right > .arrow,
[uib-popover-popup].popover.bottom-left > .arrow,
[uib-popover-popup].popover.bottom-right > .arrow,
[uib-popover-popup].popover.left-top > .arrow,
[uib-popover-popup].popover.left-bottom > .arrow,
[uib-popover-popup].popover.right-top > .arrow,
[uib-popover-popup].popover.right-bottom > .arrow,
[uib-popover-html-popup].popover.top-left > .arrow,
[uib-popover-html-popup].popover.top-right > .arrow,
[uib-popover-html-popup].popover.bottom-left > .arrow,
[uib-popover-html-popup].popover.bottom-right > .arrow,
[uib-popover-html-popup].popover.left-top > .arrow,
[uib-popover-html-popup].popover.left-bottom > .arrow,
[uib-popover-html-popup].popover.right-top > .arrow,
[uib-popover-html-popup].popover.right-bottom > .arrow,
[uib-popover-template-popup].popover.top-left > .arrow,
[uib-popover-template-popup].popover.top-right > .arrow,
[uib-popover-template-popup].popover.bottom-left > .arrow,
[uib-popover-template-popup].popover.bottom-right > .arrow,
[uib-popover-template-popup].popover.left-top > .arrow,
[uib-popover-template-popup].popover.left-bottom > .arrow,
[uib-popover-template-popup].popover.right-top > .arrow,
[uib-popover-template-popup].popover.right-bottom > .arrow {
top: auto;
bottom: auto;
left: auto;
right: auto;
margin: 0;
}
[uib-popover-popup].popover,
[uib-popover-html-popup].popover,
[uib-popover-template-popup].popover {
display: block !important;
}
.uib-time input {
width: 50px;
}
[uib-typeahead-popup].dropdown-menu {
display: block;
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,40 +0,0 @@
{
"name": "angular-cache-buster",
"version": "0.4.3",
"homepage": "https://github.com/saintmac/angular-cache-buster",
"authors": [
"saintmac <[email protected]>"
],
"description": "Cache Buster for AngularJS $http (and $resource). Especially useful with Internet Explorer (IE8, IE9)",
"main": "angular-cache-buster.js",
"keywords": [
"angularjs",
"cache",
"buster",
"ie8",
"ie9",
"$http",
"$resource"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"devDependencies": {
"angular": "~1.2.13",
"angular-mocks": "~1.2.13"
},
"_release": "0.4.3",
"_resolution": {
"type": "version",
"tag": "0.4.3",
"commit": "c6c378db5cfc2431773e05743e72e1e97fa1ef16"
},
"_source": "https://github.com/saintmac/angular-cache-buster.git",
"_target": "0.4.3",
"_originalSource": "angular-cache-buster"
}
@@ -1,37 +0,0 @@
Cache Buster for Angular JS $http and $resource.
Especially useful with Internet Explorer (IE8, IE9)
# install
bower install angular-cache-buster --save
In your app module definition, add `ngCacheBuster` as a dependency
angular.module('myApp', ['ngCacheBuster']);
# configure
AngularCacheBuster adds a cache buster to any $http requests (and hence to $resource requests).
Since you probably want to maintain browser caching for your views, partials or other routes, you can supply a list of regexes that will be matched against all URL's. By default the supplied matchlist is a whitelist (i.e. busting everything not matching an entry in the list) but you can also set it to be a blacklist, (i.e. busting everything except the matching entries)
For instance, if you want to bust everything except views in a 'partials' folder and images in a 'images' folder , you can configure AngularCacheBuster this way:
angular.module('yourApp', ['ngCacheBuster'])
.config(function(httpRequestInterceptorCacheBusterProvider){
httpRequestInterceptorCacheBusterProvider.setMatchlist([/.*partials.*/,/.*images.*/]);
});
If instead you want to allow everything to be cached, except your "/api/users" and "api/orders" (assuming they are the only things that change frequently), you can supply a matchlist as before, but pass in a second boolean argument "blacklist" set to true as well:
angular.module('yourApp', ['ngCacheBuster'])
.config(function(httpRequestInterceptorCacheBusterProvider){
httpRequestInterceptorCacheBusterProvider.setMatchlist([/.*orders.*/,/.*users.*/],true);
});
# use
That's it! All your resource calls will have a cache buster added for anything not in the whitelist, or if you specified "blacklist", for everything matching the blacklist,
# test
`karma start` to launch the tests
@@ -1,62 +0,0 @@
angular.module('ngCacheBuster', [])
.config(['$httpProvider', function($httpProvider) {
return $httpProvider.interceptors.push('httpRequestInterceptorCacheBuster');
}])
.provider('httpRequestInterceptorCacheBuster', function() {
this.matchlist = [/.*partials.*/, /.*views.*/ ];
this.logRequests = false;
//Default to whitelist (i.e. block all except matches)
this.black=false;
//Select blacklist or whitelist, default to whitelist
this.setMatchlist = function(list,black) {
this.black = typeof black != 'undefined' ? black : false
this.matchlist = list;
};
this.setLogRequests = function(logRequests) {
this.logRequests = logRequests;
};
this.$get = ['$q', '$log', function($q, $log) {
var matchlist = this.matchlist;
var logRequests = this.logRequests;
var black = this.black;
if (logRequests) {
$log.log("Blacklist? ",black);
}
return {
'request': function(config) {
//Blacklist by default, match with whitelist
var busted= !black;
for(var i=0; i< matchlist.length; i++){
if(config.url.match(matchlist[i])) {
busted=black; break;
}
}
//Bust if the URL was on blacklist or not on whitelist
if (busted) {
var d = new Date();
config.url = config.url.replace(/[?|&]cacheBuster=\d+/,'');
//Some url's allready have '?' attached
config.url+=config.url.indexOf('?') === -1 ? '?' : '&'
config.url += 'cacheBuster=' + d.getTime();
}
if (logRequests) {
var log='request.url =' + config.url
busted ? $log.warn(log) : $log.info(log)
}
return config || $q.when(config);
}
}
}];
});
@@ -1,31 +0,0 @@
{
"name": "angular-cache-buster",
"version": "0.4.3",
"homepage": "https://github.com/saintmac/angular-cache-buster",
"authors": [
"saintmac <[email protected]>"
],
"description": "Cache Buster for AngularJS $http (and $resource). Especially useful with Internet Explorer (IE8, IE9)",
"main": "angular-cache-buster.js",
"keywords": [
"angularjs",
"cache",
"buster",
"ie8",
"ie9",
"$http",
"$resource"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"devDependencies": {
"angular": "~1.2.13",
"angular-mocks": "~1.2.13"
}
}

Some files were not shown because too many files have changed in this diff Show More