diff --git a/qrcode/plugins/daterangepicker/bower.json b/qrcode/plugins/daterangepicker/bower.json new file mode 100644 index 0000000..878b18a --- /dev/null +++ b/qrcode/plugins/daterangepicker/bower.json @@ -0,0 +1,20 @@ +{ + "name": "daterangepicker", + "main": [ + "daterangepicker.js", + "daterangepicker.css" + ], + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests", + "moment.js", + "moment.min.js" + ], + "dependencies": { + "jquery": "1.9.1 - 3", + "moment": ">=2.9.0" + } +} diff --git a/qrcode/plugins/daterangepicker/drp.png b/qrcode/plugins/daterangepicker/drp.png new file mode 100644 index 0000000..a76bdf3 Binary files /dev/null and b/qrcode/plugins/daterangepicker/drp.png differ diff --git a/qrcode/plugins/daterangepicker/moment.min.js b/qrcode/plugins/daterangepicker/moment.min.js new file mode 100644 index 0000000..5787a40 --- /dev/null +++ b/qrcode/plugins/daterangepicker/moment.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n>>0,s=0;sSe(e)?(r=e+1,o-Se(e)):(r=e,o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(Se(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),C("week","w"),C("isoWeek","W"),F("week",5),F("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=D(e)});function je(e,t){return e.slice(t,7).concat(e.slice(0,t))}I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),C("day","d"),C("weekday","e"),C("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=D(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var $e="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var qe=ae;var Je=ae;var Be=ae;function Qe(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=he(o[t]),u[t]=he(u[t]),l[t]=he(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Xe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Xe.apply(this)+L(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Xe.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+L(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),C("hour","h"),F("hour",13),ue("a",et),ue("A",et),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=D(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=D(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=D(e.substr(0,s)),t[ve]=D(e.substr(s,2)),t[pe]=D(e.substr(i))});var tt,nt=Te("Hours",!0),st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ce,monthsShort:He,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){var t=null;if(!it[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=tt._abbr,require("./locale/"+e),ut(t)}catch(e){}return it[e]}function ut(e,t){var n;return e&&((n=l(t)?ht(e):lt(e,t))?tt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),tt._abbr}function lt(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ot(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new P(x(s,t)),rt[e]&&rt[e].forEach(function(e){lt(e.name,e.config)}),ut(e),it[e]}function ht(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return tt;if(!o(e)){if(t=ot(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r=t&&a(i,n,!0)>=t-1)break;t--}r++}return tt}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11Pe(n[me],n[_e])?ye:n[ge]<0||24Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ct(e._a[me],s[me]),(e._dayOfYear>Se(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[ve]&&0===e._a[pe]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var mt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yt=/Z|[+-]\d\d(?::?\d\d)?/,gt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],vt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function wt(e){var t,n,s,i,r,a,o=e._i,u=mt.exec(o)||_t.exec(o);if(u){for(g(e).iso=!0,t=0,n=gt.length;tn.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},mn.isLocal=function(){return!!this.isValid()&&!this._isUTC},mn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},mn.isUtc=Et,mn.isUTC=Et,mn.zoneAbbr=function(){return this._isUTC?"UTC":""},mn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},mn.dates=n("dates accessor is deprecated. Use date instead.",un),mn.months=n("months accessor is deprecated. Use month instead",Ue),mn.years=n("years accessor is deprecated. Use year instead",Oe),mn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),mn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Ot(e))._a){var t=e._isUTC?y(e._a):bt(e._a);this._isDSTShifted=this.isValid()&&0 180) { + $('.leftcol').css('position', 'fixed'); + $('.leftcol').css('top', '10px'); + } else { + $('.leftcol').css('position', 'absolute'); + $('.leftcol').css('top', '180px'); + } + }); + + var bg = new Trianglify({ + x_colors: ["#e1f3fd", "#eeeeee", "#407dbf"], + y_colors: 'match_x', + width: document.body.clientWidth, + height: 150, + stroke_width: 0, + cell_size: 20 + }); + + $('#jumbo').css('background-image', 'url(' + bg.png() + ')'); + +}); diff --git a/qrcode/plugins/daterangepicker/website/index.html b/qrcode/plugins/daterangepicker/website/index.html new file mode 100644 index 0000000..a100264 --- /dev/null +++ b/qrcode/plugins/daterangepicker/website/index.html @@ -0,0 +1,744 @@ + + + + + + + + Date Range Picker — JavaScript Date & Time Picker Library + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ +

