Added "click to edit" to comments tooltip.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8206 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
phamt 2010-11-18 16:44:01 +00:00
parent 426d161ecc
commit 8e8d97a5d2

View File

@ -1895,6 +1895,7 @@ function createCommentsToolTip(comment) {
};
var saveLnk = $('<a>Save</a>').css(lnkStyle).hide();
var cancelLnk = $('<a>Cancel</a>').css(lnkStyle).hide();
var infoSpan = $('<span>Click to edit</span>').css(lnkStyle);
// Save changes onclick
saveLnk.bind('click', function(){
@ -1930,17 +1931,20 @@ function createCommentsToolTip(comment) {
// Hide cancel and save links
$(this).hide();
saveLnk.hide();
infoSpan.show();
});
// Show save link when comment is edited
txtArea.bind('click', function(){
saveLnk.show();
cancelLnk.show();
infoSpan.hide();
});
toolTip.append(txtArea);
toolTip.append(cancelLnk);
toolTip.append(saveLnk);
toolTip.append(infoSpan);
return toolTip;
}