Skip to content

Commit

Permalink
Bugfix: initialize the “+” menu only when user is using “files” app.
Browse files Browse the repository at this point in the history
This will prevent from fetching the Ownpad configuration on each page,
and should solve #6.
  • Loading branch information
otetard committed Aug 19, 2016
1 parent 4f59af8 commit 290e5e4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion js/ownpad.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,12 @@ OC.Plugins.register('OCA.Files.FileList', OCA.FilesOwnpad);
}
};

OCA.FilesOwnpadMenu = new FilesOwnpadMenu();
// Only initialize the Ownpad menu when user is logged in and
// using the “files” app.
$(document).ready(function() {
if($('#filesApp').val()) {
OCA.FilesOwnpadMenu = new FilesOwnpadMenu();
}
});

})(OCA);

0 comments on commit 290e5e4

Please sign in to comment.