new pisilinux web sites

This commit is contained in:
Erkan IŞIK
2026-07-01 16:44:17 +03:00
commit b58488b586
21740 changed files with 2066209 additions and 0 deletions
@@ -0,0 +1,115 @@
$(function () {
"use strict";
//****************************
/* Left header Theme Change function Start */
//****************************
function handlelogobg() {
$(".theme-color .theme-item .theme-link").on("click", function () {
var logobgskin = $(this).attr("data-logobg");
$(".topbar .top-navbar .navbar-header").attr("data-logobg", logobgskin);
});
}
handlelogobg();
//****************************
/* Top navbar Theme Change function Start */
//****************************
function handlenavbarbg() {
if ($("#main-wrapper").attr("data-navbarbg") == "skin5") {
// do this
$(".topbar .navbar").addClass("navbar-light");
$(".topbar .navbar").removeClass("navbar-dark");
} else {
// do that
}
$(".theme-color .theme-item .theme-link").on("click", function () {
var navbarbgskin = $(this).attr("data-navbarbg");
$("#main-wrapper").attr("data-navbarbg", navbarbgskin);
$(".topbar .navbar-collapse").attr("data-navbarbg", navbarbgskin);
if ($("#main-wrapper").attr("data-navbarbg") == "skin5") {
// do this
$(".topbar .navbar").addClass("navbar-light");
$(".topbar .navbar").removeClass("navbar-dark");
} else {
// do that
$(".topbar .navbar").removeClass("navbar-light");
$(".topbar .navbar").addClass("navbar-dark");
}
});
}
handlenavbarbg();
//****************************
// ManageSidebar Type
//****************************
function handlesidebartype() {}
handlesidebartype();
//****************************
/* Manage sidebar bg color */
//****************************
function handlesidebarbg() {
$(".theme-color .theme-item .theme-link").on("click", function () {
var sidebarbgskin = $(this).attr("data-sidebarbg");
$(".left-sidebar").attr("data-sidebarbg", sidebarbgskin);
});
}
handlesidebarbg();
//****************************
/* sidebar position */
//****************************
function handlesidebarposition() {
$("#sidebar-position").change(function () {
if ($(this).is(":checked")) {
$("#main-wrapper").attr("data-sidebar-position", "fixed");
$(".topbar .top-navbar .navbar-header").attr("data-navheader", "fixed");
} else {
$("#main-wrapper").attr("data-sidebar-position", "absolute");
$(".topbar .top-navbar .navbar-header").attr(
"data-navheader",
"relative"
);
}
});
}
handlesidebarposition();
//****************************
/* Header position */
//****************************
function handleheaderposition() {
$("#header-position").change(function () {
if ($(this).is(":checked")) {
$("#main-wrapper").attr("data-header-position", "fixed");
} else {
$("#main-wrapper").attr("data-header-position", "relative");
}
});
}
handleheaderposition();
//****************************
/* sidebar position */
//****************************
function handleboxedlayout() {
$("#boxed-layout").change(function () {
if ($(this).is(":checked")) {
$("#main-wrapper").attr("data-boxed-layout", "boxed");
} else {
$("#main-wrapper").attr("data-boxed-layout", "full");
}
});
}
handleboxedlayout();
//****************************
/* Header position */
//****************************
function handlethemeview() {
$("#theme-view").change(function () {
if ($(this).is(":checked")) {
$("body").attr("data-theme", "dark");
} else {
$("body").attr("data-theme", "light");
}
});
}
handlethemeview();
});
@@ -0,0 +1,120 @@
$(function () {
"use strict";
$(".preloader").fadeOut();
// ==============================================================
// Theme options
// ==============================================================
// ==============================================================
// sidebar-hover
// ==============================================================
$(".left-sidebar").hover(
function () {
$(".navbar-header").addClass("expand-logo");
},
function () {
$(".navbar-header").removeClass("expand-logo");
}
);
// this is for close icon when navigation open in mobile view
$(".nav-toggler").on("click", function () {
$("#main-wrapper").toggleClass("show-sidebar");
$(".nav-toggler i").toggleClass("ti-menu");
});
$(".nav-lock").on("click", function () {
$("body").toggleClass("lock-nav");
$(".nav-lock i").toggleClass("mdi-toggle-switch-off");
$("body, .page-wrapper").trigger("resize");
});
$(".search-box a, .search-box .app-search .srh-btn").on("click", function () {
$(".app-search").toggle(200);
$(".app-search input").focus();
});
// ==============================================================
// Right sidebar options
// ==============================================================
$(function () {
$(".service-panel-toggle").on("click", function () {
$(".customizer").toggleClass("show-service-panel");
});
$(".page-wrapper").on("click", function () {
$(".customizer").removeClass("show-service-panel");
});
});
// ==============================================================
// This is for the floating labels
// ==============================================================
$(".floating-labels .form-control")
.on("focus blur", function (e) {
$(this)
.parents(".form-group")
.toggleClass("focused", e.type === "focus" || this.value.length > 0);
})
.trigger("blur");
// ==============================================================
//tooltip
// ==============================================================
$(function () {
$('[data-toggle="tooltip"]').tooltip();
});
// ==============================================================
//Popover
// ==============================================================
$(function () {
$('[data-toggle="popover"]').popover();
});
// ==============================================================
// Perfact scrollbar
// ==============================================================
$(".message-center, .customizer-body, .scrollable").perfectScrollbar({
wheelPropagation: !0,
});
/*var ps = new PerfectScrollbar('.message-body');
var ps = new PerfectScrollbar('.notifications');
var ps = new PerfectScrollbar('.scroll-sidebar');
var ps = new PerfectScrollbar('.customizer-body');*/
// ==============================================================
// Resize all elements
// ==============================================================
$("body, .page-wrapper").trigger("resize");
$(".page-wrapper").delay(20).show();
// ==============================================================
// To do list
// ==============================================================
$(".list-task li label").click(function () {
$(this).toggleClass("task-done");
});
//****************************
/* This is for the mini-sidebar if width is less then 1170*/
//****************************
var setsidebartype = function () {
var width = window.innerWidth > 0 ? window.innerWidth : this.screen.width;
if (width < 1170) {
$("#main-wrapper").attr("data-sidebartype", "mini-sidebar");
} else {
$("#main-wrapper").attr("data-sidebartype", "full");
}
};
$(window).ready(setsidebartype);
$(window).on("resize", setsidebartype);
//****************************
/* This is for sidebartoggler*/
//****************************
$(".sidebartoggler").on("click", function () {
$("#main-wrapper").toggleClass("mini-sidebar");
if ($("#main-wrapper").hasClass("mini-sidebar")) {
$(".sidebartoggler").prop("checked", !0);
$("#main-wrapper").attr("data-sidebartype", "mini-sidebar");
} else {
$(".sidebartoggler").prop("checked", !1);
$("#main-wrapper").attr("data-sidebartype", "full");
}
});
});
@@ -0,0 +1,120 @@
$(function () {
"use strict";
$(".preloader").fadeOut();
// ==============================================================
// Theme options
// ==============================================================
// ==============================================================
// sidebar-hover
// ==============================================================
$(".left-sidebar").hover(
function () {
$(".navbar-header").addClass("expand-logo");
},
function () {
$(".navbar-header").removeClass("expand-logo");
}
);
// this is for close icon when navigation open in mobile view
$(".nav-toggler").on("click", function () {
$("#main-wrapper").toggleClass("show-sidebar");
$(".nav-toggler i").toggleClass("ti-menu");
});
$(".nav-lock").on("click", function () {
$("body").toggleClass("lock-nav");
$(".nav-lock i").toggleClass("mdi-toggle-switch-off");
$("body, .page-wrapper").trigger("resize");
});
$(".search-box a, .search-box .app-search .srh-btn").on("click", function () {
$(".app-search").toggle(200);
$(".app-search input").focus();
});
// ==============================================================
// Right sidebar options
// ==============================================================
$(function () {
$(".service-panel-toggle").on("click", function () {
$(".customizer").toggleClass("show-service-panel");
});
$(".page-wrapper").on("click", function () {
$(".customizer").removeClass("show-service-panel");
});
});
// ==============================================================
// This is for the floating labels
// ==============================================================
$(".floating-labels .form-control")
.on("focus blur", function (e) {
$(this)
.parents(".form-group")
.toggleClass("focused", e.type === "focus" || this.value.length > 0);
})
.trigger("blur");
// ==============================================================
//tooltip
// ==============================================================
$(function () {
$('[data-toggle="tooltip"]').tooltip();
});
// ==============================================================
//Popover
// ==============================================================
$(function () {
$('[data-toggle="popover"]').popover();
});
// ==============================================================
// Perfact scrollbar
// ==============================================================
$(".message-center, .customizer-body, .scrollable").perfectScrollbar({
wheelPropagation: !0,
});
/*var ps = new PerfectScrollbar('.message-body');
var ps = new PerfectScrollbar('.notifications');
var ps = new PerfectScrollbar('.scroll-sidebar');
var ps = new PerfectScrollbar('.customizer-body');*/
// ==============================================================
// Resize all elements
// ==============================================================
$("body, .page-wrapper").trigger("resize");
$(".page-wrapper").show();
// ==============================================================
// To do list
// ==============================================================
$(".list-task li label").click(function () {
$(this).toggleClass("task-done");
});
//****************************
/* This is for the mini-sidebar if width is less then 1170*/
//****************************
var setsidebartype = function () {
var width = window.innerWidth > 0 ? window.innerWidth : this.screen.width;
if (width < 1170) {
$("#main-wrapper").attr("data-sidebartype", "mini-sidebar");
} else {
$("#main-wrapper").attr("data-sidebartype", "full");
}
};
$(window).ready(setsidebartype);
$(window).on("resize", setsidebartype);
//****************************
/* This is for sidebartoggler*/
//****************************
$(".sidebartoggler").on("click", function () {
$("#main-wrapper").toggleClass("mini-sidebar");
if ($("#main-wrapper").hasClass("mini-sidebar")) {
$(".sidebartoggler").prop("checked", !0);
$("#main-wrapper").attr("data-sidebartype", "mini-sidebar");
} else {
$(".sidebartoggler").prop("checked", !1);
$("#main-wrapper").attr("data-sidebartype", "full");
}
});
});
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,207 @@
/*!
* jQuery UI Touch Punch Improved 0.3.1
*
*
* Copyright 2013, Chris Hutchinson <chris@brushd.com>
* Original jquery-ui-touch-punch Copyright 2011, Dave Furfero
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Depends:
* jquery.ui.widget.js
* jquery.ui.mouse.js
*/
(function ($) {
var pointerEnabled =
window.navigator.pointerEnabled || window.navigator.msPointerEnabled;
// Detect touch support
$.support.touch = "ontouchend" in document || pointerEnabled;
// Ignore browsers without touch support or mouse support
if (!$.support.touch || !$.ui.mouse) {
return;
}
var mouseProto = $.ui.mouse.prototype,
_mouseInit = mouseProto._mouseInit,
touchHandled;
// see http://stackoverflow.com/a/12714084/220825
function fixTouch(touch) {
var winPageX = window.pageXOffset,
winPageY = window.pageYOffset,
x = touch.clientX,
y = touch.clientY;
if (
(touch.pageY === 0 && Math.floor(y) > Math.floor(touch.pageY)) ||
(touch.pageX === 0 && Math.floor(x) > Math.floor(touch.pageX))
) {
// iOS4 clientX/clientY have the value that should have been
// in pageX/pageY. While pageX/page/ have the value 0
x = x - winPageX;
y = y - winPageY;
} else if (y < touch.pageY - winPageY || x < touch.pageX - winPageX) {
// Some Android browsers have totally bogus values for clientX/Y
// when scrolling/zooming a page. Detectable since clientX/clientY
// should never be smaller than pageX/pageY minus page scroll
x = touch.pageX - winPageX;
y = touch.pageY - winPageY;
}
return {
clientX: x,
clientY: y,
};
}
/**
* Simulate a mouse event based on a corresponding touch event
* @param {Object} event A touch event
* @param {String} simulatedType The corresponding mouse event
*/
function simulateMouseEvent(event, simulatedType) {
// Ignore multi-touch events
if (
(!pointerEnabled && event.originalEvent.touches.length > 1) ||
(pointerEnabled && !event.isPrimary)
) {
return;
}
var touch = pointerEnabled
? event.originalEvent
: event.originalEvent.changedTouches[0],
simulatedEvent = document.createEvent("MouseEvents"),
coord = fixTouch(touch);
// Check if element is an input or a textarea
if ($(touch.target).is("input") || $(touch.target).is("textarea")) {
event.stopPropagation();
} else {
event.preventDefault();
}
// Initialize the simulated mouse event using the touch event's coordinates
simulatedEvent.initMouseEvent(
simulatedType, // type
true, // bubbles
true, // cancelable
window, // view
1, // detail
event.screenX || touch.screenX, // screenX
event.screenY || touch.screenY, // screenY
event.clientX || coord.clientX, // clientX
event.clientY || coord.clientY, // clientY
false, // ctrlKey
false, // altKey
false, // shiftKey
false, // metaKey
0, // button
null // relatedTarget
);
// Dispatch the simulated event to the target element
event.target.dispatchEvent(simulatedEvent);
}
/**
* Handle the jQuery UI widget's touchstart events
* @param {Object} event The widget element's touchstart event
*/
mouseProto._touchStart = function (event) {
var self = this;
// Ignore the event if another widget is already being handled
if (
touchHandled ||
(!pointerEnabled &&
!self._mouseCapture(event.originalEvent.changedTouches[0]))
) {
return;
}
// Set the flag to prevent other widgets from inheriting the touch event
touchHandled = true;
// Track movement to determine if interaction was a click
self._touchMoved = false;
// Simulate the mouseover event
simulateMouseEvent(event, "mouseover");
// Simulate the mousemove event
simulateMouseEvent(event, "mousemove");
// Simulate the mousedown event
simulateMouseEvent(event, "mousedown");
};
/**
* Handle the jQuery UI widget's touchmove events
* @param {Object} event The document's touchmove event
*/
mouseProto._touchMove = function (event) {
// Ignore event if not handled
if (!touchHandled) {
return;
}
// Interaction was not a click
this._touchMoved = true;
// Simulate the mousemove event
simulateMouseEvent(event, "mousemove");
};
/**
* Handle the jQuery UI widget's touchend events
* @param {Object} event The document's touchend event
*/
mouseProto._touchEnd = function (event) {
// Ignore event if not handled
if (!touchHandled) {
return;
}
// Simulate the mouseup event
simulateMouseEvent(event, "mouseup");
// Simulate the mouseout event
simulateMouseEvent(event, "mouseout");
// If the touch interaction did not move, it should trigger a click
if (!this._touchMoved) {
// Simulate the click event
simulateMouseEvent(event, "click");
}
// Unset the flag to allow other widgets to inherit the touch event
touchHandled = false;
};
/**
* A duck punch of the $.ui.mouse _mouseInit method to support touch events.
* This method extends the widget with bound touch event handlers that
* translate touch events to mouse events and pass them to the widget's
* original mouse event handling methods.
*/
mouseProto._mouseInit = function () {
var self = this;
self.element.on({
touchstart: $.proxy(self, "_touchStart"),
touchmove: $.proxy(self, "_touchMove"),
touchend: $.proxy(self, "_touchEnd"),
pointerDown: $.proxy(self, "_touchStart"),
pointerMove: $.proxy(self, "_touchMove"),
pointerUp: $.proxy(self, "_touchEnd"),
MSPointerDown: $.proxy(self, "_touchStart"),
MSPointerMove: $.proxy(self, "_touchMove"),
MSPointerUp: $.proxy(self, "_touchEnd"),
});
// Call the original $.ui.mouse init method
_mouseInit.call(self);
};
})(jQuery);
@@ -0,0 +1,170 @@
$(function(){
$('#example1').DataTable();
$('#datatable').DataTable();
$('#activemembers').DataTable();
$('#wiki_list').DataTable({
"language": {"url": "https://cdn.datatables.net/plug-ins/1.10.19/i18n/Turkish.json"}
});
$('.username').select2();
$('body').on('click', '#selectAll', function () {
if ($(this).hasClass('allChecked')) {
$('input[type="checkbox"]', '#example').prop('checked', false);
} else {
$('input[type="checkbox"]', '#example').prop('checked', true);
}
$(this).toggleClass('allChecked');
})
$('.link').click(function(){
var name = $(this).attr("data-link");
$("#title").val(name);
});
$('.status').click(function(){
var stat = $(this).data("status");
var id = $(this).data("id");
$.post('ajax/duyuruStatusChange', {id:id, status:status}, function(response){
location.reload();
});
})
$('.downloadStatus').click(function(){
var stat = $(this).data("status");
var id = $(this).data("id");
$.post('ajax/downloadStatusChange', {id:id, status:status}, function(response){
location.reload();
});
})
$('.sliderStat').click(function(){
var id = $(this).attr("data-id");
var status = $(this).attr("data-status");
$.post('slayt/sliderStatusChange', {id:id, status:status}, function(response){
location.reload();
});
})//sliderStat end
$(".activetionSend").click(function(){
var param = $(this).data("id");
$.post('/panel/user/activemailSendAjax',{par:param},function(data, status, xhr){
Swal.fire({
title: data,
showConfirmButton: false,
icon: 'success',
});
});
});//activetionSend
$(".sendform").click(function(){
$.ajax({
type: 'post',
url: 'ajax/emailSend',
data: $('#cevap1').serialize(),
success:function(cvp){
$.confirm({
title: 'Pisilinux Eposta!',
content: cvp,
theme: 'dark',
buttons: {
Mesajlar: function(){
$(location).attr('href', '/panel/iletisim');
},
Anasayfa: function(){
$(location).attr('href', '/panel');
}
}
});
}
});
});
$(".delete_member").click(function(){
var param = $(this).data("id");
Swal.fire({
title: 'Üyeyi Silmek İstediğinizden Eminmisiniz?',
text: "Bu işlemi geri alamazsınız",
icon: 'error',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'EVET ÜYEYİ SİL',
cancelButtonText: 'Silme'
}).then((result) => {
if (result.isConfirmed) {
$.post('user/deleteMemberAjax',{par:param},function(response){
Swal.fire({
title: response,
timer: 1500,
timerProgressBar: true,
showConfirmButton: false,
icon: 'success',
willClose: () => {
location.reload();
}
});
});
}
})
});
$(".disable_member").click(function(){
var param = $(this).data("id");
$.post('user/disableMemberAjax',{par:param},function(response){
Swal.fire({
title: response,
timer: 2000,
timerProgressBar: true,
showConfirmButton: false,
icon: 'success',
willClose: () => {
location.reload();
}
});
});
});
var sayac1 = Number($("#sayac").val())-1;
if(sayac1){
var sayac=sayac1+1;
}else{
var sayac=1;
}
$('.add').click(function() {
sayac++;
var form = "<div class='control-group'><label class='control-label'>LINK"+sayac+" :</label><div class='controls pals' >";
var form1 = "<select name='downlink["+sayac+"][]' class='span2 count' id='count'><option >Selected Countries</option></select>";
var form2 = "<input type='text' name='downlink["+sayac+"][]' class='span8' required placeholder='link'><input type='hidden' name='downlink["+sayac+"][]' value='0'></div></div></div>";
$.getJSON('/countries.json', null, function(data) {
$.each(data, function(idx, obj) {
$(".count").append('<option value="'+obj.id+'">'+obj.name+'</option>' );
});
});
$(".download").append(form + form1+ form2);
});
});
@@ -0,0 +1,207 @@
$(function(){
$('#example1').DataTable();
$('#datatable').DataTable();
$('#activemembers').DataTable();
$('#wiki_list').DataTable({
"language": {"url": "https://cdn.datatables.net/plug-ins/1.10.19/i18n/Turkish.json"}
});
$('.username').select2();
$('.ayarSec').click(function(){
var id = $(this).attr("data-id")
var title = $(this).attr("data-title")
var value = $(this).attr("data-value")
$(".modal-body #title").val( title );
$(".modal-body #value").val( value );
$(".modal-body #id").val( id );
});
$('.logoValue').click(function(){
var value = $(this).attr("data-value");
$.post('selectLogo', {value:value}, function(rest){
location.reload();
// alert(rest)
});
});
$('body').on('click', '#selectAll', function () {
if ($(this).hasClass('allChecked')) {
$('input[type="checkbox"]', '#example').prop('checked', false);
} else {
$('input[type="checkbox"]', '#example').prop('checked', true);
}
$(this).toggleClass('allChecked');
})
$('.link').click(function(){
var name = $(this).attr("data-link");
$("#title").val(name);
});
$('.status').click(function(){
var stat = $(this).data("status");
var id = $(this).data("id");
$.post('ajax/duyuruStatusChange', {id:id, status:status}, function(response){
location.reload();
});
})
$('.sliderStat').click(function(){
var id = $(this).attr("data-id");
var status = $(this).attr("data-status");
$.post('slayt/sliderStatusChange', {id:id, status:status}, function(response){
location.reload();
});
})//sliderStat end
$(".activetionSend").click(function(){
var param = $(this).data("id");
$.post('/panel/user/activemailSendAjax',{par:param},function(data, status, xhr){
Swal.fire({
title: data,
showConfirmButton: false,
icon: 'success',
});
});
});//activetionSend
$(".sendform").click(function(){
$.ajax({
type: 'post',
url: 'ajax/emailSend',
data: $('#cevap1').serialize(),
success:function(cvp){
$.confirm({
title: 'Pisilinux Eposta!',
content: cvp,
theme: 'dark',
buttons: {
Mesajlar: function(){
$(location).attr('href', '/panel/iletisim');
},
Anasayfa: function(){
$(location).attr('href', '/panel');
}
}
});
}
});
});
$(".delete_member").click(function(){
var param = $(this).data("id");
Swal.fire({
title: 'Üyeyi Silmek İstediğinizden Eminmisiniz?',
text: "Bu işlemi geri alamazsınız",
icon: 'error',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'EVET ÜYEYİ SİL',
cancelButtonText: 'Silme'
}).then((result) => {
if (result.isConfirmed) {
$.post('user/deleteMemberAjax',{par:param},function(response){
Swal.fire({
title: response,
timer: 1500,
timerProgressBar: true,
showConfirmButton: false,
icon: 'success',
willClose: () => {
location.reload();
}
});
});
}
})
});
$(".disable_member").click(function(){
var param = $(this).data("id");
$.post('user/disableMemberAjax',{par:param},function(response){
Swal.fire({
title: response,
timer: 2000,
timerProgressBar: true,
showConfirmButton: false,
icon: 'success',
willClose: () => {
location.reload();
}
});
});
});
var sayac1 = Number($("#sayac").val())-1;
if(sayac1){
var sayac=sayac1+1;
}else{
var sayac=1;
}
$('.add').click(function() {
sayac++;
var form = "<div class='control-group'><label class='control-label'>LINK"+sayac+" :</label><div class='controls pals' >";
var form1 = "<select name='downlink["+sayac+"][]' class='span2 count' id='count'><option >Selected Countries</option></select>";
var form2 = "<input type='text' name='downlink["+sayac+"][]' class='span8' required placeholder='link'><input type='hidden' name='downlink["+sayac+"][]' value='0'><input type='hidden' name='downlink["+sayac+"][]' value='1'></div></div></div>";
$.getJSON('/countries.json', null, function(data) {
$.each(data, function(idx, obj) {
$(".count").append('<option value="'+obj.id+'">'+obj.name+'</option>' );
});
});
$(".download").append(form + form1+ form2);
});
$('.downlinkstatus').click(function(){
var id = $(this).attr("data-id");
var status = $(this).attr("data-status");
$.post('/panel/download/downlinkdStatusChange', {id:id, status:status}, function(response){
//alert(response);
location.reload();
});
})
$('.downlinkDelete').click(function(){
var id = $(this).attr("data-id");
$.post('/panel/download/downlinkDelete', {id:id}, function(response){
location.reload();
})
})
$('.downloadStatusChange').click(function(){
var id = $(this).attr("data-id");
var status = $(this).attr("data-status");
$.post('/panel/download/downloadStatusChange', {id:id, status:status}, function(response){
location.reload();
})
})
});
@@ -0,0 +1,141 @@
!(function ($) {
"use strict";
var CalendarApp = function () {
this.$body = $("body");
(this.$calendar = $("#calendar")),
(this.$event = "#calendar-events div.calendar-events"),
(this.$categoryForm = $("#add-new-event form")),
(this.$extEvents = $("#calendar-events")),
(this.$modal = $("#my-event")),
(this.$saveCategoryBtn = $(".save-category")),
(this.$calendarObj = null);
};
/* on drop */
(CalendarApp.prototype.onDrop = function (eventObj, date) {
var $this = this;
// retrieve the dropped element's stored Event Object
var originalEventObject = eventObj.data("eventObject");
var $categoryClass = eventObj.attr("data-class");
// 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;
if ($categoryClass) copiedEventObject["className"] = [$categoryClass];
// render the event on the calendar
$this.$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
eventObj.remove();
}
}),
/* on click on event */
(CalendarApp.prototype.onEventClick = function (calEvent, jsEvent, view) {
var $this = this;
var form = $("<form></form>");
form.append("<label>Change event name</label>");
form.append(
"<div class='input-group'><input class='form-control' type=text value='" +
calEvent.title +
"' /><span class='input-group-btn'><button type='submit' class='btn btn-success waves-effect waves-light'><i class='fa fa-check'></i> Save</button></span></div>"
);
$this.$modal.modal({
backdrop: "static",
});
$this.$modal
.find(".delete-event")
.show()
.end()
.find(".save-event")
.hide()
.end()
.find(".modal-body")
.empty()
.prepend(form)
.end()
.find(".delete-event")
.unbind("click")
.click(function () {
$this.$calendarObj.fullCalendar("removeEvents", function (ev) {
return ev._id == calEvent._id;
});
$this.$modal.modal("hide");
});
$this.$modal.find("form").on("submit", function () {
calEvent.title = form.find("input[type=text]").val();
$this.$calendarObj.fullCalendar("updateEvent", calEvent);
$this.$modal.modal("hide");
return false;
});
}),
(CalendarApp.prototype.enableDrag = function () {
//init events
$(this.$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
});
});
});
/* Initializing */
(CalendarApp.prototype.init = function () {
this.enableDrag();
/* Initialize the calendar */
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
var form = "";
var today = new Date($.now());
var defaultEvents = [];
var $this = this;
$this.$calendarObj = $this.$calendar.fullCalendar({
slotDuration: "00:15:00",
/* If we want to split day time each 15minutes */
minTime: "08:00:00",
maxTime: "19:00:00",
defaultView: "month",
handleWindowResize: true,
header: {
left: "prev,next today",
center: "title",
right: "month,agendaWeek,agendaDay",
},
events: defaultEvents,
editable: true,
droppable: true, // this allows things to be dropped onto the calendar !!!
eventLimit: true, // allow "more" link when too many events
selectable: true,
drop: function (date) {
$this.onDrop($(this), date);
},
select: function (start, end, allDay) {
$this.onSelect(start, end, allDay);
},
eventClick: function (calEvent, jsEvent, view) {
$this.onEventClick(calEvent, jsEvent, view);
},
});
}),
//init CalendarApp
($.CalendarApp = new CalendarApp()),
($.CalendarApp.Constructor = CalendarApp);
})(window.jQuery),
//initializing CalendarApp
$(window).on("load", function () {
$.CalendarApp.init();
});
@@ -0,0 +1,76 @@
$(function () {
var data = [5, 10, 15, 20, 15, 30, 40],
totalPoints = 100;
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] : 10,
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;
}
// Set up the control widget
var updateInterval = 1000;
$("#updateInterval")
.val(updateInterval)
.change(function () {
var v = $(this).val();
if (v && !isNaN(+v)) {
updateInterval = +v;
if (updateInterval < 1) {
updateInterval = 1;
} else if (updateInterval > 1000) {
updateInterval = 1000;
}
$(this).val("" + updateInterval);
}
});
var plot = $.plot("#placeholder1", [getRandomData()], {
series: {
shadowSize: 1, // Drawing is faster without shadows
lines: { fill: true, fillColor: "transparent" },
},
yaxis: {
min: 0,
max: 100,
show: true,
},
xaxis: {
show: false,
},
colors: ["#fe5419"],
grid: {
color: "#AFAFAF",
hoverable: true,
borderWidth: 0,
backgroundColor: "transparent",
},
tooltip: true,
tooltipOpts: {
content: "Visits: %x",
defaultTheme: false,
},
});
window.onresize = function (event) {
$.plot($("#placeholder1"), [getRandomData()]);
};
function update() {
plot.setData([getRandomData()]);
// Since the axes don't change, we don't need to call plot.setupGrid()
plot.draw();
setTimeout(update, updateInterval);
}
update();
});
@@ -0,0 +1,142 @@
$(function () {
// we use an inline data source in the example, usually data would
// be fetched from a server
// ==============================================================
// Real Time Visits
// ==============================================================
var data = [5, 10, 15, 20, 15, 30, 40],
totalPoints = 100;
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] : 10,
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;
}
// Set up the control widget
var updateInterval = 1000;
$("#updateInterval")
.val(updateInterval)
.change(function () {
var v = $(this).val();
if (v && !isNaN(+v)) {
updateInterval = +v;
if (updateInterval < 1) {
updateInterval = 1;
} else if (updateInterval > 1000) {
updateInterval = 1000;
}
$(this).val("" + updateInterval);
}
});
var plot = $.plot("#real-time", [getRandomData()], {
series: {
shadowSize: 1, // Drawing is faster without shadows
lines: { fill: true, fillColor: "transparent" },
},
yaxis: {
min: 0,
max: 100,
show: true,
},
xaxis: {
show: false,
},
colors: ["#488c13"],
grid: {
color: "#AFAFAF",
hoverable: true,
borderWidth: 0,
backgroundColor: "transparent",
},
tooltip: true,
tooltipOpts: {
content: "Visits: %x",
defaultTheme: false,
},
});
window.onresize = function (event) {
$.plot($("#real-time"), [getRandomData()]);
};
function update() {
plot.setData([getRandomData()]);
// Since the axes don't change, we don't need to call plot.setupGrid()
plot.draw();
setTimeout(update, updateInterval);
}
update();
console.log("document ready");
var offset = 0;
plot1();
function plot1() {
var sin = [],
cos = [];
for (var i = 0; i < 12; i += 0.2) {
sin.push([i, Math.sin(i + offset)]);
cos.push([i, Math.cos(i + offset)]);
}
var options = {
series: {
lines: {
show: true,
},
points: {
show: true,
},
},
grid: {
hoverable: true, //IMPORTANT! this is needed for tooltip to work
},
yaxis: {
min: -1.2,
max: 1.2,
},
colors: ["#ee7951", "#4fb9f0"],
grid: {
color: "#AFAFAF",
hoverable: true,
borderWidth: 0,
backgroundColor: "#FFF",
},
tooltip: true,
tooltipOpts: {
content: "'%s' of %x.1 is %y.4",
shifts: {
x: -60,
y: 25,
},
},
};
var plotObj = $.plot(
$("#flot-line-chart"),
[
{
data: sin,
label: "sin(x)",
},
{
data: cos,
label: "cos(x)",
},
],
options
);
}
});
@@ -0,0 +1,118 @@
/*
Template Name: Admin Pro Admin
Author: Wrappixel
Email: niravjoshi87@gmail.com
File: js
*/
$(function () {
"use strict";
// ==============================================================
// Newsletter
// ==============================================================
/*var chart = new Chartist.Line('.campaign', {
labels: [1, 2, 3, 4, 5, 6, 7, 8],
series: [
[0, 5, 6, 8, 25, 9, 8, 24],
[0, 3, 1, 2, 8, 1, 5, 1]
]
}, {
low: 0,
high: 28,
showArea: true,
fullWidth: true,
plugins: [
Chartist.plugins.tooltip()
],
axisY: {
onlyInteger: true,
scaleMinSpace: 40,
offset: 20,
labelInterpolationFnc: function(value) {
return (value / 1) + 'k';
}
},
});
*/
// Offset x1 a tiny amount so that the straight stroke gets a bounding box
// Straight lines don't get a bounding box
// Last remark on -> http://www.w3.org/TR/SVG11/coords.html#ObjectBoundingBox
chart.on("draw", function (ctx) {
if (ctx.type === "area") {
ctx.element.attr({
x1: ctx.x1 + 0.001,
});
}
});
// Create the gradient definition on created event (always after chart re-render)
chart.on("created", function (ctx) {
var defs = ctx.svg.elem("defs");
defs
.elem("linearGradient", {
id: "gradient",
x1: 0,
y1: 1,
x2: 0,
y2: 0,
})
.elem("stop", {
offset: 0,
"stop-color": "rgba(255, 255, 255, 1)",
})
.parent()
.elem("stop", {
offset: 1,
"stop-color": "rgba(64, 196, 255, 1)",
});
});
var chart = [chart];
// ==============================================================
// Our Visitor
// ==============================================================
var sparklineLogin = function () {
$("#ravenue").sparkline([6, 10, 9, 11, 9, 10, 12], {
type: "bar",
height: "100",
barWidth: "4",
width: "100%",
resize: true,
barSpacing: "11",
barColor: "#fff",
});
$("#views").sparkline([6, 10, 9, 11, 9, 10, 12], {
type: "line",
height: "72",
lineColor: "transparent",
fillColor: "rgba(255, 255, 255, 0.3)",
width: "100%",
resize: true,
});
};
var sparkResize;
$(window).resize(function (e) {
clearTimeout(sparkResize);
sparkResize = setTimeout(sparklineLogin, 500);
});
sparklineLogin();
// This is for the chat messege on enter
$(function () {
$(document).on("keypress", "#textarea1", function (e) {
if (e.keyCode == 13) {
var id = $(this).attr("data-user-id");
var msg = $(this).val();
msg = msg_sent(msg);
$("#someDiv").append(msg);
$(this).val("");
$(this).focus();
}
});
});
});
@@ -0,0 +1,299 @@
/*************************************************************************************/
// -->Template Name: Bootstrap Press Admin
// -->Author: Themedesigner
// -->Email: niravjoshi87@gmail.com
// -->File: google_map_init
/*************************************************************************************/
$(function () {
//******************************************//
// Basic Map
//******************************************//
var map;
map = new GMaps({
div: "#map",
lat: -12.043333,
lng: -77.028333,
});
//******************************************//
// Map Events
//******************************************//
var map_1;
map_1 = new GMaps({
div: "#map_1",
zoom: 16,
lat: -12.043333,
lng: -77.028333,
click: function (e) {
alert("click");
},
dragend: function (e) {
alert("dragend");
},
});
//******************************************//
// Markers
//******************************************//
var map_2;
map_2 = new GMaps({
div: "#map_2",
lat: -12.043333,
lng: -77.028333,
});
map_2.addMarker({
lat: -12.043333,
lng: -77.03,
title: "Lima",
details: {
database_id: 42,
author: "HPNeo",
},
click: function (e) {
if (console.log) console.log(e);
alert("You clicked in this marker");
},
});
map_2.addMarker({
lat: -12.042,
lng: -77.028333,
title: "Marker with InfoWindow",
infoWindow: {
content: "<p>HTML Content</p>",
},
});
//******************************************//
// Polylines
//******************************************//
var map_3;
map_3 = new GMaps({
div: "#map_3",
lat: -12.043333,
lng: -77.028333,
click: function (e) {
console.log(e);
},
});
path1 = [
[-12.044012922866312, -77.02470665341184],
[-12.05449279282314, -77.03024273281858],
[-12.055122327623378, -77.03039293652341],
[-12.075917129727586, -77.02764635449216],
[-12.07635776902266, -77.02792530422971],
[-12.076819390363665, -77.02893381481931],
[-12.088527520066453, -77.0241058385925],
[-12.090814532191756, -77.02271108990476],
];
map_3.drawPolyline({
path: path1,
strokeColor: "#131540",
strokeOpacity: 0.6,
strokeWeight: 6,
});
//******************************************//
// Polygons
//******************************************//
var map_4;
map_4 = new GMaps({
div: "#map_4",
lat: -12.043333,
lng: -77.028333,
});
var path2 = [
[-12.040397656836609, -77.03373871559225],
[-12.040248585302038, -77.03993927003302],
[-12.050047116528843, -77.02448169303511],
[-12.044804866577001, -77.02154422636042],
];
polygon = map_4.drawPolygon({
paths: path2,
strokeColor: "#BBD8E9",
strokeOpacity: 1,
strokeWeight: 3,
fillColor: "#BBD8E9",
fillOpacity: 0.6,
});
//******************************************//
// Routes
//******************************************//
var map_5;
map_5 = new GMaps({
div: "#map_5",
lat: -12.043333,
lng: -77.028333,
});
map_5.drawRoute({
origin: [-12.044012922866312, -77.02470665341184],
destination: [-12.090814532191756, -77.02271108990476],
travelMode: "driving",
strokeColor: "#131540",
strokeOpacity: 0.6,
strokeWeight: 6,
});
//******************************************//
// Routes Advance
//******************************************//
var map_6;
map_6 = new GMaps({
div: "#map_6",
lat: -12.043333,
lng: -77.028333,
});
$("#start_travel").click(function (e) {
e.preventDefault();
map_6.travelRoute({
origin: [-12.044012922866312, -77.02470665341184],
destination: [-12.090814532191756, -77.02271108990476],
travelMode: "driving",
step: function (e) {
$("#instructions").append("<li>" + e.instructions + "</li>");
$("#instructions li:eq(" + e.step_number + ")")
.delay(450 * e.step_number)
.fadeIn(200, function () {
map_6.setCenter(e.end_location.lat(), e.end_location.lng());
map_6.drawPolyline({
path: e.path,
strokeColor: "#131540",
strokeOpacity: 0.6,
strokeWeight: 6,
});
});
},
});
});
//******************************************//
// Street View Panoramas
//******************************************//
panorama = GMaps.createPanorama({
el: "#panorama",
lat: 42.3455,
lng: -71.0983,
});
//******************************************//
// Map Types
//******************************************//
var map_7;
map_7 = new GMaps({
div: "#map_7",
lat: -12.043333,
lng: -77.028333,
mapTypeControlOptions: {
mapTypeIds: ["hybrid", "roadmap", "satellite", "terrain", "osm"],
},
});
map_7.addMapType("osm", {
getTileUrl: function (coord, zoom) {
return (
"https://a.tile.openstreetmap.org/" +
zoom +
"/" +
coord.x +
"/" +
coord.y +
".png"
);
},
tileSize: new google.maps.Size(256, 256),
name: "OpenStreetMap",
maxZoom: 18,
});
map_7.setMapTypeId("osm");
//******************************************//
// Fusion Tables layers
//******************************************//
var map_8, infoWindow1;
infoWindow = new google.maps.InfoWindow({});
map_8 = new GMaps({
div: "#map_8",
zoom: 11,
lat: 41.850033,
lng: -87.6500523,
});
map_8.loadFromFusionTables({
query: {
select: "'Geocodable address'",
from: "1mZ53Z70NsChnBMm-qEYmSDOvLXgrreLTkQUvvg",
},
suppressInfoWindows: true,
events: {
click: function (point) {
infoWindow.setContent("You clicked here!");
infoWindow.setPosition(point.latLng);
infoWindow.open(map_8.map_8);
},
},
});
//******************************************//
// KML layers
//******************************************//
var map_9, infoWindow2;
infoWindow2 = new google.maps.InfoWindow({});
map_9 = new GMaps({
div: "#map_9",
zoom: 12,
lat: 40.65,
lng: -73.95,
});
map_9.loadFromKML({
url: "http://api.flickr.com/services/feeds/geo/?g=322338@N20&lang=en-us&format=feed-georss",
suppressInfoWindows: true,
events: {
click: function (point) {
infoWindow2.setContent(point.featureData.infoWindowHtml);
infoWindow2.setPosition(point.latLng);
infoWindow2.open(map_9.map_9);
},
},
});
//******************************************//
// Geofences
//******************************************//
var map_10;
map_10 = new GMaps({
div: "#map_10",
lat: -12.043333,
lng: -77.028333,
});
var path3 = [];
var p = [
[-12.040397656836609, -77.03373871559225],
[-12.040248585302038, -77.03993927003302],
[-12.050047116528843, -77.02448169303511],
[-12.044804866577001, -77.02154422636042],
];
for (var i in p) {
latlng = new google.maps.LatLng(p[i][0], p[i][1]);
path3.push(latlng);
}
polygon = map_10.drawPolygon({
paths: path3,
strokeColor: "#BBD8E9",
strokeOpacity: 1,
strokeWeight: 3,
fillColor: "#BBD8E9",
fillOpacity: 0.6,
});
map_10.addMarker({
lat: -12.043333,
lng: -77.028333,
draggable: true,
fences: [polygon],
outside: function (m, f) {
alert("This marker has been moved outside of its fence");
},
});
});
@@ -0,0 +1,31 @@
$(function (e) {
"use strict";
$(".date-inputmask").inputmask("dd/mm/yyyy"),
$(".phone-inputmask").inputmask("(999) 999-9999"),
$(".international-inputmask").inputmask("+9(999)999-9999"),
$(".xphone-inputmask").inputmask("(999) 999-9999 / x999999"),
$(".purchase-inputmask").inputmask("aaaa 9999-****"),
$(".cc-inputmask").inputmask("9999 9999 9999 9999"),
$(".ssn-inputmask").inputmask("999-99-9999"),
$(".isbn-inputmask").inputmask("999-99-999-9999-9"),
$(".currency-inputmask").inputmask("$9999"),
$(".percentage-inputmask").inputmask("99%"),
$(".decimal-inputmask").inputmask({
alias: "decimal",
radixPoint: ".",
}),
$(".email-inputmask").inputmask({
mask: "*{1,20}[.*{1,20}][.*{1,20}][.*{1,20}]@*{1,20}[*{2,6}][*{1,2}].*{1,}[.*{2,6}][.*{1,2}]",
greedy: !1,
onBeforePaste: function (n, a) {
return (e = e.toLowerCase()).replace("mailto:", "");
},
definitions: {
"*": {
validator: "[0-9A-Za-z!#$%&'*+/=?^_`{|}~/-]",
cardinality: 1,
casing: "lower",
},
},
});
});
@@ -0,0 +1,240 @@
$(document).ready(function () {
var sparklineLogin = function () {
$("#sparkline1").sparkline([5, 6, 2, 8, 9, 4, 7, 10, 11, 12, 10], {
type: "bar",
height: "45",
barWidth: 7,
barSpacing: 4,
barColor: "#99d683",
});
$("#sparkline2").sparkline([20, 40, 30], {
type: "pie",
width: "50",
height: "45",
resize: true,
sliceColors: ["#13dafe", "#6164c1", "#f1f2f7"],
});
$("#sparkline3").sparkline([5, 6, 2, 9, 4, 7, 10, 12], {
type: "bar",
height: "164",
barWidth: "7",
resize: true,
barSpacing: "5",
barColor: "#f96262",
});
$("#sparkline4").sparkline(
[0, 23, 43, 35, 44, 45, 56, 37, 40, 45, 56, 7, 10],
{
type: "line",
width: "120",
height: "45",
lineColor: "#fb6d9d",
fillColor: "transparent",
spotColor: "#fb6d9d",
minSpotColor: undefined,
maxSpotColor: undefined,
highlightSpotColor: undefined,
highlightLineColor: undefined,
}
);
$("#sparkline5").sparkline([15, 23, 55, 35, 54, 45, 66, 47, 30], {
type: "line",
width: "100%",
height: "160",
chartRangeMax: 50,
resize: true,
lineColor: "#13dafe",
fillColor: "rgba(19, 218, 254, 0.3)",
highlightLineColor: "rgba(0,0,0,.1)",
highlightSpotColor: "rgba(0,0,0,.2)",
});
$("#sparkline5").sparkline([0, 13, 10, 14, 15, 10, 18, 20, 0], {
type: "line",
width: "100%",
height: "160",
chartRangeMax: 40,
lineColor: "#6164c1",
fillColor: "rgba(97, 100, 193, 0.3)",
composite: true,
resize: true,
highlightLineColor: "rgba(0,0,0,.1)",
highlightSpotColor: "rgba(0,0,0,.2)",
});
$("#sparkline6").sparkline([5, 6, 2, 8, 9, 4, 7, 10, 11, 12, 10], {
type: "bar",
height: "45",
barWidth: "7",
barSpacing: "4",
barColor: "#13dafe",
});
$("#sparkline7").sparkline([0, 2, 8, 6, 8, 5, 6, 4, 8, 6, 4, 2], {
type: "line",
width: "100%",
height: "50",
lineColor: "#ffca4a",
fillColor: "#ffca4a",
highlightLineColor: "rgba(0, 0, 0, 0.2)",
highlightSpotColor: "#4f4f4f",
});
$("#sparkline8").sparkline([2, 4, 4, 6, 8, 5, 6, 4, 8, 6, 6, 2], {
type: "line",
width: "100%",
height: "50",
lineColor: "#99d683",
fillColor: "#99d683",
maxSpotColor: "#99d683",
highlightLineColor: "rgba(0, 0, 0, 0.2)",
highlightSpotColor: "#99d683",
});
$("#sparkline9").sparkline([0, 2, 8, 6, 8, 5, 6, 4, 8, 6, 6, 2], {
type: "line",
width: "100%",
height: "50",
lineColor: "#13dafe",
fillColor: "#13dafe",
minSpotColor: "#13dafe",
maxSpotColor: "#13dafe",
highlightLineColor: "rgba(0, 0, 0, 0.2)",
highlightSpotColor: "#13dafe",
});
$("#sparkline10").sparkline([2, 4, 4, 6, 8, 5, 6, 4, 8, 6, 6, 2], {
type: "line",
width: "100%",
height: "50",
lineColor: "#6164c1",
fillColor: "#6164c1",
maxSpotColor: "#6164c1",
highlightLineColor: "rgba(0, 0, 0, 0.2)",
highlightSpotColor: "#6164c1",
});
$("#sparkline11").sparkline([20, 40, 30], {
type: "pie",
height: "200",
resize: true,
sliceColors: ["#13dafe", "#6164c1", "#f1f2f7"],
});
$("#sparkline12").sparkline(
[5, 6, 2, 8, 9, 4, 7, 10, 11, 12, 10, 4, 7, 10],
{
type: "bar",
height: "200",
barWidth: 10,
barSpacing: 7,
barColor: "#99d683",
}
);
$("#sparkline13").sparkline([5, 6, 2, 9, 4, 7, 10, 12, 4, 7, 10], {
type: "bar",
height: "200",
barWidth: "10",
resize: true,
barSpacing: "7",
barColor: "#f96262",
});
$("#sparkline13").sparkline([5, 6, 2, 9, 4, 7, 10, 12, 4, 7, 10], {
type: "line",
height: "200",
lineColor: "#f96262",
fillColor: "transparent",
composite: true,
highlightLineColor: "rgba(0,0,0,.1)",
highlightSpotColor: "rgba(0,0,0,.2)",
});
$("#sparkline14").sparkline(
[0, 23, 43, 35, 44, 45, 56, 37, 40, 45, 56, 7, 10],
{
type: "line",
width: "100%",
height: "200",
lineColor: "#fff",
fillColor: "transparent",
spotColor: "#fff",
minSpotColor: undefined,
maxSpotColor: undefined,
highlightSpotColor: undefined,
highlightLineColor: undefined,
}
);
$("#sparkline15").sparkline(
[5, 6, 2, 8, 9, 4, 7, 10, 11, 12, 10, 9, 4, 7],
{
type: "bar",
height: "200",
barWidth: "10",
barSpacing: "10",
barColor: "#13dafe",
}
);
$("#sparkline16").sparkline([15, 23, 55, 35, 54, 45, 66, 47, 30], {
type: "line",
width: "100%",
height: "200",
chartRangeMax: 50,
resize: true,
lineColor: "#13dafe",
fillColor: "rgba(19, 218, 254, 0.3)",
highlightLineColor: "rgba(0,0,0,.1)",
highlightSpotColor: "rgba(0,0,0,.2)",
});
$("#sparkline16").sparkline([0, 13, 10, 14, 15, 10, 18, 20, 0], {
type: "line",
width: "100%",
height: "200",
chartRangeMax: 40,
lineColor: "#6164c1",
fillColor: "rgba(97, 100, 193, 0.3)",
composite: true,
resize: true,
highlightLineColor: "rgba(0,0,0,.1)",
highlightSpotColor: "rgba(0,0,0,.2)",
});
$("#sparklinedash").sparkline([0, 5, 6, 10, 9, 12, 4, 9], {
type: "bar",
height: "30",
barWidth: "4",
resize: true,
barSpacing: "5",
barColor: "#00c292",
});
$("#sparklinedash2").sparkline([0, 5, 6, 10, 9, 12, 4, 9], {
type: "bar",
height: "30",
barWidth: "4",
resize: true,
barSpacing: "5",
barColor: "#ab8ce4",
});
$("#sparklinedash3").sparkline([0, 5, 6, 10, 9, 12, 4, 9], {
type: "bar",
height: "30",
barWidth: "4",
resize: true,
barSpacing: "5",
barColor: "#03a9f3",
});
$("#sparklinedash4").sparkline([0, 5, 6, 10, 9, 12, 4, 9], {
type: "bar",
height: "30",
barWidth: "4",
resize: true,
barSpacing: "5",
barColor: "#fb9678",
});
};
var sparkResize;
$(window).resize(function (e) {
clearTimeout(sparkResize);
sparkResize = setTimeout(sparklineLogin, 500);
});
sparklineLogin();
});
@@ -0,0 +1,52 @@
/*
Template Name: Admin Template
Author: Wrappixel
File: js
*/
// ==============================================================
// Auto select left navbar
// ==============================================================
$(function () {
"use strict";
var url = window.location + "";
var path = url.replace(
window.location.protocol + "//" + window.location.host + "/",
""
);
var element = $("ul#sidebarnav a").filter(function () {
return this.href === url || this.href === path; // || url.href.indexOf(this.href) === 0;
});
element.parentsUntil(".sidebar-nav").each(function (index) {
if ($(this).is("li") && $(this).children("a").length !== 0) {
$(this).children("a").addClass("active");
$(this).parent("ul#sidebarnav").length === 0
? $(this).addClass("active")
: $(this).addClass("selected");
} else if (!$(this).is("ul") && $(this).children("a").length === 0) {
$(this).addClass("selected");
} else if ($(this).is("ul")) {
$(this).addClass("in");
}
});
element.addClass("active");
$("#sidebarnav a").on("click", function (e) {
if (!$(this).hasClass("active")) {
// hide any open menus and remove all other classes
$("ul", $(this).parents("ul:first")).removeClass("in");
$("a", $(this).parents("ul:first")).removeClass("active");
// open our new menu and add the open class
$(this).next("ul").addClass("in");
$(this).addClass("active");
} else if ($(this).hasClass("active")) {
$(this).removeClass("active");
$(this).parents("ul:first").removeClass("active");
$(this).next("ul").removeClass("in");
}
});
$("#sidebarnav >li >a.has-arrow").on("click", function (e) {
e.preventDefault();
});
});
@@ -0,0 +1,206 @@
!(function (t) {
"use strict";
function e(t) {
return null !== t && t === t.window;
}
function n(t) {
return e(t) ? t : 9 === t.nodeType && t.defaultView;
}
function a(t) {
var e,
a,
i = { top: 0, left: 0 },
o = t && t.ownerDocument;
return (
(e = o.documentElement),
"undefined" != typeof t.getBoundingClientRect &&
(i = t.getBoundingClientRect()),
(a = n(o)),
{
top: i.top + a.pageYOffset - e.clientTop,
left: i.left + a.pageXOffset - e.clientLeft,
}
);
}
function i(t) {
var e = "";
for (var n in t) t.hasOwnProperty(n) && (e += n + ":" + t[n] + ";");
return e;
}
function o(t) {
if (d.allowEvent(t) === !1) return null;
for (
var e = null, n = t.target || t.srcElement;
null !== n.parentElement;
) {
if (
!(n instanceof SVGElement || -1 === n.className.indexOf("waves-effect"))
) {
e = n;
break;
}
if (n.classList.contains("waves-effect")) {
e = n;
break;
}
n = n.parentElement;
}
return e;
}
function r(e) {
var n = o(e);
null !== n &&
(c.show(e, n),
"ontouchstart" in t &&
(n.addEventListener("touchend", c.hide, !1),
n.addEventListener("touchcancel", c.hide, !1)),
n.addEventListener("mouseup", c.hide, !1),
n.addEventListener("mouseleave", c.hide, !1));
}
var s = s || {},
u = document.querySelectorAll.bind(document),
c = {
duration: 750,
show: function (t, e) {
if (2 === t.button) return !1;
var n = e || this,
o = document.createElement("div");
(o.className = "waves-ripple"), n.appendChild(o);
var r = a(n),
s = t.pageY - r.top,
u = t.pageX - r.left,
d = "scale(" + (n.clientWidth / 100) * 10 + ")";
"touches" in t &&
((s = t.touches[0].pageY - r.top), (u = t.touches[0].pageX - r.left)),
o.setAttribute("data-hold", Date.now()),
o.setAttribute("data-scale", d),
o.setAttribute("data-x", u),
o.setAttribute("data-y", s);
var l = { top: s + "px", left: u + "px" };
(o.className = o.className + " waves-notransition"),
o.setAttribute("style", i(l)),
(o.className = o.className.replace("waves-notransition", "")),
(l["-webkit-transform"] = d),
(l["-moz-transform"] = d),
(l["-ms-transform"] = d),
(l["-o-transform"] = d),
(l.transform = d),
(l.opacity = "1"),
(l["-webkit-transition-duration"] = c.duration + "ms"),
(l["-moz-transition-duration"] = c.duration + "ms"),
(l["-o-transition-duration"] = c.duration + "ms"),
(l["transition-duration"] = c.duration + "ms"),
(l["-webkit-transition-timing-function"] =
"cubic-bezier(0.250, 0.460, 0.450, 0.940)"),
(l["-moz-transition-timing-function"] =
"cubic-bezier(0.250, 0.460, 0.450, 0.940)"),
(l["-o-transition-timing-function"] =
"cubic-bezier(0.250, 0.460, 0.450, 0.940)"),
(l["transition-timing-function"] =
"cubic-bezier(0.250, 0.460, 0.450, 0.940)"),
o.setAttribute("style", i(l));
},
hide: function (t) {
d.touchup(t);
var e = this,
n = (1.4 * e.clientWidth, null),
a = e.getElementsByClassName("waves-ripple");
if (!(a.length > 0)) return !1;
n = a[a.length - 1];
var o = n.getAttribute("data-x"),
r = n.getAttribute("data-y"),
s = n.getAttribute("data-scale"),
u = Date.now() - Number(n.getAttribute("data-hold")),
l = 350 - u;
0 > l && (l = 0),
setTimeout(function () {
var t = {
top: r + "px",
left: o + "px",
opacity: "0",
"-webkit-transition-duration": c.duration + "ms",
"-moz-transition-duration": c.duration + "ms",
"-o-transition-duration": c.duration + "ms",
"transition-duration": c.duration + "ms",
"-webkit-transform": s,
"-moz-transform": s,
"-ms-transform": s,
"-o-transform": s,
transform: s,
};
n.setAttribute("style", i(t)),
setTimeout(function () {
try {
e.removeChild(n);
} catch (t) {
return !1;
}
}, c.duration);
}, l);
},
wrapInput: function (t) {
for (var e = 0; e < t.length; e++) {
var n = t[e];
if ("input" === n.tagName.toLowerCase()) {
var a = n.parentNode;
if (
"i" === a.tagName.toLowerCase() &&
-1 !== a.className.indexOf("waves-effect")
)
continue;
var i = document.createElement("i");
i.className = n.className + " waves-input-wrapper";
var o = n.getAttribute("style");
o || (o = ""),
i.setAttribute("style", o),
(n.className = "waves-button-input"),
n.removeAttribute("style"),
a.replaceChild(i, n),
i.appendChild(n);
}
}
},
},
d = {
touches: 0,
allowEvent: function (t) {
var e = !0;
return (
"touchstart" === t.type
? (d.touches += 1)
: "touchend" === t.type || "touchcancel" === t.type
? setTimeout(function () {
d.touches > 0 && (d.touches -= 1);
}, 500)
: "mousedown" === t.type && d.touches > 0 && (e = !1),
e
);
},
touchup: function (t) {
d.allowEvent(t);
},
};
(s.displayEffect = function (e) {
(e = e || {}),
"duration" in e && (c.duration = e.duration),
c.wrapInput(u(".waves-effect")),
"ontouchstart" in t &&
document.body.addEventListener("touchstart", r, !1),
document.body.addEventListener("mousedown", r, !1);
}),
(s.attach = function (e) {
"input" === e.tagName.toLowerCase() &&
(c.wrapInput([e]), (e = e.parentElement)),
"ontouchstart" in t && e.addEventListener("touchstart", r, !1),
e.addEventListener("mousedown", r, !1);
}),
(t.Waves = s),
document.addEventListener(
"DOMContentLoaded",
function () {
s.displayEffect();
},
!1
);
})(window);