Stopped feezing textarea, fixed load from cache

This commit is contained in:
2016-02-07 20:02:02 +08:00
parent d82542a9d1
commit 4d3621d922
2 changed files with 12 additions and 5 deletions
+1 -1
View File
@@ -30,7 +30,7 @@
<div id="numofkeywords"></div>
<div class="form-group">
<label for="input" ><h3>Input:</h3></label>
<textarea id="input" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" rows="8" title="queue" class="form-control" placeholder="I accidentally
<textarea id="input" autocomplete="off" autocorrect="off" style="height: 400px; width: 400px;" autocapitalize="off" spellcheck="false" rows="8" title="queue" class="form-control" placeholder="I accidentally
on purpose">I accidentally
on purpose
dismantled my
+11 -4
View File
@@ -140,12 +140,12 @@ function StartJob() {
doWork = true;
$('#startjob').val('Stop Job').text('Stop shitting').addClass('btn-danger');
$('#input').hide();
// $('#input').hide();
} else {
doWork = false;
$('#startjob').val('Start Job').text('Start shitting').removeClass('btn-danger');
$('#input').show();
// $('#input').show();
FilterAndDisplay();
table.draw();
table.columns.adjust();
@@ -218,10 +218,13 @@ function loadFromDB(){
.getAll()
.onsuccess = function(e) {
if (e.target.result.length){
var retList = [];
table.data(e.target.result);
var data =[];
for (var i = 0; i < e.target.result.length; i++) {
displayResults([e.target.result[i].keyword],e.target.result[i].search,false);
var d = e.target.result[i];
data.push([i,d.keyword,d.Length,null,null,d.search]);
}
table.rows.add(data);
}
table.draw(false);
};
@@ -325,6 +328,7 @@ function QueryKeyword(search) {
retList.push(e.target.result[i].keyword);
}
displayResults(retList,search);
markAsDone(search);
permuteResultsToQueue(retList);
queryLock = false;
}
@@ -350,6 +354,9 @@ function QueryKeyword(search) {
queryLock = false;
},
error: function(){
queryLock = false;
}
});
}