Improve share modal customization to make it work with async functions

This commit is contained in:
yflory
2018-01-25 14:20:55 +01:00
parent fd4ed3ce3b
commit 3d3f58b3fc
2 changed files with 16 additions and 14 deletions

View File

@@ -444,13 +444,14 @@ define([
'class': 'fa fa-share-alt cp-toolbar-share-button',
title: Messages.shareButton
});
var modal = UIElements.createShareModal({
origin: origin,
pathname: pathname,
hashes: hashes,
common: Common
});
$shareBlock.click(function () {
UIElements.createShareModal({
origin: origin,
pathname: pathname,
hashes: hashes,
common: Common
});
UI.openCustomModal(UI.dialog.tabs(modal));
});
toolbar.$leftside.append($shareBlock);
@@ -472,13 +473,14 @@ define([
'class': 'fa fa-share-alt cp-toolbar-share-button',
title: Messages.shareButton
});
var modal = UIElements.createFileShareModal({
origin: origin,
pathname: pathname,
hashes: hashes,
common: Common
});
$shareBlock.click(function () {
UIElements.createFileShareModal({
origin: origin,
pathname: pathname,
hashes: hashes,
common: Common
});
UI.openCustomModal(UI.dialog.tabs(modal));
});
toolbar.$leftside.append($shareBlock);