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">
<!--[if lt IE 10]>
@ -1076,7 +1076,7 @@
</svg>
</a>
<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 class="accordion">
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
@ -1970,29 +1970,29 @@
}
return result;
};
this.ValidateDuplicateKey = function (element) {
$('.errorShortKey').remove();
var arr = $('.js-shortkey').map(function () {
return this.value; // $(this).val()
}).get();
function countInArray(array, what) {
return array.filter(item => item == what).length;
}
var result = false;
var currentVal = $(element).val();
if (currentVal.trim() != "") {
if (countInArray(arr, currentVal) > 1) {
result = true;
}
}
if (result) {
this.ValidateDuplicateKey = function (element) {
$('.errorShortKey').remove();
var arr = $('.js-shortkey').map(function () {
return this.value; // $(this).val()
}).get();
function countInArray(array, what) {
return array.filter(item => item == what).length;
}
var result = false;
var currentVal = $(element).val();
if (currentVal.trim() != "") {
if (countInArray(arr, currentVal) > 1) {
result = true;
}
}
if (result) {
$(element).parent().append('<span class="errorMsg errorShortKey">ShortKey ' + currentVal + ' is duplicate. Please try again.</span>');
$(element).val("");
}
else {
$(element).parent().find('.errorShortKey').remove();
else {
$(element).parent().find('.errorShortKey').remove();
}
return result;
return result;
};
this.SetLocalStorage = function () {
localStorage.setItem("Optotype", localOptotype);
@ -2531,8 +2531,8 @@
$('#updateSetting').removeClass('disabled-btn');
}
});
$('.js-shortkey').on('blur', function () {
validateElement.ValidateDuplicateKey(this);
$('.js-shortkey').on('blur', function () {
validateElement.ValidateDuplicateKey(this);
});
this.SelectOptotype();
this.ColorPicker();