first commit

This commit is contained in:
kicap1992
2024-05-07 19:49:43 +00:00
commit b2a992e15a
3124 changed files with 635045 additions and 0 deletions

BIN
assets/scripts/._cells-by-row.min.js vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
assets/scripts/._chart.chartist.init.min.js vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
assets/scripts/._chart.chartjs.init.min.js vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
assets/scripts/._chart.flot.init.min.js vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
assets/scripts/._chart.highcharts.init.min.js vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
assets/scripts/._chart.morris.init.min.js vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
assets/scripts/._chart.sparkline.init.min.js vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
assets/scripts/._datatables.demo.min.js vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
assets/scripts/._fileUpload.demo.min.js vendored Executable file

Binary file not shown.

BIN
assets/scripts/._form.demo.js Executable file

Binary file not shown.

BIN
assets/scripts/._form.demo.min.js vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
assets/scripts/._form.wizard.init.min.js vendored Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
assets/scripts/._horizontal-menu.min.js vendored Executable file

Binary file not shown.

BIN
assets/scripts/._html5shiv.min.js vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
assets/scripts/._ion.rangeSlider.init.min.js vendored Executable file

Binary file not shown.

BIN
assets/scripts/._isotope.pkgd.min.js vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
assets/scripts/._jquery.knob.init.min.js vendored Executable file

Binary file not shown.

BIN
assets/scripts/._jquery.min.js vendored Executable file

Binary file not shown.

BIN
assets/scripts/._jquery.scrollTo.min.js vendored Executable file

Binary file not shown.

BIN
assets/scripts/._mailbox.init.js Executable file

Binary file not shown.

BIN
assets/scripts/._mailbox.init.min.js vendored Executable file

Binary file not shown.

BIN
assets/scripts/._main.js Executable file

Binary file not shown.

BIN
assets/scripts/._main.min.js vendored Executable file

Binary file not shown.

BIN
assets/scripts/._map.demo.js Executable file

Binary file not shown.

BIN
assets/scripts/._map.demo.min.js vendored Executable file

Binary file not shown.

BIN
assets/scripts/._modernizr.min.js vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
assets/scripts/._nouislider.init.min.js vendored Executable file

Binary file not shown.

BIN
assets/scripts/._respond.min.js vendored Executable file

Binary file not shown.

BIN
assets/scripts/._rwd.demo.js Executable file

Binary file not shown.

BIN
assets/scripts/._rwd.demo.min.js vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
assets/scripts/._sweetalert.init.min.js vendored Executable file

Binary file not shown.

BIN
assets/scripts/._tinymce.init.js Executable file

Binary file not shown.

BIN
assets/scripts/._tinymce.init.min.js vendored Executable file

Binary file not shown.

BIN
assets/scripts/._toastr.demo.js Executable file

Binary file not shown.

BIN
assets/scripts/._toastr.demo.min.js vendored Executable file

Binary file not shown.

BIN
assets/scripts/._tourist.demo.js Executable file

Binary file not shown.

BIN
assets/scripts/._tourist.demo.min.js vendored Executable file

Binary file not shown.

BIN
assets/scripts/._treeview.init.js Executable file

Binary file not shown.

BIN
assets/scripts/._treeview.init.min.js vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
assets/scripts/._x-editable.demo.min.js vendored Executable file

Binary file not shown.

1
assets/scripts/cells-by-row.min.js vendored Executable file
View File

@ -0,0 +1 @@
!function(e){"use strict";function n(e){var n=e.create("cellsByRow");return n.prototype._resetLayout=function(){this.itemIndex=0,this.getColumnWidth(),this.getRowHeight(),this.cols=Math.floor(this.isotope.size.innerWidth/this.columnWidth),this.cols=Math.max(this.cols,1)},n.prototype._getItemLayoutPosition=function(e){e.getSize();var n=this.itemIndex%this.cols,t=Math.floor(this.itemIndex/this.cols),o=(n+.5)*this.columnWidth-e.size.outerWidth/2,s=(t+.5)*this.rowHeight-e.size.outerHeight/2;return this.itemIndex++,{x:o,y:s}},n.prototype._getContainerSize=function(){return{height:Math.ceil(this.itemIndex/this.cols)*this.rowHeight}},n}"function"==typeof define&&define.amd?define(["isotope/js/layout-mode"],n):"object"==typeof exports?module.exports=n(require("isotope-layout/js/layout-mode")):n(e.Isotope.LayoutMode)}(window);

View File

@ -0,0 +1,648 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: Chartist-Chart
*/
(function($) {
"use strict";
var ChartistChart = {};
$(document).ready(function(){
if ($("#area-chartist-chart").length) ChartistChart.area();
if ($("#bar-chartist-chart").length) ChartistChart.bar();
if ($("#bi-polar-area-chartist-chart").length) ChartistChart.biPolarArea();
if ($("#bi-polar-bar-chartist-chart").length) ChartistChart.biPolarBar();
if ($("#donut-bar-chartist-chart").length) ChartistChart.donut();
if ($("#donut-animation-bar-chartist-chart").length) ChartistChart.donutAnimation();
if ($("#gauge-bar-chartist-chart").length) ChartistChart.gauge();
if ($("#horizontal-bar-chartist-chart").length) ChartistChart.horizontalBar();
if ($("#line-chartist-chart").length) ChartistChart.line();
if ($("#pie-bar-chartist-chart").length) ChartistChart.pie();
if ($("#scatter-chartist-chart").length) ChartistChart.scatter();
if ($("#smil-animation-chartist-chart").length) ChartistChart.smilAnimation();
if ($("#smil-animation-index-chartist-chart").length) ChartistChart.smilAnimationIndex();
if ($("#stacked-bar-chartist-chart").length) ChartistChart.stackedBar()
if ($("#svg-animation-chartist-chart").length) ChartistChart.svgAnimation();
return false;
});
ChartistChart = {
area: function(){
new Chartist.Line('#area-chartist-chart', {
labels: [1, 2, 3, 4, 5, 6, 7, 8],
series: [
[5, 9, 7, 8, 5, 3, 5, 4]
]
}, {
low: 0,
showArea: true,
fullWidth: true,
axisY: {
offset: 10
}
});
return false;
},
bar: function(){
new Chartist.Bar('#bar-chartist-chart', {
labels: ['Quarter 1', 'Quarter 2', 'Quarter 3', 'Quarter 4'],
series: [
[5, 4, 3, 7],
[3, 2, 9, 5],
[1, 5, 8, 4],
[2, 3, 4, 6],
[4, 1, 2, 1]
]
}, {
// Default mobile configuration
stackBars: true,
axisX: {
labelInterpolationFnc: function(value) {
return value.split(/\s+/).map(function(word) {
return word[0];
}).join('');
}
},
axisY: {
offset: 10
}
}, [
// Options override for media > 400px
['screen and (min-width: 400px)', {
reverseData: true,
horizontalBars: true,
axisX: {
labelInterpolationFnc: Chartist.noop
},
axisY: {
offset: 20
}
}],
// Options override for media > 800px
['screen and (min-width: 800px)', {
stackBars: false,
seriesBarDistance: 10
}],
// Options override for media > 1000px
['screen and (min-width: 1000px)', {
reverseData: false,
horizontalBars: false,
seriesBarDistance: 15
}]
]);
return false;
},
biPolarArea : function(){
new Chartist.Line('#bi-polar-area-chartist-chart', {
labels: [1, 2, 3, 4, 5, 6, 7, 8],
series: [
[1, 2, 3, 1, -2, 0, 1, 0],
[-2, -1, -2, -1, -2.5, -1, -2, -1],
[0, 0, 0, 1, 2, 2.5, 2, 1],
[2.5, 2, 1, 0.5, 1, 0.5, -1, -2.5]
]
}, {
high: 3,
low: -3,
showArea: true,
showLine: false,
showPoint: false,
fullWidth: true,
axisY: {
offset: 20
},
axisX: {
showLabel: false,
showGrid: false
}
});
return false;
},
biPolarBar : function(){
var data = {
labels: ['W1', 'W2', 'W3', 'W4', 'W5', 'W6', 'W7', 'W8', 'W9', 'W10'],
series: [
[1, 2, 4, 8, 6, -2, -1, -4, -6, -2]
]
};
var options = {
high: 10,
low: -10,
axisX: {
labelInterpolationFnc: function(value, index) {
return index % 2 === 0 ? value : null;
}
},
fullWidth: true,
axisY: {
offset: 10
},
};
new Chartist.Bar('#bi-polar-bar-chartist-chart', data, options);
return false;
},
donut: function(){
var data = {
series: [20, 10, 30, 40]
};
var sum = function(a, b) { return a + b };
new Chartist.Pie('#donut-bar-chartist-chart', data, {
labelInterpolationFnc: function(value) {
return Math.round(value / data.series.reduce(sum) * 100) + '%';
},
donut: true,
donutWidth: 80,
startAngle: 270,
});
return false;
},
donutAnimation: function(){
var chart = new Chartist.Pie('#donut-animation-bar-chartist-chart', {
series: [10, 20, 50, 20, 5, 50, 15],
labels: [1, 2, 3, 4, 5, 6, 7]
}, {
donut: true,
showLabel: false
});
chart.on('draw', function(data) {
if(data.type === 'slice') {
// Get the total path length in order to use for dash array animation
var pathLength = data.element._node.getTotalLength();
// Set a dasharray that matches the path length as prerequisite to animate dashoffset
data.element.attr({
'stroke-dasharray': pathLength + 'px ' + pathLength + 'px'
});
// Create animation definition while also assigning an ID to the animation for later sync usage
var animationDefinition = {
'stroke-dashoffset': {
id: 'anim' + data.index,
dur: 1000,
from: -pathLength + 'px',
to: '0px',
easing: Chartist.Svg.Easing.easeOutQuint,
// We need to use `fill: 'freeze'` otherwise our animation will fall back to initial (not visible)
fill: 'freeze'
}
};
// If this was not the first slice, we need to time the animation so that it uses the end sync event of the previous animation
if(data.index !== 0) {
animationDefinition['stroke-dashoffset'].begin = 'anim' + (data.index - 1) + '.end';
}
// We need to set an initial value before the animation starts as we are not in guided mode which would do that for us
data.element.attr({
'stroke-dashoffset': -pathLength + 'px'
});
// We can't use guided mode as the animations need to rely on setting begin manually
// See http://gionkunz.github.io/chartist-js/api-documentation.html#chartistsvg-function-animate
data.element.animate(animationDefinition, false);
}
});
// For the sake of the example we update the chart every time it's created with a delay of 8 seconds
chart.on('created', function() {
if(window.__anim21278907124) {
clearTimeout(window.__anim21278907124);
window.__anim21278907124 = null;
}
window.__anim21278907124 = setTimeout(chart.update.bind(chart), 10000);
});
return false;
},
gauge: function(){
new Chartist.Pie('#gauge-bar-chartist-chart', {
series: [20, 10, 30, 40]
}, {
donut: true,
donutWidth: 60,
startAngle: 270,
total: 200,
showLabel: false
});
return false;
},
horizontalBar: function(){
new Chartist.Bar('#horizontal-bar-chartist-chart', {
labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],
series: [
[5, 4, 3, 7, 5, 10, 3],
[3, 2, 9, 5, 4, 6, 4]
]
}, {
seriesBarDistance: 10,
reverseData: true,
horizontalBars: true,
axisY: {
offset: 70
},
});
return false;
},
line: function(){
new Chartist.Line('#line-chartist-chart', {
labels: ['1', '2', '3', '4', '5'],
series: [
[12, 9, 7, 8, 5],
[2, 1, 3.5, 7, 3],
[1, 3, 4, 5, 6]
]
}, {
fullWidth: true,
axisY: {
offset: 10
},
chartPadding: {
right: 30
}
}
);
return false;
},
pie: function(){
var data = {
series: [5, 3, 4]
};
var sum = function(a, b) { return a + b };
new Chartist.Pie('#pie-bar-chartist-chart', data, {
labelInterpolationFnc: function(value) {
return Math.round(value / data.series.reduce(sum) * 100) + '%';
}
});
return false;
},
scatter: function(){
var times = function(n) {
return Array.apply(null, new Array(n));
};
var data = times(52).map(Math.random).reduce(function(data, rnd, index) {
data.labels.push(index + 1);
data.series.forEach(function(series) {
series.push(Math.random() * 100)
});
return data;
}, {
labels: [],
series: times(4).map(function() { return new Array() })
});
var options = {
showLine: false,
axisX: {
labelInterpolationFnc: function(value, index) {
return index % 13 === 0 ? 'W' + value : null;
}
},
fullWidth: true,
axisY: {
offset: 20
}
};
var responsiveOptions = [
['screen and (min-width: 640px)', {
axisX: {
labelInterpolationFnc: function(value, index) {
return index % 4 === 0 ? 'W' + value : null;
}
}
}]
];
new Chartist.Line('#scatter-chartist-chart', data, options, responsiveOptions);
return false;
},
smilAnimation: function(){
var chart = new Chartist.Line('#smil-animation-chartist-chart', {
labels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
series: [
[12, 9, 7, 8, 5, 4, 6, 2, 3, 3, 4, 6],
[4, 5, 3, 7, 3, 5, 5, 3, 4, 4, 5, 5],
[5, 3, 4, 5, 6, 3, 3, 4, 5, 6, 3, 4],
[3, 4, 5, 6, 7, 6, 4, 5, 6, 7, 6, 3]
]
}, {
low: 0
});
// Let's put a sequence number aside so we can use it in the event callbacks
var seq = 0,
delays = 80,
durations = 500;
// Once the chart is fully created we reset the sequence
chart.on('created', function() {
seq = 0;
});
// On each drawn element by Chartist we use the Chartist.Svg API to trigger SMIL animations
chart.on('draw', function(data) {
seq++;
if(data.type === 'line') {
// If the drawn element is a line we do a simple opacity fade in. This could also be achieved using CSS3 animations.
data.element.animate({
opacity: {
// The delay when we like to start the animation
begin: seq * delays + 1000,
// Duration of the animation
dur: durations,
// The value where the animation should start
from: 0,
// The value where it should end
to: 1
}
});
} else if(data.type === 'label' && data.axis === 'x') {
data.element.animate({
y: {
begin: seq * delays,
dur: durations,
from: data.y + 100,
to: data.y,
// We can specify an easing function from Chartist.Svg.Easing
easing: 'easeOutQuart'
}
});
} else if(data.type === 'label' && data.axis === 'y') {
data.element.animate({
x: {
begin: seq * delays,
dur: durations,
from: data.x - 100,
to: data.x,
easing: 'easeOutQuart'
}
});
} else if(data.type === 'point') {
data.element.animate({
x1: {
begin: seq * delays,
dur: durations,
from: data.x - 10,
to: data.x,
easing: 'easeOutQuart'
},
x2: {
begin: seq * delays,
dur: durations,
from: data.x - 10,
to: data.x,
easing: 'easeOutQuart'
},
opacity: {
begin: seq * delays,
dur: durations,
from: 0,
to: 1,
easing: 'easeOutQuart'
}
});
} else if(data.type === 'grid') {
// Using data.axis we get x or y which we can use to construct our animation definition objects
var pos1Animation = {
begin: seq * delays,
dur: durations,
from: data[data.axis.units.pos + '1'] - 30,
to: data[data.axis.units.pos + '1'],
easing: 'easeOutQuart'
};
var pos2Animation = {
begin: seq * delays,
dur: durations,
from: data[data.axis.units.pos + '2'] - 100,
to: data[data.axis.units.pos + '2'],
easing: 'easeOutQuart'
};
var animations = {};
animations[data.axis.units.pos + '1'] = pos1Animation;
animations[data.axis.units.pos + '2'] = pos2Animation;
animations['opacity'] = {
begin: seq * delays,
dur: durations,
from: 0,
to: 1,
easing: 'easeOutQuart'
};
data.element.animate(animations);
}
});
// For the sake of the example we update the chart every time it's created with a delay of 10 seconds
chart.on('created', function() {
if(window.__exampleAnimateTimeout) {
clearTimeout(window.__exampleAnimateTimeout);
window.__exampleAnimateTimeout = null;
}
window.__exampleAnimateTimeout = setTimeout(chart.update.bind(chart), 12000);
});
return false;
},
smilAnimationIndex: function(){
var chart = new Chartist.Line('#smil-animation-index-chartist-chart', {
labels: ['2008', '2009', '2010', '2011', '2012', '2013', '2014', '2015', '2016'],
series: [
[8, 5, 4, 6, 2, 3, 3, 4, 6],
[7, 3, 5, 5, 3, 4, 4, 5, 5],
]
}, {
low: 0,
fullWidth: true,
chartPadding: {
right: 30
}
});
// Let's put a sequence number aside so we can use it in the event callbacks
var seq = 0,
delays = 80,
durations = 500;
// Once the chart is fully created we reset the sequence
chart.on('created', function() {
seq = 0;
});
// On each drawn element by Chartist we use the Chartist.Svg API to trigger SMIL animations
chart.on('draw', function(data) {
seq++;
if(data.type === 'line') {
// If the drawn element is a line we do a simple opacity fade in. This could also be achieved using CSS3 animations.
data.element.animate({
opacity: {
// The delay when we like to start the animation
begin: seq * delays + 1000,
// Duration of the animation
dur: durations,
// The value where the animation should start
from: 0,
// The value where it should end
to: 1
}
});
} else if(data.type === 'label' && data.axis === 'x') {
data.element.animate({
y: {
begin: seq * delays,
dur: durations,
from: data.y + 100,
to: data.y,
// We can specify an easing function from Chartist.Svg.Easing
easing: 'easeOutQuart'
}
});
} else if(data.type === 'label' && data.axis === 'y') {
data.element.animate({
x: {
begin: seq * delays,
dur: durations,
from: data.x - 100,
to: data.x,
easing: 'easeOutQuart'
}
});
} else if(data.type === 'point') {
data.element.animate({
x1: {
begin: seq * delays,
dur: durations,
from: data.x - 10,
to: data.x,
easing: 'easeOutQuart'
},
x2: {
begin: seq * delays,
dur: durations,
from: data.x - 10,
to: data.x,
easing: 'easeOutQuart'
},
opacity: {
begin: seq * delays,
dur: durations,
from: 0,
to: 1,
easing: 'easeOutQuart'
}
});
} else if(data.type === 'grid') {
// Using data.axis we get x or y which we can use to construct our animation definition objects
var pos1Animation = {
begin: seq * delays,
dur: durations,
from: data[data.axis.units.pos + '1'] - 30,
to: data[data.axis.units.pos + '1'],
easing: 'easeOutQuart'
};
var pos2Animation = {
begin: seq * delays,
dur: durations,
from: data[data.axis.units.pos + '2'] - 100,
to: data[data.axis.units.pos + '2'],
easing: 'easeOutQuart'
};
var animations = {};
animations[data.axis.units.pos + '1'] = pos1Animation;
animations[data.axis.units.pos + '2'] = pos2Animation;
animations['opacity'] = {
begin: seq * delays,
dur: durations,
from: 0,
to: 1,
easing: 'easeOutQuart'
};
data.element.animate(animations);
}
});
// For the sake of the example we update the chart every time it's created with a delay of 10 seconds
chart.on('created', function() {
if(window.__exampleAnimateTimeout) {
clearTimeout(window.__exampleAnimateTimeout);
window.__exampleAnimateTimeout = null;
}
window.__exampleAnimateTimeout = setTimeout(chart.update.bind(chart), 12000);
});
return false;
},
stackedBar: function(){
new Chartist.Bar('#stacked-bar-chartist-chart', {
labels: ['Q1', 'Q2', 'Q3', 'Q4'],
series: [
[800000, 1200000, 1400000, 1300000],
[200000, 400000, 500000, 300000],
[100000, 200000, 400000, 600000]
]
}, {
stackBars: true,
axisY: {
labelInterpolationFnc: function(value) {
return (value / 1000) + 'k';
}
}
}).on('draw', function(data) {
if(data.type === 'bar') {
data.element.attr({
style: 'stroke-width: 30px'
});
}
});
return false;
},
svgAnimation: function(){
var chart = new Chartist.Line('#svg-animation-chartist-chart', {
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
series: [
[1, 5, 2, 5, 4, 3],
[2, 3, 4, 8, 1, 2],
[5, 4, 3, 2, 1, 0.5]
]
}, {
low: 0,
showArea: true,
showPoint: false,
fullWidth: true,
axisY: {
offset: 10
}
});
chart.on('draw', function(data) {
if(data.type === 'line' || data.type === 'area') {
data.element.animate({
d: {
begin: 2000 * data.index,
dur: 2000,
from: data.path.clone().scale(1, 0).translate(0, data.chartRect.height()).stringify(),
to: data.path.clone().stringify(),
easing: Chartist.Svg.Easing.easeOutQuint
}
});
}
});
return false;
}
}
})(jQuery);

