Skip to content

Commit

Permalink
elementor option issue fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
shuvo7670 committed Jan 15, 2024
1 parent aacf502 commit 7dbdd1d
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 32 deletions.
64 changes: 33 additions & 31 deletions assets/js/elementor-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,39 +211,41 @@
});
});

// Add schedulepress option to elementor topbar panel
jQuery('#elementor-editor-wrapper-v2 .eui-box .MuiGrid-root:first-child .eui-stack:last-child').append(`
<div class="elementor-panel-footer-wpsp-modal"><span id="elementor-panel-footer-wpsp-modal-label" class="eui-box eui-tooltip MuiBox-root css-0"><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium eui-icon-button css-1qy3hz2" tabindex="0" type="button" aria-label="Preview Changes"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 500 500" style="enable-background:new 0 0 500 500;display:block;width:18px;margin:0 auto;" xml:space="preserve">
<style type="text/css">
.st0{fill:#A4AFB7;}
#elementor-panel-footer-wpsp-modal:hover .st0{fill:#d5dadf;}
</style>
<g>
$(document).ready(function() {
jQuery('#elementor-editor-wrapper-v2 .eui-box .MuiGrid-root:first-child .eui-stack:last-child').append(`
<div class="elementor-panel-footer-wpsp-modal"><span id="elementor-panel-footer-wpsp-modal-label" class="eui-box eui-tooltip MuiBox-root css-0"><button class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium eui-icon-button wpsp-elementor-topbar-panel-button" tabindex="0" type="button" aria-label="Preview Changes"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 500 500" style="enable-background:new 0 0 500 500;display:block;width:18px;margin:0 auto;" xml:space="preserve">
<style type="text/css">
.st0{fill:#A4AFB7;}
#elementor-panel-footer-wpsp-modal:hover .st0{fill:#d5dadf;}
</style>
<g>
<path class="st0" d="M212.3,462.4C95,462.4-0.4,366.9-0.4,249.7S95,37,212.3,37c37,0,73.2,9.6,105.1,27.9
c9.8,5.7,13.2,18.1,7.5,27.7c-5.7,9.8-18.1,13.2-27.7,7.5c-25.6-14.7-55.1-22.5-84.9-22.5c-94.7,0-171.8,77.1-171.8,171.8
s77.1,171.8,171.8,171.8c48.1,0,92.6-19.4,125.5-54.3c7.8-8.3,20.7-8.5,28.7-1c8.3,7.8,8.5,20.7,1,28.7
C327.4,437.8,271,462.4,212.3,462.4z"></path>
<g>
<path class="st0" d="M212.3,462.4C95,462.4-0.4,366.9-0.4,249.7S95,37,212.3,37c37,0,73.2,9.6,105.1,27.9
c9.8,5.7,13.2,18.1,7.5,27.7c-5.7,9.8-18.1,13.2-27.7,7.5c-25.6-14.7-55.1-22.5-84.9-22.5c-94.7,0-171.8,77.1-171.8,171.8
s77.1,171.8,171.8,171.8c48.1,0,92.6-19.4,125.5-54.3c7.8-8.3,20.7-8.5,28.7-1c8.3,7.8,8.5,20.7,1,28.7
C327.4,437.8,271,462.4,212.3,462.4z"></path>
</g>
<path class="st0" d="M186.1,208.3l-43.2-39.3c-8.3-7.5-21.2-7-28.7,1.3c-7.5,8.3-7,21.2,1.3,28.7l46.8,42.4
C165.9,227.7,174.5,215.8,186.1,208.3z"></path>
<path class="st0" d="M445.4,81.7c-7-8.8-19.9-10.4-28.7-3.4L250,210.1c11.1,8.3,19.1,20.4,21.7,34.7L442,110.2
C451.1,103.2,452.4,90.5,445.4,81.7z"></path>
<path class="st0" d="M234.3,222.8c-5.2-2.8-11.1-4.4-17.3-4.4c-5.7,0-10.9,1.3-15.5,3.4c-12.7,6-21.2,18.6-21.2,33.4
c0,0.8,0,1.6,0,2.3c1.3,19.1,17.1,34.4,36.7,34.4c18.9,0,34.4-14.2,36.5-32.6c0.3-1.3,0.3-2.8,0.3-4.4
C253.7,241.1,245.9,229,234.3,222.8z"></path>
<path class="st0" d="M493.8,202.6h-51.2c-3.4,0-6.2,2.8-6.2,6.2v45.5c0,3.4,2.8,6.2,6.2,6.2h51.2c3.4,0,6.2-2.8,6.2-6.2v-45.5
C500,205.4,497.2,202.6,493.8,202.6z"></path>
<g>
<path class="st0" d="M410,202.6h-51.2c-3.4,0-6.2,2.8-6.2,6.2v45.5c0,3.4,2.8,6.2,6.2,6.2H410c3.4,0,6.2-2.8,6.2-6.2v-45.5
C416.4,205.4,413.6,202.6,410,202.6z"></path>
<path class="st0" d="M410,277.6h-51.2c-3.4,0-6.2,2.8-6.2,6.2v45.5c0,3.4,2.8,6.2,6.2,6.2H410c3.4,0,6.2-2.8,6.2-6.2v-45.5
C416.4,280.2,413.6,277.6,410,277.6z"></path>
<path class="st0" d="M493.8,277.6h-51.2c-3.4,0-6.2,2.8-6.2,6.2v45.5c0,3.4,2.8,6.2,6.2,6.2h51.2c3.4,0,6.2-2.8,6.2-6.2v-45.5
C500,280.2,497.2,277.6,493.8,277.6z"></path>
</g>
</g>
<path class="st0" d="M186.1,208.3l-43.2-39.3c-8.3-7.5-21.2-7-28.7,1.3c-7.5,8.3-7,21.2,1.3,28.7l46.8,42.4
C165.9,227.7,174.5,215.8,186.1,208.3z"></path>
<path class="st0" d="M445.4,81.7c-7-8.8-19.9-10.4-28.7-3.4L250,210.1c11.1,8.3,19.1,20.4,21.7,34.7L442,110.2
C451.1,103.2,452.4,90.5,445.4,81.7z"></path>
<path class="st0" d="M234.3,222.8c-5.2-2.8-11.1-4.4-17.3-4.4c-5.7,0-10.9,1.3-15.5,3.4c-12.7,6-21.2,18.6-21.2,33.4
c0,0.8,0,1.6,0,2.3c1.3,19.1,17.1,34.4,36.7,34.4c18.9,0,34.4-14.2,36.5-32.6c0.3-1.3,0.3-2.8,0.3-4.4
C253.7,241.1,245.9,229,234.3,222.8z"></path>
<path class="st0" d="M493.8,202.6h-51.2c-3.4,0-6.2,2.8-6.2,6.2v45.5c0,3.4,2.8,6.2,6.2,6.2h51.2c3.4,0,6.2-2.8,6.2-6.2v-45.5
C500,205.4,497.2,202.6,493.8,202.6z"></path>
<g>
<path class="st0" d="M410,202.6h-51.2c-3.4,0-6.2,2.8-6.2,6.2v45.5c0,3.4,2.8,6.2,6.2,6.2H410c3.4,0,6.2-2.8,6.2-6.2v-45.5
C416.4,205.4,413.6,202.6,410,202.6z"></path>
<path class="st0" d="M410,277.6h-51.2c-3.4,0-6.2,2.8-6.2,6.2v45.5c0,3.4,2.8,6.2,6.2,6.2H410c3.4,0,6.2-2.8,6.2-6.2v-45.5
C416.4,280.2,413.6,277.6,410,277.6z"></path>
<path class="st0" d="M493.8,277.6h-51.2c-3.4,0-6.2,2.8-6.2,6.2v45.5c0,3.4,2.8,6.2,6.2,6.2h51.2c3.4,0,6.2-2.8,6.2-6.2v-45.5
C500,280.2,497.2,277.6,493.8,277.6z"></path>
</g>
</g>
</svg></button></span></div>`);
</svg></button></span></div>`);
});


