|
|
|
@ -158,7 +158,7 @@ $(".resourcesList").click(function(e) {
|
|
|
|
|
//将当前行改变为白色
|
|
|
|
|
line.children().css("background-color", 'white');
|
|
|
|
|
//当前行恢复编辑状态到链接状态
|
|
|
|
|
if(ele.nodeName != 'INPUT') {
|
|
|
|
|
if(ele && ele.nodeName != 'INPUT') {
|
|
|
|
|
restore();
|
|
|
|
|
}
|
|
|
|
|
line = null;
|
|
|
|
@ -224,9 +224,10 @@ $(".resourcesList").click(function(e) {
|
|
|
|
|
'<%=rename_resource_user_path(@user) %>',
|
|
|
|
|
$("#res_name_form").serialize(),
|
|
|
|
|
function (data){
|
|
|
|
|
if(data =='sucess'){//修改成功,那么将链接恢复,并且将链接的显示内容改变。链接可以不变
|
|
|
|
|
if(data != 'fail'){//修改成功,那么将链接恢复,并且将链接的显示内容改变。链接可以不变
|
|
|
|
|
last_line.children().first().html(res_link);
|
|
|
|
|
last_line.children().first().children().attr('title',name);
|
|
|
|
|
last_line.children().first().children().attr('href',data);
|
|
|
|
|
last_line.children().first().children().html(name.length > 17? name.substring(0,17)+'...' : name);
|
|
|
|
|
}else{
|
|
|
|
|
last_line.children().first().html(res_link);
|
|
|
|
|