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