1
assets/scripts/chart.chartist.init.min.js vendored Executable file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,256 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: Chartist-Chart
*/
(function($) {
"use strict";
var ChartJs = {},
randomScalingFactor = function() {
return Math.round(Math.random() * 15) + 5;
};
$(document).ready(function(){
if ($('#bar-chartjs-chart').length) ChartJs.bar('bar-chartjs-chart','top','bar');
if ($('#horizontal-bar-chartjs-chart').length) ChartJs.bar('horizontal-bar-chartjs-chart','right','horizontalBar');
if ($('#line-chartjs-chart').length) ChartJs.line('line-chartjs-chart',false);
if ($('#area-chartjs-chart').length) ChartJs.line('area-chartjs-chart',true);
if ($('#pie-chartjs-chart').length) ChartJs.pie('pie-chartjs-chart','pie');
if ($('#donut-chartjs-chart').length) ChartJs.pie('donut-chartjs-chart','doughnut');
if ($('#polar-chartjs-chart').length) ChartJs.polar('polar-chartjs-chart');
if ($('#radar-chartjs-chart').length) ChartJs.radar('radar-chartjs-chart');
return false;
});
ChartJs = {
bar: function(container,position,type){
var barChartData = {
labels: ["January", "February", "March", "April"],
datasets: [{
label: 'Dataset 1',
backgroundColor: "rgba(249,200,81,0.3)",
borderColor: "rgb(249, 200, 81)",
borderWidth: 1,
hoverBackgroundColor: "rgba(249,200,81,0.6)",
hoverBorderColor: "rgb(249, 200, 81)",
data: [randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor()]
}, {
label: 'Dataset 2',
backgroundColor: "rgba(127, 193, 252, 0.3)",
borderColor: "#7fc1fc",
borderWidth: 1,
hoverBackgroundColor: "rgba(127, 193, 252, 0.6)",
hoverBorderColor: "#7fc1fc",
data: [randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor()]
}, {
label: 'Dataset 3',
backgroundColor: "rgba(245,112,122,0.3)",
borderColor: "#f5707a",
borderWidth: 1,
hoverBackgroundColor: "rgba(245,112,122,0.6)",
hoverBorderColor: "#f5707a",
data: [randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor()]
}]
};
var ctx = document.getElementById(container).getContext("2d"),
skip = (type == "bar") ? "bottom" : "left" ;
new Chart(ctx, {
type: type,
data: barChartData,
options: {
// Elements options apply to all of the options unless overridden in a dataset
// In this case, we are setting the border of each bar to be 2px wide and green
hover: {
mode: 'label'
},
responsive: true,
legend: {
position: position,
},
scales: {
xAxes: [{
ticks: {
beginAtZero:true
},
}],
yAxes: [{
ticks: {
beginAtZero:true
}
}],
},
}
});
return false;
},
line: function(container,fill){
var lineData = {
labels: ["0", "1", "2", "3","4","5","6","7","8","9","10"],
datasets: [{
label: 'Series 1',
fill: fill,
borderColor: "rgba(245,112,122,1)",
pointBackgroundColor: "rgb(245,112,122)",
backgroundColor: "rgba(245,112,122,0.3)",
data: [randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(),randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor()]
}]
};
var ctx = document.getElementById(container).getContext("2d");
new Chart(ctx, {
type: 'line',
data: lineData,
options: {
hover: {
mode: 'label'
},
responsive: true,
scales: {
xAxes: [{
ticks: {
beginAtZero:true
}
}],
yAxes: [{
ticks: {
beginAtZero:true
}
}]
}
}
});
return false;
},
pie : function(container,type){
var ctx = document.getElementById(container).getContext("2d"),
config = {
type: type,
data: {
datasets: [{
data: [
randomScalingFactor(),
randomScalingFactor(),
randomScalingFactor(),
],
backgroundColor: [
"#f9c851",
"#3ac9d6",
"#ebeff2",
],
hoverBackgroundColor: [
"#f9c851",
"#3ac9d6",
"#ebeff2"
],
hoverBorderColor: "#fff"
}],
labels: [
"Red",
"Green",
"Yellow",
]
},
options: {
responsive: true
}
};
new Chart(ctx, config);
return false;
},
polar: function(container){
var ctx = document.getElementById(container).getContext("2d"),
config = {
data: {
datasets: [{
data: [
randomScalingFactor(),
randomScalingFactor(),
randomScalingFactor(),
randomScalingFactor(),
],
backgroundColor: [
"#f5707a",
"#188ae2",
"#4bd396",
"#8d6e63",
],
label: 'My dataset' // for legend
}],
labels: [
"Red",
"Blue",
"Green",
"Grey",
]
},
options: {
responsive: true,
legend: {
position: 'top',
},
scale: {
ticks: {
beginAtZero: true
},
reverse: false
},
animation: {
animateRotate: false,
animateScale: true
}
}
};
new Chart.PolarArea(ctx, config);
return false;
},
radar: function(container){
var ctx = document.getElementById(container).getContext("2d"),
config = {
type: 'radar',
data: {
labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],
datasets: [{
label: "Peter",
backgroundColor: "rgba(179,181,198,0.2)",
borderColor: "rgba(179,181,198,1)",
pointBackgroundColor: "rgba(179,181,198,1)",
pointBorderColor: "#fff",
pointHoverBackgroundColor: "#fff",
pointHoverBorderColor: "rgba(179,181,198,1)",
data: [randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor()]
}, {
label: "John",
backgroundColor: "rgba(255,99,132,0.2)",
borderColor: "rgba(255,99,132,1)",
pointBackgroundColor: "rgba(255,99,132,1)",
pointBorderColor: "#fff",
pointHoverBackgroundColor: "#fff",
pointHoverBorderColor: "rgba(255,99,132,1)",
data: [randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor()]
},]
},
options: {
legend: {
position: 'top',
},
scale: {
reverse: false,
gridLines: {
color: ['black', 'red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet']
},
ticks: {
beginAtZero: true
}
}
}
};
new Chart(ctx, config);
return false;
}
}
})(jQuery);

1
assets/scripts/chart.chartjs.init.min.js vendored Executable file
View File

@ -0,0 +1 @@
!function(r){"use strict";var e={},t=function(){return Math.round(15*Math.random())+5};r(document).ready(function(){return r("#bar-chartjs-chart").length&&e.bar("bar-chartjs-chart","top","bar"),r("#horizontal-bar-chartjs-chart").length&&e.bar("horizontal-bar-chartjs-chart","right","horizontalBar"),r("#line-chartjs-chart").length&&e.line("line-chartjs-chart",!1),r("#area-chartjs-chart").length&&e.line("area-chartjs-chart",!0),r("#pie-chartjs-chart").length&&e.pie("pie-chartjs-chart","pie"),r("#donut-chartjs-chart").length&&e.pie("donut-chartjs-chart","doughnut"),r("#polar-chartjs-chart").length&&e.polar("polar-chartjs-chart"),r("#radar-chartjs-chart").length&&e.radar("radar-chartjs-chart"),!1}),e={bar:function(r,e,o){var a={labels:["January","February","March","April"],datasets:[{label:"Dataset 1",backgroundColor:"rgba(249,200,81,0.3)",borderColor:"rgb(249, 200, 81)",borderWidth:1,hoverBackgroundColor:"rgba(249,200,81,0.6)",hoverBorderColor:"rgb(249, 200, 81)",data:[t(),t(),t(),t()]},{label:"Dataset 2",backgroundColor:"rgba(127, 193, 252, 0.3)",borderColor:"#7fc1fc",borderWidth:1,hoverBackgroundColor:"rgba(127, 193, 252, 0.6)",hoverBorderColor:"#7fc1fc",data:[t(),t(),t(),t()]},{label:"Dataset 3",backgroundColor:"rgba(245,112,122,0.3)",borderColor:"#f5707a",borderWidth:1,hoverBackgroundColor:"rgba(245,112,122,0.6)",hoverBorderColor:"#f5707a",data:[t(),t(),t(),t()]}]},i=document.getElementById(r).getContext("2d");return new Chart(i,{type:o,data:a,options:{hover:{mode:"label"},responsive:!0,legend:{position:e},scales:{xAxes:[{ticks:{beginAtZero:!0}}],yAxes:[{ticks:{beginAtZero:!0}}]}}}),!1},line:function(r,e){var o={labels:["0","1","2","3","4","5","6","7","8","9","10"],datasets:[{label:"Series 1",fill:e,borderColor:"rgba(245,112,122,1)",pointBackgroundColor:"rgb(245,112,122)",backgroundColor:"rgba(245,112,122,0.3)",data:[t(),t(),t(),t(),t(),t(),t(),t(),t(),t(),t()]}]},a=document.getElementById(r).getContext("2d");return new Chart(a,{type:"line",data:o,options:{hover:{mode:"label"},responsive:!0,scales:{xAxes:[{ticks:{beginAtZero:!0}}],yAxes:[{ticks:{beginAtZero:!0}}]}}}),!1},pie:function(r,e){var o=document.getElementById(r).getContext("2d"),a={type:e,data:{datasets:[{data:[t(),t(),t()],backgroundColor:["#f9c851","#3ac9d6","#ebeff2"],hoverBackgroundColor:["#f9c851","#3ac9d6","#ebeff2"],hoverBorderColor:"#fff"}],labels:["Red","Green","Yellow"]},options:{responsive:!0}};return new Chart(o,a),!1},polar:function(r){var e=document.getElementById(r).getContext("2d"),o={data:{datasets:[{data:[t(),t(),t(),t()],backgroundColor:["#f5707a","#188ae2","#4bd396","#8d6e63"],label:"My dataset"}],labels:["Red","Blue","Green","Grey"]},options:{responsive:!0,legend:{position:"top"},scale:{ticks:{beginAtZero:!0},reverse:!1},animation:{animateRotate:!1,animateScale:!0}}};return new Chart.PolarArea(e,o),!1},radar:function(r){var e=document.getElementById(r).getContext("2d"),o={type:"radar",data:{labels:["Eating","Drinking","Sleeping","Designing","Coding","Cycling","Running"],datasets:[{label:"Peter",backgroundColor:"rgba(179,181,198,0.2)",borderColor:"rgba(179,181,198,1)",pointBackgroundColor:"rgba(179,181,198,1)",pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:"rgba(179,181,198,1)",data:[t(),t(),t(),t(),t(),t(),t()]},{label:"John",backgroundColor:"rgba(255,99,132,0.2)",borderColor:"rgba(255,99,132,1)",pointBackgroundColor:"rgba(255,99,132,1)",pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:"rgba(255,99,132,1)",data:[t(),t(),t(),t(),t(),t(),t()]}]},options:{legend:{position:"top"},scale:{reverse:!1,gridLines:{color:["black","red","orange","yellow","green","blue","indigo","violet"]},ticks:{beginAtZero:!0}}}};return new Chart(e,o),!1}}}(jQuery);

281
assets/scripts/chart.flot.init.js Executable file
View File

