copy dari repo om Irfan

This commit is contained in:
2026-06-13 16:02:07 +10:00
commit db327c0305
5376 changed files with 2770667 additions and 0 deletions
@@ -0,0 +1,403 @@
(function( $ ) {
'use strict';
/*
Sales Selector
*/
$('#salesSelector').themePluginMultiSelect().on('change', function() {
var rel = $(this).val();
$('#salesSelectorItems .chart').removeClass('chart-active').addClass('chart-hidden');
$('#salesSelectorItems .chart[data-sales-rel="' + rel + '"]').addClass('chart-active').removeClass('chart-hidden');
});
$('#salesSelector').trigger('change');
$('#salesSelectorWrapper').addClass('ready');
/*
Flot: Sales 1
*/
var flotDashSales1 = $.plot('#flotDashSales1', flotDashSales1Data, {
series: {
lines: {
show: true,
lineWidth: 2
},
points: {
show: true
},
shadowSize: 0
},
grid: {
hoverable: true,
clickable: true,
borderColor: 'rgba(0,0,0,0.1)',
borderWidth: 1,
labelMargin: 15,
backgroundColor: 'transparent'
},
yaxis: {
min: 0,
color: 'rgba(0,0,0,0.1)'
},
xaxis: {
mode: 'categories',
color: 'rgba(0,0,0,0)'
},
legend: {
show: false
},
tooltip: true,
tooltipOpts: {
content: '%x: %y',
shifts: {
x: -30,
y: 25
},
defaultTheme: false
}
});
/*
Flot: Sales 2
*/
var flotDashSales2 = $.plot('#flotDashSales2', flotDashSales2Data, {
series: {
lines: {
show: true,
lineWidth: 2
},
points: {
show: true
},
shadowSize: 0
},
grid: {
hoverable: true,
clickable: true,
borderColor: 'rgba(0,0,0,0.1)',
borderWidth: 1,
labelMargin: 15,
backgroundColor: 'transparent'
},
yaxis: {
min: 0,
color: 'rgba(0,0,0,0.1)'
},
xaxis: {
mode: 'categories',
color: 'rgba(0,0,0,0)'
},
legend: {
show: false
},
tooltip: true,
tooltipOpts: {
content: '%x: %y',
shifts: {
x: -30,
y: 25
},
defaultTheme: false
}
});
/*
Flot: Sales 3
*/
var flotDashSales3 = $.plot('#flotDashSales3', flotDashSales3Data, {
series: {
lines: {
show: true,
lineWidth: 2
},
points: {
show: true
},
shadowSize: 0
},
grid: {
hoverable: true,
clickable: true,
borderColor: 'rgba(0,0,0,0.1)',
borderWidth: 1,
labelMargin: 15,
backgroundColor: 'transparent'
},
yaxis: {
min: 0,
color: 'rgba(0,0,0,0.1)'
},
xaxis: {
mode: 'categories',
color: 'rgba(0,0,0,0)'
},
legend: {
show: false
},
tooltip: true,
tooltipOpts: {
content: '%x: %y',
shifts: {
x: -30,
y: 25
},
defaultTheme: false
}
});
/*
Flot: Sales 4
*/
var flotDashSales4 = $.plot('#flotDashSales4', flotDashSales4Data, {
series: {
lines: {
show: true,
lineWidth: 2
},
points: {
show: true
},
shadowSize: 0
},
grid: {
hoverable: true,
clickable: true,
borderColor: 'rgba(0,0,0,0.1)',
borderWidth: 1,
labelMargin: 15,
backgroundColor: 'transparent'
},
yaxis: {
min: 0,
color: 'rgba(0,0,0,0.1)'
},
xaxis: {
mode: 'categories',
color: 'rgba(0,0,0,0)'
},
legend: {
show: false
},
tooltip: true,
tooltipOpts: {
content: '%x: %y',
shifts: {
x: -30,
y: 25
},
defaultTheme: false
}
});
/*
Liquid Meter
*/
$('#meterSales').liquidMeter({
shape: 'circle',
color: '#0088cc',
background: '#F9F9F9',
fontSize: '24px',
fontWeight: '600',
stroke: '#F2F2F2',
textColor: '#333',
liquidOpacity: 0.9,
liquidPalette: ['#333'],
speed: 3000,
animate: !$.browser.mobile
});
$('#meterSalesSel a').on('click', function( ev ) {
ev.preventDefault();
var val = $(this).data("val"),
selector = $(this).parent(),
items = selector.find('a');
items.removeClass('active');
$(this).addClass('active');
// Update Meter Value
$('#meterSales').liquidMeter('set', val);
});
/*
Flot: Basic
*/
var flotDashBasic = $.plot('#flotDashBasic', flotDashBasicData, {
series: {
lines: {
show: true,
fill: true,
lineWidth: 1,
fillColor: {
colors: [{
opacity: 0.45
}, {
opacity: 0.45
}]
}
},
points: {
show: true
},
shadowSize: 0
},
grid: {
hoverable: true,
clickable: true,
borderColor: 'rgba(0,0,0,0.1)',
borderWidth: 1,
labelMargin: 15,
backgroundColor: 'transparent'
},
yaxis: {
min: 0,
max: 200,
color: 'rgba(0,0,0,0.1)'
},
xaxis: {
color: 'rgba(0,0,0,0)'
},
tooltip: true,
tooltipOpts: {
content: '%s: Value of %x is %y',
shifts: {
x: -60,
y: 25
},
defaultTheme: false
}
});
/*
Flot: Real-Time
*/
(function() {
var data = [],
totalPoints = 300;
function getRandomData() {
if (data.length > 0)
data = data.slice(1);
// Do a random walk
while (data.length < totalPoints) {
var prev = data.length > 0 ? data[data.length - 1] : 50,
y = prev + Math.random() * 10 - 5;
if (y < 0) {
y = 0;
} else if (y > 100) {
y = 100;
}
data.push(y);
}
// Zip the generated y values with the x values
var res = [];
for (var i = 0; i < data.length; ++i) {
res.push([i, data[i]])
}
return res;
}
var flotDashRealTime = $.plot('#flotDashRealTime', [getRandomData()], {
colors: ['#8CC9E8'],
series: {
lines: {
show: true,
fill: true,
lineWidth: 1,
fillColor: {
colors: [{
opacity: 0.45
}, {
opacity: 0.45
}]
}
},
points: {
show: false
},
shadowSize: 0
},
grid: {
borderColor: 'rgba(0,0,0,0.1)',
borderWidth: 1,
labelMargin: 15,
backgroundColor: 'transparent'
},
yaxis: {
min: 0,
max: 100,
color: 'rgba(0,0,0,0.1)'
},
xaxis: {
show: false
}
});
function update() {
flotDashRealTime.setData([getRandomData()]);
// Since the axes don't change, we don't need to call plot.setupGrid()
flotDashRealTime.draw();
setTimeout(update, ($('html').hasClass( 'mobile-device' ) ? 1000 : 30) );
}
update();
})();
/*
Sparkline: Bar
*/
var sparklineBarDashOptions = {
type: 'bar',
width: '80',
height: '55',
barColor: '#0088cc',
negBarColor: '#B20000'
};
$("#sparklineBarDash").sparkline(sparklineBarDashData, sparklineBarDashOptions);
/*
Sparkline: Line
*/
var sparklineLineDashOptions = {
type: 'line',
width: '80',
height: '55',
lineColor: '#0088cc'
};
$("#sparklineLineDash").sparkline(sparklineLineDashData, sparklineLineDashOptions);
/*
Map
*/
var vectorMapDashOptions = {
map: 'world_en',
backgroundColor: null,
color: '#FFFFFF',
hoverOpacity: 0.7,
selectedColor: '#005599',
enableZoom: true,
borderWidth:1,
showTooltip: true,
values: sample_data,
scaleColors: ['#0088cc'],
normalizeFunction: 'polynomial'
};
$('#vectorMapWorld').vectorMap(vectorMapDashOptions);
}).apply( this, [ jQuery ]);
@@ -0,0 +1,60 @@
(function($) {
/*
Multi Select: Toggle All Button
*/
function multiselect_selected($el) {
var ret = true;
$('option', $el).each(function(element) {
if (!!!$(this).prop('selected')) {
ret = false;
}
});
return ret;
}
function multiselect_selectAll($el) {
$('option', $el).each(function(element) {
$el.multiselect('select', $(this).val());
});
}
function multiselect_deselectAll($el) {
$('option', $el).each(function(element) {
$el.multiselect('deselect', $(this).val());
});
}
function multiselect_toggle($el, $btn) {
if (multiselect_selected($el)) {
multiselect_deselectAll($el);
$btn.text("Select All");
} else {
multiselect_selectAll($el);
$btn.text("Deselect All");
}
}
$("#ms_example7-toggle").click(function(e) {
e.preventDefault();
multiselect_toggle($("#ms_example7"), $(this));
});
/*
Slider Range: Output Values
*/
$('#listenSlider').change(function() {
$('.output b').text(this.value);
});
$('#listenSlider2').change(function() {
var min = parseInt(this.value.split('/')[0], 10);
var max = parseInt(this.value.split('/')[1], 10);
$('.output2 b.min').text(min);
$('.output2 b.max').text(max);
});
}(jQuery));
@@ -0,0 +1,45 @@
(function() {
'use strict';
// basic
$("#form").validate({
highlight: function( label ) {
$(label).closest('.form-group').removeClass('has-success').addClass('has-error');
},
success: function( label ) {
$(label).closest('.form-group').removeClass('has-error');
label.remove();
},
errorPlacement: function( error, element ) {
var placement = element.closest('.input-group');
if (!placement.get(0)) {
placement = element;
}
if (error.text() !== '') {
placement.after(error);
}
}
});
// validation summary
var $summaryForm = $("#summary-form");
$summaryForm.validate({
errorContainer: $summaryForm.find( 'div.validation-message' ),
errorLabelContainer: $summaryForm.find( 'div.validation-message ul' ),
wrapper: "li"
});
// checkbox, radio and selects
$("#chk-radios-form, #selects-form").each(function() {
$(this).validate({
highlight: function(element) {
$(element).closest('.form-group').removeClass('has-success').addClass('has-error');
},
success: function(element) {
$(element).closest('.form-group').removeClass('has-error');
}
});
});
}).apply( this, [ jQuery ]);
+319
View File
@@ -0,0 +1,319 @@
(function( $ ) {
'use strict';
/*
Wizard #1
*/
var $w1finish = $('#w1').find('ul.pager li.finish'),
$w1validator = $("#w1 form").validate({
highlight: function(element) {
$(element).closest('.form-group').removeClass('has-success').addClass('has-error');
},
success: function(element) {
$(element).closest('.form-group').removeClass('has-error');
$(element).remove();
},
errorPlacement: function( error, element ) {
element.parent().append( error );
}
});
$w1finish.on('click', function( ev ) {
ev.preventDefault();
var validated = $('#w1 form').valid();
if ( validated ) {
new PNotify({
title: 'Congratulations',
text: 'You completed the wizard form.',
type: 'custom',
addclass: 'notification-success',
icon: 'fa fa-check'
});
}
});
$('#w1').bootstrapWizard({
tabClass: 'wizard-steps',
nextSelector: 'ul.pager li.next',
previousSelector: 'ul.pager li.previous',
firstSelector: null,
lastSelector: null,
onNext: function( tab, navigation, index, newindex ) {
var validated = $('#w1 form').valid();
if( !validated ) {
$w1validator.focusInvalid();
return false;
}
},
onTabClick: function( tab, navigation, index, newindex ) {
if ( newindex == index + 1 ) {
return this.onNext( tab, navigation, index, newindex);
} else if ( newindex > index + 1 ) {
return false;
} else {
return true;
}
},
onTabChange: function( tab, navigation, index, newindex ) {
var totalTabs = navigation.find('li').size() - 1;
$w1finish[ newindex != totalTabs ? 'addClass' : 'removeClass' ]( 'hidden' );
$('#w1').find(this.nextSelector)[ newindex == totalTabs ? 'addClass' : 'removeClass' ]( 'hidden' );
}
});
/*
Wizard #2
*/
var $w2finish = $('#w2').find('ul.pager li.finish'),
$w2validator = $("#w2 form").validate({
highlight: function(element) {
$(element).closest('.form-group').removeClass('has-success').addClass('has-error');
},
success: function(element) {
$(element).closest('.form-group').removeClass('has-error');
$(element).remove();
},
errorPlacement: function( error, element ) {
element.parent().append( error );
}
});
$w2finish.on('click', function( ev ) {
ev.preventDefault();
var validated = $('#w2 form').valid();
if ( validated ) {
new PNotify({
title: 'Congratulations',
text: 'You completed the wizard form.',
type: 'custom',
addclass: 'notification-success',
icon: 'fa fa-check'
});
}
});
$('#w2').bootstrapWizard({
tabClass: 'wizard-steps',
nextSelector: 'ul.pager li.next',
previousSelector: 'ul.pager li.previous',
firstSelector: null,
lastSelector: null,
onNext: function( tab, navigation, index, newindex ) {
var validated = $('#w2 form').valid();
if( !validated ) {
$w2validator.focusInvalid();
return false;
}
},
onTabClick: function( tab, navigation, index, newindex ) {
if ( newindex == index + 1 ) {
return this.onNext( tab, navigation, index, newindex);
} else if ( newindex > index + 1 ) {
return false;
} else {
return true;
}
},
onTabChange: function( tab, navigation, index, newindex ) {
var totalTabs = navigation.find('li').size() - 1;
$w2finish[ newindex != totalTabs ? 'addClass' : 'removeClass' ]( 'hidden' );
$('#w2').find(this.nextSelector)[ newindex == totalTabs ? 'addClass' : 'removeClass' ]( 'hidden' );
}
});
/*
Wizard #3
*/
var $w3finish = $('#w3').find('ul.pager li.finish'),
$w3validator = $("#w3 form").validate({
highlight: function(element) {
$(element).closest('.form-group').removeClass('has-success').addClass('has-error');
},
success: function(element) {
$(element).closest('.form-group').removeClass('has-error');
$(element).remove();
},
errorPlacement: function( error, element ) {
element.parent().append( error );
}
});
$w3finish.on('click', function( ev ) {
ev.preventDefault();
var validated = $('#w3 form').valid();
if ( validated ) {
new PNotify({
title: 'Congratulations',
text: 'You completed the wizard form.',
type: 'custom',
addclass: 'notification-success',
icon: 'fa fa-check'
});
}
});
$('#w3').bootstrapWizard({
tabClass: 'wizard-steps',
nextSelector: 'ul.pager li.next',
previousSelector: 'ul.pager li.previous',
firstSelector: null,
lastSelector: null,
onNext: function( tab, navigation, index, newindex ) {
var validated = $('#w3 form').valid();
if( !validated ) {
$w3validator.focusInvalid();
return false;
}
},
onTabClick: function( tab, navigation, index, newindex ) {
if ( newindex == index + 1 ) {
return this.onNext( tab, navigation, index, newindex);
} else if ( newindex > index + 1 ) {
return false;
} else {
return true;
}
},
onTabChange: function( tab, navigation, index, newindex ) {
var $total = navigation.find('li').size() - 1;
$w3finish[ newindex != $total ? 'addClass' : 'removeClass' ]( 'hidden' );
$('#w3').find(this.nextSelector)[ newindex == $total ? 'addClass' : 'removeClass' ]( 'hidden' );
},
onTabShow: function( tab, navigation, index ) {
var $total = navigation.find('li').length - 1;
var $current = index;
var $percent = Math.floor(( $current / $total ) * 100);
$('#w3').find('.progress-indicator').css({ 'width': $percent + '%' });
tab.prevAll().addClass('completed');
tab.nextAll().removeClass('completed');
}
});
/*
Wizard #4
*/
var $w4finish = $('#w4').find('ul.pager li.finish'),
$w4validator = $("#w4 form").validate({
highlight: function(element) {
$(element).closest('.form-group').removeClass('has-success').addClass('has-error');
},
success: function(element) {
$(element).closest('.form-group').removeClass('has-error');
$(element).remove();
},
errorPlacement: function( error, element ) {
element.parent().append( error );
}
});
$w4finish.on('click', function( ev ) {
ev.preventDefault();
var validated = $('#w4 form').valid();
if ( validated ) {
new PNotify({
title: 'Congratulations',
text: 'You completed the wizard form.',
type: 'custom',
addclass: 'notification-success',
icon: 'fa fa-check'
});
}
});
$('#w4').bootstrapWizard({
tabClass: 'wizard-steps',
nextSelector: 'ul.pager li.next',
previousSelector: 'ul.pager li.previous',
firstSelector: null,
lastSelector: null,
onNext: function( tab, navigation, index, newindex ) {
var validated = $('#w4 form').valid();
if( !validated ) {
$w4validator.focusInvalid();
return false;
}
},
onTabClick: function( tab, navigation, index, newindex ) {
if ( newindex == index + 1 ) {
return this.onNext( tab, navigation, index, newindex);
} else if ( newindex > index + 1 ) {
return false;
} else {
return true;
}
},
onTabChange: function( tab, navigation, index, newindex ) {
var $total = navigation.find('li').size() - 1;
$w4finish[ newindex != $total ? 'addClass' : 'removeClass' ]( 'hidden' );
$('#w4').find(this.nextSelector)[ newindex == $total ? 'addClass' : 'removeClass' ]( 'hidden' );
},
onTabShow: function( tab, navigation, index ) {
var $total = navigation.find('li').length - 1;
var $current = index;
var $percent = Math.floor(( $current / $total ) * 100);
$('#w4').find('.progress-indicator').css({ 'width': $percent + '%' });
tab.prevAll().addClass('completed');
tab.nextAll().removeClass('completed');
}
});
/*
Wizard #5
*/
var $w5finish = $('#w5').find('ul.pager li.finish'),
$w5validator = $("#w5 form").validate({
highlight: function(element) {
$(element).closest('.form-group').removeClass('has-success').addClass('has-error');
},
success: function(element) {
$(element).closest('.form-group').removeClass('has-error');
$(element).remove();
},
errorPlacement: function( error, element ) {
element.parent().append( error );
}
});
$w5finish.on('click', function( ev ) {
ev.preventDefault();
var validated = $('#w5 form').valid();
if ( validated ) {
new PNotify({
title: 'Congratulations',
text: 'You completed the wizard form.',
type: 'custom',
addclass: 'notification-success',
icon: 'fa fa-check'
});
}
});
$('#w5').bootstrapWizard({
tabClass: 'wizard-steps',
nextSelector: 'ul.pager li.next',
previousSelector: 'ul.pager li.previous',
firstSelector: null,
lastSelector: null,
onNext: function( tab, navigation, index, newindex ) {
var validated = $('#w5 form').valid();
if( !validated ) {
$w5validator.focusInvalid();
return false;
}
},
onTabChange: function( tab, navigation, index, newindex ) {
var $total = navigation.find('li').size() - 1;
$w5finish[ newindex != $total ? 'addClass' : 'removeClass' ]( 'hidden' );
$('#w5').find(this.nextSelector)[ newindex == $total ? 'addClass' : 'removeClass' ]( 'hidden' );
},
onTabShow: function( tab, navigation, index ) {
var $total = navigation.find('li').length;
var $current = index + 1;
var $percent = ( $current / $total ) * 100;
$('#w5').find('.progress-bar').css({ 'width': $percent + '%' });
}
});
}).apply( this, [ jQuery ]);
+107
View File
@@ -0,0 +1,107 @@
(function( $ ) {
'use strict';
var initBasic = function() {
new GMaps({
div: '#gmap-basic',
lat: -12.043333,
lng: -77.028333
});
};
var initBasicWithMarkers = function() {
var map = new GMaps({
div: '#gmap-basic-marker',
lat: -12.043333,
lng: -77.028333,
markers: [{
lat: -12.043333,
lng: -77.028333,
infoWindow: {
content: '<p>Basic</p>'
}
}]
});
map.addMarker({
lat: -12.043333,
lng: -77.028333,
infoWindow: {
content: '<p>Example</p>'
}
});
};
var initStatic = function() {
var url = GMaps.staticMapURL({
size: [725, 500],
lat: -12.043333,
lng: -77.028333,
scale: 1
});
$('#gmap-static')
.css({
backgroundImage: 'url(' + url + ')',
backgroundSize: 'cover'
});
};
var initContextMenu = function() {
var map = new GMaps({
div: '#gmap-context-menu',
lat: -12.043333,
lng: -77.028333
});
map.setContextMenu({
control: 'map',
options: [
{
title: 'Add marker',
name: 'add_marker',
action: function(e) {
this.addMarker({
lat: e.latLng.lat(),
lng: e.latLng.lng(),
title: 'New marker'
});
}
},
{
title: 'Center here',
name: 'center_here',
action: function(e) {
this.setCenter(e.latLng.lat(), e.latLng.lng());
}
}
]
});
};
var initStreetView = function() {
var gmap = GMaps.createPanorama({
el: '#gmap-street-view',
lat : 48.85844,
lng : 2.294514
});
$(window).on( 'sidebar-left-toggle', function() {
google.maps.event.trigger( gmap, 'resize' );
});
};
// auto initialize
$(function() {
initBasic();
initBasicWithMarkers();
initStatic();
initContextMenu();
initStreetView();
});
}).apply(this, [ jQuery ]);
@@ -0,0 +1,38 @@
(function( $ ) {
'use strict';
var $window = $(window);
/* Fix Map size on Mobile */
function fixMapListener() {
fixMapSize();
$(window).on('load resize orientationchange', function() {
fixMapSize();
});
}
function fixMapSize() {
if ( $window.width() <= 767 ) {
var windowHeight = $(window).height(),
offsetTop = $('#gmap').offset().top,
contentPadding = parseInt($('.content-body').css('padding-bottom'), 10);
$('#gmap').height( windowHeight - offsetTop - contentPadding );
}
}
// auto initialize
$(function() {
fixMapListener();
});
}).apply(this, [ jQuery ]);
@@ -0,0 +1,31 @@
(function( $ ) {
'use strict';
var initMap = function( $el, options ) {
var defaults = {
backgroundColor: null,
color: '#FFFFFF',
hoverOpacity: 0.7,
selectedColor: '#005599',
enableZoom: true,
borderWidth:1,
showTooltip: true,
values: sample_data,
scaleColors: ['#1AA2E6', '#0088CC'],
normalizeFunction: 'polynomial'
};
$el.vectorMap( $.extend( defaults, options ) );
};
$(function() {
$( '[data-vector-map]' ).each(function() {
var $this = $(this);
initMap( $this, ($this.data( 'plugin-options' ) || {}) )
});
});
}).apply( this, [ jQuery ]);
File diff suppressed because one or more lines are too long
@@ -0,0 +1,151 @@
(function( $ ) {
'use strict';
var initCalendarDragNDrop = function() {
$('#external-events div.external-event').each(function() {
// create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)
// it doesn't need to have a start or end
var eventObject = {
title: $.trim($(this).text()) // use the element's text as the event title
};
// store the Event Object in the DOM element so we can get to it later
$(this).data('eventObject', eventObject);
// make the event draggable using jQuery UI
$(this).draggable({
zIndex: 999,
revert: true, // will cause the event to go back to its
revertDuration: 0 // original position after the drag
});
});
};
var initCalendar = function() {
var $calendar = $('#calendar');
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$calendar.fullCalendar({
header: {
left: 'title',
right: 'prev,today,next,basicDay,basicWeek,month'
},
timeFormat: 'h:mm',
titleFormat: {
month: 'MMMM YYYY', // September 2009
week: "MMM d YYYY", // Sep 13 2009
day: 'dddd, MMM d, YYYY' // Tuesday, Sep 8, 2009
},
themeButtonIcons: {
prev: 'fa fa-caret-left',
next: 'fa fa-caret-right',
},
editable: true,
droppable: true, // this allows things to be dropped onto the calendar !!!
drop: function(date, allDay) { // this function is called when something is dropped
var $externalEvent = $(this);
// retrieve the dropped element's stored Event Object
var originalEventObject = $externalEvent.data('eventObject');
// we need to copy it, so that multiple events don't have a reference to the same object
var copiedEventObject = $.extend({}, originalEventObject);
// assign it the date that was reported
copiedEventObject.start = date;
copiedEventObject.allDay = allDay;
copiedEventObject.className = $externalEvent.attr('data-event-class');
// render the event on the calendar
// the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
$('#calendar').fullCalendar('renderEvent', copiedEventObject, true);
// is the "remove after drop" checkbox checked?
if ($('#RemoveAfterDrop').is(':checked')) {
// if so, remove the element from the "Draggable Events" list
$(this).remove();
}
},
events: [
{
title: 'All Day Event',
start: new Date(y, m, 1)
},
{
title: 'Long Event',
start: new Date(y, m, d-5),
end: new Date(y, m, d-2)
},
{
id: 999,
title: 'Repeating Event',
start: new Date(y, m, d-3, 16, 0),
allDay: false
},
{
id: 999,
title: 'Repeating Event',
start: new Date(y, m, d+4, 16, 0),
allDay: false
},
{
title: 'Meeting',
start: new Date(y, m, d, 10, 30),
allDay: false
},
{
title: 'Lunch',
start: new Date(y, m, d, 12, 0),
end: new Date(y, m, d, 14, 0),
allDay: false,
className: 'fc-event-danger'
},
{
title: 'Birthday Party',
start: new Date(y, m, d+1, 19, 0),
end: new Date(y, m, d+1, 22, 30),
allDay: false
},
{
title: 'Click for Google',
start: new Date(y, m, 28),
end: new Date(y, m, 29),
url: 'http://google.com/'
}
]
});
// FIX INPUTS TO BOOTSTRAP VERSIONS
var $calendarButtons = $calendar.find('.fc-header-right > span');
$calendarButtons
.filter('.fc-button-prev, .fc-button-today, .fc-button-next')
.wrapAll('<div class="btn-group mt-sm mr-md mb-sm ml-sm"></div>')
.parent()
.after('<br class="hidden"/>');
$calendarButtons
.not('.fc-button-prev, .fc-button-today, .fc-button-next')
.wrapAll('<div class="btn-group mb-sm mt-sm"></div>');
$calendarButtons
.attr({ 'class': 'btn btn-sm btn-default' });
};
$(function() {
initCalendar();
initCalendarDragNDrop();
});
}).apply(this, [ jQuery ]);
@@ -0,0 +1,21 @@
(function($) {
'use strict';
var $document,
idleTime;
$document = $(document);
$(function() {
$.idleTimer( 10000 ); // ms
$document.on( 'idle.idleTimer', function() {
// if you don't want the modal
// you can make a redirect here
LockScreen.show();
});
});
}).apply( this, [ jQuery ]);
@@ -0,0 +1,144 @@
(function( $ ) {
/*
Thumbnail: Select
*/
$('.mg-option input[type=checkbox]').on('change', function( ev ) {
var wrapper = $(this).parents('.thumbnail');
if($(this).is(':checked')) {
wrapper.addClass('thumbnail-selected');
} else {
wrapper.removeClass('thumbnail-selected');
}
});
$('.mg-option input[type=checkbox]:checked').trigger('change');
/*
Toolbar: Select All
*/
$('#mgSelectAll').on('click', function( ev ) {
ev.preventDefault();
var $this = $(this),
$label = $this.find('> span');
$checks = $('.mg-option input[type=checkbox]');
if($this.attr('data-all-selected')) {
$this.removeAttr('data-all-selected');
$checks.prop('checked', false).trigger('change');
$label.html($label.data('all-text'));
} else {
$this.attr('data-all-selected', 'true');
$checks.prop('checked', true).trigger('change');
$label.html($label.data('none-text'));
}
});
/*
Image Preview: Lightbox
*/
$('.thumb-preview a[href]').magnificPopup({
type: 'image',
closeOnContentClick: true,
mainClass: 'mfp-img-mobile',
image: {
verticalFit: true
}
});
$('.thumb-preview .mg-zoom').on('click.lightbox', function( ev ) {
ev.preventDefault();
$(this).closest('.thumb-preview').find('a.thumb-image').triggerHandler('click');
});
/*
Thumnail: Dropdown Options
*/
$('.thumbnail .mg-toggle').parent()
.on('show.bs.dropdown', function( ev ) {
$(this).closest('.mg-thumb-options').css('overflow', 'visible');
})
.on('hidden.bs.dropdown', function( ev ) {
$(this).closest('.mg-thumb-options').css('overflow', '');
});
$('.thumbnail').on('mouseenter', function() {
var toggle = $(this).find('.mg-toggle');
if ( toggle.parent().hasClass('open') ) {
toggle.dropdown('toggle');
}
});
/*
Isotope: Sort Thumbnails
*/
$("[data-sort-source]").each(function() {
var source = $(this);
var destination = $("[data-sort-destination][data-sort-id=" + $(this).attr("data-sort-id") + "]");
if(destination.get(0)) {
$(window).load(function() {
destination.isotope({
itemSelector: ".isotope-item",
layoutMode: 'fitRows'
});
$(window).on('sidebar-left-toggle inner-menu-toggle', function() {
destination.isotope();
});
source.find("a[data-option-value]").click(function(e) {
e.preventDefault();
var $this = $(this),
filter = $this.attr("data-option-value");
source.find(".active").removeClass("active");
$this.closest("li").addClass("active");
destination.isotope({
filter: filter
});
if(window.location.hash != "" || filter.replace(".","") != "*") {
window.location.hash = filter.replace(".","");
}
return false;
});
$(window).bind("hashchange", function(e) {
var hashFilter = "." + location.hash.replace("#",""),
hash = (hashFilter == "." || hashFilter == ".*" ? "*" : hashFilter);
source.find(".active").removeClass("active");
source.find("[data-option-value='" + hash + "']").closest("li").addClass("active");
destination.isotope({
filter: hash
});
});
var hashFilter = "." + (location.hash.replace("#","") || "*");
var initFilterEl = source.find("a[data-option-value='" + hashFilter + "']");
if(initFilterEl.get(0)) {
source.find("[data-option-value='" + hashFilter + "']").click();
} else {
source.find(".active a").click();
}
});
}
});
}(jQuery));
@@ -0,0 +1,102 @@
(function( $ ) {
'use strict';
var SessionTimeout = {
options: {
keepAliveUrl: '',
alertOn: 15000, // ms
timeoutOn: 20000 // ms
},
alertTimer: null,
timeoutTimer: null,
initialize: function() {
this
.start()
.setup();
},
start: function() {
var _self = this;
this.alertTimer = setTimeout(function() {
_self.onAlert();
}, this.options.alertOn );
this.timeoutTimer = setTimeout(function() {
_self.onTimeout();
}, this.options.timeoutOn );
return this;
},
// bind success callback for all ajax requests
setup: function() {
var _self = this;
// if server returns successfuly,
// then the session is renewed.
// thats why we reset here the counter
$( document ).ajaxSuccess(function() {
_self.reset();
});
return this;
},
reset: function() {
clearTimeout(this.alertTimer);
clearTimeout(this.timeoutTimer);
this.start();
return this;
},
keepAlive: function() {
// we don't have session on demo,
// so the code above prevent a request to be made
// in your project, please remove the next 3 lines of code
if ( !this.options.keepAliveUrl ) {
this.reset();
return;
}
var _self = this;
$.post( this.options.keepAliveUrl, function( data ) {
_self.reset();
});
},
// ------------------------------------------------------------------------
// CUSTOMIZE HERE
// ------------------------------------------------------------------------
onAlert: function() {
// if you want to show some warning
// TODO: remove this confirm (it breaks the logic and it's ugly)
var renew = confirm( 'Your session is about to expire, do you want to renew?' );
if ( renew ) {
this.keepAlive();
}
// if you want session to not expire
// this.keepAlive();
},
onTimeout: function() {
self.location.href = 'pages-signin.html';
}
};
$(function() {
SessionTimeout.initialize();
});
}).apply(this, [ jQuery ]);
@@ -0,0 +1,53 @@
(function( $ ) {
'use strict';
var initLightbox = function() {
$('.timeline .thumbnail-gallery').magnificPopup({
delegate: 'a',
type: 'image',
tLoading: 'Loading image #%curr%...',
mainClass: 'mfp-img-mobile',
gallery: {
enabled: true,
navigateByImgClick: true,
preload: [0,1] // Will preload 0 - before current, and 1 after the current image
},
image: {
tError: '<a href="%url%">The image #%curr%</a> could not be loaded.'
}
});
};
var initGoogleMaps = function() {
var map = new GMaps({
div: '#gmap-checkin-example',
lat: 40.7533405,
lng: -73.982253,
markers: [{
lat: 40.7533405,
lng: -73.982253,
infoWindow: {
content: '<p>New York Public Library</p>'
}
}],
scrollwheel: false
});
map.addMarker({
lat: 40.7533405,
lng: -73.982253,
infoWindow: {
content: '<p>New York Public Library</p>'
}
});
};
$(function() {
initLightbox();
initGoogleMaps();
});
}).apply(this, [ jQuery ]);
@@ -0,0 +1,20 @@
(function( $ ) {
'use strict';
var datatableInit = function() {
var $table = $('#datatable-ajax');
$table.dataTable({
bProcessing: true,
sAjaxSource: $table.data('url')
});
};
$(function() {
datatableInit();
});
}).apply( this, [ jQuery ]);
@@ -0,0 +1,17 @@
(function( $ ) {
'use strict';
var datatableInit = function() {
$('#datatable-default').dataTable();
};
$(function() {
datatableInit();
});
}).apply( this, [ jQuery ]);
@@ -0,0 +1,239 @@
(function( $ ) {
'use strict';
var EditableTable = {
options: {
addButton: '#addToTable',
table: '#datatable-editable',
dialog: {
wrapper: '#dialog',
cancelButton: '#dialogCancel',
confirmButton: '#dialogConfirm',
}
},
initialize: function() {
this
.setVars()
.build()
.events();
},
setVars: function() {
this.$table = $( this.options.table );
this.$addButton = $( this.options.addButton );
// dialog
this.dialog = {};
this.dialog.$wrapper = $( this.options.dialog.wrapper );
this.dialog.$cancel = $( this.options.dialog.cancelButton );
this.dialog.$confirm = $( this.options.dialog.confirmButton );
return this;
},
build: function() {
this.datatable = this.$table.DataTable({
aoColumns: [
null,
null,
null,
{ "bSortable": false }
]
});
window.dt = this.datatable;
return this;
},
events: function() {
var _self = this;
this.$table
.on('click', 'a.save-row', function( e ) {
e.preventDefault();
_self.rowSave( $(this).closest( 'tr' ) );
})
.on('click', 'a.cancel-row', function( e ) {
e.preventDefault();
_self.rowCancel( $(this).closest( 'tr' ) );
})
.on('click', 'a.edit-row', function( e ) {
e.preventDefault();
_self.rowEdit( $(this).closest( 'tr' ) );
})
.on( 'click', 'a.remove-row', function( e ) {
e.preventDefault();
var $row = $(this).closest( 'tr' );
$.magnificPopup.open({
items: {
src: '#dialog',
type: 'inline'
},
preloader: false,
modal: true,
callbacks: {
change: function() {
_self.dialog.$confirm.on( 'click', function( e ) {
e.preventDefault();
_self.rowRemove( $row );
$.magnificPopup.close();
});
},
close: function() {
_self.dialog.$confirm.off( 'click' );
}
}
});
});
this.$addButton.on( 'click', function(e) {
e.preventDefault();
_self.rowAdd();
});
this.dialog.$cancel.on( 'click', function( e ) {
e.preventDefault();
$.magnificPopup.close();
});
return this;
},
// ==========================================================================================
// ROW FUNCTIONS
// ==========================================================================================
rowAdd: function() {
this.$addButton.attr({ 'disabled': 'disabled' });
var actions,
data,
$row;
actions = [
'<a href="#" class="hidden on-editing save-row"><i class="fa fa-save"></i></a>',
'<a href="#" class="hidden on-editing cancel-row"><i class="fa fa-times"></i></a>',
'<a href="#" class="on-default edit-row"><i class="fa fa-pencil"></i></a>',
'<a href="#" class="on-default remove-row"><i class="fa fa-trash-o"></i></a>'
].join(' ');
data = this.datatable.row.add([ '', '', '', actions ]);
$row = this.datatable.row( data[0] ).nodes().to$();
$row
.addClass( 'adding' )
.find( 'td:last' )
.addClass( 'actions' );
this.rowEdit( $row );
this.datatable.order([0,'asc']).draw(); // always show fields
},
rowCancel: function( $row ) {
var _self = this,
$actions,
i,
data;
if ( $row.hasClass('adding') ) {
this.rowRemove( $row );
} else {
data = this.datatable.row( $row.get(0) ).data();
this.datatable.row( $row.get(0) ).data( data );
$actions = $row.find('td.actions');
if ( $actions.get(0) ) {
this.rowSetActionsDefault( $row );
}
this.datatable.draw();
}
},
rowEdit: function( $row ) {
var _self = this,
data;
data = this.datatable.row( $row.get(0) ).data();
$row.children( 'td' ).each(function( i ) {
var $this = $( this );
if ( $this.hasClass('actions') ) {
_self.rowSetActionsEditing( $row );
} else {
$this.html( '<input type="text" class="form-control input-block" value="' + data[i] + '"/>' );
}
});
},
rowSave: function( $row ) {
var _self = this,
$actions,
values = [];
if ( $row.hasClass( 'adding' ) ) {
this.$addButton.removeAttr( 'disabled' );
$row.removeClass( 'adding' );
}
values = $row.find('td').map(function() {
var $this = $(this);
if ( $this.hasClass('actions') ) {
_self.rowSetActionsDefault( $row );
return _self.datatable.cell( this ).data();
} else {
return $.trim( $this.find('input').val() );
}
});
this.datatable.row( $row.get(0) ).data( values );
$actions = $row.find('td.actions');
if ( $actions.get(0) ) {
this.rowSetActionsDefault( $row );
}
this.datatable.draw();
},
rowRemove: function( $row ) {
if ( $row.hasClass('adding') ) {
this.$addButton.removeAttr( 'disabled' );
}
this.datatable.row( $row.get(0) ).remove().draw();
},
rowSetActionsEditing: function( $row ) {
$row.find( '.on-editing' ).removeClass( 'hidden' );
$row.find( '.on-default' ).addClass( 'hidden' );
},
rowSetActionsDefault: function( $row ) {
$row.find( '.on-editing' ).addClass( 'hidden' );
$row.find( '.on-default' ).removeClass( 'hidden' );
}
};
$(function() {
EditableTable.initialize();
});
}).apply( this, [ jQuery ]);
@@ -0,0 +1,77 @@
(function( $ ) {
'use strict';
var datatableInit = function() {
var $table = $('#datatable-details');
// format function for row details
var fnFormatDetails = function( datatable, tr ) {
var data = datatable.fnGetData( tr );
return [
'<table class="table mb-none">',
'<tr class="b-top-none">',
'<td><label class="mb-none">Rendering engine:</label></td>',
'<td>' + data[1]+ ' ' + data[4] + '</td>',
'</tr>',
'<tr>',
'<td><label class="mb-none">Link to source:</label></td>',
'<td>Could provide a link here</td>',
'</tr>',
'<tr>',
'<td><label class="mb-none">Extra info:</label></td>',
'<td>And any further details here (images etc)</td>',
'</tr>',
'</div>'
].join('');
};
// insert the expand/collapse column
var th = document.createElement( 'th' );
var td = document.createElement( 'td' );
td.innerHTML = '<i data-toggle class="fa fa-plus-square-o text-primary h5 m-none" style="cursor: pointer;"></i>';
td.className = "text-center";
$table
.find( 'thead tr' ).each(function() {
this.insertBefore( th, this.childNodes[0] );
});
$table
.find( 'tbody tr' ).each(function() {
this.insertBefore( td.cloneNode( true ), this.childNodes[0] );
});
// initialize
var datatable = $table.dataTable({
aoColumnDefs: [{
bSortable: false,
aTargets: [ 0 ]
}],
aaSorting: [
[1, 'asc']
]
});
// add a listener
$table.on('click', 'i[data-toggle]', function() {
var $this = $(this),
tr = $(this).closest( 'tr' ).get(0);
if ( datatable.fnIsOpen(tr) ) {
$this.removeClass( 'fa-minus-square-o' ).addClass( 'fa-plus-square-o' );
datatable.fnClose( tr );
} else {
$this.removeClass( 'fa-plus-square-o' ).addClass( 'fa-minus-square-o' );
datatable.fnOpen( tr, fnFormatDetails( datatable, tr), 'details' );
}
});
};
$(function() {
datatableInit();
});
}).apply( this, [ jQuery ]);
@@ -0,0 +1,42 @@
(function( $ ) {
'use strict';
var datatableInit = function() {
var $table = $('#datatable-tabletools');
$table.dataTable({
sDom: "<'text-right mb-md'T>" + $.fn.dataTable.defaults.sDom,
oTableTools: {
sSwfPath: $table.data('swf-path'),
aButtons: [
{
sExtends: 'pdf',
sButtonText: 'PDF'
},
{
sExtends: 'csv',
sButtonText: 'CSV'
},
{
sExtends: 'xls',
sButtonText: 'Excel'
},
{
sExtends: 'print',
sButtonText: 'Print',
sInfo: 'Please press CTR+P to print or ESC to quit'
}
]
}
});
};
$(function() {
datatableInit();
});
}).apply( this, [ jQuery ]);
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
/* Add here all your JS customizations */
+623
View File
@@ -0,0 +1,623 @@
// Popover
(function( $ ) {
'use strict';
if ( $.isFunction( $.fn['popover'] ) ) {
$( '[data-toggle=popover]' ).popover();
}
}).apply( this, [ jQuery ]);
// Tooltip
(function( $ ) {
'use strict';
if ( $.isFunction( $.fn['tooltip'] ) ) {
$( '[data-toggle=tooltip],[rel=tooltip]' ).tooltip({ container: 'body' });
}
}).apply( this, [ jQuery ]);
// Sidebar Widgets
(function( $ ) {
'use strict';
function expand( content ) {
content.children( '.widget-content' ).slideDown( 'fast', function() {
$(this).css( 'display', '' );
content.removeClass( 'widget-collapsed' );
});
}
function collapse( content ) {
content.children('.widget-content' ).slideUp( 'fast', function() {
content.addClass( 'widget-collapsed' );
$(this).css( 'display', '' );
});
}
var $widgets = $( '.sidebar-widget' );
$widgets.each( function() {
var $widget = $( this ),
$toggler = $widget.find( '.widget-toggle' );
$toggler.on('click.widget-toggler', function() {
$widget.hasClass('widget-collapsed') ? expand($widget) : collapse($widget);
});
});
}).apply( this, [ jQuery ]);
// Codemirror
(function( $ ) {
'use strict';
if ( typeof CodeMirror !== 'undefined' ) {
$(function() {
$('[data-plugin-codemirror]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginCodeMirror(opts);
});
});
}
}).apply(this, [ jQuery ]);
// Colorpicker
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'colorpicker' ]) ) {
$(function() {
$('[data-plugin-colorpicker]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginColorPicker(opts);
});
});
}
}).apply(this, [ jQuery ]);
// Datepicker
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'datepicker' ]) ) {
$(function() {
$('[data-plugin-datepicker]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginDatePicker(opts);
});
});
}
}).apply(this, [ jQuery ]);
// iosSwitcher
(function( $ ) {
'use strict';
if ( typeof Switch !== 'undefined' && $.isFunction( Switch ) ) {
$(function() {
$('[data-plugin-ios-switch]').each(function() {
var $this = $( this );
$this.themePluginIOS7Switch();
});
});
}
}).apply(this, [ jQuery ]);
// Markdown
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'markdown' ]) ) {
$(function() {
$('[data-plugin-markdown-editor]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginMarkdownEditor(opts);
});
});
}
}).apply(this, [ jQuery ]);
// Masked Input
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'mask' ]) ) {
$(function() {
$('[data-plugin-masked-input]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginMaskedInput(opts);
});
});
}
}).apply(this, [ jQuery ]);
// MaxLength
(function( $ ) {
'use strict';
if ( $.isFunction( $.fn[ 'maxlength' ]) ) {
$(function() {
$('[data-plugin-maxlength]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginMaxLength(opts);
});
});
}
}).apply(this, [ jQuery ]);
// MultiSelect
(function( $ ) {
'use strict';
if ( $.isFunction( $.fn[ 'multiselect' ] ) ) {
$(function() {
$( '[data-plugin-multiselect]' ).each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginMultiSelect(opts);
});
});
}
}).apply( this, [ jQuery ]);
(function( $ ) {
'use strict';
if ( $.isFunction( $.fn[ 'placeholder' ]) ) {
$('input[placeholder]').placeholder();
}
}).apply(this, [ jQuery ]);
// Select2
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'select2' ]) ) {
$(function() {
$('[data-plugin-selectTwo]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginSelect2(opts);
});
});
}
}).apply(this, [ jQuery ]);
// Spinner
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'spinner' ]) ) {
$(function() {
$('[data-plugin-spinner]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginSpinner(opts);
});
});
}
}).apply(this, [ jQuery ]);
// SummerNote
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'summernote' ]) ) {
$(function() {
$('[data-plugin-summernote]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginSummerNote(opts);
});
});
}
}).apply(this, [ jQuery ]);
// TextArea AutoSize
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'autosize' ]) ) {
$(function() {
$('[data-plugin-textarea-autosize]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginTextAreaAutoSize(opts);
});
});
}
}).apply(this, [ jQuery ]);
// TimePicker
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'timepicker' ]) ) {
$(function() {
$('[data-plugin-timepicker]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginTimePicker(opts);
});
});
}
}).apply(this, [ jQuery ]);
// Mailbox
(function( $ ) {
'use strict';
$(function() {
$('[data-mailbox]').each(function() {
var $this = $( this );
$this.themeMailbox();
});
});
}).apply(this, [ jQuery ]);
// Animate
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'appear' ]) ) {
$(function() {
$('[data-plugin-animate], [data-appear-animation]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginAnimate(opts);
});
});
}
}).apply(this, [ jQuery ]);
// Carousel
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'owlCarousel' ]) ) {
$(function() {
$('[data-plugin-carousel]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginCarousel(opts);
});
});
}
}).apply(this, [ jQuery ]);
// Chart Circular
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'easyPieChart' ]) ) {
$(function() {
$('[data-plugin-chart-circular], .circular-bar-chart:not(.manual)').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginChartCircular(opts);
});
});
}
}).apply(this, [ jQuery ]);
// Lightbox
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'magnificPopup' ]) ) {
$(function() {
$('[data-plugin-lightbox], .lightbox:not(.manual)').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginLightbox(opts);
});
});
}
}).apply(this, [ jQuery ]);
// Portlets
(function( $ ) {
'use strict';
$(function() {
$('[data-plugin-portlet]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginPortlet(opts);
});
});
}).apply(this, [ jQuery ]);
// Slider
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'slider' ]) ) {
$(function() {
$('[data-plugin-slider]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions) {
opts = pluginOptions;
}
$this.themePluginSlider(opts);
});
});
}
}).apply(this, [ jQuery ]);
// Toggle
(function( $ ) {
'use strict';
$(function() {
$('[data-plugin-toggle]').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginToggle(opts);
});
});
}).apply(this, [ jQuery ]);
// Widget - Todo
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'themePluginWidgetTodoList' ]) ) {
$(function() {
$('[data-plugin-todo-list], ul.widget-todo-list').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginWidgetTodoList(opts);
});
});
}
}).apply(this, [ jQuery ]);
// Widget - Toggle
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'themePluginWidgetToggleExpand' ]) ) {
$(function() {
$('[data-plugin-toggle-expand], .widget-toggle-expand').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginWidgetToggleExpand(opts);
});
});
}
}).apply(this, [ jQuery ]);
// Word Rotate
(function( $ ) {
'use strict';
if ( $.isFunction($.fn[ 'themePluginWordRotate' ]) ) {
$(function() {
$('[data-plugin-word-rotate], .word-rotate:not(.manual)').each(function() {
var $this = $( this ),
opts = {};
var pluginOptions = $this.data('plugin-options');
if (pluginOptions)
opts = pluginOptions;
$this.themePluginWordRotate(opts);
});
});
}
}).apply(this, [ jQuery ]);
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,427 @@
(function( $ ) {
'use strict';
/*
Flot: Basic
*/
(function() {
var plot = $.plot('#flotBasic', flotBasicData, {
series: {
lines: {
show: true,
fill: true,
lineWidth: 1,
fillColor: {
colors: [{
opacity: 0.45
}, {
opacity: 0.45
}]
}
},
points: {
show: true
},
shadowSize: 0
},
grid: {
hoverable: true,
clickable: true,
borderColor: 'rgba(0,0,0,0.1)',
borderWidth: 1,
labelMargin: 15,
backgroundColor: 'transparent'
},
yaxis: {
min: 0,
max: 200,
color: 'rgba(0,0,0,0.1)'
},
xaxis: {
color: 'rgba(0,0,0,0.1)'
},
tooltip: true,
tooltipOpts: {
content: '%s: Value of %x is %y',
shifts: {
x: -60,
y: 25
},
defaultTheme: false
}
});
})();
/*
Flot: Real-Time
*/
(function() {
var data = [],
totalPoints = 300;
function getRandomData() {
if (data.length > 0)
data = data.slice(1);
// Do a random walk
while (data.length < totalPoints) {
var prev = data.length > 0 ? data[data.length - 1] : 50,
y = prev + Math.random() * 10 - 5;
if (y < 0) {
y = 0;
} else if (y > 100) {
y = 100;
}
data.push(y);
}
// Zip the generated y values with the x values
var res = [];
for (var i = 0; i < data.length; ++i) {
res.push([i, data[i]])
}
return res;
}
var plot = $.plot('#flotRealTime', [getRandomData()], {
colors: ['#8CC9E8'],
series: {
lines: {
show: true,
fill: true,
lineWidth: 1,
fillColor: {
colors: [{
opacity: 0.45
}, {
opacity: 0.45
}]
}
},
points: {
show: false
},
shadowSize: 0
},
grid: {
borderColor: 'rgba(0,0,0,0.1)',
borderWidth: 1,
labelMargin: 15,
backgroundColor: 'transparent'
},
yaxis: {
min: 0,
max: 100,
color: 'rgba(0,0,0,0.1)'
},
xaxis: {
show: false
}
});
function update() {
plot.setData([getRandomData()]);
// Since the axes don't change, we don't need to call plot.setupGrid()
plot.draw();
setTimeout(update, $( 'html' ).hasClass( 'mobile-device' ) ? 1000 : 30 );
}
update();
})();
/*
Flot: Bars
*/
(function() {
var plot = $.plot('#flotBars', [flotBarsData], {
colors: ['#8CC9E8'],
series: {
bars: {
show: true,
barWidth: 0.8,
align: 'center'
}
},
xaxis: {
mode: 'categories',
tickLength: 0
},
grid: {
hoverable: true,
clickable: true,
borderColor: 'rgba(0,0,0,0.1)',
borderWidth: 1,
labelMargin: 15,
backgroundColor: 'transparent'
},
tooltip: true,
tooltipOpts: {
content: '%y',
shifts: {
x: -10,
y: 20
},
defaultTheme: false
}
});
})();
/*
Flot: Pie
*/
(function() {
var plot = $.plot('#flotPie', flotPieData, {
series: {
pie: {
show: true,
combine: {
color: '#999',
threshold: 0.1
}
}
},
legend: {
show: false
},
grid: {
hoverable: true,
clickable: true
}
});
})();
/*
Morris: Line
*/
Morris.Line({
resize: true,
element: 'morrisLine',
data: morrisLineData,
xkey: 'y',
ykeys: ['a', 'b'],
labels: ['Series A', 'Series B'],
hideHover: true,
lineColors: ['#0088cc', '#734ba9'],
});
/*
Morris: Donut
*/
Morris.Donut({
resize: true,
element: 'morrisDonut',
data: morrisDonutData,
colors: ['#0088cc', '#734ba9', '#E36159']
});
/*
Morris: Bar
*/
Morris.Bar({
resize: true,
element: 'morrisBar',
data: morrisBarData,
xkey: 'y',
ykeys: ['a', 'b'],
labels: ['Series A', 'Series B'],
hideHover: true,
barColors: ['#0088cc', '#2baab1']
});
/*
Morris: Area
*/
Morris.Area({
resize: true,
element: 'morrisArea',
data: morrisAreaData,
xkey: 'y',
ykeys: ['a', 'b'],
labels: ['Series A', 'Series B'],
lineColors: ['#0088cc', '#2baab1'],
fillOpacity: 0.7,
hideHover: true
});
/*
Morris: Stacked
*/
Morris.Bar({
resize: true,
element: 'morrisStacked',
data: morrisStackedData,
xkey: 'y',
ykeys: ['a', 'b'],
labels: ['Series A', 'Series B'],
barColors: ['#0088cc', '#2baab1'],
fillOpacity: 0.7,
smooth: false,
stacked: true,
hideHover: true
});
/*
Gauge: Basic
*/
(function() {
var target = $('#gaugeBasic'),
opts = $.extend(true, {}, {
lines: 12, // The number of lines to draw
angle: 0.12, // The length of each line
lineWidth: 0.5, // The line thickness
pointer: {
length: 0.7, // The radius of the inner circle
strokeWidth: 0.05, // The rotation offset
color: '#444' // Fill color
},
limitMax: 'true', // If true, the pointer will not go past the end of the gauge
colorStart: '#0088CC', // Colors
colorStop: '#0088CC', // just experiment with them
strokeColor: '#F1F1F1', // to see which ones work best for you
generateGradient: true
}, target.data('plugin-options'));
var gauge = new Gauge(target.get(0)).setOptions(opts);
gauge.maxValue = opts.maxValue; // set max gauge value
gauge.animationSpeed = 32; // set animation speed (32 is default value)
gauge.set(opts.value); // set actual value
gauge.setTextField(document.getElementById("gaugeBasicTextfield"));
})();
/*
Gauge: Alternative
*/
(function() {
var target = $('#gaugeAlternative'),
opts = $.extend(true, {}, {
lines: 12, // The number of lines to draw
angle: 0.12, // The length of each line
lineWidth: 0.5, // The line thickness
pointer: {
length: 0.7, // The radius of the inner circle
strokeWidth: 0.05, // The rotation offset
color: '#444' // Fill color
},
limitMax: 'true', // If true, the pointer will not go past the end of the gauge
colorStart: '#2BAAB1', // Colors
colorStop: '#2BAAB1', // just experiment with them
strokeColor: '#F1F1F1', // to see which ones work best for you
generateGradient: true
}, target.data('plugin-options'));
var gauge = new Gauge(target.get(0)).setOptions(opts);
gauge.maxValue = opts.maxValue; // set max gauge value
gauge.animationSpeed = 32; // set animation speed (32 is default value)
gauge.set(opts.value); // set actual value
gauge.setTextField(document.getElementById("gaugeAlternativeTextfield"));
})();
/*
Liquid Meter
*/
$('#meter').liquidMeter({
shape: 'circle',
color: '#0088CC',
background: '#F9F9F9',
fontSize: '24px',
fontWeight: '600',
stroke: '#F2F2F2',
textColor: '#333',
liquidOpacity: 0.9,
liquidPalette: ['#333'],
speed: 3000,
animate: !$.browser.mobile
});
/*
Liquid Meter Dark
*/
$('#meterDark').liquidMeter({
shape: 'circle',
color: '#0088CC',
background: '#272A31',
stroke: '#33363F',
fontSize: '24px',
fontWeight: '600',
textColor: '#FFFFFF',
liquidOpacity: 0.9,
liquidPalette: ['#0088CC'],
speed: 3000,
animate: !$.browser.mobile
});
/*
Sparkline: Line
*/
$("#sparklineLine").sparkline(sparklineLineData, {
type: 'line',
width: '80',
height: '30',
lineColor: '#0088cc'
});
/*
Sparkline: Bar
*/
$("#sparklineBar").sparkline(sparklineBarData, {
type: 'bar',
width: '80',
height: '30',
barColor: '#0088cc',
negBarColor: '#B20000'
});
/*
Sparkline: Tristate
*/
$("#sparklineTristate").sparkline(sparklineTristateData, {
type: 'tristate',
width: '80',
height: '30',
posBarColor: '#0088cc',
negBarColor: '#B20000'
});
/*
Sparkline: Discrete
*/
$("#sparklineDiscrete").sparkline(sparklineDiscreteData, {
type: 'discrete',
width: '80',
height: '30',
lineColor: '#0088cc'
});
/*
Sparkline: Bullet
*/
$("#sparklineBullet").sparkline(sparklineBulletData, {
type: 'bullet',
width: '80',
height: '30',
targetColor: '#ff7f00',
performanceColor: '#0088cc'
});
/*
Sparkline: Pie
*/
$("#sparklinePie").sparkline(sparklinePieData, {
type: 'pie',
height: '30',
barColor: '#0088cc'
});
}).apply( this, [ jQuery ]);
@@ -0,0 +1,157 @@
(function( $ ) {
'use strict';
/*
Single Image
*/
$('.image-popup-vertical-fit').magnificPopup({
type: 'image',
closeOnContentClick: true,
mainClass: 'mfp-img-mobile',
image: {
verticalFit: true
}
});
$('.image-popup-no-margins').magnificPopup({
type: 'image',
closeOnContentClick: true,
closeBtnInside: false,
fixedContentPos: true,
mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
image: {
verticalFit: true
},
zoom: {
enabled: true,
duration: 300 // don't foget to change the duration also in CSS
}
});
/*
Gallery
*/
$('.popup-gallery').magnificPopup({
delegate: 'a',
type: 'image',
tLoading: 'Loading image #%curr%...',
mainClass: 'mfp-img-mobile',
gallery: {
enabled: true,
navigateByImgClick: true,
preload: [0,1] // Will preload 0 - before current, and 1 after the current image
},
image: {
tError: '<a href="%url%">The image #%curr%</a> could not be loaded.'
}
});
/*
Zoom Gallery
*/
$('.zoom-gallery').magnificPopup({
delegate: 'a',
type: 'image',
closeOnContentClick: false,
closeBtnInside: false,
mainClass: 'mfp-with-zoom mfp-img-mobile',
image: {
verticalFit: true,
titleSrc: function(item) {
return item.el.attr('title') + ' &middot; <a class="image-source-link" href="'+item.el.attr('data-source')+'" target="_blank">image source</a>';
}
},
gallery: {
enabled: true
},
zoom: {
enabled: true,
duration: 300, // don't foget to change the duration also in CSS
opener: function(element) {
return element.find('img');
}
}
});
/*
Popup with video or map
*/
$('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
disableOn: 700,
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false
});
/*
Dialog with CSS animation
*/
$('.popup-with-zoom-anim').magnificPopup({
type: 'inline',
fixedContentPos: false,
fixedBgPos: true,
overflowY: 'auto',
closeBtnInside: true,
preloader: false,
midClick: true,
removalDelay: 300,
mainClass: 'my-mfp-zoom-in'
});
$('.popup-with-move-anim').magnificPopup({
type: 'inline',
fixedContentPos: false,
fixedBgPos: true,
overflowY: 'auto',
closeBtnInside: true,
preloader: false,
midClick: true,
removalDelay: 300,
mainClass: 'my-mfp-slide-bottom'
});
/*
Form
*/
$('.popup-with-form').magnificPopup({
type: 'inline',
preloader: false,
focus: '#name',
// When elemened is focused, some mobile browsers in some cases zoom in
// It looks not nice, so we disable it:
callbacks: {
beforeOpen: function() {
if($(window).width() < 700) {
this.st.focus = false;
} else {
this.st.focus = '#name';
}
}
}
});
/*
Ajax
*/
$('.simple-ajax-popup').magnificPopup({
type: 'ajax'
});
}).apply( this, [ jQuery ]);
@@ -0,0 +1,114 @@
(function( $ ) {
'use strict';
/*
Basic
*/
$('.modal-basic').magnificPopup({
type: 'inline',
preloader: false,
modal: true
});
/*
Sizes
*/
$('.modal-sizes').magnificPopup({
type: 'inline',
preloader: false,
modal: true
});
/*
Modal with CSS animation
*/
$('.modal-with-zoom-anim').magnificPopup({
type: 'inline',
fixedContentPos: false,
fixedBgPos: true,
overflowY: 'auto',
closeBtnInside: true,
preloader: false,
midClick: true,
removalDelay: 300,
mainClass: 'my-mfp-zoom-in',
modal: true
});
$('.modal-with-move-anim').magnificPopup({
type: 'inline',
fixedContentPos: false,
fixedBgPos: true,
overflowY: 'auto',
closeBtnInside: true,
preloader: false,
midClick: true,
removalDelay: 300,
mainClass: 'my-mfp-slide-bottom',
modal: true
});
/*
Modal Dismiss
*/
$(document).on('click', '.modal-dismiss', function (e) {
e.preventDefault();
$.magnificPopup.close();
});
/*
Modal Confirm
*/
$(document).on('click', '.modal-confirm', function (e) {
e.preventDefault();
$.magnificPopup.close();
new PNotify({
title: 'Success!',
text: 'Modal Confirm Message.',
type: 'success'
});
});
/*
Form
*/
$('.modal-with-form').magnificPopup({
type: 'inline',
preloader: false,
focus: '#name',
modal: true,
// When elemened is focused, some mobile browsers in some cases zoom in
// It looks not nice, so we disable it:
callbacks: {
beforeOpen: function() {
if($(window).width() < 700) {
this.st.focus = false;
} else {
this.st.focus = '#name';
}
}
}
});
/*
Ajax
*/
$('.simple-ajax-modal').magnificPopup({
type: 'ajax',
modal: true
});
}).apply( this, [ jQuery ]);
@@ -0,0 +1,35 @@
(function( $ ) {
'use strict';
/*
Update Output
*/
var updateOutput = function (e) {
var list = e.length ? e : $(e.target),
output = list.data('output');
if (window.JSON) {
output.val(window.JSON.stringify(list.nestable('serialize')));
} else {
output.val('JSON browser support required for this demo.');
}
};
/*
Nestable 1
*/
$('#nestable').nestable({
group: 1
}).on('change', updateOutput);
/*
Output Initial Serialised Data
*/
$(function() {
updateOutput($('#nestable').data('output', $('#nestable-output')));
});
}).apply(this, [ jQuery ]);
@@ -0,0 +1,967 @@
(function( $ ) {
'use strict';
/*
Default Notifications
*/
$('#default-primary').click(function() {
new PNotify({
title: 'Regular Notice',
text: 'Check me out! I\'m a notice.',
type: 'custom',
addclass: 'notification-primary',
icon: 'fa fa-twitter'
});
});
$('#default-notice').click(function() {
new PNotify({
title: 'Regular Notice',
text: 'Check me out! I\'m a notice.'
});
});
$('#default-success').click(function() {
new PNotify({
title: 'Regular Notice',
text: 'Check me out! I\'m a notice.',
type: 'success'
});
});
$('#default-info').click(function() {
new PNotify({
title: 'Regular Notice',
text: 'Check me out! I\'m a notice.',
type: 'info'
});
});
$('#default-error').click(function() {
new PNotify({
title: 'Regular Notice',
text: 'Check me out! I\'m a notice.',
type: 'error'
});
});
$('#default-dark').click(function() {
new PNotify({
title: 'Regular Notice',
text: 'Check me out! I\'m a notice.',
addclass: 'notification-dark',
icon: 'fa fa-user'
});
});
/*
Shadowed Notifications
*/
$('#shadow-primary').click(function() {
new PNotify({
title: 'With Shadow',
text: 'Check me out! I\'m a notice.',
shadow: true,
addclass: 'notification-primary',
icon: 'fa fa-twitter'
});
});
$('#shadow-notice').click(function() {
new PNotify({
title: 'With Shadow',
text: 'Check me out! I\'m a notice.',
shadow: true
});
});
$('#shadow-success').click(function() {
new PNotify({
title: 'With Shadow',
text: 'Check me out! I\'m a notice.',
type: 'success',
shadow: true
});
});
$('#shadow-info').click(function() {
new PNotify({
title: 'With Shadow',
text: 'Check me out! I\'m a notice.',
type: 'info',
shadow: true
});
});
$('#shadow-error').click(function() {
new PNotify({
title: 'With Shadow',
text: 'Check me out! I\'m a notice.',
type: 'error',
shadow: true
});
});
$('#shadow-dark').click(function() {
new PNotify({
title: 'With Shadow',
text: 'Check me out! I\'m a notice.',
addclass: 'notification-dark',
icon: 'fa fa-user',
shadow: true
});
});
/*
No Icon Notification
*/
$('#no-icon-primary').click(function() {
new PNotify({
title: 'Without Icon',
text: 'Check me out! I\'m a notice.',
addclass: 'ui-pnotify-no-icon notification-primary',
icon: false
});
});
$('#no-icon-notice').click(function() {
new PNotify({
title: 'Without Icon',
text: 'Check me out! I\'m a notice.',
addclass: 'ui-pnotify-no-icon',
icon: false
});
});
$('#no-icon-success').click(function() {
new PNotify({
title: 'Without Icon',
text: 'Check me out! I\'m a notice.',
type: 'success',
addclass: 'ui-pnotify-no-icon',
icon: false
});
});
$('#no-icon-info').click(function() {
new PNotify({
title: 'Without Icon',
text: 'Check me out! I\'m a notice.',
type: 'info',
addclass: 'ui-pnotify-no-icon',
icon: false
});
});
$('#no-icon-error').click(function() {
new PNotify({
title: 'Without Icon',
text: 'Check me out! I\'m a notice.',
type: 'error',
addclass: 'ui-pnotify-no-icon',
icon: false
});
});
$('#no-icon-dark').click(function() {
new PNotify({
title: 'Without Icon',
text: 'Check me out! I\'m a notice.',
addclass: 'ui-pnotify-no-icon notification-dark',
icon: false
});
});
/*
No Border Radius Notification
*/
$('#no-radious-primary').click(function() {
new PNotify({
title: 'border-radius: 0;',
text: 'Check me out! I\'m a notice.',
addclass: 'notification-primary',
cornerclass: 'ui-pnotify-sharp',
icon: 'fa fa-twitter'
});
});
$('#no-radious-notice').click(function() {
new PNotify({
title: 'border-radius: 0;',
text: 'Check me out! I\'m a notice.',
cornerclass: 'ui-pnotify-sharp'
});
});
$('#no-radious-success').click(function() {
new PNotify({
title: 'border-radius: 0;',
text: 'Check me out! I\'m a notice.',
type: 'success',
cornerclass: 'ui-pnotify-sharp'
});
});
$('#no-radious-info').click(function() {
new PNotify({
title: 'border-radius: 0;',
text: 'Check me out! I\'m a notice.',
type: 'info',
cornerclass: 'ui-pnotify-sharp'
});
});
$('#no-radious-error').click(function() {
new PNotify({
title: 'border-radius: 0;',
text: 'Check me out! I\'m a notice.',
type: 'error',
cornerclass: 'ui-pnotify-sharp'
});
});
$('#no-radious-dark').click(function() {
new PNotify({
title: 'border-radius: 0;',
text: 'Check me out! I\'m a notice.',
addclass: 'notification-dark',
icon: 'fa fa-user',
cornerclass: 'ui-pnotify-sharp'
});
});
/*
Custom Icon Notification
*/
$('#custom-icon-primary').click(function() {
new PNotify({
title: 'Custom Icon',
text: 'Check me out! I\'m a notice.',
addclass: 'notification-primary',
icon: 'fa fa-home'
});
});
$('#custom-icon-notice').click(function() {
new PNotify({
title: 'Custom Icon',
text: 'Check me out! I\'m a notice.',
icon: 'fa fa-home'
});
});
$('#custom-icon-success').click(function() {
new PNotify({
title: 'Custom Icon',
text: 'Check me out! I\'m a notice.',
type: 'success',
icon: 'fa fa-home'
});
});
$('#custom-icon-info').click(function() {
new PNotify({
title: 'Custom Icon',
text: 'Check me out! I\'m a notice.',
type: 'info',
icon: 'fa fa-home'
});
});
$('#custom-icon-error').click(function() {
new PNotify({
title: 'Custom Icon',
text: 'Check me out! I\'m a notice.',
type: 'error',
icon: 'fa fa-home'
});
});
$('#custom-icon-dark').click(function() {
new PNotify({
title: 'Custom Icon',
text: 'Check me out! I\'m a notice.',
addclass: 'notification-dark',
icon: 'fa fa-home'
});
});
/*
Icon without border notification
*/
$('#icon-without-border-primary').click(function() {
new PNotify({
title: 'Icon Without Border',
text: 'Check me out! I\'m a notice.',
addclass: 'notification-primary icon-nb',
icon: 'fa fa-twitter'
});
});
$('#icon-without-border-notice').click(function() {
new PNotify({
title: 'Icon Without Border',
text: 'Check me out! I\'m a notice.',
addclass: 'icon-nb'
});
});
$('#icon-without-border-success').click(function() {
new PNotify({
title: 'Icon Without Border',
text: 'Check me out! I\'m a notice.',
type: 'success',
addclass: 'icon-nb'
});
});
$('#icon-without-border-info').click(function() {
new PNotify({
title: 'Icon Without Border',
text: 'Check me out! I\'m a notice.',
type: 'info',
addclass: 'icon-nb'
});
});
$('#icon-without-border-error').click(function() {
new PNotify({
title: 'Icon Without Border',
text: 'Check me out! I\'m a notice.',
type: 'error',
addclass: 'icon-nb'
});
});
$('#icon-without-border-dark').click(function() {
new PNotify({
title: 'Icon Without Border',
text: 'Check me out! I\'m a notice.',
addclass: 'notification-dark icon-nb',
icon: 'fa fa-user'
});
});
/*
Non-blocking notifications
*/
$('#non-blocking-primary').click(function() {
new PNotify({
title: 'Non-Blocking',
text: 'I\'m a special kind of notice called "non-blocking". When you hover over me I\'ll fade to show the elements underneath. Feel free to click any of them just like I wasn\'t even here.\n\nNote: HTML links don\'t trigger in some browsers, due to security settings.',
addclass: 'notification-primary',
icon: 'fa fa-twitter',
nonblock: {
nonblock: true,
nonblock_opacity: .2
}
});
});
$('#non-blocking-notice').click(function() {
new PNotify({
title: 'Non-Blocking',
text: 'I\'m a special kind of notice called "non-blocking". When you hover over me I\'ll fade to show the elements underneath. Feel free to click any of them just like I wasn\'t even here.\n\nNote: HTML links don\'t trigger in some browsers, due to security settings.',
nonblock: {
nonblock: true,
nonblock_opacity: .2
}
});
});
$('#non-blocking-success').click(function() {
new PNotify({
title: 'Non-Blocking',
text: 'I\'m a special kind of notice called "non-blocking". When you hover over me I\'ll fade to show the elements underneath. Feel free to click any of them just like I wasn\'t even here.\n\nNote: HTML links don\'t trigger in some browsers, due to security settings.',
type: 'success',
nonblock: {
nonblock: true,
nonblock_opacity: .2
}
});
});
$('#non-blocking-info').click(function() {
new PNotify({
title: 'Non-Blocking',
text: 'I\'m a special kind of notice called "non-blocking". When you hover over me I\'ll fade to show the elements underneath. Feel free to click any of them just like I wasn\'t even here.\n\nNote: HTML links don\'t trigger in some browsers, due to security settings.',
type: 'info',
nonblock: {
nonblock: true,
nonblock_opacity: .2
}
});
});
$('#non-blocking-error').click(function() {
new PNotify({
title: 'Non-Blocking',
text: 'I\'m a special kind of notice called "non-blocking". When you hover over me I\'ll fade to show the elements underneath. Feel free to click any of them just like I wasn\'t even here.\n\nNote: HTML links don\'t trigger in some browsers, due to security settings.',
type: 'error',
nonblock: {
nonblock: true,
nonblock_opacity: .2
}
});
});
$('#non-blocking-dark').click(function() {
new PNotify({
title: 'Non-Blocking',
text: 'I\'m a special kind of notice called "non-blocking". When you hover over me I\'ll fade to show the elements underneath. Feel free to click any of them just like I wasn\'t even here.\n\nNote: HTML links don\'t trigger in some browsers, due to security settings.',
addclass: 'notification-dark',
icon: 'fa fa-user',
nonblock: {
nonblock: true,
nonblock_opacity: .2
}
});
});
/*
Sticky notifications
*/
$('#sticky-primary').click(function() {
new PNotify({
title: 'Sticky',
text: 'Check me out! I\'m a sticky notice. You\'ll have to close me yourself.',
addclass: 'notification-primary',
icon: 'fa fa-twitter',
hide: false,
buttons: {
sticker: false
}
});
});
$('#sticky-notice').click(function() {
new PNotify({
title: 'Sticky',
text: 'Check me out! I\'m a sticky notice. You\'ll have to close me yourself.',
hide: false,
buttons: {
sticker: false
}
});
});
$('#sticky-success').click(function() {
new PNotify({
title: 'Sticky',
text: 'Check me out! I\'m a sticky notice. You\'ll have to close me yourself.',
type: 'success',
hide: false,
buttons: {
sticker: false
}
});
});
$('#sticky-info').click(function() {
new PNotify({
title: 'Sticky',
text: 'Check me out! I\'m a sticky notice. You\'ll have to close me yourself.',
type: 'info',
hide: false,
buttons: {
sticker: false
}
});
});
$('#sticky-error').click(function() {
new PNotify({
title: 'Sticky',
text: 'Check me out! I\'m a sticky notice. You\'ll have to close me yourself.',
type: 'error',
hide: false,
buttons: {
sticker: false
}
});
});
$('#sticky-dark').click(function() {
new PNotify({
title: 'Sticky',
text: 'Check me out! I\'m a sticky notice. You\'ll have to close me yourself.',
addclass: 'notification-dark',
icon: 'fa fa-user',
hide: false,
buttons: {
sticker: false
}
});
});
/*
Click to close notifications
*/
$('#click-to-close-primary').click(function() {
var notice = new PNotify({
title: 'Click to Close',
text: 'Check me out! I\'m a sticky notice. You\'ll have to click me to close.',
addclass: 'notification-primary click-2-close',
icon: 'fa fa-twitter',
hide: false,
buttons: {
closer: false,
sticker: false
}
});
notice.get().click(function() {
notice.remove();
});
});
$('#click-to-close-notice').click(function() {
var notice = new PNotify({
title: 'Click to Close',
text: 'Check me out! I\'m a sticky notice. You\'ll have to click me to close.',
addclass: 'click-2-close',
hide: false,
buttons: {
closer: false,
sticker: false
}
});
notice.get().click(function() {
notice.remove();
});
});
$('#click-to-close-success').click(function() {
var notice = new PNotify({
title: 'Click to Close',
text: 'Check me out! I\'m a sticky notice. You\'ll have to click me to close.',
type: 'success',
addclass: 'click-2-close',
hide: false,
buttons: {
closer: false,
sticker: false
}
});
notice.get().click(function() {
notice.remove();
});
});
$('#click-to-close-info').click(function() {
var notice = new PNotify({
title: 'Click to Close',
text: 'Check me out! I\'m a sticky notice. You\'ll have to click me to close.',
type: 'info',
addclass: 'click-2-close',
hide: false,
buttons: {
closer: false,
sticker: false
}
});
notice.get().click(function() {
notice.remove();
});
});
$('#click-to-close-error').click(function() {
var notice = new PNotify({
title: 'Click to Close',
text: 'Check me out! I\'m a sticky notice. You\'ll have to click me to close.',
type: 'error',
addclass: 'click-2-close',
hide: false,
buttons: {
closer: false,
sticker: false
}
});
notice.get().click(function() {
notice.remove();
});
});
$('#click-to-close-dark').click(function() {
var notice = new PNotify({
title: 'Click to Close',
text: 'Check me out! I\'m a sticky notice. You\'ll have to click me to close.',
addclass: 'notification-dark click-2-close',
icon: 'fa fa-user',
hide: false,
buttons: {
closer: false,
sticker: false
}
});
notice.get().click(function() {
notice.remove();
});
});
/*
Positions
*/
var stack_topleft = {"dir1": "down", "dir2": "right", "push": "top"};
var stack_bottomleft = {"dir1": "right", "dir2": "up", "push": "top"};
var stack_bottomright = {"dir1": "up", "dir2": "left", "firstpos1": 15, "firstpos2": 15};
var stack_bar_top = {"dir1": "down", "dir2": "right", "push": "top", "spacing1": 0, "spacing2": 0};
var stack_bar_bottom = {"dir1": "up", "dir2": "right", "spacing1": 0, "spacing2": 0};
$('#position-1-primary').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
addclass: 'notification-primary stack-topleft',
icon: 'fa fa-twitter'
});
});
$('#position-1-notice').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
addclass: 'stack-topleft'
});
});
$('#position-1-success').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
type: 'success',
addclass: 'stack-topleft'
});
});
$('#position-1-info').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
type: 'info',
addclass: 'stack-topleft'
});
});
$('#position-1-error').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
type: 'error',
addclass: 'stack-topleft'
});
});
$('#position-1-dark').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
addclass: 'notification-dark stack-topleft',
icon: 'fa fa-user'
});
});
$('#position-2-primary').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
addclass: 'notification-primary stack-bottomleft',
icon: 'fa fa-twitter',
stack: stack_bottomleft
});
});
$('#position-2-notice').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
addclass: 'stack-bottomleft',
stack: stack_bottomleft
});
});
$('#position-2-success').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
type: 'success',
addclass: 'stack-bottomleft',
stack: stack_bottomleft
});
});
$('#position-2-info').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
type: 'info',
addclass: 'stack-bottomleft',
stack: stack_bottomleft
});
});
$('#position-2-error').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
type: 'error',
addclass: 'stack-bottomleft',
stack: stack_bottomleft
});
});
$('#position-2-dark').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
addclass: 'notification-dark stack-bottomleft',
icon: 'fa fa-user',
stack: stack_bottomleft
});
});
$('#position-3-primary').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
addclass: 'notification-primary stack-bottomright',
icon: 'fa fa-twitter',
stack: stack_bottomright
});
});
$('#position-3-notice').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
addclass: 'stack-bottomright',
stack: stack_bottomright
});
});
$('#position-3-success').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
type: 'success',
addclass: 'stack-bottomright',
stack: stack_bottomright
});
});
$('#position-3-info').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
type: 'info',
addclass: 'stack-bottomright',
stack: stack_bottomright
});
});
$('#position-3-error').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
type: 'error',
addclass: 'stack-bottomright',
stack: stack_bottomright
});
});
$('#position-3-dark').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
addclass: 'notification-dark stack-bottomright',
icon: 'fa fa-user',
stack: stack_bottomright
});
});
$('#position-4-primary').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
addclass: 'notification-primary stack-bar-top',
icon: 'fa fa-twitter',
stack: stack_bar_top,
width: "100%"
});
});
$('#position-4-notice').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
addclass: 'stack-bar-top',
stack: stack_bar_top,
width: "100%"
});
});
$('#position-4-success').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
type: 'success',
addclass: 'stack-bar-top',
stack: stack_bar_top,
width: "100%"
});
});
$('#position-4-info').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
type: 'info',
addclass: 'stack-bar-top',
stack: stack_bar_top,
width: "100%"
});
});
$('#position-4-error').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
type: 'error',
addclass: 'stack-bar-top',
stack: stack_bar_top,
width: "100%"
});
});
$('#position-4-dark').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
addclass: 'notification-dark stack-bar-top',
icon: 'fa fa-user',
stack: stack_bar_top,
width: "100%"
});
});
$('#position-5-primary').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
addclass: 'notification-primary stack-bar-bottom',
icon: 'fa fa-twitter',
stack: stack_bar_bottom,
width: "70%"
});
});
$('#position-5-notice').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
addclass: 'stack-bar-bottom',
stack: stack_bar_bottom,
width: "70%"
});
});
$('#position-5-success').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
type: 'success',
addclass: 'stack-bar-bottom',
stack: stack_bar_bottom,
width: "70%"
});
});
$('#position-5-info').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
type: 'info',
addclass: 'stack-bar-bottom',
stack: stack_bar_bottom,
width: "70%"
});
});
$('#position-5-error').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
type: 'error',
addclass: 'stack-bar-bottom',
stack: stack_bar_bottom,
width: "70%"
});
});
$('#position-5-dark').click(function() {
var notice = new PNotify({
title: 'Notification',
text: 'Some notification text.',
addclass: 'notification-dark stack-bar-bottom',
icon: 'fa fa-user',
stack: stack_bar_bottom,
width: "70%"
});
});
/*
Desktop Notifications Code
*/
$.each(['notice', 'error', 'info', 'success'], function( i, type ) {
$( '#desktop-' + type ).click(function() {
PNotify.desktop.permission();
(new PNotify({
title: 'Desktop ' + type.charAt(0).toUpperCase() + type.slice(1),
text: 'If you\'ve given me permission, I\'ll appear as a desktop notification. If you haven\'t, I\'ll still appear as a regular notice.',
type: type,
desktop: {
desktop: true
}
})).get().click(function() {
alert('Hey! You clicked the desktop notification!');
});
});
});
$('#desktop-sticky').click(function() {
PNotify.desktop.permission();
(new PNotify({
title: 'Sticky Desktop Notice',
text: 'I\'m a sticky notice, so you\'ll have to close me yourself. (Some systems don\'t allow sticky notifications.) If you\'ve given me permission, I\'ll appear as a desktop notification. If you haven\'t, I\'ll still appear as a regular notice.',
hide: false,
desktop: {
desktop: true
}
})).get().click(function() {
alert('Hey! You clicked the desktop notification!');
});
});
$('#desktop-custom').click(function() {
PNotify.desktop.permission();
(new PNotify({
title: 'Desktop Custom Icon',
text: 'If you\'ve given me permission, I\'ll appear as a desktop notification. If you haven\'t, I\'ll still appear as a regular notice.',
desktop: {
desktop: true,
icon: 'assets/images/!happy-face.png'
}
})).get().click(function() {
alert('Hey! You clicked the desktop notification!');
});
});
}).apply( this, [ jQuery ]);
@@ -0,0 +1,31 @@
(function( $ ) {
'use strict';
/*
Flot: Pie
*/
(function() {
var plot = $.plot('#flotPie', flotPieData, {
series: {
pie: {
show: true,
combine: {
color: '#999',
threshold: 0.1
}
}
},
legend: {
show: false,
},
grid: {
hoverable: true,
clickable: true
}
});
})();
}).apply( this, [ jQuery ]);
@@ -0,0 +1,26 @@
(function( $ ) {
'use strict';
/*
Refresh page
*/
$('#portletRefresh').on('click', function(ev) {
ev.preventDefault();
window.location.reload();
});
/*
Restore to default
*/
$('#portletReset').on('click', function(ev) {
ev.preventDefault();
store.remove('__portletOrder');
store.remove('__portletState');
window.location.reload();
});
}).apply( this, [ jQuery ]);
@@ -0,0 +1,125 @@
(function( $ ) {
'use strict';
/*
Basic
*/
$('#treeBasic').jstree({
'core' : {
'themes' : {
'responsive': false
}
},
'types' : {
'default' : {
'icon' : 'fa fa-folder'
},
'file' : {
'icon' : 'fa fa-file'
}
},
'plugins': ['types']
});
/*
Checkbox
*/
$('#treeCheckbox').jstree({
'core' : {
'themes' : {
'responsive': false
}
},
'types' : {
'default' : {
'icon' : 'fa fa-folder'
},
'file' : {
'icon' : 'fa fa-file'
}
},
'plugins': ['types', 'checkbox']
});
/*
Ajax HTML
*/
$('#treeAjaxHTML').jstree({
'core' : {
'themes' : {
'responsive': false
},
'check_callback' : true,
'data' : {
'url' : function (node) {
return 'assets/ajax/ajax-treeview-nodes.html';
},
'data' : function (node) {
return { 'parent' : node.id };
}
}
},
'types' : {
'default' : {
'icon' : 'fa fa-folder'
},
'file' : {
'icon' : 'fa fa-file'
}
},
'plugins': ['types']
});
/*
Ajax JSON
*/
$('#treeAjaxJSON').jstree({
'core' : {
'themes' : {
'responsive': false
},
'check_callback' : true,
'data' : {
'url' : function (node) {
return node.id === '#' ? 'assets/ajax/ajax-treeview-roots.json' : 'assets/ajax/ajax-treeview-children.json';
},
'data' : function (node) {
return { 'id' : node.id };
}
}
},
'types' : {
'default' : {
'icon' : 'fa fa-folder'
},
'file' : {
'icon' : 'fa fa-file'
}
},
'plugins': ['types']
});
/*
Drag & Drop
*/
$('#treeDragDrop').jstree({
'core' : {
'check_callback' : true,
'themes' : {
'responsive': false
}
},
'types' : {
'default' : {
'icon' : 'fa fa-folder'
},
'file' : {
'icon' : 'fa fa-file'
}
},
'plugins': ['types', 'dnd']
});
}).apply( this, [ jQuery ]);
@@ -0,0 +1,84 @@
(function( $ ) {
'use strict';
$(function() {
/*
Flot
*/
var plot = $.plot('#flotWidgetsSales1', flotWidgetsSales1Data, {
series: {
lines: {
show: true,
lineWidth: 2
},
points: {
show: true
},
shadowSize: 0
},
grid: {
hoverable: true,
clickable: true,
borderColor: 'transparent',
borderWidth: 1,
labelMargin: 15,
backgroundColor: 'transparent'
},
yaxis: {
min: 0,
color: 'transparent'
},
xaxis: {
mode: 'categories',
color: 'transparent'
},
legend: {
show: false
},
tooltip: true,
tooltipOpts: {
content: '%x: %y',
shifts: {
x: -30,
y: 25
},
defaultTheme: false
}
});
/*
Morris
*/
Morris.Line({
resize: true,
element: 'morrisLine',
data: morrisLineData,
grid: false,
xkey: 'y',
ykeys: ['a'],
labels: ['Series A'],
hideHover: 'always',
lineColors: ['#FFF'],
gridTextColor: 'rgba(255,255,255,0.4)'
});
/*
Sparkline: Bar
*/
$("#sparklineBar").sparkline(sparklineBarData, {
type: 'bar',
width: '80',
height: '50',
barColor: '#0088cc',
negBarColor: '#B20000'
});
$('.circular-bar-chart').appear();
});
}).apply(this, [ jQuery ]);