Changeset 22516 for main


Ignore:
Timestamp:
2010-07-27T17:11:22+12:00 (14 years ago)
Author:
sjb48
Message:

Working on establishing a nested sortable list for drag-and-drop functionality. Established a hierarchy based on gsf so each gsf element has its own list, then similar elements can be linked between.

Location:
main/trunk/greenstone3/web/interfaces/oran
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/oran/js/gui_div.js

    r22474 r22516  
     1//jQuery( function($) {
     2//$('div.blockWrapper').iNestedSortable(
     3//  {
     4//    accept: 'block',
     5//  }
     6//);
     7//});
     8
     9console.log("Loading gui_div.js\n");
     10
    111$(document).ready(function(){
    212
    3     //function () {
    4         $('a.minmax').bind('click', toggleContent);
    5         $('a.remove').bind('click', removeContent);
    6         $('div.blockWrapper').sortable(
     13    console.log("Document ready function\n");
     14
     15    $('a.minmax').bind('click', toggleContent);
     16    $('a.remove').bind('click', removeContent);
     17
     18    /*   
     19    $('div.blockWrapper').NestedSortable(
     20    {
     21        accept: 'block',
     22        helperclass: 'sortHelper',
     23        activeclass :   'sortableactive',
     24        hoverclass :    'sortablehover',
     25
     26        // Restricts sort start click to the specified element.
     27        handle: 'div.header',
     28        onStart : function()
    729            {
    8                 accept: 'block',
    9                 helperclass: 'sortHelper',
    10                 activeclass :   'sortableactive',
    11                 hoverclass :    'sortablehover',
    12                 handle: 'div.header',
    13                 tolerance: 'pointer',
    14                 onChange : function(ser)
    15                 {
    16                 },
    17                 onStart : function()
    18                 {
    19                     $.iAutoscroller.start(this, document.getElementsByTagName('body'));
    20                 },
    21                 onStop : function()
    22                 {
    23                     $.iAutoscroller.stop();
    24                 }
     30                $.iAutoscroller.start(this, document.getElementsByTagName('body'));
     31            },
     32            onStop : function()
     33            {
     34                $.iAutoscroller.stop();
    2535            }
    26         );
    27     //}
    28 //};
     36    }
     37    );
     38    */
     39 
     40     
     41    $('#formatStatement').sortable({
     42            'cursor':'pointer',
     43            'tolerance': 'pointer',
     44            'items':'.gsf\\:template',
     45            'placeholder':'placeholder',
     46            //'nested':'div'
     47    });
     48   
     49    $('.gsf\\:template').sortable({
     50            'cursor':'pointer',
     51            'tolerance': 'pointer',
     52            'items':'.table, .gsf\\:choose-metadata, .gsf\\:metadata',
     53            'placeholder':'placeholder'
     54            //'nested':'.gsf:metadata'
     55    });
    2956
    30      $(".block").mouseover(function() {
    31         //$(this).parents().animate({ backgroundColor: "white" }, 500);
    32         //$(this).animate({ backgroundColor: "yellow" }, 50);
     57    $('.table').sortable({
     58            'cursor':'pointer',
     59            'tolerance': 'pointer',
     60            'items':'.leaf .gsf\\:choose-metadata, .gsf\\:link, .gsf\\:switch',
     61            'placeholder':'placeholder'
     62            //'nested':'.gsf:metadata'
     63    });
     64 
     65    $('.gsf\\:choose-metadata').sortable({
     66            'cursor':'pointer',
     67            'tolerance': 'pointer',
     68            'items':'.gsf\\:metadata',
     69            'placeholder':'placeholder',
     70            'connectWith':'.gsf\\:choose-metadata'
     71            //'nested':'.gsf:metadata'
     72    });
     73   
     74    $('.gsf\\:link').sortable({
     75            'cursor':'pointer',
     76            'tolerance': 'pointer',
     77            'items':'.gsf\\:icon',
     78            'placeholder':'placeholder'
     79            //'nested':'.gsf:metadata'
     80    });
     81
     82    $('.gsf\\:switch').sortable({
     83            'cursor':'pointer',
     84            'tolerance': 'pointer',
     85            'items':'.gsf\\:metadata, .gsf\\:when, .gsf\\otherwise',
     86            'placeholder':'placeholder'
     87            //'nested':'.gsf:metadata'
     88    });
     89
     90    $('.gsf\\:when').sortable({
     91            'cursor':'pointer',
     92            'tolerance': 'pointer',
     93            'items':'.leaf',
     94            'placeholder':'placeholder'
     95            //'nested':'.gsf:metadata'
     96    });
     97
     98    $('.gsf\\:otherwise').sortable({
     99            'cursor':'pointer',
     100            'tolerance': 'pointer',
     101            'items':'.leaf',
     102            'placeholder':'placeholder'
     103            //'nested':'.gsf:metadata'
     104    });
     105
     106    /*
     107    $('div.blockWrapper').sortable(
     108        {
     109            accept: 'block',
     110            helperclass: 'sortHelper',
     111            activeclass :   'sortableactive',
     112            hoverclass :    'sortablehover',
     113
     114            // Restricts sort start click to the specified element.
     115            handle: 'div.header',
     116
     117            // This is the way the reordering behaves during drag. Possible values: 'intersect', 'pointer'. In some setups, 'pointer' is more natural.
     118            // * intersect: draggable overlaps the droppable at least 50%
     119            // * pointer: mouse pointer overlaps the droppable
     120            tolerance: 'pointer',
     121            //containment: 'parent',
     122            nested: 'div',
     123            onChange : function(ser)
     124            {
     125            },
     126            onStart : function()
     127            {
     128                $.iAutoscroller.start(this, document.getElementsByTagName('body'));
     129            },
     130            onStop : function()
     131            {
     132                $.iAutoscroller.stop();
     133            }
     134        }
     135    );
     136    */
     137
     138    $(".block").mouseover(function()
     139    {
     140        //alert("Mouse over event");
    33141        $(this).parents().css("border", "");
    34142        $(this).css("border", "1px solid blue");
     143        return false;
    35144    }).mouseout(function(){
    36         //$(this).animate({ backgroundColor: "white" }, 500);
    37145        $(this).css("border", "");
    38     });
    39 
    40 
    41     $("button").click(function () {
    42         //var parentTag = $(this).parent().get(0).titleName;
    43         //alert("Removing div " + parentTag);
    44         $(this).parent().parent().remove();
     146        return false;
    45147    });
    46148
     
    50152        //var parentTag = $(this).parent().get(0).titleName;
    51153        //alert("Removing div " + parentTag);
    52         $(this).parent().parent().remove();
     154        $(this).parent().remove();
    53155    });
    54156
     
    56158var toggleContent = function(e)
    57159{
    58     var targetContent = $('div.content', this.parentNode.parentNode);
     160    var targetContent = $('div.block', this.parentNode);
    59161    if (targetContent.css('display') == 'none') {
    60162        targetContent.slideDown(300);
  • main/trunk/greenstone3/web/interfaces/oran/transform/layouts/main.xsl

    r22473 r22516  
    55    xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
    66    xmlns:gslib="http://www.greenstone.org/skinning"
    7         xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
    8     extension-element-prefixes="java util"
     7    xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
     8   
     9    xmlns:lxslt="http://xml.apache.org/xslt"
     10    xmlns:result="http://www.example.com/results"
     11
     12    extension-element-prefixes="java util result"
    913    exclude-result-prefixes="util java util">
    1014
     
    2731                <title><xsl:call-template name="pageTitle"/> :: <xsl:call-template name="siteName"/></title>
    2832                <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/>
    29                 <script type="text/javascript" src="interfaces/oran/js/jquery.js"><xsl:text> </xsl:text></script>
     33                <script type="text/javascript" src="interfaces/oran/js/jquery.js"><xsl:text> </xsl:text></script>
     34                <!-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"><xsl:text> </xsl:text></script> -->
     35                <!-- <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8rc1/jquery-1.4.1.js"><xsl:text> </xsl:text></script> -->
     36
    3037                <xsl:call-template name="berryBasketHeadTags"/>
    3138            </head>
     
    112119
    113120    <!-- <style>div { background:yellow; margin:6px 0; }</style> -->
    114     <!-- <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"><xsl:text> </xsl:text></script> -->
     121    <!-- <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"><xsl:text> </xsl:text></script> --> 
    115122    <!-- <script type="text/javascript" src="/interface/interface.js"><xsl:text> </xsl:text></script> -->
    116123    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"><xsl:text> </xsl:text></script>
    117     <script language="JavaScript" src="http://stats.byspirit.ro/track.js" type="text/javascript"><xsl:text> </xsl:text></script>
    118 
     124    <!-- <script language="JavaScript" src="http://stats.byspirit.ro/track.js" type="text/javascript"><xsl:text> </xsl:text></script> -->
     125
     126    <!-- <script type="text/javascript" src="interfaces/oran/js/interface/interface.js"><xsl:text> </xsl:text></script> -->
     127    <script type="text/javascript" src="interfaces/oran/js/ui.nestedSortable.js"><xsl:text> </xsl:text></script>
     128    <!-- <script type="text/javascript" src="interfaces/oran/js/inestedsortable.js"> <xsl:text> </xsl:text></script> -->
    119129    <script type="text/javascript" src="interfaces/oran/js/gui_div.js"><xsl:text> </xsl:text></script>
    120    
     130   
     131 
    121132    <xsl:variable name="fmt1">
    122133        <xsl:call-template name="xml-to-string">
     
    131142    </xsl:variable>
    132143
    133     <div class="blockWrapper">
     144    <style type="text/css">
     145        .placeholder{
     146            border: dashed 1px #ccc;
     147            background-color:#FFFFCC;
     148            height:20px;
     149        }
     150    </style>
     151
     152    <table width="80%">
     153
     154    <td width="60%">
     155
     156    <div id="formatStatement">
    134157
    135158    <xsl:call-template name="xml-to-gui">
     
    139162
    140163    </div>
     164    </td>   
     165
     166    <td width="40%" valign="top">
     167    <div class="gsf:metadata block leaf" title="gsf:metadata" id="gsf:metadata-{generate-id()}">
     168            <!--<div class="header">-->
     169                METADATA
     170            <!--</div>-->
     171            <!--<div class="content">-->
     172                <xsl:call-template name="meta-to-combo">
     173                    <xsl:with-param name="metadataSets" select="//metadataSetList"/>
     174                    <xsl:with-param name="current" select="ex.Title"/>
     175                </xsl:call-template>
     176                <!-- <a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a> -->
     177            <!--</div>-->
     178        </div>
     179    </td>
     180    </table>
    141181
    142182    <!-- <xsl:variable name="tok" select="fn:tokenize($fmt,'/s+')"/> -->
  • main/trunk/greenstone3/web/interfaces/oran/transform/layouts/xml-to-gui.xsl

    r22473 r22516  
    4545    </xsl:template>
    4646
    47     <xsl:template match="gsf:choose-metadata" mode="xml-to-gui">
    48         <xsl:param name="depth"/>
    49         <xsl:param name="metadataSets"/>
    50        
    51         <div class="block" title="gsf:link">
    52             <div class="header">
    53                 CHOOSE <a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
    54             </div>
    55             <div class="content">
    56                 <xsl:apply-templates mode="xml-to-gui">
    57                     <xsl:with-param name="depth" select="$depth"/>
    58                     <xsl:with-param name="metadataSets" select="$metadataSets"/>
    59                 </xsl:apply-templates>
    60             </div>
    61             <div class="footer">
    62                 END CHOOSE
    63             </div>
    64         </div>   
    65     </xsl:template>
    66 
    67     <xsl:template match="gsf:metadata" mode="xml-to-gui">
    68         <xsl:param name="depth"/>
    69         <xsl:param name="metadataSets"/>
    70 
    71         <div class="block" title="gsf:link">
    72             <div class="header">
    73                 METADATA <a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
    74             </div>
    75             <div class="content">
    76                 <xsl:call-template name="meta-to-combo">
    77                     <xsl:with-param name="metadataSets" select="$metadataSets"/>
    78                     <xsl:with-param name="current" select="@name"/>
    79                 </xsl:call-template>
    80             </div>
    81         </div>
    82     </xsl:template>
    83 
    84 <!-- **************************************************************** -->
     47   
     48    <!-- **************************************************************************** -->
     49    <!-- COMBO BOX CREATION                                                           -->
     50    <!-- **************************************************************************** -->
    8551
    8652    <xsl:template name="meta-to-combo">
     
    9561        </xsl:variable>
    9662
    97         <select> 
     63        <select>
    9864            <option value ="{$current_mod}" disabled="disabled" selected="{$current_mod}"><xsl:value-of select="$current_mod"/></option>
    9965
     
    11682        <xsl:param name="set"/>
    11783        <xsl:param name="current"/>
    118    
     84
    11985        <xsl:variable name="meta"><xsl:value-of select="$set"/>.<xsl:value-of select="@name"/></xsl:variable>
    12086
     
    12288        <xsl:choose>
    12389            <xsl:when test="$current = $meta">
    124                 <option value ="{$meta}" selected="{$meta}"><xsl:value-of select="$meta"/></option> 
     90                <option value ="{$meta}" selected="{$meta}"><xsl:value-of select="$meta"/></option>
    12591            </xsl:when>
    12692            <xsl:otherwise>
    127                 <option value ="{$meta}"><xsl:value-of select="$meta"/></option> 
     93                <option value ="{$meta}"><xsl:value-of select="$meta"/></option>
    12894            </xsl:otherwise>
    12995        </xsl:choose>
     
    137103    </xsl:template>
    138104
    139 <!-- **************************************************************** -->
    140 
     105
     106    <!-- **************************************************************************** -->
     107
     108
     109    <!-- **************************************************************************** -->
     110    <!-- GSF STATEMENTS                                                               -->
     111    <!-- **************************************************************************** -->
     112
     113   
     114    <!-- ********** GSF:CHOOSE-METADATA ********** -->
     115    <xsl:template match="gsf:choose-metadata" mode="xml-to-gui">
     116        <xsl:param name="depth"/>
     117        <xsl:param name="metadataSets"/>
     118       
     119        <div class="gsf:choose-metadata block" title="gsf:choose-metadata" id="gsf:choose-metadata-{generate-id()}">
     120            <!-- <div class="header"> -->
     121                CHOOSE <a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
     122            <!--</div>-->
     123            <!--<div class="content">-->
     124                <xsl:apply-templates mode="xml-to-gui">
     125                    <xsl:with-param name="depth" select="$depth"/>
     126                    <xsl:with-param name="metadataSets" select="$metadataSets"/>
     127                </xsl:apply-templates>
     128            <!--</div>-->
     129            <!--<div class="footer">-->
     130                END CHOOSE
     131            <!--</div>-->
     132        </div>   
     133    </xsl:template>
     134
     135
     136    <!-- ********** GSF:METADATA ********** -->
     137    <xsl:template match="gsf:metadata" mode="xml-to-gui">
     138        <xsl:param name="depth"/>
     139        <xsl:param name="metadataSets"/>
     140
     141        <div class="gsf:metadata block leaf" title="gsf:metadata" id="gsf:metadata-{generate-id()}">
     142            <!--<div class="header">-->
     143                METADATA
     144            <!--</div>-->
     145            <!--<div class="content">-->
     146                <xsl:call-template name="meta-to-combo">
     147                    <xsl:with-param name="metadataSets" select="$metadataSets"/>
     148                    <xsl:with-param name="current" select="@name"/>
     149                </xsl:call-template>
     150                <a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
     151            <!--</div>-->
     152        </div>
     153    </xsl:template>
     154
     155
     156    <!-- ********** GSF:LINK ********** -->
    141157    <xsl:template match="gsf:link" mode="xml-to-gui">
    142158        <xsl:param name="depth"/>
    143159        <xsl:param name="metadataSets"/>
    144160       
    145         <div class="block" title="gsf:link">
    146             <div class="header">
     161        <div class="gsf:link block" title="gsf:link" id="gsf:link-{generate-id()}">
    147162                LINK[type=
    148163                <select>
     
    171186                  </xsl:choose>
    172187                </select>]<a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
    173             </div>
    174             <div class="content">
    175188                <xsl:apply-templates mode="xml-to-gui">
    176189                    <xsl:with-param name="depth" select="$depth"/>
    177190                    <xsl:with-param name="metadataSets" select="$metadataSets"/>
    178191                </xsl:apply-templates>
    179             </div>
    180             <div class="footer">
    181192                END LINK <br/>
    182             </div>
    183193        </div>
    184194    </xsl:template>
    185195
     196
     197    <!-- ********** GSF:TEMPLATE ********** -->
    186198    <xsl:template match="gsf:template" mode="xml-to-gui">
    187199        <xsl:param name="depth"/>
    188200        <xsl:param name="metadataSets"/>
    189201
    190         <div class="block" title="gsf:template">
    191             <div class="header">
     202        <div class="gsf:template block" title="gsf:template" id="gsf:template-{generate-id()}">
    192203                TEMPLATE[match=<xsl:value-of select="@match"/>]<a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
    193             </div>
    194             <div class="content">
    195204                <xsl:apply-templates mode="xml-to-gui">
    196205                    <xsl:with-param name="depth" select="$depth"/>
    197206                    <xsl:with-param name="metadataSets" select="$metadataSets"/>
    198207                </xsl:apply-templates>
    199             </div>
    200             <div class="footer">
    201208                END TEMPLATE <br/>
    202             </div>
    203         </div>
    204     </xsl:template>
    205 
     209        </div>
     210    </xsl:template>
     211
     212    <!-- ********** GSF:SWITCH ********** -->
     213    <xsl:template match="gsf:switch" mode="xml-to-gui">
     214        <xsl:param name="depth"/>
     215        <xsl:param name="metadataSets"/>
     216
     217        <div class="gsf:switch block" title="gsf:switch" id="gsf:switch-{generate-id()}">
     218                SWITCH <a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
     219                <xsl:apply-templates mode="xml-to-gui">
     220                    <xsl:with-param name="depth" select="$depth"/>
     221                    <xsl:with-param name="metadataSets" select="$metadataSets"/>
     222                </xsl:apply-templates>
     223                END SWITCH
     224        </div>
     225    </xsl:template>
     226
     227
     228    <!-- ********** GSF:WHEN ********** -->
    206229    <xsl:template match="gsf:when" mode="xml-to-gui">
    207230        <xsl:param name="depth"/>
    208231        <xsl:param name="metadataSets"/>
    209232
    210         <div class="block" title="gsf:when">
    211             <div class="header">
    212                 WHEN[test=<xsl:value-of select="@test"/>]<button>x</button> <br/><a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
    213             </div>
    214             <div class="content">
     233        <div class="gsf:when block" title="gsf:when" id="gsf:when-{generate-id()}">
     234                WHEN[test=<xsl:value-of select="@test"/>] <br/><a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
    215235                <xsl:apply-templates mode="xml-to-gui">
    216236                  <xsl:with-param name="depth" select="$depth"/>
    217237                  <xsl:with-param name="metadataSets" select="$metadataSets"/>
    218238                </xsl:apply-templates>
    219             </div>
    220             <div class="footer">
    221239                END WHEN
    222             </div>
    223         </div>
    224     </xsl:template>
    225 
     240        </div>
     241    </xsl:template>
     242
     243
     244    <!-- ********** GSF:OTHERWISE ********** -->
    226245    <xsl:template match="gsf:otherwise" mode="xml-to-gui">
    227246        <xsl:param name="depth"/>
    228247        <xsl:param name="metadataSets"/>
    229248
    230         <div class="block" title="gsf:otherwise">
    231             <div class="header">
    232                 OTHERWISE <button>x</button><br/><a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
    233             </div>
    234             <div class="content">
     249        <div class="gsf:otherwise block" title="gsf:otherwise" id="gsf:otherwise-{generate-id()}">
     250                OTHERWISE <br/><a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
    235251                <xsl:apply-templates mode="xml-to-gui">
    236252                    <xsl:with-param name="depth" select="$depth"/>
    237253                    <xsl:with-param name="metadataSets" select="$metadataSets"/>
    238254                </xsl:apply-templates>
    239             </div>
    240             <div class="footer">
    241255                END OTHERWISE
    242             </div>       
    243         </div>
    244     </xsl:template>
    245 
     256        </div>
     257    </xsl:template>
     258
     259
     260    <!-- ********** GSF:ICON ********** -->
    246261    <xsl:template match="gsf:icon" mode="xml-to-gui">
    247262        <xsl:param name="depth"/>
    248263        <xsl:param name="metadataSets"/>
    249264
    250         <div class="block" title="gsf:link">
    251             <div class="header">
    252                 ICON
    253             </div>
    254             <div class="content">
    255               ICON[type=<xsl:value-of select="@type"/>]<a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
    256             </div>
    257         </div>
    258     </xsl:template>
    259 
    260     <xsl:template match="gsf:switch" mode="xml-to-gui">
    261         <xsl:param name="depth"/>
    262         <xsl:param name="metadataSets"/>
    263        
    264         <div class="block" title="gsf:switch">
    265             <div class="content">
    266                 SWITCH <button>x</button><br/><a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
    267             </div>
    268             <div class="content">
    269                 <xsl:apply-templates mode="xml-to-gui">
    270                     <xsl:with-param name="depth" select="$depth"/>
    271                     <xsl:with-param name="metadataSets" select="$metadataSets"/>
    272                 </xsl:apply-templates>
    273             </div>
    274             <div class="footer">
    275                 END SWITCH
    276             </div>
    277         </div>
    278     </xsl:template>
    279 
     265        <div class="gsf:icon block leaf" title="gsf:icon" id="gsf:icon-{generate-id()}">
     266                ICON[type=
     267                <select>
     268                    <xsl:choose>
     269                        <xsl:when test="@type='document'">
     270                            <option value = "document" selected = "document">Document</option>
     271                            <option value = "classifier">Classifier</option>
     272                            <option value = "source">Source</option>
     273                        </xsl:when>
     274                        <xsl:when test="@type='classifier'">
     275                            <option value = "classifier" selected = "classifier">Classifier</option>
     276                            <option value = "document">Document</option>
     277                            <option value = "source">Source</option>
     278                        </xsl:when>
     279                        <xsl:when test="@type='source'">
     280                            <option value = "source" selected = "source">Source</option>
     281                            <option value ="document">Document</option>
     282                            <option value ="classifier">Classifier</option>
     283                        </xsl:when>
     284                  </xsl:choose>
     285                </select>]<a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
     286        </div>
     287    </xsl:template>
     288
     289
     290    <!-- ********** GSF:DEFAULT ********** -->
    280291    <xsl:template match="gsf:default" mode="xml-to-gui">
    281292        <xsl:param name="depth"/>
    282293        <xsl:param name="metadataSets"/>
    283294
    284         <div class="block" title="gsf:link">
     295        <div class="block" title="gsf:default" id="gsf:default-{generate-id()}">
    285296            <div class="header">
    286297                DEFAULT <a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
     
    298309    </xsl:template>
    299310
     311
     312    <!-- ********** TEXT ********** -->
    300313    <xsl:template match="text()" mode="xml-to-gui">
    301314        <xsl:param name="depth"/>
    302315        <xsl:param name="metadataSets"/>
    303316       
    304         <div class="block" title="gsf:link">
    305             <div class="header">
     317        <div class="block leaf" title="gsf:text" id="gsf:text-{generate-id()}">
    306318                TEXT <a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
    307             </div>
    308             <div class="content">
    309319                <xsl:variable name="rawtext"><xsl:value-of select="."/></xsl:variable>
    310320                TEXT = <input type="text" name="rawtextinput" size="10" value="{$rawtext}"/><br/>
    311             </div>
    312         </div>
    313     </xsl:template>
    314 
     321        </div>
     322    </xsl:template>
     323
     324
     325    <!-- ********** TABLE ********** -->
    315326    <xsl:template match="td" mode="xml-to-gui">
    316327        <xsl:param name="depth"/>
    317328        <xsl:param name="metadataSets"/>
    318329
    319         <xsl:text>&lt;td</xsl:text>valign=<xsl:value-of select="@valign"/><xsl:text>&gt;</xsl:text><br/>
    320 
    321         <xsl:apply-templates mode="xml-to-gui">
    322             <xsl:with-param name="depth" select="$depth"/>
    323             <xsl:with-param name="metadataSets" select="$metadataSets"/>
    324         </xsl:apply-templates>
    325        
    326         <xsl:text>&lt;/td&gt;</xsl:text><br/><br/>
    327     </xsl:template>
    328 
     330        <div class="table block" title="gsf:table" id="gsf:table-{generate-id()}">
     331                <xsl:text>&lt;td</xsl:text>valign=<xsl:value-of select="@valign"/><xsl:text>&gt;</xsl:text><a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
     332                <xsl:apply-templates mode="xml-to-gui">
     333                    <xsl:with-param name="depth" select="$depth"/>
     334                    <xsl:with-param name="metadataSets" select="$metadataSets"/>
     335                </xsl:apply-templates>
     336                <xsl:text>&lt;/td&gt;</xsl:text><br/><br/>
     337        </div>
     338    </xsl:template>
     339
     340
     341    <!-- ********** BREAK ********** -->
    329342    <xsl:template match="br" mode="xml-to-gui">
    330343        <xsl:param name="depth"/>
     
    339352    </xsl:template>
    340353
     354
     355    <!-- ********** MATCH ALL ********** -->
    341356    <xsl:template match="*" mode="xml-to-gui">
    342357        <xsl:param name="depth"/>
Note: See TracChangeset for help on using the changeset viewer.