Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Hamza/79326/fix: view button disabling on Portfolio Page (#7329)
Browse files Browse the repository at this point in the history
* fix: view button disabling on Portfolio Page

* Merge branch 'master' of github.com:binary-com/binary-static into hamza/79326/View_button_from_portfolio_page_is_getting_disabled

* fix: empty

---------

Co-authored-by: Matin shafiei <[email protected]>
  • Loading branch information
hamza-deriv and matin-deriv authored Feb 8, 2023
1 parent 1e6c0cb commit 5c208b9
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/javascript/app/pages/user/view_popup/view_popup.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,28 +72,33 @@ const ViewPopupUI = (() => {
}
};

const enableButton = (button) => {
button.removeAttr('disabled');
button.fadeTo(0, 1);
};

const enableContractViewButton = () => {
$('.open_contract_details[disabled]').each(function () {
enableButton($(this));
});
};

const closeContainer = () => {
if ($container) {
$container.hide().remove();
$('.popup_page_overlay').hide().remove();
$container = null;
enableContractViewButton();
}
$('html').removeClass('no-scroll');
};

const disableButton = (button) => {
$('.open_contract_details[disabled]').each(function () {
enableButton($(this));
});
enableContractViewButton();
button.attr('disabled', 'disabled');
button.fadeTo(0, 0.5);
};

const enableButton = (button) => {
button.removeAttr('disabled');
button.fadeTo(0, 1);
};

const showInpagePopup = (data, containerClass, dragHandle) => {
const con = container(true);
if (containerClass) {
Expand Down

0 comments on commit 5c208b9

Please sign in to comment.