Changeset 1136


Ignore:
Timestamp:
Nov 15, 2010, 11:06:45 AM (10 years ago)
Author:
robert@…
Message:

Improved template editor to show field details when a field is selected for use in a template. See ticket 179

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/application.properties

    r1115 r1136  
    11#Grails Metadata file
    22#Tue Oct 26 16:55:24 CEST 2010
    3 app.grails.version=1.3.4
     3app.grails.version=1.3.5
    44app.name=gscf
    55app.servlet.version=2.4
     
    1414plugins.db-util=0.4
    1515plugins.famfamfam=1.0.1
    16 plugins.grom=0.1.15
     16plugins.grom=0.1.11
    1717plugins.hibernate=1.3.4
    1818plugins.jquery=1.4.3.2
  • trunk/grails-app/views/templateEditor/elements/_liFieldSelected.gsp

    r980 r1136  
    11<span class="listButtons">
     2  <img onClick="showTemplateFieldForm( 'templateField_' + ${templateField.id}); this.blur(); return false;" src="${createLinkTo( dir: 'images/icons', file: 'application_edit.png', plugin: 'famfamfam' )}" alt="Show template field properties" title="Show template field properties">
     3
    24  <g:if test="${template.inUse()}">
    35        <img class="disabled" src="${createLinkTo( dir: 'images/icons', file: 'delete.png', plugin: 'famfamfam' )}" alt="This field can not be removed from the template, as the template is still in use." title="This field can not be removed from the template, as the template is still in use.">
     
    1113  <b>${templateField.name}</b>
    1214  (<g:if test="${templateField.unit}">${templateField.unit}, </g:if><g:render template="elements/${templateField.type.toString().toLowerCase().replaceAll(/ /,'_')}" model="[templateField: templateField]"/>)
    13    
    1415
     16  <form class="templateField_form" id="templateField_${templateField.id}_form">
     17          <g:render template="elements/disabledFieldForm" model="['templateField': templateField, 'ontologies': ontologies, 'fieldTypes': fieldTypes]"/>
     18          <div class="templateFieldButtons">
     19                  <input type="button" value="Close" onClick="hideTemplateFieldForm( ${templateField.id} );">
     20          </div>
     21  </form>
  • trunk/grails-app/views/templateEditor/template.gsp

    r1077 r1136  
    4747                                        remove: removeTemplateFieldEvent,
    4848                                        start: savePosition
    49                                 }).disableSelection();
     49                                });
    5050
    5151
     
    5555                                        connectWith: '.templateFields',
    5656                                        start: savePosition
    57                                 }).disableSelection();
    58 
     57                                });
    5958
    6059                                $("#ontologyDialog").dialog({
     
    9695                                        <% /* NB: this empty field should always be the last in the list! */ %>
    9796                                        <li class="empty ui-state-default" <g:if test="${template.fields?.size() > 0 }">style='display: none;'</g:if>>This template does not yet contain any fields. Drag a field to this list or use the 'Add field button'.</li>
     97                                <input type="text" name="xxxas">
    9898                                </ol>
    9999                        </div>
  • trunk/web-app/css/templateEditor.css

    r1056 r1136  
    2727 */
    2828.templateFields { list-style-type: none;  margin: 0; padding: 0; width: 330px; }
    29 .templateFields li { margin: 0 5px 3px 5px; padding: 3px 5px; }
     29.templateFields li { margin: 0 5px 3px 5px; padding: 3px 5px; display: block; }
    3030html>body .templateFields li { line-height: 16px; vertical-align: center; }
    3131.ui-state-highlight { height: 17px; }
     
    8888        MozOpacity: 0.5;
    8989        -khtml-opacity:.50;
    90         -ms-filter:”alpha(opacity=50)”;
     90        -ms-filter:"alpha(opacity=50)";
    9191        -moz-opacity:.50;
    9292        filter:alpha(opacity=50);
  • trunk/web-app/js/templateEditor.js

    r1077 r1136  
    224224                // Disable all other listitems
    225225                $( '#availableTemplateFields li:not(#' + list_item_id + ')').addClass( 'ui-state-disabled' );
     226                $( '#selectedTemplateFields li:not(#' + list_item_id + ')').addClass( 'ui-state-disabled' );
    226227
    227228                if( list_item_id != 'templateField_new' ) {
     
    240241    // Enable all other listitems
    241242    $( '#availableTemplateFields li:not(#templateField_' + id + ')').removeClass( 'ui-state-disabled' );
     243        $( '#selectedTemplateFields li:not(#' + id + ')').removeClass( 'ui-state-disabled' );
    242244        $( '#addNew').removeClass( 'ui-state-disabled' );
    243245
Note: See TracChangeset for help on using the changeset viewer.