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
|
@ -890,6 +890,9 @@ public class ShareUpdateForm extends Composite {
|
|||
|
||||
// number of ignored files
|
||||
var numberIgnoredFiles = 0;
|
||||
|
||||
// disable attach button
|
||||
instance.@org.gcube.portlets.user.shareupdates.client.view.ShareUpdateForm::enableAttachButton(Z)(false);
|
||||
|
||||
// for each dropped file
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
|
@ -911,7 +914,7 @@ public class ShareUpdateForm extends Composite {
|
|||
numberIgnoredFiles ++;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// create new progress bar
|
||||
instance.@org.gcube.portlets.user.shareupdates.client.view.ShareUpdateForm::showProgressDND()();
|
||||
|
||||
|
@ -935,6 +938,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
|
||||
if(numFolder > 0){
|
||||
|
@ -1145,4 +1151,15 @@ public class ShareUpdateForm extends Composite {
|
|||
|
||||
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