|
|
|
@ -148,6 +148,10 @@
|
|
|
|
|
$("#resources_list").mousedown(function(e) {
|
|
|
|
|
//如果是右键的话
|
|
|
|
|
if (3 == e.which) {
|
|
|
|
|
if( $("#res_name").length != 0 || $("#ajax-indicator").is(":hidden") == false){ //其他ajax在执行的时候阻止操作
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|
document.oncontextmenu = function() {return false;}
|
|
|
|
|
pageX = e.clientX;
|
|
|
|
|
pageY = e.clientY;
|
|
|
|
@ -195,6 +199,9 @@
|
|
|
|
|
//隐藏右键菜单
|
|
|
|
|
//e.preventDefault();
|
|
|
|
|
$("#contextMenu").hide();
|
|
|
|
|
if( $("#ajax-indicator").is(":hidden") == false && $("#res_name").length != 0 ){ //其他ajax在执行的时候或者res_name仍然存在阻止操作
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|
document.oncontextmenu = function() {return true;}
|
|
|
|
|
//如果当前行为空,那么要将当前行的拿到
|
|
|
|
|
var ele;
|
|
|
|
@ -363,7 +370,8 @@
|
|
|
|
|
res_link = line.children().eq(1).html();
|
|
|
|
|
line.children().eq(1).html(
|
|
|
|
|
'<input name="res_name" id="res_name" ' +
|
|
|
|
|
'style="height: 2em;line-height: 2em;overflow: hidden;" onblur="restore();" onkeypress="if(event.keyCode==13){event.preventDefault();this.blur();}" ' +
|
|
|
|
|
'style="height: 2em;line-height: 2em;overflow: hidden;" onblur="restore();" ' +
|
|
|
|
|
' onkeypress="if(event.keyCode==13){event.preventDefault();this.blur();}" ' +
|
|
|
|
|
'value="'+res_name+
|
|
|
|
|
'"/> <input type="hidden" id ="res_id" name="res_id" value="'+id+'"/>');
|
|
|
|
|
$("#res_name").focus();
|
|
|
|
@ -401,7 +409,7 @@
|
|
|
|
|
type:'get',
|
|
|
|
|
success:function (data)
|
|
|
|
|
{
|
|
|
|
|
if (data != 'fail') {//修改成功,那么将链接恢复,并且将链接的显示内容改变。链接可以不变
|
|
|
|
|
if (data != 'fail' && name != undefined && name != 'undefined') {//修改成功,那么将链接恢复,并且将链接的显示内容改变。链接可以不变
|
|
|
|
|
last_line.children().eq(1).html(res_link);
|
|
|
|
|
last_line.children().eq(1).children().attr('title', name);
|
|
|
|
|
last_line.children().eq(1).children().attr('href', data);
|
|
|
|
|