cc-2126: user shouldnt be able to delete himself

-changed it so that the "x" is still visible, but when clicking,
an error message shows. Did this because the columns were resizing
when the x wasnt visible. Also the empty column looked weird with only
one user.
This commit is contained in:
mkonecny 2011-05-05 23:41:48 -04:00
parent 2a5df8bed9
commit 359c4a4eb8
2 changed files with 98 additions and 98 deletions

View File

@ -39,7 +39,7 @@ function rowCallback( nRow, aData, iDisplayIndex ){
if( aData[5] != "self"){ if( aData[5] != "self"){
$('td:eq(4)', nRow).append( '<span class="ui-icon ui-icon-closethick"></span>').children('span').click(function(e){e.stopPropagation(); removeUserCallback(aData[0], nRow)}); $('td:eq(4)', nRow).append( '<span class="ui-icon ui-icon-closethick"></span>').children('span').click(function(e){e.stopPropagation(); removeUserCallback(aData[0], nRow)});
}else{ }else{
$('td:eq(4)', nRow).empty(); $('td:eq(4)', nRow).empty().append( '<span class="ui-icon ui-icon-closethick"></span>').children('span').click(function(e){e.stopPropagation(); alert("Can't delete yourself!")});
} }
if ( aData[4] == "A" ) if ( aData[4] == "A" )