Changing reset behavior
This commit is contained in:
parent
1d49c6ac30
commit
1619616c52
@ -21,7 +21,6 @@
|
|||||||
<big>Visualizer</big>
|
<big>Visualizer</big>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<button class="btn btn-xs btn-danger" id="forget">Forget</button>
|
<button class="btn btn-xs btn-danger" id="forget">Forget</button>
|
||||||
<button class="btn btn-xs btn-warning" style="display: none;" id="reset">Reset</button>
|
|
||||||
<button class="btn btn-xs btn-default" id="learn">Learn</button>
|
<button class="btn btn-xs btn-default" id="learn">Learn</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -65,10 +65,16 @@
|
|||||||
$('#historyIndex').on('slideStop', onSelectSnapshot);
|
$('#historyIndex').on('slideStop', onSelectSnapshot);
|
||||||
$('#learn').click(onLearn);
|
$('#learn').click(onLearn);
|
||||||
$('#forget').click(onForget);
|
$('#forget').click(onForget);
|
||||||
$('#reset').click(onSearch);
|
$('#customized').click(onReset);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onReset() {
|
||||||
|
if (confirm('Reset customizations?')) {
|
||||||
|
onSearch();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function onLearn() {
|
function onLearn() {
|
||||||
var keyword = prompt('Input keyword to learn as (alphanumeric, no spaces)');
|
var keyword = prompt('Input keyword to learn as (alphanumeric, no spaces)');
|
||||||
if (keyword === null) {
|
if (keyword === null) {
|
||||||
@ -181,12 +187,10 @@
|
|||||||
function setCustomized(customized) {
|
function setCustomized(customized) {
|
||||||
if (customized) {
|
if (customized) {
|
||||||
$('#customized').show();
|
$('#customized').show();
|
||||||
$('#reset').show();
|
|
||||||
$('#forget').hide();
|
$('#forget').hide();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('#customized').hide();
|
$('#customized').hide();
|
||||||
$('#reset').hide();
|
|
||||||
$('#forget').show();
|
$('#forget').show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user