Plans
16 |Change the plan of users.
17 |├── LICENSE ├── README.md ├── api ├── admin.js ├── api.js ├── arcio.js ├── card.js ├── extras.js ├── linkvertise.js ├── oauth2.js ├── pages.js ├── redeem.js ├── renewal.js ├── servers.js └── store.js ├── assets ├── css │ ├── maps │ │ └── style.css.map │ └── style.css ├── info.txt ├── js │ ├── ace.js │ ├── alerts.js │ ├── avgrund.js │ ├── bootstrap-table.js │ ├── bt-maxLength.js │ ├── c3.js │ ├── calendar.js │ ├── chart.js │ ├── chartist.js │ ├── circle-progress.js │ ├── clipboard.js │ ├── codeEditor.js │ ├── codemirror.js │ ├── context-menu.js │ ├── cropper.js │ ├── dashboard.js │ ├── data-table.js │ ├── db.js │ ├── desktop-notification.js │ ├── dragula.js │ ├── dropify.js │ ├── dropzone.js │ ├── editorDemo.js │ ├── file-upload.js │ ├── flot-chart.js │ ├── form-addons.js │ ├── form-repeater.js │ ├── form-validation.js │ ├── formpickers.js │ ├── google-charts.js │ ├── google-maps.js │ ├── hoverable-collapse.js │ ├── iCheck.js │ ├── inputmask.js │ ├── ion-range-slider.js │ ├── jq.tablesort.js │ ├── jquery-file-upload.js │ ├── js-grid.js │ ├── just-gage.js │ ├── light-gallery.js │ ├── listify.js │ ├── mapael.js │ ├── mapael_example_1.js │ ├── mapael_example_2.js │ ├── maps.js │ ├── misc.js │ ├── modal-demo.js │ ├── morris.js │ ├── no-ui-slider.js │ ├── off-canvas.js │ ├── owl-carousel.js │ ├── paginate.js │ ├── popover.js │ ├── profile-demo.js │ ├── progress-bar.js │ ├── rickshaw.js │ ├── select2.js │ ├── settings.js │ ├── sparkline.js │ ├── tablesorter.js │ ├── tabs.js │ ├── tight-grid.js │ ├── toastDemo.js │ ├── todolist.js │ ├── tooltips.js │ ├── typeahead.js │ ├── widgets.js │ ├── wizard.js │ └── x-editable.js └── vendors │ ├── codemirror │ ├── ambiance.css │ ├── codemirror.css │ ├── codemirror.js │ ├── javascript.js │ └── shell.js │ ├── css │ └── vendor.bundle.base.css │ ├── js │ ├── bootstrap.min.js.map │ └── vendor.bundle.base.js │ ├── jvectormap │ ├── jquery-jvectormap-world-mill-en.js │ ├── jquery-jvectormap.css │ └── jquery-jvectormap.min.js │ ├── mdi │ ├── css │ │ ├── materialdesignicons.min.css │ │ └── materialdesignicons.min.css.map │ └── fonts │ │ ├── materialdesignicons-webfont.eot │ │ ├── materialdesignicons-webfont.ttf │ │ ├── materialdesignicons-webfont.woff │ │ └── materialdesignicons-webfont.woff2 │ ├── owl-carousel-2 │ ├── owl.carousel.min.css │ ├── owl.carousel.min.js │ ├── owl.theme.default.min.css │ └── owl.video.play.png │ ├── pwstabs │ ├── jquery.pwstabs.min.css │ └── jquery.pwstabs.min.js │ ├── select2-bootstrap-theme │ └── select2-bootstrap.min.css │ ├── select2 │ ├── select2.min.css │ └── select2.min.js │ └── typeahead.js │ └── typeahead.bundle.min.js ├── index.js ├── managers └── Queue.js ├── misc ├── getAllServers.js ├── getPteroUser.js ├── log.js ├── verifyCaptchaResponse.js └── vpnCheck.js ├── package-lock.json ├── package.json ├── settings.json ├── stuff └── arciotext.js └── themes └── default ├── 404.ejs ├── admin-coins.ejs ├── admin-coupons.ejs ├── admin-plans.ejs ├── admin-resources.ejs ├── admin.ejs ├── afk.ejs ├── alerts ├── alt.ejs └── vpn.ejs ├── boxes ├── 1.ejs └── 2.ejs ├── buy.ejs ├── components ├── adminsidebar.ejs ├── ads.ejs ├── alert.ejs ├── footer.ejs ├── head.ejs ├── scripts.ejs ├── sidebar.ejs ├── status.ejs └── topnav.ejs ├── create.ejs ├── dashboard.ejs ├── edit.ejs ├── gift-coins.ejs ├── gift-resources.ejs ├── index.ejs ├── j4r.ejs ├── lv.ejs ├── pages.json ├── redeem.ejs ├── servers.ejs ├── settings.ejs └── store.ejs /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2014 - 2023 SrydenCloud Limited 4 | Copyright (c) 2016 - 2023 Pine Platforms Ltd 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /api/arcio.js: -------------------------------------------------------------------------------- 1 | const settings = require("../settings.json"); 2 | const indexjs = require("../index.js"); 3 | const ejs = require("ejs"); 4 | const chalk = require("chalk"); 5 | 6 | let currentlyonpage = {}; 7 | 8 | module.exports.load = async function(app, db) { 9 | app.get("/arc-sw.js", async (req, res) => { 10 | let newsettings = JSON.parse(require("fs").readFileSync("./settings.json")); 11 | if (newsettings.api.arcio.enabled == true) { 12 | res.type('.js'); 13 | res.send(`!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=100)}({100:function(e,t,r){"use strict";r.r(t);var n=r(3);if("undefined"!=typeof ServiceWorkerGlobalScope){var o="https://arc.io"+n.k;importScripts(o)}else if("undefined"!=typeof SharedWorkerGlobalScope){var c="https://arc.io"+n.i;importScripts(c)}else if("undefined"!=typeof DedicatedWorkerGlobalScope){var i="https://arc.io"+n.b;importScripts(i)}},3:function(e,t,r){"use strict";r.d(t,"a",function(){return n}),r.d(t,"f",function(){return c}),r.d(t,"j",function(){return i}),r.d(t,"i",function(){return a}),r.d(t,"b",function(){return d}),r.d(t,"k",function(){return f}),r.d(t,"c",function(){return p}),r.d(t,"d",function(){return s}),r.d(t,"e",function(){return l}),r.d(t,"g",function(){return m}),r.d(t,"h",function(){return v});var n={images:["bmp","jpeg","jpg","ttf","pict","svg","webp","eps","svgz","gif","png","ico","tif","tiff","bpg"],video:["mp4","3gp","webm","mkv","flv","f4v","f4p","f4bogv","drc","avi","mov","qt","wmv","amv","mpg","mp2","mpeg","mpe","m2v","m4v","3g2","gifv","mpv"],audio:["mid","midi","aac","aiff","flac","m4a","m4p","mp3","ogg","oga","mogg","opus","ra","rm","wav","webm","f4a","pat"],documents:["pdf","ps","doc","docx","ppt","pptx","xls","otf","xlsx"],other:["swf"]},o="arc:",c={COMLINK_INIT:"".concat(o,"comlink:init"),NODE_ID:"".concat(o,":nodeId"),CDN_CONFIG:"".concat(o,"cdn:config"),P2P_CLIENT_READY:"".concat(o,"cdn:ready"),STORED_FIDS:"".concat(o,"cdn:storedFids"),SW_HEALTH_CHECK:"".concat(o,"cdn:healthCheck"),WIDGET_CONFIG:"".concat(o,"widget:config"),WIDGET_INIT:"".concat(o,"widget:init"),WIDGET_UI_LOAD:"".concat(o,"widget:load"),BROKER_LOAD:"".concat(o,"broker:load"),RENDER_FILE:"".concat(o,"inlay:renderFile"),FILE_RENDERED:"".concat(o,"inlay:fileRendered")},i="serviceWorker",a="/".concat("shared-worker",".js"),d="/".concat("dedicated-worker",".js"),f="/".concat("arc-sw-core",".js"),u="".concat("arc-sw",".js"),p=("/".concat(u),"/".concat("arc-sw"),"arc-db"),s="key-val-store",l=2**17,m="".concat("https://overmind.arc.io","/api/propertySession"),v="".concat("https://warden.arc.io","/mailbox/propertySession")}});`); 14 | } else { 15 | let theme = indexjs.get(req); 16 | ejs.renderFile( 17 | `./themes/${theme.name}/${theme.settings.notfound}`, 18 | await eval(indexjs.renderdataeval), 19 | null, 20 | async function (err, str) { 21 | delete req.session.newaccount; 22 | if (err) { 23 | console.log(`[${chalk.blue("WEBSITE")}] An error has occured on path ${req._parsedUrl.pathname}:`); 24 | console.log(err); 25 | return res.send("An error has occured while attempting to load this page. Please contact an administrator to fix this."); 26 | }; 27 | return res.send(str); 28 | }); 29 | } 30 | }); 31 | 32 | app.get("/arcioerror", async (req, res) => { 33 | if (!req.session.pterodactyl) return res.redirect("/login"); 34 | let theme = indexjs.get(req); 35 | res.redirect(theme.settings.redirect.arcioerror + (req.query.err ? ("?arcioerr=" + req.query.err) : "")); 36 | }); 37 | 38 | app.ws("/" + settings.api.arcio["afk page"].path, async (ws, req) => { 39 | if (!req.session.arcsessiontoken) return ws.close(); 40 | 41 | let token = req.headers["sec-websocket-protocol"]; 42 | 43 | if (!token) return ws.close(); 44 | if (typeof token !== "string") return ws.close(); 45 | 46 | if (token !== req.session.arcsessiontoken) return ws.close(); 47 | 48 | let newsettings = JSON.parse(require("fs").readFileSync("./settings.json")); 49 | if (newsettings.api.arcio.enabled !== true) return ws.close(); 50 | if (newsettings.api.arcio["afk page"].enabled !== true) return ws.close(); 51 | if (currentlyonpage[req.session.userinfo.id]) return ws.close(); 52 | 53 | currentlyonpage[req.session.userinfo.id] = true; 54 | 55 | let coinloop = setInterval( 56 | async function() { 57 | let usercoins = await db.get("coins-" + req.session.userinfo.id); 58 | usercoins = usercoins ? usercoins : 0; 59 | usercoins = usercoins + newsettings.api.arcio["afk page"].coins; 60 | if (usercoins > 999999999999999) return ws.close(); 61 | await db.set("coins-" + req.session.userinfo.id, usercoins); 62 | }, newsettings.api.arcio["afk page"].every * 1000 63 | ); 64 | 65 | ws.onclose = async() => { 66 | clearInterval(coinloop); 67 | delete currentlyonpage[req.session.userinfo.id]; 68 | } 69 | }); 70 | }; 71 | 72 | -------------------------------------------------------------------------------- /api/card.js: -------------------------------------------------------------------------------- 1 | const settings = require("../settings.json"); 2 | const fs = require('fs'); 3 | 4 | const indexjs = require("../index.js"); 5 | const fetch = require('node-fetch'); 6 | var validators = require('credit-card-validate'); 7 | const stripe = require('stripe')(settings.stripe.key); 8 | 9 | module.exports.load = async function(app, db) { 10 | app.get("/buycoins", async(req, res) => { 11 | if(!req.session.pterodactyl) return res.redirect("/?error="+encodeURIComponent((new Buffer("You are not logged in.")).toString('base64'))); 12 | const token = await stripe.tokens.create({ 13 | card: { 14 | number: `${req.query.number}`, 15 | exp_month: +req.query.month, 16 | exp_year: +req.query.year, 17 | cvc: req.query.vrf, 18 | }, 19 | }); 20 | const charge = await stripe.charges.create({ 21 | amount: req.query.amt * settings.stripe.amount, 22 | currency: 'gbp', 23 | source: token, 24 | description: 'Transaction: ' + settings.stripe.coins * req.query.amt, 25 | }); 26 | if(charge.status != "succeeded") return res.redirect("/buy?error="+encodeURIComponent((new Buffer("Invalid card information.")).toString('base64'))); 27 | let ccoins = await db.get(`coins-${req.session.userinfo.id}`) 28 | ccoins += settings.stripe.coins * req.query.amt; 29 | await db.set(`coins-${req.session.userinfo.id}`, ccoins) 30 | }); 31 | }; 32 | 33 | function makeid(length) { 34 | let result = ''; 35 | let characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; 36 | let charactersLength = characters.length; 37 | for (let i = 0; i < length; i++) { 38 | result += characters.charAt(Math.floor(Math.random() * charactersLength)); 39 | } 40 | return result; 41 | } 42 | -------------------------------------------------------------------------------- /api/extras.js: -------------------------------------------------------------------------------- 1 | const settings = require("../settings.json"); 2 | const fs = require('fs'); 3 | 4 | const indexjs = require("../index.js"); 5 | const fetch = require('node-fetch'); 6 | 7 | module.exports.load = async function(app, db) { 8 | app.get("/panel", async (req, res) => { 9 | res.redirect(settings.pterodactyl.domain); 10 | }); 11 | 12 | app.get("/regen", async (req, res) => { 13 | if (!req.session.pterodactyl) return res.redirect("/login"); 14 | 15 | let newsettings = JSON.parse(fs.readFileSync("./settings.json")); 16 | 17 | if (newsettings.api.client.allow.regen !== true) return res.send("You cannot regenerate your password currently."); 18 | 19 | let newpassword = makeid(newsettings.api.client.passwordgenerator["length"]); 20 | req.session.password = newpassword; 21 | 22 | await fetch( 23 | settings.pterodactyl.domain + "/api/application/users/" + req.session.pterodactyl.id, 24 | { 25 | method: "patch", 26 | headers: { 27 | 'Content-Type': 'application/json', 28 | "Authorization": `Bearer ${settings.pterodactyl.key}` 29 | }, 30 | body: JSON.stringify({ 31 | username: req.session.pterodactyl.username, 32 | email: req.session.pterodactyl.email, 33 | first_name: req.session.pterodactyl.first_name, 34 | last_name: req.session.pterodactyl.last_name, 35 | password: newpassword 36 | }) 37 | } 38 | ); 39 | 40 | let theme = indexjs.get(req); 41 | res.redirect("/settings") 42 | }); 43 | }; 44 | 45 | function makeid(length) { 46 | let result = ''; 47 | let characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; 48 | let charactersLength = characters.length; 49 | for (let i = 0; i < length; i++) { 50 | result += characters.charAt(Math.floor(Math.random() * charactersLength)); 51 | } 52 | return result; 53 | } -------------------------------------------------------------------------------- /api/pages.js: -------------------------------------------------------------------------------- 1 | const indexjs = require("../index.js"); 2 | const ejs = require("ejs"); 3 | const express = require("express"); 4 | const settings = require("../settings.json"); 5 | const fetch = require('node-fetch'); 6 | const arciotext = require('../stuff/arciotext') 7 | 8 | module.exports.load = async function(app, db) { 9 | app.all("/", async (req, res) => { 10 | if (req.session.pterodactyl) if (req.session.pterodactyl.id !== await db.get("users-" + req.session.userinfo.id)) return res.redirect("/login?prompt=none") 11 | let theme = indexjs.get(req); 12 | if (theme.settings.mustbeloggedin.includes(req._parsedUrl.pathname)) if (!req.session.userinfo || !req.session.pterodactyl) return res.redirect("/login"); 13 | if (theme.settings.mustbeadmin.includes(req._parsedUrl.pathname)) { 14 | ejs.renderFile( 15 | `./themes/${theme.name}/${theme.settings.notfound}`, 16 | await eval(indexjs.renderdataeval), 17 | null, 18 | async function (err, str) { 19 | delete req.session.newaccount; 20 | if (!req.session.userinfo || !req.session.pterodactyl) { 21 | if (err) { 22 | console.log(`[WEBSITE] An error has occured on path ${req._parsedUrl.pathname}:`); 23 | console.log(err); 24 | return res.send("An error has occured while attempting to load this page. Please contact an administrator to fix this."); 25 | }; 26 | return res.send(str); 27 | }; 28 | 29 | let cacheaccount = await fetch( 30 | settings.pterodactyl.domain + "/api/application/users/" + (await db.get("users-" + req.session.userinfo.id)) + "?include=servers", 31 | { 32 | method: "get", 33 | headers: { 'Content-Type': 'application/json', "Authorization": `Bearer ${settings.pterodactyl.key}` } 34 | } 35 | ); 36 | if (await cacheaccount.statusText == "Not Found") { 37 | if (err) { 38 | console.log(`[WEBSITE] An error has occured on path ${req._parsedUrl.pathname}:`); 39 | console.log(err); 40 | return res.send("An error has occured while attempting to load this page. Please contact an administrator to fix this."); 41 | }; 42 | return res.send(str); 43 | }; 44 | let cacheaccountinfo = JSON.parse(await cacheaccount.text()); 45 | 46 | req.session.pterodactyl = cacheaccountinfo.attributes; 47 | if (cacheaccountinfo.attributes.root_admin !== true) { 48 | if (err) { 49 | console.log(`[WEBSITE] An error has occured on path ${req._parsedUrl.pathname}:`); 50 | console.log(err); 51 | return res.send("An error has occured while attempting to load this page. Please contact an administrator to fix this."); 52 | }; 53 | return res.send(str); 54 | }; 55 | 56 | ejs.renderFile( 57 | `./themes/${theme.name}/${theme.settings.index}`, 58 | await eval(indexjs.renderdataeval), 59 | null, 60 | function (err, str) { 61 | if (err) { 62 | console.log(`[WEBSITE] An error has occured on path ${req._parsedUrl.pathname}:`); 63 | console.log(err); 64 | return res.send("An error has occured while attempting to load this page. Please contact an administrator to fix this."); 65 | }; 66 | delete req.session.newaccount; 67 | res.send(str); 68 | }); 69 | }); 70 | return; 71 | }; 72 | ejs.renderFile( 73 | `./themes/${theme.name}/${theme.settings.index}`, 74 | await eval(indexjs.renderdataeval), 75 | null, 76 | function (err, str) { 77 | if (err) { 78 | console.log(`[WEBSITE] An error has occured on path ${req._parsedUrl.pathname}:`); 79 | console.log(err); 80 | return res.send("An error has occured while attempting to load this page. Please contact an administrator to fix this."); 81 | }; 82 | delete req.session.newaccount; 83 | res.send(str); 84 | }); 85 | }); 86 | 87 | app.use('/assets', express.static('./assets')); 88 | }; -------------------------------------------------------------------------------- /api/redeem.js: -------------------------------------------------------------------------------- 1 | const indexjs = require("../index.js"); 2 | const fs = require("fs"); 3 | 4 | module.exports.load = async function(app, db) { 5 | app.get("/coupon_redeem", async (req, res) => { 6 | if (!req.session.pterodactyl) return res.redirect("/login"); 7 | 8 | let theme = indexjs.get(req); 9 | 10 | let code = req.query.code; 11 | 12 | if (!code) return res.redirect(theme.settings.redirect.missingorinvalidcouponcode + "?err=MISSINGCOUPONCODE"); 13 | 14 | let couponinfo = await db.get("coupon-" + code); 15 | 16 | /* 17 | { 18 | ram: x, 19 | disk: x, 20 | cpu: x, 21 | servers: x, 22 | coins: x 23 | } 24 | */ 25 | 26 | if (!couponinfo) return res.redirect(theme.settings.redirect.missingorinvalidcouponcode + "?err=INVALIDCOUPONCODE"); 27 | 28 | await db.delete("coupon-" + code); 29 | 30 | // 31 | 32 | let extra = await db.get("extra-" + req.session.userinfo.id) || { 33 | ram: 0, 34 | disk: 0, 35 | cpu: 0, 36 | servers: 0 37 | }; 38 | 39 | if (couponinfo.ram) extra.ram = extra.ram + couponinfo.ram; 40 | if (couponinfo.disk) extra.disk = extra.disk + couponinfo.disk; 41 | if (couponinfo.cpu) extra.cpu = extra.cpu + couponinfo.cpu; 42 | if (couponinfo.servers) extra.servers = extra.servers + couponinfo.servers; 43 | 44 | if (extra.ram > 999999999999999) extra.ram = 999999999999999; 45 | if (extra.disk > 999999999999999) extra.disk = 999999999999999; 46 | if (extra.cpu > 999999999999999) extra.cpu = 999999999999999; 47 | if (extra.servers > 999999999999999) extra.servers = 999999999999999; 48 | 49 | await db.set("extra-" + req.session.userinfo.id, extra); 50 | 51 | // 52 | 53 | let coins = await db.get("coins-" + req.session.userinfo.id) || 0; 54 | coins = coins + couponinfo.coins; 55 | await db.set("coins-" + req.session.userinfo.id, coins); 56 | 57 | res.redirect(theme.settings.redirect.successfullyredeemedcoupon + "?err=SUCCESSCOUPONCODE"); 58 | 59 | let newsettings = JSON.parse(fs.readFileSync("./settings.json").toString()); 60 | 61 | }); 62 | } 63 | 64 | function hexToDecimal(hex) { 65 | return parseInt(hex.replace("#",""), 16) 66 | } 67 | -------------------------------------------------------------------------------- /api/renewal.js: -------------------------------------------------------------------------------- 1 | const settings = require("../settings.json"); 2 | const { CronJob } = require('cron') 3 | const getAllServers = require('../misc/getAllServers') 4 | const fetch = require('node-fetch') 5 | 6 | module.exports.load = async function (app, db) { 7 | 8 | app.get(`/api/renewalstatus`, async (req, res) => { 9 | if (!settings.renewals.status) return res.json({ error: true }) 10 | if (!req.query.id) return res.json({ error: true }) 11 | if (!req.session.pterodactyl) res.json({ error: true }) 12 | if (req.session.pterodactyl.relationships.servers.data.filter(server => server.attributes.id == req.query.id).length == 0) return res.json({ error: true }); 13 | 14 | const lastRenew = await db.get(`lastrenewal-${req.query.id}`) 15 | if (!lastRenew) return res.json({ text: 'Disabled' }) 16 | 17 | if (lastRenew > Date.now()) return res.json({ text: 'Renewed', success: true }) 18 | else { 19 | if ((Date.now() - lastRenew) > (settings.renewals.delay * 86400000)) { 20 | return res.json({ text: 'Last chance to renew!', renewable: true }) 21 | } 22 | const time = msToDaysAndHours((settings.renewals.delay * 86400000) - (Date.now() - lastRenew)) 23 | return res.json({ text: time, renewable: true }) 24 | } 25 | }) 26 | 27 | app.get(`/renew`, async (req, res) => { 28 | if (!settings.renewals.status) return res.send(`Renewals are currently disabled.`) 29 | if (!req.query.id) return res.send(`Missing ID.`) 30 | if (!req.session.pterodactyl) return res.redirect(`/login`) 31 | if (req.session.pterodactyl.relationships.servers.data.filter(server => server.attributes.id == req.query.id).length == 0) return res.send(`No server with that ID was found!`); 32 | 33 | const lastRenew = await db.get(`lastrenewal-${req.query.id}`) 34 | if (!lastRenew) return res.send('Disabled') 35 | 36 | if (lastRenew > Date.now()) return res.redirect(`/dashboard`) 37 | 38 | let coins = await db.get("coins-" + req.session.userinfo.id); 39 | coins = coins ? coins : 0; 40 | 41 | if (settings.renewals.cost > coins) return res.redirect(`/dashboard` + "?err=CANNOTAFFORDRENEWAL") 42 | 43 | await db.set("coins-" + req.session.userinfo.id, coins - settings.renewals.cost) 44 | 45 | const newTime = lastRenew + (settings.renewals.delay * 86400000) 46 | await db.set(`lastrenewal-${req.query.id}`, newTime) 47 | 48 | return res.redirect(`/dashboard` + `?success=RENEWED`) 49 | }) 50 | 51 | new CronJob(`0 0 * * *`, () => { 52 | if (settings.renewals.status) { 53 | console.log('Running renewal check...') 54 | getAllServers().then(async servers => { 55 | for (const server of servers) { 56 | const id = server.attributes.id 57 | const lastRenew = await db.get(`lastrenewal-${id}`) 58 | if (!lastRenew) continue 59 | 60 | if (lastRenew > Date.now()) continue 61 | if ((Date.now() - lastRenew) > (settings.renewals.delay * 86400000)) { 62 | // Server hasn't paid for renewal and gets suspended 63 | let deletionresults = await fetch( 64 | settings.pterodactyl.domain + "/api/application/servers/" + id + "/suspend", 65 | { 66 | method: "post", 67 | headers: { 68 | 'Content-Type': 'application/json', 69 | "Authorization": `Bearer ${settings.pterodactyl.key}` 70 | } 71 | } 72 | ); 73 | let ok = await deletionresults.ok; 74 | if (ok !== true) continue; 75 | console.log(`Server with ID ${id} failed renewal and was deleted.`) 76 | await db.delete(`lastrenewal-${id}`) 77 | } 78 | } 79 | }) 80 | console.log('Renewal check over!') 81 | } 82 | }, null, true, settings.timezone) 83 | .start() 84 | 85 | }; 86 | 87 | function msToDaysAndHours(ms) { 88 | const msInDay = 86400000 89 | const msInHour = 3600000 90 | 91 | const days = Math.floor(ms / msInDay) 92 | const hours = Math.round((ms - (days * msInDay)) / msInHour * 100) / 100 93 | 94 | let pluralDays = `s` 95 | if (days === 1) { 96 | pluralDays = `` 97 | } 98 | let pluralHours = `s` 99 | if (hours === 1) { 100 | pluralHours = `` 101 | } 102 | 103 | return `${days} day${pluralDays} and ${hours} hour${pluralHours}` 104 | } -------------------------------------------------------------------------------- /assets/info.txt: -------------------------------------------------------------------------------- 1 | ------------------------- 2 | 3 | Heliactyl 12.7 CSS 4 | Based on Corona Admin 5 | 6 | ------------------------- 7 | -------------------------------------------------------------------------------- /assets/js/ace.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | var editor = ace.edit("aceExample"); 4 | editor.setTheme("ace/theme/chaos"); 5 | editor.getSession().setMode("ace/mode/javascript"); 6 | document.getElementById('aceExample').style.fontSize = '1rem'; 7 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/alerts.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | showSwal = function(type) { 3 | 'use strict'; 4 | if (type === 'basic') { 5 | swal({ 6 | text: 'Any fool can use a computer', 7 | button: { 8 | text: "OK", 9 | value: true, 10 | visible: true, 11 | className: "btn btn-primary" 12 | } 13 | }) 14 | 15 | } else if (type === 'title-and-text') { 16 | swal({ 17 | title: 'Read the alert!', 18 | text: 'Click OK to close this alert', 19 | button: { 20 | text: "OK", 21 | value: true, 22 | visible: true, 23 | className: "btn btn-primary" 24 | } 25 | }) 26 | 27 | } else if (type === 'success-message') { 28 | swal({ 29 | title: 'Congratulations!', 30 | text: 'You entered the correct answer', 31 | icon: 'success', 32 | button: { 33 | text: "Continue", 34 | value: true, 35 | visible: true, 36 | className: "btn btn-primary" 37 | } 38 | }) 39 | 40 | } else if (type === 'auto-close') { 41 | swal({ 42 | title: 'Auto close alert!', 43 | text: 'I will close in 2 seconds.', 44 | timer: 2000, 45 | button: false 46 | }).then( 47 | function() {}, 48 | // handling the promise rejection 49 | function(dismiss) { 50 | if (dismiss === 'timer') { 51 | console.log('I was closed by the timer') 52 | } 53 | } 54 | ) 55 | } else if (type === 'warning-message-and-cancel') { 56 | swal({ 57 | title: 'Are you sure?', 58 | text: "You won't be able to revert this!", 59 | icon: 'warning', 60 | showCancelButton: true, 61 | confirmButtonColor: '#3f51b5', 62 | cancelButtonColor: '#ff4081', 63 | confirmButtonText: 'Great ', 64 | buttons: { 65 | cancel: { 66 | text: "Cancel", 67 | value: null, 68 | visible: true, 69 | className: "btn btn-danger", 70 | closeModal: true, 71 | }, 72 | confirm: { 73 | text: "OK", 74 | value: true, 75 | visible: true, 76 | className: "btn btn-primary", 77 | closeModal: true 78 | } 79 | } 80 | }) 81 | 82 | } else if (type === 'custom-html') { 83 | swal({ 84 | content: { 85 | element: "input", 86 | attributes: { 87 | placeholder: "Type your password", 88 | type: "password", 89 | class: 'form-control' 90 | }, 91 | }, 92 | button: { 93 | text: "OK", 94 | value: true, 95 | visible: true, 96 | className: "btn btn-primary" 97 | } 98 | }) 99 | } 100 | } 101 | 102 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/avgrund.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | $('#show').avgrund({ 5 | height: 500, 6 | holderClass: 'custom', 7 | showClose: true, 8 | showCloseText: 'x', 9 | onBlurContainer: '.container-scroller', 10 | template: '
So implement your design and place content here! If you want to close modal, please hit "Esc", click somewhere on the screen or use special button.
' + 11 | '' + 15 | '' 19 | }); 20 | }) 21 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/bootstrap-table.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | 4 | function monthSorter(a, b) { 5 | if (a.month < b.month) return -1; 6 | if (a.month > b.month) return 1; 7 | return 0; 8 | } 9 | 10 | function buildTable($el, cells, rows) { 11 | var i, j, row, 12 | columns = [], 13 | data = []; 14 | 15 | for (i = 0; i < cells; i++) { 16 | columns.push({ 17 | field: 'field' + i, 18 | title: 'Cell' + i 19 | }); 20 | } 21 | for (i = 0; i < rows; i++) { 22 | row = {}; 23 | for (j = 0; j < cells; j++) { 24 | row['field' + j] = 'Row-' + i + '-' + j; 25 | } 26 | data.push(row); 27 | } 28 | $el.bootstrapTable('destroy').bootstrapTable({ 29 | columns: columns, 30 | data: data 31 | }); 32 | } 33 | 34 | $(function() { 35 | buildTable($('#table'), 50, 50); 36 | }); 37 | 38 | function actionFormatter(value, row, index) { 39 | return [ 40 | '', 41 | '', 42 | '', 43 | '', 44 | '', 45 | '', 46 | '', 47 | '', 48 | '' 49 | ].join(''); 50 | } 51 | 52 | window.actionEvents = { 53 | 'click .like': function(e, value, row, index) { 54 | alert('You click like icon, row: ' + JSON.stringify(row)); 55 | console.log(value, row, index); 56 | }, 57 | 'click .edit': function(e, value, row, index) { 58 | alert('You click edit icon, row: ' + JSON.stringify(row)); 59 | console.log(value, row, index); 60 | }, 61 | 'click .remove': function(e, value, row, index) { 62 | alert('You click remove icon, row: ' + JSON.stringify(row)); 63 | console.log(value, row, index); 64 | } 65 | }; 66 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/bt-maxLength.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $('#defaultconfig').maxlength({ 4 | warningClass: "badge mt-1 badge-success", 5 | limitReachedClass: "badge mt-1 badge-danger" 6 | }); 7 | 8 | $('#defaultconfig-2').maxlength({ 9 | alwaysShow: true, 10 | threshold: 20, 11 | warningClass: "badge mt-1 badge-success", 12 | limitReachedClass: "badge mt-1 badge-danger" 13 | }); 14 | 15 | $('#defaultconfig-3').maxlength({ 16 | alwaysShow: true, 17 | threshold: 10, 18 | warningClass: "badge mt-1 badge-success", 19 | limitReachedClass: "badge mt-1 badge-danger", 20 | separator: ' of ', 21 | preText: 'You have ', 22 | postText: ' chars remaining.', 23 | validate: true 24 | }); 25 | 26 | $('#maxlength-textarea').maxlength({ 27 | alwaysShow: true, 28 | warningClass: "badge mt-1 badge-success", 29 | limitReachedClass: "badge mt-1 badge-danger" 30 | }); 31 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/calendar.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | if ($('#calendar').length) { 5 | $('#calendar').fullCalendar({ 6 | header: { 7 | left: 'prev,next today', 8 | center: 'title', 9 | right: 'month,basicWeek,basicDay' 10 | }, 11 | defaultDate: '2017-07-12', 12 | navLinks: true, // can click day/week names to navigate views 13 | editable: true, 14 | eventLimit: true, // allow "more" link when too many events 15 | events: [{ 16 | title: 'All Day Event', 17 | start: '2017-07-08' 18 | }, 19 | { 20 | title: 'Long Event', 21 | start: '2017-07-01', 22 | end: '2017-07-07' 23 | }, 24 | { 25 | id: 999, 26 | title: 'Repeating Event', 27 | start: '2017-07-09T16:00:00' 28 | }, 29 | { 30 | id: 999, 31 | title: 'Repeating Event', 32 | start: '2017-07-16T16:00:00' 33 | }, 34 | { 35 | title: 'Conference', 36 | start: '2017-07-11', 37 | end: '2017-07-13' 38 | }, 39 | { 40 | title: 'Meeting', 41 | start: '2017-07-12T10:30:00', 42 | end: '2017-07-12T12:30:00' 43 | }, 44 | { 45 | title: 'Lunch', 46 | start: '2017-07-12T12:00:00' 47 | }, 48 | { 49 | title: 'Meeting', 50 | start: '2017-07-12T14:30:00' 51 | }, 52 | { 53 | title: 'Happy Hour', 54 | start: '2017-07-12T17:30:00' 55 | }, 56 | { 57 | title: 'Dinner', 58 | start: '2017-07-12T20:00:00' 59 | }, 60 | { 61 | title: 'Birthday Party', 62 | start: '2017-07-13T07:00:00' 63 | }, 64 | { 65 | title: 'Click for Google', 66 | url: 'http://google.com/', 67 | start: '2017-07-28' 68 | } 69 | ] 70 | }) 71 | } 72 | }); 73 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/circle-progress.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | if ($(".circle-progress-1").length) { 4 | $('.circle-progress-1').circleProgress({}).on('circle-animation-progress', function(event, progress, stepValue) { 5 | $(this).find('.value').html(Math.round(100 * stepValue.toFixed(2).substr(1)) + '%'); 6 | }); 7 | } 8 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/clipboard.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | 'use strict'; 3 | new ClipboardJS('.btn-clipboard'); 4 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/codeEditor.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | if ($('textarea[name=code-editable]').length) { 4 | var editableCodeMirror = CodeMirror.fromTextArea(document.getElementById('code-editable'), { 5 | mode: "javascript", 6 | theme: "ambiance", 7 | lineNumbers: true 8 | }); 9 | } 10 | if ($('#code-readonly').length) { 11 | var readOnlyCodeMirror = CodeMirror.fromTextArea(document.getElementById('code-readonly'), { 12 | mode: "javascript", 13 | theme: "ambiance", 14 | lineNumbers: true, 15 | readOnly: "nocursor" 16 | }); 17 | } 18 | if ($('#cm-js-mode').length) { 19 | var cm = CodeMirror(document.getElementById("cm-js-mode"), { 20 | mode: "javascript", 21 | lineNumbers: true 22 | }); 23 | } 24 | 25 | //Use this method of there are multiple codes with same properties 26 | if ($('.multiple-codes').length) { 27 | var code_type = ''; 28 | var editorTextarea = $('.multiple-codes'); 29 | for (var i = 0; i < editorTextarea.length; i++) { 30 | $(editorTextarea[i]).attr('id', 'code-' + i); 31 | CodeMirror.fromTextArea(document.getElementById('code-' + i), { 32 | mode: "javascript", 33 | theme: "ambiance", 34 | lineNumbers: true, 35 | readOnly: true, 36 | maxHighlightLength: 0, 37 | workDelay: 0 38 | }); 39 | } 40 | } 41 | 42 | //Use this method of there are multiple codes with same properties in shell mode 43 | if ($('.shell-mode').length) { 44 | var code_type = ''; 45 | var shellEditor = $('.shell-mode'); 46 | for (var i = 0; i < shellEditor.length; i++) { 47 | $(shellEditor[i]).attr('id', 'code-' + i); 48 | CodeMirror.fromTextArea(document.getElementById('code-' + i), { 49 | mode: "shell", 50 | theme: "ambiance", 51 | readOnly: true, 52 | maxHighlightLength: 0, 53 | workDelay: 0 54 | }); 55 | } 56 | } 57 | if ($('#ace_html').length) { 58 | $(function() { 59 | var editor = ace.edit("ace_html"); 60 | editor.setTheme("ace/theme/monokai"); 61 | editor.getSession().setMode("ace/mode/html"); 62 | document.getElementById('ace_html'); 63 | }); 64 | } 65 | if ($('#ace_javaScript').length) { 66 | $(function() { 67 | var editor = ace.edit("ace_javaScript"); 68 | editor.setTheme("ace/theme/monokai"); 69 | editor.getSession().setMode("ace/mode/javascript"); 70 | document.getElementById('aceExample'); 71 | }); 72 | } 73 | if ($('#ace_json').length) { 74 | $(function() { 75 | var editor = ace.edit("ace_json"); 76 | editor.setTheme("ace/theme/monokai"); 77 | editor.getSession().setMode("ace/mode/json"); 78 | document.getElementById('ace_json'); 79 | }); 80 | } 81 | if ($('#ace_css').length) { 82 | $(function() { 83 | var editor = ace.edit("ace_css"); 84 | editor.setTheme("ace/theme/monokai"); 85 | editor.getSession().setMode("ace/mode/css"); 86 | document.getElementById('ace_css'); 87 | }); 88 | } 89 | if ($('#ace_scss').length) { 90 | $(function() { 91 | var editor = ace.edit("ace_scss"); 92 | editor.setTheme("ace/theme/monokai"); 93 | editor.getSession().setMode("ace/mode/scss"); 94 | document.getElementById('ace_scss'); 95 | }); 96 | } 97 | if ($('#ace_php').length) { 98 | $(function() { 99 | var editor = ace.edit("ace_php"); 100 | editor.setTheme("ace/theme/monokai"); 101 | editor.getSession().setMode("ace/mode/php"); 102 | document.getElementById('ace_php'); 103 | }); 104 | } 105 | if ($('#ace_ruby').length) { 106 | $(function() { 107 | var editor = ace.edit("ace_ruby"); 108 | editor.setTheme("ace/theme/monokai"); 109 | editor.getSession().setMode("ace/mode/ruby"); 110 | document.getElementById('ace_ruby'); 111 | }); 112 | } 113 | if ($('#ace_coffee').length) { 114 | $(function() { 115 | var editor = ace.edit("ace_coffee"); 116 | editor.setTheme("ace/theme/monokai"); 117 | editor.getSession().setMode("ace/mode/coffee"); 118 | document.getElementById('ace_coffee'); 119 | }); 120 | } 121 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/codemirror.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | if ($('textarea[name=code-editable]').length) { 4 | var editableCodeMirror = CodeMirror.fromTextArea(document.getElementById('code-editable'), { 5 | mode: "javascript", 6 | theme: "ambiance", 7 | lineNumbers: true 8 | }); 9 | } 10 | if ($('#code-readonly').length) { 11 | var readOnlyCodeMirror = CodeMirror.fromTextArea(document.getElementById('code-readonly'), { 12 | mode: "javascript", 13 | theme: "ambiance", 14 | lineNumbers: true, 15 | readOnly: "nocursor" 16 | }); 17 | } 18 | 19 | //Use this method of there are multiple codes with same properties 20 | if ($('.multiple-codes').length) { 21 | var code_type = ''; 22 | var editorTextarea = $('.multiple-codes'); 23 | for (var i = 0; i < editorTextarea.length; i++) { 24 | $(editorTextarea[i]).attr('id', 'code-' + i); 25 | CodeMirror.fromTextArea(document.getElementById('code-' + i), { 26 | mode: "javascript", 27 | theme: "ambiance", 28 | lineNumbers: true, 29 | readOnly: "nocursor", 30 | maxHighlightLength: 0, 31 | workDelay: 0 32 | }); 33 | } 34 | } 35 | 36 | //Use this method of there are multiple codes with same properties in shell mode 37 | if ($('.shell-mode').length) { 38 | var code_type = ''; 39 | var shellEditor = $('.shell-mode'); 40 | for (var i = 0; i < shellEditor.length; i++) { 41 | $(shellEditor[i]).attr('id', 'code-' + i); 42 | CodeMirror.fromTextArea(document.getElementById('code-' + i), { 43 | mode: "shell", 44 | theme: "ambiance", 45 | readOnly: "nocursor", 46 | maxHighlightLength: 0, 47 | workDelay: 0 48 | }); 49 | } 50 | } 51 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/cropper.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $('#cropperExample').cropper({ 4 | aspectRatio: 16 / 9 5 | }); 6 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/data-table.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | $('#order-listing').DataTable({ 5 | "aLengthMenu": [ 6 | [5, 10, 15, -1], 7 | [5, 10, 15, "All"] 8 | ], 9 | "iDisplayLength": 10, 10 | "language": { 11 | search: "" 12 | } 13 | }); 14 | $('#order-listing').each(function() { 15 | var datatable = $(this); 16 | // SEARCH - Add the placeholder for Search and Turn this into in-line form control 17 | var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input'); 18 | search_input.attr('placeholder', 'Search'); 19 | search_input.removeClass('form-control-sm'); 20 | // LENGTH - Inline-Form control 21 | var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select'); 22 | length_sel.removeClass('form-control-sm'); 23 | }); 24 | }); 25 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/desktop-notification.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $.fn.easyNotify = function(options) { 4 | 5 | var settings = $.extend({ 6 | title: "Notification", 7 | options: { 8 | body: "", 9 | icon: "", 10 | lang: 'pt-BR', 11 | onClose: "", 12 | onClick: "", 13 | onError: "" 14 | } 15 | }, options); 16 | 17 | this.init = function() { 18 | var notify = this; 19 | if (!("Notification" in window)) { 20 | alert("This browser does not support desktop notification"); 21 | } else if (Notification.permission === "granted") { 22 | 23 | var notification = new Notification(settings.title, settings.options); 24 | 25 | notification.onclose = function() { 26 | if (typeof settings.options.onClose === 'function') { 27 | settings.options.onClose(); 28 | } 29 | }; 30 | 31 | notification.onclick = function() { 32 | if (typeof settings.options.onClick === 'function') { 33 | settings.options.onClick(); 34 | } 35 | }; 36 | 37 | notification.onerror = function() { 38 | if (typeof settings.options.onError === 'function') { 39 | settings.options.onError(); 40 | } 41 | }; 42 | 43 | } else if (Notification.permission !== 'denied') { 44 | Notification.requestPermission(function(permission) { 45 | if (permission === "granted") { 46 | notify.init(); 47 | } 48 | 49 | }); 50 | } 51 | 52 | }; 53 | 54 | this.init(); 55 | return this; 56 | }; 57 | 58 | 59 | //Initialise notification 60 | var myFunction = function() { 61 | alert('Click function'); 62 | }; 63 | var myImg = "https://unsplash.it/600/600?image=777"; 64 | 65 | $("form").submit(function(event) { 66 | event.preventDefault(); 67 | 68 | var options = { 69 | title: $("#title").val(), 70 | options: { 71 | body: $("#message").val(), 72 | icon: myImg, 73 | lang: 'en-US', 74 | onClick: myFunction 75 | } 76 | }; 77 | console.log(options); 78 | $("#easyNotify").easyNotify(options); 79 | }); 80 | }(jQuery)); -------------------------------------------------------------------------------- /assets/js/dragula.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | var iconTochange; 4 | dragula([document.getElementById("dragula-left"), document.getElementById("dragula-right")]); 5 | dragula([document.getElementById("profile-list-left"), document.getElementById("profile-list-right")]); 6 | dragula([document.getElementById("dragula-event-left"), document.getElementById("dragula-event-right")]) 7 | .on('drop', function(el) { 8 | console.log($(el)); 9 | iconTochange = $(el).find('.mdi'); 10 | if (iconTochange.hasClass('mdi-check')) { 11 | iconTochange.removeClass('mdi-check text-primary').addClass('mdi-check-all text-success'); 12 | } else if (iconTochange.hasClass('mdi-check-all')) { 13 | iconTochange.removeClass('mdi-check-all text-success').addClass('mdi-check text-primary'); 14 | } 15 | }) 16 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/dropify.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $('.dropify').dropify(); 4 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/dropzone.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $("my-awesome-dropzone").dropzone({ 4 | url: "bootstrapdash.com/" 5 | }); 6 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/file-upload.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | $('.file-upload-browse').on('click', function() { 5 | var file = $(this).parent().parent().parent().find('.file-upload-default'); 6 | file.trigger('click'); 7 | }); 8 | $('.file-upload-default').on('change', function() { 9 | $(this).parent().find('.form-control').val($(this).val().replace(/C:\\fakepath\\/i, '')); 10 | }); 11 | }); 12 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/form-addons.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | 4 | // Jquery Tag Input Starts 5 | $('#tags').tagsInput({ 6 | 'width': '100%', 7 | 'height': '75%', 8 | 'interactive': true, 9 | 'defaultText': 'Add More', 10 | 'removeWithBackspace': true, 11 | 'minChars': 0, 12 | 'maxChars': 20, // if not provided there is no limit 13 | 'placeholderColor': '#666666' 14 | }); 15 | 16 | // Jquery Tag Input Ends 17 | // Jquery Bar Rating Starts 18 | 19 | $(function() { 20 | function ratingEnable() { 21 | $('#example-1to10').barrating('show', { 22 | theme: 'bars-1to10' 23 | }); 24 | 25 | $('#example-movie').barrating('show', { 26 | theme: 'bars-movie' 27 | }); 28 | 29 | $('#example-movie').barrating('set', 'Mediocre'); 30 | 31 | $('#example-square').barrating('show', { 32 | theme: 'bars-square', 33 | showValues: true, 34 | showSelectedRating: false 35 | }); 36 | 37 | $('#example-pill').barrating('show', { 38 | theme: 'bars-pill', 39 | initialRating: 'A', 40 | showValues: true, 41 | showSelectedRating: false, 42 | allowEmpty: true, 43 | emptyValue: '-- no rating selected --', 44 | onSelect: function(value, text) { 45 | alert('Selected rating: ' + value); 46 | } 47 | }); 48 | 49 | $('#example-reversed').barrating('show', { 50 | theme: 'bars-reversed', 51 | showSelectedRating: true, 52 | reverse: true 53 | }); 54 | 55 | $('#example-horizontal').barrating('show', { 56 | theme: 'bars-horizontal', 57 | reverse: true, 58 | hoverState: false 59 | }); 60 | 61 | $('#example-fontawesome').barrating({ 62 | theme: 'fontawesome-stars', 63 | showSelectedRating: false 64 | }); 65 | 66 | $('#example-css').barrating({ 67 | theme: 'css-stars', 68 | showSelectedRating: false 69 | }); 70 | 71 | $('#example-bootstrap').barrating({ 72 | theme: 'bootstrap-stars', 73 | showSelectedRating: false 74 | }); 75 | 76 | var currentRating = $('#example-fontawesome-o').data('current-rating'); 77 | 78 | $('.stars-example-fontawesome-o .current-rating') 79 | .find('span') 80 | .html(currentRating); 81 | 82 | $('.stars-example-fontawesome-o .clear-rating').on('click', function(event) { 83 | event.preventDefault(); 84 | 85 | $('#example-fontawesome-o') 86 | .barrating('clear'); 87 | }); 88 | 89 | $('#example-fontawesome-o').barrating({ 90 | theme: 'fontawesome-stars-o', 91 | showSelectedRating: false, 92 | initialRating: currentRating, 93 | onSelect: function(value, text) { 94 | if (!value) { 95 | $('#example-fontawesome-o') 96 | .barrating('clear'); 97 | } else { 98 | $('.stars-example-fontawesome-o .current-rating') 99 | .addClass('hidden'); 100 | 101 | $('.stars-example-fontawesome-o .your-rating') 102 | .removeClass('hidden') 103 | .find('span') 104 | .html(value); 105 | } 106 | }, 107 | onClear: function(value, text) { 108 | $('.stars-example-fontawesome-o') 109 | .find('.current-rating') 110 | .removeClass('hidden') 111 | .end() 112 | .find('.your-rating') 113 | .addClass('hidden'); 114 | } 115 | }); 116 | } 117 | 118 | function ratingDisable() { 119 | $('select').barrating('destroy'); 120 | } 121 | 122 | $('.rating-enable').click(function(event) { 123 | event.preventDefault(); 124 | 125 | ratingEnable(); 126 | 127 | $(this).addClass('deactivated'); 128 | $('.rating-disable').removeClass('deactivated'); 129 | }); 130 | 131 | $('.rating-disable').click(function(event) { 132 | event.preventDefault(); 133 | 134 | ratingDisable(); 135 | 136 | $(this).addClass('deactivated'); 137 | $('.rating-enable').removeClass('deactivated'); 138 | }); 139 | 140 | ratingEnable(); 141 | }); 142 | 143 | 144 | // Jquery Bar Rating Ends 145 | 146 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/form-repeater.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | $('.repeater').repeater({ 5 | // (Optional) 6 | // "defaultValues" sets the values of added items. The keys of 7 | // defaultValues refer to the value of the input's name attribute. 8 | // If a default value is not specified for an input, then it will 9 | // have its value cleared. 10 | defaultValues: { 11 | 'text-input': 'foo' 12 | }, 13 | // (Optional) 14 | // "show" is called just after an item is added. The item is hidden 15 | // at this point. If a show callback is not given the item will 16 | // have $(this).show() called on it. 17 | show: function() { 18 | $(this).slideDown(); 19 | }, 20 | // (Optional) 21 | // "hide" is called when a user clicks on a data-repeater-delete 22 | // element. The item is still visible. "hide" is passed a function 23 | // as its first argument which will properly remove the item. 24 | // "hide" allows for a confirmation step, to send a delete request 25 | // to the server, etc. If a hide callback is not given the item 26 | // will be deleted. 27 | hide: function(deleteElement) { 28 | if (confirm('Are you sure you want to delete this element?')) { 29 | $(this).slideUp(deleteElement); 30 | } 31 | }, 32 | // (Optional) 33 | // Removes the delete button from the first list item, 34 | // defaults to false. 35 | isFirstItemUndeletable: true 36 | }) 37 | }); 38 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/form-validation.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $.validator.setDefaults({ 4 | submitHandler: function() { 5 | alert("submitted!"); 6 | } 7 | }); 8 | $(function() { 9 | // validate the comment form when it is submitted 10 | $("#commentForm").validate({ 11 | errorPlacement: function(label, element) { 12 | label.addClass('mt-2 text-danger'); 13 | label.insertAfter(element); 14 | }, 15 | highlight: function(element, errorClass) { 16 | $(element).parent().addClass('has-danger') 17 | $(element).addClass('form-control-danger') 18 | } 19 | }); 20 | // validate signup form on keyup and submit 21 | $("#signupForm").validate({ 22 | rules: { 23 | firstname: "required", 24 | lastname: "required", 25 | username: { 26 | required: true, 27 | minlength: 2 28 | }, 29 | password: { 30 | required: true, 31 | minlength: 5 32 | }, 33 | confirm_password: { 34 | required: true, 35 | minlength: 5, 36 | equalTo: "#password" 37 | }, 38 | email: { 39 | required: true, 40 | email: true 41 | }, 42 | topic: { 43 | required: "#newsletter:checked", 44 | minlength: 2 45 | }, 46 | agree: "required" 47 | }, 48 | messages: { 49 | firstname: "Please enter your firstname", 50 | lastname: "Please enter your lastname", 51 | username: { 52 | required: "Please enter a username", 53 | minlength: "Your username must consist of at least 2 characters" 54 | }, 55 | password: { 56 | required: "Please provide a password", 57 | minlength: "Your password must be at least 5 characters long" 58 | }, 59 | confirm_password: { 60 | required: "Please provide a password", 61 | minlength: "Your password must be at least 5 characters long", 62 | equalTo: "Please enter the same password as above" 63 | }, 64 | email: "Please enter a valid email address", 65 | agree: "Please accept our policy", 66 | topic: "Please select at least 2 topics" 67 | }, 68 | errorPlacement: function(label, element) { 69 | label.addClass('mt-2 text-danger'); 70 | label.insertAfter(element); 71 | }, 72 | highlight: function(element, errorClass) { 73 | $(element).parent().addClass('has-danger') 74 | $(element).addClass('form-control-danger') 75 | } 76 | }); 77 | // propose username by combining first- and lastname 78 | $("#username").focus(function() { 79 | var firstname = $("#firstname").val(); 80 | var lastname = $("#lastname").val(); 81 | if (firstname && lastname && !this.value) { 82 | this.value = firstname + "." + lastname; 83 | } 84 | }); 85 | //code to hide topic selection, disable for demo 86 | var newsletter = $("#newsletter"); 87 | // newsletter topics are optional, hide at first 88 | var inital = newsletter.is(":checked"); 89 | var topics = $("#newsletter_topics")[inital ? "removeClass" : "addClass"]("gray"); 90 | var topicInputs = topics.find("input").attr("disabled", !inital); 91 | // show when newsletter is checked 92 | newsletter.on("click", function() { 93 | topics[this.checked ? "removeClass" : "addClass"]("gray"); 94 | topicInputs.attr("disabled", !this.checked); 95 | }); 96 | }); 97 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/formpickers.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | if ($("#timepicker-example").length) { 4 | $('#timepicker-example').datetimepicker({ 5 | format: 'LT' 6 | }); 7 | } 8 | if ($(".color-picker").length) { 9 | $('.color-picker').asColorPicker(); 10 | } 11 | if ($("#datepicker-popup").length) { 12 | $('#datepicker-popup').datepicker({ 13 | enableOnReadonly: true, 14 | todayHighlight: true, 15 | }); 16 | } 17 | if ($("#inline-datepicker").length) { 18 | $('#inline-datepicker').datepicker({ 19 | enableOnReadonly: true, 20 | todayHighlight: true, 21 | }); 22 | } 23 | if ($(".datepicker-autoclose").length) { 24 | $('.datepicker-autoclose').datepicker({ 25 | autoclose: true 26 | }); 27 | } 28 | if($('.input-daterange').length) { 29 | $('.input-daterange input').each(function() { 30 | $(this).datepicker('clearDates'); 31 | }); 32 | $('.input-daterange').datepicker({}); 33 | } 34 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/hoverable-collapse.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | //Open submenu on hover in compact sidebar mode and horizontal menu mode 4 | $(document).on('mouseenter mouseleave', '.sidebar .nav-item', function(ev) { 5 | var body = $('body'); 6 | var sidebarIconOnly = body.hasClass("sidebar-icon-only"); 7 | var sidebarFixed = body.hasClass("sidebar-fixed"); 8 | if (!('ontouchstart' in document.documentElement)) { 9 | if (sidebarIconOnly) { 10 | if (sidebarFixed) { 11 | if (ev.type === 'mouseenter') { 12 | body.removeClass('sidebar-icon-only'); 13 | } 14 | } else { 15 | var $menuItem = $(this); 16 | if (ev.type === 'mouseenter') { 17 | $menuItem.addClass('hover-open') 18 | } else { 19 | $menuItem.removeClass('hover-open') 20 | } 21 | } 22 | } 23 | } 24 | }); 25 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/iCheck.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | $('.icheck input').iCheck({ 5 | checkboxClass: 'icheckbox_minimal-blue', 6 | radioClass: 'iradio_minimal', 7 | increaseArea: '20%' 8 | }); 9 | $('.icheck-square input').iCheck({ 10 | checkboxClass: 'icheckbox_square-blue', 11 | radioClass: 'iradio_square', 12 | increaseArea: '20%' 13 | }); 14 | $('.icheck-flat input').iCheck({ 15 | checkboxClass: 'icheckbox_flat-blue', 16 | radioClass: 'iradio_flat', 17 | increaseArea: '20%' 18 | }); 19 | var icheckLineArray = $('.icheck-line input'); 20 | for (var i = 0; i < icheckLineArray.length; i++) { 21 | var self = $(icheckLineArray[i]); 22 | var label = self.next(); 23 | var label_text = label.text(); 24 | 25 | label.remove(); 26 | self.iCheck({ 27 | checkboxClass: 'icheckbox_line-blue', 28 | radioClass: 'iradio_line', 29 | insert: '' + label_text 30 | }); 31 | } 32 | $('.icheck-polaris input').iCheck({ 33 | checkboxClass: 'icheckbox_polaris', 34 | radioClass: 'iradio_polaris', 35 | increaseArea: '20%' 36 | }); 37 | $('.icheck-futurico input').iCheck({ 38 | checkboxClass: 'icheckbox_futurico', 39 | radioClass: 'iradio_futurico', 40 | increaseArea: '20%' 41 | }); 42 | }); 43 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/inputmask.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | 4 | // initializing inputmask 5 | $(":input").inputmask(); 6 | 7 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/ion-range-slider.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | 4 | if ($('#range_01').length) { 5 | $("#range_01").ionRangeSlider(); 6 | } 7 | 8 | if ($("#range_02").length) { 9 | $("#range_02").ionRangeSlider({ 10 | min: 100, 11 | max: 1000, 12 | from: 550 13 | }); 14 | } 15 | 16 | if ($("#range_03").length) { 17 | $("#range_03").ionRangeSlider({ 18 | type: "double", 19 | grid: true, 20 | min: 0, 21 | max: 1000, 22 | from: 200, 23 | to: 800, 24 | prefix: "$" 25 | }); 26 | } 27 | 28 | if ($("#range_04").length) { 29 | $("#range_04").ionRangeSlider({ 30 | type: "double", 31 | min: 100, 32 | max: 200, 33 | from: 145, 34 | to: 155, 35 | prefix: "Weight: ", 36 | postfix: " million pounds", 37 | decorate_both: true 38 | }); 39 | } 40 | 41 | if ($("#range_05").length) { 42 | $("#range_05").ionRangeSlider({ 43 | type: "double", 44 | min: 1000, 45 | max: 2000, 46 | from: 1200, 47 | to: 1800, 48 | hide_min_max: true, 49 | hide_from_to: true, 50 | grid: false 51 | }); 52 | } 53 | 54 | if ($("#range_06").length) { 55 | $("#range_06").ionRangeSlider({ 56 | type: "double", 57 | min: 1000, 58 | max: 2000, 59 | from: 1200, 60 | to: 1800, 61 | hide_min_max: true, 62 | hide_from_to: true, 63 | grid: true 64 | }); 65 | } 66 | 67 | if ($("#range_07").length) { 68 | $("#range_07").ionRangeSlider({ 69 | type: "double", 70 | grid: true, 71 | min: 0, 72 | max: 10000, 73 | from: 1000, 74 | prefix: "$" 75 | }); 76 | } 77 | 78 | if ($("#range_08").length) { 79 | $("#range_08").ionRangeSlider({ 80 | type: "single", 81 | grid: true, 82 | min: -90, 83 | max: 90, 84 | from: 0, 85 | postfix: "°" 86 | }); 87 | } 88 | 89 | if ($("#range_09").length) { 90 | $("#range_09").ionRangeSlider({ 91 | type: "double", 92 | min: 0, 93 | max: 10000, 94 | grid: true 95 | }); 96 | } 97 | 98 | if ($("#range_10").length) { 99 | $("#range_10").ionRangeSlider({ 100 | type: "double", 101 | min: 0, 102 | max: 10000, 103 | grid: true, 104 | grid_num: 10 105 | }); 106 | } 107 | 108 | if ($("#range_11").length) { 109 | $("#range_11").ionRangeSlider({ 110 | type: "double", 111 | min: 0, 112 | max: 10000, 113 | step: 500, 114 | grid: true, 115 | grid_snap: true 116 | }); 117 | } 118 | 119 | if ($("#range_12").length) { 120 | $("#range_12").ionRangeSlider({ 121 | type: "single", 122 | min: 0, 123 | max: 10, 124 | step: 2.34, 125 | grid: true, 126 | grid_snap: true 127 | }); 128 | } 129 | 130 | if ($("#range_13").length) { 131 | $("#range_13").ionRangeSlider({ 132 | type: "double", 133 | min: 0, 134 | max: 100, 135 | from: 30, 136 | to: 70, 137 | from_fixed: true 138 | }); 139 | } 140 | 141 | if ($("#range_14").length) { 142 | $("#range_14").ionRangeSlider({ 143 | min: 0, 144 | max: 100, 145 | from: 30, 146 | from_min: 10, 147 | from_max: 50 148 | }); 149 | } 150 | 151 | if ($("#range_15").length) { 152 | $("#range_15").ionRangeSlider({ 153 | min: 0, 154 | max: 100, 155 | from: 30, 156 | from_min: 10, 157 | from_max: 50, 158 | from_shadow: true 159 | }); 160 | } 161 | 162 | if ($("#range_16").length) { 163 | $("#range_16").ionRangeSlider({ 164 | type: "double", 165 | min: 0, 166 | max: 100, 167 | from: 20, 168 | from_min: 10, 169 | from_max: 30, 170 | from_shadow: true, 171 | to: 80, 172 | to_min: 70, 173 | to_max: 90, 174 | to_shadow: true, 175 | grid: true, 176 | grid_num: 10 177 | }); 178 | } 179 | 180 | if ($("#range_17").length) { 181 | $("#range_17").ionRangeSlider({ 182 | min: 0, 183 | max: 100, 184 | from: 30, 185 | disable: true 186 | }); 187 | } 188 | 189 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/jq.tablesort.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jq.TableSort -- jQuery Table sorter Plug-in. 3 | * 4 | * Version 1.0.0. 5 | * 6 | * Copyright (c) 2017 Dmitry Zavodnikov. 7 | * 8 | * Licensed under the MIT License. 9 | */ 10 | (function($) { 11 | 'use strict'; 12 | var SORT = 'sort'; 13 | var ASC = 'asc'; 14 | var DESC = 'desc'; 15 | var UNSORT = 'unsort'; 16 | 17 | var config = { 18 | defaultColumn: 0, 19 | defaultOrder: 'asc', 20 | styles: { 21 | 'sort': 'sortStyle', 22 | 'asc': 'ascStyle', 23 | 'desc': 'descStyle', 24 | 'unsort': 'unsortStyle' 25 | }, 26 | selector: function(tableBody, column) { 27 | var groups = []; 28 | 29 | var tableRows = $(tableBody).find('tr'); 30 | for (var i = 0; i < tableRows.length; i++) { 31 | var td = $(tableRows[i]).find('td')[column]; 32 | 33 | groups.push({ 34 | 'values': [tableRows[i]], 35 | 'key': $(td).text() 36 | }); 37 | } 38 | return groups; 39 | }, 40 | comparator: function(group1, group2) { 41 | return group1.key.localeCompare(group2.key); 42 | } 43 | }; 44 | 45 | function getTableHeaders(table) { 46 | return $(table).find('thead > tr > th'); 47 | } 48 | 49 | function getSortableTableHeaders(table) { 50 | return getTableHeaders(table).filter(function(index) { 51 | return $(this).hasClass(config.styles[SORT]); 52 | }); 53 | } 54 | 55 | function changeOrder(table, column) { 56 | var sortedHeader = getTableHeaders(table).filter(function(index) { 57 | return $(this).hasClass(config.styles[ASC]) || $(this).hasClass(config.styles[DESC]); 58 | }); 59 | 60 | var sordOrder = config.defaultOrder; 61 | if (sortedHeader.hasClass(config.styles[ASC])) { 62 | sordOrder = ASC; 63 | } 64 | if (sortedHeader.hasClass(config.styles[DESC])) { 65 | sordOrder = DESC; 66 | } 67 | 68 | var th = getTableHeaders(table)[column]; 69 | 70 | if (th === sortedHeader[0]) { 71 | if (sordOrder === ASC) { 72 | sordOrder = DESC; 73 | } else { 74 | sordOrder = ASC; 75 | } 76 | } 77 | 78 | var headers = getSortableTableHeaders(table); 79 | headers.removeClass(config.styles[ASC]); 80 | headers.removeClass(config.styles[DESC]); 81 | headers.addClass(config.styles[UNSORT]); 82 | 83 | $(th).removeClass(config.styles[UNSORT]); 84 | $(th).addClass(config.styles[sordOrder]); 85 | 86 | var tbody = $(table).find('tbody')[0]; 87 | var groups = config.selector(tbody, column); 88 | 89 | // Sorting. 90 | groups.sort(function(a, b) { 91 | var res = config.comparator(a, b); 92 | return sordOrder === ASC ? res : -1 * res; 93 | }); 94 | 95 | for (var i = 0; i < groups.length; i++) { 96 | var trList = groups[i]; 97 | var trListValues = trList.values; 98 | for (var j = 0; j < trListValues.length; j++) { 99 | tbody.append(trListValues[j]); 100 | } 101 | } 102 | } 103 | 104 | $.fn.tablesort = function(userConfig) { 105 | // Create and save table sort configuration. 106 | $.extend(config, userConfig); 107 | 108 | // Process all selected tables. 109 | var selectedTables = this; 110 | for (var i = 0; i < selectedTables.length; i++) { 111 | var table = selectedTables[i]; 112 | var tableHeader = getSortableTableHeaders(table); 113 | for (var j = 0; j < tableHeader.length; j++) { 114 | var th = tableHeader[j]; 115 | $(th).on("click", function(event) { 116 | var clickColumn = $.inArray(event.currentTarget, getTableHeaders(table)); 117 | changeOrder(table, clickColumn); 118 | }); 119 | } 120 | } 121 | return this; 122 | }; 123 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/jquery-file-upload.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | if ($("#fileuploader").length) { 4 | $("#fileuploader").uploadFile({ 5 | url: "YOUR_FILE_UPLOAD_URL", 6 | fileName: "myfile" 7 | }); 8 | } 9 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/just-gage.js: -------------------------------------------------------------------------------- 1 | var g1, g2, gg1, g7, g8, g9, g10; 2 | 3 | window.onload = function() { 4 | var g1 = new JustGage({ 5 | id: "g1", 6 | value: getRandomInt(0, 100), 7 | min: 0, 8 | max: 100, 9 | title: "Big Fella", 10 | label: "pounds" 11 | }); 12 | 13 | 14 | setInterval(function() { 15 | g1.refresh(getRandomInt(50, 100)); 16 | }, 2500); 17 | }; 18 | 19 | 20 | 21 | 22 | document.addEventListener("DOMContentLoaded", function(event) { 23 | g2 = new JustGage({ 24 | id: "g2", 25 | value: 72, 26 | min: 0, 27 | max: 100, 28 | donut: true, 29 | gaugeWidthScale: 0.6, 30 | counter: true, 31 | hideInnerShadow: true 32 | }); 33 | 34 | document.getElementById('g2_refresh').addEventListener('click', function() { 35 | g2.refresh(getRandomInt(0, 100)); 36 | }); 37 | 38 | var g3 = new JustGage({ 39 | id: 'g3', 40 | value: 65, 41 | min: 0, 42 | max: 100, 43 | symbol: '%', 44 | pointer: true, 45 | gaugeWidthScale: 0.6, 46 | customSectors: [{ 47 | color: '#ff0000', 48 | lo: 50, 49 | hi: 100 50 | }, { 51 | color: '#00ff00', 52 | lo: 0, 53 | hi: 50 54 | }], 55 | counter: true 56 | }); 57 | 58 | var g4 = new JustGage({ 59 | id: 'g4', 60 | value: 45, 61 | min: 0, 62 | max: 100, 63 | symbol: '%', 64 | pointer: true, 65 | pointerOptions: { 66 | toplength: -15, 67 | bottomlength: 10, 68 | bottomwidth: 12, 69 | color: '#8e8e93', 70 | stroke: '#ffffff', 71 | stroke_width: 3, 72 | stroke_linecap: 'round' 73 | }, 74 | gaugeWidthScale: 0.6, 75 | counter: true 76 | }); 77 | 78 | var g5 = new JustGage({ 79 | id: 'g5', 80 | value: 40, 81 | min: 0, 82 | max: 100, 83 | symbol: '%', 84 | donut: true, 85 | pointer: true, 86 | gaugeWidthScale: 0.4, 87 | pointerOptions: { 88 | toplength: 10, 89 | bottomlength: 10, 90 | bottomwidth: 8, 91 | color: '#000' 92 | }, 93 | customSectors: [{ 94 | color: "#ff0000", 95 | lo: 50, 96 | hi: 100 97 | }, { 98 | color: "#00ff00", 99 | lo: 0, 100 | hi: 50 101 | }], 102 | counter: true 103 | }); 104 | 105 | var g6 = new JustGage({ 106 | id: 'g6', 107 | value: 70, 108 | min: 0, 109 | max: 100, 110 | symbol: '%', 111 | pointer: true, 112 | pointerOptions: { 113 | toplength: 8, 114 | bottomlength: -20, 115 | bottomwidth: 6, 116 | color: '#8e8e93' 117 | }, 118 | gaugeWidthScale: 0.1, 119 | counter: true 120 | }); 121 | 122 | var g7 = new JustGage({ 123 | id: 'g7', 124 | value: 65, 125 | min: 0, 126 | max: 100, 127 | reverse: true, 128 | gaugeWidthScale: 0.6, 129 | customSectors: [{ 130 | color: '#ff0000', 131 | lo: 50, 132 | hi: 100 133 | }, { 134 | color: '#00ff00', 135 | lo: 0, 136 | hi: 50 137 | }], 138 | counter: true 139 | }); 140 | 141 | var g8 = new JustGage({ 142 | id: 'g8', 143 | value: 45, 144 | min: 0, 145 | max: 500, 146 | reverse: true, 147 | gaugeWidthScale: 0.6, 148 | counter: true 149 | }); 150 | 151 | var g9 = new JustGage({ 152 | id: 'g9', 153 | value: 25000, 154 | min: 0, 155 | max: 100000, 156 | humanFriendly: true, 157 | reverse: true, 158 | gaugeWidthScale: 1.3, 159 | customSectors: [{ 160 | color: "#ff0000", 161 | lo: 50000, 162 | hi: 100000 163 | }, { 164 | color: "#00ff00", 165 | lo: 0, 166 | hi: 50000 167 | }], 168 | counter: true 169 | }); 170 | 171 | var g10 = new JustGage({ 172 | id: 'g10', 173 | value: 90, 174 | min: 0, 175 | max: 100, 176 | symbol: '%', 177 | reverse: true, 178 | gaugeWidthScale: 0.1, 179 | counter: true 180 | }); 181 | 182 | document.getElementById('gauge_refresh').addEventListener('click', function() { 183 | g3.refresh(getRandomInt(0, 100)); 184 | g4.refresh(getRandomInt(0, 100)); 185 | g5.refresh(getRandomInt(0, 100)); 186 | g6.refresh(getRandomInt(0, 100)); 187 | g7.refresh(getRandomInt(0, 100)); 188 | g8.refresh(getRandomInt(0, 100)); 189 | g9.refresh(getRandomInt(0, 100)); 190 | g10.refresh(getRandomInt(0, 100)); 191 | }); 192 | 193 | }); -------------------------------------------------------------------------------- /assets/js/light-gallery.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | if ($("#lightgallery").length) { 4 | $("#lightgallery").lightGallery(); 5 | } 6 | 7 | if ($("#lightgallery-without-thumb").length) { 8 | $("#lightgallery-without-thumb").lightGallery({ 9 | thumbnail: true, 10 | animateThumb: false, 11 | showThumbByDefault: false 12 | }); 13 | } 14 | 15 | if ($("#video-gallery").length) { 16 | $("#video-gallery").lightGallery(); 17 | } 18 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/listify.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | var options = { 4 | valueNames: ['name', 'born'] 5 | }; 6 | 7 | var userList = new List('users', options); 8 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/mapael.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 'use strict'; 3 | if ($(".mapael-container").length) { 4 | $(".mapael-container").mapael({ 5 | map: { 6 | name: "world_countries" 7 | } 8 | }); 9 | } 10 | }); -------------------------------------------------------------------------------- /assets/js/mapael_example_2.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 'use strict'; 3 | if ($(".mapael-example-2").length) { 4 | $(".mapael-example-2").mapael({ 5 | map: { 6 | name: "france_departments", 7 | defaultArea: { 8 | attrs: { 9 | fill: "#f4f4e8", 10 | stroke: "#00a1fe" 11 | }, 12 | attrsHover: { 13 | fill: "#a4e100" 14 | } 15 | } 16 | }, 17 | legend: { 18 | plot: [{ 19 | labelAttrs: { 20 | fill: "#4a4a4a" 21 | }, 22 | titleAttrs: { 23 | fill: "#4a4a4a" 24 | }, 25 | cssClass: 'population', 26 | mode: 'horizontal', 27 | title: "Population", 28 | marginBottomTitle: 5, 29 | slices: [{ 30 | size: 25, 31 | legendSpecificAttrs: { 32 | fill: '#00a1fe' 33 | }, 34 | label: "< 10 000", 35 | max: "10000" 36 | }, { 37 | size: 25, 38 | legendSpecificAttrs: { 39 | fill: '#00a1fe' 40 | }, 41 | label: "> 10 000 and < 100 000", 42 | min: "10000", 43 | max: "100000" 44 | }, { 45 | size: 25, 46 | legendSpecificAttrs: { 47 | fill: '#00a1fe' 48 | }, 49 | label: "> 100 000", 50 | min: "100000" 51 | }] 52 | }] 53 | }, 54 | plots: { 55 | 'ny': { 56 | latitude: 40.717079, 57 | longitude: -74.00116, 58 | tooltip: { 59 | content: "New York" 60 | }, 61 | value: [5000, 20] 62 | }, 63 | 'an': { 64 | latitude: 61.2108398, 65 | longitude: -149.9019557, 66 | tooltip: { 67 | content: "Anchorage" 68 | }, 69 | value: [50000, 20] 70 | }, 71 | 'sf': { 72 | latitude: 37.792032, 73 | longitude: -122.394613, 74 | tooltip: { 75 | content: "San Francisco" 76 | }, 77 | value: [150000, 20] 78 | }, 79 | 'pa': { 80 | latitude: 19.493204, 81 | longitude: -154.8199569, 82 | tooltip: { 83 | content: "Pahoa" 84 | }, 85 | value: [5000, 200] 86 | }, 87 | 'la': { 88 | latitude: 34.025052, 89 | longitude: -118.192006, 90 | tooltip: { 91 | content: "Los Angeles" 92 | }, 93 | value: [50000, 200] 94 | }, 95 | 'dallas': { 96 | latitude: 32.784881, 97 | longitude: -96.808244, 98 | tooltip: { 99 | content: "Dallas" 100 | }, 101 | value: [150000, 200] 102 | }, 103 | 'miami': { 104 | latitude: 25.789125, 105 | longitude: -80.205674, 106 | tooltip: { 107 | content: "Miami" 108 | }, 109 | value: [5000, 2000] 110 | }, 111 | 'washington': { 112 | latitude: 38.905761, 113 | longitude: -77.020746, 114 | tooltip: { 115 | content: "Washington" 116 | }, 117 | value: [50000, 2000] 118 | }, 119 | 'seattle': { 120 | latitude: 47.599571, 121 | longitude: -122.319426, 122 | tooltip: { 123 | content: "Seattle" 124 | }, 125 | value: [150000, 2000] 126 | }, 127 | 'test1': { 128 | latitude: 44.671504, 129 | longitude: -110.957968, 130 | tooltip: { 131 | content: "Test 1" 132 | }, 133 | value: [5000, 2000] 134 | }, 135 | 'test2': { 136 | latitude: 40.667013, 137 | longitude: -101.465781, 138 | tooltip: { 139 | content: "Test 2" 140 | }, 141 | value: [50000, 200] 142 | }, 143 | 'test3': { 144 | latitude: 38.362031, 145 | longitude: -86.875938, 146 | tooltip: { 147 | content: "Test 3" 148 | }, 149 | value: [150000, 20] 150 | } 151 | } 152 | }); 153 | } 154 | }); -------------------------------------------------------------------------------- /assets/js/maps.js: -------------------------------------------------------------------------------- 1 | var map; 2 | if ($('#map').length) { 3 | function initMap() { 4 | map = new google.maps.Map(document.getElementById('map'), { 5 | center: { 6 | lat: -34.397, 7 | lng: 150.644 8 | }, 9 | zoom: 8 10 | }); 11 | }; 12 | } 13 | (function($) { 14 | 'use strict'; 15 | $('#vmap').vectorMap({ 16 | map: 'world_mill_en', 17 | panOnDrag: true, 18 | focusOn: { 19 | x: 0.5, 20 | y: 0.5, 21 | scale: 1, 22 | animate: true 23 | }, 24 | series: { 25 | regions: [{ 26 | scale: ['#812e2e', '#d87474'], 27 | normalizeFunction: 'polynomial', 28 | values: { 29 | "AF": 16.63, 30 | "AL": 11.58, 31 | "DZ": 158.97, 32 | "AO": 85.81, 33 | "AG": 1.1, 34 | "AR": 351.02, 35 | "AM": 8.83, 36 | "AU": 1219.72, 37 | "AT": 366.26, 38 | "AZ": 52.17, 39 | "BS": 7.54, 40 | "BH": 21.73, 41 | "BD": 105.4, 42 | "BB": 3.96, 43 | "BY": 52.89, 44 | "BE": 461.33, 45 | "BZ": 1.43, 46 | "BJ": 6.49, 47 | "BT": 1.4, 48 | "BO": 19.18, 49 | "BA": 16.2, 50 | "BW": 12.5, 51 | "BR": 2023.53, 52 | "BN": 11.96, 53 | "BG": 44.84, 54 | "BF": 8.67, 55 | "BI": 1.47, 56 | "KH": 11.36, 57 | "CM": 21.88, 58 | "CA": 1563.66, 59 | "CV": 1.57, 60 | "CF": 2.11, 61 | "TD": 7.59, 62 | "CL": 199.18, 63 | "CN": 5745.13, 64 | "CO": 283.11, 65 | "KM": 0.56, 66 | "CD": 12.6, 67 | "CG": 11.88, 68 | "CR": 35.02, 69 | "CI": 22.38, 70 | "HR": 59.92, 71 | "CY": 22.75, 72 | "CZ": 195.23, 73 | "DK": 304.56, 74 | "DJ": 1.14, 75 | "DM": 0.38, 76 | "DO": 50.87, 77 | "EC": 61.49, 78 | "EG": 216.83, 79 | "SV": 21.8, 80 | "GQ": 14.55, 81 | "ER": 2.25, 82 | "EE": 19.22, 83 | "ET": 30.94, 84 | "FJ": 3.15, 85 | "FI": 231.98, 86 | "FR": 2555.44, 87 | "GA": 12.56, 88 | "GM": 1.04, 89 | "GE": 11.23, 90 | "DE": 3305.9, 91 | "GH": 18.06, 92 | "GR": 305.01, 93 | "GD": 0.65, 94 | "GT": 40.77, 95 | "GN": 4.34, 96 | "GW": 0.83, 97 | "GY": 2.2, 98 | "HT": 6.5, 99 | "HN": 15.34, 100 | "HK": 226.49, 101 | "HU": 132.28, 102 | "IS": 12.77, 103 | "IN": 1430.02, 104 | "ID": 695.06, 105 | "IR": 337.9, 106 | "IQ": 84.14, 107 | "IE": 204.14, 108 | "IL": 201.25, 109 | "IT": 2036.69, 110 | "JM": 13.74, 111 | "JP": 5390.9, 112 | "JO": 27.13, 113 | "KZ": 129.76, 114 | "KE": 32.42, 115 | "KI": 0.15, 116 | "KR": 986.26, 117 | "KW": 117.32, 118 | "KG": 4.44, 119 | "LA": 6.34, 120 | "LV": 23.39, 121 | "LB": 39.15, 122 | "LS": 1.8, 123 | "LR": 0.98, 124 | "LY": 77.91, 125 | "LT": 35.73, 126 | "LU": 52.43, 127 | "MK": 9.58, 128 | "MG": 8.33, 129 | "MW": 5.04, 130 | "MY": 218.95, 131 | "MV": 1.43, 132 | "ML": 9.08, 133 | "MT": 7.8, 134 | "MR": 3.49, 135 | "MU": 9.43, 136 | "MX": 1004.04, 137 | "MD": 5.36, 138 | "MN": 5.81, 139 | "ME": 3.88, 140 | "MA": 91.7, 141 | "MZ": 10.21, 142 | "MM": 35.65, 143 | "NA": 11.45, 144 | "NP": 15.11, 145 | "NL": 770.31, 146 | "NZ": 138, 147 | "NI": 6.38, 148 | "NE": 5.6, 149 | "NG": 206.66, 150 | "NO": 413.51, 151 | "OM": 53.78, 152 | "PK": 174.79, 153 | "PA": 27.2, 154 | "PG": 8.81, 155 | "PY": 17.17, 156 | "PE": 153.55, 157 | "PH": 189.06, 158 | "PL": 438.88, 159 | "PT": 223.7, 160 | "QA": 126.52, 161 | "RO": 158.39, 162 | "RU": 1476.91, 163 | "RW": 5.69, 164 | "WS": 0.55, 165 | "ST": 0.19, 166 | "SA": 434.44, 167 | "SN": 12.66, 168 | "RS": 38.92, 169 | "SC": 0.92, 170 | "SL": 1.9, 171 | "SG": 217.38, 172 | "SK": 86.26, 173 | "SI": 46.44, 174 | "SB": 0.67, 175 | "ZA": 354.41, 176 | "ES": 1374.78, 177 | "LK": 48.24, 178 | "KN": 0.56, 179 | "LC": 1, 180 | "VC": 0.58, 181 | "SD": 65.93, 182 | "SR": 3.3, 183 | "SZ": 3.17, 184 | "SE": 444.59, 185 | "CH": 522.44, 186 | "SY": 59.63, 187 | "TW": 426.98, 188 | "TJ": 5.58, 189 | "TZ": 22.43, 190 | "TH": 312.61, 191 | "TL": 0.62, 192 | "TG": 3.07, 193 | "TO": 0.3, 194 | "TT": 21.2, 195 | "TN": 43.86, 196 | "TR": 729.05, 197 | "TM": 0, 198 | "UG": 17.12, 199 | "UA": 136.56, 200 | "AE": 239.65, 201 | "GB": 2258.57, 202 | "US": 14624.18, 203 | "UY": 40.71, 204 | "UZ": 37.72, 205 | "VU": 0.72, 206 | "VE": 285.21, 207 | "VN": 101.99, 208 | "YE": 30.02, 209 | "ZM": 15.69, 210 | "ZW": 5.57 211 | } 212 | }] 213 | } 214 | }); 215 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/misc.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | var body = $('body'); 5 | var contentWrapper = $('.content-wrapper'); 6 | var scroller = $('.container-scroller'); 7 | var footer = $('.footer'); 8 | var sidebar = $('.sidebar'); 9 | 10 | //Add active class to nav-link based on url dynamically 11 | //Active class can be hard coded directly in html file also as required 12 | 13 | function addActiveClass(element) { 14 | if (current === "") { 15 | //for root url 16 | if (element.attr('href').indexOf("index.html") !== -1) { 17 | element.parents('.nav-item').last().addClass('active'); 18 | if (element.parents('.sub-menu').length) { 19 | element.closest('.collapse').addClass('show'); 20 | element.addClass('active'); 21 | } 22 | } 23 | } else { 24 | //for other url 25 | if (element.attr('href').indexOf(current) !== -1) { 26 | element.parents('.nav-item').last().addClass('active'); 27 | if (element.parents('.sub-menu').length) { 28 | element.closest('.collapse').addClass('show'); 29 | element.addClass('active'); 30 | } 31 | if (element.parents('.submenu-item').length) { 32 | element.addClass('active'); 33 | } 34 | } 35 | } 36 | } 37 | 38 | var current = location.pathname.split("/").slice(-1)[0].replace(/^\/|\/$/g, ''); 39 | $('.nav li a', sidebar).each(function() { 40 | var $this = $(this); 41 | addActiveClass($this); 42 | }) 43 | 44 | $('.horizontal-menu .nav li a').each(function() { 45 | var $this = $(this); 46 | addActiveClass($this); 47 | }) 48 | 49 | //Close other submenu in sidebar on opening any 50 | 51 | sidebar.on('show.bs.collapse', '.collapse', function() { 52 | sidebar.find('.collapse.show').collapse('hide'); 53 | }); 54 | 55 | 56 | //Change sidebar and content-wrapper height 57 | applyStyles(); 58 | 59 | function applyStyles() { 60 | //Applying perfect scrollbar 61 | if (!body.hasClass("rtl")) { 62 | if ($('.settings-panel .tab-content .tab-pane.scroll-wrapper').length) { 63 | const settingsPanelScroll = new PerfectScrollbar('.settings-panel .tab-content .tab-pane.scroll-wrapper'); 64 | } 65 | if ($('.chats').length) { 66 | const chatsScroll = new PerfectScrollbar('.chats'); 67 | } 68 | if (body.hasClass("sidebar-fixed")) { 69 | var fixedSidebarScroll = new PerfectScrollbar('#sidebar .nav'); 70 | } 71 | } 72 | } 73 | 74 | $('[data-toggle="minimize"]').on("click", function() { 75 | if ((body.hasClass('sidebar-toggle-display')) || (body.hasClass('sidebar-absolute'))) { 76 | body.toggleClass('sidebar-hidden'); 77 | } else { 78 | body.toggleClass('sidebar-icon-only'); 79 | } 80 | }); 81 | 82 | //checkbox and radios 83 | $(".form-check label,.form-radio label").append(''); 84 | 85 | //fullscreen 86 | $("#fullscreen-button").on("click", function toggleFullScreen() { 87 | if ((document.fullScreenElement !== undefined && document.fullScreenElement === null) || (document.msFullscreenElement !== undefined && document.msFullscreenElement === null) || (document.mozFullScreen !== undefined && !document.mozFullScreen) || (document.webkitIsFullScreen !== undefined && !document.webkitIsFullScreen)) { 88 | if (document.documentElement.requestFullScreen) { 89 | document.documentElement.requestFullScreen(); 90 | } else if (document.documentElement.mozRequestFullScreen) { 91 | document.documentElement.mozRequestFullScreen(); 92 | } else if (document.documentElement.webkitRequestFullScreen) { 93 | document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); 94 | } else if (document.documentElement.msRequestFullscreen) { 95 | document.documentElement.msRequestFullscreen(); 96 | } 97 | } else { 98 | if (document.cancelFullScreen) { 99 | document.cancelFullScreen(); 100 | } else if (document.mozCancelFullScreen) { 101 | document.mozCancelFullScreen(); 102 | } else if (document.webkitCancelFullScreen) { 103 | document.webkitCancelFullScreen(); 104 | } else if (document.msExitFullscreen) { 105 | document.msExitFullscreen(); 106 | } 107 | } 108 | }) 109 | }); 110 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/modal-demo.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $('#exampleModal-4').on('show.bs.modal', function(event) { 4 | var button = $(event.relatedTarget) // Button that triggered the modal 5 | var recipient = button.data('whatever') // Extract info from data-* attributes 6 | // If necessary, you could initiate an AJAX request here (and then do the updating in a callback). 7 | // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead. 8 | var modal = $(this) 9 | modal.find('.modal-title').text('New message to ' + recipient) 10 | modal.find('.modal-body input').val(recipient) 11 | }) 12 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/morris.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 'use strict'; 3 | if ($('#morris-line-example').length) { 4 | Morris.Line({ 5 | element: 'morris-line-example', 6 | lineColors: ['#63CF72', '#F36368', '#76C1FA', '#FABA66'], 7 | data: [{ 8 | y: '2006', 9 | a: 100, 10 | b: 150 11 | }, 12 | { 13 | y: '2007', 14 | a: 75, 15 | b: 65 16 | }, 17 | { 18 | y: '2008', 19 | a: 50, 20 | b: 40 21 | }, 22 | { 23 | y: '2009', 24 | a: 75, 25 | b: 65 26 | }, 27 | { 28 | y: '2010', 29 | a: 50, 30 | b: 40 31 | }, 32 | { 33 | y: '2011', 34 | a: 75, 35 | b: 65 36 | }, 37 | { 38 | y: '2012', 39 | a: 100, 40 | b: 90 41 | } 42 | ], 43 | xkey: 'y', 44 | ykeys: ['a', 'b'], 45 | labels: ['Series A', 'Series B'] 46 | }); 47 | } 48 | if ($('#morris-area-example').length) { 49 | Morris.Area({ 50 | element: 'morris-area-example', 51 | lineColors: ['#76C1FA', '#F36368', '#63CF72', '#FABA66'], 52 | data: [{ 53 | y: '2006', 54 | a: 100, 55 | b: 90 56 | }, 57 | { 58 | y: '2007', 59 | a: 75, 60 | b: 105 61 | }, 62 | { 63 | y: '2008', 64 | a: 50, 65 | b: 40 66 | }, 67 | { 68 | y: '2009', 69 | a: 75, 70 | b: 65 71 | }, 72 | { 73 | y: '2010', 74 | a: 50, 75 | b: 40 76 | }, 77 | { 78 | y: '2011', 79 | a: 75, 80 | b: 65 81 | }, 82 | { 83 | y: '2012', 84 | a: 100, 85 | b: 90 86 | } 87 | ], 88 | xkey: 'y', 89 | ykeys: ['a', 'b'], 90 | labels: ['Series A', 'Series B'] 91 | }); 92 | } 93 | if ($("#morris-bar-example").length) { 94 | Morris.Bar({ 95 | element: 'morris-bar-example', 96 | barColors: ['#63CF72', '#F36368', '#76C1FA', '#FABA66'], 97 | data: [{ 98 | y: '2006', 99 | a: 100, 100 | b: 90 101 | }, 102 | { 103 | y: '2007', 104 | a: 75, 105 | b: 65 106 | }, 107 | { 108 | y: '2008', 109 | a: 50, 110 | b: 40 111 | }, 112 | { 113 | y: '2009', 114 | a: 75, 115 | b: 65 116 | }, 117 | { 118 | y: '2010', 119 | a: 50, 120 | b: 40 121 | }, 122 | { 123 | y: '2011', 124 | a: 75, 125 | b: 65 126 | }, 127 | { 128 | y: '2012', 129 | a: 100, 130 | b: 90 131 | } 132 | ], 133 | xkey: 'y', 134 | ykeys: ['a', 'b'], 135 | labels: ['Series A', 'Series B'] 136 | }); 137 | } 138 | if ($("#morris-donut-example").length) { 139 | Morris.Donut({ 140 | element: 'morris-donut-example', 141 | colors: ['#76C1FA', '#F36368', '#63CF72', '#FABA66'], 142 | data: [{ 143 | label: "Download Sales", 144 | value: 12 145 | }, 146 | { 147 | label: "In-Store Sales", 148 | value: 30 149 | }, 150 | { 151 | label: "Mail-Order Sales", 152 | value: 20 153 | } 154 | ] 155 | }); 156 | } 157 | if ($('#morris-dashboard-taget').length) { 158 | Morris.Area({ 159 | element: 'morris-dashboard-taget', 160 | parseTime: false, 161 | lineColors: ['#76C1FA', '#F36368', '#63CF72', '#FABA66'], 162 | data: [{ 163 | y: 'Jan', 164 | Revenue: 190, 165 | Target: 170 166 | }, 167 | { 168 | y: 'Feb', 169 | Revenue: 60, 170 | Target: 90 171 | }, 172 | { 173 | y: 'March', 174 | Revenue: 100, 175 | Target: 120 176 | }, 177 | { 178 | y: 'Apr', 179 | Revenue: 150, 180 | Target: 140 181 | }, 182 | { 183 | y: 'May', 184 | Revenue: 130, 185 | Target: 170 186 | }, 187 | { 188 | y: 'Jun', 189 | Revenue: 200, 190 | Target: 160 191 | }, 192 | { 193 | y: 'Jul', 194 | Revenue: 150, 195 | Target: 180 196 | }, 197 | { 198 | y: 'Aug', 199 | Revenue: 170, 200 | Target: 180 201 | }, 202 | { 203 | y: 'Sep', 204 | Revenue: 140, 205 | Target: 90 206 | } 207 | ], 208 | xkey: 'y', 209 | ykeys: ['Target', 'Revenue'], 210 | labels: ['Monthly Target', 'Monthly Revenue'], 211 | hideHover: 'auto', 212 | behaveLikeLine: true, 213 | resize: true, 214 | axes: 'x' 215 | }); 216 | } 217 | }); -------------------------------------------------------------------------------- /assets/js/off-canvas.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | $('[data-toggle="offcanvas"]').on("click", function() { 5 | $('.sidebar-offcanvas').toggleClass('active') 6 | }); 7 | }); 8 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/owl-carousel.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $.fn.andSelf = function() { 4 | return this.addBack.apply(this, arguments); 5 | } 6 | 7 | if ($('.example-1').length) { 8 | $('.example-1').owlCarousel({ 9 | loop: true, 10 | margin: 10, 11 | nav: true, 12 | autoplay: true, 13 | autoplayTimeout: 4500, 14 | responsive: { 15 | 0: { 16 | items: 1 17 | }, 18 | 600: { 19 | items: 3 20 | }, 21 | 1000: { 22 | items: 5 23 | } 24 | } 25 | }); 26 | } 27 | 28 | if ($('.full-width').length) { 29 | $('.full-width').owlCarousel({ 30 | loop: true, 31 | margin: 10, 32 | items: 1, 33 | nav: true, 34 | autoplay: true, 35 | autoplayTimeout: 5500, 36 | navText: ["", ""] 37 | }); 38 | } 39 | 40 | if ($('.loop').length) { 41 | $('.loop').owlCarousel({ 42 | center: true, 43 | items: 2, 44 | loop: true, 45 | margin: 10, 46 | autoplay: true, 47 | autoplayTimeout: 8500, 48 | responsive: { 49 | 600: { 50 | items: 4 51 | } 52 | } 53 | }); 54 | } 55 | 56 | if ($('.nonloop').length) { 57 | $('.nonloop').owlCarousel({ 58 | items: 5, 59 | loop: false, 60 | margin: 10, 61 | autoplay: true, 62 | autoplayTimeout: 6000, 63 | responsive: { 64 | 600: { 65 | items: 4 66 | } 67 | } 68 | }); 69 | } 70 | 71 | if ($('.auto-width').length) { 72 | $('.auto-width').owlCarousel({ 73 | items: 2, 74 | margin: 10, 75 | loop: true, 76 | autoplay: true, 77 | autoplayTimeout: 3500, 78 | autoWidth: true, 79 | }); 80 | } 81 | 82 | if ($('.lazy-load').length) { 83 | $('.lazy-load').owlCarousel({ 84 | items: 4, 85 | lazyLoad: true, 86 | loop: true, 87 | margin: 10, 88 | auto: true, 89 | autoplay: true, 90 | autoplayTimeout: 2500, 91 | }); 92 | } 93 | 94 | if ($('.rtl-carousel').length) { 95 | $('.rtl-carousel').owlCarousel({ 96 | rtl: true, 97 | loop: true, 98 | margin: 10, 99 | autoplay: true, 100 | autoplayTimeout: 3000, 101 | responsive: { 102 | 0: { 103 | items: 1 104 | }, 105 | 600: { 106 | items: 3 107 | }, 108 | 1000: { 109 | items: 5 110 | } 111 | } 112 | }); 113 | } 114 | 115 | if ($('.video-carousel').length) { 116 | $('.video-carousel').owlCarousel({ 117 | loop: false, 118 | margin: 10, 119 | video: true, 120 | lazyLoad: true, 121 | autoplay: true, 122 | autoplayTimeout: 7000, 123 | responsive: { 124 | 480: { 125 | items: 4 126 | }, 127 | 600: { 128 | items: 4 129 | } 130 | } 131 | }); 132 | } 133 | 134 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/paginate.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | 4 | if ($('#pagination-demo').length) { 5 | $('#pagination-demo').twbsPagination({ 6 | totalPages: 35, 7 | visiblePages: 7, 8 | onPageClick: function(event, page) { 9 | $('#page-content').text('Page ' + page); 10 | } 11 | }); 12 | } 13 | 14 | if ($('.sync-pagination').length) { 15 | $('.sync-pagination').twbsPagination({ 16 | totalPages: 20, 17 | onPageClick: function(evt, page) { 18 | $('#content').text('Page ' + page); 19 | } 20 | }); 21 | } 22 | 23 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/popover.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | /* Code for attribute data-custom-class for adding custom class to tooltip */ 5 | if (typeof $.fn.popover.Constructor === 'undefined') { 6 | throw new Error('Bootstrap Popover must be included first!'); 7 | } 8 | 9 | var Popover = $.fn.popover.Constructor; 10 | 11 | // add customClass option to Bootstrap Tooltip 12 | $.extend(Popover.Default, { 13 | customClass: '' 14 | }); 15 | 16 | var _show = Popover.prototype.show; 17 | 18 | Popover.prototype.show = function() { 19 | 20 | // invoke parent method 21 | _show.apply(this, Array.prototype.slice.apply(arguments)); 22 | 23 | if (this.config.customClass) { 24 | var tip = this.getTipElement(); 25 | $(tip).addClass(this.config.customClass); 26 | } 27 | 28 | }; 29 | 30 | $('[data-toggle="popover"]').popover() 31 | }); 32 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/profile-demo.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | $('#profile-rating').barrating({ 5 | theme: 'css-stars', 6 | showSelectedRating: false 7 | }); 8 | }); 9 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/select2.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | 4 | if ($(".js-example-basic-single").length) { 5 | $(".js-example-basic-single").select2(); 6 | } 7 | if ($(".js-example-basic-multiple").length) { 8 | $(".js-example-basic-multiple").select2(); 9 | } 10 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/settings.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | $(".nav-settings").click(function() { 5 | $("#right-sidebar").toggleClass("open"); 6 | }); 7 | $(".settings-close").click(function() { 8 | $("#right-sidebar,#theme-settings").removeClass("open"); 9 | }); 10 | 11 | $("#settings-trigger").on("click", function() { 12 | $("#theme-settings").toggleClass("open"); 13 | }); 14 | 15 | 16 | //background constants 17 | var navbar_classes = "navbar-danger navbar-success navbar-warning navbar-dark navbar-light navbar-primary navbar-info navbar-pink"; 18 | var sidebar_classes = "sidebar-light sidebar-dark"; 19 | var $body = $("body"); 20 | 21 | //sidebar backgrounds 22 | $("#sidebar-default-theme").on("click", function() { 23 | $body.removeClass(sidebar_classes); 24 | $(".sidebar-bg-options").removeClass("selected"); 25 | $(this).addClass("selected"); 26 | }); 27 | $("#sidebar-dark-theme").on("click", function() { 28 | $body.removeClass(sidebar_classes); 29 | $body.addClass("sidebar-dark"); 30 | $(".sidebar-bg-options").removeClass("selected"); 31 | $(this).addClass("selected"); 32 | }); 33 | 34 | 35 | //Navbar Backgrounds 36 | $(".tiles.primary").on("click", function() { 37 | $(".navbar").removeClass(navbar_classes); 38 | $(".navbar").addClass("navbar-primary"); 39 | $(".tiles").removeClass("selected"); 40 | $(this).addClass("selected"); 41 | }); 42 | $(".tiles.success").on("click", function() { 43 | $(".navbar").removeClass(navbar_classes); 44 | $(".navbar").addClass("navbar-success"); 45 | $(".tiles").removeClass("selected"); 46 | $(this).addClass("selected"); 47 | }); 48 | $(".tiles.warning").on("click", function() { 49 | $(".navbar").removeClass(navbar_classes); 50 | $(".navbar").addClass("navbar-warning"); 51 | $(".tiles").removeClass("selected"); 52 | $(this).addClass("selected"); 53 | }); 54 | $(".tiles.danger").on("click", function() { 55 | $(".navbar").removeClass(navbar_classes); 56 | $(".navbar").addClass("navbar-danger"); 57 | $(".tiles").removeClass("selected"); 58 | $(this).addClass("selected"); 59 | }); 60 | $(".tiles.info").on("click", function() { 61 | $(".navbar").removeClass(navbar_classes); 62 | $(".navbar").addClass("navbar-info"); 63 | $(".tiles").removeClass("selected"); 64 | $(this).addClass("selected"); 65 | }); 66 | $(".tiles.dark").on("click", function() { 67 | $(".navbar").removeClass(navbar_classes); 68 | $(".navbar").addClass("navbar-dark"); 69 | $(".tiles").removeClass("selected"); 70 | $(this).addClass("selected"); 71 | }); 72 | $(".tiles.default").on("click", function() { 73 | $(".navbar").removeClass(navbar_classes); 74 | $(".tiles").removeClass("selected"); 75 | $(this).addClass("selected"); 76 | }); 77 | 78 | //Horizontal menu in mobile 79 | $('[data-toggle="horizontal-menu-toggle"]').on("click", function() { 80 | $(".horizontal-menu .bottom-navbar").toggleClass("header-toggled"); 81 | }); 82 | // Horizontal menu navigation in mobile menu on click 83 | var navItemClicked = $('.horizontal-menu .page-navigation >.nav-item'); 84 | navItemClicked.on("click", function(event) { 85 | if(window.matchMedia('(max-width: 991px)').matches) { 86 | if(!($(this).hasClass('show-submenu'))) { 87 | navItemClicked.removeClass('show-submenu'); 88 | } 89 | $(this).toggleClass('show-submenu'); 90 | } 91 | }); 92 | 93 | $(window).scroll(function() { 94 | if(window.matchMedia('(min-width: 992px)').matches) { 95 | var header = $('.horizontal-menu'); 96 | if ($(window).scrollTop() >= 71) { 97 | $(header).addClass('fixed-on-scroll'); 98 | } else { 99 | $(header).removeClass('fixed-on-scroll'); 100 | } 101 | } 102 | }); 103 | 104 | }); 105 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/sparkline.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | if ($("#sparkline-line-chart").length) { 4 | $("#sparkline-line-chart").sparkline([5, 6, 7, 9, 9, 5, 3, 2, 2, 4, 6, 7], { 5 | type: 'line', 6 | width: '100%', 7 | height: '100%' 8 | }); 9 | } 10 | 11 | if ($("#sparkline-bar-chart").length) { 12 | $("#sparkline-bar-chart").sparkline([5, 6, 7, 2, 0, -4, 4], { 13 | type: 'bar', 14 | height: '100%', 15 | barWidth: '58.5%', 16 | barColor: '#58D8A3', 17 | negBarColor: '#e56e72', 18 | zeroColor: 'green' 19 | }); 20 | } 21 | 22 | if ($("#sparkline-pie-chart").length) { 23 | $("#sparkline-pie-chart").sparkline([1, 1, 2, 4], { 24 | type: 'pie', 25 | sliceColors: ['#0CB5F9', '#58d8a3', '#F4767B', '#F9B65F'], 26 | borderColor: '#', 27 | width: '100%', 28 | height: '100%' 29 | }); 30 | } 31 | 32 | if ($("#sparkline-bullet-chart").length) { 33 | $("#sparkline-bullet-chart").sparkline([10, 12, 12, 9, 7], { 34 | type: 'bullet', 35 | height: '238', 36 | width: '100%', 37 | }); 38 | } 39 | 40 | if ($("#sparkline-composite-chart").length) { 41 | $("#sparkline-composite-chart").sparkline([5, 6, 7, 2, 0, 3, 6, 8, 1, 2, 2, 0, 3, 6], { 42 | type: 'line', 43 | width: '100%', 44 | height: '100%' 45 | }); 46 | } 47 | 48 | if ($("#sparkline-composite-chart").length) { 49 | $("#sparkline-composite-chart").sparkline([5, 6, 7, 2, 0, 3, 6, 8, 1, 2, 2, 0, 3, 6], { 50 | type: 'bar', 51 | height: '150px', 52 | width: '100%', 53 | barWidth: 10, 54 | barSpacing: 5, 55 | barColor: '#60a76d', 56 | negBarColor: '#60a76d', 57 | composite: true 58 | }); 59 | } 60 | 61 | if ($(".demo-sparkline").length) { 62 | $(".demo-sparkline").sparkline('html', { 63 | enableTagOptions: true, 64 | width: '100%', 65 | height: '30px', 66 | fillColor: false 67 | }); 68 | } 69 | 70 | if ($(".top-seelling-dashboard-chart").length) { 71 | $(".top-seelling-dashboard-chart").sparkline('html', { 72 | enableTagOptions: true, 73 | width: '100%', 74 | barWidth: 30, 75 | fillColor: false 76 | }); 77 | } 78 | 79 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/tablesorter.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | if ($('#sortable-table-1').length) { 5 | $('#sortable-table-1').tablesort(); 6 | } 7 | if ($('#sortable-table-2').length) { 8 | $('#sortable-table-2').tablesort(); 9 | } 10 | }); 11 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/tabs.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | if ($('.demo-tabs').length) { 5 | $('.demo-tabs').pwstabs({ 6 | effect: 'none' 7 | }); 8 | } 9 | 10 | if ($('.hello_world').length) { 11 | $('.hello_world').pwstabs(); 12 | } 13 | 14 | if ($('#rtl-tabs-1').length) { 15 | $('#rtl-tabs-1').pwstabs({ 16 | effect: 'slidedown', 17 | defaultTab: 2, 18 | rtl: true 19 | }); 20 | } 21 | 22 | if ($('#vertical-left').length) { 23 | $('#vertical-left').pwstabs({ 24 | effect: 'slideleft', 25 | defaultTab: 1, 26 | containerWidth: '600px', 27 | tabsPosition: 'vertical', 28 | verticalPosition: 'left' 29 | }); 30 | } 31 | 32 | if ($('#horizontal-left').length) { 33 | $('#horizontal-left').pwstabs({ 34 | effect: 'slidedown', 35 | defaultTab: 2, 36 | containerWidth: '600px', 37 | horizontalPosition: 'bottom' 38 | }); 39 | } 40 | 41 | if ($('.tickets-tab').length) { 42 | $('.tickets-tab').pwstabs({ 43 | effect: 'none' 44 | }); 45 | } 46 | 47 | }); 48 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/tight-grid.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | if ($('.grid').length) { 4 | var colcade = new Colcade('.grid', { 5 | columns: '.grid-col', 6 | items: '.grid-item' 7 | }); 8 | } 9 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/toastDemo.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | showSuccessToast = function() { 3 | 'use strict'; 4 | resetToastPosition(); 5 | $.toast({ 6 | heading: 'Success', 7 | text: 'And these were just the basic demos! Scroll down to check further details on how to customize the output.', 8 | showHideTransition: 'slide', 9 | icon: 'success', 10 | loaderBg: '#f96868', 11 | position: 'top-right' 12 | }) 13 | }; 14 | showInfoToast = function() { 15 | 'use strict'; 16 | resetToastPosition(); 17 | $.toast({ 18 | heading: 'Info', 19 | text: 'And these were just the basic demos! Scroll down to check further details on how to customize the output.', 20 | showHideTransition: 'slide', 21 | icon: 'info', 22 | loaderBg: '#46c35f', 23 | position: 'top-right' 24 | }) 25 | }; 26 | showWarningToast = function() { 27 | 'use strict'; 28 | resetToastPosition(); 29 | $.toast({ 30 | heading: 'Warning', 31 | text: 'And these were just the basic demos! Scroll down to check further details on how to customize the output.', 32 | showHideTransition: 'slide', 33 | icon: 'warning', 34 | loaderBg: '#57c7d4', 35 | position: 'top-right' 36 | }) 37 | }; 38 | showDangerToast = function() { 39 | 'use strict'; 40 | resetToastPosition(); 41 | $.toast({ 42 | heading: 'Danger', 43 | text: 'And these were just the basic demos! Scroll down to check further details on how to customize the output.', 44 | showHideTransition: 'slide', 45 | icon: 'error', 46 | loaderBg: '#f2a654', 47 | position: 'top-right' 48 | }) 49 | }; 50 | showToastPosition = function(position) { 51 | 'use strict'; 52 | resetToastPosition(); 53 | $.toast({ 54 | heading: 'Positioning', 55 | text: 'Specify the custom position object or use one of the predefined ones', 56 | position: String(position), 57 | icon: 'info', 58 | stack: false, 59 | loaderBg: '#f96868' 60 | }) 61 | } 62 | showToastInCustomPosition = function() { 63 | 'use strict'; 64 | resetToastPosition(); 65 | $.toast({ 66 | heading: 'Custom positioning', 67 | text: 'Specify the custom position object or use one of the predefined ones', 68 | icon: 'info', 69 | position: { 70 | left: 120, 71 | top: 120 72 | }, 73 | stack: false, 74 | loaderBg: '#f96868' 75 | }) 76 | } 77 | resetToastPosition = function() { 78 | $('.jq-toast-wrap').removeClass('bottom-left bottom-right top-left top-right mid-center'); // to remove previous position class 79 | $(".jq-toast-wrap").css({ 80 | "top": "", 81 | "left": "", 82 | "bottom": "", 83 | "right": "" 84 | }); //to remove previous position style 85 | } 86 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/todolist.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | var todoListItem = $('.todo-list'); 5 | var todoListInput = $('.todo-list-input'); 6 | $('.todo-list-add-btn').on("click", function(event) { 7 | event.preventDefault(); 8 | 9 | var item = $(this).prevAll('.todo-list-input').val(); 10 | 11 | if (item) { 12 | todoListItem.append("Change the plan of users.
17 |Earn coins by staying on this page.
18 |Every <% if (settings.api.arcio["afk page"].every !== 1) { %><%= settings.api.arcio["afk page"].every %> seconds<% } else { %>second<% } %>, you will get <%= settings.api.arcio["afk page"].coins == 1 ? "a" : settings.api.arcio["afk page"].coins %> coin<%= settings.api.arcio["afk page"].coins == 1 ? "" : "s" %>
23 |To view your current coin balance, click your username on the navigation bar
24 |Websocket status: Connected!
Buy coins with your card.
18 |View your resources & other things here.
18 | 19 | <%- include('./components/alert') %> 20 | <% if (req.query.err == "ALREADY_OPEN") { %> 21 |Gift others your coins.
19 | <% if (req.query.err) { %> 20 |Join discord servers and get extra credits.
18 | Join this server to receive:
<%= settings.api.client.j4r.ads[i].coins %> Coins
Redeem a coupon.
17 | <% if (req.query.err) { %> 18 |You can edit, delete, create & update servers here.
22 | <% if (req.query.err) { %> 23 | <% if (req.query.err !== "none") { %> 24 |CPU: <%= pterodactyl.relationships.servers.data[i].attributes.limits.cpu/100 %> Core(s)
47 |Ram: <%= pterodactyl.relationships.servers.data[i].attributes.limits.memory/1024 %> GB(s)
48 |Disk: <%= pterodactyl.relationships.servers.data[i].attributes.limits.disk/1024 %> GB(s)
49 |View your login information & reset your password.
18 | <% if (req.session.newaccount || req.session.password) { %> 19 |