1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-10 03:11:07 +00:00

Revert "[select2] upgraded it to v4.0"

This reverts commit 62c3519e85.
This commit is contained in:
lian
2018-08-03 16:08:29 +08:00
parent 20cb4ce86f
commit ee8e4135ea
35 changed files with 4567 additions and 428 deletions

View File

@@ -58,18 +58,20 @@ define([
_this = this;
$form.modal();
$('#simplemodal-container').css({'width':'auto', 'height':'auto'});
$('#simplemodal-container').css({'height':'auto'});
$('[name="group_owner"]', $form).select2($.extend(
Common.contactInputOptionsForSelect2(), {
width: '100%',
maximumSelectionLength: 1,
placeholder: gettext("Search user or enter email and press Enter")
width: '268px',
containerCss: {'margin-bottom': '5px'},
maximumSelectionSize: 1,
placeholder: gettext("Search user or enter email and press Enter"), // to override 'placeholder' returned by `Common.conta...`
formatSelectionTooBig: gettext("You cannot select any more choices")
}));
$form.on('submit', function() {
var group_name = $.trim($('[name="group_name"]', $form).val());
var group_owner = $('[name="group_owner"]', $form).val();
var group_owner = $.trim($('[name="group_owner"]', $form).val());
var $error = $('.error', $form);
var $submitBtn = $('[type="submit"]', $form);
@@ -81,10 +83,7 @@ define([
$error.hide();
Common.disableButton($submitBtn);
groups.create({
'group_name': group_name,
'group_owner': group_owner[0]
}, {
groups.create({'group_name': group_name, 'group_owner': group_owner}, {
prepend: true,
wait: true,
success: function() {