summaryrefslogtreecommitdiffstats
path: root/core/js/share.js
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-08-08 00:23:06 +0200
committerVincent Petry <pvince81@owncloud.com>2015-09-16 07:23:25 +0200
commite7b5921206a6c602aa22614907b79f14b8ad39c9 (patch)
tree7645d182b58b8fef9bc046acc8d4cf2faf919871 /core/js/share.js
parentedd163a6113664921a2fda730037dcf68bfe08ae (diff)
downloadnextcloud-server-e7b5921206a6c602aa22614907b79f14b8ad39c9.tar.gz
nextcloud-server-e7b5921206a6c602aa22614907b79f14b8ad39c9.zip
share dialog view takes advantage of OC.Backbone.View
Diffstat (limited to 'core/js/share.js')
-rw-r--r--core/js/share.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 5d3253e6d5c..9aba894f676 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -378,14 +378,18 @@ OC.Share = _.extend(OC.Share, {
},
showDropDown:function(itemType, itemSource, appendTo, link, possiblePermissions, filename) {
var itemModel = new OC.Share.ShareItemModel(itemType, itemSource);
- var dialogView = new OC.Share.ShareDialogView('dropdown');
- dialogView.setContainerClasses('drop shareDropDown');
+ var dialogView = new OC.Share.ShareDialogView({
+ id: 'dropdown',
+ model: itemModel,
+ className: 'drop shareDropDown',
+ attributes: {
+ 'data-item-source-name': filename
+ }
+ });
dialogView.setShowLink(link);
dialogView.setPossiblePermissions(possiblePermissions);
- dialogView.setItemModel(itemModel);
- var $dialog = dialogView.render();
+ var $dialog = dialogView.render().$el;
$dialog.appendTo(appendTo);
- $dialog.attr('data-item-source-name', filename);
$dialog.slideDown(OC.menuSpeed, function() {
OC.Share.droppedDown = true;
});