Date Range Picker

+

+ A JavaScript component for choosing date ranges, + dates and times. +

+ +
+
+ + + +
+ + + + + +
+ +
+
+
+
+ +
+
+
+ + +
+ + + + +
+ +
+
+ +

Originally created for reports at Improvely, the Date Range Picker can be attached to any webpage element to pop up two calendars for selecting dates, times, or predefined ranges like "Last 30 Days".

+ + + +

Getting Started

+ +

+ To get started, include jQuery, Moment.js and Date Range Picker's files in your webpage: +

+ + + +

+ Then attach a date range picker to whatever you want to trigger it: +

+ +
+
+ + +
+
+ + + +
+
+ +

+ You can customize Date Range Picker with options, and get notified when the user chooses new dates by providing a callback function. +

+ +

Examples

+ + +

Simple Date Range Picker With a Callback

+
+
+
+ + +
+
+ + + + +
+
+
+ + +

Date Range Picker With Times

+
+
+
+ + +
+
+ + + + +
+
+
+ + +

Single Date Picker

+
+
+
+ + +
+
+ + + + +
+
+
+ + +

Predefined Date Ranges

+
+
+
+ + +
+
+ + +
+   + +
+ + + +
+
+
+ + +

Input Initially Empty

+
+
+
+ + +
+
+ + + + +
+
+
+ +

Options

+ +
    +
  • + startDate (Date or string) The beginning date of the initially selected date range. If you provide a string, it must match the date format string set in your locale setting. +
  • +
  • + endDate: (Date or string) The end date of the initially selected date range. +
  • +
  • + minDate: (Date or string) The earliest date a user may select. +
  • +
  • + maxDate: (Date or string) The latest date a user may select. +
  • +
  • + maxSpan: (object) The maximum span between the selected start and end dates. Check off maxSpan in the configuration generator for an example of how to use this. You can provide any object the moment library would let you add to a date. +
  • +
  • + showDropdowns: (true/false) Show year and month select boxes above calendars to jump to a specific month and year. +
  • +
  • + minYear: (number) The minimum year shown in the dropdowns when showDropdowns is set to true. +
  • +
  • + maxYear: (number) The maximum year shown in the dropdowns when showDropdowns is set to true. +
  • +
  • + showWeekNumbers: (true/false) Show localized week numbers at the start of each week on the calendars. +
  • +
  • + showISOWeekNumbers: (true/false) Show ISO week numbers at the start of each week on the calendars. +
  • +
  • + timePicker: (true/false) Adds select boxes to choose times in addition to dates. +
  • +
  • + timePickerIncrement: (number) Increment of the minutes selection list for times (i.e. 30 to allow only selection of times ending in 0 or 30). +
  • +
  • + timePicker24Hour: (true/false) Use 24-hour instead of 12-hour times, removing the AM/PM selection. +
  • +
  • + timePickerSeconds: (true/false) Show seconds in the timePicker. +
  • +
  • + ranges: (object) Set predefined date ranges the user can select from. Each key is the label for the range, and its value an array with two dates representing the bounds of the range. Click ranges in the configuration generator for examples. +
  • +
  • + showCustomRangeLabel: (true/false) Displays "Custom Range" at + the end of the list of predefined ranges, when the ranges option is used. + This option will be highlighted whenever the current date range selection does not match one of the predefined ranges. Clicking it will display the calendars to select a new range. +
  • +
  • + alwaysShowCalendars: (true/false) Normally, if you use the ranges option to specify pre-defined date ranges, calendars for choosing a custom date range are not shown until the user clicks "Custom Range". When this option is set to true, the calendars for choosing a custom date range are always shown instead. +
  • +
  • + opens: ('left'/'right'/'center') Whether the picker appears aligned to the left, to the right, or centered under the HTML element it's attached to. +
  • +
  • + drops: ('down'/'up') Whether the picker appears below (default) or above the HTML element it's attached to. +
  • +
  • + buttonClasses: (string) CSS class names that will be added to both the apply and cancel buttons. +
  • +
  • + applyButtonClasses: (string) CSS class names that will be added only to the apply button. +
  • +
  • + cancelButtonClasses: (string) CSS class names that will be added only to the cancel button. +
  • +
  • + locale: (object) Allows you to provide localized strings for buttons and labels, customize the date format, and change the first day of week for the calendars. + Check off locale in the configuration generator to see how + to customize these options. +
  • +
  • + singleDatePicker: (true/false) Show only a single calendar to choose one date, instead of a range picker with two calendars. The start and end dates provided to your callback will be the same single date chosen. +
  • +
  • + autoApply: (true/false) Hide the apply and cancel buttons, and automatically apply a new date range as soon as two dates are clicked. +
  • +
  • + linkedCalendars: (true/false) When enabled, the two calendars displayed will always be for two sequential months (i.e. January and February), and both will be advanced when clicking the left or right arrows above the calendars. When disabled, the two calendars can be individually advanced and display any month/year. +
  • +
  • + isInvalidDate: (function) A function that is passed each date in the two + calendars before they are displayed, and may return true or false to indicate whether + that date should be available for selection or not. +
  • +
  • + isCustomDate: (function) A function that is passed each date in the two + calendars before they are displayed, and may return a string or array of CSS class names + to apply to that date's calendar cell. +
  • +
  • + autoUpdateInput: (true/false) Indicates whether the date range picker should + automatically update the value of the <input> element it's attached to at initialization and when the selected dates change. +
  • +
  • + parentEl: (string) jQuery selector of the parent element that the date range picker will be added to, if not provided this will be 'body' +
  • +