@ -0,0 +1,281 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: Flot-Chart
*/
(function($) {
"use strict";
var FlotChart = {};
$(document).ready(function(){
if ($("#real-time-flot-chart").length) FlotChart.module.realtime.init();
if ($("#categories-flot-chart").length) FlotChart.module.categories.init();
if ($("#pile-flot-chart").length) FlotChart.module.pile.init();
if ($("#donut-flot-chart").length) FlotChart.module.donut.init();
if ($("#lines-flot-chart").length) FlotChart.module.lines.init();
return false;
});
$(window).resize(function(){
if ($("#real-time-flot-chart").length) FlotChart.module.realtime.init();
if ($("#categories-flot-chart").length) FlotChart.module.categories.init();
if ($("#pile-flot-chart").length) FlotChart.module.pile.init();
if ($("#donut-flot-chart").length) FlotChart.module.donut.init();
if ($("#lines-flot-chart").length) FlotChart.module.lines.init();
return false;
});
FlotChart.module = {
categories : {
container : "#categories-flot-chart",
data : [ ["January", 10], ["February", 8], ["March", 4], ["April", 13], ["May", 17], ["June", 9] ],
init: function(){
$.plot(FlotChart.module.categories.container, [FlotChart.module.categories.data], {
colors : ['#f9c851'],
series: {
bars: {
show: true,
barWidth: 0.6,
align: "center"
}
},
xaxis: {
mode: "categories",
tickLength: 0
}
});
return false;
}
},
donut : {
container : "#donut-flot-chart",
data : [
{ label: "Series 1", data: 50},
{ label: "Series 2", data: 60},
{ label: "Series 3", data: 90},
{ label: "Series 4", data: 70},
{ label: "Series 5", data: 80},
],
init: function(){
$.plot(FlotChart.module.donut.container, FlotChart.module.donut.data, {
tooltip : true,
tooltipOpts : {
content : "%s, %p.0%"
},
series: {
pie: {
show: true,
innerRadius: 0.5
}
},
grid: {
hoverable: true,
},
colors: ["#03a9f4", "#01ba9a", "#dcdcdc", "#6c85bd", "#f8ca4e"],
legend : {
show : true,
labelFormatter : function(label, series) {
return '<div style="font-size:14px;">&nbsp;' + label + '</div>'
},
labelBoxBorderColor : null,
margin : 20,
width : 20,
padding : 1
},
});
return false;
}
},
lines : {
container : "#lines-flot-chart",
data : [
[[0,14],[1,20],[2,23],[3,20],[4,24],[5,18],[6,27],[7,24],[8,16],[9,26],[10,25]],
[[0,4],[1,10],[2,2],[3,17],[4,25],[5,17],[6,22],[7,22],[8,18],[9,11],[10,20]]
],
init: function(){
$.plot(FlotChart.module.lines.container, FlotChart.module.lines.data, {
colors : ['#6e8cd7', '#03a9f4'],
series: {
lines: {
show: !0,
fill: !0,
lineWidth: 1,
fillColor: {
colors: [{
opacity: .5
}, {
opacity: .5
}]
}
},
points: {
show: !0
},
shadowSize: 0
},
legend: {
position: "nw"
},
grid: {
hoverable: !0,
clickable: !0,
borderColor: "#efefef",
borderWidth: 1,
labelMargin: 10,
backgroundColor: "#fff"
},
yaxis: {
min: 0,
max: 40,
color: "rgba(0,0,0,0.1)"
},
xaxis: {
color: "rgba(0,0,0,0.1)"
},
tooltip: !0,
tooltipOpts: {
content: "%s: Value of %x is %y",
shifts: {
x: -60,
y: 25
},
defaultTheme: !1
}
});
return false;
}
},
pile : {
container : "#pile-flot-chart",
data : [
{ label: "Series 1", data: 30},
{ label: "Series 2", data: 30},
{ label: "Series 3", data: 90},
{ label: "Series 4", data: 70},
],
init: function(){
$.plot(FlotChart.module.pile.container, FlotChart.module.pile.data, {
series: {
pie: {
show: true,
radius: 1,
label: {
show: true,
radius: 3/4,
formatter: labelFormatter,
background: {
opacity: 0.5
}
}
}
},
grid: {
hoverable: true
},
legend: {
show: false
},
colors: ["#03a9f4", "#01ba9a", "#dcdcdc", "#6c85bd"]
});
return false;
}
},
realtime : {
container : $("#real-time-flot-chart"),
maximum : 0,
data : [],
series : [],
plot : {},
init : function(){
FlotChart.module.realtime.maximum = FlotChart.module.realtime.container.outerWidth() / 2 || 300;
FlotChart.module.realtime.series = [{
data: FlotChart.func.getRandomData(),
lines: {
fill: true,
lineWidth: 1,
fillColor: {
colors: [{
opacity: .45
}, {
opacity: .45
}]
}
},
points: {
show: !1
},
shadowSize: 0
}];
FlotChart.module.realtime.plot = $.plot(FlotChart.module.realtime.container, FlotChart.module.realtime.series, {
colors : ['#03a9f4'],
grid: {
show: !0,
aboveData: !1,
color: "#dcdcdc",
labelMargin: 15,
axisMargin: 0,
borderWidth: 0,
borderColor: null,
minBorderMargin: 5,
clickable: !0,
hoverable: !0,
autoHighlight: !1,
mouseActiveRadius: 20
},
yaxis: {
min: 0,
max: 150,
color: "rgba(0,0,0,0.1)"
},
xaxis: {
show: !1
},
legend: {
show: true
}
});
// Update the random dataset at 25FPS for a smoothly-animating chart
setInterval(function updateRandom() {
FlotChart.module.realtime.series[0].data = FlotChart.func.getRandomData();
FlotChart.module.realtime.plot.setData(FlotChart.module.realtime.series);
FlotChart.module.realtime.plot.draw();
}, 40);
return false;
}
}
}
FlotChart.func = {
getRandomData : function(){
if (FlotChart.module.realtime.data.length) {
FlotChart.module.realtime.data = FlotChart.module.realtime.data.slice(1);
}
while (FlotChart.module.realtime.data.length < FlotChart.module.realtime.maximum) {
var previous = FlotChart.module.realtime.data.length ? FlotChart.module.realtime.data[FlotChart.module.realtime.data.length - 1] : 50;
var y = previous + Math.random() * 10 - 5;
FlotChart.module.realtime.data.push(y < 0 ? 0 : y > 100 ? 100 : y);
}
// zip the generated y values with the x values
var res = [];
for (var i = 0; i < FlotChart.module.realtime.data.length; ++i) {
res.push([i, FlotChart.module.realtime.data[i]])
}
return res;
}
}
function labelFormatter(label, series) {
return "<div style='font-size:8pt; text-align:center; padding:2px; color:white;'>" + label + "<br/>" + Math.round(series.percent) + "%</div>";
}
})(jQuery);

1
assets/scripts/chart.flot.init.min.js vendored Executable file
View File

@ -0,0 +1 @@
!function(e){"use strict";function t(e,t){return"<div style='font-size:8pt; text-align:center; padding:2px; color:white;'>"+e+"<br/>"+Math.round(t.percent)+"%</div>"}var a={};e(document).ready(function(){return e("#real-time-flot-chart").length&&a.module.realtime.init(),e("#categories-flot-chart").length&&a.module.categories.init(),e("#pile-flot-chart").length&&a.module.pile.init(),e("#donut-flot-chart").length&&a.module.donut.init(),e("#lines-flot-chart").length&&a.module.lines.init(),!1}),e(window).resize(function(){return e("#real-time-flot-chart").length&&a.module.realtime.init(),e("#categories-flot-chart").length&&a.module.categories.init(),e("#pile-flot-chart").length&&a.module.pile.init(),e("#donut-flot-chart").length&&a.module.donut.init(),e("#lines-flot-chart").length&&a.module.lines.init(),!1}),a.module={categories:{container:"#categories-flot-chart",data:[["January",10],["February",8],["March",4],["April",13],["May",17],["June",9]],init:function(){return e.plot(a.module.categories.container,[a.module.categories.data],{colors:["#f9c851"],series:{bars:{show:!0,barWidth:.6,align:"center"}},xaxis:{mode:"categories",tickLength:0}}),!1}},donut:{container:"#donut-flot-chart",data:[{label:"Series 1",data:50},{label:"Series 2",data:60},{label:"Series 3",data:90},{label:"Series 4",data:70},{label:"Series 5",data:80}],init:function(){return e.plot(a.module.donut.container,a.module.donut.data,{tooltip:!0,tooltipOpts:{content:"%s, %p.0%"},series:{pie:{show:!0,innerRadius:.5}},grid:{hoverable:!0},colors:["#03a9f4","#01ba9a","#dcdcdc","#6c85bd","#f8ca4e"],legend:{show:!0,labelFormatter:function(e){return'<div style="font-size:14px;">&nbsp;'+e+"</div>"},labelBoxBorderColor:null,margin:20,width:20,padding:1}}),!1}},lines:{container:"#lines-flot-chart",data:[[[0,14],[1,20],[2,23],[3,20],[4,24],[5,18],[6,27],[7,24],[8,16],[9,26],[10,25]],[[0,4],[1,10],[2,2],[3,17],[4,25],[5,17],[6,22],[7,22],[8,18],[9,11],[10,20]]],init:function(){return e.plot(a.module.lines.container,a.module.lines.data,{colors:["#6e8cd7","#03a9f4"],series:{lines:{show:!0,fill:!0,lineWidth:1,fillColor:{colors:[{opacity:.5},{opacity:.5}]}},points:{show:!0},shadowSize:0},legend:{position:"nw"},grid:{hoverable:!0,clickable:!0,borderColor:"#efefef",borderWidth:1,labelMargin:10,backgroundColor:"#fff"},yaxis:{min:0,max:40,color:"rgba(0,0,0,0.1)"},xaxis:{color:"rgba(0,0,0,0.1)"},tooltip:!0,tooltipOpts:{content:"%s: Value of %x is %y",shifts:{x:-60,y:25},defaultTheme:!1}}),!1}},pile:{container:"#pile-flot-chart",data:[{label:"Series 1",data:30},{label:"Series 2",data:30},{label:"Series 3",data:90},{label:"Series 4",data:70}],init:function(){return e.plot(a.module.pile.container,a.module.pile.data,{series:{pie:{show:!0,radius:1,label:{show:!0,radius:.75,formatter:t,background:{opacity:.5}}}},grid:{hoverable:!0},legend:{show:!1},colors:["#03a9f4","#01ba9a","#dcdcdc","#6c85bd"]}),!1}},realtime:{container:e("#real-time-flot-chart"),maximum:0,data:[],series:[],plot:{},init:function(){return a.module.realtime.maximum=a.module.realtime.container.outerWidth()/2||300,a.module.realtime.series=[{data:a.func.getRandomData(),lines:{fill:!0,lineWidth:1,fillColor:{colors:[{opacity:.45},{opacity:.45}]}},points:{show:!1},shadowSize:0}],a.module.realtime.plot=e.plot(a.module.realtime.container,a.module.realtime.series,{colors:["#03a9f4"],grid:{show:!0,aboveData:!1,color:"#dcdcdc",labelMargin:15,axisMargin:0,borderWidth:0,borderColor:null,minBorderMargin:5,clickable:!0,hoverable:!0,autoHighlight:!1,mouseActiveRadius:20},yaxis:{min:0,max:150,color:"rgba(0,0,0,0.1)"},xaxis:{show:!1},legend:{show:!0}}),setInterval(function(){a.module.realtime.series[0].data=a.func.getRandomData(),a.module.realtime.plot.setData(a.module.realtime.series),a.module.realtime.plot.draw()},40),!1}}},a.func={getRandomData:function(){for(a.module.realtime.data.length&&(a.module.realtime.data=a.module.realtime.data.slice(1));a.module.realtime.data.length<a.module.realtime.maximum;){var e=a.module.realtime.data.length?a.module.realtime.data[a.module.realtime.data.length-1]:50,t=e+10*Math.random()-5;a.module.realtime.data.push(0>t?0:t>100?100:t)}for(var i=[],l=0;l<a.module.realtime.data.length;++l)i.push([l,a.module.realtime.data[l]]);return i}}}(jQuery);

View File

@ -0,0 +1,410 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: Flot-Chart
*/
(function($) {
"use strict";
var Chart = {};
$(document).ready(function(){
if ($("#3d-highcharts").length) Chart.bar_3d();
if ($("#3dscatter-highcharts").length) Chart.pie_3d();
if ($("#3d-highcharts").length) Chart.scatter_3d();
if ($("#3dstacking-highcharts").length) Chart.stacking_3d();
if ($("#random-highcharts").length) Chart.random_data();
if ($("#click-highcharts").length) Chart.click_data();
return false;
});
Chart = {
bar_3d : function () {
var chart = new Highcharts.Chart({
chart: {
renderTo: '3d-highcharts',
type: 'column',
options3d: {
enabled: true,
alpha: 15,
beta: 15,
depth: 50,
viewDistance: 25
}
},
title: {
text: 'Bar Chart Demo'
},
plotOptions: {
column: {
depth: 25
}
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
});
return false;
},
pie_3d: function() {
$('#3dpie-highcharts').highcharts({
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45,
beta: 0
}
},
title: {
text: 'Browser market shares at a specific website, 2014'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
depth: 35,
dataLabels: {
enabled: true,
format: '{point.name}'
}
}
},
series: [{
type: 'pie',
name: 'Browser share',
data: [
['Firefox', 45.0],
['IE', 26.8],
{
name: 'Chrome',
y: 12.8,
sliced: true,
selected: true
},
['Safari', 8.5],
['Opera', 6.2],
['Others', 0.7]
]
}]
});
return false;
},
scatter_3d : function() {
// Give the points a 3D feel by adding a radial gradient
Highcharts.getOptions().colors = $.map(Highcharts.getOptions().colors, function (color) {
return {
radialGradient: {
cx: 0.4,
cy: 0.3,
r: 0.5
},
stops: [
[0, color],
[1, Highcharts.Color(color).brighten(-0.2).get('rgb')]
]
};
});
// Set up the chart
var chart = new Highcharts.Chart({
chart: {
renderTo: '3dscatter-highcharts',
margin: 100,
type: 'scatter',
options3d: {
enabled: true,
alpha: 10,
beta: 30,
depth: 250,
viewDistance: 5,
fitToPlot: false,
frame: {
bottom: { size: 1, color: 'rgba(0,0,0,0.02)' },
back: { size: 1, color: 'rgba(0,0,0,0.04)' },
side: { size: 1, color: 'rgba(0,0,0,0.06)' }
}
}
},
title: {
text: 'Draggable box'
},
subtitle: {
text: 'Click and drag the plot area to rotate in space'
},
plotOptions: {
scatter: {
width: 10,
height: 10,
depth: 10
}
},
yAxis: {
min: 0,
max: 10,
title: null
},
xAxis: {
min: 0,
max: 10,
gridLineWidth: 1
},
zAxis: {
min: 0,
max: 10,
showFirstLabel: false
},
legend: {
enabled: false
},
series: [{
name: 'Reading',
colorByPoint: true,
data: [[1, 6, 5], [8, 7, 9], [1, 3, 4], [4, 6, 8], [5, 7, 7], [6, 9, 6], [7, 0, 5], [2, 3, 3], [3, 9, 8], [3, 6, 5], [4, 9, 4], [2, 3, 3], [6, 9, 9], [0, 7, 0], [7, 7, 9], [7, 2, 9], [0, 6, 2], [4, 6, 7], [3, 7, 7], [0, 1, 7], [2, 8, 6], [2, 3, 7], [6, 4, 8], [3, 5, 9], [7, 9, 5], [3, 1, 7], [4, 4, 2], [3, 6, 2], [3, 1, 6], [6, 8, 5], [6, 6, 7], [4, 1, 1], [7, 2, 7], [7, 7, 0], [8, 8, 9], [9, 4, 1], [8, 3, 4], [9, 8, 9], [3, 5, 3], [0, 2, 4], [6, 0, 2], [2, 1, 3], [5, 8, 9], [2, 1, 1], [9, 7, 6], [3, 0, 2], [9, 9, 0], [3, 4, 8], [2, 6, 1], [8, 9, 2], [7, 6, 5], [6, 3, 1], [9, 3, 1], [8, 9, 3], [9, 1, 0], [3, 8, 7], [8, 0, 0], [4, 9, 7], [8, 6, 2], [4, 3, 0], [2, 3, 5], [9, 1, 4], [1, 1, 4], [6, 0, 2], [6, 1, 6], [3, 8, 8], [8, 8, 7], [5, 5, 0], [3, 9, 6], [5, 4, 3], [6, 8, 3], [0, 1, 5], [6, 7, 3], [8, 3, 2], [3, 8, 3], [2, 1, 6], [4, 6, 7], [8, 9, 9], [5, 4, 2], [6, 1, 3], [6, 9, 5], [4, 8, 2], [9, 7, 4], [5, 4, 2], [9, 6, 1], [2, 7, 3], [4, 5, 4], [6, 8, 1], [3, 4, 0], [2, 2, 6], [5, 1, 2], [9, 9, 7], [6, 9, 9], [8, 4, 3], [4, 1, 7], [6, 2, 5], [0, 4, 9], [3, 5, 9], [6, 9, 1], [1, 9, 2]]
}]
});
// Add mouse events for rotation
$(chart.container).on('mousedown.hc touchstart.hc', function (eStart) {
eStart = chart.pointer.normalize(eStart);
var posX = eStart.pageX,
posY = eStart.pageY,
alpha = chart.options.chart.options3d.alpha,
beta = chart.options.chart.options3d.beta,
newAlpha,
newBeta,
sensitivity = 5; // lower is more sensitive
$(document).on({
'mousemove.hc touchdrag.hc': function (e) {
// Run beta
newBeta = beta + (posX - e.pageX) / sensitivity;
chart.options.chart.options3d.beta = newBeta;
// Run alpha
newAlpha = alpha + (e.pageY - posY) / sensitivity;
chart.options.chart.options3d.alpha = newAlpha;
chart.redraw(false);
},
'mouseup touchend': function () {
$(document).off('.hc');
}
});
});
return false;
},
stacking_3d: function () {
$('#3dstacking-highcharts').highcharts({
chart: {
type: 'column',
options3d: {
enabled: true,
alpha: 15,
beta: 15,
viewDistance: 25,
depth: 40
}
},
title: {
text: 'Total fruit consumption, grouped by gender'
},
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
},
yAxis: {
allowDecimals: false,
min: 0,
title: {
text: 'Number of fruits'
}
},
tooltip: {
headerFormat: '<b>{point.key}</b><br>',
pointFormat: '<span style="color:{series.color}">\u25CF</span> {series.name}: {point.y} / {point.stackTotal}'
},
plotOptions: {
column: {
stacking: 'normal',
depth: 40
}
},
series: [{
name: 'John',
data: [5, 3, 4, 7, 2],
stack: 'male'
}, {
name: 'Joe',
data: [3, 4, 4, 2, 5],
stack: 'male'
}, {
name: 'Jane',
data: [2, 5, 6, 2, 1],
stack: 'female'
}, {
name: 'Janet',
data: [3, 0, 4, 4, 3],
stack: 'female'
}]
});
return false;
},
random_data: function() {
Highcharts.setOptions({
global: {
useUTC: false
}
});
$('#random-highcharts').highcharts({
chart: {
type: 'spline',
animation: Highcharts.svg, // don't animate in old IE
marginRight: 10,
events: {
load: function () {
// set up the updating of the chart each second
var series = this.series[0];
setInterval(function () {
var x = (new Date()).getTime(), // current time
y = Math.random();
series.addPoint([x, y], true, true);
}, 1000);
}
}
},
title: {
text: 'Live random data'
},
xAxis: {
type: 'datetime',
tickPixelInterval: 150
},
yAxis: {
title: {
text: 'Value'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
formatter: function () {
return '<b>' + this.series.name + '</b><br/>' +
Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) + '<br/>' +
Highcharts.numberFormat(this.y, 2);
}
},
legend: {
enabled: false
},
exporting: {
enabled: false
},
series: [{
name: 'Random data',
data: (function () {
// generate an array of random data
var data = [],
time = (new Date()).getTime(),
i;
for (i = -19; i <= 0; i += 1) {
data.push({
x: time + i * 1000,
y: Math.random()
});
}
return data;
}())
}]
});
return false;
},
click_data: function(){
$('#click-highcharts').highcharts({
chart: {
type: 'scatter',
margin: [70, 50, 60, 80],
events: {
click: function (e) {
// find the clicked values and the series
var x = e.xAxis[0].value,
y = e.yAxis[0].value,
series = this.series[0];
// Add it
series.addPoint([x, y]);
}
}
},
title: {
text: 'User supplied data'
},
subtitle: {
text: 'Click the plot area to add a point. Click a point to remove it.'
},
xAxis: {
gridLineWidth: 1,
minPadding: 0.2,
maxPadding: 0.2,
maxZoom: 60
},
yAxis: {
title: {
text: 'Value'
},
minPadding: 0.2,
maxPadding: 0.2,
maxZoom: 60,
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
legend: {
enabled: false
},
exporting: {
enabled: false
},
plotOptions: {
series: {
lineWidth: 1,
point: {
events: {
'click': function () {
if (this.series.data.length > 1) {
this.remove();
}
}
}
}
}
},
series: [{
data: [[20, 20], [80, 80]]
}]
});
return false;
}
}
})(jQuery);

