1

Deleting code to forget keywords

This commit is contained in:
Alex Yatskov 2014-11-08 11:56:17 +09:00
parent 74b9331044
commit 3620d6a0a1
2 changed files with 0 additions and 57 deletions

View File

@ -83,28 +83,6 @@
</div> </div>
</div> </div>
<!-- forget keyword dialog -->
<div class="modal fade" id="forgetDialog" tabindex="-1">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header"><big>Forget Keyword</big></div>
<div class="modal-body">
<div class="form-group">
<label for="keywordToForget">Keyword to forget</label>
<select id="keywordToForget" class="form-control"></select>
</div>
<div class="alert alert-danger" id="forgetError" style="display: none;">Unable to forget keyword</div>
</div>
<div class="modal-footer">
<div class="btn-group">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger" id="forgetKeyword" disabled="disabled">Forget</button>
</div>
</div>
</div>
</div>
</div>
<!-- query output --> <!-- query output -->
<div> <div>
<!-- semantic tweaker --> <!-- semantic tweaker -->
@ -113,7 +91,6 @@
<big>Semantic tweaks to: <span id="query"></span></big> <big>Semantic tweaks to: <span id="query"></span></big>
<div class="btn-group pull-right"> <div class="btn-group pull-right">
<button class="btn btn-xs btn-success" data-toggle="modal" data-target="#learnDialog">Learn</button> <button class="btn btn-xs btn-success" data-toggle="modal" data-target="#learnDialog">Learn</button>
<button class="btn btn-xs btn-danger" data-toggle="modal" data-target="#forgetDialog">Forget</button>
<button class="btn btn-xs btn-default" data-toggle="modal" data-target="#optionsDialog">Options</button> <button class="btn btn-xs btn-default" data-toggle="modal" data-target="#optionsDialog">Options</button>
</div> </div>
</div> </div>

View File

@ -66,20 +66,6 @@
} }
}); });
$('#forgetKeyword').click(onForget);
$('#forgetDialog').on('show.bs.modal', function() {
$('#forgetError').hide();
$.getJSON('/get_keywords', function(keywords) {
$('#keywordToForget').empty();
for (var i = 0, count = keywords.length; i < count; ++i) {
$('#keywordToForget').append($('<option></option>', {
value: keywords[i],
text: keywords[i]
}));
}
});
});
$('#learnKeyword').click(onLearn); $('#learnKeyword').click(onLearn);
$('#learnDialog').on('show.bs.modal', function() { $('#learnDialog').on('show.bs.modal', function() {
$('#learnError').hide(); $('#learnError').hide();
@ -169,26 +155,6 @@
}); });
} }
function onForget() {
$('#forgetKeyword').prop('disabled', true);
$('#forgetError').slideUp(function() {
var query = {
keyword: $('#keywordToForget').val()
};
$.getJSON('/remove_keyword', query, function(results) {
if (results.success) {
$('#forgetDialog').modal('hide');
}
else {
$('#forgetError').slideDown(function() {
$('#forgetKeyword').prop('disabled', false);
});
}
});
});
}
function onSelectSnapshot() { function onSelectSnapshot() {
var index = $('#history').slider('getValue'); var index = $('#history').slider('getValue');
outputSnapshot(ctx.log[index]); outputSnapshot(ctx.log[index]);