source: trunk/www/lims/arrayslides/list_slides.jsp @ 5674

Last change on this file since 5674 was 5674, checked in by Nicklas Nordborg, 12 years ago

Fixes #1611: Checkbox enabled lists for enumerated annotations

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 19.9 KB
Line 
1<%-- $Id: list_slides.jsp 5674 2011-06-27 12:29:52Z nicklas $
2  ------------------------------------------------------------------
3  Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson
4  Copyright (C) 2007 Johan Enell, Martin Svensson
5
6  This file is part of BASE - BioArray Software Environment.
7  Available at http://base.thep.lu.se/
8
9  BASE is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public License
11  as published by the Free Software Foundation; either version 3
12  of the License, or (at your option) any later version.
13
14  BASE is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  GNU General Public License for more details.
18
19  You should have received a copy of the GNU General Public License
20  along with BASE. If not, see <http://www.gnu.org/licenses/>.
21  ------------------------------------------------------------------
22
23  @author Nicklas
24  @version 2.0
25--%>
26<%@ page pageEncoding="UTF-8" session="false"
27  import="net.sf.basedb.core.SessionControl"
28  import="net.sf.basedb.core.DbControl"
29  import="net.sf.basedb.core.Item"
30  import="net.sf.basedb.core.PhysicalBioAssay"
31  import="net.sf.basedb.core.ArraySlide"
32  import="net.sf.basedb.core.AnnotationType"
33  import="net.sf.basedb.core.AnnotationSet"
34  import="net.sf.basedb.core.Annotation"
35  import="net.sf.basedb.core.ItemQuery"
36  import="net.sf.basedb.core.Include"
37  import="net.sf.basedb.core.ItemResultIterator"
38  import="net.sf.basedb.core.ItemResultList"
39  import="net.sf.basedb.core.ItemContext"
40  import="net.sf.basedb.core.Nameable"
41  import="net.sf.basedb.core.Permission"
42  import="net.sf.basedb.core.PluginDefinition"
43  import="net.sf.basedb.core.query.Hql"
44  import="net.sf.basedb.core.query.Restrictions"
45  import="net.sf.basedb.core.query.Expressions"
46  import="net.sf.basedb.core.plugin.GuiContext"
47  import="net.sf.basedb.core.plugin.Plugin"
48  import="net.sf.basedb.util.Enumeration"
49  import="net.sf.basedb.util.ShareableUtil"
50  import="net.sf.basedb.clients.web.Base"
51  import="net.sf.basedb.clients.web.ModeInfo"
52  import="net.sf.basedb.clients.web.PermissionUtil"
53  import="net.sf.basedb.clients.web.util.HTML"
54  import="net.sf.basedb.util.Values"
55  import="net.sf.basedb.util.formatter.Formatter"
56  import="net.sf.basedb.clients.web.formatter.FormatterFactory"
57  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
58  import="net.sf.basedb.clients.web.extensions.JspContext"
59  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
60  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
61  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
62  import="java.util.Date"
63  import="java.util.Iterator"
64  import="java.util.List"
65  import="java.util.Map"
66%>
67<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
68<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
69<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
70<%!
71  private static final Item itemType = Item.ARRAYSLIDE;
72  private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST);
73%>
74<%
75final SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.DENIED, itemType);
76final String ID = sc.getId();
77final boolean createPermission = sc.hasPermission(Permission.CREATE, itemType);
78final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null);
79
80final ModeInfo mode = ModeInfo.get(request.getParameter("mode"));
81final String callback = request.getParameter("callback");
82final String title = mode.generateTitle("array slide", "array slides");
83final DbControl dc = sc.newDbControl();
84ItemResultIterator<ArraySlide> slides = null;
85ItemResultList<AnnotationType> annotationTypes = null;
86try
87{
88  Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
89  final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
90
91  Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext);
92  annotationTypes = annotationTypeQuery.list(dc);
93  try
94  {
95    final ItemQuery<ArraySlide> query = Base.getConfiguredQuery(dc, cc, true, ArraySlide.getQuery(), mode);
96    slides = query.iterate(dc);
97  }
98  catch (Throwable t)
99  {
100    cc.setMessage(t.getMessage());
101    t.printStackTrace();
102  }
103  int numListed = 0;
104  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, null);
105  ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext);
106  %>
107  <base:page title="<%=title==null ? "Array slides" : title%>" type="<%=mode.getPageType()%>">
108  <base:head scripts="menu.js,table.js" styles="menu.css,table.css">
109    <ext:scripts context="<%=jspContext%>" />
110    <ext:stylesheets context="<%=jspContext%>" />
111    <script language="JavaScript">
112    var submitPage = 'index.jsp';
113    var formId = 'slides';
114    function newItem()
115    {
116      Main.viewOrEditItem('<%=ID%>', '<%=itemType.name()%>', 0, true);
117    }
118    function newItems()
119    {     
120      Main.openPopup('index.jsp?ID=<%=ID%>&cmd=NewItems', 'NewArraySlides', 800, 500);
121    }
122    function editItem(itemId)
123    {
124      Main.viewOrEditItem('<%=ID%>', '<%=itemType.name()%>', itemId, true);
125    }
126    function viewItem(itemId)
127    {
128      Main.viewOrEditItem('<%=ID%>', '<%=itemType.name()%>', itemId, false);
129    }
130    function itemOnClick(evt, itemId)
131    {
132      Table.itemOnClick(formId, evt, itemId, '<%=mode.getName()%>', viewItem, editItem, returnSelected);
133    }
134    function deleteItems()
135    {
136      var frm = document.forms[formId];
137      if (Forms.numChecked(frm) == 0)
138      {
139        alert('Please select at least one item in the list');
140        return;
141      }
142      frm.action = submitPage;
143      frm.cmd.value = 'DeleteItems';
144      frm.submit();
145    }
146    function restoreItems()
147    {
148      var frm = document.forms[formId];
149      if (Forms.numChecked(frm) == 0)
150      {
151        alert('Please select at least one item in the list');
152        return;
153      }
154      frm.action = submitPage;
155      frm.cmd.value = 'RestoreItems';
156      frm.submit();
157    }
158    function deleteItemPermanently(itemId)
159    {
160      Main.deleteItemPermanently('<%=ID%>', true, '<%=itemType.name()%>', itemId);
161    }
162    function setOwner()
163    {
164      Table.setOwnerOfItems(submitPage, '<%=ID%>', formId, '<%=itemType.name()%>', 'SetOwnerOfItems');
165    }
166    function shareItem(itemId)
167    {
168      Main.openPopup('index.jsp?ID=<%=ID%>&cmd=ShareItem&item_id='+itemId, 'ShareSlides', 600, 400);
169    }
170    function shareItems()
171    {
172      Table.shareItems(submitPage, '<%=ID%>', formId, '<%=itemType.name()%>', 'ShareItems');
173    }
174    function configureColumns()
175    {
176      Table.configureColumns('<%=ID%>', formId, '<%=itemType.name()%>', '<%=(String)cc.getObject("defaultColumns")%>');
177    }
178    function runPlugin(cmd)
179    {
180      Table.submitToPopup(formId, cmd, 740, 540);
181    }
182    function returnSelected()
183    {
184      Table.returnSelected(formId, <%=callback != null ? "window.opener."+callback : "null" %>);
185      window.close();
186    }
187    function presetOnChange()
188    {
189      Table.presetOnChange('<%=ID%>', formId, '<%=itemType.name()%>', '<%=(String)cc.getObject("defaultColumns")%>');
190    }
191    </script>
192  </base:head>
193 
194  <base:body>
195    <%
196    if (cc.getMessage() != null)
197    {
198      %>
199      <div class="error"><%=cc.getMessage()%></div>
200      <%
201      cc.setMessage(null);
202    }
203    %>
204    <tbl:table 
205      id="slides" 
206      clazz="itemlist" 
207      columns="<%=cc.getSetting("columns")%>"
208      sortby="<%=cc.getSortProperty()%>" 
209      direction="<%=cc.getSortDirection()%>"
210      title="<%=title%>"
211      action="index.jsp"
212      sc="<%=sc%>"
213      item="<%=itemType%>"
214      >
215      <tbl:hidden 
216        name="mode" 
217        value="<%=mode.getName()%>" 
218      />
219      <tbl:hidden 
220        name="callback" 
221        value="<%=callback%>" 
222        skip="<%=callback == null%>" 
223      />
224      <tbl:columndef 
225        id="name"
226        property="name"
227        datatype="string"
228        title="Name"
229        sortable="true" 
230        filterable="true"
231        exportable="true"
232        show="always" 
233      />
234      <tbl:columndef 
235        id="id"
236        clazz="uniquecol"
237        property="id"
238        datatype="int"
239        title="ID"
240        sortable="true"
241        filterable="true"
242        exportable="true"
243      />
244      <tbl:columndef 
245        id="entryDate"
246        property="entryDate"
247        datatype="date"
248        title="Registered"
249        sortable="true" 
250        filterable="true"
251        exportable="true"
252        formatter="<%=dateFormatter%>"
253      />
254      <tbl:columndef 
255        id="arrayBatch"
256        property="arrayBatch.name"
257        datatype="string"
258        title="Array batch"
259        sortable="true" 
260        filterable="true"
261        exportable="true"
262      />
263      <tbl:columndef 
264        id="arrayDesign"
265        property="arrayBatch.arrayDesign.name"
266        datatype="string"
267        title="Array design"
268        sortable="true" 
269        filterable="true"
270        exportable="true"
271      />
272      <tbl:columndef 
273        id="physicalBioAssay"
274        property="physicalBioassay.name"
275        datatype="string"
276        title="Physical bioassay"
277        sortable="true" 
278        filterable="true"
279        exportable="true"
280      />
281      <tbl:columndef 
282        id="barcode"
283        property="barcode"
284        datatype="string"
285        title="Barcode"
286        sortable="true" 
287        filterable="true"
288        exportable="true"
289      />
290      <tbl:columndef 
291        id="destroyed"
292        property="destroyed"
293        datatype="boolean"
294        title="Destroyed"
295        sortable="true" 
296        filterable="true"
297        exportable="true"
298      />
299      <tbl:columndef 
300        id="batchIndex"
301        property="batchIndex"
302        datatype="int"
303        title="Batch index"
304        sortable="true" 
305        filterable="true"
306        exportable="true"
307      />
308      <tbl:columndef 
309        id="owner"
310        property="owner.name"
311        datatype="string"
312        title="Owner"
313        sortable="true" 
314        filterable="true"
315        exportable="true"
316      />
317      <tbl:columndef 
318        id="description"
319        property="description"
320        datatype="string"
321        title="Description" 
322        sortable="true" 
323        filterable="true" 
324        exportable="true"
325      />     
326      <%
327      for (AnnotationType at : annotationTypes)
328      {
329        Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
330        Enumeration<String, String> annotationEnum = null;
331        if (at.isEnumeration())
332        {
333          annotationEnum = new Enumeration<String, String>();
334          List<?> values = at.getValues();
335          for (Object value : values)
336          {
337            String encoded = formatter.format(value);
338            annotationEnum.add(encoded, encoded);
339          }
340        }
341        %>
342        <tbl:columndef 
343          id="<%="at"+at.getId()%>"
344          title="<%=HTML.encodeTags(at.getName())+" [A]"%>" 
345          property="<%="#"+at.getId()%>"
346          annotation="true"
347          datatype="<%=at.getValueType().getStringValue()%>"
348          enumeration="<%=annotationEnum%>"
349          smartenum="<%=at.getDisplayAsList() %>"
350          sortable="false" 
351          filterable="true" 
352          exportable="true"
353          formatter="<%=formatter%>"
354          unit="<%=at.getDefaultUnit()%>"
355        />
356        <%
357      }
358      %>
359      <tbl:columndef
360        id="permission"
361        title="Permission"
362      />
363      <tbl:columndef
364        id="sharedTo"
365        title="Shared to"
366        filterable="true"
367        filterproperty="!sharedTo.name"
368        datatype="string"
369      />
370      <tbl:toolbar
371        visible="<%=mode.hasToolbar()%>"
372        >
373        <tbl:button 
374          disabled="<%=createPermission ? false : true%>" 
375          image="<%=createPermission ? "new.gif" : "new_disabled.gif"%>" 
376          onclick="newItem()" 
377          title="New&hellip;" 
378          tooltip="<%=createPermission ? "Create new array slide" : "You do not have permission to create array slides"%>" 
379        />
380        <tbl:button
381          disabled="<%=createPermission ? false : true%>"
382          image="<%=createPermission ? "new_wizard.gif" : "new_wizard_disabled.gif"%>"
383          onclick="newItems()"
384          title="Create multiple&hellip;"
385          tooltip="<%=createPermission ? "Create multiple new array slides using a wizard" : "You do not have permission to create array slides"%>" 
386        />
387        <tbl:button 
388          image="delete.gif"
389          onclick="deleteItems()" 
390          title="Delete" 
391          tooltip="Delete the selected items" 
392        />
393        <tbl:button 
394          image="restore.gif"
395          onclick="restoreItems()" 
396          title="Restore" 
397          tooltip="Restore the selected (deleted) items"
398        />
399        <tbl:button 
400          image="share.gif"
401          onclick="shareItems()" 
402          title="Share&hellip;" 
403          tooltip="Share the selected items"
404        />
405        <tbl:button 
406          image="take_ownership.png"
407          onclick="setOwner()" 
408          title="Set owner&hellip;"
409          tooltip="Change owner of the selected items"
410        />
411        <tbl:button 
412          image="columns.gif" 
413          onclick="configureColumns()" 
414          title="Columns&hellip;" 
415          tooltip="Show, hide and re-order columns" 
416        />
417        <tbl:button 
418          image="import.gif" 
419          onclick="runPlugin('ImportItems')" 
420          title="Import&hellip;" 
421          tooltip="Import data" 
422          visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>"
423        />
424        <tbl:button 
425          image="export.gif" 
426          onclick="runPlugin('ExportItems')" 
427          title="Export&hellip;" 
428          tooltip="Export data" 
429          visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>"
430        />
431        <tbl:button 
432          image="runplugin.gif" 
433          onclick="runPlugin('RunListPlugin')" 
434          title="Run plugin&hellip;" 
435          tooltip="Run a plugin" 
436          visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>"
437        />
438        <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 
439          wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
440      </tbl:toolbar>
441      <tbl:navigator
442        page="<%=cc.getPage()%>" 
443        rowsperpage="<%=cc.getRowsPerPage()%>" 
444        totalrows="<%=slides == null ? 0 : slides.getTotalCount()%>" 
445        visible="<%=mode.hasNavigator()%>"
446      />
447      <tbl:data>
448        <tbl:columns>
449        <tbl:presetselector 
450          clazz="columnheader"
451          colspan="3"
452          onchange="presetOnChange()"
453        />
454        </tbl:columns>
455
456        <tr>
457          <tbl:header 
458            clazz="index"
459            >&nbsp;</tbl:header>
460          <tbl:header 
461            clazz="check" 
462            visible="<%=mode.hasCheck()%>"
463            ><base:icon 
464              image="check_uncheck.gif" 
465              tooltip="Check/uncheck all" 
466              onclick="Forms.checkUncheck(document.forms[formId])" style="align: left;"
467            /></tbl:header>
468          <tbl:header 
469            clazz="check" 
470            visible="<%=mode.hasRadio()%>"
471            >&nbsp;</tbl:header>
472          <tbl:header 
473            clazz="icons" 
474            visible="<%=mode.hasIcons()%>"
475            >&nbsp;</tbl:header>
476          <tbl:propertyfilter />
477        </tr>
478         
479          <tbl:rows>
480          <%
481          int index = cc.getPage()*cc.getRowsPerPage();
482          int selectedItemId = cc.getId();
483          if (slides != null)
484          {
485            while (slides.hasNext())
486            {
487              ArraySlide item = slides.next();
488              int itemId = item.getId();
489              String openSharePopup = "shareItem("+itemId+")";
490              String deletePermanently = "deleteItemPermanently("+itemId+")";
491              boolean deletePermission = item.hasPermission(Permission.DELETE);
492              boolean sharePermission = item.hasPermission(Permission.SET_PERMISSION);
493              boolean writePermission = item.hasPermission(Permission.WRITE);
494              String tooltip = mode.isSelectionMode() ? 
495                  "Select this item" : "View this item" + (writePermission ? " (use CTRL, ALT or SHIFT to edit)" : "");
496              String name = HTML.encodeTags(item.getName());
497              index++;
498              numListed++;
499              %>
500              <tbl:row>
501                <tbl:header 
502                  clazz="index"
503                  ><%=index%></tbl:header>
504                <tbl:header 
505                  clazz="check" 
506                  visible="<%=mode.hasCheck()%>"
507                  ><input 
508                    type="checkbox" 
509                    name="<%=itemId%>" 
510                    value="<%=itemId%>" 
511                    title="<%=name%>" 
512                    <%=cc.getSelected().contains(itemId) ? "checked" : ""%> 
513                  ></tbl:header>
514                <tbl:header 
515                  clazz="check" 
516                  visible="<%=mode.hasRadio()%>"
517                  ><input 
518                    type="radio" 
519                    name="item_id" 
520                    value="<%=itemId%>" 
521                    title="<%=name%>" 
522                    <%=selectedItemId == itemId ? "checked" : ""%>
523                  ></tbl:header>
524                <tbl:header 
525                  clazz="icons" 
526                  visible="<%=mode.hasIcons()%>"
527                  ><base:icon 
528                    image="<%=deletePermission ? "deleted.gif" : "deleted_disabled.gif"%>"
529                    onclick="<%=deletePermission ? deletePermanently : null%>"
530                    tooltip="This item has been scheduled for deletion" 
531                    visible="<%=item.isRemoved()%>"
532                  /><base:icon 
533                    image="<%=sharePermission ? "shared.gif" : "shared_disabled.gif"%>" 
534                    onclick="<%=sharePermission ? openSharePopup : null%>"
535                    tooltip="This item is shared to other users, groups and/or projects" 
536                    visible="<%=item.isShared()%>"
537                  />&nbsp;</tbl:header>
538                <tbl:cell column="name"><div class="link" 
539                  onclick="itemOnClick(<%=writePermission ? "event" : null%>, <%=itemId%>)" 
540                  title="<%=tooltip%>"><%=name%></div></tbl:cell>
541                <tbl:cell column="id"><%=item.getId()%></tbl:cell>
542                <tbl:cell column="entryDate" value="<%=item.getEntryDate()%>" />
543                <tbl:cell column="arrayBatch"
544                  ><base:propertyvalue 
545                    item="<%=item%>" 
546                    property="arrayBatch"
547                    enableEditLink="<%=mode.hasEditLink()%>" 
548                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
549                  /></tbl:cell>
550                <tbl:cell column="arrayDesign"
551                  ><base:propertyvalue 
552                    item="<%=item%>" 
553                    property="arrayBatch.arrayDesign"
554                    enableEditLink="<%=mode.hasEditLink()%>" 
555                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
556                  /></tbl:cell>
557                <tbl:cell column="physicalBioAssay"
558                  ><base:propertyvalue 
559                    item="<%=item%>" 
560                    property="physicalBioAssay"
561                    enableEditLink="<%=mode.hasEditLink()%>" 
562                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
563                  /></tbl:cell>
564                <tbl:cell column="barcode"><%=HTML.encodeTags(item.getBarcode())%></tbl:cell>
565                <tbl:cell column="batchIndex"><%=item.getBatchIndex()%></tbl:cell>
566                <tbl:cell column="destroyed"><%=item.isDestroyed()%></tbl:cell>
567                <tbl:cell column="owner"
568                  ><base:propertyvalue 
569                    item="<%=item%>" 
570                    property="owner"
571                    enableEditLink="<%=mode.hasEditLink()%>" 
572                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
573                  /></tbl:cell>
574                <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell>               
575                <%
576                AnnotationSet as = item.isAnnotated() ? item.getAnnotationSet() : null;
577                if (as != null)
578                {
579                  for (AnnotationType at : annotationTypes)
580                  {
581                    if (as.hasAnnotation(at))
582                    {
583                      Annotation a = as.getAnnotation(at);
584                      String suffix = a.getUnitSymbol(null);
585                      if (suffix != null) suffix = "&nbsp;" + suffix;
586                      %>
587                      <tbl:cell 
588                        column="<%="at"+at.getId()%>"
589                        ><tbl:cellvalue 
590                          list="<%=a.getValues(null)%>"
591                          suffix="<%=suffix%>"
592                      /></tbl:cell>
593                      <%
594                    }
595                  }
596                }
597                %>
598                <tbl:cell column="permission"><%=PermissionUtil.getShortPermissions(item)%></tbl:cell>
599                <tbl:cell column="sharedTo">
600                  <%
601                  Iterator<Nameable> sharees = ShareableUtil.getSharedTo(dc, item).iterator();
602                  while(sharees.hasNext())
603                  {
604                    Nameable n = sharees.next();
605                    if (mode.hasPropertyLink())
606                    {
607                      out.write(Base.getLinkedName(ID, n, false, mode.hasEditLink()));
608                    }
609                    else
610                    {
611                      out.write(HTML.encodeTags(n.getName()));
612                    }
613                    out.write(sharees.hasNext() ? ", " : "");
614                  }
615                  %>
616                </tbl:cell>
617              </tbl:row>
618              <%
619              }
620            }
621          %>
622          </tbl:rows>
623      </tbl:data>
624      <%
625      if (numListed == 0)
626      {
627        %>
628        <tbl:panel><%=slides == null || slides.getTotalCount() == 0 ? "No array slides were found" : "No array slides on this page. Please select another page!" %></tbl:panel>
629        <%
630      }
631      else
632      {
633        %>
634        <tbl:navigator
635          page="<%=cc.getPage()%>" 
636          rowsperpage="<%=cc.getRowsPerPage()%>" 
637          totalrows="<%=slides == null ? 0 : slides.getTotalCount()%>" 
638          visible="<%=mode.hasNavigator()%>"
639          locked="true"
640        />
641        <%
642      }
643      %>
644    </tbl:table>
645    <base:buttongroup align="center" clazz="fixedatbottom">
646      <base:button onclick="returnSelected();" title="Ok" visible="<%=mode.hasOkButton()%>" />
647      <base:button onclick="window.close();" title="Cancel" visible="<%=mode.hasCancelButton()%>" />
648      <base:button onclick="window.close();" title="Close" visible="<%=mode.hasCloseButton()%>" />
649    </base:buttongroup>
650    <br><br><br>
651  </base:body>
652  </base:page>
653  <%
654}
655finally
656{
657  if (slides != null) slides.close();
658  if (dc != null) dc.close();
659}
660%>
Note: See TracBrowser for help on using the repository browser.