1
assets/scripts/chart.highcharts.init.min.js vendored Executable file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,264 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: Morris-Chart
*/
(function($) {
"use strict";
var MorrisChart = {},
graph;
$(document).ready(function(){
if ($("#area-morris-chart").length) MorrisChart.area.init();
if ($("#bar-morris-chart").length) MorrisChart.bar.init();
if ($("#donut-morris-chart").length) MorrisChart.donut.init();
if ($("#lines-morris-chart").length) MorrisChart.lines.init();
if ($("#realtime-morris-chart").length) MorrisChart.realtime.init();
if ($("#stack-morris-chart").length) MorrisChart.stack.init();
if ($("#realtime-morris-chart").length) {
setInterval(function updateRandom() {
MorrisChart.realtime.update();
}, 500);
}
return false;
});
$(window).on("resize",function(){
if ($("#area-morris-chart").length) MorrisChart.area.update();
if ($("#bar-morris-chart").length) MorrisChart.bar.update();
if ($("#donut-morris-chart").length) MorrisChart.donut.update();
if ($("#lines-morris-chart").length) MorrisChart.lines.update();
if ($("#stack-morris-chart").length) MorrisChart.stack.update();
return false;
});
MorrisChart = {
area : {
graph : null,
data : [
{x: '2010', y: 10, z: 10},
{x: '2011', y: 9, z: 8},
{x: '2012', y: 9, z: 11},
{x: '2013', y: 13, z: 10},
{x: '2014', y: 15, z: 13},
{x: '2015', y: 12, z: 14},
{x: '2016', y: 13, z: 18}
],
init: function(){
MorrisChart.area.graph = Morris.Area({
element: 'area-morris-chart',
behaveLikeLine: true,
data: MorrisChart.area.data,
xkey: 'x',
ykeys: ['y', 'z'],
labels: ['Sales', 'Salary'],
pointSize: 0,
pointStrokeColors:['#fcb03b', '#ea65a2'],
behaveLikeLine: true,
gridLineColor: '#eee',
lineWidth: 0,
smooth: true,
hideHover: 'auto',
lineColors: ['#fcb03b', '#ea65a2'],
resize: true,
gridTextColor:'#2f2c2c',
});
return false;
},
update: function(){
MorrisChart.area.graph.setData(MorrisChart.area.data);
return false;
}
},
bar : {
graph : null,
data: [
{x: '2010', y: 10, z: 17, a: 9},
{x: '2011', y: 5, z: 14, a: 13},
{x: '2012', y: 5, z: 13, a: 12},
{x: '2013', y: 6, z: 12, a: 5},
{x: '2014', y: 17, z: 8, a: 8},
{x: '2015', y: 10, z: 14, a: 18},
{x: '2016', y: 8, z: 17, a: 14}
],
init: function(){
Morris.Bar({
element: 'bar-morris-chart',
behaveLikeLine: true,
data: MorrisChart.bar.data,
barColors: [
'#fcb03b',
'#ea65a2',
'#566FC9'
],
xkey: 'x',
ykeys: ['y', 'z','a'],
labels: ['Series A', 'Series B','Series C']
});
return false;
},
update: function(){
MorrisChart.bar.graph.setData(MorrisChart.bar.data);
return false;
}
},
donut : {
graph : null,
data : [
{value: 40, label: 'Series A'},
{value: 20, label: 'Series B'},
{value: 30, label: 'Series C'}
],
init: function(){
Morris.Donut({
element: 'donut-morris-chart',
data: MorrisChart.donut.data,
colors: [
'#fcb03b',
'#ea65a2',
'#566FC9'
],
resize: true,
labelColor: '#2f2c2c',
formatter: function (x) { return x + "%"}
});
return false;
},
update: function(){
MorrisChart.donut.graph.setData(MorrisChart.donut.data);
return false;
}
},
lines : {
graph : null,
data : [
{x: '2010', y: 10, z: 17},
{x: '2011', y: 5, z: 14},
{x: '2012', y: 5, z: 13},
{x: '2013', y: 6, z: 12},
{x: '2014', y: 17, z: 8},
{x: '2015', y: 10, z: 14},
{x: '2016', y: 8, z: 17}
],
init: function(){
Morris.Line({
element: 'lines-morris-chart',
behaveLikeLine: true,
data: MorrisChart.lines.data,
xkey: 'x',
ykeys: ['y', 'z'],
labels: ['Upload', 'Download'],
lineColors: [
'#fcb03b',
'#ea65a2'
],
pointSize: 1,
pointStrokeColors:['#fcb03b'],
behaveLikeLine: true,
gridLineColor: '#eee',
gridTextColor:'#2f2c2c',
lineWidth: 2,
smooth: true,
hideHover: 'auto',
resize: true,
});
return false;
},
update: function(){
MorrisChart.lines.graph.setData(MorrisChart.lines.data);
return false;
}
},
realtime :{
data: [
{x: '0', y: 10},
{x: '1', y: 5},
{x: '2', y: 5},
{x: '3', y: 6},
{x: '4', y: 17},
{x: '5', y: 10},
{x: '6', y: 12},
{x: '7', y: 15},
{x: '8', y: 9},
{x: '9', y: 6},
{x: '10', y: 15},
{x: '11', y: 14},
{x: '12', y: 5},
{x: '13', y: 12},
{x: '14', y: 16},
{x: '15', y: 5},
{x: '16', y: 10},
{x: '17', y: 8},
{x: '18', y: 8},
{x: '19', y: 8},
{x: '20', y: 6},
],
init : function(){
graph = Morris.Line({
element: 'realtime-morris-chart',
data: MorrisChart.realtime.data,
xkey: 'x',
ykeys: ['y'],
axes: 'y',
labels: ['Visitors Online'],
parseTime: false,
pointSize: 1,
pointStrokeColors:['#fcb03b'],
behaveLikeLine: true,
gridLineColor: '#eee',
gridTextColor:'#2f2c2c',
lineWidth: 2,
smooth: true,
hideHover: 'auto',
lineColors: ['#fcb03b'],
resize: true,
});
return false;
},
update: function(){
var random = Math.floor((Math.random() * 20) + 1),
i;
for (i = 0; i < MorrisChart.realtime.data.length - 1; i++){
MorrisChart.realtime.data[i].y = MorrisChart.realtime.data[i + 1].y;
}
MorrisChart.realtime.data[MorrisChart.realtime.data.length - 1].y = random;
graph.setData(MorrisChart.realtime.data);
return false;
}
},
stack : {
graph : null,
data: [
{x: '2010', y: 10, z: 17},
{x: '2011', y: 5, z: 14},
{x: '2012', y: 5, z: 13},
{x: '2013', y: 6, z: 12},
{x: '2014', y: 17, z: 8},
{x: '2015', y: 10, z: 14},
{x: '2016', y: 8, z: 17}
],
init : function(){
Morris.Bar({
element: 'stack-morris-chart',
behaveLikeLine: true,
data: MorrisChart.stack.data,
xkey: 'x',
ykeys: ['y', 'z'],
labels: ['Series A', 'Series B'],
stacked: true,
barColors: [
'#ea65a2',
'#566FC9'
],
});
return false;
},
update: function(){
MorrisChart.stack.graph.setData(MorrisChart.stack.data);
return false;
}
},
}
})(jQuery);

1
assets/scripts/chart.morris.init.min.js vendored Executable file
View File

@ -0,0 +1 @@
!function(e){"use strict";var a,r={};e(document).ready(function(){return e("#area-morris-chart").length&&r.area.init(),e("#bar-morris-chart").length&&r.bar.init(),e("#donut-morris-chart").length&&r.donut.init(),e("#lines-morris-chart").length&&r.lines.init(),e("#realtime-morris-chart").length&&r.realtime.init(),e("#stack-morris-chart").length&&r.stack.init(),e("#realtime-morris-chart").length&&setInterval(function(){r.realtime.update()},500),!1}),e(window).on("resize",function(){return e("#area-morris-chart").length&&r.area.update(),e("#bar-morris-chart").length&&r.bar.update(),e("#donut-morris-chart").length&&r.donut.update(),e("#lines-morris-chart").length&&r.lines.update(),e("#stack-morris-chart").length&&r.stack.update(),!1}),r={area:{graph:null,data:[{x:"2010",y:10,z:10},{x:"2011",y:9,z:8},{x:"2012",y:9,z:11},{x:"2013",y:13,z:10},{x:"2014",y:15,z:13},{x:"2015",y:12,z:14},{x:"2016",y:13,z:18}],init:function(){return r.area.graph=Morris.Area({element:"area-morris-chart",behaveLikeLine:!0,data:r.area.data,xkey:"x",ykeys:["y","z"],labels:["Sales","Salary"],pointSize:0,pointStrokeColors:["#fcb03b","#ea65a2"],behaveLikeLine:!0,gridLineColor:"#eee",lineWidth:0,smooth:!0,hideHover:"auto",lineColors:["#fcb03b","#ea65a2"],resize:!0,gridTextColor:"#2f2c2c"}),!1},update:function(){return r.area.graph.setData(r.area.data),!1}},bar:{graph:null,data:[{x:"2010",y:10,z:17,a:9},{x:"2011",y:5,z:14,a:13},{x:"2012",y:5,z:13,a:12},{x:"2013",y:6,z:12,a:5},{x:"2014",y:17,z:8,a:8},{x:"2015",y:10,z:14,a:18},{x:"2016",y:8,z:17,a:14}],init:function(){return Morris.Bar({element:"bar-morris-chart",behaveLikeLine:!0,data:r.bar.data,barColors:["#fcb03b","#ea65a2","#566FC9"],xkey:"x",ykeys:["y","z","a"],labels:["Series A","Series B","Series C"]}),!1},update:function(){return r.bar.graph.setData(r.bar.data),!1}},donut:{graph:null,data:[{value:40,label:"Series A"},{value:20,label:"Series B"},{value:30,label:"Series C"}],init:function(){return Morris.Donut({element:"donut-morris-chart",data:r.donut.data,colors:["#fcb03b","#ea65a2","#566FC9"],resize:!0,labelColor:"#2f2c2c",formatter:function(e){return e+"%"}}),!1},update:function(){return r.donut.graph.setData(r.donut.data),!1}},lines:{graph:null,data:[{x:"2010",y:10,z:17},{x:"2011",y:5,z:14},{x:"2012",y:5,z:13},{x:"2013",y:6,z:12},{x:"2014",y:17,z:8},{x:"2015",y:10,z:14},{x:"2016",y:8,z:17}],init:function(){return Morris.Line({element:"lines-morris-chart",behaveLikeLine:!0,data:r.lines.data,xkey:"x",ykeys:["y","z"],labels:["Upload","Download"],lineColors:["#fcb03b","#ea65a2"],pointSize:1,pointStrokeColors:["#fcb03b"],behaveLikeLine:!0,gridLineColor:"#eee",gridTextColor:"#2f2c2c",lineWidth:2,smooth:!0,hideHover:"auto",resize:!0}),!1},update:function(){return r.lines.graph.setData(r.lines.data),!1}},realtime:{data:[{x:"0",y:10},{x:"1",y:5},{x:"2",y:5},{x:"3",y:6},{x:"4",y:17},{x:"5",y:10},{x:"6",y:12},{x:"7",y:15},{x:"8",y:9},{x:"9",y:6},{x:"10",y:15},{x:"11",y:14},{x:"12",y:5},{x:"13",y:12},{x:"14",y:16},{x:"15",y:5},{x:"16",y:10},{x:"17",y:8},{x:"18",y:8},{x:"19",y:8},{x:"20",y:6}],init:function(){return a=Morris.Line({element:"realtime-morris-chart",data:r.realtime.data,xkey:"x",ykeys:["y"],axes:"y",labels:["Visitors Online"],parseTime:!1,pointSize:1,pointStrokeColors:["#fcb03b"],behaveLikeLine:!0,gridLineColor:"#eee",gridTextColor:"#2f2c2c",lineWidth:2,smooth:!0,hideHover:"auto",lineColors:["#fcb03b"],resize:!0}),!1},update:function(){var e,t=Math.floor(20*Math.random()+1);for(e=0;e<r.realtime.data.length-1;e++)r.realtime.data[e].y=r.realtime.data[e+1].y;return r.realtime.data[r.realtime.data.length-1].y=t,a.setData(r.realtime.data),!1}},stack:{graph:null,data:[{x:"2010",y:10,z:17},{x:"2011",y:5,z:14},{x:"2012",y:5,z:13},{x:"2013",y:6,z:12},{x:"2014",y:17,z:8},{x:"2015",y:10,z:14},{x:"2016",y:8,z:17}],init:function(){return Morris.Bar({element:"stack-morris-chart",behaveLikeLine:!0,data:r.stack.data,xkey:"x",ykeys:["y","z"],labels:["Series A","Series B"],stacked:!0,barColors:["#ea65a2","#566FC9"]}),!1},update:function(){return r.stack.graph.setData(r.stack.data),!1}}}}(jQuery);

View File

@ -0,0 +1,96 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: Morris-Chart
*/
(function($) {
"use strict";
var Chart = {};
$(document).ready(function(){
Chart.traffic();
Chart.bar();
Chart.pie();
return false;
});
Chart = {
traffic: function(){
$("#traffic-sparkline-chart-1").sparkline("html", {
width: "120",
height: "35",
lineColor: "#4d8cf4",
fillColor: !1,
spotColor: !1,
minSpotColor: !1,
maxSpotColor: !1,
lineWidth: 1.15
});
$("#traffic-sparkline-chart-1").sparkline([0, 5, 3, 7, 5, 10, 3, 6, 5, 10], {
width: "120",
height: "35",
lineColor: "#4d8cf4",
fillColor: !1,
spotColor: !1,
minSpotColor: !1,
maxSpotColor: !1,
lineWidth: 1.15
});
$('#traffic-sparkline-chart-2').sparkline([1, 2, 3, 4, 5, 6, 7, 8, 10 , 12, 14], {
type: 'bar',
height: '35',
barWidth: '5',
resize: true,
barSpacing: '5',
barColor: '#00bf4f'
});
$('#traffic-sparkline-chart-3').sparkline([5,5, 6,6, 7,7,6,6, 7,7, 8,8,7,7, 8,8, 9,9,8,8, 9,9, 10,10,], {
type: 'discrete',
width: '120',
height: '65',
resize: true,
lineColor:'#ff1744'
});
$('#traffic-sparkline-chart-3-custom').sparkline([5,5, 6,6, 7,7,6,6, 7,7, 8,8,7,7, 8,8, 9,9,8,8, 9,9, 10,10,], {
type: 'discrete',
width: '120',
height: '65',
resize: true,
lineColor:'#ff460b'
});
return false;
},
bar : function () {
$('#bar-sparkline-chart').sparkline([5, 6, 2, 8, 9, 4, 7, 10, 11, 12, 10, 9, 4, 7], {
type: 'bar',
height: '200',
barWidth: '10',
resize: true,
barSpacing: '7',
barColor: '#00aeff'
});
$('#bar-sparkline-chart').sparkline([5, 6, 2, 8, 9, 4, 7, 10, 11, 12, 10, 9, 4, 7], {
type: 'line',
height: '200',
lineColor: '#00aeff',
fillColor: 'transparent',
composite: true,
highlightLineColor: 'rgba(0,0,0,.1)',
highlightSpotColor: 'rgba(0,0,0,.2)'
});
return false;
},
pie : function () {
$('#pie-sparkline-chart').sparkline([50, 70, 60], {
type: 'pie',
width: '200',
height: '200',
resize: true,
sliceColors: ['#fcb03b','#ea65a2','#566FC9']
});
return false;
}
}
})(jQuery);

1
assets/scripts/chart.sparkline.init.min.js vendored Executable file
View File