// Assuming the button has an ID like 'your-button-id'
jQuery(document).on('click', '#elementor-editor-wrapper-v2 .MuiBox-root .MuiGrid-root:last-child button[aria-label="Save Options"]', function() {
Expand Down
31 changes: 30 additions & 1 deletion includes/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,36 @@ public function schedulepress_el_tab () { ?>
#schedulepress-elementor-modal.elementor-templates-modal .dialog-widget-content {
background: #f5f7fd;
}

.elementor-panel-footer-wpsp-modal .wpsp-elementor-topbar-panel-button:hover {
background-color: #3e3e3e;
}
.elementor-panel-footer-wpsp-modal .wpsp-elementor-topbar-panel-button {
display: inline-flex;
-webkit-box-align: center;
align-items: center;
-webkit-box-pack: center;
justify-content: center;
position: relative;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
background-color: transparent;
outline: 0px;
border: 0px;
margin: 0px;
cursor: pointer;
user-select: none;
vertical-align: middle;
appearance: none;
text-decoration: none;
text-align: center;
flex: 0 0 auto;
font-size: 1.5rem;
padding: 8px;
border-radius: 50%;
overflow: visible;
color: rgb(255, 255, 255);
transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
}
.wpsp-el-modal-date-picker .flatpickr-calendar {
left: 50% !important;
top: 50% !important;
Expand Down

0 comments on commit 7dbdd1d

Please sign in to comment.