PHP 5.6.40
Preview: knob.script.js Size: 3.25 KB
/home/urbanman/roadkaraja.in/employee/dist/js/knob.script.js

(function ($) {
    "use strict";

    var primarycolor = getComputedStyle(document.body).getPropertyValue('--primarycolor');
    var bordercolor = getComputedStyle(document.body).getPropertyValue('--bordercolor');
    var bodycolor = getComputedStyle(document.body).getPropertyValue('--bodycolor');

    $(".knob").knob({
        change: function (value) {
            //console.log("change : " + value);
        },
        release: function (value) {
            //console.log(this.$.attr('value'));
            console.log("release : " + value);
        },
        cancel: function () {
            console.log("cancel : ", this);
        },
        /*format : function (value) {
         return value + '%';
         },*/
        draw: function () {

            // "tron" case
            if (this.$.data('skin') == 'tron') {

                this.cursorExt = 0.3;

                var a = this.arc(this.cv)  // Arc
                        , pa                   // Previous arc
                        , r = 1;

                this.g.lineWidth = this.lineWidth;

                if (this.o.displayPrevious) {
                    pa = this.arc(this.v);
                    this.g.beginPath();
                    this.g.strokeStyle = this.pColor;
                    this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, pa.s, pa.e, pa.d);
                    this.g.stroke();
                }

                this.g.beginPath();
                this.g.strokeStyle = r ? this.o.fgColor : this.fgColor;
                this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, a.s, a.e, a.d);
                this.g.stroke();

                this.g.lineWidth = 2;
                this.g.beginPath();
                this.g.strokeStyle = this.o.fgColor;
                this.g.arc(this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false);
                this.g.stroke();

                return false;
            }
        }
    });

    // Example of infinite knob, iPod click wheel
    var v, up = 0, down = 0, i = 0
            , $idir = $("div.idir")
            , $ival = $("div.ival")
            , incr = function () {
                i++;
                $idir.show().html("+").fadeOut();
                $ival.html(i);
            }
    , decr = function () {
        i--;
        $idir.show().html("-").fadeOut();
        $ival.html(i);
    };
    $("input.infinite").knob(
            {
                min: 0
                , max: 20
                , stopper: false
                , change: function () {
                    if (v > this.cv) {
                        if (up) {
                            decr();
                            up = 0;
                        } else {
                            up = 1;
                            down = 0;
                        }
                    } else {
                        if (v < this.cv) {
                            if (down) {
                                incr();
                                down = 0;
                            } else {
                                down = 1;
                                up = 0;
                            }
                        }
                    }
                    v = this.cv;
                }
            });


})(jQuery);

Directory Contents

Dirs: 0 × Files: 37

Name Size Perms Modified Actions
14.20 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
40.80 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
0 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
3.10 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
8.20 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
45.90 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
0 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
7.67 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
19.74 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
242 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
243 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
15.43 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
0 B lrw-r--r-- 2026-07-14 06:23:16
Edit Download
19.27 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
552 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
542 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
2.63 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
11.81 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
1.55 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
144 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
2.53 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
9.79 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
3.25 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
227 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
7.06 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
293 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
286 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
270 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
1.66 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
562 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
4.62 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
227 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
328 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
742 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
4.01 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
2.43 KB lrw-rw-rw- 2026-07-06 10:38:15
Edit Download
0 B lrw-rw-rw- 2026-07-06 10:38:15
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).