403Webshell
Server IP : 172.67.187.206  /  Your IP : 172.71.28.155
Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586
User : SYSTEM ( 0)
PHP Version : 5.6.30
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Inetpub/www/myschool/triamudom/tuprblearn/grade/report/singleview/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Inetpub/www/myschool/triamudom/tuprblearn/grade/report/singleview/js/singleview.js
M.gradereport_singleview = {};

M.gradereport_singleview.init = function(Y) {
    var getColumnIndex = function(cell) {
        var rowNode = cell.ancestor('tr');
        if (!rowNode || !cell) {
            return;
        }
        var cells = rowNode.all('td, th');
        return cells.indexOf(cell);
    },
    getNextCell = function(cell) {
        var n = cell || document.activeElement,
            next = n.next('td.cell, th.cell');
        if (!next) {
            return null;
        }
        // Continue on until we find a navigable cell
        if (!next || !Y.one(next).one('input:not([type="hidden"]):not([disabled="DISABLED"]), select, a')) {
            return getNextCell(next);
        }
        return next;
    },
    getPrevCell = function(cell) {
        var n = cell || document.activeElement,
            next = n.previous('td.cell, th.cell');
        if (!next) {
            return null;
        }
        // Continue on until we find a navigable cell
        if (!Y.one(next).one('input:not([type="hidden"]):not([disabled="DISABLED"]), select, a')) {
            return getPrevCell(next);
        }
        return next;
    },
    getAboveCell = function(cell) {
        var n = cell || document.activeElement,
            tr = n.ancestor('tr').previous('tr'),
            columnIndex = getColumnIndex(n),
            next = null;
        if (tr) {
            next = tr.all('td, th').item(columnIndex);
        } else {
            return null;
        }
        // Continue on until we find a navigable cell
        if (!Y.one(next).one('input:not([type="hidden"]):not([disabled="DISABLED"]), select, a')) {
            return getAboveCell(next);
        }
        return next;
    },
    getBelowCell = function(cell) {
        var n = cell || document.activeElement,
            tr = n.ancestor('tr').next('tr'),
            columnIndex = getColumnIndex(n),
            next = null;
        if (tr) {
            next = tr.all('td, th').item(columnIndex);
        } else {
            return null;
        }
        // Continue on until we find a navigable cell
        if (!Y.one(next).one('input:not([type="hidden"]):not([disabled="DISABLED"]), select, a')) {
            return getBelowCell(next);
        }
        return next;
    };

    // Add ctrl+arrow controls for navigation
    Y.one(Y.config.doc.body).delegate('key', function(e) {
        e.preventDefault();
        e.stopPropagation();
        var next = null;
        switch (e.keyCode) {
            case 37:
                next = getPrevCell(this.ancestor('td, th'));
                break;
            case 38:
                next = getAboveCell(this.ancestor('td, th'));
                break;
            case 39:
                next = getNextCell(this.ancestor('td, th'));
                break;
            case 40:
                next = getBelowCell(this.ancestor('td, th'));
                break;
        }
        if (next) {
            Y.one(next).one('input:not([type="hidden"]):not([disabled="DISABLED"]), select, a').focus();
        }
        return;
    }, 'down:37,38,39,40+ctrl', 'table input, table select, table a');

    // Make toggle links
    Y.all('.include').each(function(link) {
        var type = link.getAttribute('class').split(" ")[2];

        var toggle = function(checked) {
            return function(input) {
                input.getDOMNode().checked = checked;
                Y.Event.simulate(input.getDOMNode(), 'change');
            };
        };

        link.on('click', function(e) {
            e.preventDefault();
            Y.all('input[name^=' + type + ']').each(toggle(link.hasClass('all')));
        });
    });

    // Override Toggle
    Y.all('input[name^=override_]').each(function(input) {
        input.on('change', function() {
            var checked = input.getDOMNode().checked;
            var names = input.getAttribute('name').split("_");

            var itemid = names[1];
            var userid = names[2];

            var interest = '_' + itemid + '_' + userid;

            Y.all('input[name$=' + interest + ']').filter('input[type=text]').each(function(text) {
                text.getDOMNode().disabled = !checked;
            });
            // deal with scales that are not text... UCSB
            Y.all('select[name$=' + interest + ']').each(function(select) {
                select.getDOMNode().disabled = !checked;
            });
        });
    });
};

Youez - 2016 - github.com/yon3zu
LinuXploit