Blame view

__public/js/dist/c50d.8aca0796798ede721465.js 5.61 KB
e77200db5   nologostudio.ru   Initial commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  (window.webpackJsonp=window.webpackJsonp||[]).push([["c50d"],{"K2+k":function(e,t){e.exports='<div class="fr-datepicker clearfix unselectable">
  \t<div class="strip clearfix">
  \t\t<div class="prev"><i class="icn-arrow-left" ng-click="clickPrev()"><span class="sr-only">Previous Day</span></i></div>
  \t\t<div class="date" ng-click="toggleCalendar()">{{ selected }} <i class="icn-list"></i></div>
  \t\t<div class="next"><i class="icn-arrow-right" ng-click="clickNext()"><span class="sr-only">Next Day</span></i></div>
  \t</div>
  \t<div class="calendar" ng-if="calendarOpened">
  \t\t<div class="years">
  \t\t\t<select class="years-select" ng-model="$parent.selectedYear" ng-change="clickYear($parent.selectedYear)" ng-options="year for year in years"></select>
  \t\t</div>
  \t\t<ul class="months">
  \t\t\t<li ng-repeat="month in months" ng-class="::{selected: month.selected, disabled: !month.enabled}" ng-click="clickDate(month)"><span ng-bind="::month.name"></span></li>
  \t\t</ul>
  \t\t<div class="dates">
  \t\t\t<ul class="day-names"><li>Mon</li><li>Tue</li><li>Wed</li><li>Thu</li><li>Fri</li><li>Sat</li><li>Sun</li></ul>
  \t\t\t<ul class="dates-list" ng-class="::{weekly: weekly, dayly: !weekly}">
  \t\t\t\t<div ng-repeat="week in weeks" class="week clearfix" ng-class="::{selected: week.selected, disabled: !week.enabled}" ng-click="clickDate(week)">
  \t\t\t\t\t<li ng-repeat="day in week.days" ng-class="::{selected: day.selected, disabled: !day.enabled, om: day.otherMonth}" ng-click="clickDate(day)"><span ng-bind="::day.name"></span></li>
  \t\t\t\t</div>
  \t\t\t</ul>
  \t\t</div>
  \t\t<div class="today"><span ng-click="clickToday()" ng-bind="::goToText"></span></div>
  \t</div>
  </div>'},KHs0:function(e,t,a){"use strict";t.a=angular.module("fr.stopEvent",[]).directive("stopEvent",function(){return{restrict:"A",link:function(e,t,a){t.bind(a.stopEvent,function(e){e.stopPropagation()})}}}).name},"P+Gd":function(e,t,a){"use strict";var n=a("K2+k"),i=a.n(n);angular.module("fr.datepicker",[]).directive("frDatepicker",["$filter",function(e){return{restrict:"A",scope:!0,template:i.a,link:function(t,a,n){var i=t.$eval(n.options);i.ctrl&&(i.ctrl.scope=t),t.weekly=i.weekly;var l,s,c=i.onChange||function(){},d=i.currentDay,r={},o={},g={},y=new Date;y.setHours(0,0,0,0),i.dates?(i.byDates=!0,_(i.dates).each(function(e){r[new Date(e.getFullYear(),0,1).getTime()]=!0,o[new Date(e.getFullYear(),e.getMonth(),1).getTime()]=!0,g[e.getTime()]=!0,(void 0===l||l.getTime()>e.getTime())&&(l=e),(void 0===s||s.getTime()<e.getTime())&&(s=e),i.currentDay||(d?e.getTime()<d.getTime()&&y.getTime()<=e.getTime()?d=e:e.getTime()>d.getTime()&&y.getTime()>=d.getTime()&&(d=e):d=e)})):(i.byRange=!0,l=i.minDate,s=i.maxDate,i.currentDay||(d=y.getTime()<l.getTime()?new Date(l):y.getTime()>s.getTime()?new Date(s):y)),t.weekly&&f(d),t.date=i.date||d;var u=new Date(t.date);function D(e){return{date:e,enabled:i.byDates&&g[e.getTime()]||w(e),name:e.getDate(),otherMonth:u.getMonth()!==e.getMonth(),selected:t.date.getTime()===e.getTime(),type:"day"}}function k(){var a,n,c;console.time("DatePicker: calculate dates."),t.calendarOpened&&(function(){var e,a;if(t.selectedYear=u.getFullYear(),!t.years)for(t.years=[],e=l.getFullYear();e<=s.getFullYear();e++)a=new Date(e,0,1),i.byDates&&!r[a.getTime()]||t.years.push(e)}(),function(){var a;t.months=[];for(var n=0;n<=11;n++)a=new Date(u.getFullYear(),n,1),t.months.push({date:a,enabled:i.byDates&&o[a.getTime()]||w(a),name:e("date")(a,"MMM"),selected:u.getMonth()===n,type:"month"})}(),function(){var e,a;t.weeks=[];for(var n=new Date(u.getFullYear(),u.getMonth(),1).getDay(),i=1===n?7:0===n?6:n-1,l=1;l<=6;l++){e={type:"week",enabled:!1,selected:!1,days:[]};for(var s=1;s<=7;s++){var c=new Date(u);c.setDate(0-i+(7*(l-1)+s)),a=D(c),e.enabled=e.enabled||a.enabled,e.selected=e.selected||a.selected,1===a.date.getDay()&&(e.date=a.date),e.days.push(a)}t.weeks.push(e)}}()),n=t.date,c="d",t.weekly?((a=new Date(t.date)).setDate(a.getDate()+6),n.getMonth()!==a.getMonth()&&(c="d MMM"),t.selected=e("date")(n,c)+" - "+e("date")(a,"d MMM, yyyy")):t.selected=e("date")(n,"d MMM, yyyy"),console.timeEnd("DatePicker: calculate dates.")}function m(e){t.date=e,(u=new Date(e)).setDate(1),k(),t.notifyDateChange()}function f(e){var t=e.getDay();e.setDate(e.getDate()-t+(0==t?-6:1))}function w(e){return i.byRange&&e.getTime()>=l.getTime()&&e.getTime()<=s.getTime()}t.weekly?t.goToText="Current Week":i.byDates?t.goToText="Current Game Day":t.goToText="Go To Today",k(),t.notifyDateChange=function(){var e;t.weekly&&(e=new Date(t.date)).setDate(e.getDate()+6),c(t.date,e)},t.clickDate=function(e){"week"===e.type&&!t.weekly||"day"===e.type&&t.weekly||!e.enabled||(u=new Date(e.date.getFullYear(),e.date.getMonth(),1),"day"!==e.type&&"week"!==e.type||(t.date=new Date(e.date),t.notifyDateChange()),t.weekly&&f(t.date),k())},t.clickYear=function(e){!function(e){for(var t,a,n=0;n<12&&(a=new Date(e,n,1),!(i.byDates&&o[a.getTime()]||w(a))||t&&u.getMonth()<t.getMonth()||(t=a,u.getMonth()!==a.getMonth()));n++);u=t}(e),t.weekly&&f(t.date),k()},t.clickPrev=function(){for(var e=new Date(t.date);;){if(e.setDate(e.getDate()-1),e.getTime()<l.getTime())return;if(i.byRange)break;if(o[new Date(e.getFullYear(),e.getMonth(),1).getTime()]){if(g[e.getTime()])break}else e.setDate(1)}t.weekly&&f(e),m(e)},t.clickNext=function(){var e=new Date(t.date);for(t.weekly&&e.setDate(e.getDate()+7-e.getDay());;){if(e.setDate(e.getDate()+1),e.getTime()>s.getTime())return;if(i.byRange)break;if(o[new Date(e.getFullYear(),e.getMonth(),1).getTime()]){if(g[e.getTime()])break}else e.setMonth(e.getMonth()+1),e.setDate(0)}t.weekly&&f(e),m(e)},t.clickToday=function(){m(d)},t.toggleCalendar=function(){t.calendarOpened=!t.calendarOpened,k()}}}}])}}]);