Skip to content

Commit

Permalink
new settings design in exmaralda partitur page
Browse files Browse the repository at this point in the history
  • Loading branch information
bigabig committed Aug 9, 2017
1 parent 6ebb256 commit bbadc39
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
z-index:100;
position:absolute;
width:100%;
height:45px;
height:61px;
top:0;
left:0;
}
Expand Down Expand Up @@ -122,9 +122,6 @@
span#corpus-title{
color:blue;
}
#head {
height: 61px;
}
#head a{
text-decoration:none;
color:white;
Expand Down Expand Up @@ -534,7 +531,7 @@
<body onhashchange="vidjumpid(window.location.hash);">

<div wicket:id="documentdetailswindow"></div>
<div wicket:id="settingswindow"></div>
<div wicket:id="settingswindow" class="w_flex"></div>
<div wicket:id="speakerdetailswindowcontainer">
<div wicket:id="speakerdetailswindow"></div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.behavior.AttributeAppender;
import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.head.JavaScriptReferenceHeaderItem;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.CheckBox;
Expand All @@ -38,6 +40,7 @@
import de.tudarmstadt.ukp.clarin.webanno.model.Mediaresource;
import de.tudarmstadt.ukp.clarin.webanno.model.SourceDocument;
import de.tudarmstadt.ukp.clarin.webanno.support.lambda.AjaxCallback;
import de.tudarmstadt.ukp.clarin.webanno.ui.core.css.theme.CustomBootstrapLessReference;
import de.tudarmstadt.ukp.clarin.webanno.ui.exmaralda.helper.AnnotationTrack;
import de.tudarmstadt.ukp.clarin.webanno.ui.exmaralda.helper.MyBigSegment;
import de.tudarmstadt.ukp.clarin.webanno.ui.exmaralda.helper.MySegment;
Expand Down Expand Up @@ -190,6 +193,11 @@ protected void onEvent(AjaxRequestTarget target) {

}

// @Override
// public void renderHead(IHeaderResponse response) {
// response.render(JavaScriptReferenceHeaderItem.forReference(CustomBootstrapLessReference.get()));
// }

private Video createVideo(PartiturPreferences pref){
final Video video = new Video("media");
video.setPoster(new PackageResourceReference(getClass(), "no-video.jpg"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ public SettingsWindow(String id, SourceDocument doc) {
super(id);
this.doc = doc;

setInitialWidth(450);
setInitialHeight(350);
setInitialWidth(600);
setInitialHeight(450);
setResizable(true);
setWidthUnit("px");
setHeightUnit("px");
setTitle("Settings");
setCssClassName("w_blue w_flex");
setCloseButtonCallback((target) -> {
closeButtonClicked = true;
return true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,90 @@
<?xml version="1.0" encoding="UTF-8" ?>
<wicket:panel xmlns:wicket="http://wicket.apache.org">
<form wicket:id="preferenceform">

<table>
<tr>
<td colspan="2"><span wicket:id="info"></span></td>
</tr>
<tr>
<td>Partitur Table Width <br /> (enter 0 for content length):</td>
<td><input style="width: 100px; text-align:right;" wicket:id="partiturtablewidth" type="text" /></td>
</tr>
<tr>
<td>Select Media for Document:</td>
<td><select wicket:id="mediachoice"></select></td>
</tr>
<tr>
<td colspan="2" style="text-align: right;">
<button class="button" wicket:id="saveButton">Save</button>
<button class="button" wicket:id="cancelButton">Cancel</button>
</td>
</tr>
</table>

</form>
</wicket:panel>
<!DOCTYPE html>
<!--
#Copyright 2012
#Ubiquitous Knowledge Processing (UKP) Lab and FG Language Technology
#Technische Universität Darmstadt
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an "AS IS" BASIS,
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#See the License for the specific language governing permissions and
#limitations under the License.
-->
<html xmlns:wicket="http://wicket.apache.org">
<body>
<wicket:panel>
<form wicket:id="preferenceform" class="w_flex_container">
<div class="w_flex_content">
<div class="fluid-container">
<div class="row">
<div class="col-sm-12">
<fieldset class="form-horizontal">
<legend>Display Preferences</legend>
<div class="form-group">
<label class="col-sm-4 control-label">
Partitur Table Width <br /> (enter 0 for content length):
</label>
<div class="col-sm-8">
<div class="input-group">
<input wicket:id="partiturtablewidth" type="number" class="form-control text-right"></input>
<span class="input-group-addon">characters</span>
</div>
</div>
</div>

<!--
<div class="form-group">
<label class="col-sm-4 control-label"></label>
<div class="col-sm-8">
<div class="input-group">
<input type="number" class="form-control text-right"></input>
<span class="input-group-addon">%</span>
</div>
</div>
</div>
</fieldset>
-->

<fieldset class="form-horizontal">
<legend>Media Preferences</legend>
<div class="form-group">
<label class="col-sm-4 control-label">
Select Media for Document:
</label>
<div class="col-sm-8">
<select wicket:id="mediachoice" class="form-control"></select>
</div>
</div>

<!--
<div class="form-group">
<label class="col-sm-4 control-label"></label>
<div class="col-sm-8">
<div class="input-group">
<input type="number" class="form-control text-right"></input>
<span class="input-group-addon">%</span>
</div>
</div>
</div>
-->
</fieldset>
</div>
</div>
</div>
</div>
<div class="w_flex_footer panel-footer">
<div class="form-group pull-right">
<input wicket:id="saveButton" type="submit" class="btn btn-primary" wicket:message="value:save"></input>
<input wicket:id="cancelButton" type="button" class="btn btn-default" wicket:message="value:cancel"></input>
</div>
</div>
</form>
</wicket:panel>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.form.NumberTextField;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.spring.injection.annot.SpringBean;
Expand All @@ -35,7 +35,7 @@ public PartiturPreferenceForm(String id, final SettingsWindow settingsWindow) {

add(new Label("info", String.format("Project %d Document %d", getModelObject().document.getProject().getId(), getModelObject().document.getId())));

add(new TextField<Integer>("partiturtablewidth"));
add(new NumberTextField<Integer>("partiturtablewidth"));

List<Mediaresource> media_files = mediaService.listDocumentMediaMappings(getModelObject().document.getProject().getId(), getModelObject().document).stream().map(x -> x.getMedia()).collect(Collectors.toList());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h3 class="panel-title">Add Media Files</h3>
</div>
</div>
</div>
</div>
</div>
<div class="panel-footer text-right">
<input type="submit" class="btn btn-primary" wicket:id="upload" value="Add"></input>
</div>
Expand Down

0 comments on commit bbadc39

Please sign in to comment.