+ +

Methods

+ +

+ You can programmatically update the startDate and endDate + in the picker using the setStartDate and setEndDate methods. + You can access the Date Range Picker object and its functions and properties through + data properties of the element you attached it to. +

+ + + +
+ +
    +
  • + setStartDate(Date or string): Sets the date range picker's currently selected start date to the provided date +
  • +
  • + setEndDate(Date or string): Sets the date range picker's currently selected end date to the provided date +
  • +
+ +

Example usage:

+ + + +

Events

+ +

+ Several events are triggered on the element you attach the picker to, which you can listen for. +

+ +
    +
  • + show.daterangepicker: Triggered when the picker is shown +
  • +
  • + hide.daterangepicker: Triggered when the picker is hidden +
  • +
  • + showCalendar.daterangepicker: Triggered when the calendar(s) are shown +
  • +
  • + hideCalendar.daterangepicker: Triggered when the calendar(s) are hidden +
  • +
  • + apply.daterangepicker: Triggered when the apply button is clicked, + or when a predefined range is clicked +
  • +
  • + cancel.daterangepicker: Triggered when the cancel button is clicked +
  • +
+ +

+ Some applications need a "clear" instead of a "cancel" functionality, which can be achieved by changing the button label and watching for the cancel event: +

+ + + +
+ +

+ While passing in a callback to the constructor is the easiest way to listen for changes in the selected date range, you can also do something every time the apply button is clicked even if the selection hasn't changed: +

+ + + +

Configuration Generator

+ +
+ +
+
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+

Your Date Range Picker

+ +
+
+ +
+

Your Configuration to Copy

+ +
+ +
+
+ +
+ + + +

License

+ +

The MIT License (MIT)

+ +

Copyright (c) 2012-2019 Dan Grossman

+ +

+ 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. +

+ +

Comments

