While using dnd for uploading the attach button has been disabled
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@122554 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
31d2b8be46
commit
cc6cca9b31
|
@ -891,6 +891,9 @@ public class ShareUpdateForm extends Composite {
|
||||||
// number of ignored files
|
// number of ignored files
|
||||||
var numberIgnoredFiles = 0;
|
var numberIgnoredFiles = 0;
|
||||||
|
|
||||||
|
// disable attach button
|
||||||
|
instance.@org.gcube.portlets.user.shareupdates.client.view.ShareUpdateForm::enableAttachButton(Z)(false);
|
||||||
|
|
||||||
// for each dropped file
|
// for each dropped file
|
||||||
for (var i = 0; i < files.length; i++) {
|
for (var i = 0; i < files.length; i++) {
|
||||||
|
|
||||||
|
@ -936,6 +939,9 @@ public class ShareUpdateForm extends Composite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// enable attach button
|
||||||
|
instance.@org.gcube.portlets.user.shareupdates.client.view.ShareUpdateForm::enableAttachButton(Z)(true);
|
||||||
|
|
||||||
// alert the user that folder(s) can't be uploaded
|
// alert the user that folder(s) can't be uploaded
|
||||||
if(numFolder > 0){
|
if(numFolder > 0){
|
||||||
var msg;
|
var msg;
|
||||||
|
@ -1145,4 +1151,15 @@ public class ShareUpdateForm extends Composite {
|
||||||
|
|
||||||
return Window.confirm(DELETE_LINK_PREVIEW);
|
return Window.confirm(DELETE_LINK_PREVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enables or disable the attach button
|
||||||
|
* @param enable
|
||||||
|
*/
|
||||||
|
private void enableAttachButton(boolean enable){
|
||||||
|
|
||||||
|
GWT.log("Enable attach button? " + enable);
|
||||||
|
attachButton.setEnabled(enable);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue