Changeset 3138
- Timestamp:
- Feb 20, 2007, 8:34:13 AM (16 years ago)
- Location:
- branches/2.2.2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.2/src/clients/web/net/sf/basedb/clients/web/formatter/FormatterSettings.java
r2981 r3138 80 80 { 81 81 sc.setUserClientSetting("formatter.number.decimals", Integer.toString(numDecimals)); 82 sc.setSessionSetting("formatter.number", null); 82 sc.setSessionSetting("formatter.double", null); 83 sc.setSessionSetting("formatter.float", null); 83 84 } 84 85 -
branches/2.2.2/src/core/net/sf/basedb/util/Values.java
r2981 r3138 628 628 result.append(lNumber).append("."); 629 629 String theDecimals = Long.toString(Math.round(fNumber*exp-lNumber*exp)); 630 result.append(theDecimals);631 630 if (theDecimals.length() < decimals) 632 631 { … … 636 635 } 637 636 } 637 result.append(theDecimals); 638 638 } 639 639 if (unit != null) result.append(unit); -
branches/2.2.2/www/my_base/user/preferences.jsp
r2978 r3138 390 390 </td> 391 391 </tr> 392 <% 393 int numDecimals = FormatterSettings.getNumDecimals(sc); 394 %> 395 <tr> 396 <td class="prompt">Decimals</td> 397 <td> 398 <select name="decimals"> 399 <% 400 for (int i = 0; i < 8; i++) 401 { 402 %> 403 <option value="<%=i%>" <%=numDecimals == i ? "selected" : ""%>><%=i%> 404 <% 405 } 406 %> 407 <option value="-1" <%=numDecimals < 0 ? "selected" : ""%>>all 408 </select> 409 </td> 410 </tr> 392 411 393 412 </table> -
branches/2.2.2/www/my_base/user/submit_user.jsp
r2978 r3138 126 126 cc.setRecent("dateFormats", dateFormat, maxRecent); 127 127 cc.setRecent("dateTimeFormats", dateTimeFormat, maxRecent); 128 129 int numDecimals = Values.getInt(request.getParameter("decimals"), 2); 130 FormatterSettings.setNumDecimals(sc, numDecimals); 128 131 129 132 sc.setUserClientSetting("plugins.sendmessage", Values.getString(request.getParameter("sendmessage"), "0"));
Note: See TracChangeset
for help on using the changeset viewer.