Changeset 5529


Ignore:
Timestamp:
08/06/14 15:00:04 (10 years ago)
Author:
Twan Goosen
Message:

Added tooltips for the create/edit wizard labels in the markup based on the descriptions at CmdiVirtualCollection/Help?
#584

Location:
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/TooltipBehavior.java

    r5526 r5529  
    22
    33import org.apache.wicket.ResourceReference;
     4import org.apache.wicket.markup.html.resources.JavascriptResourceReference;
    45import org.apache.wicket.model.IModel;
    56import org.odlabs.wiquery.core.behavior.WiQueryAbstractBehavior;
     
    1718public class TooltipBehavior extends WiQueryAbstractBehavior {
    1819
    19     private static final ResourceReference JAVASCRIPT_RESOURCE
    20             = new ResourceReference(TooltipBehavior.class, "jquery.qtip-1.0.0-rc3.min.js");
     20    public static final ResourceReference QTIP_JAVASCRIPT_RESOURCE
     21            = new JavascriptResourceReference(TooltipBehavior.class, "jquery.qtip-1.0.0-rc3.min.js");
    2122
    2223    private final IModel<String> tooltipModel;
     
    2829    @Override
    2930    public void contribute(WiQueryResourceManager wiQueryResourceManager) {
    30         wiQueryResourceManager.addJavaScriptResource(JAVASCRIPT_RESOURCE);
     31        wiQueryResourceManager.addJavaScriptResource(QTIP_JAVASCRIPT_RESOURCE);
    3132    }
    3233
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/wizard/CreateVirtualCollectionWizard$CreatorsStep.html

    r5522 r5529  
    1111<div class="fieldset">
    1212  <label>Creators<br />
    13     <a href="#" wicket:id="add" class="add"><span>[add]</span></a><br />
    14     <a href="#" wicket:id="addme" class="add"><span>[add me]</span></a>
     13    <a id="add" href="#" wicket:id="add" class="add tooltipparent"><span>[add]</span><span class="tooltip">Add a new creator</span></a><br />
     14    <a id="addme" href="#" wicket:id="addme" class="add tooltipparent"><span>[add me]</span><span class="tooltip">Add a new creator with the available user details already filled in</span></a>
    1515  </label>
    1616  <table wicket:id="creatorsTable" class="creatorsTable"></table>
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/wizard/CreateVirtualCollectionWizard$GeneralStep.html

    r5436 r5529  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    3                       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
     3    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    44<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/">
    55<head />
    6 <body>
    7 <wicket:panel>
    8 <div style="display: none" wicket:id="addKeywordDialog"></div>
    9 <div style="display: none" wicket:id="deleteKeywordDialog"></div>
    10 <fieldset>
    11   <div class="notes">
    12     <h4>Some Notes</h4>
    13     <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.</p>
    14     <p class="last">Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.</p>
    15   </div>
    16   <div class="required">
    17     <label for="gen_vc_name">Name</label>
    18     <input wicket:id="name"
    19            id="gen_vc_name" type="text" size="64" maxlength="255"/>
    20   </div>
    21   <div class="required">
    22     <label for="gen_vc_type">Type</label>
    23     <select wicket:id="type" id="gen_vc_type"></select>
    24   </div>
    25   <div class="optional">
    26     <label for="gen_vc_desc">Description</label>
    27     <textarea wicket:id="description"
    28               id="gen_vc_desc" cols="80" rows="8"></textarea>
    29   </div>
    30   <div class="optional">
    31     <label for="gen_vc_purpose">Purpose</label>
    32     <select wicket:id="purpose" id="gen_vc_purpose"></select>
    33   </div>
    34   <div class="optional">
    35     <label for="gen_vc_reproducibility">Reproducibility</label>
    36     <select wicket:id="reproducibility"
    37             id="gen_vc_reproducibility"></select>
    38   </div>
    39   <div class="optional">
    40     <label for="gen_vc_reproducibility_notice">Reproducibility Notice</label>
    41     <textarea wicket:id="reproducibilityNotice"
    42               id="gen_vc_reproducibility_notice" cols="80" rows="5"></textarea>
    43   </div>
    44   <div class="optional">
    45     <label>Keywords<br /><a href="#"
    46       wicket:id="keywordsAdd" class="add"><span>[add]</span></a></label>
    47     <div wicket:id="keywordsList" class="keywordsList">
    48       <ul>
    49         <li wicket:id="keywords">
    50           <span wicket:id="itemText">item text</span>
    51           <a wicket:id="itemRemove" href="#"><span class="delete">[delete]</span></a>
    52         </li>
    53       </ul>
    54     </div>
    55   </div>
    56 </fieldset>
    57 </wicket:panel>
    58 </body>
     6    <body>
     7        <wicket:panel>
     8            <div style="display: none" wicket:id="addKeywordDialog"></div>
     9            <div style="display: none" wicket:id="deleteKeywordDialog"></div>
     10            <fieldset>
     11                <div class="notes">
     12                    <h4>Provide general information</h4>
     13                    <p>
     14                        Use the form to fill in the general information for this virtual collection.
     15                        Name and type are mandatory. It is highly recommended to write a short description,
     16                        add one or more keywords and select a purpose and a reproducibility indication.
     17                    </p>
     18                    <p class="last">
     19                        Hover over the labels of the individual fields to get more information.
     20                    </p>
     21                </div>
     22                <div class="required">
     23                    <label id="namelabel" class="tooltipparent" for="gen_vc_name">Name
     24                        <span class="tooltip">
     25                            A short but descriptive name of the virtual collection for listings and views
     26                        </span>
     27                    </label>
     28                    <input wicket:id="name"
     29                           id="gen_vc_name" type="text" size="64" maxlength="255"/>
     30                </div>
     31                <div class="required">
     32                    <label id="typelabel" class="tooltipparent" for="gen_vc_type">Type
     33                        <span class="tooltip">
     34                            Type of Virtual Collection, either intensional or extensional<br /><br />
     35                            Extensional: Type of virtual collection that explicitly enumerates the references to resources or metadata documents that make up the collection<br /><br />
     36                            Intensional: Type of virtual collection that defines a query by which the items of the collection can be retrieved ad-hoc from a secondary service <em>(experimental, use at own risk!)</em>
     37                        </span>
     38                    </label>
     39                    <select wicket:id="type" id="gen_vc_type"></select>
     40                </div>
     41
     42                <div class="optional">
     43                    <label id="descriptionlabel" class="tooltipparent" for="gen_vc_desc">Description
     44                        <span class="tooltip">
     45                            A prose description of this virtual collection
     46                        </span>
     47                    </label>
     48                    <textarea wicket:id="description"
     49                              id="gen_vc_desc" cols="80" rows="8"></textarea>
     50                </div>
     51                <div class="optional">
     52                    <label id="purposelabel" class="tooltipparent" for="gen_vc_purpose">Purpose
     53                        <span class="tooltip">
     54                            An indication of the intended usage of the present virtual collection<br /><br />
     55                            Research: The virtual collection bundles resources that are relevant to a specific research (question).<br /><br />
     56                            Reference: The virtual collection bundles resources, that are to be cited in a publication.<br /><br />
     57                            Sample: This virtual collection bundles is intended to serve as an sample for research data<br /><br />
     58                            Future-use: The purpose of this virtual collection is not specified yet. Used in published collection is advised against.
     59                        </span>
     60                    </label>
     61                    <select wicket:id="purpose" id="gen_vc_purpose"></select>
     62                </div>
     63                <div class="optional">
     64                    <label id="reproducibilitylabel" class="tooltipparent" for="gen_vc_reproducibility">Reproducibility
     65                        <span class="tooltip">
     66                            An indication of the degree to which results obtained from processing of the present collection can be expected to be stable<br /><br />
     67                            Intended: Processing results can be expected to remain stable<br /><br />
     68                            Fluctuating: Processing results may vary<br /><br />
     69                            Untended: No claims with respect to the stability of the processing results are made
     70                        </span>
     71                    </label>
     72                    <select wicket:id="reproducibility"
     73                            id="gen_vc_reproducibility"></select>
     74                </div>
     75                <div class="optional">
     76                    <label id="repronotelabel" class="tooltipparent" for="gen_vc_reproducibility_notice">Reproducibility Notice
     77                        <span class="tooltip">
     78                            Optional note describing the expected reproducibility of processing results in more detail
     79                        </span>
     80                    </label>
     81                    <textarea wicket:id="reproducibilityNotice"
     82                              id="gen_vc_reproducibility_notice" cols="80" rows="5"></textarea>
     83                </div>
     84                <div class="optional">
     85                    <label id="keywordslabel" class="tooltipparent" >Keywords<br /><a href="#"
     86                                                                                      wicket:id="keywordsAdd" class="add"><span>[add]</span></a>
     87                        <span class="tooltip">
     88                            A set of words or short phrases, each signifying a salient facet of the present virtual collection
     89                        </span>
     90                    </label>
     91                    <div wicket:id="keywordsList" class="keywordsList">
     92                        <ul>
     93                            <li wicket:id="keywords">
     94                                <span wicket:id="itemText">item text</span>
     95                                <a wicket:id="itemRemove" href="#"><span class="delete">[delete]</span></a>
     96                            </li>
     97                        </ul>
     98                    </div>
     99                </div>
     100            </fieldset>
     101        </wicket:panel>
     102    </body>
    59103</html>
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/wizard/CreateVirtualCollectionWizard$GeneratedByStep.html

    r5436 r5529  
    1515  </div>
    1616  <div class="required">
    17      <label for="gen_desc">Description</label>
     17     <label id="descriptionlabel" class="tooltipparent" for="gen_desc">Description
     18         <span class="tooltip">
     19             A prose description of the procedure by which the collection items can be retrieved from the external service.
     20         </span>
     21     </label>
    1822     <textarea wicket:id="generatedBy.description"
    1923               id="gen_desc" rows="5" cols="80"></textarea>
    2024  </div>
    2125  <div class="optional">
    22      <label for="gen_uri">URI</label>
     26     <label id="urilabel" class="tooltipparent" for="gen_uri">URI
     27         <span class="tooltip">
     28            The location of the service from which the items should be retrieved. This value may be a persistent identifier, but could also be a plain URI although this is advised against for published collections.
     29         </span>
     30     </label>
    2331     <input wicket:id="generatedBy.uri"
    2432            id="gen_uri" type="text" size="64" maxlength="255" />
    2533  </div>
    2634  <div class="optional">
    27      <label for="gen_query_profile">Query Profile</label>
     35     <label id="profilelabel" class="tooltipparent" for="gen_query_profile">Query Profile
     36         <span class="tooltip">
     37            Identifier of the mechanism, i.e. the protocol to be used, by which the members of the virtual collection should be retrieved. A application exploiting the query can use this to use a proper driver to talk to the service. Example: In case of CLARIN-FCS access the endpoint by FCS-compatible means.
     38         </span>
     39     </label>
    2840     <input wicket:id="generatedBy.query.profile"
    2941            id="gen_query_profile" type="text" size="64" maxlength="255" />
    3042  </div>
    3143  <div class="optional">
    32      <label for="gen_query_value">Query value</label>
     44     <label id="valuelabel" class="tooltipparent" for="gen_query_value">Query value
     45         <span class="tooltip">
     46            The query that should be passed on to the service by which it can look up the items that are part of this collection. This value should be in the query language supported by the service. Example: In case of CLARIN-FCS, this value is the CQL query to be send to the endpoint.
     47         </span>
     48     </label>
    3349     <textarea wicket:id="generatedBy.query.value"
    3450               id="gen_query_value" rows="5" cols="80"></textarea>
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/wizard/CreateVirtualCollectionWizard$ResourcesStep.html

    r5494 r5529  
    1111<div style="display: none" wicket:id="addResourcesDialog"></div>
    1212<div wicket:id="resourcesContainer" class="fieldset">
    13   <label class="required">Resources<br /><a wicket:id="add" href="#" class="add"><span>[add]</span></a><br /><a wicket:id="addMore" href="#" class="addMore"><span>[add more]</span></a></label>
     13  <label class="required">Resources<br />
     14      <a id="add" wicket:id="add" href="#" class="add tooltipparent"><span>[add]</span><span class="tooltip">Add a single new resource or metadata reference with an optional label and/or description</span></a><br />
     15      <a id="addmore" wicket:id="addMore" href="#" class="addMore tooltipparent"><span>[add more]</span><span class="tooltip">Add one or reference of the same type</span></a>
     16  </label>
    1417  <table wicket:id="resourcesTable" class="resourcesTable"></table>
    1518</div>
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/wizard/CreateVirtualCollectionWizard.java

    r5527 r5529  
    22
    33import eu.clarin.cmdi.virtualcollectionregistry.gui.ApplicationSession;
     4import eu.clarin.cmdi.virtualcollectionregistry.gui.TooltipBehavior;
    45import eu.clarin.cmdi.virtualcollectionregistry.gui.VolatileEntityModel;
    56import eu.clarin.cmdi.virtualcollectionregistry.gui.dialog.ConfirmationDialog;
     
    1314import java.util.List;
    1415import org.apache.wicket.Component;
     16import org.apache.wicket.ResourceReference;
    1517import org.apache.wicket.Session;
    1618import org.apache.wicket.ajax.AjaxRequestTarget;
     
    3941import org.apache.wicket.markup.html.form.TextField;
    4042import org.apache.wicket.markup.html.form.validation.AbstractFormValidator;
     43import org.apache.wicket.markup.html.internal.HtmlHeaderContainer;
    4144import org.apache.wicket.markup.html.list.ListItem;
    4245import org.apache.wicket.markup.html.list.ListView;
    4346import org.apache.wicket.markup.html.list.OddEvenListItem;
    4447import org.apache.wicket.markup.html.panel.Panel;
     48import org.apache.wicket.markup.html.resources.JavascriptResourceReference;
    4549import org.apache.wicket.markup.repeater.Item;
    4650import org.apache.wicket.model.AbstractReadOnlyModel;
     
    5357import org.apache.wicket.validation.validator.StringValidator;
    5458import org.apache.wicket.validation.validator.UrlValidator;
     59import org.odlabs.wiquery.core.commons.CoreJavaScriptResourceReference;
    5560
    5661@SuppressWarnings("serial")
     
    5964    @SpringBean
    6065    private CreatorProvider creatorProvider;
    61 
     66   
     67    private final static ResourceReference TOOLTIP_JAVASCRIPT_REFERENCE =
     68            new JavascriptResourceReference(CreateVirtualCollectionWizard.class, "tooltips.js");
     69
     70    @Override
     71    public void renderHead(HtmlHeaderContainer container) {
     72        super.renderHead(container);
     73        // Javascript dependencies for this page (jQuery tooltips)
     74        container.getHeaderResponse().renderJavascriptReference(CoreJavaScriptResourceReference.get());
     75        container.getHeaderResponse().renderJavascriptReference(TooltipBehavior.QTIP_JAVASCRIPT_RESOURCE);
     76        container.getHeaderResponse().renderJavascriptReference(TOOLTIP_JAVASCRIPT_REFERENCE);
     77    }
     78   
    6279    private final class GeneralStep extends DynamicWizardStep {
    6380
     
    133150            nameField.add(new StringValidator.MaximumLengthValidator(255));
    134151            add(nameField);
     152           
    135153            final DropDownChoice<VirtualCollection.Type> typeChoice
    136154                    = new DropDownChoice<VirtualCollection.Type>("type",
     
    138156                            new EnumChoiceRenderer<VirtualCollection.Type>(this));
    139157            typeChoice.setRequired(true);
     158//            typeChoice.add(new TooltipBehavior(new StringResourceModel("type.tooltip", CreateVirtualCollectionWizard.this, null)));
    140159            add(typeChoice);
     160           
    141161            add(new TextArea<String>("description"));
    142162            final DropDownChoice<VirtualCollection.Purpose> purposeChoice
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/webapp/css/vcr.css

    r5505 r5529  
    965965}
    966966
     967.tooltipparent .tooltip {
     968    display: none;
     969}
Note: See TracChangeset for help on using the changeset viewer.