+ +
+ + + +
+
+
+ + + + + + + + + + + diff --git a/qrcode/plugins/daterangepicker/website/website.css b/qrcode/plugins/daterangepicker/website/website.css new file mode 100644 index 0000000..d325155 --- /dev/null +++ b/qrcode/plugins/daterangepicker/website/website.css @@ -0,0 +1,152 @@ +body { + font-size: 15px; + line-height: 1.6em; + position: relative; + margin: 0; +} + +.navbar .nav-item { + padding: 8px 0 8px 20px; +} + +.navbar .nav-link { + font-weight: bold; + font-size: 14px; + padding: 0; +} + +.navbar-expand-sm .navbar-nav .nav-link { + padding: 0; +} + +.well { + background: #f5f5f5; + border-radius: 4px; + padding: 20px; +} + +h1 { + font-size: 20px; + margin-bottom: 1em; + padding-bottom: 5px; + border-bottom: 1px dotted #08c; +} + +h1:before { + content: '#'; + color: #666; + position: relative; + padding-right: 5px; +} + +h2 { + padding: 0; + margin: 20px 0 0 0; + font-size: 18px; +} + +h2 a { + color: #444; + display: block; + background: #eee; + padding: 8px 12px; + margin-bottom: 0; + cursor: default; + text-decoration: none; +} + +input.form-control { + font-size: 14px; +} + +.collapsable { + border: 1px solid #eee; + padding: 12px; + display: block; +} + +label { + font-size: 13px; + font-weight: bold; +} + +.gist { + overflow: auto; +} + +.gist .blob-wrapper.data { + max-height: 350px; + overflow: auto; +} + +.list-group-item { + padding: 4px 0; + border: 0; + font-size: 16px; +} + +.leftcol { + position: absolute; + top: 180px; +} + +.rightcol { + max-width: 950px; +} + +.container { + max-width: 1300px; +} + +@media (min-width: 980px) { + .rightcol { + margin-left: 320px; + } +} + +p, pre { + margin-bottom: 2em; +} + +ul.nobullets { + margin: 0; + padding: 0; + list-style: none; +} +ul.nobullets li { + padding-bottom: 1em; + margin-bottom: 1em; + border-bottom: 1px dotted #ddd; +} + +input[type="text"] { + padding: 6px; + width: 100%; + border-radius: 4px; +} + +#footer { + background: #222; + margin-top: 80px; + padding: 10px; + color: #fff; + text-align: center; +} +#footer a:link, #footer a:visited { + color: #fff; + border-bottom: 1px dotted #fff; +} +#jumbo { + background: #c1deef; + color: #000; + padding: 20px 0; + margin-bottom: 20px; +} + +#jumbo h1 { + font-size: 28px; +} +#jumbo .btn { + border-radius: 0; + font-size: 16px; +} \ No newline at end of file diff --git a/qrcode/plugins/daterangepicker/website/website.js b/qrcode/plugins/daterangepicker/website/website.js new file mode 100644 index 0000000..e217994 --- /dev/null +++ b/qrcode/plugins/daterangepicker/website/website.js @@ -0,0 +1,179 @@ +$(document).ready(function() { + + $('#config-text').keyup(function() { + eval($(this).val()); + }); + + $('.configurator input, .configurator select').change(function() { + updateConfig(); + }); + + $('.demo i').click(function() { + $(this).parent().find('input').click(); + }); + + $('#startDate').daterangepicker({ + singleDatePicker: true, + startDate: moment().subtract(6, 'days') + }); + + $('#endDate').daterangepicker({ + singleDatePicker: true, + startDate: moment() + }); + + //updateConfig(); + + function updateConfig() { + var options = {}; + + if ($('#singleDatePicker').is(':checked')) + options.singleDatePicker = true; + + if ($('#showDropdowns').is(':checked')) + options.showDropdowns = true; + + if ($('#minYear').val().length && $('#minYear').val() != 1) + options.minYear = parseInt($('#minYear').val(), 10); + + if ($('#maxYear').val().length && $('#maxYear').val() != 1) + options.maxYear = parseInt($('#maxYear').val(), 10); + + if ($('#showWeekNumbers').is(':checked')) + options.showWeekNumbers = true; + + if ($('#showISOWeekNumbers').is(':checked')) + options.showISOWeekNumbers = true; + + if ($('#timePicker').is(':checked')) + options.timePicker = true; + + if ($('#timePicker24Hour').is(':checked')) + options.timePicker24Hour = true; + + if ($('#timePickerIncrement').val().length && $('#timePickerIncrement').val() != 1) + options.timePickerIncrement = parseInt($('#timePickerIncrement').val(), 10); + + if ($('#timePickerSeconds').is(':checked')) + options.timePickerSeconds = true; + + if ($('#autoApply').is(':checked')) + options.autoApply = true; + + if ($('#maxSpan').is(':checked')) + options.maxSpan = { days: 7 }; + + if ($('#ranges').is(':checked')) { + options.ranges = { + 'Today': [moment(), moment()], + 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], + 'Last 7 Days': [moment().subtract(6, 'days'), moment()], + 'Last 30 Days': [moment().subtract(29, 'days'), moment()], + 'This Month': [moment().startOf('month'), moment().endOf('month')], + 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] + }; + } + + if ($('#locale').is(':checked')) { + options.locale = { + format: 'MM/DD/YYYY', + separator: ' - ', + applyLabel: 'Apply', + cancelLabel: 'Cancel', + fromLabel: 'From', + toLabel: 'To', + customRangeLabel: 'Custom', + weekLabel: 'W', + daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'], + monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], + firstDay: 1 + }; + } + + if (!$('#linkedCalendars').is(':checked')) + options.linkedCalendars = false; + + if (!$('#autoUpdateInput').is(':checked')) + options.autoUpdateInput = false; + + if (!$('#showCustomRangeLabel').is(':checked')) + options.showCustomRangeLabel = false; + + if ($('#alwaysShowCalendars').is(':checked')) + options.alwaysShowCalendars = true; + + if ($('#parentEl').val().length) + options.parentEl = $('#parentEl').val(); + + if ($('#startDate').val().length) + options.startDate = $('#startDate').val(); + + if ($('#endDate').val().length) + options.endDate = $('#endDate').val(); + + if ($('#minDate').val().length) + options.minDate = $('#minDate').val(); + + if ($('#maxDate').val().length) + options.maxDate = $('#maxDate').val(); + + if ($('#opens').val().length && $('#opens').val() != 'right') + options.opens = $('#opens').val(); + + if ($('#drops').val().length && $('#drops').val() != 'down') + options.drops = $('#drops').val(); + + if ($('#buttonClasses').val().length && $('#buttonClasses').val() != 'btn btn-sm') + options.buttonClasses = $('#buttonClasses').val(); + + if ($('#applyButtonClasses').val().length && $('#applyButtonClasses').val() != 'btn-primary') + options.applyButtonClasses = $('#applyButtonClasses').val(); + + if ($('#cancelButtonClasses').val().length && $('#cancelButtonClasses').val() != 'btn-default') + options.cancelClass = $('#cancelButtonClasses').val(); + + $('#config-demo').daterangepicker(options, function(start, end, label) { console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')'); }); + + if (typeof options.ranges !== 'undefined') { + options.ranges = {}; + } + + var option_text = JSON.stringify(options, null, ' '); + + var replacement = "ranges: {\n" + + " 'Today': [moment(), moment()],\n" + + " 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],\n" + + " 'Last 7 Days': [moment().subtract(6, 'days'), moment()],\n" + + " 'Last 30 Days': [moment().subtract(29, 'days'), moment()],\n" + + " 'This Month': [moment().startOf('month'), moment().endOf('month')],\n" + + " 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]\n" + + " }"; + option_text = option_text.replace(new RegExp('"ranges"\: \{\}', 'g'), replacement); + + $('#config-text').val("$('#demo').daterangepicker(" + option_text + ", function(start, end, label) {\n console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')');\n});"); + + } + + $(window).scroll(function (event) { + var scroll = $(window).scrollTop(); + if (scroll > 180) { + $('.leftcol').css('position', 'fixed'); + $('.leftcol').css('top', '10px'); + } else { + $('.leftcol').css('position', 'absolute'); + $('.leftcol').css('top', '180px'); + } + }); + + var bg = new Trianglify({ + x_colors: ["#e1f3fd", "#eeeeee", "#407dbf"], + y_colors: 'match_x', + width: document.body.clientWidth, + height: 150, + stroke_width: 0, + cell_size: 20 + }); + + $('#jumbo').css('background-image', 'url(' + bg.png() + ')'); + +});