added flask framework, tambah karyawan page, scan absensi,and tambah karyawan open cv

This commit is contained in:
Naufalakram committed 2023-11-07 04:17:14 +08:00
1 parent 7a6ce35ef2
commit 23aec5c980
3186 files changed
+665236 -44

No files matched your search

BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Vendored Executable
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+1
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);
+648
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
View File
@@ -0,0 +1 @@
!function(e){"use strict";var a={};e(document).ready(function(){return e("#area-chartist-chart").length&&a.area(),e("#bar-chartist-chart").length&&a.bar(),e("#bi-polar-area-chartist-chart").length&&a.biPolarArea(),e("#bi-polar-bar-chartist-chart").length&&a.biPolarBar(),e("#donut-bar-chartist-chart").length&&a.donut(),e("#donut-animation-bar-chartist-chart").length&&a.donutAnimation(),e("#gauge-bar-chartist-chart").length&&a.gauge(),e("#horizontal-bar-chartist-chart").length&&a.horizontalBar(),e("#line-chartist-chart").length&&a.line(),e("#pie-bar-chartist-chart").length&&a.pie(),e("#scatter-chartist-chart").length&&a.scatter(),e("#smil-animation-chartist-chart").length&&a.smilAnimation(),e("#smil-animation-index-chartist-chart").length&&a.smilAnimationIndex(),e("#stacked-bar-chartist-chart").length&&a.stackedBar(),e("#svg-animation-chartist-chart").length&&a.svgAnimation(),!1}),a={area:function(){return 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:!0,fullWidth:!0,axisY:{offset:10}}),!1},bar:function(){return 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]]},{stackBars:!0,axisX:{labelInterpolationFnc:function(e){return e.split(/\s+/).map(function(e){return e[0]}).join("")}},axisY:{offset:10}},[["screen and (min-width: 400px)",{reverseData:!0,horizontalBars:!0,axisX:{labelInterpolationFnc:Chartist.noop},axisY:{offset:20}}],["screen and (min-width: 800px)",{stackBars:!1,seriesBarDistance:10}],["screen and (min-width: 1000px)",{reverseData:!1,horizontalBars:!1,seriesBarDistance:15}]]),!1},biPolarArea:function(){return 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,.5,1,.5,-1,-2.5]]},{high:3,low:-3,showArea:!0,showLine:!1,showPoint:!1,fullWidth:!0,axisY:{offset:20},axisX:{showLabel:!1,showGrid:!1}}),!1},biPolarBar:function(){var e={labels:["W1","W2","W3","W4","W5","W6","W7","W8","W9","W10"],series:[[1,2,4,8,6,-2,-1,-4,-6,-2]]},a={high:10,low:-10,axisX:{labelInterpolationFnc:function(e,a){return a%2===0?e:null}},fullWidth:!0,axisY:{offset:10}};return new Chartist.Bar("#bi-polar-bar-chartist-chart",e,a),!1},donut:function(){var e={series:[20,10,30,40]},a=function(e,a){return e+a};return new Chartist.Pie("#donut-bar-chartist-chart",e,{labelInterpolationFnc:function(t){return Math.round(t/e.series.reduce(a)*100)+"%"},donut:!0,donutWidth:80,startAngle:270}),!1},donutAnimation:function(){var e=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:!0,showLabel:!1});return e.on("draw",function(e){if("slice"===e.type){var a=e.element._node.getTotalLength();e.element.attr({"stroke-dasharray":a+"px "+a+"px"});var t={"stroke-dashoffset":{id:"anim"+e.index,dur:1e3,from:-a+"px",to:"0px",easing:Chartist.Svg.Easing.easeOutQuint,fill:"freeze"}};0!==e.index&&(t["stroke-dashoffset"].begin="anim"+(e.index-1)+".end"),e.element.attr({"stroke-dashoffset":-a+"px"}),e.element.animate(t,!1)}}),e.on("created",function(){window.__anim21278907124&&(clearTimeout(window.__anim21278907124),window.__anim21278907124=null),window.__anim21278907124=setTimeout(e.update.bind(e),1e4)}),!1},gauge:function(){return new Chartist.Pie("#gauge-bar-chartist-chart",{series:[20,10,30,40]},{donut:!0,donutWidth:60,startAngle:270,total:200,showLabel:!1}),!1},horizontalBar:function(){return 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:!0,horizontalBars:!0,axisY:{offset:70}}),!1},line:function(){return 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:!0,axisY:{offset:10},chartPadding:{right:30}}),!1},pie:function(){var e={series:[5,3,4]},a=function(e,a){return e+a};return new Chartist.Pie("#pie-bar-chartist-chart",e,{labelInterpolationFnc:function(t){return Math.round(t/e.series.reduce(a)*100)+"%"}}),!1},scatter:function(){var e=function(e){return Array.apply(null,new Array(e))},a=e(52).map(Math.random).reduce(function(e,a,t){return e.labels.push(t+1),e.series.forEach(function(e){e.push(100*Math.random())}),e},{labels:[],series:e(4).map(function(){return new Array})}),t={showLine:!1,axisX:{labelInterpolationFnc:function(e,a){return a%13===0?"W"+e:null}},fullWidth:!0,axisY:{offset:20}},r=[["screen and (min-width: 640px)",{axisX:{labelInterpolationFnc:function(e,a){return a%4===0?"W"+e:null}}}]];return new Chartist.Line("#scatter-chartist-chart",a,t,r),!1},smilAnimation:function(){var e=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],Line truncated
+256
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
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
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
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);
+410
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
View File
@@ -0,0 +1 @@
!function(e){"use strict";var t={};e(document).ready(function(){return e("#3d-highcharts").length&&t.bar_3d(),e("#3dscatter-highcharts").length&&t.pie_3d(),e("#3d-highcharts").length&&t.scatter_3d(),e("#3dstacking-highcharts").length&&t.stacking_3d(),e("#random-highcharts").length&&t.random_data(),e("#click-highcharts").length&&t.click_data(),!1}),t={bar_3d:function(){new Highcharts.Chart({chart:{renderTo:"3d-highcharts",type:"column",options3d:{enabled:!0,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,176,135.6,148.5,216.4,194.1,95.6,54.4]}]});return!1},pie_3d:function(){return e("#3dpie-highcharts").highcharts({chart:{type:"pie",options3d:{enabled:!0,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:!0,cursor:"pointer",depth:35,dataLabels:{enabled:!0,format:"{point.name}"}}},series:[{type:"pie",name:"Browser share",data:[["Firefox",45],["IE",26.8],{name:"Chrome",y:12.8,sliced:!0,selected:!0},["Safari",8.5],["Opera",6.2],["Others",.7]]}]}),!1},scatter_3d:function(){Highcharts.getOptions().colors=e.map(Highcharts.getOptions().colors,function(e){return{radialGradient:{cx:.4,cy:.3,r:.5},stops:[[0,e],[1,Highcharts.Color(e).brighten(-.2).get("rgb")]]}});var t=new Highcharts.Chart({chart:{renderTo:"3dscatter-highcharts",margin:100,type:"scatter",options3d:{enabled:!0,alpha:10,beta:30,depth:250,viewDistance:5,fitToPlot:!1,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:!1},legend:{enabled:!1},series:[{name:"Reading",colorByPoint:!0,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]]}]});return e(t.container).on("mousedown.hc touchstart.hc",function(s){s=t.pointer.normalize(s);var n,i,o=s.pageX,a=s.pageY,r=t.options.chart.options3d.alpha,c=t.options.chart.options3d.beta,l=5;e(document).on({"mousemove.hc touchdrag.hc":function(e){i=c+(o-e.pageX)/l,t.options.chart.options3d.beta=i,n=r+(e.pageY-a)/l,t.options.chart.options3d.alpha=n,t.redraw(!1)},"mouseup touchend":function(){e(document).off(".hc")}})}),!1},stacking_3d:function(){return e("#3dstacking-highcharts").highcharts({chart:{type:"column",options3d:{enabled:!0,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:!1,min:0,title:{text:"Number of fruits"}},tooltip:{headerFormat:"<b>{point.key}</b><br>",pointFormat:'<span style="color:{series.color}">●</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"}]}),!1},random_data:function(){return Highcharts.setOptions({global:{useUTC:!1}}),e("#random-highcharts").highcharts({chart:{type:"spline",animation:Highcharts.svg,marginRight:10,events:{load:function(){var e=this.series[0];setInterval(function(){var t=(new Date).getTime(),s=Math.random();e.addPoint([t,s],!0,!0)},1e3)}}},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:!1},exporting:{enabled:!1},series:[{name:"Random data",data:function(){var e,t=[],s=(new Date).getTime();for(e=-19;e<=0;e+=1)t.push({x:s+1e3*e,y:Math.random()});return t}()}]}),!1},click_data:function(){return e("#click-highcharts").highcharts({chart:{type:"scatter",margin:[70,50,60,80],events:{click:function(e){var t=e.xAxis[0].value,s=e.yAxis[0].Line truncated
+264
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
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);
+96
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
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);
+61
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
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);
+12
View File
@@ -0,0 +1,12 @@
/**
* Theme: Ninja Admin Template
* Author: NinjaTeam
* Module/App: File Upload Demo
*/
(function($) {
"use strict";
$('.dropify').dropify();
})(jQuery);
+1
View File
@@ -0,0 +1 @@
!function(r){"use strict";r(".dropify").dropify()}(jQuery);
+245
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
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);
+56
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
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);
+189
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'
},
]
});
}
});
+85
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
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
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);
+125
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
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
View File
@@ -0,0 +1,12 @@
/*!
* Isotope PACKAGED v3.0.1
*
* Licensed GPLv3 for open source use
* or Isotope Commercial License for commercial use
*
* http://isotope.metafizzy.co
* Copyright 2016 Metafizzy
*/
!function(t,e){"use strict";"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,n){var o,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,n);o=void 0===o?l:o}),void 0!==o?o:t}function h(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new s(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return u(this,t,e)}return h(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var s=this._onceEvents&&this._onceEvents[t];o;){var r=s&&s[o];r&&(this.off(t,o),delete s[o]),o.apply(this,e),n+=r?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;h>e;e++){var i=u[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s.isBoxSizeOuter=r=200==t(o.width),i.removeChild(e)}}function s(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=n(e);if("none"==s.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==s.boxSizing,l=0;h>l;l++){var f=u[l],c=s[f],m=parseFloat(c);a[f]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,y=a.paddingTop+a.paddingBottom,g=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,I=a.borderTopWidth+a.borderBottomWidth,z=d&&r,x=t(s.width);x!==!1&&(a.width=x+(z?0:p+_));var S=t(s.height);return S!==!1&&(a.height=S+(z?0:y+I)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(y+I),a.outerWidth=a.width+g,a.outerHeight=a.height+v,a}}var r,a="undefined"==typeof console?e:function(t){console.error(t)},u=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],h=u.length,d=!1;return s}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e},i.makeArray=function(t){var e=[];if(Array.isArray(t))e=t;else if(t&&"number"==typeof t.length)for(vaLine truncated
return t=a?function(t){return t&&a(r(t))}:function(t){return t&&r(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},l._sort=function(){var t=this.options.sortBy;if(t){var e=[].concat.apply(t,this.sortHistory),i=a(e,this.options.sortAscending);this.filteredItems.sort(i),t!=this.sortHistory[0]&&this.sortHistory.unshift(t)}},l._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},l._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},l._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},l._manageStamp=function(t){this._mode()._manageStamp(t)},l._getContainerSize=function(){return this._mode()._getContainerSize()},l.needsResizeLayout=function(){return this._mode().needsResizeLayout()},l.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},l.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},l._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},l.insert=function(t){var e=this.addItems(t);if(e.length){var i,n,o=e.length;for(i=0;o>i;i++)n=e[i],this.element.appendChild(n.element);var s=this._filter(e).matches;for(i=0;o>i;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;o>i;i++)delete e[i].isLayoutInstant;this.reveal(s)}};var c=l.remove;return l.remove=function(t){t=o.makeArray(t);var e=this.getItems(t);c.call(this,t);for(var i=e&&e.length,n=0;i&&i>n;n++){var s=e[n];o.removeFrom(this.filteredItems,s)}},l.shuffle=function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];e.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},l._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var n=t.apply(this,e);return this.options.transitionDuration=i,n},l.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},d});
+80
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
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);
Vendored Executable
+4
View File
@@ -0,0 +1,4 @@
/*! jQuery v3.0.0 | (c) jQuery Foundation | jquery.org/license */
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.0.0",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:f.call(this)},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=r.isArray(d)))?(e?(e=!1,f=c&&r.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return a&&"[object Object]"===k.call(a)?(b=e(a))?(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n):!0:!1},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;d>f;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;return"string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a)?(d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e):void 0},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"===c||r.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\x00-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")Line truncated
return j.call(r(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},T=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function U(){this.expando=r.expando+U.uid++}U.uid=1,U.prototype={cache:function(a){var b=a[this.expando];return b||(b={},T(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){r.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(K)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var V=new U,W=new U,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Y=/[A-Z]/g;function Z(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Y,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:X.test(c)?JSON.parse(c):c}catch(e){}W.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return W.hasData(a)||V.hasData(a)},data:function(a,b,c){return W.access(a,b,c)},removeData:function(a,b){W.remove(a,b)},_data:function(a,b,c){return V.access(a,b,c)},_removeData:function(a,b){V.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=W.get(f),1===f.nodeType&&!V.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),Z(f,d,e[d])));V.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){W.set(this,a)}):S(this,function(b){var c;if(f&&void 0===b){if(c=W.get(f,a),void 0!==c)return c;if(c=Z(f,a),void 0!==c)return c}else this.each(function(){W.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=V.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var $=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,_=new RegExp("^(?:([+-])=|)("+$+")([a-z%]*)$","i"),aa=["Top","Right","Bottom","Left"],ba=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},ca=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function da(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&_.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var ea={};function fa(a){var b,c=a.ownerDocument,d=a.nodeName,e=ea[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),ea[d]=e,e)}function ga(a,b){for(var c,d,e=[],f=0,g=a.length;g>f;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=V.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&ba(d)&&(e[f]=fa(d))):"none"!==c&&(e[f]="none",V.set(d,"display",c)));for(f=0;g>f;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}r.fn.extend({show:function(){return ga(this,!0)},hide:function(){return ga(this)},toggle:function(a){return"boolean"==typeof a?Line truncated
}}),hb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ib[b]||r.find.attr;ib[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=ib[g],ib[g]=e,e=null!=c(a,b,d)?g:null,ib[g]=f),e}});var jb=/^(?:input|select|textarea|button)$/i,kb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):jb.test(a.nodeName)||kb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});var lb=/[\t\r\n\f]/g;function mb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,mb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,mb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,mb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=mb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(c)+" ").replace(lb," ").indexOf(b)>-1)return!0;return!1}});var nb=/\r/g,ob=/[\x20\t\r\n\f]+/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(nb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:r.trim(r.text(a)).replace(ob," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&!c.disabled&&(!c.parentNode.disabled||!r.nodeName(c.parentNode,"optgroup"))){if(b=r(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){return r.isArray(b)?a.checked=r.inArray(r(a).val(),b)>-1:void 0}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?Line truncated
+7
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
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
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
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);
Vendored Executable
+1
View File
@@ -0,0 +1 @@
!function(e){"use strict";var t={};NProgress.start(),e(document).ready(function(){return t.module.init(),t.plugin.init(),e('[data-toggle="tooltip"]').length&&e('[data-toggle="tooltip"]').tooltip(),!1}),e(window).bind("load",function(){return t.plugin.isotope.init(),t.func.resizeNotice(),NProgress.done(),!1}),e(window).on("resize",function(){return t.func.resizeNotice(),t.func.getChart(),!1}),e(".js__full_screen").on("click",function(){e(document).fullScreen(!0)}),t.module={init:function(){return t.module.accordion(),t.module.card(),t.module.css(e(".js__width"),"width"),t.module.dropDown("js__drop_down",!1),t.module.logout(),t.module.menu(),t.module.tab(".js__tab","li"),t.module.toggle(),t.module.todo(),!1},accordion:function(){return e(".js__accordion").each(function(){var t=e(this);t.find(".js__control").on("click",function(o){if(o.preventDefault(),e(this).parent().hasClass("active"))e(this).parent().removeClass("active"),e(this).next().stop().slideUp(400);else{var r=e(this);t.find(".active").children(".js__content").stop().slideUp(400),t.find(".active").removeClass("active"),e(this).parent().addClass("active"),e(this).next(".js__content").slideDown(400,function(){t.parents(".main-menu").length&&e(".main-menu .content").mCustomScrollbar("scrollTo",r,{timeout:0,scrollInertia:200})})}})}),!1},card:function(){return e(".js__card").each(function(){var t=e(this);t.on("click",".js__card_minus",function(){t.toggleClass("card-closed"),t.find(".js__card_content").stop().slideToggle(400)}),t.on("click",".js__card_remove",function(){t.slideUp(400)})}),!1},css:function(t,o,r){return r||(r=o),t.each(function(){var t=e(this).data(r);if(t){var a={};a[o]=t,e(this).css(a)}}),!1},dropDown:function(t,o){var r=e("."+t);return r.each(function(){var t=e(this);t.on("click",".js__drop_down_button",function(a){return a.preventDefault(),(e(window).width()<1025||0==o)&&(t.hasClass("active")?t.removeClass("active"):(r.removeClass("active"),t.addClass("active"))),!1})}),e("html").on("click",function(o){var r=e(o.target);r.hasClass(t)||r.parents("."+t).length||e("."+t+".active").removeClass("active")}),!1},logout:function(){e(".js__logout").on("click",function(e){return e.preventDefault(),swal({title:"Logout?",text:"Are you sure you want to logout?",type:"warning",showCancelButton:!0,confirmButtonColor:"#DD6B55",confirmButtonText:"Yes, I'm out!",cancelButtonText:"No, stay plx!",closeOnConfirm:!1,closeOnCancel:!0,confirmButtonColor:"#f60e0e"},function(e){e&&swal({title:"Logout success",text:"See you later!",type:"success",confirmButtonColor:"#304ffe"})}),!1})},menu:function(){return e(".js__menu_mobile").on("click",function(){e("html").toggleClass("menu-active"),e(window).trigger("resize")}),e(".js__menu_close").on("click",function(){e("html").removeClass("menu-active")}),e("body").on("click",function(t){if(e("html.menu-active").length&&e(window).width()<800){var o=e(t.target);o.hasClass("main-menu")||o.hasClass("js__menu_mobile")||o.parents(".main-menu").length||o.parents(".js__menu_mobile").length||e("html").removeClass("menu-active")}}),!1},tab:function(t,o){return e(".js__tab").each(function(){var t=e(this);t.on("click",".js__tab_control",function(r){var a=e(this).data("target");if(r.preventDefault(),t.find(".js__tab_content").removeClass("js__active"),t.find(".js__tab_control").removeClass("js__active"),e(this).addClass("js__active"),a)e(a).addClass("js__active");else{var n;n=o?e(this).parents(o).first().index():e(this).index(),t.find(".js__tab_content").eq(n).addClass("js__active")}return!1})}),!1},todo:function(){return e(".js__todo_widget").each(function(){var t=(e(this),e(this).find(".js__todo_list")),o=e(this).find(".js__todo_value"),r=e(this).find(".js__todo_button");r.on("click",function(){if(""!=o.val()){var e=Math.floor(1e8*Math.random()+1);t.append('<div class="todo-item"><div class="checkbox"><input type="checkbox" id="todo-'+e+'"><label for="todo-'+e+'">'+o.val()+"</label></div></div>"),o.val("")}else alert("You must enter task name.");return!1})}),!1},toggle:function(){return e(".js__toggle_open").on("click",function(t){return t.preventDefault(),e(e(this).data("target")).hasClass("active")||e(".js__toggle").removeClass("active"),e(e(this).data("target")).toggleClass("active"),!1}),e(".js__toggle_close").on("click",function(t){return t.preventDefault(),e(this).parents(".js__toggle").removeClass("active"),!1}),e("body").on("click",function(t){if(e(".js__toggle").hasClass("active")){var o=e(t.target);o.hasClass("js__toggle_open")||o.hasClass("js__toggle")||o.parents(".js__toggle_open").length||o.parents(".js__toggle").length||e(".js__toggle").removeClass("active")}}),!1}},t.func={childReturnWidth:function(o,r){if(o.children("li").children(".sub-menu").length){var a=0;return o.children("li").children(".sub-menu").each(function(){var o=t.func.childReturnWidth(e(this),r+e(this).outerWidth());o>a&&(a=o)}),a}return r},getResponsiveSettings:function(t){var o=t.data("responsive"),r=[];if(o){for(;o.indexOf("'")>-1;)o=o.replace("Line truncated
+381
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
View File
@@ -0,0 +1 @@
!function(e){"use strict";if(e("#map-default").length)var o=document.getElementById("map-default"),a={center:new google.maps.LatLng(51.508742,-.12085),zoom:5},t=new google.maps.Map(o,a);if(e("#map-marker").length){var o=document.getElementById("map-marker"),a={center:new google.maps.LatLng(51.508742,-.12085),zoom:5},g=new google.maps.Marker({position:new google.maps.LatLng(51.508742,-.12085),animation:google.maps.Animation.BOUNCE}),t=new google.maps.Map(o,a);g.setMap(t)}if(e("#map-poly").length){var n=new google.maps.LatLng(58.983991,5.734863),l=new google.maps.LatLng(52.395715,4.888916),p=new google.maps.LatLng(51.508742,-.12085),o=document.getElementById("map-poly"),a={center:l,zoom:4},t=new google.maps.Map(o,a),m=new google.maps.Polyline({path:[n,l,p],strokeColor:"#0000FF",strokeOpacity:.8,strokeWeight:2});m.setMap(t)}if(e("#map-polygon").length){var n=new google.maps.LatLng(58.983991,5.734863),l=new google.maps.LatLng(52.395715,4.888916),p=new google.maps.LatLng(51.508742,-.12085),o=document.getElementById("map-polygon"),a={center:l,zoom:4},t=new google.maps.Map(o,a),m=new google.maps.Polygon({path:[n,l,p],strokeColor:"#0000FF",strokeOpacity:.8,strokeWeight:2,fillColor:"#0000FF",fillOpacity:.4});m.setMap(t)}if(e("#map-circle").length){var l=new google.maps.LatLng(52.395715,4.888916),o=document.getElementById("map-circle"),a={center:l,zoom:7},t=new google.maps.Map(o,a),s=new google.maps.Circle({center:l,radius:5e4,strokeColor:"#0000FF",strokeOpacity:.8,strokeWeight:2,fillColor:"#0000FF",fillOpacity:.4});s.setMap(t)}if(e("#map-info").length){var r=new google.maps.LatLng(51.508742,-.12085),o=document.getElementById("map-info"),a={center:r,zoom:5},t=new google.maps.Map(o,a),g=new google.maps.Marker({position:r});g.setMap(t);var i=new google.maps.InfoWindow({content:"Hello World!"});i.open(t,g)}if(e("#map-hybrid").length)var o=document.getElementById("map-hybrid"),a={center:new google.maps.LatLng(51.508742,-.12085),zoom:5,mapTypeId:google.maps.MapTypeId.HYBRID},t=new google.maps.Map(o,a);if(e("#map-45").length)var o=document.getElementById("map-45"),a={center:new google.maps.LatLng(45.434046,12.340284),zoom:18,mapTypeId:google.maps.MapTypeId.HYBRID},t=new google.maps.Map(o,a);if(e("#map-light-dream").length){var r=new google.maps.LatLng(40.67,-73.94),a={zoom:11,center:new google.maps.LatLng(40.67,-73.94),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}]}]},y=document.getElementById("map-light-dream"),t=new google.maps.Map(y,a),g=new google.maps.Marker({position:r});g.setMap(t)}if(e("#map-blue-essence").length){var r=new google.maps.LatLng(40.67,-73.94),a={zoom:11,center:new google.maps.LatLng(40.67,-73.94),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"}]}]},y=document.getElementById("map-blue-essence"),t=new google.maps.Map(y,a),g=new google.maps.Marker({position:r});g.setMap(t)}if(e("#map-midnight-commander").length){var r=new google.maps.LatLng(40.67,-73.94),a={zoom:11,center:new google.maps.LatLng(40.67,-73.94),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",Line truncated
+4
View File
@@ -0,0 +1,4 @@
/* Modernizr 2.8.3 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-shiv-mq-cssclasses-teststyles-load
*/
;window.Modernizr=function(a,b,c){function w(a){j.cssText=a}function x(a,b){return w(prefixes.join(a+";")+(b||""))}function y(a,b){return typeof a===b}function z(a,b){return!!~(""+a).indexOf(b)}function A(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:y(f,"function")?f.bind(d||b):f}return!1}var d="2.8.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m={},n={},o={},p=[],q=p.slice,r,s=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},t=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b)&&c(b).matches||!1;var d;return s("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},u={}.hasOwnProperty,v;!y(u,"undefined")&&!y(u.call,"undefined")?v=function(a,b){return u.call(a,b)}:v=function(a,b){return b in a&&y(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=q.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(q.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(q.call(arguments)))};return e});for(var B in m)v(m,B)&&(r=B.toLowerCase(),e[r]=m[B](),p.push((e[r]?"":"no-")+r));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)v(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},w(""),i=k=null,function(a,b){function l(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 m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function q(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?o(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function r(a){a||(a=b);var c=n(a);return s.shivCSS&&!g&&!c.hasCSS&&(c.hasCSS=!!l(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||q(a,c),a}var c="3.7.0",d=a.html5||{},e=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?: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,g,h="_html5shiv",i=0,j={},k;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e.mq=t,e.testStyles=s,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+p.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=oLine truncated
+196
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
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
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
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
View File
@@ -0,0 +1 @@
!function(e){"use strict";e(".table-responsive").responsiveTable()}(jQuery);
Loaded 100 of 3186 files, more files were not shown because too many files have changed in this diff. Show more