'+
'

'+
'

'+
@@ -85,13 +85,13 @@ function prepareTaskStr(item)
function prepareHtml(s)
{
// make URLs clickable
- s = s.replace(/(^|\s|>)(www\.([\w\#$%&~\/.\-\+;:=,\?\[\]@]+?))(,|\.|:|)?(?=\s|"|<|>|\"|<|>|$)/gi, '$1
$2$4');
+ var s = s.replace(/(^|\s|>)(www\.([\w\#$%&~\/.\-\+;:=,\?\[\]@]+?))(,|\.|:|)?(?=\s|"|<|>|\"|<|>|$)/gi, '$1
$2$4');
return s.replace(/(^|\s|>)((?:http|https|ftp):\/\/([\w\#$%&~\/.\-\+;:=,\?\[\]@]+?))(,|\.|:|)?(?=\s|"|<|>|\"|<|>|$)/ig, '$1
$2$4');
}
function preparePrio(prio,id)
{
- cl = v = '';
+ var cl =''; var v = '';
if(prio < 0) { cl = 'prio-neg'; v = '−'+Math.abs(prio); }
else if(prio > 0) { cl = 'prio-pos'; v = '+'+prio; }
else { cl = 'prio-o'; v = '±0'; }
@@ -101,9 +101,9 @@ function preparePrio(prio,id)
function prepareTagsStr(tags)
{
if(!tags || tags == '') return '';
- a = tags.split(',');
+ var a = tags.split(',');
if(!a.length) return '';
- for(i in a) {
+ for(var i in a) {
a[i] = '
'+a[i]+'';
}
return '
'+a.join(', ')+'';
@@ -120,7 +120,7 @@ function submitNewTask(form)
if(form.task.value == '') return false;
var tz = -1 * (new Date()).getTimezoneOffset();
setAjaxErrorTrigger()
- nocache = '&rnd='+Math.random();
+ var nocache = '&rnd='+Math.random();
$.post('ajax.php?newTask'+nocache, { list:curList.id, title: form.task.value, tz:tz, tag:filter.tag }, function(json){
resetAjaxErrorTrigger();
if(!parseInt(json.total)) return;
@@ -159,7 +159,7 @@ function flashError(str, details)
function toggleMsgDetails()
{
- el = $("#msgdetails");
+ var el = $("#msgdetails");
if(!el) return;
if(el.css('display') == 'none') el.show();
else el.hide()
@@ -177,7 +177,7 @@ function deleteTask(id)
return false;
}
setAjaxErrorTrigger()
- nocache = '&rnd='+Math.random();
+ var nocache = '&rnd='+Math.random();
$.getJSON('ajax.php?deleteTask='+id+nocache, function(json){
resetAjaxErrorTrigger();
if(!parseInt(json.total)) return;
@@ -194,7 +194,7 @@ function deleteTask(id)
function completeTask(id,ch)
{
- compl = 0;
+ var compl = 0;
if(ch.checked) compl = 1;
setAjaxErrorTrigger();
$.getJSON('ajax.php?completeTask='+id+'&compl='+compl+nocache, function(json){
@@ -222,7 +222,7 @@ function completeTask(id,ch)
function toggleTaskNote(id)
{
- aArea = '#tasknotearea'+id;
+ var aArea = '#tasknotearea'+id;
if($(aArea).css('display') == 'none')
{
$('#notetext'+id).val(taskList[id].noteText);
@@ -250,7 +250,7 @@ function cancelTaskNote(id)
function saveTaskNote(id)
{
setAjaxErrorTrigger()
- nocache = '&rnd='+Math.random();
+ var nocache = '&rnd='+Math.random();
$.post('ajax.php?editNote='+id+nocache, {note: $('#notetext'+id).val()}, function(json){
resetAjaxErrorTrigger();
if(!parseInt(json.total)) return;
@@ -274,12 +274,12 @@ function editTask(id)
document.edittask.id.value = item.id;
document.edittask.tags.value = item.tags.split(',').join(', ');
document.edittask.duedate.value = item.duedate;
- sel = document.edittask.prio;
- for(i=0; i
').appendTo('body').css('opacity', 0.5).show();
- w = $('#page_taskedit');
+ var w = $('#page_taskedit');
if(!flag.windowTaskEditMoved)
{
var x,y;
@@ -319,7 +319,7 @@ function saveTask(form)
{
if(flag.needAuth && !flag.isLogged && flag.canAllRead) return false;
setAjaxErrorTrigger();
- nocache = '&rnd='+Math.random();
+ var nocache = '&rnd='+Math.random();
$.post('ajax.php?editTask='+form.id.value+nocache, { list:curList.id, title: form.task.value, note:form.note.value, prio:form.prio.value, tags:form.tags.value, duedate:form.duedate.value }, function(json){
resetAjaxErrorTrigger();
if(!parseInt(json.total)) return;
@@ -358,19 +358,19 @@ function orderChanged(event,ui)
{
if(!ui.item[0]) return;
var itemId = ui.item[0].id;
- n = $(this).sortable('toArray');
+ var n = $(this).sortable('toArray');
// remove possible empty id's
- for(i=0; i