Changeset 6576
- Timestamp:
- Oct 22, 2014, 6:41:55 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 58 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/3.3-stable merged: 6538,6543-6566,6569-6573 /tags/3.3.2 (added) merged: 6574
- Property svn:mergeinfo changed
-
trunk/credits.txt
r6540 r6576 1 1 $Id$ 2 2 3 The current BASE team is (at BASE 3.3. 1release)3 The current BASE team is (at BASE 3.3.2 release) 4 4 {{{ 5 5 Jari Häkkinen … … 21 21 Peter Johansson 22 22 David Lindgren 23 Bob MacCallum 23 24 Olle Månsson 24 25 Peter Mörck -
trunk/doc/src/docbook/developer/documentation.xml
r6403 r6576 989 989 All screen shots are from Firefox and Windows 7. Popup windows in Firefox should not have the 990 990 navigation toolbar (nor any other toolbars). Full windows should have the navigation toolbar. 991 Replace the URL with <userinput>base 2.thep.lu.se/demo/</userinput>. Avoid extra toolbar buttons,991 Replace the URL with <userinput>base.onk.lu.se/demo/</userinput>. Avoid extra toolbar buttons, 992 992 etc. that are from plug-ins you may have installed in Firefox. 993 993 </para> -
trunk/doc/src/docbook/developer/migrate_2_3.xml
r5830 r6576 133 133 You'll need to make sure that your build system can handle this. 134 134 The BASE JAR files can be downloaded from 135 <ulink url="http://base 2.thep.lu.se/base/jars/">http://base2.thep.lu.se/base/jars/</ulink>.135 <ulink url="http://base.thep.lu.se/chrome/site/files/base/jars/">http://base.thep.lu.se/chrome/site/files/base/jars/</ulink>. 136 136 </note> 137 137 -
trunk/doc/src/docbook/developer/plugins.xml
r6429 r6576 355 355 <note> 356 356 <para> 357 The installation wizard can only install configurations that belong to 358 plug-ins defined by the same package. It is currently not possible to, 359 for example, include configuration for core plug-ins. 357 As of BASE 3.3.2 the installation wizard can also install configurations 358 for plug-ins defined by the BASE core or other extensions. Simply include 359 the configuration settings for the plug-in as you would do with a configuration 360 for a plug-in defined by your own extension. 360 361 </para> 361 362 </note> -
trunk/doc/src/docbook/overview/resources.xml
r6465 r6576 211 211 explore BASE without having to install it. Follow the link on 212 212 BASE web site to the demo server or go directly to 213 <ulink url="http://base 2.thep.lu.se/demo/">214 http://base 2.thep.lu.se/demo/215 </ulink> 213 <ulink url="http://base.onk.lu.se/demo/"> 214 http://base.onk.lu.se/demo/ 215 </ulink>. NOTE! The demo server is currently down! 216 216 </para> 217 217 <para> -
trunk/doc/src/docbook/user/webclient.xml
r6268 r6576 47 47 <para> 48 48 You may, for example, try the BASE demo server. Go to the 49 URL <ulink url="http://base 2.thep.lu.se/demo/">http://base2.thep.lu.se/demo/</ulink>49 URL <ulink url="http://base.onk.lu.se/demo/">http://base.onk.lu.se/demo/</ulink> 50 50 and enter <userinput>base2</userinput> for the login and <userinput>base2</userinput> 51 for the password. 51 for the password. NOTE! The demo server is currently down! 52 52 </para> 53 53 -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/WebClientRegisterExtensionsProcessor.java
r6417 r6576 23 23 24 24 import net.sf.basedb.clients.web.servlet.ContentSecurityPolicyFilter; 25 import net.sf.basedb.clients.web.taglib.Head; 25 26 import net.sf.basedb.core.plugin.About; 26 27 import net.sf.basedb.util.Values; … … 98 99 ContentSecurityPolicyFilter.setSafeResources(xtFile.getName(), safeResources); 99 100 } 101 // Register the version of this extension so 102 // we can append ?version to script and css URLs 103 if (about != null && about.getVersion() != null) 104 { 105 Head.setExtensionVersion(xtFile.getName(), about.getVersion()); 106 } 100 107 101 108 super.processFile(manager, wFile); -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/menu/FixedMenuItemFactory.java
r6401 r6576 23 23 24 24 import net.sf.basedb.clients.web.extensions.AbstractJspActionFactory; 25 import net.sf.basedb.clients.web.taglib.DeprecationLogger; 25 26 import net.sf.basedb.util.Values; 26 27 import net.sf.basedb.util.extensions.InvokationContext; … … 55 56 private String submenuId; 56 57 private String icon; 58 @Deprecated 57 59 private String onClick; 58 60 private String style; … … 190 192 191 193 @VariableSetter 194 @Deprecated 192 195 public void setOnClick(String onClick) 193 196 { 194 197 this.onClick = onClick; 198 DeprecationLogger.warn("MenuItemAction", "onclick", "3.5"); 195 199 } 196 200 -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/menu/MenuItemBean.java
r6401 r6576 23 23 24 24 import net.sf.basedb.clients.web.extensions.DynamicActionAttributeSupport; 25 import net.sf.basedb.clients.web.taglib.DeprecationLogger; 25 26 26 27 /** … … 42 43 private String submenuId; 43 44 private String icon; 45 @Deprecated 44 46 private String onClick; 45 47 private String clazz; … … 183 185 { 184 186 this.onClick = onClick; 187 DeprecationLogger.warn("MenuItemAction", "onclick", "3.5"); 185 188 } 186 189 -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/menu/PermissionMenuItemFactory.java
r6401 r6576 24 24 import net.sf.basedb.clients.web.extensions.AbstractJspActionFactory; 25 25 import net.sf.basedb.clients.web.extensions.menu.MenuItemAction.MenuType; 26 import net.sf.basedb.clients.web.taglib.DeprecationLogger; 26 27 import net.sf.basedb.core.Item; 27 28 import net.sf.basedb.core.Permission; … … 69 70 private String disabledClazz; 70 71 72 @Deprecated 71 73 private String onClick; 72 74 private MenuType type; … … 230 232 { 231 233 this.onClick = onClick; 234 DeprecationLogger.warn("MenuItemAction", "onclick", "3.5"); 232 235 } 233 236 -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/tabcontrol/FixedTabFactory.java
r6164 r6576 23 23 24 24 import net.sf.basedb.clients.web.extensions.AbstractJspActionFactory; 25 import net.sf.basedb.clients.web.taglib.DeprecationLogger; 25 26 import net.sf.basedb.util.Values; 26 27 import net.sf.basedb.util.extensions.InvokationContext; … … 202 203 { 203 204 this.onValidate = onValidate; 205 DeprecationLogger.warn("TabAction", "onvalidate", "3.5"); 204 206 } 205 207 … … 209 211 { 210 212 this.onActivate = onActivate; 213 DeprecationLogger.warn("TabAction", "onactivate", "3.5"); 211 214 } 212 215 -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/tabcontrol/IncludeContentTabFactory.java
r6402 r6576 28 28 import net.sf.basedb.clients.web.extensions.AbstractJspActionFactory; 29 29 import net.sf.basedb.clients.web.extensions.JspContext; 30 import net.sf.basedb.clients.web.taglib.DeprecationLogger; 30 31 import net.sf.basedb.clients.web.util.HTML; 31 32 import net.sf.basedb.util.Values; … … 143 144 { 144 145 this.onValidate = onValidate; 146 DeprecationLogger.warn("TabAction", "onvalidate", "3.5"); 145 147 } 146 148 … … 150 152 { 151 153 this.onActivate = onActivate; 154 DeprecationLogger.warn("TabAction", "onactivate", "3.5"); 152 155 } 153 156 -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/tabcontrol/TabBean.java
r6305 r6576 23 23 24 24 import net.sf.basedb.clients.web.extensions.DynamicActionAttributeSupport; 25 import net.sf.basedb.clients.web.taglib.DeprecationLogger; 25 26 26 27 /** … … 165 166 { 166 167 this.onValidate = onValidate; 168 DeprecationLogger.warn("TabAction", "onvalidate", "3.5"); 167 169 } 168 170 … … 171 173 { 172 174 this.onActivate = onActivate; 175 DeprecationLogger.warn("TabAction", "onactivate", "3.5"); 173 176 } 174 177 -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/toolbar/ButtonBean.java
r6219 r6576 23 23 24 24 import net.sf.basedb.clients.web.extensions.DynamicActionAttributeSupport; 25 import net.sf.basedb.clients.web.taglib.DeprecationLogger; 25 26 26 27 /** … … 40 41 private String icon; 41 42 private String id; 43 @Deprecated 42 44 private String onClick; 43 45 private String style; … … 137 139 { 138 140 this.onClick = onClick; 141 DeprecationLogger.warn("ButtonAction", "onclick", "3.5"); 139 142 } 140 143 -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/toolbar/FixedButtonFactory.java
r6219 r6576 23 23 24 24 import net.sf.basedb.clients.web.extensions.AbstractJspActionFactory; 25 import net.sf.basedb.clients.web.taglib.DeprecationLogger; 25 26 import net.sf.basedb.util.Values; 26 27 import net.sf.basedb.util.extensions.InvokationContext; … … 59 60 private String clazz; 60 61 private String icon; 62 @Deprecated 61 63 private String onClick; 62 64 private String style; … … 176 178 { 177 179 this.onClick = onClick; 180 DeprecationLogger.warn("ButtonAction", "onclick", "3.5"); 178 181 } 179 182 -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Body.java
r6520 r6576 161 161 { 162 162 this.onLoad = onLoad; 163 DeprecationLogger.warn("base:body", "onload", "3.5"); 163 164 } 164 165 @Deprecated -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Button.java
r6164 r6576 259 259 { 260 260 this.onClick = onClick; 261 DeprecationLogger.warn("base:button", "onclick", "3.5"); 261 262 } 262 263 @Deprecated -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/CalendarButton.java
r6216 r6576 37 37 38 38 public CalendarButton() 39 {} 40 41 42 @Override 43 protected void initDefaultAttributes() 39 44 { 40 45 super.setTitle("Calendar…"); … … 43 48 setDynamicAttribute(null, "data-auto-init", "calendar"); 44 49 } 45 50 46 51 public void setTextarea(String textarea) 47 52 { -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Head.java
r6540 r6576 23 23 package net.sf.basedb.clients.web.taglib; 24 24 25 import net.sf.basedb.clients.web.extensions.ExtensionsControl; 26 import net.sf.basedb.clients.web.util.HTML; 25 27 import net.sf.basedb.core.SessionControl; 28 import net.sf.basedb.core.Version; 26 29 import net.sf.basedb.util.Values; 27 30 31 import java.util.HashMap; 28 32 import java.util.LinkedHashSet; 29 33 import java.util.Arrays; 30 34 import java.util.Map; 35 import java.util.regex.Matcher; 36 import java.util.regex.Pattern; 37 38 import javax.servlet.http.HttpServletRequest; 31 39 import javax.servlet.jsp.JspException; 32 40 import javax.servlet.jsp.JspTagException; 41 import javax.servlet.jsp.PageContext; 33 42 import javax.servlet.jsp.tagext.TagSupport; 34 43 … … 91 100 private static final long serialVersionUID = 948719986796860767L; 92 101 102 // Contain the file name of extension JAR files mapped to versions 103 private static final Map<String, String> xtVersions = new HashMap<String, String>(); 104 105 // Match files under /base-root/extensions path. group 1 is the JAR file name 106 private static final Pattern PATH_MATCH = 107 Pattern.compile("/?[^/]*" + ExtensionsControl.RESOURCES_URL + "/([^/]+)/(.*)"); 108 109 /** 110 Register the version for an exteniosn JAR file. 111 Used for appending a query parameter to all scripts and style sheets 112 to prevent that browsers cache the old version. 113 @see #getVersionParameter(String) 114 @since 3.3.2 115 */ 116 public static void setExtensionVersion(String jarName, String version) 117 { 118 synchronized (xtVersions) 119 { 120 xtVersions.put(jarName, "v="+HTML.urlEncode(version)); 121 } 122 } 123 124 /** 125 Get query parameter to the given absolute path (including root directory). 126 If the path points to a file in the /base-root/extensions/ directory the version 127 of the extension is used, otherwise the BASE version is used. The 128 returned parameter is of the form v=<version>. 129 @param absolutePath An absolute path with or without the base-root directory 130 @since 3.3.2 131 */ 132 public static final String getVersionParameter(String absolutePath) 133 { 134 Matcher m = PATH_MATCH.matcher(absolutePath); 135 String version = globalVersion; 136 if (m.matches()) 137 { 138 String jarFile = m.group(1); 139 if (xtVersions.containsKey(jarFile)) 140 { 141 version = xtVersions.get(jarFile); 142 } 143 } 144 return version; 145 } 146 147 93 148 /** 94 149 The parent <base:page> tag. … … 105 160 */ 106 161 private String scripts = null; 162 163 private static final String globalVersion = "v=" + Version.getMajor()+"."+Version.getMinor()+"."+Version.getMaintenance(); 164 private String localVersion; 107 165 108 166 /* … … 143 201 for (String style : allStyles) 144 202 { 203 char pp = style.indexOf('?') == -1 ? '?' : '&'; 145 204 sb.append("\t<link rel=\"stylesheet\" type=\"text/css\" href=\""); 146 205 if (style.startsWith(appRoot)) 147 206 { 148 207 // Full absolute path 149 sb.append(style) ;208 sb.append(style).append(pp).append(getVersionParameter(style)); 150 209 } 151 210 else if (style.startsWith("/")) 152 211 { 153 // Absolute path is relative the page root (eg. /foo/bar.css --> /base/foo/bar.css) 154 sb.append(appRoot).append(style.substring(1)); 212 sb.append(appRoot).append(style.substring(1)).append(pp).append(getVersionParameter(style)); 155 213 } 156 214 else if (style.startsWith("~")) 157 215 { 158 216 // Relative path is relative the current page (eg. ~bar.css --> bar.css) 159 sb.append(style.substring(1)) ;217 sb.append(style.substring(1)).append(pp).append(localVersion); 160 218 } 161 219 else 162 220 { 163 221 // All other style sheets are in the /include/styles folder 164 sb.append(appRoot).append("include/styles/").append(style) ;222 sb.append(appRoot).append("include/styles/").append(style).append(pp).append(globalVersion); 165 223 } 166 224 sb.append("\">\n"); … … 192 250 for (String script : allScripts) 193 251 { 252 char pp = script.indexOf('?') == -1 ? '?' : '&'; 194 253 sb.append("\t<script type=\"text/javascript\" charset=\"UTF-8\" src=\""); 195 254 if (script.startsWith(appRoot)) 196 255 { 197 256 // Full absolute path 198 sb.append(script) ;257 sb.append(script).append(pp).append(getVersionParameter(script)); 199 258 } 200 259 else if (script.startsWith("/")) 201 260 { 202 261 // Absolute path that is relative the BASE root (eg. /foo/bar.js --> /base/foo/bar.js) 203 sb.append(appRoot).append(script.substring(1)) ;262 sb.append(appRoot).append(script.substring(1)).append(pp).append(getVersionParameter(script)); 204 263 } 205 264 else if (script.startsWith("~")) 206 265 { 207 266 // Relative path is relative the current page (eg. ~bar.js --> bar.js) 208 sb.append(script.substring(1)) ;267 sb.append(script.substring(1)).append(pp).append(localVersion); 209 268 } 210 269 else 211 270 { 212 271 // All other scripts are in the /include/scripts folder 213 sb.append(appRoot).append("include/scripts/").append(script) ;272 sb.append(appRoot).append("include/scripts/").append(script).append(pp).append(globalVersion); 214 273 } 215 274 sb.append("\"></script>\n"); … … 217 276 } 218 277 278 @Override 279 public void setPageContext(PageContext pageContext) 280 { 281 super.setPageContext(pageContext); 282 HttpServletRequest req = (HttpServletRequest)pageContext.getRequest(); 283 // If we are on /extension subpage, the localVersion is the 284 // version for the extension, otherwise we use the global version 285 localVersion = getVersionParameter(req.getServletPath()); 286 } 287 288 219 289 @Override 220 290 public int doStartTag() -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Icon.java
r6166 r6576 235 235 this.onClick = onClick; 236 236 if (!setEnabledIsCalled) this.enabled = onClick != null; 237 DeprecationLogger.warn("base:icon", "onclick", "3.5"); 237 238 } 238 239 @Deprecated -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Select.java
r6300 r6576 495 495 { 496 496 this.onChange = onChange; 497 DeprecationLogger.warn("base:select", "onchange", "3.5"); 497 498 } 498 499 @Deprecated … … 506 507 { 507 508 this.onSelect = onSelect; 509 DeprecationLogger.warn("base:select", "onselect", "3.5"); 508 510 } 509 511 @Deprecated -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/StylableTag.java
r6401 r6576 76 76 super.setPageContext(pageContext); 77 77 dynamicAttributes = null; 78 } 79 78 initDefaultAttributes(); 79 } 80 81 /** 82 Initialize default attributes. Can be called multiple times (once before each tag is used/re-used). 83 This default implementation does nothing. 84 @since 3.3.2 85 */ 86 protected void initDefaultAttributes() 87 {} 88 80 89 public void setClazz(String clazz) 81 90 { -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/extensions/Scripts.java
r6134 r6576 34 34 35 35 import net.sf.basedb.clients.web.extensions.JspContext; 36 import net.sf.basedb.clients.web.taglib.Head; 36 37 37 38 /** … … 92 93 for (String script : scripts) 93 94 { 95 char pp = script.indexOf('?') == -1 ? '?' : '&'; 94 96 sb.append("<script type=\"text/javascript\" src=\""); 95 sb.append(script) ;97 sb.append(script).append(pp).append(Head.getVersionParameter(script)); 96 98 sb.append("\" charset=\"UTF-8\"></script>\n"); 97 99 } -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/extensions/Stylesheets.java
r5384 r6576 34 34 35 35 import net.sf.basedb.clients.web.extensions.JspContext; 36 import net.sf.basedb.clients.web.taglib.Head; 36 37 37 38 /** … … 93 94 for (String stylesheet : stylesheets) 94 95 { 96 char pp = stylesheet.indexOf('?') == -1 ? '?' : '&'; 95 97 sb.append("<link rel=\"stylesheet\" type=\"text/css\" href=\""); 96 sb.append(stylesheet) ;98 sb.append(stylesheet).append(pp).append(Head.getVersionParameter(stylesheet)); 97 99 sb.append("\">\n"); 98 100 } -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/menu/Menuitem.java
r6401 r6576 30 30 31 31 import net.sf.basedb.clients.web.extensions.DynamicActionAttribute; 32 import net.sf.basedb.clients.web.taglib.DeprecationLogger; 32 33 import net.sf.basedb.clients.web.taglib.StylableTag; 33 34 … … 191 192 Javascript statment to execute when the user clicks the menu. 192 193 */ 194 @Deprecated 193 195 private String onclick = null; 194 196 … … 234 236 { 235 237 this.onclick = onclick; 238 DeprecationLogger.warn("base:menu", "onclick", "3.5"); 236 239 } 237 240 @Deprecated -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/tab/Tab.java
r6305 r6576 35 35 import net.sf.basedb.clients.web.extensions.DynamicActionAttributes; 36 36 import net.sf.basedb.clients.web.extensions.tabcontrol.TabAction; 37 import net.sf.basedb.clients.web.taglib.DeprecationLogger; 37 38 38 39 /** … … 279 280 { 280 281 this.validate = validate; 282 DeprecationLogger.warn("t:tab", "validate", "3.5"); 281 283 } 282 284 @Override … … 294 296 { 295 297 this.activate = activate; 298 DeprecationLogger.warn("t:tab", "activate", "3.5"); 296 299 } 297 300 /** -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/tab/TabControl.java
r6305 r6576 28 28 import net.sf.basedb.clients.web.extensions.DynamicActionAttributeSupport; 29 29 import net.sf.basedb.clients.web.extensions.tabcontrol.TabAction; 30 import net.sf.basedb.clients.web.taglib.DeprecationLogger; 30 31 import net.sf.basedb.clients.web.taglib.StylableTag; 31 32 import net.sf.basedb.util.extensions.ExtensionsInvoker; … … 273 274 { 274 275 this.switchtab = s; 276 DeprecationLogger.warn("t:tabcontrol", "switch", "3.5"); 275 277 } 276 278 @Deprecated -
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Button.java
r6219 r6576 29 29 import net.sf.basedb.clients.web.extensions.toolbar.ButtonAction; 30 30 import net.sf.basedb.clients.web.extensions.toolbar.ToolbarButtonRenderer; 31 import net.sf.basedb.clients.web.taglib.DeprecationLogger; 31 32 import net.sf.basedb.clients.web.taglib.StylableTag; 32 33 … … 237 238 { 238 239 this.onClick = onClick; 240 DeprecationLogger.warn("tbl:button", "onclick", "3.5"); 239 241 } 240 242 @Deprecated -
trunk/src/core/net/sf/basedb/core/DbControl.java
r6468 r6576 904 904 { 905 905 throw new ItemNotFoundException(HibernateUtil.getShortEntityName(ex.getEntityName())+ 906 "[id="+ex.getIdentifier()+"]" );906 "[id="+ex.getIdentifier()+"]", ex); 907 907 } 908 908 } -
trunk/src/core/net/sf/basedb/core/Job.java
r6497 r6576 511 511 512 512 /** 513 Set the version of the plugin that executes the job. 514 NOTE! This is automatically called for jobs that are executed by 515 plug-ins but should be called excplicitely for other types of jobs 516 @param pluginVersion 517 @since 3.3.2 518 */ 519 public void setPluginVersion(String pluginVersion) 520 { 521 checkPermission(Permission.WRITE); 522 getData().setPluginVersion(StringUtil.setNullableString(pluginVersion, "pluginVersion", JobData.MAX_PLUGIN_VERSION_LENGTH)); 523 } 524 525 /** 513 526 Get the version number of the configuration parameters used for this job. 514 527 */ … … 1049 1062 data.setJobAgentId(agent == null ? null : agent.getId()); 1050 1063 PluginDefinitionData plugin = data.getPluginDefinition(); 1051 data.setPluginVersion(plugin == null ? null :plugin.getVersionString());1064 if (plugin != null) data.setPluginVersion(plugin.getVersionString()); 1052 1065 } 1053 1066 -
trunk/src/core/net/sf/basedb/core/Project.java
r6465 r6576 47 47 import java.util.Set; 48 48 import java.util.Collections; 49 50 import org.hibernate.Hibernate; 49 51 50 52 /** … … 933 935 934 936 Class dataClass = itemType.getDataClass(); 935 for (BasicData data : defaultItems.getValues()) 936 { 937 Iterator<BasicData> it = defaultItems.getValues().iterator(); 938 while (it.hasNext()) 939 { 940 BasicData data = it.next(); 937 941 if (dataClass.isInstance(data)) 938 942 { 943 // Check if item has been removed 944 try 945 { 946 Hibernate.initialize(data); 947 } 948 catch (org.hibernate.ObjectNotFoundException ex) 949 { 950 it.remove(); 951 continue; 952 } 953 939 954 // Found an item of the correct item type... get it's subtype 940 955 ItemSubtypeData otherSubtype = null; … … 985 1000 986 1001 Class dataClass = itemType.getDataClass(); 987 for (BasicData data : defaultItems.getValues()) 988 { 1002 Iterator<BasicData> it = defaultItems.getValues().iterator(); 1003 while (it.hasNext()) 1004 { 1005 BasicData data = it.next(); 989 1006 if (dataClass.isInstance(data)) 990 1007 { 1008 // Check if item has been removed 1009 try 1010 { 1011 Hibernate.initialize(data); 1012 } 1013 catch (org.hibernate.ObjectNotFoundException ex) 1014 { 1015 it.remove(); 1016 continue; 1017 } 1018 991 1019 // Found an item of the correct item type... get it's subtype 992 1020 ItemSubtypeData otherSubtype = null; -
trunk/src/core/net/sf/basedb/core/query/CaseExpression.java
r6127 r6576 74 74 { 75 75 sb.append("WHEN ").append(when.getCondition().toQl(query, dc)); 76 sb.append(" THEN ").append(when.getValue() .toQl(query, dc));76 sb.append(" THEN ").append(when.getValue() == null ? "null" : when.getValue().toQl(query, dc)); 77 77 sb.append("\n"); 78 78 } … … 95 95 { 96 96 all.add(when.getCondition()); 97 all.add(when.getValue());97 if (when.getValue() != null) all.add(when.getValue()); 98 98 } 99 99 if (elseExpression != null) all.add(elseExpression); -
trunk/src/core/net/sf/basedb/core/query/Hql.java
r6444 r6576 56 56 57 57 /** 58 A property can only contain the characters a-zA-Z0-9, period(.) or hash (#)58 A property can only contain the characters a-zA-Z0-9, period(.), underscore(_) or hash (#) 59 59 It cannot begin or end with a period/hash and cannot have two periods/hashes in a sequence. 60 60 A hash indicates a path to a component while a period indicates a path to another 61 61 entity. 62 62 */ 63 public static final Pattern PROPERTY_REGEXP = Pattern.compile("[a-zA-Z0-9 ]+((\\.|\\#)[a-zA-Z0-9]+)*");63 public static final Pattern PROPERTY_REGEXP = Pattern.compile("[a-zA-Z0-9_]+((\\.|\\#)[a-zA-Z0-9_]+)*"); 64 64 65 65 /** … … 199 199 if (!PROPERTY_REGEXP.matcher(property).matches()) 200 200 { 201 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9 and . is allowed.");201 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9, _ and . is allowed."); 202 202 } 203 203 if (property.endsWith("affyChip")) … … 234 234 if (property != null && !PROPERTY_REGEXP.matcher(property).matches()) 235 235 { 236 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9 and . is allowed.");236 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9, _ and . is allowed."); 237 237 } 238 238 if (alias != null && !ALIAS_REGEXP.matcher(alias).matches()) … … 260 260 if (!PROPERTY_REGEXP.matcher(property).matches()) 261 261 { 262 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9 and . is allowed.");262 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9, _ and . is allowed."); 263 263 } 264 264 if (alias != null && !ALIAS_REGEXP.matcher(alias).matches()) … … 287 287 if (!PROPERTY_REGEXP.matcher(property).matches()) 288 288 { 289 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9 and . is allowed.");289 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9, _ and . is allowed."); 290 290 } 291 291 if (alias != null && !ALIAS_REGEXP.matcher(alias).matches()) … … 365 365 if (!PROPERTY_REGEXP.matcher(property).matches()) 366 366 { 367 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9 and . is allowed.");367 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9, _ and . is allowed."); 368 368 } 369 369 if (alias != null && !ALIAS_REGEXP.matcher(alias).matches()) … … 438 438 if (!PROPERTY_REGEXP.matcher(property).matches()) 439 439 { 440 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9 and . is allowed.");440 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9, _ and . is allowed."); 441 441 } 442 442 if (alias != null && !ALIAS_REGEXP.matcher(alias).matches()) … … 484 484 if (!PROPERTY_REGEXP.matcher(property).matches()) 485 485 { 486 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9 and . is allowed.");486 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9, _ and . is allowed."); 487 487 } 488 488 if (alias != null && !ALIAS_REGEXP.matcher(alias).matches()) … … 535 535 if (!PROPERTY_REGEXP.matcher(property).matches()) 536 536 { 537 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9 and . is allowed.");537 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9, _ and . is allowed."); 538 538 } 539 539 if (alias != null && !ALIAS_REGEXP.matcher(alias).matches()) … … 557 557 if (!PROPERTY_REGEXP.matcher(property).matches()) 558 558 { 559 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9 and . is allowed.");559 throw new InvalidDataException("Property '"+property+"' has one or more invalid characters. Only a-z, A-Z, 0-9, _ and . is allowed."); 560 560 } 561 561 return Restrictions.eq( -
trunk/src/core/net/sf/basedb/core/query/WhenStatement.java
r5320 r6576 23 23 24 24 import net.sf.basedb.core.InvalidUseOfNullException; 25 import net.sf.basedb.util.EqualsHelper; 25 26 26 27 /** … … 45 46 value is returned or not, null is not allowed 46 47 @param value The value to return if the condition is TRUE, 47 null is notallowed48 null is allowed 48 49 */ 49 50 public WhenStatement(Restriction condition, Expression value) 50 51 { 51 52 if (condition == null) throw new InvalidUseOfNullException("condition"); 52 if (value == null) throw new InvalidUseOfNullException("value");53 53 this.condition = condition; 54 54 this.value = value; … … 82 82 StringBuilder sb = new StringBuilder(); 83 83 sb.append("WHEN ").append(getCondition().toString()); 84 sb.append(" THEN ").append(getValue() .toString());84 sb.append(" THEN ").append(getValue() == null ? "null" : getValue().toString()); 85 85 return sb.toString(); 86 86 } … … 96 96 if (other == null || this.getClass() != other.getClass()) return false; 97 97 WhenStatement o = (WhenStatement)other; 98 return condition.equals(o.condition) && value.equals(o.value);98 return condition.equals(o.condition) && EqualsHelper.equals(value, o.value); 99 99 } 100 100 … … 102 102 public int hashCode() 103 103 { 104 return condition.hashCode() + value.hashCode();104 return condition.hashCode() + (value == null ? 0 : value.hashCode()); 105 105 } 106 106 // ------------------------------------------- -
trunk/src/core/net/sf/basedb/util/extensions/manager/processor/PluginInstallationProcessor.java
r6473 r6576 30 30 31 31 import net.sf.basedb.core.DbControl; 32 import net.sf.basedb.core.Include; 32 33 import net.sf.basedb.core.ItemKey; 33 34 import net.sf.basedb.core.ItemQuery; … … 174 175 175 176 PluginDefinition plugin = allPlugins.get(pluginClassName); 177 if (plugin == null) 178 { 179 try 180 { 181 plugin = PluginDefinition.getByClassName(dc, pluginClassName); 182 } 183 catch (RuntimeException ex) 184 {} 185 } 176 186 if (plugin != null) 177 187 { … … 180 190 { 181 191 ItemQuery<PluginConfiguration> query = plugin.getPluginConfigurations(); 192 query.setIncludes(Include.ALL); 182 193 query.restrict(Restrictions.eq(Hql.property("name"), Expressions.parameter("name", name, Type.STRING))); 183 194 List<PluginConfiguration> existing = query.list(dc); … … 202 213 } 203 214 } 204 215 else 216 { 217 numError++; 218 wFile.setError(true); 219 String msg = "Failed to install plug-in configuration '" + name + "', no plug-in: " + pluginClassName; 220 if (results != null) results.addErrorMessage(xtFile, msg); 221 log.error(msg); 222 } 205 223 } 206 224 } … … 213 231 if (numInstalled > 0) results.addMessage(xtFile, numInstalled + " plug-in(s) installed."); 214 232 if (numUpdated > 0) results.addMessage(xtFile, numUpdated + " plug-in(s) updated."); 215 if (numConfigurations > 0) results.addMessage(xtFile, numConfigurations + " plug-in configuration(s) created ");233 if (numConfigurations > 0) results.addMessage(xtFile, numConfigurations + " plug-in configuration(s) created."); 216 234 if (numInstalled == 0 && numUpdated == 0 && numProcessed > 0) 217 235 { 218 results.addMessage(xtFile, numProcessed + " plug-in(s) loaded ");236 results.addMessage(xtFile, numProcessed + " plug-in(s) loaded."); 219 237 } 220 238 } -
trunk/src/plugins/core/net/sf/basedb/plugins/RawDataFlatFileImporter.java
r6127 r6576 892 892 msg.append(" spot(s) skipped due to missing features"); 893 893 } 894 if (skippedLines > 0)895 { 896 msg.append("; ").append(skippedLines ).append(" spot(s) skipped due to errors");894 if (skippedLines > numSkippedMissingFeature) 895 { 896 msg.append("; ").append(skippedLines-numSkippedMissingFeature).append(" spot(s) skipped due to errors"); 897 897 } 898 898 return msg.toString(); -
trunk/src/test/TestFile.java
r6520 r6576 79 79 int baseTracServer = TestFileServer.test_create("base.thep.lu.se", "BASE trac site", 80 80 "base", "base", null, null, null); 81 int base2DemoServer = TestFileServer.test_create("base 2.thep.lu.se", "BASE demo site", null, null,82 "data/base 2.thep.lu.se.crt", null, null);81 int base2DemoServer = TestFileServer.test_create("base.onk.lu.se", "BASE demo site", null, null, 82 "data/base.onk.lu.se.crt", null, null); 83 83 int extId1 = test_create("http://base.thep.lu.se/robots.txt", false, false); 84 int extId2 = test_create("https://base 2.thep.lu.se/base/base-2.17.2.tar.gz.MD5", false, false);84 int extId2 = test_create("https://base.onk.lu.se/onk/images/baselogo.png", false, false); 85 85 int extId3 = test_create("http://base.thep.lu.se/login", false, false); 86 86 test_load(id1); … … 96 96 test_download(id1, "data/test.upload.txt"); 97 97 test_download(extId1, "data/test.download.robots.txt"); 98 test_download(extId2, "data/test.download.base -2.17.2.md5");98 test_download(extId2, "data/test.download.baselogo.png"); 99 99 test_download(extId3, null); 100 100 -
trunk/src/test/TestFileServer.java
r5362 r6576 47 47 // Standard tests: create, load, list 48 48 int id = test_create("base.thep.lu.se", "BASE trac site", "base", "base", null, null, null); 49 int id2 = test_create("base 2.thep.lu.se", "BASE demo site", null, null, "data/base2.thep.lu.se.crt", null, null);49 int id2 = test_create("base.onk.lu.se", "BASE demo site", null, null, "data/base.onk.lu.se.crt", null, null); 50 50 test_load(id); 51 51 test_list(-1); -
trunk/src/test/TestItemImporter.java
r6520 r6576 87 87 int childScanId = TestItemSubtype.test_create(Item.DERIVEDBIOASSAY, "ChildScan", SystemItems.getId(DerivedBioAssay.SCAN)); 88 88 int allSamplesSubtypeId = TestItemSubtype.test_create(Item.SAMPLE, "All samples"); 89 int base2DemoServer = TestFileServer.test_create("base 2.thep.lu.se", "BASE demo site", null, null,90 "data/base 2.thep.lu.se.crt", null, null);89 int base2DemoServer = TestFileServer.test_create("base.onk.lu.se", "BASE demo site", null, null, 90 "data/base.onk.lu.se.crt", null, null); 91 91 92 92 TestProject.test_defaultItem(projectId, Item.PROTOCOL, defaultSamplingProtocolId); … … 103 103 ok = ok & TestFile.test_list("/file-import", 1); // 'reporters.txt' 104 104 ok = ok & TestFile.test_list("/file-import/raw", 2); // 'file1.txt' and 'file2.txt' 105 ok = ok & TestFile.test_list("/file-import/ext", 2); // 'robots.txt' and ' 2.17.md5'105 ok = ok & TestFile.test_list("/file-import/ext", 2); // 'robots.txt' and 'baselogo.png' 106 106 107 107 // Import bioplates -
trunk/src/test/data/test.batchimport.files.txt
r6520 r6576 4 4 raw/file2.txt Raw data Raw data #2 5 5 /file-import/ext/robots.txt http://base.thep.lu.se/robots.txt text/plain Robots file for BASE 6 /file-import/ext/ 2.17.md5 https://base2.thep.lu.se/base/base-2.17.2.tar.gz.MD5 base2.thep.lu.se6 /file-import/ext/baselogo.png https://base.onk.lu.se/onk/images/baselogo.png base.onk.lu.se -
trunk/www/biomaterials/extracts/extracts.js
r6497 r6576 481 481 event.detail.name += ' [-]'; 482 482 Link.addItem('extracts', 'EXTRACT', event.detail); 483 frm.parentType[0].checked = false; 484 frm.parentType[1].checked = true; 485 extracts.parentTypeOnClick(); 483 if (event.detail.remaining == 0) 484 { 485 frm.parentType[0].checked = false; 486 frm.parentType[1].checked = true; 487 extracts.parentTypeOnClick(); 488 } 486 489 } 487 490 -
trunk/www/biomaterials/samples/samples.js
r6497 r6576 411 411 event.detail.name += ' [-]'; 412 412 Link.addItem('samples', 'SAMPLE', event.detail); 413 frm.parentType[0].checked = false; 414 frm.parentType[1].checked = true; 415 samples.parentTypeOnClick(); 413 if (event.detail.remaining == 0) 414 { 415 frm.parentType[0].checked = false; 416 frm.parentType[1].checked = true; 417 samples.parentTypeOnClick(); 418 } 416 419 } 417 420 -
trunk/www/common/import/select_file.jsp
r6305 r6576 158 158 <th>Character set</th> 159 159 <td> 160 <select name="charset" >160 <select name="charset" style="max-width: 98%;"> 161 161 <% 162 162 String defaultCharset = Config.getCharset(); … … 183 183 <th>Data files</th> 184 184 <td> 185 <select name="dataFile" id="dataFile" >185 <select name="dataFile" id="dataFile" style="width: 98%;"> 186 186 <option value=""> 187 187 <% … … 225 225 <th>Recently used</th> 226 226 <td> 227 <select name="recentFile" id="recentFile" >227 <select name="recentFile" id="recentFile" style="width: 98%;"> 228 228 <option value=""> 229 229 <% -
trunk/www/common/plugin/configure.jsp
r6393 r6576 231 231 if (helpText == null) helpText = plugin.getDescription(); 232 232 List<File> recentFiles = currentContext == null ? null : (List<File>)currentContext.getRecent(dc, Item.FILE); 233 234 recentFiles = File.getQuery().list(dc);235 233 236 234 JSONArray jsonParameters = JsonUtil.toArray(parameters, new JsonConverter<PluginParameter>() … … 747 745 id="<%=fieldName%>:recent" 748 746 name="<%=fieldName%>:recent" 749 data-field="<%=fieldName %>"> 747 data-field="<%=fieldName %>" 748 style="width: 98%;"> 750 749 <option value=""> 751 750 <% -
trunk/www/common/share/share.js
r6412 r6576 144 144 145 145 Link.addItem('members', 'USER', event.detail); 146 share.membersOnChange(); 146 if (event.detail.remaining == 0) 147 { 148 share.membersOnChange(); 149 } 147 150 } 148 151 … … 174 177 175 178 Link.addItem('members', 'GROUP', event.detail); 176 share.membersOnChange(); 179 if (event.detail.remaining == 0) 180 { 181 share.membersOnChange(); 182 } 177 183 } 178 184 … … 199 205 200 206 Link.addItem('members', 'PROJECT', event.detail); 201 share.membersOnChange(); 207 if (event.detail.remaining == 0) 208 { 209 share.membersOnChange(); 210 } 202 211 } 203 212 … … 218 227 { 219 228 Link.addItem('members', 'PERMISSIONTEMPLATE', event.detail); 220 share.membersOnChange(); 229 if (event.detail.remaining == 0) 230 { 231 share.membersOnChange(); 232 } 221 233 } 222 234 -
trunk/www/filemanager/files/files.js
r6400 r6576 148 148 else if (autoInit == 'file-check') 149 149 { 150 Events.addEventHandler(element, 'c lick', fileManager.onFileChecked);150 Events.addEventHandler(element, 'change', fileManager.onFileChecked); 151 151 } 152 152 else if (autoInit == 'directory-item') … … 172 172 url += '&directory_id='+directoryId; 173 173 } 174 Dialogs.openPopup(url, 'UploadFile', 600, 400); 174 var controller = Items.getController('FILE'); 175 Dialogs.openPopup(url, 'UploadFile', controller.width, controller.height); 175 176 } 176 177 -
trunk/www/filemanager/select_file.js
r6400 r6576 35 35 selectFile.setSelectedFile = function(fileId, path) 36 36 { 37 selected[0] = {'id': fileId, ' path': path};37 selected[0] = {'id': fileId, 'name': path}; 38 38 selectFile.updatePath(); 39 39 } … … 46 46 if (selectFile.getSelectedFileIndex(fileId) == -1) 47 47 { 48 selected[selected.length] = {'id': fileId, ' path': path};48 selected[selected.length] = {'id': fileId, 'name': path}; 49 49 } 50 50 selectFile.updatePath(); … … 73 73 { 74 74 if (path != '') path += ', '; 75 path += selected[i]. path;75 path += selected[i].name; 76 76 } 77 77 Doc.element('files').innerHTML = path; … … 84 84 var callbackMethod = window.opener[callback]; 85 85 86 var remaining = selected.length-1; 86 87 for (var i = 0; i < selected.length; i++) 87 88 { 89 var s = selected[i]; 90 s.remaining = remaining--; 88 91 if (notifyTarget) 89 92 { 90 93 // Send event to the target in the opener window 91 Events.sendCustomEvent(notifyTarget, 'base-selected', {'id': selected[i].id, 'name': selected[i].path});94 Events.sendCustomEvent(notifyTarget, 'base-selected', s); 92 95 } 93 96 else if (callbackMethod) 94 97 { 95 98 // Call the callback method in the opener window 96 callbackMethod.call(null, s elected[i].id, selected[i].path);99 callbackMethod.call(null, s.id, s.path); 97 100 } 98 101 } -
trunk/www/footnote.js
r6540 r6576 38 38 Buttons.addClickHandler('multiMessages', footnote.showAllMessages); 39 39 40 // Reload the footnote in 60 seconds 41 Footnote.startReloadTimer(); 42 } 43 44 /** 45 Start the reload timer. Timeout parameter (in seconds) is optional. 46 If not given, the default timout is used (60 seconds). 47 */ 48 footnote.startReloadTimer = function(timeout) 49 { 50 setTimeout(Footnote.reload, (timeout || pAutoReload) * 1000); 40 Footnote.loadMessages(); 51 41 } 52 42 … … 54 44 Reload the footnote page. 55 45 */ 56 footnote. reload= function()46 footnote.loadMessages = function() 57 47 { 58 location.reload(false); 48 var url = 'ajax.jsp?ID='+App.getSessionId(); 49 url += '&cmd=GetFootnoteMessages'; 50 var request = Ajax.getXmlHttpRequest(); 51 request.open("GET", url, true); 52 Ajax.setReadyStateHandler(request, footnote.messagesLoaded, footnote.messagesNotLoaded); 53 request.send(null); 54 } 55 56 footnote.messagesLoaded = function(request) 57 { 58 var messages = JSON.parse(request.responseText); 59 60 Doc.hide('broadcast'); 61 Doc.hide('credit'); 62 Doc.hide('singleMessage'); 63 Doc.hide('multiMessages'); 64 if (messages.broadcast) 65 { 66 Doc.show('broadcast'); 67 Doc.element('broadcast-title').innerHTML = Strings.encodeTags(messages.broadcast); 68 } 69 else if (messages.newMessages > 1) 70 { 71 Doc.show('multiMessages'); 72 Doc.element('num-messages').innerHTML = messages.newMessages; 73 } 74 else if (messages.newMessages == 1) 75 { 76 var msg = messages.message; 77 Doc.show('singleMessage'); 78 Data.set('singleMessage', 'message-id', msg.id); 79 Doc.element('message-name').innerHTML = Strings.encodeTags(msg.name); 80 Doc.element('message-from').innerHTML = Strings.encodeTags(msg.from); 81 } 82 else 83 { 84 Doc.show('credit'); 85 } 86 setTimeout(footnote.loadMessages, pAutoReload * 1000); 87 } 88 89 footnote.messagesNotLoaded = function(request) 90 { 91 App.debug('Footnote not updated: ' + request.responseText); 92 setTimeout(footnote.loadMessages, pAutoReload * 1000); 59 93 } 60 94 -
trunk/www/footnote.jsp
r6167 r6576 45 45 <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> 46 46 <% 47 String broadcastTitle = (String)application.getAttribute("broadcast.title");48 47 SessionControl sc = Base.getSessionControl(pageContext, false); 49 48 String ID = ""; … … 56 55 serverAdminName = Values.getStringOrNull(sc.getClientDefaultSetting("server.admin.name")); 57 56 serverAdminEmail = Values.getStringOrNull(sc.getClientDefaultSetting("server.admin.email")); 58 dc = sc.newDbControl();59 57 } 60 long numNewMessages = 0;61 58 try 62 59 { 63 if (sc != null && sc.isLoggedIn()) numNewMessages = Message.countUnreadMessages(dc, null, false);64 60 %> 65 61 <base:page type="iframe" title=""> … … 68 64 <div class="footer"> 69 65 <table style="width: 100%; height: 100%;"><tr><td> 70 <% 71 if (broadcastTitle != null) 72 { 73 String broadcastMessage = (String)application.getAttribute("broadcast.message"); 74 %> 75 <div class="message"> 66 67 <div class="message" id="broadcast" style="display: none;"> 76 68 <base:icon id="broadcast" image="warning.png" tooltip="Read more…" 77 style="font-weight: bold;"> <%=HTML.encodeTags(broadcastTitle) %></base:icon> 69 style="font-weight: bold;"> 70 <span id="broadcast-title"></span> 71 </base:icon> 78 72 </div> 79 <% 80 } 81 else if (numNewMessages == 0) 82 { 83 %> 84 <div class="credit"> 73 74 <div class="credit" id="credit"> 85 75 The development of BASE is currently supported by Lund 86 76 University through SCIBLU. Previous patrons of the BASE project … … 108 98 %> 109 99 </div> 110 <% 111 } 112 else if (numNewMessages == 1) 113 { 114 User user = User.getById(dc, sc.getLoggedInUserId()); 115 ItemQuery<Message> query = Message.getQuery(user); 116 query.restrict( 117 Restrictions.eq( 118 Hql.property("read"), 119 Expressions.parameter("read") 120 ) 121 ); 122 query.setParameter("read", false, Type.BOOLEAN); 123 ItemResultList<Message> messages = query.list(dc); 124 Message message = messages.get(0); 125 %> 126 <base:icon id="singleMessage" image="message.png" tooltip="Read the message" 127 data-message-id="<%=message.getId()%>" 128 > <%=HTML.encodeTags(message.getName())%> (From: <%=HTML.encodeTags(message.getFrom())%>) 100 101 <base:icon id="singleMessage" style="display: none;" image="message.png" tooltip="Read the message"> 102 <span id="message-name"></span> (From: <span id="message-from"></span>) 129 103 </base:icon> 130 <% 131 } 132 else 133 { 134 %> 135 <base:icon id="multiMessages" image="message.png" tooltip="Read the messages" 136 > <b>You have <%=numNewMessages%> new messages</b></base:icon> 137 <% 138 } 139 %> 104 <base:icon id="multiMessages" style="display: none;" image="message.png" tooltip="Read the messages"> 105 <b>You have <span id="num-messages"></span> new messages</b> 106 </base:icon> 140 107 </td></tr></table> 141 108 </div> -
trunk/www/include/menu.jsp
r6426 r6576 1224 1224 else if (action.getType() == MenuItemAction.MenuType.MENUITEM) 1225 1225 { 1226 %> 1227 <m:menuitem 1228 id="<%=action.getId() %>" 1229 subclass="<%=action.getClazz() %>" 1230 style="<%=action.getStyle()%>" 1231 title="<%=action.getTitle()%>" 1232 icon="<%=action.getIcon()%>" 1233 tooltip="<%=action.getTooltip()%>" 1234 enabled="<%=action.isEnabled()%>" 1235 visible="<%=action.isVisible()%>" 1236 onclick="<%=action.getOnClick()%>" 1237 dynamic="<%=dynamicAttributes%>" 1238 /> 1239 <% 1226 if (action.getOnClick() != null) 1227 { 1228 %> 1229 <m:menuitem 1230 id="<%=action.getId() %>" 1231 subclass="<%=action.getClazz() %>" 1232 style="<%=action.getStyle()%>" 1233 title="<%=action.getTitle()%>" 1234 icon="<%=action.getIcon()%>" 1235 tooltip="<%=action.getTooltip()%>" 1236 enabled="<%=action.isEnabled()%>" 1237 visible="<%=action.isVisible()%>" 1238 onclick="<%=action.getOnClick()%>" 1239 dynamic="<%=dynamicAttributes%>" 1240 /> 1241 <% 1242 } 1243 else 1244 { 1245 %> 1246 <m:menuitem 1247 id="<%=action.getId() %>" 1248 subclass="<%=action.getClazz() %>" 1249 style="<%=action.getStyle()%>" 1250 title="<%=action.getTitle()%>" 1251 icon="<%=action.getIcon()%>" 1252 tooltip="<%=action.getTooltip()%>" 1253 enabled="<%=action.isEnabled()%>" 1254 visible="<%=action.isVisible()%>" 1255 dynamic="<%=dynamicAttributes%>" 1256 /> 1257 <% 1258 } 1240 1259 } 1241 1260 else if (action.getType() == MenuItemAction.MenuType.SUBMENU) -
trunk/www/include/scripts/main-2.js
r6540 r6576 75 75 app.getScale = function() 76 76 { 77 return Data. int(document.body, 'gui-scale');77 return Data.float(document.body, 'gui-scale'); 78 78 } 79 79 … … 226 226 { 227 227 console.log(message); 228 } 229 230 /** 231 Log usage of a deprecated method. A call to this method 232 should be included as the first line in a deprecated method. 233 @param method The name of the method (eg. Main.openPopup()) 234 @param voidVersion The version number of BASE in which the method will be removed 235 */ 236 app.deprecatedMethod = function(method, voidVersion) 237 { 238 var msg = 'Deprecated method "' + method + '" will be removed in BASE ' + voidVersion; 239 console.error(msg); 228 240 } 229 241 … … 755 767 events.integerOnly = function(event) 756 768 { 757 var charCode = event.charCode || event.keyCode;769 var charCode = event.charCode; 758 770 // <31 for tab, delete, etc. 48-57=key 0-9, 45= '-' 759 771 var allow = charCode <= 31 || (charCode >= 48 && charCode <= 57) || charCode == 45; … … 767 779 events.numberOnly = function(event) 768 780 { 769 var charCode = event.charCode || event.keyCode;781 var charCode = event.charCode; 770 782 // <31 for tab, delete, etc. 48-57=key 0-9, 45= '-', 46='.', 69/101=E/e 771 783 var allow = charCode <= 31 || (charCode >= 48 && charCode <= 57) || charCode == 45 || charCode == 46 || charCode == 69 || charCode == 101; … … 1261 1273 // If no last position is know, use the specified settings 1262 1274 position = {}; 1263 // Rescale according to user settings 1275 // Rescale according to user settings -- but not larger than current screen 1264 1276 var scale = App.getScale(); 1265 position.width = width * scale;1266 position.height = height * scale;1277 position.width = Math.ceil(Math.min(width * scale, screen.availWidth)); 1278 position.height = Math.ceil(Math.min(height * scale, screen.availHeight)); 1267 1279 1268 1280 // Try to position the popup window in the center of the parent window. 1269 1281 var pos = App.getWindowPosition(window.top); 1270 var top = Math.ceil(pos.top+(pos.height- height) / 2);1271 var left = Math.ceil(pos.left+(pos.width- width) / 2);1282 var top = Math.ceil(pos.top+(pos.height-position.height) / 2); 1283 var left = Math.ceil(pos.left+(pos.width-position.width) / 2); 1272 1284 position.top = (top < 0 && pos.top >= 0) ? 0 : top; 1273 1285 position.left = (left < 0 && pos.left >= 0) ? 0 : left; … … 1938 1950 controllers['EXTRAVALUETYPE'] = { url:'admin/extravaluetypes/index.jsp', width:600, height:400 }; 1939 1951 controllers['FEATURE'] = { url:'lims/arraydesigns/features/index.jsp', width:750, height:500, popup:true, edit:false, noAnyToAny:true }; 1940 controllers['FILE'] = { url:'filemanager/index.jsp', iframe:true, width: 600, height:400 };1952 controllers['FILE'] = { url:'filemanager/index.jsp', iframe:true, width:750, height:500 }; 1941 1953 controllers['FILESERVER'] = { url:'filemanager/fileservers/index.jsp', width:750, height:500 }; 1942 controllers['FORMULA'] = { url:'views/formulas/index.jsp', width: 750, height:500 };1954 controllers['FORMULA'] = { url:'views/formulas/index.jsp', width:900, height:600 }; 1943 1955 controllers['GROUP'] = { url:'admin/groups/index.jsp', width:600, height:400 }; 1944 1956 controllers['HARDWARE'] = { url:'admin/hardware/index.jsp', width:800, height:500 }; … … 2216 2228 2217 2229 // Kept for backwards compatibility 2230 // @Deprecated 2218 2231 forms.createHidden = function(frm, name, value, doc) 2219 2232 { 2233 App.deprecatedMethod('Forms.createHidden()', '3.5'); 2220 2234 Forms.addHidden(frm, name, value); 2221 2235 } … … 2302 2316 if (element.type == 'checkbox' && !element.disabled && element.name.match(nameRegexp)) 2303 2317 { 2318 var was = element.checked; 2304 2319 if (first == null) 2305 2320 { … … 2311 2326 element.checked = first.checked; 2312 2327 } 2328 if (was != element.checked) Events.sendChangeEvent(element); 2313 2329 } 2314 2330 } … … 2883 2899 2884 2900 // Kept for backwards compatibility 2901 // @Deprecated 2885 2902 numbers.numberOnly = function(event) 2886 2903 { 2904 App.deprecatedMethod('Numbers.numberOnly()', '3.5'); 2887 2905 Events.numberOnly(event); 2888 2906 } 2889 2907 2890 2908 // Kept for backwards compatibility 2909 // @Deprecated 2891 2910 numbers.integerOnly = function(event) 2892 2911 { 2912 App.deprecatedMethod('Numbers.integerOnly()', '3.5'); 2893 2913 Events.integerOnly(event); 2894 2914 } … … 3361 3381 @param callback Deprecated, onchange event is sent instead 3362 3382 */ 3383 // @Deprecated 3363 3384 dates.selectDate = function(title, form, input, callback, format) 3364 3385 { 3386 App.deprecatedMethod('Dates.selectDate()', '3.5'); 3365 3387 var textarea = document.forms[form][input]; 3366 3388 if (!textarea.id) textarea.id = 't'+(new Date()).getTime(); … … 3378 3400 @param callback Deprecated, onchange event is sent instead 3379 3401 */ 3402 // @Deprecated 3380 3403 dates.selectDateTime = function(title, form, input, callback, format) 3381 3404 { 3405 App.deprecatedMethod('Dates.selectDateTime()', '3.5'); 3382 3406 var textarea = document.forms[form][input]; 3383 3407 if (!textarea.id) textarea.id = 't'+(new Date()).getTime(); -
trunk/www/include/scripts/main.js
r6419 r6576 29 29 */ 30 30 31 31 32 /** 32 33 Get the root URL path of this BASE installation. Always ends with a '/' (eg. /base/) 33 34 */ 35 // @Deprecated 34 36 function getRoot() 35 37 { 38 App.deprecatedMethod('getRoot()', '3.5'); 36 39 return App.getRoot(); 37 40 } … … 41 44 (should only happen on the top frameset of the login page) 42 45 */ 46 //@Deprecated 43 47 function getSessionId() 44 48 { 49 App.deprecatedMethod('getSessionId()', '3.5'); 45 50 return App.getSessionId(); 46 51 } … … 50 55 require scaling to fit). 51 56 */ 57 //@Deprecated 52 58 function getScale() 53 59 { 60 App.deprecatedMethod('getScale()', '3.5'); 54 61 return App.getScale(); 55 62 } … … 60 67 value of '0' disable the rewriting. 61 68 */ 69 //@Deprecated 62 70 function getMaxUrlLength() 63 71 { 72 App.deprecatedMethod('getMaxUrlLength()', '3.5'); 64 73 return App.getMaxUrlLength(); 65 74 } … … 77 86 in the reverse order as they were added to this method. 78 87 */ 88 // @Deprecated 79 89 this.onLoad = function(f) 80 90 { 91 App.deprecatedMethod('Main.onLoad()', '3.5'); 81 92 Doc.onLoad(f); 82 93 } … … 95 106 @see http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/window.html#1202731 96 107 */ 108 // @Deprecated 97 109 this.openPopup = function(url, name, width, height, options, parentWin) 98 110 { 111 App.deprecatedMethod('Main.openPopup()', '3.5'); 99 112 Dialogs.openPopup(url, name, width, height); 100 113 } … … 103 116 Brings a named window to focus. 104 117 */ 118 // @Deprecated 105 119 this.focusWindow = function(windowName) 106 120 { 121 App.deprecatedMethod('Main.focusWindow()', '3.5'); 107 122 var win = this.getWindow(windowName); 108 123 if (win) win.focus(); … … 114 129 the current window is returned. 115 130 */ 131 // @Deprecated 116 132 this.getWindow = function(windowName) 117 133 { 134 App.deprecatedMethod('Main.getWindow()', '3.5'); 118 135 var win = Dialogs.getDialog(windowName); 119 136 if (!win || win.closed) win = window; … … 130 147 @param textarea The name of the textarea to zoom 131 148 */ 149 // @Deprecated 132 150 this.zoom = function(title, form, textarea, disabled, callback) 133 151 { 152 App.deprecatedMethod('Main.zoom()', '3.5'); 134 153 var tmp = document.forms[form][textarea]; 135 154 if (!tmp.id) tmp.id = 'z'+(new Date()).getTime(); … … 148 167 instead of by setting the form field 149 168 */ 169 // @Deprecated 150 170 this.selectColor = function(title, form, input, callback) 151 171 { 172 App.deprecatedMethod('Main.selectColor()', '3.5'); 152 173 var tmp = document.forms[form][input]; 153 174 if (!tmp.id) tmp.id = 'z'+(new Date()).getTime(); … … 161 182 @param helpid The id of the helptext to be displayed. 162 183 */ 184 // @Deprecated 163 185 this.openHelp = function(ID, helpid) 164 186 { 187 App.deprecatedMethod('Main.openHelp()', '3.5'); 165 188 Dialogs.openHelp(helpid); 166 189 } … … 175 198 used if the current tab doesn't specify a help id 176 199 */ 200 // @Deprecated 177 201 this.openTabControlHelp = function(ID, tabcontrol, helpId) 178 202 { 203 App.deprecatedMethod('Main.openTabControlHelp()', '3.5'); 179 204 Dialogs.openTabControlHelp(tabcontrol, helpId); 180 205 } … … 189 214 @param maxLength The maximum length 190 215 */ 216 // @Deprecated 191 217 this.cutString = function(value, maxLength) 192 218 { 219 App.deprecatedMethod('Main.cutString()', '3.5'); 193 220 return Strings.cut(value, maxLength); 194 221 } … … 199 226 @return The trimmed string 200 227 */ 228 // @Deprecated 201 229 this.trimString = function(value) 202 230 { 231 App.deprecatedMethod('Main.trimString()', '3.5'); 203 232 return Strings.trim(value); 204 233 } 205 234 206 235 // Show or hide an element with the given ID attribute as a block element 236 // @Deprecated 207 237 this.showHide = function(id, show) 208 238 { 239 App.deprecatedMethod('Main.showHide()', '3.5'); 209 240 Doc.showHide(id, show); 210 241 } 211 242 212 243 // Shows an element with the given ID attribute as a block element 244 // @Deprecated 213 245 this.show = function(id) 214 246 { 247 App.deprecatedMethod('Main.show()', '3.5'); 215 248 Doc.show(id); 216 249 } 217 250 // Shows an element with the given ID attribute as an inline element 251 // @Deprecated 218 252 this.showInline = function(id) 219 253 { 254 App.deprecatedMethod('Main.showInline()', '3.5'); 220 255 Doc.show(id, 'inline'); 221 256 } 222 257 // Hides an element with the given ID attribute 258 // @Deprecated 223 259 this.hide = function(id) 224 260 { 261 App.deprecatedMethod('Main.hide()', '3.5'); 225 262 Doc.hide(id); 226 263 } 227 264 265 // @Deprecated 228 266 this.addClass = function(obj, className) 229 267 { 268 App.deprecatedMethod('Main.addClass()', '3.5'); 230 269 Doc.addClass(obj, className); 231 270 } 232 271 272 // @Deprecated 233 273 this.removeClass = function(obj, className) 234 274 { 275 App.deprecatedMethod('Main.removeClass()', '3.5'); 235 276 Doc.removeClass(obj, className); 236 277 } 237 278 279 // @Deprecated 238 280 this.addOrRemoveClass = function(obj, className, addIfTrue) 239 281 { 282 App.deprecatedMethod('Main.addOrRemoveClass()', '3.5'); 240 283 Doc.addOrRemoveClass(obj, className, addIfTrue); 241 284 } 242 285 286 // @Deprecated 243 287 this.toggleClass = function(obj, className) 244 288 { 289 App.deprecatedMethod('Main.toggleClass()', '3.5'); 245 290 Doc.addOrRemoveClass(obj, className); 246 291 } … … 248 293 // Get the character code of an event that invloves a key, returns 0 if no code can be found 249 294 // Use this method for onKeyPress events only. See also: getEventKeyCode() 295 // @Deprecated 250 296 this.getEventCharCode = function(event) 251 297 { 298 App.deprecatedMethod('Main.getEventCharCode()', '3.5'); 252 299 var charCode = event.charCode; 253 300 if (event.ctrlKey) … … 273 320 // Get the key code of an event that invloves a key, returns 0 if no code can be found 274 321 // Use this method for onKeyDown and onKeyUp events only. See also: getEventCharCode(); 322 // @Deprecated 275 323 this.getEventKeyCode = function(event) 276 324 { 325 App.deprecatedMethod('Main.getEventKeyCode()', '3.5'); 277 326 return event.keyCode; 278 327 } … … 280 329 // Handle keypress events on focused elements: 281 330 // * Send a 'click' event to the same target if the 'ENTER' key was pressed 331 // @Deprecated 282 332 this.handleFocusedKeypress = function(event) 283 333 { 334 App.deprecatedMethod('Main.handleFocusedKeypress()', '3.5'); 284 335 Events.handleFocusedKeypress(event); 285 336 } 286 337 287 338 // Try to get the window height 339 // @Deprecated 288 340 this.getWindowHeight = function(theWin) 289 341 { 342 App.deprecatedMethod('Main.getWindowHeight()', '3.5'); 290 343 return App.getWindowPosition(theWin).height; 291 344 } 292 345 293 346 // Try to get the window width 347 // @Deprecated 294 348 this.getWindowWidth = function(theWin) 295 349 { 350 App.deprecatedMethod('Main.getWindowWidth()', '3.5'); 296 351 return App.getWindowPosition(theWin).width; 297 352 } … … 300 355 // returns an object with 'left', 'top', 'width' and 'height' properties 301 356 // If 'rightAndBottom' is true, then 'right' and 'bottom' properties are also calculated 357 // @Deprecated 302 358 this.getElementPosition = function(theElement, rightAndBottom) 303 359 { 360 App.deprecatedMethod('Main.getElementPosition()', '3.5'); 304 361 return Doc.getElementPosition(theElement); 305 362 } 306 363 307 364 365 // @Deprecated 308 366 this.encodeURI = function(value) 309 367 { 368 App.deprecatedMethod('Main.encodeURI()', '3.5'); 310 369 return encodeURIComponent(value); 311 370 } 312 371 372 // @Deprecated 313 373 this.encodeTags = function(value) 314 374 { 375 App.deprecatedMethod('Main.encodeTags()', '3.5'); 315 376 return Strings.encodeTags(value); 316 377 } 317 378 379 // @Deprecated 318 380 this.viewFile = function(ID, fileId) 319 381 { 382 App.deprecatedMethod('Main.viewFile()', '3.5'); 320 383 Files.viewFile(fileId); 321 384 } 322 385 386 // @Deprecated 323 387 this.downloadFile = function(ID, fileId) 324 388 { 389 App.deprecatedMethod('Main.downloadFile()', '3.5'); 325 390 Files.downloadFile(fileId); 326 391 } 327 392 328 393 394 // @Deprecated 329 395 this.getController = function(itemType) 330 396 { 397 App.deprecatedMethod('Main.getController()', '3.5'); 331 398 return Items.getController(itemType); 332 399 } 333 400 401 // @Deprecated 334 402 this.listItems = function(ID, itemType, extraUrl) 335 403 { 404 App.deprecatedMethod('Main.listeItems()', '3.5'); 336 405 Items.list(itemType, extraUrl); 337 406 } 338 407 408 // @Deprecated 339 409 this.viewOrEditItem = function(ID, itemType, itemId, edit, extraUrl, popupOptions) 340 410 { 411 App.deprecatedMethod('Main.viewOrEditItem()', '3.5'); 341 412 if (edit) 342 413 { … … 350 421 } 351 422 423 // @Deprecated 352 424 this.selectItem = function(ID, itemType, mode, callback, extraUrl, popupOptions) 353 425 { 426 App.deprecatedMethod('Main.selectItem()', '3.5'); 354 427 Dialogs.selectItem(itemType, callback, mode.indexOf('ultiple') > 0, extraUrl); 355 428 } 356 429 430 // @Deprecated 357 431 this.deleteItemPermanently = function(ID, ask, itemType, itemId, extraUrl, popupOptions) 358 432 { 433 App.deprecatedMethod('Main.deleteItemPermanently()', '3.5'); 359 434 Items.deleteItemPermanently(itemType, itemId, ask); 360 435 } 361 436 437 // @Deprecated 362 438 this.showUsingItems = function(ID, itemType, itemId, extraUrl) 363 439 { 440 App.deprecatedMethod('Main.showUsingItems()', '3.5'); 364 441 Items.showUsingItems(itemType, itemId); 365 442 } … … 369 446 @return A request object or null if the browser doesn't support ajax 370 447 */ 448 // @Deprecated 371 449 this.getAjaxRequest = function() 372 450 { 451 App.deprecatedMethod('Main.getAjaxRequest()', '3.5'); 373 452 return Ajax.getXmlHttpRequest(); 374 453 } … … 388 467 (only if url is not too long) 389 468 */ 469 // @Deprecated 390 470 this.safeSetLocation = function(url, win, replace) 391 471 { 472 App.deprecatedMethod('Main.safeSetLocation()', '3.5'); 392 473 App.safeSetLocation(url, win, replace); 393 474 } … … 396 477 Check if the URL is longer than the configured max URL length. 397 478 */ 479 // @Deprecated 398 480 this.isTooLongURL = function(url) 399 481 { 482 App.deprecatedMethod('Main.isTooLongURL()', '3.5'); 400 483 return App.isTooLongUrl(url); 401 484 } … … 412 495 window. 413 496 */ 497 // @Deprecated 414 498 this.convertToPostForm = function(url, win) 415 499 { 500 App.deprecatedMethod('Main.convertToPostForm()', '3.5'); 416 501 return Forms.convertUrlToForm(url, win); 417 502 } … … 420 505 Save a key-value pair for a page. 421 506 */ 507 // @Deprecated 422 508 this.setPageValue = function(page, key, value) 423 509 { 510 App.deprecatedMethod('Main.setPageValue()', '3.5'); 424 511 Data.setPageValue(key, value, page); 425 512 } … … 428 515 Get the saved value for the given key on a page 429 516 */ 517 // @Deprecated 430 518 this.getPageValue = function(page, key) 431 519 { 520 App.deprecatedMethod('Main.getPageValue()', '3.5'); 432 521 return Data.getPageValue(key, page); 433 522 } 434 523 435 524 525 // @Deprecated 436 526 this.debug = function(message, clearOutput) 437 527 { 528 App.deprecatedMethod('Main.debug()', '3.5'); 438 529 App.debug(message); 439 530 } 440 531 532 // @Deprecated 441 533 this.hideDebug = function() 442 {} 534 { 535 App.deprecatedMethod('Main.hideDebug()', '3.5'); 536 } 443 537 444 538 } -
trunk/www/include/scripts/popup.js
r6540 r6576 42 42 { 43 43 saveDialogPosition = window.top.name && App.rememberDialogPositions(); 44 if (saveDialogPosition) setTimeout(internal.initPosition, 500);44 if (saveDialogPosition) setTimeout(internal.initPosition, 200); 45 45 } 46 46 … … 51 51 var key = 'dialog-position-req:'+window.top.name; 52 52 var rpos = JSON.parse(App.getLocal(key)); 53 // alert('['+window.screenX+', '+window.screenY+'], ['+rpos.width+', ' + rpos.height+'], ['+window.innerWidth+', ' + window.innerHeight+'], [' + window.outerWidth+', '+window.outerHeight+']');54 53 if (rpos) 55 54 { 56 55 App.removeLocal(key); 57 56 var cpos = App.getWindowPosition(window.top); 58 dx = rpos.width-cpos.width; 59 dy = rpos.height-cpos.height; 57 dx = Math.min(rpos.width, screen.availWidth) - cpos.width; 58 dy = Math.min(rpos.height, screen.availHeight) - cpos.height; 59 // window.top.opener.App.debug('requested:'+JSON.stringify(rpos)); 60 // window.top.opener.App.debug('actual:'+JSON.stringify(cpos)); 61 // window.top.opener.App.debug('delta:'+dx+','+dy); 62 // window.top.opener.App.debug('screen:'+screen.availWidth+','+screen.availHeight); 60 63 } 61 64 } -
trunk/www/include/scripts/table.js
r6372 r6576 422 422 url += '&table_id='+tableDiv.id+'&item_type='+itemType+'&subcontext='+subContext; 423 423 if (settingName) url += '&settingName='+settingName; 424 Dialogs.openPopup(url, 'ConfigureColumns', 600, 400);424 Dialogs.openPopup(url, 'ConfigureColumns', 750, 450); 425 425 } 426 426 … … 658 658 { 659 659 element.checked = !element.checked; 660 Events.sendChangeEvent(element); 660 661 return element; 661 662 } … … 736 737 } 737 738 738 var numSelected = 0;739 var selected = []; 739 740 if (frm.item_id) 740 741 { … … 744 745 { 745 746 var id = element.value.match(/^\d+$/) ? parseInt(element.value) : element.value; 746 if (notifyTarget) 747 { 748 // Send event to the target in the opener window 749 Events.sendCustomEvent(notifyTarget, 'base-selected', {'id': id, 'name': element.title, 'itemType': itemType}); 750 } 751 else if (callbackMethod) 752 { 753 // Call the callback method in the opener window 754 callbackMethod.call(null, id, element.title); 755 } 756 numSelected = 1; 747 selected[selected.length] = {'id': id, 'name': element.title, 'itemType': itemType}; 757 748 } 758 749 } … … 766 757 { 767 758 var id = element.value.match(/^\d+$/) ? parseInt(element.value) : element.value; 768 if (notifyTarget) 769 { 770 // Send event to the target in the opener window 771 Events.sendCustomEvent(notifyTarget, 'base-selected', {'id': id, 'name': element.title, 'itemType': itemType}); 772 } 773 else if (callbackMethod) 774 { 775 // Call the callback method in the opener window 776 callbackMethod.call(null, id, element.title); 777 } 778 numSelected++; 759 selected[selected.length] = {'id': id, 'name': element.title, 'itemType': itemType}; 779 760 } 780 761 } 781 762 } 782 return numSelected; 763 764 var remaining = selected.length-1; 765 for (var i = 0; i < selected.length; i++) 766 { 767 var s = selected[i]; 768 s.remaining = remaining--; 769 if (notifyTarget) 770 { 771 // Send event to the target in the opener window 772 Events.sendCustomEvent(notifyTarget, 'base-selected', s); 773 } 774 else if (callbackMethod) 775 { 776 // Call the callback method in the opener window 777 callbackMethod.call(null, s.id, s.name); 778 } 779 } 780 781 return selected.length; 783 782 } 784 783 -
trunk/www/login.js
r6540 r6576 48 48 login.initForm(); 49 49 50 var footNoteFrame = App.topWindow().frames['footnote']; 51 if (footNoteFrame) 52 { 53 footNoteFrame.location.reload(); 54 } 55 50 56 if (Exception) Exception.fixWindow(); 51 57 } -
trunk/www/views/jobs/view_job.jsp
r6520 r6576 239 239 <th>Plugin</th> 240 240 <td> 241 <base:propertyvalue item="<%=job%>" property="pluginDefinition.name" />241 <base:propertyvalue item="<%=job%>" property="pluginDefinition.name" nulltext="<i>External</i>"/> 242 242 <%=job.getPluginVersion() == null ? 243 "" : "( version" + HTML.encodeTags(job.getPluginVersion()) + ")"%>243 "" : "(" + HTML.encodeTags(job.getPluginVersion()) + ")"%> 244 244 </td> 245 245 </tr> -
trunk/www/views/physicalbioassays/bioassays.js
r6400 r6576 353 353 event.detail.value = ':1'; 354 354 Link.addItem('extracts', 'EXTRACT', event.detail); 355 bioassays.extractsOnChange(); 355 if (event.detail.remaining == 0) 356 { 357 bioassays.extractsOnChange(); 358 } 356 359 } 357 360
Note: See TracChangeset
for help on using the changeset viewer.