aboutsummaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-07-20 23:40:00 +0200
committerGitHub <noreply@github.com>2018-07-20 23:40:00 +0200
commit53aaa62572015853b924fc1293761562733beb49 (patch)
tree3ddc3ae8e24f9747b677e0560a0689761adfa558 /core/js
parent52ec71c4b05cce98af59332904c77d619d5bfed0 (diff)
parent89ee10a536c179bfaf603467891470ac03eaa342 (diff)
downloadnextcloud-server-53aaa62572015853b924fc1293761562733beb49.tar.gz
nextcloud-server-53aaa62572015853b924fc1293761562733beb49.zip
Merge pull request #9982 from nextcloud/global-flow-rebuild
Cleanup structure
Diffstat (limited to 'core/js')
-rw-r--r--core/js/apps.js12
-rw-r--r--core/js/tests/specs/appsSpec.js4
2 files changed, 6 insertions, 10 deletions
diff --git a/core/js/apps.js b/core/js/apps.js
index 8aebbbd418c..b40883e88cf 100644
--- a/core/js/apps.js
+++ b/core/js/apps.js
@@ -27,9 +27,8 @@
*/
exports.Apps.showAppSidebar = function($el) {
var $appSidebar = $el || $('#app-sidebar');
- $appSidebar.removeClass('disappear')
- .show('slide', { direction: 'right' }, 200);
- $('#app-content').addClass('with-app-sidebar', 200).trigger(new $.Event('appresized'));
+ $appSidebar.removeClass('disappear');
+ $('#content').addClass('with-app-sidebar').trigger(new $.Event('appresized'));
};
/**
@@ -40,11 +39,8 @@
*/
exports.Apps.hideAppSidebar = function($el) {
var $appSidebar = $el || $('#app-sidebar');
- $appSidebar.hide('slide', { direction: 'right' }, 100,
- function() {
- $appSidebar.addClass('disappear');
- });
- $('#app-content').removeClass('with-app-sidebar', 100).trigger(new $.Event('appresized'));
+ $appSidebar.addClass('disappear');
+ $('#content').removeClass('with-app-sidebar').trigger(new $.Event('appresized'));
};
/**
diff --git a/core/js/tests/specs/appsSpec.js b/core/js/tests/specs/appsSpec.js
index c3352e3e4a9..3a4c413bbd3 100644
--- a/core/js/tests/specs/appsSpec.js
+++ b/core/js/tests/specs/appsSpec.js
@@ -22,7 +22,7 @@
describe('Apps base tests', function() {
describe('Sidebar utility functions', function() {
beforeEach(function() {
- $('#testArea').append('<div id="app-content">Content</div><div id="app-sidebar">The sidebar</div>');
+ $('#testArea').append('<div id="content"><div id="app-content">Content</div><div id="app-sidebar">The sidebar</div></div>');
jQuery.fx.off = true;
});
afterEach(function() {
@@ -41,7 +41,7 @@ describe('Apps base tests', function() {
});
it('triggers appresize event when visibility changed', function() {
var eventStub = sinon.stub();
- $('#app-content').on('appresized', eventStub);
+ $('#content').on('appresized', eventStub);
OC.Apps.showAppSidebar();
expect(eventStub.calledOnce).toEqual(true);
OC.Apps.hideAppSidebar();