├── 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 | '
' + 12 | 'Twitter' + 13 | 'Dribbble' + 14 | '
' + 15 | '
' + 16 | 'Great!' + 17 | 'Cancel' + 18 | '
' 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("
  • "); 13 | todoListInput.val(""); 14 | } 15 | 16 | }); 17 | 18 | todoListItem.on('change', '.checkbox', function() { 19 | if ($(this).attr('checked')) { 20 | $(this).removeAttr('checked'); 21 | } else { 22 | $(this).attr('checked', 'checked'); 23 | } 24 | 25 | $(this).closest("li").toggleClass('completed'); 26 | 27 | }); 28 | 29 | todoListItem.on('click', '.remove', function() { 30 | $(this).parent().remove(); 31 | }); 32 | 33 | }); 34 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/tooltips.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | 4 | $(function() { 5 | /* Code for attribute data-custom-class for adding custom class to tooltip */ 6 | if (typeof $.fn.tooltip.Constructor === 'undefined') { 7 | throw new Error('Bootstrap Tooltip must be included first!'); 8 | } 9 | 10 | var Tooltip = $.fn.tooltip.Constructor; 11 | 12 | // add customClass option to Bootstrap Tooltip 13 | $.extend(Tooltip.Default, { 14 | customClass: '' 15 | }); 16 | 17 | var _show = Tooltip.prototype.show; 18 | 19 | Tooltip.prototype.show = function() { 20 | 21 | // invoke parent method 22 | _show.apply(this, Array.prototype.slice.apply(arguments)); 23 | 24 | if (this.config.customClass) { 25 | var tip = this.getTipElement(); 26 | $(tip).addClass(this.config.customClass); 27 | } 28 | 29 | }; 30 | $('[data-toggle="tooltip"]').tooltip(); 31 | 32 | }); 33 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/typeahead.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | var substringMatcher = function(strs) { 4 | return function findMatches(q, cb) { 5 | var matches, substringRegex; 6 | 7 | // an array that will be populated with substring matches 8 | matches = []; 9 | 10 | // regex used to determine if a string contains the substring `q` 11 | var substrRegex = new RegExp(q, 'i'); 12 | 13 | // iterate through the pool of strings and for any string that 14 | // contains the substring `q`, add it to the `matches` array 15 | for (var i = 0; i < strs.length; i++) { 16 | if (substrRegex.test(strs[i])) { 17 | matches.push(strs[i]); 18 | } 19 | } 20 | 21 | cb(matches); 22 | }; 23 | }; 24 | 25 | var states = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 26 | 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 27 | 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 28 | 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 29 | 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 30 | 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', 31 | 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 32 | 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 33 | 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming' 34 | ]; 35 | 36 | $('#the-basics .typeahead').typeahead({ 37 | hint: true, 38 | highlight: true, 39 | minLength: 1 40 | }, { 41 | name: 'states', 42 | source: substringMatcher(states) 43 | }); 44 | // constructs the suggestion engine 45 | var states = new Bloodhound({ 46 | datumTokenizer: Bloodhound.tokenizers.whitespace, 47 | queryTokenizer: Bloodhound.tokenizers.whitespace, 48 | // `states` is an array of state names defined in "The Basics" 49 | local: states 50 | }); 51 | 52 | $('#bloodhound .typeahead').typeahead({ 53 | hint: true, 54 | highlight: true, 55 | minLength: 1 56 | }, { 57 | name: 'states', 58 | source: states 59 | }); 60 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/widgets.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $.fn.andSelf = function() { 4 | return this.addBack.apply(this, arguments); 5 | } 6 | $(function() { 7 | var isrtl = $("body").hasClass("rtl"); 8 | if ($('.owl-carousel').length) { 9 | $('.owl-carousel').owlCarousel({ 10 | loop: true, 11 | margin: 10, 12 | dots: false, 13 | nav: true, 14 | rtl: isrtl, 15 | autoplay: true, 16 | autoplayTimeout: 4500, 17 | navText: ["", ""], 18 | responsive: { 19 | 0: { 20 | items: 1 21 | }, 22 | 600: { 23 | items: 1 24 | }, 25 | 1000: { 26 | items: 1 27 | } 28 | } 29 | }); 30 | } 31 | }); 32 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/wizard.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | var form = $("#example-form"); 4 | form.children("div").steps({ 5 | headerTag: "h3", 6 | bodyTag: "section", 7 | transitionEffect: "slideLeft", 8 | onFinished: function(event, currentIndex) { 9 | alert("Submitted!"); 10 | } 11 | }); 12 | var validationForm = $("#example-validation-form"); 13 | validationForm.val({ 14 | errorPlacement: function errorPlacement(error, element) { 15 | element.before(error); 16 | }, 17 | rules: { 18 | confirm: { 19 | equalTo: "#password" 20 | } 21 | } 22 | }); 23 | validationForm.children("div").steps({ 24 | headerTag: "h3", 25 | bodyTag: "section", 26 | transitionEffect: "slideLeft", 27 | onStepChanging: function(event, currentIndex, newIndex) { 28 | validationForm.val({ 29 | ignore: [":disabled", ":hidden"] 30 | }) 31 | return validationForm.val(); 32 | }, 33 | onFinishing: function(event, currentIndex) { 34 | validationForm.val({ 35 | ignore: [':disabled'] 36 | }) 37 | return validationForm.val(); 38 | }, 39 | onFinished: function(event, currentIndex) { 40 | alert("Submitted!"); 41 | } 42 | }); 43 | var verticalForm = $("#example-vertical-wizard"); 44 | verticalForm.children("div").steps({ 45 | headerTag: "h3", 46 | bodyTag: "section", 47 | transitionEffect: "slideLeft", 48 | stepsOrientation: "vertical", 49 | onFinished: function(event, currentIndex) { 50 | alert("Submitted!"); 51 | } 52 | }); 53 | })(jQuery); -------------------------------------------------------------------------------- /assets/js/x-editable.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | if ($('#editable-form').length) { 5 | $.fn.editable.defaults.mode = 'inline'; 6 | $.fn.editableform.buttons = 7 | '' + 10 | ''; 13 | $('#username').editable({ 14 | type: 'text', 15 | pk: 1, 16 | name: 'username', 17 | title: 'Enter username' 18 | }); 19 | 20 | $('#firstname').editable({ 21 | validate: function(value) { 22 | if ($.trim(value) === '') return 'This field is required'; 23 | } 24 | }); 25 | 26 | $('#sex').editable({ 27 | source: [{ 28 | value: 1, 29 | text: 'Male' 30 | }, 31 | { 32 | value: 2, 33 | text: 'Female' 34 | } 35 | ] 36 | }); 37 | 38 | $('#status').editable(); 39 | 40 | $('#group').editable({ 41 | showbuttons: false 42 | }); 43 | 44 | $('#vacation').editable({ 45 | datepicker: { 46 | todayBtn: 'linked' 47 | } 48 | }); 49 | 50 | $('#dob').editable(); 51 | 52 | $('#event').editable({ 53 | placement: 'right', 54 | combodate: { 55 | firstItem: 'name' 56 | } 57 | }); 58 | 59 | $('#meeting_start').editable({ 60 | format: 'yyyy-mm-dd hh:ii', 61 | viewformat: 'dd/mm/yyyy hh:ii', 62 | validate: function(v) { 63 | if (v && v.getDate() === 10) return 'Day cant be 10!'; 64 | }, 65 | datetimepicker: { 66 | todayBtn: 'linked', 67 | weekStart: 1 68 | } 69 | }); 70 | 71 | $('#comments').editable({ 72 | showbuttons: 'bottom' 73 | }); 74 | 75 | $('#note').editable(); 76 | $('#pencil').on("click", function(e) { 77 | e.stopPropagation(); 78 | e.preventDefault(); 79 | $('#note').editable('toggle'); 80 | }); 81 | 82 | $('#state').editable({ 83 | source: ["Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Dakota", "North Carolina", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"] 84 | }); 85 | 86 | $('#state2').editable({ 87 | value: 'California', 88 | typeahead: { 89 | name: 'state', 90 | local: ["Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Dakota", "North Carolina", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"] 91 | } 92 | }); 93 | 94 | $('#fruits').editable({ 95 | pk: 1, 96 | limit: 3, 97 | source: [{ 98 | value: 1, 99 | text: 'banana' 100 | }, 101 | { 102 | value: 2, 103 | text: 'peach' 104 | }, 105 | { 106 | value: 3, 107 | text: 'apple' 108 | }, 109 | { 110 | value: 4, 111 | text: 'watermelon' 112 | }, 113 | { 114 | value: 5, 115 | text: 'orange' 116 | } 117 | ] 118 | }); 119 | 120 | $('#tags').editable({ 121 | inputclass: 'input-large', 122 | select2: { 123 | tags: ['html', 'javascript', 'css', 'ajax'], 124 | tokenSeparators: [",", " "] 125 | } 126 | }); 127 | 128 | $('#address').editable({ 129 | url: '/post', 130 | value: { 131 | city: "Moscow", 132 | street: "Lenina", 133 | building: "12" 134 | }, 135 | validate: function(value) { 136 | if (value.city === '') return 'city is required!'; 137 | }, 138 | display: function(value) { 139 | if (!value) { 140 | $(this).empty(); 141 | return; 142 | } 143 | var html = '' + $('
    ').text(value.city).html() + ', ' + $('
    ').text(value.street).html() + ' st., bld. ' + $('
    ').text(value.building).html(); 144 | $(this).html(html); 145 | } 146 | }); 147 | 148 | $('#user .editable').on('hidden', function(e, reason) { 149 | if (reason === 'save' || reason === 'nochange') { 150 | var $next = $(this).closest('tr').next().find('.editable'); 151 | if ($('#autoopen').is(':checked')) { 152 | setTimeout(function() { 153 | $next.editable('show'); 154 | }, 300); 155 | } else { 156 | $next.focus(); 157 | } 158 | } 159 | }); 160 | } 161 | }); 162 | })(jQuery); -------------------------------------------------------------------------------- /assets/vendors/codemirror/shell.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: https://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | CodeMirror.defineMode('shell', function() { 15 | 16 | var words = {}; 17 | function define(style, dict) { 18 | for(var i = 0; i < dict.length; i++) { 19 | words[dict[i]] = style; 20 | } 21 | }; 22 | 23 | var commonAtoms = ["true", "false"]; 24 | var commonKeywords = ["if", "then", "do", "else", "elif", "while", "until", "for", "in", "esac", "fi", 25 | "fin", "fil", "done", "exit", "set", "unset", "export", "function"]; 26 | var commonCommands = ["ab", "awk", "bash", "beep", "cat", "cc", "cd", "chown", "chmod", "chroot", "clear", 27 | "cp", "curl", "cut", "diff", "echo", "find", "gawk", "gcc", "get", "git", "grep", "hg", "kill", "killall", 28 | "ln", "ls", "make", "mkdir", "openssl", "mv", "nc", "nl", "node", "npm", "ping", "ps", "restart", "rm", 29 | "rmdir", "sed", "service", "sh", "shopt", "shred", "source", "sort", "sleep", "ssh", "start", "stop", 30 | "su", "sudo", "svn", "tee", "telnet", "top", "touch", "vi", "vim", "wall", "wc", "wget", "who", "write", 31 | "yes", "zsh"]; 32 | 33 | CodeMirror.registerHelper("hintWords", "shell", commonAtoms.concat(commonKeywords, commonCommands)); 34 | 35 | define('atom', commonAtoms); 36 | define('keyword', commonKeywords); 37 | define('builtin', commonCommands); 38 | 39 | function tokenBase(stream, state) { 40 | if (stream.eatSpace()) return null; 41 | 42 | var sol = stream.sol(); 43 | var ch = stream.next(); 44 | 45 | if (ch === '\\') { 46 | stream.next(); 47 | return null; 48 | } 49 | if (ch === '\'' || ch === '"' || ch === '`') { 50 | state.tokens.unshift(tokenString(ch, ch === "`" ? "quote" : "string")); 51 | return tokenize(stream, state); 52 | } 53 | if (ch === '#') { 54 | if (sol && stream.eat('!')) { 55 | stream.skipToEnd(); 56 | return 'meta'; // 'comment'? 57 | } 58 | stream.skipToEnd(); 59 | return 'comment'; 60 | } 61 | if (ch === '$') { 62 | state.tokens.unshift(tokenDollar); 63 | return tokenize(stream, state); 64 | } 65 | if (ch === '+' || ch === '=') { 66 | return 'operator'; 67 | } 68 | if (ch === '-') { 69 | stream.eat('-'); 70 | stream.eatWhile(/\w/); 71 | return 'attribute'; 72 | } 73 | if (/\d/.test(ch)) { 74 | stream.eatWhile(/\d/); 75 | if(stream.eol() || !/\w/.test(stream.peek())) { 76 | return 'number'; 77 | } 78 | } 79 | stream.eatWhile(/[\w-]/); 80 | var cur = stream.current(); 81 | if (stream.peek() === '=' && /\w+/.test(cur)) return 'def'; 82 | return words.hasOwnProperty(cur) ? words[cur] : null; 83 | } 84 | 85 | function tokenString(quote, style) { 86 | var close = quote == "(" ? ")" : quote == "{" ? "}" : quote 87 | return function(stream, state) { 88 | var next, escaped = false; 89 | while ((next = stream.next()) != null) { 90 | if (next === close && !escaped) { 91 | state.tokens.shift(); 92 | break; 93 | } else if (next === '$' && !escaped && quote !== "'" && stream.peek() != close) { 94 | escaped = true; 95 | stream.backUp(1); 96 | state.tokens.unshift(tokenDollar); 97 | break; 98 | } else if (!escaped && quote !== close && next === quote) { 99 | state.tokens.unshift(tokenString(quote, style)) 100 | return tokenize(stream, state) 101 | } else if (!escaped && /['"]/.test(next) && !/['"]/.test(quote)) { 102 | state.tokens.unshift(tokenStringStart(next, "string")); 103 | stream.backUp(1); 104 | break; 105 | } 106 | escaped = !escaped && next === '\\'; 107 | } 108 | return style; 109 | }; 110 | }; 111 | 112 | function tokenStringStart(quote, style) { 113 | return function(stream, state) { 114 | state.tokens[0] = tokenString(quote, style) 115 | stream.next() 116 | return tokenize(stream, state) 117 | } 118 | } 119 | 120 | var tokenDollar = function(stream, state) { 121 | if (state.tokens.length > 1) stream.eat('$'); 122 | var ch = stream.next() 123 | if (/['"({]/.test(ch)) { 124 | state.tokens[0] = tokenString(ch, ch == "(" ? "quote" : ch == "{" ? "def" : "string"); 125 | return tokenize(stream, state); 126 | } 127 | if (!/\d/.test(ch)) stream.eatWhile(/\w/); 128 | state.tokens.shift(); 129 | return 'def'; 130 | }; 131 | 132 | function tokenize(stream, state) { 133 | return (state.tokens[0] || tokenBase) (stream, state); 134 | }; 135 | 136 | return { 137 | startState: function() {return {tokens:[]};}, 138 | token: function(stream, state) { 139 | return tokenize(stream, state); 140 | }, 141 | closeBrackets: "()[]{}''\"\"``", 142 | lineComment: '#', 143 | fold: "brace" 144 | }; 145 | }); 146 | 147 | CodeMirror.defineMIME('text/x-sh', 'shell'); 148 | // Apache uses a slightly different Media Type for Shell scripts 149 | // http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types 150 | CodeMirror.defineMIME('application/x-sh', 'shell'); 151 | 152 | }); 153 | -------------------------------------------------------------------------------- /assets/vendors/css/vendor.bundle.base.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Container style 3 | */ 4 | .ps { 5 | overflow: hidden !important; 6 | overflow-anchor: none; 7 | -ms-overflow-style: none; 8 | touch-action: auto; 9 | -ms-touch-action: auto; 10 | } 11 | 12 | /* 13 | * Scrollbar rail styles 14 | */ 15 | .ps__rail-x { 16 | display: none; 17 | opacity: 0; 18 | transition: background-color .2s linear, opacity .2s linear; 19 | -webkit-transition: background-color .2s linear, opacity .2s linear; 20 | height: 15px; 21 | /* there must be 'bottom' or 'top' for ps__rail-x */ 22 | bottom: 0px; 23 | /* please don't change 'position' */ 24 | position: absolute; 25 | } 26 | 27 | .ps__rail-y { 28 | display: none; 29 | opacity: 0; 30 | transition: background-color .2s linear, opacity .2s linear; 31 | -webkit-transition: background-color .2s linear, opacity .2s linear; 32 | width: 15px; 33 | /* there must be 'right' or 'left' for ps__rail-y */ 34 | right: 0; 35 | /* please don't change 'position' */ 36 | position: absolute; 37 | } 38 | 39 | .ps--active-x > .ps__rail-x, 40 | .ps--active-y > .ps__rail-y { 41 | display: block; 42 | background-color: transparent; 43 | } 44 | 45 | .ps:hover > .ps__rail-x, 46 | .ps:hover > .ps__rail-y, 47 | .ps--focus > .ps__rail-x, 48 | .ps--focus > .ps__rail-y, 49 | .ps--scrolling-x > .ps__rail-x, 50 | .ps--scrolling-y > .ps__rail-y { 51 | opacity: 0.6; 52 | } 53 | 54 | .ps .ps__rail-x:hover, 55 | .ps .ps__rail-y:hover, 56 | .ps .ps__rail-x:focus, 57 | .ps .ps__rail-y:focus, 58 | .ps .ps__rail-x.ps--clicking, 59 | .ps .ps__rail-y.ps--clicking { 60 | background-color: #eee; 61 | opacity: 0.9; 62 | } 63 | 64 | /* 65 | * Scrollbar thumb styles 66 | */ 67 | .ps__thumb-x { 68 | background-color: #aaa; 69 | border-radius: 6px; 70 | transition: background-color .2s linear, height .2s ease-in-out; 71 | -webkit-transition: background-color .2s linear, height .2s ease-in-out; 72 | height: 6px; 73 | /* there must be 'bottom' for ps__thumb-x */ 74 | bottom: 2px; 75 | /* please don't change 'position' */ 76 | position: absolute; 77 | } 78 | 79 | .ps__thumb-y { 80 | background-color: #aaa; 81 | border-radius: 6px; 82 | transition: background-color .2s linear, width .2s ease-in-out; 83 | -webkit-transition: background-color .2s linear, width .2s ease-in-out; 84 | width: 6px; 85 | /* there must be 'right' for ps__thumb-y */ 86 | right: 2px; 87 | /* please don't change 'position' */ 88 | position: absolute; 89 | } 90 | 91 | .ps__rail-x:hover > .ps__thumb-x, 92 | .ps__rail-x:focus > .ps__thumb-x, 93 | .ps__rail-x.ps--clicking .ps__thumb-x { 94 | background-color: #999; 95 | height: 11px; 96 | } 97 | 98 | .ps__rail-y:hover > .ps__thumb-y, 99 | .ps__rail-y:focus > .ps__thumb-y, 100 | .ps__rail-y.ps--clicking .ps__thumb-y { 101 | background-color: #999; 102 | width: 11px; 103 | } 104 | 105 | /* MS supports */ 106 | @supports (-ms-overflow-style: none) { 107 | .ps { 108 | overflow: auto !important; 109 | } 110 | } 111 | 112 | @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { 113 | .ps { 114 | overflow: auto !important; 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /assets/vendors/mdi/fonts/materialdesignicons-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenHeliactyl/Heliactyl/5764d13a039d90e682b421c2d0a9ae7a3aea83a5/assets/vendors/mdi/fonts/materialdesignicons-webfont.eot -------------------------------------------------------------------------------- /assets/vendors/mdi/fonts/materialdesignicons-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenHeliactyl/Heliactyl/5764d13a039d90e682b421c2d0a9ae7a3aea83a5/assets/vendors/mdi/fonts/materialdesignicons-webfont.ttf -------------------------------------------------------------------------------- /assets/vendors/mdi/fonts/materialdesignicons-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenHeliactyl/Heliactyl/5764d13a039d90e682b421c2d0a9ae7a3aea83a5/assets/vendors/mdi/fonts/materialdesignicons-webfont.woff -------------------------------------------------------------------------------- /assets/vendors/mdi/fonts/materialdesignicons-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenHeliactyl/Heliactyl/5764d13a039d90e682b421c2d0a9ae7a3aea83a5/assets/vendors/mdi/fonts/materialdesignicons-webfont.woff2 -------------------------------------------------------------------------------- /assets/vendors/owl-carousel-2/owl.carousel.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.4 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | .owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-nav button.owl-next,.owl-carousel .owl-nav button.owl-prev,.owl-carousel button.owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-ms-touch-action:pan-y;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item .owl-lazy:not([src]),.owl-carousel .owl-item .owl-lazy[src^=""]{max-height:0}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%} -------------------------------------------------------------------------------- /assets/vendors/owl-carousel-2/owl.theme.default.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.4 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | .owl-theme .owl-dots,.owl-theme .owl-nav{text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-nav{margin-top:10px}.owl-theme .owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px}.owl-theme .owl-nav [class*=owl-]:hover{background:#869791;color:#FFF;text-decoration:none}.owl-theme .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-nav.disabled+.owl-dots{margin-top:10px}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#869791} -------------------------------------------------------------------------------- /assets/vendors/owl-carousel-2/owl.video.play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenHeliactyl/Heliactyl/5764d13a039d90e682b421c2d0a9ae7a3aea83a5/assets/vendors/owl-carousel-2/owl.video.play.png -------------------------------------------------------------------------------- /assets/vendors/pwstabs/jquery.pwstabs.min.js: -------------------------------------------------------------------------------- 1 | !function(t,s,i,a){function e(s,i){this.element=t(s),this.$elem=t(this.element),this.settings=t.extend({},l,i),this._defaults=l,this._name=n,this.init()}var n="pwstabs",l={effect:"scale",defaultTab:1,containerWidth:"100%",tabsPosition:"horizontal",horizontalPosition:"top",verticalPosition:"left",responsive:!1,theme:"",rtl:!1};e.prototype={init:function(){var i=["scale","slideleft","slideright","slidetop","slidedown","none"],a=this.$elem,e=a.children("[data-pws-tab]");a.addClass("pws_tabs_list"),a.wrap('
    ');var n=a.closest(".pws_tabs_container");if("100%"!==this.settings.containerWidth&&n.css("width",this.settings.containerWidth),"vertical"==this.settings.tabsPosition){if(n.closest(".pws_tab_single").length){var l=n.closest(".pws_tab_single").innerWidth();n.css("width",l)}"left"==this.settings.verticalPosition?n.addClass("pws_tabs_vertical pws_tabs_vertical_left"):n.addClass("pws_tabs_vertical pws_tabs_vertical_right")}else"top"==this.settings.horizontalPosition?n.addClass("pws_tabs_horizontal pws_tabs_horizontal_top"):n.addClass("pws_tabs_horizontal pws_tabs_horizontal_bottom");this.settings.rtl&&n.addClass("pws_tabs_rtl"),"none"==this.settings.effect&&n.addClass("pws_tabs_noeffect"),this.settings.theme&&n.addClass(this.settings.theme),t.inArray(this.settings.effect,i)>=0?n.addClass("pws_"+this.settings.effect):n.addClass("pws_scale"),e.addClass("pws_hide").hide(),"vertical"==this.settings.tabsPosition?"left"==this.settings.verticalPosition?n.prepend('
      '):n.append('
        '):"top"==this.settings.horizontalPosition?n.prepend('
          '):n.append('
            ');var d=n.children(".pws_tabs_controll"),o=1;e.each(function(){t(this).attr("data-pws-tab-id",o);var s=t(this).data("pws-tab"),i=t(this).data("pws-tab-name");d.append('
          • '+i+"
          • "),t(this).addClass("pws_tab_single"),o++});var h=d.find("a"),p=d.find("li"),r=a.children('[data-pws-tab-id="'+this.settings.defaultTab+'"]');if(a.children("[data-pws-tab-icon]").each(function(){var s=t(this).attr("data-pws-tab"),i=t(this).attr("data-pws-tab-name"),a=t(this).attr("data-pws-tab-icon");""==i&&d.find('[data-tab-id="'+s+'"]').addClass("pws_tab_noname"),d.find('[data-tab-id="'+s+'"]').prepend('')}),"vertical"==this.settings.tabsPosition){var _=n.innerWidth()/450,c=parseInt(h.css("font-size"))/_,w=parseInt(h.css("padding-left"))+parseInt(h.css("padding-right")),u=h.html().length*c+w,b=d.outerHeight(),f=n.outerWidth()-u,v=a.outerHeight();d.width(u),a.outerWidth(f),b>v&&a.css("min-height",b)}if(r.addClass("pws_show").show(),d.find('[data-tab-id="'+r.data("pws-tab")+'"]').addClass("pws_tab_active"),h.on("click",function(s){s.preventDefault(),h.removeClass("pws_tab_active"),t(this).addClass("pws_tab_active");var i=t(this).data("tab-id"),n=a.children('[data-pws-tab="'+i+'"]');e.removeClass("pws_show"),setTimeout(function(){e.hide(),n.show()},400),setTimeout(function(){n.addClass("pws_show")},450)}),this.settings.responsive){n.addClass("pws_tabs_responsive");var g=parseInt(d.children("li").length),m=100/g,C=Math.max.apply(null,p.map(function(){return t(this).height()}).get());t(s).on("resize load",{pluginSettings:this.settings},function(i){var e=i.data.pluginSettings,l=e.tabsPosition,o=e.containerWidth;t(s).width()<=960&&(n.width(""),p.css("width",m+"%"),h.each(function(){t(this).height(C)}),"vertical"==l&&(d.width(""),a.width(""),a.css("min-height",""),a.height(r.height()))),t(s).width()<=600?(n.find(".pws_responsive_small_menu").length<1&&t('
            ').insertBefore(d),d.addClass("pws_tabs_menu_popup"),h.height(""),p.width(""),n.find("ul.pws_tabs_menu_popup").hide(),n.find(".pws_responsive_small_menu a").click(function(s){s.preventDefault(),"0"==t(this).attr("data-visible")?(n.find("ul.pws_tabs_menu_popup").show(),t(this).attr("data-visible","1")):(n.find("ul.pws_tabs_menu_popup").hide(),t(this).attr("data-visible","0"))}),n.find("ul.pws_tabs_menu_popup li a").on("click",function(s){s.preventDefault(),t(this).closest(".pws_tabs_menu_popup").hide(),n.find(".pws_responsive_small_menu a").attr("data-visible","0")})):t(s).width()>960?(n.css("width",o),p.width(""),h.height(""),n.find(".pws_responsive_small_menu").remove(),d.removeClass("pws_tabs_menu_popup"),d.show()):t(s).width()>600&&(n.find(".pws_responsive_small_menu").remove(),d.removeClass("pws_tabs_menu_popup"),d.show(),h.on("click",function(s){s.preventDefault(),t(this).parent().parent().show()}))})}}},t.fn[n]=function(t){return this.each(function(){new e(this,t)})}}(jQuery,window,document); -------------------------------------------------------------------------------- /managers/Queue.js: -------------------------------------------------------------------------------- 1 | class Queue { 2 | constructor() { 3 | this.queue = [] 4 | this.processing = false; 5 | } 6 | 7 | addJob(job) { 8 | this.queue.push(job) 9 | this.bumpQueue() 10 | } 11 | 12 | bumpQueue() { 13 | if (this.processing) return 14 | const job = this.queue.shift() 15 | if (!job) return 16 | const cb = () => { 17 | this.processing = false 18 | this.bumpQueue() 19 | } 20 | this.processing = true 21 | job(cb) 22 | } 23 | } 24 | 25 | module.exports = Queue -------------------------------------------------------------------------------- /misc/getAllServers.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch') 2 | const settings = require('../settings.json') 3 | 4 | module.exports = () => { 5 | return new Promise(async (resolve) => { 6 | 7 | const allServers = [] 8 | 9 | async function getServersOnPage(page) { 10 | return (await fetch( 11 | settings.pterodactyl.domain + "/api/application/servers/?page=" + page, 12 | { 13 | headers: { 14 | "Authorization": `Bearer ${settings.pterodactyl.key}` 15 | } 16 | } 17 | )).json(); 18 | }; 19 | 20 | let currentPage = 1 21 | while (true) { 22 | const page = await getServersOnPage(currentPage) 23 | allServers.push(...page.data) 24 | if (page.meta.pagination.total_pages > currentPage) { 25 | currentPage++ 26 | } else { 27 | break 28 | } 29 | } 30 | 31 | resolve(allServers) 32 | 33 | }) 34 | } -------------------------------------------------------------------------------- /misc/getPteroUser.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch') 2 | const settings = require('../settings.json') 3 | 4 | module.exports = (userid, db) => { 5 | return new Promise(async (resolve, err) => { 6 | let cacheaccount = await fetch( 7 | settings.pterodactyl.domain + "/api/application/users/" + (await db.get("users-" + userid)) + "?include=servers", 8 | { 9 | method: "get", 10 | headers: { 'Content-Type': 'application/json', "Authorization": `Bearer ${settings.pterodactyl.key}` } 11 | } 12 | ); 13 | if (await cacheaccount.statusText === "Not Found") return err('Ptero account not found'); 14 | let cacheaccountinfo = JSON.parse(await cacheaccount.text()); 15 | resolve(cacheaccountinfo) 16 | }) 17 | } -------------------------------------------------------------------------------- /misc/log.js: -------------------------------------------------------------------------------- 1 | const settings = require('../settings.json') 2 | const fetch = require('node-fetch') 3 | 4 | /** 5 | * Log an action to Discord 6 | * @param {string} action 7 | * @param {string} message 8 | */ 9 | module.exports = (action, message) => { 10 | if (!settings.logging.status) return 11 | if (!settings.logging.actions.user[action] && !settings.logging.actions.admin[action]) return 12 | 13 | fetch(settings.logging.webhook, { 14 | method: 'POST', 15 | headers: { 16 | 'content-type': 'application/json' 17 | }, 18 | body: JSON.stringify({ 19 | embeds: [ 20 | { 21 | color: hexToDecimal('#191c24'), 22 | title: `Event: \`${action}\``, 23 | description: message, 24 | author: { 25 | name: 'Logging' 26 | }, 27 | thumbnail: { 28 | url: 'https://cdn.discordapp.com/attachments/881207010417315861/949595064554913812/Copy_of_H_35.png' 29 | } 30 | } 31 | ] 32 | }) 33 | }) 34 | .catch(() => {}) 35 | } 36 | 37 | function hexToDecimal(hex) { 38 | return parseInt(hex.replace("#", ""), 16) 39 | } -------------------------------------------------------------------------------- /misc/verifyCaptchaResponse.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch') 2 | const settings = require('../settings.json') 3 | 4 | module.exports = (response) => { 5 | return new Promise(async (resolve) => { 6 | const res = await fetch(`https://www.google.com/recaptcha/api/siteverify`, { 7 | method: 'POST', 8 | body: new URLSearchParams({ 9 | secret: settings.recaptcha.secret, 10 | response: response 11 | }) 12 | }) 13 | const json = await res.json() 14 | resolve(json.success) 15 | }) 16 | } -------------------------------------------------------------------------------- /misc/vpnCheck.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch') 2 | const ejs = require("ejs"); 3 | const { renderFile } = require('ejs') 4 | let newsettings = JSON.parse(require("fs").readFileSync("./settings.json")); 5 | 6 | module.exports = (key, db, ip, res) => { 7 | return new Promise(async resolve => { 8 | let ipcache = await db.get(`vpncheckcache-${ip}`) 9 | if (!ipcache) { 10 | vpncheck = await(await fetch(`https://proxycheck.io/v2/${ip}?key=${key}&vpn=1`)).json().catch(() => { }) 11 | } 12 | if (ipcache || (vpncheck && vpncheck[ip])) { 13 | if (!ipcache) ipcache = vpncheck[ip].proxy 14 | await db.set(`vpncheckcache-${ip}`, ipcache, 172800000) 15 | // Is a VPN/proxy? 16 | if (ipcache === "yes") { 17 | resolve(true) 18 | renderFile( 19 | `./themes/${newsettings.defaulttheme}/alerts/vpn.ejs`, 20 | { 21 | settings: newsettings, 22 | db, 23 | extra: { home: { name: 'VPN Detected' } } 24 | }, 25 | null, 26 | (err, str) => { 27 | if (err) return renderFile(`./themes/default/alerts/vpn.ejs`); 28 | } 29 | ) 30 | return 31 | } else return resolve(false) 32 | } else return resolve(false) 33 | }) 34 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Heliactyl", 3 | "version": "12.7.0", 4 | "description": "The best Pterodactyl client area.", 5 | "main": "index.js", 6 | "author": "Sryden UK", 7 | "dependencies": { 8 | "@keyv/mongo": "^1.2.1", 9 | "@keyv/mysql": "^1.1.5", 10 | "@keyv/postgres": "^1.0.17", 11 | "@keyv/redis": "^2.2.1", 12 | "@keyv/sqlite": "^3.5.2", 13 | "axios": "^0.25.0", 14 | "chalk": "^4.1.0", 15 | "credit-card-validate": "^0.9.3", 16 | "cron": "^1.8.2", 17 | "discord.js": "^12.5.3", 18 | "ejs": "^3.1.7", 19 | "express": "^4.18.2", 20 | "express-session": "^1.17.2", 21 | "express-ws": "^4.0.0", 22 | "javascript-obfuscator": "^4.0.2", 23 | "keyv": "^4.0.4", 24 | "node-cache": "^5.1.2", 25 | "node-fetch": "^2.6.6", 26 | "nodemon": "^2.0.21", 27 | "stripe": "^9.4.0", 28 | "warn": "^1.0.1" 29 | }, 30 | "scripts": { 31 | "start": "nodemon index.js" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /themes/default/404.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- include('./components/head') %> 4 | 5 |
            6 |
            7 |
            8 |
            9 |
            10 |
            11 |
            12 |

            404

            13 |
            14 |
            15 |

            ERROR!

            16 |

            Uh oh! This page was not found.

            17 |
            18 |
            19 |
            20 |
            21 | Back to Dashboard 22 |
            23 |
            24 |
            25 |
            26 |
            27 | 28 |
            29 | 30 |
            31 | 32 | <%- include('./components/scripts') %> 33 | 34 | -------------------------------------------------------------------------------- /themes/default/admin-plans.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- include('./components/head') %> 4 | 5 |
            6 | 7 | <%- include('./components/adminsidebar') %> 8 | 9 |
            10 | 11 | <%- include('./components/topnav') %> 12 | 13 |
            14 |
            15 |

            Plans

            16 |

            Change the plan of users.

            17 |
            18 |
            19 |
            20 |
            21 |

            Set user's plan

            22 |
            23 |
            24 | 25 | 26 |
            27 |
            28 |
            29 | 34 |
            35 | Submit

            You cannot set a plan which is managed by the automatic role rewards, Heliactyl requires you to create a duplicate plan if you want to do that.

            36 |
            37 |
            38 |
            39 |
            40 |
            41 | 42 | <%- include('./components/footer') %> 43 |
            44 | 45 |
            46 | 47 |
            48 | 49 | 50 | 51 | 52 | 84 | 85 | <%- include('./components/scripts') %> 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /themes/default/afk.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- include('./components/head') %> 4 | 5 |
            6 | 7 | <%- include('./components/sidebar') %> 8 | 9 |
            10 | 11 | <%- include('./components/topnav') %> 12 | 13 |
            14 |
            15 | 16 |

            AFK Page

            17 |

            Earn coins by staying on this page.

            18 |
            19 |
            20 |
            21 |
            22 |

            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 |
            25 |

            Websocket status: Connected!

            26 | 29 |
            30 |
            31 |
            32 |
            33 |
            34 | 35 | <%- include('./components/footer') %> 36 |
            37 | 38 |
            39 | 40 |
            41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /themes/default/alerts/alt.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <%- include('./components/head') %> 5 | 6 | 7 | 8 | 11 | 12 |
            13 |
            14 |
            15 |
            16 |
            17 |
            18 |
            19 |
            20 |
            21 |
            22 |

            Error!

            23 |

            Alt Account Detected

            24 |
            25 |
            26 |

            Halex detected that you have multiple accounts with us


            27 |

            We do not allow the use of multiple accounts on our services


            28 |
            29 | Try again 30 |
            31 |
            32 |
            33 |
            34 |
            35 | 36 |
            37 | 38 |
            39 | 40 |
            41 | 42 | <%- include('./components/scripts') %> 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /themes/default/alerts/vpn.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= extra.home.name %> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 36 | 37 |
            38 |
            39 |
            40 |
            41 |
            42 |
            43 |
            44 |
            45 |
            46 |
            47 |

            Error!

            48 |

            VPN Detected

            49 |
            50 |
            51 |

            Halex detected that you are using a VPN, please disable it to continue


            52 |

            Users with a VPN are usually the ones who abuse our services, so we block anyone from logging in with a VPN


            53 |
            54 | Try again 55 |
            56 |
            57 |
            58 |
            59 |
            60 | 61 |
            62 | 63 |
            64 | 65 |
            66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /themes/default/boxes/1.ejs: -------------------------------------------------------------------------------- 1 |

            Upgrade Resources

            2 |
            If you require more resources for your server, click the button below

            3 | Buy Extra Resources -------------------------------------------------------------------------------- /themes/default/boxes/2.ejs: -------------------------------------------------------------------------------- 1 |

            Deploy Servers

            2 |
            If you would like to deploy a server, either go to Manage Servers -> Deploy Server or click the button below

            3 | Deploy Server -------------------------------------------------------------------------------- /themes/default/buy.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- include('./components/head') %> 4 | 5 |
            6 | 7 | <%- include('./components/sidebar') %> 8 | 9 | 10 |
            11 | 12 | <%- include('./components/topnav') %> 13 | 14 |
            15 |
            16 |

            Buy Coins

            17 |

            Buy coins with your card.

            18 |
            19 |
            20 |
            21 |
            22 |
            23 |
            24 | 25 | 26 |
            27 |
            28 | 29 | 30 |
            31 |
            32 | 33 | 34 |
            35 |
            36 | 37 | 38 |
            39 |
            40 | 41 | 42 |
            43 |
            44 | 45 |
            46 |
            47 |

            48 | 49 |
            50 |
            51 |
            52 | 53 | 54 |
            55 |
            56 |
            57 |
            58 |
            59 |
            60 | 61 | <%- include('./components/footer') %> 62 |
            63 | 64 |
            65 | 66 |
            67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | <%- include('./components/scripts') %> 75 | 76 | 77 | 78 | 79 | 80 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /themes/default/components/adminsidebar.ejs: -------------------------------------------------------------------------------- 1 | 44 | 45 | -------------------------------------------------------------------------------- /themes/default/components/ads.ejs: -------------------------------------------------------------------------------- 1 | <% if (settings.ads.enabled == true) { %> 2 |
            3 |
            4 |
            5 |
            6 |

            Advertisement

            7 |
            8 | <%= settings.ads.script %> 9 | 10 |
            11 |
            12 |
            13 |
            14 |
            15 | <% } %> 16 | -------------------------------------------------------------------------------- /themes/default/components/alert.ejs: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /themes/default/components/footer.ejs: -------------------------------------------------------------------------------- 1 |
            2 |
            3 | 12 | 13 | © <%= settings.name %> | Powered by Heliactyl 14 | v<%= settings.version.replace(/"/g, `\\\\"`) %> - 15 |
            16 |
            17 | 28 | -------------------------------------------------------------------------------- /themes/default/components/head.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%= settings.name %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | <% if (settings.api.arcio.enabled == true) { %> 29 | 30 | <% } %> 31 | 32 | 33 |
            34 |
            35 |
            36 | 87 | 139 | -------------------------------------------------------------------------------- /themes/default/components/scripts.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 23 | -------------------------------------------------------------------------------- /themes/default/components/sidebar.ejs: -------------------------------------------------------------------------------- 1 | 94 | 95 | -------------------------------------------------------------------------------- /themes/default/components/status.ejs: -------------------------------------------------------------------------------- 1 |
            2 | <% 3 | let ram = 0; 4 | let disk = 0; 5 | let cpu = 0; 6 | let servers = pterodactyl.relationships.servers.data.length; 7 | for (let i = 0, len = pterodactyl.relationships.servers.data.length; i < len; i++) { 8 | ram = ram + (typeof pterodactyl.relationships.servers.data[i].attributes.limits.memory == "number" ? pterodactyl.relationships.servers.data[i].attributes.limits.memory : 0); 9 | disk = disk + (typeof pterodactyl.relationships.servers.data[i].attributes.limits.disk == "number" ? pterodactyl.relationships.servers.data[i].attributes.limits.disk : 0); 10 | cpu = cpu + (typeof pterodactyl.relationships.servers.data[i].attributes.limits.cpu == "number" ? pterodactyl.relationships.servers.data[i].attributes.limits.cpu : 0); 11 | } 12 | %> 13 | 14 | <% if (settings.resources.type == "GB") { %> 15 |
            16 |
            17 |
            18 |
            19 |
            20 |
            YOUR CPU
            21 |
            22 |

            <%= cpu/100 %> / <%= packages.cpu/100 + extraresources.cpu/100 %> Core(s)

            23 |
            24 |
            25 |
            26 |
            27 |
            28 |
            29 |
            30 |
            31 |
            32 |
            33 |
            34 |
            YOUR RAM
            35 |
            36 |

            <%= ram/1024 %> / <%= packages.ram/1024 + extraresources.ram/1024 %> GB(s)

            37 |
            38 |
            39 |
            40 |
            41 |
            42 |
            43 |
            44 |
            45 |
            46 |
            47 |
            48 |
            YOUR DISK
            49 |
            50 |

            <%= disk/1024 %> / <%= packages.disk/1024 + extraresources.disk/1024 %> GB(s)

            51 |
            52 |
            53 |
            54 |
            55 |
            56 |
            57 |
            58 |
            59 |
            60 |
            61 |
            62 |
            YOUR SLOTS
            63 |
            64 |

            <%= servers %> / <%= packages.servers + extraresources.servers %>

            65 |
            66 |
            67 |
            68 |
            69 |
            70 |
            71 | <% } else { %> 72 |
            73 |
            74 |
            75 |
            76 |
            77 |
            YOUR CPU
            78 |
            79 |

            <%= cpu/100 %> / <%= packages.cpu/100 + extraresources.cpu/100 %> Core(s)

            80 |
            81 |
            82 |
            83 |
            84 |
            85 |
            86 |
            87 |
            88 |
            89 |
            90 |
            91 |
            YOUR RAM
            92 |
            93 |

            <%= ram %> / <%= packages.ram + extraresources.ram %> MB(s)

            94 |
            95 |
            96 |
            97 |
            98 |
            99 |
            100 |
            101 |
            102 |
            103 |
            104 |
            105 |
            YOUR DISK
            106 |
            107 |

            <%= disk %> / <%= packages.disk + extraresources.disk %> MB(s)

            108 |
            109 |
            110 |
            111 |
            112 |
            113 |
            114 |
            115 |
            116 |
            117 |
            118 |
            119 |
            YOUR SLOTS
            120 |
            121 |

            <%= servers %> / <%= packages.servers + extraresources.servers %>

            122 |
            123 |
            124 |
            125 |
            126 |
            127 |
            128 | <% } %> 129 |
            -------------------------------------------------------------------------------- /themes/default/components/topnav.ejs: -------------------------------------------------------------------------------- 1 | 48 | -------------------------------------------------------------------------------- /themes/default/dashboard.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- include('./components/head') %> 4 | 5 |
            6 | 7 | <%- include('./components/sidebar') %> 8 | 9 |
            10 | 11 | <%- include('./components/topnav') %> 12 | 13 |
            14 |
            15 | 16 |

            Dashboard

            17 |

            View your resources & other things here.

            18 | 19 | <%- include('./components/alert') %> 20 | <% if (req.query.err == "ALREADY_OPEN") { %> 21 |
            22 | You can't open multiple tabs! 23 |
            24 | <% } else if (req.query.err === "CANNOTAFFORDRENEWAL") { %> 25 |
            26 | You need at least <%= settings.renewals.cost %> coins to purchase a server renewal! 27 |
            28 | <% } if (req.query.success === 'RENEWED') { %> 29 |
            30 | Succesfully purchased renewal for server! 31 |
            32 | <% } if (req.session.newaccount || req.session.password) { %> 33 |
            34 | <% if (req.session.newaccount) { %> 35 | Welcome! You are a first time user
            36 | <% } %> 37 | <% if (req.session.password) { %> 38 | Your password has been changed to <%= req.session.password %>, however if you do not save that then you can just reset it via the "Account Settings" page 39 | <% } else { %> 40 | Please head over to Settings to create a password. 41 | <% } %> 42 |
            43 | <% } %> 44 | <%- include('./components/status') %> 45 |
            46 |
            47 |
            48 |
            49 | <%- include('./boxes/1') %> 50 |
            51 |
            52 |
            53 |
            54 |
            55 |
            56 | <%- include('./boxes/2') %> 57 |
            58 |
            59 |
            60 |
            61 |
            62 | 63 | 64 | <%- include('./components/footer') %> 65 |
            66 | 67 |
            68 | 69 |
            70 | 71 | <%- include('./components/scripts') %> 72 | 73 | 74 | -------------------------------------------------------------------------------- /themes/default/gift-coins.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- include('./components/head') %> 4 | 5 | 6 |
            7 | 8 | <%- include('./components/sidebar') %> 9 | 10 |
            11 | 12 | <%- include('./components/topnav') %> 13 | 14 |
            15 |
            16 | 17 |

            Gift Coins

            18 |

            Gift others your coins.

            19 | <% if (req.query.err) { %> 20 |
            21 | <% if (req.query.err == "MISSINGFIELDS") { %> 22 | You must fill out all fields in the form. 23 | <% } else if (req.query.err == "CANNOTGIFTYOURSELF") { %> 24 | You cannot gift coins to yourself -_- 25 | <% } else if (req.query.err == "MUSTCOMPLETECAPTCHA") { %> 26 | You must complete the captcha to prove you are human! 27 | <% } else if (req.query.err == "INVALIDCAPTCHARESPONSE") { %> 28 | You submitted an invalid captcha response, try again. 29 | <% } else if (req.query.err == "CANTAFFORD") { %> 30 | You do not have enough coins to gift this amount. 31 | <% } else if (req.query.err == "USERDOESNTEXIST") { %> 32 | No user with the ID you tried to send coins to has logged in to the dashboard. 33 | <% } else if (req.query.err == "TOOLOWCOINS") { %> 34 | You must gift 1 or more coin. 35 | <% } %> 36 |
            37 | <% } else if (req.query.success) { %> 38 |
            39 | Success! The coins have been transferred 40 |
            41 | <% } %> 42 |
            43 |
            44 |
            45 |
            46 |
            47 |
            48 | 49 | 50 |
            51 |
            52 | 53 | 54 |
            55 | Gift 56 |
            57 |
            58 |
            59 |
            60 |
            61 |
            62 | 63 | <%- include('./components/footer') %> 64 |
            65 | 66 |
            67 | 68 |
            69 | 70 | 71 | 72 | 73 | 80 | 81 | 82 | <%- include('./components/scripts') %> 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /themes/default/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <%- include('./components/head') %> 5 | 6 | 7 | 8 | 9 | 10 |
            11 |
            12 |
            13 |
            14 |
            15 |
            16 |
            17 |
            18 |
            19 |
            20 |

            Authentication

            21 |

            Welcome!

            22 |
            23 |

            24 | <% if (!req.session.userinfo) { %> 25 | Login 26 | <% } else { %> 27 | Login as <%= req.session.userinfo.username %>#<%= req.session.userinfo.discriminator %>
            28 | Login on a different account 29 | <% } %> 30 |
            31 |
            32 |
            33 |
            34 |
            35 |
            36 | 37 |
            38 | 39 |
            40 | 41 |
            42 | 43 | <%- include('./components/scripts') %> 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /themes/default/j4r.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- include('./components/head') %> 4 | 5 |
            6 | 7 | <%- include('./components/sidebar') %> 8 | 9 |
            10 | 11 | <%- include('./components/topnav') %> 12 | 13 |
            14 |
            15 | 16 |

            Join for Rewards

            17 |

            Join discord servers and get extra credits.

            18 |
            19 | <% for (let i = 0, len = settings.api.client.j4r.ads.length; i < len; i++) { %> 20 |
            21 |
            22 |
            23 |

            <%= settings.api.client.j4r.ads[i].name %>

            24 |

            Join this server to receive:
            <%= settings.api.client.j4r.ads[i].coins %> Coins

            25 |
            26 | Join Server Claim reward 27 |
            28 |
            29 |
            30 |
            31 | <% } %> 32 |
            33 |
            34 | 35 | <%- include('./components/footer') %> 36 |
            37 | 38 |
            39 | 40 |
            41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | <%- include('./components/scripts') %> 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /themes/default/pages.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": "index.ejs", 3 | "notfound": "404.ejs", 4 | "redirect": { 5 | "callback": "/dashboard", 6 | "logout": "/", 7 | "createserver": "/servers?err=CREATED", 8 | "deleteserver": "/servers", 9 | "updateservers": "/servers", 10 | "failedcreateserver": "/servers/new", 11 | "failedmodifyserver": "/servers/edit", 12 | "setplan": "/admin", 13 | "failedsetplan": "/admin", 14 | "createserverdisabled": "/servers/new?err=disabled", 15 | "modifyserverdisabled": "/servers/modify?err=disabled", 16 | "deleteserverdisabled": "/delete?err=disabled", 17 | "regenpassword": "/settings", 18 | "setresources": "/admin", 19 | "failedsetresources": "/admin", 20 | "giftresources": "/gift", 21 | "failedgiftresources": "/gift", 22 | "renewserver": "/dashboard", 23 | "setcoins": "/admin", 24 | "failedsetcoins": "/admin", 25 | "purchaseram": "/store", 26 | "failedpurchaseram": "/store", 27 | "purchasedisk": "/store", 28 | "failedpurchasedisk": "/store", 29 | "purchasecpu": "/store", 30 | "failedpurchasecpu": "/store", 31 | "purchaseservers": "/store", 32 | "failedpurchaseservers": "/store", 33 | "arcioerror": "/afk", 34 | "missingorinvalidcouponcode": "/redeem", 35 | "successfullyredeemedcoupon": "/redeem", 36 | "couponcreationfailed": "/admin", 37 | "couponcreationsuccess": "/admin", 38 | "couponrevokefailed": "/admin", 39 | "couponrevokesuccess": "/admin", 40 | "removeaccountfailed": "/admin", 41 | "removeaccountsuccess": "/admin" 42 | }, 43 | "pages": { 44 | "dashboard": "dashboard.ejs", 45 | "servers/new": "create.ejs", 46 | "servers/edit": "edit.ejs", 47 | "admin": "admin.ejs", 48 | "admin/plans": "admin-plans.ejs", 49 | "admin/resources": "admin-resources.ejs", 50 | "admin/coupons": "admin-coupons.ejs", 51 | "admin/coins": "admin-coins.ejs", 52 | "redeem": "redeem.ejs", 53 | "settings": "settings.ejs", 54 | "gift-coins": "gift-coins.ejs", 55 | "gift-resources": "gift-resources.ejs", 56 | "j4r": "j4r.ejs", 57 | "buy": "buy.ejs", 58 | "afk": "afk.ejs", 59 | "store": "store.ejs", 60 | "servers": "servers.ejs", 61 | "lv": "lv.ejs" 62 | }, 63 | "mustbeloggedin": [ 64 | "/dashboard", 65 | "/servers/new", 66 | "/servers/edit", 67 | "/settings", 68 | "/j4r", 69 | "/gift", 70 | "/store", 71 | "/coins", 72 | "/lv" 73 | ], 74 | "mustbeadmin": [ 75 | "/admin", 76 | "/admin/plans", 77 | "/admin/resources", 78 | "/admin/coupons", 79 | "/admin/coins" 80 | ], 81 | "variables": { 82 | "faviconlink": "https://cdn.discordapp.com/attachments/1063585626022223892/1065305275826966609/Screenshot_2023-01-18_162220.jpg", 83 | "home": { 84 | "note": "Name & Icon have been moved to settings.json in Heliactyl 12.5.0", 85 | "admin": "admin", 86 | "buttontext": { 87 | "loggedin": { 88 | "link": "/dashboard" 89 | }, 90 | "loggedout": { 91 | "link": "/login" 92 | } 93 | } 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /themes/default/redeem.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- include('./components/head') %> 4 | 5 |
            6 | 7 | <%- include('./components/sidebar') %> 8 | 9 |
            10 | 11 | <%- include('./components/topnav') %> 12 | 13 |
            14 |
            15 |

            Redeem Coupon

            16 |

            Redeem a coupon.

            17 | <% if (req.query.err) { %> 18 |
            19 | <% if (req.query.err == "MISSINGCOUPONCODE") { %> 20 | You have not provided a coupon code. 21 | <% } else if (req.query.err == "INVALIDCOUPONCODE") { %> 22 | Invalid coupon code. Was it claimed already? 23 | <% } else if (req.query.err == "SUCCESSCOUPONCODE") { %> 24 | Success! 25 | <% } else { %> 26 | Coupon failure. 27 | <% } %> 28 |
            29 | <% } %> 30 |
            31 |
            32 |
            33 |
            34 |
            35 | 36 | 37 |
            38 | 39 |
            40 |
            41 |
            42 |
            43 |
            44 |
            45 | 46 | <%- include('./components/footer') %> 47 |
            48 | 49 |
            50 | 51 |
            52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /themes/default/servers.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- include('./components/head') %> 4 | 5 | 6 | 7 | 8 |
            9 | 10 | <%- include('./components/sidebar') %> 11 | 12 |
            13 | 14 | <%- include('./components/topnav') %> 15 | 16 |
            17 |
            18 | 19 | <%- include('./components/alert') %> 20 |

            Your Servers

            21 |

            You can edit, delete, create & update servers here.

            22 | <% if (req.query.err) { %> 23 | <% if (req.query.err !== "none") { %> 24 |
            25 | <% if (req.query.err == "CREATEDSERVER") { %> 26 | Success! Your server has been created 27 | <% } %> 28 | <% if (req.query.err == "DELETEDSERVER") { %> 29 | Success! Your server has been deleted, feel free to create a new one now 30 | <% } %> 31 | <% if (req.query.err == "MODIFYSERVER") { %> 32 | Success! Your server resources have been changed 33 | <% } %> 34 |
            35 | <% } %> 36 | <% } %> 37 |
            38 | <% if (pterodactyl.relationships.servers.data.length == 0) { %> 39 | <% } else { %> 40 | <% for (let i = 0, len = pterodactyl.relationships.servers.data.length; i < len; i++) { %> 41 |
            42 |
            43 |
            44 |

            <%= pterodactyl.relationships.servers.data[i].attributes.name.length > 40 ? pterodactyl.relationships.servers.data[i].attributes.name.slice(0, 40) + "..." : pterodactyl.relationships.servers.data[i].attributes.name %>

            45 |
            Server <%= pterodactyl.relationships.servers.data[i].attributes.identifier %>

            46 |

              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 |
            50 | Delete Server 51 | Edit Resources 52 | <% if (settings.renewals.status) { %> 53 | Renew 54 | <% } %> 55 | 56 |
            57 |
            58 |
            59 | <% } %> 60 | <% } %> 61 |
            62 |
            63 |
            64 |



            65 | + 66 |





            67 |
            68 | 69 |
            70 |
            71 |
            72 |
            73 |
            74 | 75 | <%- include('./components/footer') %> 76 |
            77 | 78 |
            79 | 80 |
            81 | 82 | <%- include('./components/scripts') %> 83 | 84 | 85 | -------------------------------------------------------------------------------- /themes/default/settings.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%- include('./components/head') %> 4 | 5 |
            6 | 7 | <%- include('./components/sidebar') %> 8 | 9 | 10 |
            11 | 12 | <%- include('./components/topnav') %> 13 | 14 |
            15 |
            16 |

            Account Settings

            17 |

            View your login information & reset your password.

            18 | <% if (req.session.newaccount || req.session.password) { %> 19 |
            20 | 21 | <% if (req.session.newaccount) { %> 22 | A new account has been created for you on the Pterodactyl Panel.
            23 | <% } %> 24 | <% if (req.session.password) { %> 25 | The password was changed to <%= req.session.password %>, If you are unable to login, please ensure that the password is as displayed here. 26 | <% } else { %> 27 | Please check your email to set your password. 28 | <% } %> 29 |
            30 | <% } %> 31 |
            32 |
            33 |
            34 |
            35 |
            36 |
            37 | 38 | 39 |
            40 |
            41 | 42 | 43 |
            44 | Reset Account Password 45 | Refresh Account Data 46 |
            47 |
            48 |
            49 |
            50 |
            51 |
            52 | 61 | 62 | <%- include('./components/footer') %> 63 |
            64 | 65 |
            66 | 67 |
            68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | <%- include('./components/scripts') %> 76 | 77 | 78 | 79 | 80 | 81 | 93 | 94 | 95 | --------------------------------------------------------------------------------