js bugfixes

This commit is contained in:
Serghey Rodin 2015-06-21 20:29:40 +03:00
parent 9e9327df0b
commit 4ebd88bc16
6 changed files with 27 additions and 16 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Before After
Before After

View file

@ -25,7 +25,6 @@ FM.ORDER_BOX_B = $('.context-menu.sort-order.tab-b');
FM.ORDER_TAB_A = 'type_asc';
FM.ORDER_TAB_B = 'type_asc';
FM.TAB_A_CURRENT_PATH = GLOBAL.TAB_A__PATH;
FM.TAB_B_CURRENT_PATH = GLOBAL.TAB_B_PATH;

View file

@ -1,7 +1,7 @@
App.Actions.MAIL_ACC.enable_unlimited = function(elm, source_elm) {
$(elm).data('checked', true);
$(elm).data('prev_value', $(elm).val()); // save prev value in order to restore if needed
$(elm).val(App.Constants.UNLIM_VALUE);
$(elm).val(App.Constants.UNLIM_TRANSLATED_VALUE);
$(elm).attr('disabled', true);
$(source_elm).css('opacity', '1');
}
@ -70,6 +70,9 @@ App.Listeners.MAIL_ACC.checkbox_unlimited_feature();
$('form[name="v_quota"]').bind('submit', function(evt) {
$('input:disabled').each(function(i, elm) {
$(elm).attr('disabled', false);
if (App.Helpers.isUnlimitedValue($(elm).val())) {
$(elm).val(App.Constants.UNLIM_VALUE);
}
});
});

View file

@ -1,7 +1,7 @@
App.Actions.PACKAGE.enable_unlimited = function(elm, source_elm) {
$(elm).data('checked', true);
$(elm).data('prev_value', $(elm).val()); // save prev value in order to restore if needed
$(elm).val(App.Constants.UNLIM_VALUE);
$(elm).val(App.Constants.UNLIM_TRANSLATED_VALUE);
$(elm).attr('disabled', true);
$(source_elm).css('opacity', '1');
}
@ -70,6 +70,9 @@ App.Listeners.PACKAGE.checkbox_unlimited_feature();
$('form[name="v_add_package"]').bind('submit', function(evt) {
$('input:disabled').each(function(i, elm) {
$(elm).attr('disabled', false);
if (App.Helpers.isUnlimitedValue($(elm).val())) {
$(elm).val(App.Constants.UNLIM_VALUE);
}
});
});

View file

@ -1,7 +1,7 @@
App.Actions.MAIL_ACC.enable_unlimited = function(elm, source_elm) {
$(elm).data('checked', true);
$(elm).data('prev_value', $(elm).val()); // save prev value in order to restore if needed
$(elm).val(App.Constants.UNLIM_VALUE);
$(elm).val(App.Constants.UNLIM_TRANSLATED_VALUE);
$(elm).attr('disabled', true);
$(source_elm).css('opacity', '1');
}
@ -70,6 +70,9 @@ App.Listeners.MAIL_ACC.checkbox_unlimited_feature();
$('form[name="v_quota"]').bind('submit', function(evt) {
$('input:disabled').each(function(i, elm) {
$(elm).attr('disabled', false);
if (App.Helpers.isUnlimitedValue($(elm).val())) {
$(elm).val(App.Constants.UNLIM_VALUE);
}
});
});

View file

@ -1,7 +1,7 @@
App.Actions.PACKAGE.enable_unlimited = function(elm, source_elm) {
$(elm).data('checked', true);
$(elm).data('prev_value', $(elm).val()); // save prev value in order to restore if needed
$(elm).val(App.Constants.UNLIM_VALUE);
$(elm).val(App.Constants.UNLIM_TRANSLATED_VALUE);
$(elm).attr('disabled', true);
$(source_elm).css('opacity', '1');
}
@ -70,6 +70,9 @@ App.Listeners.PACKAGE.checkbox_unlimited_feature();
$('form[name="v_edit_package"]').bind('submit', function(evt) {
$('input:disabled').each(function(i, elm) {
$(elm).attr('disabled', false);
if (App.Helpers.isUnlimitedValue($(elm).val())) {
$(elm).val(App.Constants.UNLIM_VALUE);
}
});
});