mirror of
https://github.com/processwire/processwire.git
synced 2025-08-17 20:11:46 +02:00
Additional .js file updates for jQuery 3.6
This commit is contained in:
@@ -354,8 +354,8 @@ class AdminThemeRenoHelpers extends AdminThemeDefaultHelpers {
|
||||
|
||||
$adminTheme = $this->wire('adminTheme');
|
||||
$field_name = "userFields_". $user->template->name;
|
||||
trim($adminTheme->$field_name) == '' ? $adminTheme->$field_name = 'name' : ''; // force to name field if empty
|
||||
$userFields = explode(',', $adminTheme->$field_name);
|
||||
trim("$adminTheme->$field_name") == '' ? $adminTheme->$field_name = 'name' : ''; // force to name field if empty
|
||||
$userFields = explode(',', "$adminTheme->$field_name");
|
||||
|
||||
foreach($userFields as $f){
|
||||
$f = trim($f);
|
||||
|
@@ -616,7 +616,7 @@
|
||||
*/
|
||||
function enableSelectOption($option) {
|
||||
|
||||
$option.removeClass(options.optionDisabledClass).attr("disabled", false);
|
||||
$option.removeClass(options.optionDisabledClass).prop("disabled", false);
|
||||
|
||||
if(options.hideWhenEmpty) $select.show();
|
||||
if(options.hideWhenAdded) $option.show();
|
||||
|
File diff suppressed because one or more lines are too long
@@ -22,17 +22,17 @@ jQuery(document).ready(function($) {
|
||||
};
|
||||
|
||||
if($inputOld.length) {
|
||||
$input.attr('disabled', 'disabled');
|
||||
$input.prop('disabled', true);
|
||||
inputOldEvent = function() {
|
||||
if($(this).val().length > 0) {
|
||||
$inputOld.off('keyup input change blur', inputOldEvent);
|
||||
$input.removeAttr('disabled');
|
||||
$input.prop('disabled', false);
|
||||
}
|
||||
};
|
||||
$inputOld.on('keyup input change blur', inputOldEvent);
|
||||
}
|
||||
|
||||
if($confirm.length) $confirm.attr('disabled', 'disabled');
|
||||
if($confirm.length) $confirm.prop('disabled', true);
|
||||
|
||||
$input.complexify(options, function(valid, complexity) {
|
||||
|
||||
@@ -122,9 +122,9 @@ jQuery(document).ready(function($) {
|
||||
}
|
||||
if($on.hasClass('pass-fail') || $on.hasClass('pass-short') || $on.hasClass('pass-common')
|
||||
|| $on.hasClass('pass-invalid') || $on.hasClass('pass-same')) {
|
||||
$confirm.attr('disabled', 'disabled').val('').trigger('change');
|
||||
$confirm.prop('disabled', true).val('').trigger('change');
|
||||
} else {
|
||||
$confirm.removeAttr('disabled');
|
||||
$confirm.prop('disabled', false);
|
||||
$on.find('small').remove();
|
||||
$on.append("<small style='margin-left:0.5em'>(" + Math.floor(complexity) + "%)</small>");
|
||||
}
|
||||
|
@@ -1 +1 @@
|
||||
jQuery(document).ready(function($){var $inputs=$("input.InputfieldPasswordComplexify");$inputs.each(function(){var $input=$(this);var $inputfield=$input.closest(".Inputfield");var $confirm=$inputfield.find(".InputfieldPasswordConfirm");var $confirms=$confirm.next(".pass-confirm");var $inputOld=$inputfield.find("input.InputfieldPasswordOld");var $wrapScores=$input.siblings(".pass-scores");var $percent=$input.siblings(".pass-percent");var $scores=$wrapScores.children();var requirements=$wrapScores.attr("data-requirements").split(" ");var minlength=parseInt($input.attr("data-minlength"));var inputOldEvent;var options={banMode:$input.attr("data-banMode"),strengthScaleFactor:parseFloat($input.attr("data-factor")),minimumChars:minlength};if($inputOld.length){$input.attr("disabled","disabled");inputOldEvent=function(){if($(this).val().length>0){$inputOld.off("keyup input change blur",inputOldEvent);$input.removeAttr("disabled")}};$inputOld.on("keyup input change blur",inputOldEvent)}if($confirm.length)$confirm.attr("disabled","disabled");$input.complexify(options,function(valid,complexity){var $on=null;var val=$input.val();var len=val.length;var numGood=0;if(len>0){for(var n=0;n<requirements.length;n++){var fail=false;var requirement=requirements[n];var $requirement=$inputfield.find(".pass-require-"+requirement);var re;if(requirement=="letter"){re=XRegExp("\\p{L}");if(!re.test(val))fail=true}else if(requirement=="upper"){re=XRegExp("\\p{Lu}");if(!re.test(val))fail=true}else if(requirement=="lower"){re=XRegExp("\\p{Ll}");if(!re.test(val))fail=true}else if(requirement=="digit"){re=XRegExp("\\p{N}");if(!re.test(val))fail=true}else if(requirement=="other"){re=XRegExp("\\p{P}");var rx=XRegExp("\\p{S}");if(!re.test(val)&&!rx.test(val))fail=true}else if(requirement=="space"){re=XRegExp("\\p{Z}");if(!re.test(val))fail=true}else if(requirement=="minlength"){if(len<minlength)fail=true}if(fail){$requirement.removeClass("pass-require-good ui-priority-secondary")}else{$requirement.addClass("pass-require-good ui-priority-secondary");numGood++}}}else{$inputfield.find(".pass-require-good").removeClass("pass-require-good ui-priority-secondary")}if(len==0){$scores.removeClass("on");return}else if($inputOld.length&&$inputOld.val()===$input.val()){$on=$scores.filter(".pass-same")}else if(numGood<requirements.length){$on=$scores.filter(".pass-fail")}else if(len<minlength){$on=$scores.filter(".pass-short")}else if(!valid){$on=$scores.filter(".pass-common")}else if(complexity==0){$on=$scores.filter(".pass-invalid")}else if(complexity<50){$on=$scores.filter(".pass-weak")}else if(complexity<70){$on=$scores.filter(".pass-medium")}else if(complexity<100){$on=$scores.filter(".pass-good")}else if(complexity==100){$on=$scores.filter(".pass-excellent")}if($on&&!$on.hasClass("on")){$on.siblings(".on").removeClass("on");$on.addClass("on")}if($on.hasClass("pass-fail")||$on.hasClass("pass-short")||$on.hasClass("pass-common")||$on.hasClass("pass-invalid")||$on.hasClass("pass-same")){$confirm.attr("disabled","disabled").val("").trigger("change")}else{$confirm.removeAttr("disabled");$on.find("small").remove();$on.append("<small style='margin-left:0.5em'>("+Math.floor(complexity)+"%)</small>")}if($confirm.val().length){$confirm.trigger("change")}});$input.on("change",function(){var val=$(this).val();if(val.length>0){$input.attr("required","required");$confirm.attr("required","required")}else if(!$(this).closest(".InputfieldStateRequired").length){$input.removeAttr("required");$confirm.removeAttr("required")}});$confirm.on("keyup change",function(){var val1=$input.val();var val2=$(this).val();var $on=null;var $p=$input.closest("p").removeClass("pass-matches");if(val2.length==0){$on=$confirms.children(".confirm-pending")}else if(val1==val2){$on=$confirms.children(".confirm-yes");$p.addClass("pass-matches")}else if(val1.indexOf(val2)===0){$on=$confirms.children(".confirm-qty");$on.children("span").html(val2.length+"/"+val1.length)}else{$on=$confirms.children(".confirm-no")}if($on)$on.addClass("on").siblings(".on").removeClass("on")});var $passMask=$inputfield.find(".pass-mask");if($passMask.length){var $passMaskShow=$passMask.find(".pass-mask-show");var $passMaskHide=$passMask.find(".pass-mask-hide");$passMaskHide.hide();$passMaskShow.on("click",function(e){$(this).hide();$passMaskHide.show();$inputfield.find("input[type=password]").prop("type","text").addClass("pass-unmask");return false});$passMaskHide.hide().on("click",function(e){$(this).hide();$passMaskShow.show();$inputfield.find("input.pass-unmask").prop("type","password").removeClass("pass-unmask");return false})}});var $ffinputs=$(".InputfieldPassword").find("input[autocomplete='new-password']");if($ffinputs.length){setTimeout(function(){$ffinputs.each(function(){if($(this).val().length<1||$(this).attr("value").length>0)return;$(this).val("").trigger("keyup").trigger("change").closest(".Inputfield").removeClass("InputfieldStateChanged")})},1e3)}});
|
||||
jQuery(document).ready(function($){var $inputs=$("input.InputfieldPasswordComplexify");$inputs.each(function(){var $input=$(this);var $inputfield=$input.closest(".Inputfield");var $confirm=$inputfield.find(".InputfieldPasswordConfirm");var $confirms=$confirm.next(".pass-confirm");var $inputOld=$inputfield.find("input.InputfieldPasswordOld");var $wrapScores=$input.siblings(".pass-scores");var $percent=$input.siblings(".pass-percent");var $scores=$wrapScores.children();var requirements=$wrapScores.attr("data-requirements").split(" ");var minlength=parseInt($input.attr("data-minlength"));var inputOldEvent;var options={banMode:$input.attr("data-banMode"),strengthScaleFactor:parseFloat($input.attr("data-factor")),minimumChars:minlength};if($inputOld.length){$input.prop("disabled",true);inputOldEvent=function(){if($(this).val().length>0){$inputOld.off("keyup input change blur",inputOldEvent);$input.prop("disabled",false)}};$inputOld.on("keyup input change blur",inputOldEvent)}if($confirm.length)$confirm.prop("disabled",true);$input.complexify(options,function(valid,complexity){var $on=null;var val=$input.val();var len=val.length;var numGood=0;if(len>0){for(var n=0;n<requirements.length;n++){var fail=false;var requirement=requirements[n];var $requirement=$inputfield.find(".pass-require-"+requirement);var re;if(requirement=="letter"){re=XRegExp("\\p{L}");if(!re.test(val))fail=true}else if(requirement=="upper"){re=XRegExp("\\p{Lu}");if(!re.test(val))fail=true}else if(requirement=="lower"){re=XRegExp("\\p{Ll}");if(!re.test(val))fail=true}else if(requirement=="digit"){re=XRegExp("\\p{N}");if(!re.test(val))fail=true}else if(requirement=="other"){re=XRegExp("\\p{P}");var rx=XRegExp("\\p{S}");if(!re.test(val)&&!rx.test(val))fail=true}else if(requirement=="space"){re=XRegExp("\\p{Z}");if(!re.test(val))fail=true}else if(requirement=="minlength"){if(len<minlength)fail=true}if(fail){$requirement.removeClass("pass-require-good ui-priority-secondary")}else{$requirement.addClass("pass-require-good ui-priority-secondary");numGood++}}}else{$inputfield.find(".pass-require-good").removeClass("pass-require-good ui-priority-secondary")}if(len==0){$scores.removeClass("on");return}else if($inputOld.length&&$inputOld.val()===$input.val()){$on=$scores.filter(".pass-same")}else if(numGood<requirements.length){$on=$scores.filter(".pass-fail")}else if(len<minlength){$on=$scores.filter(".pass-short")}else if(!valid){$on=$scores.filter(".pass-common")}else if(complexity==0){$on=$scores.filter(".pass-invalid")}else if(complexity<50){$on=$scores.filter(".pass-weak")}else if(complexity<70){$on=$scores.filter(".pass-medium")}else if(complexity<100){$on=$scores.filter(".pass-good")}else if(complexity==100){$on=$scores.filter(".pass-excellent")}if($on&&!$on.hasClass("on")){$on.siblings(".on").removeClass("on");$on.addClass("on")}if($on.hasClass("pass-fail")||$on.hasClass("pass-short")||$on.hasClass("pass-common")||$on.hasClass("pass-invalid")||$on.hasClass("pass-same")){$confirm.prop("disabled",true).val("").trigger("change")}else{$confirm.prop("disabled",false);$on.find("small").remove();$on.append("<small style='margin-left:0.5em'>("+Math.floor(complexity)+"%)</small>")}if($confirm.val().length){$confirm.trigger("change")}});$input.on("change",function(){var val=$(this).val();if(val.length>0){$input.attr("required","required");$confirm.attr("required","required")}else if(!$(this).closest(".InputfieldStateRequired").length){$input.removeAttr("required");$confirm.removeAttr("required")}});$confirm.on("keyup change",function(){var val1=$input.val();var val2=$(this).val();var $on=null;var $p=$input.closest("p").removeClass("pass-matches");if(val2.length==0){$on=$confirms.children(".confirm-pending")}else if(val1==val2){$on=$confirms.children(".confirm-yes");$p.addClass("pass-matches")}else if(val1.indexOf(val2)===0){$on=$confirms.children(".confirm-qty");$on.children("span").html(val2.length+"/"+val1.length)}else{$on=$confirms.children(".confirm-no")}if($on)$on.addClass("on").siblings(".on").removeClass("on")});var $passMask=$inputfield.find(".pass-mask");if($passMask.length){var $passMaskShow=$passMask.find(".pass-mask-show");var $passMaskHide=$passMask.find(".pass-mask-hide");$passMaskHide.hide();$passMaskShow.on("click",function(e){$(this).hide();$passMaskHide.show();$inputfield.find("input[type=password]").prop("type","text").addClass("pass-unmask");return false});$passMaskHide.hide().on("click",function(e){$(this).hide();$passMaskShow.show();$inputfield.find("input.pass-unmask").prop("type","password").removeClass("pass-unmask");return false})}});var $ffinputs=$(".InputfieldPassword").find("input[autocomplete='new-password']");if($ffinputs.length){setTimeout(function(){$ffinputs.each(function(){if($(this).val().length<1||$(this).attr("value").length>0)return;$(this).val("").trigger("keyup").trigger("change").closest(".Inputfield").removeClass("InputfieldStateChanged")})},1e3)}});
|
@@ -119,7 +119,7 @@
|
||||
banMode: 'strict' // (strict|loose)
|
||||
};
|
||||
|
||||
if($.isFunction(options) && !callback) {
|
||||
if(typeof options === "function" && !callback) {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
|
@@ -1 +1 @@
|
||||
(function($){$.fn.extend({complexify:function(options,callback){var MIN_COMPLEXITY=49;var MAX_COMPLEXITY=120;var CHARSETS=[[32,32],[48,57],[65,90],[97,122],[33,47],[58,64],[91,96],[123,126],[128,255],[256,383],[384,591],[592,687],[688,767],[768,879],[880,1023],[1024,1279],[1328,1423],[1424,1535],[1536,1791],[1792,1871],[1920,1983],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3456,3583],[3584,3711],[3712,3839],[3840,4095],[4096,4255],[4256,4351],[4352,4607],[4608,4991],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[7680,7935],[7936,8191],[8192,8303],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703],[8704,8959],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[10240,10495],[11904,12031],[12032,12255],[12272,12287],[12288,12351],[12352,12447],[12448,12543],[12544,12591],[12592,12687],[12688,12703],[12704,12735],[12800,13055],[13056,13311],[13312,19893],[19968,40959],[40960,42127],[42128,42191],[44032,55203],[55296,56191],[56192,56319],[56320,57343],[57344,63743],[63744,64255],[64256,64335],[64336,65023],[65056,65071],[65072,65103],[65104,65135],[65136,65278],[65279,65279],[65280,65519],[65520,65533]];var defaults={minimumChars:8,strengthScaleFactor:1,bannedPasswords:window.COMPLEXIFY_BANLIST||[],banMode:"strict"};if($.isFunction(options)&&!callback){callback=options;options={}}options=$.extend(defaults,options);function additionalComplexityForCharset(str,charset){for(var i=str.length-1;i>=0;i--){if(charset[0]<=str.charCodeAt(i)&&str.charCodeAt(i)<=charset[1]){return charset[1]-charset[0]+1}}return 0}function inBanlist(str){if(options.banMode==="strict"){for(var i=0;i<options.bannedPasswords.length;i++){if(str.toLowerCase().indexOf(options.bannedPasswords[i].toLowerCase())!==-1){return true}}return false}else{return $.inArray(str,options.bannedPasswords)>-1?true:false}}function evaluateSecurity(){var password=$(this).val();var complexity=0,valid=false;if(!inBanlist(password)){for(var i=CHARSETS.length-1;i>=0;i--){complexity+=additionalComplexityForCharset(password,CHARSETS[i])}}else{complexity=1}complexity=Math.log(Math.pow(complexity,password.length))*(1/options.strengthScaleFactor);valid=complexity>MIN_COMPLEXITY&&password.length>=options.minimumChars;complexity=complexity/MAX_COMPLEXITY*100;complexity=complexity>100?100:complexity;callback.call(this,valid,complexity)}this.each(function(){if($(this).val()){evaluateSecurity.apply(this)}});return this.each(function(){$(this).on("keyup focus input propertychange mouseup",evaluateSecurity)})}})})(jQuery);
|
||||
(function($){$.fn.extend({complexify:function(options,callback){var MIN_COMPLEXITY=49;var MAX_COMPLEXITY=120;var CHARSETS=[[32,32],[48,57],[65,90],[97,122],[33,47],[58,64],[91,96],[123,126],[128,255],[256,383],[384,591],[592,687],[688,767],[768,879],[880,1023],[1024,1279],[1328,1423],[1424,1535],[1536,1791],[1792,1871],[1920,1983],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3456,3583],[3584,3711],[3712,3839],[3840,4095],[4096,4255],[4256,4351],[4352,4607],[4608,4991],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[7680,7935],[7936,8191],[8192,8303],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703],[8704,8959],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[10240,10495],[11904,12031],[12032,12255],[12272,12287],[12288,12351],[12352,12447],[12448,12543],[12544,12591],[12592,12687],[12688,12703],[12704,12735],[12800,13055],[13056,13311],[13312,19893],[19968,40959],[40960,42127],[42128,42191],[44032,55203],[55296,56191],[56192,56319],[56320,57343],[57344,63743],[63744,64255],[64256,64335],[64336,65023],[65056,65071],[65072,65103],[65104,65135],[65136,65278],[65279,65279],[65280,65519],[65520,65533]];var defaults={minimumChars:8,strengthScaleFactor:1,bannedPasswords:window.COMPLEXIFY_BANLIST||[],banMode:"strict"};if(typeof options==="function"&&!callback){callback=options;options={}}options=$.extend(defaults,options);function additionalComplexityForCharset(str,charset){for(var i=str.length-1;i>=0;i--){if(charset[0]<=str.charCodeAt(i)&&str.charCodeAt(i)<=charset[1]){return charset[1]-charset[0]+1}}return 0}function inBanlist(str){if(options.banMode==="strict"){for(var i=0;i<options.bannedPasswords.length;i++){if(str.toLowerCase().indexOf(options.bannedPasswords[i].toLowerCase())!==-1){return true}}return false}else{return $.inArray(str,options.bannedPasswords)>-1?true:false}}function evaluateSecurity(){var password=$(this).val();var complexity=0,valid=false;if(!inBanlist(password)){for(var i=CHARSETS.length-1;i>=0;i--){complexity+=additionalComplexityForCharset(password,CHARSETS[i])}}else{complexity=1}complexity=Math.log(Math.pow(complexity,password.length))*(1/options.strengthScaleFactor);valid=complexity>MIN_COMPLEXITY&&password.length>=options.minimumChars;complexity=complexity/MAX_COMPLEXITY*100;complexity=complexity>100?100:complexity;callback.call(this,valid,complexity)}this.each(function(){if($(this).val()){evaluateSecurity.apply(this)}});return this.each(function(){$(this).on("keyup focus input propertychange mouseup",evaluateSecurity)})}})})(jQuery);
|
@@ -116,7 +116,7 @@ var InputfieldSelector = {
|
||||
*
|
||||
*/
|
||||
disableOption: function($option) {
|
||||
$option.attr('disabled', 'disabled');
|
||||
$option.prop('disabled', true).prop('hidden', true);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -126,8 +126,7 @@ var InputfieldSelector = {
|
||||
*
|
||||
*/
|
||||
enableOption: function($option) {
|
||||
$option.removeAttr('disabled');
|
||||
|
||||
$option.prop('disabled', false).prop('hidden', false);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -165,7 +164,7 @@ var InputfieldSelector = {
|
||||
$newRow.find('.opval').html('');
|
||||
$newRow.find('.select-field').val(''); // .select2();
|
||||
$newRow.hide();
|
||||
$newRow.find("option[disabled=disabled]").remove();
|
||||
$newRow.find('option:disabled').prop('hidden', true);
|
||||
$list.append($newRow);
|
||||
$newRow.slideDown('fast');
|
||||
InputfieldSelector.normalizeHeightRow($newRow);
|
||||
@@ -183,8 +182,7 @@ var InputfieldSelector = {
|
||||
if($selectField.val() == 'template') {
|
||||
// if template setting is removed, restore any disabled fields
|
||||
$row.parents(".InputfieldSelector").find("select.select-field").each(function() {
|
||||
// $(this).find("option[disabled=disabled]").removeAttr('disabled');
|
||||
$(this).find("option[disabled=disabled]").each(function() {
|
||||
$(this).find("option:disabled").each(function() {
|
||||
InputfieldSelector.enableOption($(this));
|
||||
});
|
||||
});
|
||||
@@ -397,7 +395,6 @@ var InputfieldSelector = {
|
||||
$item.trigger('blur').hide();
|
||||
setTimeout(function() {
|
||||
$item.val(ui.item.label);
|
||||
//$item.attr('disabled', 'disabled');
|
||||
$item.fadeIn('fast');
|
||||
}, 100);
|
||||
InputfieldSelector.changeAny($input);
|
||||
@@ -477,9 +474,9 @@ var InputfieldSelector = {
|
||||
if(op && op.indexOf('"') > -1) {
|
||||
// handle: 'is empty' or 'is not empty' operators
|
||||
value = ' ';
|
||||
$value.attr('disabled', 'disabled');
|
||||
$value.prop('disabled', true);
|
||||
} else if($value.is(":disabled")) {
|
||||
$value.removeAttr('disabled');
|
||||
$value.prop('disabled', false);
|
||||
}
|
||||
|
||||
if(op && op.indexOf('!') === 0 && op !== '!=') {
|
||||
@@ -519,18 +516,18 @@ var InputfieldSelector = {
|
||||
|
||||
if(useOrValue) { // && !$row.is('.has-or-value')) {
|
||||
$row.addClass('has-or-value');
|
||||
$row.find(".select-field, .select-operator, .select-subfield").attr('disabled', 'disabled');
|
||||
$row.find(".select-field, .select-operator, .select-subfield").prop('disabled', true);
|
||||
} else if($row.is('.has-or-value')) {
|
||||
$row.removeClass('has-or-value');
|
||||
$row.find(".select-field, .select-operator, .select-subfield").removeAttr('disabled');
|
||||
$row.find(".select-field, .select-operator, .select-subfield").prop('disabled', false);
|
||||
}
|
||||
|
||||
if(useOrField) { // && !$row.is('.has-or-field')) {
|
||||
$row.addClass('has-or-field');
|
||||
$row.find(".input-value, .select-operator").attr('disabled', 'disabled');
|
||||
$row.find('.input-value, .select-operator').prop('disabled', true);
|
||||
} else if($row.is('.has-or-field')) {
|
||||
$row.removeClass('has-or-field');
|
||||
$row.find(".input-value, .select-operator").removeAttr('disabled');
|
||||
$row.find(".input-value, .select-operator").prop('disabled', false);
|
||||
}
|
||||
|
||||
selectors[n++] = {
|
||||
@@ -563,7 +560,6 @@ var InputfieldSelector = {
|
||||
var $option = $(this);
|
||||
var templates = $option.attr('data-templates');
|
||||
if(typeof templates != "undefined" && templates != "*") {
|
||||
// $option.removeAttr('disabled');
|
||||
InputfieldSelector.enableOption($option);
|
||||
var numFound = 0;
|
||||
for(i = 0; i < templateIDs.length; i++) {
|
||||
@@ -571,17 +567,15 @@ var InputfieldSelector = {
|
||||
}
|
||||
//if(templates.indexOf('|' + templatesID + '|') == -1) {
|
||||
if(numFound) {
|
||||
//$option.removeAttr('disabled');
|
||||
InputfieldSelector.enableOption($option);
|
||||
} else {
|
||||
//if(!$option.is(":selected")) $option.attr('disabled', 'disabled');
|
||||
if(!$option.is(":selected")) InputfieldSelector.disableOption($option);
|
||||
numDisabledOptions++;
|
||||
}
|
||||
}
|
||||
});
|
||||
if(numDisabledOptions > 0 && !$select.parent().is(".selector-template-row")) {
|
||||
$select.find('option[disabled=disabled]').remove();
|
||||
$select.find('option:disabled').prop('hidden', true);
|
||||
}
|
||||
});
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@@ -345,7 +345,7 @@ var pwPanels = {
|
||||
if($('.pw-panel-container-init').length == 0) {
|
||||
// attach window resize event only if no panels have been opened before
|
||||
// so that we attach it only if needed, and not more than once
|
||||
$(window).resize(pwPanels.windowResizeEvent);
|
||||
$(window).on('resize', pwPanels.windowResizeEvent);
|
||||
}
|
||||
|
||||
if(isOpen) {
|
||||
|
2
wire/modules/Jquery/JqueryUI/panel.min.js
vendored
2
wire/modules/Jquery/JqueryUI/panel.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -4,7 +4,6 @@ $(document).ready(function() {
|
||||
|
||||
var name = $(this).children(".not_installed").attr('data-name');
|
||||
var $btn = $(".install_" + name + ":visible");
|
||||
var disabled = $btn.attr('disabled');
|
||||
|
||||
if($btn.length) {
|
||||
$btn.effect('highlight', 1000);
|
||||
|
@@ -1 +1 @@
|
||||
$(document).ready(function(){$(".not_installed").parent("a").css("opacity",.6).on("click",function(){var name=$(this).children(".not_installed").attr("data-name");var $btn=$(".install_"+name+":visible");var disabled=$btn.attr("disabled");if($btn.length){$btn.effect("highlight",1e3)}else{var color=$(this).css("color");$(this).closest("tr").find(".requires").attr("data-color",$(this).css("color")).css("color",color).effect("highlight",1e3)}return false});$("button.ProcessModuleSettings").on("click",function(){var $a=$(this).parents("tr").find(".ConfigurableModule").parent("a");window.location.href=$a.attr("href")+"&collapse_info=1"});if($("#modules_form").length>0){$("#modules_form").WireTabs({items:$(".Inputfields li.WireTab"),rememberTabs:true})}$("select.modules_section_select").on("change",function(){var section=$(this).val();var $sections=$(this).parent("p").siblings(".modules_section");if(section==""){$sections.show()}else{$sections.hide();$sections.filter(".modules_"+section).show()}document.cookie=$(this).attr("name")+"="+section;return true}).trigger("change");$(document).on("click","#head_button a",function(){document.cookie="WireTabs=tab_new_modules";return true});$("#Inputfield_new_seconds").on("change",function(){$("#submit_check").removeAttr("hidden").trigger("click");$(this).closest("form").trigger("submit")});$("#wrap_upload_module").removeClass("InputfieldItemList")});
|
||||
$(document).ready(function(){$(".not_installed").parent("a").css("opacity",.6).on("click",function(){var name=$(this).children(".not_installed").attr("data-name");var $btn=$(".install_"+name+":visible");if($btn.length){$btn.effect("highlight",1e3)}else{var color=$(this).css("color");$(this).closest("tr").find(".requires").attr("data-color",$(this).css("color")).css("color",color).effect("highlight",1e3)}return false});$("button.ProcessModuleSettings").on("click",function(){var $a=$(this).parents("tr").find(".ConfigurableModule").parent("a");window.location.href=$a.attr("href")+"&collapse_info=1"});if($("#modules_form").length>0){$("#modules_form").WireTabs({items:$(".Inputfields li.WireTab"),rememberTabs:true})}$("select.modules_section_select").on("change",function(){var section=$(this).val();var $sections=$(this).parent("p").siblings(".modules_section");if(section==""){$sections.show()}else{$sections.hide();$sections.filter(".modules_"+section).show()}document.cookie=$(this).attr("name")+"="+section;return true}).trigger("change");$(document).on("click","#head_button a",function(){document.cookie="WireTabs=tab_new_modules";return true});$("#Inputfield_new_seconds").on("change",function(){$("#submit_check").removeAttr("hidden").trigger("click");$(this).closest("form").trigger("submit")});$("#wrap_upload_module").removeClass("InputfieldItemList")});
|
@@ -111,8 +111,8 @@ function setupSelectedImage() {
|
||||
|
||||
function populateResizeDimensions() {
|
||||
|
||||
var w = $img.width();
|
||||
var h = $img.height();
|
||||
var w = Math.round($img.width());
|
||||
var h = Math.round($img.height());
|
||||
var $link = $("#wrap_link_original");
|
||||
|
||||
if((h >= maxHeight || w >= maxWidth) && $form.hasClass('croppable')) {
|
||||
@@ -345,8 +345,8 @@ function setupSelectedImage() {
|
||||
}
|
||||
|
||||
if(abort) {
|
||||
$("#input_width").val(oldWidth);
|
||||
$("#input_height").val(oldHeight);
|
||||
$("#input_width").val(Math.round(oldWidth));
|
||||
$("#input_height").val(Math.round(oldHeight));
|
||||
inputPixelsActive = false;
|
||||
return false;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@@ -66,6 +66,10 @@
|
||||
return typeof n === "number";
|
||||
},
|
||||
|
||||
isFunction = function (obj) { // RJC
|
||||
return typeof obj === "function" && typeof obj.nodeType !== "number" && typeof obj.item !== "function";
|
||||
},
|
||||
|
||||
toArray = function (obj, offset) {
|
||||
var args = [];
|
||||
|
||||
@@ -119,7 +123,7 @@
|
||||
constructor: Cropper,
|
||||
|
||||
support: {
|
||||
canvas: $.isFunction($("<canvas>")[0].getContext)
|
||||
canvas: isFunction($("<canvas>")[0].getContext)
|
||||
},
|
||||
|
||||
init: function () {
|
||||
@@ -1594,7 +1598,7 @@
|
||||
$this.data("cropper", (data = new Cropper(this, options)));
|
||||
}
|
||||
|
||||
if (typeof options === "string" && $.isFunction((fn = data[options]))) {
|
||||
if (typeof options === "string" && isFunction((fn = data[options]))) {
|
||||
result = fn.apply(data, args);
|
||||
}
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user