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

[select2] upgraded it to v4.0

This commit is contained in:
llj
2018-07-26 18:28:17 +08:00
parent d9fbe44381
commit 62c3519e85
35 changed files with 428 additions and 4568 deletions

View File

@@ -160,17 +160,15 @@ define([
$('[name="email"]', $form).select2($.extend(
Common.contactInputOptionsForSelect2(), {
width: '275px',
containerCss: {'margin-bottom': '5px'},
placeholder: gettext("Search users or enter emails and press Enter")
width: '280px'
}));
$form.submit(function() {
var emails = $.trim($('[name="email"]', $form).val());
var emails = $('[name="email"]', $form).val();
var $error = $('.error', $form);
var $submitBtn = $('[type="submit"]', $form);
if (!emails) {
if (!emails.length) {
$error.html(gettext("It is required.")).show();
return false;
}
@@ -185,7 +183,7 @@ define([
}),
type: 'POST',
dataType: 'json',
data: {'email': emails.split(',')},
data: {'email': emails},
traditional: true,
beforeSend: Common.prepareCSRFToken,
success: function(data) {