';
358 | }else{
359 | var alert = '
';
360 | }
361 | $('.main td > p').each(function() {
362 | alert += '
'+$(this).text()+'
';
363 | });
364 | alert += '
';
365 | } else {
366 | var alert = "";
367 | }
368 |
369 | var email = $('.main label[for="email_address"]').text();
370 | var lbtn = $('td > [type="submit"]').val();
371 | var bbtn = $('[action="index.php"] > input[type="submit"]').val();
372 |
373 | var new_form = '\
374 |
\
375 |
'+title+'
\
376 | '+alert+'\
377 |
\
381 |
'+bbtn+'\
382 |
';
383 |
384 | }
385 | $('.main').empty().html(new_form);
386 | }
387 |
388 |
389 | $('.main').removeClass('col-md-10').addClass('col-md-12');
390 |
391 | $('nav.navbar').addClass('navbar-default');
392 | $('#navbar ul').addClass('nav').addClass('navbar-nav');
393 | $('#navbar [class*="selected"]').parent('li').addClass('active');
394 |
395 | $('.navigation').removeClass('col-md-2').addClass('col-md-12').css('padding-right','15px')
396 | $('.collapse').css('padding','0px 5px');
397 | $('.menu').css('margin-bottom','0px');
398 | $('body > .container-fluid > .row:first-of-type').remove();
399 |
400 | }
401 | });
402 |
403 | $(window).load(function(){
404 | $("body > .container-fluid").fadeIn(50);
405 |
406 | $(':file').on('fileselect', function(event, numFiles, label) {
407 | var input = $(this).parents('.input-group').find(':text'),
408 | log = numFiles > 1 ? numFiles + ' files selected' : label;
409 | if(input.length){
410 | input.val(log);
411 | }else{
412 | if(log) alert(log);
413 | }
414 | });
415 |
416 | /*
417 | $('input[src$="remove.gif"]').each(function(){
418 | var NewButton = $("
");
419 | $.each(this.attributes, function(i, attrib){
420 | // Change Type to Submit Mod
421 | if(attrib.name=='type'){
422 | attrval = 'submit';
423 | }else{
424 | attrval = attrib.value;
425 | }
426 | // Skip src Attribute
427 | if(attrib.name=='src'){
428 | return false;
429 | }
430 | // Change Stop Update Value for "Cancel Update" Fix
431 | if(attrib.value=='stop_update'){
432 | attrval = 'stop_update_x';
433 | }
434 | $(NewButton).attr(attrib.name, attrval);
435 | });
436 | $(NewButton).attr('class', 'btn btn-xs btn-danger btn-sm btn-primary');
437 | $(this).replaceWith(function () {
438 | return $(NewButton).append($(this).contents()).prepend('
');
439 | });
440 | });
441 | */
442 |
443 | });
444 |
445 |
446 | $(document).on('change', ':file', function() {
447 | var input = $(this),
448 | numFiles = input.get(0).files ? input.get(0).files.length : 1,
449 | label = input.val().replace(/\\/g, '/').replace(/.*\//, '');
450 | input.trigger('fileselect', [numFiles, label]);
451 | });
452 |
453 |
--------------------------------------------------------------------------------
/themes/SimpleBootstrap/js/pace.min.js:
--------------------------------------------------------------------------------
1 | /*! pace 1.0.0 */
2 | (function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X=[].slice,Y={}.hasOwnProperty,Z=function(a,b){function c(){this.constructor=a}for(var d in b)Y.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},$=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};for(u={catchupTime:100,initialRate:.03,minTime:250,ghostTime:100,maxProgressPerFrame:20,easeFactor:1.25,startOnPageLoad:!0,restartOnPushState:!0,restartOnRequestAfter:500,target:"body",elements:{checkInterval:100,selectors:["body"]},eventLag:{minSamples:10,sampleCount:3,lagThreshold:3},ajax:{trackMethods:["GET"],trackWebSockets:!0,ignoreURLs:[]}},C=function(){var a;return null!=(a="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance.now():void 0)?a:+new Date},E=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,t=window.cancelAnimationFrame||window.mozCancelAnimationFrame,null==E&&(E=function(a){return setTimeout(a,50)},t=function(a){return clearTimeout(a)}),G=function(a){var b,c;return b=C(),(c=function(){var d;return d=C()-b,d>=33?(b=C(),a(d,function(){return E(c)})):setTimeout(c,33-d)})()},F=function(){var a,b,c;return c=arguments[0],b=arguments[1],a=3<=arguments.length?X.call(arguments,2):[],"function"==typeof c[b]?c[b].apply(c,a):c[b]},v=function(){var a,b,c,d,e,f,g;for(b=arguments[0],d=2<=arguments.length?X.call(arguments,1):[],f=0,g=d.length;g>f;f++)if(c=d[f])for(a in c)Y.call(c,a)&&(e=c[a],null!=b[a]&&"object"==typeof b[a]&&null!=e&&"object"==typeof e?v(b[a],e):b[a]=e);return b},q=function(a){var b,c,d,e,f;for(c=b=0,e=0,f=a.length;f>e;e++)d=a[e],c+=Math.abs(d),b++;return c/b},x=function(a,b){var c,d,e;if(null==a&&(a="options"),null==b&&(b=!0),e=document.querySelector("[data-pace-"+a+"]")){if(c=e.getAttribute("data-pace-"+a),!b)return c;try{return JSON.parse(c)}catch(f){return d=f,"undefined"!=typeof console&&null!==console?console.error("Error parsing inline pace options",d):void 0}}},g=function(){function a(){}return a.prototype.on=function(a,b,c,d){var e;return null==d&&(d=!1),null==this.bindings&&(this.bindings={}),null==(e=this.bindings)[a]&&(e[a]=[]),this.bindings[a].push({handler:b,ctx:c,once:d})},a.prototype.once=function(a,b,c){return this.on(a,b,c,!0)},a.prototype.off=function(a,b){var c,d,e;if(null!=(null!=(d=this.bindings)?d[a]:void 0)){if(null==b)return delete this.bindings[a];for(c=0,e=[];c
Q;Q++)K=U[Q],D[K]===!0&&(D[K]=u[K]);i=function(a){function b(){return V=b.__super__.constructor.apply(this,arguments)}return Z(b,a),b}(Error),b=function(){function a(){this.progress=0}return a.prototype.getElement=function(){var a;if(null==this.el){if(a=document.querySelector(D.target),!a)throw new i;this.el=document.createElement("div"),this.el.className="pace pace-active",document.body.className=document.body.className.replace(/pace-done/g,""),document.body.className+=" pace-running",this.el.innerHTML='\n',null!=a.firstChild?a.insertBefore(this.el,a.firstChild):a.appendChild(this.el)}return this.el},a.prototype.finish=function(){var a;return a=this.getElement(),a.className=a.className.replace("pace-active",""),a.className+=" pace-inactive",document.body.className=document.body.className.replace("pace-running",""),document.body.className+=" pace-done"},a.prototype.update=function(a){return this.progress=a,this.render()},a.prototype.destroy=function(){try{this.getElement().parentNode.removeChild(this.getElement())}catch(a){i=a}return this.el=void 0},a.prototype.render=function(){var a,b,c,d,e,f,g;if(null==document.querySelector(D.target))return!1;for(a=this.getElement(),d="translate3d("+this.progress+"%, 0, 0)",g=["webkitTransform","msTransform","transform"],e=0,f=g.length;f>e;e++)b=g[e],a.children[0].style[b]=d;return(!this.lastRenderedProgress||this.lastRenderedProgress|0!==this.progress|0)&&(a.children[0].setAttribute("data-progress-text",""+(0|this.progress)+"%"),this.progress>=100?c="99":(c=this.progress<10?"0":"",c+=0|this.progress),a.children[0].setAttribute("data-progress",""+c)),this.lastRenderedProgress=this.progress},a.prototype.done=function(){return this.progress>=100},a}(),h=function(){function a(){this.bindings={}}return a.prototype.trigger=function(a,b){var c,d,e,f,g;if(null!=this.bindings[a]){for(f=this.bindings[a],g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.call(this,b));return g}},a.prototype.on=function(a,b){var c;return null==(c=this.bindings)[a]&&(c[a]=[]),this.bindings[a].push(b)},a}(),P=window.XMLHttpRequest,O=window.XDomainRequest,N=window.WebSocket,w=function(a,b){var c,d,e,f;f=[];for(d in b.prototype)try{e=b.prototype[d],f.push(null==a[d]&&"function"!=typeof e?a[d]=e:void 0)}catch(g){c=g}return f},A=[],j.ignore=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],A.unshift("ignore"),c=b.apply(null,a),A.shift(),c},j.track=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?X.call(arguments,1):[],A.unshift("track"),c=b.apply(null,a),A.shift(),c},J=function(a){var b;if(null==a&&(a="GET"),"track"===A[0])return"force";if(!A.length&&D.ajax){if("socket"===a&&D.ajax.trackWebSockets)return!0;if(b=a.toUpperCase(),$.call(D.ajax.trackMethods,b)>=0)return!0}return!1},k=function(a){function b(){var a,c=this;b.__super__.constructor.apply(this,arguments),a=function(a){var b;return b=a.open,a.open=function(d,e){return J(d)&&c.trigger("request",{type:d,url:e,request:a}),b.apply(a,arguments)}},window.XMLHttpRequest=function(b){var c;return c=new P(b),a(c),c};try{w(window.XMLHttpRequest,P)}catch(d){}if(null!=O){window.XDomainRequest=function(){var b;return b=new O,a(b),b};try{w(window.XDomainRequest,O)}catch(d){}}if(null!=N&&D.ajax.trackWebSockets){window.WebSocket=function(a,b){var d;return d=null!=b?new N(a,b):new N(a),J("socket")&&c.trigger("request",{type:"socket",url:a,protocols:b,request:d}),d};try{w(window.WebSocket,N)}catch(d){}}}return Z(b,a),b}(h),R=null,y=function(){return null==R&&(R=new k),R},I=function(a){var b,c,d,e;for(e=D.ajax.ignoreURLs,c=0,d=e.length;d>c;c++)if(b=e[c],"string"==typeof b){if(-1!==a.indexOf(b))return!0}else if(b.test(a))return!0;return!1},y().on("request",function(b){var c,d,e,f,g;return f=b.type,e=b.request,g=b.url,I(g)?void 0:j.running||D.restartOnRequestAfter===!1&&"force"!==J(f)?void 0:(d=arguments,c=D.restartOnRequestAfter||0,"boolean"==typeof c&&(c=0),setTimeout(function(){var b,c,g,h,i,k;if(b="socket"===f?e.readyState<2:0<(h=e.readyState)&&4>h){for(j.restart(),i=j.sources,k=[],c=0,g=i.length;g>c;c++){if(K=i[c],K instanceof a){K.watch.apply(K,d);break}k.push(void 0)}return k}},c))}),a=function(){function a(){var a=this;this.elements=[],y().on("request",function(){return a.watch.apply(a,arguments)})}return a.prototype.watch=function(a){var b,c,d,e;return d=a.type,b=a.request,e=a.url,I(e)?void 0:(c="socket"===d?new n(b):new o(b),this.elements.push(c))},a}(),o=function(){function a(a){var b,c,d,e,f,g,h=this;if(this.progress=0,null!=window.ProgressEvent)for(c=null,a.addEventListener("progress",function(a){return h.progress=a.lengthComputable?100*a.loaded/a.total:h.progress+(100-h.progress)/2},!1),g=["load","abort","timeout","error"],d=0,e=g.length;e>d;d++)b=g[d],a.addEventListener(b,function(){return h.progress=100},!1);else f=a.onreadystatechange,a.onreadystatechange=function(){var b;return 0===(b=a.readyState)||4===b?h.progress=100:3===a.readyState&&(h.progress=50),"function"==typeof f?f.apply(null,arguments):void 0}}return a}(),n=function(){function a(a){var b,c,d,e,f=this;for(this.progress=0,e=["error","open"],c=0,d=e.length;d>c;c++)b=e[c],a.addEventListener(b,function(){return f.progress=100},!1)}return a}(),d=function(){function a(a){var b,c,d,f;for(null==a&&(a={}),this.elements=[],null==a.selectors&&(a.selectors=[]),f=a.selectors,c=0,d=f.length;d>c;c++)b=f[c],this.elements.push(new e(b))}return a}(),e=function(){function a(a){this.selector=a,this.progress=0,this.check()}return a.prototype.check=function(){var a=this;return document.querySelector(this.selector)?this.done():setTimeout(function(){return a.check()},D.elements.checkInterval)},a.prototype.done=function(){return this.progress=100},a}(),c=function(){function a(){var a,b,c=this;this.progress=null!=(b=this.states[document.readyState])?b:100,a=document.onreadystatechange,document.onreadystatechange=function(){return null!=c.states[document.readyState]&&(c.progress=c.states[document.readyState]),"function"==typeof a?a.apply(null,arguments):void 0}}return a.prototype.states={loading:0,interactive:50,complete:100},a}(),f=function(){function a(){var a,b,c,d,e,f=this;this.progress=0,a=0,e=[],d=0,c=C(),b=setInterval(function(){var g;return g=C()-c-50,c=C(),e.push(g),e.length>D.eventLag.sampleCount&&e.shift(),a=q(e),++d>=D.eventLag.minSamples&&a=100&&(this.done=!0),b===this.last?this.sinceLastUpdate+=a:(this.sinceLastUpdate&&(this.rate=(b-this.last)/this.sinceLastUpdate),this.catchup=(b-this.progress)/D.catchupTime,this.sinceLastUpdate=0,this.last=b),b>this.progress&&(this.progress+=this.catchup*a),c=1-Math.pow(this.progress/100,D.easeFactor),this.progress+=c*this.rate*a,this.progress=Math.min(this.lastProgress+D.maxProgressPerFrame,this.progress),this.progress=Math.max(0,this.progress),this.progress=Math.min(100,this.progress),this.lastProgress=this.progress,this.progress},a}(),L=null,H=null,r=null,M=null,p=null,s=null,j.running=!1,z=function(){return D.restartOnPushState?j.restart():void 0},null!=window.history.pushState&&(T=window.history.pushState,window.history.pushState=function(){return z(),T.apply(window.history,arguments)}),null!=window.history.replaceState&&(W=window.history.replaceState,window.history.replaceState=function(){return z(),W.apply(window.history,arguments)}),l={ajax:a,elements:d,document:c,eventLag:f},(B=function(){var a,c,d,e,f,g,h,i;for(j.sources=L=[],g=["ajax","elements","document","eventLag"],c=0,e=g.length;e>c;c++)a=g[c],D[a]!==!1&&L.push(new l[a](D[a]));for(i=null!=(h=D.extraSources)?h:[],d=0,f=i.length;f>d;d++)K=i[d],L.push(new K(D));return j.bar=r=new b,H=[],M=new m})(),j.stop=function(){return j.trigger("stop"),j.running=!1,r.destroy(),s=!0,null!=p&&("function"==typeof t&&t(p),p=null),B()},j.restart=function(){return j.trigger("restart"),j.stop(),j.start()},j.go=function(){var a;return j.running=!0,r.render(),a=C(),s=!1,p=G(function(b,c){var d,e,f,g,h,i,k,l,n,o,p,q,t,u,v,w;for(l=100-r.progress,e=p=0,f=!0,i=q=0,u=L.length;u>q;i=++q)for(K=L[i],o=null!=H[i]?H[i]:H[i]=[],h=null!=(w=K.elements)?w:[K],k=t=0,v=h.length;v>t;k=++t)g=h[k],n=null!=o[k]?o[k]:o[k]=new m(g),f&=n.done,n.done||(e++,p+=n.tick(b));return d=p/e,r.update(M.tick(b,d)),r.done()||f||s?(r.update(100),j.trigger("done"),setTimeout(function(){return r.finish(),j.running=!1,j.trigger("hide")},Math.max(D.ghostTime,Math.max(D.minTime-(C()-a),0)))):c()})},j.start=function(a){v(D,a),j.running=!0;try{r.render()}catch(b){i=b}return document.querySelector(".pace")?(j.trigger("start"),j.go()):setTimeout(j.start,50)},"function"==typeof define&&define.amd?define(function(){return j}):"object"==typeof exports?module.exports=j:D.startOnPageLoad&&j.start()}).call(this);
--------------------------------------------------------------------------------
/themes/SimpleBootstrap/js/radialIndicator.js:
--------------------------------------------------------------------------------
1 | /*
2 | radialIndicator.js v 1.3.1
3 | Author: Sudhanshu Yadav
4 | Copyright (c) 2015,2016 Sudhanshu Yadav - ignitersworld.com , released under the MIT license.
5 | Demo on: ignitersworld.com/lab/radialIndicator.html
6 | */
7 | ;(function (factory) {
8 | /** support UMD ***/
9 | var global = Function('return this')() || (42, eval)('this');
10 | if (typeof define === "function" && define.amd) {
11 | define(["jquery"], function ($) {
12 | return (global.radialIndicator = factory($, global));
13 | });
14 | } else if (typeof module === "object" && module.exports) {
15 | module.exports = global.document ?
16 | factory(require("jquery"), global) :
17 | function (w) {
18 | if (!w.document) {
19 | throw new Error("radialIndiactor requires a window with a document");
20 | }
21 | return factory(require("jquery")(w), w);
22 | };
23 | } else {
24 | global.radialIndicator = factory(global.jQuery, global);
25 | }
26 | }(function ($, window, undefined) {
27 |
28 | var document = window.document;
29 |
30 | "use strict";
31 | //circumfence and quart value to start bar from top
32 | var circ = Math.PI * 2,
33 | quart = Math.PI / 2;
34 |
35 |
36 | //function to smooth canvas drawing for ratina devices
37 |
38 | //method to manage device pixel ratio in ratina devices
39 | var smoothCanvas = (function() {
40 | var ctx = document.createElement("canvas").getContext("2d"),
41 | dpr = window.devicePixelRatio || 1,
42 | bsr = ctx.webkitBackingStorePixelRatio ||
43 | ctx.mozBackingStorePixelRatio ||
44 | ctx.msBackingStorePixelRatio ||
45 | ctx.oBackingStorePixelRatio ||
46 | ctx.backingStorePixelRatio || 1,
47 |
48 | ratio = dpr / bsr; //PIXEL RATIO
49 |
50 | return function(w, h, canvasElm) {
51 | var can = canvasElm || document.createElement("canvas");
52 | can.width = w * ratio;
53 | can.height = h * ratio;
54 | can.style.width = w + "px";
55 | can.style.height = h + "px";
56 | can.getContext("2d").setTransform(ratio, 0, 0, ratio, 0, 0);
57 | return can;
58 | }
59 | }());
60 |
61 | //function to convert hex to rgb
62 | function hexToRgb(hex) {
63 | // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
64 | var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
65 | hex = hex.replace(shorthandRegex, function(m, r, g, b) {
66 | return r + r + g + g + b + b;
67 | });
68 |
69 | var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
70 | return result ? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)] : null;
71 | }
72 |
73 | function getPropVal(curShift, perShift, bottomRange, topRange) {
74 | return Math.round(bottomRange + ((topRange - bottomRange) * curShift / perShift));
75 | }
76 |
77 |
78 | //function to get current color in case of
79 | function getCurrentColor(curPer, bottomVal, topVal, bottomColor, topColor) {
80 | var rgbAryTop = topColor.indexOf('#') != -1 ? hexToRgb(topColor) : topColor.match(/\d+/g),
81 | rgbAryBottom = bottomColor.indexOf('#') != -1 ? hexToRgb(bottomColor) : bottomColor.match(/\d+/g),
82 | perShift = topVal - bottomVal,
83 | curShift = curPer - bottomVal;
84 |
85 | if (!rgbAryTop || !rgbAryBottom) return null;
86 |
87 | return 'rgb(' + getPropVal(curShift, perShift, rgbAryBottom[0], rgbAryTop[0]) + ',' + getPropVal(curShift, perShift, rgbAryBottom[1], rgbAryTop[1]) + ',' + getPropVal(curShift, perShift, rgbAryBottom[2], rgbAryTop[2]) + ')';
88 | }
89 |
90 | //to merge object
91 | function merge() {
92 | var arg = arguments,
93 | target = arg[0];
94 | for (var i = 1, ln = arg.length; i < ln; i++) {
95 | var obj = arg[i];
96 | for (var k in obj) {
97 | if (obj.hasOwnProperty(k)) {
98 | target[k] = obj[k];
99 | }
100 | }
101 | }
102 | return target;
103 | }
104 |
105 | //function to apply formatting on number depending on parameter
106 | function formatter(pattern) {
107 | return function(num) {
108 | if (!pattern) return num.toString();
109 | num = num || 0
110 | var numRev = num.toString().split('').reverse(),
111 | output = pattern.split("").reverse(),
112 | i = 0,
113 | lastHashReplaced = 0;
114 |
115 | //changes hash with numbers
116 | for (var ln = output.length; i < ln; i++) {
117 | if (!numRev.length) break;
118 | if (output[i] == "#") {
119 | lastHashReplaced = i;
120 | output[i] = numRev.shift();
121 | }
122 | }
123 |
124 | //add overflowing numbers before prefix
125 | output.splice(lastHashReplaced + 1, output.lastIndexOf('#') - lastHashReplaced, numRev.reverse().join(""));
126 |
127 | return output.reverse().join('');
128 | }
129 | }
130 |
131 |
132 | //circle bar class
133 | function Indicator(container, indOption) {
134 | var self = this;
135 |
136 | indOption = indOption || {};
137 | indOption = merge({}, radialIndicator.defaults, indOption);
138 |
139 | this.indOption = indOption;
140 |
141 | //create a queryselector if a selector string is passed in container
142 | if (typeof container == "string")
143 | container = document.querySelector(container);
144 |
145 | //get the first element if container is a node list
146 | if (container.length)
147 | container = container[0];
148 |
149 | this.container = container;
150 |
151 | //create a canvas element
152 | var canElm = document.createElement("canvas");
153 | container.appendChild(canElm);
154 |
155 | this.canElm = canElm; // dom object where drawing will happen
156 |
157 | this.ctx = canElm.getContext('2d'); //get 2d canvas context
158 |
159 | //add intial value
160 | this.current_value = indOption.initValue || indOption.minValue || 0;
161 |
162 |
163 | //handeling user interaction
164 | var startListener = function(e) {
165 | if (!indOption.interaction) return;
166 |
167 | var touchMove = e.type == "touchstart" ? "touchmove" : "mousemove",
168 | touchEnd = e.type == "touchstart" ? "touchend" : "mouseup",
169 | position = canElm.getBoundingClientRect(),
170 | cy = position.top + canElm.offsetHeight / 2,
171 | cx = position.left + canElm.offsetWidth / 2;
172 |
173 | var moveListener = function(e) {
174 | e.preventDefault();
175 |
176 | //get the cordinates
177 | var mx = e.clientX || e.touches[0].clientX,
178 | my = e.clientY || e.touches[0].clientY,
179 | radian = (circ + quart + Math.atan2((my - cy), (mx - cx))) % (circ + 0.0175),
180 | radius = (indOption.radius - 1 + indOption.barWidth / 2),
181 | circum = circ * radius,
182 | precision = indOption.precision != null ? indOption.precision : 0,
183 | precisionNo = Math.pow(10, precision),
184 | val = Math.round(precisionNo * radian * radius * (indOption.maxValue - indOption.minValue) / circum) / precisionNo;
185 |
186 | self.value(val);
187 | };
188 |
189 | var endListener = function() {
190 | document.removeEventListener(touchMove, moveListener, false);
191 | document.removeEventListener(touchEnd, endListener, false);
192 | };
193 |
194 | document.addEventListener(touchMove, moveListener, false);
195 | document.addEventListener(touchEnd, endListener, false);
196 | };
197 |
198 | canElm.addEventListener('touchstart', startListener, false);
199 | canElm.addEventListener('mousedown', startListener, false);
200 |
201 |
202 | canElm.addEventListener("mousewheel", MouseWheelHandler, false);
203 | canElm.addEventListener("DOMMouseScroll", MouseWheelHandler, false);
204 |
205 | function MouseWheelHandler(e) {
206 | if (!indOption.interaction) return;
207 | e.preventDefault();
208 |
209 | // cross-browser wheel delta
210 | var delta = -(Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)))),
211 | precision = indOption.precision != null ? indOption.precision : 0,
212 | precisionNo = Math.pow(10, precision),
213 | diff = indOption.maxValue - indOption.minValue,
214 | val = self.current_value + Math.round(precisionNo * delta * diff / Math.min(diff, 100)) / precisionNo;
215 |
216 | self.value(val);
217 |
218 | return false;
219 | }
220 | }
221 |
222 |
223 | Indicator.prototype = {
224 | constructor: radialIndicator,
225 | _init: function() {
226 | var indOption = this.indOption,
227 | canElm = this.canElm,
228 | ctx = this.ctx,
229 | dim = (indOption.radius + indOption.barWidth) * 2; //elm width and height
230 |
231 | //create a formatter function
232 | this.formatter = typeof indOption.format == "function" ? indOption.format : formatter(indOption.format);
233 |
234 | //maximum text length;
235 | this.maxLength = indOption.percentage ? 4 : this.formatter(indOption.maxValue).length;
236 |
237 | //smooth the canvas elm for ratina display
238 | smoothCanvas(dim, dim, canElm);
239 |
240 | //draw background bar
241 | this._drawBarBg();
242 |
243 | //put the initial value if defined
244 | this.value(this.current_value);
245 |
246 | return this;
247 | },
248 | //draw background bar
249 | _drawBarBg: function() {
250 | var indOption = this.indOption,
251 | ctx = this.ctx,
252 | dim = (indOption.radius + indOption.barWidth) * 2, //elm width and height
253 | center = dim / 2; //center point in both x and y axis
254 |
255 | //draw nackground circle
256 | ctx.strokeStyle = indOption.barBgColor; //background circle color
257 | ctx.lineWidth = indOption.barWidth;
258 | if (indOption.barBgColor != "transparent") {
259 | ctx.beginPath();
260 | ctx.arc(center, center, indOption.radius - 1 + indOption.barWidth / 2, 0, 2 * Math.PI);
261 | ctx.stroke();
262 | }
263 | },
264 | //update the value of indicator without animation
265 | value: function(val) {
266 | //return the val if val is not provided
267 | if (val === undefined || isNaN(val)) {
268 | return this.current_value;
269 | }
270 |
271 | val = parseFloat(val);
272 |
273 | var ctx = this.ctx,
274 | indOption = this.indOption,
275 | curColor = indOption.barColor,
276 | dim = (indOption.radius + indOption.barWidth) * 2,
277 | minVal = indOption.minValue,
278 | maxVal = indOption.maxValue,
279 | center = dim / 2;
280 |
281 | //limit the val in range of minumum and maximum value
282 | val = val < minVal ? minVal : val > maxVal ? maxVal : val;
283 |
284 | var precision = indOption.precision != null ? indOption.precision : 0,
285 | precisionNo = Math.pow(10, precision),
286 | perVal = Math.round(((val - minVal) * precisionNo / (maxVal - minVal)) * 100) / precisionNo, //percentage value tp two decimal precision
287 | dispVal = indOption.percentage ? perVal + '%' : this.formatter(val); //formatted value
288 |
289 | //save val on object
290 | this.current_value = val;
291 |
292 |
293 | //draw the bg circle
294 | ctx.clearRect(0, 0, dim, dim);
295 | this._drawBarBg();
296 |
297 | //get current color if color range is set
298 | if (typeof curColor == "object") {
299 | var range = Object.keys(curColor);
300 |
301 | for (var i = 1, ln = range.length; i < ln; i++) {
302 | var bottomVal = range[i - 1],
303 | topVal = range[i],
304 | bottomColor = curColor[bottomVal],
305 | topColor = curColor[topVal],
306 | newColor = val == bottomVal ? bottomColor : val == topVal ? topColor : val > bottomVal && val < topVal ? indOption.interpolate ? getCurrentColor(val, bottomVal, topVal, bottomColor, topColor) : topColor : false;
307 |
308 | if (newColor != false) {
309 | curColor = newColor;
310 | break;
311 | }
312 | }
313 | }
314 |
315 | //draw th circle value
316 | ctx.strokeStyle = curColor;
317 |
318 | //add linecap if value setted on options
319 | if (indOption.roundCorner) ctx.lineCap = "round";
320 |
321 | ctx.beginPath();
322 | ctx.arc(center, center, indOption.radius - 1 + indOption.barWidth / 2, -(quart), ((circ) * perVal / 100) - quart, false);
323 | ctx.stroke();
324 |
325 | //add percentage text
326 | if (indOption.displayNumber) {
327 | var cFont = ctx.font.split(' '),
328 | weight = indOption.fontWeight,
329 | fontSize = indOption.fontSize || (dim / (this.maxLength - (Math.floor(this.maxLength * 1.4 / 4) - 1)));
330 |
331 | cFont = indOption.fontFamily || cFont[cFont.length - 1];
332 |
333 | ctx.shadowColor = "rgba(0,0,0,.5)";
334 | ctx.shadowOffsetX = 0;
335 | ctx.shadowOffsetY = 1;
336 | ctx.shadowBlur = 3;
337 | ctx.fillStyle = indOption.fontColor || curColor;
338 | ctx.font = weight + " " + fontSize + "px " + cFont;
339 | ctx.textAlign = "center";
340 | ctx.textBaseline = indOption.textBaseline;
341 | ctx.fillText(dispVal, center, center);
342 | }
343 |
344 | //call onChange callback
345 | indOption.onChange.call(this.container,val);
346 |
347 | return this;
348 | },
349 | //animate progressbar to the value
350 | animate: function(val) {
351 | var indOption = this.indOption,
352 | counter = this.current_value || indOption.minValue,
353 | self = this,
354 | minVal = indOption.minValue,
355 | maxVal = indOption.maxValue,
356 | frameNum = indOption.frameNum || (indOption.percentage ? 100 : 500),
357 | precision = indOption.precision != null ? indOption.precision : Math.ceil(Math.log(maxVal - minVal / frameNum)),
358 | precisionNo = Math.pow(10, precision),
359 | incBy = (maxVal - minVal) / frameNum ; //increment by .2% on every tick and 1% if showing as percentage
360 |
361 | //limit the val in range of minumum and maximum value
362 | val = val < minVal ? minVal : val > maxVal ? maxVal : val;
363 |
364 | var back = val < counter;
365 |
366 | //clear interval function if already started
367 | if (this.intvFunc) clearInterval(this.intvFunc);
368 |
369 | this.intvFunc = setInterval(function() {
370 |
371 | if ((!back && counter >= val) || (back && counter <= val)) {
372 | if (self.current_value == counter) {
373 | clearInterval(self.intvFunc);
374 | if (indOption.onAnimationComplete) indOption.onAnimationComplete(self.current_value);
375 | return;
376 | } else {
377 | counter = val;
378 | }
379 | }
380 |
381 | self.value(counter); //dispaly the value
382 |
383 | if (counter != val) {
384 | counter = Math.round((counter + (back ? -incBy : incBy)) * precisionNo) / precisionNo;
385 | } //increment or decrement till counter does not reach to value
386 | }, indOption.frameTime);
387 |
388 | return this;
389 | },
390 | //method to update options
391 | option: function(key, val) {
392 | if (val === undefined) return this.option[key];
393 |
394 | if (['radius', 'barWidth', 'barBgColor', 'format', 'maxValue', 'percentage'].indexOf(key) != -1) {
395 | this.indOption[key] = val;
396 | this._init().value(this.current_value);
397 | }
398 | this.indOption[key] = val;
399 | }
400 |
401 | };
402 |
403 | /** Initializer function **/
404 | function radialIndicator(container, options) {
405 | var progObj = new Indicator(container, options);
406 | progObj._init();
407 | return progObj;
408 | }
409 |
410 | //radial indicator defaults
411 | radialIndicator.defaults = {
412 | radius: 50, //inner radius of indicator
413 | barWidth: 5, //bar width
414 | barBgColor: '#eeeeee', //unfilled bar color
415 | barColor: '#99CC33', //filled bar color , can be a range also having different colors on different value like {0 : "#ccc", 50 : '#333', 100: '#000'}
416 | format: null, //format indicator numbers, can be a # formator ex (##,###.##) or a function
417 | frameTime: 10, //miliseconds to move from one frame to another
418 | frameNum: null, //Defines numbers of frame in indicator, defaults to 100 when showing percentage and 500 for other values
419 | fontColor: null, //font color
420 | fontFamily: null, //defines font family
421 | fontWeight: 'bold', //defines font weight
422 | fontSize: null, //define the font size of indicator number
423 | textBaseline: 'middle', //define the text base line of indicator number
424 | interpolate: true, //interpolate color between ranges
425 | percentage: false, //show percentage of value
426 | precision: null, //default value for precision depend on difference between min and max divided by number of frames
427 | displayNumber: true, //display indicator number
428 | roundCorner: false, //have round corner in filled bar
429 | minValue: 0, //minimum value
430 | maxValue: 100, //maximum value
431 | initValue: 0, //define initial value of indicator,
432 | interaction: false, //if true it allows to change radial indicator value using mouse or touch interaction
433 | onChange: function() {}
434 | };
435 |
436 | window.radialIndicator = radialIndicator;
437 |
438 | //add as a jquery plugin
439 | if ($) {
440 | $.fn.radialIndicator = function(options) {
441 | return this.each(function() {
442 | var newPCObj = radialIndicator(this, options);
443 | $.data(this, 'radialIndicator', newPCObj);
444 | });
445 | };
446 | }
447 |
448 | return radialIndicator;
449 |
450 | }));
451 |
--------------------------------------------------------------------------------
/themes/SimpleBootstrap/layout.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | %title%
10 |
11 | %header_code%
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | %meta%
29 |
30 |
31 |
32 |
%title%
33 |
34 |
35 |
36 |
37 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/themes/SimpleBootstrap/modules/TS3Admin/TS3Admin.css:
--------------------------------------------------------------------------------
1 | td > a {
2 | float: right;
3 | }
4 |
--------------------------------------------------------------------------------
/themes/SimpleBootstrap/modules/TS3Admin/TS3Admin.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 | $('img[src$="edit.png"]').replaceWith('
');
3 | $('img[src$="refresh.png"]').replaceWith('
');
4 |
5 | $('[name="stopvServer"]').removeClass('btn-primary').addClass('btn-danger');
6 |
7 | $('.edit, .main [href^="home.php?m=TS3Admin"], .main [href*="home.php?m=TS3Admin&token"], .main [href="home.php?m=TS3Admin&liveview"]').addClass('btn').addClass('btn-xs').addClass('btn-primary');
8 |
9 | $('.propHeadline').parent('td').each(function(){
10 | $(this).replaceWith('
'+$(this).html()+' | ');
11 | });
12 | $('.table .table0').each(function(){
13 | $(this).replaceWith('
'+$(this).html()+' | ');
14 | });
15 |
16 | $('#serverview').css('padding','5px').wrap('
');
17 | $('#serverstatus').parent('td').children('a').addClass('label').addClass('label-primary').addClass('label-size');
18 |
19 | $('#clearLink').parent('div').each(function(){
20 | $(this).find('img').remove();
21 | $(this).html($(this).html().replace('|',''));
22 | });
23 |
24 | });
25 |
26 |
--------------------------------------------------------------------------------
/themes/SimpleBootstrap/modules/addonsmanager/addons.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function(){
2 | $('.main').addClass('main-content').parent().attr('id', 'content');
3 | });
4 |
--------------------------------------------------------------------------------
/themes/SimpleBootstrap/modules/addonsmanager/user_addons.css:
--------------------------------------------------------------------------------
1 | .main [href*="&addon_type="]
2 | {
3 | width: 150px;
4 | height: 90px;
5 | border-radius: 4px;
6 | margin: 2px;
7 | font-size: 12px;
8 | float: left;
9 | text-align: center;
10 | vertical-align: middle;
11 | }
12 | .main [href*="&addon_type="] span {
13 | line-height: 14px;
14 | max-height: 28px;
15 | }
16 | .main [href*="&addon_type="]:hover
17 | {
18 | cursor: pointer !important;
19 | background-position: 0 -90px !important;
20 | }
21 | .main [href*="&addon_type="]:before
22 | {
23 | display: block;
24 | font-size: 40px;
25 | content: "\f192";
26 | }
27 | .main div.addons {
28 | padding: 8px;
29 | border: 1px solid #22252f;
30 | background-color: rgba(26, 28, 34, 0.2);
31 | display: inline-block;
32 | width: 100%;
33 | }
34 |
35 | .main [href*="&addon_type=plugin"]:before {
36 | content: "\f12e";
37 | }
38 | .main [href*="&addon_type=config"]:before {
39 | content: "\f121";
40 | }
41 | .main [href*="&addon_type=mappack"]:before {
42 | content: "\f278";
43 | }
44 |
--------------------------------------------------------------------------------
/themes/SimpleBootstrap/modules/addonsmanager/user_addons.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function(){
2 | $('.main > table').before('');
3 | $('.main td').contents().appendTo('.addons');
4 | $('.main > table').remove();
5 | $('.main [href*="&addon_type="]').addClass('btn-primary').wrapInner('');
6 | });
7 |
--------------------------------------------------------------------------------
/themes/SimpleBootstrap/modules/administration/main.css:
--------------------------------------------------------------------------------
1 | .admin-buttons {
2 | display: inline-block;
3 | width: 160px;
4 | height: 110px;
5 | text-align: center;
6 | border-radius: 4px;
7 | padding: 5px;
8 | margin: 0px 5px 5px 0px;
9 | vertical-align: middle;
10 | }
11 | .admin-buttons div {
12 | line-height: 16px;
13 | max-height: 32px;
14 | overflow: hidden;
15 | }
16 | .admin-buttons:before {
17 | font-size: 48px;
18 | }
19 | .admin-buttons img,
20 | .admin-buttons br
21 | {
22 | display: none;
23 | }
24 | .admin-buttons:hover {
25 | background-position: 0 -90px !important;
26 | }
27 |
--------------------------------------------------------------------------------
/themes/SimpleBootstrap/modules/administration/main.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function(){
2 | /* *** Administration Button - Removing all TD/TR *** */
3 | $('.row > .main').prepend('');
4 | $('.row > .main').prepend(''+$('.main h2:nth-of-type(1)').html()+'
');
5 | $('.row > .main .administration-table:nth-of-type(2) td:not(.administration-buttons-hmargin)').each(function() {
6 | $('.flex-container').append($(this).html());
7 | });
8 | $('.row > .main h2:nth-of-type(2)').remove();
9 | $('.row > .main .administration-table:nth-of-type(2)').remove();
10 |
11 | $('.row > .main .administration-table [href^="?m=administration&p=iframe&external_link="]').addClass('btn-primary').addClass('admin-buttons');
12 | $('.row > .main .administration-table [href^="?m=administration&p=iframe&external_link="]').wrapInner('');
13 |
14 | $('.row > .main button[name="restore"]').removeClass('btn-primary').addClass('btn-danger');
15 |
16 | /* *** Buttons Order adding TR's *** */
17 | var td = $('.row > .main > table:last-of-type td');
18 | var width = $(window).width();
19 |
20 | if(width >= 1025){
21 | var cutter = 5;
22 | }else if(width <= 1024 && width >= 769){
23 | var cutter = 4;
24 | }else if(width <= 768 && width >= 481){
25 | var cutter = 3;
26 | }else if(width <= 480 && width >= 321){
27 | var cutter = 2;
28 | }else if(width <= 320){
29 | var cutter = 1;
30 | }
31 |
32 | td.each(function(i){
33 | $(this).removeAttr('colspan');
34 | if (i % cutter == 0) {
35 | td.slice(i, i+cutter).wrapAll('
')
36 | }
37 | }).parent('tr').unwrap();
38 | $('.row > .main > table:last-of-type tr').each(function(){
39 | if($.trim($(this).html())=='') { $(this).remove(); }
40 | });
41 | var td_cnt = $('.row > .main > table:last-of-type tr:last-of-type td').length;
42 | var col_diff = cutter - td_cnt + 1;
43 | $('.row > .main > table:last-of-type tr:last-of-type td:last-of-type').attr('colspan', col_diff);
44 |
45 | $('.row > .main > table:last-of-type form').remove();
46 | $('.row > .main > table:last-of-type').wrap('