@ -0,0 +1 @@
!function(e){"use strict";var t={};e(document).ready(function(){return t.traffic(),t.bar(),t.pie(),!1}),t={traffic:function(){return e("#traffic-sparkline-chart-1").sparkline("html",{width:"120",height:"35",lineColor:"#4d8cf4",fillColor:!1,spotColor:!1,minSpotColor:!1,maxSpotColor:!1,lineWidth:1.15}),e("#traffic-sparkline-chart-1").sparkline([0,5,3,7,5,10,3,6,5,10],{width:"120",height:"35",lineColor:"#4d8cf4",fillColor:!1,spotColor:!1,minSpotColor:!1,maxSpotColor:!1,lineWidth:1.15}),e("#traffic-sparkline-chart-2").sparkline([1,2,3,4,5,6,7,8,10,12,14],{type:"bar",height:"35",barWidth:"5",resize:!0,barSpacing:"5",barColor:"#00bf4f"}),e("#traffic-sparkline-chart-3").sparkline([5,5,6,6,7,7,6,6,7,7,8,8,7,7,8,8,9,9,8,8,9,9,10,10],{type:"discrete",width:"120",height:"65",resize:!0,lineColor:"#ff1744"}),e("#traffic-sparkline-chart-3-custom").sparkline([5,5,6,6,7,7,6,6,7,7,8,8,7,7,8,8,9,9,8,8,9,9,10,10],{type:"discrete",width:"120",height:"65",resize:!0,lineColor:"#ff460b"}),!1},bar:function(){return e("#bar-sparkline-chart").sparkline([5,6,2,8,9,4,7,10,11,12,10,9,4,7],{type:"bar",height:"200",barWidth:"10",resize:!0,barSpacing:"7",barColor:"#00aeff"}),e("#bar-sparkline-chart").sparkline([5,6,2,8,9,4,7,10,11,12,10,9,4,7],{type:"line",height:"200",lineColor:"#00aeff",fillColor:"transparent",composite:!0,highlightLineColor:"rgba(0,0,0,.1)",highlightSpotColor:"rgba(0,0,0,.2)"}),!1},pie:function(){return e("#pie-sparkline-chart").sparkline([50,70,60],{type:"pie",width:"200",height:"200",resize:!0,sliceColors:["#fcb03b","#ea65a2","#566FC9"]}),!1}}}(jQuery);

View File

@ -0,0 +1,61 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: Data Tables
*/
(function($) {
"use strict";
if ($('#example').length)
$('#example').DataTable();
if ($('#example-scroll-y').length)
$('#example-scroll-y').DataTable( {
"scrollY": "200px",
"scrollCollapse": true,
"paging": false
} );
if ($('#example-row-grouping').length){
var table = $('#example-row-grouping').DataTable({
"columnDefs": [
{ "visible": false, "targets": 2 }
],
"order": [[ 2, 'asc' ]],
"displayLength": 25,
"drawCallback": function ( settings ) {
var api = this.api();
var rows = api.rows( {page:'current'} ).nodes();
var last=null;
api.column(2, {page:'current'} ).data().each( function ( group, i ) {
if ( last !== group ) {
$(rows).eq( i ).before(
'<tr class="group"><td colspan="5">'+group+'</td></tr>'
);
last = group;
}
} );
}
} );
// Order by the grouping
$('#example-row-grouping tbody').on( 'click', 'tr.group', function () {
var currentOrder = table.order()[0];
if ( currentOrder[0] === 2 && currentOrder[1] === 'asc' ) {
table.order( [ 2, 'desc' ] ).draw();
}
else {
table.order( [ 2, 'asc' ] ).draw();
}
return false;
} );
}
if ($('#example-edit').length){
$('#example-edit').DataTable();
$('#example-edit').editableTableWidget();
}
})(jQuery);

1
assets/scripts/datatables.demo.min.js vendored Executable file
View File

@ -0,0 +1 @@
!function(e){"use strict";if(e("#example").length&&e("#example").DataTable(),e("#example-scroll-y").length&&e("#example-scroll-y").DataTable({scrollY:"200px",scrollCollapse:!0,paging:!1}),e("#example-row-grouping").length){var a=e("#example-row-grouping").DataTable({columnDefs:[{visible:!1,targets:2}],order:[[2,"asc"]],displayLength:25,drawCallback:function(){var a=this.api(),t=a.rows({page:"current"}).nodes(),r=null;a.column(2,{page:"current"}).data().each(function(a,i){r!==a&&(e(t).eq(i).before('<tr class="group"><td colspan="5">'+a+"</td></tr>"),r=a)})}});e("#example-row-grouping tbody").on("click","tr.group",function(){var e=a.order()[0];return 2===e[0]&&"asc"===e[1]?a.order([2,"desc"]).draw():a.order([2,"asc"]).draw(),!1})}e("#example-edit").length&&(e("#example-edit").DataTable(),e("#example-edit").editableTableWidget())}(jQuery);

View File

@ -0,0 +1,12 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: File Upload Demo
*/
(function($) {
"use strict";
$('.dropify').dropify();
})(jQuery);

1
assets/scripts/fileUpload.demo.min.js vendored Executable file
View File

@ -0,0 +1 @@
!function(r){"use strict";r(".dropify").dropify()}(jQuery);

245
assets/scripts/form.demo.js Executable file
View File

@ -0,0 +1,245 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: Form Demo
*/
(function($) {
"use strict";
if ($('.flexdatalist').length) $('.flexdatalist').flexdatalist();
if ($('#popover-1').length) $('#popover-1').popSelect({
showTitle: false,
maxAllowed: 2
});
if ($('#popover-2').length) $('#popover-2').popSelect({
showTitle: false,
placeholderText: 'Click to Add More',
position: 'bottom'
});
if ($('.select2_1').length) $(".select2_1").select2();
if ($('.select2_2').length) $(".select2_2").select2({
tags: true
});
if ($('.multiselect').length) $('.multiselect').multiselect();
if ($('#search').length) $('#search').multiselect({
search: {
left: '<input type="text" name="q" class="form-control" placeholder="Search..." />',
right: '<input type="text" name="q" class="form-control" placeholder="Search..." />',
}
});
if ($("input[name='demo1']").length) $("input[name='demo1']").TouchSpin({
min: 0,
max: 100,
step: 0.1,
decimals: 2,
boostat: 5,
maxboostedstep: 10,
postfix: '%'
});
if ($("input[name='demo2']").length)
$("input[name='demo2']").TouchSpin({
min: -1000000000,
max: 1000000000,
stepinterval: 50,
maxboostedstep: 10000000,
prefix: '$'
});
if ($("input[name='demo_vertical']").length)
$("input[name='demo_vertical']").TouchSpin({
verticalbuttons: true
});
if ($("input[name='demo_vertical2']").length)
$("input[name='demo_vertical2']").TouchSpin({
verticalbuttons: true,
verticalupclass: 'glyphicon glyphicon-plus',
verticaldownclass: 'glyphicon glyphicon-minus'
});
if ($("input[name='demo5']").length)
$("input[name='demo5']").TouchSpin({
prefix: "pre",
postfix: "post"
});
// Time Picker
if ($("#timepicker").length)
$('#timepicker').timepicker({
defaultTIme : false
});
if ($("#timepicker2").length)
$('#timepicker2').timepicker({
showMeridian : false
});
if ($("#timepicker3").length)
$('#timepicker3').timepicker({
minuteStep : 15
});
//Colorpicker
if ($(".colorpicker-default").length)
$('.colorpicker-default').colorpicker({
format: 'hex'
});
if ($(".colorpicker-rgba").length)
$('.colorpicker-rgba').colorpicker();
// Date Picker
if ($("#datepicker").length)
$('#datepicker').datepicker();
if ($("#datepicker-autoclose").length)
$('#datepicker-autoclose').datepicker({
autoclose: true,
todayHighlight: true
});
if ($("#datepicker-inline").length)
$('#datepicker-inline').datepicker();
if ($("#datepicker-multiple-date").length)
$('#datepicker-multiple-date').datepicker({
format: "mm/dd/yyyy",
clearBtn: true,
multidate: true,
multidateSeparator: ","
});
if ($("#date-range").length)
$('#date-range').datepicker({
toggleActive: true
});
//Date range
//Date range picker
if ($(".input-daterange-datepicker").length)
$('.input-daterange-datepicker').daterangepicker({
buttonClasses: ['btn', 'btn-sm'],
applyClass: 'btn-default',
cancelClass: 'btn-primary'
});
if ($(".input-daterange-timepicker").length)
$('.input-daterange-timepicker').daterangepicker({
timePicker: true,
format: 'MM/DD/YYYY h:mm A',
timePickerIncrement: 30,
timePicker12Hour: true,
timePickerSeconds: false,
buttonClasses: ['btn', 'btn-sm'],
applyClass: 'btn-default',
cancelClass: 'btn-primary'
});
if ($(".input-limit-datepicker").length)
$('.input-limit-datepicker').daterangepicker({
format: 'MM/DD/YYYY',
minDate: '06/01/2016',
maxDate: '06/30/2016',
buttonClasses: ['btn', 'btn-sm'],
applyClass: 'btn-default',
cancelClass: 'btn-primary',
dateLimit: {
days: 6
}
});
if ($("#reportrange").length){
$('#reportrange span').html(moment().subtract(29, 'days').format('MMMM D, YYYY') + ' - ' + moment().format('MMMM D, YYYY'));
$('#reportrange').daterangepicker({
format: 'MM/DD/YYYY',
startDate: moment().subtract(29, 'days'),
endDate: moment(),
minDate: '01/01/2016',
maxDate: '12/31/2016',
dateLimit: {
days: 60
},
showDropdowns: true,
showWeekNumbers: true,
timePicker: false,
timePickerIncrement: 1,
timePicker12Hour: true,
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
},
opens: 'left',
drops: 'down',
buttonClasses: ['btn', 'btn-sm'],
applyClass: 'btn-success',
cancelClass: 'btn-default',
separator: ' to ',
locale: {
applyLabel: 'Submit',
cancelLabel: 'Cancel',
fromLabel: 'From',
toLabel: 'To',
customRangeLabel: 'Custom',
daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
firstDay: 1
}
}, function (start, end, label) {
console.log(start.toISOString(), end.toISOString(), label);
$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
});
}
//Bootstrap-MaxLength
if ($('input#defaultconfig').length)
$('input#defaultconfig').maxlength()
if ($('input#thresholdconfig').length)
$('input#thresholdconfig').maxlength({
threshold: 20
});
if ($('input#moreoptions').length)
$('input#moreoptions').maxlength({
alwaysShow: true,
warningClass: "label label-success",
limitReachedClass: "label label-danger"
});
if ($('input#alloptions').length)
$('input#alloptions').maxlength({
alwaysShow: true,
warningClass: "label label-success",
limitReachedClass: "label label-danger",
separator: ' out of ',
preText: 'You typed ',
postText: ' chars available.',
validate: true
});
if ($('textarea#textarea').length)
$('textarea#textarea').maxlength({
alwaysShow: true
});
if ($('input#placement').length)
$('input#placement').maxlength({
alwaysShow: true,
placement: 'top-left'
});
})(jQuery);

1
assets/scripts/form.demo.min.js vendored Executable file
View File

@ -0,0 +1 @@
!function(e){"use strict";e(".flexdatalist").length&&e(".flexdatalist").flexdatalist(),e("#popover-1").length&&e("#popover-1").popSelect({showTitle:!1,maxAllowed:2}),e("#popover-2").length&&e("#popover-2").popSelect({showTitle:!1,placeholderText:"Click to Add More",position:"bottom"}),e(".select2_1").length&&e(".select2_1").select2(),e(".select2_2").length&&e(".select2_2").select2({tags:!0}),e(".multiselect").length&&e(".multiselect").multiselect(),e("#search").length&&e("#search").multiselect({search:{left:'<input type="text" name="q" class="form-control" placeholder="Search..." />',right:'<input type="text" name="q" class="form-control" placeholder="Search..." />'}}),e("input[name='demo1']").length&&e("input[name='demo1']").TouchSpin({min:0,max:100,step:.1,decimals:2,boostat:5,maxboostedstep:10,postfix:"%"}),e("input[name='demo2']").length&&e("input[name='demo2']").TouchSpin({min:-1e9,max:1e9,stepinterval:50,maxboostedstep:1e7,prefix:"$"}),e("input[name='demo_vertical']").length&&e("input[name='demo_vertical']").TouchSpin({verticalbuttons:!0}),e("input[name='demo_vertical2']").length&&e("input[name='demo_vertical2']").TouchSpin({verticalbuttons:!0,verticalupclass:"glyphicon glyphicon-plus",verticaldownclass:"glyphicon glyphicon-minus"}),e("input[name='demo5']").length&&e("input[name='demo5']").TouchSpin({prefix:"pre",postfix:"post"}),e("#timepicker").length&&e("#timepicker").timepicker({defaultTIme:!1}),e("#timepicker2").length&&e("#timepicker2").timepicker({showMeridian:!1}),e("#timepicker3").length&&e("#timepicker3").timepicker({minuteStep:15}),e(".colorpicker-default").length&&e(".colorpicker-default").colorpicker({format:"hex"}),e(".colorpicker-rgba").length&&e(".colorpicker-rgba").colorpicker(),e("#datepicker").length&&e("#datepicker").datepicker(),e("#datepicker-autoclose").length&&e("#datepicker-autoclose").datepicker({autoclose:!0,todayHighlight:!0}),e("#datepicker-inline").length&&e("#datepicker-inline").datepicker(),e("#datepicker-multiple-date").length&&e("#datepicker-multiple-date").datepicker({format:"mm/dd/yyyy",clearBtn:!0,multidate:!0,multidateSeparator:","}),e("#date-range").length&&e("#date-range").datepicker({toggleActive:!0}),e(".input-daterange-datepicker").length&&e(".input-daterange-datepicker").daterangepicker({buttonClasses:["btn","btn-sm"],applyClass:"btn-default",cancelClass:"btn-primary"}),e(".input-daterange-timepicker").length&&e(".input-daterange-timepicker").daterangepicker({timePicker:!0,format:"MM/DD/YYYY h:mm A",timePickerIncrement:30,timePicker12Hour:!0,timePickerSeconds:!1,buttonClasses:["btn","btn-sm"],applyClass:"btn-default",cancelClass:"btn-primary"}),e(".input-limit-datepicker").length&&e(".input-limit-datepicker").daterangepicker({format:"MM/DD/YYYY",minDate:"06/01/2016",maxDate:"06/30/2016",buttonClasses:["btn","btn-sm"],applyClass:"btn-default",cancelClass:"btn-primary",dateLimit:{days:6}}),e("#reportrange").length&&(e("#reportrange span").html(moment().subtract(29,"days").format("MMMM D, YYYY")+" - "+moment().format("MMMM D, YYYY")),e("#reportrange").daterangepicker({format:"MM/DD/YYYY",startDate:moment().subtract(29,"days"),endDate:moment(),minDate:"01/01/2016",maxDate:"12/31/2016",dateLimit:{days:60},showDropdowns:!0,showWeekNumbers:!0,timePicker:!1,timePickerIncrement:1,timePicker12Hour:!0,ranges:{Today:[moment(),moment()],Yesterday:[moment().subtract(1,"days"),moment().subtract(1,"days")],"Last 7 Days":[moment().subtract(6,"days"),moment()],"Last 30 Days":[moment().subtract(29,"days"),moment()],"This Month":[moment().startOf("month"),moment().endOf("month")],"Last Month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")]},opens:"left",drops:"down",buttonClasses:["btn","btn-sm"],applyClass:"btn-success",cancelClass:"btn-default",separator:" to ",locale:{applyLabel:"Submit",cancelLabel:"Cancel",fromLabel:"From",toLabel:"To",customRangeLabel:"Custom",daysOfWeek:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],firstDay:1}},function(a,t,r){console.log(a.toISOString(),t.toISOString(),r),e("#reportrange span").html(a.format("MMMM D, YYYY")+" - "+t.format("MMMM D, YYYY"))})),e("input#defaultconfig").length&&e("input#defaultconfig").maxlength(),e("input#thresholdconfig").length&&e("input#thresholdconfig").maxlength({threshold:20}),e("input#moreoptions").length&&e("input#moreoptions").maxlength({alwaysShow:!0,warningClass:"label label-success",limitReachedClass:"label label-danger"}),e("input#alloptions").length&&e("input#alloptions").maxlength({alwaysShow:!0,warningClass:"label label-success",limitReachedClass:"label label-danger",separator:" out of ",preText:"You typed ",postText:" chars available.",validate:!0}),e("textarea#textarea").length&&e("textarea#textarea").maxlength({alwaysShow:!0}),e("input#placement").length&&e("input#placement").maxlength({alwaysShow:!0,placement:"top-left"})}(jQuery);

View File

@ -0,0 +1,56 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: Form Wizard
*/
(function($) {
"use strict";
if ($('#rootwizard').length)
$('#rootwizard').bootstrapWizard();
if ($('#rootwizard-pill').length)
$('#rootwizard-pill').bootstrapWizard({'tabClass': 'nav nav-tabs'});
if ($('#rootwizard-progress').length)
$('#rootwizard-progress').bootstrapWizard({'tabClass': 'nav nav-pills', 'debug': false, onTabShow: function(tab, navigation, index) {
var $total = navigation.find('li').length;
var $current = index+1;
var $percent = ($current/$total) * 100;
$('#rootwizard-progress').find('.bar').css({width:$percent+'%'});
}});
if ($('#tabsleft').length){
var $validator = $("#commentForm").validate({
rules: {
emailfield: {
required: true,
email: true,
minlength: 3
},
namefield: {
required: true,
minlength: 3
},
urlfield: {
required: true,
minlength: 3,
url: true
}
}
});
$('#tabsleft').bootstrapWizard({
'tabClass': 'nav nav-tabs',
'onNext': function (tab, navigation, index) {
var $valid = $("#commentForm").valid();
if (!$valid) {
$validator.focusInvalid();
return false;
}
}
});
}
})(jQuery);

1
assets/scripts/form.wizard.init.min.js vendored Executable file
View File

