Init(Core): Change repo
This commit is contained in:
420
public/assets/libs/admin-resources/bootstrap-datepicker/css/daterangepicker.css
vendored
Normal file
420
public/assets/libs/admin-resources/bootstrap-datepicker/css/daterangepicker.css
vendored
Normal file
@@ -0,0 +1,420 @@
|
||||
/*
|
||||
Created on : Jul 23, 2017, 6:30:10 PM
|
||||
Author : Atta-Ur-Rehman Shah (http://attacomsian.com)
|
||||
*/
|
||||
.daterangepicker .btn-primary, .daterangepicker .btn-primary:hover, .daterangepicker .btn-primary:focus,
|
||||
.daterangepicker .btn-primary.disabled, .daterangepicker .btn-primary:disabled{
|
||||
background-color: #6200ea;
|
||||
border-color: #6200ea;
|
||||
}
|
||||
.input-daterange input {
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.input-daterange input:first-child {
|
||||
border-bottom-left-radius: 3px;
|
||||
border-top-left-radius: 3px
|
||||
}
|
||||
.input-daterange input:last-child {
|
||||
border-bottom-right-radius: 3px;
|
||||
border-top-right-radius: 3px
|
||||
}
|
||||
.daterangepicker {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
margin-top: 5px;
|
||||
width: auto;
|
||||
padding: 0
|
||||
}
|
||||
.daterangepicker.dropdown-menu {
|
||||
max-width: none;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
z-index: 1000;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none
|
||||
}
|
||||
.daterangepicker.dropup {
|
||||
margin-top: -7px
|
||||
}
|
||||
|
||||
.daterangepicker .calendar,
|
||||
.daterangepicker .ranges {
|
||||
float: left
|
||||
}
|
||||
|
||||
.daterangepicker.opensleft .calendars {
|
||||
float: left
|
||||
}
|
||||
|
||||
.daterangepicker.opensright .calendars {
|
||||
float: right
|
||||
}
|
||||
|
||||
.daterangepicker.single .calendar {
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
margin-right: 0
|
||||
}
|
||||
|
||||
.daterangepicker.single .ranges {
|
||||
display: none
|
||||
}
|
||||
|
||||
.daterangepicker.show-calendar .calendar {
|
||||
display: block
|
||||
}
|
||||
|
||||
.daterangepicker .calendar {
|
||||
display: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 3px;
|
||||
margin: 7px;
|
||||
padding: 14px;
|
||||
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, .1)
|
||||
}
|
||||
|
||||
.daterangepicker table {
|
||||
width: 100%;
|
||||
margin: 0
|
||||
}
|
||||
|
||||
.daterangepicker table tbody td,
|
||||
.daterangepicker table tbody th {
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.daterangepicker td,
|
||||
.daterangepicker th {
|
||||
white-space: nowrap;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.daterangepicker td.week,
|
||||
.daterangepicker th.week {
|
||||
font-size: 80%;
|
||||
color: #ccc
|
||||
}
|
||||
|
||||
.daterangepicker th {
|
||||
color: #999;
|
||||
font-weight: 400;
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.daterangepicker th>i {
|
||||
top: 0
|
||||
}
|
||||
|
||||
.daterangepicker th.next,
|
||||
.daterangepicker th.prev {
|
||||
cursor: pointer
|
||||
}
|
||||
.daterangepicker th.next i,
|
||||
.daterangepicker th.prev i{
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.daterangepicker th.available:focus,
|
||||
.daterangepicker th.available:hover {
|
||||
color: #333
|
||||
}
|
||||
|
||||
.daterangepicker td.available:focus,
|
||||
.daterangepicker td.available:hover {
|
||||
background-color: rgba(200, 200, 200, 0.2);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.daterangepicker td.disabled,
|
||||
.daterangepicker td.off {
|
||||
color: #ccc
|
||||
}
|
||||
|
||||
.daterangepicker td.disabled {
|
||||
cursor: not-allowed
|
||||
}
|
||||
|
||||
.daterangepicker td.in-range {
|
||||
background-color: rgba(200, 200, 200, 0.2);
|
||||
}
|
||||
|
||||
.daterangepicker td.active,
|
||||
.daterangepicker td.active:focus,
|
||||
.daterangepicker td.active:hover {
|
||||
background-color: #6200ea;
|
||||
color: #fff;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.daterangepicker .table-condensed tr>td,
|
||||
.daterangepicker .table-condensed tr>th {
|
||||
padding: 9px;
|
||||
line-height: 1
|
||||
}
|
||||
|
||||
.daterangepicker .table-condensed thead tr:last-child th {
|
||||
padding-top: 14px
|
||||
}
|
||||
|
||||
.daterangepicker .table-condensed .month {
|
||||
font-size: 15px;
|
||||
line-height: 1;
|
||||
color: #333;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
font-weight: 400
|
||||
}
|
||||
|
||||
.daterangepicker select {
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
.daterangepicker select.monthselect {
|
||||
margin-right: 2%;
|
||||
width: 56%
|
||||
}
|
||||
|
||||
.daterangepicker select.yearselect {
|
||||
width: 40%
|
||||
}
|
||||
|
||||
.daterangepicker select.ampmselect,
|
||||
.daterangepicker select.hourselect,
|
||||
.daterangepicker select.minuteselect,
|
||||
.daterangepicker select.secondselect {
|
||||
width: 60px;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.daterangepicker .daterangepicker_input {
|
||||
position: relative
|
||||
}
|
||||
|
||||
.daterangepicker .daterangepicker_input i {
|
||||
position: absolute;
|
||||
right: 11px;
|
||||
top: auto;
|
||||
bottom: 2px;
|
||||
color: #999;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.daterangepicker .daterangepicker_input input {
|
||||
padding-left: 11px;
|
||||
padding-right: 34px
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-time {
|
||||
text-align: center;
|
||||
margin: 12px 0
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-time select.disabled {
|
||||
color: #ccc;
|
||||
cursor: not-allowed
|
||||
}
|
||||
|
||||
.ranges {
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 3px;
|
||||
width: 200px;
|
||||
margin-top: 7px;
|
||||
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, .1)
|
||||
}
|
||||
|
||||
.opensright .ranges {
|
||||
margin-left: 0
|
||||
}
|
||||
|
||||
.opensleft .ranges {
|
||||
margin-right: 0
|
||||
}
|
||||
|
||||
.ranges ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 7px 0
|
||||
}
|
||||
|
||||
.ranges ul+.daterangepicker-inputs {
|
||||
border-top: 1px solid #e5e5e5
|
||||
}
|
||||
|
||||
.ranges ul li {
|
||||
color: #333;
|
||||
padding: 8px 12px;
|
||||
cursor: pointer;
|
||||
margin-top: 1px
|
||||
}
|
||||
|
||||
.ranges ul li:first-child {
|
||||
margin-top: 0
|
||||
}
|
||||
|
||||
.ranges ul li:focus,
|
||||
.ranges ul li:hover {
|
||||
background-color: rgba(200, 200, 200, 0.2)
|
||||
}
|
||||
|
||||
.ranges ul li.active {
|
||||
color: #fff;
|
||||
background-color: #6200ea
|
||||
}
|
||||
|
||||
.ranges .daterangepicker-inputs {
|
||||
padding: 12px;
|
||||
padding-top: 19px
|
||||
}
|
||||
|
||||
.ranges .daterangepicker-inputs .daterangepicker_input+.daterangepicker_input {
|
||||
margin-top: 19px
|
||||
}
|
||||
|
||||
.ranges .daterangepicker-inputs .daterangepicker_input>span {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
margin-bottom: 7px;
|
||||
color: #999
|
||||
}
|
||||
|
||||
.ranges .daterangepicker-inputs+.range_inputs {
|
||||
border-top: 1px solid #e5e5e5
|
||||
}
|
||||
|
||||
.ranges .range_inputs {
|
||||
padding: 12px
|
||||
}
|
||||
|
||||
.ranges .range_inputs .btn {
|
||||
display: block;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.ranges .range_inputs .btn+.btn {
|
||||
margin-top: 12px
|
||||
}
|
||||
|
||||
@media (min-width:769px) {
|
||||
.ranges {
|
||||
margin: 7px
|
||||
}
|
||||
}
|
||||
|
||||
.daterange-custom {
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.daterange-custom:after {
|
||||
content: '';
|
||||
display: table;
|
||||
clear: both
|
||||
}
|
||||
|
||||
.daterange-custom .badge,
|
||||
.daterange-custom .label {
|
||||
margin: 4px 0 0 7px;
|
||||
vertical-align: top
|
||||
}
|
||||
|
||||
.daterange-custom .label-icon {
|
||||
margin-top: 0;
|
||||
margin-right: 5px
|
||||
}
|
||||
|
||||
.daterange-custom-display {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
padding-left: 21px;
|
||||
line-height: 1
|
||||
}
|
||||
|
||||
.daterange-custom-display:after {
|
||||
content: '\e9c9';
|
||||
font-family: icomoon;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
margin-top: -8px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transition: all ease-in-out .2s;
|
||||
-o-transition: all ease-in-out .2s;
|
||||
transition: all ease-in-out .2s
|
||||
}
|
||||
|
||||
.daterange-custom.is-opened .daterange-custom-display:after {
|
||||
-webkit-transform: rotate(180deg);
|
||||
-ms-transform: rotate(180deg);
|
||||
-o-transform: rotate(180deg);
|
||||
transform: rotate(180deg)
|
||||
}
|
||||
|
||||
.daterange-custom-display>i {
|
||||
display: inline-block;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
letter-spacing: -.015em
|
||||
}
|
||||
|
||||
.daterange-custom-display b {
|
||||
display: inline-block;
|
||||
margin-left: 4px;
|
||||
font-weight: 400
|
||||
}
|
||||
|
||||
.daterange-custom-display b>i {
|
||||
font-size: 11px;
|
||||
display: block;
|
||||
line-height: 12px;
|
||||
text-transform: uppercase;
|
||||
font-style: normal;
|
||||
font-weight: 400
|
||||
}
|
||||
|
||||
.daterange-custom-display em {
|
||||
line-height: 30px;
|
||||
vertical-align: top;
|
||||
margin: 0 4px
|
||||
}
|
||||
|
||||
@media (max-width:769px) {
|
||||
.opensleft,
|
||||
.opensright {
|
||||
left: 0!important;
|
||||
right: 0
|
||||
}
|
||||
.opensleft .calendars,
|
||||
.opensright .calendars {
|
||||
float: none
|
||||
}
|
||||
.daterangepicker.opensleft .calendar,
|
||||
.daterangepicker.opensleft .calendars,
|
||||
.daterangepicker.opensleft .ranges,
|
||||
.daterangepicker.opensright .calendar,
|
||||
.daterangepicker.opensright .calendars,
|
||||
.daterangepicker.opensright .ranges {
|
||||
float: none
|
||||
}
|
||||
.daterangepicker {
|
||||
width: 100%;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px
|
||||
}
|
||||
.daterangepicker .calendar {
|
||||
margin-left: 0;
|
||||
margin-right: 0
|
||||
}
|
||||
.daterangepicker .ranges {
|
||||
width: 100%
|
||||
}
|
||||
}
|
||||
1624
public/assets/libs/admin-resources/bootstrap-datepicker/js/daterangepicker.js
vendored
Normal file
1624
public/assets/libs/admin-resources/bootstrap-datepicker/js/daterangepicker.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
public/assets/libs/admin-resources/bootstrap-datepicker/js/moment.min.js
vendored
Normal file
7
public/assets/libs/admin-resources/bootstrap-datepicker/js/moment.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1,36 @@
|
||||
.jvectormap-label {
|
||||
position: absolute;
|
||||
display: none;
|
||||
border: solid 1px #CDCDCD;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
background: #292929;
|
||||
color: white;
|
||||
font-family: sans-serif, Verdana;
|
||||
font-size: smaller;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.jvectormap-zoomin, .jvectormap-zoomout {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
background: #424242;
|
||||
padding: 2px;
|
||||
color: white;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
cursor: pointer;
|
||||
line-height: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.jvectormap-zoomin {
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.jvectormap-zoomout {
|
||||
top: 30px;
|
||||
}
|
||||
8
public/assets/libs/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.min.js
vendored
Normal file
8
public/assets/libs/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-au-mill-en.js
vendored
Normal file
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-au-mill-en.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-ca-lcc-en.js
vendored
Normal file
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-ca-lcc-en.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-es-merc.js
vendored
Normal file
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-es-merc.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-es-mill.js
vendored
Normal file
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-es-mill.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-europe-mill-en.js
vendored
Normal file
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-europe-mill-en.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-fr-merc-en.js
vendored
Normal file
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-fr-merc-en.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-in-mill-en.js
vendored
Normal file
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-in-mill-en.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-map.js
vendored
Normal file
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-map.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-uk-mill-en.js
vendored
Normal file
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-uk-mill-en.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-us-merc-en.js
vendored
Normal file
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-us-merc-en.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-world-mill-en.js
vendored
Normal file
1
public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-world-mill-en.js
vendored
Normal file
File diff suppressed because one or more lines are too long
452
public/assets/libs/admin-resources/ratings/jquery.raty-fa.js
Normal file
452
public/assets/libs/admin-resources/ratings/jquery.raty-fa.js
Normal file
@@ -0,0 +1,452 @@
|
||||
/*!
|
||||
* jQuery Raty FA - A Star Rating Plugin with Font Awesome
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
*
|
||||
* @author : Jacob Overgaard
|
||||
* @doc : http://jacob87.github.io/raty-fa/
|
||||
* @version : 0.1.1
|
||||
*
|
||||
*/
|
||||
|
||||
;(function($) {
|
||||
|
||||
var methods = {
|
||||
init: function(settings) {
|
||||
return this.each(function() {
|
||||
methods.destroy.call(this);
|
||||
|
||||
this.opt = $.extend(true, {}, $.fn.raty.defaults, settings);
|
||||
|
||||
var that = $(this),
|
||||
inits = ['number', 'readOnly', 'score', 'scoreName'];
|
||||
|
||||
methods._callback.call(this, inits);
|
||||
|
||||
if (this.opt.precision) {
|
||||
methods._adjustPrecision.call(this);
|
||||
}
|
||||
|
||||
this.opt.number = methods._between(this.opt.number, 0, this.opt.numberMax);
|
||||
|
||||
this.stars = methods._createStars.call(this);
|
||||
this.score = methods._createScore.call(this);
|
||||
|
||||
methods._apply.call(this, this.opt.score);
|
||||
|
||||
if (this.opt.cancel) {
|
||||
this.cancel = methods._createCancel.call(this);
|
||||
}
|
||||
|
||||
if (this.opt.width) {
|
||||
that.css('width', this.opt.width);
|
||||
}
|
||||
|
||||
if (this.opt.readOnly) {
|
||||
methods._lock.call(this);
|
||||
} else {
|
||||
that.css('cursor', 'pointer');
|
||||
methods._binds.call(this);
|
||||
}
|
||||
|
||||
methods._target.call(this, this.opt.score);
|
||||
|
||||
that.data({ 'settings': this.opt, 'raty': true });
|
||||
});
|
||||
}, _adjustPrecision: function() {
|
||||
this.opt.targetType = 'score';
|
||||
this.opt.half = true;
|
||||
}, _apply: function(score) {
|
||||
if (typeof score !== 'undefined' && score >= 0) {
|
||||
score = methods._between(score, 0, this.opt.number);
|
||||
this.score.val(score);
|
||||
}
|
||||
|
||||
methods._fill.call(this, score);
|
||||
|
||||
if (score) {
|
||||
methods._roundStars.call(this, score);
|
||||
}
|
||||
}, _between: function(value, min, max) {
|
||||
return Math.min(Math.max(parseFloat(value), min), max);
|
||||
}, _binds: function() {
|
||||
if (this.cancel) {
|
||||
methods._bindCancel.call(this);
|
||||
}
|
||||
|
||||
methods._bindClick.call(this);
|
||||
methods._bindOut.call(this);
|
||||
methods._bindOver.call(this);
|
||||
}, _bindCancel: function() {
|
||||
methods._bindClickCancel.call(this);
|
||||
methods._bindOutCancel.call(this);
|
||||
methods._bindOverCancel.call(this);
|
||||
}, _bindClick: function() {
|
||||
var self = this,
|
||||
that = $(self);
|
||||
|
||||
self.stars.on('click.raty', function(evt) {
|
||||
self.score.val((self.opt.half || self.opt.precision) ? that.data('score') : $(this).data('score'));
|
||||
|
||||
if (self.opt.click) {
|
||||
self.opt.click.call(self, parseFloat(self.score.val()), evt);
|
||||
}
|
||||
});
|
||||
}, _bindClickCancel: function() {
|
||||
var self = this;
|
||||
|
||||
self.cancel.on('click.raty', function(evt) {
|
||||
self.score.removeAttr('value');
|
||||
|
||||
if (self.opt.click) {
|
||||
self.opt.click.call(self, null, evt);
|
||||
}
|
||||
});
|
||||
}, _bindOut: function() {
|
||||
var self = this;
|
||||
|
||||
$(this).on('mouseleave.raty', function(evt) {
|
||||
var score = parseFloat(self.score.val()) || undefined;
|
||||
|
||||
methods._apply.call(self, score);
|
||||
methods._target.call(self, score, evt);
|
||||
|
||||
if (self.opt.mouseout) {
|
||||
self.opt.mouseout.call(self, score, evt);
|
||||
}
|
||||
});
|
||||
}, _bindOutCancel: function() {
|
||||
var self = this;
|
||||
|
||||
self.cancel.on('mouseleave.raty', function(evt) {
|
||||
$(this).attr('class', self.opt.cancelOff);
|
||||
|
||||
if (self.opt.mouseout) {
|
||||
self.opt.mouseout.call(self, self.score.val() || null, evt);
|
||||
}
|
||||
});
|
||||
}, _bindOverCancel: function() {
|
||||
var self = this;
|
||||
|
||||
self.cancel.on('mouseover.raty', function(evt) {
|
||||
$(this).attr('class', self.opt.cancelOn);
|
||||
|
||||
self.stars.attr('class', self.opt.starOff);
|
||||
|
||||
methods._target.call(self, null, evt);
|
||||
|
||||
if (self.opt.mouseover) {
|
||||
self.opt.mouseover.call(self, null);
|
||||
}
|
||||
});
|
||||
}, _bindOver: function() {
|
||||
var self = this,
|
||||
that = $(self),
|
||||
action = self.opt.half ? 'mousemove.raty' : 'mouseover.raty';
|
||||
|
||||
self.stars.on(action, function(evt) {
|
||||
var score = parseInt($(this).data('score'), 10);
|
||||
|
||||
if (self.opt.half) {
|
||||
var position = parseFloat((evt.pageX - $(this).offset().left) / (self.opt.size ? self.opt.size : parseInt(that.css('font-size')))),
|
||||
plus = (position > .5) ? 1 : .5;
|
||||
|
||||
score = score - 1 + plus;
|
||||
|
||||
methods._fill.call(self, score);
|
||||
|
||||
if (self.opt.precision) {
|
||||
score = score - plus + position;
|
||||
}
|
||||
|
||||
methods._roundStars.call(self, score);
|
||||
|
||||
that.data('score', score);
|
||||
} else {
|
||||
methods._fill.call(self, score);
|
||||
}
|
||||
|
||||
methods._target.call(self, score, evt);
|
||||
|
||||
if (self.opt.mouseover) {
|
||||
self.opt.mouseover.call(self, score, evt);
|
||||
}
|
||||
});
|
||||
}, _callback: function(options) {
|
||||
for (var i in options) {
|
||||
if (typeof this.opt[options[i]] === 'function') {
|
||||
this.opt[options[i]] = this.opt[options[i]].call(this);
|
||||
}
|
||||
}
|
||||
}, _createCancel: function() {
|
||||
var that = $(this),
|
||||
icon = this.opt.cancelOff,
|
||||
cancel = $('<i />', { 'class': icon, title: this.opt.cancelHint });
|
||||
|
||||
if (this.opt.cancelPlace == 'left') {
|
||||
that.prepend(' ').prepend(cancel);
|
||||
} else {
|
||||
that.append(' ').append(cancel);
|
||||
}
|
||||
|
||||
return cancel;
|
||||
}, _createScore: function() {
|
||||
return $('<input />', { type: 'hidden', name: this.opt.scoreName }).appendTo(this);
|
||||
}, _createStars: function() {
|
||||
var that = $(this);
|
||||
|
||||
for (var i = 1; i <= this.opt.number; i++) {
|
||||
var title = methods._getHint.call(this, i),
|
||||
icon = (this.opt.score && this.opt.score >= i) ? 'starOn' : 'starOff';
|
||||
|
||||
icon = this.opt[icon];
|
||||
|
||||
$('<i />', { 'class' : icon, title: title, 'data-score': i }).appendTo(this);
|
||||
|
||||
if (this.opt.space) {
|
||||
that.append((i < this.opt.number) ? ' ' : '');
|
||||
}
|
||||
}
|
||||
|
||||
return that.children('i');
|
||||
}, _error: function(message) {
|
||||
$(this).html(message);
|
||||
|
||||
$.error(message);
|
||||
}, _fill: function(score) {
|
||||
var self = this,
|
||||
hash = 0;
|
||||
|
||||
for (var i = 1; i <= self.stars.length; i++) {
|
||||
var star = self.stars.eq(i - 1),
|
||||
select = self.opt.single ? (i == score) : (i <= score);
|
||||
|
||||
if (self.opt.iconRange && self.opt.iconRange.length > hash) {
|
||||
var irange = self.opt.iconRange[hash],
|
||||
on = irange.on || self.opt.starOn,
|
||||
off = irange.off || self.opt.starOff,
|
||||
icon = select ? on : off;
|
||||
|
||||
if (i <= irange.range) {
|
||||
star.attr('class', icon);
|
||||
}
|
||||
|
||||
if (i == irange.range) {
|
||||
hash++;
|
||||
}
|
||||
} else {
|
||||
var icon = select ? 'starOn' : 'starOff';
|
||||
|
||||
star.attr('class', this.opt[icon]);
|
||||
}
|
||||
}
|
||||
}, _getHint: function(score) {
|
||||
var hint = this.opt.hints[score - 1];
|
||||
return (hint === '') ? '' : (hint || score);
|
||||
}, _lock: function() {
|
||||
var score = parseInt(this.score.val(), 10), // TODO: 3.1 >> [['1'], ['2'], ['3', '.1', '.2']]
|
||||
hint = score ? methods._getHint.call(this, score) : this.opt.noRatedMsg;
|
||||
|
||||
$(this).data('readonly', true).css('cursor', '').attr('title', hint);
|
||||
|
||||
this.score.attr('readonly', 'readonly');
|
||||
this.stars.attr('title', hint);
|
||||
|
||||
if (this.cancel) {
|
||||
this.cancel.hide();
|
||||
}
|
||||
}, _roundStars: function(score) {
|
||||
var rest = (score - Math.floor(score)).toFixed(2);
|
||||
|
||||
if (rest > this.opt.round.down) {
|
||||
var icon = 'starOn'; // Up: [x.76 .. x.99]
|
||||
|
||||
if (this.opt.halfShow && rest < this.opt.round.up) { // Half: [x.26 .. x.75]
|
||||
icon = 'starHalf';
|
||||
} else if (rest < this.opt.round.full) { // Down: [x.00 .. x.5]
|
||||
icon = 'starOff';
|
||||
}
|
||||
|
||||
this.stars.eq(Math.ceil(score) - 1).attr('class', this.opt[icon]);
|
||||
} // Full down: [x.00 .. x.25]
|
||||
}, _target: function(score, evt) {
|
||||
if (this.opt.target) {
|
||||
var target = $(this.opt.target);
|
||||
|
||||
if (target.length === 0) {
|
||||
methods._error.call(this, 'Target selector invalid or missing!');
|
||||
}
|
||||
|
||||
if (this.opt.targetFormat.indexOf('{score}') < 0) {
|
||||
methods._error.call(this, 'Template "{score}" missing!');
|
||||
}
|
||||
|
||||
var mouseover = evt && evt.type == 'mouseover';
|
||||
|
||||
if (score === undefined) {
|
||||
score = this.opt.targetText;
|
||||
} else if (score === null) {
|
||||
score = mouseover ? this.opt.cancelHint : this.opt.targetText;
|
||||
} else {
|
||||
if (this.opt.targetType == 'hint') {
|
||||
score = methods._getHint.call(this, Math.ceil(score));
|
||||
} else if (this.opt.precision) {
|
||||
score = parseFloat(score).toFixed(1);
|
||||
}
|
||||
|
||||
if (!mouseover && !this.opt.targetKeep) {
|
||||
score = this.opt.targetText;
|
||||
}
|
||||
}
|
||||
|
||||
if (score) {
|
||||
score = this.opt.targetFormat.toString().replace('{score}', score);
|
||||
}
|
||||
|
||||
if (target.is(':input')) {
|
||||
target.val(score);
|
||||
} else {
|
||||
target.html(score);
|
||||
}
|
||||
}
|
||||
}, _unlock: function() {
|
||||
$(this).data('readonly', false).css('cursor', 'pointer').removeAttr('title');
|
||||
|
||||
this.score.removeAttr('readonly', 'readonly');
|
||||
|
||||
for (var i = 0; i < this.opt.number; i++) {
|
||||
this.stars.eq(i).attr('title', methods._getHint.call(this, i + 1));
|
||||
}
|
||||
|
||||
if (this.cancel) {
|
||||
this.cancel.css('display', '');
|
||||
}
|
||||
}, cancel: function(click) {
|
||||
return this.each(function() {
|
||||
if ($(this).data('readonly') !== true) {
|
||||
methods[click ? 'click' : 'score'].call(this, null);
|
||||
this.score.removeAttr('value');
|
||||
}
|
||||
});
|
||||
}, click: function(score) {
|
||||
return $(this).each(function() {
|
||||
if ($(this).data('readonly') !== true) {
|
||||
methods._apply.call(this, score);
|
||||
|
||||
if (!this.opt.click) {
|
||||
methods._error.call(this, 'You must add the "click: function(score, evt) { }" callback.');
|
||||
}
|
||||
|
||||
|
||||
this.opt.click.call(this, score, $.Event('click'));
|
||||
|
||||
methods._target.call(this, score);
|
||||
}
|
||||
});
|
||||
}, destroy: function() {
|
||||
return $(this).each(function() {
|
||||
var that = $(this),
|
||||
raw = that.data('raw');
|
||||
|
||||
if (raw) {
|
||||
that.off('.raty').empty().css({ cursor: raw.style.cursor, width: raw.style.width }).removeData('readonly');
|
||||
} else {
|
||||
that.data('raw', that.clone()[0]);
|
||||
}
|
||||
});
|
||||
}, getScore: function() {
|
||||
var score = [],
|
||||
value ;
|
||||
|
||||
$(this).each(function() {
|
||||
value = this.score.val();
|
||||
|
||||
score.push(value ? parseFloat(value) : undefined);
|
||||
});
|
||||
|
||||
return (score.length > 1) ? score : score[0];
|
||||
}, readOnly: function(readonly) {
|
||||
return this.each(function() {
|
||||
var that = $(this);
|
||||
|
||||
if (that.data('readonly') !== readonly) {
|
||||
if (readonly) {
|
||||
that.off('.raty').children('i').off('.raty');
|
||||
|
||||
methods._lock.call(this);
|
||||
} else {
|
||||
methods._binds.call(this);
|
||||
methods._unlock.call(this);
|
||||
}
|
||||
|
||||
that.data('readonly', readonly);
|
||||
}
|
||||
});
|
||||
}, reload: function() {
|
||||
return methods.set.call(this, {});
|
||||
}, score: function() {
|
||||
return arguments.length ? methods.setScore.apply(this, arguments) : methods.getScore.call(this);
|
||||
}, set: function(settings) {
|
||||
return this.each(function() {
|
||||
var that = $(this),
|
||||
actual = that.data('settings'),
|
||||
news = $.extend({}, actual, settings);
|
||||
|
||||
that.raty(news);
|
||||
});
|
||||
}, setScore: function(score) {
|
||||
return $(this).each(function() {
|
||||
if ($(this).data('readonly') !== true) {
|
||||
methods._apply.call(this, score);
|
||||
methods._target.call(this, score);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.raty = function(method) {
|
||||
if (methods[method]) {
|
||||
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
||||
} else if (typeof method === 'object' || !method) {
|
||||
return methods.init.apply(this, arguments);
|
||||
} else {
|
||||
$.error('Method ' + method + ' does not exist!');
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.raty.defaults = {
|
||||
cancel : false,
|
||||
cancelHint : 'Cancel this rating!',
|
||||
cancelOff : 'fa fa-fw fa-minus-square',
|
||||
cancelOn : 'fa fa-fw fa-check-square',
|
||||
cancelPlace : 'left',
|
||||
click : undefined,
|
||||
half : false,
|
||||
halfShow : true,
|
||||
hints : ['bad', 'poor', 'regular', 'good', 'gorgeous'],
|
||||
iconRange : undefined,
|
||||
mouseout : undefined,
|
||||
mouseover : undefined,
|
||||
noRatedMsg : 'Not rated yet!',
|
||||
number : 5,
|
||||
numberMax : 20,
|
||||
precision : false,
|
||||
readOnly : false,
|
||||
round : { down: .25, full: .6, up: .76 },
|
||||
score : undefined,
|
||||
scoreName : 'score',
|
||||
single : false,
|
||||
size : null,
|
||||
space : true,
|
||||
starHalf : 'fa fa-fw fa-star-half-o',
|
||||
starOff : 'fa fa-fw fa-star-o',
|
||||
starOn : 'fa fa-fw fa-star',
|
||||
target : undefined,
|
||||
targetFormat : '{score}',
|
||||
targetKeep : false,
|
||||
targetText : '',
|
||||
targetType : 'hint',
|
||||
width : false
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
7
public/assets/libs/admin-resources/rwd-table/rwd-table.min.css
vendored
Normal file
7
public/assets/libs/admin-resources/rwd-table/rwd-table.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
public/assets/libs/admin-resources/rwd-table/rwd-table.min.js
vendored
Normal file
7
public/assets/libs/admin-resources/rwd-table/rwd-table.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user