Changeset 2209
- Timestamp:
- Feb 3, 2014, 8:36:18 AM (9 years ago)
- Location:
- extensions/net.sf.basedb.mev/trunk
- Files:
-
- 6 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.mev/trunk/.classpath
r1540 r2209 8 8 <classpathentry kind="lib" path="resources/jar/mev-gui-impl.jar" sourcepath="/mev-4.4.1/source"/> 9 9 <classpathentry kind="lib" path="resources/jar/HTTPClient.jar"/> 10 <classpathentry kind="lib" path="lib/compile/base-core-3. 1.0.jar"/>11 <classpathentry kind="lib" path="lib/compile/base-coreplugins-3. 1.0.jar"/>12 <classpathentry kind="lib" path="lib/compile/base-webclient-3. 1.0.jar"/>13 <classpathentry kind="lib" path="lib/compile/base-webservices-client-3. 1.0.jar"/>10 <classpathentry kind="lib" path="lib/compile/base-core-3.3.0.jar"/> 11 <classpathentry kind="lib" path="lib/compile/base-coreplugins-3.3.0.jar"/> 12 <classpathentry kind="lib" path="lib/compile/base-webclient-3.3.0.jar"/> 13 <classpathentry kind="lib" path="lib/compile/base-webservices-client-3.3.0.jar"/> 14 14 <classpathentry kind="output" path="bin"/> 15 15 </classpath> -
extensions/net.sf.basedb.mev/trunk/META-INF/extensions.xml
r1705 r2209 1 1 <?xml version="1.0" encoding="UTF-8" ?> 2 2 <extensions xmlns="http://base.thep.lu.se/extensions.xsd"> 3 <about >3 <about safe-scripts="1"> 4 4 <name>MEV Launcher package</name> 5 5 <description> … … 12 12 <email>basedb-users@lists.sourceforge.net</email> 13 13 <url>http://baseplugins.thep.lu.se/wiki/net.sf.basedb.mev</url> 14 <min-base-version>3. 1.0</min-base-version>14 <min-base-version>3.3.0</min-base-version> 15 15 </about> 16 16 <plugin-definition id="PackageInstaller"> … … 79 79 given the option to do so. 80 80 </tooltip> 81 <onClick>MeV.launch($ID$)</onClick> 81 <clazz>icon link auto-init</clazz> 82 <data-auto-init>launch-mev</data-auto-init> 83 <data-home>$HOME$</data-home> 82 84 <icon>~/images/tm4.png</icon> 83 <script>~/scripts/mev.js p</script>85 <script>~/scripts/mev.js</script> 84 86 </parameters> 85 87 </action-factory> … … 103 105 <title>MeV Launcher options&hellip;</title> 104 106 <tooltip>Specify options for the MeV Launcher</tooltip> 105 <onClick>Main.openPopup('$HOME$/options.jsp?ID='+getSessionId(), 'MeVLauncherOptions', 450, 300)</onClick> 107 <data-url>$HOME$/options.jsp?ID=$SESSION-ID$</data-url> 108 <data-popup>MeVLauncherOptions, 450, 300</data-popup> 106 109 <icon>~/images/tm4.png</icon> 107 110 </parameters> -
extensions/net.sf.basedb.mev/trunk/build.xml
r1705 r2209 24 24 <property name="javac.encoding" value="UTF-8" /> 25 25 <property name="depend.base-version" 26 value="3. 1.0"26 value="3.3.0" 27 27 description="The BASE version that this project depends on." 28 28 /> -
extensions/net.sf.basedb.mev/trunk/resources/launch_mev.jsp
r1541 r2209 127 127 {} 128 128 %> 129 <base:page type="popup" title="<%=title%>"> 130 <base:head> 131 <script language="JavaScript"> 132 function launchMev(fileType) 133 { 134 var url = 'mev_jnlp.jsp?ID=<%=ID%>&bioassayset_id=<%=bioAssaySetId%>'; 135 url += '&filetype=' + fileType; 136 window.opener.location.href = url; 137 setTimeout('window.close()', 500); 138 } 139 function exportTdms() 140 { 141 var url = getRoot()+'common/plugin/index.jsp?ID='+getSessionId(); 142 url += '&cmd=NewJob&plugin_class=net.sf.basedb.mev.plugin.TdmsExporterPlugin'; 143 url += '&item_type=BIOASSAYSET&context_type=ITEM'; 144 url += '&job_name=' + encodeURIComponent('<%=HTML.javaScriptEncode(tdmsJobName)%>'); 145 url += '¶meter:saveAs='+encodeURIComponent('<%=HTML.javaScriptEncode(defaultPath+defaultTdmsFileName)%>'); 146 url += '¶meter:attachToBioAssaySet=true'; 147 Main.openPopup(url, 'CreateTDMSFile', 750, 500); 148 window.close(); 149 } 150 function exportCgh() 151 { 152 var frm = document.forms['mev']; 153 var url = getRoot()+'common/plugin/index.jsp?ID='+getSessionId(); 154 url += '&cmd=NewJob&plugin_class=net.sf.basedb.mev.plugin.CghExporterPlugin'; 155 url += '&pluginconfiguration_id=' + frm.cgh_configuration[frm.cgh_configuration.selectedIndex].value; 156 url += '&item_type=BIOASSAYSET&context_type=ITEM'; 157 url += '&job_name=' + encodeURIComponent('<%=HTML.javaScriptEncode(cghJobName)%>'); 158 url += '¶meter:saveAs='+encodeURIComponent('<%=HTML.javaScriptEncode(defaultPath+defaultCghFileName)%>'); 159 url += '¶meter:attachToBioAssaySet=true'; 160 Main.openPopup(url, 'CreateCGHFile', 750, 500); 161 window.close(); 162 } 163 </script> 164 </base:head> 129 <base:page type="popup" title="<%=title%>" id="mev-launch"> 130 <base:head scripts="~scripts/mev.js" /> 165 131 <base:body> 166 132 <h1><%=title%></h1> 133 134 <div id="page-data" class="datacontainer" 135 data-bioassayset-id="<%=bioAssaySetId%>" 136 ></div> 167 137 168 138 <form name="mev"> … … 177 147 <tbody> 178 148 <tr> 179 <td style="padding-bottom: 1em;"><base:button title="Start MeV" 180 onclick="launchMev('mev.anl')" 181 image="<%=anlFile == null ? homeUrl + "/images/tm4_disabled.png" : homeUrl + "/images/tm4.png" %>" 149 <td style="padding-bottom: 1em;"><base:button 150 title="Start MeV" 151 subclass="auto-init" 152 data-auto-init="start-mev" 153 data-mev-file-type="mev.anl" 154 image="<%=homeUrl + "/images/tm4.png" %>" 182 155 disabled="<%=anlFile == null%>"/></td> 183 156 <td style="padding-bottom: 1em;"> … … 207 180 <tbody> 208 181 <tr> 209 <td><base:button title="Start MeV" 210 onclick="launchMev('mev.tdms')" 211 image="<%=tdmsFile == null ? homeUrl + "/images/tm4_disabled.png" : homeUrl + "/images/tm4.png" %>" 182 <td><base:button 183 title="Start MeV" 184 subclass="auto-init" 185 data-auto-init="start-mev" 186 data-mev-file-type="mev.tdms" 187 image="<%=homeUrl + "/images/tm4.png" %>" 212 188 disabled="<%=tdmsFile == null%>"/></td> 213 189 <td> … … 230 206 </tr> 231 207 <tr> 232 <td style="padding-bottom: 1em;"><base:button title="Export" 233 onclick="exportTdms()" 208 <td style="padding-bottom: 1em;"><base:button 209 id="export-tdms" 210 title="Export" 234 211 disabled="<%=!allowCreateFile%>" 235 image="<%=allowCreateFile ? "export.gif" : homeUrl + "/images/export_disabled.gif"%>" /></td> 212 data-job-name="<%=HTML.encodeTags(tdmsJobName) %>" 213 data-save-as="<%=HTML.encodeTags(defaultPath+defaultTdmsFileName)%>" 214 image="export.png" /></td> 236 215 <td style="padding-bottom: 1em;"> 237 216 <% … … 259 238 <tbody> 260 239 <tr> 261 <td><base:button title="Start MeV" 262 onclick="launchMev('mev.cgh')" 263 image="<%=cghFile == null ? homeUrl + "/images/tm4_disabled.png" : homeUrl + "/images/tm4.png" %>" 240 <td><base:button 241 title="Start MeV" 242 subclass="auto-init" 243 data-auto-init="start-mev" 244 data-mev-file-type="mev.cgh" 245 image="<%=homeUrl + "/images/tm4.png" %>" 264 246 disabled="<%=cghFile == null%>"/></td> 265 247 <td> … … 282 264 </tr> 283 265 <tr> 284 <td><base:button title="Export" 285 onclick="exportCgh()" 266 <td><base:button 267 id="export-cgh" 268 title="Export" 286 269 disabled="<%=!canCreateCGHFile%>" 287 image="<%=canCreateCGHFile ? "export.gif" : homeUrl + "/images/export_disabled.gif"%>" /></td> 270 data-job-name="<%=HTML.encodeTags(cghJobName) %>" 271 data-save-as="<%=HTML.encodeTags(defaultPath+defaultCghFileName)%>" 272 image="export.png" /></td> 288 273 <td> 289 274 <% … … 335 320 336 321 <base:buttongroup subclass="dialogbuttons"> 337 <base:button onclick="window.close();" title="Close" />322 <base:button id="close" title="Close" /> 338 323 </base:buttongroup> 339 324 -
extensions/net.sf.basedb.mev/trunk/resources/options.jsp
r1541 r2209 53 53 int maxMemory = Values.getInt(sc.getUserClientSetting("net.sf.basedb.mev.launchmev.jvm.maxmemory"), 512); 54 54 %> 55 <base:page type="popup" title="<%="MeV Launcher options for "+HTML.encodeTags(user.getName())%>"> 56 <base:head scripts="tabcontrol.js" styles="tabcontrol.css"> 57 <script language="JavaScript"> 58 function validateOptions() 59 { 60 return true; 61 } 62 function saveSettings() 63 { 64 document.forms['mevoptions'].submit(); 65 } 66 </script> 67 </base:head> 55 <base:page type="popup" title="<%="MeV Launcher options for "+HTML.encodeTags(user.getName())%>" id="mev-options"> 56 <base:head scripts="tabcontrol.js,~scripts/mev.js" styles="tabcontrol.css" /> 68 57 <base:body> 69 58 70 59 <h1>MeV Launcher options for <%=HTML.encodeTags(user.getName())%></h1> 71 <form action="submit.jsp?ID=<%=ID%>" method="post" name="mevoptions" onsubmit="return false;">60 <form action="submit.jsp?ID=<%=ID%>" method="post" name="mevoptions"> 72 61 <input type=hidden name="cmd" value="SaveOptions"> 73 62 … … 77 66 <tr style="height: 3em;"> 78 67 <th>JVM max memory</td> 79 <td><input class="text" type="text" name="maxMemory" 80 value="<%=maxMemory%>" style="width: 12em;" maxlength="6" 81 onkeypress="return Numbers.integerOnly(event)"> MB</td> 68 <td><input class="text" type="text" name="maxMemory" id="maxMemory" 69 value="<%=maxMemory%>" style="width: 12em;" maxlength="6"> MB</td> 82 70 </tr> 83 71 </table> … … 93 81 94 82 <base:buttongroup subclass="dialogbuttons"> 95 <base:button onclick="saveSettings();" title="Save" />96 <base:button onclick="window.close();" title="Cancel" />83 <base:button id="btnSave" title="Save" /> 84 <base:button id="close" title="Cancel" /> 97 85 </base:buttongroup> 98 86 -
extensions/net.sf.basedb.mev/trunk/resources/scripts/mev.js
r2208 r2209 1 <%@ page 2 pageEncoding="UTF-8" 3 session="false" 4 contentType="text/javascript" 5 import="net.sf.basedb.clients.web.extensions.ExtensionsControl" 6 %> 7 <%! 8 final String homeUrl = ExtensionsControl.getHomeUrl("net.sf.basedb.mev.launchmev"); 9 %> 10 var MeV = new function() 1 2 var MeV = function() 11 3 { 12 this.launch = function(bioAssaySetId) 4 var mev = {}; 5 6 mev.initPage = function() 13 7 { 14 var url = '<%=homeUrl%>/launch_mev.jsp'; 15 url += '?ID='+getSessionId(); 16 url += '&bioassayset_id=' + bioAssaySetId; 17 Main.openPopup(url, 'LaunchMev', 600, 400); 8 var pageId = Doc.getPageId(); 9 if (pageId == 'mev-options') 10 { 11 Buttons.addClickHandler('close', App.closeWindow); 12 Buttons.addClickHandler('btnSave', mev.saveOptions); 13 Events.addEventHandler('maxMemory', 'keypress', Events.integerOnly); 14 } 15 else if (pageId == 'mev-launch') 16 { 17 Buttons.addClickHandler('close', App.closeWindow); 18 Buttons.addClickHandler('export-tdms', mev.exportTdms); 19 Buttons.addClickHandler('export-cgh', mev.exportCgh); 20 } 21 } 22 23 mev.initElement = function(element, autoInit) 24 { 25 if (autoInit == 'launch-mev') 26 { 27 Events.addEventHandler(element, 'click', mev.launchDialog); 28 } 29 else if (autoInit == 'start-mev') 30 { 31 Buttons.addClickHandler(element, mev.startMev); 32 } 18 33 } 19 34 20 } 21 (); 35 mev.launchDialog = function(event) 36 { 37 var bioAssaySetId = Data.int(event.currentTarget, 'item-id'); 38 var homeUrl = Data.get(event.currentTarget, 'home'); 39 var url = homeUrl+'/launch_mev.jsp?ID='+App.getSessionId(); 40 url += '&bioassayset_id=' + bioAssaySetId; 41 Dialogs.openPopup(url, 'LaunchMev', 600, 400); 42 } 43 44 mev.startMev = function(event) 45 { 46 var fileType = Data.get(event.currentTarget, 'mev-file-type'); 47 var bioAssaySetId = Data.int('page-data', 'bioassayset-id'); 48 49 var url = 'mev_jnlp.jsp?ID='+App.getSessionId(); 50 url += '&bioassayset_id='+bioAssaySetId; 51 url += '&filetype=' + fileType; 52 window.opener.location.href = url; 53 setTimeout(App.closeWindow, 500); 54 } 55 56 mev.exportTdms = function(event) 57 { 58 var url = App.getRoot()+'common/plugin/index.jsp?ID='+App.getSessionId(); 59 url += '&cmd=NewJob&plugin_class=net.sf.basedb.mev.plugin.TdmsExporterPlugin'; 60 url += '&item_type=BIOASSAYSET&context_type=ITEM'; 61 url += '&job_name=' + encodeURIComponent(Data.get(event.currentTarget, 'job-name')); 62 url += '¶meter:saveAs='+encodeURIComponent(Data.get(event.currentTarget, 'save-as')); 63 url += '¶meter:attachToBioAssaySet=true'; 64 Dialogs.openPopup(url, 'CreateTDMSFile', 750, 500); 65 window.close(); 66 } 67 68 mev.exportCgh = function(event) 69 { 70 var frm = document.forms['mev']; 71 var url = App.getRoot()+'common/plugin/index.jsp?ID='+App.getSessionId(); 72 url += '&cmd=NewJob&plugin_class=net.sf.basedb.mev.plugin.CghExporterPlugin'; 73 url += '&pluginconfiguration_id=' + frm.cgh_configuration[frm.cgh_configuration.selectedIndex].value; 74 url += '&item_type=BIOASSAYSET&context_type=ITEM'; 75 url += '&job_name=' + encodeURIComponent(Data.get(event.currentTarget, 'job-name')); 76 url += '¶meter:saveAs='+encodeURIComponent(Data.get(event.currentTarget, 'save-as')); 77 url += '¶meter:attachToBioAssaySet=true'; 78 Dialogs.openPopup(url, 'CreateCGHFile', 750, 500); 79 window.close(); 80 } 81 82 mev.saveOptions = function() 83 { 84 document.forms['mevoptions'].submit(); 85 } 86 87 return mev; 88 }(); 89 90 Doc.onLoad(MeV.initPage); 91 Doc.addElementInitializer(MeV.initElement); -
extensions/net.sf.basedb.mev/trunk/src/server/net/sf/basedb/mev/factory/MevButtonFactory.java
r1416 r2209 99 99 action.setIcon(getIcon()); 100 100 action.setId(getId()); 101 action.setOnClick(getOnClick().replace("$ID$", ID));102 101 action.setStyle(getStyle()); 103 102 action.setTitle(getTitle()); 104 103 action.setTooltip(getTooltip()); 105 104 action.setVisible(isVisible()); 105 action.setDynamicActionAttributesSource(this); 106 setParameter("data-item-id", ID); 106 107 actions = new ButtonAction[] { action }; 107 108 }
Note: See TracChangeset
for help on using the changeset viewer.