* img.mtt-toggle converted to div.mtt-toggle

This commit is contained in:
Max Pozdeev 2009-09-25 16:42:50 +04:00
parent d1d9585f03
commit 5340ddfeab
2 changed files with 11 additions and 21 deletions

View file

@ -17,8 +17,7 @@ var tz = 0;
var img = {
'note': ['images/page_white_text_add_bw.png','images/page_white_text_add.png'],
'edit': ['images/page_white_edit_bw.png','images/page_white_edit.png'],
'del': ['images/page_cross_bw.png','images/page_cross.png'],
'toggle': ['images/toggle_plus.gif','images/toggle_minus.gif']
'del': ['images/page_cross_bw.png','images/page_cross.png']
};
var taskCnt = { total:0, past: 0, today:0, soon:0 };
var tmp = {};
@ -68,7 +67,7 @@ function prepareTaskStr(item)
'<a href="#" onClick="return toggleTaskNote('+id+')"><img src="'+img.note[0]+'" onMouseOver="this.src=img.note[1]" onMouseOut="this.src=img.note[0]" title="'+lang.actionNote+'"></a>'+
'<a href="#" onClick="return editTask('+id+')"><img src="'+img.edit[0]+'" onMouseOver="this.src=img.edit[1]" onMouseOut="this.src=img.edit[0]" title="'+lang.actionEdit+'"></a>'+
'<a href="#" onClick="return deleteTask('+id+')"><img src="'+img.del[0]+'" onMouseOver="this.src=img.del[1]" onMouseOut="this.src=img.del[0]" title="'+lang.actionDelete+'"></a></div>'+
'<div class="task-left"><img src="'+img.toggle[0]+'" class="mtt-toggle '+(item.note==''?'invisible':'')+'" onClick="toggleNote('+id+')">'+
'<div class="task-left"><div class="mtt-toggle '+(item.note==''?'invisible':'')+'" onClick="toggleNote('+id+')"></div>'+
'<input type="checkbox" '+(readOnly?'disabled':'')+' onClick="completeTask('+id+',this)" '+(item.compl?'checked':'')+'></div>'+
'<div class="task-middle">'+prepareDuedate(item.duedate, item.dueClass, item.dueStr)+
'<span class="nobr"><span class="task-through">'+preparePrio(prio,id)+'<span class="task-title">'+prepareHtml(item.title)+'</span>'+
@ -229,7 +228,7 @@ function toggleTaskNote(id)
$('#taskrow_'+id+'>div>div.task-note-block').removeClass('hidden');
$(aArea).css('display', 'block');
$('#tasknote'+id).css('display', 'none');
if(taskList[id].note != '') $('#taskrow_'+id+'>div>.mtt-toggle').attr('src', img.toggle[1]);
if(taskList[id].note != '') $('#taskrow_'+id+' .mtt-toggle').addClass('mtt-toggle-expanded');
$('#notetext'+id).focus();
} else {
cancelTaskNote(id)
@ -258,8 +257,8 @@ function saveTaskNote(id)
taskList[id].note = item.note;
taskList[id].noteText = item.noteText;
$('#tasknote'+item.id+'>span').html(prepareHtml(item.note));
if(item.note == '') $('#taskrow_'+id+'>div>.mtt-toggle').attr('src', img.toggle[0]).addClass('invisible');
else $('#taskrow_'+id+'>div>.mtt-toggle').attr('src', img.toggle[1]).removeClass('invisible');
if(item.note == '') $('#taskrow_'+id+' .mtt-toggle').removeClass('mtt-toggle-expanded').addClass('invisible');
else $('#taskrow_'+id+' .mtt-toggle').addClass('mtt-toggle-expanded').removeClass('invisible');
cancelTaskNote(item.id);
}, 'json');
return false;
@ -903,8 +902,8 @@ function btnMenuClose(e)
function toggleNote(id)
{
var o = $('#taskrow_'+id+'>div>div.task-note-block');
if(o.is('.hidden')) $('#taskrow_'+id+'>div>.mtt-toggle').attr('src', img.toggle[1]);
else $('#taskrow_'+id+'>div>.mtt-toggle').attr('src', img.toggle[0]);
if(o.is('.hidden')) $('#taskrow_'+id+' .mtt-toggle').addClass('mtt-toggle-expanded');
else $('#taskrow_'+id+' .mtt-toggle').removeClass('mtt-toggle-expanded');
o.toggleClass('hidden');
}
@ -914,11 +913,11 @@ function toggleAllNotes(show)
{
if(taskList[id].note == '') continue;
if(show) {
$('#taskrow_'+id+'>div>.mtt-toggle').attr('src', img.toggle[1]);
$('#taskrow_'+id+' .mtt-toggle').addClass('mtt-toggle-expanded');
$('#taskrow_'+id+'>div>div.task-note-block').removeClass('hidden');
}
else {
$('#taskrow_'+id+'>div>.mtt-toggle').attr('src', img.toggle[0]);
$('#taskrow_'+id+' .mtt-toggle').removeClass('mtt-toggle-expanded');
$('#taskrow_'+id+'>div>div.task-note-block').addClass('hidden');
}
}

View file

@ -23,16 +23,6 @@ a { color:#0000ff; }
#authform div { padding:2px 0px; }
#authform div.h { font-weight:bold; }
/*
.tabs ul { list-style: none; padding:0; margin:0; }
.tabs ul li { margin:0; font-size: 9pt; font-weight:bold; float: left; width:90px; text-align:center; margin-right: 6px; }
.tabs ul a { margin:0px; text-decoration: none; color:#444444; display: block; height:24px; width: 100%; padding-top: 4px; outline:none; }
.tabs ul li.ui-tabs-selected { background-color: #ededed; }
.tabs ul li.ui-state-hover a { color: #888888; }
.ui-tabs .ui-tabs-hide { display: none; }
.tabs ul li.ui-state-disabled a { color: #cccccc; }
*/
.mtt-tabs ul { list-style: none; padding:0; margin:0; }
.mtt-tabs ul li { margin:0; font-size: 9pt; font-weight:bold; float: left; width:90px; text-align:center; margin-right: 6px; }
.mtt-tabs ul a { margin:0px; text-decoration: none; color:#444444; display: block; height:24px; width: 100%; padding-top: 4px; outline:none; }
@ -60,7 +50,8 @@ a { color:#0000ff; }
.mtt-notes-showhide { font-size:8pt; font-weight:normal; margin-left:5px; }
.task-left { float:left; }
.task-left .mtt-toggle { cursor:pointer; }
.task-left .mtt-toggle { margin-top:2px; cursor:pointer; width:15px; height:15px; float:left; background:url(images/toggle_plus.gif) left top no-repeat; }
.task-left .mtt-toggle.mtt-toggle-expanded { background-image:url(images/toggle_minus.gif); }
.task-middle { margin-left:40px; margin-right:65px; }
#tasklist { list-style-type: none; margin: 0; padding: 0;}
#tasklist li { padding:6px 2px 6px 6px; border-bottom:1px solid #DEDEDE; min-height:18px; margin-bottom:1px; background-color:#fff; }