First Initial
This commit is contained in:
2
wwwroot/BackendScript/js/additional-methods.min.js
vendored
Normal file
2
wwwroot/BackendScript/js/additional-methods.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
57
wwwroot/BackendScript/js/advanced-form-components.js
Normal file
57
wwwroot/BackendScript/js/advanced-form-components.js
Normal file
@@ -0,0 +1,57 @@
|
||||
|
||||
//multiselect start
|
||||
$('#my_multi_select1').multiSelect();
|
||||
$('#my_multi_select2').multiSelect({
|
||||
selectableOptgroup: true
|
||||
});
|
||||
|
||||
$('#my_multi_select3').multiSelect({
|
||||
selectableHeader: "<input type='text' class='form-control search-input' autocomplete='off' placeholder='search...'>",
|
||||
selectionHeader: "<input type='text' class='form-control search-input' autocomplete='off' placeholder='search...'>",
|
||||
afterInit: function (ms) {
|
||||
var that = this,
|
||||
$selectableSearch = that.$selectableUl.prev(),
|
||||
$selectionSearch = that.$selectionUl.prev(),
|
||||
selectableSearchString = '#' + that.$container.attr('id') + ' .ms-elem-selectable:not(.ms-selected)',
|
||||
selectionSearchString = '#' + that.$container.attr('id') + ' .ms-elem-selection.ms-selected';
|
||||
|
||||
that.qs1 = $selectableSearch.quicksearch(selectableSearchString)
|
||||
.on('keydown', function (e) {
|
||||
if (e.which === 40) {
|
||||
that.$selectableUl.focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
that.qs2 = $selectionSearch.quicksearch(selectionSearchString)
|
||||
.on('keydown', function (e) {
|
||||
if (e.which == 40) {
|
||||
that.$selectionUl.focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
afterSelect: function () {
|
||||
this.qs1.cache();
|
||||
this.qs2.cache();
|
||||
},
|
||||
afterDeselect: function () {
|
||||
this.qs1.cache();
|
||||
this.qs2.cache();
|
||||
}
|
||||
});
|
||||
//multiselect end
|
||||
|
||||
|
||||
//spinner start
|
||||
$('#spinner1').spinner();
|
||||
$('#spinner2').spinner({disabled: true});
|
||||
$('#spinner3').spinner({value:0, min: 0, max: 10});
|
||||
$('#spinner4').spinner({value:0, step: 5, min: 0, max: 200});
|
||||
//spinner end
|
||||
|
||||
//wysihtml5 start
|
||||
|
||||
$('.wysihtml5').wysihtml5();
|
||||
|
||||
//wysihtml5 end
|
||||
132
wwwroot/BackendScript/js/all-chartjs.js
Normal file
132
wwwroot/BackendScript/js/all-chartjs.js
Normal file
@@ -0,0 +1,132 @@
|
||||
var Script = function () {
|
||||
|
||||
|
||||
var doughnutData = [
|
||||
{
|
||||
value: 30,
|
||||
color:"#F7464A"
|
||||
},
|
||||
{
|
||||
value : 50,
|
||||
color : "#46BFBD"
|
||||
},
|
||||
{
|
||||
value : 100,
|
||||
color : "#FDB45C"
|
||||
},
|
||||
{
|
||||
value : 40,
|
||||
color : "#949FB1"
|
||||
},
|
||||
{
|
||||
value : 120,
|
||||
color : "#4D5360"
|
||||
}
|
||||
|
||||
];
|
||||
var lineChartData = {
|
||||
labels : ["","","","","","",""],
|
||||
datasets : [
|
||||
{
|
||||
fillColor : "rgba(220,220,220,0.5)",
|
||||
strokeColor : "rgba(220,220,220,1)",
|
||||
pointColor : "rgba(220,220,220,1)",
|
||||
pointStrokeColor : "#fff",
|
||||
data : [65,59,90,81,56,55,40]
|
||||
},
|
||||
{
|
||||
fillColor : "rgba(151,187,205,0.5)",
|
||||
strokeColor : "rgba(151,187,205,1)",
|
||||
pointColor : "rgba(151,187,205,1)",
|
||||
pointStrokeColor : "#fff",
|
||||
data : [28,48,40,19,96,27,100]
|
||||
}
|
||||
]
|
||||
|
||||
};
|
||||
var pieData = [
|
||||
{
|
||||
value: 30,
|
||||
color:"#F38630"
|
||||
},
|
||||
{
|
||||
value : 50,
|
||||
color : "#E0E4CC"
|
||||
},
|
||||
{
|
||||
value : 100,
|
||||
color : "#69D2E7"
|
||||
}
|
||||
|
||||
];
|
||||
var barChartData = {
|
||||
labels : ["January","February","March","April","May","June","July"],
|
||||
datasets : [
|
||||
{
|
||||
fillColor : "rgba(220,220,220,0.5)",
|
||||
strokeColor : "rgba(220,220,220,1)",
|
||||
data : [65,59,90,81,56,55,40]
|
||||
},
|
||||
{
|
||||
fillColor : "rgba(151,187,205,0.5)",
|
||||
strokeColor : "rgba(151,187,205,1)",
|
||||
data : [28,48,40,19,96,27,100]
|
||||
}
|
||||
]
|
||||
|
||||
};
|
||||
var chartData = [
|
||||
{
|
||||
value : Math.random(),
|
||||
color: "#D97041"
|
||||
},
|
||||
{
|
||||
value : Math.random(),
|
||||
color: "#C7604C"
|
||||
},
|
||||
{
|
||||
value : Math.random(),
|
||||
color: "#21323D"
|
||||
},
|
||||
{
|
||||
value : Math.random(),
|
||||
color: "#9D9B7F"
|
||||
},
|
||||
{
|
||||
value : Math.random(),
|
||||
color: "#7D4F6D"
|
||||
},
|
||||
{
|
||||
value : Math.random(),
|
||||
color: "#584A5E"
|
||||
}
|
||||
];
|
||||
var radarChartData = {
|
||||
labels : ["","","","","","",""],
|
||||
datasets : [
|
||||
{
|
||||
fillColor : "rgba(220,220,220,0.5)",
|
||||
strokeColor : "rgba(220,220,220,1)",
|
||||
pointColor : "rgba(220,220,220,1)",
|
||||
pointStrokeColor : "#fff",
|
||||
data : [65,59,90,81,56,55,40]
|
||||
},
|
||||
{
|
||||
fillColor : "rgba(151,187,205,0.5)",
|
||||
strokeColor : "rgba(151,187,205,1)",
|
||||
pointColor : "rgba(151,187,205,1)",
|
||||
pointStrokeColor : "#fff",
|
||||
data : [28,48,40,19,96,27,100]
|
||||
}
|
||||
]
|
||||
|
||||
};
|
||||
new Chart(document.getElementById("doughnut").getContext("2d")).Doughnut(doughnutData);
|
||||
new Chart(document.getElementById("line").getContext("2d")).Line(lineChartData);
|
||||
new Chart(document.getElementById("radar").getContext("2d")).Radar(radarChartData);
|
||||
new Chart(document.getElementById("polarArea").getContext("2d")).PolarArea(chartData);
|
||||
new Chart(document.getElementById("bar").getContext("2d")).Bar(barChartData);
|
||||
new Chart(document.getElementById("pie").getContext("2d")).Pie(pieData);
|
||||
|
||||
|
||||
}();
|
||||
206
wwwroot/BackendScript/js/bootstrap-datepicker-th/bootstrap-datepicker-thai.js
vendored
Normal file
206
wwwroot/BackendScript/js/bootstrap-datepicker-th/bootstrap-datepicker-thai.js
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
/**
|
||||
* Implement Thai-year handling inherit core datepicker and default bootstrap-datepicker backend.
|
||||
*/
|
||||
|
||||
;(function($) {
|
||||
var dates = $.fn.datepicker.dates
|
||||
, DPGlobal= $.fn.datepicker.DPGlobal
|
||||
, thai = {
|
||||
adj : 543
|
||||
, code : 'th'
|
||||
, bound : 2400 // full year value that detect as thai year
|
||||
, shbound : 40 // short year value that detect as thai year
|
||||
, shwrap : 70 // short year value that wrap to previous century
|
||||
, shbase : 2000 // default base for short year 20xx
|
||||
}
|
||||
|
||||
function dspThaiYear(language) {
|
||||
return language.search('-'+thai.code)>=0
|
||||
}
|
||||
|
||||
function smartThai(language){
|
||||
return language.search(thai.code)>=0
|
||||
}
|
||||
|
||||
function smartFullYear(v,language){
|
||||
if (smartThai(language) && v>=thai.bound)
|
||||
v -= thai.adj // thaiyear 24xx -
|
||||
|
||||
if (dspThaiYear(language) && v < thai.bound - thai.adj)
|
||||
v -= thai.adj
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
function smartShortYear(v,language) {
|
||||
if (v<100){
|
||||
if (v>=thai.shwrap)
|
||||
v -= 100; // 1970 - 1999
|
||||
|
||||
if (smartThai(language) && v>=thai.shbound)
|
||||
v -= (thai.adj%100) // thaiyear [2540..2569] -> [1997..2026]
|
||||
|
||||
v += thai.shbase;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
function smartYear(v,language) {
|
||||
return smartFullYear(smartShortYear(v,language),language)
|
||||
}
|
||||
|
||||
function UTCDate() {
|
||||
return new Date(Date.UTC.apply(Date, arguments))
|
||||
}
|
||||
|
||||
// inherit default backend
|
||||
|
||||
if (DPGlobal.name && DPGlobal.name.search(/.th$/)>=0)
|
||||
return
|
||||
|
||||
var _basebackend_ = $.extend({},DPGlobal)
|
||||
|
||||
$.extend(DPGlobal,{
|
||||
name: (_basebackend_.name || '') + '.th'
|
||||
, parseDate:
|
||||
function(date, format, language) {
|
||||
|
||||
if (date=='') {
|
||||
date = new Date()
|
||||
date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0)
|
||||
}
|
||||
|
||||
if (smartThai(language)
|
||||
&& !((date instanceof Date) || /^[-+].*/.test(date))) {
|
||||
|
||||
//console.log(this.parseFormat(format));
|
||||
var formats = format //this.parseFormat(format)
|
||||
, parts = date && date.match(this.nonpunctuation) || []
|
||||
|
||||
if (parts.length == formats.parts.length) {
|
||||
var seps = $.extend([], formats.separators)
|
||||
, xdate = []
|
||||
|
||||
for (var i=0, cnt = formats.parts.length; i < cnt; i++) {
|
||||
if (~['yyyy','yy'].indexOf(formats.parts[i]))
|
||||
parts[i] = '' + smartYear(parseInt(parts[i], 10),language)
|
||||
|
||||
if (seps.length)
|
||||
xdate.push(seps.shift())
|
||||
|
||||
xdate.push(parts[i])
|
||||
}
|
||||
|
||||
date = xdate.join('')
|
||||
}
|
||||
}
|
||||
return _basebackend_.parseDate.call(this,date,format,language)
|
||||
}
|
||||
, formatDate:
|
||||
function(date, format, language){
|
||||
|
||||
var fmtdate = _basebackend_.formatDate.call(this,date,format,language)
|
||||
|
||||
if (dspThaiYear(language)){
|
||||
var formats = format //this.parseFormat(format)
|
||||
, parts = fmtdate && fmtdate.match(this.nonpunctuation) || []
|
||||
, trnfrm = {
|
||||
yy : (thai.adj+date.getUTCFullYear()).toString().substring(2)
|
||||
, yyyy: (thai.adj+date.getUTCFullYear()).toString()
|
||||
}
|
||||
|
||||
//if (parts.length == formats.parts.length) {
|
||||
//console.log(formats.separators);
|
||||
if (parts.length == formats.parts.length) {
|
||||
var seps = $.extend([], formats.separators)
|
||||
, xdate = []
|
||||
|
||||
for (var i=0, cnt = formats.parts.length; i < cnt; i++) {
|
||||
if (seps.length)
|
||||
xdate.push(seps.shift())
|
||||
|
||||
xdate.push(trnfrm[formats.parts[i]] || parts[i])
|
||||
}
|
||||
fmtdate = xdate.join('')
|
||||
}
|
||||
|
||||
}
|
||||
return fmtdate
|
||||
}
|
||||
})
|
||||
|
||||
// inherit core datepicker
|
||||
var DatePicker = $.fn.datepicker.Constructor
|
||||
|
||||
if (!DatePicker.prototype.fillThai){
|
||||
var _basemethod_ = $.extend({},DatePicker.prototype)
|
||||
|
||||
$.extend(DatePicker.prototype,{
|
||||
fillThai: function(){
|
||||
var d = new Date(this.viewDate)
|
||||
, year = d.getUTCFullYear()
|
||||
, month = d.getUTCMonth()
|
||||
, elem = this.picker.find('.datepicker-days th:eq(1)')
|
||||
|
||||
elem
|
||||
.text(elem.text()
|
||||
.replace(''+year,''+(year+thai.adj)))
|
||||
|
||||
this.picker
|
||||
.find('.datepicker-months')
|
||||
.find('th:eq(1)')
|
||||
.text(''+(year+thai.adj))
|
||||
|
||||
year = parseInt((year+thai.adj)/10, 10) * 10
|
||||
|
||||
this.picker
|
||||
.find('.datepicker-years')
|
||||
.find('th:eq(1)')
|
||||
.text(year + '-' + (year + 9))
|
||||
.end()
|
||||
.find('td')
|
||||
.find('span.year')
|
||||
.each(
|
||||
function() {
|
||||
$(this)
|
||||
.text(Number($(this).text()) + thai.adj)
|
||||
})
|
||||
}
|
||||
, fill: function(){
|
||||
_basemethod_.fill.call(this)
|
||||
|
||||
if (dspThaiYear(this.language))
|
||||
this.fillThai()
|
||||
}
|
||||
, clickThai: function(e){
|
||||
var target = $(e.target).closest('span')
|
||||
|
||||
if (target.length === 1 && target.is('.year'))
|
||||
target.text(Number(target.text()) - thai.adj)
|
||||
}
|
||||
, click: function(e){
|
||||
if (dspThaiYear(this.language))
|
||||
this.clickThai(e)
|
||||
|
||||
_basemethod_.click.call(this,e)
|
||||
}
|
||||
, keydown: function(e){
|
||||
// allow arrow-down to show picker
|
||||
if (this.picker.is(':not(:visible)')
|
||||
&& e.keyCode == 40 // arrow-down
|
||||
&& $(e.target).is('[autocomplete="off"]')) {
|
||||
this.show()
|
||||
return;
|
||||
}
|
||||
_basemethod_.keydown.call(this,e)
|
||||
}
|
||||
, hide: function(e){
|
||||
// fix redundant hide in orginal code
|
||||
if (this.picker.is(':visible'))
|
||||
_basemethod_.hide.call(this,e)
|
||||
//else console.log('redundant hide')
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}(jQuery));
|
||||
1177
wwwroot/BackendScript/js/bootstrap-datepicker-th/bootstrap-datepicker.js
vendored
Normal file
1177
wwwroot/BackendScript/js/bootstrap-datepicker-th/bootstrap-datepicker.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
24
wwwroot/BackendScript/js/bootstrap-datepicker-th/bootstrap-datepicker.th.js
vendored
Normal file
24
wwwroot/BackendScript/js/bootstrap-datepicker-th/bootstrap-datepicker.th.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Thai translation for bootstrap-datepicker
|
||||
* Suchau Jiraprapot <seroz24@gmail.com>
|
||||
*/
|
||||
|
||||
;(function($){
|
||||
// en-th - (rare use) english language with thai-year
|
||||
$.fn.datepicker.dates['en-th'] =
|
||||
// en-en.th - english language with smart thai-year input (2540-2569) conversion
|
||||
$.fn.datepicker.dates['en-en.th'] =
|
||||
$.fn.datepicker.dates['en'];
|
||||
|
||||
// th-th - thai language with thai-year
|
||||
$.fn.datepicker.dates['th-th'] =
|
||||
$.fn.datepicker.dates['th'] = {
|
||||
format: 'dd/mm/yyyy',
|
||||
days: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์", "อาทิตย์"],
|
||||
daysShort: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"],
|
||||
daysMin: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"],
|
||||
months: ["มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"],
|
||||
monthsShort: ["ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."],
|
||||
today: "วันนี้"
|
||||
};
|
||||
}(jQuery));
|
||||
251
wwwroot/BackendScript/js/bootstrap-switch.js
vendored
Normal file
251
wwwroot/BackendScript/js/bootstrap-switch.js
vendored
Normal file
@@ -0,0 +1,251 @@
|
||||
/* ============================================================
|
||||
* bootstrapSwitch v1.3 by Larentis Mattia @spiritualGuru
|
||||
* http://www.larentis.eu/switch/
|
||||
* ============================================================
|
||||
* Licensed under the Apache License, Version 2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* ============================================================ */
|
||||
|
||||
!function ($) {
|
||||
"use strict";
|
||||
|
||||
$.fn['bootstrapSwitch'] = function (method) {
|
||||
var methods = {
|
||||
init: function () {
|
||||
return this.each(function () {
|
||||
var $element = $(this)
|
||||
, $div
|
||||
, $switchLeft
|
||||
, $switchRight
|
||||
, $label
|
||||
, myClasses = ""
|
||||
, classes = $element.attr('class')
|
||||
, color
|
||||
, moving
|
||||
, onLabel = "ON"
|
||||
, offLabel = "OFF"
|
||||
, icon = false;
|
||||
|
||||
$.each(['switch-mini', 'switch-small', 'switch-large'], function (i, el) {
|
||||
if (classes.indexOf(el) >= 0)
|
||||
myClasses = el;
|
||||
});
|
||||
|
||||
$element.addClass('has-switch');
|
||||
|
||||
if ($element.data('on') !== undefined)
|
||||
color = "switch-" + $element.data('on');
|
||||
|
||||
if ($element.data('on-label') !== undefined)
|
||||
onLabel = $element.data('on-label');
|
||||
|
||||
if ($element.data('off-label') !== undefined)
|
||||
offLabel = $element.data('off-label');
|
||||
|
||||
if ($element.data('icon') !== undefined)
|
||||
icon = $element.data('icon');
|
||||
|
||||
$switchLeft = $('<span>')
|
||||
.addClass("switch-left")
|
||||
.addClass(myClasses)
|
||||
.addClass(color)
|
||||
.html(onLabel);
|
||||
|
||||
color = '';
|
||||
if ($element.data('off') !== undefined)
|
||||
color = "switch-" + $element.data('off');
|
||||
|
||||
$switchRight = $('<span>')
|
||||
.addClass("switch-right")
|
||||
.addClass(myClasses)
|
||||
.addClass(color)
|
||||
.html(offLabel);
|
||||
|
||||
$label = $('<label>')
|
||||
.html(" ")
|
||||
.addClass(myClasses)
|
||||
.attr('for', $element.find('input').attr('id'));
|
||||
|
||||
if (icon) {
|
||||
$label.html('<i class="' + icon + '"></i>');
|
||||
}
|
||||
|
||||
$div = $element.find(':checkbox').wrap($('<div>')).parent().data('animated', false);
|
||||
|
||||
if ($element.data('animated') !== false)
|
||||
$div.addClass('switch-animate').data('animated', true);
|
||||
|
||||
$div
|
||||
.append($switchLeft)
|
||||
.append($label)
|
||||
.append($switchRight);
|
||||
|
||||
$element.find('>div').addClass(
|
||||
$element.find('input').is(':checked') ? 'switch-on' : 'switch-off'
|
||||
);
|
||||
|
||||
if ($element.find('input').is(':disabled'))
|
||||
$(this).addClass('deactivate');
|
||||
|
||||
var changeStatus = function ($this) {
|
||||
$this.siblings('label').trigger('mousedown').trigger('mouseup').trigger('click');
|
||||
};
|
||||
|
||||
$element.on('keydown', function (e) {
|
||||
if (e.keyCode === 32) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
changeStatus($(e.target).find('span:first'));
|
||||
}
|
||||
});
|
||||
|
||||
$switchLeft.on('click', function (e) {
|
||||
changeStatus($(this));
|
||||
});
|
||||
|
||||
$switchRight.on('click', function (e) {
|
||||
changeStatus($(this));
|
||||
});
|
||||
|
||||
$element.find('input').on('change', function (e) {
|
||||
var $this = $(this)
|
||||
, $element = $this.parent()
|
||||
, thisState = $this.is(':checked')
|
||||
, state = $element.is('.switch-off');
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
$element.css('left', '');
|
||||
|
||||
if (state === thisState) {
|
||||
|
||||
if (thisState)
|
||||
$element.removeClass('switch-off').addClass('switch-on');
|
||||
else $element.removeClass('switch-on').addClass('switch-off');
|
||||
|
||||
if ($element.data('animated') !== false)
|
||||
$element.addClass("switch-animate");
|
||||
|
||||
$element.parent().trigger('switch-change', {'el': $this, 'value': thisState})
|
||||
}
|
||||
});
|
||||
|
||||
$element.find('label').on('mousedown touchstart', function (e) {
|
||||
var $this = $(this);
|
||||
moving = false;
|
||||
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
$this.closest('div').removeClass('switch-animate');
|
||||
|
||||
if ($this.closest('.has-switch').is('.deactivate'))
|
||||
$this.unbind('click');
|
||||
else {
|
||||
$this.on('mousemove touchmove', function (e) {
|
||||
var $element = $(this).closest('.switch')
|
||||
, relativeX = (e.pageX || e.originalEvent.targetTouches[0].pageX) - $element.offset().left
|
||||
, percent = (relativeX / $element.width()) * 100
|
||||
, left = 25
|
||||
, right = 75;
|
||||
|
||||
moving = true;
|
||||
|
||||
if (percent < left)
|
||||
percent = left;
|
||||
else if (percent > right)
|
||||
percent = right;
|
||||
|
||||
$element.find('>div').css('left', (percent - right) + "%")
|
||||
});
|
||||
|
||||
$this.on('click touchend', function (e) {
|
||||
var $this = $(this)
|
||||
, $target = $(e.target)
|
||||
, $myCheckBox = $target.siblings('input');
|
||||
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
|
||||
$this.unbind('mouseleave');
|
||||
|
||||
if (moving)
|
||||
$myCheckBox.prop('checked', !(parseInt($this.parent().css('left')) < -25));
|
||||
else $myCheckBox.prop("checked", !$myCheckBox.is(":checked"));
|
||||
|
||||
moving = false;
|
||||
$myCheckBox.trigger('change');
|
||||
});
|
||||
|
||||
$this.on('mouseleave', function (e) {
|
||||
var $this = $(this)
|
||||
, $myCheckBox = $this.siblings('input');
|
||||
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
$this.unbind('mouseleave');
|
||||
$this.trigger('mouseup');
|
||||
|
||||
$myCheckBox.prop('checked', !(parseInt($this.parent().css('left')) < -25)).trigger('change');
|
||||
});
|
||||
|
||||
$this.on('mouseup', function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
|
||||
$(this).unbind('mousemove');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
toggleActivation: function () {
|
||||
$(this).toggleClass('deactivate');
|
||||
},
|
||||
isActive: function () {
|
||||
return !$(this).hasClass('deactivate');
|
||||
},
|
||||
setActive: function (active) {
|
||||
if (active)
|
||||
$(this).removeClass('deactivate');
|
||||
else $(this).addClass('deactivate');
|
||||
},
|
||||
toggleState: function (skipOnChange) {
|
||||
var $input = $(this).find('input:checkbox');
|
||||
$input.prop('checked', !$input.is(':checked')).trigger('change', skipOnChange);
|
||||
},
|
||||
setState: function (value, skipOnChange) {
|
||||
$(this).find('input:checkbox').prop('checked', value).trigger('change', skipOnChange);
|
||||
},
|
||||
status: function () {
|
||||
return $(this).find('input:checkbox').is(':checked');
|
||||
},
|
||||
destroy: function () {
|
||||
var $div = $(this).find('div')
|
||||
, $checkbox;
|
||||
|
||||
$div.find(':not(input:checkbox)').remove();
|
||||
|
||||
$checkbox = $div.children();
|
||||
$checkbox.unwrap().unwrap();
|
||||
|
||||
$checkbox.unbind('change');
|
||||
|
||||
return $checkbox;
|
||||
}
|
||||
};
|
||||
|
||||
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!');
|
||||
};
|
||||
}(jQuery);
|
||||
|
||||
$(function () {
|
||||
$('.switch')['bootstrapSwitch']();
|
||||
});
|
||||
12
wwwroot/BackendScript/js/bootstrap-validator.min.js
vendored
Normal file
12
wwwroot/BackendScript/js/bootstrap-validator.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6461
wwwroot/BackendScript/js/bootstrap.bundle.js
vendored
Normal file
6461
wwwroot/BackendScript/js/bootstrap.bundle.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
wwwroot/BackendScript/js/bootstrap.bundle.min.js
vendored
Normal file
7
wwwroot/BackendScript/js/bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3944
wwwroot/BackendScript/js/bootstrap.js
vendored
Normal file
3944
wwwroot/BackendScript/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
wwwroot/BackendScript/js/bootstrap.min.js
vendored
Normal file
7
wwwroot/BackendScript/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
101
wwwroot/BackendScript/js/common-scripts.js
Normal file
101
wwwroot/BackendScript/js/common-scripts.js
Normal file
@@ -0,0 +1,101 @@
|
||||
/*---LEFT BAR ACCORDION----*/
|
||||
$(function() {
|
||||
$('#nav-accordion').dcAccordion({
|
||||
eventType: 'click',
|
||||
autoClose: true,
|
||||
saveState: true,
|
||||
disableLink: true,
|
||||
speed: 'slow',
|
||||
showCount: false,
|
||||
autoExpand: true,
|
||||
// cookie: 'dcjq-accordion-1',
|
||||
classExpand: 'dcjq-current-parent'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// for mobile check
|
||||
function mobilecheck() {
|
||||
var check = false;
|
||||
(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);
|
||||
return check;
|
||||
};
|
||||
|
||||
var Script = function () {
|
||||
|
||||
// sidebar dropdown menu auto scrolling
|
||||
|
||||
jQuery('#sidebar .sub-menu > a').on('click', function () {
|
||||
var o = ($(this).offset());
|
||||
diff = 250 - o.top;
|
||||
if(diff>0)
|
||||
$("#sidebar").scrollTo("-="+Math.abs(diff),500);
|
||||
else
|
||||
$("#sidebar").scrollTo("+="+Math.abs(diff),500);
|
||||
});
|
||||
|
||||
// sidebar toggle
|
||||
|
||||
$('.sidebar-toggle-box').on('click', function () {
|
||||
$(document.body).toggleClass('is-sidebar-nav-open');
|
||||
|
||||
var owl = $("#owl-demo").data("owlCarousel");
|
||||
owl.reinit();
|
||||
});
|
||||
|
||||
// custom scrollbar
|
||||
$("#sidebar").niceScroll({styler:"fb",cursorcolor:"#e8403f", cursorwidth: '3', cursorborderradius: '10px', background: '#404040', spacebarenabled:false, cursorborder: '', scrollspeed: 60});
|
||||
|
||||
//$("html").niceScroll({styler:"fb",cursorcolor:"#e8403f", cursorwidth: '6', cursorborderradius: '10px', background: '#404040', spacebarenabled:false, cursorborder: '', zindex: '1000', scrollspeed: 100, mousescrollstep: 60});
|
||||
|
||||
$(".table-responsive").niceScroll({styler:"fb",cursorcolor:"#e8403f", cursorwidth: '6', cursorborderradius: '10px', background: '#404040', spacebarenabled:false, cursorborder: '', zindex: '1000', horizrailenabled: true });
|
||||
|
||||
|
||||
|
||||
// widget tools
|
||||
|
||||
jQuery('.card .tools .fa-chevron-down').on('click', function () {
|
||||
var el = jQuery(this).parents(".card").children(".card-body");
|
||||
if (jQuery(this).hasClass("fa-chevron-down")) {
|
||||
jQuery(this).removeClass("fa-chevron-down").addClass("fa-chevron-up");
|
||||
el.slideUp(200);
|
||||
} else {
|
||||
jQuery(this).removeClass("fa-chevron-up").addClass("fa-chevron-down");
|
||||
el.slideDown(200);
|
||||
}
|
||||
});
|
||||
|
||||
jQuery('.card .tools .fa-times').on('click', function () {
|
||||
jQuery(this).parents(".card").parent().remove();
|
||||
});
|
||||
|
||||
|
||||
// tool tips
|
||||
|
||||
$('.tooltips').tooltip();
|
||||
|
||||
// popovers
|
||||
|
||||
$('.popovers').popover();
|
||||
|
||||
|
||||
// custom bar chart
|
||||
|
||||
if ($(".custom-bar-chart")) {
|
||||
$(".bar").each(function () {
|
||||
var i = $(this).find(".value").html();
|
||||
$(this).find(".value").html("");
|
||||
$(this).find(".value").animate({
|
||||
height: i
|
||||
}, 2000)
|
||||
})
|
||||
}
|
||||
|
||||
}();
|
||||
|
||||
|
||||
// right slidebar
|
||||
|
||||
$(function(){
|
||||
$.slidebars();
|
||||
});
|
||||
91
wwwroot/BackendScript/js/count.js
Normal file
91
wwwroot/BackendScript/js/count.js
Normal file
@@ -0,0 +1,91 @@
|
||||
function countUp(count)
|
||||
{
|
||||
var div_by = 100,
|
||||
speed = Math.round(count / div_by),
|
||||
$display = $('.count'),
|
||||
run_count = 1,
|
||||
int_speed = 24;
|
||||
|
||||
var int = setInterval(function() {
|
||||
if(run_count < div_by){
|
||||
$display.text(speed * run_count);
|
||||
run_count++;
|
||||
} else if(parseInt($display.text()) < count) {
|
||||
var curr_count = parseInt($display.text()) + 1;
|
||||
$display.text(curr_count);
|
||||
} else {
|
||||
clearInterval(int);
|
||||
}
|
||||
}, int_speed);
|
||||
}
|
||||
|
||||
countUp(495);
|
||||
|
||||
function countUp2(count)
|
||||
{
|
||||
var div_by = 100,
|
||||
speed = Math.round(count / div_by),
|
||||
$display = $('.count2'),
|
||||
run_count = 1,
|
||||
int_speed = 24;
|
||||
|
||||
var int = setInterval(function() {
|
||||
if(run_count < div_by){
|
||||
$display.text(speed * run_count);
|
||||
run_count++;
|
||||
} else if(parseInt($display.text()) < count) {
|
||||
var curr_count = parseInt($display.text()) + 1;
|
||||
$display.text(curr_count);
|
||||
} else {
|
||||
clearInterval(int);
|
||||
}
|
||||
}, int_speed);
|
||||
}
|
||||
|
||||
countUp2(947);
|
||||
|
||||
function countUp3(count)
|
||||
{
|
||||
var div_by = 100,
|
||||
speed = Math.round(count / div_by),
|
||||
$display = $('.count3'),
|
||||
run_count = 1,
|
||||
int_speed = 24;
|
||||
|
||||
var int = setInterval(function() {
|
||||
if(run_count < div_by){
|
||||
$display.text(speed * run_count);
|
||||
run_count++;
|
||||
} else if(parseInt($display.text()) < count) {
|
||||
var curr_count = parseInt($display.text()) + 1;
|
||||
$display.text(curr_count);
|
||||
} else {
|
||||
clearInterval(int);
|
||||
}
|
||||
}, int_speed);
|
||||
}
|
||||
|
||||
countUp3(328);
|
||||
|
||||
function countUp4(count)
|
||||
{
|
||||
var div_by = 100,
|
||||
speed = Math.round(count / div_by),
|
||||
$display = $('.count4'),
|
||||
run_count = 1,
|
||||
int_speed = 24;
|
||||
|
||||
var int = setInterval(function() {
|
||||
if(run_count < div_by){
|
||||
$display.text(speed * run_count);
|
||||
run_count++;
|
||||
} else if(parseInt($display.text()) < count) {
|
||||
var curr_count = parseInt($display.text()) + 1;
|
||||
$display.text(curr_count);
|
||||
} else {
|
||||
clearInterval(int);
|
||||
}
|
||||
}, int_speed);
|
||||
}
|
||||
|
||||
countUp4(10328);
|
||||
@@ -0,0 +1,23 @@
|
||||
table.dataTable.dt-checkboxes-select tbody tr,
|
||||
table.dataTable thead th.dt-checkboxes-select-all,
|
||||
table.dataTable tbody td.dt-checkboxes-cell {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
table.dataTable thead th.dt-checkboxes-select-all,
|
||||
table.dataTable tbody td.dt-checkboxes-cell {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.dataTables_wrapper span.select-info,
|
||||
div.dataTables_wrapper span.select-item {
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 640px) {
|
||||
div.dataTables_wrapper span.select-info,
|
||||
div.dataTables_wrapper span.select-item {
|
||||
margin-left: 0;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
81907
wwwroot/BackendScript/js/datatables/datatables.js
Normal file
81907
wwwroot/BackendScript/js/datatables/datatables.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
21
wwwroot/BackendScript/js/datatables/datatables.min.css
vendored
Normal file
21
wwwroot/BackendScript/js/datatables/datatables.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
413
wwwroot/BackendScript/js/datatables/datatables.min.js
vendored
Normal file
413
wwwroot/BackendScript/js/datatables/datatables.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
27
wwwroot/BackendScript/js/datatables/datatables.select.min.js
vendored
Normal file
27
wwwroot/BackendScript/js/datatables/datatables.select.min.js
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/*!
|
||||
Select for DataTables 1.2.7
|
||||
2015-2018 SpryMedia Ltd - datatables.net/license/mit
|
||||
*/
|
||||
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(i){return e(i,window,document)}):"object"===typeof exports?module.exports=function(i,l){i||(i=window);if(!l||!l.fn.dataTable)l=require("datatables.net")(i,l).$;return e(l,i,i.document)}:e(jQuery,window,document)})(function(e,i,l,h){function u(a,c,b){var d;d=function(b,c){if(b>c)var d=c,c=b,b=d;var f=!1;return a.columns(":visible").indexes().filter(function(a){a===b&&(f=!0);return a===c?(f=!1,!0):f})};var f=
|
||||
function(b,c){var d=a.rows({search:"applied"}).indexes();if(d.indexOf(b)>d.indexOf(c))var f=c,c=b,b=f;var e=!1;return d.filter(function(a){a===b&&(e=!0);return a===c?(e=!1,!0):e})};!a.cells({selected:!0}).any()&&!b?(d=d(0,c.column),b=f(0,c.row)):(d=d(b.column,c.column),b=f(b.row,c.row));b=a.cells(b,d).flatten();a.cells(c,{selected:!0}).any()?a.cells(b).deselect():a.cells(b).select()}function q(a){var c=a.settings()[0]._select.selector;e(a.table().container()).off("mousedown.dtSelect",c).off("mouseup.dtSelect",
|
||||
c).off("click.dtSelect",c);e("body").off("click.dtSelect"+a.table().node().id)}function x(a){var c=e(a.table().container()),b=a.settings()[0],d=b._select.selector,f;c.on("mousedown.dtSelect",d,function(b){if(b.shiftKey||b.metaKey||b.ctrlKey)c.css("-moz-user-select","none").one("selectstart.dtSelect",d,function(){return!1});i.getSelection&&(f=i.getSelection())}).on("mouseup.dtSelect",d,function(){c.css("-moz-user-select","")}).on("click.dtSelect",d,function(b){var c=a.select.items();if(i.getSelection){var d=
|
||||
i.getSelection();if((!d.anchorNode||e(d.anchorNode).closest("table")[0]===a.table().node())&&d!==f)return}var d=a.settings()[0],g=a.settings()[0].oClasses.sWrapper.replace(/ /g,".");if(e(b.target).closest("div."+g)[0]==a.table().container()&&(g=a.cell(e(b.target).closest("td, th")),g.any())){var h=e.Event("user-select.dt");j(a,h,[c,g,b]);h.isDefaultPrevented()||(h=g.index(),"row"===c?(c=h.row,r(b,a,d,"row",c)):"column"===c?(c=g.index().column,r(b,a,d,"column",c)):"cell"===c&&(c=g.index(),r(b,a,d,
|
||||
"cell",c)),d._select_lastCell=h)}});e("body").on("click.dtSelect"+a.table().node().id,function(c){b._select.blurable&&!e(c.target).parents().filter(a.table().container()).length&&(0!==e(c.target).parents("html").length&&!e(c.target).parents("div.DTE").length)&&o(b,!0)})}function j(a,c,b,d){if(!d||a.flatten().length)"string"===typeof c&&(c+=".dt"),b.unshift(a),e(a.table().node()).trigger(c,b)}function y(a){var c=a.settings()[0];if(c._select.info&&c.aanFeatures.i&&"api"!==a.select.style()){var b=a.rows({selected:!0}).flatten().length,
|
||||
d=a.columns({selected:!0}).flatten().length,f=a.cells({selected:!0}).flatten().length,k=function(b,c,d){b.append(e('<span class="select-item"/>').append(a.i18n("select."+c+"s",{_:"%d "+c+"s selected","0":"",1:"1 "+c+" selected"},d)))};e.each(c.aanFeatures.i,function(c,a){var a=e(a),g=e('<span class="select-info"/>');k(g,"row",b);k(g,"column",d);k(g,"cell",f);var h=a.children("span.select-info");h.length&&h.remove();""!==g.text()&&a.append(g)})}}function z(a,c,b,d){var f=a[c+"s"]({search:"applied"}).indexes(),
|
||||
d=e.inArray(d,f),k=e.inArray(b,f);if(!a[c+"s"]({selected:!0}).any()&&-1===d)f.splice(e.inArray(b,f)+1,f.length);else{if(d>k)var g=k,k=d,d=g;f.splice(k+1,f.length);f.splice(0,d)}a[c](b,{selected:!0}).any()?(f.splice(e.inArray(b,f),1),a[c+"s"](f).deselect()):a[c+"s"](f).select()}function o(a,c){if(c||"single"===a._select.style){var b=new g.Api(a);b.rows({selected:!0}).deselect();b.columns({selected:!0}).deselect();b.cells({selected:!0}).deselect()}}function r(a,c,b,d,f){var e=c.select.style(),g=c[d](f,
|
||||
{selected:!0}).any();"os"===e?a.ctrlKey||a.metaKey?c[d](f).select(!g):a.shiftKey?"cell"===d?u(c,f,b._select_lastCell||null):z(c,d,f,b._select_lastCell?b._select_lastCell[d]:null):(a=c[d+"s"]({selected:!0}),g&&1===a.flatten().length?c[d](f).deselect():(a.deselect(),c[d](f).select())):"multi+shift"==e?a.shiftKey?"cell"===d?u(c,f,b._select_lastCell||null):z(c,d,f,b._select_lastCell?b._select_lastCell[d]:null):c[d](f).select(!g):c[d](f).select(!g)}function p(a,c){return function(b){return b.i18n("buttons."+
|
||||
a,c)}}function s(a){a=a._eventNamespace;return"draw.dt.DT"+a+" select.dt.DT"+a+" deselect.dt.DT"+a}var g=e.fn.dataTable;g.select={};g.select.version="1.2.7";g.select.init=function(a){var c=a.settings()[0],b=c.oInit.select,d=g.defaults.select,b=b===h?d:b,d="row",f="api",k=!1,v=!0,w="td, th",i="selected",j=!1;c._select={};if(!0===b)f="os",j=!0;else if("string"===typeof b)f=b,j=!0;else if(e.isPlainObject(b)&&(b.blurable!==h&&(k=b.blurable),b.info!==h&&(v=b.info),b.items!==h&&(d=b.items),b.style!==h&&
|
||||
(f=b.style,j=!0),b.selector!==h&&(w=b.selector),b.className!==h))i=b.className;a.select.selector(w);a.select.items(d);a.select.style(f);a.select.blurable(k);a.select.info(v);c._select.className=i;e.fn.dataTable.ext.order["select-checkbox"]=function(b,c){return this.api().column(c,{order:"index"}).nodes().map(function(c){return"row"===b._select.items?e(c).parent().hasClass(b._select.className):"cell"===b._select.items?e(c).hasClass(b._select.className):!1})};!j&&e(a.table().node()).hasClass("selectable")&&
|
||||
a.select.style("os")};e.each([{type:"row",prop:"aoData"},{type:"column",prop:"aoColumns"}],function(a,c){g.ext.selector[c.type].push(function(b,a,f){var a=a.selected,e,g=[];if(!0!==a&&!1!==a)return f;for(var h=0,i=f.length;h<i;h++)e=b[c.prop][f[h]],(!0===a&&!0===e._select_selected||!1===a&&!e._select_selected)&&g.push(f[h]);return g})});g.ext.selector.cell.push(function(a,c,b){var c=c.selected,d,f=[];if(c===h)return b;for(var e=0,g=b.length;e<g;e++)d=a.aoData[b[e].row],(!0===c&&d._selected_cells&&
|
||||
!0===d._selected_cells[b[e].column]||!1===c&&(!d._selected_cells||!d._selected_cells[b[e].column]))&&f.push(b[e]);return f});var m=g.Api.register,n=g.Api.registerPlural;m("select()",function(){return this.iterator("table",function(a){g.select.init(new g.Api(a))})});m("select.blurable()",function(a){return a===h?this.context[0]._select.blurable:this.iterator("table",function(c){c._select.blurable=a})});m("select.info()",function(a){return y===h?this.context[0]._select.info:this.iterator("table",function(c){c._select.info=
|
||||
a})});m("select.items()",function(a){return a===h?this.context[0]._select.items:this.iterator("table",function(c){c._select.items=a;j(new g.Api(c),"selectItems",[a])})});m("select.style()",function(a){return a===h?this.context[0]._select.style:this.iterator("table",function(c){c._select.style=a;if(!c._select_init){var b=new g.Api(c);c.aoRowCreatedCallback.push({fn:function(b,a,d){a=c.aoData[d];a._select_selected&&e(b).addClass(c._select.className);b=0;for(d=c.aoColumns.length;b<d;b++)(c.aoColumns[b]._select_selected||
|
||||
a._selected_cells&&a._selected_cells[b])&&e(a.anCells[b]).addClass(c._select.className)},sName:"select-deferRender"});b.on("preXhr.dt.dtSelect",function(){var a=b.rows({selected:!0}).ids(!0).filter(function(b){return b!==h}),c=b.cells({selected:!0}).eq(0).map(function(c){var a=b.row(c.row).id(!0);return a?{row:a,column:c.column}:h}).filter(function(b){return b!==h});b.one("draw.dt.dtSelect",function(){b.rows(a).select();c.any()&&c.each(function(c){b.cells(c.row,c.column).select()})})});b.on("draw.dtSelect.dt select.dtSelect.dt deselect.dtSelect.dt info.dt",
|
||||
function(){y(b)});b.on("destroy.dtSelect",function(){q(b);b.off(".dtSelect")})}var d=new g.Api(c);q(d);"api"!==a&&x(d);j(new g.Api(c),"selectStyle",[a])})});m("select.selector()",function(a){return a===h?this.context[0]._select.selector:this.iterator("table",function(c){q(new g.Api(c));c._select.selector=a;"api"!==c._select.style&&x(new g.Api(c))})});n("rows().select()","row().select()",function(a){var c=this;if(!1===a)return this.deselect();this.iterator("row",function(b,c){o(b);b.aoData[c]._select_selected=
|
||||
!0;e(b.aoData[c].nTr).addClass(b._select.className)});this.iterator("table",function(b,a){j(c,"select",["row",c[a]],!0)});return this});n("columns().select()","column().select()",function(a){var c=this;if(!1===a)return this.deselect();this.iterator("column",function(b,c){o(b);b.aoColumns[c]._select_selected=!0;var a=(new g.Api(b)).column(c);e(a.header()).addClass(b._select.className);e(a.footer()).addClass(b._select.className);a.nodes().to$().addClass(b._select.className)});this.iterator("table",
|
||||
function(b,a){j(c,"select",["column",c[a]],!0)});return this});n("cells().select()","cell().select()",function(a){var c=this;if(!1===a)return this.deselect();this.iterator("cell",function(b,c,a){o(b);c=b.aoData[c];c._selected_cells===h&&(c._selected_cells=[]);c._selected_cells[a]=!0;c.anCells&&e(c.anCells[a]).addClass(b._select.className)});this.iterator("table",function(b,a){j(c,"select",["cell",c[a]],!0)});return this});n("rows().deselect()","row().deselect()",function(){var a=this;this.iterator("row",
|
||||
function(c,b){c.aoData[b]._select_selected=!1;e(c.aoData[b].nTr).removeClass(c._select.className)});this.iterator("table",function(c,b){j(a,"deselect",["row",a[b]],!0)});return this});n("columns().deselect()","column().deselect()",function(){var a=this;this.iterator("column",function(c,b){c.aoColumns[b]._select_selected=!1;var a=new g.Api(c),f=a.column(b);e(f.header()).removeClass(c._select.className);e(f.footer()).removeClass(c._select.className);a.cells(null,b).indexes().each(function(b){var a=
|
||||
c.aoData[b.row],d=a._selected_cells;a.anCells&&(!d||!d[b.column])&&e(a.anCells[b.column]).removeClass(c._select.className)})});this.iterator("table",function(c,b){j(a,"deselect",["column",a[b]],!0)});return this});n("cells().deselect()","cell().deselect()",function(){var a=this;this.iterator("cell",function(a,b,d){b=a.aoData[b];b._selected_cells[d]=!1;b.anCells&&!a.aoColumns[d]._select_selected&&e(b.anCells[d]).removeClass(a._select.className)});this.iterator("table",function(c,b){j(a,"deselect",
|
||||
["cell",a[b]],!0)});return this});var t=0;e.extend(g.ext.buttons,{selected:{text:p("selected","Selected"),className:"buttons-selected",limitTo:["rows","columns","cells"],init:function(a,c,b){var d=this;b._eventNamespace=".select"+t++;a.on(s(b),function(){d.enable(-1!==e.inArray("rows",b.limitTo)&&a.rows({selected:!0}).any()||-1!==e.inArray("columns",b.limitTo)&&a.columns({selected:!0}).any()||-1!==e.inArray("cells",b.limitTo)&&a.cells({selected:!0}).any()?!0:!1)});this.disable()},destroy:function(a,
|
||||
c,b){a.off(b._eventNamespace)}},selectedSingle:{text:p("selectedSingle","Selected single"),className:"buttons-selected-single",init:function(a,c,b){var d=this;b._eventNamespace=".select"+t++;a.on(s(b),function(){var b=a.rows({selected:!0}).flatten().length+a.columns({selected:!0}).flatten().length+a.cells({selected:!0}).flatten().length;d.enable(1===b)});this.disable()},destroy:function(a,c,b){a.off(b._eventNamespace)}},selectAll:{text:p("selectAll","Select all"),className:"buttons-select-all",action:function(){this[this.select.items()+
|
||||
"s"]().select()}},selectNone:{text:p("selectNone","Deselect all"),className:"buttons-select-none",action:function(){o(this.settings()[0],!0)},init:function(a,c,b){var d=this;b._eventNamespace=".select"+t++;a.on(s(b),function(){var b=a.rows({selected:!0}).flatten().length+a.columns({selected:!0}).flatten().length+a.cells({selected:!0}).flatten().length;d.enable(0<b)});this.disable()},destroy:function(a,c,b){a.off(b._eventNamespace)}}});e.each(["Row","Column","Cell"],function(a,c){var b=c.toLowerCase();
|
||||
g.ext.buttons["select"+c+"s"]={text:p("select"+c+"s","Select "+b+"s"),className:"buttons-select-"+b+"s",action:function(){this.select.items(b)},init:function(a){var c=this;a.on("selectItems.dt.DT",function(a,d,e){c.active(e===b)})}}});e(l).on("preInit.dt.dtSelect",function(a,c){"dt"===a.namespace&&g.select.init(new g.Api(c))});return g.select});
|
||||
166
wwwroot/BackendScript/js/datatables/jquery.datatables.1_10_19.min.js
vendored
Normal file
166
wwwroot/BackendScript/js/datatables/jquery.datatables.1_10_19.min.js
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
/*!
|
||||
DataTables 1.10.19
|
||||
©2008-2018 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(E){return h(E,window,document)}):"object"===typeof exports?module.exports=function(E,H){E||(E=window);H||(H="undefined"!==typeof window?require("jquery"):require("jquery")(E));return h(H,E,E.document)}:h(jQuery,window,document)})(function(h,E,H,k){function Z(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),
|
||||
d[c]=e,"o"===b[1]&&Z(a[e])});a._hungarianMap=d}function J(a,b,c){a._hungarianMap||Z(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),J(a[d],b[d],c)):b[d]=b[e]})}function Ca(a){var b=n.defaults.oLanguage,c=b.sDecimal;c&&Da(c);if(a){var d=a.sZeroRecords;!a.sEmptyTable&&(d&&"No data available in table"===b.sEmptyTable)&&F(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(d&&"Loading..."===b.sLoadingRecords)&&F(a,
|
||||
a,"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&c!==a&&Da(a)}}function fb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":
|
||||
"");"boolean"===typeof a.scrollX&&(a.scrollX=a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&J(n.models.oSearch,a[b])}function gb(a){A(a,"orderable","bSortable");A(a,"orderData","aDataSort");A(a,"orderSequence","asSorting");A(a,"orderDataType","sortDataType");var b=a.aDataSort;"number"===typeof b&&!h.isArray(b)&&(a.aDataSort=[b])}function hb(a){if(!n.__browser){var b={};n.__browser=b;var c=h("<div/>").css({position:"fixed",top:0,left:-1*h(E).scrollLeft(),height:1,width:1,
|
||||
overflow:"hidden"}).append(h("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(h("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,n.__browser);a.oScroll.iBarWidth=n.__browser.barWidth}
|
||||
function ib(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!==e;)a.hasOwnProperty(d)&&(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Ea(a,b){var c=n.defaults.column,d=a.aoColumns.length,c=h.extend({},n.models.oColumn,c,{nTh:b?b:H.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},n.models.oSearch,c[d]);ka(a,d,h(b).data())}function ka(a,b,c){var b=a.aoColumns[b],
|
||||
d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(gb(c),J(n.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),h.extend(b,c),F(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),F(b,c,"aDataSort"));var g=b.mData,j=S(g),i=b.mRender?
|
||||
S(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return N(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,
|
||||
b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function $(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Fa(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&la(a);r(a,null,"column-sizing",[a])}function aa(a,b){var c=ma(a,"bVisible");return"number"===
|
||||
typeof c[b]?c[b]:null}function ba(a,b){var c=ma(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function V(a){var b=0;h.each(a.aoColumns,function(a,d){d.bVisible&&"none"!==h(d.nTh).css("display")&&b++});return b}function ma(a,b){var c=[];h.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Ga(a){var b=a.aoColumns,c=a.aoData,d=n.ext.type.detect,e,f,g,j,i,h,l,q,t;e=0;for(f=b.length;e<f;e++)if(l=b[e],t=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=d.length;g<
|
||||
j;g++){i=0;for(h=c.length;i<h;i++){t[i]===k&&(t[i]=B(a,i,e,"type"));q=d[g](t[i],a);if(!q&&g!==d.length-1)break;if("html"===q)break}if(q){l.sType=q;break}}l.sType||(l.sType="string")}}function jb(a,b,c,d){var e,f,g,j,i,m,l=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){m=b[e];var q=m.targets!==k?m.targets:m.aTargets;h.isArray(q)||(q=[q]);f=0;for(g=q.length;f<g;f++)if("number"===typeof q[f]&&0<=q[f]){for(;l.length<=q[f];)Ea(a);d(q[f],m)}else if("number"===typeof q[f]&&0>q[f])d(l.length+q[f],m);else if("string"===
|
||||
typeof q[f]){j=0;for(i=l.length;j<i;j++)("_all"==q[f]||h(l[j].nTh).hasClass(q[f]))&&d(j,m)}}if(c){e=0;for(a=c.length;e<a;e++)d(e,c[e])}}function O(a,b,c,d){var e=a.aoData.length,f=h.extend(!0,{},n.models.oRow,{src:c?"dom":"data",idx:e});f._aData=b;a.aoData.push(f);for(var g=a.aoColumns,j=0,i=g.length;j<i;j++)g[j].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==k&&(a.aIds[b]=f);(c||!a.oFeatures.bDeferRender)&&Ha(a,e,c,d);return e}function na(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b,
|
||||
e){c=Ia(a,e);return O(a,c.data,e,c.cells)})}function B(a,b,c,d){var e=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,i=f.fnGetData(g,d,{settings:a,row:b,col:c});if(i===k)return a.iDrawError!=e&&null===j&&(K(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),j;if((i===g||null===i)&&null!==j&&d!==k)i=j;else if("function"===typeof i)return i.call(g);return null===i&&"display"==d?"":i}function kb(a,
|
||||
b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function Ja(a){return h.map(a.match(/(\\.|[^\.])+/g)||[""],function(a){return a.replace(/\\\./g,".")})}function S(a){if(h.isPlainObject(a)){var b={};h.each(a,function(a,c){c&&(b[a]=S(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||
|
||||
-1!==a.indexOf("("))){var c=function(a,b,f){var g,j;if(""!==f){j=Ja(f);for(var i=0,m=j.length;i<m;i++){f=j[i].match(ca);g=j[i].match(W);if(f){j[i]=j[i].replace(ca,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=j.join(".");if(h.isArray(a)){i=0;for(m=a.length;i<m;i++)g.push(c(a[i],b,j))}a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(W,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===k)return k;a=a[j[i]]}}return a};return function(b,e){return c(b,e,a)}}return function(b){return b[a]}}
|
||||
function N(a){if(h.isPlainObject(a))return N(a._);if(null===a)return function(){};if("function"===typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,d,e){var e=Ja(e),f;f=e[e.length-1];for(var g,j,i=0,m=e.length-1;i<m;i++){g=e[i].match(ca);j=e[i].match(W);if(g){e[i]=e[i].replace(ca,"");a[e[i]]=[];f=e.slice();f.splice(0,i+1);g=f.join(".");if(h.isArray(d)){j=0;for(m=d.length;j<m;j++)f={},b(f,d[j],g),
|
||||
a[e[i]].push(f)}else a[e[i]]=d;return}j&&(e[i]=e[i].replace(W,""),a=a[e[i]](d));if(null===a[e[i]]||a[e[i]]===k)a[e[i]]={};a=a[e[i]]}if(f.match(W))a[f.replace(W,"")](d);else a[f.replace(ca,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Ka(a){return D(a.aoData,"_aData")}function oa(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function pa(a,b,c){for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===k&&a.splice(d,
|
||||
1)}function da(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=Ia(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c<f;c++)g(j[c],c)}}e._aSortData=null;e._aFilterData=null;g=a.aoColumns;if(d!==k)g[d].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;La(a,e)}}function Ia(a,b,c,d){var e=[],f=b.firstChild,g,
|
||||
j,i=0,m,l=a.aoColumns,q=a._rowReadObject,d=d!==k?d:q?{}:[],t=function(a,b){if("string"===typeof a){var c=a.indexOf("@");-1!==c&&(c=a.substring(c+1),N(a)(d,b.getAttribute(c)))}},G=function(a){if(c===k||c===i)j=l[i],m=h.trim(a.innerHTML),j&&j._bAttrSrc?(N(j.mData._)(d,m),t(j.mData.sort,a),t(j.mData.type,a),t(j.mData.filter,a)):q?(j._setter||(j._setter=N(j.mData)),j._setter(d,m)):d[i]=m;i++};if(f)for(;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)G(f),e.push(f);f=f.nextSibling}else{e=b.anCells;
|
||||
f=0;for(g=e.length;f<g;f++)G(e[f])}if(b=b.firstChild?b:b.nTr)(b=b.getAttribute("id"))&&N(a.rowId)(d,b);return{data:d,cells:e}}function Ha(a,b,c,d){var e=a.aoData[b],f=e._aData,g=[],j,i,m,l,q;if(null===e.nTr){j=c||H.createElement("tr");e.nTr=j;e.anCells=g;j._DT_RowIndex=b;La(a,e);l=0;for(q=a.aoColumns.length;l<q;l++){m=a.aoColumns[l];i=c?d[l]:H.createElement(m.sCellType);i._DT_CellIndex={row:b,column:l};g.push(i);if((!c||m.mRender||m.mData!==l)&&(!h.isPlainObject(m.mData)||m.mData._!==l+".display"))i.innerHTML=
|
||||
B(a,b,l,"display");m.sClass&&(i.className+=" "+m.sClass);m.bVisible&&!c?j.appendChild(i):!m.bVisible&&c&&i.parentNode.removeChild(i);m.fnCreatedCell&&m.fnCreatedCell.call(a.oInstance,i,B(a,b,l),f,b,l)}r(a,"aoRowCreatedCallback",null,[j,f,b,g])}e.nTr.setAttribute("role","row")}function La(a,b){var c=b.nTr,d=b._aData;if(c){var e=a.rowIdFn(d);e&&(c.id=e);d.DT_RowClass&&(e=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?qa(b.__rowc.concat(e)):e,h(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));
|
||||
d.DT_RowAttr&&h(c).attr(d.DT_RowAttr);d.DT_RowData&&h(c).data(d.DT_RowData)}}function lb(a){var b,c,d,e,f,g=a.nTHead,j=a.nTFoot,i=0===h("th, td",g).length,m=a.oClasses,l=a.aoColumns;i&&(e=h("<tr/>").appendTo(g));b=0;for(c=l.length;b<c;b++)f=l[b],d=h(f.nTh).addClass(f.sClass),i&&d.appendTo(e),a.oFeatures.bSort&&(d.addClass(f.sSortingClass),!1!==f.bSortable&&(d.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),Ma(a,f.nTh,b))),f.sTitle!=d[0].innerHTML&&d.html(f.sTitle),Na(a,"header")(a,d,
|
||||
f,m);i&&ea(a.aoHeader,g);h(g).find(">tr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(m.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(m.sFooterTH);if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=l[b],f.nTf=a[b].cell,f.sClass&&h(f.nTf).addClass(f.sClass)}}function fa(a,b,c){var d,e,f,g=[],j=[],i=a.aoColumns.length,m;if(b){c===k&&(c=!1);d=0;for(e=b.length;d<e;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);j.push([])}d=
|
||||
0;for(e=g.length;d<e;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(m=i=1,j[d][f]===k){a.appendChild(g[d][f].cell);for(j[d][f]=1;g[d+i]!==k&&g[d][f].cell==g[d+i][f].cell;)j[d+i][f]=1,i++;for(;g[d][f+m]!==k&&g[d][f].cell==g[d][f+m].cell;){for(c=0;c<i;c++)j[d+c][f+m]=1;m++}h(g[d][f].cell).attr("rowspan",i).attr("colspan",m)}}}}function P(a){var b=r(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))C(a,!1);else{var b=[],c=0,d=a.asStripeClasses,e=
|
||||
d.length,f=a.oLanguage,g=a.iInitDisplayStart,j="ssp"==y(a),i=a.aiDisplay;a.bDrawing=!0;g!==k&&-1!==g&&(a._iDisplayStart=j?g:g>=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=-1);var g=a._iDisplayStart,m=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&!mb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:m;for(j=j?0:g;j<f;j++){var l=i[j],q=a.aoData[l];null===q.nTr&&Ha(a,l);var t=q.nTr;if(0!==e){var G=d[c%e];q._sRowStripe!=G&&(h(t).removeClass(q._sRowStripe).addClass(G),
|
||||
q._sRowStripe=G)}r(a,"aoRowCallback",null,[t,q._aData,c,j,l]);b.push(t);c++}}else c=f.sZeroRecords,1==a.iDraw&&"ajax"==y(a)?c=f.sLoadingRecords:f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=h("<tr/>",{"class":e?d[0]:""}).append(h("<td />",{valign:"top",colSpan:V(a),"class":a.oClasses.sRowEmpty}).html(c))[0];r(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ka(a),g,m,i]);r(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Ka(a),g,m,i]);d=h(a.nTBody);d.children().detach();
|
||||
d.append(h(b));r(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function T(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&nb(a);d?ga(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;P(a);a._drawHold=!1}function ob(a){var b=a.oClasses,c=h(a.nTable),c=h("<div/>").insertBefore(c),d=a.oFeatures,e=h("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=
|
||||
a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,m,l,q,k=0;k<f.length;k++){g=null;j=f[k];if("<"==j){i=h("<div/>")[0];m=f[k+1];if("'"==m||'"'==m){l="";for(q=2;f[k+q]!=m;)l+=f[k+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(m=l.split("."),i.id=m[0].substr(1,m[0].length-1),i.className=m[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;k+=q}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==j&&d.bPaginate&&d.bLengthChange)g=pb(a);else if("f"==j&&
|
||||
d.bFilter)g=qb(a);else if("r"==j&&d.bProcessing)g=rb(a);else if("t"==j)g=sb(a);else if("i"==j&&d.bInfo)g=tb(a);else if("p"==j&&d.bPaginate)g=ub(a);else if(0!==n.ext.feature.length){i=n.ext.feature;q=0;for(m=i.length;q<m;q++)if(j==i[q].cFeature){g=i[q].fnInit(a);break}}g&&(i=a.aanFeatures,i[j]||(i[j]=[]),i[j].push(g),e.append(g))}c.replaceWith(e);a.nHolding=null}function ea(a,b){var c=h(b).children("tr"),d,e,f,g,j,i,m,l,q,k;a.splice(0,a.length);f=0;for(i=c.length;f<i;f++)a.push([]);f=0;for(i=c.length;f<
|
||||
i;f++){d=c[f];for(e=d.firstChild;e;){if("TD"==e.nodeName.toUpperCase()||"TH"==e.nodeName.toUpperCase()){l=1*e.getAttribute("colspan");q=1*e.getAttribute("rowspan");l=!l||0===l||1===l?1:l;q=!q||0===q||1===q?1:q;g=0;for(j=a[f];j[g];)g++;m=g;k=1===l?!0:!1;for(j=0;j<l;j++)for(g=0;g<q;g++)a[f+g][m+j]={cell:e,unique:k},a[f+g].nTr=d}e=e.nextSibling}}}function ra(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],ea(c,b)));for(var b=0,e=c.length;b<e;b++)for(var f=0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||
|
||||
!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function sa(a,b,c){r(a,"aoServerParams","serverParams",[b]);if(b&&h.isArray(b)){var d={},e=/(.*?)\[\]$/;h.each(b,function(a,b){var c=b.name.match(e);c?(c=c[0],d[c]||(d[c]=[]),d[c].push(b.value)):d[b.name]=b.value});b=d}var f,g=a.ajax,j=a.oInstance,i=function(b){r(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(h.isPlainObject(g)&&g.data){f=g.data;var m="function"===typeof f?f(b,a):f,b="function"===typeof f&&m?m:h.extend(!0,b,m);delete g.data}m={data:b,success:function(b){var c=
|
||||
b.error||b.sError;c&&K(a,0,c);a.json=b;i(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c){var d=r(a,null,"xhr",[a,null,a.jqXHR]);-1===h.inArray(!0,d)&&("parsererror"==c?K(a,0,"Invalid JSON response",1):4===b.readyState&&K(a,0,"Ajax error",7));C(a,!1)}};a.oAjaxData=b;r(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(j,a.sAjaxSource,h.map(b,function(a,b){return{name:b,value:a}}),i,a):a.sAjaxSource||"string"===typeof g?a.jqXHR=h.ajax(h.extend(m,{url:g||a.sAjaxSource})):
|
||||
"function"===typeof g?a.jqXHR=g.call(j,b,i,a):(a.jqXHR=h.ajax(h.extend(m,g)),g.data=f)}function mb(a){return a.bAjaxDataGet?(a.iDraw++,C(a,!0),sa(a,vb(a),function(b){wb(a,b)}),!1):!0}function vb(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,f=a.aoPreSearchCols,g,j=[],i,m,l,k=X(a);g=a._iDisplayStart;i=!1!==d.bPaginate?a._iDisplayLength:-1;var t=function(a,b){j.push({name:a,value:b})};t("sEcho",a.iDraw);t("iColumns",c);t("sColumns",D(b,"sName").join(","));t("iDisplayStart",g);t("iDisplayLength",
|
||||
i);var G={draw:a.iDraw,columns:[],order:[],start:g,length:i,search:{value:e.sSearch,regex:e.bRegex}};for(g=0;g<c;g++)m=b[g],l=f[g],i="function"==typeof m.mData?"function":m.mData,G.columns.push({data:i,name:m.sName,searchable:m.bSearchable,orderable:m.bSortable,search:{value:l.sSearch,regex:l.bRegex}}),t("mDataProp_"+g,i),d.bFilter&&(t("sSearch_"+g,l.sSearch),t("bRegex_"+g,l.bRegex),t("bSearchable_"+g,m.bSearchable)),d.bSort&&t("bSortable_"+g,m.bSortable);d.bFilter&&(t("sSearch",e.sSearch),t("bRegex",
|
||||
e.bRegex));d.bSort&&(h.each(k,function(a,b){G.order.push({column:b.col,dir:b.dir});t("iSortCol_"+a,b.col);t("sSortDir_"+a,b.dir)}),t("iSortingCols",k.length));b=n.ext.legacy.ajax;return null===b?a.sAjaxSource?j:G:b?j:G}function wb(a,b){var c=ta(a,b),d=b.sEcho!==k?b.sEcho:b.draw,e=b.iTotalRecords!==k?b.iTotalRecords:b.recordsTotal,f=b.iTotalDisplayRecords!==k?b.iTotalDisplayRecords:b.recordsFiltered;if(d){if(1*d<a.iDraw)return;a.iDraw=1*d}oa(a);a._iRecordsTotal=parseInt(e,10);a._iRecordsDisplay=parseInt(f,
|
||||
10);d=0;for(e=c.length;d<e;d++)O(a,c[d]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;P(a);a._bInitComplete||ua(a,b);a.bAjaxDataGet=!0;C(a,!1)}function ta(a,b){var c=h.isPlainObject(a.ajax)&&a.ajax.dataSrc!==k?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===c?b.aaData||b[c]:""!==c?S(c)(b):b}function qb(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",
|
||||
g):j+g,b=h("<div/>",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("<label/>").append(j)),f=function(){var b=!this.value?"":this.value;b!=e.sSearch&&(ga(a,{sSearch:b,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,P(a))},g=null!==a.searchDelay?a.searchDelay:"ssp"===y(a)?400:0,i=h("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",g?Oa(f,g):f).on("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls",
|
||||
c);h(a.nTable).on("search.dt.DT",function(b,c){if(a===c)try{i[0]!==H.activeElement&&i.val(e.sSearch)}catch(d){}});return b[0]}function ga(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};Ga(a);if("ssp"!=y(a)){xb(a,b.sSearch,c,b.bEscapeRegex!==k?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<e.length;b++)yb(a,e[b].sSearch,b,e[b].bEscapeRegex!==k?!e[b].bEscapeRegex:e[b].bRegex,
|
||||
e[b].bSmart,e[b].bCaseInsensitive);zb(a)}else f(b);a.bFiltered=!0;r(a,null,"search",[a])}function zb(a){for(var b=n.ext.search,c=a.aiDisplay,d,e,f=0,g=b.length;f<g;f++){for(var j=[],i=0,m=c.length;i<m;i++)e=c[i],d=a.aoData[e],b[f](a,d._aFilterData,e,d._aData,i)&&j.push(e);c.length=0;h.merge(c,j)}}function yb(a,b,c,d,e,f){if(""!==b){for(var g=[],j=a.aiDisplay,d=Pa(b,d,e,f),e=0;e<j.length;e++)b=a.aoData[j[e]]._aFilterData[c],d.test(b)&&g.push(j[e]);a.aiDisplay=g}}function xb(a,b,c,d,e,f){var d=Pa(b,
|
||||
d,e,f),f=a.oPreviousSearch.sSearch,g=a.aiDisplayMaster,j,e=[];0!==n.ext.search.length&&(c=!0);j=Ab(a);if(0>=b.length)a.aiDisplay=g.slice();else{if(j||c||f.length>b.length||0!==b.indexOf(f)||a.bSorted)a.aiDisplay=g.slice();b=a.aiDisplay;for(c=0;c<b.length;c++)d.test(a.aoData[b[c]]._sFilterRow)&&e.push(b[c]);a.aiDisplay=e}}function Pa(a,b,c,d){a=b?a:Qa(a);c&&(a="^(?=.*?"+h.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(a){if('"'===a.charAt(0))var b=a.match(/^"(.*)"$/),a=b?b[1]:a;return a.replace('"',
|
||||
"")}).join(")(?=.*?")+").*$");return RegExp(a,d?"i":"")}function Ab(a){var b=a.aoColumns,c,d,e,f,g,j,i,h,l=n.ext.type.search;c=!1;d=0;for(f=a.aoData.length;d<f;d++)if(h=a.aoData[d],!h._aFilterData){j=[];e=0;for(g=b.length;e<g;e++)c=b[e],c.bSearchable?(i=B(a,d,e,"filter"),l[c.sType]&&(i=l[c.sType](i)),null===i&&(i=""),"string"!==typeof i&&i.toString&&(i=i.toString())):i="",i.indexOf&&-1!==i.indexOf("&")&&(va.innerHTML=i,i=Wb?va.textContent:va.innerText),i.replace&&(i=i.replace(/[\r\n]/g,"")),j.push(i);
|
||||
h._aFilterData=j;h._sFilterRow=j.join(" ");c=!0}return c}function Bb(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}function Cb(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function tb(a){var b=a.sTableId,c=a.aanFeatures.i,d=h("<div/>",{"class":a.oClasses.sInfo,id:!c?b+"_info":null});c||(a.aoDrawCallback.push({fn:Db,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),h(a.nTable).attr("aria-describedby",
|
||||
b+"_info"));return d[0]}function Db(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+1,e=a.fnDisplayEnd(),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),j=g?c.sInfo:c.sInfoEmpty;g!==f&&(j+=" "+c.sInfoFiltered);j+=c.sInfoPostFix;j=Eb(a,j);c=c.fnInfoCallback;null!==c&&(j=c.call(a.oInstance,a,d,e,f,g,j));h(b).html(j)}}function Eb(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,f=a.fnRecordsDisplay(),g=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,
|
||||
c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,f)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(d/e))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(f/e)))}function ha(a){var b,c,d=a.iInitDisplayStart,e=a.aoColumns,f;c=a.oFeatures;var g=a.bDeferLoading;if(a.bInitialised){ob(a);lb(a);fa(a,a.aoHeader);fa(a,a.aoFooter);C(a,!0);c.bAutoWidth&&Fa(a);b=0;for(c=e.length;b<c;b++)f=e[b],f.sWidth&&(f.nTh.style.width=v(f.sWidth));r(a,null,"preInit",[a]);T(a);e=
|
||||
y(a);if("ssp"!=e||g)"ajax"==e?sa(a,[],function(c){var f=ta(a,c);for(b=0;b<f.length;b++)O(a,f[b]);a.iInitDisplayStart=d;T(a);C(a,!1);ua(a,c)},a):(C(a,!1),ua(a))}else setTimeout(function(){ha(a)},200)}function ua(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&$(a);r(a,null,"plugin-init",[a,b]);r(a,"aoInitComplete","init",[a,b])}function Ra(a,b){var c=parseInt(b,10);a._iDisplayLength=c;Sa(a);r(a,null,"length",[a,c])}function pb(a){for(var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=h.isArray(d[0]),f=
|
||||
e?d[0]:d,d=e?d[1]:d,e=h("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect}),g=0,j=f.length;g<j;g++)e[0][g]=new Option("number"===typeof d[g]?a.fnFormatNumber(d[g]):d[g],f[g]);var i=h("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).on("change.DT",function(){Ra(a,h(this).val());P(a)});h(a.nTable).on("length.dt.DT",function(b,c,d){a===
|
||||
c&&h("select",i).val(d)});return i[0]}function ub(a){var b=a.sPaginationType,c=n.ext.pager[b],d="function"===typeof c,e=function(a){P(a)},b=h("<div/>").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;l<k;l++)Na(a,"pageButton")(a,f.p[l],l,h,b,i)}else c.fnUpdate(a,
|
||||
e)},sName:"pagination"}));return b}function Ta(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,f=a.fnRecordsDisplay();0===f||-1===e?d=0:"number"===typeof b?(d=b*e,d>f&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<f&&(d+=e):"last"==b?d=Math.floor((f-1)/e)*e:K(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(r(a,null,"page",[a]),c&&P(a));return b}function rb(a){return h("<div/>",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}
|
||||
function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",b?"block":"none");r(a,null,"processing",[a,b])}function sb(a){var b=h(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),m=h(b[0].cloneNode(!1)),l=b.children("tfoot");l.length||(l=null);i=h("<div/>",{"class":f.sScrollWrapper}).append(h("<div/>",{"class":f.sScrollHead}).css({overflow:"hidden",
|
||||
position:"relative",border:0,width:d?!d?null:v(d):"100%"}).append(h("<div/>",{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("<div/>",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:!d?null:v(d)}).append(b));l&&i.append(h("<div/>",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:v(d):"100%"}).append(h("<div/>",
|
||||
{"class":f.sScrollFootInner}).append(m.removeAttr("id").css("margin-left",0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=i.children(),k=b[0],f=b[1],t=l?b[2]:null;if(d)h(f).on("scroll.DT",function(){var a=this.scrollLeft;k.scrollLeft=a;l&&(t.scrollLeft=a)});h(f).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=k;a.nScrollBody=f;a.nScrollFoot=t;a.aoDrawCallback.push({fn:la,sName:"scrolling"});return i[0]}function la(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,b=b.iBarWidth,
|
||||
f=h(a.nScrollHead),g=f[0].style,j=f.children("div"),i=j[0].style,m=j.children("table"),j=a.nScrollBody,l=h(j),q=j.style,t=h(a.nScrollFoot).children("div"),n=t.children("table"),o=h(a.nTHead),p=h(a.nTable),s=p[0],r=s.style,u=a.nTFoot?h(a.nTFoot):null,x=a.oBrowser,U=x.bScrollOversize,Xb=D(a.aoColumns,"nTh"),Q,L,R,w,Ua=[],y=[],z=[],A=[],B,C=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};L=j.scrollHeight>j.clientHeight;if(a.scrollBarVis!==
|
||||
L&&a.scrollBarVis!==k)a.scrollBarVis=L,$(a);else{a.scrollBarVis=L;p.children("thead, tfoot").remove();u&&(R=u.clone().prependTo(p),Q=u.find("tr"),R=R.find("tr"));w=o.clone().prependTo(p);o=o.find("tr");L=w.find("tr");w.find("th, td").removeAttr("tabindex");c||(q.width="100%",f[0].style.width="100%");h.each(ra(a,w),function(b,c){B=aa(a,b);c.style.width=a.aoColumns[B].sWidth});u&&I(function(a){a.style.width=""},R);f=p.outerWidth();if(""===c){r.width="100%";if(U&&(p.find("tbody").height()>j.offsetHeight||
|
||||
"scroll"==l.css("overflow-y")))r.width=v(p.outerWidth()-b);f=p.outerWidth()}else""!==d&&(r.width=v(d),f=p.outerWidth());I(C,L);I(function(a){z.push(a.innerHTML);Ua.push(v(h(a).css("width")))},L);I(function(a,b){if(h.inArray(a,Xb)!==-1)a.style.width=Ua[b]},o);h(L).height(0);u&&(I(C,R),I(function(a){A.push(a.innerHTML);y.push(v(h(a).css("width")))},R),I(function(a,b){a.style.width=y[b]},Q),h(R).height(0));I(function(a,b){a.innerHTML='<div class="dataTables_sizing">'+z[b]+"</div>";a.childNodes[0].style.height=
|
||||
"0";a.childNodes[0].style.overflow="hidden";a.style.width=Ua[b]},L);u&&I(function(a,b){a.innerHTML='<div class="dataTables_sizing">'+A[b]+"</div>";a.childNodes[0].style.height="0";a.childNodes[0].style.overflow="hidden";a.style.width=y[b]},R);if(p.outerWidth()<f){Q=j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")?f+b:f;if(U&&(j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=v(Q-b);(""===c||""!==d)&&K(a,1,"Possible column misalignment",6)}else Q="100%";q.width=v(Q);
|
||||
g.width=v(Q);u&&(a.nScrollFoot.style.width=v(Q));!e&&U&&(q.height=v(s.offsetHeight+b));c=p.outerWidth();m[0].style.width=v(c);i.width=v(c);d=p.height()>j.clientHeight||"scroll"==l.css("overflow-y");e="padding"+(x.bScrollbarLeft?"Left":"Right");i[e]=d?b+"px":"0px";u&&(n[0].style.width=v(c),t[0].style.width=v(c),t[0].style[e]=d?b+"px":"0px");p.children("colgroup").insertBefore(p.children("thead"));l.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)j.scrollTop=0}}function I(a,b,c){for(var d=0,e=0,
|
||||
f=b.length,g,j;e<f;){g=b[e].firstChild;for(j=c?c[e].firstChild:null;g;)1===g.nodeType&&(c?a(g,j,d):a(g,d),d++),g=g.nextSibling,j=c?j.nextSibling:null;e++}}function Fa(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,e=d.sY,f=d.sX,g=d.sXInner,j=c.length,i=ma(a,"bVisible"),m=h("th",a.nTHead),l=b.getAttribute("width"),k=b.parentNode,t=!1,n,o,p=a.oBrowser,d=p.bScrollOversize;(n=b.style.width)&&-1!==n.indexOf("%")&&(l=n);for(n=0;n<i.length;n++)o=c[i[n]],null!==o.sWidth&&(o.sWidth=Fb(o.sWidthOrig,k),t=!0);if(d||
|
||||
!t&&!f&&!e&&j==V(a)&&j==m.length)for(n=0;n<j;n++)i=aa(a,n),null!==i&&(c[i].sWidth=v(m.eq(n).width()));else{j=h(b).clone().css("visibility","hidden").removeAttr("id");j.find("tbody tr").remove();var s=h("<tr/>").appendTo(j.find("tbody"));j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");m=ra(a,j.find("thead")[0]);for(n=0;n<i.length;n++)o=c[i[n]],m[n].style.width=null!==o.sWidthOrig&&""!==o.sWidthOrig?v(o.sWidthOrig):
|
||||
"",o.sWidthOrig&&f&&h(m[n]).append(h("<div/>").css({width:o.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(n=0;n<i.length;n++)t=i[n],o=c[t],h(Gb(a,t)).clone(!1).append(o.sContentPadding).appendTo(s);h("[name]",j).removeAttr("name");o=h("<div/>").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);f&&g?j.width(g):f?(j.css("width","auto"),j.removeAttr("width"),j.width()<k.clientWidth&&l&&j.width(k.clientWidth)):e?j.width(k.clientWidth):
|
||||
l&&j.width(l);for(n=e=0;n<i.length;n++)k=h(m[n]),g=k.outerWidth()-k.width(),k=p.bBounding?Math.ceil(m[n].getBoundingClientRect().width):k.outerWidth(),e+=k,c[i[n]].sWidth=v(k-g);b.style.width=v(e);o.remove()}l&&(b.style.width=v(l));if((l||f)&&!a._reszEvt)b=function(){h(E).on("resize.DT-"+a.sInstance,Oa(function(){$(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0}function Fb(a,b){if(!a)return 0;var c=h("<div/>").css("width",v(a)).appendTo(b||H.body),d=c[0].offsetWidth;c.remove();return d}function Gb(a,
|
||||
b){var c=Hb(a,b);if(0>c)return null;var d=a.aoData[c];return!d.nTr?h("<td/>").html(B(a,c,b,"display"))[0]:d.anCells[b]}function Hb(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;f<g;f++)c=B(a,f,b,"display")+"",c=c.replace(Yb,""),c=c.replace(/ /g," "),c.length>d&&(d=c.length,e=f);return e}function v(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function X(a){var b,c,d=[],e=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var m=[];f=function(a){a.length&&
|
||||
!h.isArray(a[0])?m.push(a):h.merge(m,a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;a<m.length;a++){i=m[a][0];f=e[i].aDataSort;b=0;for(c=f.length;b<c;b++)g=f[b],j=e[g].sType||"string",m[a]._idx===k&&(m[a]._idx=h.inArray(m[a][1],e[g].asSorting)),d.push({src:i,col:g,dir:m[a][1],index:m[a]._idx,type:j,formatter:n.ext.type.order[j+"-pre"]})}return d}function nb(a){var b,c,d=[],e=n.ext.type.order,f=a.aoData,g=0,j,i=a.aiDisplayMaster,h;Ga(a);h=X(a);b=0;for(c=h.length;b<
|
||||
c;b++)j=h[b],j.formatter&&g++,Ib(a,j.col);if("ssp"!=y(a)&&0!==h.length){b=0;for(c=i.length;b<c;b++)d[i[b]]=b;g===h.length?i.sort(function(a,b){var c,e,g,j,i=h.length,k=f[a]._aSortData,n=f[b]._aSortData;for(g=0;g<i;g++)if(j=h[g],c=k[j.col],e=n[j.col],c=c<e?-1:c>e?1:0,0!==c)return"asc"===j.dir?c:-c;c=d[a];e=d[b];return c<e?-1:c>e?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,n=f[a]._aSortData,o=f[b]._aSortData;for(j=0;j<k;j++)if(i=h[j],c=n[i.col],g=o[i.col],i=e[i.type+"-"+i.dir]||e["string-"+i.dir],
|
||||
c=i(c,g),0!==c)return c;c=d[a];g=d[b];return c<g?-1:c>g?1:0})}a.bSorted=!0}function Jb(a){for(var b,c,d=a.aoColumns,e=X(a),a=a.oLanguage.oAria,f=0,g=d.length;f<g;f++){c=d[f];var j=c.asSorting;b=c.sTitle.replace(/<.*?>/g,"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0<e.length&&e[0].col==f?(i.setAttribute("aria-sort","asc"==e[0].dir?"ascending":"descending"),c=j[e[0].index+1]||j[0]):c=j[0],b+="asc"===c?a.sSortAscending:a.sSortDescending);i.setAttribute("aria-label",b)}}function Va(a,
|
||||
b,c,d){var e=a.aaSorting,f=a.aoColumns[b].asSorting,g=function(a,b){var c=a._idx;c===k&&(c=h.inArray(a[1],f));return c+1<f.length?c+1:b?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=h.inArray(b,D(e,"0")),-1!==c?(b=g(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=f[b],e[c]._idx=b)):(e.push([b,f[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=g(e[0]),e.length=1,e[0][1]=f[b],e[0]._idx=b):(e.length=0,e.push([b,f[0]]),e[0]._idx=0);T(a);"function"==
|
||||
typeof d&&d(a)}function Ma(a,b,c,d){var e=a.aoColumns[c];Wa(b,{},function(b){!1!==e.bSortable&&(a.oFeatures.bProcessing?(C(a,!0),setTimeout(function(){Va(a,c,b.shiftKey,d);"ssp"!==y(a)&&C(a,!1)},0)):Va(a,c,b.shiftKey,d))})}function wa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=X(a),e=a.oFeatures,f,g;if(e.bSort&&e.bSortClasses){e=0;for(f=b.length;e<f;e++)g=b[e].src,h(D(a.aoData,"anCells",g)).removeClass(c+(2>e?e+1:3));e=0;for(f=d.length;e<f;e++)g=d[e].src,h(D(a.aoData,"anCells",g)).addClass(c+
|
||||
(2>e?e+1:3))}a.aLastSort=d}function Ib(a,b){var c=a.aoColumns[b],d=n.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ba(a,b)));for(var f,g=n.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j<i;j++)if(c=a.aoData[j],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:B(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function xa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:Bb(a.oPreviousSearch),
|
||||
columns:h.map(a.aoColumns,function(b,d){return{visible:b.bVisible,search:Bb(a.aoPreSearchCols[d])}})};r(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,b)}}function Kb(a,b,c){var d,e,f=a.aoColumns,b=function(b){if(b&&b.time){var g=r(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1===h.inArray(!1,g)&&(g=a.iStateDuration,!(0<g&&b.time<+new Date-1E3*g)&&!(b.columns&&f.length!==b.columns.length))){a.oLoadedState=h.extend(!0,{},b);b.start!==k&&
|
||||
(a._iDisplayStart=b.start,a.iInitDisplayStart=b.start);b.length!==k&&(a._iDisplayLength=b.length);b.order!==k&&(a.aaSorting=[],h.each(b.order,function(b,c){a.aaSorting.push(c[0]>=f.length?[0,c[1]]:c)}));b.search!==k&&h.extend(a.oPreviousSearch,Cb(b.search));if(b.columns){d=0;for(e=b.columns.length;d<e;d++)g=b.columns[d],g.visible!==k&&(f[d].bVisible=g.visible),g.search!==k&&h.extend(a.aoPreSearchCols[d],Cb(g.search))}r(a,"aoStateLoaded","stateLoaded",[a,b])}}c()};if(a.oFeatures.bStateSave){var g=
|
||||
a.fnStateLoadCallback.call(a.oInstance,a,b);g!==k&&b(g)}else c()}function ya(a){var b=n.settings,a=h.inArray(a,D(b,"nTable"));return-1!==a?b[a]:null}function K(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+d);if(b)E.console&&console.log&&console.log(c);else if(b=n.ext,b=b.sErrMode||b.errMode,a&&r(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==
|
||||
typeof b&&b(a,d,c)}}function F(a,b,c,d){h.isArray(c)?h.each(c,function(c,d){h.isArray(d)?F(a,b,d[0],d[1]):F(a,b,d)}):(d===k&&(d=c),b[c]!==k&&(a[d]=b[c]))}function Xa(a,b,c){var d,e;for(e in b)b.hasOwnProperty(e)&&(d=b[e],h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==e&&h.isArray(d)?d.slice():d);return a}function Wa(a,b,c){h(a).on("click.DT",b,function(b){h(a).blur();c(b)}).on("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).on("selectstart.DT",
|
||||
function(){return!1})}function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function r(a,b,c,d){var e=[];b&&(e=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,d)}));null!==c&&(b=h.Event(c+".dt"),h(a.nTable).trigger(b,d),e.push(b.result));return e}function Sa(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Na(a,b){var c=a.renderer,d=n.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===
|
||||
typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ia(a,b){var c=[],c=Lb.numbers_length,d=Math.floor(c/2);b<=c?c=Y(0,b):a<=d?(c=Y(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=Y(b-(c-2),b):(c=Y(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function Da(a){h.each({num:function(b){return za(b,a)},"num-fmt":function(b){return za(b,a,Ya)},"html-num":function(b){return za(b,
|
||||
a,Aa)},"html-num-fmt":function(b){return za(b,a,Aa,Ya)}},function(b,c){x.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(x.type.search[b+a]=x.type.search.html)})}function Mb(a){return function(){var b=[ya(this[n.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return n.ext.internal[a].apply(this,b)}}var n=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new s(ya(this[x.iApiIndex])):new s(this)};
|
||||
this.fnAddData=function(a,b){var c=this.api(!0),d=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===k||b)&&c.draw();return d.flatten().toArray()};this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===k||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&la(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,
|
||||
b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0],h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===k||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(a)};this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===k?e.search(a,c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==d||"th"==d?c.cell(a,b).data():
|
||||
c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};
|
||||
this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===k||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return ya(this[x.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===k||e)&&h.columns.adjust();
|
||||
(d===k||d)&&h.draw();return 0};this.fnVersionCheck=x.fnVersionCheck;var b=this,c=a===k,d=this.length;c&&(a={});this.oApi=this.internal=x.internal;for(var e in n.ext.internal)e&&(this[e]=Mb(e));this.each(function(){var e={},g=1<d?Xa(e,a,!0):a,j=0,i,e=this.getAttribute("id"),m=!1,l=n.defaults,q=h(this);if("table"!=this.nodeName.toLowerCase())K(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{fb(l);gb(l.column);J(l,l,!0);J(l.column,l.column,!0);J(l,h.extend(g,q.data()));var t=n.settings,
|
||||
j=0;for(i=t.length;j<i;j++){var o=t[j];if(o.nTable==this||o.nTHead&&o.nTHead.parentNode==this||o.nTFoot&&o.nTFoot.parentNode==this){var s=g.bRetrieve!==k?g.bRetrieve:l.bRetrieve;if(c||s)return o.oInstance;if(g.bDestroy!==k?g.bDestroy:l.bDestroy){o.oInstance.fnDestroy();break}else{K(o,0,"Cannot reinitialise DataTable",3);return}}if(o.sTableId==this.id){t.splice(j,1);break}}if(null===e||""===e)this.id=e="DataTables_Table_"+n.ext._unique++;var p=h.extend(!0,{},n.models.oSettings,{sDestroyWidth:q[0].style.width,
|
||||
sInstance:e,sTableId:e});p.nTable=this;p.oApi=b.internal;p.oInit=g;t.push(p);p.oInstance=1===b.length?b:q.dataTable();fb(g);Ca(g.oLanguage);g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=h.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]);g=Xa(h.extend(!0,{},l),g);F(p.oFeatures,g,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));F(p,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod",
|
||||
"aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]);F(p.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);F(p.oLanguage,g,"fnInfoCallback");
|
||||
z(p,"aoDrawCallback",g.fnDrawCallback,"user");z(p,"aoServerParams",g.fnServerParams,"user");z(p,"aoStateSaveParams",g.fnStateSaveParams,"user");z(p,"aoStateLoadParams",g.fnStateLoadParams,"user");z(p,"aoStateLoaded",g.fnStateLoaded,"user");z(p,"aoRowCallback",g.fnRowCallback,"user");z(p,"aoRowCreatedCallback",g.fnCreatedRow,"user");z(p,"aoHeaderCallback",g.fnHeaderCallback,"user");z(p,"aoFooterCallback",g.fnFooterCallback,"user");z(p,"aoInitComplete",g.fnInitComplete,"user");z(p,"aoPreDrawCallback",
|
||||
g.fnPreDrawCallback,"user");p.rowIdFn=S(g.rowId);hb(p);var u=p.oClasses;h.extend(u,n.ext.classes,g.oClasses);q.addClass(u.sTable);p.iInitDisplayStart===k&&(p.iInitDisplayStart=g.iDisplayStart,p._iDisplayStart=g.iDisplayStart);null!==g.iDeferLoading&&(p.bDeferLoading=!0,e=h.isArray(g.iDeferLoading),p._iRecordsDisplay=e?g.iDeferLoading[0]:g.iDeferLoading,p._iRecordsTotal=e?g.iDeferLoading[1]:g.iDeferLoading);var v=p.oLanguage;h.extend(!0,v,g.oLanguage);v.sUrl&&(h.ajax({dataType:"json",url:v.sUrl,success:function(a){Ca(a);
|
||||
J(l.oLanguage,a);h.extend(true,v,a);ha(p)},error:function(){ha(p)}}),m=!0);null===g.asStripeClasses&&(p.asStripeClasses=[u.sStripeOdd,u.sStripeEven]);var e=p.asStripeClasses,x=q.children("tbody").find("tr").eq(0);-1!==h.inArray(!0,h.map(e,function(a){return x.hasClass(a)}))&&(h("tbody tr",this).removeClass(e.join(" ")),p.asDestroyStripes=e.slice());e=[];t=this.getElementsByTagName("thead");0!==t.length&&(ea(p.aoHeader,t[0]),e=ra(p));if(null===g.aoColumns){t=[];j=0;for(i=e.length;j<i;j++)t.push(null)}else t=
|
||||
g.aoColumns;j=0;for(i=t.length;j<i;j++)Ea(p,e?e[j]:null);jb(p,g.aoColumnDefs,t,function(a,b){ka(p,a,b)});if(x.length){var w=function(a,b){return a.getAttribute("data-"+b)!==null?b:null};h(x[0]).children("th, td").each(function(a,b){var c=p.aoColumns[a];if(c.mData===a){var d=w(b,"sort")||w(b,"order"),e=w(b,"filter")||w(b,"search");if(d!==null||e!==null){c.mData={_:a+".display",sort:d!==null?a+".@data-"+d:k,type:d!==null?a+".@data-"+d:k,filter:e!==null?a+".@data-"+e:k};ka(p,a)}}})}var U=p.oFeatures,
|
||||
e=function(){if(g.aaSorting===k){var a=p.aaSorting;j=0;for(i=a.length;j<i;j++)a[j][1]=p.aoColumns[j].asSorting[0]}wa(p);U.bSort&&z(p,"aoDrawCallback",function(){if(p.bSorted){var a=X(p),b={};h.each(a,function(a,c){b[c.src]=c.dir});r(p,null,"order",[p,a,b]);Jb(p)}});z(p,"aoDrawCallback",function(){(p.bSorted||y(p)==="ssp"||U.bDeferRender)&&wa(p)},"sc");var a=q.children("caption").each(function(){this._captionSide=h(this).css("caption-side")}),b=q.children("thead");b.length===0&&(b=h("<thead/>").appendTo(q));
|
||||
p.nTHead=b[0];b=q.children("tbody");b.length===0&&(b=h("<tbody/>").appendTo(q));p.nTBody=b[0];b=q.children("tfoot");if(b.length===0&&a.length>0&&(p.oScroll.sX!==""||p.oScroll.sY!==""))b=h("<tfoot/>").appendTo(q);if(b.length===0||b.children().length===0)q.addClass(u.sNoFooter);else if(b.length>0){p.nTFoot=b[0];ea(p.aoFooter,p.nTFoot)}if(g.aaData)for(j=0;j<g.aaData.length;j++)O(p,g.aaData[j]);else(p.bDeferLoading||y(p)=="dom")&&na(p,h(p.nTBody).children("tr"));p.aiDisplay=p.aiDisplayMaster.slice();
|
||||
p.bInitialised=true;m===false&&ha(p)};g.bStateSave?(U.bStateSave=!0,z(p,"aoDrawCallback",xa,"state_save"),Kb(p,g,e)):e()}});b=null;return this},x,s,o,u,Za={},Nb=/[\r\n]/g,Aa=/<.*?>/g,Zb=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,$b=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Ya=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,M=function(a){return!a||!0===a||"-"===a?!0:!1},Ob=function(a){var b=parseInt(a,10);return!isNaN(b)&&
|
||||
isFinite(a)?b:null},Pb=function(a,b){Za[b]||(Za[b]=RegExp(Qa(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(Za[b],"."):a},$a=function(a,b,c){var d="string"===typeof a;if(M(a))return!0;b&&d&&(a=Pb(a,b));c&&d&&(a=a.replace(Ya,""));return!isNaN(parseFloat(a))&&isFinite(a)},Qb=function(a,b,c){return M(a)?!0:!(M(a)||"string"===typeof a)?null:$a(a.replace(Aa,""),b,c)?!0:null},D=function(a,b,c){var d=[],e=0,f=a.length;if(c!==k)for(;e<f;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<
|
||||
f;e++)a[e]&&d.push(a[e][b]);return d},ja=function(a,b,c,d){var e=[],f=0,g=b.length;if(d!==k)for(;f<g;f++)a[b[f]][c]&&e.push(a[b[f]][c][d]);else for(;f<g;f++)e.push(a[b[f]][c]);return e},Y=function(a,b){var c=[],d;b===k?(b=0,d=a):(d=b,b=a);for(var e=b;e<d;e++)c.push(e);return c},Rb=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);return b},qa=function(a){var b;a:{if(!(2>a.length)){b=a.slice().sort();for(var c=b[0],d=1,e=b.length;d<e;d++){if(b[d]===c){b=!1;break a}c=b[d]}}b=!0}if(b)return a.slice();
|
||||
b=[];var e=a.length,f,g=0,d=0;a:for(;d<e;d++){c=a[d];for(f=0;f<g;f++)if(b[f]===c)continue a;b.push(c);g++}return b};n.util={throttle:function(a,b){var c=b!==k?b:200,d,e;return function(){var b=this,g=+new Date,j=arguments;d&&g<d+c?(clearTimeout(e),e=setTimeout(function(){d=k;a.apply(b,j)},c)):(d=g,a.apply(b,j))}},escapeRegex:function(a){return a.replace($b,"\\$1")}};var A=function(a,b,c){a[b]!==k&&(a[c]=a[b])},ca=/\[.*?\]$/,W=/\(\)$/,Qa=n.util.escapeRegex,va=h("<div>")[0],Wb=va.textContent!==k,Yb=
|
||||
/<.*?>/g,Oa=n.util.throttle,Sb=[],w=Array.prototype,ac=function(a){var b,c,d=n.settings,e=h.map(d,function(a){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase())return b=h.inArray(a,e),-1!==b?[d[b]]:null;if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?c=h(a):a instanceof h&&(c=a)}else return[];if(c)return c.map(function(){b=h.inArray(this,e);return-1!==b?d[b]:null}).toArray()};s=function(a,b){if(!(this instanceof
|
||||
s))return new s(a,b);var c=[],d=function(a){(a=ac(a))&&(c=c.concat(a))};if(h.isArray(a))for(var e=0,f=a.length;e<f;e++)d(a[e]);else d(a);this.context=qa(c);b&&h.merge(this,b);this.selector={rows:null,cols:null,opts:null};s.extend(this,this,Sb)};n.Api=s;h.extend(s.prototype,{any:function(){return 0!==this.count()},concat:w.concat,context:[],count:function(){return this.flatten().length},each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=
|
||||
this.context;return b.length>a?new s(b[a],this[a]):null},filter:function(a){var b=[];if(w.filter)b=w.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]);return new s(this.context,b)},flatten:function(){var a=[];return new s(this.context,a.concat.apply(a,this.toArray()))},join:w.join,indexOf:w.indexOf||function(a,b){for(var c=b||0,d=this.length;c<d;c++)if(this[c]===a)return c;return-1},iterator:function(a,b,c,d){var e=[],f,g,j,h,m,l=this.context,
|
||||
n,o,u=this.selector;"string"===typeof a&&(d=c,c=b,b=a,a=!1);g=0;for(j=l.length;g<j;g++){var r=new s(l[g]);if("table"===b)f=c.call(r,l[g],g),f!==k&&e.push(f);else if("columns"===b||"rows"===b)f=c.call(r,l[g],this[g],g),f!==k&&e.push(f);else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){o=this[g];"column-rows"===b&&(n=Ba(l[g],u.opts));h=0;for(m=o.length;h<m;h++)f=o[h],f="cell"===b?c.call(r,l[g],f.row,f.column,g,h):c.call(r,l[g],f,g,h,n),f!==k&&e.push(f)}}return e.length||d?(a=new s(l,a?
|
||||
e.concat.apply([],e):e),b=a.selector,b.rows=u.rows,b.cols=u.cols,b.opts=u.opts,a):this},lastIndexOf:w.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(a){var b=[];if(w.map)b=w.map.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new s(this.context,b)},pluck:function(a){return this.map(function(b){return b[a]})},pop:w.pop,push:w.push,reduce:w.reduce||function(a,b){return ib(this,a,b,0,this.length,
|
||||
1)},reduceRight:w.reduceRight||function(a,b){return ib(this,a,b,this.length-1,-1,-1)},reverse:w.reverse,selector:null,shift:w.shift,slice:function(){return new s(this.context,this)},sort:w.sort,splice:w.splice,toArray:function(){return w.slice.call(this)},to$:function(){return h(this)},toJQuery:function(){return h(this)},unique:function(){return new s(this.context,qa(this))},unshift:w.unshift});s.extend=function(a,b,c){if(c.length&&b&&(b instanceof s||b.__dt_wrapper)){var d,e,f,g=function(a,b,c){return function(){var d=
|
||||
b.apply(a,arguments);s.extend(d,d,c.methodExt);return d}};d=0;for(e=c.length;d<e;d++)f=c[d],b[f.name]="function"===typeof f.val?g(a,f.val,f):h.isPlainObject(f.val)?{}:f.val,b[f.name].__dt_wrapper=!0,s.extend(a,b[f.name],f.propExt)}};s.register=o=function(a,b){if(h.isArray(a))for(var c=0,d=a.length;c<d;c++)s.register(a[c],b);else for(var e=a.split("."),f=Sb,g,j,c=0,d=e.length;c<d;c++){g=(j=-1!==e[c].indexOf("()"))?e[c].replace("()",""):e[c];var i;a:{i=0;for(var m=f.length;i<m;i++)if(f[i].name===g){i=
|
||||
f[i];break a}i=null}i||(i={name:g,val:{},methodExt:[],propExt:[]},f.push(i));c===d-1?i.val=b:f=j?i.methodExt:i.propExt}};s.registerPlural=u=function(a,b,c){s.register(a,c);s.register(b,function(){var a=c.apply(this,arguments);return a===this?this:a instanceof s?a.length?h.isArray(a[0])?new s(a.context,a[0]):a[0]:k:a})};o("tables()",function(a){var b;if(a){b=s;var c=this.context;if("number"===typeof a)a=[c[a]];else var d=h.map(c,function(a){return a.nTable}),a=h(d).filter(a).map(function(){var a=h.inArray(this,
|
||||
d);return c[a]}).toArray();b=new b(a)}else b=this;return b});o("table()",function(a){var a=this.tables(a),b=a.context;return b.length?new s(b[0]):a});u("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});u("tables().body()","table().body()",function(){return this.iterator("table",function(a){return a.nTBody},1)});u("tables().header()","table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});u("tables().footer()",
|
||||
"table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});u("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});o("draw()",function(a){return this.iterator("table",function(b){"page"===a?P(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),T(b,!1===a))})});o("page()",function(a){return a===k?this.page.info().page:this.iterator("table",function(b){Ta(b,a)})});o("page.info()",function(){if(0===
|
||||
this.context.length)return k;var a=this.context[0],b=a._iDisplayStart,c=a.oFeatures.bPaginate?a._iDisplayLength:-1,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:d,serverSide:"ssp"===y(a)}});o("page.len()",function(a){return a===k?0!==this.context.length?this.context[0]._iDisplayLength:k:this.iterator("table",function(b){Ra(b,a)})});var Tb=function(a,b,c){if(c){var d=new s(a);
|
||||
d.one("draw",function(){c(d.ajax.json())})}if("ssp"==y(a))T(a,b);else{C(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();sa(a,[],function(c){oa(a);for(var c=ta(a,c),d=0,e=c.length;d<e;d++)O(a,c[d]);T(a,b);C(a,!1)})}};o("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});o("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});o("ajax.reload()",function(a,b){return this.iterator("table",function(c){Tb(c,!1===b,a)})});o("ajax.url()",function(a){var b=
|
||||
this.context;if(a===k){if(0===b.length)return k;b=b[0];return b.ajax?h.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(b){h.isPlainObject(b.ajax)?b.ajax.url=a:b.ajax=a})});o("ajax.url().load()",function(a,b){return this.iterator("table",function(c){Tb(c,!1===b,a)})});var ab=function(a,b,c,d,e){var f=[],g,j,i,m,l,n;i=typeof b;if(!b||"string"===i||"function"===i||b.length===k)b=[b];i=0;for(m=b.length;i<m;i++){j=b[i]&&b[i].split&&!b[i].match(/[\[\(:]/)?b[i].split(","):
|
||||
[b[i]];l=0;for(n=j.length;l<n;l++)(g=c("string"===typeof j[l]?h.trim(j[l]):j[l]))&&g.length&&(f=f.concat(g))}a=x.selector[a];if(a.length){i=0;for(m=a.length;i<m;i++)f=a[i](d,e,f)}return qa(f)},bb=function(a){a||(a={});a.filter&&a.search===k&&(a.search=a.filter);return h.extend({search:"none",order:"current",page:"all"},a)},cb=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=a[b],a[0].length=1,a.length=1,a.context=[a.context[b]],a;a.length=0;return a},Ba=function(a,b){var c,
|
||||
d,e,f=[],g=a.aiDisplay;e=a.aiDisplayMaster;var j=b.search;c=b.order;d=b.page;if("ssp"==y(a))return"removed"===j?[]:Y(0,e.length);if("current"==d){c=a._iDisplayStart;for(d=a.fnDisplayEnd();c<d;c++)f.push(g[c])}else if("current"==c||"applied"==c)if("none"==j)f=e.slice();else if("applied"==j)f=g.slice();else{if("removed"==j){var i={};c=0;for(d=g.length;c<d;c++)i[g[c]]=null;f=h.map(e,function(a){return!i.hasOwnProperty(a)?a:null})}}else if("index"==c||"original"==c){c=0;for(d=a.aoData.length;c<d;c++)"none"==
|
||||
j?f.push(c):(e=h.inArray(c,g),(-1===e&&"removed"==j||0<=e&&"applied"==j)&&f.push(c))}return f};o("rows()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=bb(b),c=this.iterator("table",function(c){var e=b,f;return ab("row",a,function(a){var b=Ob(a),i=c.aoData;if(b!==null&&!e)return[b];f||(f=Ba(c,e));if(b!==null&&h.inArray(b,f)!==-1)return[b];if(a===null||a===k||a==="")return f;if(typeof a==="function")return h.map(f,function(b){var c=i[b];return a(b,c._aData,c.nTr)?b:null});if(a.nodeName){var b=
|
||||
a._DT_RowIndex,m=a._DT_CellIndex;if(b!==k)return i[b]&&i[b].nTr===a?[b]:[];if(m)return i[m.row]&&i[m.row].nTr===a?[m.row]:[];b=h(a).closest("*[data-dt-row]");return b.length?[b.data("dt-row")]:[]}if(typeof a==="string"&&a.charAt(0)==="#"){b=c.aIds[a.replace(/^#/,"")];if(b!==k)return[b.idx]}b=Rb(ja(c.aoData,f,"nTr"));return h(b).filter(a).map(function(){return this._DT_RowIndex}).toArray()},c,e)},1);c.selector.rows=a;c.selector.opts=b;return c});o("rows().nodes()",function(){return this.iterator("row",
|
||||
function(a,b){return a.aoData[b].nTr||k},1)});o("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return ja(a.aoData,b,"_aData")},1)});u("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){var d=b.aoData[c];return"search"===a?d._aFilterData:d._aSortData},1)});u("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){da(b,c,a)})});u("rows().indexes()","row().index()",function(){return this.iterator("row",
|
||||
function(a,b){return b},1)});u("rows().ids()","row().id()",function(a){for(var b=[],c=this.context,d=0,e=c.length;d<e;d++)for(var f=0,g=this[d].length;f<g;f++){var h=c[d].rowIdFn(c[d].aoData[this[d][f]]._aData);b.push((!0===a?"#":"")+h)}return new s(c,b)});u("rows().remove()","row().remove()",function(){var a=this;this.iterator("row",function(b,c,d){var e=b.aoData,f=e[c],g,h,i,m,l;e.splice(c,1);g=0;for(h=e.length;g<h;g++)if(i=e[g],l=i.anCells,null!==i.nTr&&(i.nTr._DT_RowIndex=g),null!==l){i=0;for(m=
|
||||
l.length;i<m;i++)l[i]._DT_CellIndex.row=g}pa(b.aiDisplayMaster,c);pa(b.aiDisplay,c);pa(a[d],c,!1);0<b._iRecordsDisplay&&b._iRecordsDisplay--;Sa(b);c=b.rowIdFn(f._aData);c!==k&&delete b.aIds[c]});this.iterator("table",function(a){for(var c=0,d=a.aoData.length;c<d;c++)a.aoData[c].idx=c});return this});o("rows.add()",function(a){var b=this.iterator("table",function(b){var c,f,g,h=[];f=0;for(g=a.length;f<g;f++)c=a[f],c.nodeName&&"TR"===c.nodeName.toUpperCase()?h.push(na(b,c)[0]):h.push(O(b,c));return h},
|
||||
1),c=this.rows(-1);c.pop();h.merge(c,b);return c});o("row()",function(a,b){return cb(this.rows(a,b))});o("row().data()",function(a){var b=this.context;if(a===k)return b.length&&this.length?b[0].aoData[this[0]]._aData:k;var c=b[0].aoData[this[0]];c._aData=a;h.isArray(a)&&c.nTr.id&&N(b[0].rowId)(a,c.nTr.id);da(b[0],this[0],"data");return this});o("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||null:null});o("row.add()",function(a){a instanceof h&&
|
||||
a.length&&(a=a[0]);var b=this.iterator("table",function(b){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?na(b,a)[0]:O(b,a)});return this.row(b[0])});var db=function(a,b){var c=a.context;if(c.length&&(c=c[0].aoData[b!==k?b:a[0]])&&c._details)c._details.remove(),c._detailsShow=k,c._details=k},Ub=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];if(d._details){(d._detailsShow=b)?d._details.insertAfter(d.nTr):d._details.detach();var e=c[0],f=new s(e),g=e.aoData;f.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");
|
||||
0<D(g,"_details").length&&(f.on("draw.dt.DT_details",function(a,b){e===b&&f.rows({page:"current"}).eq(0).each(function(a){a=g[a];a._detailsShow&&a._details.insertAfter(a.nTr)})}),f.on("column-visibility.dt.DT_details",function(a,b){if(e===b)for(var c,d=V(b),f=0,h=g.length;f<h;f++)c=g[f],c._details&&c._details.children("td[colspan]").attr("colspan",d)}),f.on("destroy.dt.DT_details",function(a,b){if(e===b)for(var c=0,d=g.length;c<d;c++)g[c]._details&&db(f,c)}))}}};o("row().child()",function(a,b){var c=
|
||||
this.context;if(a===k)return c.length&&this.length?c[0].aoData[this[0]]._details:k;if(!0===a)this.child.show();else if(!1===a)db(this);else if(c.length&&this.length){var d=c[0],c=c[0].aoData[this[0]],e=[],f=function(a,b){if(h.isArray(a)||a instanceof h)for(var c=0,k=a.length;c<k;c++)f(a[c],b);else a.nodeName&&"tr"===a.nodeName.toLowerCase()?e.push(a):(c=h("<tr><td/></tr>").addClass(b),h("td",c).addClass(b).html(a)[0].colSpan=V(d),e.push(c[0]))};f(a,b);c._details&&c._details.detach();c._details=h(e);
|
||||
c._detailsShow&&c._details.insertAfter(c.nTr)}return this});o(["row().child.show()","row().child().show()"],function(){Ub(this,!0);return this});o(["row().child.hide()","row().child().hide()"],function(){Ub(this,!1);return this});o(["row().child.remove()","row().child().remove()"],function(){db(this);return this});o("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var bc=/^([^:]+):(name|visIdx|visible)$/,Vb=function(a,b,
|
||||
c,d,e){for(var c=[],d=0,f=e.length;d<f;d++)c.push(B(a,e[d],b));return c};o("columns()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=bb(b),c=this.iterator("table",function(c){var e=a,f=b,g=c.aoColumns,j=D(g,"sName"),i=D(g,"nTh");return ab("column",e,function(a){var b=Ob(a);if(a==="")return Y(g.length);if(b!==null)return[b>=0?b:g.length+b];if(typeof a==="function"){var e=Ba(c,f);return h.map(g,function(b,f){return a(f,Vb(c,f,0,0,e),i[f])?f:null})}var k=typeof a==="string"?a.match(bc):
|
||||
"";if(k)switch(k[2]){case "visIdx":case "visible":b=parseInt(k[1],10);if(b<0){var n=h.map(g,function(a,b){return a.bVisible?b:null});return[n[n.length+b]]}return[aa(c,b)];case "name":return h.map(j,function(a,b){return a===k[1]?b:null});default:return[]}if(a.nodeName&&a._DT_CellIndex)return[a._DT_CellIndex.column];b=h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray();if(b.length||!a.nodeName)return b;b=h(a).closest("*[data-dt-column]");return b.length?[b.data("dt-column")]:[]},c,f)},
|
||||
1);c.selector.cols=a;c.selector.opts=b;return c});u("columns().header()","column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});u("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});u("columns().data()","column().data()",function(){return this.iterator("column-rows",Vb,1)});u("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},
|
||||
1)});u("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,f){return ja(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});u("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return ja(a.aoData,e,"anCells",b)},1)});u("columns().visible()","column().visible()",function(a,b){var c=this.iterator("column",function(b,c){if(a===k)return b.aoColumns[c].bVisible;var f=b.aoColumns,g=f[c],j=b.aoData,
|
||||
i,m,l;if(a!==k&&g.bVisible!==a){if(a){var n=h.inArray(!0,D(f,"bVisible"),c+1);i=0;for(m=j.length;i<m;i++)l=j[i].nTr,f=j[i].anCells,l&&l.insertBefore(f[c],f[n]||null)}else h(D(b.aoData,"anCells",c)).detach();g.bVisible=a;fa(b,b.aoHeader);fa(b,b.aoFooter);b.aiDisplay.length||h(b.nTBody).find("td[colspan]").attr("colspan",V(b));xa(b)}});a!==k&&(this.iterator("column",function(c,e){r(c,null,"column-visibility",[c,e,a,b])}),(b===k||b)&&this.columns.adjust());return c});u("columns().indexes()","column().index()",
|
||||
function(a){return this.iterator("column",function(b,c){return"visible"===a?ba(b,c):c},1)});o("columns.adjust()",function(){return this.iterator("table",function(a){$(a)},1)});o("column.index()",function(a,b){if(0!==this.context.length){var c=this.context[0];if("fromVisible"===a||"toData"===a)return aa(c,b);if("fromData"===a||"toVisible"===a)return ba(c,b)}});o("column()",function(a,b){return cb(this.columns(a,b))});o("cells()",function(a,b,c){h.isPlainObject(a)&&(a.row===k?(c=a,a=null):(c=b,b=null));
|
||||
h.isPlainObject(b)&&(c=b,b=null);if(null===b||b===k)return this.iterator("table",function(b){var d=a,e=bb(c),f=b.aoData,g=Ba(b,e),j=Rb(ja(f,g,"anCells")),i=h([].concat.apply([],j)),l,m=b.aoColumns.length,n,o,u,s,r,v;return ab("cell",d,function(a){var c=typeof a==="function";if(a===null||a===k||c){n=[];o=0;for(u=g.length;o<u;o++){l=g[o];for(s=0;s<m;s++){r={row:l,column:s};if(c){v=f[l];a(r,B(b,l,s),v.anCells?v.anCells[s]:null)&&n.push(r)}else n.push(r)}}return n}if(h.isPlainObject(a))return a.column!==
|
||||
k&&a.row!==k&&h.inArray(a.row,g)!==-1?[a]:[];c=i.filter(a).map(function(a,b){return{row:b._DT_CellIndex.row,column:b._DT_CellIndex.column}}).toArray();if(c.length||!a.nodeName)return c;v=h(a).closest("*[data-dt-row]");return v.length?[{row:v.data("dt-row"),column:v.data("dt-column")}]:[]},b,e)});var d=this.columns(b),e=this.rows(a),f,g,j,i,m;this.iterator("table",function(a,b){f=[];g=0;for(j=e[b].length;g<j;g++){i=0;for(m=d[b].length;i<m;i++)f.push({row:e[b][g],column:d[b][i]})}},1);var l=this.cells(f,
|
||||
c);h.extend(l.selector,{cols:b,rows:a,opts:c});return l});u("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=a.aoData[b])&&a.anCells?a.anCells[c]:k},1)});o("cells().data()",function(){return this.iterator("cell",function(a,b,c){return B(a,b,c)},1)});u("cells().cache()","cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)});u("cells().render()","cell().render()",
|
||||
function(a){return this.iterator("cell",function(b,c,d){return B(b,c,d,a)},1)});u("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,b,c){return{row:b,column:c,columnVisible:ba(a,c)}},1)});u("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,c,d){da(b,c,a,d)})});o("cell()",function(a,b,c){return cb(this.cells(a,b,c))});o("cell().data()",function(a){var b=this.context,c=this[0];if(a===k)return b.length&&c.length?B(b[0],
|
||||
c[0].row,c[0].column):k;kb(b[0],c[0].row,c[0].column,a);da(b[0],c[0].row,"data",c[0].column);return this});o("order()",function(a,b){var c=this.context;if(a===k)return 0!==c.length?c[0].aaSorting:k;"number"===typeof a?a=[[a,b]]:a.length&&!h.isArray(a[0])&&(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(b){b.aaSorting=a.slice()})});o("order.listener()",function(a,b,c){return this.iterator("table",function(d){Ma(d,a,b,c)})});o("order.fixed()",function(a){if(!a){var b=
|
||||
this.context,b=b.length?b[0].aaSortingFixed:k;return h.isArray(b)?{pre:b}:b}return this.iterator("table",function(b){b.aaSortingFixed=h.extend(!0,{},a)})});o(["columns().order()","column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];h.each(b[d],function(b,c){e.push([c,a])});c.aaSorting=e})});o("search()",function(a,b,c,d){var e=this.context;return a===k?0!==e.length?e[0].oPreviousSearch.sSearch:k:this.iterator("table",function(e){e.oFeatures.bFilter&&ga(e,
|
||||
h.extend({},e.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});u("columns().search()","column().search()",function(a,b,c,d){return this.iterator("column",function(e,f){var g=e.aoPreSearchCols;if(a===k)return g[f].sSearch;e.oFeatures.bFilter&&(h.extend(g[f],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),ga(e,e.oPreviousSearch,1))})});o("state()",function(){return this.context.length?this.context[0].oSavedState:
|
||||
null});o("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});o("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null});o("state.save()",function(){return this.iterator("table",function(a){xa(a)})});n.versionCheck=n.fnVersionCheck=function(a){for(var b=n.version.split("."),a=a.split("."),c,d,e=0,f=a.length;e<f;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};n.isDataTable=
|
||||
n.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;if(a instanceof n.Api)return!0;h.each(n.settings,function(a,e){var f=e.nScrollHead?h("table",e.nScrollHead)[0]:null,g=e.nScrollFoot?h("table",e.nScrollFoot)[0]:null;if(e.nTable===b||f===b||g===b)c=!0});return c};n.tables=n.fnTables=function(a){var b=!1;h.isPlainObject(a)&&(b=a.api,a=a.visible);var c=h.map(n.settings,function(b){if(!a||a&&h(b.nTable).is(":visible"))return b.nTable});return b?new s(c):c};n.camelToHungarian=J;o("$()",function(a,b){var c=
|
||||
this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,b){o(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0]=h.map(a[0].split(/\s/),function(a){return!a.match(/\.dt\b/)?a+".dt":a}).join(" ");var d=h(this.tables().nodes());d[b].apply(d,a);return this})});o("clear()",function(){return this.iterator("table",function(a){oa(a)})});o("settings()",function(){return new s(this.context,this.context)});o("init()",function(){var a=
|
||||
this.context;return a.length?a[0].oInit:null});o("data()",function(){return this.iterator("table",function(a){return D(a.aoData,"_aData")}).flatten()});o("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(e),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}),o;b.bDestroying=!0;r(b,"aoDestroyCallback","destroy",[b]);a||(new s(b)).columns().visible(!0);k.off(".DT").find(":not(tbody *)").off(".DT");
|
||||
h(E).off(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&e!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));b.aaSorting=[];b.aaSortingFixed=[];wa(b);h(l).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);f.children().detach();f.append(l);g=a?"remove":"detach";i[g]();k[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),i.css("width",b.sDestroyWidth).removeClass(d.sTable),
|
||||
(o=b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%o])}));c=h.inArray(b,n.settings);-1!==c&&n.settings.splice(c,1)})});h.each(["column","row","cell"],function(a,b){o(b+"s().every()",function(a){var d=this.selector.opts,e=this;return this.iterator(b,function(f,g,h,i,m){a.call(e[b](g,"cell"===b?h:d,"cell"===b?d:k),g,h,i,m)})})});o("i18n()",function(a,b,c){var d=this.context[0],a=S(a)(d.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]:
|
||||
a._);return a.replace("%d",c)});n.version="1.10.19";n.settings=[];n.models={};n.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};n.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};n.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,
|
||||
sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};n.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,
|
||||
bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+
|
||||
a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},
|
||||
oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},
|
||||
n.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};Z(n.defaults);n.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};
|
||||
Z(n.defaults.column);n.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],
|
||||
aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",
|
||||
iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)?1*this._iRecordsTotal:
|
||||
this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};n.ext=x={buttons:{},
|
||||
classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:n.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:n.version};h.extend(x,{afnFiltering:x.search,aTypes:x.type.detect,ofnSearch:x.type.search,oSort:x.type.order,afnSortData:x.order,aoFeatures:x.feature,oApi:x.internal,oStdClasses:x.classes,oPagination:x.pager});
|
||||
h.extend(n.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",
|
||||
sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",
|
||||
sJUIHeader:"",sJUIFooter:""});var Lb=n.ext.pager;h.extend(Lb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[ia(a,b)]},simple_numbers:function(a,b){return["previous",ia(a,b),"next"]},full_numbers:function(a,b){return["first","previous",ia(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",ia(a,b),"last"]},_numbers:ia,numbers_length:7});h.extend(!0,n.ext.renderer,{pageButton:{_:function(a,b,c,d,e,
|
||||
f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate||{},m,l,n=0,o=function(b,d){var k,s,u,r,v=function(b){Ta(a,b.data.action,true)};k=0;for(s=d.length;k<s;k++){r=d[k];if(h.isArray(r)){u=h("<"+(r.DT_el||"div")+"/>").appendTo(b);o(u,r)}else{m=null;l="";switch(r){case "ellipsis":b.append('<span class="ellipsis">…</span>');break;case "first":m=j.sFirst;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":m=j.sPrevious;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":m=
|
||||
j.sNext;l=r+(e<f-1?"":" "+g.sPageButtonDisabled);break;case "last":m=j.sLast;l=r+(e<f-1?"":" "+g.sPageButtonDisabled);break;default:m=r+1;l=e===r?g.sPageButtonActive:""}if(m!==null){u=h("<a>",{"class":g.sPageButton+" "+l,"aria-controls":a.sTableId,"aria-label":i[r],"data-dt-idx":n,tabindex:a.iTabIndex,id:c===0&&typeof r==="string"?a.sTableId+"_"+r:null}).html(m).appendTo(b);Wa(u,{action:r},v);n++}}}},s;try{s=h(b).find(H.activeElement).data("dt-idx")}catch(u){}o(h(b).empty(),d);s!==k&&h(b).find("[data-dt-idx="+
|
||||
s+"]").focus()}}});h.extend(n.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return $a(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&!Zb.test(a))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||M(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return $a(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Qb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Qb(a,c,!0)?"html-num-fmt"+c:null},function(a){return M(a)||
|
||||
"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(n.ext.type.search,{html:function(a){return M(a)?a:"string"===typeof a?a.replace(Nb," ").replace(Aa,""):""},string:function(a){return M(a)?a:"string"===typeof a?a.replace(Nb," "):a}});var za=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Pb(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};h.extend(x.type.order,{"date-pre":function(a){a=Date.parse(a);return isNaN(a)?-Infinity:a},"html-pre":function(a){return M(a)?
|
||||
"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return M(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,b){return a<b?1:a>b?-1:0}});Da("");h.extend(!0,n.ext.renderer,{header:{_:function(a,b,c,d){h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:
|
||||
c.sSortingClass)}})},jqueryui:function(a,b,c,d){h("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(h("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(h[e]==
|
||||
"asc"?d.sSortJUIAsc:h[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)}})}}});var eb=function(a){return"string"===typeof a?a.replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):a};n.render={number:function(a,b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return eb(f);h=h.toFixed(c);f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g,
|
||||
a)+f+(e||"")}}},text:function(){return{display:eb,filter:eb}}};h.extend(n.ext.internal,{_fnExternApiFunc:Mb,_fnBuildAjax:sa,_fnAjaxUpdate:mb,_fnAjaxParameters:vb,_fnAjaxUpdateDraw:wb,_fnAjaxDataSrc:ta,_fnAddColumn:Ea,_fnColumnOptions:ka,_fnAdjustColumnSizing:$,_fnVisibleToColumnIndex:aa,_fnColumnIndexToVisible:ba,_fnVisbleColumns:V,_fnGetColumns:ma,_fnColumnTypes:Ga,_fnApplyColumnDefs:jb,_fnHungarianMap:Z,_fnCamelToHungarian:J,_fnLanguageCompat:Ca,_fnBrowserDetect:hb,_fnAddData:O,_fnAddTr:na,_fnNodeToDataIndex:function(a,
|
||||
b){return b._DT_RowIndex!==k?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:B,_fnSetCellData:kb,_fnSplitObjNotation:Ja,_fnGetObjectDataFn:S,_fnSetObjectDataFn:N,_fnGetDataMaster:Ka,_fnClearTable:oa,_fnDeleteIndex:pa,_fnInvalidate:da,_fnGetRowElements:Ia,_fnCreateTr:Ha,_fnBuildHead:lb,_fnDrawHead:fa,_fnDraw:P,_fnReDraw:T,_fnAddOptionsHtml:ob,_fnDetectHeader:ea,_fnGetUniqueThs:ra,_fnFeatureHtmlFilter:qb,_fnFilterComplete:ga,_fnFilterCustom:zb,
|
||||
_fnFilterColumn:yb,_fnFilter:xb,_fnFilterCreateSearch:Pa,_fnEscapeRegex:Qa,_fnFilterData:Ab,_fnFeatureHtmlInfo:tb,_fnUpdateInfo:Db,_fnInfoMacros:Eb,_fnInitialise:ha,_fnInitComplete:ua,_fnLengthChange:Ra,_fnFeatureHtmlLength:pb,_fnFeatureHtmlPaginate:ub,_fnPageChange:Ta,_fnFeatureHtmlProcessing:rb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:sb,_fnScrollDraw:la,_fnApplyToChildren:I,_fnCalculateColumnWidths:Fa,_fnThrottle:Oa,_fnConvertToWidth:Fb,_fnGetWidestNode:Gb,_fnGetMaxLenString:Hb,_fnStringToCss:v,
|
||||
_fnSortFlatten:X,_fnSort:nb,_fnSortAria:Jb,_fnSortListener:Va,_fnSortAttachListener:Ma,_fnSortingClasses:wa,_fnSortData:Ib,_fnSaveState:xa,_fnLoadState:Kb,_fnSettingsFromNode:ya,_fnLog:K,_fnMap:F,_fnBindAction:Wa,_fnCallbackReg:z,_fnCallbackFire:r,_fnLengthOverflow:Sa,_fnRenderer:Na,_fnDataSource:y,_fnRowAttributes:La,_fnExtend:Xa,_fnCalculateEnd:function(){}});h.fn.dataTable=n;n.$=h;h.fn.dataTableSettings=n.settings;h.fn.dataTableExt=n.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};
|
||||
h.each(n,function(a,b){h.fn.DataTable[a]=b});return h.fn.dataTable});
|
||||
27
wwwroot/BackendScript/js/draggable-portlet.js
Normal file
27
wwwroot/BackendScript/js/draggable-portlet.js
Normal file
@@ -0,0 +1,27 @@
|
||||
var DraggablePortlet = function () {
|
||||
|
||||
return {
|
||||
//main function to initiate the module
|
||||
init: function () {
|
||||
|
||||
if (!jQuery().sortable) {
|
||||
return;
|
||||
}
|
||||
|
||||
$("#draggable_portlets").sortable({
|
||||
connectWith: ".card",
|
||||
items: ".card",
|
||||
opacity: 0.8,
|
||||
coneHelperSize: true,
|
||||
placeholder: 'sortable-box-placeholder round-all',
|
||||
forcePlaceholderSize: true,
|
||||
tolerance: "pointer"
|
||||
});
|
||||
|
||||
$(".column").disableSelection();
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}();
|
||||
104
wwwroot/BackendScript/js/dynamic-table.js
Normal file
104
wwwroot/BackendScript/js/dynamic-table.js
Normal file
@@ -0,0 +1,104 @@
|
||||
var Script = function () {
|
||||
|
||||
// begin first table
|
||||
$('#sample_1').dataTable({
|
||||
"sDom": "<'row'<'col-sm-6'l><'col-sm-6'f>r>t<'row'<'col-sm-6'i><'col-sm-6'p>>",
|
||||
"sPaginationType": "bootstrap",
|
||||
"oLanguage": {
|
||||
"sLengthMenu": "_MENU_ records per page",
|
||||
"oPaginate": {
|
||||
"sPrevious": "Prev",
|
||||
"sNext": "Next"
|
||||
}
|
||||
},
|
||||
"aoColumnDefs": [{
|
||||
'bSortable': false,
|
||||
'aTargets': [0]
|
||||
}]
|
||||
});
|
||||
|
||||
jQuery('#sample_1 .group-checkable').change(function () {
|
||||
var set = jQuery(this).attr("data-set");
|
||||
var checked = jQuery(this).is(":checked");
|
||||
jQuery(set).each(function () {
|
||||
if (checked) {
|
||||
$(this).attr("checked", true);
|
||||
} else {
|
||||
$(this).attr("checked", false);
|
||||
}
|
||||
});
|
||||
jQuery.uniform.update(set);
|
||||
});
|
||||
|
||||
jQuery('#sample_1_wrapper .dataTables_filter input').addClass("form-control"); // modify table search input
|
||||
jQuery('#sample_1_wrapper .dataTables_length select').addClass("form-control"); // modify table per page dropdown
|
||||
|
||||
// begin second table
|
||||
$('#sample_2').dataTable({
|
||||
"sDom": "<'row'<'col-sm-6'l><'col-sm-6'f>r>t<'row'<'col-sm-6'i><'col-sm-6'p>>",
|
||||
"sPaginationType": "bootstrap",
|
||||
"oLanguage": {
|
||||
"sLengthMenu": "_MENU_ per page",
|
||||
"oPaginate": {
|
||||
"sPrevious": "Prev",
|
||||
"sNext": "Next"
|
||||
}
|
||||
},
|
||||
"aoColumnDefs": [{
|
||||
'bSortable': false,
|
||||
'aTargets': [0]
|
||||
}]
|
||||
});
|
||||
|
||||
jQuery('#sample_2 .group-checkable').change(function () {
|
||||
var set = jQuery(this).attr("data-set");
|
||||
var checked = jQuery(this).is(":checked");
|
||||
jQuery(set).each(function () {
|
||||
if (checked) {
|
||||
$(this).attr("checked", true);
|
||||
} else {
|
||||
$(this).attr("checked", false);
|
||||
}
|
||||
});
|
||||
jQuery.uniform.update(set);
|
||||
});
|
||||
|
||||
jQuery('#sample_2_wrapper .dataTables_filter input').addClass("form-control"); // modify table search input
|
||||
jQuery('#sample_2_wrapper .dataTables_length select').addClass("form-control"); // modify table per page dropdown
|
||||
|
||||
// begin: third table
|
||||
$('#sample_3').dataTable({
|
||||
"sDom": "<'row'<'col-sm-6'l><'col-sm-6'f>r>t<'row'<'col-sm-6'i><'col-sm-6'p>>",
|
||||
"sPaginationType": "bootstrap",
|
||||
"oLanguage": {
|
||||
"sLengthMenu": "_MENU_ per page",
|
||||
"oPaginate": {
|
||||
"sPrevious": "Prev",
|
||||
"sNext": "Next"
|
||||
}
|
||||
},
|
||||
"aoColumnDefs": [{
|
||||
'bSortable': false,
|
||||
'aTargets': [0]
|
||||
}]
|
||||
});
|
||||
|
||||
jQuery('#sample_3 .group-checkable').change(function () {
|
||||
var set = jQuery(this).attr("data-set");
|
||||
var checked = jQuery(this).is(":checked");
|
||||
jQuery(set).each(function () {
|
||||
if (checked) {
|
||||
$(this).attr("checked", true);
|
||||
} else {
|
||||
$(this).attr("checked", false);
|
||||
}
|
||||
});
|
||||
jQuery.uniform.update(set);
|
||||
});
|
||||
|
||||
jQuery('#sample_3_wrapper .dataTables_filter input').addClass("form-control"); // modify table search input
|
||||
jQuery('#sample_3_wrapper .dataTables_length select').addClass("form-control"); // modify table per page dropdown
|
||||
|
||||
|
||||
|
||||
}();
|
||||
64
wwwroot/BackendScript/js/dynamic_table_init.js
Normal file
64
wwwroot/BackendScript/js/dynamic_table_init.js
Normal file
@@ -0,0 +1,64 @@
|
||||
function fnFormatDetails ( oTable, nTr )
|
||||
{
|
||||
var aData = oTable.fnGetData( nTr );
|
||||
var sOut = '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">';
|
||||
sOut += '<tr><td>Rendering engine:</td><td>'+aData[1]+' '+aData[4]+'</td></tr>';
|
||||
sOut += '<tr><td>Link to source:</td><td>Could provide a link here</td></tr>';
|
||||
sOut += '<tr><td>Extra info:</td><td>And any further details here (img etc)</td></tr>';
|
||||
sOut += '</table>';
|
||||
|
||||
return sOut;
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#dynamic-table').dataTable( {
|
||||
"aaSorting": [[ 4, "desc" ]]
|
||||
} );
|
||||
|
||||
/*
|
||||
* Insert a 'details' column to the table
|
||||
*/
|
||||
var nCloneTh = document.createElement( 'th' );
|
||||
var nCloneTd = document.createElement( 'td' );
|
||||
nCloneTd.innerHTML = '<img src="img/details_open.png">';
|
||||
nCloneTd.className = "center";
|
||||
|
||||
$('#hidden-table-info thead tr').each( function () {
|
||||
this.insertBefore( nCloneTh, this.childNodes[0] );
|
||||
} );
|
||||
|
||||
$('#hidden-table-info tbody tr').each( function () {
|
||||
this.insertBefore( nCloneTd.cloneNode( true ), this.childNodes[0] );
|
||||
} );
|
||||
|
||||
/*
|
||||
* Initialse DataTables, with no sorting on the 'details' column
|
||||
*/
|
||||
var oTable = $('#hidden-table-info').dataTable( {
|
||||
"aoColumnDefs": [
|
||||
{ "bSortable": false, "aTargets": [ 0 ] }
|
||||
],
|
||||
"aaSorting": [[1, 'asc']]
|
||||
});
|
||||
|
||||
/* Add event listener for opening and closing details
|
||||
* Note that the indicator for showing which row is open is not controlled by DataTables,
|
||||
* rather it is done here
|
||||
*/
|
||||
$(document).on('click','#hidden-table-info tbody td img',function () {
|
||||
var nTr = $(this).parents('tr')[0];
|
||||
if ( oTable.fnIsOpen(nTr) )
|
||||
{
|
||||
/* This row is already open - close it */
|
||||
this.src = "img/details_open.png";
|
||||
oTable.fnClose( nTr );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Open this row */
|
||||
this.src = "img/details_close.png";
|
||||
oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
39
wwwroot/BackendScript/js/easy-pie-chart.js
Normal file
39
wwwroot/BackendScript/js/easy-pie-chart.js
Normal file
@@ -0,0 +1,39 @@
|
||||
var Script = function () {
|
||||
|
||||
// easy pie chart
|
||||
|
||||
$('.percentage').easyPieChart({
|
||||
animate: 1000,
|
||||
size: 135,
|
||||
barColor:'#ff6c60'
|
||||
});
|
||||
$('.percentage-light').easyPieChart({
|
||||
barColor: function(percent) {
|
||||
percent /= 100;
|
||||
return "rgb(" + Math.round(255 * (1-percent)) + ", " + Math.round(255 * percent) + ", 0)";
|
||||
},
|
||||
trackColor: '#666',
|
||||
scaleColor: false,
|
||||
lineCap: 'butt',
|
||||
lineWidth: 15,
|
||||
animate: 1000
|
||||
});
|
||||
|
||||
$('.update-easy-pie-chart').click(function(){
|
||||
$('.easy-pie-chart .percentage').each(function() {
|
||||
var newValue = Math.floor(100*Math.random());
|
||||
$(this).data('easyPieChart').update(newValue);
|
||||
$('span', this).text(newValue);
|
||||
});
|
||||
});
|
||||
|
||||
$('.updateEasyPieChart').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('.percentage, .percentage-light').each(function() {
|
||||
var newValue = Math.round(100*Math.random());
|
||||
$(this).data('easyPieChart').update(newValue);
|
||||
$('span', this).text(newValue);
|
||||
});
|
||||
});
|
||||
|
||||
}();
|
||||
116
wwwroot/BackendScript/js/external-dragging-calendar.js
Normal file
116
wwwroot/BackendScript/js/external-dragging-calendar.js
Normal file
@@ -0,0 +1,116 @@
|
||||
var Script = function () {
|
||||
|
||||
|
||||
/* initialize the external events
|
||||
-----------------------------------------------------------------*/
|
||||
|
||||
$('#external-events div.external-event').each(function() {
|
||||
|
||||
// create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)
|
||||
// it doesn't need to have a start or end
|
||||
var eventObject = {
|
||||
title: $.trim($(this).text()) // use the element's text as the event title
|
||||
};
|
||||
|
||||
// store the Event Object in the DOM element so we can get to it later
|
||||
$(this).data('eventObject', eventObject);
|
||||
|
||||
// make the event draggable using jQuery UI
|
||||
$(this).draggable({
|
||||
zIndex: 999,
|
||||
revert: true, // will cause the event to go back to its
|
||||
revertDuration: 0 // original position after the drag
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
/* initialize the calendar
|
||||
-----------------------------------------------------------------*/
|
||||
|
||||
var date = new Date();
|
||||
var d = date.getDate();
|
||||
var m = date.getMonth();
|
||||
var y = date.getFullYear();
|
||||
|
||||
$('#calendar').fullCalendar({
|
||||
header: {
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
right: 'month,basicWeek,basicDay'
|
||||
},
|
||||
editable: true,
|
||||
droppable: true, // this allows things to be dropped onto the calendar !!!
|
||||
drop: function(date, allDay) { // this function is called when something is dropped
|
||||
|
||||
// retrieve the dropped element's stored Event Object
|
||||
var originalEventObject = $(this).data('eventObject');
|
||||
|
||||
// we need to copy it, so that multiple events don't have a reference to the same object
|
||||
var copiedEventObject = $.extend({}, originalEventObject);
|
||||
|
||||
// assign it the date that was reported
|
||||
copiedEventObject.start = date;
|
||||
copiedEventObject.allDay = allDay;
|
||||
|
||||
// render the event on the calendar
|
||||
// the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
|
||||
$('#calendar').fullCalendar('renderEvent', copiedEventObject, true);
|
||||
|
||||
// is the "remove after drop" checkbox checked?
|
||||
if ($('#drop-remove').is(':checked')) {
|
||||
// if so, remove the element from the "Draggable Events" list
|
||||
$(this).remove();
|
||||
}
|
||||
|
||||
},
|
||||
events: [
|
||||
{
|
||||
title: 'All Day Event',
|
||||
start: new Date(y, m, 1)
|
||||
},
|
||||
{
|
||||
title: 'Long Event',
|
||||
start: new Date(y, m, d-5),
|
||||
end: new Date(y, m, d-2)
|
||||
},
|
||||
{
|
||||
id: 999,
|
||||
title: 'Repeating Event',
|
||||
start: new Date(y, m, d-3, 16, 0),
|
||||
allDay: false
|
||||
},
|
||||
{
|
||||
id: 999,
|
||||
title: 'Repeating Event',
|
||||
start: new Date(y, m, d+4, 16, 0),
|
||||
allDay: false
|
||||
},
|
||||
{
|
||||
title: 'Meeting',
|
||||
start: new Date(y, m, d, 10, 30),
|
||||
allDay: false
|
||||
},
|
||||
{
|
||||
title: 'Lunch',
|
||||
start: new Date(y, m, d, 12, 0),
|
||||
end: new Date(y, m, d, 14, 0),
|
||||
allDay: false
|
||||
},
|
||||
{
|
||||
title: 'Birthday Party',
|
||||
start: new Date(y, m, d+1, 19, 0),
|
||||
end: new Date(y, m, d+1, 22, 30),
|
||||
allDay: false
|
||||
},
|
||||
{
|
||||
title: 'Click for Google',
|
||||
start: new Date(y, m, 28),
|
||||
end: new Date(y, m, 29),
|
||||
url: 'http://google.com/'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
}();
|
||||
422
wwwroot/BackendScript/js/flot-chart.js
Normal file
422
wwwroot/BackendScript/js/flot-chart.js
Normal file
@@ -0,0 +1,422 @@
|
||||
var Script = function () {
|
||||
|
||||
// tracking chart
|
||||
|
||||
var plot;
|
||||
$(function () {
|
||||
var sin = [], cos = [];
|
||||
for (var i = 0; i < 14; i += 0.1) {
|
||||
sin.push([i, Math.sin(i)]);
|
||||
cos.push([i, Math.cos(i)]);
|
||||
}
|
||||
|
||||
plot = $.plot($("#chart-1"),
|
||||
[ { data: sin, label: "sin(x) = -0.00"},
|
||||
{ data: cos, label: "cos(x) = -0.00" } ], {
|
||||
series: {
|
||||
lines: { show: true }
|
||||
},
|
||||
crosshair: { mode: "x" },
|
||||
grid: { hoverable: true, autoHighlight: false },
|
||||
yaxis: { min: -1.2, max: 1.2 }
|
||||
});
|
||||
var legends = $("#chart-1 .legendLabel");
|
||||
legends.each(function () {
|
||||
// fix the widths so they don't jump around
|
||||
$(this).css('width', $(this).width());
|
||||
});
|
||||
|
||||
var updateLegendTimeout = null;
|
||||
var latestPosition = null;
|
||||
|
||||
function updateLegend() {
|
||||
updateLegendTimeout = null;
|
||||
|
||||
var pos = latestPosition;
|
||||
|
||||
var axes = plot.getAxes();
|
||||
if (pos.x < axes.xaxis.min || pos.x > axes.xaxis.max ||
|
||||
pos.y < axes.yaxis.min || pos.y > axes.yaxis.max)
|
||||
return;
|
||||
|
||||
var i, j, dataset = plot.getData();
|
||||
for (i = 0; i < dataset.length; ++i) {
|
||||
var series = dataset[i];
|
||||
|
||||
// find the nearest points, x-wise
|
||||
for (j = 0; j < series.data.length; ++j)
|
||||
if (series.data[j][0] > pos.x)
|
||||
break;
|
||||
|
||||
// now interpolate
|
||||
var y, p1 = series.data[j - 1], p2 = series.data[j];
|
||||
if (p1 == null)
|
||||
y = p2[1];
|
||||
else if (p2 == null)
|
||||
y = p1[1];
|
||||
else
|
||||
y = p1[1] + (p2[1] - p1[1]) * (pos.x - p1[0]) / (p2[0] - p1[0]);
|
||||
|
||||
legends.eq(i).text(series.label.replace(/=.*/, "= " + y.toFixed(2)));
|
||||
}
|
||||
}
|
||||
|
||||
$("#chart-1").bind("plothover", function (event, pos, item) {
|
||||
latestPosition = pos;
|
||||
if (!updateLegendTimeout)
|
||||
updateLegendTimeout = setTimeout(updateLegend, 50);
|
||||
});
|
||||
});
|
||||
|
||||
// selection chart
|
||||
|
||||
$(function () {
|
||||
var data = [
|
||||
{
|
||||
label: "United States",
|
||||
data: [[1990, 18.9], [1991, 18.7], [1992, 18.4], [1993, 19.3], [1994, 19.5], [1995, 19.3], [1996, 19.4], [1997, 20.2], [1998, 19.8], [1999, 19.9], [2000, 20.4], [2001, 20.1], [2002, 20.0], [2003, 19.8], [2004, 20.4]]
|
||||
},
|
||||
{
|
||||
label: "Russia",
|
||||
data: [[1992, 13.4], [1993, 12.2], [1994, 10.6], [1995, 10.2], [1996, 10.1], [1997, 9.7], [1998, 9.5], [1999, 9.7], [2000, 9.9], [2001, 9.9], [2002, 9.9], [2003, 10.3], [2004, 10.5]]
|
||||
},
|
||||
{
|
||||
label: "United Kingdom",
|
||||
data: [[1990, 10.0], [1991, 11.3], [1992, 9.9], [1993, 9.6], [1994, 9.5], [1995, 9.5], [1996, 9.9], [1997, 9.3], [1998, 9.2], [1999, 9.2], [2000, 9.5], [2001, 9.6], [2002, 9.3], [2003, 9.4], [2004, 9.79]]
|
||||
},
|
||||
{
|
||||
label: "Germany",
|
||||
data: [[1990, 12.4], [1991, 11.2], [1992, 10.8], [1993, 10.5], [1994, 10.4], [1995, 10.2], [1996, 10.5], [1997, 10.2], [1998, 10.1], [1999, 9.6], [2000, 9.7], [2001, 10.0], [2002, 9.7], [2003, 9.8], [2004, 9.79]]
|
||||
},
|
||||
{
|
||||
label: "Denmark",
|
||||
data: [[1990, 9.7], [1991, 12.1], [1992, 10.3], [1993, 11.3], [1994, 11.7], [1995, 10.6], [1996, 12.8], [1997, 10.8], [1998, 10.3], [1999, 9.4], [2000, 8.7], [2001, 9.0], [2002, 8.9], [2003, 10.1], [2004, 9.80]]
|
||||
},
|
||||
{
|
||||
label: "Sweden",
|
||||
data: [[1990, 5.8], [1991, 6.0], [1992, 5.9], [1993, 5.5], [1994, 5.7], [1995, 5.3], [1996, 6.1], [1997, 5.4], [1998, 5.4], [1999, 5.1], [2000, 5.2], [2001, 5.4], [2002, 6.2], [2003, 5.9], [2004, 5.89]]
|
||||
},
|
||||
{
|
||||
label: "Norway",
|
||||
data: [[1990, 8.3], [1991, 8.3], [1992, 7.8], [1993, 8.3], [1994, 8.4], [1995, 5.9], [1996, 6.4], [1997, 6.7], [1998, 6.9], [1999, 7.6], [2000, 7.4], [2001, 8.1], [2002, 12.5], [2003, 9.9], [2004, 19.0]]
|
||||
}
|
||||
];
|
||||
|
||||
var options = {
|
||||
series: {
|
||||
lines: { show: true },
|
||||
points: { show: true }
|
||||
},
|
||||
legend: { noColumns: 2 },
|
||||
xaxis: { tickDecimals: 0 },
|
||||
yaxis: { min: 0 },
|
||||
selection: { mode: "x" }
|
||||
};
|
||||
|
||||
var placeholder = $("#chart-2");
|
||||
|
||||
placeholder.bind("plotselected", function (event, ranges) {
|
||||
$("#selection").text(ranges.xaxis.from.toFixed(1) + " to " + ranges.xaxis.to.toFixed(1));
|
||||
|
||||
var zoom = $("#zoom").attr("checked");
|
||||
if (zoom)
|
||||
plot = $.plot(placeholder, data,
|
||||
$.extend(true, {}, options, {
|
||||
xaxis: { min: ranges.xaxis.from, max: ranges.xaxis.to }
|
||||
}));
|
||||
});
|
||||
|
||||
placeholder.bind("plotunselected", function (event) {
|
||||
$("#selection").text("");
|
||||
});
|
||||
|
||||
var plot = $.plot(placeholder, data, options);
|
||||
|
||||
$("#clearSelection").click(function () {
|
||||
plot.clearSelection();
|
||||
});
|
||||
|
||||
$("#setSelection").click(function () {
|
||||
plot.setSelection({ xaxis: { from: 1994, to: 1995 } });
|
||||
});
|
||||
});
|
||||
|
||||
// live chart
|
||||
|
||||
$(function () {
|
||||
// we use an inline data source in the example, usually data would
|
||||
// be fetched from a server
|
||||
var data = [], totalPoints = 300;
|
||||
function getRandomData() {
|
||||
if (data.length > 0)
|
||||
data = data.slice(1);
|
||||
|
||||
// do a random walk
|
||||
while (data.length < totalPoints) {
|
||||
var prev = data.length > 0 ? data[data.length - 1] : 50;
|
||||
var y = prev + Math.random() * 10 - 5;
|
||||
if (y < 0)
|
||||
y = 0;
|
||||
if (y > 100)
|
||||
y = 100;
|
||||
data.push(y);
|
||||
}
|
||||
|
||||
// zip the generated y values with the x values
|
||||
var res = [];
|
||||
for (var i = 0; i < data.length; ++i)
|
||||
res.push([i, data[i]])
|
||||
return res;
|
||||
}
|
||||
|
||||
// setup control widget
|
||||
var updateInterval = 30;
|
||||
$("#updateInterval").val(updateInterval).change(function () {
|
||||
var v = $(this).val();
|
||||
if (v && !isNaN(+v)) {
|
||||
updateInterval = +v;
|
||||
if (updateInterval < 1)
|
||||
updateInterval = 1;
|
||||
if (updateInterval > 2000)
|
||||
updateInterval = 2000;
|
||||
$(this).val("" + updateInterval);
|
||||
}
|
||||
});
|
||||
|
||||
// setup plot
|
||||
var options = {
|
||||
series: { shadowSize: 0 }, // drawing is faster without shadows
|
||||
yaxis: { min: 0, max: 100 },
|
||||
xaxis: { show: false }
|
||||
};
|
||||
var plot = $.plot($("#chart-3"), [ getRandomData() ], options);
|
||||
|
||||
function update() {
|
||||
plot.setData([ getRandomData() ]);
|
||||
// since the axes don't change, we don't need to call plot.setupGrid()
|
||||
plot.draw();
|
||||
|
||||
setTimeout(update, updateInterval);
|
||||
}
|
||||
|
||||
update();
|
||||
});
|
||||
|
||||
// support chart
|
||||
|
||||
$(function () {
|
||||
var d1 = [];
|
||||
for (var i = 0; i < 14; i += 0.5)
|
||||
d1.push([i, Math.sin(i)]);
|
||||
|
||||
var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]];
|
||||
|
||||
var d3 = [];
|
||||
for (var i = 0; i < 14; i += 0.5)
|
||||
d3.push([i, Math.cos(i)]);
|
||||
|
||||
var d4 = [];
|
||||
for (var i = 0; i < 14; i += 0.1)
|
||||
d4.push([i, Math.sqrt(i * 10)]);
|
||||
|
||||
var d5 = [];
|
||||
for (var i = 0; i < 14; i += 0.5)
|
||||
d5.push([i, Math.sqrt(i)]);
|
||||
|
||||
var d6 = [];
|
||||
for (var i = 0; i < 14; i += 0.5 + Math.random())
|
||||
d6.push([i, Math.sqrt(2*i + Math.sin(i) + 5)]);
|
||||
|
||||
$.plot($("#chart-4"), [
|
||||
{
|
||||
data: d1,
|
||||
lines: { show: true, fill: true }
|
||||
},
|
||||
{
|
||||
data: d2,
|
||||
bars: { show: true }
|
||||
},
|
||||
{
|
||||
data: d3,
|
||||
points: { show: true }
|
||||
},
|
||||
{
|
||||
data: d4,
|
||||
lines: { show: true }
|
||||
},
|
||||
{
|
||||
data: d5,
|
||||
lines: { show: true },
|
||||
points: { show: true }
|
||||
},
|
||||
{
|
||||
data: d6,
|
||||
lines: { show: true, steps: true }
|
||||
}
|
||||
]);
|
||||
});
|
||||
|
||||
// bar chart
|
||||
|
||||
$(function () {
|
||||
var d1 = [];
|
||||
for (var i = 0; i <= 10; i += 1)
|
||||
d1.push([i, parseInt(Math.random() * 30)]);
|
||||
|
||||
var d2 = [];
|
||||
for (var i = 0; i <= 10; i += 1)
|
||||
d2.push([i, parseInt(Math.random() * 30)]);
|
||||
|
||||
var d3 = [];
|
||||
for (var i = 0; i <= 10; i += 1)
|
||||
d3.push([i, parseInt(Math.random() * 30)]);
|
||||
|
||||
var stack = 0, bars = true, lines = false, steps = false;
|
||||
|
||||
function plotWithOptions() {
|
||||
$.plot($("#chart-5"), [ d1, d2, d3 ], {
|
||||
series: {
|
||||
stack: stack,
|
||||
lines: { show: lines, fill: true, steps: steps },
|
||||
bars: { show: bars, barWidth: 0.6 }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
plotWithOptions();
|
||||
|
||||
$(".stackControls input").click(function (e) {
|
||||
e.preventDefault();
|
||||
stack = $(this).val() == "With stacking" ? true : null;
|
||||
plotWithOptions();
|
||||
});
|
||||
$(".graphControls input").click(function (e) {
|
||||
e.preventDefault();
|
||||
bars = $(this).val().indexOf("Bars") != -1;
|
||||
lines = $(this).val().indexOf("Lines") != -1;
|
||||
steps = $(this).val().indexOf("steps") != -1;
|
||||
plotWithOptions();
|
||||
});
|
||||
});
|
||||
|
||||
// graph chart
|
||||
|
||||
|
||||
$(function () {
|
||||
// data
|
||||
/*var data = [
|
||||
{ label: "Series1", data: 10},
|
||||
{ label: "Series2", data: 30},
|
||||
{ label: "Series3", data: 90},
|
||||
{ label: "Series4", data: 70},
|
||||
{ label: "Series5", data: 80},
|
||||
{ label: "Series6", data: 110}
|
||||
];*/
|
||||
/*var data = [
|
||||
{ label: "Series1", data: [[1,10]]},
|
||||
{ label: "Series2", data: [[1,30]]},
|
||||
{ label: "Series3", data: [[1,90]]},
|
||||
{ label: "Series4", data: [[1,70]]},
|
||||
{ label: "Series5", data: [[1,80]]},
|
||||
{ label: "Series6", data: [[1,0]]}
|
||||
];*/
|
||||
var data = [];
|
||||
var series = Math.floor(Math.random()*10)+1;
|
||||
for( var i = 0; i<series; i++)
|
||||
{
|
||||
data[i] = { label: "Series"+(i+1), data: Math.floor(Math.random()*100)+1 }
|
||||
}
|
||||
|
||||
|
||||
|
||||
// GRAPH 1
|
||||
$.plot($("#graph1"), data,
|
||||
{
|
||||
series: {
|
||||
pie: {
|
||||
show: true
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
show: false
|
||||
}
|
||||
});
|
||||
|
||||
// GRAPH 2
|
||||
$.plot($("#graph2"), data,
|
||||
{
|
||||
series: {
|
||||
pie: {
|
||||
show: true,
|
||||
radius: 1,
|
||||
label: {
|
||||
show: true,
|
||||
radius: 1,
|
||||
formatter: function(label, series){
|
||||
return '<div style="font-size:8pt;text-align:center;padding:2px;color:white;">'+label+'<br/>'+Math.round(series.percent)+'%</div>';
|
||||
},
|
||||
background: { opacity: 0.8 }
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
show: false
|
||||
}
|
||||
});
|
||||
|
||||
// GRAPH 3
|
||||
$.plot($("#graph3"), data,
|
||||
{
|
||||
series: {
|
||||
pie: {
|
||||
show: true,
|
||||
radius: 1,
|
||||
label: {
|
||||
show: true,
|
||||
radius: 3/4,
|
||||
formatter: function(label, series){
|
||||
return '<div style="font-size:8pt;text-align:center;padding:2px;color:white;">'+label+'<br/>'+Math.round(series.percent)+'%</div>';
|
||||
},
|
||||
background: { opacity: 0.5 }
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
show: false
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// DONUT
|
||||
$.plot($("#donut"), data,
|
||||
{
|
||||
series: {
|
||||
pie: {
|
||||
innerRadius: 0.5,
|
||||
show: true
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
function pieHover(event, pos, obj)
|
||||
{
|
||||
if (!obj)
|
||||
return;
|
||||
percent = parseFloat(obj.series.percent).toFixed(2);
|
||||
$("#hover").html('<span style="font-weight: bold; color: '+obj.series.color+'">'+obj.series.label+' ('+percent+'%)</span>');
|
||||
}
|
||||
|
||||
function pieClick(event, pos, obj)
|
||||
{
|
||||
if (!obj)
|
||||
return;
|
||||
percent = parseFloat(obj.series.percent).toFixed(2);
|
||||
alert(''+obj.series.label+': '+percent+'%');
|
||||
}
|
||||
|
||||
|
||||
}();
|
||||
191
wwwroot/BackendScript/js/form-component.js
Normal file
191
wwwroot/BackendScript/js/form-component.js
Normal file
@@ -0,0 +1,191 @@
|
||||
var Script = function () {
|
||||
|
||||
|
||||
//checkbox and radio btn
|
||||
|
||||
var d = document;
|
||||
var safari = (navigator.userAgent.toLowerCase().indexOf('safari') != -1) ? true : false;
|
||||
var gebtn = function(parEl,child) { return parEl.getElementsByTagName(child); };
|
||||
onload = function() {
|
||||
|
||||
var body = gebtn(d,'body')[0];
|
||||
body.className = body.className && body.className != '' ? body.className + ' has-js' : 'has-js';
|
||||
|
||||
if (!d.getElementById || !d.createTextNode) return;
|
||||
var ls = gebtn(d,'label');
|
||||
for (var i = 0; i < ls.length; i++) {
|
||||
var l = ls[i];
|
||||
if (l.className.indexOf('label_') == -1) continue;
|
||||
var inp = gebtn(l,'input')[0];
|
||||
if (l.className == 'label_check') {
|
||||
l.className = (safari && inp.checked == true || inp.checked) ? 'label_check c_on' : 'label_check c_off';
|
||||
l.onclick = check_it;
|
||||
};
|
||||
if (l.className == 'label_radio') {
|
||||
l.className = (safari && inp.checked == true || inp.checked) ? 'label_radio r_on' : 'label_radio r_off';
|
||||
l.onclick = turn_radio;
|
||||
};
|
||||
};
|
||||
};
|
||||
var check_it = function() {
|
||||
var inp = gebtn(this,'input')[0];
|
||||
if (this.className == 'label_check c_off' || (!safari && inp.checked)) {
|
||||
this.className = 'label_check c_on';
|
||||
if (safari) inp.click();
|
||||
} else {
|
||||
this.className = 'label_check c_off';
|
||||
if (safari) inp.click();
|
||||
};
|
||||
};
|
||||
var turn_radio = function() {
|
||||
var inp = gebtn(this,'input')[0];
|
||||
if (this.className == 'label_radio r_off' || inp.checked) {
|
||||
var ls = gebtn(this.parentNode,'label');
|
||||
for (var i = 0; i < ls.length; i++) {
|
||||
var l = ls[i];
|
||||
if (l.className.indexOf('label_radio') == -1) continue;
|
||||
l.className = 'label_radio r_off';
|
||||
};
|
||||
this.className = 'label_radio r_on';
|
||||
if (safari) inp.click();
|
||||
} else {
|
||||
this.className = 'label_radio r_off';
|
||||
if (safari) inp.click();
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
|
||||
// Tags Input
|
||||
$(".tagsinput").tagsInput();
|
||||
|
||||
// Switch
|
||||
$("[data-toggle='switch']").wrap('<div class="switch" />').parent().bootstrapSwitch();
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
//color picker
|
||||
|
||||
$('.cp1').colorpicker({
|
||||
format: 'hex'
|
||||
});
|
||||
$('.cp2').colorpicker();
|
||||
|
||||
|
||||
//date picker
|
||||
|
||||
if (top.location != location) {
|
||||
top.location.href = document.location.href ;
|
||||
}
|
||||
$(function(){
|
||||
window.prettyPrint && prettyPrint();
|
||||
$('#dp1').datepicker({
|
||||
format: 'mm-dd-yyyy'
|
||||
});
|
||||
$('#dp2').datepicker();
|
||||
$('#dp3').datepicker();
|
||||
$('#dp3').datepicker();
|
||||
$('#dpYears').datepicker();
|
||||
$('#dpMonths').datepicker();
|
||||
|
||||
|
||||
var startDate = new Date(2012,1,20);
|
||||
var endDate = new Date(2012,1,25);
|
||||
$('#dp4').datepicker()
|
||||
.on('changeDate', function(ev){
|
||||
if (ev.date.valueOf() > endDate.valueOf()){
|
||||
$('#alert').show().find('strong').text('The start date can not be greater then the end date');
|
||||
} else {
|
||||
$('#alert').hide();
|
||||
startDate = new Date(ev.date);
|
||||
$('#startDate').text($('#dp4').data('date'));
|
||||
}
|
||||
$('#dp4').datepicker('hide');
|
||||
});
|
||||
$('#dp5').datepicker()
|
||||
.on('changeDate', function(ev){
|
||||
if (ev.date.valueOf() < startDate.valueOf()){
|
||||
$('#alert').show().find('strong').text('The end date can not be less then the start date');
|
||||
} else {
|
||||
$('#alert').hide();
|
||||
endDate = new Date(ev.date);
|
||||
$('#endDate').text($('#dp5').data('date'));
|
||||
}
|
||||
$('#dp5').datepicker('hide');
|
||||
});
|
||||
|
||||
// disabling dates
|
||||
var nowTemp = new Date();
|
||||
var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0);
|
||||
|
||||
var checkin = $('#dpd1').datepicker({
|
||||
onRender: function(date) {
|
||||
return date.valueOf() < now.valueOf() ? 'disabled' : '';
|
||||
}
|
||||
}).on('changeDate', function(ev) {
|
||||
if (ev.date.valueOf() > checkout.date.valueOf()) {
|
||||
var newDate = new Date(ev.date)
|
||||
newDate.setDate(newDate.getDate() + 1);
|
||||
checkout.setValue(newDate);
|
||||
}
|
||||
checkin.hide();
|
||||
$('#dpd2')[0].focus();
|
||||
}).data('datepicker');
|
||||
var checkout = $('#dpd2').datepicker({
|
||||
onRender: function(date) {
|
||||
return date.valueOf() <= checkin.date.valueOf() ? 'disabled' : '';
|
||||
}
|
||||
}).on('changeDate', function(ev) {
|
||||
checkout.hide();
|
||||
}).data('datepicker');
|
||||
});
|
||||
|
||||
|
||||
|
||||
//daterange picker
|
||||
|
||||
$('#reservation').daterangepicker();
|
||||
|
||||
$('#reportrange').daterangepicker(
|
||||
{
|
||||
ranges: {
|
||||
'Today': ['today', 'today'],
|
||||
'Yesterday': ['yesterday', 'yesterday'],
|
||||
'Last 7 Days': [Date.today().add({ days: -6 }), 'today'],
|
||||
'Last 30 Days': [Date.today().add({ days: -29 }), 'today'],
|
||||
'This Month': [Date.today().moveToFirstDayOfMonth(), Date.today().moveToLastDayOfMonth()],
|
||||
'Last Month': [Date.today().moveToFirstDayOfMonth().add({ months: -1 }), Date.today().moveToFirstDayOfMonth().add({ days: -1 })]
|
||||
},
|
||||
opens: 'left',
|
||||
format: 'MM/dd/yyyy',
|
||||
separator: ' to ',
|
||||
startDate: Date.today().add({ days: -29 }),
|
||||
endDate: Date.today(),
|
||||
minDate: '01/01/2012',
|
||||
maxDate: '12/31/2013',
|
||||
locale: {
|
||||
applyLabel: 'Submit',
|
||||
fromLabel: 'From',
|
||||
toLabel: 'To',
|
||||
customRangeLabel: 'Custom Range',
|
||||
daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr','Sa'],
|
||||
monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||
firstDay: 1
|
||||
},
|
||||
showWeekNumbers: true,
|
||||
buttonClasses: ['btn-danger']
|
||||
},
|
||||
function(start, end) {
|
||||
$('#reportrange span').html(start.toString('MMMM d, yyyy') + ' - ' + end.toString('MMMM d, yyyy'));
|
||||
}
|
||||
);
|
||||
|
||||
//Set the initial state of the picker label
|
||||
$('#reportrange span').html(Date.today().add({ days: -29 }).toString('MMMM d, yyyy') + ' - ' + Date.today().toString('MMMM d, yyyy'));
|
||||
|
||||
|
||||
}();
|
||||
107
wwwroot/BackendScript/js/form-image-crop.js
Normal file
107
wwwroot/BackendScript/js/form-image-crop.js
Normal file
@@ -0,0 +1,107 @@
|
||||
var FormImageCrop = function () {
|
||||
|
||||
var demo1 = function() {
|
||||
$('#demo1').Jcrop();
|
||||
}
|
||||
|
||||
var demo2 = function() {
|
||||
var jcrop_api;
|
||||
|
||||
$('#demo2').Jcrop({
|
||||
onChange: showCoords,
|
||||
onSelect: showCoords,
|
||||
onRelease: clearCoords
|
||||
},function(){
|
||||
jcrop_api = this;
|
||||
});
|
||||
|
||||
$('#coords').on('change','input',function(e){
|
||||
var x1 = $('#x1').val(),
|
||||
x2 = $('#x2').val(),
|
||||
y1 = $('#y1').val(),
|
||||
y2 = $('#y2').val();
|
||||
jcrop_api.setSelect([x1,y1,x2,y2]);
|
||||
});
|
||||
|
||||
// Simple event handler, called from onChange and onSelect
|
||||
// event handlers, as per the Jcrop invocation above
|
||||
function showCoords(c)
|
||||
{
|
||||
$('#x1').val(c.x);
|
||||
$('#y1').val(c.y);
|
||||
$('#x2').val(c.x2);
|
||||
$('#y2').val(c.y2);
|
||||
$('#w').val(c.w);
|
||||
$('#h').val(c.h);
|
||||
};
|
||||
|
||||
function clearCoords()
|
||||
{
|
||||
$('#coords input').val('');
|
||||
};
|
||||
}
|
||||
|
||||
var demo3 = function() {
|
||||
// Create variables (in this scope) to hold the API and image size
|
||||
var jcrop_api,
|
||||
boundx,
|
||||
boundy,
|
||||
// Grab some information about the preview pane
|
||||
$preview = $('#preview-pane'),
|
||||
$pcnt = $('#preview-pane .preview-container'),
|
||||
$pimg = $('#preview-pane .preview-container img'),
|
||||
|
||||
xsize = $pcnt.width(),
|
||||
ysize = $pcnt.height();
|
||||
|
||||
console.log('init',[xsize,ysize]);
|
||||
|
||||
$('#demo3').Jcrop({
|
||||
onChange: updatePreview,
|
||||
onSelect: updatePreview,
|
||||
aspectRatio: xsize / ysize
|
||||
},function(){
|
||||
// Use the API to get the real image size
|
||||
var bounds = this.getBounds();
|
||||
boundx = bounds[0];
|
||||
boundy = bounds[1];
|
||||
// Store the API in the jcrop_api variable
|
||||
jcrop_api = this;
|
||||
// Move the preview into the jcrop container for css positioning
|
||||
$preview.appendTo(jcrop_api.ui.holder);
|
||||
});
|
||||
|
||||
function updatePreview(c)
|
||||
{
|
||||
if (parseInt(c.w) > 0)
|
||||
{
|
||||
var rx = xsize / c.w;
|
||||
var ry = ysize / c.h;
|
||||
|
||||
$pimg.css({
|
||||
width: Math.round(rx * boundx) + 'px',
|
||||
height: Math.round(ry * boundy) + 'px',
|
||||
marginLeft: '-' + Math.round(rx * c.x) + 'px',
|
||||
marginTop: '-' + Math.round(ry * c.y) + 'px'
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
//main function to initiate the module
|
||||
init: function () {
|
||||
|
||||
if (!jQuery().Jcrop) {;
|
||||
return;
|
||||
}
|
||||
|
||||
demo1();
|
||||
demo2();
|
||||
demo3();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}();
|
||||
83
wwwroot/BackendScript/js/form-validation-script.js
Normal file
83
wwwroot/BackendScript/js/form-validation-script.js
Normal file
@@ -0,0 +1,83 @@
|
||||
var Script = function () {
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function() { alert("submitted!"); }
|
||||
});
|
||||
|
||||
$().ready(function() {
|
||||
// validate the comment form when it is submitted
|
||||
$("#commentForm").validate();
|
||||
|
||||
// validate signup form on keyup and submit
|
||||
$("#signupForm").validate({
|
||||
rules: {
|
||||
firstname: "required",
|
||||
lastname: "required",
|
||||
username: {
|
||||
required: true,
|
||||
minlength: 2
|
||||
},
|
||||
password: {
|
||||
required: true,
|
||||
minlength: 5
|
||||
},
|
||||
confirm_password: {
|
||||
required: true,
|
||||
minlength: 5,
|
||||
equalTo: "#password"
|
||||
},
|
||||
email: {
|
||||
required: true,
|
||||
email: true
|
||||
},
|
||||
topic: {
|
||||
required: "#newsletter:checked",
|
||||
minlength: 2
|
||||
},
|
||||
agree: "required"
|
||||
},
|
||||
messages: {
|
||||
firstname: "Please enter your firstname",
|
||||
lastname: "Please enter your lastname",
|
||||
username: {
|
||||
required: "Please enter a username",
|
||||
minlength: "Your username must consist of at least 2 characters"
|
||||
},
|
||||
password: {
|
||||
required: "Please provide a password",
|
||||
minlength: "Your password must be at least 5 characters long"
|
||||
},
|
||||
confirm_password: {
|
||||
required: "Please provide a password",
|
||||
minlength: "Your password must be at least 5 characters long",
|
||||
equalTo: "Please enter the same password as above"
|
||||
},
|
||||
email: "Please enter a valid email address",
|
||||
agree: "Please accept our policy"
|
||||
}
|
||||
});
|
||||
|
||||
// propose username by combining first- and lastname
|
||||
$("#username").focus(function() {
|
||||
var firstname = $("#firstname").val();
|
||||
var lastname = $("#lastname").val();
|
||||
if(firstname && lastname && !this.value) {
|
||||
this.value = firstname + "." + lastname;
|
||||
}
|
||||
});
|
||||
|
||||
//code to hide topic selection, disable for demo
|
||||
var newsletter = $("#newsletter");
|
||||
// newsletter topics are optional, hide at first
|
||||
var inital = newsletter.is(":checked");
|
||||
var topics = $("#newsletter_topics")[inital ? "removeClass" : "addClass"]("gray");
|
||||
var topicInputs = topics.find("input").attr("disabled", !inital);
|
||||
// show when newsletter is checked
|
||||
newsletter.click(function() {
|
||||
topics[this.checked ? "removeClass" : "addClass"]("gray");
|
||||
topicInputs.attr("disabled", !this.checked);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
}();
|
||||
59
wwwroot/BackendScript/js/ga.js
Normal file
59
wwwroot/BackendScript/js/ga.js
Normal file
@@ -0,0 +1,59 @@
|
||||
(function(){var g=void 0,h=!0,i=null,l=!1,aa=encodeURIComponent,ba=Infinity,ca=setTimeout,da=isNaN,m=Math,ea=decodeURIComponent;function ha(a,b){return a.name=b}
|
||||
var n="push",ia="test",ja="slice",p="replace",ka="load",la="floor",ma="charAt",na="value",q="indexOf",oa="match",pa="port",qa="createElement",ra="path",r="name",u="host",v="toString",w="length",x="prototype",sa="clientWidth",y="split",ta="stopPropagation",ua="scope",z="location",va="search",A="protocol",wa="clientHeight",xa="href",B="substring",ya="apply",za="navigator",C="join",D="toLowerCase",E;function Aa(a,b){switch(b){case 0:return""+a;case 1:return 1*a;case 2:return!!a;case 3:return 1E3*a}return a}function Ba(a){return"function"==typeof a}function Ca(a){return a!=g&&-1<(a.constructor+"")[q]("String")}function F(a,b){return g==a||"-"==a&&!b||""==a}function Da(a){if(!a||""==a)return"";for(;a&&-1<" \n\r\t"[q](a[ma](0));)a=a[B](1);for(;a&&-1<" \n\r\t"[q](a[ma](a[w]-1));)a=a[B](0,a[w]-1);return a}function Ea(){return m.round(2147483647*m.random())}function Fa(){}
|
||||
function G(a,b){if(aa instanceof Function)return b?encodeURI(a):aa(a);H(68);return escape(a)}function I(a){a=a[y]("+")[C](" ");if(ea instanceof Function)try{return ea(a)}catch(b){H(17)}else H(68);return unescape(a)}var Ga=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)},Ha=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,!!d):a.detachEvent&&a.detachEvent("on"+b,c)};
|
||||
function Ia(a,b){if(a){var c=J[qa]("script");c.type="text/javascript";c.async=h;c.src=a;c.id=b;var d=J.getElementsByTagName("script")[0];d.parentNode.insertBefore(c,d);return c}}function K(a){return a&&0<a[w]?a[0]:""}function L(a){var b=a?a[w]:0;return 0<b?a[b-1]:""}var Ja=function(){this.prefix="ga.";this.R={}};Ja[x].set=function(a,b){this.R[this.prefix+a]=b};Ja[x].get=function(a){return this.R[this.prefix+a]};Ja[x].contains=function(a){return this.get(a)!==g};function Ka(a){0==a[q]("www.")&&(a=a[B](4));return a[D]()}function La(a,b){var c,d={url:a,protocol:"http",host:"",path:"",d:new Ja,anchor:""};if(!a)return d;c=a[q]("://");0<=c&&(d.protocol=a[B](0,c),a=a[B](c+3));c=a[va]("/|\\?|#");if(0<=c)d.host=a[B](0,c)[D](),a=a[B](c);else return d.host=a[D](),d;c=a[q]("#");0<=c&&(d.anchor=a[B](c+1),a=a[B](0,c));c=a[q]("?");0<=c&&(Na(d.d,a[B](c+1)),a=a[B](0,c));d.anchor&&b&&Na(d.d,d.anchor);a&&"/"==a[ma](0)&&(a=a[B](1));d.path=a;return d}
|
||||
function Oa(a,b){function c(a){var b=(a.hostname||"")[y](":")[0][D](),c=(a[A]||"")[D](),c=1*a[pa]||("http:"==c?80:"https:"==c?443:"");a=a.pathname||"";0==a[q]("/")||(a="/"+a);return[b,""+c,a]}var d=b||J[qa]("a");d.href=J[z][xa];var e=(d[A]||"")[D](),f=c(d),j=d[va]||"",k=e+"//"+f[0]+(f[1]?":"+f[1]:"");0==a[q]("//")?a=e+a:0==a[q]("/")?a=k+a:!a||0==a[q]("?")?a=k+f[2]+(a||j):0>a[y]("/")[0][q](":")&&(a=k+f[2][B](0,f[2].lastIndexOf("/"))+"/"+a);d.href=a;e=c(d);return{protocol:(d[A]||"")[D](),host:e[0],
|
||||
port:e[1],path:e[2],Oa:d[va]||"",url:a||""}}function Na(a,b){function c(b,c){a.contains(b)||a.set(b,[]);a.get(b)[n](c)}for(var d=Da(b)[y]("&"),e=0;e<d[w];e++)if(d[e]){var f=d[e][q]("=");0>f?c(d[e],"1"):c(d[e][B](0,f),d[e][B](f+1))}}function Pa(a,b){if(F(a)||"["==a[ma](0)&&"]"==a[ma](a[w]-1))return"-";var c=J.domain;return a[q](c+(b&&"/"!=b?b:""))==(0==a[q]("http://")?7:0==a[q]("https://")?8:0)?"0":a};var Qa=0;function Ra(a,b,c){!(1<=Qa)&&!(1<=100*m.random())&&(a=["utmt=error","utmerr="+a,"utmwv=5.3.9","utmn="+Ea(),"utmsp=1"],b&&a[n]("api="+b),c&&a[n]("msg="+G(c[B](0,100))),M.w&&a[n]("aip=1"),Sa(a[C]("&")),Qa++)};var Ta=0,Ua={};function N(a){return Va("x"+Ta++,a)}function Va(a,b){Ua[a]=!!b;return a}
|
||||
var Wa=N(),Xa=Va("anonymizeIp"),Ya=N(),$a=N(),ab=N(),bb=N(),O=N(),P=N(),cb=N(),db=N(),eb=N(),fb=N(),gb=N(),hb=N(),ib=N(),jb=N(),kb=N(),lb=N(),nb=N(),ob=N(),pb=N(),qb=N(),rb=N(),sb=N(),tb=N(),ub=N(),vb=N(),wb=N(),xb=N(),yb=N(),zb=N(),Ab=N(),Bb=N(),Cb=N(),Db=N(),Eb=N(),Fb=N(h),Gb=Va("currencyCode"),Hb=Va("page"),Ib=Va("title"),Jb=N(),Kb=N(),Lb=N(),Mb=N(),Nb=N(),Ob=N(),Pb=N(),Qb=N(),Rb=N(),Q=N(h),Sb=N(h),Tb=N(h),Ub=N(h),Vb=N(h),Wb=N(h),Zb=N(h),$b=N(h),ac=N(h),bc=N(h),cc=N(h),R=N(h),dc=N(h),ec=N(h),fc=
|
||||
N(h),gc=N(h),hc=N(h),ic=N(h),jc=N(h),S=N(h),kc=N(h),lc=N(h),mc=N(h),nc=N(h),oc=N(h),pc=N(h),qc=N(h),rc=Va("campaignParams"),sc=N(),tc=Va("hitCallback"),uc=N();N();var vc=N(),wc=N(),xc=N(),yc=N(),zc=N(),Ac=N(),Bc=N(),Cc=N(),Dc=N(),Ec=N(),Fc=N(),Gc=N(),Hc=N(),Ic=N();N();var Mc=N(),Nc=N(),Oc=N();function Pc(a){var b=this.plugins_;if(b)return b.get(a)}var T=function(a,b,c,d){a[b]=function(){try{return d!=g&&H(d),c[ya](this,arguments)}catch(a){throw Ra("exc",b,a&&a[r]),a;}}},Qc=function(a,b,c,d){U[x][a]=function(){try{return H(c),Aa(this.a.get(b),d)}catch(e){throw Ra("exc",a,e&&e[r]),e;}}},V=function(a,b,c,d,e){U[x][a]=function(f){try{H(c),e==g?this.a.set(b,Aa(f,d)):this.a.set(b,e)}catch(j){throw Ra("exc",a,j&&j[r]),j;}}};var Rc=RegExp(/(^|\.)doubleclick\.net$/i),Sc=function(a,b){return Rc[ia](J[z].hostname)?h:"/"!==b?l:(0==a[q]("www.google.")||0==a[q](".google.")||0==a[q]("google."))&&!(-1<a[q]("google.org"))?h:l},Tc=function(a){var b=a.get(bb),c=a.c(P,"/");Sc(b,c)&&a[ta]()};var Zc=function(){var a={},b={},c=new Uc;this.g=function(a,b){c.add(a,b)};var d=new Uc;this.e=function(a,b){d.add(a,b)};var e=l,f=l,j=h;this.T=function(){e=h};this.j=function(a){this[ka]();this.set(sc,a,h);a=new Vc(this);e=l;d.execute(this);e=h;b={};this.n();a.Ja()};this.load=function(){e&&(e=l,this.Ka(),Wc(this),f||(f=h,c.execute(this),Xc(this),Wc(this)),e=h)};this.n=function(){if(e)if(f)e=l,Xc(this),e=h;else this[ka]()};this.get=function(c){Ua[c]&&this[ka]();return b[c]!==g?b[c]:a[c]};this.set=
|
||||
function(c,d,e){Ua[c]&&this[ka]();e?b[c]=d:a[c]=d;Ua[c]&&this.n()};this.z=function(b){a[b]=this.b(b,0)+1};this.b=function(a,b){var c=this.get(a);return c==g||""===c?b:1*c};this.c=function(a,b){var c=this.get(a);return c==g?b:c+""};this.Ka=function(){if(j){var b=this.c(bb,""),c=this.c(P,"/");Sc(b,c)||(a[O]=a[hb]&&""!=b?Yc(b):1,j=l)}}};Zc[x].stopPropagation=function(){throw"aborted";};
|
||||
var Vc=function(a){var b=this;this.q=0;var c=a.get(tc);this.Ua=function(){0<b.q&&c&&(b.q--,b.q||c())};this.Ja=function(){!b.q&&c&&ca(c,10)};a.set(uc,b,h)};function $c(a,b){b=b||[];for(var c=0;c<b[w];c++){var d=b[c];if(""+a==d||0==d[q](a+"."))return d}return"-"}
|
||||
var bd=function(a,b,c){c=c?"":a.c(O,"1");b=b[y](".");if(6!==b[w]||ad(b[0],c))return l;c=1*b[1];var d=1*b[2],e=1*b[3],f=1*b[4];b=1*b[5];if(!(0<=c&&0<d&&0<e&&0<f&&0<=b))return l;a.set(Q,c);a.set(Vb,d);a.set(Wb,e);a.set(Zb,f);a.set($b,b);return h},cd=function(a){var b=a.get(Q),c=a.get(Vb),d=a.get(Wb),e=a.get(Zb),f=a.b($b,1);return[a.b(O,1),b!=g?b:"-",c||"-",d||"-",e||"-",f][C](".")},dd=function(a){return[a.b(O,1),a.b(cc,0),a.b(R,1),a.b(dc,0)][C](".")},ed=function(a,b,c){c=c?"":a.c(O,"1");var d=b[y](".");
|
||||
if(4!==d[w]||ad(d[0],c))d=i;a.set(cc,d?1*d[1]:0);a.set(R,d?1*d[2]:10);a.set(dc,d?1*d[3]:a.get(ab));return d!=i||!ad(b,c)},fd=function(a,b){var c=G(a.c(Tb,"")),d=[],e=a.get(Fb);if(!b&&e){for(var f=0;f<e[w];f++){var j=e[f];j&&1==j[ua]&&d[n](f+"="+G(j[r])+"="+G(j[na])+"=1")}0<d[w]&&(c+="|"+d[C]("^"))}return c?a.b(O,1)+"."+c:i},gd=function(a,b,c){c=c?"":a.c(O,"1");b=b[y](".");if(2>b[w]||ad(b[0],c))return l;b=b[ja](1)[C](".")[y]("|");0<b[w]&&a.set(Tb,I(b[0]));if(1>=b[w])return h;b=b[1][y](-1==b[1][q](",")?
|
||||
"^":",");for(c=0;c<b[w];c++){var d=b[c][y]("=");if(4==d[w]){var e={};ha(e,I(d[1]));e.value=I(d[2]);e.scope=1;a.get(Fb)[d[0]]=e}}return h},hd=function(a){var b;b=function(b,e){if(!F(a.get(b))){var f=a.c(b,""),f=f[y](" ")[C]("%20"),f=f[y]("+")[C]("%20");c[n](e+"="+f)}};var c=[];b(ic,"utmcid");b(nc,"utmcsr");b(S,"utmgclid");b(kc,"utmgclsrc");b(lc,"utmdclid");b(mc,"utmdsid");b(jc,"utmccn");b(oc,"utmcmd");b(pc,"utmctr");b(qc,"utmcct");return(b=c[C]("|"))?[a.b(O,1),a.b(ec,0),a.b(fc,1),a.b(gc,1),b][C]("."):
|
||||
""},id=function(a,b,c){c=c?"":a.c(O,"1");b=b[y](".");if(5>b[w]||ad(b[0],c))return a.set(ec,g),a.set(fc,g),a.set(gc,g),a.set(ic,g),a.set(jc,g),a.set(nc,g),a.set(oc,g),a.set(pc,g),a.set(qc,g),a.set(S,g),a.set(kc,g),a.set(lc,g),a.set(mc,g),l;a.set(ec,1*b[1]);a.set(fc,1*b[2]);a.set(gc,1*b[3]);var d=b[ja](4)[C](".");b=function(a){return(a=d[oa](a+"=(.*?)(?:\\|utm|$)"))&&2==a[w]?a[1]:g};c=function(b,c){c?(c=e?I(c):c[y]("%20")[C](" "),a.set(b,c)):a.set(b,g)};-1==d[q]("=")&&(d=I(d));var e="2"==b("utmcvr");
|
||||
c(ic,b("utmcid"));c(jc,b("utmccn"));c(nc,b("utmcsr"));c(oc,b("utmcmd"));c(pc,b("utmctr"));c(qc,b("utmcct"));c(S,b("utmgclid"));c(kc,b("utmgclsrc"));c(lc,b("utmdclid"));c(mc,b("utmdsid"));return h},ad=function(a,b){return b?a!=b:!/^\d+$/[ia](a)};var Uc=function(){this.filters=[]};Uc[x].add=function(a,b){this.filters[n]({name:a,s:b})};Uc[x].execute=function(a){try{for(var b=0;b<this.filters[w];b++)this.filters[b].s.call(W,a)}catch(c){}};function jd(a){100!=a.get(vb)&&a.get(Q)%1E4>=100*a.get(vb)&&a[ta]()}function kd(a){ld(a.get(Wa))&&a[ta]()}function md(a){"file:"==J[z][A]&&a[ta]()}function nd(a){a.get(Ib)||a.set(Ib,J.title,h);a.get(Hb)||a.set(Hb,J[z].pathname+J[z][va],h)};var od=new function(){var a=[];this.set=function(b){a[b]=h};this.Xa=function(){for(var b=[],c=0;c<a[w];c++)a[c]&&(b[m[la](c/6)]=b[m[la](c/6)]^1<<c%6);for(c=0;c<b[w];c++)b[c]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"[ma](b[c]||0);return b[C]("")+"~"}};function H(a){od.set(a)};var W=window,J=document,ld=function(a){var b=W._gaUserPrefs;return b&&b.ioo&&b.ioo()||!!a&&W["ga-disable-"+a]===h},pd=function(a){var b=[],c=J.cookie[y](";");a=RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$");for(var d=0;d<c[w];d++){var e=c[d][oa](a);e&&b[n](e[1])}return b},X=function(a,b,c,d,e,f){e=ld(e)?l:Sc(d,c)?l:h;if(e){if(b&&0<=W[za].userAgent[q]("Firefox")){b=b[p](/\n|\r/g," ");e=0;for(var j=b[w];e<j;++e){var k=b.charCodeAt(e)&255;if(10==k||13==k)b=b[B](0,e)+"?"+b[B](e+1)}}b&&2E3<b[w]&&(b=b[B](0,2E3),H(69));
|
||||
a=a+"="+b+"; path="+c+"; ";f&&(a+="expires="+(new Date((new Date).getTime()+f)).toGMTString()+"; ");d&&(a+="domain="+d+";");J.cookie=a}};var qd,rd,sd=function(){if(!qd){var a={},b=W[za],c=W.screen;a.Q=c?c.width+"x"+c.height:"-";a.P=c?c.colorDepth+"-bit":"-";a.language=(b&&(b.language||b.browserLanguage)||"-")[D]();a.javaEnabled=b&&b.javaEnabled()?1:0;a.characterSet=J.characterSet||J.charset||"-";try{var d;var e=J.documentElement,f=J.body,j=f&&f[sa]&&f[wa],b=[];e&&(e[sa]&&e[wa])&&("CSS1Compat"===J.compatMode||!j)?b=[e[sa],e[wa]]:j&&(b=[f[sa],f[wa]]);d=0>=b[0]||0>=b[1]?"":b[C]("x");a.Wa=d}catch(k){H(135)}qd=a}},td=function(){sd();for(var a=
|
||||
qd,b=W[za],a=b.appName+b.version+a.language+b.platform+b.userAgent+a.javaEnabled+a.Q+a.P+(J.cookie?J.cookie:"")+(J.referrer?J.referrer:""),b=a[w],c=W.history[w];0<c;)a+=c--^b++;return Yc(a)},ud=function(a){sd();var b=qd;a.set(Lb,b.Q);a.set(Mb,b.P);a.set(Pb,b.language);a.set(Qb,b.characterSet);a.set(Nb,b.javaEnabled);a.set(Rb,b.Wa);if(a.get(ib)&&a.get(jb)){if(!(b=rd)){var c,d,e;d="ShockwaveFlash";if((b=(b=W[za])?b.plugins:g)&&0<b[w])for(c=0;c<b[w]&&!e;c++)d=b[c],-1<d[r][q]("Shockwave Flash")&&(e=d.description[y]("Shockwave Flash ")[1]);
|
||||
else{d=d+"."+d;try{c=new ActiveXObject(d+".7"),e=c.GetVariable("$version")}catch(f){}if(!e)try{c=new ActiveXObject(d+".6"),e="WIN 6,0,21,0",c.AllowScriptAccess="always",e=c.GetVariable("$version")}catch(j){}if(!e)try{c=new ActiveXObject(d),e=c.GetVariable("$version")}catch(k){}e&&(e=e[y](" ")[1][y](","),e=e[0]+"."+e[1]+" r"+e[2])}b=e?e:"-"}rd=b;a.set(Ob,rd)}else a.set(Ob,"-")};var vd=function(a){if(Ba(a))this.s=a;else{var b=a[0],c=b.lastIndexOf(":"),d=b.lastIndexOf(".");this.h=this.i=this.l="";-1==c&&-1==d?this.h=b:-1==c&&-1!=d?(this.i=b[B](0,d),this.h=b[B](d+1)):-1!=c&&-1==d?(this.l=b[B](0,c),this.h=b[B](c+1)):c>d?(this.i=b[B](0,d),this.l=b[B](d+1,c),this.h=b[B](c+1)):(this.i=b[B](0,d),this.h=b[B](d+1));this.k=a[ja](1);this.Ma=!this.l&&"_require"==this.h;this.J=!this.i&&!this.l&&"_provide"==this.h}},Y=function(){T(Y[x],"push",Y[x][n],5);T(Y[x],"_getPlugin",Pc,121);T(Y[x],
|
||||
"_createAsyncTracker",Y[x].Sa,33);T(Y[x],"_getAsyncTracker",Y[x].Ta,34);this.I=new Ja;this.p=[]};E=Y[x];E.Na=function(a,b,c){var d=this.I.get(a);if(!Ba(d))return l;b.plugins_=b.plugins_||new Ja;b.plugins_.set(a,new d(b,c||{}));return h};E.push=function(a){var b=Z.Va[ya](this,arguments),b=Z.p.concat(b);for(Z.p=[];0<b[w]&&!Z.O(b[0])&&!(b.shift(),0<Z.p[w]););Z.p=Z.p.concat(b);return 0};E.Va=function(a){for(var b=[],c=0;c<arguments[w];c++)try{var d=new vd(arguments[c]);d.J?this.O(d):b[n](d)}catch(e){}return b};
|
||||
E.O=function(a){try{if(a.s)a.s[ya](W);else if(a.J)this.I.set(a.k[0],a.k[1]);else{var b="_gat"==a.i?M:"_gaq"==a.i?Z:M.u(a.i);if(a.Ma){if(!this.Na(a.k[0],b,a.k[2])){if(!a.Pa){var c=Oa(""+a.k[1]);var d=c[A],e=J[z][A];var f;if(f="https:"==d||d==e?h:"http:"!=d?l:"http:"==e){var j;a:{var k=Oa(J[z][xa]);if(!(c.Oa||0<=c.url[q]("?")||0<=c[ra][q]("://")||c[u]==k[u]&&c[pa]==k[pa]))for(var s="http:"==c[A]?80:443,t=M.S,b=0;b<t[w];b++)if(c[u]==t[b][0]&&(c[pa]||s)==(t[b][1]||s)&&0==c[ra][q](t[b][2])){j=h;break a}j=
|
||||
l}f=j&&!ld()}f&&(a.Pa=Ia(c.url))}return h}}else a.l&&(b=b.plugins_.get(a.l)),b[a.h][ya](b,a.k)}}catch(Za){}};E.Sa=function(a,b){return M.r(a,b||"")};E.Ta=function(a){return M.u(a)};var yd=function(){function a(a,b,c,d){g==f[a]&&(f[a]={});g==f[a][b]&&(f[a][b]=[]);f[a][b][c]=d}function b(a,b,c){if(g!=f[a]&&g!=f[a][b])return f[a][b][c]}function c(a,b){if(g!=f[a]&&g!=f[a][b]){f[a][b]=g;var c=h,d;for(d=0;d<j[w];d++)if(g!=f[a][j[d]]){c=l;break}c&&(f[a]=g)}}function d(a){var b="",c=l,d,e;for(d=0;d<j[w];d++)if(e=a[j[d]],g!=e){c&&(b+=j[d]);for(var c=[],f=g,ga=g,ga=0;ga<e[w];ga++)if(g!=e[ga]){f="";ga!=mb&&g==e[ga-1]&&(f+=ga[v]()+Za);for(var Cd=e[ga],Jc="",Yb=g,Kc=g,Lc=g,Yb=0;Yb<Cd[w];Yb++)Kc=
|
||||
Cd[ma](Yb),Lc=Ma[Kc],Jc+=g!=Lc?Lc:Kc;f+=Jc;c[n](f)}b+=k+c[C](t)+s;c=l}else c=h;return b}var e=this,f=[],j=["k","v"],k="(",s=")",t="*",Za="!",Ma={"'":"'0"};Ma[s]="'1";Ma[t]="'2";Ma[Za]="'3";var mb=1;e.Ra=function(a){return g!=f[a]};e.A=function(){for(var a="",b=0;b<f[w];b++)g!=f[b]&&(a+=b[v]()+d(f[b]));return a};e.Qa=function(a){if(a==g)return e.A();for(var b=a.A(),c=0;c<f[w];c++)g!=f[c]&&!a.Ra(c)&&(b+=c[v]()+d(f[c]));return b};e.f=function(b,c,d){if(!wd(d))return l;a(b,"k",c,d);return h};e.o=function(b,
|
||||
c,d){if(!xd(d))return l;a(b,"v",c,d[v]());return h};e.getKey=function(a,c){return b(a,"k",c)};e.N=function(a,c){return b(a,"v",c)};e.L=function(a){c(a,"k")};e.M=function(a){c(a,"v")};T(e,"_setKey",e.f,89);T(e,"_setValue",e.o,90);T(e,"_getKey",e.getKey,87);T(e,"_getValue",e.N,88);T(e,"_clearKey",e.L,85);T(e,"_clearValue",e.M,86)};function wd(a){return"string"==typeof a}function xd(a){return"number"!=typeof a&&(g==Number||!(a instanceof Number))||m.round(a)!=a||da(a)||a==ba?l:h};var zd=function(a){var b=W.gaGlobal;a&&!b&&(W.gaGlobal=b={});return b},Ad=function(){var a=zd(h).hid;a==i&&(a=Ea(),zd(h).hid=a);return a},Dd=function(a){a.set(Kb,Ad());var b=zd();if(b&&b.dh==a.get(O)){var c=b.sid;c&&("0"==c&&H(112),a.set(Zb,c),a.get(Sb)&&a.set(Wb,c));b=b.vid;a.get(Sb)&&b&&(b=b[y]("."),1*b[1]||H(112),a.set(Q,1*b[0]),a.set(Vb,1*b[1]))}};var Ed,Fd=function(a,b,c,d){var e=a.c(bb,""),f=a.c(P,"/");d=d!=g?d:a.b(cb,0);a=a.c(Wa,"");X(b,c,f,e,a,d)},Xc=function(a){var b=a.c(bb,"");a.b(O,1);var c=a.c(P,"/"),d=a.c(Wa,"");X("__utma",cd(a),c,b,d,a.get(cb));X("__utmb",dd(a),c,b,d,a.get(db));X("__utmc",""+a.b(O,1),c,b,d);var e=hd(a,h);e?X("__utmz",e,c,b,d,a.get(eb)):X("__utmz","",c,b,"",-1);(e=fd(a,l))?X("__utmv",e,c,b,d,a.get(cb)):X("__utmv","",c,b,"",-1)},Wc=function(a){var b=a.b(O,1);if(!bd(a,$c(b,pd("__utma"))))return a.set(Ub,h),l;var c=!ed(a,
|
||||
$c(b,pd("__utmb")));a.set(bc,c);id(a,$c(b,pd("__utmz")));gd(a,$c(b,pd("__utmv")));Ed=!c;return h},Gd=function(a){!Ed&&!(0<pd("__utmb")[w])&&(X("__utmd","1",a.c(P,"/"),a.c(bb,""),a.c(Wa,""),1E4),0==pd("__utmd")[w]&&a[ta]())};var Jd=function(a){a.get(Q)==g?Hd(a):a.get(Ub)&&!a.get(Mc)?Hd(a):a.get(bc)&&Id(a)},Kd=function(a){a.get(hc)&&!a.get(ac)&&(Id(a),a.set(fc,a.get($b)))},Hd=function(a){var b=a.get(ab);a.set(Sb,h);a.set(Q,Ea()^td(a)&2147483647);a.set(Tb,"");a.set(Vb,b);a.set(Wb,b);a.set(Zb,b);a.set($b,1);a.set(ac,h);a.set(cc,0);a.set(R,10);a.set(dc,b);a.set(Fb,[]);a.set(Ub,l);a.set(bc,l)},Id=function(a){a.set(Wb,a.get(Zb));a.set(Zb,a.get(ab));a.z($b);a.set(ac,h);a.set(cc,0);a.set(R,10);a.set(dc,a.get(ab));a.set(bc,l)};var Ld="daum:q eniro:search_word naver:query pchome:q images.google:q google:q yahoo:p yahoo:q msn:q bing:q aol:query aol:q lycos:q lycos:query ask:q netscape:query cnn:query about:terms mamma:q voila:rdata virgilio:qs live:q baidu:wd alice:qs yandex:text najdi:q seznam:q rakuten:qt biglobe:q goo.ne:MT wp:szukaj onet:qt yam:k kvasir:q ozu:q terra:query rambler:query conduit:q babylon:q search-results:q avg:q comcast:q incredimail:q startsiden:q go.mail.ru:q search.centrum.cz:q 360.cn:q".split(" "),
|
||||
Sd=function(a){if(a.get(kb)&&!a.get(Mc)){for(var b=!F(a.get(ic))||!F(a.get(nc))||!F(a.get(S))||!F(a.get(lc)),c={},d=0;d<Md[w];d++){var e=Md[d];c[e]=a.get(e)}(d=a.get(rc))?(H(149),e=new Ja,Na(e,d),d=e):d=La(J[z][xa],a.get(gb)).d;if(!("1"==L(d.get(a.get(ub)))&&b)){var f=d,j=function(b,c){c=c||"-";var d=L(f.get(a.get(b)));return d&&"-"!=d?I(d):c},d=L(f.get(a.get(nb)))||"-",e=L(f.get(a.get(qb)))||"-",k=L(f.get(a.get(pb)))||"-",s=L(f.get("gclsrc"))||"-",t=L(f.get("dclid"))||"-",Za=j(ob,"(not set)"),Ma=
|
||||
j(rb,"(not set)"),mb=j(sb),j=j(tb);if(F(d)&&F(k)&&F(t)&&F(e))d=l;else{var Xb=!F(k)&&!F(s),Xb=F(e)&&(!F(t)||Xb),Bd=F(mb);if(Xb||Bd){var fa=Nd(a),fa=La(fa,h);if((fa=Od(a,fa))&&!F(fa[1]&&!fa[2]))Xb&&(e=fa[0]),Bd&&(mb=fa[1])}Pd(a,d,e,k,s,t,Za,Ma,mb,j);d=h}d=d||Qd(a);!d&&(!b&&a.get(ac))&&(Pd(a,g,"(direct)",g,g,g,"(direct)","(none)",g,g),d=h);if(d&&(a.set(hc,Rd(a,c)),b="(direct)"==a.get(nc)&&"(direct)"==a.get(jc)&&"(none)"==a.get(oc),a.get(hc)||a.get(ac)&&!b))a.set(ec,a.get(ab)),a.set(fc,a.get($b)),a.z(gc)}}},
|
||||
Qd=function(a){var b=Nd(a),c=La(b,h);if(!(b!=g&&b!=i&&""!=b&&"0"!=b&&"-"!=b&&0<=b[q]("://"))||c&&-1<c[u][q]("google")&&c.d.contains("q")&&"cse"==c[ra])return l;if((b=Od(a,c))&&!b[2])return Pd(a,g,b[0],g,g,g,"(organic)","organic",b[1],g),h;if(b||!a.get(ac))return l;a:{for(var b=a.get(Bb),d=Ka(c[u]),e=0;e<b[w];++e)if(-1<d[q](b[e])){a=l;break a}Pd(a,g,d,g,g,g,"(referral)","referral",g,"/"+c[ra]);a=h}return a},Od=function(a,b){for(var c=a.get(zb),d=0;d<c[w];++d){var e=c[d][y](":");if(-1<b[u][q](e[0][D]())){var f=
|
||||
b.d.get(e[1]);if(f&&(f=K(f),!f&&-1<b[u][q]("google.")&&(f="(not provided)"),!e[3]||-1<b.url[q](e[3]))){a:{for(var c=f,d=a.get(Ab),c=I(c)[D](),j=0;j<d[w];++j)if(c==d[j]){c=h;break a}c=l}return[e[2]||e[0],f,c]}}}return i},Pd=function(a,b,c,d,e,f,j,k,s,t){a.set(ic,b);a.set(nc,c);a.set(S,d);a.set(kc,e);a.set(lc,f);a.set(jc,j);a.set(oc,k);a.set(pc,s);a.set(qc,t)},Md=[jc,ic,S,lc,nc,oc,pc,qc],Rd=function(a,b){function c(a){a=(""+a)[y]("+")[C]("%20");return a=a[y](" ")[C]("%20")}function d(c){var d=""+(a.get(c)||
|
||||
"");c=""+(b[c]||"");return 0<d[w]&&d==c}if(d(S)||d(lc))return H(131),l;for(var e=0;e<Md[w];e++){var f=Md[e],j=b[f]||"-",f=a.get(f)||"-";if(c(j)!=c(f))return h}return l},Td=RegExp(/^https:\/\/(www\.)?google(\.com?)?(\.[a-z]{2}t?)?\/?$/i),Nd=function(a){a=Pa(a.get(Jb),a.get(P));try{if(Td[ia](a))return H(136),a+"?q="}catch(b){H(145)}return a};var Ud,Vd,Wd=function(a){Ud=a.c(S,"");Vd=a.c(kc,"")},Xd=function(a){var b=a.c(S,""),c=a.c(kc,"");b!=Ud&&(-1<c[q]("ds")?a.set(mc,g):!F(Ud)&&-1<Vd[q]("ds")&&a.set(mc,Ud))};var Zd=function(a){Yd(a,J[z][xa])?(a.set(Mc,h),H(12)):a.set(Mc,l)},Yd=function(a,b){if(!a.get(fb))return l;var c=La(b,a.get(gb)),d=K(c.d.get("__utma")),e=K(c.d.get("__utmb")),f=K(c.d.get("__utmc")),j=K(c.d.get("__utmx")),k=K(c.d.get("__utmz")),s=K(c.d.get("__utmv")),c=K(c.d.get("__utmk"));if(Yc(""+d+e+f+j+k+s)!=c){d=I(d);e=I(e);f=I(f);j=I(j);f=$d(d+e+f+j,k,s,c);if(!f)return l;k=f[0];s=f[1]}if(!bd(a,d,h))return l;ed(a,e,h);id(a,k,h);gd(a,s,h);ae(a,j,h);return h},ce=function(a,b,c){var d;d=cd(a)||"-";
|
||||
var e=dd(a)||"-",f=""+a.b(O,1)||"-",j=be(a)||"-",k=hd(a,l)||"-";a=fd(a,l)||"-";var s=Yc(""+d+e+f+j+k+a),t=[];t[n]("__utma="+d);t[n]("__utmb="+e);t[n]("__utmc="+f);t[n]("__utmx="+j);t[n]("__utmz="+k);t[n]("__utmv="+a);t[n]("__utmk="+s);d=t[C]("&");if(!d)return b;e=b[q]("#");if(c)return 0>e?b+"#"+d:b+"&"+d;c="";f=b[q]("?");0<e&&(c=b[B](e),b=b[B](0,e));return 0>f?b+"?"+d+c:b+"&"+d+c},$d=function(a,b,c,d){for(var e=0;3>e;e++){for(var f=0;3>f;f++){if(d==Yc(a+b+c))return H(127),[b,c];var j=b[p](/ /g,"%20"),
|
||||
k=c[p](/ /g,"%20");if(d==Yc(a+j+k))return H(128),[j,k];j=j[p](/\+/g,"%20");k=k[p](/\+/g,"%20");if(d==Yc(a+j+k))return H(129),[j,k];try{var s=b[oa]("utmctr=(.*?)(?:\\|utm|$)");if(s&&2==s[w]&&(j=b[p](s[1],G(I(s[1]))),d==Yc(a+j+c)))return H(139),[j,c]}catch(t){}b=I(b)}c=I(c)}};var de="|",fe=function(a,b,c,d,e,f,j,k,s){var t=ee(a,b);t||(t={},a.get(Cb)[n](t));t.id_=b;t.affiliation_=c;t.total_=d;t.tax_=e;t.shipping_=f;t.city_=j;t.state_=k;t.country_=s;t.items_=t.items_||[];return t},ge=function(a,b,c,d,e,f,j){a=ee(a,b)||fe(a,b,"",0,0,0,"","","");var k;a:{if(a&&a.items_){k=a.items_;for(var s=0;s<k[w];s++)if(k[s].sku_==c){k=k[s];break a}}k=i}s=k||{};s.transId_=b;s.sku_=c;s.name_=d;s.category_=e;s.price_=f;s.quantity_=j;k||a.items_[n](s);return s},ee=function(a,b){for(var c=
|
||||
a.get(Cb),d=0;d<c[w];d++)if(c[d].id_==b)return c[d];return i};var he,ie=function(a){if(!he){var b;b=J[z].hash;var c=W[r],d=/^#?gaso=([^&]*)/;if(c=(b=(b=b&&b[oa](d)||c&&c[oa](d))?b[1]:K(pd("GASO")))&&b[oa](/^(?:!([-0-9a-z.]{1,40})!)?([-.\w]{10,1200})$/i))Fd(a,"GASO",""+b,0),M._gasoDomain=a.get(bb),M._gasoCPath=a.get(P),a=c[1],Ia("https://www.google.com/analytics/web/inpage/pub/inpage.js?"+(a?"prefix="+a+"&":"")+Ea(),"_gasojs");he=h}};var ae=function(a,b,c){c&&(b=I(b));c=a.b(O,1);b=b[y](".");!(2>b[w])&&/^\d+$/[ia](b[0])&&(b[0]=""+c,Fd(a,"__utmx",b[C]("."),g))},be=function(a,b){var c=$c(a.get(O),pd("__utmx"));"-"==c&&(c="");return b?G(c):c};var ke=function(a,b){var c=m.min(a.b(Dc,0),100);if(a.b(Q,0)%100>=c)return l;a:{if(c=(c=W.performance||W.webkitPerformance)&&c.timing){var d=c.navigationStart;if(0==d)H(133);else{c=[c.loadEventStart-d,c.domainLookupEnd-c.domainLookupStart,c.connectEnd-c.connectStart,c.responseStart-c.requestStart,c.responseEnd-c.responseStart,c.fetchStart-d,c.domInteractive-d,c.domContentLoadedEventStart-d];break a}}c=g}c||(W.top!=W?c=g:(d=(c=W.external)&&c.onloadT,c&&!c.isValidLoadTime&&(d=g),2147483648<d&&(d=g),
|
||||
0<d&&c.setPageReadyTime(),c=d==g?g:[d]));if(c==g)return l;d=c[0];if(d==g||d==ba||da(d))return l;if(0<d){a:{for(d=1;d<c[w];d++)if(da(c[d])||c[d]==ba||0>c[d]){d=l;break a}d=h}d?b(je(c)):b(je(c[ja](0,1)))}else Ga(W,"load",function(){ke(a,b)},l);return h},me=function(a,b,c,d){var e=new yd;e.f(14,90,b[B](0,500));e.f(14,91,a[B](0,150));e.f(14,92,""+le(c));d!=g&&e.f(14,93,d[B](0,500));e.o(14,90,c);return e},le=function(a){return da(a)||0>a?0:5E3>a?10*m[la](a/10):5E4>a?100*m[la](a/100):41E5>a?1E3*m[la](a/
|
||||
1E3):41E5},je=function(a){for(var b=new yd,c=0;c<a[w];c++)b.f(14,c+1,""+le(a[c])),b.o(14,c+1,a[c]);return b};var U=function(a,b,c){function d(a){return function(b){if((b=b.get(Nc)[a])&&b[w])for(var c={type:a,target:e,stopPropagation:function(){throw"aborted";}},d=0;d<b[w];d++)b[d].call(e,c)}}var e=this;this.a=new Zc;this.get=function(a){return this.a.get(a)};this.set=function(a,b,c){this.a.set(a,b,c)};this.set(Wa,b||"UA-XXXXX-X");this.set($a,a||"");this.set(Ya,c||"");this.set(ab,m.round((new Date).getTime()/1E3));this.set(P,"/");this.set(cb,63072E6);this.set(eb,15768E6);this.set(db,18E5);this.set(fb,l);
|
||||
this.set(yb,50);this.set(gb,l);this.set(hb,h);this.set(ib,h);this.set(jb,h);this.set(kb,h);this.set(lb,h);this.set(ob,"utm_campaign");this.set(nb,"utm_id");this.set(pb,"gclid");this.set(qb,"utm_source");this.set(rb,"utm_medium");this.set(sb,"utm_term");this.set(tb,"utm_content");this.set(ub,"utm_nooverride");this.set(vb,100);this.set(Dc,1);this.set(Ec,l);this.set(wb,"/__utm.gif");this.set(xb,1);this.set(Cb,[]);this.set(Fb,[]);this.set(zb,Ld[ja](0));this.set(Ab,[]);this.set(Bb,[]);this.B("auto");this.set(Jb,
|
||||
J.referrer);a=this.a;try{var f=La(J[z][xa],l),j=ea(L(f.d.get("utm_referrer")))||"";j&&a.set(Jb,j);var k=W.gaData&&W.gaData.expId;k||(k=ea(K(f.d.get("utm_expid")))||"");k&&a.set(Oc,""+k)}catch(s){H(146)}this.set(Nc,{hit:[],load:[]});this.a.g("0",Zd);this.a.g("1",Wd);this.a.g("2",Jd);this.a.g("3",Sd);this.a.g("4",Xd);this.a.g("5",Kd);this.a.g("6",d("load"));this.a.g("7",ie);this.a.e("A",kd);this.a.e("B",md);this.a.e("C",Jd);this.a.e("D",jd);this.a.e("E",Tc);this.a.e("F",ne);this.a.e("G",Gd);this.a.e("H",
|
||||
nd);this.a.e("I",ud);this.a.e("J",Dd);this.a.e("K",d("hit"));this.a.e("L",oe);this.a.e("M",pe);0===this.get(ab)&&H(111);this.a.T();this.H=g};E=U[x];E.m=function(){var a=this.get(Db);a||(a=new yd,this.set(Db,a));return a};E.La=function(a){for(var b in a){var c=a[b];a.hasOwnProperty(b)&&this.set(b,c,h)}};E.K=function(a){if(this.get(Ec))return l;var b=this,c=ke(this.a,function(c){b.set(Hb,a,h);b.t(c)});this.set(Ec,c);return c};
|
||||
E.Fa=function(a){a&&Ca(a)?(H(13),this.set(Hb,a,h)):"object"===typeof a&&a!==i&&this.La(a);this.H=a=this.get(Hb);this.a.j("page");this.K(a)};E.F=function(a,b,c,d,e){if(""==a||(!wd(a)||""==b||!wd(b))||c!=g&&!wd(c)||d!=g&&!xd(d))return l;this.set(wc,a,h);this.set(xc,b,h);this.set(yc,c,h);this.set(zc,d,h);this.set(vc,!!e,h);this.a.j("event");return h};
|
||||
E.Ha=function(a,b,c,d,e){var f=this.a.b(Dc,0);1*e===e&&(f=e);if(this.a.b(Q,0)%100>=f)return l;c=1*(""+c);if(""==a||(!wd(a)||""==b||!wd(b)||!xd(c)||da(c)||0>c||0>f||100<f)||d!=g&&(""==d||!wd(d)))return l;this.t(me(a,b,c,d));return h};E.Ga=function(a,b,c,d){if(!a||!b)return l;this.set(Ac,a,h);this.set(Bc,b,h);this.set(Cc,c||J[z][xa],h);d&&this.set(Hb,d,h);this.a.j("social");return h};E.Ea=function(){this.set(Dc,10);this.K(this.H)};E.Ia=function(){this.a.j("trans")};
|
||||
E.t=function(a){this.set(Eb,a,h);this.a.j("event")};E.ia=function(a){this.v();var b=this;return{_trackEvent:function(c,d,e){H(91);b.F(a,c,d,e)}}};E.ma=function(a){return this.get(a)};E.xa=function(a,b){if(a)if(Ca(a))this.set(a,b);else if("object"==typeof a)for(var c in a)a.hasOwnProperty(c)&&this.set(c,a[c])};E.addEventListener=function(a,b){var c=this.get(Nc)[a];c&&c[n](b)};E.removeEventListener=function(a,b){for(var c=this.get(Nc)[a],d=0;c&&d<c[w];d++)if(c[d]==b){c.splice(d,1);break}};E.qa=function(){return"5.3.9"};
|
||||
E.B=function(a){this.get(hb);a="auto"==a?Ka(J.domain):!a||"-"==a||"none"==a?"":a[D]();this.set(bb,a)};E.va=function(a){this.set(hb,!!a)};E.na=function(a,b){return ce(this.a,a,b)};E.link=function(a,b){if(this.a.get(fb)&&a){var c=ce(this.a,a,b);J[z].href=c}};E.ua=function(a,b){this.a.get(fb)&&(a&&a.action)&&(a.action=ce(this.a,a.action,b))};
|
||||
E.za=function(){this.v();var a=this.a,b=J.getElementById?J.getElementById("utmtrans"):J.utmform&&J.utmform.utmtrans?J.utmform.utmtrans:i;if(b&&b[na]){a.set(Cb,[]);for(var b=b[na][y]("UTM:"),c=0;c<b[w];c++){b[c]=Da(b[c]);for(var d=b[c][y](de),e=0;e<d[w];e++)d[e]=Da(d[e]);"T"==d[0]?fe(a,d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8]):"I"==d[0]&&ge(a,d[1],d[2],d[3],d[4],d[5],d[6])}}};E.$=function(a,b,c,d,e,f,j,k){return fe(this.a,a,b,c,d,e,f,j,k)};E.Y=function(a,b,c,d,e,f){return ge(this.a,a,b,c,d,e,f)};
|
||||
E.Aa=function(a){de=a||"|"};E.ea=function(){this.set(Cb,[])};E.wa=function(a,b,c,d){var e=this.a;if(0>=a||a>e.get(yb))a=l;else if(!b||!c||128<b[w]+c[w])a=l;else{1!=d&&2!=d&&(d=3);var f={};ha(f,b);f.value=c;f.scope=d;e.get(Fb)[a]=f;a=h}a&&this.a.n();return a};E.ka=function(a){this.a.get(Fb)[a]=g;this.a.n()};E.ra=function(a){return(a=this.a.get(Fb)[a])&&1==a[ua]?a[na]:g};E.Ca=function(a,b,c){this.m().f(a,b,c)};E.Da=function(a,b,c){this.m().o(a,b,c)};E.sa=function(a,b){return this.m().getKey(a,b)};
|
||||
E.ta=function(a,b){return this.m().N(a,b)};E.fa=function(a){this.m().L(a)};E.ga=function(a){this.m().M(a)};E.ja=function(){return new yd};E.W=function(a){a&&this.get(Ab)[n](a[D]())};E.ba=function(){this.set(Ab,[])};E.X=function(a){a&&this.get(Bb)[n](a[D]())};E.ca=function(){this.set(Bb,[])};E.Z=function(a,b,c,d,e){if(a&&b){a=[a,b[D]()][C](":");if(d||e)a=[a,d,e][C](":");d=this.get(zb);d.splice(c?0:d[w],0,a)}};E.da=function(){this.set(zb,[])};
|
||||
E.ha=function(a){this.a[ka]();var b=this.get(P),c=be(this.a);this.set(P,a);this.a.n();ae(this.a,c);this.set(P,b)};E.ya=function(a,b){if(0<a&&5>=a&&Ca(b)&&""!=b){var c=this.get(Fc)||[];c[a]=b;this.set(Fc,c)}};E.V=function(a){a=""+a;if(a[oa](/^[A-Za-z0-9]{1,5}$/)){var b=this.get(Ic)||[];b[n](a);this.set(Ic,b)}};E.v=function(){this.a[ka]()};E.Ba=function(a){a&&""!=a&&(this.set(Tb,a),this.a.j("var"))};var ne=function(a){"trans"!==a.get(sc)&&500<=a.b(cc,0)&&a[ta]();if("event"===a.get(sc)){var b=(new Date).getTime(),c=a.b(dc,0),d=a.b(Zb,0),c=m[la](1*((b-(c!=d?c:1E3*c))/1E3));0<c&&(a.set(dc,b),a.set(R,m.min(10,a.b(R,0)+c)));0>=a.b(R,0)&&a[ta]()}},pe=function(a){"event"===a.get(sc)&&a.set(R,m.max(0,a.b(R,10)-1))};var qe=function(){var a=[];this.add=function(b,c,d){d&&(c=G(""+c));a[n](b+"="+c)};this.toString=function(){return a[C]("&")}},re=function(a,b){(b||2!=a.get(xb))&&a.z(cc)},se=function(a,b){b.add("utmwv","5.3.9");b.add("utms",a.get(cc));b.add("utmn",Ea());var c=J[z].hostname;F(c)||b.add("utmhn",c,h);c=a.get(vb);100!=c&&b.add("utmsp",c,h)},te=function(a,b){b.add("utmac",Da(a.get(Wa)));a.get(Oc)&&b.add("utmxkey",a.get(Oc),h);a.get(vc)&&b.add("utmni",1);var c=a.get(Ic);c&&0<c[w]&&b.add("utmdid",c[C]("."));
|
||||
var c=function(a,b){b&&d[n](a+"="+b+";")},d=[];c("__utma",cd(a));c("__utmz",hd(a,l));c("__utmv",fd(a,h));c("__utmx",be(a));b.add("utmcc",d[C]("+"),h);a.get(Xa)!==l&&(a.get(Xa)||M.w)&&b.add("aip",1);b.add("utmu",od.Xa())},ue=function(a,b){for(var c=a.get(Fc)||[],d=[],e=1;e<c[w];e++)c[e]&&d[n](e+":"+G(c[e][p](/%/g,"%25")[p](/:/g,"%3A")[p](/,/g,"%2C")));d[w]&&b.add("utmpg",d[C](","))},ve=function(a,b){a.get(ib)&&(b.add("utmcs",a.get(Qb),h),b.add("utmsr",a.get(Lb)),a.get(Rb)&&b.add("utmvp",a.get(Rb)),
|
||||
b.add("utmsc",a.get(Mb)),b.add("utmul",a.get(Pb)),b.add("utmje",a.get(Nb)),b.add("utmfl",a.get(Ob),h))},we=function(a,b){a.get(lb)&&a.get(Ib)&&b.add("utmdt",a.get(Ib),h);b.add("utmhid",a.get(Kb));b.add("utmr",Pa(a.get(Jb),a.get(P)),h);b.add("utmp",G(a.get(Hb),h),h)},xe=function(a,b){for(var c=a.get(Db),d=a.get(Eb),e=a.get(Fb)||[],f=0;f<e[w];f++){var j=e[f];j&&(c||(c=new yd),c.f(8,f,j[r]),c.f(9,f,j[na]),3!=j[ua]&&c.f(11,f,""+j[ua]))}!F(a.get(wc))&&!F(a.get(xc),h)&&(c||(c=new yd),c.f(5,1,a.get(wc)),
|
||||
c.f(5,2,a.get(xc)),e=a.get(yc),e!=g&&c.f(5,3,e),e=a.get(zc),e!=g&&c.o(5,1,e));c?b.add("utme",c.Qa(d),h):d&&b.add("utme",d.A(),h)},ye=function(a,b,c){var d=new qe;re(a,c);se(a,d);d.add("utmt","tran");d.add("utmtid",b.id_,h);d.add("utmtst",b.affiliation_,h);d.add("utmtto",b.total_,h);d.add("utmttx",b.tax_,h);d.add("utmtsp",b.shipping_,h);d.add("utmtci",b.city_,h);d.add("utmtrg",b.state_,h);d.add("utmtco",b.country_,h);xe(a,d);ve(a,d);we(a,d);(b=a.get(Gb))&&d.add("utmcu",b,h);c||(ue(a,d),te(a,d));return d[v]()},
|
||||
ze=function(a,b,c){var d=new qe;re(a,c);se(a,d);d.add("utmt","item");d.add("utmtid",b.transId_,h);d.add("utmipc",b.sku_,h);d.add("utmipn",b.name_,h);d.add("utmiva",b.category_,h);d.add("utmipr",b.price_,h);d.add("utmiqt",b.quantity_,h);xe(a,d);ve(a,d);we(a,d);(b=a.get(Gb))&&d.add("utmcu",b,h);c||(ue(a,d),te(a,d));return d[v]()},Ae=function(a,b){var c=a.get(sc);if("page"==c)c=new qe,re(a,b),se(a,c),xe(a,c),ve(a,c),we(a,c),b||(ue(a,c),te(a,c)),c=[c[v]()];else if("event"==c)c=new qe,re(a,b),se(a,c),
|
||||
c.add("utmt","event"),xe(a,c),ve(a,c),we(a,c),b||(ue(a,c),te(a,c)),c=[c[v]()];else if("var"==c)c=new qe,re(a,b),se(a,c),c.add("utmt","var"),!b&&te(a,c),c=[c[v]()];else if("trans"==c)for(var c=[],d=a.get(Cb),e=0;e<d[w];++e){c[n](ye(a,d[e],b));for(var f=d[e].items_,j=0;j<f[w];++j)c[n](ze(a,f[j],b))}else"social"==c?b?c=[]:(c=new qe,re(a,b),se(a,c),c.add("utmt","social"),c.add("utmsn",a.get(Ac),h),c.add("utmsa",a.get(Bc),h),c.add("utmsid",a.get(Cc),h),xe(a,c),ve(a,c),we(a,c),ue(a,c),te(a,c),c=[c[v]()]):
|
||||
"feedback"==c?b?c=[]:(c=new qe,re(a,b),se(a,c),c.add("utmt","feedback"),c.add("utmfbid",a.get(Gc),h),c.add("utmfbpr",a.get(Hc),h),xe(a,c),ve(a,c),we(a,c),ue(a,c),te(a,c),c=[c[v]()]):c=[];return c},oe=function(a){var b,c=a.get(xb),d=a.get(uc),e=d&&d.Ua,f=0;if(0==c||2==c){var j=a.get(wb)+"?";b=Ae(a,h);for(var k=0,s=b[w];k<s;k++)Sa(b[k],e,j,h),f++}if(1==c||2==c){b=Ae(a);k=0;for(s=b[w];k<s;k++)try{Sa(b[k],e),f++}catch(t){t&&Ra(t[r],g,t.message)}}d&&(d.q=f)};var Be=function(){return"https:"==J[z][A]||M.G?"https://ssl.google-analytics.com":"http://www.google-analytics.com"},Ce=function(a){ha(this,"len");this.message=a+"-8192"},De=function(a){ha(this,"ff2post");this.message=a+"-2036"},Sa=function(a,b,c,d){b=b||Fa;if(d||2036>=a[w]){var e=b;b=c||Be()+"/__utm.gif?";var f=new Image(1,1);f.src=b+a;f.onload=function(){f.onload=i;f.onerror=i;e()};f.onerror=function(){f.onload=i;f.onerror=i;e()}}else if(8192>=a[w]){var j=b;if(0<=W[za].userAgent[q]("Firefox")&&
|
||||
![].reduce)throw new De(a[w]);var k;b=Be()+"/p/__utm.gif";if(c=W.XDomainRequest)k=new c,k.open("POST",b);else if(c=W.XMLHttpRequest)c=new c,"withCredentials"in c&&(k=c,k.open("POST",b,h),k.setRequestHeader("Content-Type","text/plain"));k?(k.onreadystatechange=function(){4==k.readyState&&(j(),k=i)},k.send(a),b=h):b=g;b||Ee(a,j)}else throw new Ce(a[w]);},Ee=function(a,b){if(J.body){a=aa(a);try{var c=J[qa]('<iframe name="'+a+'"></iframe>')}catch(d){c=J[qa]("iframe"),ha(c,a)}c.height="0";c.width="0";
|
||||
c.style.display="none";c.style.visibility="hidden";var e=J[z],e=Be()+"/u/post_iframe.html#"+aa(e[A]+"//"+e[u]+"/favicon.ico"),f=function(){c.src="";c.parentNode&&c.parentNode.removeChild(c)};Ga(W,"beforeunload",f);var j=l,k=0,s=function(){if(!j){try{if(9<k||c.contentWindow[z][u]==J[z][u]){j=h;f();Ha(W,"beforeunload",f);b();return}}catch(a){}k++;ca(s,200)}};Ga(c,"load",s);J.body.appendChild(c);c.src=e}else ca(function(){Ee(a,b)},100)};var $=function(){this.G=this.w=l;this.C={};this.D=[];this.U=0;this.S=[["www.google-analytics.com","","/plugins/"]];this._gasoCPath=this._gasoDomain=g;var a=function(a,c,d){T($[x],a,c,d)};a("_createTracker",$[x].r,55);a("_getTracker",$[x].oa,0);a("_getTrackerByName",$[x].u,51);a("_getTrackers",$[x].pa,130);a("_anonymizeIp",$[x].aa,16);a("_forceSSL",$[x].la,125);a("_getPlugin",Pc,120);a=function(a,c,d){T(U[x],a,c,d)};Qc("_getName",$a,58);Qc("_getAccount",Wa,64);Qc("_visitCode",Q,54);Qc("_getClientInfo",
|
||||
ib,53,1);Qc("_getDetectTitle",lb,56,1);Qc("_getDetectFlash",jb,65,1);Qc("_getLocalGifPath",wb,57);Qc("_getServiceMode",xb,59);V("_setClientInfo",ib,66,2);V("_setAccount",Wa,3);V("_setNamespace",Ya,48);V("_setAllowLinker",fb,11,2);V("_setDetectFlash",jb,61,2);V("_setDetectTitle",lb,62,2);V("_setLocalGifPath",wb,46,0);V("_setLocalServerMode",xb,92,g,0);V("_setRemoteServerMode",xb,63,g,1);V("_setLocalRemoteServerMode",xb,47,g,2);V("_setSampleRate",vb,45,1);V("_setCampaignTrack",kb,36,2);V("_setAllowAnchor",
|
||||
gb,7,2);V("_setCampNameKey",ob,41);V("_setCampContentKey",tb,38);V("_setCampIdKey",nb,39);V("_setCampMediumKey",rb,40);V("_setCampNOKey",ub,42);V("_setCampSourceKey",qb,43);V("_setCampTermKey",sb,44);V("_setCampCIdKey",pb,37);V("_setCookiePath",P,9,0);V("_setMaxCustomVariables",yb,0,1);V("_setVisitorCookieTimeout",cb,28,1);V("_setSessionCookieTimeout",db,26,1);V("_setCampaignCookieTimeout",eb,29,1);V("_setReferrerOverride",Jb,49);V("_setSiteSpeedSampleRate",Dc,132);a("_trackPageview",U[x].Fa,1);a("_trackEvent",
|
||||
U[x].F,4);a("_trackPageLoadTime",U[x].Ea,100);a("_trackSocial",U[x].Ga,104);a("_trackTrans",U[x].Ia,18);a("_sendXEvent",U[x].t,78);a("_createEventTracker",U[x].ia,74);a("_getVersion",U[x].qa,60);a("_setDomainName",U[x].B,6);a("_setAllowHash",U[x].va,8);a("_getLinkerUrl",U[x].na,52);a("_link",U[x].link,101);a("_linkByPost",U[x].ua,102);a("_setTrans",U[x].za,20);a("_addTrans",U[x].$,21);a("_addItem",U[x].Y,19);a("_clearTrans",U[x].ea,105);a("_setTransactionDelim",U[x].Aa,82);a("_setCustomVar",U[x].wa,
|
||||
10);a("_deleteCustomVar",U[x].ka,35);a("_getVisitorCustomVar",U[x].ra,50);a("_setXKey",U[x].Ca,83);a("_setXValue",U[x].Da,84);a("_getXKey",U[x].sa,76);a("_getXValue",U[x].ta,77);a("_clearXKey",U[x].fa,72);a("_clearXValue",U[x].ga,73);a("_createXObj",U[x].ja,75);a("_addIgnoredOrganic",U[x].W,15);a("_clearIgnoredOrganic",U[x].ba,97);a("_addIgnoredRef",U[x].X,31);a("_clearIgnoredRef",U[x].ca,32);a("_addOrganic",U[x].Z,14);a("_clearOrganic",U[x].da,70);a("_cookiePathCopy",U[x].ha,30);a("_get",U[x].ma,
|
||||
106);a("_set",U[x].xa,107);a("_addEventListener",U[x].addEventListener,108);a("_removeEventListener",U[x].removeEventListener,109);a("_addDevId",U[x].V);a("_getPlugin",Pc,122);a("_setPageGroup",U[x].ya,126);a("_trackTiming",U[x].Ha,124);a("_initData",U[x].v,2);a("_setVar",U[x].Ba,22);V("_setSessionTimeout",db,27,3);V("_setCookieTimeout",eb,25,3);V("_setCookiePersistence",cb,24,1);a("_setAutoTrackOutbound",Fa,79);a("_setTrackOutboundSubdomains",Fa,81);a("_setHrefExamineLimit",Fa,80)};E=$[x];
|
||||
E.oa=function(a,b){return this.r(a,g,b)};E.r=function(a,b,c){b&&H(23);c&&H(67);b==g&&(b="~"+M.U++);a=new U(b,a,c);M.C[b]=a;M.D[n](a);return a};E.u=function(a){a=a||"";return M.C[a]||M.r(g,a)};E.pa=function(){return M.D[ja](0)};E.aa=function(){this.w=h};E.la=function(){this.G=h};var Fe=function(a){if("prerender"==J.webkitVisibilityState)return l;a();return h};var M=new $;var Ge=W._gat;Ge&&Ba(Ge._getTracker)?M=Ge:W._gat=M;var Z=new Y;var He=function(){var a=W._gaq,b=l;if(a&&Ba(a[n])&&(b="[object Array]"==Object[x][v].call(Object(a)),!b)){Z=a;return}W._gaq=Z;b&&Z[n][ya](Z,a)};if(!Fe(He)){H(123);var Ie=l,Je=function(){!Ie&&Fe(He)&&(Ie=h,Ha(J,"webkitvisibilitychange",Je))};Ga(J,"webkitvisibilitychange",Je)};function Yc(a){var b=1,c=0,d;if(a){b=0;for(d=a[w]-1;0<=d;d--)c=a.charCodeAt(d),b=(b<<6&268435455)+c+(c<<14),c=b&266338304,b=0!=c?b^c>>21:b}return b};})();
|
||||
190
wwwroot/BackendScript/js/gmaps-scripts.js
Normal file
190
wwwroot/BackendScript/js/gmaps-scripts.js
Normal file
@@ -0,0 +1,190 @@
|
||||
var GoogleMaps = function () {
|
||||
|
||||
var mapBasic = function () {
|
||||
new GMaps({
|
||||
div: '#gmap_basic',
|
||||
lat: -12.043333,
|
||||
lng: -77.028333
|
||||
});
|
||||
}
|
||||
|
||||
var mapMarker = function () {
|
||||
var map = new GMaps({
|
||||
div: '#gmap_marker',
|
||||
lat: -12.043333,
|
||||
lng: -77.028333
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -12.043333,
|
||||
lng: -77.03,
|
||||
title: 'Lima',
|
||||
details: {
|
||||
database_id: 42,
|
||||
author: 'HPNeo'
|
||||
},
|
||||
click: function (e) {
|
||||
if (console.log) console.log(e);
|
||||
alert('You clicked in this marker');
|
||||
}
|
||||
});
|
||||
map.addMarker({
|
||||
lat: -12.042,
|
||||
lng: -77.028333,
|
||||
title: 'Marker with InfoWindow',
|
||||
infoWindow: {
|
||||
content: 'HTML Content!!!!'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var mapPolylines = function() {
|
||||
var map = new GMaps({
|
||||
div: '#gmap_polylines',
|
||||
lat: -12.043333,
|
||||
lng: -77.028333,
|
||||
click: function(e){
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
|
||||
path = [[-12.044012922866312, -77.02470665341184], [-12.05449279282314, -77.03024273281858], [-12.055122327623378, -77.03039293652341], [-12.075917129727586, -77.02764635449216], [-12.07635776902266, -77.02792530422971], [-12.076819390363665, -77.02893381481931], [-12.088527520066453, -77.0241058385925], [-12.090814532191756, -77.02271108990476]];
|
||||
|
||||
map.drawPolyline({
|
||||
path: path,
|
||||
strokeColor: '#131540',
|
||||
strokeOpacity: 0.6,
|
||||
strokeWeight: 6
|
||||
});
|
||||
}
|
||||
|
||||
var mapGeolocation = function() {
|
||||
|
||||
var map = new GMaps({
|
||||
div: '#gmap_geo',
|
||||
lat: -12.043333,
|
||||
lng: -77.028333
|
||||
});
|
||||
|
||||
GMaps.geolocate({
|
||||
success: function(position) {
|
||||
map.setCenter(position.coords.latitude, position.coords.longitude);
|
||||
},
|
||||
error: function(error) {
|
||||
alert('Geolocation failed: '+error.message);
|
||||
},
|
||||
not_supported: function() {
|
||||
alert("Your browser does not support geolocation");
|
||||
},
|
||||
always: function() {
|
||||
//alert("Geolocation Done!");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var mapGeocoding = function() {
|
||||
|
||||
var map = new GMaps({
|
||||
div: '#gmap_geocoding',
|
||||
lat: -12.043333,
|
||||
lng: -77.028333
|
||||
});
|
||||
|
||||
var handleAction = function() {
|
||||
var text = $.trim($('#gmap_geocoding_address').val());
|
||||
GMaps.geocode({
|
||||
address: text,
|
||||
callback: function(results, status){
|
||||
if(status=='OK'){
|
||||
var latlng = results[0].geometry.location;
|
||||
map.setCenter(latlng.lat(), latlng.lng());
|
||||
map.addMarker({
|
||||
lat: latlng.lat(),
|
||||
lng: latlng.lng()
|
||||
});
|
||||
App.scrollTo($('#gmap_geocoding'));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#gmap_geocoding_btn').click(function(e){
|
||||
e.preventDefault();
|
||||
handleAction();
|
||||
});
|
||||
|
||||
$("#gmap_geocoding_address").keypress(function(e){
|
||||
var keycode = (e.keyCode ? e.keyCode : e.which);
|
||||
if(keycode == '13') {
|
||||
e.preventDefault();
|
||||
handleAction();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
var mapPolygone = function() {
|
||||
var map = new GMaps({
|
||||
div: '#gmap_polygons',
|
||||
lat: -12.043333,
|
||||
lng: -77.028333
|
||||
});
|
||||
|
||||
var path = [[-12.040397656836609,-77.03373871559225], [-12.040248585302038,-77.03993927003302],
|
||||
[-12.050047116528843,-77.02448169303511],
|
||||
[-12.044804866577001,-77.02154422636042]];
|
||||
|
||||
var polygon = map.drawPolygon({
|
||||
paths: path,
|
||||
strokeColor: '#BBD8E9',
|
||||
strokeOpacity: 1,
|
||||
strokeWeight: 3,
|
||||
fillColor: '#BBD8E9',
|
||||
fillOpacity: 0.6
|
||||
});
|
||||
}
|
||||
|
||||
var mapRoutes = function() {
|
||||
|
||||
var map = new GMaps({
|
||||
div: '#gmap_routes',
|
||||
lat: -12.043333,
|
||||
lng: -77.028333
|
||||
});
|
||||
$('#gmap_routes_start').click(function(e){
|
||||
e.preventDefault();
|
||||
map.travelRoute({
|
||||
origin: [-12.044012922866312, -77.02470665341184],
|
||||
destination: [-12.090814532191756, -77.02271108990476],
|
||||
travelMode: 'driving',
|
||||
step: function(e){
|
||||
$('#gmap_routes_instructions').append('<li>'+e.instructions+'</li>');
|
||||
$('#gmap_routes_instructions li:eq('+e.step_number+')').delay(800*e.step_number).fadeIn(500, function(){
|
||||
map.setCenter(e.end_location.lat(), e.end_location.lng());
|
||||
map.drawPolyline({
|
||||
path: e.path,
|
||||
strokeColor: '#131540',
|
||||
strokeOpacity: 0.6,
|
||||
strokeWeight: 6
|
||||
});
|
||||
App.scrollTo($(this));
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
//main function to initiate map samples
|
||||
init: function () {
|
||||
mapBasic();
|
||||
mapMarker();
|
||||
mapGeolocation();
|
||||
mapGeocoding();
|
||||
mapPolylines();
|
||||
mapPolygone();
|
||||
mapRoutes();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}();
|
||||
1802
wwwroot/BackendScript/js/gmaps.js
Normal file
1802
wwwroot/BackendScript/js/gmaps.js
Normal file
File diff suppressed because it is too large
Load Diff
114
wwwroot/BackendScript/js/gritter.js
Normal file
114
wwwroot/BackendScript/js/gritter.js
Normal file
@@ -0,0 +1,114 @@
|
||||
var Gritter = function () {
|
||||
|
||||
$('#add-sticky').click(function(){
|
||||
|
||||
var unique_id = $.gritter.add({
|
||||
// (string | mandatory) the heading of the notification
|
||||
title: 'This is a sticky notice!',
|
||||
// (string | mandatory) the text inside the notification
|
||||
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et <a href="#" style="color:#ccc">magnis dis parturient</a> montes, nascetur ridiculus mus.',
|
||||
// (string | optional) the image to display on the left
|
||||
image: 'img/avatar-mini.jpg',
|
||||
// (bool | optional) if you want it to fade out on its own or just sit there
|
||||
sticky: true,
|
||||
// (int | optional) the time you want it to be alive for before fading out
|
||||
time: '',
|
||||
// (string | optional) the class name you want to apply to that specific message
|
||||
class_name: 'my-sticky-class'
|
||||
});
|
||||
|
||||
// You can have it return a unique id, this can be used to manually remove it later using
|
||||
/*
|
||||
setTimeout(function(){
|
||||
|
||||
$.gritter.remove(unique_id, {
|
||||
fade: true,
|
||||
speed: 'slow'
|
||||
});
|
||||
|
||||
}, 6000)
|
||||
*/
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
$('#add-regular').click(function(){
|
||||
|
||||
$.gritter.add({
|
||||
// (string | mandatory) the heading of the notification
|
||||
title: 'This is a regular notice!',
|
||||
// (string | mandatory) the text inside the notification
|
||||
text: 'This will fade out after a certain amount of time. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et <a href="#" style="color:#ccc">magnis dis parturient</a> montes, nascetur ridiculus mus.',
|
||||
// (string | optional) the image to display on the left
|
||||
image: 'img/avatar-mini.jpg',
|
||||
// (bool | optional) if you want it to fade out on its own or just sit there
|
||||
sticky: false,
|
||||
// (int | optional) the time you want it to be alive for before fading out
|
||||
time: ''
|
||||
});
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
$('#add-max').click(function(){
|
||||
|
||||
$.gritter.add({
|
||||
// (string | mandatory) the heading of the notification
|
||||
title: 'This is a notice with a max of 3 on screen at one time!',
|
||||
// (string | mandatory) the text inside the notification
|
||||
text: 'This will fade out after a certain amount of time. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et <a href="#" style="color:#ccc">magnis dis parturient</a> montes, nascetur ridiculus mus.',
|
||||
// (string | optional) the image to display on the left
|
||||
image: 'img/avatar-mini.jpg',
|
||||
// (bool | optional) if you want it to fade out on its own or just sit there
|
||||
sticky: false,
|
||||
// (function) before the gritter notice is opened
|
||||
before_open: function(){
|
||||
if($('.gritter-item-wrapper').length == 3)
|
||||
{
|
||||
// Returning false prevents a new gritter from opening
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
$('#add-without-image').click(function(){
|
||||
|
||||
$.gritter.add({
|
||||
// (string | mandatory) the heading of the notification
|
||||
title: 'This is a notice without an image!',
|
||||
// (string | mandatory) the text inside the notification
|
||||
text: 'This will fade out after a certain amount of time. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et <a href="#" style="color:#ccc">magnis dis parturient</a> montes, nascetur ridiculus mus.'
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#add-gritter-light').click(function(){
|
||||
|
||||
$.gritter.add({
|
||||
// (string | mandatory) the heading of the notification
|
||||
title: 'This is a light notification',
|
||||
// (string | mandatory) the text inside the notification
|
||||
text: 'Just add a "gritter-light" class_name to your $.gritter.add or globally to $.gritter.options.class_name',
|
||||
class_name: 'gritter-light'
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#remove-all").click(function(){
|
||||
|
||||
$.gritter.removeAll();
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}();
|
||||
135
wwwroot/BackendScript/js/hover-dropdown.js
Normal file
135
wwwroot/BackendScript/js/hover-dropdown.js
Normal file
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* Project: Twitter Bootstrap Hover Dropdown
|
||||
* Author: Cameron Spear
|
||||
* Contributors: Mattia Larentis
|
||||
*
|
||||
* Dependencies?: Twitter Bootstrap's Dropdown plugin
|
||||
*
|
||||
* A simple plugin to enable twitter bootstrap dropdowns to active on hover and provide a nice user experience.
|
||||
*
|
||||
* No license, do what you want. I'd love credit or a shoutout, though.
|
||||
*
|
||||
* http://cameronspear.com/blog/twitter-bootstrap-dropdown-on-hover-plugin/
|
||||
*/
|
||||
;(function($, window, undefined) {
|
||||
// outside the scope of the jQuery plugin to
|
||||
// keep track of all dropdowns
|
||||
var $allDropdowns = $();
|
||||
|
||||
// if instantlyCloseOthers is true, then it will instantly
|
||||
// shut other nav items when a new one is hovered over
|
||||
$.fn.dropdownHover = function(options) {
|
||||
|
||||
// the element we really care about
|
||||
// is the dropdown-toggle's parent
|
||||
$allDropdowns = $allDropdowns.add(this.parent());
|
||||
|
||||
return this.each(function() {
|
||||
var $this = $(this),
|
||||
$parent = $this.parent(),
|
||||
defaults = {
|
||||
delay: 500,
|
||||
instantlyCloseOthers: true
|
||||
},
|
||||
data = {
|
||||
delay: $(this).data('delay'),
|
||||
instantlyCloseOthers: $(this).data('close-others')
|
||||
},
|
||||
settings = $.extend(true, {}, defaults, options, data),
|
||||
timeout;
|
||||
|
||||
$parent.hover(function(event) {
|
||||
// so a neighbor can't open the dropdown
|
||||
if(!$parent.hasClass('open') && !$this.is(event.target)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if(shouldHover) {
|
||||
if(settings.instantlyCloseOthers === true)
|
||||
$allDropdowns.removeClass('open');
|
||||
|
||||
window.clearTimeout(timeout);
|
||||
$parent.addClass('open');
|
||||
}
|
||||
}, function() {
|
||||
if(shouldHover) {
|
||||
timeout = window.setTimeout(function() {
|
||||
$parent.removeClass('open');
|
||||
}, settings.delay);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// this helps with button groups!
|
||||
$this.hover(function() {
|
||||
if(shouldHover) {
|
||||
if(settings.instantlyCloseOthers === true)
|
||||
$allDropdowns.removeClass('open');
|
||||
|
||||
window.clearTimeout(timeout);
|
||||
$parent.addClass('open');
|
||||
}
|
||||
});
|
||||
|
||||
// handle submenus
|
||||
$parent.find('.dropdown-submenu').each(function(){
|
||||
var $this = $(this);
|
||||
var subTimeout;
|
||||
$this.hover(function() {
|
||||
if(shouldHover) {
|
||||
window.clearTimeout(subTimeout);
|
||||
$this.children('.dropdown-menu').show();
|
||||
// always close submenu siblings instantly
|
||||
$this.siblings().children('.dropdown-menu').hide();
|
||||
}
|
||||
}, function() {
|
||||
var $submenu = $this.children('.dropdown-menu');
|
||||
if(shouldHover) {
|
||||
subTimeout = window.setTimeout(function() {
|
||||
$submenu.hide();
|
||||
}, settings.delay);
|
||||
} else {
|
||||
// emulate Twitter Bootstrap's default behavior
|
||||
$submenu.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// helper variables to guess if they are using a mouse
|
||||
var shouldHover = false,
|
||||
mouse_info = {
|
||||
hits: 0,
|
||||
x: null,
|
||||
y: null
|
||||
};
|
||||
$(document).ready(function() {
|
||||
// apply dropdownHover to all elements with the data-hover="dropdown" attribute
|
||||
$('[data-hover="dropdown"]').dropdownHover();
|
||||
|
||||
// if the mouse movements are "smooth" or there are more than 20, they probably have a real mouse
|
||||
$(document).mousemove(function(e){
|
||||
mouse_info.hits++;
|
||||
if (mouse_info.hits > 20 || (Math.abs(e.pageX - mouse_info.x) + Math.abs(e.pageY - mouse_info.y)) < 4) {
|
||||
$(this).unbind(e);
|
||||
shouldHover = true;
|
||||
}
|
||||
else {
|
||||
mouse_info.x = e.pageX;
|
||||
mouse_info.y = e.pageY;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// for the submenu to close on delay, we need to override Bootstrap's CSS in this case
|
||||
var css = '.dropdown-submenu:hover>.dropdown-menu{display:none}';
|
||||
var style = document.createElement('style');
|
||||
style.type = 'text/css';
|
||||
if (style.styleSheet) {
|
||||
style.styleSheet.cssText = css;
|
||||
} else {
|
||||
style.appendChild(document.createTextNode(css));
|
||||
}
|
||||
$('head')[0].appendChild(style);
|
||||
})(jQuery, this);
|
||||
2
wwwroot/BackendScript/js/jquery-migrate.js
vendored
Normal file
2
wwwroot/BackendScript/js/jquery-migrate.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
wwwroot/BackendScript/js/jquery-ui-1.9.2.custom.min.js
vendored
Normal file
6
wwwroot/BackendScript/js/jquery-ui-1.9.2.custom.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
13
wwwroot/BackendScript/js/jquery-ui.min.js
vendored
Normal file
13
wwwroot/BackendScript/js/jquery-ui.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
96
wwwroot/BackendScript/js/jquery.cookie.js
Normal file
96
wwwroot/BackendScript/js/jquery.cookie.js
Normal file
@@ -0,0 +1,96 @@
|
||||
/**
|
||||
* Cookie plugin
|
||||
*
|
||||
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create a cookie with the given name and value and other optional parameters.
|
||||
*
|
||||
* @example $.cookie('the_cookie', 'the_value');
|
||||
* @desc Set the value of a cookie.
|
||||
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
||||
* @desc Create a cookie with all available options.
|
||||
* @example $.cookie('the_cookie', 'the_value');
|
||||
* @desc Create a session cookie.
|
||||
* @example $.cookie('the_cookie', null);
|
||||
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
||||
* used when the cookie was set.
|
||||
*
|
||||
* @param String name The name of the cookie.
|
||||
* @param String value The value of the cookie.
|
||||
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
||||
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
||||
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
||||
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
||||
* when the the browser exits.
|
||||
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
||||
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
||||
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
||||
* require a secure protocol (like HTTPS).
|
||||
* @type undefined
|
||||
*
|
||||
* @name $.cookie
|
||||
* @cat Plugins/Cookie
|
||||
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get the value of a cookie with the given name.
|
||||
*
|
||||
* @example $.cookie('the_cookie');
|
||||
* @desc Get the value of a cookie.
|
||||
*
|
||||
* @param String name The name of the cookie.
|
||||
* @return The value of the cookie.
|
||||
* @type String
|
||||
*
|
||||
* @name $.cookie
|
||||
* @cat Plugins/Cookie
|
||||
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
||||
*/
|
||||
jQuery.cookie = function(name, value, options) {
|
||||
if (typeof value != 'undefined') { // name and value given, set cookie
|
||||
options = options || {};
|
||||
if (value === null) {
|
||||
value = '';
|
||||
options.expires = -1;
|
||||
}
|
||||
var expires = '';
|
||||
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
|
||||
var date;
|
||||
if (typeof options.expires == 'number') {
|
||||
date = new Date();
|
||||
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
|
||||
} else {
|
||||
date = options.expires;
|
||||
}
|
||||
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
|
||||
}
|
||||
// CAUTION: Needed to parenthesize options.path and options.domain
|
||||
// in the following expressions, otherwise they evaluate to undefined
|
||||
// in the packed version for some reason...
|
||||
var path = options.path ? '; path=' + (options.path) : '';
|
||||
var domain = options.domain ? '; domain=' + (options.domain) : '';
|
||||
var secure = options.secure ? '; secure' : '';
|
||||
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
|
||||
} else { // only name given, get cookie
|
||||
var cookieValue = null;
|
||||
if (document.cookie && document.cookie != '') {
|
||||
var cookies = document.cookie.split(';');
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookie = jQuery.trim(cookies[i]);
|
||||
// Does this cookie string begin with the name we want?
|
||||
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
||||
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cookieValue;
|
||||
}
|
||||
};
|
||||
10
wwwroot/BackendScript/js/jquery.customSelect.min.js
vendored
Normal file
10
wwwroot/BackendScript/js/jquery.customSelect.min.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/*!
|
||||
* jquery.customSelect() - v0.4.1
|
||||
* http://adam.co/lab/jquery/customselect/
|
||||
* 2013-05-13
|
||||
*
|
||||
* Copyright 2013 Adam Coulombe
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @license http://www.gnu.org/licenses/gpl.html GPL2 License
|
||||
*/
|
||||
(function(a){a.fn.extend({customSelect:function(c){if(typeof document.body.style.maxHeight==="undefined"){return this}var e={customClass:"customSelect",mapClass:true,mapStyle:true},c=a.extend(e,c),d=c.customClass,f=function(h,k){var g=h.find(":selected"),j=k.children(":first"),i=g.html()||" ";j.html(i);if(g.attr("disabled")){k.addClass(b("DisabledOption"))}else{k.removeClass(b("DisabledOption"))}setTimeout(function(){k.removeClass(b("Open"));a(document).off("mouseup."+b("Open"))},60)},b=function(g){return d+g};return this.each(function(){var g=a(this),i=a("<span />").addClass(b("Inner")),h=a("<span />");g.after(h.append(i));h.addClass(d);if(c.mapClass){h.addClass(g.attr("class"))}if(c.mapStyle){h.attr("style",g.attr("style"))}g.addClass("hasCustomSelect").on("update",function(){f(g,h);var k=parseInt(g.outerWidth(),10)-(parseInt(h.outerWidth(),10)-parseInt(h.width(),10));h.css({display:"inline-block"});var j=h.outerHeight();if(g.attr("disabled")){h.addClass(b("Disabled"))}else{h.removeClass(b("Disabled"))}i.css({width:k,display:"inline-block"});g.css({"-webkit-appearance":"menulist-button",width:h.outerWidth(),position:"absolute",opacity:0,height:j,fontSize:h.css("font-size")})}).on("change",function(){h.addClass(b("Changed"));f(g,h)}).on("keyup",function(j){if(!h.hasClass(b("Open"))){g.blur();g.focus()}else{if(j.which==13||j.which==27){f(g,h)}}}).on("mousedown",function(j){h.removeClass(b("Changed"))}).on("mouseup",function(j){if(!h.hasClass(b("Open"))){if(a("."+b("Open")).not(h).length>0&&typeof InstallTrigger!=="undefined"){g.focus()}else{h.addClass(b("Open"));j.stopPropagation();a(document).one("mouseup."+b("Open"),function(k){if(k.target!=g.get(0)&&a.inArray(k.target,g.find("*").get())<0){g.blur()}else{f(g,h)}})}}}).focus(function(){h.removeClass(b("Changed")).addClass(b("Focus"))}).blur(function(){h.removeClass(b("Focus")+" "+b("Open"))}).hover(function(){h.addClass(b("Hover"))},function(){h.removeClass(b("Hover"))}).trigger("update")})}})})(jQuery);
|
||||
225
wwwroot/BackendScript/js/jquery.dcjqaccordion.2.7.js
Normal file
225
wwwroot/BackendScript/js/jquery.dcjqaccordion.2.7.js
Normal file
@@ -0,0 +1,225 @@
|
||||
/*
|
||||
* DC jQuery Vertical Accordion Menu - jQuery vertical accordion menu plugin
|
||||
* Copyright (c) 2011 Design Chemical
|
||||
*
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
*/
|
||||
|
||||
(function($){
|
||||
|
||||
$.fn.dcAccordion = function(options) {
|
||||
|
||||
//set default options
|
||||
var defaults = {
|
||||
classParent : 'dcjq-parent',
|
||||
classActive : 'active',
|
||||
classArrow : 'dcjq-icon',
|
||||
classCount : 'dcjq-count',
|
||||
classExpand : 'dcjq-current-parent',
|
||||
eventType : 'click',
|
||||
hoverDelay : 300,
|
||||
menuClose : true,
|
||||
autoClose : true,
|
||||
autoExpand : false,
|
||||
speed : 'slow',
|
||||
saveState : true,
|
||||
disableLink : true,
|
||||
showCount : false,
|
||||
// cookie : 'dcjq-accordion'
|
||||
};
|
||||
|
||||
//call in the default otions
|
||||
var options = $.extend(defaults, options);
|
||||
|
||||
this.each(function(options){
|
||||
|
||||
var obj = this;
|
||||
setUpAccordion();
|
||||
// if(defaults.saveState == true){
|
||||
// checkCookie(defaults.cookie, obj);
|
||||
// }
|
||||
if(defaults.autoExpand == true){
|
||||
$('li.'+defaults.classExpand+' > a').addClass(defaults.classActive);
|
||||
}
|
||||
resetAccordion();
|
||||
|
||||
if(defaults.eventType == 'hover'){
|
||||
|
||||
var config = {
|
||||
sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)
|
||||
interval: defaults.hoverDelay, // number = milliseconds for onMouseOver polling interval
|
||||
over: linkOver, // function = onMouseOver callback (REQUIRED)
|
||||
timeout: defaults.hoverDelay, // number = milliseconds delay before onMouseOut
|
||||
out: linkOut // function = onMouseOut callback (REQUIRED)
|
||||
};
|
||||
|
||||
$('li a',obj).hoverIntent(config);
|
||||
var configMenu = {
|
||||
sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)
|
||||
interval: 1000, // number = milliseconds for onMouseOver polling interval
|
||||
over: menuOver, // function = onMouseOver callback (REQUIRED)
|
||||
timeout: 1000, // number = milliseconds delay before onMouseOut
|
||||
out: menuOut // function = onMouseOut callback (REQUIRED)
|
||||
};
|
||||
|
||||
$(obj).hoverIntent(configMenu);
|
||||
|
||||
// Disable parent links
|
||||
if(defaults.disableLink == true){
|
||||
|
||||
$('li a',obj).click(function(e){
|
||||
if($(this).siblings('ul').length >0){
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$('li a',obj).click(function(e){
|
||||
|
||||
$activeLi = $(this).parent('li');
|
||||
$parentsLi = $activeLi.parents('li');
|
||||
$parentsUl = $activeLi.parents('ul');
|
||||
|
||||
// Prevent browsing to link if has child links
|
||||
if(defaults.disableLink == true){
|
||||
if($(this).siblings('ul').length >0){
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
// Auto close sibling menus
|
||||
if(defaults.autoClose == true){
|
||||
autoCloseAccordion($parentsLi, $parentsUl);
|
||||
}
|
||||
|
||||
if ($('> ul',$activeLi).is(':visible')){
|
||||
$('ul',$activeLi).slideUp(defaults.speed);
|
||||
$('a',$activeLi).removeClass(defaults.classActive);
|
||||
} else {
|
||||
$(this).siblings('ul').slideToggle(defaults.speed);
|
||||
$('> a',$activeLi).addClass(defaults.classActive);
|
||||
}
|
||||
|
||||
// // Write cookie if save state is on
|
||||
// if(defaults.saveState == true){
|
||||
// createCookie(defaults.cookie, obj);
|
||||
// }
|
||||
});
|
||||
}
|
||||
|
||||
// Set up accordion
|
||||
function setUpAccordion(){
|
||||
|
||||
$arrow = '<span class="'+defaults.classArrow+'"></span>';
|
||||
var classParentLi = defaults.classParent+'-li';
|
||||
$('> ul',obj).show();
|
||||
$('li',obj).each(function(){
|
||||
if($('> ul',this).length > 0){
|
||||
$(this).addClass(classParentLi);
|
||||
$('> a',this).addClass(defaults.classParent).append($arrow);
|
||||
}
|
||||
});
|
||||
$('> ul',obj).hide();
|
||||
if(defaults.showCount == true){
|
||||
$('li.'+classParentLi,obj).each(function(){
|
||||
if(defaults.disableLink == true){
|
||||
var getCount = parseInt($('ul a:not(.'+defaults.classParent+')',this).length);
|
||||
} else {
|
||||
var getCount = parseInt($('ul a',this).length);
|
||||
}
|
||||
$('> a',this).append(' <span class="'+defaults.classCount+'">'+getCount+'</span>');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function linkOver(){
|
||||
|
||||
$activeLi = $(this).parent('li');
|
||||
$parentsLi = $activeLi.parents('li');
|
||||
$parentsUl = $activeLi.parents('ul');
|
||||
|
||||
// Auto close sibling menus
|
||||
if(defaults.autoClose == true){
|
||||
autoCloseAccordion($parentsLi, $parentsUl);
|
||||
|
||||
}
|
||||
|
||||
if ($('> ul',$activeLi).is(':visible')){
|
||||
$('ul',$activeLi).slideUp(defaults.speed);
|
||||
$('a',$activeLi).removeClass(defaults.classActive);
|
||||
} else {
|
||||
$(this).siblings('ul').slideToggle(defaults.speed);
|
||||
$('> a',$activeLi).addClass(defaults.classActive);
|
||||
}
|
||||
|
||||
// Write cookie if save state is on
|
||||
if(defaults.saveState == true){
|
||||
createCookie(defaults.cookie, obj);
|
||||
}
|
||||
}
|
||||
|
||||
function linkOut(){
|
||||
}
|
||||
|
||||
function menuOver(){
|
||||
}
|
||||
|
||||
function menuOut(){
|
||||
|
||||
if(defaults.menuClose == true){
|
||||
$('ul',obj).slideUp(defaults.speed);
|
||||
// Reset active links
|
||||
$('a',obj).removeClass(defaults.classActive);
|
||||
createCookie(defaults.cookie, obj);
|
||||
}
|
||||
}
|
||||
|
||||
// Auto-Close Open Menu Items
|
||||
function autoCloseAccordion($parentsLi, $parentsUl){
|
||||
$('ul',obj).not($parentsUl).slideUp(defaults.speed);
|
||||
// Reset active links
|
||||
$('a',obj).removeClass(defaults.classActive);
|
||||
$('> a',$parentsLi).addClass(defaults.classActive);
|
||||
}
|
||||
// Reset accordion using active links
|
||||
function resetAccordion(){
|
||||
$('ul',obj).hide();
|
||||
$allActiveLi = $('a.'+defaults.classActive,obj);
|
||||
$allActiveLi.siblings('ul').show();
|
||||
}
|
||||
});
|
||||
|
||||
// Retrieve cookie value and set active items
|
||||
// function checkCookie(cookieId, obj){
|
||||
// var cookieVal = $.cookie(cookieId);
|
||||
// if(cookieVal != null){
|
||||
// // create array from cookie string
|
||||
// var activeArray = cookieVal.split(',');
|
||||
// $.each(activeArray, function(index,value){
|
||||
// var $cookieLi = $('li:eq('+value+')',obj);
|
||||
// $('> a',$cookieLi).addClass(defaults.classActive);
|
||||
// var $parentsLi = $cookieLi.parents('li');
|
||||
// $('> a',$parentsLi).addClass(defaults.classActive);
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
// Write cookie
|
||||
// function createCookie(cookieId, obj){
|
||||
// var activeIndex = [];
|
||||
// // Create array of active items index value
|
||||
// $('li a.'+defaults.classActive,obj).each(function(i){
|
||||
// var $arrayItem = $(this).parent('li');
|
||||
// var itemIndex = $('li',obj).index($arrayItem);
|
||||
// activeIndex.push(itemIndex);
|
||||
// });
|
||||
// // Store in cookie
|
||||
// $.cookie(cookieId, activeIndex, { path: '/' });
|
||||
// }
|
||||
};
|
||||
})(jQuery);
|
||||
1
wwwroot/BackendScript/js/jquery.dcjqaccordion.2.7.min.js
vendored
Normal file
1
wwwroot/BackendScript/js/jquery.dcjqaccordion.2.7.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function($){$.fn.dcAccordion=function(options){var defaults={classParent:'dcjq-parent',classActive:'active',classArrow:'dcjq-icon',classCount:'dcjq-count',classExpand:'dcjq-current-parent',eventType:'click',hoverDelay:300,menuClose:true,autoClose:true,autoExpand:false,speed:'slow',saveState:true,disableLink:true,showCount:false,cookie:'dcjq-accordion'};var options=$.extend(defaults,options);this.each(function(options){var obj=this;setUpAccordion();if(defaults.saveState==true){checkCookie(defaults.cookie,obj)}if(defaults.autoExpand==true){$('li.'+defaults.classExpand+' > a').addClass(defaults.classActive)}resetAccordion();if(defaults.eventType=='hover'){var config={sensitivity:2,interval:defaults.hoverDelay,over:linkOver,timeout:defaults.hoverDelay,out:linkOut};$('li a',obj).hoverIntent(config);var configMenu={sensitivity:2,interval:1000,over:menuOver,timeout:1000,out:menuOut};$(obj).hoverIntent(configMenu);if(defaults.disableLink==true){$('li a',obj).click(function(e){if($(this).siblings('ul').length>0){e.preventDefault()}})}}else{$('li a',obj).click(function(e){$activeLi=$(this).parent('li');$parentsLi=$activeLi.parents('li');$parentsUl=$activeLi.parents('ul');if(defaults.disableLink==true){if($(this).siblings('ul').length>0){e.preventDefault()}}if(defaults.autoClose==true){autoCloseAccordion($parentsLi,$parentsUl)}if($('> ul',$activeLi).is(':visible')){$('ul',$activeLi).slideUp(defaults.speed);$('a',$activeLi).removeClass(defaults.classActive)}else{$(this).siblings('ul').slideToggle(defaults.speed);$('> a',$activeLi).addClass(defaults.classActive)}if(defaults.saveState==true){createCookie(defaults.cookie,obj)}})}function setUpAccordion(){$arrow='<span class="'+defaults.classArrow+'"></span>';var classParentLi=defaults.classParent+'-li';$('> ul',obj).show();$('li',obj).each(function(){if($('> ul',this).length>0){$(this).addClass(classParentLi);$('> a',this).addClass(defaults.classParent).append($arrow)}});$('> ul',obj).hide();if(defaults.showCount==true){$('li.'+classParentLi,obj).each(function(){if(defaults.disableLink==true){var getCount=parseInt($('ul a:not(.'+defaults.classParent+')',this).length)}else{var getCount=parseInt($('ul a',this).length)}$('> a',this).append(' <span class="'+defaults.classCount+'">('+getCount+')</span>')})}}function linkOver(){$activeLi=$(this).parent('li');$parentsLi=$activeLi.parents('li');$parentsUl=$activeLi.parents('ul');if(defaults.autoClose==true){autoCloseAccordion($parentsLi,$parentsUl)}if($('> ul',$activeLi).is(':visible')){$('ul',$activeLi).slideUp(defaults.speed);$('a',$activeLi).removeClass(defaults.classActive)}else{$(this).siblings('ul').slideToggle(defaults.speed);$('> a',$activeLi).addClass(defaults.classActive)}if(defaults.saveState==true){createCookie(defaults.cookie,obj)}}function linkOut(){}function menuOver(){}function menuOut(){if(defaults.menuClose==true){$('ul',obj).slideUp(defaults.speed);$('a',obj).removeClass(defaults.classActive);createCookie(defaults.cookie,obj)}}function autoCloseAccordion($parentsLi,$parentsUl){$('ul',obj).not($parentsUl).slideUp(defaults.speed);$('a',obj).removeClass(defaults.classActive);$('> a',$parentsLi).addClass(defaults.classActive)}function resetAccordion(){$('ul',obj).hide();$allActiveLi=$('a.'+defaults.classActive,obj);$allActiveLi.siblings('ul').show()}});function checkCookie(cookieId,obj){var cookieVal=$.cookie(cookieId);if(cookieVal!=null){var activeArray=cookieVal.split(',');$.each(activeArray,function(index,value){var $cookieLi=$('li:eq('+value+')',obj);$('> a',$cookieLi).addClass(defaults.classActive);var $parentsLi=$cookieLi.parents('li');$('> a',$parentsLi).addClass(defaults.classActive)})}}function createCookie(cookieId,obj){var activeIndex=[];$('li a.'+defaults.classActive,obj).each(function(i){var $arrayItem=$(this).parent('li');var itemIndex=$('li',obj).index($arrayItem);activeIndex.push(itemIndex)});$.cookie(cookieId,activeIndex,{path:'/'})}}})(jQuery);
|
||||
2
wwwroot/BackendScript/js/jquery.js
vendored
Normal file
2
wwwroot/BackendScript/js/jquery.js
vendored
Normal file
File diff suppressed because one or more lines are too long
120
wwwroot/BackendScript/js/jquery.nicescroll.js
Normal file
120
wwwroot/BackendScript/js/jquery.nicescroll.js
Normal file
@@ -0,0 +1,120 @@
|
||||
/* jquery.nicescroll 3.6.8 InuYaksa*2015 MIT http://nicescroll.areaaperta.com */(function(f){"function"===typeof define&&define.amd?define(["jquery"],f):"object"===typeof exports?module.exports=f(require("jquery")):f(jQuery)})(function(f){var B=!1,F=!1,O=0,P=2E3,A=0,J=["webkit","ms","moz","o"],v=window.requestAnimationFrame||!1,w=window.cancelAnimationFrame||!1;if(!v)for(var Q in J){var G=J[Q];if(v=window[G+"RequestAnimationFrame"]){w=window[G+"CancelAnimationFrame"]||window[G+"CancelRequestAnimationFrame"];break}}var x=window.MutationObserver||window.WebKitMutationObserver||
|
||||
!1,K={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:24,touchbehavior:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},
|
||||
disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:function(){var f=document.getElementsByTagName("script"),f=f.length?f[f.length-
|
||||
1].src.split("?")[0]:"";return 0<f.split("/").length?f.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1},H=!1,R=function(){if(H)return H;var f=document.createElement("DIV"),c=f.style,k=navigator.userAgent,l=navigator.platform,d={haspointerlock:"pointerLockElement"in document||"webkitPointerLockElement"in document||"mozPointerLockElement"in document};d.isopera="opera"in window;d.isopera12=d.isopera&&"getUserMedia"in navigator;d.isoperamini="[object OperaMini]"===
|
||||
Object.prototype.toString.call(window.operamini);d.isie="all"in document&&"attachEvent"in f&&!d.isopera;d.isieold=d.isie&&!("msInterpolationMode"in c);d.isie7=d.isie&&!d.isieold&&(!("documentMode"in document)||7==document.documentMode);d.isie8=d.isie&&"documentMode"in document&&8==document.documentMode;d.isie9=d.isie&&"performance"in window&&9==document.documentMode;d.isie10=d.isie&&"performance"in window&&10==document.documentMode;d.isie11="msRequestFullscreen"in f&&11<=document.documentMode;d.isieedge12=
|
||||
navigator.userAgent.match(/Edge\/12\./);d.isieedge="msOverflowStyle"in f;d.ismodernie=d.isie11||d.isieedge;d.isie9mobile=/iemobile.9/i.test(k);d.isie9mobile&&(d.isie9=!1);d.isie7mobile=!d.isie9mobile&&d.isie7&&/iemobile/i.test(k);d.ismozilla="MozAppearance"in c;d.iswebkit="WebkitAppearance"in c;d.ischrome="chrome"in window;d.ischrome38=d.ischrome&&"touchAction"in c;d.ischrome22=!d.ischrome38&&d.ischrome&&d.haspointerlock;d.ischrome26=!d.ischrome38&&d.ischrome&&"transition"in c;d.cantouch="ontouchstart"in
|
||||
document.documentElement||"ontouchstart"in window;d.hasw3ctouch=(window.PointerEvent||!1)&&(0<navigator.MaxTouchPoints||0<navigator.msMaxTouchPoints);d.hasmstouch=!d.hasw3ctouch&&(window.MSPointerEvent||!1);d.ismac=/^mac$/i.test(l);d.isios=d.cantouch&&/iphone|ipad|ipod/i.test(l);d.isios4=d.isios&&!("seal"in Object);d.isios7=d.isios&&"webkitHidden"in document;d.isios8=d.isios&&"hidden"in document;d.isandroid=/android/i.test(k);d.haseventlistener="addEventListener"in f;d.trstyle=!1;d.hastransform=!1;
|
||||
d.hastranslate3d=!1;d.transitionstyle=!1;d.hastransition=!1;d.transitionend=!1;l=["transform","msTransform","webkitTransform","MozTransform","OTransform"];for(k=0;k<l.length;k++)if(void 0!==c[l[k]]){d.trstyle=l[k];break}d.hastransform=!!d.trstyle;d.hastransform&&(c[d.trstyle]="translate3d(1px,2px,3px)",d.hastranslate3d=/translate3d/.test(c[d.trstyle]));d.transitionstyle=!1;d.prefixstyle="";d.transitionend=!1;for(var l="transition webkitTransition msTransition MozTransition OTransition OTransition KhtmlTransition".split(" "),
|
||||
q=" -webkit- -ms- -moz- -o- -o -khtml-".split(" "),t="transitionend webkitTransitionEnd msTransitionEnd transitionend otransitionend oTransitionEnd KhtmlTransitionEnd".split(" "),k=0;k<l.length;k++)if(l[k]in c){d.transitionstyle=l[k];d.prefixstyle=q[k];d.transitionend=t[k];break}d.ischrome26&&(d.prefixstyle=q[1]);d.hastransition=d.transitionstyle;a:{k=["grab","-webkit-grab","-moz-grab"];if(d.ischrome&&!d.ischrome38||d.isie)k=[];for(l=0;l<k.length;l++)if(q=k[l],c.cursor=q,c.cursor==q){c=q;break a}c=
|
||||
"url(//patriciaportfolio.googlecode.com/files/openhand.cur),n-resize"}d.cursorgrabvalue=c;d.hasmousecapture="setCapture"in f;d.hasMutationObserver=!1!==x;return H=d},S=function(h,c){function k(){var b=a.doc.css(e.trstyle);return b&&"matrix"==b.substr(0,6)?b.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1}function l(){var b=a.win;if("zIndex"in b)return b.zIndex();for(;0<b.length&&9!=b[0].nodeType;){var g=b.css("zIndex");if(!isNaN(g)&&0!=g)return parseInt(g);b=b.parent()}return!1}function d(b,
|
||||
g,u){g=b.css(g);b=parseFloat(g);return isNaN(b)?(b=z[g]||0,u=3==b?u?a.win.outerHeight()-a.win.innerHeight():a.win.outerWidth()-a.win.innerWidth():1,a.isie8&&b&&(b+=1),u?b:0):b}function q(b,g,u,c){a._bind(b,g,function(a){a=a?a:window.event;var c={original:a,target:a.target||a.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==a.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){a.preventDefault?a.preventDefault():a.returnValue=!1;return!1},stopImmediatePropagation:function(){a.stopImmediatePropagation?
|
||||
a.stopImmediatePropagation():a.cancelBubble=!0}};"mousewheel"==g?(a.wheelDeltaX&&(c.deltaX=-.025*a.wheelDeltaX),a.wheelDeltaY&&(c.deltaY=-.025*a.wheelDeltaY),c.deltaY||c.deltaX||(c.deltaY=-.025*a.wheelDelta)):c.deltaY=a.detail;return u.call(b,c)},c)}function t(b,g,c){var d,e;0==b.deltaMode?(d=-Math.floor(a.opt.mousescrollstep/54*b.deltaX),e=-Math.floor(a.opt.mousescrollstep/54*b.deltaY)):1==b.deltaMode&&(d=-Math.floor(b.deltaX*a.opt.mousescrollstep),e=-Math.floor(b.deltaY*a.opt.mousescrollstep));
|
||||
g&&a.opt.oneaxismousemode&&0==d&&e&&(d=e,e=0,c&&(0>d?a.getScrollLeft()>=a.page.maxw:0>=a.getScrollLeft())&&(e=d,d=0));a.isrtlmode&&(d=-d);d&&(a.scrollmom&&a.scrollmom.stop(),a.lastdeltax+=d,a.debounced("mousewheelx",function(){var b=a.lastdeltax;a.lastdeltax=0;a.rail.drag||a.doScrollLeftBy(b)},15));if(e){if(a.opt.nativeparentscrolling&&c&&!a.ispage&&!a.zoomactive)if(0>e){if(a.getScrollTop()>=a.page.maxh)return!0}else if(0>=a.getScrollTop())return!0;a.scrollmom&&a.scrollmom.stop();a.lastdeltay+=e;
|
||||
a.synched("mousewheely",function(){var b=a.lastdeltay;a.lastdeltay=0;a.rail.drag||a.doScrollBy(b)},15)}b.stopImmediatePropagation();return b.preventDefault()}var a=this;this.version="3.6.8";this.name="nicescroll";this.me=c;this.opt={doc:f("body"),win:!1};f.extend(this.opt,K);this.opt.snapbackspeed=80;if(h)for(var r in a.opt)void 0!==h[r]&&(a.opt[r]=h[r]);a.opt.disablemutationobserver&&(x=!1);this.iddoc=(this.doc=a.opt.doc)&&this.doc[0]?this.doc[0].id||"":"";this.ispage=/^BODY|HTML/.test(a.opt.win?
|
||||
a.opt.win[0].nodeName:this.doc[0].nodeName);this.haswrapper=!1!==a.opt.win;this.win=a.opt.win||(this.ispage?f(window):this.doc);this.docscroll=this.ispage&&!this.haswrapper?f(window):this.win;this.body=f("body");this.iframe=this.isfixed=this.viewport=!1;this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName;this.istextarea="TEXTAREA"==this.win[0].nodeName;this.forcescreen=!1;this.canshowonmouseevent="scroll"!=a.opt.autohidemode;this.page=this.view=this.onzoomout=this.onzoomin=
|
||||
this.onscrollcancel=this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=this.onmousemove=this.onmouseup=this.onmousedown=!1;this.scroll={x:0,y:0};this.scrollratio={x:0,y:0};this.cursorheight=20;this.scrollvaluemax=0;if("auto"==this.opt.rtlmode){r=this.win[0]==window?this.body:this.win;var p=r.css("writing-mode")||r.css("-webkit-writing-mode")||r.css("-ms-writing-mode")||r.css("-moz-writing-mode");"horizontal-tb"==p||"lr-tb"==p||""==p?(this.isrtlmode=
|
||||
"rtl"==r.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==p||"tb"==p||"tb-rl"==p||"rl-tb"==p,this.isvertical="vertical-rl"==p||"tb"==p||"tb-rl"==p)}else this.isrtlmode=!0===this.opt.rtlmode,this.isvertical=!1;this.observerbody=this.observerremover=this.observer=this.scrollmom=this.scrollrunning=!1;do this.id="ascrail"+P++;while(document.getElementById(this.id));this.hasmousefocus=this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor=this.rail=
|
||||
!1;this.visibility=!0;this.hidden=this.locked=this.railslocked=!1;this.cursoractive=!0;this.wheelprevented=!1;this.overflowx=a.opt.overflowx;this.overflowy=a.opt.overflowy;this.nativescrollingarea=!1;this.checkarea=0;this.events=[];this.saved={};this.delaylist={};this.synclist={};this.lastdeltay=this.lastdeltax=0;this.detected=R();var e=f.extend({},this.detected);this.ishwscroll=(this.canhwscroll=e.hastransform&&a.opt.hwacceleration)&&a.haswrapper;this.hasreversehr=this.isrtlmode?this.isvertical?
|
||||
!(e.iswebkit||e.isie||e.isie11):!(e.iswebkit||e.isie&&!e.isie10&&!e.isie11):!1;this.istouchcapable=!1;e.cantouch||!e.hasw3ctouch&&!e.hasmstouch?!e.cantouch||e.isios||e.isandroid||!e.iswebkit&&!e.ismozilla||(this.istouchcapable=!0):this.istouchcapable=!0;a.opt.enablemouselockapi||(e.hasmousecapture=!1,e.haspointerlock=!1);this.debounced=function(b,g,c){a&&(a.delaylist[b]||(g.call(a),a.delaylist[b]={h:v(function(){a.delaylist[b].fn.call(a);a.delaylist[b]=!1},c)}),a.delaylist[b].fn=g)};var I=!1;this.synched=
|
||||
function(b,g){a.synclist[b]=g;(function(){I||(v(function(){if(a){I=!1;for(var b in a.synclist){var g=a.synclist[b];g&&g.call(a);a.synclist[b]=!1}}}),I=!0)})();return b};this.unsynched=function(b){a.synclist[b]&&(a.synclist[b]=!1)};this.css=function(b,g){for(var c in g)a.saved.css.push([b,c,b.css(c)]),b.css(c,g[c])};this.scrollTop=function(b){return void 0===b?a.getScrollTop():a.setScrollTop(b)};this.scrollLeft=function(b){return void 0===b?a.getScrollLeft():a.setScrollLeft(b)};var D=function(a,g,
|
||||
c,d,e,f,k){this.st=a;this.ed=g;this.spd=c;this.p1=d||0;this.p2=e||1;this.p3=f||0;this.p4=k||1;this.ts=(new Date).getTime();this.df=this.ed-this.st};D.prototype={B2:function(a){return 3*a*a*(1-a)},B3:function(a){return 3*a*(1-a)*(1-a)},B4:function(a){return(1-a)*(1-a)*(1-a)},getNow:function(){var a=1-((new Date).getTime()-this.ts)/this.spd,g=this.B2(a)+this.B3(a)+this.B4(a);return 0>a?this.ed:this.st+Math.round(this.df*g)},update:function(a,g){this.st=this.getNow();this.ed=a;this.spd=g;this.ts=(new Date).getTime();
|
||||
this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};e.hastranslate3d&&e.isios&&this.doc.css("-webkit-backface-visibility","hidden");this.getScrollTop=function(b){if(!b){if(b=k())return 16==b.length?-b[13]:-b[5];if(a.timerscroll&&a.timerscroll.bz)return a.timerscroll.bz.getNow()}return a.doc.translate.y};this.getScrollLeft=function(b){if(!b){if(b=k())return 16==b.length?-b[12]:-b[4];if(a.timerscroll&&a.timerscroll.bh)return a.timerscroll.bh.getNow()}return a.doc.translate.x};
|
||||
this.notifyScrollEvent=function(a){var g=document.createEvent("UIEvents");g.initUIEvent("scroll",!1,!0,window,1);g.niceevent=!0;a.dispatchEvent(g)};var y=this.isrtlmode?1:-1;e.hastranslate3d&&a.opt.enabletranslate3d?(this.setScrollTop=function(b,g){a.doc.translate.y=b;a.doc.translate.ty=-1*b+"px";a.doc.css(e.trstyle,"translate3d("+a.doc.translate.tx+","+a.doc.translate.ty+",0px)");g||a.notifyScrollEvent(a.win[0])},this.setScrollLeft=function(b,g){a.doc.translate.x=b;a.doc.translate.tx=b*y+"px";a.doc.css(e.trstyle,
|
||||
"translate3d("+a.doc.translate.tx+","+a.doc.translate.ty+",0px)");g||a.notifyScrollEvent(a.win[0])}):(this.setScrollTop=function(b,g){a.doc.translate.y=b;a.doc.translate.ty=-1*b+"px";a.doc.css(e.trstyle,"translate("+a.doc.translate.tx+","+a.doc.translate.ty+")");g||a.notifyScrollEvent(a.win[0])},this.setScrollLeft=function(b,g){a.doc.translate.x=b;a.doc.translate.tx=b*y+"px";a.doc.css(e.trstyle,"translate("+a.doc.translate.tx+","+a.doc.translate.ty+")");g||a.notifyScrollEvent(a.win[0])})}else this.getScrollTop=
|
||||
function(){return a.docscroll.scrollTop()},this.setScrollTop=function(b){return setTimeout(function(){a&&a.docscroll.scrollTop(b)},1)},this.getScrollLeft=function(){return a.hasreversehr?a.detected.ismozilla?a.page.maxw-Math.abs(a.docscroll.scrollLeft()):a.page.maxw-a.docscroll.scrollLeft():a.docscroll.scrollLeft()},this.setScrollLeft=function(b){return setTimeout(function(){if(a)return a.hasreversehr&&(b=a.detected.ismozilla?-(a.page.maxw-b):a.page.maxw-b),a.docscroll.scrollLeft(b)},1)};this.getTarget=
|
||||
function(a){return a?a.target?a.target:a.srcElement?a.srcElement:!1:!1};this.hasParent=function(a,g){if(!a)return!1;for(var c=a.target||a.srcElement||a||!1;c&&c.id!=g;)c=c.parentNode||!1;return!1!==c};var z={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:window.pageYOffset||document.documentElement.scrollTop,left:window.pageXOffset||document.documentElement.scrollLeft}};this.getOffset=function(){if(a.isfixed){var b=a.win.offset(),g=a.getDocumentScrollOffset();b.top-=g.top;
|
||||
b.left-=g.left;return b}b=a.win.offset();if(!a.viewport)return b;g=a.viewport.offset();return{top:b.top-g.top,left:b.left-g.left}};this.updateScrollBar=function(b){var g,c,e;if(a.ishwscroll)a.rail.css({height:a.win.innerHeight()-(a.opt.railpadding.top+a.opt.railpadding.bottom)}),a.railh&&a.railh.css({width:a.win.innerWidth()-(a.opt.railpadding.left+a.opt.railpadding.right)});else{var f=a.getOffset();g=f.top;c=f.left-(a.opt.railpadding.left+a.opt.railpadding.right);g+=d(a.win,"border-top-width",!0);
|
||||
c+=a.rail.align?a.win.outerWidth()-d(a.win,"border-right-width")-a.rail.width:d(a.win,"border-left-width");if(e=a.opt.railoffset)e.top&&(g+=e.top),e.left&&(c+=e.left);a.railslocked||a.rail.css({top:g,left:c,height:(b?b.h:a.win.innerHeight())-(a.opt.railpadding.top+a.opt.railpadding.bottom)});a.zoom&&a.zoom.css({top:g+1,left:1==a.rail.align?c-20:c+a.rail.width+4});if(a.railh&&!a.railslocked){g=f.top;c=f.left;if(e=a.opt.railhoffset)e.top&&(g+=e.top),e.left&&(c+=e.left);b=a.railh.align?g+d(a.win,"border-top-width",
|
||||
!0)+a.win.innerHeight()-a.railh.height:g+d(a.win,"border-top-width",!0);c+=d(a.win,"border-left-width");a.railh.css({top:b-(a.opt.railpadding.top+a.opt.railpadding.bottom),left:c,width:a.railh.width})}}};this.doRailClick=function(b,g,c){var d;a.railslocked||(a.cancelEvent(b),g?(g=c?a.doScrollLeft:a.doScrollTop,d=c?(b.pageX-a.railh.offset().left-a.cursorwidth/2)*a.scrollratio.x:(b.pageY-a.rail.offset().top-a.cursorheight/2)*a.scrollratio.y,g(d)):(g=c?a.doScrollLeftBy:a.doScrollBy,d=c?a.scroll.x:a.scroll.y,
|
||||
b=c?b.pageX-a.railh.offset().left:b.pageY-a.rail.offset().top,c=c?a.view.w:a.view.h,g(d>=b?c:-c)))};a.hasanimationframe=v;a.hascancelanimationframe=w;a.hasanimationframe?a.hascancelanimationframe||(w=function(){a.cancelAnimationFrame=!0}):(v=function(a){return setTimeout(a,15-Math.floor(+new Date/1E3)%16)},w=clearTimeout);this.init=function(){a.saved.css=[];if(e.isie7mobile||e.isoperamini)return!0;e.hasmstouch&&a.css(a.ispage?f("html"):a.win,{_touchaction:"none"});var b=e.ismodernie||e.isie10?{"-ms-overflow-style":"none"}:
|
||||
{"overflow-y":"hidden"};a.zindex="auto";a.zindex=a.ispage||"auto"!=a.opt.zindex?a.opt.zindex:l()||"auto";!a.ispage&&"auto"!=a.zindex&&a.zindex>A&&(A=a.zindex);a.isie&&0==a.zindex&&"auto"==a.opt.zindex&&(a.zindex="auto");if(!a.ispage||!e.cantouch&&!e.isieold&&!e.isie9mobile){var c=a.docscroll;a.ispage&&(c=a.haswrapper?a.win:a.doc);e.isie9mobile||a.css(c,b);a.ispage&&e.isie7&&("BODY"==a.doc[0].nodeName?a.css(f("html"),{"overflow-y":"hidden"}):"HTML"==a.doc[0].nodeName&&a.css(f("body"),b));!e.isios||
|
||||
a.ispage||a.haswrapper||a.css(f("body"),{"-webkit-overflow-scrolling":"touch"});var d=f(document.createElement("div"));d.css({position:"relative",top:0,"float":"right",width:a.opt.cursorwidth,height:0,"background-color":a.opt.cursorcolor,border:a.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":a.opt.cursorborderradius,"-moz-border-radius":a.opt.cursorborderradius,"border-radius":a.opt.cursorborderradius});d.hborder=parseFloat(d.outerHeight()-d.innerHeight());d.addClass("nicescroll-cursors");
|
||||
a.cursor=d;var m=f(document.createElement("div"));m.attr("id",a.id);m.addClass("nicescroll-rails nicescroll-rails-vr");var k,h,p=["left","right","top","bottom"],L;for(L in p)h=p[L],(k=a.opt.railpadding[h])?m.css("padding-"+h,k+"px"):a.opt.railpadding[h]=0;m.append(d);m.width=Math.max(parseFloat(a.opt.cursorwidth),d.outerWidth());m.css({width:m.width+"px",zIndex:a.zindex,background:a.opt.background,cursor:"default"});m.visibility=!0;m.scrollable=!0;m.align="left"==a.opt.railalign?0:1;a.rail=m;d=a.rail.drag=
|
||||
!1;!a.opt.boxzoom||a.ispage||e.isieold||(d=document.createElement("div"),a.bind(d,"click",a.doZoom),a.bind(d,"mouseenter",function(){a.zoom.css("opacity",a.opt.cursoropacitymax)}),a.bind(d,"mouseleave",function(){a.zoom.css("opacity",a.opt.cursoropacitymin)}),a.zoom=f(d),a.zoom.css({cursor:"pointer",zIndex:a.zindex,backgroundImage:"url("+a.opt.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),a.opt.dblclickzoom&&a.bind(a.win,"dblclick",a.doZoom),e.cantouch&&a.opt.gesturezoom&&
|
||||
(a.ongesturezoom=function(b){1.5<b.scale&&a.doZoomIn(b);.8>b.scale&&a.doZoomOut(b);return a.cancelEvent(b)},a.bind(a.win,"gestureend",a.ongesturezoom)));a.railh=!1;var n;a.opt.horizrailenabled&&(a.css(c,{overflowX:"hidden"}),d=f(document.createElement("div")),d.css({position:"absolute",top:0,height:a.opt.cursorwidth,width:0,backgroundColor:a.opt.cursorcolor,border:a.opt.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":a.opt.cursorborderradius,"-moz-border-radius":a.opt.cursorborderradius,
|
||||
"border-radius":a.opt.cursorborderradius}),e.isieold&&d.css("overflow","hidden"),d.wborder=parseFloat(d.outerWidth()-d.innerWidth()),d.addClass("nicescroll-cursors"),a.cursorh=d,n=f(document.createElement("div")),n.attr("id",a.id+"-hr"),n.addClass("nicescroll-rails nicescroll-rails-hr"),n.height=Math.max(parseFloat(a.opt.cursorwidth),d.outerHeight()),n.css({height:n.height+"px",zIndex:a.zindex,background:a.opt.background}),n.append(d),n.visibility=!0,n.scrollable=!0,n.align="top"==a.opt.railvalign?
|
||||
0:1,a.railh=n,a.railh.drag=!1);a.ispage?(m.css({position:"fixed",top:0,height:"100%"}),m.align?m.css({right:0}):m.css({left:0}),a.body.append(m),a.railh&&(n.css({position:"fixed",left:0,width:"100%"}),n.align?n.css({bottom:0}):n.css({top:0}),a.body.append(n))):(a.ishwscroll?("static"==a.win.css("position")&&a.css(a.win,{position:"relative"}),c="HTML"==a.win[0].nodeName?a.body:a.win,f(c).scrollTop(0).scrollLeft(0),a.zoom&&(a.zoom.css({position:"absolute",top:1,right:0,"margin-right":m.width+4}),c.append(a.zoom)),
|
||||
m.css({position:"absolute",top:0}),m.align?m.css({right:0}):m.css({left:0}),c.append(m),n&&(n.css({position:"absolute",left:0,bottom:0}),n.align?n.css({bottom:0}):n.css({top:0}),c.append(n))):(a.isfixed="fixed"==a.win.css("position"),c=a.isfixed?"fixed":"absolute",a.isfixed||(a.viewport=a.getViewport(a.win[0])),a.viewport&&(a.body=a.viewport,0==/fixed|absolute/.test(a.viewport.css("position"))&&a.css(a.viewport,{position:"relative"})),m.css({position:c}),a.zoom&&a.zoom.css({position:c}),a.updateScrollBar(),
|
||||
a.body.append(m),a.zoom&&a.body.append(a.zoom),a.railh&&(n.css({position:c}),a.body.append(n))),e.isios&&a.css(a.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),e.isie&&a.opt.disableoutline&&a.win.attr("hideFocus","true"),e.iswebkit&&a.opt.disableoutline&&a.win.css("outline","none"));!1===a.opt.autohidemode?(a.autohidedom=!1,a.rail.css({opacity:a.opt.cursoropacitymax}),a.railh&&a.railh.css({opacity:a.opt.cursoropacitymax})):!0===a.opt.autohidemode||"leave"===a.opt.autohidemode?
|
||||
(a.autohidedom=f().add(a.rail),e.isie8&&(a.autohidedom=a.autohidedom.add(a.cursor)),a.railh&&(a.autohidedom=a.autohidedom.add(a.railh)),a.railh&&e.isie8&&(a.autohidedom=a.autohidedom.add(a.cursorh))):"scroll"==a.opt.autohidemode?(a.autohidedom=f().add(a.rail),a.railh&&(a.autohidedom=a.autohidedom.add(a.railh))):"cursor"==a.opt.autohidemode?(a.autohidedom=f().add(a.cursor),a.railh&&(a.autohidedom=a.autohidedom.add(a.cursorh))):"hidden"==a.opt.autohidemode&&(a.autohidedom=!1,a.hide(),a.railslocked=
|
||||
!1);if(e.isie9mobile)a.scrollmom=new M(a),a.onmangotouch=function(){var b=a.getScrollTop(),c=a.getScrollLeft();if(b==a.scrollmom.lastscrolly&&c==a.scrollmom.lastscrollx)return!0;var g=b-a.mangotouch.sy,d=c-a.mangotouch.sx;if(0!=Math.round(Math.sqrt(Math.pow(d,2)+Math.pow(g,2)))){var e=0>g?-1:1,f=0>d?-1:1,u=+new Date;a.mangotouch.lazy&&clearTimeout(a.mangotouch.lazy);80<u-a.mangotouch.tm||a.mangotouch.dry!=e||a.mangotouch.drx!=f?(a.scrollmom.stop(),a.scrollmom.reset(c,b),a.mangotouch.sy=b,a.mangotouch.ly=
|
||||
b,a.mangotouch.sx=c,a.mangotouch.lx=c,a.mangotouch.dry=e,a.mangotouch.drx=f,a.mangotouch.tm=u):(a.scrollmom.stop(),a.scrollmom.update(a.mangotouch.sx-d,a.mangotouch.sy-g),a.mangotouch.tm=u,g=Math.max(Math.abs(a.mangotouch.ly-b),Math.abs(a.mangotouch.lx-c)),a.mangotouch.ly=b,a.mangotouch.lx=c,2<g&&(a.mangotouch.lazy=setTimeout(function(){a.mangotouch.lazy=!1;a.mangotouch.dry=0;a.mangotouch.drx=0;a.mangotouch.tm=0;a.scrollmom.doMomentum(30)},100)))}},m=a.getScrollTop(),n=a.getScrollLeft(),a.mangotouch=
|
||||
{sy:m,ly:m,dry:0,sx:n,lx:n,drx:0,lazy:!1,tm:0},a.bind(a.docscroll,"scroll",a.onmangotouch);else{if(e.cantouch||a.istouchcapable||a.opt.touchbehavior||e.hasmstouch){a.scrollmom=new M(a);a.ontouchstart=function(b){if(b.pointerType&&2!=b.pointerType&&"touch"!=b.pointerType)return!1;a.hasmoving=!1;if(!a.railslocked){var c;if(e.hasmstouch)for(c=b.target?b.target:!1;c;){var g=f(c).getNiceScroll();if(0<g.length&&g[0].me==a.me)break;if(0<g.length)return!1;if("DIV"==c.nodeName&&c.id==a.id)break;c=c.parentNode?
|
||||
c.parentNode:!1}a.cancelScroll();if((c=a.getTarget(b))&&/INPUT/i.test(c.nodeName)&&/range/i.test(c.type))return a.stopPropagation(b);!("clientX"in b)&&"changedTouches"in b&&(b.clientX=b.changedTouches[0].clientX,b.clientY=b.changedTouches[0].clientY);a.forcescreen&&(g=b,b={original:b.original?b.original:b},b.clientX=g.screenX,b.clientY=g.screenY);a.rail.drag={x:b.clientX,y:b.clientY,sx:a.scroll.x,sy:a.scroll.y,st:a.getScrollTop(),sl:a.getScrollLeft(),pt:2,dl:!1};if(a.ispage||!a.opt.directionlockdeadzone)a.rail.drag.dl=
|
||||
"f";else{var g=f(window).width(),d=f(window).height(),d=Math.max(0,Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)-d),g=Math.max(0,Math.max(document.body.scrollWidth,document.documentElement.scrollWidth)-g);a.rail.drag.ck=!a.rail.scrollable&&a.railh.scrollable?0<d?"v":!1:a.rail.scrollable&&!a.railh.scrollable?0<g?"h":!1:!1;a.rail.drag.ck||(a.rail.drag.dl="f")}a.opt.touchbehavior&&a.isiframe&&e.isie&&(g=a.win.position(),a.rail.drag.x+=g.left,a.rail.drag.y+=g.top);a.hasmoving=
|
||||
!1;a.lastmouseup=!1;a.scrollmom.reset(b.clientX,b.clientY);if(!e.cantouch&&!this.istouchcapable&&!b.pointerType){if(!c||!/INPUT|SELECT|TEXTAREA/i.test(c.nodeName))return!a.ispage&&e.hasmousecapture&&c.setCapture(),a.opt.touchbehavior?(c.onclick&&!c._onclick&&(c._onclick=c.onclick,c.onclick=function(b){if(a.hasmoving)return!1;c._onclick.call(this,b)}),a.cancelEvent(b)):a.stopPropagation(b);/SUBMIT|CANCEL|BUTTON/i.test(f(c).attr("type"))&&(pc={tg:c,click:!1},a.preventclick=pc)}}};a.ontouchend=function(b){if(!a.rail.drag)return!0;
|
||||
if(2==a.rail.drag.pt){if(b.pointerType&&2!=b.pointerType&&"touch"!=b.pointerType)return!1;a.scrollmom.doMomentum();a.rail.drag=!1;if(a.hasmoving&&(a.lastmouseup=!0,a.hideCursor(),e.hasmousecapture&&document.releaseCapture(),!e.cantouch))return a.cancelEvent(b)}else if(1==a.rail.drag.pt)return a.onmouseup(b)};var q=a.opt.touchbehavior&&a.isiframe&&!e.hasmousecapture;a.ontouchmove=function(b,c){if(!a.rail.drag||b.targetTouches&&a.opt.preventmultitouchscrolling&&1<b.targetTouches.length||b.pointerType&&
|
||||
2!=b.pointerType&&"touch"!=b.pointerType)return!1;if(2==a.rail.drag.pt){if(e.cantouch&&e.isios&&void 0===b.original)return!0;a.hasmoving=!0;a.preventclick&&!a.preventclick.click&&(a.preventclick.click=a.preventclick.tg.onclick||!1,a.preventclick.tg.onclick=a.onpreventclick);b=f.extend({original:b},b);"changedTouches"in b&&(b.clientX=b.changedTouches[0].clientX,b.clientY=b.changedTouches[0].clientY);if(a.forcescreen){var g=b;b={original:b.original?b.original:b};b.clientX=g.screenX;b.clientY=g.screenY}var d,
|
||||
g=d=0;q&&!c&&(d=a.win.position(),g=-d.left,d=-d.top);var u=b.clientY+d;d=u-a.rail.drag.y;var m=b.clientX+g,k=m-a.rail.drag.x,h=a.rail.drag.st-d;a.ishwscroll&&a.opt.bouncescroll?0>h?h=Math.round(h/2):h>a.page.maxh&&(h=a.page.maxh+Math.round((h-a.page.maxh)/2)):(0>h&&(u=h=0),h>a.page.maxh&&(h=a.page.maxh,u=0));var l;a.railh&&a.railh.scrollable&&(l=a.isrtlmode?k-a.rail.drag.sl:a.rail.drag.sl-k,a.ishwscroll&&a.opt.bouncescroll?0>l?l=Math.round(l/2):l>a.page.maxw&&(l=a.page.maxw+Math.round((l-a.page.maxw)/
|
||||
2)):(0>l&&(m=l=0),l>a.page.maxw&&(l=a.page.maxw,m=0)));g=!1;if(a.rail.drag.dl)g=!0,"v"==a.rail.drag.dl?l=a.rail.drag.sl:"h"==a.rail.drag.dl&&(h=a.rail.drag.st);else{d=Math.abs(d);var k=Math.abs(k),C=a.opt.directionlockdeadzone;if("v"==a.rail.drag.ck){if(d>C&&k<=.3*d)return a.rail.drag=!1,!0;k>C&&(a.rail.drag.dl="f",f("body").scrollTop(f("body").scrollTop()))}else if("h"==a.rail.drag.ck){if(k>C&&d<=.3*k)return a.rail.drag=!1,!0;d>C&&(a.rail.drag.dl="f",f("body").scrollLeft(f("body").scrollLeft()))}}a.synched("touchmove",
|
||||
function(){a.rail.drag&&2==a.rail.drag.pt&&(a.prepareTransition&&a.prepareTransition(0),a.rail.scrollable&&a.setScrollTop(h),a.scrollmom.update(m,u),a.railh&&a.railh.scrollable?(a.setScrollLeft(l),a.showCursor(h,l)):a.showCursor(h),e.isie10&&document.selection.clear())});e.ischrome&&a.istouchcapable&&(g=!1);if(g)return a.cancelEvent(b)}else if(1==a.rail.drag.pt)return a.onmousemove(b)}}a.onmousedown=function(b,c){if(!a.rail.drag||1==a.rail.drag.pt){if(a.railslocked)return a.cancelEvent(b);a.cancelScroll();
|
||||
a.rail.drag={x:b.clientX,y:b.clientY,sx:a.scroll.x,sy:a.scroll.y,pt:1,hr:!!c};var g=a.getTarget(b);!a.ispage&&e.hasmousecapture&&g.setCapture();a.isiframe&&!e.hasmousecapture&&(a.saved.csspointerevents=a.doc.css("pointer-events"),a.css(a.doc,{"pointer-events":"none"}));a.hasmoving=!1;return a.cancelEvent(b)}};a.onmouseup=function(b){if(a.rail.drag){if(1!=a.rail.drag.pt)return!0;e.hasmousecapture&&document.releaseCapture();a.isiframe&&!e.hasmousecapture&&a.doc.css("pointer-events",a.saved.csspointerevents);
|
||||
a.rail.drag=!1;a.hasmoving&&a.triggerScrollEnd();return a.cancelEvent(b)}};a.onmousemove=function(b){if(a.rail.drag){if(1==a.rail.drag.pt){if(e.ischrome&&0==b.which)return a.onmouseup(b);a.cursorfreezed=!0;a.hasmoving=!0;if(a.rail.drag.hr){a.scroll.x=a.rail.drag.sx+(b.clientX-a.rail.drag.x);0>a.scroll.x&&(a.scroll.x=0);var c=a.scrollvaluemaxw;a.scroll.x>c&&(a.scroll.x=c)}else a.scroll.y=a.rail.drag.sy+(b.clientY-a.rail.drag.y),0>a.scroll.y&&(a.scroll.y=0),c=a.scrollvaluemax,a.scroll.y>c&&(a.scroll.y=
|
||||
c);a.synched("mousemove",function(){a.rail.drag&&1==a.rail.drag.pt&&(a.showCursor(),a.rail.drag.hr?a.hasreversehr?a.doScrollLeft(a.scrollvaluemaxw-Math.round(a.scroll.x*a.scrollratio.x),a.opt.cursordragspeed):a.doScrollLeft(Math.round(a.scroll.x*a.scrollratio.x),a.opt.cursordragspeed):a.doScrollTop(Math.round(a.scroll.y*a.scrollratio.y),a.opt.cursordragspeed))});return a.cancelEvent(b)}}else a.checkarea=0};if(e.cantouch||a.opt.touchbehavior)a.onpreventclick=function(b){if(a.preventclick)return a.preventclick.tg.onclick=
|
||||
a.preventclick.click,a.preventclick=!1,a.cancelEvent(b)},a.bind(a.win,"mousedown",a.ontouchstart),a.onclick=e.isios?!1:function(b){return a.lastmouseup?(a.lastmouseup=!1,a.cancelEvent(b)):!0},a.opt.grabcursorenabled&&e.cursorgrabvalue&&(a.css(a.ispage?a.doc:a.win,{cursor:e.cursorgrabvalue}),a.css(a.rail,{cursor:e.cursorgrabvalue}));else{var r=function(b){if(a.selectiondrag){if(b){var c=a.win.outerHeight();b=b.pageY-a.selectiondrag.top;0<b&&b<c&&(b=0);b>=c&&(b-=c);a.selectiondrag.df=b}0!=a.selectiondrag.df&&
|
||||
(a.doScrollBy(2*-Math.floor(a.selectiondrag.df/6)),a.debounced("doselectionscroll",function(){r()},50))}};a.hasTextSelected="getSelection"in document?function(){return 0<document.getSelection().rangeCount}:"selection"in document?function(){return"None"!=document.selection.type}:function(){return!1};a.onselectionstart=function(b){a.ispage||(a.selectiondrag=a.win.offset())};a.onselectionend=function(b){a.selectiondrag=!1};a.onselectiondrag=function(b){a.selectiondrag&&a.hasTextSelected()&&a.debounced("selectionscroll",
|
||||
function(){r(b)},250)}}e.hasw3ctouch?(a.css(a.rail,{"touch-action":"none"}),a.css(a.cursor,{"touch-action":"none"}),a.bind(a.win,"pointerdown",a.ontouchstart),a.bind(document,"pointerup",a.ontouchend),a.bind(document,"pointermove",a.ontouchmove)):e.hasmstouch?(a.css(a.rail,{"-ms-touch-action":"none"}),a.css(a.cursor,{"-ms-touch-action":"none"}),a.bind(a.win,"MSPointerDown",a.ontouchstart),a.bind(document,"MSPointerUp",a.ontouchend),a.bind(document,"MSPointerMove",a.ontouchmove),a.bind(a.cursor,"MSGestureHold",
|
||||
function(a){a.preventDefault()}),a.bind(a.cursor,"contextmenu",function(a){a.preventDefault()})):this.istouchcapable&&(a.bind(a.win,"touchstart",a.ontouchstart),a.bind(document,"touchend",a.ontouchend),a.bind(document,"touchcancel",a.ontouchend),a.bind(document,"touchmove",a.ontouchmove));if(a.opt.cursordragontouch||!e.cantouch&&!a.opt.touchbehavior)a.rail.css({cursor:"default"}),a.railh&&a.railh.css({cursor:"default"}),a.jqbind(a.rail,"mouseenter",function(){if(!a.ispage&&!a.win.is(":visible"))return!1;
|
||||
a.canshowonmouseevent&&a.showCursor();a.rail.active=!0}),a.jqbind(a.rail,"mouseleave",function(){a.rail.active=!1;a.rail.drag||a.hideCursor()}),a.opt.sensitiverail&&(a.bind(a.rail,"click",function(b){a.doRailClick(b,!1,!1)}),a.bind(a.rail,"dblclick",function(b){a.doRailClick(b,!0,!1)}),a.bind(a.cursor,"click",function(b){a.cancelEvent(b)}),a.bind(a.cursor,"dblclick",function(b){a.cancelEvent(b)})),a.railh&&(a.jqbind(a.railh,"mouseenter",function(){if(!a.ispage&&!a.win.is(":visible"))return!1;a.canshowonmouseevent&&
|
||||
a.showCursor();a.rail.active=!0}),a.jqbind(a.railh,"mouseleave",function(){a.rail.active=!1;a.rail.drag||a.hideCursor()}),a.opt.sensitiverail&&(a.bind(a.railh,"click",function(b){a.doRailClick(b,!1,!0)}),a.bind(a.railh,"dblclick",function(b){a.doRailClick(b,!0,!0)}),a.bind(a.cursorh,"click",function(b){a.cancelEvent(b)}),a.bind(a.cursorh,"dblclick",function(b){a.cancelEvent(b)})));e.cantouch||a.opt.touchbehavior?(a.bind(e.hasmousecapture?a.win:document,"mouseup",a.ontouchend),a.bind(document,"mousemove",
|
||||
a.ontouchmove),a.onclick&&a.bind(document,"click",a.onclick),a.opt.cursordragontouch?(a.bind(a.cursor,"mousedown",a.onmousedown),a.bind(a.cursor,"mouseup",a.onmouseup),a.cursorh&&a.bind(a.cursorh,"mousedown",function(b){a.onmousedown(b,!0)}),a.cursorh&&a.bind(a.cursorh,"mouseup",a.onmouseup)):(a.bind(a.rail,"mousedown",function(a){a.preventDefault()}),a.railh&&a.bind(a.railh,"mousedown",function(a){a.preventDefault()}))):(a.bind(e.hasmousecapture?a.win:document,"mouseup",a.onmouseup),a.bind(document,
|
||||
"mousemove",a.onmousemove),a.onclick&&a.bind(document,"click",a.onclick),a.bind(a.cursor,"mousedown",a.onmousedown),a.bind(a.cursor,"mouseup",a.onmouseup),a.railh&&(a.bind(a.cursorh,"mousedown",function(b){a.onmousedown(b,!0)}),a.bind(a.cursorh,"mouseup",a.onmouseup)),!a.ispage&&a.opt.enablescrollonselection&&(a.bind(a.win[0],"mousedown",a.onselectionstart),a.bind(document,"mouseup",a.onselectionend),a.bind(a.cursor,"mouseup",a.onselectionend),a.cursorh&&a.bind(a.cursorh,"mouseup",a.onselectionend),
|
||||
a.bind(document,"mousemove",a.onselectiondrag)),a.zoom&&(a.jqbind(a.zoom,"mouseenter",function(){a.canshowonmouseevent&&a.showCursor();a.rail.active=!0}),a.jqbind(a.zoom,"mouseleave",function(){a.rail.active=!1;a.rail.drag||a.hideCursor()})));a.opt.enablemousewheel&&(a.isiframe||a.mousewheel(e.isie&&a.ispage?document:a.win,a.onmousewheel),a.mousewheel(a.rail,a.onmousewheel),a.railh&&a.mousewheel(a.railh,a.onmousewheelhr));a.ispage||e.cantouch||/HTML|^BODY/.test(a.win[0].nodeName)||(a.win.attr("tabindex")||
|
||||
a.win.attr({tabindex:O++}),a.jqbind(a.win,"focus",function(b){B=a.getTarget(b).id||!0;a.hasfocus=!0;a.canshowonmouseevent&&a.noticeCursor()}),a.jqbind(a.win,"blur",function(b){B=!1;a.hasfocus=!1}),a.jqbind(a.win,"mouseenter",function(b){F=a.getTarget(b).id||!0;a.hasmousefocus=!0;a.canshowonmouseevent&&a.noticeCursor()}),a.jqbind(a.win,"mouseleave",function(){F=!1;a.hasmousefocus=!1;a.rail.drag||a.hideCursor()}))}a.onkeypress=function(b){if(a.railslocked&&0==a.page.maxh)return!0;b=b?b:window.e;var c=
|
||||
a.getTarget(b);if(c&&/INPUT|TEXTAREA|SELECT|OPTION/.test(c.nodeName)&&(!c.getAttribute("type")&&!c.type||!/submit|button|cancel/i.tp)||f(c).attr("contenteditable"))return!0;if(a.hasfocus||a.hasmousefocus&&!B||a.ispage&&!B&&!F){c=b.keyCode;if(a.railslocked&&27!=c)return a.cancelEvent(b);var g=b.ctrlKey||!1,d=b.shiftKey||!1,e=!1;switch(c){case 38:case 63233:a.doScrollBy(72);e=!0;break;case 40:case 63235:a.doScrollBy(-72);e=!0;break;case 37:case 63232:a.railh&&(g?a.doScrollLeft(0):a.doScrollLeftBy(72),
|
||||
e=!0);break;case 39:case 63234:a.railh&&(g?a.doScrollLeft(a.page.maxw):a.doScrollLeftBy(-72),e=!0);break;case 33:case 63276:a.doScrollBy(a.view.h);e=!0;break;case 34:case 63277:a.doScrollBy(-a.view.h);e=!0;break;case 36:case 63273:a.railh&&g?a.doScrollPos(0,0):a.doScrollTo(0);e=!0;break;case 35:case 63275:a.railh&&g?a.doScrollPos(a.page.maxw,a.page.maxh):a.doScrollTo(a.page.maxh);e=!0;break;case 32:a.opt.spacebarenabled&&(d?a.doScrollBy(a.view.h):a.doScrollBy(-a.view.h),e=!0);break;case 27:a.zoomactive&&
|
||||
(a.doZoom(),e=!0)}if(e)return a.cancelEvent(b)}};a.opt.enablekeyboard&&a.bind(document,e.isopera&&!e.isopera12?"keypress":"keydown",a.onkeypress);a.bind(document,"keydown",function(b){b.ctrlKey&&(a.wheelprevented=!0)});a.bind(document,"keyup",function(b){b.ctrlKey||(a.wheelprevented=!1)});a.bind(window,"blur",function(b){a.wheelprevented=!1});a.bind(window,"resize",a.lazyResize);a.bind(window,"orientationchange",a.lazyResize);a.bind(window,"load",a.lazyResize);if(e.ischrome&&!a.ispage&&!a.haswrapper){var t=
|
||||
a.win.attr("style"),m=parseFloat(a.win.css("width"))+1;a.win.css("width",m);a.synched("chromefix",function(){a.win.attr("style",t)})}a.onAttributeChange=function(b){a.lazyResize(a.isieold?250:30)};a.isie11||!1===x||(a.observerbody=new x(function(b){b.forEach(function(b){if("attributes"==b.type)return f("body").hasClass("modal-open")&&f("body").hasClass("modal-dialog")&&!f.contains(f(".modal-dialog")[0],a.doc[0])?a.hide():a.show()});if(document.body.scrollHeight!=a.page.maxh)return a.lazyResize(30)}),
|
||||
a.observerbody.observe(document.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]}));a.ispage||a.haswrapper||(!1!==x?(a.observer=new x(function(b){b.forEach(a.onAttributeChange)}),a.observer.observe(a.win[0],{childList:!0,characterData:!1,attributes:!0,subtree:!1}),a.observerremover=new x(function(b){b.forEach(function(b){if(0<b.removedNodes.length)for(var c in b.removedNodes)if(a&&b.removedNodes[c]==a.win[0])return a.remove()})}),a.observerremover.observe(a.win[0].parentNode,
|
||||
{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(a.bind(a.win,e.isie&&!e.isie9?"propertychange":"DOMAttrModified",a.onAttributeChange),e.isie9&&a.win[0].attachEvent("onpropertychange",a.onAttributeChange),a.bind(a.win,"DOMNodeRemoved",function(b){b.target==a.win[0]&&a.remove()})));!a.ispage&&a.opt.boxzoom&&a.bind(window,"resize",a.resizeZoom);a.istextarea&&(a.bind(a.win,"keydown",a.lazyResize),a.bind(a.win,"mouseup",a.lazyResize));a.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var N=
|
||||
function(){a.iframexd=!1;var c;try{c="contentDocument"in this?this.contentDocument:this.contentWindow.document}catch(g){a.iframexd=!0,c=!1}if(a.iframexd)return"console"in window&&console.log("NiceScroll error: policy restriced iframe"),!0;a.forcescreen=!0;a.isiframe&&(a.iframe={doc:f(c),html:a.doc.contents().find("html")[0],body:a.doc.contents().find("body")[0]},a.getContentSize=function(){return{w:Math.max(a.iframe.html.scrollWidth,a.iframe.body.scrollWidth),h:Math.max(a.iframe.html.scrollHeight,
|
||||
a.iframe.body.scrollHeight)}},a.docscroll=f(a.iframe.body));if(!e.isios&&a.opt.iframeautoresize&&!a.isiframe){a.win.scrollTop(0);a.doc.height("");var d=Math.max(c.getElementsByTagName("html")[0].scrollHeight,c.body.scrollHeight);a.doc.height(d)}a.lazyResize(30);e.isie7&&a.css(f(a.iframe.html),b);a.css(f(a.iframe.body),b);e.isios&&a.haswrapper&&a.css(f(c.body),{"-webkit-transform":"translate3d(0,0,0)"});"contentWindow"in this?a.bind(this.contentWindow,"scroll",a.onscroll):a.bind(c,"scroll",a.onscroll);
|
||||
a.opt.enablemousewheel&&a.mousewheel(c,a.onmousewheel);a.opt.enablekeyboard&&a.bind(c,e.isopera?"keypress":"keydown",a.onkeypress);if(e.cantouch||a.opt.touchbehavior)a.bind(c,"mousedown",a.ontouchstart),a.bind(c,"mousemove",function(b){return a.ontouchmove(b,!0)}),a.opt.grabcursorenabled&&e.cursorgrabvalue&&a.css(f(c.body),{cursor:e.cursorgrabvalue});a.bind(c,"mouseup",a.ontouchend);a.zoom&&(a.opt.dblclickzoom&&a.bind(c,"dblclick",a.doZoom),a.ongesturezoom&&a.bind(c,"gestureend",a.ongesturezoom))};
|
||||
this.doc[0].readyState&&"complete"==this.doc[0].readyState&&setTimeout(function(){N.call(a.doc[0],!1)},500);a.bind(this.doc,"load",N)}};this.showCursor=function(b,c){a.cursortimeout&&(clearTimeout(a.cursortimeout),a.cursortimeout=0);if(a.rail){a.autohidedom&&(a.autohidedom.stop().css({opacity:a.opt.cursoropacitymax}),a.cursoractive=!0);a.rail.drag&&1==a.rail.drag.pt||(void 0!==b&&!1!==b&&(a.scroll.y=Math.round(1*b/a.scrollratio.y)),void 0!==c&&(a.scroll.x=Math.round(1*c/a.scrollratio.x)));a.cursor.css({height:a.cursorheight,
|
||||
top:a.scroll.y});if(a.cursorh){var d=a.hasreversehr?a.scrollvaluemaxw-a.scroll.x:a.scroll.x;!a.rail.align&&a.rail.visibility?a.cursorh.css({width:a.cursorwidth,left:d+a.rail.width}):a.cursorh.css({width:a.cursorwidth,left:d});a.cursoractive=!0}a.zoom&&a.zoom.stop().css({opacity:a.opt.cursoropacitymax})}};this.hideCursor=function(b){a.cursortimeout||!a.rail||!a.autohidedom||a.hasmousefocus&&"leave"==a.opt.autohidemode||(a.cursortimeout=setTimeout(function(){a.rail.active&&a.showonmouseevent||(a.autohidedom.stop().animate({opacity:a.opt.cursoropacitymin}),
|
||||
a.zoom&&a.zoom.stop().animate({opacity:a.opt.cursoropacitymin}),a.cursoractive=!1);a.cursortimeout=0},b||a.opt.hidecursordelay))};this.noticeCursor=function(b,c,d){a.showCursor(c,d);a.rail.active||a.hideCursor(b)};this.getContentSize=a.ispage?function(){return{w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}}:a.haswrapper?function(){return{w:a.doc.outerWidth()+parseInt(a.win.css("paddingLeft"))+
|
||||
parseInt(a.win.css("paddingRight")),h:a.doc.outerHeight()+parseInt(a.win.css("paddingTop"))+parseInt(a.win.css("paddingBottom"))}}:function(){return{w:a.docscroll[0].scrollWidth,h:a.docscroll[0].scrollHeight}};this.onResize=function(b,c){if(!a||!a.win)return!1;if(!a.haswrapper&&!a.ispage){if("none"==a.win.css("display"))return a.visibility&&a.hideRail().hideRailHr(),!1;a.hidden||a.visibility||a.showRail().showRailHr()}var d=a.page.maxh,e=a.page.maxw,f=a.view.h,k=a.view.w;a.view={w:a.ispage?a.win.width():
|
||||
parseInt(a.win[0].clientWidth),h:a.ispage?a.win.height():parseInt(a.win[0].clientHeight)};a.page=c?c:a.getContentSize();a.page.maxh=Math.max(0,a.page.h-a.view.h);a.page.maxw=Math.max(0,a.page.w-a.view.w);if(a.page.maxh==d&&a.page.maxw==e&&a.view.w==k&&a.view.h==f){if(a.ispage)return a;d=a.win.offset();if(a.lastposition&&(e=a.lastposition,e.top==d.top&&e.left==d.left))return a;a.lastposition=d}0==a.page.maxh?(a.hideRail(),a.scrollvaluemax=0,a.scroll.y=0,a.scrollratio.y=0,a.cursorheight=0,a.setScrollTop(0),
|
||||
a.rail&&(a.rail.scrollable=!1)):(a.page.maxh-=a.opt.railpadding.top+a.opt.railpadding.bottom,a.rail.scrollable=!0);0==a.page.maxw?(a.hideRailHr(),a.scrollvaluemaxw=0,a.scroll.x=0,a.scrollratio.x=0,a.cursorwidth=0,a.setScrollLeft(0),a.railh&&(a.railh.scrollable=!1)):(a.page.maxw-=a.opt.railpadding.left+a.opt.railpadding.right,a.railh&&(a.railh.scrollable=a.opt.horizrailenabled));a.railslocked=a.locked||0==a.page.maxh&&0==a.page.maxw;if(a.railslocked)return a.ispage||a.updateScrollBar(a.view),!1;a.hidden||
|
||||
a.visibility?!a.railh||a.hidden||a.railh.visibility||a.showRailHr():a.showRail().showRailHr();a.istextarea&&a.win.css("resize")&&"none"!=a.win.css("resize")&&(a.view.h-=20);a.cursorheight=Math.min(a.view.h,Math.round(a.view.h/a.page.h*a.view.h));a.cursorheight=a.opt.cursorfixedheight?a.opt.cursorfixedheight:Math.max(a.opt.cursorminheight,a.cursorheight);a.cursorwidth=Math.min(a.view.w,Math.round(a.view.w/a.page.w*a.view.w));a.cursorwidth=a.opt.cursorfixedheight?a.opt.cursorfixedheight:Math.max(a.opt.cursorminheight,
|
||||
a.cursorwidth);a.scrollvaluemax=a.view.h-a.cursorheight-a.cursor.hborder-(a.opt.railpadding.top+a.opt.railpadding.bottom);a.railh&&(a.railh.width=0<a.page.maxh?a.view.w-a.rail.width:a.view.w,a.scrollvaluemaxw=a.railh.width-a.cursorwidth-a.cursorh.wborder-(a.opt.railpadding.left+a.opt.railpadding.right));a.ispage||a.updateScrollBar(a.view);a.scrollratio={x:a.page.maxw/a.scrollvaluemaxw,y:a.page.maxh/a.scrollvaluemax};a.getScrollTop()>a.page.maxh?a.doScrollTop(a.page.maxh):(a.scroll.y=Math.round(a.getScrollTop()*
|
||||
(1/a.scrollratio.y)),a.scroll.x=Math.round(a.getScrollLeft()*(1/a.scrollratio.x)),a.cursoractive&&a.noticeCursor());a.scroll.y&&0==a.getScrollTop()&&a.doScrollTo(Math.floor(a.scroll.y*a.scrollratio.y));return a};this.resize=a.onResize;this.hlazyresize=0;this.lazyResize=function(b){a.haswrapper||a.hide();a.hlazyresize&&clearTimeout(a.hlazyresize);a.hlazyresize=setTimeout(function(){a&&a.show().resize()},240);return a};this.jqbind=function(b,c,d){a.events.push({e:b,n:c,f:d,q:!0});f(b).bind(c,d)};this.mousewheel=
|
||||
function(b,c,d){b="jquery"in b?b[0]:b;if("onwheel"in document.createElement("div"))a._bind(b,"wheel",c,d||!1);else{var e=void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";q(b,e,c,d||!1);"DOMMouseScroll"==e&&q(b,"MozMousePixelScroll",c,d||!1)}};e.haseventlistener?(this.bind=function(b,c,d,e){a._bind("jquery"in b?b[0]:b,c,d,e||!1)},this._bind=function(b,c,d,e){a.events.push({e:b,n:c,f:d,b:e,q:!1});b.addEventListener(c,d,e||!1)},this.cancelEvent=function(a){if(!a)return!1;a=a.original?a.original:
|
||||
a;a.cancelable&&a.preventDefault();a.stopPropagation();a.preventManipulation&&a.preventManipulation();return!1},this.stopPropagation=function(a){if(!a)return!1;a=a.original?a.original:a;a.stopPropagation();return!1},this._unbind=function(a,c,d,e){a.removeEventListener(c,d,e)}):(this.bind=function(b,c,d,e){var f="jquery"in b?b[0]:b;a._bind(f,c,function(b){(b=b||window.event||!1)&&b.srcElement&&(b.target=b.srcElement);"pageY"in b||(b.pageX=b.clientX+document.documentElement.scrollLeft,b.pageY=b.clientY+
|
||||
document.documentElement.scrollTop);return!1===d.call(f,b)||!1===e?a.cancelEvent(b):!0})},this._bind=function(b,c,d,e){a.events.push({e:b,n:c,f:d,b:e,q:!1});b.attachEvent?b.attachEvent("on"+c,d):b["on"+c]=d},this.cancelEvent=function(a){a=window.event||!1;if(!a)return!1;a.cancelBubble=!0;a.cancel=!0;return a.returnValue=!1},this.stopPropagation=function(a){a=window.event||!1;if(!a)return!1;a.cancelBubble=!0;return!1},this._unbind=function(a,c,d,e){a.detachEvent?a.detachEvent("on"+c,d):a["on"+c]=!1});
|
||||
this.unbindAll=function(){for(var b=0;b<a.events.length;b++){var c=a.events[b];c.q?c.e.unbind(c.n,c.f):a._unbind(c.e,c.n,c.f,c.b)}};this.showRail=function(){0==a.page.maxh||!a.ispage&&"none"==a.win.css("display")||(a.visibility=!0,a.rail.visibility=!0,a.rail.css("display","block"));return a};this.showRailHr=function(){if(!a.railh)return a;0==a.page.maxw||!a.ispage&&"none"==a.win.css("display")||(a.railh.visibility=!0,a.railh.css("display","block"));return a};this.hideRail=function(){a.visibility=
|
||||
!1;a.rail.visibility=!1;a.rail.css("display","none");return a};this.hideRailHr=function(){if(!a.railh)return a;a.railh.visibility=!1;a.railh.css("display","none");return a};this.show=function(){a.hidden=!1;a.railslocked=!1;return a.showRail().showRailHr()};this.hide=function(){a.hidden=!0;a.railslocked=!0;return a.hideRail().hideRailHr()};this.toggle=function(){return a.hidden?a.show():a.hide()};this.remove=function(){a.stop();a.cursortimeout&&clearTimeout(a.cursortimeout);for(var b in a.delaylist)a.delaylist[b]&&
|
||||
w(a.delaylist[b].h);a.doZoomOut();a.unbindAll();e.isie9&&a.win[0].detachEvent("onpropertychange",a.onAttributeChange);!1!==a.observer&&a.observer.disconnect();!1!==a.observerremover&&a.observerremover.disconnect();!1!==a.observerbody&&a.observerbody.disconnect();a.events=null;a.cursor&&a.cursor.remove();a.cursorh&&a.cursorh.remove();a.rail&&a.rail.remove();a.railh&&a.railh.remove();a.zoom&&a.zoom.remove();for(b=0;b<a.saved.css.length;b++){var c=a.saved.css[b];c[0].css(c[1],void 0===c[2]?"":c[2])}a.saved=
|
||||
!1;a.me.data("__nicescroll","");var d=f.nicescroll;d.each(function(b){if(this&&this.id===a.id){delete d[b];for(var c=++b;c<d.length;c++,b++)d[b]=d[c];d.length--;d.length&&delete d[d.length]}});for(var k in a)a[k]=null,delete a[k];a=null};this.scrollstart=function(b){this.onscrollstart=b;return a};this.scrollend=function(b){this.onscrollend=b;return a};this.scrollcancel=function(b){this.onscrollcancel=b;return a};this.zoomin=function(b){this.onzoomin=b;return a};this.zoomout=function(b){this.onzoomout=
|
||||
b;return a};this.isScrollable=function(a){a=a.target?a.target:a;if("OPTION"==a.nodeName)return!0;for(;a&&1==a.nodeType&&!/^BODY|HTML/.test(a.nodeName);){var c=f(a),c=c.css("overflowY")||c.css("overflowX")||c.css("overflow")||"";if(/scroll|auto/.test(c))return a.clientHeight!=a.scrollHeight;a=a.parentNode?a.parentNode:!1}return!1};this.getViewport=function(a){for(a=a&&a.parentNode?a.parentNode:!1;a&&1==a.nodeType&&!/^BODY|HTML/.test(a.nodeName);){var c=f(a);if(/fixed|absolute/.test(c.css("position")))return c;
|
||||
var d=c.css("overflowY")||c.css("overflowX")||c.css("overflow")||"";if(/scroll|auto/.test(d)&&a.clientHeight!=a.scrollHeight||0<c.getNiceScroll().length)return c;a=a.parentNode?a.parentNode:!1}return!1};this.triggerScrollEnd=function(){if(a.onscrollend){var b=a.getScrollLeft(),c=a.getScrollTop();a.onscrollend.call(a,{type:"scrollend",current:{x:b,y:c},end:{x:b,y:c}})}};this.onmousewheel=function(b){if(!a.wheelprevented){if(a.railslocked)return a.debounced("checkunlock",a.resize,250),!0;if(a.rail.drag)return a.cancelEvent(b);
|
||||
"auto"==a.opt.oneaxismousemode&&0!=b.deltaX&&(a.opt.oneaxismousemode=!1);if(a.opt.oneaxismousemode&&0==b.deltaX&&!a.rail.scrollable)return a.railh&&a.railh.scrollable?a.onmousewheelhr(b):!0;var c=+new Date,d=!1;a.opt.preservenativescrolling&&a.checkarea+600<c&&(a.nativescrollingarea=a.isScrollable(b),d=!0);a.checkarea=c;if(a.nativescrollingarea)return!0;if(b=t(b,!1,d))a.checkarea=0;return b}};this.onmousewheelhr=function(b){if(!a.wheelprevented){if(a.railslocked||!a.railh.scrollable)return!0;if(a.rail.drag)return a.cancelEvent(b);
|
||||
var c=+new Date,d=!1;a.opt.preservenativescrolling&&a.checkarea+600<c&&(a.nativescrollingarea=a.isScrollable(b),d=!0);a.checkarea=c;return a.nativescrollingarea?!0:a.railslocked?a.cancelEvent(b):t(b,!0,d)}};this.stop=function(){a.cancelScroll();a.scrollmon&&a.scrollmon.stop();a.cursorfreezed=!1;a.scroll.y=Math.round(a.getScrollTop()*(1/a.scrollratio.y));a.noticeCursor();return a};this.getTransitionSpeed=function(b){b=Math.min(Math.round(10*a.opt.scrollspeed),Math.round(b/20*a.opt.scrollspeed));return 20<
|
||||
b?b:0};a.opt.smoothscroll?a.ishwscroll&&e.hastransition&&a.opt.usetransition&&a.opt.smoothscroll?(this.prepareTransition=function(b,c){var d=c?20<b?b:0:a.getTransitionSpeed(b),f=d?e.prefixstyle+"transform "+d+"ms ease-out":"";a.lasttransitionstyle&&a.lasttransitionstyle==f||(a.lasttransitionstyle=f,a.doc.css(e.transitionstyle,f));return d},this.doScrollLeft=function(b,c){var d=a.scrollrunning?a.newscrolly:a.getScrollTop();a.doScrollPos(b,d,c)},this.doScrollTop=function(b,c){var d=a.scrollrunning?
|
||||
a.newscrollx:a.getScrollLeft();a.doScrollPos(d,b,c)},this.doScrollPos=function(b,c,d){var f=a.getScrollTop(),k=a.getScrollLeft();(0>(a.newscrolly-f)*(c-f)||0>(a.newscrollx-k)*(b-k))&&a.cancelScroll();0==a.opt.bouncescroll&&(0>c?c=0:c>a.page.maxh&&(c=a.page.maxh),0>b?b=0:b>a.page.maxw&&(b=a.page.maxw));if(a.scrollrunning&&b==a.newscrollx&&c==a.newscrolly)return!1;a.newscrolly=c;a.newscrollx=b;a.newscrollspeed=d||!1;if(a.timer)return!1;a.timer=setTimeout(function(){var d=a.getScrollTop(),f=a.getScrollLeft(),
|
||||
k=Math.round(Math.sqrt(Math.pow(b-f,2)+Math.pow(c-d,2))),k=a.newscrollspeed&&1<a.newscrollspeed?a.newscrollspeed:a.getTransitionSpeed(k);a.newscrollspeed&&1>=a.newscrollspeed&&(k*=a.newscrollspeed);a.prepareTransition(k,!0);a.timerscroll&&a.timerscroll.tm&&clearInterval(a.timerscroll.tm);0<k&&(!a.scrollrunning&&a.onscrollstart&&a.onscrollstart.call(a,{type:"scrollstart",current:{x:f,y:d},request:{x:b,y:c},end:{x:a.newscrollx,y:a.newscrolly},speed:k}),e.transitionend?a.scrollendtrapped||(a.scrollendtrapped=
|
||||
!0,a.bind(a.doc,e.transitionend,a.onScrollTransitionEnd,!1)):(a.scrollendtrapped&&clearTimeout(a.scrollendtrapped),a.scrollendtrapped=setTimeout(a.onScrollTransitionEnd,k)),a.timerscroll={bz:new D(d,a.newscrolly,k,0,0,.58,1),bh:new D(f,a.newscrollx,k,0,0,.58,1)},a.cursorfreezed||(a.timerscroll.tm=setInterval(function(){a.showCursor(a.getScrollTop(),a.getScrollLeft())},60)));a.synched("doScroll-set",function(){a.timer=0;a.scrollendtrapped&&(a.scrollrunning=!0);a.setScrollTop(a.newscrolly);a.setScrollLeft(a.newscrollx);
|
||||
if(!a.scrollendtrapped)a.onScrollTransitionEnd()})},50)},this.cancelScroll=function(){if(!a.scrollendtrapped)return!0;var b=a.getScrollTop(),c=a.getScrollLeft();a.scrollrunning=!1;e.transitionend||clearTimeout(e.transitionend);a.scrollendtrapped=!1;a._unbind(a.doc[0],e.transitionend,a.onScrollTransitionEnd);a.prepareTransition(0);a.setScrollTop(b);a.railh&&a.setScrollLeft(c);a.timerscroll&&a.timerscroll.tm&&clearInterval(a.timerscroll.tm);a.timerscroll=!1;a.cursorfreezed=!1;a.showCursor(b,c);return a},
|
||||
this.onScrollTransitionEnd=function(){a.scrollendtrapped&&a._unbind(a.doc[0],e.transitionend,a.onScrollTransitionEnd);a.scrollendtrapped=!1;a.prepareTransition(0);a.timerscroll&&a.timerscroll.tm&&clearInterval(a.timerscroll.tm);a.timerscroll=!1;var b=a.getScrollTop(),c=a.getScrollLeft();a.setScrollTop(b);a.railh&&a.setScrollLeft(c);a.noticeCursor(!1,b,c);a.cursorfreezed=!1;0>b?b=0:b>a.page.maxh&&(b=a.page.maxh);0>c?c=0:c>a.page.maxw&&(c=a.page.maxw);if(b!=a.newscrolly||c!=a.newscrollx)return a.doScrollPos(c,
|
||||
b,a.opt.snapbackspeed);a.onscrollend&&a.scrollrunning&&a.triggerScrollEnd();a.scrollrunning=!1}):(this.doScrollLeft=function(b,c){var d=a.scrollrunning?a.newscrolly:a.getScrollTop();a.doScrollPos(b,d,c)},this.doScrollTop=function(b,c){var d=a.scrollrunning?a.newscrollx:a.getScrollLeft();a.doScrollPos(d,b,c)},this.doScrollPos=function(b,c,d){function e(){if(a.cancelAnimationFrame)return!0;a.scrollrunning=!0;if(p=1-p)return a.timer=v(e)||1;var b=0,c,d,f=d=a.getScrollTop();if(a.dst.ay){f=a.bzscroll?
|
||||
a.dst.py+a.bzscroll.getNow()*a.dst.ay:a.newscrolly;c=f-d;if(0>c&&f<a.newscrolly||0<c&&f>a.newscrolly)f=a.newscrolly;a.setScrollTop(f);f==a.newscrolly&&(b=1)}else b=1;d=c=a.getScrollLeft();if(a.dst.ax){d=a.bzscroll?a.dst.px+a.bzscroll.getNow()*a.dst.ax:a.newscrollx;c=d-c;if(0>c&&d<a.newscrollx||0<c&&d>a.newscrollx)d=a.newscrollx;a.setScrollLeft(d);d==a.newscrollx&&(b+=1)}else b+=1;2==b?(a.timer=0,a.cursorfreezed=!1,a.bzscroll=!1,a.scrollrunning=!1,0>f?f=0:f>a.page.maxh&&(f=Math.max(0,a.page.maxh)),
|
||||
0>d?d=0:d>a.page.maxw&&(d=a.page.maxw),d!=a.newscrollx||f!=a.newscrolly?a.doScrollPos(d,f):a.onscrollend&&a.triggerScrollEnd()):a.timer=v(e)||1}c=void 0===c||!1===c?a.getScrollTop(!0):c;if(a.timer&&a.newscrolly==c&&a.newscrollx==b)return!0;a.timer&&w(a.timer);a.timer=0;var f=a.getScrollTop(),k=a.getScrollLeft();(0>(a.newscrolly-f)*(c-f)||0>(a.newscrollx-k)*(b-k))&&a.cancelScroll();a.newscrolly=c;a.newscrollx=b;a.bouncescroll&&a.rail.visibility||(0>a.newscrolly?a.newscrolly=0:a.newscrolly>a.page.maxh&&
|
||||
(a.newscrolly=a.page.maxh));a.bouncescroll&&a.railh.visibility||(0>a.newscrollx?a.newscrollx=0:a.newscrollx>a.page.maxw&&(a.newscrollx=a.page.maxw));a.dst={};a.dst.x=b-k;a.dst.y=c-f;a.dst.px=k;a.dst.py=f;var h=Math.round(Math.sqrt(Math.pow(a.dst.x,2)+Math.pow(a.dst.y,2)));a.dst.ax=a.dst.x/h;a.dst.ay=a.dst.y/h;var l=0,n=h;0==a.dst.x?(l=f,n=c,a.dst.ay=1,a.dst.py=0):0==a.dst.y&&(l=k,n=b,a.dst.ax=1,a.dst.px=0);h=a.getTransitionSpeed(h);d&&1>=d&&(h*=d);a.bzscroll=0<h?a.bzscroll?a.bzscroll.update(n,h):
|
||||
new D(l,n,h,0,1,0,1):!1;if(!a.timer){(f==a.page.maxh&&c>=a.page.maxh||k==a.page.maxw&&b>=a.page.maxw)&&a.checkContentSize();var p=1;a.cancelAnimationFrame=!1;a.timer=1;a.onscrollstart&&!a.scrollrunning&&a.onscrollstart.call(a,{type:"scrollstart",current:{x:k,y:f},request:{x:b,y:c},end:{x:a.newscrollx,y:a.newscrolly},speed:h});e();(f==a.page.maxh&&c>=f||k==a.page.maxw&&b>=k)&&a.checkContentSize();a.noticeCursor()}},this.cancelScroll=function(){a.timer&&w(a.timer);a.timer=0;a.bzscroll=!1;a.scrollrunning=
|
||||
!1;return a}):(this.doScrollLeft=function(b,c){var d=a.getScrollTop();a.doScrollPos(b,d,c)},this.doScrollTop=function(b,c){var d=a.getScrollLeft();a.doScrollPos(d,b,c)},this.doScrollPos=function(b,c,d){var e=b>a.page.maxw?a.page.maxw:b;0>e&&(e=0);var f=c>a.page.maxh?a.page.maxh:c;0>f&&(f=0);a.synched("scroll",function(){a.setScrollTop(f);a.setScrollLeft(e)})},this.cancelScroll=function(){});this.doScrollBy=function(b,c){var d=0,d=c?Math.floor((a.scroll.y-b)*a.scrollratio.y):(a.timer?a.newscrolly:
|
||||
a.getScrollTop(!0))-b;if(a.bouncescroll){var e=Math.round(a.view.h/2);d<-e?d=-e:d>a.page.maxh+e&&(d=a.page.maxh+e)}a.cursorfreezed=!1;e=a.getScrollTop(!0);if(0>d&&0>=e)return a.noticeCursor();if(d>a.page.maxh&&e>=a.page.maxh)return a.checkContentSize(),a.noticeCursor();a.doScrollTop(d)};this.doScrollLeftBy=function(b,c){var d=0,d=c?Math.floor((a.scroll.x-b)*a.scrollratio.x):(a.timer?a.newscrollx:a.getScrollLeft(!0))-b;if(a.bouncescroll){var e=Math.round(a.view.w/2);d<-e?d=-e:d>a.page.maxw+e&&(d=a.page.maxw+
|
||||
e)}a.cursorfreezed=!1;e=a.getScrollLeft(!0);if(0>d&&0>=e||d>a.page.maxw&&e>=a.page.maxw)return a.noticeCursor();a.doScrollLeft(d)};this.doScrollTo=function(b,c){a.cursorfreezed=!1;a.doScrollTop(b)};this.checkContentSize=function(){var b=a.getContentSize();b.h==a.page.h&&b.w==a.page.w||a.resize(!1,b)};a.onscroll=function(b){a.rail.drag||a.cursorfreezed||a.synched("scroll",function(){a.scroll.y=Math.round(a.getScrollTop()*(1/a.scrollratio.y));a.railh&&(a.scroll.x=Math.round(a.getScrollLeft()*(1/a.scrollratio.x)));
|
||||
a.noticeCursor()})};a.bind(a.docscroll,"scroll",a.onscroll);this.doZoomIn=function(b){if(!a.zoomactive){a.zoomactive=!0;a.zoomrestore={style:{}};var c="position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),d=a.win[0].style,k;for(k in c){var h=c[k];a.zoomrestore.style[h]=void 0!==d[h]?d[h]:""}a.zoomrestore.style.width=a.win.css("width");a.zoomrestore.style.height=a.win.css("height");a.zoomrestore.padding={w:a.win.outerWidth()-a.win.width(),h:a.win.outerHeight()-
|
||||
a.win.height()};e.isios4&&(a.zoomrestore.scrollTop=f(window).scrollTop(),f(window).scrollTop(0));a.win.css({position:e.isios4?"absolute":"fixed",top:0,left:0,zIndex:A+100,margin:0});c=a.win.css("backgroundColor");(""==c||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(c))&&a.win.css("backgroundColor","#fff");a.rail.css({zIndex:A+101});a.zoom.css({zIndex:A+102});a.zoom.css("backgroundPosition","0px -18px");a.resizeZoom();a.onzoomin&&a.onzoomin.call(a);return a.cancelEvent(b)}};this.doZoomOut=
|
||||
function(b){if(a.zoomactive)return a.zoomactive=!1,a.win.css("margin",""),a.win.css(a.zoomrestore.style),e.isios4&&f(window).scrollTop(a.zoomrestore.scrollTop),a.rail.css({"z-index":a.zindex}),a.zoom.css({"z-index":a.zindex}),a.zoomrestore=!1,a.zoom.css("backgroundPosition","0px 0px"),a.onResize(),a.onzoomout&&a.onzoomout.call(a),a.cancelEvent(b)};this.doZoom=function(b){return a.zoomactive?a.doZoomOut(b):a.doZoomIn(b)};this.resizeZoom=function(){if(a.zoomactive){var b=a.getScrollTop();a.win.css({width:f(window).width()-
|
||||
a.zoomrestore.padding.w+"px",height:f(window).height()-a.zoomrestore.padding.h+"px"});a.onResize();a.setScrollTop(Math.min(a.page.maxh,b))}};this.init();f.nicescroll.push(this)},M=function(f){var c=this;this.nc=f;this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0;this.snapy=this.snapx=!1;this.demuly=this.demulx=0;this.lastscrolly=this.lastscrollx=-1;this.timer=this.chky=this.chkx=0;this.time=function(){return+new Date};this.reset=function(f,h){c.stop();var d=c.time();c.steptime=
|
||||
0;c.lasttime=d;c.speedx=0;c.speedy=0;c.lastx=f;c.lasty=h;c.lastscrollx=-1;c.lastscrolly=-1};this.update=function(f,h){var d=c.time();c.steptime=d-c.lasttime;c.lasttime=d;var d=h-c.lasty,q=f-c.lastx,t=c.nc.getScrollTop(),a=c.nc.getScrollLeft(),t=t+d,a=a+q;c.snapx=0>a||a>c.nc.page.maxw;c.snapy=0>t||t>c.nc.page.maxh;c.speedx=q;c.speedy=d;c.lastx=f;c.lasty=h};this.stop=function(){c.nc.unsynched("domomentum2d");c.timer&&clearTimeout(c.timer);c.timer=0;c.lastscrollx=-1;c.lastscrolly=-1};this.doSnapy=function(f,
|
||||
h){var d=!1;0>h?(h=0,d=!0):h>c.nc.page.maxh&&(h=c.nc.page.maxh,d=!0);0>f?(f=0,d=!0):f>c.nc.page.maxw&&(f=c.nc.page.maxw,d=!0);d?c.nc.doScrollPos(f,h,c.nc.opt.snapbackspeed):c.nc.triggerScrollEnd()};this.doMomentum=function(f){var h=c.time(),d=f?h+f:c.lasttime;f=c.nc.getScrollLeft();var q=c.nc.getScrollTop(),t=c.nc.page.maxh,a=c.nc.page.maxw;c.speedx=0<a?Math.min(60,c.speedx):0;c.speedy=0<t?Math.min(60,c.speedy):0;d=d&&60>=h-d;if(0>q||q>t||0>f||f>a)d=!1;f=c.speedx&&d?c.speedx:!1;if(c.speedy&&d&&c.speedy||
|
||||
f){var r=Math.max(16,c.steptime);50<r&&(f=r/50,c.speedx*=f,c.speedy*=f,r=50);c.demulxy=0;c.lastscrollx=c.nc.getScrollLeft();c.chkx=c.lastscrollx;c.lastscrolly=c.nc.getScrollTop();c.chky=c.lastscrolly;var p=c.lastscrollx,e=c.lastscrolly,v=function(){var d=600<c.time()-h?.04:.02;c.speedx&&(p=Math.floor(c.lastscrollx-c.speedx*(1-c.demulxy)),c.lastscrollx=p,0>p||p>a)&&(d=.1);c.speedy&&(e=Math.floor(c.lastscrolly-c.speedy*(1-c.demulxy)),c.lastscrolly=e,0>e||e>t)&&(d=.1);c.demulxy=Math.min(1,c.demulxy+
|
||||
d);c.nc.synched("domomentum2d",function(){c.speedx&&(c.nc.getScrollLeft(),c.chkx=p,c.nc.setScrollLeft(p));c.speedy&&(c.nc.getScrollTop(),c.chky=e,c.nc.setScrollTop(e));c.timer||(c.nc.hideCursor(),c.doSnapy(p,e))});1>c.demulxy?c.timer=setTimeout(v,r):(c.stop(),c.nc.hideCursor(),c.doSnapy(p,e))};v()}else c.doSnapy(c.nc.getScrollLeft(),c.nc.getScrollTop())}},y=f.fn.scrollTop;f.cssHooks.pageYOffset={get:function(h,c,k){return(c=f.data(h,"__nicescroll")||!1)&&c.ishwscroll?c.getScrollTop():y.call(h)},set:function(h,
|
||||
c){var k=f.data(h,"__nicescroll")||!1;k&&k.ishwscroll?k.setScrollTop(parseInt(c)):y.call(h,c);return this}};f.fn.scrollTop=function(h){if(void 0===h){var c=this[0]?f.data(this[0],"__nicescroll")||!1:!1;return c&&c.ishwscroll?c.getScrollTop():y.call(this)}return this.each(function(){var c=f.data(this,"__nicescroll")||!1;c&&c.ishwscroll?c.setScrollTop(parseInt(h)):y.call(f(this),h)})};var z=f.fn.scrollLeft;f.cssHooks.pageXOffset={get:function(h,c,k){return(c=f.data(h,"__nicescroll")||!1)&&c.ishwscroll?
|
||||
c.getScrollLeft():z.call(h)},set:function(h,c){var k=f.data(h,"__nicescroll")||!1;k&&k.ishwscroll?k.setScrollLeft(parseInt(c)):z.call(h,c);return this}};f.fn.scrollLeft=function(h){if(void 0===h){var c=this[0]?f.data(this[0],"__nicescroll")||!1:!1;return c&&c.ishwscroll?c.getScrollLeft():z.call(this)}return this.each(function(){var c=f.data(this,"__nicescroll")||!1;c&&c.ishwscroll?c.setScrollLeft(parseInt(h)):z.call(f(this),h)})};var E=function(h){var c=this;this.length=0;this.name="nicescrollarray";
|
||||
this.each=function(d){f.each(c,d);return c};this.push=function(d){c[c.length]=d;c.length++};this.eq=function(d){return c[d]};if(h)for(var k=0;k<h.length;k++){var l=f.data(h[k],"__nicescroll")||!1;l&&(this[this.length]=l,this.length++)}return this};(function(f,c,k){for(var l=0;l<c.length;l++)k(f,c[l])})(E.prototype,"show hide toggle onResize resize remove stop doScrollPos".split(" "),function(f,c){f[c]=function(){var f=arguments;return this.each(function(){this[c].apply(this,f)})}});f.fn.getNiceScroll=
|
||||
function(h){return void 0===h?new E(this):this[h]&&f.data(this[h],"__nicescroll")||!1};f.expr[":"].nicescroll=function(h){return void 0!==f.data(h,"__nicescroll")};f.fn.niceScroll=function(h,c){void 0!==c||"object"!=typeof h||"jquery"in h||(c=h,h=!1);c=f.extend({},c);var k=new E;void 0===c&&(c={});h&&(c.doc=f(h),c.win=f(this));var l=!("doc"in c);l||"win"in c||(c.win=f(this));this.each(function(){var d=f(this).data("__nicescroll")||!1;d||(c.doc=l?f(this):c.doc,d=new S(c,f(this)),f(this).data("__nicescroll",
|
||||
d));k.push(d)});return 1==k.length?k[0]:k};window.NiceScroll={getjQuery:function(){return f}};f.nicescroll||(f.nicescroll=new E,f.nicescroll.options=K)});
|
||||
4
wwwroot/BackendScript/js/jquery.pulsate.min.js
vendored
Normal file
4
wwwroot/BackendScript/js/jquery.pulsate.min.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
(function(c){var k={init:function(a){var b={color:c(this).css("background-color"),reach:20,speed:1E3,pause:0,glow:!0,repeat:!0,onHover:!1};c(this).css({"-moz-outline-radius":c(this).css("border-top-left-radius"),"-webkit-outline-radius":c(this).css("border-top-left-radius"),"outline-radius":c(this).css("border-top-left-radius")});a&&c.extend(b,a);b.color=c("<div style='background:"+b.color+"'></div>").css("background-color");!0!==b.repeat&&(!isNaN(b.repeat)&&0<b.repeat)&&(b.repeat-=1);return this.each(function(){b.onHover?
|
||||
c(this).bind("mouseover",function(){g(b,this,0)}).bind("mouseout",function(){c(this).pulsate("destroy")}):g(b,this,0)})},destroy:function(){return this.each(function(){clearTimeout(this.timer);c(this).css("outline",0)})}},g=function(a,b,d){var f=a.reach;d=d>f?0:d;var h=(f-d)/f,e=a.color.split(","),h="rgba("+e[0].split("(")[1]+","+e[1]+","+e[2].split(")")[0]+","+h+")",e={outline:"2px solid "+h};a.glow?(e["box-shadow"]="0px 0px "+parseInt(d/1.5)+"px "+h,userAgent=navigator.userAgent||"",/(chrome)[ \/]([\w.]+)/.test(userAgent.toLowerCase())&&
|
||||
(e["outline-offset"]=d+"px",e["outline-radius"]="100 px")):e["outline-offset"]=d+"px";c(b).css(e);b.timer&&clearTimeout(b.timer);b.timer=setTimeout(function(){if(d>=f&&!a.repeat)return c(b).pulsate("destroy"),!1;if(d>=f&&!0!==a.repeat&&!isNaN(a.repeat)&&0<a.repeat)a.repeat-=1;else if(a.pause&&d>=f)return l(a,b,d+1),!1;g(a,b,d+1)},a.speed/f)},l=function(a,b,c){innerfunc=function(){g(a,b,c)};b.timer=setTimeout(innerfunc,a.pause)};c.fn.pulsate=function(a){if(k[a])return k[a].apply(this,Array.prototype.slice.call(arguments,
|
||||
1));if("object"===typeof a||!a)return k.init.apply(this,arguments);c.error("Method "+a+" does not exist on jQuery.pulsate")}})(jQuery);
|
||||
7
wwwroot/BackendScript/js/jquery.scrollTo.min.js
vendored
Normal file
7
wwwroot/BackendScript/js/jquery.scrollTo.min.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Copyright (c) 2007-2013 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
|
||||
* Dual licensed under MIT and GPL.
|
||||
* @author Ariel Flesler
|
||||
* @version 1.4.6
|
||||
*/
|
||||
;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,targ,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
|
||||
3001
wwwroot/BackendScript/js/jquery.sparkline-11.js
Normal file
3001
wwwroot/BackendScript/js/jquery.sparkline-11.js
Normal file
File diff suppressed because it is too large
Load Diff
3057
wwwroot/BackendScript/js/jquery.sparkline.js
Normal file
3057
wwwroot/BackendScript/js/jquery.sparkline.js
Normal file
File diff suppressed because it is too large
Load Diff
6
wwwroot/BackendScript/js/jquery.steps.min.js
vendored
Normal file
6
wwwroot/BackendScript/js/jquery.steps.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
343
wwwroot/BackendScript/js/jquery.stepy.js
Normal file
343
wwwroot/BackendScript/js/jquery.stepy.js
Normal file
@@ -0,0 +1,343 @@
|
||||
/*!
|
||||
* jQuery Stepy - A Wizard Plugin - http://wbotelhos.com/stepy
|
||||
* ------------------------------------------------------------------------------------
|
||||
*
|
||||
* jQuery Stepy is a plugin based on FormToWizard that generates a customizable wizard.
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
*
|
||||
* @version 1.0.0
|
||||
* @since 2010.07.03
|
||||
* @author Washington Botelho
|
||||
* @documentation wbotelhos.com/stepy
|
||||
* @twitter twitter.com/wbotelhos
|
||||
*
|
||||
* Usage with default values:
|
||||
* ------------------------------------------------------------------------------------
|
||||
* $('#step').stepy();
|
||||
*
|
||||
* <form id="step">
|
||||
* <fieldset title="Step 1">
|
||||
* <legend>description one</legend>
|
||||
* <!-- input fields -->
|
||||
* </fieldset>
|
||||
*
|
||||
* <fieldset title="Step 2">
|
||||
* <legend>description one</legend>
|
||||
* <!-- input fields -->
|
||||
* </fieldset>
|
||||
*
|
||||
* <input type="submit" class="finish" value="Finish!"/>
|
||||
* </form>
|
||||
*
|
||||
*/
|
||||
|
||||
;(function($) {
|
||||
|
||||
var methods = {
|
||||
init: function(options) {
|
||||
return this.each(function() {
|
||||
|
||||
var opt = $.extend({}, $.fn.stepy.defaults, options),
|
||||
$this = $(this).data('options', opt),
|
||||
id = $this.attr('id');
|
||||
|
||||
if (id === undefined || id == '') {
|
||||
id = 'stepy-' + $('.' + $this.attr('class')).index(this);
|
||||
$this.attr('id', id);
|
||||
}
|
||||
|
||||
var $titlesWrapper = $('<ul/>', { id: id + '-titles', 'class': 'stepy-titles clearfix' });
|
||||
|
||||
if (opt.titleTarget) {
|
||||
$(opt.titleTarget).html($titlesWrapper);
|
||||
} else {
|
||||
$titlesWrapper.insertBefore($this);
|
||||
}
|
||||
|
||||
if (opt.validate) {
|
||||
jQuery.validator.setDefaults({ ignore: opt.ignore });
|
||||
|
||||
$this.append('<div class="stepy-error clearfix"/>');
|
||||
}
|
||||
|
||||
var $steps = $this.children('fieldset'),
|
||||
$step = undefined,
|
||||
$legend = undefined,
|
||||
description = '',
|
||||
title = '';
|
||||
|
||||
$steps.each(function(index) {
|
||||
$step = $(this);
|
||||
|
||||
$step
|
||||
.addClass('step')
|
||||
.attr('id', id + '-step-' + index)
|
||||
.append('<p id="' + id + '-buttons-' + index + '" class="' + id + '-buttons"/>');
|
||||
|
||||
$legend = $step.children('legend');
|
||||
|
||||
if (!opt.legend) {
|
||||
$legend.hide();
|
||||
}
|
||||
|
||||
description = '';
|
||||
|
||||
if (opt.description) {
|
||||
if ($legend.length) {
|
||||
description = '<span>' + $legend.html() + '</span>';
|
||||
} else {
|
||||
$.error(id + ': the legend element of the step ' + (index + 1) + ' is required to set the description!');
|
||||
}
|
||||
}
|
||||
|
||||
title = $step.attr('title');
|
||||
title = (title != '') ? '<div>' + title + '</div>': '--';
|
||||
|
||||
$titlesWrapper.append('<li id="' + id + '-title-' + index + '">' + title + description + '</li>');
|
||||
|
||||
if (index == 0) {
|
||||
if ($steps.length > 1) {
|
||||
methods.createNextButton.call($this, index);
|
||||
}
|
||||
} else {
|
||||
methods.createBackButton.call($this, index);
|
||||
|
||||
$step.hide();
|
||||
|
||||
if (index < $steps.length - 1) {
|
||||
methods.createNextButton.call($this, index);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var $titles = $titlesWrapper.children();
|
||||
|
||||
$titles.first().addClass('current-step');
|
||||
|
||||
var $finish = $this.children('.finish');
|
||||
|
||||
if (opt.finishButton) {
|
||||
if ($finish.length) {
|
||||
var isForm = $this.is('form'),
|
||||
onSubmit = undefined;
|
||||
|
||||
if (opt.finish && isForm) {
|
||||
onSubmit = $this.attr('onsubmit');
|
||||
$this.attr('onsubmit', 'return false;');
|
||||
}
|
||||
|
||||
$finish.click(function(evt) {
|
||||
if (opt.finish && !methods.execute.call($this, opt.finish, $steps.length - 1)) {
|
||||
evt.preventDefault();
|
||||
} else {
|
||||
if (isForm) {
|
||||
if (onSubmit) {
|
||||
$this.attr('onsubmit', onSubmit);
|
||||
} else {
|
||||
$this.removeAttr('onsubmit');
|
||||
}
|
||||
|
||||
var isSubmit = $finish.attr('type') == 'submit';
|
||||
|
||||
if (!isSubmit && (!opt.validate || methods.validate.call($this, $steps.length - 1))) {
|
||||
$this.submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$finish.appendTo($this.find('p:last'));
|
||||
} else {
|
||||
$.error(id + ': element with class name "finish" missing!');
|
||||
}
|
||||
}
|
||||
|
||||
if (opt.titleClick) {
|
||||
$titles.click(function() {
|
||||
var array = $titles.filter('.current-step').attr('id').split('-'), // TODO: try keep the number in an attribute.
|
||||
current = parseInt(array[array.length - 1], 10),
|
||||
clicked = $(this).index();
|
||||
|
||||
if (clicked > current) {
|
||||
if (opt.next && !methods.execute.call($this, opt.next, clicked)) {
|
||||
return false;
|
||||
}
|
||||
} else if (clicked < current) {
|
||||
if (opt.back && !methods.execute.call($this, opt.back, clicked)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (clicked != current) {
|
||||
methods.step.call($this, (clicked) + 1);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$titles.css('cursor', 'default');
|
||||
}
|
||||
|
||||
$steps.delegate('input[type="text"], input[type="password"]', 'keypress', function(evt) {
|
||||
var key = (evt.keyCode ? evt.keyCode : evt.which);
|
||||
|
||||
if (key == 13) {
|
||||
evt.preventDefault();
|
||||
|
||||
var $buttons = $(this).parent().children('.' + id + '-buttons');
|
||||
|
||||
if ($buttons.length) {
|
||||
var $next = $buttons.children('.button-next');
|
||||
|
||||
if ($next.length) {
|
||||
$next.click();
|
||||
} else {
|
||||
var $finish = $buttons.children('.finish');
|
||||
|
||||
if ($finish.length) {
|
||||
$finish.click();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$steps.first().find(':input:visible:enabled').first().select().focus();
|
||||
});
|
||||
}, createBackButton: function(index) {
|
||||
var $this = this,
|
||||
id = this.attr('id'),
|
||||
opt = this.data('options');
|
||||
|
||||
$('<a/>', { id: id + '-back-' + index, href: 'javascript:void(0);', 'class': 'button-back btn btn-info', html: opt.backLabel }).click(function() {
|
||||
if (!opt.back || methods.execute.call($this, opt.back, index - 1)) {
|
||||
methods.step.call($this, (index - 1) + 1);
|
||||
}
|
||||
}).appendTo($('#' + id + '-buttons-' + index));
|
||||
}, createNextButton: function(index) {
|
||||
var $this = this,
|
||||
id = this.attr('id'),
|
||||
opt = this.data('options');
|
||||
|
||||
$('<a/>', { id: id + '-next-' + index, href: 'javascript:void(0);', 'class': 'button-next btn btn-info', html: opt.nextLabel }).click(function() {
|
||||
if (!opt.next || methods.execute.call($this, opt.next, index + 1)) {
|
||||
methods.step.call($this, (index + 1) + 1);
|
||||
}
|
||||
}).appendTo($('#' + id + '-buttons-' + index));
|
||||
}, execute: function(callback, index) {
|
||||
var isValid = callback.call(this, index + 1);
|
||||
|
||||
return isValid || isValid === undefined;
|
||||
}, step: function(index) {
|
||||
index--;
|
||||
|
||||
var $steps = this.children('fieldset');
|
||||
|
||||
if (index > $steps.length - 1) {
|
||||
index = $steps.length - 1;
|
||||
}
|
||||
|
||||
var opt = this.data('options');
|
||||
max = index;
|
||||
|
||||
if (opt.validate) {
|
||||
var isValid = true;
|
||||
|
||||
for (var i = 0; i < index; i++) {
|
||||
isValid &= methods.validate.call(this, i);
|
||||
|
||||
if (opt.block && !isValid) {
|
||||
max = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$steps.hide().eq(max).show();
|
||||
|
||||
var $titles = $('#' + this.attr('id') + '-titles').children();
|
||||
|
||||
$titles.removeClass('current-step').eq(max).addClass('current-step');
|
||||
|
||||
if (this.is('form')) {
|
||||
var $fields = undefined;
|
||||
|
||||
if (max == index) {
|
||||
$fields = $steps.eq(max).find(':input:enabled:visible');
|
||||
} else {
|
||||
$fields = $steps.eq(max).find('.error').select().focus();
|
||||
}
|
||||
|
||||
$fields.first().select().focus();
|
||||
}
|
||||
|
||||
if (opt.select) {
|
||||
opt.select.call(this, max + 1);
|
||||
}
|
||||
|
||||
return this;
|
||||
}, validate: function(index) {
|
||||
if (!this.is('form')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var $step = this.children('fieldset').eq(index),
|
||||
isValid = true,
|
||||
$title = $('#' + this.attr('id') + '-titles').children().eq(index),
|
||||
opt = this.data('options'),
|
||||
$validate = this.validate();
|
||||
|
||||
$($step.find(':input:enabled').get().reverse()).each(function() {
|
||||
var fieldIsValid = $validate.element($(this));
|
||||
|
||||
if (fieldIsValid === undefined) {
|
||||
fieldIsValid = true;
|
||||
}
|
||||
|
||||
isValid &= fieldIsValid;
|
||||
|
||||
if (isValid) {
|
||||
if (opt.errorImage) {
|
||||
$title.removeClass('error-image');
|
||||
}
|
||||
} else {
|
||||
if (opt.errorImage) {
|
||||
$title.addClass('error-image');
|
||||
}
|
||||
|
||||
$validate.focusInvalid();
|
||||
}
|
||||
});
|
||||
|
||||
return isValid;
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.stepy = 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.stepy.defaults = {
|
||||
back: undefined,
|
||||
backLabel: '< Back',
|
||||
block: false,
|
||||
description: true,
|
||||
errorImage: false,
|
||||
finish: undefined,
|
||||
finishButton: true,
|
||||
legend: true,
|
||||
ignore: '',
|
||||
next: undefined,
|
||||
nextLabel: 'Next >',
|
||||
titleClick: false,
|
||||
titleTarget: undefined,
|
||||
validate: false,
|
||||
select: undefined
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
355
wwwroot/BackendScript/js/jquery.tagsinput.js
Normal file
355
wwwroot/BackendScript/js/jquery.tagsinput.js
Normal file
@@ -0,0 +1,355 @@
|
||||
/*
|
||||
|
||||
jQuery Tags Input Plugin 1.3.3
|
||||
|
||||
Copyright (c) 2011 XOXCO, Inc
|
||||
|
||||
Documentation for this plugin lives here:
|
||||
http://xoxco.com/clickable/jquery-tags-input
|
||||
|
||||
Licensed under the MIT license:
|
||||
http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
ben@xoxco.com
|
||||
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
var delimiter = new Array();
|
||||
var tags_callbacks = new Array();
|
||||
$.fn.doAutosize = function(o){
|
||||
var minWidth = $(this).data('minwidth'),
|
||||
maxWidth = $(this).data('maxwidth'),
|
||||
val = '',
|
||||
input = $(this),
|
||||
testSubject = $('#'+$(this).data('tester_id'));
|
||||
|
||||
if (val === (val = input.val())) {return;}
|
||||
|
||||
// Enter new content into testSubject
|
||||
var escaped = val.replace(/&/g, '&').replace(/\s/g,' ').replace(/</g, '<').replace(/>/g, '>');
|
||||
testSubject.html(escaped);
|
||||
// Calculate new width + whether to change
|
||||
var testerWidth = testSubject.width(),
|
||||
newWidth = (testerWidth + o.comfortZone) >= minWidth ? testerWidth + o.comfortZone : minWidth,
|
||||
currentWidth = input.width(),
|
||||
isValidWidthChange = (newWidth < currentWidth && newWidth >= minWidth)
|
||||
|| (newWidth > minWidth && newWidth < maxWidth);
|
||||
|
||||
// Animate width
|
||||
if (isValidWidthChange) {
|
||||
input.width(newWidth);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
$.fn.resetAutosize = function(options){
|
||||
// alert(JSON.stringify(options));
|
||||
var minWidth = $(this).data('minwidth') || options.minInputWidth || $(this).width(),
|
||||
maxWidth = $(this).data('maxwidth') || options.maxInputWidth || ($(this).closest('.tagsinput').width() - options.inputPadding),
|
||||
val = '',
|
||||
input = $(this),
|
||||
testSubject = $('<tester/>').css({
|
||||
position: 'absolute',
|
||||
top: -9999,
|
||||
left: -9999,
|
||||
width: 'auto',
|
||||
fontSize: input.css('fontSize'),
|
||||
fontFamily: input.css('fontFamily'),
|
||||
fontWeight: input.css('fontWeight'),
|
||||
letterSpacing: input.css('letterSpacing'),
|
||||
whiteSpace: 'nowrap'
|
||||
}),
|
||||
testerId = $(this).attr('id')+'_autosize_tester';
|
||||
if(! $('#'+testerId).length > 0){
|
||||
testSubject.attr('id', testerId);
|
||||
testSubject.appendTo('body');
|
||||
}
|
||||
|
||||
input.data('minwidth', minWidth);
|
||||
input.data('maxwidth', maxWidth);
|
||||
input.data('tester_id', testerId);
|
||||
input.css('width', minWidth);
|
||||
};
|
||||
|
||||
$.fn.addTag = function(value,options) {
|
||||
options = jQuery.extend({focus:false,callback:true},options);
|
||||
this.each(function() {
|
||||
var id = $(this).attr('id');
|
||||
|
||||
var tagslist = $(this).val().split(delimiter[id]);
|
||||
if (tagslist[0] == '') {
|
||||
tagslist = new Array();
|
||||
}
|
||||
|
||||
value = jQuery.trim(value);
|
||||
|
||||
if (options.unique) {
|
||||
var skipTag = $(this).tagExist(value);
|
||||
if(skipTag == true) {
|
||||
//Marks fake input as not_valid to let styling it
|
||||
$('#'+id+'_tag').addClass('not_valid');
|
||||
}
|
||||
} else {
|
||||
var skipTag = false;
|
||||
}
|
||||
|
||||
if (value !='' && skipTag != true) {
|
||||
$('<span>').addClass('tag').append(
|
||||
$('<span>').text(value).append(' '),
|
||||
$('<a class="tagsinput-remove-link">', {
|
||||
href : '#',
|
||||
title : 'Remove tag',
|
||||
text : ''
|
||||
}).click(function () {
|
||||
return $('#' + id).removeTag(escape(value));
|
||||
})
|
||||
).insertBefore('#' + id + '_addTag');
|
||||
|
||||
tagslist.push(value);
|
||||
|
||||
$('#'+id+'_tag').val('');
|
||||
if (options.focus) {
|
||||
$('#'+id+'_tag').focus();
|
||||
} else {
|
||||
$('#'+id+'_tag').blur();
|
||||
}
|
||||
|
||||
$.fn.tagsInput.updateTagsField(this,tagslist);
|
||||
|
||||
if (options.callback && tags_callbacks[id] && tags_callbacks[id]['onAddTag']) {
|
||||
var f = tags_callbacks[id]['onAddTag'];
|
||||
f.call(this, value);
|
||||
}
|
||||
if(tags_callbacks[id] && tags_callbacks[id]['onChange'])
|
||||
{
|
||||
var i = tagslist.length;
|
||||
var f = tags_callbacks[id]['onChange'];
|
||||
f.call(this, $(this), tagslist[i-1]);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
$.fn.removeTag = function(value) {
|
||||
value = unescape(value);
|
||||
this.each(function() {
|
||||
var id = $(this).attr('id');
|
||||
|
||||
var old = $(this).val().split(delimiter[id]);
|
||||
|
||||
$('#'+id+'_tagsinput .tag').remove();
|
||||
str = '';
|
||||
for (i=0; i< old.length; i++) {
|
||||
if (old[i]!=value) {
|
||||
str = str + delimiter[id] +old[i];
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.tagsInput.importTags(this,str);
|
||||
|
||||
if (tags_callbacks[id] && tags_callbacks[id]['onRemoveTag']) {
|
||||
var f = tags_callbacks[id]['onRemoveTag'];
|
||||
f.call(this, value);
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
$.fn.tagExist = function(val) {
|
||||
var id = $(this).attr('id');
|
||||
var tagslist = $(this).val().split(delimiter[id]);
|
||||
return (jQuery.inArray(val, tagslist) >= 0); //true when tag exists, false when not
|
||||
};
|
||||
|
||||
// clear all existing tags and import new ones from a string
|
||||
$.fn.importTags = function(str) {
|
||||
id = $(this).attr('id');
|
||||
$('#'+id+'_tagsinput .tag').remove();
|
||||
$.fn.tagsInput.importTags(this,str);
|
||||
}
|
||||
|
||||
$.fn.tagsInput = function(options) {
|
||||
var settings = jQuery.extend({
|
||||
interactive:true,
|
||||
defaultText:'',
|
||||
minChars:0,
|
||||
width:'',
|
||||
height:'',
|
||||
autocomplete: {selectFirst: false },
|
||||
'hide':true,
|
||||
'delimiter':',',
|
||||
'unique':true,
|
||||
removeWithBackspace:true,
|
||||
placeholderColor:'#666666',
|
||||
autosize: true,
|
||||
comfortZone: 20,
|
||||
inputPadding: 6*2
|
||||
},options);
|
||||
|
||||
this.each(function() {
|
||||
if (settings.hide) {
|
||||
$(this).hide();
|
||||
}
|
||||
var id = $(this).attr('id');
|
||||
if (!id || delimiter[$(this).attr('id')]) {
|
||||
id = $(this).attr('id', 'tags' + new Date().getTime()).attr('id');
|
||||
}
|
||||
|
||||
var data = jQuery.extend({
|
||||
pid:id,
|
||||
real_input: '#'+id,
|
||||
holder: '#'+id+'_tagsinput',
|
||||
input_wrapper: '#'+id+'_addTag',
|
||||
fake_input: '#'+id+'_tag'
|
||||
},settings);
|
||||
|
||||
delimiter[id] = data.delimiter;
|
||||
|
||||
if (settings.onAddTag || settings.onRemoveTag || settings.onChange) {
|
||||
tags_callbacks[id] = new Array();
|
||||
tags_callbacks[id]['onAddTag'] = settings.onAddTag;
|
||||
tags_callbacks[id]['onRemoveTag'] = settings.onRemoveTag;
|
||||
tags_callbacks[id]['onChange'] = settings.onChange;
|
||||
}
|
||||
|
||||
var containerClass = $('#'+id).attr('class').replace('tagsinput', '');
|
||||
var markup = '<div id="'+id+'_tagsinput" class="tagsinput '+containerClass+'"><div class="tagsinput-add-container" id="'+id+'_addTag"><div class="tagsinput-add"></div>';
|
||||
|
||||
if (settings.interactive) {
|
||||
markup = markup + '<input id="'+id+'_tag" value="" data-default="'+settings.defaultText+'" />';
|
||||
}
|
||||
|
||||
markup = markup + '</div></div>';
|
||||
|
||||
$(markup).insertAfter(this);
|
||||
|
||||
$(data.holder).css('width',settings.width);
|
||||
$(data.holder).css('min-height',settings.height);
|
||||
$(data.holder).css('height','100%');
|
||||
|
||||
if ($(data.real_input).val()!='') {
|
||||
$.fn.tagsInput.importTags($(data.real_input),$(data.real_input).val());
|
||||
}
|
||||
if (settings.interactive) {
|
||||
$(data.fake_input).val($(data.fake_input).attr('data-default'));
|
||||
$(data.fake_input).css('color',settings.placeholderColor);
|
||||
$(data.fake_input).resetAutosize(settings);
|
||||
|
||||
$(data.holder).bind('click',data,function(event) {
|
||||
$(event.data.fake_input).focus();
|
||||
});
|
||||
|
||||
$(data.fake_input).bind('focus',data,function(event) {
|
||||
if ($(event.data.fake_input).val()==$(event.data.fake_input).attr('data-default')) {
|
||||
$(event.data.fake_input).val('');
|
||||
}
|
||||
$(event.data.fake_input).css('color','#000000');
|
||||
});
|
||||
|
||||
if (settings.autocomplete_url != undefined) {
|
||||
autocomplete_options = {source: settings.autocomplete_url};
|
||||
for (attrname in settings.autocomplete) {
|
||||
autocomplete_options[attrname] = settings.autocomplete[attrname];
|
||||
}
|
||||
|
||||
if (jQuery.Autocompleter !== undefined) {
|
||||
$(data.fake_input).autocomplete(settings.autocomplete_url, settings.autocomplete);
|
||||
$(data.fake_input).bind('result',data,function(event,data,formatted) {
|
||||
if (data) {
|
||||
$('#'+id).addTag(data[0] + "",{focus:true,unique:(settings.unique)});
|
||||
}
|
||||
});
|
||||
} else if (jQuery.ui.autocomplete !== undefined) {
|
||||
$(data.fake_input).autocomplete(autocomplete_options);
|
||||
$(data.fake_input).bind('autocompleteselect',data,function(event,ui) {
|
||||
$(event.data.real_input).addTag(ui.item.value,{focus:true,unique:(settings.unique)});
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
// if a user tabs out of the field, create a new tag
|
||||
// this is only available if autocomplete is not used.
|
||||
$(data.fake_input).bind('blur',data,function(event) {
|
||||
var d = $(this).attr('data-default');
|
||||
if ($(event.data.fake_input).val()!='' && $(event.data.fake_input).val()!=d) {
|
||||
if( (event.data.minChars <= $(event.data.fake_input).val().length) && (!event.data.maxChars || (event.data.maxChars >= $(event.data.fake_input).val().length)) )
|
||||
$(event.data.real_input).addTag($(event.data.fake_input).val(),{focus:true,unique:(settings.unique)});
|
||||
} else {
|
||||
$(event.data.fake_input).val($(event.data.fake_input).attr('data-default'));
|
||||
$(event.data.fake_input).css('color',settings.placeholderColor);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
// if user types a comma, create a new tag
|
||||
$(data.fake_input).bind('keypress',data,function(event) {
|
||||
if (event.which==event.data.delimiter.charCodeAt(0) || event.which==13 ) {
|
||||
event.preventDefault();
|
||||
if( (event.data.minChars <= $(event.data.fake_input).val().length) && (!event.data.maxChars || (event.data.maxChars >= $(event.data.fake_input).val().length)) )
|
||||
$(event.data.real_input).addTag($(event.data.fake_input).val(),{focus:true,unique:(settings.unique)});
|
||||
$(event.data.fake_input).resetAutosize(settings);
|
||||
return false;
|
||||
} else if (event.data.autosize) {
|
||||
$(event.data.fake_input).doAutosize(settings);
|
||||
|
||||
}
|
||||
});
|
||||
//Delete last tag on backspace
|
||||
data.removeWithBackspace && $(data.fake_input).bind('keydown', function(event)
|
||||
{
|
||||
if(event.keyCode == 8 && $(this).val() == '')
|
||||
{
|
||||
event.preventDefault();
|
||||
var last_tag = $(this).closest('.tagsinput').find('.tag:last').text();
|
||||
var id = $(this).attr('id').replace(/_tag$/, '');
|
||||
last_tag = last_tag.replace(/[\s\u00a0]+x$/, '');
|
||||
$('#' + id).removeTag(escape(last_tag));
|
||||
$(this).trigger('focus');
|
||||
}
|
||||
});
|
||||
$(data.fake_input).blur();
|
||||
|
||||
//Removes the not_valid class when user changes the value of the fake input
|
||||
if(data.unique) {
|
||||
$(data.fake_input).keydown(function(event){
|
||||
if(event.keyCode == 8 || String.fromCharCode(event.which).match(/\w+|[áéíóúÁÉÍÓÚñÑ,/]+/)) {
|
||||
$(this).removeClass('not_valid');
|
||||
}
|
||||
});
|
||||
}
|
||||
} // if settings.interactive
|
||||
});
|
||||
|
||||
return this;
|
||||
|
||||
};
|
||||
|
||||
$.fn.tagsInput.updateTagsField = function(obj,tagslist) {
|
||||
var id = $(obj).attr('id');
|
||||
$(obj).val(tagslist.join(delimiter[id]));
|
||||
};
|
||||
|
||||
$.fn.tagsInput.importTags = function(obj,val) {
|
||||
$(obj).val('');
|
||||
var id = $(obj).attr('id');
|
||||
var tags = val.split(delimiter[id]);
|
||||
for (i=0; i<tags.length; i++) {
|
||||
$(obj).addTag(tags[i],{focus:false,callback:false});
|
||||
}
|
||||
if(tags_callbacks[id] && tags_callbacks[id]['onChange'])
|
||||
{
|
||||
var f = tags_callbacks[id]['onChange'];
|
||||
f.call(obj, obj, tags[i]);
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
11
wwwroot/BackendScript/js/jquery.ui.touch-punch.min.js
vendored
Normal file
11
wwwroot/BackendScript/js/jquery.ui.touch-punch.min.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* jQuery UI Touch Punch 0.2.2
|
||||
*
|
||||
* Copyright 2011, Dave Furfero
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.widget.js
|
||||
* jquery.ui.mouse.js
|
||||
*/
|
||||
(function(b){b.support.touch="ontouchend" in document;if(!b.support.touch){return;}var c=b.ui.mouse.prototype,e=c._mouseInit,a;function d(g,h){if(g.originalEvent.touches.length>1){return;}g.preventDefault();var i=g.originalEvent.changedTouches[0],f=document.createEvent("MouseEvents");f.initMouseEvent(h,true,true,window,1,i.screenX,i.screenY,i.clientX,i.clientY,false,false,false,false,0,null);g.target.dispatchEvent(f);}c._touchStart=function(g){var f=this;if(a||!f._mouseCapture(g.originalEvent.changedTouches[0])){return;}a=true;f._touchMoved=false;d(g,"mouseover");d(g,"mousemove");d(g,"mousedown");};c._touchMove=function(f){if(!a){return;}this._touchMoved=true;d(f,"mousemove");};c._touchEnd=function(f){if(!a){return;}d(f,"mouseup");d(f,"mouseout");if(!this._touchMoved){d(f,"click");}a=false;};c._mouseInit=function(){var f=this;f.element.bind("touchstart",b.proxy(f,"_touchStart")).bind("touchmove",b.proxy(f,"_touchMove")).bind("touchend",b.proxy(f,"_touchEnd"));e.call(f);};})(jQuery);
|
||||
2
wwwroot/BackendScript/js/jquery.validate.min.js
vendored
Normal file
2
wwwroot/BackendScript/js/jquery.validate.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
725
wwwroot/BackendScript/js/loadingoverlay.js
Normal file
725
wwwroot/BackendScript/js/loadingoverlay.js
Normal file
@@ -0,0 +1,725 @@
|
||||
/***************************************************************************************************
|
||||
LoadingOverlay - A flexible loading overlay jQuery plugin
|
||||
Author : Gaspare Sganga
|
||||
Version : 2.1.6
|
||||
License : MIT
|
||||
Documentation : https://gasparesganga.com/labs/jquery-loading-overlay/
|
||||
***************************************************************************************************/
|
||||
;(function(factory){
|
||||
if (typeof define === "function" && define.amd) {
|
||||
// AMD. Register as an anonymous module
|
||||
define(["jquery"], factory);
|
||||
} else if (typeof module === "object" && module.exports) {
|
||||
// Node/CommonJS
|
||||
factory(require("jquery"));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($, undefined){
|
||||
"use strict";
|
||||
|
||||
// Default Settings
|
||||
var _defaults = {
|
||||
// Background
|
||||
background : "rgba(255, 255, 255, 0.8)",
|
||||
backgroundClass : "",
|
||||
// Image
|
||||
image : "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000'><circle r='80' cx='500' cy='90'/><circle r='80' cx='500' cy='910'/><circle r='80' cx='90' cy='500'/><circle r='80' cx='910' cy='500'/><circle r='80' cx='212' cy='212'/><circle r='80' cx='788' cy='212'/><circle r='80' cx='212' cy='788'/><circle r='80' cx='788' cy='788'/></svg>",
|
||||
imageAnimation : "2000ms rotate_right",
|
||||
imageAutoResize : true,
|
||||
imageResizeFactor : 1,
|
||||
imageColor : "#202020",
|
||||
imageClass : "",
|
||||
imageOrder : 1,
|
||||
// Font Awesome
|
||||
fontawesome : "",
|
||||
fontawesomeAnimation : "",
|
||||
fontawesomeAutoResize : true,
|
||||
fontawesomeResizeFactor : 1,
|
||||
fontawesomeColor : "#202020",
|
||||
fontawesomeOrder : 2,
|
||||
// Custom
|
||||
custom : "",
|
||||
customAnimation : "",
|
||||
customAutoResize : true,
|
||||
customResizeFactor : 1,
|
||||
customOrder : 3,
|
||||
// Text
|
||||
text : "",
|
||||
textAnimation : "",
|
||||
textAutoResize : true,
|
||||
textResizeFactor : 0.5,
|
||||
textColor : "#202020",
|
||||
textClass : "",
|
||||
textOrder : 4,
|
||||
// Progress
|
||||
progress : false,
|
||||
progressAutoResize : true,
|
||||
progressResizeFactor : 0.25,
|
||||
progressColor : "#a0a0a0",
|
||||
progressClass : "",
|
||||
progressOrder : 5,
|
||||
progressFixedPosition : "",
|
||||
progressSpeed : 200,
|
||||
progressMin : 0,
|
||||
progressMax : 100,
|
||||
// Sizing
|
||||
size : 50,
|
||||
maxSize : 120,
|
||||
minSize : 20,
|
||||
// Misc
|
||||
direction : "column",
|
||||
fade : true,
|
||||
resizeInterval : 50,
|
||||
zIndex : 2147483647
|
||||
};
|
||||
|
||||
// Required CSS
|
||||
var _css = {
|
||||
overlay : {
|
||||
"box-sizing" : "border-box",
|
||||
"position" : "relative",
|
||||
"display" : "flex",
|
||||
"flex-wrap" : "nowrap",
|
||||
"align-items" : "center",
|
||||
"justify-content" : "space-around"
|
||||
},
|
||||
element : {
|
||||
"box-sizing" : "border-box",
|
||||
"overflow" : "visible",
|
||||
"flex" : "0 0 auto",
|
||||
"display" : "flex",
|
||||
"justify-content" : "center",
|
||||
"align-items" : "center"
|
||||
},
|
||||
element_svg : {
|
||||
"width" : "100%",
|
||||
"height" : "100%"
|
||||
},
|
||||
progress_fixed : {
|
||||
"position" : "absolute",
|
||||
"left" : "0",
|
||||
"width" : "100%"
|
||||
},
|
||||
progress_wrapper : {
|
||||
"position" : "absolute",
|
||||
"top" : "0",
|
||||
"left" : "0",
|
||||
"width" : "100%",
|
||||
"height" : "100%"
|
||||
},
|
||||
progress_bar : {
|
||||
"position" : "absolute",
|
||||
"left" : "0"
|
||||
}
|
||||
};
|
||||
|
||||
// Data Template
|
||||
var _dataTemplate = {
|
||||
"count" : 0,
|
||||
"container" : undefined,
|
||||
"settings" : undefined,
|
||||
"wholePage" : undefined,
|
||||
"resizeIntervalId" : undefined,
|
||||
"text" : undefined,
|
||||
"progress" : undefined
|
||||
};
|
||||
|
||||
// Whitelists
|
||||
var _whitelists = {
|
||||
animations : [
|
||||
"rotate_right",
|
||||
"rotate_left",
|
||||
"fadein",
|
||||
"pulse"
|
||||
],
|
||||
progressPosition : [
|
||||
"top",
|
||||
"bottom"
|
||||
]
|
||||
};
|
||||
|
||||
// Default Values
|
||||
var _defaultValues = {
|
||||
animations : {
|
||||
name : "rotate_right",
|
||||
time : "2000ms"
|
||||
},
|
||||
fade : [400, 200]
|
||||
};
|
||||
|
||||
|
||||
$.LoadingOverlaySetup = function(settings){
|
||||
$.extend(true, _defaults, settings);
|
||||
};
|
||||
|
||||
$.LoadingOverlay = function(action, options){
|
||||
switch (action.toLowerCase()) {
|
||||
case "show":
|
||||
var settings = $.extend(true, {}, _defaults, options);
|
||||
Show("body", settings);
|
||||
break;
|
||||
|
||||
case "hide":
|
||||
Hide("body", options);
|
||||
break;
|
||||
|
||||
case "resize":
|
||||
Resize("body", options);
|
||||
break;
|
||||
|
||||
case "text":
|
||||
Text("body", options);
|
||||
break;
|
||||
|
||||
case "progress":
|
||||
Progress("body", options);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.LoadingOverlay = function(action, options){
|
||||
switch (action.toLowerCase()) {
|
||||
case "show":
|
||||
var settings = $.extend(true, {}, _defaults, options);
|
||||
return this.each(function(){
|
||||
Show(this, settings);
|
||||
});
|
||||
|
||||
case "hide":
|
||||
return this.each(function(){
|
||||
Hide(this, options);
|
||||
});
|
||||
|
||||
case "resize":
|
||||
return this.each(function(){
|
||||
Resize(this, options);
|
||||
});
|
||||
|
||||
case "text":
|
||||
return this.each(function(){
|
||||
Text(this, options);
|
||||
});
|
||||
|
||||
case "progress":
|
||||
return this.each(function(){
|
||||
Progress(this, options);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
function Show(container, settings){
|
||||
container = $(container);
|
||||
settings.size = _ParseSize(settings.size);
|
||||
settings.maxSize = parseInt(settings.maxSize, 10) || 0;
|
||||
settings.minSize = parseInt(settings.minSize, 10) || 0;
|
||||
settings.resizeInterval = parseInt(settings.resizeInterval, 10) || 0;
|
||||
|
||||
var overlay = _GetOverlay(container);
|
||||
var data = _GetData(container);
|
||||
if (data === false) {
|
||||
// Init data
|
||||
data = $.extend({}, _dataTemplate);
|
||||
data.container = container;
|
||||
data.wholePage = container.is("body");
|
||||
|
||||
// Overlay
|
||||
overlay = $("<div>", {
|
||||
"class" : "loadingoverlay"
|
||||
})
|
||||
.css(_css.overlay)
|
||||
.css("flex-direction", settings.direction.toLowerCase() === "row" ? "row" : "column");
|
||||
if (settings.backgroundClass) {
|
||||
overlay.addClass(settings.backgroundClass);
|
||||
} else {
|
||||
overlay.css("background", settings.background);
|
||||
}
|
||||
if (data.wholePage) {
|
||||
overlay.css({
|
||||
"position" : "fixed",
|
||||
"top" : 0,
|
||||
"left" : 0,
|
||||
"width" : "100%",
|
||||
"height" : "100%"
|
||||
});
|
||||
}
|
||||
if (typeof settings.zIndex !== "undefined") overlay.css("z-index", settings.zIndex);
|
||||
|
||||
// Image
|
||||
if (settings.image) {
|
||||
if ($.isArray(settings.imageColor)) {
|
||||
if (settings.imageColor.length === 0) {
|
||||
settings.imageColor = false;
|
||||
} else if (settings.imageColor.length === 1) {
|
||||
settings.imageColor = {
|
||||
"fill" : settings.imageColor[0]
|
||||
};
|
||||
} else {
|
||||
settings.imageColor = {
|
||||
"fill" : settings.imageColor[0],
|
||||
"stroke" : settings.imageColor[1]
|
||||
};
|
||||
}
|
||||
} else if (settings.imageColor) {
|
||||
settings.imageColor = {
|
||||
"fill" : settings.imageColor
|
||||
};
|
||||
}
|
||||
var element = _CreateElement(overlay, settings.imageOrder, settings.imageAutoResize, settings.imageResizeFactor, settings.imageAnimation);
|
||||
if (settings.image.slice(0, 4).toLowerCase() === "<svg" && settings.image.slice(-6).toLowerCase() === "</svg>") {
|
||||
// Inline SVG
|
||||
element.append(settings.image);
|
||||
element.children().css(_css.element_svg);
|
||||
if (!settings.imageClass && settings.imageColor) element.find("*").css(settings.imageColor);
|
||||
} else if (settings.image.slice(-4).toLowerCase() === ".svg" || settings.image.slice(0, 14).toLowerCase() === "data:image/svg") {
|
||||
// SVG file or base64-encoded SVG
|
||||
$.ajax({
|
||||
url : settings.image,
|
||||
type : "GET",
|
||||
dataType : "html",
|
||||
global : false
|
||||
}).done(function(data){
|
||||
element.html(data);
|
||||
element.children().css(_css.element_svg);
|
||||
if (!settings.imageClass && settings.imageColor) element.find("*").css(settings.imageColor);
|
||||
});
|
||||
} else {
|
||||
// Raster
|
||||
element.css({
|
||||
"background-image" : "url(" + settings.image + ")",
|
||||
"background-position" : "center",
|
||||
"background-repeat" : "no-repeat",
|
||||
"background-size" : "cover"
|
||||
});
|
||||
}
|
||||
if (settings.imageClass) element.addClass(settings.imageClass);
|
||||
}
|
||||
|
||||
// Font Awesome
|
||||
if (settings.fontawesome) {
|
||||
var element = _CreateElement(overlay, settings.fontawesomeOrder, settings.fontawesomeAutoResize, settings.fontawesomeResizeFactor, settings.fontawesomeAnimation)
|
||||
.addClass("loadingoverlay_fa");
|
||||
$("<div>", {
|
||||
"class" : settings.fontawesome
|
||||
}).appendTo(element);
|
||||
if (settings.fontawesomeColor) element.css("color", settings.fontawesomeColor);
|
||||
}
|
||||
|
||||
// Custom
|
||||
if (settings.custom) {
|
||||
var element = _CreateElement(overlay, settings.customOrder, settings.customAutoResize, settings.customResizeFactor, settings.customAnimation)
|
||||
.append(settings.custom);
|
||||
}
|
||||
|
||||
// Text
|
||||
if (settings.text) {
|
||||
data.text = _CreateElement(overlay, settings.textOrder, settings.textAutoResize, settings.textResizeFactor, settings.textAnimation)
|
||||
.addClass("loadingoverlay_text")
|
||||
.text(settings.text);
|
||||
if (settings.textClass) {
|
||||
data.text.addClass(settings.textClass);
|
||||
} else if (settings.textColor) {
|
||||
data.text.css("color", settings.textColor);
|
||||
}
|
||||
}
|
||||
|
||||
// Progress
|
||||
if (settings.progress) {
|
||||
var element = _CreateElement(overlay, settings.progressOrder, settings.progressAutoResize, settings.progressResizeFactor, false)
|
||||
.addClass("loadingoverlay_progress");
|
||||
var wrapper = $("<div>")
|
||||
.css(_css.progress_wrapper)
|
||||
.appendTo(element);
|
||||
data.progress = {
|
||||
bar : $("<div>").css(_css.progress_bar).appendTo(wrapper),
|
||||
fixed : false,
|
||||
margin : 0,
|
||||
min : parseFloat(settings.progressMin),
|
||||
max : parseFloat(settings.progressMax),
|
||||
speed : parseInt(settings.progressSpeed, 10)
|
||||
};
|
||||
var progressPositionParts = (settings.progressFixedPosition + "").replace(/\s\s+/g, " ").toLowerCase().split(" ");
|
||||
if (progressPositionParts.length === 2 && _ValidateProgressPosition(progressPositionParts[0])) {
|
||||
data.progress.fixed = progressPositionParts[0];
|
||||
data.progress.margin = _ParseSize(progressPositionParts[1]);
|
||||
} else if (progressPositionParts.length === 2 && _ValidateProgressPosition(progressPositionParts[1])) {
|
||||
data.progress.fixed = progressPositionParts[1];
|
||||
data.progress.margin = _ParseSize(progressPositionParts[0]);
|
||||
} else if (progressPositionParts.length === 1 && _ValidateProgressPosition(progressPositionParts[0])) {
|
||||
data.progress.fixed = progressPositionParts[0];
|
||||
data.progress.margin = 0;
|
||||
}
|
||||
if (data.progress.fixed === "top") {
|
||||
element
|
||||
.css(_css.progress_fixed)
|
||||
.css("top", data.progress.margin ? data.progress.margin.value + (data.progress.margin.fixed ? data.progress.margin.units : "%") : 0);
|
||||
} else if (data.progress.fixed === "bottom") {
|
||||
element
|
||||
.css(_css.progress_fixed)
|
||||
.css("top", "auto");
|
||||
}
|
||||
if (settings.progressClass) {
|
||||
data.progress.bar.addClass(settings.progressClass);
|
||||
} else if (settings.progressColor) {
|
||||
data.progress.bar.css("background", settings.progressColor);
|
||||
}
|
||||
}
|
||||
|
||||
// Fade
|
||||
if (!settings.fade) {
|
||||
settings.fade = [0, 0];
|
||||
} else if (settings.fade === true) {
|
||||
settings.fade = _defaultValues.fade;
|
||||
} else if (typeof settings.fade === "string" || typeof settings.fade === "number") {
|
||||
settings.fade = [settings.fade, settings.fade];
|
||||
} else if ($.isArray(settings.fade) && settings.fade.length < 2) {
|
||||
settings.fade = [settings.fade[0], settings.fade[0]];
|
||||
}
|
||||
settings.fade = [parseInt(settings.fade[0], 10), parseInt(settings.fade[1], 10)]
|
||||
|
||||
|
||||
// Save settings
|
||||
data.settings = settings;
|
||||
// Save data
|
||||
overlay.data("loadingoverlay_data", data);
|
||||
// Save reference to overlay
|
||||
container.data("loadingoverlay", overlay);
|
||||
|
||||
|
||||
// Resize
|
||||
overlay
|
||||
.fadeTo(0, 0.01)
|
||||
.appendTo("body");
|
||||
_IntervalResize(container, true);
|
||||
if (settings.resizeInterval > 0) {
|
||||
data.resizeIntervalId = setInterval(function(){
|
||||
_IntervalResize(container, false);
|
||||
}, settings.resizeInterval);
|
||||
}
|
||||
|
||||
// Show LoadingOverlay
|
||||
overlay.fadeTo(settings.fade[0], 1);
|
||||
}
|
||||
data.count++;
|
||||
}
|
||||
|
||||
function Hide(container, force){
|
||||
container = $(container);
|
||||
var overlay = _GetOverlay(container);
|
||||
var data = _GetData(container);
|
||||
if (data === false) return;
|
||||
|
||||
data.count--;
|
||||
if (force || data.count <= 0) {
|
||||
overlay.animate({
|
||||
"opacity" : 0
|
||||
}, data.settings.fade[1], function(){
|
||||
if (data.resizeIntervalId) clearInterval(data.resizeIntervalId);
|
||||
$(this).remove();
|
||||
container.removeData("loadingoverlay");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function Resize(container){
|
||||
_IntervalResize($(container), true);
|
||||
}
|
||||
|
||||
function Text(container, value){
|
||||
container = $(container);
|
||||
var data = _GetData(container);
|
||||
if (data === false || !data.text) return;
|
||||
|
||||
if (value === false) {
|
||||
data.text.hide();
|
||||
} else {
|
||||
data.text
|
||||
.show()
|
||||
.text(value);
|
||||
}
|
||||
}
|
||||
|
||||
function Progress(container, value){
|
||||
container = $(container);
|
||||
var data = _GetData(container);
|
||||
if (data === false || !data.progress) return;
|
||||
|
||||
if (value === false) {
|
||||
data.progress.bar.hide();
|
||||
} else {
|
||||
var v = ((parseFloat(value) || 0) - data.progress.min) * 100 / (data.progress.max - data.progress.min);
|
||||
if (v < 0) v = 0;
|
||||
if (v > 100) v = 100;
|
||||
data.progress.bar
|
||||
.show()
|
||||
.animate({
|
||||
"width" : v + "%"
|
||||
}, data.progress.speed);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function _IntervalResize(container, force){
|
||||
var overlay = _GetOverlay(container);
|
||||
var data = _GetData(container);
|
||||
if (data === false) return;
|
||||
|
||||
// Overlay
|
||||
if (!data.wholePage) {
|
||||
var isFixed = container.css("position") === "fixed";
|
||||
var pos = isFixed ? container[0].getBoundingClientRect() : container.offset();
|
||||
overlay.css({
|
||||
"position" : isFixed ? "fixed" : "absolute",
|
||||
"top" : pos.top + parseInt(container.css("border-top-width"), 10),
|
||||
"left" : pos.left + parseInt(container.css("border-left-width"), 10),
|
||||
"width" : container.innerWidth(),
|
||||
"height" : container.innerHeight()
|
||||
});
|
||||
}
|
||||
|
||||
// Elements
|
||||
if (data.settings.size) {
|
||||
var c = data.wholePage ? $(window) : container;
|
||||
var size = data.settings.size.value;
|
||||
if (!data.settings.size.fixed) {
|
||||
size = Math.min(c.innerWidth(), c.innerHeight()) * size / 100;
|
||||
if (data.settings.maxSize && size > data.settings.maxSize) size = data.settings.maxSize;
|
||||
if (data.settings.minSize && size < data.settings.minSize) size = data.settings.minSize;
|
||||
}
|
||||
overlay.children(".loadingoverlay_element").each(function(){
|
||||
var $this = $(this);
|
||||
if (force || $this.data("loadingoverlay_autoresize")) {
|
||||
var resizeFactor = $this.data("loadingoverlay_resizefactor");
|
||||
if ($this.hasClass("loadingoverlay_fa") || $this.hasClass("loadingoverlay_text")) {
|
||||
$this.css("font-size", (size * resizeFactor) + data.settings.size.units);
|
||||
} else if ($this.hasClass("loadingoverlay_progress")) {
|
||||
data.progress.bar.css("height", (size * resizeFactor) + data.settings.size.units);
|
||||
if (!data.progress.fixed) {
|
||||
data.progress.bar
|
||||
.css("top", $this.position().top)
|
||||
.css("top", "-=" + (size * resizeFactor * 0.5) + data.settings.size.units);
|
||||
} else if (data.progress.fixed === "bottom") {
|
||||
$this
|
||||
.css("bottom", data.progress.margin ? data.progress.margin.value + (data.progress.margin.fixed ? data.progress.margin.units : "%") : 0)
|
||||
.css("bottom", "+=" + (size * resizeFactor) + data.settings.size.units);
|
||||
}
|
||||
} else {
|
||||
$this.css({
|
||||
"width" : (size * resizeFactor) + data.settings.size.units,
|
||||
"height" : (size * resizeFactor) + data.settings.size.units
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function _GetOverlay(container){
|
||||
return container.data("loadingoverlay");
|
||||
}
|
||||
|
||||
function _GetData(container){
|
||||
var overlay = _GetOverlay(container);
|
||||
var data = (typeof overlay === "undefined") ? undefined : overlay.data("loadingoverlay_data");
|
||||
if (typeof data === "undefined") {
|
||||
// Clean DOM
|
||||
$(".loadingoverlay").each(function(){
|
||||
var $this = $(this);
|
||||
var data = $this.data("loadingoverlay_data");
|
||||
if (!document.body.contains(data.container[0])) {
|
||||
if (data.resizeIntervalId) clearInterval(data.resizeIntervalId);
|
||||
$this.remove();
|
||||
}
|
||||
});
|
||||
return false;
|
||||
} else {
|
||||
overlay.toggle(container.is(":visible"));
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function _CreateElement(overlay, order, autoResize, resizeFactor, animation){
|
||||
var element = $("<div>", {
|
||||
"class" : "loadingoverlay_element",
|
||||
"css" : {
|
||||
"order" : order
|
||||
}
|
||||
})
|
||||
.css(_css.element)
|
||||
.data({
|
||||
"loadingoverlay_autoresize" : autoResize,
|
||||
"loadingoverlay_resizefactor" : resizeFactor
|
||||
})
|
||||
.appendTo(overlay);
|
||||
|
||||
// Parse animation
|
||||
if (animation === true) animation = _defaultValues.animations.time + " " + _defaultValues.animations.name;
|
||||
if (typeof animation === "string") {
|
||||
var animationName;
|
||||
var animationTime;
|
||||
var parts = animation.replace(/\s\s+/g, " ").toLowerCase().split(" ");
|
||||
if (parts.length === 2 && _ValidateCssTime(parts[0]) && _ValidateAnimation(parts[1])) {
|
||||
animationName = parts[1];
|
||||
animationTime = parts[0];
|
||||
} else if (parts.length === 2 && _ValidateCssTime(parts[1]) && _ValidateAnimation(parts[0])) {
|
||||
animationName = parts[0];
|
||||
animationTime = parts[1];
|
||||
} else if (parts.length === 1 && _ValidateCssTime(parts[0])) {
|
||||
animationName = _defaultValues.animations.name;
|
||||
animationTime = parts[0];
|
||||
} else if (parts.length === 1 && _ValidateAnimation(parts[0])) {
|
||||
animationName = parts[0];
|
||||
animationTime = _defaultValues.animations.time;
|
||||
}
|
||||
element.css({
|
||||
"animation-name" : "loadingoverlay_animation__" + animationName,
|
||||
"animation-duration" : animationTime,
|
||||
"animation-timing-function" : "linear",
|
||||
"animation-iteration-count" : "infinite"
|
||||
});
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
function _ValidateCssTime(value){
|
||||
return !isNaN(parseFloat(value)) && (value.slice(-1) === "s" || value.slice(-2) === "ms");
|
||||
}
|
||||
|
||||
function _ValidateAnimation(value){
|
||||
return _whitelists.animations.indexOf(value) > -1;
|
||||
}
|
||||
|
||||
function _ValidateProgressPosition(value){
|
||||
return _whitelists.progressPosition.indexOf(value) > -1;
|
||||
}
|
||||
|
||||
|
||||
function _ParseSize(value){
|
||||
if (!value || value < 0) {
|
||||
return false;
|
||||
} else if (typeof value === "string" && ["vmin", "vmax"].indexOf(value.slice(-4)) > -1) {
|
||||
return {
|
||||
fixed : true,
|
||||
units : value.slice(-4),
|
||||
value : value.slice(0, -4)
|
||||
};
|
||||
} else if (typeof value === "string" && ["rem"].indexOf(value.slice(-3)) > -1) {
|
||||
return {
|
||||
fixed : true,
|
||||
units : value.slice(-3),
|
||||
value : value.slice(0, -3)
|
||||
};
|
||||
} else if (typeof value === "string" && ["px", "em", "cm", "mm", "in", "pt", "pc", "vh", "vw"].indexOf(value.slice(-2)) > -1) {
|
||||
return {
|
||||
fixed : true,
|
||||
units : value.slice(-2),
|
||||
value : value.slice(0, -2)
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
fixed : false,
|
||||
units : "px",
|
||||
value : parseFloat(value)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(function(){
|
||||
$("head").append([
|
||||
"<style>",
|
||||
"@-webkit-keyframes loadingoverlay_animation__rotate_right {",
|
||||
"to {",
|
||||
"-webkit-transform : rotate(360deg);",
|
||||
"transform : rotate(360deg);",
|
||||
"}",
|
||||
"}",
|
||||
"@keyframes loadingoverlay_animation__rotate_right {",
|
||||
"to {",
|
||||
"-webkit-transform : rotate(360deg);",
|
||||
"transform : rotate(360deg);",
|
||||
"}",
|
||||
"}",
|
||||
|
||||
"@-webkit-keyframes loadingoverlay_animation__rotate_left {",
|
||||
"to {",
|
||||
"-webkit-transform : rotate(-360deg);",
|
||||
"transform : rotate(-360deg);",
|
||||
"}",
|
||||
"}",
|
||||
"@keyframes loadingoverlay_animation__rotate_left {",
|
||||
"to {",
|
||||
"-webkit-transform : rotate(-360deg);",
|
||||
"transform : rotate(-360deg);",
|
||||
"}",
|
||||
"}",
|
||||
|
||||
"@-webkit-keyframes loadingoverlay_animation__fadein {",
|
||||
"0% {",
|
||||
"opacity : 0;",
|
||||
"-webkit-transform : scale(0.1, 0.1);",
|
||||
"transform : scale(0.1, 0.1);",
|
||||
"}",
|
||||
"50% {",
|
||||
"opacity : 1;",
|
||||
"}",
|
||||
"100% {",
|
||||
"opacity : 0;",
|
||||
"-webkit-transform : scale(1, 1);",
|
||||
"transform : scale(1, 1);",
|
||||
"}",
|
||||
"}",
|
||||
"@keyframes loadingoverlay_animation__fadein {",
|
||||
"0% {",
|
||||
"opacity : 0;",
|
||||
"-webkit-transform : scale(0.1, 0.1);",
|
||||
"transform : scale(0.1, 0.1);",
|
||||
"}",
|
||||
"50% {",
|
||||
"opacity : 1;",
|
||||
"}",
|
||||
"100% {",
|
||||
"opacity : 0;",
|
||||
"-webkit-transform : scale(1, 1);",
|
||||
"transform : scale(1, 1);",
|
||||
"}",
|
||||
"}",
|
||||
|
||||
"@-webkit-keyframes loadingoverlay_animation__pulse {",
|
||||
"0% {",
|
||||
"-webkit-transform : scale(0, 0);",
|
||||
"transform : scale(0, 0);",
|
||||
"}",
|
||||
"50% {",
|
||||
"-webkit-transform : scale(1, 1);",
|
||||
"transform : scale(1, 1);",
|
||||
"}",
|
||||
"100% {",
|
||||
"-webkit-transform : scale(0, 0);",
|
||||
"transform : scale(0, 0);",
|
||||
"}",
|
||||
"}",
|
||||
"@keyframes loadingoverlay_animation__pulse {",
|
||||
"0% {",
|
||||
"-webkit-transform : scale(0, 0);",
|
||||
"transform : scale(0, 0);",
|
||||
"}",
|
||||
"50% {",
|
||||
"-webkit-transform : scale(1, 1);",
|
||||
"transform : scale(1, 1);",
|
||||
"}",
|
||||
"100% {",
|
||||
"-webkit-transform : scale(0, 0);",
|
||||
"transform : scale(0, 0);",
|
||||
"}",
|
||||
"}",
|
||||
"</style>"
|
||||
].join(" "));
|
||||
});
|
||||
|
||||
}));
|
||||
4
wwwroot/BackendScript/js/modernizr.custom.js
Normal file
4
wwwroot/BackendScript/js/modernizr.custom.js
Normal file
File diff suppressed because one or more lines are too long
107
wwwroot/BackendScript/js/morris-script.js
Normal file
107
wwwroot/BackendScript/js/morris-script.js
Normal file
@@ -0,0 +1,107 @@
|
||||
var Script = function () {
|
||||
|
||||
//morris chart
|
||||
|
||||
$(function () {
|
||||
// data stolen from http://howmanyleft.co.uk/vehicle/jaguar_'e'_type
|
||||
var tax_data = [
|
||||
{"period": "2011 Q3", "licensed": 3407, "sorned": 660},
|
||||
{"period": "2011 Q2", "licensed": 3351, "sorned": 629},
|
||||
{"period": "2011 Q1", "licensed": 3269, "sorned": 618},
|
||||
{"period": "2010 Q4", "licensed": 3246, "sorned": 661},
|
||||
{"period": "2009 Q4", "licensed": 3171, "sorned": 676},
|
||||
{"period": "2008 Q4", "licensed": 3155, "sorned": 681},
|
||||
{"period": "2007 Q4", "licensed": 3226, "sorned": 620},
|
||||
{"period": "2006 Q4", "licensed": 3245, "sorned": null},
|
||||
{"period": "2005 Q4", "licensed": 3289, "sorned": null}
|
||||
];
|
||||
Morris.Line({
|
||||
element: 'hero-graph',
|
||||
data: tax_data,
|
||||
xkey: 'period',
|
||||
ykeys: ['licensed', 'sorned'],
|
||||
labels: ['Licensed', 'Off the road'],
|
||||
lineColors:['#8075c4','#6883a3']
|
||||
});
|
||||
|
||||
Morris.Donut({
|
||||
element: 'hero-donut',
|
||||
data: [
|
||||
{label: 'Jam', value: 25 },
|
||||
{label: 'Frosted', value: 40 },
|
||||
{label: 'Custard', value: 25 },
|
||||
{label: 'Sugar', value: 10 }
|
||||
],
|
||||
colors: ['#41cac0', '#49e2d7', '#34a39b'],
|
||||
formatter: function (y) { return y + "%" }
|
||||
});
|
||||
|
||||
Morris.Area({
|
||||
element: 'hero-area',
|
||||
data: [
|
||||
{period: '2010 Q1', iphone: 2666, ipad: null, itouch: 2647},
|
||||
{period: '2010 Q2', iphone: 2778, ipad: 2294, itouch: 2441},
|
||||
{period: '2010 Q3', iphone: 4912, ipad: 1969, itouch: 2501},
|
||||
{period: '2010 Q4', iphone: 3767, ipad: 3597, itouch: 5689},
|
||||
{period: '2011 Q1', iphone: 6810, ipad: 1914, itouch: 2293},
|
||||
{period: '2011 Q2', iphone: 5670, ipad: 4293, itouch: 1881},
|
||||
{period: '2011 Q3', iphone: 4820, ipad: 3795, itouch: 1588},
|
||||
{period: '2011 Q4', iphone: 15073, ipad: 5967, itouch: 5175},
|
||||
{period: '2012 Q1', iphone: 10687, ipad: 4460, itouch: 2028},
|
||||
{period: '2012 Q2', iphone: 8432, ipad: 5713, itouch: 1791}
|
||||
],
|
||||
|
||||
xkey: 'period',
|
||||
ykeys: ['iphone', 'ipad', 'itouch'],
|
||||
labels: ['iPhone', 'iPad', 'iPod Touch'],
|
||||
hideHover: 'auto',
|
||||
lineWidth: 1,
|
||||
pointSize: 5,
|
||||
lineColors: ['#4a8bc2', '#ff6c60', '#a9d86e'],
|
||||
fillOpacity: 0.5,
|
||||
smooth: true
|
||||
});
|
||||
|
||||
Morris.Bar({
|
||||
element: 'hero-bar',
|
||||
data: [
|
||||
{device: 'iPhone', geekbench: 136},
|
||||
{device: 'iPhone 3G', geekbench: 137},
|
||||
{device: 'iPhone 3GS', geekbench: 275},
|
||||
{device: 'iPhone 4', geekbench: 380},
|
||||
{device: 'iPhone 4S', geekbench: 655},
|
||||
{device: 'iPhone 5', geekbench: 1571}
|
||||
],
|
||||
xkey: 'device',
|
||||
ykeys: ['geekbench'],
|
||||
labels: ['Geekbench'],
|
||||
barRatio: 0.4,
|
||||
xLabelAngle: 35,
|
||||
hideHover: 'auto',
|
||||
barColors: ['#6883a3']
|
||||
});
|
||||
|
||||
new Morris.Line({
|
||||
element: 'examplefirst',
|
||||
xkey: 'year',
|
||||
ykeys: ['value'],
|
||||
labels: ['Value'],
|
||||
data: [
|
||||
{year: '2008', value: 20},
|
||||
{year: '2009', value: 10},
|
||||
{year: '2010', value: 5},
|
||||
{year: '2011', value: 5},
|
||||
{year: '2012', value: 20}
|
||||
]
|
||||
});
|
||||
|
||||
$('.code-example').each(function (index, el) {
|
||||
eval($(el).text());
|
||||
});
|
||||
});
|
||||
|
||||
}();
|
||||
|
||||
|
||||
|
||||
|
||||
46
wwwroot/BackendScript/js/nestable.js
Normal file
46
wwwroot/BackendScript/js/nestable.js
Normal file
@@ -0,0 +1,46 @@
|
||||
var Nestable = function () {
|
||||
|
||||
var updateOutput = function (e) {
|
||||
var list = e.length ? e : $(e.target),
|
||||
output = list.data('output');
|
||||
if (window.JSON) {
|
||||
output.val(window.JSON.stringify(list.nestable('serialize'))); //, null, 2));
|
||||
} else {
|
||||
output.val('JSON browser support required for this demo.');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
// activate Nestable for list 1
|
||||
$('#nestable_list_1').nestable({
|
||||
group: 1
|
||||
})
|
||||
.on('change', updateOutput);
|
||||
|
||||
// activate Nestable for list 2
|
||||
$('#nestable_list_2').nestable({
|
||||
group: 1
|
||||
})
|
||||
.on('change', updateOutput);
|
||||
|
||||
// output initial serialised data
|
||||
updateOutput($('#nestable_list_1').data('output', $('#nestable_list_1_output')));
|
||||
updateOutput($('#nestable_list_2').data('output', $('#nestable_list_2_output')));
|
||||
|
||||
$('#nestable_list_menu').on('click', function (e) {
|
||||
var target = $(e.target),
|
||||
action = target.data('action');
|
||||
if (action === 'expand-all') {
|
||||
$('.dd').nestable('expandAll');
|
||||
}
|
||||
if (action === 'collapse-all') {
|
||||
$('.dd').nestable('collapseAll');
|
||||
}
|
||||
});
|
||||
|
||||
$('#nestable_list_3').nestable();
|
||||
|
||||
|
||||
|
||||
}();
|
||||
1512
wwwroot/BackendScript/js/owl.carousel.js
Normal file
1512
wwwroot/BackendScript/js/owl.carousel.js
Normal file
File diff suppressed because it is too large
Load Diff
28
wwwroot/BackendScript/js/pickers/init-color-picker.js
Normal file
28
wwwroot/BackendScript/js/pickers/init-color-picker.js
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
//color picker start
|
||||
|
||||
$(function(){
|
||||
|
||||
$('#cp1').colorpicker();
|
||||
|
||||
$('#cp2, #cp3a, #cp3b').colorpicker();
|
||||
$('#cp4').colorpicker({"color": "#eac459"});
|
||||
|
||||
$('#cp5').colorpicker({
|
||||
format: null
|
||||
});
|
||||
|
||||
$('#cp5b').colorpicker({
|
||||
format: "rgba"
|
||||
});
|
||||
|
||||
$('#cp6').colorpicker({
|
||||
horizontal: true
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
79
wwwroot/BackendScript/js/pickers/init-date-picker.js
Normal file
79
wwwroot/BackendScript/js/pickers/init-date-picker.js
Normal file
@@ -0,0 +1,79 @@
|
||||
|
||||
//date picker start
|
||||
|
||||
$(function(){
|
||||
|
||||
$('.date-picker-input').datepicker({
|
||||
format: 'mm-dd-yyyy',
|
||||
autoclose: true,
|
||||
orientation: "bottom",
|
||||
templates: {
|
||||
leftArrow: '<i class="fa fa-angle-left"></i>',
|
||||
rightArrow: '<i class="fa fa-angle-right"></i>'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('.dpYears').datepicker({
|
||||
autoclose: true,
|
||||
orientation: "bottom",
|
||||
templates: {
|
||||
leftArrow: '<i class="fa fa-angle-left"></i>',
|
||||
rightArrow: '<i class="fa fa-angle-right"></i>'
|
||||
}
|
||||
});
|
||||
|
||||
// month & date only
|
||||
$('.dpMonths').datepicker({
|
||||
format: 'mm-dd',
|
||||
autoclose: true,
|
||||
orientation: "bottom",
|
||||
templates: {
|
||||
leftArrow: '<i class="fa fa-angle-left"></i>',
|
||||
rightArrow: '<i class="fa fa-angle-right"></i>'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var checkin = $('.dpd1').datepicker({
|
||||
onRender: function(date) {
|
||||
return date.valueOf() < now.valueOf() ? 'disabled' : '';
|
||||
}
|
||||
}).on('changeDate', function(ev) {
|
||||
if (ev.date.valueOf() > checkout.date.valueOf()) {
|
||||
var newDate = new Date(ev.date)
|
||||
newDate.setDate(newDate.getDate() + 1);
|
||||
checkout.setValue(newDate);
|
||||
}
|
||||
checkin.hide();
|
||||
|
||||
$('.dpd2')[0].focus();
|
||||
}).data('datepicker');
|
||||
var checkout = $('.dpd2').datepicker({
|
||||
onRender: function(date) {
|
||||
return date.valueOf() <= checkin.date.valueOf() ? 'disabled' : '';
|
||||
}
|
||||
}).on('changeDate', function(ev) {
|
||||
checkout.hide();
|
||||
}).data('datepicker');
|
||||
|
||||
// enable clear button
|
||||
$('#helper-datepicker').datepicker({
|
||||
todayBtn: "linked",
|
||||
clearBtn: true,
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
orientation: "bottom",
|
||||
templates: {
|
||||
leftArrow: '<i class="fa fa-angle-left"></i>',
|
||||
rightArrow: '<i class="fa fa-angle-right"></i>'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
75
wwwroot/BackendScript/js/pickers/init-datetime-picker.js
Normal file
75
wwwroot/BackendScript/js/pickers/init-datetime-picker.js
Normal file
@@ -0,0 +1,75 @@
|
||||
|
||||
//datetime picker start
|
||||
|
||||
$(function(){
|
||||
|
||||
$(".form_datetime").datetimepicker({
|
||||
format: 'yyyy-mm-dd hh:ii',
|
||||
autoclose: true,
|
||||
todayBtn: true,
|
||||
pickerPosition: "bottom-left",
|
||||
templates: {
|
||||
leftArrow: '<i class="fa fa-angle-left"></i>',
|
||||
rightArrow: '<i class="fa fa-angle-right"></i>'
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
$(".form_datetime-component").datetimepicker({
|
||||
format: "dd MM yyyy - hh:ii",
|
||||
autoclose: true,
|
||||
todayBtn: true,
|
||||
pickerPosition: "bottom-left",
|
||||
templates: {
|
||||
leftArrow: '<i class="fa fa-angle-left"></i>',
|
||||
rightArrow: '<i class="fa fa-angle-right"></i>'
|
||||
}
|
||||
});
|
||||
|
||||
$(".form_datetime-adv").datetimepicker({
|
||||
format: "dd MM yyyy - hh:ii",
|
||||
autoclose: true,
|
||||
todayBtn: true,
|
||||
startDate: "2013-02-14 10:00",
|
||||
minuteStep: 10,
|
||||
pickerPosition: "bottom-left",
|
||||
templates: {
|
||||
leftArrow: '<i class="fa fa-angle-left"></i>',
|
||||
rightArrow: '<i class="fa fa-angle-right"></i>'
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(".form_datetime-meridian").datetimepicker({
|
||||
format: "dd MM yyyy - HH:ii P",
|
||||
// format: 'yyyy-mm-dd hh:ii',
|
||||
showMeridian: true,
|
||||
autoclose: true,
|
||||
todayBtn: true,
|
||||
pickerPosition: "bottom-left",
|
||||
templates: {
|
||||
leftArrow: '<i class="fa fa-angle-left"></i>',
|
||||
rightArrow: '<i class="fa fa-angle-right"></i>'
|
||||
}
|
||||
});
|
||||
|
||||
// time pickers
|
||||
|
||||
$('.timepicker-default').timepicker();
|
||||
|
||||
$('.timepicker-24').timepicker({
|
||||
autoclose: true,
|
||||
minuteStep: 1,
|
||||
showSeconds: true,
|
||||
showMeridian: false,
|
||||
pickerPosition: "top-left"
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
33
wwwroot/BackendScript/js/pulstate.js
Normal file
33
wwwroot/BackendScript/js/pulstate.js
Normal file
@@ -0,0 +1,33 @@
|
||||
var Pulstate = function () {
|
||||
|
||||
// pulstate
|
||||
|
||||
jQuery('#pulsate-regular').pulsate({
|
||||
color: "#E74955"
|
||||
});
|
||||
|
||||
jQuery('#pulsate-once').click(function () {
|
||||
$(this).pulsate({
|
||||
color: "#A5D16C",
|
||||
repeat: false
|
||||
});
|
||||
});
|
||||
|
||||
jQuery('#pulsate-hover').pulsate({
|
||||
color: "#4A8BC2",
|
||||
repeat: false,
|
||||
onHover: true
|
||||
});
|
||||
|
||||
jQuery('#pulsate-crazy').click(function () {
|
||||
$(this).pulsate({
|
||||
color: "#FCB322",
|
||||
reach: 50,
|
||||
repeat: 10,
|
||||
speed: 100,
|
||||
glow: true
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
}();
|
||||
6
wwwroot/BackendScript/js/respond.min.js
vendored
Normal file
6
wwwroot/BackendScript/js/respond.min.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
|
||||
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
|
||||
window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.documentElement,e=d.firstElementChild||d.firstChild,f=a.createElement("body"),g=a.createElement("div");return g.id="mq-test-1",g.style.cssText="position:absolute;top:-100em",f.style.background="none",f.appendChild(g),function(a){return g.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',d.insertBefore(f,e),c=42===g.offsetWidth,d.removeChild(f),{matches:c,media:a}}}(document);
|
||||
|
||||
/*! Respond.js v1.3.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
|
||||
(function(a){"use strict";function x(){u(!0)}var b={};if(a.respond=b,b.update=function(){},b.mediaQueriesSupported=a.matchMedia&&a.matchMedia("only all").matches,!b.mediaQueriesSupported){var q,r,t,c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=c.getElementsByTagName("base")[0],l=j.getElementsByTagName("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.toLowerCase();d&&f&&!h[d]&&(c.styleSheet&&c.styleSheet.rawCssText?(p(c.styleSheet.rawCssText,d,e),h[d]=!0):(!/^([a-zA-Z:]*\/\/)/.test(d)&&!k||d.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var b=m.shift();v(b.href,function(c){p(c,b.href,b.media),h[b.href]=!0,a.setTimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:f.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},s=function(){var a,b=c.createElement("div"),e=c.body,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",e||(e=f=c.createElement("body"),e.style.background="none"),e.appendChild(b),d.insertBefore(e,d.firstChild),a=b.offsetWidth,f?d.removeChild(e):e.removeChild(b),a=t=parseFloat(a)},u=function(b){var h="clientWidth",k=d[h],m="CSS1Compat"===c.compatMode&&k||c.body[h]||k,n={},o=l[l.length-1],p=(new Date).getTime();if(b&&q&&i>p-q)return a.clearTimeout(r),r=a.setTimeout(u,i),void 0;q=p;for(var v in e)if(e.hasOwnProperty(v)){var w=e[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?t||s():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?t||s():1)),w.hasquery&&(z&&A||!(z||m>=x)||!(A||y>=m))||(n[w.media]||(n[w.media]=[]),n[w.media].push(f[w.rules]))}for(var C in g)g.hasOwnProperty(C)&&g[C]&&g[C].parentNode===j&&j.removeChild(g[C]);for(var D in n)if(n.hasOwnProperty(D)){var E=c.createElement("style"),F=n[D].join("\n");E.type="text/css",E.media=D,j.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(c.createTextNode(F)),g.push(E)}},v=function(a,b){var c=w();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},w=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}();n(),b.update=n,a.addEventListener?a.addEventListener("resize",x,!1):a.attachEvent&&a.attachEvent("onresize",x)}})(this);
|
||||
326
wwwroot/BackendScript/js/slidebars.min.js
vendored
Normal file
326
wwwroot/BackendScript/js/slidebars.min.js
vendored
Normal file
@@ -0,0 +1,326 @@
|
||||
|
||||
// -----------------------------------
|
||||
// Slidebars
|
||||
// Version 0.10 Development
|
||||
// http://plugins.adchsm.me/slidebars/
|
||||
//
|
||||
// Written by Adam Smith
|
||||
// http://www.adchsm.me/
|
||||
//
|
||||
// Released under MIT License
|
||||
// http://plugins.adchsm.me/slidebars/license.txt
|
||||
//
|
||||
// ---------------------
|
||||
// Index of Slidebars.js
|
||||
//
|
||||
// 001 - Default Settings
|
||||
// 002 - Feature Detection
|
||||
// 003 - User Agents
|
||||
// 004 - Setup
|
||||
// 005 - Animation
|
||||
// 006 - Operations
|
||||
// 007 - API
|
||||
// 008 - User Input
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$.slidebars = function(options) {
|
||||
|
||||
// ----------------------
|
||||
// 001 - Default Settings
|
||||
|
||||
var settings = $.extend({
|
||||
siteClose: true, // true or false - Enable closing of Slidebars by clicking on #sb-site.
|
||||
siteLock: false, // true or false - Prevent scrolling of site when a Slidebar is open.
|
||||
disableOver: false, // integer or false - Hide Slidebars over a specific width.
|
||||
hideControlClasses: false // true or false - Hide controls at same width as disableOver.
|
||||
}, options);
|
||||
|
||||
// -----------------------
|
||||
// 002 - Feature Detection
|
||||
|
||||
var test = document.createElement('div').style, // Create element to test on.
|
||||
supportTransition = false, // Variable for testing transitions.
|
||||
supportTransform = false; // variable for testing transforms.
|
||||
|
||||
// Test for CSS Transitions
|
||||
if (test.MozTransition === '' || test.WebkitTransition === '' || test.OTransition === '' || test.transition === '') supportTransition = true;
|
||||
|
||||
// Test for CSS Transforms
|
||||
if (test.MozTransform === '' || test.WebkitTransform === '' || test.OTransform === '' || test.transform === '') supportTransform = true;
|
||||
|
||||
// -----------------
|
||||
// 003 - User Agents
|
||||
|
||||
var ua = navigator.userAgent, // Get user agent string.
|
||||
android = false, // Variable for storing android version.
|
||||
iOS = false; // Variable for storing iOS version.
|
||||
|
||||
if (/Android/.test(ua)) { // Detect Android in user agent string.
|
||||
android = ua.substr(ua.indexOf('Android')+8, 3); // Set version of Android.
|
||||
} else if (/(iPhone|iPod|iPad)/.test(ua)) { // Detect iOS in user agent string.
|
||||
iOS = ua.substr(ua.indexOf('OS ')+3, 3).replace('_', '.'); // Set version of iOS.
|
||||
}
|
||||
|
||||
if (android && android < 3 || iOS && iOS < 5) $('html').addClass('sb-static'); // Add helper class for older versions of Android & iOS.
|
||||
|
||||
// -----------
|
||||
// 004 - Setup
|
||||
|
||||
// Site Container
|
||||
var $site = $('#sb-site, .sb-site'); // Cache the selector.
|
||||
|
||||
// Left Slidebar
|
||||
if ($('.sb-left').length) { // Check if the left Slidebar exists.
|
||||
var $left = $('.sb-left'), // Cache the selector.
|
||||
leftActive = false; // Used to check whether the left Slidebar is open or closed.
|
||||
}
|
||||
|
||||
// Right Slidebar
|
||||
if ($('.sb-right').length) { // Check if the right Slidebar exists.
|
||||
var $right = $('.sb-right'), // Cache the selector.
|
||||
rightActive = false; // Used to check whether the right Slidebar is open or closed.
|
||||
}
|
||||
|
||||
var init = false,
|
||||
windowWidth = $(window).width(), // Get width of window.
|
||||
$controls = $('.sb-toggle-left, .sb-toggle-right, .sb-open-left, .sb-open-right, .sb-close'), // Cache the control classes.
|
||||
$slide = $('.sb-slide'); // Cache users elements to animate.
|
||||
|
||||
// Initailise Slidebars
|
||||
function initialise() {
|
||||
if (!settings.disableOver || (typeof settings.disableOver === 'number' && settings.disableOver >= windowWidth)) { // False or larger than window size.
|
||||
init = true; // true enabled Slidebars to open.
|
||||
$('html').addClass('sb-init'); // Add helper class.
|
||||
if (settings.hideControlClasses) $controls.removeClass('sb-hide'); // Remove class just incase Slidebars was originally disabled.
|
||||
css(); // Set required inline styles.
|
||||
} else if (typeof settings.disableOver === 'number' && settings.disableOver < windowWidth) { // Less than window size.
|
||||
init = false; // false stop Slidebars from opening.
|
||||
$('html').removeClass('sb-init'); // Remove helper class.
|
||||
if (settings.hideControlClasses) $controls.addClass('sb-hide'); // Hide controls
|
||||
if (leftActive || rightActive) close(); // Close Slidebars if open.
|
||||
}
|
||||
}
|
||||
initialise();
|
||||
|
||||
// Inline CSS
|
||||
function css() {
|
||||
// Set minimum height.
|
||||
$site.css('minHeight', ''); // Reset minimum height.
|
||||
$site.css('minHeight', $('body').height() + 'px'); // Set minimum height of the site to the minimum height of the body.
|
||||
|
||||
// Set off-canvas margins for Slidebars with push and overlay animations.
|
||||
if ($left && ($left.hasClass('sb-style-push') || $left.hasClass('sb-style-overlay'))) $left.css('marginLeft', '-' + $left.css('width'));
|
||||
if ($right && ($right.hasClass('sb-style-push') || $right.hasClass('sb-style-overlay'))) $right.css('marginRight', '-' + $right.css('width'));
|
||||
|
||||
// Custom Slidebar Widths
|
||||
if ($left && $left.hasClass('sb-width-custom')) $left.css('width', $left.attr('data-sb-width')); // Set user custom width.
|
||||
if ($right && $right.hasClass('sb-width-custom')) $right.css('width', $right.attr('data-sb-width')); // Set user custom width.
|
||||
|
||||
// Site lock.
|
||||
if (settings.siteLock) $('html').addClass('sb-lock');
|
||||
}
|
||||
|
||||
// Resize Functions
|
||||
$(window).resize(function() {
|
||||
var resizedWindowWidth = $(window).width(); // Get resized window width.
|
||||
if (init && windowWidth !== resizedWindowWidth) { // Slidebars is running and window was actually resized.
|
||||
windowWidth = resizedWindowWidth; // Set the new window width.
|
||||
initialise(); // Call initalise to see if Slidebars should still be running.
|
||||
css(); // Reset minimum heights and negative margins.
|
||||
if (leftActive) open('left'); // If left Slidebar is open, calling open will ensure it is the correct size.
|
||||
if (rightActive) open('right'); // If right Slidebar is open, calling open will ensure it is the correct size.
|
||||
}
|
||||
});
|
||||
// I may include a height check along side a width check here in future.
|
||||
|
||||
// ---------------
|
||||
// 005 - Animation
|
||||
|
||||
var animation; // Animation type.
|
||||
|
||||
// Set Animation Type
|
||||
if (supportTransition && supportTransform) { // Browser supports css transitions and transforms.
|
||||
animation = 'translate'; // Translate for browsers that support it.
|
||||
if (android && android < 4.4) animation = 'side'; // Android supports both, but can't translate any fixed positions, so use left instead.
|
||||
} else {
|
||||
animation = 'jQuery'; // Browsers that don't support css transitions and transitions.
|
||||
}
|
||||
|
||||
// Animate Mixin
|
||||
function animate(object, amount, side) {
|
||||
// Choose selectors depending on animation style.
|
||||
var selector;
|
||||
|
||||
if (object.hasClass('sb-style-push')) {
|
||||
selector = $site.add(object).add($slide); // Push - Animate site, Slidebar and user elements.
|
||||
} else if (object.hasClass('sb-style-overlay')) {
|
||||
selector = object; // Overlay - Animate Slidebar only.
|
||||
} else {
|
||||
selector = $site.add($slide); // Reveal - Animate site and user elements.
|
||||
}
|
||||
|
||||
// Apply Animation
|
||||
if (animation === 'translate') {
|
||||
selector.css('transform', 'translate(' + amount + ')');
|
||||
} else if (animation === 'side') {
|
||||
if (amount[0] === '-') amount = amount.substr(1); // Remove the '-' from the passed amount for side animations.
|
||||
selector.css(side, amount);
|
||||
setTimeout(function() {
|
||||
if (amount === '0px') {
|
||||
selector.removeAttr('style');
|
||||
css();
|
||||
}
|
||||
}, 400);
|
||||
} else if (animation === 'jQuery') {
|
||||
if (amount[0] === '-') amount = amount.substr(1); // Remove the '-' from the passed amount for jQuery animations.
|
||||
var properties = {};
|
||||
properties[side] = amount;
|
||||
selector.stop().animate(properties, 400); // Stop any current jQuery animation before starting another.
|
||||
setTimeout(function() {
|
||||
if (amount === '0px') {
|
||||
selector.removeAttr('style');
|
||||
css();
|
||||
}
|
||||
}, 400); // If closed, remove the inline styling on completion of the animation.
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------
|
||||
// 006 - Operations
|
||||
|
||||
// Open a Slidebar
|
||||
function open(side) {
|
||||
// Check to see if opposite Slidebar is open.
|
||||
if (side === 'left' && $left && rightActive || side === 'right' && $right && leftActive) { // It's open, close it, then continue.
|
||||
close();
|
||||
setTimeout(proceed, 400);
|
||||
} else { // Its not open, continue.
|
||||
proceed();
|
||||
}
|
||||
|
||||
// Open
|
||||
function proceed() {
|
||||
if (init && side === 'left' && $left) { // Slidebars is initiated, left is in use and called to open.
|
||||
$('html').addClass('sb-active sb-active-left'); // Add active classes.
|
||||
$left.addClass('sb-active');
|
||||
animate($left, $left.css('width'), 'left'); // Animation
|
||||
setTimeout(function() { leftActive = true; }, 400); // Set active variables.
|
||||
} else if (init && side === 'right' && $right) { // Slidebars is initiated, right is in use and called to open.
|
||||
$('html').addClass('sb-active sb-active-right'); // Add active classes.
|
||||
$right.addClass('sb-active');
|
||||
animate($right, '-' + $right.css('width'), 'right'); // Animation
|
||||
setTimeout(function() { rightActive = true; }, 400); // Set active variables.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Close either Slidebar
|
||||
function close(link) {
|
||||
if (leftActive || rightActive) { // If a Slidebar is open.
|
||||
if (leftActive) {
|
||||
animate($left, '0px', 'left'); // Animation
|
||||
leftActive = false;
|
||||
}
|
||||
if (rightActive) {
|
||||
animate($right, '0px', 'right'); // Animation
|
||||
rightActive = false;
|
||||
}
|
||||
|
||||
setTimeout(function() { // Wait for closing animation to finish.
|
||||
$('html').removeClass('sb-active sb-active-left sb-active-right'); // Remove active classes.
|
||||
if ($left) $left.removeClass('sb-active');
|
||||
if ($right) $right.removeClass('sb-active');
|
||||
if (link) window.location = link; // If a link has been passed to the function, go to it.
|
||||
}, 400);
|
||||
}
|
||||
}
|
||||
|
||||
// Toggle either Slidebar
|
||||
function toggle(side) {
|
||||
if (side === 'left' && $left) { // If left Slidebar is called and in use.
|
||||
if (!leftActive) {
|
||||
open('left'); // Slidebar is closed, open it.
|
||||
} else {
|
||||
close(); // Slidebar is open, close it.
|
||||
}
|
||||
}
|
||||
if (side === 'right' && $right) { // If right Slidebar is called and in use.
|
||||
if (!rightActive) {
|
||||
open('right'); // Slidebar is closed, open it.
|
||||
} else {
|
||||
close(); // Slidebar is open, close it.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------
|
||||
// 007 - API
|
||||
|
||||
this.open = open; // Maps user variable name to the open method.
|
||||
this.close = close; // Maps user variable name to the close method.
|
||||
this.toggle = toggle; // Maps user variable name to the toggle method.
|
||||
this.init = function() { // Returns true or false whether Slidebars are running or not.
|
||||
return init;
|
||||
};
|
||||
this.active = function(side) { // Returns true or false whether Slidebar is open or closed.
|
||||
if (side === 'left' && $left) return leftActive;
|
||||
if (side === 'right' && $right) return rightActive;
|
||||
};
|
||||
|
||||
// ----------------
|
||||
// 008 - User Input
|
||||
|
||||
function eventHandler(event, selector) {
|
||||
event.stopPropagation(); // Stop event bubbling.
|
||||
event.preventDefault(); // Prevent default behaviour
|
||||
if (event.type === 'touchend') selector.off('click'); // If event type was touch turn off clicks to prevent phantom clicks.
|
||||
}
|
||||
|
||||
// Toggle Left Slidebar
|
||||
$('.sb-toggle-left').on('touchend click', function(event) {
|
||||
eventHandler(event, $(this)); // Handle the event.
|
||||
toggle('left'); // Toggle the left Slidbar.
|
||||
});
|
||||
|
||||
// Toggle Right Slidebar
|
||||
$('.sb-toggle-right').on('touchend click', function(event) {
|
||||
eventHandler(event, $(this)); // Handle the event.
|
||||
toggle('right'); // Toggle the right Slidbar.
|
||||
});
|
||||
|
||||
// Open Left Slidebar
|
||||
$('.sb-open-left').on('touchend click', function(event) {
|
||||
eventHandler(event, $(this)); // Handle the event.
|
||||
open('left'); // Open the left Slidebar.
|
||||
});
|
||||
|
||||
// Open Right Slidebar
|
||||
$('.sb-open-right').on('touchend click', function(event) {
|
||||
eventHandler(event, $(this)); // Handle the event.
|
||||
open('right'); // Open the right Slidebar.
|
||||
});
|
||||
|
||||
// Close a Slidebar
|
||||
$('.sb-close').on('touchend click', function(event) {
|
||||
eventHandler(event, $(this)); // Handle the event.
|
||||
close(); // Close either Slidebar.
|
||||
});
|
||||
|
||||
// Close Slidebar via Link
|
||||
$('.sb-slidebar a').not('.sb-disable-close').on('click', function(event) {
|
||||
eventHandler(event, $(this)); // Handle the event.
|
||||
close( $(this).attr('href') ); // Close the Slidebar and pass link.
|
||||
});
|
||||
|
||||
// Close Slidebar via Site
|
||||
$site.on('touchend click', function(event) {
|
||||
if (settings.siteClose && (leftActive || rightActive)) { // If settings permit closing by site and left or right Slidebar is open.
|
||||
eventHandler(event, $(this)); // Handle the event.
|
||||
close(); // Close it.
|
||||
}
|
||||
});
|
||||
|
||||
}; // End slidebars function.
|
||||
|
||||
});
|
||||
114
wwwroot/BackendScript/js/sliders.js
Normal file
114
wwwroot/BackendScript/js/sliders.js
Normal file
@@ -0,0 +1,114 @@
|
||||
var Sliders = function () {
|
||||
|
||||
// default sliders
|
||||
$("#default-slider").slider();
|
||||
|
||||
// snap inc
|
||||
$("#snap-inc-slider").slider({
|
||||
value: 50,
|
||||
min: 0,
|
||||
max: 1000,
|
||||
step: 100,
|
||||
slide: function (event, ui) {
|
||||
$("#snap-inc-slider-amount").text("$" + ui.value);
|
||||
}
|
||||
});
|
||||
|
||||
$("#snap-inc-slider-amount").text("$" + $("#snap-inc-slider").slider("value"));
|
||||
|
||||
// range slider
|
||||
$("#slider-range").slider({
|
||||
range: true,
|
||||
min: 0,
|
||||
max: 500,
|
||||
values: [75, 300],
|
||||
slide: function (event, ui) {
|
||||
$("#slider-range-amount").text("$" + ui.values[0] + " - $" + ui.values[1]);
|
||||
}
|
||||
});
|
||||
|
||||
$("#slider-range-amount").text("$" + $("#slider-range").slider("values", 0) + " - $" + $("#slider-range").slider("values", 1));
|
||||
|
||||
//range max
|
||||
|
||||
$("#slider-range-max").slider({
|
||||
range: "max",
|
||||
min: 1,
|
||||
max: 10,
|
||||
value: 2,
|
||||
slide: function (event, ui) {
|
||||
$("#slider-range-max-amount").text(ui.value);
|
||||
}
|
||||
});
|
||||
|
||||
$("#slider-range-max-amount").text($("#slider-range-max").slider("value"));
|
||||
|
||||
// range min
|
||||
$("#slider-range-min").slider({
|
||||
range: "min",
|
||||
value: 37,
|
||||
min: 1,
|
||||
max: 700,
|
||||
slide: function (event, ui) {
|
||||
$("#slider-range-min-amount").text("$" + ui.value);
|
||||
}
|
||||
});
|
||||
|
||||
$("#slider-range-min-amount").text("$" + $("#slider-range-min").slider("value"));
|
||||
|
||||
//
|
||||
// setup graphic EQ
|
||||
$( "#eq > span" ).each(function() {
|
||||
// read initial values from markup and remove that
|
||||
var value = parseInt( $( this ).text(), 10 );
|
||||
$( this ).empty().slider({
|
||||
value: value,
|
||||
range: "min",
|
||||
animate: true,
|
||||
orientation: "vertical"
|
||||
});
|
||||
});
|
||||
|
||||
// bound to select
|
||||
|
||||
var select = $( "#minbeds" );
|
||||
var slider = $( "<div id='slider'></div>" ).insertAfter( select ).slider({
|
||||
min: 1,
|
||||
max: 6,
|
||||
range: "min",
|
||||
value: select[ 0 ].selectedIndex + 1,
|
||||
slide: function( event, ui ) {
|
||||
select[ 0 ].selectedIndex = ui.value - 1;
|
||||
}
|
||||
});
|
||||
$( "#minbeds" ).change(function() {
|
||||
slider.slider( "value", this.selectedIndex + 1 );
|
||||
});
|
||||
|
||||
// vertical slider
|
||||
$("#slider-vertical").slider({
|
||||
orientation: "vertical",
|
||||
range: "min",
|
||||
min: 0,
|
||||
max: 100,
|
||||
value: 60,
|
||||
slide: function (event, ui) {
|
||||
$("#slider-vertical-amount").text(ui.value);
|
||||
}
|
||||
});
|
||||
$("#slider-vertical-amount").text($("#slider-vertical").slider("value"));
|
||||
|
||||
// vertical range sliders
|
||||
$("#slider-range-vertical").slider({
|
||||
orientation: "vertical",
|
||||
range: true,
|
||||
values: [17, 67],
|
||||
slide: function (event, ui) {
|
||||
$("#slider-range-vertical-amount").text("$" + ui.values[0] + " - $" + ui.values[1]);
|
||||
}
|
||||
});
|
||||
|
||||
$("#slider-range-vertical-amount").text("$" + $("#slider-range-vertical").slider("values", 0) + " - $" + $("#slider-range-vertical").slider("values", 1));
|
||||
|
||||
|
||||
}();
|
||||
134
wwwroot/BackendScript/js/soon/custom.js
Normal file
134
wwwroot/BackendScript/js/soon/custom.js
Normal file
@@ -0,0 +1,134 @@
|
||||
/******************************************************************************************************************************
|
||||
COMMING SOON PAGE
|
||||
*******************************************************************************************************************************/
|
||||
(function($) {
|
||||
/**
|
||||
* Set your date here (YEAR, MONTH (0 for January/11 for December), DAY, HOUR, MINUTE, SECOND)
|
||||
* according to the GMT+0 Timezone
|
||||
**/
|
||||
var launch = new Date(2022, 06, 14, 11, 00);
|
||||
/**
|
||||
* The script
|
||||
**/
|
||||
var message = $('#message');
|
||||
var days = $('#days');
|
||||
var hours = $('#hours');
|
||||
var minutes = $('#minutes');
|
||||
var seconds = $('#seconds');
|
||||
|
||||
setDate();
|
||||
function setDate(){
|
||||
var now = new Date();
|
||||
if( launch < now ){
|
||||
days.html('<h1>0</H1><p>Day</p>');
|
||||
hours.html('<h1>0</h1><p>Hour</p>');
|
||||
minutes.html('<h1>0</h1><p>Minute</p>');
|
||||
seconds.html('<h1>0</h1><p>Second</p>');
|
||||
message.html('OUR SITE IS NOT READY YET...');
|
||||
}
|
||||
else{
|
||||
var s = -now.getTimezoneOffset()*60 + (launch.getTime() - now.getTime())/1000;
|
||||
var d = Math.floor(s/86400);
|
||||
days.html('<h1>'+d+'</h1><p>Day'+(d>1?'s':''),'</p>');
|
||||
s -= d*86400;
|
||||
|
||||
var h = Math.floor(s/3600);
|
||||
hours.html('<h1>'+h+'</h1><p>Hour'+(h>1?'s':''),'</p>');
|
||||
s -= h*3600;
|
||||
|
||||
var m = Math.floor(s/60);
|
||||
minutes.html('<h1>'+m+'</h1><p>Minute'+(m>1?'s':''),'</p>');
|
||||
|
||||
s = Math.floor(s-m*60);
|
||||
seconds.html('<h1>'+s+'</h1><p>Second'+(s>1?'s':''),'</p>');
|
||||
setTimeout(setDate, 1000);
|
||||
|
||||
// message.html('OUR SITE IS NOT READY YET, BUT WE ARE COMING SOON');
|
||||
}
|
||||
}
|
||||
})(jQuery);
|
||||
/******************************************************************************************************************************
|
||||
ANIMATIONS
|
||||
*******************************************************************************************************************************/
|
||||
(function($) {
|
||||
"use strict";
|
||||
var isMobile = false;
|
||||
if (navigator.userAgent.match(/Android/i) ||
|
||||
navigator.userAgent.match(/webOS/i) ||
|
||||
navigator.userAgent.match(/iPhone/i) ||
|
||||
navigator.userAgent.match(/iPad/i)||
|
||||
navigator.userAgent.match(/iPod/i) ||
|
||||
navigator.userAgent.match(/BlackBerry/i)) {
|
||||
isMobile = true;
|
||||
}
|
||||
if (isMobile == true) {
|
||||
$('body').removeClass('nomobile');
|
||||
$('.animated').removeClass('animated');
|
||||
}
|
||||
$(function() {
|
||||
if (isMobile == false) {
|
||||
$('*[data-animated]').addClass('animated');
|
||||
}
|
||||
function animated_contents() {
|
||||
$(".animated:appeared").each(function (i) {
|
||||
var $this = $(this),
|
||||
animated = $(this).data('animated');
|
||||
|
||||
setTimeout(function () {
|
||||
$this.addClass(animated);
|
||||
}, 50 * i);
|
||||
});
|
||||
}
|
||||
animated_contents();
|
||||
$(window).scroll(function () {
|
||||
animated_contents();
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
/******************************************************************************************************************************
|
||||
SLIDER
|
||||
*******************************************************************************************************************************/
|
||||
(function($) {
|
||||
"use strict";
|
||||
$("body.nomobile #slider").revolution(
|
||||
{
|
||||
delay:9000,
|
||||
startheight:450,
|
||||
startwidth:890,
|
||||
|
||||
thumbWidth:100,
|
||||
thumbHeight:50,
|
||||
thumbAmount:5,
|
||||
|
||||
onHoverStop:"on",
|
||||
hideThumbs:200,
|
||||
navigationType:"bullet",
|
||||
navigationStyle:"round",
|
||||
navigationArrows:"none",
|
||||
|
||||
touchenabled:"on",
|
||||
|
||||
navOffsetHorizontal:0,
|
||||
navOffsetVertical:80,
|
||||
shadow:undefined,
|
||||
fullWidth:"on",
|
||||
fullScreen:"on"
|
||||
});
|
||||
})(jQuery);
|
||||
/******************************************************************************************************************************
|
||||
BOOTSTRAP
|
||||
*******************************************************************************************************************************/
|
||||
(function($) {
|
||||
"use strict";
|
||||
$('[data-rel=tooltip]').tooltip();
|
||||
$(".alert").alert();
|
||||
})(jQuery);
|
||||
/******************************************************************************************************************************
|
||||
PROGRESS BAR
|
||||
*******************************************************************************************************************************/
|
||||
(function($) {
|
||||
"use strict";
|
||||
$("a.btn-progress").click(function(){
|
||||
$('#bar-container').slideToggle();
|
||||
});
|
||||
})(jQuery);
|
||||
878
wwwroot/BackendScript/js/soon/plugins.js
Normal file
878
wwwroot/BackendScript/js/soon/plugins.js
Normal file
@@ -0,0 +1,878 @@
|
||||
/*
|
||||
* QueryLoader v2 - A simple script to create a preloader for images
|
||||
*
|
||||
* For instructions read the original post:
|
||||
* http://www.gayadesign.com/diy/queryloader2-preload-your-images-with-ease/
|
||||
*
|
||||
* Copyright (c) 2011 - Gaya Kessler
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Version: 2.5
|
||||
* Last update: 15-09-2013
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
$.queryLoader2 = function(el, options){
|
||||
var base = this;
|
||||
|
||||
// Access to jQuery and DOM versions of element
|
||||
base.$el = $(el);
|
||||
base.el = el;
|
||||
|
||||
// Add a reverse reference to the DOM object
|
||||
base.$el.data("queryLoader2", base);
|
||||
|
||||
//declare variables
|
||||
base.qLimageContainer = "";
|
||||
base.qLoverlay = "";
|
||||
base.qLbar = "";
|
||||
base.qLpercentage = "";
|
||||
base.qLimages = [];
|
||||
base.qLbgimages = [];
|
||||
base.qLimageCounter = 0;
|
||||
base.qLdone = 0;
|
||||
base.qLdestroyed = false;
|
||||
|
||||
base.init = function(){
|
||||
|
||||
base.options = $.extend({},$.queryLoader2.defaultOptions, options);
|
||||
|
||||
//find images
|
||||
base.findImageInElement(base.el);
|
||||
if (base.options.deepSearch == true) {
|
||||
base.$el.find("*:not(script)").each(function() {
|
||||
base.findImageInElement(this);
|
||||
});
|
||||
}
|
||||
|
||||
//create containers
|
||||
base.createPreloadContainer();
|
||||
base.createOverlayLoader();
|
||||
};
|
||||
|
||||
//the container where unbindable images will go
|
||||
base.createPreloadContainer = function() {
|
||||
base.qLimageContainer = $("<div></div>").appendTo("body").css({
|
||||
display: "none",
|
||||
width: 0,
|
||||
height: 0,
|
||||
overflow: "hidden"
|
||||
});
|
||||
|
||||
//add background images for loading
|
||||
for (var i = 0; base.qLbgimages.length > i; i++) {
|
||||
$.ajax({
|
||||
url: base.qLbgimages[i],
|
||||
type: 'HEAD',
|
||||
complete: function (data) {
|
||||
if (!base.qLdestroyed) {
|
||||
base.addImageForPreload(this['url']);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
base.addImageForPreload = function(url) {
|
||||
var image = $("<img />").attr("src", url);
|
||||
//binding load before the DOM adding
|
||||
base.bindLoadEvent(image);
|
||||
image.appendTo(base.qLimageContainer);
|
||||
};
|
||||
|
||||
//create the overlay
|
||||
base.createOverlayLoader = function () {
|
||||
var overlayPosition = "absolute";
|
||||
|
||||
if (base.$el.prop("tagName") == "BODY") {
|
||||
overlayPosition = "fixed";
|
||||
} else {
|
||||
base.$el.css("position", "relative");
|
||||
}
|
||||
|
||||
base.qLoverlay = $("<div id='" + base.options.overlayId + "'></div>").css({
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
backgroundColor: base.options.backgroundColor,
|
||||
backgroundPosition: "fixed",
|
||||
position: overlayPosition,
|
||||
zIndex: 666999, //very high!
|
||||
top: 0,
|
||||
left: 0
|
||||
}).appendTo(base.$el);
|
||||
|
||||
base.qLbar = $("<div id='qLbar'></div>").css({
|
||||
height: base.options.barHeight + "px",
|
||||
marginTop: "-" + (base.options.barHeight / 2) + "px",
|
||||
backgroundColor: base.options.barColor,
|
||||
width: "0%",
|
||||
position: "absolute",
|
||||
top: "50%"
|
||||
}).appendTo(base.qLoverlay);
|
||||
|
||||
if (base.options.percentage == true) {
|
||||
base.qLpercentage = $("<div id='qLpercentage'></div>").text("0%").css({
|
||||
height: "40px",
|
||||
width: "100px",
|
||||
position: "absolute",
|
||||
fontSize: "3em",
|
||||
top: "50%",
|
||||
left: "50%",
|
||||
marginTop: "-" + (59 + base.options.barHeight) + "px",
|
||||
textAlign: "center",
|
||||
marginLeft: "-50px",
|
||||
color: base.options.barColor
|
||||
}).appendTo(base.qLoverlay);
|
||||
}
|
||||
|
||||
if (!base.qLimages.length) {
|
||||
base.destroyContainers();
|
||||
}
|
||||
};
|
||||
|
||||
//destroy all containers created by QueryLoader
|
||||
base.destroyContainers = function () {
|
||||
base.qLdestroyed = true;
|
||||
base.qLimageContainer.remove();
|
||||
base.qLoverlay.remove();
|
||||
};
|
||||
|
||||
base.findImageInElement = function (element) {
|
||||
var url = "";
|
||||
var obj = $(element);
|
||||
var type = "normal";
|
||||
|
||||
if (obj.css("background-image") != "none") {
|
||||
url = obj.css("background-image");
|
||||
type = "background";
|
||||
} else if (typeof(obj.attr("src")) != "undefined" && element.nodeName.toLowerCase() == "img") {
|
||||
url = obj.attr("src");
|
||||
}
|
||||
|
||||
if (url.indexOf("gradient") == -1) {
|
||||
url = url.replace(/url\(\"/g, "");
|
||||
url = url.replace(/url\(/g, "");
|
||||
url = url.replace(/\"\)/g, "");
|
||||
url = url.replace(/\)/g, "");
|
||||
|
||||
var urls = url.split(", ");
|
||||
|
||||
for (var i = 0; i < urls.length; i++) {
|
||||
if (urls[i].length > 0 && base.qLimages.indexOf(urls[i]) == -1 && !urls[i].match(/^(data:)/i)) {
|
||||
var extra = "";
|
||||
|
||||
if (base.isIE() || base.isOpera()){
|
||||
//filthy always no cache for IE, sorry peeps!
|
||||
extra = "?rand=" + Math.random();
|
||||
base.qLbgimages.push(urls[i] + extra);
|
||||
} else {
|
||||
if (type == "background") {
|
||||
base.qLbgimages.push(urls[i]);
|
||||
} else {
|
||||
base.bindLoadEvent(obj);
|
||||
}
|
||||
}
|
||||
|
||||
base.qLimages.push(urls[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.isIE = function () {
|
||||
return navigator.userAgent.match(/msie/i);
|
||||
};
|
||||
|
||||
base.isOpera = function () {
|
||||
return navigator.userAgent.match(/Opera/i);
|
||||
};
|
||||
|
||||
base.bindLoadEvent = function (element) {
|
||||
base.qLimageCounter++;
|
||||
element.bind("load error", function () {
|
||||
base.completeImageLoading(this);
|
||||
});
|
||||
}
|
||||
|
||||
base.completeImageLoading = function (el) {
|
||||
base.qLdone++;
|
||||
|
||||
var percentage = (base.qLdone / base.qLimageCounter) * 100;
|
||||
base.qLbar.stop().animate({
|
||||
width: percentage + "%",
|
||||
minWidth: percentage + "%"
|
||||
}, 200);
|
||||
|
||||
if (base.options.percentage == true) {
|
||||
base.qLpercentage.text(Math.ceil(percentage) + "%");
|
||||
}
|
||||
|
||||
if (base.qLdone == base.qLimageCounter) {
|
||||
base.endLoader();
|
||||
}
|
||||
};
|
||||
|
||||
base.endLoader = function () {
|
||||
base.qLdestroyed = true;
|
||||
base.onLoadComplete();
|
||||
};
|
||||
|
||||
base.onLoadComplete = function() {
|
||||
if (base.options.completeAnimation == "grow") {
|
||||
var animationTime = 500;
|
||||
|
||||
base.qLbar.stop().animate({
|
||||
"width": "100%"
|
||||
}, animationTime, function () {
|
||||
$(this).animate({
|
||||
top: "0%",
|
||||
width: "100%",
|
||||
height: "100%"
|
||||
}, 500, function () {
|
||||
$('#' + base.options.overlayId).fadeOut(500, function () {
|
||||
$(this).remove();
|
||||
base.destroyContainers();
|
||||
base.options.onComplete();
|
||||
})
|
||||
});
|
||||
});
|
||||
} else {
|
||||
$('#' + base.options.overlayId).fadeOut(500, function () {
|
||||
$('#' + base.options.overlayId).remove();
|
||||
base.destroyContainers();
|
||||
base.options.onComplete();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Run initializer
|
||||
base.init();
|
||||
};
|
||||
|
||||
//The default options
|
||||
$.queryLoader2.defaultOptions = {
|
||||
onComplete: function() {},
|
||||
backgroundColor: "#000",
|
||||
barColor: "#fff",
|
||||
overlayId: 'qLoverlay',
|
||||
barHeight: 1,
|
||||
percentage: false,
|
||||
deepSearch: true,
|
||||
completeAnimation: "fade",
|
||||
minimumTime: 500
|
||||
};
|
||||
|
||||
//function binder
|
||||
$.fn.queryLoader2 = function(options){
|
||||
return this.each(function(){
|
||||
(new $.queryLoader2(this, options));
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
||||
//HERE COMES THE IE SHITSTORM
|
||||
if (!Array.prototype.indexOf) {
|
||||
Array.prototype.indexOf = function (elt /*, from*/) {
|
||||
var len = this.length >>> 0;
|
||||
var from = Number(arguments[1]) || 0;
|
||||
from = (from < 0)
|
||||
? Math.ceil(from)
|
||||
: Math.floor(from);
|
||||
if (from < 0)
|
||||
from += len;
|
||||
|
||||
for (; from < len; from++) {
|
||||
if (from in this &&
|
||||
this[from] === elt)
|
||||
return from;
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
}
|
||||
/* ========================================================================
|
||||
* Bootstrap: tooltip.js v3.0.0
|
||||
* http://twbs.github.com/bootstrap/javascript.html#tooltip
|
||||
* Inspired by the original jQuery.tipsy by Jason Frame
|
||||
* ========================================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* ======================================================================== */
|
||||
|
||||
|
||||
+function ($) { "use strict";
|
||||
|
||||
// TOOLTIP PUBLIC CLASS DEFINITION
|
||||
// ===============================
|
||||
|
||||
var Tooltip = function (element, options) {
|
||||
this.type =
|
||||
this.options =
|
||||
this.enabled =
|
||||
this.timeout =
|
||||
this.hoverState =
|
||||
this.$element = null
|
||||
|
||||
this.init('tooltip', element, options)
|
||||
}
|
||||
|
||||
Tooltip.DEFAULTS = {
|
||||
animation: true
|
||||
, placement: 'top'
|
||||
, selector: false
|
||||
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
|
||||
, trigger: 'hover focus'
|
||||
, title: ''
|
||||
, delay: 0
|
||||
, html: false
|
||||
, container: false
|
||||
}
|
||||
|
||||
Tooltip.prototype.init = function (type, element, options) {
|
||||
this.enabled = true
|
||||
this.type = type
|
||||
this.$element = $(element)
|
||||
this.options = this.getOptions(options)
|
||||
|
||||
var triggers = this.options.trigger.split(' ')
|
||||
|
||||
for (var i = triggers.length; i--;) {
|
||||
var trigger = triggers[i]
|
||||
|
||||
if (trigger == 'click') {
|
||||
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
|
||||
} else if (trigger != 'manual') {
|
||||
var eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
|
||||
var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
|
||||
|
||||
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
|
||||
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
|
||||
}
|
||||
}
|
||||
|
||||
this.options.selector ?
|
||||
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
|
||||
this.fixTitle()
|
||||
}
|
||||
|
||||
Tooltip.prototype.getDefaults = function () {
|
||||
return Tooltip.DEFAULTS
|
||||
}
|
||||
|
||||
Tooltip.prototype.getOptions = function (options) {
|
||||
options = $.extend({}, this.getDefaults(), this.$element.data(), options)
|
||||
|
||||
if (options.delay && typeof options.delay == 'number') {
|
||||
options.delay = {
|
||||
show: options.delay
|
||||
, hide: options.delay
|
||||
}
|
||||
}
|
||||
|
||||
return options
|
||||
}
|
||||
|
||||
Tooltip.prototype.getDelegateOptions = function () {
|
||||
var options = {}
|
||||
var defaults = this.getDefaults()
|
||||
|
||||
this._options && $.each(this._options, function (key, value) {
|
||||
if (defaults[key] != value) options[key] = value
|
||||
})
|
||||
|
||||
return options
|
||||
}
|
||||
|
||||
Tooltip.prototype.enter = function (obj) {
|
||||
var self = obj instanceof this.constructor ?
|
||||
obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
|
||||
|
||||
clearTimeout(self.timeout)
|
||||
|
||||
self.hoverState = 'in'
|
||||
|
||||
if (!self.options.delay || !self.options.delay.show) return self.show()
|
||||
|
||||
self.timeout = setTimeout(function () {
|
||||
if (self.hoverState == 'in') self.show()
|
||||
}, self.options.delay.show)
|
||||
}
|
||||
|
||||
Tooltip.prototype.leave = function (obj) {
|
||||
var self = obj instanceof this.constructor ?
|
||||
obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
|
||||
|
||||
clearTimeout(self.timeout)
|
||||
|
||||
self.hoverState = 'out'
|
||||
|
||||
if (!self.options.delay || !self.options.delay.hide) return self.hide()
|
||||
|
||||
self.timeout = setTimeout(function () {
|
||||
if (self.hoverState == 'out') self.hide()
|
||||
}, self.options.delay.hide)
|
||||
}
|
||||
|
||||
Tooltip.prototype.show = function () {
|
||||
var e = $.Event('show.bs.'+ this.type)
|
||||
|
||||
if (this.hasContent() && this.enabled) {
|
||||
this.$element.trigger(e)
|
||||
|
||||
if (e.isDefaultPrevented()) return
|
||||
|
||||
var $tip = this.tip()
|
||||
|
||||
this.setContent()
|
||||
|
||||
if (this.options.animation) $tip.addClass('fade')
|
||||
|
||||
var placement = typeof this.options.placement == 'function' ?
|
||||
this.options.placement.call(this, $tip[0], this.$element[0]) :
|
||||
this.options.placement
|
||||
|
||||
var autoToken = /\s?auto?\s?/i
|
||||
var autoPlace = autoToken.test(placement)
|
||||
if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
|
||||
|
||||
$tip
|
||||
.detach()
|
||||
.css({ top: 0, left: 0, display: 'block' })
|
||||
.addClass(placement)
|
||||
|
||||
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
|
||||
|
||||
var pos = this.getPosition()
|
||||
var actualWidth = $tip[0].offsetWidth
|
||||
var actualHeight = $tip[0].offsetHeight
|
||||
|
||||
if (autoPlace) {
|
||||
var $parent = this.$element.parent()
|
||||
|
||||
var orgPlacement = placement
|
||||
var docScroll = document.documentElement.scrollTop || document.body.scrollTop
|
||||
var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth()
|
||||
var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight()
|
||||
var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left
|
||||
|
||||
placement = placement == 'bottom' && pos.top + pos.height + actualHeight - docScroll > parentHeight ? 'top' :
|
||||
placement == 'top' && pos.top - docScroll - actualHeight < 0 ? 'bottom' :
|
||||
placement == 'right' && pos.right + actualWidth > parentWidth ? 'left' :
|
||||
placement == 'left' && pos.left - actualWidth < parentLeft ? 'right' :
|
||||
placement
|
||||
|
||||
$tip
|
||||
.removeClass(orgPlacement)
|
||||
.addClass(placement)
|
||||
}
|
||||
|
||||
var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
|
||||
|
||||
this.applyPlacement(calculatedOffset, placement)
|
||||
this.$element.trigger('shown.bs.' + this.type)
|
||||
}
|
||||
}
|
||||
|
||||
Tooltip.prototype.applyPlacement = function(offset, placement) {
|
||||
var replace
|
||||
var $tip = this.tip()
|
||||
var width = $tip[0].offsetWidth
|
||||
var height = $tip[0].offsetHeight
|
||||
|
||||
// manually read margins because getBoundingClientRect includes difference
|
||||
var marginTop = parseInt($tip.css('margin-top'), 10)
|
||||
var marginLeft = parseInt($tip.css('margin-left'), 10)
|
||||
|
||||
// we must check for NaN for ie 8/9
|
||||
if (isNaN(marginTop)) marginTop = 0
|
||||
if (isNaN(marginLeft)) marginLeft = 0
|
||||
|
||||
offset.top = offset.top + marginTop
|
||||
offset.left = offset.left + marginLeft
|
||||
|
||||
$tip
|
||||
.offset(offset)
|
||||
.addClass('in')
|
||||
|
||||
// check to see if placing tip in new offset caused the tip to resize itself
|
||||
var actualWidth = $tip[0].offsetWidth
|
||||
var actualHeight = $tip[0].offsetHeight
|
||||
|
||||
if (placement == 'top' && actualHeight != height) {
|
||||
replace = true
|
||||
offset.top = offset.top + height - actualHeight
|
||||
}
|
||||
|
||||
if (/bottom|top/.test(placement)) {
|
||||
var delta = 0
|
||||
|
||||
if (offset.left < 0) {
|
||||
delta = offset.left * -2
|
||||
offset.left = 0
|
||||
|
||||
$tip.offset(offset)
|
||||
|
||||
actualWidth = $tip[0].offsetWidth
|
||||
actualHeight = $tip[0].offsetHeight
|
||||
}
|
||||
|
||||
this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
|
||||
} else {
|
||||
this.replaceArrow(actualHeight - height, actualHeight, 'top')
|
||||
}
|
||||
|
||||
if (replace) $tip.offset(offset)
|
||||
}
|
||||
|
||||
Tooltip.prototype.replaceArrow = function(delta, dimension, position) {
|
||||
this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
|
||||
}
|
||||
|
||||
Tooltip.prototype.setContent = function () {
|
||||
var $tip = this.tip()
|
||||
var title = this.getTitle()
|
||||
|
||||
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
|
||||
$tip.removeClass('fade in top bottom left right')
|
||||
}
|
||||
|
||||
Tooltip.prototype.hide = function () {
|
||||
var that = this
|
||||
var $tip = this.tip()
|
||||
var e = $.Event('hide.bs.' + this.type)
|
||||
|
||||
function complete() {
|
||||
if (that.hoverState != 'in') $tip.detach()
|
||||
}
|
||||
|
||||
this.$element.trigger(e)
|
||||
|
||||
if (e.isDefaultPrevented()) return
|
||||
|
||||
$tip.removeClass('in')
|
||||
|
||||
$.support.transition && this.$tip.hasClass('fade') ?
|
||||
$tip
|
||||
.one($.support.transition.end, complete)
|
||||
.emulateTransitionEnd(150) :
|
||||
complete()
|
||||
|
||||
this.$element.trigger('hidden.bs.' + this.type)
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
Tooltip.prototype.fixTitle = function () {
|
||||
var $e = this.$element
|
||||
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
|
||||
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
|
||||
}
|
||||
}
|
||||
|
||||
Tooltip.prototype.hasContent = function () {
|
||||
return this.getTitle()
|
||||
}
|
||||
|
||||
Tooltip.prototype.getPosition = function () {
|
||||
var el = this.$element[0]
|
||||
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
|
||||
width: el.offsetWidth
|
||||
, height: el.offsetHeight
|
||||
}, this.$element.offset())
|
||||
}
|
||||
|
||||
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
|
||||
return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
||||
placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
|
||||
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
|
||||
/* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
|
||||
}
|
||||
|
||||
Tooltip.prototype.getTitle = function () {
|
||||
var title
|
||||
var $e = this.$element
|
||||
var o = this.options
|
||||
|
||||
title = $e.attr('data-original-title')
|
||||
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
|
||||
|
||||
return title
|
||||
}
|
||||
|
||||
Tooltip.prototype.tip = function () {
|
||||
return this.$tip = this.$tip || $(this.options.template)
|
||||
}
|
||||
|
||||
Tooltip.prototype.arrow = function () {
|
||||
return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
|
||||
}
|
||||
|
||||
Tooltip.prototype.validate = function () {
|
||||
if (!this.$element[0].parentNode) {
|
||||
this.hide()
|
||||
this.$element = null
|
||||
this.options = null
|
||||
}
|
||||
}
|
||||
|
||||
Tooltip.prototype.enable = function () {
|
||||
this.enabled = true
|
||||
}
|
||||
|
||||
Tooltip.prototype.disable = function () {
|
||||
this.enabled = false
|
||||
}
|
||||
|
||||
Tooltip.prototype.toggleEnabled = function () {
|
||||
this.enabled = !this.enabled
|
||||
}
|
||||
|
||||
Tooltip.prototype.toggle = function (e) {
|
||||
var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this
|
||||
self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
|
||||
}
|
||||
|
||||
Tooltip.prototype.destroy = function () {
|
||||
this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
|
||||
}
|
||||
|
||||
|
||||
// TOOLTIP PLUGIN DEFINITION
|
||||
// =========================
|
||||
|
||||
var old = $.fn.tooltip
|
||||
|
||||
$.fn.tooltip = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data('bs.tooltip')
|
||||
var options = typeof option == 'object' && option
|
||||
|
||||
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.tooltip.Constructor = Tooltip
|
||||
|
||||
|
||||
// TOOLTIP NO CONFLICT
|
||||
// ===================
|
||||
|
||||
$.fn.tooltip.noConflict = function () {
|
||||
$.fn.tooltip = old
|
||||
return this
|
||||
}
|
||||
|
||||
}(window.jQuery);
|
||||
/* ========================================================================
|
||||
* Bootstrap: alert.js v3.0.0
|
||||
* http://twbs.github.com/bootstrap/javascript.html#alerts
|
||||
* ========================================================================
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* ======================================================================== */
|
||||
|
||||
|
||||
+function ($) { "use strict";
|
||||
|
||||
// ALERT CLASS DEFINITION
|
||||
// ======================
|
||||
|
||||
var dismiss = '[data-dismiss="alert"]'
|
||||
var Alert = function (el) {
|
||||
$(el).on('click', dismiss, this.close)
|
||||
}
|
||||
|
||||
Alert.prototype.close = function (e) {
|
||||
var $this = $(this)
|
||||
var selector = $this.attr('data-target')
|
||||
|
||||
if (!selector) {
|
||||
selector = $this.attr('href')
|
||||
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
||||
}
|
||||
|
||||
var $parent = $(selector)
|
||||
|
||||
if (e) e.preventDefault()
|
||||
|
||||
if (!$parent.length) {
|
||||
$parent = $this.hasClass('alert') ? $this : $this.parent()
|
||||
}
|
||||
|
||||
$parent.trigger(e = $.Event('close.bs.alert'))
|
||||
|
||||
if (e.isDefaultPrevented()) return
|
||||
|
||||
$parent.removeClass('in')
|
||||
|
||||
function removeElement() {
|
||||
$parent.trigger('closed.bs.alert').remove()
|
||||
}
|
||||
|
||||
$.support.transition && $parent.hasClass('fade') ?
|
||||
$parent
|
||||
.one($.support.transition.end, removeElement)
|
||||
.emulateTransitionEnd(150) :
|
||||
removeElement()
|
||||
}
|
||||
|
||||
|
||||
// ALERT PLUGIN DEFINITION
|
||||
// =======================
|
||||
|
||||
var old = $.fn.alert
|
||||
|
||||
$.fn.alert = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data('bs.alert')
|
||||
|
||||
if (!data) $this.data('bs.alert', (data = new Alert(this)))
|
||||
if (typeof option == 'string') data[option].call($this)
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.alert.Constructor = Alert
|
||||
|
||||
|
||||
// ALERT NO CONFLICT
|
||||
// =================
|
||||
|
||||
$.fn.alert.noConflict = function () {
|
||||
$.fn.alert = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
// ALERT DATA-API
|
||||
// ==============
|
||||
|
||||
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
|
||||
|
||||
}(window.jQuery);
|
||||
/*
|
||||
* jQuery appear plugin
|
||||
*
|
||||
* Copyright (c) 2012 Andrey Sidorov
|
||||
* licensed under MIT license.
|
||||
*
|
||||
* https://github.com/morr/jquery.appear/
|
||||
*
|
||||
* Version: 0.3.3
|
||||
*/
|
||||
(function($) {
|
||||
var selectors = [];
|
||||
|
||||
var check_binded = false;
|
||||
var check_lock = false;
|
||||
var defaults = {
|
||||
interval: 250,
|
||||
force_process: false
|
||||
}
|
||||
var $window = $(window);
|
||||
|
||||
var $prior_appeared;
|
||||
|
||||
function process() {
|
||||
check_lock = false;
|
||||
for (var index = 0; index < selectors.length; index++) {
|
||||
var $appeared = $(selectors[index]).filter(function() {
|
||||
return $(this).is(':appeared');
|
||||
});
|
||||
|
||||
$appeared.trigger('appear', [$appeared]);
|
||||
|
||||
if ($prior_appeared) {
|
||||
var $disappeared = $prior_appeared.not($appeared);
|
||||
$disappeared.trigger('disappear', [$disappeared]);
|
||||
}
|
||||
$prior_appeared = $appeared;
|
||||
}
|
||||
}
|
||||
|
||||
// "appeared" custom filter
|
||||
$.expr[':']['appeared'] = function(element) {
|
||||
var $element = $(element);
|
||||
if (!$element.is(':visible')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var window_left = $window.scrollLeft();
|
||||
var window_top = $window.scrollTop();
|
||||
var offset = $element.offset();
|
||||
var left = offset.left;
|
||||
var top = offset.top;
|
||||
|
||||
if (top + $element.height() >= window_top &&
|
||||
top - ($element.data('appear-top-offset') || 0) <= window_top + $window.height() &&
|
||||
left + $element.width() >= window_left &&
|
||||
left - ($element.data('appear-left-offset') || 0) <= window_left + $window.width()) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.extend({
|
||||
// watching for element's appearance in browser viewport
|
||||
appear: function(options) {
|
||||
var opts = $.extend({}, defaults, options || {});
|
||||
var selector = this.selector || this;
|
||||
if (!check_binded) {
|
||||
var on_check = function() {
|
||||
if (check_lock) {
|
||||
return;
|
||||
}
|
||||
check_lock = true;
|
||||
|
||||
setTimeout(process, opts.interval);
|
||||
};
|
||||
|
||||
$(window).scroll(on_check).resize(on_check);
|
||||
check_binded = true;
|
||||
}
|
||||
|
||||
if (opts.force_process) {
|
||||
setTimeout(process, opts.interval);
|
||||
}
|
||||
selectors.push(selector);
|
||||
return $(selector);
|
||||
}
|
||||
});
|
||||
|
||||
$.extend({
|
||||
// force elements's appearance check
|
||||
force_appear: function() {
|
||||
if (check_binded) {
|
||||
process();
|
||||
return true;
|
||||
};
|
||||
return false;
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
126
wwwroot/BackendScript/js/sparkline-chart.js
Normal file
126
wwwroot/BackendScript/js/sparkline-chart.js
Normal file
@@ -0,0 +1,126 @@
|
||||
var Script = function () {
|
||||
|
||||
$(".sparkline").each(function(){
|
||||
var $data = $(this).data();
|
||||
|
||||
$data.valueSpots = {'0:': $data.spotColor};
|
||||
|
||||
$(this).sparkline( $data.data || "html", $data,
|
||||
{
|
||||
tooltipFormat: '<span style="display:block; padding:0px 10px 12px 0px;">' +
|
||||
'<span style="color: {{color}}">●</span> {{offset:names}} ({{percent.1}}%)</span>'
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
//sparkline chart
|
||||
|
||||
$("#barchart").sparkline([5,3,6,7,5,6,4,2,3,4,6,8,9,10,8,6,5,7,6,5,4,7,4], {
|
||||
type: 'bar',
|
||||
height: '65',
|
||||
barWidth: 8,
|
||||
barSpacing: 5,
|
||||
barColor: '#fff'
|
||||
// tooltipFormat: '<span style="display:block; padding:0px 10px 12px 0px;">' +
|
||||
// '<span style="color: {{color}}">●</span> {{offset:names}} ({{percent.1}}%)</span>'
|
||||
|
||||
});
|
||||
|
||||
|
||||
$("#linechart").sparkline([1,5,3,7,9,3,6,4,7,9,7,6,2], {
|
||||
type: 'line',
|
||||
width: '300',
|
||||
height: '75',
|
||||
fillColor: '',
|
||||
lineColor: '#fff',
|
||||
lineWidth: 2,
|
||||
spotColor: '#fff',
|
||||
minSpotColor: '#fff',
|
||||
maxSpotColor: '#fff',
|
||||
highlightSpotColor: '#fff',
|
||||
highlightLineColor: '#ffffff',
|
||||
spotRadius: 4,
|
||||
highlightLineColor: '#ffffff'
|
||||
// tooltipFormat: '<span style="display:block; padding:0px 10px 12px 0px;">' +
|
||||
// '<span style="color: {{color}}">●</span> {{offset:names}} ({{percent.1}}%)</span>'
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
$("#pie-chart").sparkline([2,1,1,1], {
|
||||
type: 'pie',
|
||||
width: '100',
|
||||
height: '100',
|
||||
borderColor: '#00bf00',
|
||||
sliceColors: ['#41CAC0', '#A8D76F', '#F8D347', '#EF6F66']
|
||||
// tooltipFormat: '<span style="display:block; padding:0px 10px 12px 0px;">' +
|
||||
// '<span style="color: {{color}}">●</span> {{offset:names}} ({{percent.1}}%)</span>'
|
||||
});
|
||||
|
||||
//work progress bar
|
||||
|
||||
$("#work-progress1").sparkline([5,6,7,5,9,6,4], {
|
||||
type: 'bar',
|
||||
height: '20',
|
||||
barWidth: 5,
|
||||
barSpacing: 2,
|
||||
barColor: '#5fbf00'
|
||||
// tooltipFormat: '<span style="display:block; padding:0px 10px 12px 0px;">' +
|
||||
// '<span style="color: {{color}}">●</span> {{offset:names}} ({{percent.1}}%)</span>'
|
||||
});
|
||||
|
||||
$("#work-progress2").sparkline([3,2,5,8,4,7,5], {
|
||||
type: 'bar',
|
||||
height: '22',
|
||||
barWidth: 5,
|
||||
barSpacing: 2,
|
||||
barColor: '#58c9f1'
|
||||
// tooltipFormat: '<span style="display:block; padding:0px 10px 12px 0px;">' +
|
||||
// '<span style="color: {{color}}">●</span> {{offset:names}} ({{percent.1}}%)</span>'
|
||||
});
|
||||
|
||||
$("#work-progress3").sparkline([1,6,9,3,4,8,5], {
|
||||
type: 'bar',
|
||||
height: '22',
|
||||
barWidth: 5,
|
||||
barSpacing: 2,
|
||||
barColor: '#8075c4'
|
||||
// tooltipFormat: '<span style="display:block; padding:0px 10px 12px 0px;">' +
|
||||
// '<span style="color: {{color}}">●</span> {{offset:names}} ({{percent.1}}%)</span>'
|
||||
});
|
||||
|
||||
$("#work-progress4").sparkline([9,4,9,6,7,4,3], {
|
||||
type: 'bar',
|
||||
height: '22',
|
||||
barWidth: 5,
|
||||
barSpacing: 2,
|
||||
barColor: '#ff6c60'
|
||||
// tooltipFormat: '<span style="display:block; padding:0px 10px 12px 0px;">' +
|
||||
// '<span style="color: {{color}}">●</span> {{offset:names}} ({{percent.1}}%)</span>'
|
||||
});
|
||||
|
||||
$("#work-progress5").sparkline([6,8,5,7,6,8,3], {
|
||||
type: 'bar',
|
||||
height: '22',
|
||||
barWidth: 5,
|
||||
barSpacing: 2,
|
||||
barColor: '#41cac0'
|
||||
// tooltipFormat: '<span style="display:block; padding:0px 10px 12px 0px;">' +
|
||||
// '<span style="color: {{color}}">●</span> {{offset:names}} ({{percent.1}}%)</span>'
|
||||
});
|
||||
|
||||
$("#pie-chart2").sparkline([2,1,1,1], {
|
||||
type: 'pie',
|
||||
width: '250',
|
||||
height: '125',
|
||||
sliceColors: ['#41CAC0', '#A8D76F', '#F8D347', '#EF6F66']
|
||||
// tooltipFormat: '<span style="display:block; padding:0px 10px 12px 0px;">' +
|
||||
// '<span style="color: {{color}}">●</span> {{offset:names}} ({{percent.1}}%)</span>'});
|
||||
|
||||
});
|
||||
|
||||
}();
|
||||
17
wwwroot/BackendScript/js/tasks.js
Normal file
17
wwwroot/BackendScript/js/tasks.js
Normal file
@@ -0,0 +1,17 @@
|
||||
var TaskList = function () {
|
||||
|
||||
return {
|
||||
|
||||
initTaskWidget: function () {
|
||||
$('input.list-child').change(function() {
|
||||
if ($(this).is(':checked')) {
|
||||
$(this).parents('li').addClass("task-done");
|
||||
} else {
|
||||
$(this).parents('li').removeClass("task-done");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}();
|
||||
81
wwwroot/BackendScript/js/toucheffects.js
Normal file
81
wwwroot/BackendScript/js/toucheffects.js
Normal file
@@ -0,0 +1,81 @@
|
||||
/** Used Only For Touch Devices **/
|
||||
( function( window ) {
|
||||
|
||||
// for touch devices: add class cs-hover to the figures when touching the items
|
||||
if( Modernizr.touch ) {
|
||||
|
||||
// classie.js https://github.com/desandro/classie/blob/master/classie.js
|
||||
// class helper functions from bonzo https://github.com/ded/bonzo
|
||||
|
||||
function classReg( className ) {
|
||||
return new RegExp("(^|\\s+)" + className + "(\\s+|$)");
|
||||
}
|
||||
|
||||
// classList support for class management
|
||||
// altho to be fair, the api sucks because it won't accept multiple classes at once
|
||||
var hasClass, addClass, removeClass;
|
||||
|
||||
if ( 'classList' in document.documentElement ) {
|
||||
hasClass = function( elem, c ) {
|
||||
return elem.classList.contains( c );
|
||||
};
|
||||
addClass = function( elem, c ) {
|
||||
elem.classList.add( c );
|
||||
};
|
||||
removeClass = function( elem, c ) {
|
||||
elem.classList.remove( c );
|
||||
};
|
||||
}
|
||||
else {
|
||||
hasClass = function( elem, c ) {
|
||||
return classReg( c ).test( elem.className );
|
||||
};
|
||||
addClass = function( elem, c ) {
|
||||
if ( !hasClass( elem, c ) ) {
|
||||
elem.className = elem.className + ' ' + c;
|
||||
}
|
||||
};
|
||||
removeClass = function( elem, c ) {
|
||||
elem.className = elem.className.replace( classReg( c ), ' ' );
|
||||
};
|
||||
}
|
||||
|
||||
function toggleClass( elem, c ) {
|
||||
var fn = hasClass( elem, c ) ? removeClass : addClass;
|
||||
fn( elem, c );
|
||||
}
|
||||
|
||||
var classie = {
|
||||
// full names
|
||||
hasClass: hasClass,
|
||||
addClass: addClass,
|
||||
removeClass: removeClass,
|
||||
toggleClass: toggleClass,
|
||||
// short names
|
||||
has: hasClass,
|
||||
add: addClass,
|
||||
remove: removeClass,
|
||||
toggle: toggleClass
|
||||
};
|
||||
|
||||
// transport
|
||||
if ( typeof define === 'function' && define.amd ) {
|
||||
// AMD
|
||||
define( classie );
|
||||
} else {
|
||||
// browser global
|
||||
window.classie = classie;
|
||||
}
|
||||
|
||||
[].slice.call( document.querySelectorAll( 'ul.grid > li > figure' ) ).forEach( function( el, i ) {
|
||||
el.querySelector( 'figcaption > a' ).addEventListener( 'touchstart', function(e) {
|
||||
e.stopPropagation();
|
||||
}, false );
|
||||
el.addEventListener( 'touchstart', function(e) {
|
||||
classie.toggle( this, 'cs-hover' );
|
||||
}, false );
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
})( window );
|
||||
117
wwwroot/BackendScript/js/tree.js
Normal file
117
wwwroot/BackendScript/js/tree.js
Normal file
@@ -0,0 +1,117 @@
|
||||
var TreeView = function () {
|
||||
|
||||
return {
|
||||
//main function to initiate the module
|
||||
init: function () {
|
||||
|
||||
var DataSourceTree = function (options) {
|
||||
this._data = options.data;
|
||||
this._delay = options.delay;
|
||||
};
|
||||
|
||||
DataSourceTree.prototype = {
|
||||
|
||||
data: function (options, callback) {
|
||||
var self = this;
|
||||
|
||||
setTimeout(function () {
|
||||
var data = $.extend(true, [], self._data);
|
||||
|
||||
callback({ data: data });
|
||||
|
||||
}, this._delay)
|
||||
}
|
||||
};
|
||||
|
||||
// INITIALIZING TREE
|
||||
var treeDataSource = new DataSourceTree({
|
||||
data: [
|
||||
{ name: 'Theme', type: 'folder', additionalParameters: { id: 'F1' } },
|
||||
{ name: 'Design', type: 'folder', additionalParameters: { id: 'F2' } },
|
||||
{ name: 'Development', type: 'item', additionalParameters: { id: 'I1' } },
|
||||
{ name: 'Testing', type: 'item', additionalParameters: { id: 'I2' } }
|
||||
],
|
||||
delay: 400
|
||||
});
|
||||
|
||||
var treeDataSource2 = new DataSourceTree({
|
||||
data: [
|
||||
{ name: 'Test tree 1 <div class="tree-actions"></div>', type: 'folder', additionalParameters: { id: 'F11' } },
|
||||
{ name: 'Test tree 2 <div class="tree-actions"></div>', type: 'folder', additionalParameters: { id: 'F12' } },
|
||||
{ name: '<i class="fa fa-bell-o"></i> Notification', type: 'item', additionalParameters: { id: 'I11' } },
|
||||
{ name: '<i class="fa fa-bar-chart-o"></i> Assignment', type: 'item', additionalParameters: { id: 'I12' } }
|
||||
],
|
||||
delay: 400
|
||||
});
|
||||
|
||||
var treeDataSource3 = new DataSourceTree({
|
||||
data: [
|
||||
{ name: 'Theme <div class="tree-actions"></div>', type: 'folder', additionalParameters: { id: 'F11' } },
|
||||
{ name: 'Development <div class="tree-actions"></div>', type: 'folder', additionalParameters: { id: 'F12' } },
|
||||
{ name: 'Flat Theme', type: 'item', additionalParameters: { id: 'I11' } },
|
||||
{ name: 'Modern Design', type: 'item', additionalParameters: { id: 'I12' } }
|
||||
],
|
||||
delay: 400
|
||||
});
|
||||
|
||||
var treeDataSource4 = new DataSourceTree({
|
||||
data: [
|
||||
{ name: 'Theme<div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div>', type: 'folder', additionalParameters: { id: 'F11' } },
|
||||
{ name: 'Development<div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div>', type: 'folder', additionalParameters: { id: 'F12' } },
|
||||
{ name: '<i class="fa fa-user"></i> User <div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div><div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div>', type: 'item', additionalParameters: { id: 'I11' } },
|
||||
{ name: '<i class="fa fa-calendar"></i> Events <div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div>', type: 'item', additionalParameters: { id: 'I12' } },
|
||||
{ name: '<i class="fa fa-gear "></i> Works <div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div>', type: 'item', additionalParameters: { id: 'I12' } }
|
||||
],
|
||||
delay: 400
|
||||
});
|
||||
|
||||
var treeDataSource5 = new DataSourceTree({
|
||||
data: [
|
||||
{ name: 'Theme<div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div>', type: 'folder', additionalParameters: { id: 'F11' } },
|
||||
{ name: 'Development<div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div>', type: 'folder', additionalParameters: { id: 'F12' } },
|
||||
{ name: '<i class="fa fa-user"></i> User <div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div><div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div>', type: 'item', additionalParameters: { id: 'I11' } },
|
||||
{ name: '<i class="fa fa-calendar"></i> Events <div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div>', type: 'item', additionalParameters: { id: 'I12' } },
|
||||
{ name: '<i class="fa fa-gear "></i> Works <div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div>', type: 'item', additionalParameters: { id: 'I12' } }
|
||||
],
|
||||
delay: 400
|
||||
});
|
||||
|
||||
var treeDataSource6 = new DataSourceTree({
|
||||
data: [
|
||||
{ name: 'Theme<div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div>', type: 'folder', additionalParameters: { id: 'F11' } },
|
||||
{ name: 'Development<div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div>', type: 'folder', additionalParameters: { id: 'F12' } },
|
||||
{ name: '<i class="fa fa-user"></i> User <div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div><div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div>', type: 'item', additionalParameters: { id: 'I11' } },
|
||||
{ name: '<i class="fa fa-calendar"></i> Events <div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div>', type: 'item', additionalParameters: { id: 'I12' } },
|
||||
{ name: '<i class="fa fa-gear "></i> Works <div class="tree-actions"><i class="fa fa-plus"></i><i class="fa fa-trash-o"></i><i class="fa fa-refresh"></i></div>', type: 'item', additionalParameters: { id: 'I12' } }
|
||||
],
|
||||
delay: 400
|
||||
});
|
||||
|
||||
$('#FlatTree').tree({
|
||||
dataSource: treeDataSource,
|
||||
loadingHTML: '<img src="img/input-spinner.gif"/>',
|
||||
});
|
||||
|
||||
|
||||
$('#FlatTree2').tree({
|
||||
dataSource: treeDataSource2,
|
||||
loadingHTML: '<img src="img/input-spinner.gif"/>',
|
||||
});
|
||||
|
||||
$('#FlatTree3').tree({
|
||||
dataSource: treeDataSource3,
|
||||
loadingHTML: '<img src="img/input-spinner.gif"/>',
|
||||
});
|
||||
|
||||
$('#FlatTree4').tree({
|
||||
selectable: false,
|
||||
dataSource: treeDataSource4,
|
||||
loadingHTML: '<img src="img/input-spinner.gif"/>',
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}();
|
||||
Reference in New Issue
Block a user