mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-31 14:42:10 +00:00
[jquery] upgraded it from v3.3.1 to the latest v3.5.1 (#4593)
This commit is contained in:
@@ -47,7 +47,7 @@ $(document).on('click', function(e) {
|
|||||||
|
|
||||||
// search: disable submit when input nothing
|
// search: disable submit when input nothing
|
||||||
$('.search-form').on('submit', function() {
|
$('.search-form').on('submit', function() {
|
||||||
if (!$.trim($(this).find('.search-input').val())) {
|
if (!$(this).find('.search-input').val().trim()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -402,7 +402,7 @@ function userInputOPtionsForSelect2(user_search_url) {
|
|||||||
|
|
||||||
createSearchChoice: function(term) {
|
createSearchChoice: function(term) {
|
||||||
return {
|
return {
|
||||||
'id': $.trim(term)
|
'id': term.trim()
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
{% block extra_script %}
|
{% block extra_script %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('form').on('submit', function() {
|
$('form').on('submit', function() {
|
||||||
if (!$.trim($('[name="password"]', $(this)).val())) {
|
if (!$('[name="password"]', $(this)).val().trim()) {
|
||||||
$('.error').html("{% trans "It is required." %}").show();
|
$('.error').html("{% trans "It is required." %}").show();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
{% block extra_script %}
|
{% block extra_script %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('#get-code').on('click', function() {
|
$('#get-code').on('click', function() {
|
||||||
var email = $.trim($('input[name="email"]').val());
|
var email = $('input[name="email"]').val().trim();
|
||||||
if (!email) {
|
if (!email) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -70,8 +70,8 @@ $('#get-code').on('click', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('#link-audit-form').on('submit', function() {
|
$('#link-audit-form').on('submit', function() {
|
||||||
var email = $.trim($('[name="email"]').val());
|
var email = $('[name="email"]').val().trim();
|
||||||
var code = $.trim($('[name="code"]').val());
|
var code = $('[name="code"]').val().trim();
|
||||||
if (!email || !code) {
|
if (!email || !code) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('#repo-decrypt-form').on('submit', function() {
|
$('#repo-decrypt-form').on('submit', function() {
|
||||||
var $form = $(this),
|
var $form = $(this),
|
||||||
password = $.trim($('[name="password"]', $form).val()),
|
password = $('[name="password"]', $form).val().trim(),
|
||||||
$error = $('.error', $form);
|
$error = $('.error', $form);
|
||||||
|
|
||||||
if (!password) {
|
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(){
|
$('#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" %}");
|
$('.error').removeClass('hide').html("{% trans "Email or username cannot be blank" %}");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!$.trim($('input[name="password"]').val())) {
|
if (!$('input[name="password"]').val().trim()) {
|
||||||
$('.error').removeClass('hide').html("{% trans "Password cannot be blank" %}");
|
$('.error').removeClass('hide').html("{% trans "Password cannot be blank" %}");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -44,7 +44,7 @@ $("#id_new_password1")
|
|||||||
})
|
})
|
||||||
.on('keyup', function() {
|
.on('keyup', function() {
|
||||||
var pwd = $(this).val();
|
var pwd = $(this).val();
|
||||||
if ($.trim(pwd)) {
|
if (pwd.trim()) {
|
||||||
var level = getStrengthLevel(pwd);
|
var level = getStrengthLevel(pwd);
|
||||||
showStrength(level);
|
showStrength(level);
|
||||||
} else {
|
} else {
|
||||||
@@ -54,9 +54,9 @@ $("#id_new_password1")
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
$('form').on('submit', function(){
|
$('form').on('submit', function(){
|
||||||
var old_pwd = $.trim($('input[name="old_password"]').val()),
|
var old_pwd = $('input[name="old_password"]').val().trim(),
|
||||||
pwd1 = $.trim($('input[name="new_password1"]').val()),
|
pwd1 = $('input[name="new_password1"]').val().trim(),
|
||||||
pwd2 = $.trim($('input[name="new_password2"]').val());
|
pwd2 = $('input[name="new_password2"]').val().trim();
|
||||||
|
|
||||||
if (!old_pwd) {
|
if (!old_pwd) {
|
||||||
$('.error').html("{% trans "Current password cannot be blank" %}").removeClass('hide');
|
$('.error').html("{% trans "Current password cannot be blank" %}").removeClass('hide');
|
||||||
|
@@ -47,7 +47,7 @@ $("#id_new_password1")
|
|||||||
})
|
})
|
||||||
.on('keyup', function() {
|
.on('keyup', function() {
|
||||||
var pwd = $(this).val();
|
var pwd = $(this).val();
|
||||||
if ($.trim(pwd)) {
|
if (pwd.trim()) {
|
||||||
var level = getStrengthLevel(pwd);
|
var level = getStrengthLevel(pwd);
|
||||||
showStrength(level);
|
showStrength(level);
|
||||||
} else {
|
} else {
|
||||||
@@ -57,8 +57,8 @@ $("#id_new_password1")
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
$('form').on('submit', function(){
|
$('form').on('submit', function(){
|
||||||
var pwd1 = $.trim($('input[name="new_password1"]').val()),
|
var pwd1 = $('input[name="new_password1"]').val().trim(),
|
||||||
pwd2 = $.trim($('input[name="new_password2"]').val());
|
pwd2 = $('input[name="new_password2"]').val().trim();
|
||||||
|
|
||||||
if (!pwd1) {
|
if (!pwd1) {
|
||||||
$('.error').html("{% trans "Password cannot be blank" %}").removeClass('hide');
|
$('.error').html("{% trans "Password cannot be blank" %}").removeClass('hide');
|
||||||
|
@@ -69,7 +69,7 @@ $("#id_password1")
|
|||||||
})
|
})
|
||||||
.on('keyup', function() {
|
.on('keyup', function() {
|
||||||
var pwd = $(this).val();
|
var pwd = $(this).val();
|
||||||
if ($.trim(pwd)) {
|
if (pwd.trim()) {
|
||||||
var level = getStrengthLevel(pwd);
|
var level = getStrengthLevel(pwd);
|
||||||
showStrength(level);
|
showStrength(level);
|
||||||
} else {
|
} else {
|
||||||
@@ -79,9 +79,9 @@ $("#id_password1")
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
$('#signup-form').on('submit', function(){
|
$('#signup-form').on('submit', function(){
|
||||||
var email = $.trim($('input[name="email"]').val()),
|
var email = $('input[name="email"]').val().trim(),
|
||||||
pwd1 = $.trim($('input[name="password1"]').val()),
|
pwd1 = $('input[name="password1"]').val().trim(),
|
||||||
pwd2 = $.trim($('input[name="password2"]').val());
|
pwd2 = $('input[name="password2"]').val().trim();
|
||||||
|
|
||||||
if (!email) {
|
if (!email) {
|
||||||
$('.error').html("{% trans "Email cannot be blank" %}").removeClass('hide');
|
$('.error').html("{% trans "Email cannot be blank" %}").removeClass('hide');
|
||||||
|
@@ -28,7 +28,7 @@ $('#share-passwd-form').on('submit', function() {
|
|||||||
var form = $(this),
|
var form = $(this),
|
||||||
pwd = $('[name="password"]', form).val(),
|
pwd = $('[name="password"]', form).val(),
|
||||||
err = $('.error',form);
|
err = $('.error',form);
|
||||||
if (!$.trim(pwd)) {
|
if (!pwd.trim()) {
|
||||||
err.html("{% trans "Please enter the password." %}").removeClass('hide');
|
err.html("{% trans "Please enter the password." %}").removeClass('hide');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
// search-form: top-search-form, advanced-search-form, search-form in search result page
|
// search-form: top-search-form, advanced-search-form, search-form in search result page
|
||||||
$('.search-form').on('submit', function() {
|
$('.search-form').on('submit', function() {
|
||||||
if (!$.trim($(this).find('.search-input').val())) {
|
if (!$(this).find('.search-input').val().trim()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -23,7 +23,7 @@ $('.search-filetypes .item:last-child').on('click', function() {
|
|||||||
$('#advanced-search-form').on('submit', function() {
|
$('#advanced-search-form').on('submit', function() {
|
||||||
if ($('#custom-search-ftypes').attr('checked') &&
|
if ($('#custom-search-ftypes').attr('checked') &&
|
||||||
$('.custom-ftype-options .checkbox-checked').length == 0 &&
|
$('.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');
|
$(this).find('.error').removeClass('hide');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('.new-narrow-panel input[name="password"]').trigger('focus');
|
$('.new-narrow-panel input[name="password"]').trigger('focus');
|
||||||
$('input[type="submit"]').on('click', function(){
|
$('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" %}");
|
$('.error').removeClass('hide').html("{% trans "Password cannot be blank" %}");
|
||||||
return false;
|
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
Reference in New Issue
Block a user