Skip to content

Commit

Permalink
added textcolor invert option
Browse files Browse the repository at this point in the history
  • Loading branch information
brainfoolong committed Apr 8, 2024
1 parent 00e1707 commit da8f69f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions appdata/modules/Framelix/public/dist/js/general-late.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ class FramelixCustomElementButton extends FramelixCustomElement {
this.innerHTML = html;
}
if (bgcolor) {
this.style.backgroundColor = bgcolor;
self.style.backgroundColor = bgcolor;
if (!textcolor) {
self.style.color = FramelixColorUtils.invertColor(bgcolor);
}
}
if (textcolor) {
self.style.color = textcolor;
self.style.color = textcolor === 'invert' ? FramelixColorUtils.invertColor(getComputedStyle(self).backgroundColor, true) : textcolor;
}
if (this.hasAttribute('href')) {
this.setAttribute('role', 'link');
Expand Down
7 changes: 3 additions & 4 deletions appdata/modules/Framelix/public/dist/js/general.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,7 @@ class FramelixRequest {
let parentModal = initiatorElement.closest('.framelix-modal');
let parentTab = initiatorElement.closest('.framelix-tab-content');
if (parentCell.length) {
requestOptions.renderTarget = requestOptions.renderTarget = {
requestOptions.renderTarget = {
elementSelector: parentCell
};
} else if (parentPopup.length) {
Expand All @@ -1644,7 +1644,7 @@ class FramelixRequest {
} else if (parentModal.length) {
const modal = FramelixModal.instances[parentModal.attr('data-instance-id')];
if (modal) {
requestOptions.renderTarget = requestOptions.renderTarget = {
requestOptions.renderTarget = {
modalOptions: {
instance: modal
}
Expand All @@ -1653,7 +1653,7 @@ class FramelixRequest {
} else if (parentTab.length) {
const modal = FramelixModal.instances[parentModal.attr('data-instance-id')];
if (modal) {
requestOptions.renderTarget = requestOptions.renderTarget = {
requestOptions.renderTarget = {
modalOptions: {
instance: modal
}
Expand All @@ -1663,7 +1663,6 @@ class FramelixRequest {
}
}
const isFixedResponse = !(request instanceof FramelixRequest);
const override = typeof overrideResponse === 'string';
if (!requestOptions.renderTarget) {
if (!isFixedResponse) {
Framelix.showProgressBar(1);
Expand Down

0 comments on commit da8f69f

Please sign in to comment.