Add files via upload

Updated Very Quick Guide for new line mask feature in v1.4
This commit is contained in:
ballantynedewolf 2017-03-18 13:03:02 +11:00 committed by GitHub
parent 7c29e49db9
commit e319940937
1 changed files with 23 additions and 23 deletions

View File

@ -1,4 +1,4 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<!--[if lt IE 10]> <!--[if lt IE 10]>
@ -1076,7 +1076,7 @@
</svg> </svg>
</a> </a>
<div class="panel-body"> <div class="panel-body">
Very quick guide: Calibrate and configure your chart using this help guide. Click or tap on white space to scroll the chart up and down, or use the up and down arrows on your keyboard. Click or tap on any letter to mask it. Click it again to unmask.<br /> Very quick guide: Calibrate and configure your chart using this help guide. Click or tap on white space to scroll the chart up and down, or use the up and down arrows on your keyboard. Click or tap on any letter to mask it. Click or tap on any line label to mask that line. Click again to unmask. <br /><br />
</div> </div>
<div class="accordion"> <div class="accordion">
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
@ -1970,29 +1970,29 @@
} }
return result; return result;
}; };
this.ValidateDuplicateKey = function (element) { this.ValidateDuplicateKey = function (element) {
$('.errorShortKey').remove(); $('.errorShortKey').remove();
var arr = $('.js-shortkey').map(function () { var arr = $('.js-shortkey').map(function () {
return this.value; // $(this).val() return this.value; // $(this).val()
}).get(); }).get();
function countInArray(array, what) { function countInArray(array, what) {
return array.filter(item => item == what).length; return array.filter(item => item == what).length;
} }
var result = false; var result = false;
var currentVal = $(element).val(); var currentVal = $(element).val();
if (currentVal.trim() != "") { if (currentVal.trim() != "") {
if (countInArray(arr, currentVal) > 1) { if (countInArray(arr, currentVal) > 1) {
result = true; result = true;
} }
} }
if (result) { if (result) {
$(element).parent().append('<span class="errorMsg errorShortKey">ShortKey ' + currentVal + ' is duplicate. Please try again.</span>'); $(element).parent().append('<span class="errorMsg errorShortKey">ShortKey ' + currentVal + ' is duplicate. Please try again.</span>');
$(element).val(""); $(element).val("");
} }
else { else {
$(element).parent().find('.errorShortKey').remove(); $(element).parent().find('.errorShortKey').remove();
} }
return result; return result;
}; };
this.SetLocalStorage = function () { this.SetLocalStorage = function () {
localStorage.setItem("Optotype", localOptotype); localStorage.setItem("Optotype", localOptotype);
@ -2531,8 +2531,8 @@
$('#updateSetting').removeClass('disabled-btn'); $('#updateSetting').removeClass('disabled-btn');
} }
}); });
$('.js-shortkey').on('blur', function () { $('.js-shortkey').on('blur', function () {
validateElement.ValidateDuplicateKey(this); validateElement.ValidateDuplicateKey(this);
}); });
this.SelectOptotype(); this.SelectOptotype();
this.ColorPicker(); this.ColorPicker();