categories loading flicking fix
This commit is contained in:
@@ -83,9 +83,5 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="list-nested-categories" style="height: 100px;">
|
||||
|
||||
</div>
|
||||
{{/unless}}
|
||||
@@ -235,8 +235,12 @@ define('views/list-with-categories', 'views/list', function (Dep) {
|
||||
},
|
||||
|
||||
actionOpenCategory: function (data) {
|
||||
this.hideListViewWhileNestedCategoriesLoaded();
|
||||
|
||||
this.openCategory(data.id || null, data.name);
|
||||
|
||||
this.selectCurrentCategory();
|
||||
|
||||
this.navigateToCurrentCategory();
|
||||
},
|
||||
|
||||
@@ -625,5 +629,13 @@ define('views/list-with-categories', 'views/list', function (Dep) {
|
||||
updateHeader: function () {
|
||||
this.getView('header').reRender();
|
||||
},
|
||||
|
||||
hideListViewWhileNestedCategoriesLoaded: function () {
|
||||
this.$listContainer.addClass('hidden');
|
||||
|
||||
this.nestedCategoriesCollection.once('sync', function () {
|
||||
this.$listContainer.removeClass('hidden');
|
||||
}, this);
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user