Skip to content

Commit

Permalink
短消息,回复时,没有用户名输入的自动提示功能,需要将相应的代码屏蔽掉,否则报js错误
Browse files Browse the repository at this point in the history
短消息,回复时,没有用户名输入的自动提示功能,需要将相应的代码屏蔽掉,否则报js错误
并且影响后续btn初始化的js执行,以及离开页面的警告提示也会失效
  • Loading branch information
apei830 committed Nov 4, 2013
1 parent 58eb2a6 commit 1ac98a5
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,16 @@
});
var $username = $("#receiverId_msg");
$.app.initAutocomplete({
input : $username,
source : "${ctx}/admin/sys/user/ajax/autocomplete",
select : function(event, ui) {
$username.val(ui.item.label);
return false;
}
});
if($username[0]){
$.app.initAutocomplete({
input : $username,
source : "${ctx}/admin/sys/user/ajax/autocomplete",
select : function(event, ui) {
$username.val(ui.item.label);
return false;
}
});
}
$(window).on('beforeunload',function() {
if($username.val() || $("#title").val() || editor.html()) {
Expand All @@ -187,4 +189,4 @@
});
});
</script>
</script>

0 comments on commit 1ac98a5

Please sign in to comment.