Your IP : 192.168.165.1


Current Path : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/
Upload File :
Current File : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/showhidesettings.min.js

define ("core/showhidesettings",["jquery"],function(a){var o;function b(a){return a.is("input[type=hidden]")&&a.siblings("input[type=checkbox][name=\""+a.attr("name")+"\"]").length}function c(a,b){return a.is("input[type=radio]")&&a.attr("value")!==b}function d(a,d){return!b(a)&&!c(a,d)}function e(a){return a.is("input[type=radio]")&&!a.prop("checked")}function f(a){return a.is("input[type=checkbox]")&&!a.prop("checked")}function g(a){return a.is("select")&&a.prop("multiple")}function h(a,b){var c=a.val()||[];if(!b.length){return!1}if(c.length!==b.length){return!1}for(var d in c){if(c.hasOwnProperty(d)){if(-1===b.indexOf(c[d])){return!1}}}return!0}var p={notchecked:function notchecked(b,c){var e=!1;c=c+"";b.each(function(b,f){var g=a(f);if(d(g,c)){e=e||!g.prop("checked")}});return e},checked:function checked(b,c){var e=!1;c=c+"";b.each(function(b,f){var g=a(f);if(d(g,c)){e=e||g.prop("checked")}});return e},noitemselected:function noitemselected(b){var c=!1;b.each(function(b,d){var e=a(d);c=c||-1===e.prop("selectedIndex")});return c},eq:function eq(c,d){var i=!1,j=!1;d=d+"";c.each(function(c,k){var l=a(k);if(e(l)){return}if(b(l)){j=l.val()===d;return}if(f(l)){i=i||j;return}if(g(l)){var m=d.split("|");i=h(l,m);return}i=i||l.val()===d});return i},in:function _in(c,d){var i=!1,j=!1,k=d.split("|");c.each(function(c,d){var l=a(d);if(e(l)){return}if(b(l)){j=-1<k.indexOf(l.val());return}if(f(l)){i=i||j;return}if(g(l)){i=h(l,k);return}i=i||-1<k.indexOf(l.val())});return i},defaultCondition:function defaultCondition(c,d){var i=!1,j=!1;d=d+"";c.each(function(c,k){var l=a(k);if(e(l)){return}if(b(l)){j=l.val()!==d;return}if(f(l)){i=i||j;return}if(g(l)){var m=d.split("|");i=!h(l,m);return}i=i||l.val()!==d});return i}};function i(b){return a("[name=\""+b+"\"],[name=\""+b+"[]\"]")}function j(b){return a(b).attr("name").replace(/\[]/,"")}function k(a,b,c){if("function"==typeof p[b]){return p[b](a,c)}return p.defaultCondition(a,c)}function l(b,c){c=c||j(b.currentTarget);var d=i(c);if(!o.hasOwnProperty(c)){return}var e={};a.each(o[c],function(b,c){a.each(c,function(c,f){var g=k(d,b,c);a.each(f,function(a,b){if(e.hasOwnProperty(b)){e[b]=e[b]||g}else{e[b]=g}})})});a.each(e,function(b,c){i(b).each(function(b,d){var e=a(d).closest(".form-item");if(e.length){if(c){e.hide()}else{e.show()}}})})}function m(){a.each(o,function(a){var b=i(a);if(b.length){b.on("change",l);l(null,a)}})}function n(){a(".form-dependenton").hide()}return{init:function init(a){o=a.dependencies;m();n()}}});
//# sourceMappingURL=showhidesettings.min.js.map