Changeset 2291


Ignore:
Timestamp:
Mar 14, 2014, 11:31:37 AM (9 years ago)
Author:
Nicklas Nordborg
Message:

References #571: Update Reggie to new scripting pattern

I think the most critical parts have been fixed now. Reggie 2.16 should now work properly on a BASE 3.3 server with the default configuration.

Location:
extensions/net.sf.basedb.reggie/trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/META-INF/extensions.xml

    r2290 r2291  
    11<?xml version="1.0" encoding="UTF-8" ?>
    22<extensions xmlns="http://base.thep.lu.se/extensions.xsd">
    3   <about>
     3  <about safe-resources="0">
    44    <name>Reggie package</name>
    55    <description>
     
    103103    >
    104104    <index>10</index>
    105     <about>
     105    <about safe-scripts="1">
    106106      <name>Reggie</name>
    107107      <description>
     
    116116        <title>Reggie</title>
    117117        <tooltip>Access reggie operations</tooltip>
    118         <onClick>Menu.openUrl('$HOME$/index.jsp?ID='+getSessionId())</onClick>
    119         <icon>/images/padding.gif</icon>
     118        <data-url>~/index.jsp?ID=$SESSION-ID$</data-url>
    120119      </parameters>
    121120    </action-factory>
     
    129128      <ref index="1">net.sf.basedb.clients.web.toolbar.item.extract</ref>
    130129    </extends>
    131     <about>
     130    <about safe-scripts="1">
    132131      <name>Case summary</name>
    133132      <description>
     
    142141        net.sf.basedb.reggie.extensions.CaseSummaryButtonFactory
    143142      </factory-class>
     143      <parameters>
     144        <title>Case summary</title>
     145        <clazz>button auto-init</clazz>
     146        <data-auto-init>reggie-case-summary-link</data-auto-init>
     147        <data-home>$HOME$</data-home>
     148        <icon>~/images/case_summary.png</icon>
     149        <script>~/scripts/case-summary.js</script>
     150      </parameters>
    144151    </action-factory>
    145152  </extension>
     
    154161    </extends>
    155162    <index>2</index>
    156     <about>
     163    <about safe-scripts="1">
    157164      <name>Reggie column</name>
    158165      <description>
     
    174181    >
    175182    <index>1</index>
    176     <about>
     183    <about safe-scripts="1">
    177184      <name>Case overview</name>
    178185      <description>
     
    199206    extends="net.sf.basedb.clients.web.toolbar.item.bioplate"
    200207    >
    201     <about>
     208    <about safe-scripts="1">
    202209      <name>Histology score</name>
    203210      <description>
     
    210217        net.sf.basedb.reggie.extensions.HistologyScoreButtonFactory
    211218      </factory-class>
     219      <parameters>
     220        <title>Score HE glass</title>
     221        <clazz>button auto-init</clazz>
     222        <data-auto-init>reggie-he-score-link</data-auto-init>
     223        <data-home>$HOME$</data-home>
     224        <icon>~/images/microscope.png</icon>
     225        <script>~/scripts/he-score.js</script>
     226      </parameters>
    212227    </action-factory>
    213228  </extension>
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/extensions/CaseSummaryButtonFactory.java

    r1915 r2291  
    11package net.sf.basedb.reggie.extensions;
    22
    3 import net.sf.basedb.clients.web.extensions.AbstractJspActionFactory;
    43import net.sf.basedb.clients.web.extensions.JspContext;
    54import net.sf.basedb.clients.web.extensions.toolbar.ButtonAction;
    65import net.sf.basedb.clients.web.extensions.toolbar.ButtonBean;
     6import net.sf.basedb.clients.web.extensions.toolbar.FixedButtonFactory;
    77import net.sf.basedb.core.Nameable;
    88import net.sf.basedb.reggie.Reggie;
     
    1919*/
    2020public class CaseSummaryButtonFactory
    21   extends AbstractJspActionFactory<ButtonAction>
     21  extends FixedButtonFactory
    2222{
    2323
     
    5252
    5353    ButtonBean action = new ButtonBean();
    54     action.setEnabled(true);
    55     action.setIcon(reggieHome + "/images/case_summary.png");
    56     action.setOnClick("location.href='" + reggieHome + "/reports/case_summary.jsp?ID="+ID+"&caseName=" + caseName + "'");
    57     action.setTitle("Case summary");
     54    action.setClazz(getClazz());
     55    action.setEnabled(isEnabled());
     56    action.setIcon(getIcon());
     57    action.setId(getId());
     58    action.setStyle(getStyle());
     59    action.setTitle(getTitle());
     60    action.setTooltip(getTooltip());
     61    action.setVisible(isVisible());
     62    action.setDynamicActionAttributesSource(this);
     63    setParameter("data-case-name", caseName);
    5864    action.setTooltip("Reggie: Show summary of case #" + caseName);
    59     action.setVisible(true);
    6065    actions = new ButtonAction[] { action };
    6166    return actions;
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/extensions/HistologyScoreButtonFactory.java

    r2134 r2291  
    33import java.util.regex.Pattern;
    44
    5 import net.sf.basedb.clients.web.extensions.AbstractJspActionFactory;
    65import net.sf.basedb.clients.web.extensions.JspContext;
    76import net.sf.basedb.clients.web.extensions.toolbar.ButtonAction;
    87import net.sf.basedb.clients.web.extensions.toolbar.ButtonBean;
     8import net.sf.basedb.clients.web.extensions.toolbar.FixedButtonFactory;
    99import net.sf.basedb.core.BioPlate;
    1010import net.sf.basedb.core.Nameable;
     
    2121*/
    2222public class HistologyScoreButtonFactory
    23   extends AbstractJspActionFactory<ButtonAction>
     23  extends FixedButtonFactory
    2424{
    2525
     
    6161
    6262    ButtonBean action = new ButtonBean();
    63     action.setEnabled(true);
    64     action.setIcon(reggieHome + "/images/microscope.png");
    65     action.setOnClick("location.href='" + reggieHome + "/sampleproc/histology_score.jsp?ID="+ID+"&name=" + heName + "'");
    66     action.setTitle("Score HE glass");
    67     action.setTooltip("Reggie: Goto HE glass scoring wizard");
    68     action.setVisible(true);
     63    action.setClazz(getClazz());
     64    action.setEnabled(isEnabled());
     65    action.setIcon(getIcon());
     66    action.setId(getId());
     67    action.setStyle(getStyle());
     68    action.setTitle(getTitle());
     69    action.setTooltip(getTooltip());
     70    action.setVisible(isVisible());
     71    action.setDynamicActionAttributesSource(this);
     72    setParameter("data-he-plate-name", heName);
     73    action.setTooltip("Reggie: Goto HE glass scoring wizard for plate " + heName);
    6974    actions = new ButtonAction[] { action };
    7075    return actions;
Note: See TracChangeset for help on using the changeset viewer.