Skip to content

Commit

Permalink
compiled assets
Browse files Browse the repository at this point in the history
  • Loading branch information
i-just committed Nov 10, 2023
1 parent 76c38c6 commit 078404f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/web/assets/commerceui/dist/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/commerceui/dist/js/app.js.map

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions src/web/assets/commerceui/src/js/order/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,9 @@ export default new Vuex.Store({
// for the dropdown tab menu
const tabManager = Craft.cp.tabManager;
const tabsDropdownMenu = tabManager.$menuBtn.data('menubtn').menu;
const transactionsOption = tabsDropdownMenu.$container
.find('[data-id="order-transactions"]');
const transactionsOption = tabsDropdownMenu.$container.find(
'[data-id="order-transactions"]'
);

// this will disable clicking on the transactions option in the dropdown tab menu
if (transactionsOption.length > 0) {
Expand All @@ -281,20 +282,17 @@ export default new Vuex.Store({
let $prevSelectedTab = null;
let $selectedTab = tabManager.$selectedTab[0];

tabManager.on('selectTab', function(ev) {
tabManager.on('selectTab', function (ev) {
$prevSelectedTab = $selectedTab;
$selectedTab = $(ev.$tab[0]);
});

tabsDropdownMenu.on(
'optionselect',
function (ev) {
let $selectedOption = $(ev.selectedOption);
if ($selectedOption.data('id') === 'order-transactions') {
$prevSelectedTab.trigger('click');
}
tabsDropdownMenu.on('optionselect', function (ev) {
let $selectedOption = $(ev.selectedOption);
if ($selectedOption.data('id') === 'order-transactions') {
$prevSelectedTab.trigger('click');
}
);
});
},

edit({commit, state, dispatch}) {
Expand Down Expand Up @@ -375,10 +373,12 @@ export default new Vuex.Store({
const optionSelector =
'[id^="' + tabsDropdownMenu.menuId + '-option-"]';

const staticOptions = tabsDropdownMenu.$container
.find(optionSelector + '[data-id^="static-fields-"]');
const fieldsOptions = tabsDropdownMenu.$container
.find(optionSelector + '[data-id^="fields-"]');
const staticOptions = tabsDropdownMenu.$container.find(
optionSelector + '[data-id^="static-fields-"]'
);
const fieldsOptions = tabsDropdownMenu.$container.find(
optionSelector + '[data-id^="fields-"]'
);

if (state.editing) {
staticOptions.disable();
Expand Down

0 comments on commit 078404f

Please sign in to comment.