diff --git a/yui/build/moodle-availability_ipaddress-form/moodle-availability_ipaddress-form-debug.js b/yui/build/moodle-availability_ipaddress-form/moodle-availability_ipaddress-form-debug.js index 31749a4..5001717 100644 --- a/yui/build/moodle-availability_ipaddress-form/moodle-availability_ipaddress-form-debug.js +++ b/yui/build/moodle-availability_ipaddress-form/moodle-availability_ipaddress-form-debug.js @@ -76,7 +76,7 @@ M.availability_ipaddress.form = Y.Object(M.core_availability.plugin); */ M.availability_ipaddress.form.initInner = function() { "use strict"; - Y.log('M.availability_ipaddress 1.2'); + Y.log('M.availability_ipaddress 1.2', 'moodle-availability_ipaddress-form'); }; /** @@ -92,11 +92,11 @@ M.availability_ipaddress.form.getValue = function(field, node) { "use strict"; // Get field value. var value = node.one('input[name=' + field + ']').get('value'); - Y.log('ip_address:' + value); + Y.log('ip_address:' + value, 'moodle-availability_ipaddress-form'); // If it is not a valid positive number, return false. if (M.availability_ipaddress.validateIpaddress(value)) { - Y.log('Valid ip-address'); + Y.log('Valid ip-address', 'moodle-availability_ipaddress-form'); return value; } @@ -164,30 +164,30 @@ M.availability_ipaddress.validateIpaddress = function(ipaddresses) { var ip = ipaddresses[i]; if (new RegExp(M.availability_ipaddress.ipv4Regex).test(ip)) { - Y.log('Correct IPv4: ' + ip); + Y.log('Correct IPv4: ' + ip, 'moodle-availability_ipaddress-form'); continue; } if (new RegExp(M.availability_ipaddress.ipv4RangeRegex).test(ip)) { - Y.log('Correct IPv4 range: ' + ip); + Y.log('Correct IPv4 range: ' + ip, 'moodle-availability_ipaddress-form'); continue; } if (new RegExp(M.availability_ipaddress.ipv6Regex).test(ip)) { - Y.log('Correct IPv6: ' + ip); + Y.log('Correct IPv6: ' + ip, 'moodle-availability_ipaddress-form'); continue; } if (subnetRegex.test(ip)) { - Y.log('Correct subnet: ' + ip); + Y.log('Correct subnet: ' + ip, 'moodle-availability_ipaddress-form'); continue; } - Y.log('Incorrect IP: ' + ip); + Y.log('Incorrect IP: ' + ip, 'moodle-availability_ipaddress-form'); return false; } - Y.log('All IP addresses are valid'); + Y.log('All IP addresses are valid', 'moodle-availability_ipaddress-form'); return true; }; @@ -223,4 +223,4 @@ M.availability_ipaddress.form.fillErrors = function(errors, node) { }; -}, '@VERSION@', {"requires": ["base", "node", "event", "moodle-core_availability-form"]}); +}, '@VERSION@', {"requires": ["base", "event", "node", "moodle-core_availability-form"]}); diff --git a/yui/build/moodle-availability_ipaddress-form/moodle-availability_ipaddress-form-min.js b/yui/build/moodle-availability_ipaddress-form/moodle-availability_ipaddress-form-min.js index 72abd05..b9432bc 100644 --- a/yui/build/moodle-availability_ipaddress-form/moodle-availability_ipaddress-form-min.js +++ b/yui/build/moodle-availability_ipaddress-form/moodle-availability_ipaddress-form-min.js @@ -1 +1 @@ -YUI.add("moodle-availability_ipaddress-form",function(e,a){M.availability_ipaddress=M.availability_ipaddress||{},M.availability_ipaddress.v4="(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}",M.availability_ipaddress.v6="^((?:[a-fA-F\\d]{1,4}:){7}(?:[a-fA-F\\d]{1,4}|:)|(?:[a-fA-F\\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|:[a-fA-F\\d]{1,4}|:)|(?:[a-fA-F\\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(:[a-fA-F\\d]{1,4}){1,2}|:)|(?:[a-fA-F\\d]{1,4}:){4}(?:(:[a-fA-F\\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d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|:)|([0-9A-Fa-f]{1,4}:){6}(:|[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|([0-9A-Fa-f]{1,4}:){5}((:[0-9A-Fa-f]{1,4}){1,2}|:|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)))|([0-9A-Fa-f]{1,4}:){4}((:[0-9A-Fa-f]{1,4}){1,3}|(:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|([0-9A-Fa-f]{1,4}:){3}((:[0-9A-Fa-f]{1,4}){1,4}|(:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|([0-9A-Fa-f]{1,4}:){2}((:[0-9A-Fa-f]{1,4}){1,5}|(:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|([0-9A-Fa-f]{1,4}:){1}((:[0-9A-Fa-f]{1,4}){1,6}|(:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|:((:[0-9A-Fa-f]{1,4}){1,7}|(:[0-9A-Fa-f]{1,4}){0,6}:((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)))(%.+)?$",M.availability_ipaddress.form=e.Object(M.core_availability.plugin),M.availability_ipaddress.form.initInner=function(){},M.availability_ipaddress.form.getValue=function(a,d){"use strict";a=d.one("input[name="+a+"]").get("value");return M.availability_ipaddress.validateIpaddress(a),a},M.availability_ipaddress.form.getNode=function(a){"use strict";var d,i="ipaddresses"+M.availability_ipaddress.form.instId;return M.availability_ipaddress.form.instId+=1,d="",d+='",i=e.Node.create(''+(d+='')+""),a.ipaddresses!==undefined&&i.one("input[name=ipaddresses]").set("value",a.ipaddresses),M.availability_ipaddress.form.addedEvents||(M.availability_ipaddress.form.addedEvents=!0,e.one(".availability-field").delegate("valuechange",function(){M.core_availability.form.update()},".availability_ipaddress input[name=ipaddresses]")),i},M.availability_ipaddress.validateIpaddress=function(a){"use strict";var d,i,e;for(a=a.split(","),d=new RegExp("^(?:"+M.availability_ipaddress.v4+"\\/(3[0-2]|[12]?[0-9])|(1\\*))|(?:"+M.availability_ipaddress.v6+"\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9]))$"),i=0;i",i=e.Node.create(''+(d+='')+""),a.ipaddresses!==undefined&&i.one("input[name=ipaddresses]").set("value",a.ipaddresses),M.availability_ipaddress.form.addedEvents||(M.availability_ipaddress.form.addedEvents=!0,e.one(".availability-field").delegate("valuechange",function(){M.core_availability.form.update()},".availability_ipaddress input[name=ipaddresses]")),i},M.availability_ipaddress.validateIpaddress=function(a){"use strict";var d,i,e;for(a=a.split(","),d=new RegExp("^(?:"+M.availability_ipaddress.v4+"\\/(3[0-2]|[12]?[0-9])|(1\\*))|(?:"+M.availability_ipaddress.v6+"\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9]))$"),i=0;i