@ -0,0 +1 @@
!function(r){"use strict";if(r("#rootwizard").length&&r("#rootwizard").bootstrapWizard(),r("#rootwizard-pill").length&&r("#rootwizard-pill").bootstrapWizard({tabClass:"nav nav-tabs"}),r("#rootwizard-progress").length&&r("#rootwizard-progress").bootstrapWizard({tabClass:"nav nav-pills",debug:!1,onTabShow:function(a,t,i){var o=t.find("li").length,e=i+1,n=e/o*100;r("#rootwizard-progress").find(".bar").css({width:n+"%"})}}),r("#tabsleft").length){var a=r("#commentForm").validate({rules:{emailfield:{required:!0,email:!0,minlength:3},namefield:{required:!0,minlength:3},urlfield:{required:!0,minlength:3,url:!0}}});r("#tabsleft").bootstrapWizard({tabClass:"nav nav-tabs",onNext:function(){var t=r("#commentForm").valid();return t?void 0:(a.focusInvalid(),!1)}})}}(jQuery);

View File

@ -0,0 +1,189 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: Full Calendar
*/
$(document).ready(function() {
/* initialize the calendar
-----------------------------------------------------------------*/
if ($('#calendar').length){
var todayDate = moment().startOf('day');
var YM = todayDate.format('YYYY-MM');
var YESTERDAY = todayDate.clone().subtract(1, 'day').format('YYYY-MM-DD');
var TODAY = todayDate.format('YYYY-MM-DD');
var TOMORROW = todayDate.clone().add(1, 'day').format('YYYY-MM-DD');
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay,list'
},
buttonIcons: {
prev: 'none fa fa-angle-left',
next: 'none fa fa-angle-right',
prevYear: 'none fa fa-angle-left',
nextYear: 'none fa fa-angle-right'
},
editable: true,
eventLimit: true, // allow "more" link when too many events
navLinks: true,
droppable: true, // this allows things to be dropped onto the calendar
drop: function(date, allDay) {
var originalEventObject = $(this).data('eventObject');
var valueArray = ($(this).attr('class')).split(" ");
var thisClass;
for(var i=0; i<valueArray.length; i++){
if (valueArray[i].search("bg") > -1){
thisClass = valueArray[i];
}
}
var copiedEventObject = $.extend({}, originalEventObject);
copiedEventObject.start = date;
copiedEventObject.className = thisClass;
$('#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: YM + '-01',
className: 'bg-success'
},
{
title: 'Long Event',
start: YM + '-07',
end: YM + '-10'
},
{
id: 999,
title: 'Repeating Event',
start: YM + '-09T16:00:00',
className: 'bg-danger'
},
{
id: 999,
title: 'Repeating Event',
start: YM + '-16T16:00:00',
className: 'bg-danger'
},
{
title: 'Conference',
start: YESTERDAY,
end: TOMORROW,
className: 'bg-warning'
},
{
title: 'Meeting',
start: TODAY + 'T10:30:00',
end: TODAY + 'T12:30:00',
className: 'bg-success'
},
{
title: 'Lunch',
start: TODAY + 'T12:00:00',
className: 'bg-info'
},
{
title: 'Meeting',
start: TODAY + 'T14:30:00',
className: 'bg-success'
},
{
title: 'Happy Hour',
start: TODAY + 'T17:30:00',
className: 'bg-info'
},
{
title: 'Dinner',
start: TODAY + 'T20:00:00',
className: 'bg-success'
},
{
title: 'Birthday Party',
start: TOMORROW + 'T07:00:00',
className: 'bg-orange'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: YM + '-28'
}
]
});
$('#external-events .fc-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
});
});
}
if ($("#calendar-widget").length){
$('#calendar-widget').fullCalendar({
height: 470,
header: {
left: 'prev,next',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
buttonIcons: {
prev: 'none fa fa-angle-left',
next: 'none fa fa-angle-right',
prevYear: 'none fa fa-angle-left',
nextYear: 'none fa fa-angle-right'
},
editable: true,
defaultDate: '2016-10-11',
events: [
{
title: 'Birthday',
start: '2016-10-11',
className: 'bg-success'
},
{
title: 'NinjaTeam Events',
start: '2016-10-16',
end: '2016-10-18',
className: 'bg-primary'
},
{
title: 'Meeting',
start: '2016-10-13',
end: '2016-10-14',
className: 'bg-danger'
},
{
title: 'Events Group',
start: '2016-10-03',
end: '2016-10-04',
className: 'bg-warning'
},
{
title: 'Group',
start: '2016-10-28',
end: '2016-10-29',
className: 'bg-violet'
},
]
});
}
});

View File

@ -0,0 +1,85 @@
(function($) {
"use strict";
$(document).ready(function(){
var window_width = $(window).width();
if (window_width > 1024){
releft_mega(window_width);
}
return false;
});
$(window).on('resize',function(){
var window_width = $(window).width();
if (window_width > 1024){
releft_mega(window_width);
}else{
$(".nav .sub-menu").attr('style','');
}
return false;
});
$(".nav .menu a,.nav .menu h3").on('click',function(event){
var selector = $(this),
next = selector.next();
if (selector.next().length){
event.preventDefault();
if ($(window).width() < 1025){
next.stop().slideToggle(200);
selector.toggleClass("active");
}
}
});
$(".js__menu_button").on('click',function(){
$(".nav").toggleClass("active");
return false;
});
$(".js__close_menu").on('click',function(){
$(".nav").removeClass("active");
return false;
});
$("#wrapper").on('click',function(event){
var target = $(event.target);
if (target.hasClass('nav') || target.hasClass('js__menu_button') || target.parents('.nav').length || target.parents('.js__menu_button').length){
}else{
$(".nav").removeClass("active");
}
});
function releft_mega(window_width){
if ($("html").attr('dir') == 'rtl'){
$(".mega").each(function(){
var selector = $(this),
width = selector.outerWidth(),
left = selector.offset().left,
container_width = $(".nav-horizontal .container").outerWidth() - 40,
new_width = ( window_width - container_width ) / 2;
if (left < new_width){
selector.css({
'right' : - new_width
})
}
});
}else{
$(".mega").each(function(){
var selector = $(this),
width = selector.outerWidth(),
left = selector.offset().left,
container_width = $(".nav-horizontal .container").outerWidth() - 40,
new_width = window_width - ( window_width - container_width ) / 2;
if (width + left > new_width){
selector.css({
'left' : new_width - width - left
})
}
});
}
return false;
}
})(jQuery);

1
assets/scripts/horizontal-menu.min.js vendored Executable file
View File

@ -0,0 +1 @@
!function(t){"use strict";function n(n){return"rtl"==t("html").attr("dir")?t(".mega").each(function(){var e=t(this),a=(e.outerWidth(),e.offset().left),o=t(".nav-horizontal .container").outerWidth()-40,i=(n-o)/2;i>a&&e.css({right:-i})}):t(".mega").each(function(){var e=t(this),a=e.outerWidth(),o=e.offset().left,i=t(".nav-horizontal .container").outerWidth()-40,r=n-(n-i)/2;a+o>r&&e.css({left:r-a-o})}),!1}t(document).ready(function(){var e=t(window).width();return e>1024&&n(e),!1}),t(window).on("resize",function(){var e=t(window).width();return e>1024?n(e):t(".nav .sub-menu").attr("style",""),!1}),t(".nav .menu a,.nav .menu h3").on("click",function(n){var e=t(this),a=e.next();e.next().length&&(n.preventDefault(),t(window).width()<1025&&(a.stop().slideToggle(200),e.toggleClass("active")))}),t(".js__menu_button").on("click",function(){return t(".nav").toggleClass("active"),!1}),t(".js__close_menu").on("click",function(){return t(".nav").removeClass("active"),!1}),t("#wrapper").on("click",function(n){var e=t(n.target);e.hasClass("nav")||e.hasClass("js__menu_button")||e.parents(".nav").length||e.parents(".js__menu_button").length||t(".nav").removeClass("active")})}(jQuery);

4
assets/scripts/html5shiv.min.js vendored Executable file
View File

@ -0,0 +1,4 @@
/**
* @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document);

View File

@ -0,0 +1,125 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: Ion Ranger Slider
*/
(function($) {
"use strict";
var slider = {};
$(document).ready(function(){
if ($("#ion-range-01").length) slider.default();
if ($("#ion-range-02").length) slider.minMax();
if ($("#ion-range-03").length) slider.prefix();
if ($("#ion-range-04").length) slider.negative();
if ($("#ion-range-05").length) slider.step();
if ($("#ion-range-06").length) slider.fractional();
if ($("#ion-range-07").length) slider.arrayNumber();
if ($("#ion-range-08").length) slider.arrayStringNumber();
if ($("#ion-range-09").length) slider.arrayStringMonth();
return false;
});
slider = {
default: function(){
$("#ion-range-01").ionRangeSlider();
return false;
},
minMax: function(){
$("#ion-range-02").ionRangeSlider({
min: 100,
max: 1000,
from: 550
});
return false;
},
prefix: function(){
$("#ion-range-03").ionRangeSlider({
type: "double",
grid: true,
min: 0,
max: 1000,
from: 200,
to: 800,
prefix: "$"
});
return false;
},
negative: function(){
$("#ion-range-04").ionRangeSlider({
type: "double",
grid: true,
min: -1000,
max: 1000,
from: -500,
to: 500
});
return false;
},
step: function(){
$("#ion-range-05").ionRangeSlider({
type: "double",
grid: true,
min: -1000,
max: 1000,
from: -500,
to: 500,
step: 250
});
return false;
},
fractional: function(){
$("#ion-range-06").ionRangeSlider({
type: "double",
grid: true,
min: -12.8,
max: 12.8,
from: -3.2,
to: 3.2,
step: 0.1
});
return false;
},
arrayNumber: function(){
$("#ion-range-07").ionRangeSlider({
type: "double",
grid: true,
from: 1,
to: 5,
values: [0, 10, 100, 1000, 10000, 100000, 1000000]
});
return false;
},
arrayStringNumber: function(){
$("#ion-range-08").ionRangeSlider({
grid: true,
from: 5,
values: [
"zero", "one",
"two", "three",
"four", "five",
"six", "seven",
"eight", "nine",
"ten"
]
});
return false;
},
arrayStringMonth: function(){
$("#ion-range-09").ionRangeSlider({
grid: true,
from: 3,
values: [
"January", "February", "March",
"April", "May", "June",
"July", "August", "September",
"October", "November", "December"
]
});
return false;
}
}
})(jQuery);

1
assets/scripts/ion.rangeSlider.init.min.js vendored Executable file
View File

@ -0,0 +1 @@
!function(e){"use strict";var a={};e(document).ready(function(){return e("#ion-range-01").length&&a["default"](),e("#ion-range-02").length&&a.minMax(),e("#ion-range-03").length&&a.prefix(),e("#ion-range-04").length&&a.negative(),e("#ion-range-05").length&&a.step(),e("#ion-range-06").length&&a.fractional(),e("#ion-range-07").length&&a.arrayNumber(),e("#ion-range-08").length&&a.arrayStringNumber(),e("#ion-range-09").length&&a.arrayStringMonth(),!1}),a={"default":function(){return e("#ion-range-01").ionRangeSlider(),!1},minMax:function(){return e("#ion-range-02").ionRangeSlider({min:100,max:1e3,from:550}),!1},prefix:function(){return e("#ion-range-03").ionRangeSlider({type:"double",grid:!0,min:0,max:1e3,from:200,to:800,prefix:"$"}),!1},negative:function(){return e("#ion-range-04").ionRangeSlider({type:"double",grid:!0,min:-1e3,max:1e3,from:-500,to:500}),!1},step:function(){return e("#ion-range-05").ionRangeSlider({type:"double",grid:!0,min:-1e3,max:1e3,from:-500,to:500,step:250}),!1},fractional:function(){return e("#ion-range-06").ionRangeSlider({type:"double",grid:!0,min:-12.8,max:12.8,from:-3.2,to:3.2,step:.1}),!1},arrayNumber:function(){return e("#ion-range-07").ionRangeSlider({type:"double",grid:!0,from:1,to:5,values:[0,10,100,1e3,1e4,1e5,1e6]}),!1},arrayStringNumber:function(){return e("#ion-range-08").ionRangeSlider({grid:!0,from:5,values:["zero","one","two","three","four","five","six","seven","eight","nine","ten"]}),!1},arrayStringMonth:function(){return e("#ion-range-09").ionRangeSlider({grid:!0,from:3,values:["January","February","March","April","May","June","July","August","September","October","November","December"]}),!1}}}(jQuery);

12
assets/scripts/isotope.pkgd.min.js vendored Executable file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,80 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: Knob
*/
(function($) {
"use strict";
$(document).ready(function(){
$(".knob").knob({
draw : function () {
// "tron" case
if(this.$.data('skin') == 'tron') {
this.cursorExt = 0.3;
var a = this.arc(this.cv) // Arc
, pa // Previous arc
, r = 1;
this.g.lineWidth = this.lineWidth;
if (this.o.displayPrevious) {
pa = this.arc(this.v);
this.g.beginPath();
this.g.strokeStyle = this.pColor;
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, pa.s, pa.e, pa.d);
this.g.stroke();
}
this.g.beginPath();
this.g.strokeStyle = r ? this.o.fgColor : this.fgColor ;
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, a.s, a.e, a.d);
this.g.stroke();
this.g.lineWidth = 2;
this.g.beginPath();
this.g.strokeStyle = this.o.fgColor;
this.g.arc( this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false);
this.g.stroke();
return false;
}
}
});
// Example of infinite knob, iPod click wheel
var v, up=0,down=0,i=0
,$idir = $("div.idir")
,$ival = $("div.ival")
,incr = function() { i++; $idir.show().html("+").fadeOut(); $ival.html(i); }
,decr = function() { i--; $idir.show().html("-").fadeOut(); $ival.html(i); };
$("input.infinite").knob(
{
min : 0
, max : 20
, stopper : false
, change : function () {
if(v > this.cv){
if(up){
decr();
up=0;
}else{up=1;down=0;}
} else {
if(v < this.cv){
if(down){
incr();
down=0;
}else{down=1;up=0;}
}
}
v = this.cv;
}
});
return false;
});
})(jQuery);

1
assets/scripts/jquery.knob.init.min.js vendored Executable file
View File

@ -0,0 +1 @@
!function(e){"use strict";e(document).ready(function(){e(".knob").knob({draw:function(){if("tron"==this.$.data("skin")){this.cursorExt=.3;var e,t=this.arc(this.cv),s=1;return this.g.lineWidth=this.lineWidth,this.o.displayPrevious&&(e=this.arc(this.v),this.g.beginPath(),this.g.strokeStyle=this.pColor,this.g.arc(this.xy,this.xy,this.radius-this.lineWidth,e.s,e.e,e.d),this.g.stroke()),this.g.beginPath(),this.g.strokeStyle=s?this.o.fgColor:this.fgColor,this.g.arc(this.xy,this.xy,this.radius-this.lineWidth,t.s,t.e,t.d),this.g.stroke(),this.g.lineWidth=2,this.g.beginPath(),this.g.strokeStyle=this.o.fgColor,this.g.arc(this.xy,this.xy,this.radius-this.lineWidth+1+2*this.lineWidth/3,0,2*Math.PI,!1),this.g.stroke(),!1}}});var t,s=0,i=0,n=0,o=e("div.idir"),a=e("div.ival"),r=function(){n++,o.show().html("+").fadeOut(),a.html(n)},l=function(){n--,o.show().html("-").fadeOut(),a.html(n)};return e("input.infinite").knob({min:0,max:20,stopper:!1,change:function(){t>this.cv?s?(l(),s=0):(s=1,i=0):t<this.cv&&(i?(r(),i=0):(i=1,s=0)),t=this.cv}}),!1})}(jQuery);

4
assets/scripts/jquery.min.js vendored Executable file

File diff suppressed because one or more lines are too long

7
assets/scripts/jquery.scrollTo.min.js vendored Executable file
View File

@ -0,0 +1,7 @@
/**
* Copyright (c) 2007-2014 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
* Licensed under MIT
* @author Ariel Flesler
* @version 1.4.14
*/
;(function(k){'use strict';k(['jquery'],function($){var j=$.scrollTo=function(a,b,c){return $(window).scrollTo(a,b,c)};j.defaults={axis:'xy',duration:0,limit:!0};j.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(f,g,h){if(typeof g=='object'){h=g;g=0}if(typeof h=='function')h={onAfter:h};if(f=='max')f=9e9;h=$.extend({},j.defaults,h);g=g||h.duration;h.queue=h.queue&&h.axis.length>1;if(h.queue)g/=2;h.offset=both(h.offset);h.over=both(h.over);return this._scrollable().each(function(){if(f==null)return;var d=this,$elem=$(d),targ=f,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=win?$(targ):$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}var e=$.isFunction(h.offset)&&h.offset(d,targ)||h.offset;$.each(h.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=j.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(h.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=e[pos]||0;if(h.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*h.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(h.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&h.queue){if(old!=attr[key])animate(h.onAfterFirst);delete attr[key]}});animate(h.onAfter);function animate(a){$elem.animate(attr,g,h.easing,a&&function(){a.call(this,targ,h)})}}).end()};j.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 $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}return j})}(typeof define==='function'&&define.amd?define:function(a,b){if(typeof module!=='undefined'&&module.exports){module.exports=b(require('jquery'))}else{b(jQuery)}}));

54
assets/scripts/mailbox.init.js Executable file
View File

@ -0,0 +1,54 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: Mailbox
*/
(function($) {
"use strict";
//Enable iCheck plugin for checkboxes
//iCheck for checkbox and radio inputs
$('.mailbox-messages input[type="checkbox"]').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue'
});
//Enable check and uncheck all functionality
$(".checkbox-toggle").on("click",function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
} else {
//Check all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
return false;
});
//Handle starring for glyphicon and font awesome
$(".mailbox-star").on("click",function (e) {
e.preventDefault();
//detect type
var $this = $(this).find("a > i");
var glyph = $this.hasClass("glyphicon");
var fa = $this.hasClass("fa");
//Switch states
if (glyph) {
$this.toggleClass("glyphicon-star");
$this.toggleClass("glyphicon-star-empty");
}
if (fa) {
$this.toggleClass("fa-star");
$this.toggleClass("fa-star-o");
}
return false;
});
})(jQuery);

