CC-1977: Allow multiple files to be selected and acted upon in the library and playlist

- Fixed issues in "Manage Users" page
- Moved some code to more appropriate place
This commit is contained in:
Yuchen Wang 2012-01-13 14:17:39 -05:00
parent 186aa9e898
commit 258521ffbf
3 changed files with 74 additions and 57 deletions

View file

@ -35,23 +35,23 @@ function removeUserCallback(row_id, nRow){
}
function rowCallback( nRow, aData, iDisplayIndex ){
$(nRow).click(function(){rowClickCallback(aData[0])});
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)});
$(nRow).click(function(){rowClickCallback(aData['id'])});
if( aData['delete'] != "self"){
$('td:eq(4)', nRow).append( '<span class="ui-icon ui-icon-closethick"></span>').children('span').click(function(e){e.stopPropagation(); removeUserCallback(aData['id'], nRow)});
}else{
$('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['type'] == "A" )
{
$('td:eq(3)', nRow).html( 'Admin' );
} else if ( aData[4] == "H" )
} else if ( aData['type'] == "H" )
{
$('td:eq(3)', nRow).html( 'DJ' );
} else if ( aData[4] == "G" )
} else if ( aData['type'] == "G" )
{
$('td:eq(3)', nRow).html( 'Guest' );
} else if ( aData[4] == "P" )
} else if ( aData['type'] == "P" )
{
$('td:eq(3)', nRow).html( 'Program Manager' );
}
@ -75,12 +75,12 @@ $(document).ready(function() {
},
"fnRowCallback": rowCallback,
"aoColumns": [
/* Id */ { "sName": "id", "bSearchable": false, "bVisible": false },
/* user name */ { "sName": "login" },
/* first name */ { "sName": "first_name" },
/* last name */ { "sName": "last_name" },
/* user type */ { "sName": "type", "bSearchable": false },
/* del button */ { "sName": "null as delete", "bSearchable": false, "bSortable": false}
/* Id */ { "sName": "id", "bSearchable": false, "bVisible": false, "mDataProp": "id" },
/* user name */ { "sName": "login", "mDataProp": "login" },
/* first name */ { "sName": "first_name", "mDataProp": "first_name" },
/* last name */ { "sName": "last_name", "mDataProp": "last_name" },
/* user type */ { "sName": "type", "bSearchable": false, "mDataProp": "type" },
/* del button */ { "sName": "null as delete", "bSearchable": false, "bSortable": false, "mDataProp": "delete"}
],
"bJQueryUI": true,
"bAutoWidth": false,