Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:microweber/microweber into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-mw committed May 4, 2022
2 parents 527abd1 + 6e39aae commit a5c4fc8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
7 changes: 4 additions & 3 deletions userfiles/modules/admin/modules/sidebar_live_edit.php
Expand Up @@ -114,10 +114,9 @@ class="mw-sidebar-search-clear-x-btn mw-icon-close"
//mw.require('libs/html2canvas/html2canvas.min.js');

function mwSidebarSearchClear(what) {
mw.element('#mw-sidebar-search-input-for-modules-and-layouts').val('');
mw.element('#mw-sidebar-search-input-for-modules').val('');
return mwSidebarSearchItems('', what);
mw.element('#mw-sidebar-search-input-for-modules-and-layouts,#mw-sidebar-search-input-for-modules').val('');

return mwSidebarSearchItems('', what);
}

function mwSidebarSearchItems(value, what) {
Expand All @@ -139,6 +138,7 @@ function mwSidebarSearchItems(value, what) {
$('.mw-search-no-results' ).hide();
$('.mw-ui-box-header-2,.module-item-module').show();
$('#modules-and-layouts-sidebar .module-item-module[data-is-hidden]').hide();
mw.element('#mw-sidebar-modules-and-layouts-holder,#mw-sidebar-modules-and-layouts-holder').scrollTop(0);

return;
} else {
Expand Down Expand Up @@ -198,6 +198,7 @@ function mwSidebarSearchItems(value, what) {
}

$('#modules-and-layouts-sidebar .module-item-module[data-is-hidden]').hide();
mw.element('#mw-sidebar-modules-and-layouts-holder,#mw-sidebar-modules-and-layouts-holder').scrollTop(0);

}

Expand Down
9 changes: 9 additions & 0 deletions userfiles/modules/microweber/api/tools/element.js
Expand Up @@ -27,6 +27,15 @@
return this;
};

this.scrollTop = function (val) {
if(typeof val === 'undefined') {
return this._active().scrollTop;
}
return this.each(function(){
this.scrollTop = val;
});
};

this.encapsulate = function () {

};
Expand Down

0 comments on commit a5c4fc8

Please sign in to comment.