saby-customizer 0.0.0-pre.39 → 0.0.0-pre.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/popup-dialog.js +1 -1
- package/lib/saby-lib/toolbar.js +14 -12
- package/package.json +1 -1
package/lib/popup-dialog.js
CHANGED
|
@@ -86,7 +86,7 @@ export class PopupDialog extends oom.extends(HTMLElement, PopupDialogDefaults) {
|
|
|
86
86
|
this.id = 'sc-popup-dialog'
|
|
87
87
|
/** @type {import('@material/mwc-dialog').Dialog} */// @ts-ignore
|
|
88
88
|
this.dialog = oom
|
|
89
|
-
.mwcDialog({
|
|
89
|
+
.mwcDialog({ hideactions: true }, this.header, this.main)
|
|
90
90
|
.dom
|
|
91
91
|
|
|
92
92
|
oom(this, this.dialog)
|
package/lib/saby-lib/toolbar.js
CHANGED
|
@@ -108,20 +108,22 @@ class ToolbarContainer extends oom.extends(HTMLElement, optionsDefaults) {
|
|
|
108
108
|
* @param {{searchCount:number}} options Опции регистарции обработчиков
|
|
109
109
|
*/
|
|
110
110
|
static addGlobalContainer({ searchCount } = { searchCount: 0 }) {
|
|
111
|
-
|
|
112
|
-
document.querySelector('.sabyPage-
|
|
111
|
+
if (!ToolbarContainer.globalContainer) {
|
|
112
|
+
const sabyPageRightPanel = document.querySelector('.sabyPage-MainLayout__rightPanel .sabyPage-MainLayout__wrapper') ||
|
|
113
|
+
document.querySelector('.sabyPage-MainLayout__mainContent .sabyPage-widgets__rightPanel__bottomButtons .sabyPage-widgets__wrapper')
|
|
113
114
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
} else {
|
|
118
|
-
if (searchCount < 10) {
|
|
119
|
-
searchCount++
|
|
120
|
-
setTimeout(() => {
|
|
121
|
-
this.addGlobalContainer({ searchCount })
|
|
122
|
-
}, 1000)
|
|
115
|
+
if (sabyPageRightPanel) {
|
|
116
|
+
ToolbarContainer.globalContainer = new ToolbarContainer({ global: true })
|
|
117
|
+
sabyPageRightPanel.prepend(ToolbarContainer.globalContainer)
|
|
123
118
|
} else {
|
|
124
|
-
|
|
119
|
+
if (searchCount < 10) {
|
|
120
|
+
searchCount++
|
|
121
|
+
setTimeout(() => {
|
|
122
|
+
this.addGlobalContainer({ searchCount })
|
|
123
|
+
}, 1000)
|
|
124
|
+
} else {
|
|
125
|
+
console.error('saby-customizer - addGlobalContainer: Не найден ни один общий контейнер для размещения доп. панелей с кнопками')
|
|
126
|
+
}
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
129
|
}
|