1
assets/scripts/mailbox.init.min.js vendored Executable file
View File

@ -0,0 +1 @@
!function(e){"use strict";e('.mailbox-messages input[type="checkbox"]').iCheck({checkboxClass:"icheckbox_square-blue",radioClass:"iradio_square-blue"}),e(".checkbox-toggle").on("click",function(){var a=e(this).data("clicks");return a?(e(".mailbox-messages input[type='checkbox']").iCheck("uncheck"),e(".fa",this).removeClass("fa-check-square-o").addClass("fa-square-o")):(e(".mailbox-messages input[type='checkbox']").iCheck("check"),e(".fa",this).removeClass("fa-square-o").addClass("fa-check-square-o")),e(this).data("clicks",!a),!1}),e(".mailbox-star").on("click",function(a){a.preventDefault();var t=e(this).find("a > i"),r=t.hasClass("glyphicon"),i=t.hasClass("fa");return r&&(t.toggleClass("glyphicon-star"),t.toggleClass("glyphicon-star-empty")),i&&(t.toggleClass("fa-star"),t.toggleClass("fa-star-o")),!1})}(jQuery);

697
assets/scripts/main.js Executable file
View File

@ -0,0 +1,697 @@
(function($) {
"use strict";
var Core = {};
NProgress.start();
$(document).ready(function(){
Core.module.init();
Core.plugin.init();
if ($('[data-toggle="tooltip"]').length) $('[data-toggle="tooltip"]').tooltip() //Enable tooltip
return false;
});
$(window).bind("load",function(){
Core.plugin.isotope.init();
Core.func.resizeNotice();
NProgress.done();
return false;
});
$(window).on("resize",function(){
Core.func.resizeNotice();
Core.func.getChart();
return false;
})
$(".js__full_screen").on('click',function(){
$(document).fullScreen(true);
});
Core.module = {
init : function(){
Core.module.accordion();
Core.module.card();
Core.module.css($(".js__width"),"width");
Core.module.dropDown("js__drop_down",false);
Core.module.logout();
Core.module.menu();
Core.module.tab(".js__tab","li");
Core.module.toggle();
Core.module.todo();
return false;
},
accordion: function(){
$(".js__accordion").each(function(){
var selector = $(this);
selector.find(".js__control").on("click",function(event){
event.preventDefault();
if ($(this).parent().hasClass("active")){
$(this).parent().removeClass("active");
$(this).next().stop().slideUp(400);
}else{
var current = $(this);
selector.find(".active").children(".js__content").stop().slideUp(400);
selector.find(".active").removeClass("active");
$(this).parent().addClass("active");
$(this).next(".js__content").slideDown(400,function(){
if (selector.parents(".main-menu").length){
$(".main-menu .content").mCustomScrollbar("scrollTo",current,{
// scroll as soon as clicked
timeout:0,
// scroll duration
scrollInertia:200,
});
}
});
}
});
});
return false;
},
card: function(){
$(".js__card").each(function(){
var selector = $(this);
selector.on("click",".js__card_minus",function(){
selector.toggleClass("card-closed");
selector.find(".js__card_content").stop().slideToggle(400);
});
selector.on("click",".js__card_remove",function(){
selector.slideUp(400);
});
});
return false;
},
css : function(selector,name,data){
if (!data){
data = name;
}
selector.each(function(){
var raw = $(this).data(data);
if (raw){
var dict = {};
dict[name] = raw
$(this).css(dict);
}
});
return false;
},
dropDown : function(selectorTxt,isMobile){
var selector = $("." + selectorTxt);
selector.each(function(){
var current_selector = $(this);
current_selector.on("click",".js__drop_down_button",function(event){
event.preventDefault();
if ($(window).width() < 1025 || isMobile == false){
if (current_selector.hasClass("active")){
current_selector.removeClass("active");
}else{
selector.removeClass("active");
current_selector.addClass("active");
}
}
return false;
});
});
$("html").on("click",function(event){
var selector = $(event.target);
if (!(selector.hasClass(selectorTxt) || selector.parents("." + selectorTxt).length)){
$("." + selectorTxt + ".active").removeClass("active");
}
});
return false;
},
logout: function(){
$(".js__logout").on("click",function(event){
event.preventDefault();
swal({
title: "Logout?",
text: "Are you sure you want to logout?",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, I'm out!",
cancelButtonText: "No, stay plx!",
closeOnConfirm: false,
closeOnCancel: true,
confirmButtonColor: '#f60e0e',
}, function(isConfirm){
if (isConfirm) {
swal({
title : "Logout success",
text: "See you later!",
type: "success",
confirmButtonColor: '#304ffe',
});
} else {
}
});
return false;
});
},
menu: function(){
$(".js__menu_mobile").on("click",function(){
$("html").toggleClass("menu-active");
$(window).trigger("resize");
});
$(".js__menu_close").on("click",function(){
$("html").removeClass("menu-active");
});
$("body").on("click",function(event){
if ($("html.menu-active").length && $(window).width() < 800){
var selector = $(event.target);
if (!(selector.hasClass("main-menu") || selector.hasClass("js__menu_mobile") || selector.parents(".main-menu").length || selector.parents(".js__menu_mobile").length)){
$("html").removeClass("menu-active");
}
}
});
return false;
},
tab: function(name,index_name){
$(".js__tab").each(function(){
var selector = $(this);
selector.on("click",".js__tab_control",function(event){
var target = $(this).data("target");
event.preventDefault();
selector.find(".js__tab_content").removeClass("js__active");
selector.find(".js__tab_control").removeClass("js__active");
$(this).addClass("js__active");
if (target){
$(target).addClass("js__active");
}else{
var index;
if (index_name){
index = $(this).parents(index_name).first().index()
}else{
index = $(this).index()
}
selector.find(".js__tab_content").eq(index).addClass("js__active");
}
return false;
});
});
return false;
},
todo: function(){
$(".js__todo_widget").each(function(){
var selector = $(this),
list = $(this).find(".js__todo_list"),
val = $(this).find(".js__todo_value"),
button = $(this).find(".js__todo_button");
button.on("click",function(){
if (val.val() != ""){
var rnd = Math.floor((Math.random() * 100000000) + 1);
list.append('<div class="todo-item"><div class="checkbox"><input type="checkbox" id="todo-'+ rnd +'"><label for="todo-'+ rnd +'">' + val.val() +'</label></div></div>')
val.val("");
}else{
alert("You must enter task name.")
}
return false;
});
});
return false;
},
toggle: function(){
$(".js__toggle_open").on("click",function(event){
event.preventDefault();
if ($($(this).data("target")).hasClass("active")){
}else{
$(".js__toggle").removeClass("active")
}
$($(this).data("target")).toggleClass("active");
return false;
});
$(".js__toggle_close").on("click",function(event){
event.preventDefault();
$(this).parents(".js__toggle").removeClass("active");
return false;
});
$("body").on("click",function(event){
if ($(".js__toggle").hasClass("active")){
var selector = $(event.target);
if (!(selector.hasClass("js__toggle_open") || selector.hasClass("js__toggle") || selector.parents(".js__toggle_open").length || selector.parents(".js__toggle").length)){
$(".js__toggle").removeClass("active")
}
}
});
return false;
}
}
Core.func = {
childReturnWidth : function(selector,current_width){
if (selector.children("li").children(".sub-menu").length){
var max_width = 0;
selector.children("li").children(".sub-menu").each(function(){
var this_width = Core.func.childReturnWidth($(this),current_width + $(this).outerWidth());
if (this_width > max_width){
max_width = this_width;
}
});
return max_width;
}else{
return current_width;
}
},
getResponsiveSettings: function(selector){
var responsive = selector.data("responsive"),
json = [];
if (responsive){
while(responsive.indexOf("'") > -1){
responsive = responsive.replace("'",'"');
}
var json_temp = JSON.parse(responsive);
$.each(json_temp, function (key, data) {
json[json.length] = {
breakpoint: key,
settings: {
slidesToShow: data,
slidesToScroll: data,
}
}
});
}
return json;
},
getChart: function(){
$(".js__chart").each(function(){
var selector = $(this),
chart = selector.data("chart"),
json = [],
id = selector.attr("id"),
type = selector.data("type"),
options, dataTable,chart_draw,themes = ($(this).hasClass('black-chart') ? '#1b1c1c' : '#ffffff');
if (chart){
var json_temp = chart.split("|"),
i,j;
for (i = 0; i < json_temp.length; i++){
json_temp[i] = json_temp[i].trim();
json[i] = json_temp[i].split("/");
for(j = 0; j < json[i].length; j++){
if (json[i][j].indexOf("'") > -1){
while(json[i][j].indexOf("'") > -1){
json[i][j] = json[i][j].replace("'","");
}
json[i][j] = json[i][j].trim();
}else{
if (json[i][j].indexOf(".") > -1){
json[i][j] = parseFloat(json[i][j]);
}else{
json[i][j] = parseInt(json[i][j],10);
}
}
}
}
dataTable = google.visualization.arrayToDataTable(json);
if ($(this).hasClass('black-chart')){
switch (type){
case "circle":
options = {
chartArea:{left:0,top:0,width:'100%',height:'75%'},
colors: ["#304ffe", "#f60e0e","#ffa000"],
fontName: 'Poppins',
backgroundColor: themes,
legend:{
position: 'bottom',
textStyle: {
color: '#484848'
}
},
vAxis: {
baselineColor: '#484848',
gridlines: {
color: "#484848"
},
textStyle:{
color: '#484848'
}
},
hAxis: {
textStyle:{
color: '#484848'
}
}
}
chart_draw = new google.visualization.PieChart(document.getElementById(id));
break;
case "donut":
options = {
pieHole: 0.3,
chartArea:{left:0,top:0,width:'100%',height:'75%'},
legend:{
position: 'bottom',
textStyle: {
color: '#484848'
}
},
colors: ["#304ffe", "#f60e0e","#ffa000"],
fontName: 'Poppins',
backgroundColor: themes
}
chart_draw = new google.visualization.PieChart(document.getElementById(id));
break;
case "column":
options = {
chartArea:{left:30,top:10,width:'100%',height:'80%'},
colors: ["#304ffe"],
fontName: 'Poppins',
backgroundColor: themes,
vAxis: {
baselineColor: '#484848',
gridlines: {
color: "#484848"
},
textStyle:{
color: '#484848'
}
},
hAxis: {
textStyle:{
color: '#484848'
}
}
}
chart_draw = new google.visualization.ColumnChart(document.getElementById(id));
break;
case "curve":
options = {
chartArea:{left:30,top:10,width:'90%',height:'80%'},
curveType: 'function',
colors: ["#304ffe", "#f60e0e","#ffa000"],
fontName: 'Poppins',
backgroundColor: themes,
vAxis: {
baselineColor: '#484848',
gridlines: {
color: "#484848"
},
textStyle:{
color: '#484848'
}
},
hAxis: {
textStyle:{
color: '#484848'
}
}
}
chart_draw = new google.visualization.LineChart(document.getElementById(id));
break;
case "line":
options = {
chartArea:{left:30,top:10,width:'90%',height:'80%'},
fontName: 'Poppins',
backgroundColor: themes,
vAxis: {
baselineColor: '#484848',
gridlines: {
color: "#484848"
},
textStyle:{
color: '#484848'
}
},
hAxis: {
textStyle:{
color: '#484848'
}
}
}
chart_draw = new google.visualization.LineChart(document.getElementById(id));
break;
case "area":
options = {
chartArea:{left:50,top:20,width:'100%',height:'70%'},
legend: {
position: 'bottom'
},
fontName: 'Poppins',
backgroundColor: themes,
vAxis: {
baselineColor: '#484848',
gridlines: {
color: "#484848"
},
textStyle:{
color: '#484848'
}
},
hAxis: {
textStyle:{
color: '#484848'
}
}
}
chart_draw = new google.visualization.AreaChart(document.getElementById(id));
break;
}
}else{
switch (type){
case "circle":
options = {
chartArea:{left:0,top:0,width:'100%',height:'75%'},
legend:{
position: 'bottom'
},
colors: ["#304ffe", "#f60e0e","#ffa000"],
fontName: 'Poppins',
backgroundColor: themes
}
chart_draw = new google.visualization.PieChart(document.getElementById(id));
break;
case "donut":
options = {
pieHole: 0.3,
chartArea:{left:0,top:0,width:'100%',height:'75%'},
legend:{
position: 'bottom',
},
colors: ["#304ffe", "#f60e0e","#ffa000"],
fontName: 'Poppins',
backgroundColor: themes
}
chart_draw = new google.visualization.PieChart(document.getElementById(id));
break;
case "column":
options = {
chartArea:{left:30,top:10,width:'100%',height:'80%'},
colors: ["#304ffe"],
fontName: 'Poppins',
backgroundColor: themes
}
chart_draw = new google.visualization.ColumnChart(document.getElementById(id));
break;
case "curve":
options = {
chartArea:{left:30,top:10,width:'90%',height:'80%'},
curveType: 'function',
colors: ["#304ffe", "#f60e0e","#ffa000"],
fontName: 'Poppins',
backgroundColor: themes
}
chart_draw = new google.visualization.LineChart(document.getElementById(id));
break;
case "line":
options = {
chartArea:{left:30,top:10,width:'90%',height:'80%'},
fontName: 'Poppins',
backgroundColor: themes
}
chart_draw = new google.visualization.LineChart(document.getElementById(id));
break;
case "area":
options = {
chartArea:{left:50,top:20,width:'100%',height:'70%'},
legend: {
position: 'bottom'
},
fontName: 'Poppins',
backgroundColor: themes
}
chart_draw = new google.visualization.AreaChart(document.getElementById(id));
break;
}
}
chart_draw.draw(dataTable, options);
}
});
},
resizeNotice : function(){
$(".notice-popup").each(function(){
var selector = $(this),
space = (parseInt(selector.data("space"),10) > 0) ? parseInt(selector.data("space"),10) : 75,
window_height = $(window).height() - space;
selector.attr("style","");
if (selector.height() > window_height){
selector.css({
"height" : window_height
});
}
});
}
}
Core.plugin = {
init : function(){
Core.plugin.chart();
Core.plugin.mCustomScrollbar();
Core.plugin.select2();
Core.plugin.ui.accordion();
Core.plugin.ui.slider();
Core.plugin.ui.sortable();
Core.plugin.ui.tabs();
Core.plugin.waves();
Core.plugin.isotope.filter();
return false;
},
chart: function(){
if ($(".js__chart").length){
google.charts.load("current", {packages:["corechart"]});
google.charts.setOnLoadCallback(Core.func.getChart);
}
return false;
},
isotope : {
init : function(){
setTimeout(function(){
$(".js__filter_isotope").each(function(){
var selector = $(this);
selector.find(".js__isotope_items").isotope({
itemSelector: ".js__isotope_item",
layoutMode: 'cellsByRow'
});
});
},100);
return false;
},
filter : function(){
$(".js__filter_isotope").each(function(){
var selector = $(this);
selector.on("click",".js__filter_control",function(event){
event.preventDefault();
if (!($(this).hasClass(".js__active"))){
selector.find(".js__filter_control").removeClass("js__active");
$(this).addClass("js__active");
selector.find(".js__isotope_items").isotope({
filter : $(this).data("filter")
});
}
return false;
});
});
return false;
}
},
mCustomScrollbar:function(){
if ($(".main-menu").length){
$(".main-menu .content").mCustomScrollbar();
}
if ($(".notice-popup").length){
$(".notice-popup .content").mCustomScrollbar();
}
return false;
},
select2 : function(){
$(".js__select2").each(function(){
var minResults = $(this).data("min-results"),
classContainer = $(this).data("container-class");
if (minResults){
if (minResults == "Infinity"){
$(this).select2({
minimumResultsForSearch: Infinity,
});
}else{
$(this).select2({
minimumResultsForSearch: parseInt(minResults,10)
});
}
if (classContainer){
$(this).on("select2:open", function(){
$(".select2-container--open").addClass(classContainer);
return false;
});
}
}else{
$(this).select2();
}
});
return false;
},
ui: {
accordion: function(){
if ($( ".js__ui_accordion" ).length){
$( ".js__ui_accordion" ).accordion({
heightStyle: "content",
collapsible: true
});
}
return false;
},
slider: function(){
$(".js__ui_slider").each(function(){
var selector = $(this),
slider = selector.find(".js__slider_range"),
amount = selector.find(".js__slider_amount"),
min = parseInt(selector.data("min"),10),
max = parseInt(selector.data("max"),10),
start = parseInt(selector.data("value-1"),10),
end = parseInt(selector.data("value-2"),10),
range = selector.data("range");
if (end > 0){
slider.slider({
range: true,
min: min,
max: max,
values: [ start, end ],
slide: function( event, ui ) {
amount.val( "$" + ui.values[0] + " - $" + ui.values[1] );
}
});
amount.val( "$" + slider.slider( "values", 0 ) + " - $" + slider.slider( "values", 1 ) );
}else{
slider.slider({
range: range,
min: min,
max: max,
value: start,
slide: function( event, ui ) {
amount.val( "$" + ui.value );
}
});
amount.val("$" + slider.slider( "value" ) );
}
});
return false;
},
sortable: function(){
if ($(".js__sortable").length){
$(".js__sortable").sortable({
revert: true,
start: function(e, ui){
ui.placeholder.height(ui.item.height() - 20);
ui.placeholder.css('visibility', 'visible');
}
});
}
return false;
},
tabs : function(){
if ($(".js__ui_tab").length){
$(".js__ui_tab").tabs();
}
return false;
}
},
waves: function(){
if ($('.js__control').length){
Waves.attach('.js__control');
Waves.init();
}
return false;
}
}
})(jQuery);

