mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
tags autocomplete moved to db storage
This commit is contained in:
parent
82d6d660bb
commit
07271cf645
2 changed files with 8 additions and 5 deletions
|
|
@ -332,11 +332,9 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
source: function(request, response) {
|
||||
var taskId = document.getElementById('taskedit_form').id.value;
|
||||
var listId = taskList[taskId].listId;
|
||||
jQuery.get("ajax.php?suggestTags&list="+listId, {
|
||||
q: ac_extractLast(request.term)
|
||||
}, function(data) {
|
||||
response(data);
|
||||
});
|
||||
_mtt.db.request('suggestTags', {list:listId, q:ac_extractLast(request.term)}, function(json){
|
||||
response(json);
|
||||
})
|
||||
},/*
|
||||
search: function() {
|
||||
// custom minLength
|
||||
|
|
|
|||
|
|
@ -114,6 +114,11 @@ mytinytodoStorageAjax.prototype =
|
|||
}
|
||||
$.post(this.mtt.mttUrl+'ajax.php?changeOrder', { order:order }, callback, 'json');
|
||||
},
|
||||
|
||||
suggestTags: function(params, callback)
|
||||
{
|
||||
$.getJSON(this.mtt.mttUrl+'ajax.php?suggestTags', {list:params.list, q:params.q, rnd:Math.random()}, callback);
|
||||
},
|
||||
|
||||
tagCloud: function(params, callback)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue