mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-26 06:54:48 +08:00
Fix tests
This commit is contained in:
parent
464d03558a
commit
f717ce66cb
2 changed files with 7 additions and 7 deletions
|
@ -31,7 +31,7 @@ var avatarsModal = (function() {
|
|||
reader.readAsDataURL(inputField.files[0]);
|
||||
reader.onload = function() {
|
||||
var avatarContainer = $(modal).find('.avatar-preview-container');
|
||||
$(modal).find('.save-button').removeClass('disabled').attr('disabled', false);
|
||||
$(modal).find('.save-button').attr('disabled', false);
|
||||
$(modal).find('#new_avatar').val(reader.result);
|
||||
|
||||
avatarContainer.show().children().remove();
|
||||
|
@ -50,7 +50,7 @@ var avatarsModal = (function() {
|
|||
|
||||
function initPredefinedAvatars() {
|
||||
$(modal).find('.avatar-collection .avatar').click(function() {
|
||||
$(modal).find('.save-button').removeClass('disabled').attr('disabled', false);
|
||||
$(modal).find('.save-button').attr('disabled', false);
|
||||
$(modal).find('#raw_avatar')[0].value = null;
|
||||
$(modal).find('.avatar-preview-container').hide();
|
||||
$(modal).find('.current-avatar').show().find('img')
|
||||
|
@ -61,9 +61,9 @@ var avatarsModal = (function() {
|
|||
|
||||
function initUpdateButton() {
|
||||
$(modal).find('.save-button').click(function() {
|
||||
if ($(this).hasClass('disabled')) return;
|
||||
if ($(this).is('[disabled=disabled]')) return;
|
||||
|
||||
$(this).addClass('disabled').attr('disabled', true);
|
||||
$(this).attr('disabled', true);
|
||||
$.ajax({
|
||||
url: $(modal).data('update-url'),
|
||||
type: 'PUT',
|
||||
|
@ -76,7 +76,7 @@ var avatarsModal = (function() {
|
|||
location.reload();
|
||||
},
|
||||
error: () => {
|
||||
$(this).removeClass('disabled').attr('disabled', false);
|
||||
$(this).attr('disabled', false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -128,8 +128,8 @@ $btn-primary-color: $color-white;
|
|||
$btn-primary-bg: $brand-primary;
|
||||
$btn-primary-border: darken($btn-primary-bg, 5%);
|
||||
$btn-primary-new-color: $color-white;
|
||||
$btn-primary-new-bg: $brand-primary-new;
|
||||
$btn-primary-new-border: darken($brand-primary-new, 5%);
|
||||
$btn-primary-new-bg: $brand-primary;
|
||||
$btn-primary-new-border: darken($brand-primary , 5%);
|
||||
$btn-success-color: $color-white;
|
||||
$btn-success-bg: $brand-primary;
|
||||
$btn-success-border: darken($btn-success-bg, 5%);
|
||||
|
|
Loading…
Add table
Reference in a new issue