1
assets/scripts/main.min.js vendored Executable file

File diff suppressed because one or more lines are too long

381
assets/scripts/map.demo.js Executable file
View File

@ -0,0 +1,381 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: Google Maps
*/
(function($) {
"use strict";
if ($("#map-default").length){
var mapCanvas = document.getElementById("map-default");
var mapOptions = {
center: new google.maps.LatLng(51.508742,-0.120850),
zoom: 5
};
var map = new google.maps.Map(mapCanvas, mapOptions);
}
if ($("#map-marker").length){
var mapCanvas = document.getElementById("map-marker");
var mapOptions = {
center: new google.maps.LatLng(51.508742,-0.120850),
zoom: 5
};
var marker = new google.maps.Marker({
position: new google.maps.LatLng(51.508742,-0.120850),
animation:google.maps.Animation.BOUNCE
});
var map = new google.maps.Map(mapCanvas, mapOptions);
marker.setMap(map);
}
if ($("#map-poly").length){
var stavanger = new google.maps.LatLng(58.983991,5.734863);
var amsterdam = new google.maps.LatLng(52.395715,4.888916);
var london = new google.maps.LatLng(51.508742,-0.120850);
var mapCanvas = document.getElementById("map-poly");
var mapOptions = {center: amsterdam, zoom: 4};
var map = new google.maps.Map(mapCanvas,mapOptions);
var flightPath = new google.maps.Polyline({
path: [stavanger, amsterdam, london],
strokeColor: "#0000FF",
strokeOpacity: 0.8,
strokeWeight: 2
});
flightPath.setMap(map);
}
if ($("#map-polygon").length){
var stavanger = new google.maps.LatLng(58.983991,5.734863);
var amsterdam = new google.maps.LatLng(52.395715,4.888916);
var london = new google.maps.LatLng(51.508742,-0.120850);
var mapCanvas = document.getElementById("map-polygon");
var mapOptions = {center: amsterdam, zoom: 4};
var map = new google.maps.Map(mapCanvas,mapOptions);
var flightPath = new google.maps.Polygon({
path: [stavanger, amsterdam, london],
strokeColor: "#0000FF",
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: "#0000FF",
fillOpacity: 0.4
});
flightPath.setMap(map);
}
if($("#map-circle").length){
var amsterdam = new google.maps.LatLng(52.395715,4.888916);
var mapCanvas = document.getElementById("map-circle");
var mapOptions = {center: amsterdam, zoom: 7};
var map = new google.maps.Map(mapCanvas,mapOptions);
var myCity = new google.maps.Circle({
center: amsterdam,
radius: 50000,
strokeColor: "#0000FF",
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: "#0000FF",
fillOpacity: 0.4
});
myCity.setMap(map);
}
if($("#map-info").length){
var myCenter = new google.maps.LatLng(51.508742,-0.120850);
var mapCanvas = document.getElementById("map-info");
var mapOptions = {center: myCenter, zoom: 5};
var map = new google.maps.Map(mapCanvas, mapOptions);
var marker = new google.maps.Marker({position:myCenter});
marker.setMap(map);
var infowindow = new google.maps.InfoWindow({
content: "Hello World!"
});
infowindow.open(map,marker);
}
if ($("#map-hybrid").length){
var mapCanvas = document.getElementById("map-hybrid");
var mapOptions = {
center: new google.maps.LatLng(51.508742,-0.120850),
zoom: 5,
mapTypeId: google.maps.MapTypeId.HYBRID
};
var map = new google.maps.Map(mapCanvas, mapOptions);
}
if ($("#map-45").length){
var mapCanvas = document.getElementById("map-45");
var mapOptions = {
center: new google.maps.LatLng(45.434046,12.340284),
zoom:18,
mapTypeId:google.maps.MapTypeId.HYBRID
};
var map = new google.maps.Map(mapCanvas,mapOptions);
}
if ($("#map-light-dream").length){
var myCenter = new google.maps.LatLng(40.6700, -73.9400);
var mapOptions = {
zoom: 11,
center: new google.maps.LatLng(40.6700, -73.9400),
styles: [
{
"featureType": "landscape",
"stylers": [
{
"hue": "#FFBB00"
},
{
"saturation": 43.400000000000006
},
{
"lightness": 37.599999999999994
},
{
"gamma": 1
}
]
},
{
"featureType": "road.highway",
"stylers": [
{
"hue": "#FFC200"
},
{
"saturation": -61.8
},
{
"lightness": 45.599999999999994
},
{
"gamma": 1
}
]
},
{
"featureType": "road.arterial",
"stylers": [
{
"hue": "#FF0300"
},
{
"saturation": -100
},
{
"lightness": 51.19999999999999
},
{
"gamma": 1
}
]
},
{
"featureType": "road.local",
"stylers": [
{
"hue": "#FF0300"
},
{
"saturation": -100
},
{
"lightness": 52
},
{
"gamma": 1
}
]
},
{
"featureType": "water",
"stylers": [
{
"hue": "#0078FF"
},
{
"saturation": -13.200000000000003
},
{
"lightness": 2.4000000000000057
},
{
"gamma": 1
}
]
},
{
"featureType": "poi",
"stylers": [
{
"hue": "#00FF6A"
},
{
"saturation": -1.0989010989011234
},
{
"lightness": 11.200000000000017
},
{
"gamma": 1
}
]
}
]
};
// Get the HTML DOM element that will contain your map
// We are using a div with id="map" seen below in the <body>
var mapElement = document.getElementById('map-light-dream');
// Create the Google Map using our element and options defined above
var map = new google.maps.Map(mapElement, mapOptions);
var marker = new google.maps.Marker({position:myCenter});
marker.setMap(map);
}
if ($("#map-blue-essence").length){
var myCenter = new google.maps.LatLng(40.6700, -73.9400);
var mapOptions = {
zoom: 11,
center: new google.maps.LatLng(40.6700, -73.9400),
styles: [
{
"featureType": "landscape.natural",
"elementType": "geometry.fill",
"stylers": [
{
"visibility": "on"
},
{
"color": "#e0efef"
}
]
},
{
"featureType": "poi",
"elementType": "geometry.fill",
"stylers": [
{
"visibility": "on"
},
{
"hue": "#1900ff"
},
{
"color": "#c0e8e8"
}
]
},
{
"featureType": "road",
"elementType": "geometry",
"stylers": [
{
"lightness": 100
},
{
"visibility": "simplified"
}
]
},
{
"featureType": "road",
"elementType": "labels",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "transit.line",
"elementType": "geometry",
"stylers": [
{
"visibility": "on"
},
{
"lightness": 700
}
]
},
{
"featureType": "water",
"elementType": "all",
"stylers": [
{
"color": "#7dcdcd"
}
]
}
]
};
// Get the HTML DOM element that will contain your map
// We are using a div with id="map" seen below in the <body>
var mapElement = document.getElementById('map-blue-essence');
// Create the Google Map using our element and options defined above
var map = new google.maps.Map(mapElement, mapOptions);
var marker = new google.maps.Marker({position:myCenter});
marker.setMap(map);
}
if ($("#map-midnight-commander").length){
var myCenter = new google.maps.LatLng(40.6700, -73.9400);
var mapOptions = {
zoom: 11,
center: new google.maps.LatLng(40.6700, -73.9400),
styles: [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"color":"#000000"},{"lightness":13}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#144b53"},{"lightness":14},{"weight":1.4}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#08304b"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#0c4152"},{"lightness":5}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#0b434f"},{"lightness":25}]},{"featureType":"road.arterial","elementType":"geometry.fill","stylers":[{"color":"#000000"}]},{"featureType":"road.arterial","elementType":"geometry.stroke","stylers":[{"color":"#0b3d51"},{"lightness":16}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"}]},{"featureType":"transit","elementType":"all","stylers":[{"color":"#146474"}]},{"featureType":"water","elementType":"all","stylers":[{"color":"#021019"}]}]
};
// Get the HTML DOM element that will contain your map
// We are using a div with id="map" seen below in the <body>
var mapElement = document.getElementById('map-midnight-commander');
// Create the Google Map using our element and options defined above
var map = new google.maps.Map(mapElement, mapOptions);
var marker = new google.maps.Marker({position:myCenter});
marker.setMap(map);
}
if ($("#map-flat").length){
var myCenter = new google.maps.LatLng(40.6700, -73.9400);
var mapOptions = {
zoom: 11,
center: new google.maps.LatLng(40.6700, -73.9400),
styles: [{"featureType":"all","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"landscape","elementType":"all","stylers":[{"visibility":"on"},{"color":"#f3f4f4"}]},{"featureType":"landscape.man_made","elementType":"geometry","stylers":[{"weight":0.9},{"visibility":"off"}]},{"featureType":"poi.park","elementType":"geometry.fill","stylers":[{"visibility":"on"},{"color":"#83cead"}]},{"featureType":"road","elementType":"all","stylers":[{"visibility":"on"},{"color":"#ffffff"}]},{"featureType":"road","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"on"},{"color":"#fee379"}]},{"featureType":"road.arterial","elementType":"all","stylers":[{"visibility":"on"},{"color":"#fee379"}]},{"featureType":"water","elementType":"all","stylers":[{"visibility":"on"},{"color":"#7fc8ed"}]}]
};
// Get the HTML DOM element that will contain your map
// We are using a div with id="map" seen below in the <body>
var mapElement = document.getElementById('map-flat');
// Create the Google Map using our element and options defined above
var map = new google.maps.Map(mapElement, mapOptions);
var marker = new google.maps.Marker({position:myCenter});
marker.setMap(map);
}
})(jQuery);

1
assets/scripts/map.demo.min.js vendored Executable file

File diff suppressed because one or more lines are too long

4
assets/scripts/modernizr.min.js vendored Executable file

File diff suppressed because one or more lines are too long

196
assets/scripts/nouislider.init.js Executable file
View File

@ -0,0 +1,196 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: noUIslider
*/
(function($) {
"use strict";
var slider = {};
$(document).ready(function(){
if ($("#noui-connect").length) slider.connect();
if ($("#noui-html5").length) slider.html5();
if ($("#noui-slider1").length) slider.lock();
return false;
});
slider = {
connect : function(){
var connectSlider = document.getElementById('noui-connect');
noUiSlider.create(connectSlider, {
start: [20, 80],
connect: false,
range: {
'min': 0,
'max': 100
}
});
var connectBar = document.createElement('div'),
connectBase = connectSlider.querySelector('.noUi-base');
// Give the bar a class for styling and add it to the slider.
connectBar.className += 'connect';
connectBase.appendChild(connectBar);
connectSlider.noUiSlider.on('update', function( values, handle, a, b, handlePositions ) {
var offset = handlePositions[handle];
// Right offset is 100% - left offset
if ( handle === 1 ) {
offset = 100 - offset;
}
// Pick left for the first handle, right for the second.
connectBar.style[handle ? 'right' : 'left'] = offset + '%';
});
return false;
},
html5: function(){
var select = document.getElementById('noui-select');
// Append the option elements
for ( var i = -20; i <= 40; i++ ){
var option = document.createElement("option");
option.text = i;
option.value = i;
select.appendChild(option);
}
//Initializing the slider
var html5Slider = document.getElementById('noui-html5');
noUiSlider.create(html5Slider, {
start: [ 10, 30 ],
connect: true,
range: {
'min': -20,
'max': 40
}
});
//Linking the select and input
var inputNumber = document.getElementById('noui-input-number');
html5Slider.noUiSlider.on('update', function( values, handle ) {
var value = values[handle];
if ( handle ) {
inputNumber.value = value;
} else {
select.value = Math.round(value);
}
});
select.addEventListener('change', function(){
html5Slider.noUiSlider.set([this.value, null]);
});
inputNumber.addEventListener('change', function(){
html5Slider.noUiSlider.set([null, this.value]);
});
return false;
},
lock: function(){
// Store the locked state and slider values.
var lockedState = false,
lockedSlider = false,
lockedValues = [60, 80],
slider1 = document.getElementById('noui-slider1'),
slider2 = document.getElementById('noui-slider2'),
lockButton = document.getElementById('noui-lockbutton'),
slider1Value = document.getElementById('noui-slider1-span'),
slider2Value = document.getElementById('noui-slider2-span');
// When the button is clicked, the locked
// state is inverted.
lockButton.addEventListener('click', function(){
lockedState = !lockedState;
this.textContent = lockedState ? 'unlock' : 'lock';
});
noUiSlider.create(slider1, {
start: 60,
// Disable animation on value-setting,
// so the sliders respond immediately.
animate: false,
range: {
min: 50,
max: 100
}
});
noUiSlider.create(slider2, {
start: 80,
animate: false,
range: {
min: 50,
max: 100
}
});
slider1.noUiSlider.on('update', function( values, handle ){
slider1Value.innerHTML = values[handle];
});
slider2.noUiSlider.on('update', function( values, handle ){
slider2Value.innerHTML = values[handle];
});
slider1.noUiSlider.on('change', setLockedValues);
slider2.noUiSlider.on('change', setLockedValues);
// The value will be send to the other slider,
// using a custom function as the serialization
// method. The function uses the global 'lockedState'
// variable to decide whether the other slider is updated.
slider1.noUiSlider.on('slide', function( values, handle ){
crossUpdate(values[handle], slider2);
});
slider2.noUiSlider.on('slide', function( values, handle ){
crossUpdate(values[handle], slider1);
});
function crossUpdate ( value, slider ) {
// If the sliders aren't interlocked, don't
// cross-update.
if ( !lockedState ) return;
// Select whether to increase or decrease
// the other slider value.
var a = slider1 === slider ? 0 : 1, b = a ? 0 : 1;
// Offset the slider value.
value -= lockedValues[b] - lockedValues[a];
// Set the value
slider.noUiSlider.set(value);
return false;
}
function setLockedValues ( ) {
lockedValues = [
Number(slider1.noUiSlider.get()),
Number(slider2.noUiSlider.get())
];
return false;
}
return false;
}
}
})(jQuery);

1
assets/scripts/nouislider.init.min.js vendored Executable file
View File

@ -0,0 +1 @@
!function(e){"use strict";var t={};e(document).ready(function(){return e("#noui-connect").length&&t.connect(),e("#noui-html5").length&&t.html5(),e("#noui-slider1").length&&t.lock(),!1}),t={connect:function(){var e=document.getElementById("noui-connect");noUiSlider.create(e,{start:[20,80],connect:!1,range:{min:0,max:100}});var t=document.createElement("div"),a=e.querySelector(".noUi-base");return t.className+="connect",a.appendChild(t),e.noUiSlider.on("update",function(e,a,n,i,r){var o=r[a];1===a&&(o=100-o),t.style[a?"right":"left"]=o+"%"}),!1},html5:function(){for(var e=document.getElementById("noui-select"),t=-20;40>=t;t++){var a=document.createElement("option");a.text=t,a.value=t,e.appendChild(a)}var n=document.getElementById("noui-html5");noUiSlider.create(n,{start:[10,30],connect:!0,range:{min:-20,max:40}});var i=document.getElementById("noui-input-number");return n.noUiSlider.on("update",function(t,a){var n=t[a];a?i.value=n:e.value=Math.round(n)}),e.addEventListener("change",function(){n.noUiSlider.set([this.value,null])}),i.addEventListener("change",function(){n.noUiSlider.set([null,this.value])}),!1},lock:function(){function e(e,t){if(a){var r=i===t?0:1,o=r?0:1;return e-=n[o]-n[r],t.noUiSlider.set(e),!1}}function t(){return n=[Number(i.noUiSlider.get()),Number(r.noUiSlider.get())],!1}var a=!1,n=[60,80],i=document.getElementById("noui-slider1"),r=document.getElementById("noui-slider2"),o=document.getElementById("noui-lockbutton"),l=document.getElementById("noui-slider1-span"),s=document.getElementById("noui-slider2-span");return o.addEventListener("click",function(){a=!a,this.textContent=a?"unlock":"lock"}),noUiSlider.create(i,{start:60,animate:!1,range:{min:50,max:100}}),noUiSlider.create(r,{start:80,animate:!1,range:{min:50,max:100}}),i.noUiSlider.on("update",function(e,t){l.innerHTML=e[t]}),r.noUiSlider.on("update",function(e,t){s.innerHTML=e[t]}),i.noUiSlider.on("change",t),r.noUiSlider.on("change",t),i.noUiSlider.on("slide",function(t,a){e(t[a],r)}),r.noUiSlider.on("slide",function(t,a){e(t[a],i)}),!1}}}(jQuery);

5
assets/scripts/respond.min.js vendored Executable file
View File

@ -0,0 +1,5 @@
/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
* Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
* */
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();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))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmValue=t,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);

12
assets/scripts/rwd.demo.js Executable file
View File

@ -0,0 +1,12 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: RWD Table Demo
*/
(function($) {
"use strict";
$('.table-responsive').responsiveTable();
})(jQuery);

1
assets/scripts/rwd.demo.min.js vendored Executable file
View File

@ -0,0 +1 @@
!function(e){"use strict";e(".table-responsive").responsiveTable()}(jQuery);

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