mirror of
https://github.com/documize/community.git
synced 2025-07-21 22:29:41 +02:00
Better UX for custom logo upload
Resolves issue with phantom click.
This commit is contained in:
parent
7f2d2c01a6
commit
d8cb69b6c0
1 changed files with 33 additions and 31 deletions
|
@ -40,7 +40,10 @@ export default Component.extend(Notifier, {
|
||||||
let orgId = this.get('appMeta.orgId');
|
let orgId = this.get('appMeta.orgId');
|
||||||
let uploadUrl = `${url}/organization/${orgId}/logo`;
|
let uploadUrl = `${url}/organization/${orgId}/logo`;
|
||||||
|
|
||||||
let dzone = new Dropzone("#upload-logo > div", {
|
// Handle upload clicks on button and anything inside that button.
|
||||||
|
let sel = ['#upload-logo', '#upload-logo > div'];
|
||||||
|
for (var i=0; i < 2; i++) {
|
||||||
|
let dzone = new Dropzone(sel[i], {
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': 'Bearer ' + self.get('session.authToken')
|
'Authorization': 'Bearer ' + self.get('session.authToken')
|
||||||
},
|
},
|
||||||
|
@ -73,8 +76,7 @@ export default Component.extend(Notifier, {
|
||||||
dzone.on("complete", function (file) {
|
dzone.on("complete", function (file) {
|
||||||
dzone.removeFile(file);
|
dzone.removeFile(file);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
this.set('drop', dzone);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue