1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

[contact] bugfix, improvement

This commit is contained in:
llj
2015-06-13 18:42:13 +08:00
parent 5442eac171
commit dbbfd393bb
4 changed files with 8 additions and 17 deletions

View File

@@ -35,7 +35,6 @@ define([
Common.prepareApiCsrf();
Common.initAccountPopup();
Common.initNoticePopup();
Common.getContacts();
this.dirView = new DirView();

View File

@@ -468,16 +468,6 @@ define([
});
},
// get contacts for 'lib/dir/file share'
getContacts: function () {
this.ajaxGet({
'get_url': this.getUrl({name: 'get_user_contacts'}),
'after_op_success': function (data) {
app.pageOptions.contacts = data["contacts"];
}
});
},
closeTopNoticeBar: function () {
if (!app.pageOptions.cur_note) {
return false;
@@ -506,14 +496,16 @@ define([
contactInputOptionsForSelect2: function() {
var _this = this;
return {
placeholder: gettext("Enter emails or select contacts"),
placeholder: gettext("Search users"),
// with 'tags', the user can directly enter, not just select
// tags need `<input type="hidden" />`, not `<select>`
tags: true,
tags: [],
tokenSeparators: [",", " "],
minimumInputLength: 1, // input at least 1 character
ajax: {
url: _this.getUrl({name: 'search_user'}),
dataType: 'json',