mirror of
https://github.com/haiwen/seahub.git
synced 2025-04-27 19:05:16 +00:00
[jquery] upgraded it from v3.3.1 to the latest v3.5.1 (#4593)
This commit is contained in:
parent
ce875720c8
commit
3900f4d749
@ -47,7 +47,7 @@ $(document).on('click', function(e) {
|
||||
|
||||
// search: disable submit when input nothing
|
||||
$('.search-form').on('submit', function() {
|
||||
if (!$.trim($(this).find('.search-input').val())) {
|
||||
if (!$(this).find('.search-input').val().trim()) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@ -402,7 +402,7 @@ function userInputOPtionsForSelect2(user_search_url) {
|
||||
|
||||
createSearchChoice: function(term) {
|
||||
return {
|
||||
'id': $.trim(term)
|
||||
'id': term.trim()
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
{% block extra_script %}
|
||||
<script type="text/javascript">
|
||||
$('form').on('submit', function() {
|
||||
if (!$.trim($('[name="password"]', $(this)).val())) {
|
||||
if (!$('[name="password"]', $(this)).val().trim()) {
|
||||
$('.error').html("{% trans "It is required." %}").show();
|
||||
return false;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
{% block extra_script %}
|
||||
<script type="text/javascript">
|
||||
$('#get-code').on('click', function() {
|
||||
var email = $.trim($('input[name="email"]').val());
|
||||
var email = $('input[name="email"]').val().trim();
|
||||
if (!email) {
|
||||
return false;
|
||||
}
|
||||
@ -70,8 +70,8 @@ $('#get-code').on('click', function() {
|
||||
});
|
||||
|
||||
$('#link-audit-form').on('submit', function() {
|
||||
var email = $.trim($('[name="email"]').val());
|
||||
var code = $.trim($('[name="code"]').val());
|
||||
var email = $('[name="email"]').val().trim();
|
||||
var code = $('[name="code"]').val().trim();
|
||||
if (!email || !code) {
|
||||
return false;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
<script type="text/javascript">
|
||||
$('#repo-decrypt-form').on('submit', function() {
|
||||
var $form = $(this),
|
||||
password = $.trim($('[name="password"]', $form).val()),
|
||||
password = $('[name="password"]', $form).val().trim(),
|
||||
$error = $('.error', $form);
|
||||
|
||||
if (!password) {
|
||||
|
@ -1,10 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block nav_feedback_class %}class="cur"{% endblock %}
|
||||
|
||||
{% block right_panel %}
|
||||
<script type="text/javascript" src="http://open.denglu.cc/connect/commentcode?appid=59289denyu9jLcO03et5bMAo73jwAA"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
{% endblock %}
|
@ -149,11 +149,11 @@ $('#refresh-captcha').on('click', function() {
|
||||
});
|
||||
|
||||
$('#login-form').on('submit', function(){
|
||||
if (!$.trim($('input[name="login"]').val())) {
|
||||
if (!$('input[name="login"]').val().trim()) {
|
||||
$('.error').removeClass('hide').html("{% trans "Email or username cannot be blank" %}");
|
||||
return false;
|
||||
}
|
||||
if (!$.trim($('input[name="password"]').val())) {
|
||||
if (!$('input[name="password"]').val().trim()) {
|
||||
$('.error').removeClass('hide').html("{% trans "Password cannot be blank" %}");
|
||||
return false;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ $("#id_new_password1")
|
||||
})
|
||||
.on('keyup', function() {
|
||||
var pwd = $(this).val();
|
||||
if ($.trim(pwd)) {
|
||||
if (pwd.trim()) {
|
||||
var level = getStrengthLevel(pwd);
|
||||
showStrength(level);
|
||||
} else {
|
||||
@ -54,9 +54,9 @@ $("#id_new_password1")
|
||||
{% endif %}
|
||||
|
||||
$('form').on('submit', function(){
|
||||
var old_pwd = $.trim($('input[name="old_password"]').val()),
|
||||
pwd1 = $.trim($('input[name="new_password1"]').val()),
|
||||
pwd2 = $.trim($('input[name="new_password2"]').val());
|
||||
var old_pwd = $('input[name="old_password"]').val().trim(),
|
||||
pwd1 = $('input[name="new_password1"]').val().trim(),
|
||||
pwd2 = $('input[name="new_password2"]').val().trim();
|
||||
|
||||
if (!old_pwd) {
|
||||
$('.error').html("{% trans "Current password cannot be blank" %}").removeClass('hide');
|
||||
|
@ -47,7 +47,7 @@ $("#id_new_password1")
|
||||
})
|
||||
.on('keyup', function() {
|
||||
var pwd = $(this).val();
|
||||
if ($.trim(pwd)) {
|
||||
if (pwd.trim()) {
|
||||
var level = getStrengthLevel(pwd);
|
||||
showStrength(level);
|
||||
} else {
|
||||
@ -57,8 +57,8 @@ $("#id_new_password1")
|
||||
{% endif %}
|
||||
|
||||
$('form').on('submit', function(){
|
||||
var pwd1 = $.trim($('input[name="new_password1"]').val()),
|
||||
pwd2 = $.trim($('input[name="new_password2"]').val());
|
||||
var pwd1 = $('input[name="new_password1"]').val().trim(),
|
||||
pwd2 = $('input[name="new_password2"]').val().trim();
|
||||
|
||||
if (!pwd1) {
|
||||
$('.error').html("{% trans "Password cannot be blank" %}").removeClass('hide');
|
||||
|
@ -69,7 +69,7 @@ $("#id_password1")
|
||||
})
|
||||
.on('keyup', function() {
|
||||
var pwd = $(this).val();
|
||||
if ($.trim(pwd)) {
|
||||
if (pwd.trim()) {
|
||||
var level = getStrengthLevel(pwd);
|
||||
showStrength(level);
|
||||
} else {
|
||||
@ -79,9 +79,9 @@ $("#id_password1")
|
||||
{% endif %}
|
||||
|
||||
$('#signup-form').on('submit', function(){
|
||||
var email = $.trim($('input[name="email"]').val()),
|
||||
pwd1 = $.trim($('input[name="password1"]').val()),
|
||||
pwd2 = $.trim($('input[name="password2"]').val());
|
||||
var email = $('input[name="email"]').val().trim(),
|
||||
pwd1 = $('input[name="password1"]').val().trim(),
|
||||
pwd2 = $('input[name="password2"]').val().trim();
|
||||
|
||||
if (!email) {
|
||||
$('.error').html("{% trans "Email cannot be blank" %}").removeClass('hide');
|
||||
|
@ -28,7 +28,7 @@ $('#share-passwd-form').on('submit', function() {
|
||||
var form = $(this),
|
||||
pwd = $('[name="password"]', form).val(),
|
||||
err = $('.error',form);
|
||||
if (!$.trim(pwd)) {
|
||||
if (!pwd.trim()) {
|
||||
err.html("{% trans "Please enter the password." %}").removeClass('hide');
|
||||
return false;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// search-form: top-search-form, advanced-search-form, search-form in search result page
|
||||
$('.search-form').on('submit', function() {
|
||||
if (!$.trim($(this).find('.search-input').val())) {
|
||||
if (!$(this).find('.search-input').val().trim()) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@ -23,7 +23,7 @@ $('.search-filetypes .item:last-child').on('click', function() {
|
||||
$('#advanced-search-form').on('submit', function() {
|
||||
if ($('#custom-search-ftypes').attr('checked') &&
|
||||
$('.custom-ftype-options .checkbox-checked').length == 0 &&
|
||||
!$.trim($('.custom-ftype-options .fileext-input').val())) {
|
||||
$('.custom-ftype-options .fileext-input').val().trim()) {
|
||||
$(this).find('.error').removeClass('hide');
|
||||
return false;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
<script type="text/javascript">
|
||||
$('.new-narrow-panel input[name="password"]').trigger('focus');
|
||||
$('input[type="submit"]').on('click', function(){
|
||||
if (!$.trim($('input[name="password"]').val())) {
|
||||
if (!$('input[name="password"]').val().trim()) {
|
||||
$('.error').removeClass('hide').html("{% trans "Password cannot be blank" %}");
|
||||
return false;
|
||||
}
|
||||
|
4
static/scripts/lib/jquery.min.js
vendored
4
static/scripts/lib/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user