mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-08 20:12:23 +00:00
bug4476 added description, cleaned up selection handling
This commit is contained in:
1 parent
222a99a856
commit
76ed62fa09
4 files changed
+21
-16
No files matched your search
+16
-14
@@ -89,6 +89,10 @@ public class MultiVideoDialog extends DialogBox {
|
||||
setGlassEnabled(true);
|
||||
|
||||
FlowPanel mainContent = new FlowPanel();
|
||||
|
||||
Label descriptionLabel = new Label(this.stringMessages.multiVideoDescription());
|
||||
descriptionLabel.getElement().getStyle().setPadding(0.5, Unit.EM);
|
||||
mainContent.add(descriptionLabel);
|
||||
|
||||
Label indexUrl = new Label(stringMessages.multiVideoURLOfIndex());
|
||||
mainContent.add(indexUrl);
|
||||
@@ -186,19 +190,19 @@ public class MultiVideoDialog extends DialogBox {
|
||||
link.setHref(remoteFile.url);
|
||||
link.setTarget("_blank");
|
||||
dataTable.setWidget(y, URL_COLUMN, link);
|
||||
dataTable.setWidget(y, STATUS_COLUMN, new Label(asString(remoteFile.status)));
|
||||
if(remoteFile.selected || remoteFile.status != EStatus.WAIT_FOR_SAVE) {
|
||||
dataTable.setWidget(y, STATUS_COLUMN, new Label(asString(remoteFile.status)));
|
||||
}else {
|
||||
dataTable.setWidget(y, STATUS_COLUMN, new Label(stringMessages.multiVideoDoNoAdd()));
|
||||
}
|
||||
|
||||
CheckBox removeVideo = new CheckBox();
|
||||
removeVideo.setEnabled(!remoteFile.isWorking);
|
||||
removeVideo.setValue(remoteFile.status == EStatus.WAIT_FOR_SAVE || remoteFile.status == EStatus.WAITING_FOR_LINK);
|
||||
removeVideo.setEnabled(!remoteFile.isWorking && remoteFile.status == EStatus.WAIT_FOR_SAVE);
|
||||
removeVideo.setValue(remoteFile.selected);
|
||||
removeVideo.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
|
||||
@Override
|
||||
public void onValueChange(ValueChangeEvent<Boolean> event) {
|
||||
if (Boolean.TRUE.equals(event.getValue())) {
|
||||
remoteFile.status = EStatus.WAIT_FOR_SAVE;
|
||||
} else {
|
||||
remoteFile.status = EStatus.DO_NOT_PROCESS;
|
||||
}
|
||||
remoteFile.selected = event.getValue();
|
||||
updateUI();
|
||||
}
|
||||
});
|
||||
@@ -301,7 +305,7 @@ public class MultiVideoDialog extends DialogBox {
|
||||
|
||||
private void startNextLinkingRemoteTask() {
|
||||
for (RemoteFileInfo remoteFile : remoteFiles) {
|
||||
if (remoteFile.status == EStatus.WAIT_FOR_SAVE) {
|
||||
if (remoteFile.status == EStatus.WAIT_FOR_SAVE && remoteFile.selected) {
|
||||
MediaTrack mediaTrack = new MediaTrack(remoteFile.url, remoteFile.url, remoteFile.startTime,
|
||||
remoteFile.duration, remoteFile.mime, remoteFile.candidates);
|
||||
mediaService.addMediaTrack(mediaTrack, new AsyncCallback<String>() {
|
||||
@@ -347,7 +351,7 @@ public class MultiVideoDialog extends DialogBox {
|
||||
public void onSuccess(List<EventDTO> result) {
|
||||
Set<RegattaAndRaceIdentifier> candidates = new HashSet<>();
|
||||
collectAllOverlappingRaces(remoteFile, result, candidates);
|
||||
remoteFile.status = EStatus.DO_NOT_PROCESS;
|
||||
remoteFile.status = EStatus.WAIT_FOR_SAVE;
|
||||
remoteFile.isWorking = false;
|
||||
remoteFile.candidates = candidates;
|
||||
updateUI();
|
||||
@@ -552,8 +556,6 @@ public class MultiVideoDialog extends DialogBox {
|
||||
return stringMessages.multiVideoWaitingForLinkPhase();
|
||||
case WAIT_FOR_SAVE:
|
||||
return stringMessages.multiVideoWaitingForSave();
|
||||
case DO_NOT_PROCESS:
|
||||
return stringMessages.multiVideoDoNoAdd();
|
||||
default:
|
||||
return stringMessages.unknown();
|
||||
}
|
||||
@@ -612,11 +614,11 @@ public class MultiVideoDialog extends DialogBox {
|
||||
DONE,
|
||||
ALREADY_ADDED,
|
||||
GETTING_MEDIATRACK,
|
||||
ERROR_LINKING,
|
||||
DO_NOT_PROCESS;
|
||||
ERROR_LINKING;
|
||||
}
|
||||
|
||||
static class RemoteFileInfo {
|
||||
protected boolean selected;
|
||||
protected MediaTrack knownMediaTrack;
|
||||
protected Set<RegattaAndRaceIdentifier> candidates;
|
||||
protected MimeType mime;
|
||||
|
||||
+1
@@ -2182,4 +2182,5 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages,
|
||||
String multiVideoIdle();
|
||||
String multiVideoDoNoAdd();
|
||||
String multiVideoOffsetInput();
|
||||
String multiVideoDescription();
|
||||
}
|
||||
+2
-1
@@ -2170,4 +2170,5 @@ multiVideoWaitingForLinkPhase=Video is waiting for link phase
|
||||
multiVideoWaitingForSave=Waiting for confirmation
|
||||
multiVideoIdle=Work queue is idle
|
||||
multiVideoDoNoAdd=Do not add
|
||||
multiVideoOffsetInput=Global video offset in Millis:
|
||||
multiVideoOffsetInput=Global video offset in Millis:
|
||||
multiVideoDescription=It is required to use a webserver with indexfiles (subfolders supported if indexed). After an initial analysis of the metadata contained in the mp4 files, the videos that should be added, need to be selected via the checkbox column on the left. The add button will create mediatracks for all selected files, and add those files to all races selected in the right column.
|
||||
+2
-1
@@ -2166,4 +2166,5 @@ multiVideoWaitingForLinkPhase=Video wartet auf die Linkphase
|
||||
multiVideoWaitingForSave=Wartet auf Bestätigung
|
||||
multiVideoIdle=Keine Arbeit offen
|
||||
multiVideoDoNoAdd=Nicht hinzufügen
|
||||
multiVideoOffsetInput=Globales Videooffset in Millisekunden:
|
||||
multiVideoOffsetInput=Globales Videooffset in Millisekunden:
|
||||
multiVideoDescription=Ein Webserver mit Folderindex wird benötigt (Unterordner sind unterstützt, sofern diese auch indiziert sind). Nach einer initialen analyse der Metadaten von den mp4 Dateien, müssen die gewünschen Videos in der linken Spalte ausgewählt werden. Der Hinzufügen-Knopf erstellt für jedes selectierte Video einen MediaTrack, und fügt diesen zu allen Rennen hinzu, die in der rechten Spalte selectiert wurden.
|
||||
Reference in new issue
Block a user