Changeset 5904


Ignore:
Timestamp:
Dec 9, 2011, 2:52:53 PM (11 years ago)
Author:
Nicklas Nordborg
Message:

References #1655: GUI improvements

  • Started on tabcontrol re-design. It does look good on popup windows with tabs at bottom, but there are optimizations to be made still.


  • Started working on a few more dialogs in the BASE menu. The look good, but there is more optimizations to be made.
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/tab/TabControl.java

    r5809 r5904  
    2525import javax.servlet.jsp.JspException;
    2626import javax.servlet.jsp.JspTagException;
    27 import javax.servlet.jsp.tagext.TagSupport;
    2827
    2928import net.sf.basedb.clients.web.extensions.tabcontrol.TabAction;
     29import net.sf.basedb.clients.web.taglib.StylableTag;
    3030import net.sf.basedb.util.extensions.ExtensionsInvoker;
    3131import net.sf.basedb.util.extensions.Renderer;
     
    4141      id=...
    4242      clazz=...
     43      subclass=...
    4344      style=...
    4445      contentstyle=...
    45       width=...
    4646      active=...
    4747      switch=...
    4848      position=...
    49       autoheight=true|false
    5049      notabs=true|false
    5150      extensions=...
     
    7776  <tr>
    7877    <td>clazz</td>
    79     <td>button</td>
     78    <td>tabcontrol</td>
    8079    <td>no</td>
    8180    <td>
     
    8382      <code>class</code> attribute. This allows you to apply different styles
    8483      to different tables.
     84    </td>
     85  </tr>
     86  <tr>
     87    <td>subclass</td>
     88    <td>-</td>
     89    <td>no</td>
     90    <td>
     91      Additional classes to put in the HTML class attribute. Doesn't
     92      replace the main class attribute.
    8593    </td>
    8694  </tr>
     
    141149  </tr>
    142150  <tr>
    143     <td>autoheight</td>
    144     <td>true</td>
    145     <td>no</td>
    146     <td>
    147       If the tab control should try to automatically adjust the height of the tab content
    148       area when the window is resized. This functionality replaces the
    149       <code>window.onresize</code> event handler. If an existing event handler exists
    150       it will be saved as <code>window.oldOnresize</code> and invoked before the
    151       tabs are resized.
    152     </td>
    153   </tr>
    154   <tr>
    155151    <td>notabs</td>
    156152    <td>false</td>
     
    178174*/
    179175public class TabControl
    180   extends TagSupport
     176  extends StylableTag
    181177  implements Renderer<TabAction>
    182178{
     
    187183
    188184  /**
    189     Optional <code>class</code> attribute.
    190     @since 2.17
    191   */
    192   private String clazz;
    193 
    194   /**
    195     Optional <code>style</code> attribute
    196   */
    197   private String style = null;
    198 
    199   /**
    200185    Optional <code>style</code> attribute for the content section
    201186  */
     
    203188 
    204189  /**
    205     The width of the tab control.
    206   */
    207   private String width = null;
    208  
    209   /**
    210190    The ID attribute of the active tab.
    211191  */
     
    274254  public static final int BOTTOM = 2;
    275255
     256  public TabControl()
     257  {
     258    super("tabcontrol");
     259  }
     260 
    276261  /*
    277262    Taglib initialization methods
    278263  */
    279   /**
    280     @since 2.17
    281   */
    282   public void setClazz(String clazz)
    283   {
    284     this.clazz = clazz;
    285   }
    286   /**
    287     @since 2.17
    288   */
    289   public String getClazz()
    290   {
    291     return clazz;
    292   }
    293 
    294   public void setStyle(String style)
    295   {
    296     this.style = style;
    297   }
    298   public String getStyle()
    299   {
    300     return style;
    301   }
    302  
    303264  public void setContentstyle(String contentStyle)
    304265  {
     
    310271  }
    311272
    312   public void setWidth(String width)
    313   {
    314     this.width = width;
    315   }
    316   public String getWidth()
    317   {
    318     return width;
    319   }
    320 
    321273  public void setActive(String active)
    322274  {
     
    349301  }
    350302
    351   public void setAutoheight(boolean auto)
    352   {
    353     this.autoAdjustHeight = auto;
    354   }
    355  
    356   public void setNotabs(boolean noTabs)
    357   {
    358     this.noTabs = noTabs;
    359   }
    360  
    361303  public void setExtensions(ExtensionsInvoker<TabAction> extensions)
    362304  {
     
    387329      tabs.append(" onclick=\"").append(getSwitch()).append("('").append(getId()).append("','").append(tab.getId()).append("')\"");
    388330      if (tab.getTooltip() != null) tabs.append(" title=\"").append(tab.getTooltip()).append("\"");
    389       tabs.append(">").append(tab.getTitle()).append("</td>\n");
     331      tabs.append(">").append(tab.getTitle()).append("</td><td class=\"tabspace\"></td>\n");
    390332 
    391333      script.append("TabControl.initTab('");
     
    417359
    418360    if (noTabs) return EVAL_BODY_INCLUDE;
    419     String className = position == BOTTOM ? "tabcontrol_bottom" : "tabcontrol";
    420     if (getClazz() != null) className += " " + getClazz();
    421361    StringBuilder sb = new StringBuilder();
    422     sb.append("<div class=\"").append(className).append("\"");
    423     sb.append(" id=\"").append(getId()).append("\"");
    424     sb.append(" border=0 cellspacing=0 cellpadding=0");
    425     if (getStyle() != null) sb.append(" style=\"").append(getStyle()).append("\"");
    426     if (getWidth() != null) sb.append(" width=\"").append(getWidth()).append("\"");
     362    sb.append("<div ");
     363    addIdAndStyles(sb, position == BOTTOM ? "tabsatbottom" : "tabsattop");
    427364    sb.append(">\n");
    428365
    429     tabs.append("<table border=0 cellspacing=0 cellpadding=0 class=\"tabscontainer\">");
    430     tabs.append("<tr valign=top>\n");
    431     tabs.append("<td class=\"pretabs\">\n");
    432     tabs.append("<table border=0 cellspacing=0 cellpadding=0 class=\"tabs\">\n");
     366    tabs.append("<table class=\"tabscontainer\">");
     367    tabs.append("<tr>\n");
     368    tabs.append("<td class=\"tabfillbefore\"></td>\n");
     369    tabs.append("<td class=\"tabs\">\n");
     370    tabs.append("<table>\n");
    433371    tabs.append("<tr>\n");
    434372
     
    459397      tabs.append("</table>\n");
    460398      tabs.append("</td>\n");
    461       tabs.append("<td class=\"tabfill\">&nbsp;</td>\n");
     399      tabs.append("<td class=\"tabfillafter\"></td>\n");
    462400      tabs.append("</tr>\n");
    463401      tabs.append("</table>");
     
    472410        sb.append(content);
    473411        sb.append("</div>");
    474         //sb.append("</td>\n</tr>\n");
    475412      }
    476413      if (!noTabs && position == BOTTOM) sb.append(tabs);
     
    483420      sb.append("\tif (typeof ").append(getSwitch()).append(" != 'undefined') switchFunction = ").append(getSwitch()).append(";\n");
    484421      sb.append("\tTabControl.setInitialTab('").append(getId()).append("', '").append(startActive).append("', ");
    485       sb.append(remember ? "1" : "0").append(", switchFunction, ");
    486       sb.append(autoAdjustHeight ? "true" : "false").append(");\n");
     422      sb.append(remember ? "1" : "0").append(", switchFunction);\n");
    487423      sb.append("});\n");
    488424      sb.append("</script>\n");
  • trunk/www/WEB-INF/tab.tld

    r5482 r5904  
    5858    </attribute>
    5959    <attribute>
     60      <name>subclass</name>
     61      <required>false</required>
     62      <rtexprvalue>true</rtexprvalue>
     63    </attribute>
     64    <attribute>
    6065      <name>style</name>
    6166      <required>false</required>
     
    6469    <attribute>
    6570      <name>contentstyle</name>
    66       <required>false</required>
    67       <rtexprvalue>true</rtexprvalue>
    68     </attribute>
    69     <attribute>
    70       <name>width</name>
    7171      <required>false</required>
    7272      <rtexprvalue>true</rtexprvalue>
     
    9494    <attribute>
    9595      <name>remember</name>
    96       <required>false</required>
    97       <rtexprvalue>true</rtexprvalue>
    98     </attribute>
    99     <attribute>
    100       <name>autoheight</name>
    10196      <required>false</required>
    10297      <rtexprvalue>true</rtexprvalue>
  • trunk/www/admin/server/broadcast.jsp

    r5903 r5904  
    9393    {
    9494      %>
    95       <table class="fullform smaller">
     95      <table class="fullform smaller bottomborder">
    9696      <tr>
    9797        <th>Title</td>
  • trunk/www/include/menu.jsp

    r5903 r5904  
    404404      <m:menuitem
    405405        title="<%=menu.getString("recentoptions.title") + "…"%>"
    406         onclick="<%="Main.openPopup('"+root+"my_base/user/preferences.jsp?ID="+ID+"&page=mostRecent', 'Preferences', 500, 400);"%>"
     406        onclick="<%="Main.openPopup('"+root+"my_base/user/preferences.jsp?ID="+ID+"&page=mostRecent', 'Preferences', 600, 400);"%>"
    407407        tooltip="<%=menu.getString("recentoptions.tooltip")%>"
    408408      />
     
    617617      <m:menuitem
    618618        title="<%=menu.getString("preferences.title") + "…"%>"
    619         onclick="<%="Main.openPopup('"+root+"my_base/user/preferences.jsp?ID="+ID+"', 'Preferences', 500, 400);"%>"
     619        onclick="<%="Main.openPopup('"+root+"my_base/user/preferences.jsp?ID="+ID+"', 'Preferences', 600, 400);"%>"
    620620        tooltip="<%=menu.getString("preferences.tooltip")%>"
    621621      />
  • trunk/www/include/scripts/tabcontrol.js

    r5809 r5904  
    3030function TabControlClass()
    3131{
    32   this.autoAdjust = new Array();
    3332
    3433  /**
     
    3736    a remembered active tab.
    3837  */
    39   this.setInitialTab = function(tabControlId, tabId, checkRemembered, switchFunction, autoAdjustHeight)
     38  this.setInitialTab = function(tabControlId, tabId, checkRemembered, switchFunction)
    4039  {
    4140    if (checkRemembered)
     
    5756      TabControl.setActiveTab(tabControlId, tabId);
    5857    }
    59    
    60     // Set initial size of tab control as compared to the window
    61     if (autoAdjustHeight)
    62     {
    63       var tabContent = document.getElementById(tabControlId+'.content');
    64       var tabHeight = parseInt(tabContent.style.height);
    65       var windowHeight = Main.getWindowHeight();
    66       if (tabHeight && windowHeight)
    67       {
    68         TabControl.autoAdjust[TabControl.autoAdjust.length] = tabControlId;
    69         tabContent.initialHeightDifference = windowHeight - tabHeight;
    70       }
    71     }
     58
    7259  }
    7360
     
    9077    if (tabControl.activeTab != null)
    9178    {
    92       tabControl.activeTab.className = 'tab';
     79      Main.removeClass(tabControl.activeTab, 'active');
    9380    }
    94     tab.className = 'activetab';
     81    Main.addClass(tab, 'active');
    9582
    9683    tabControl.activeTab = tab;
     
    185172    }
    186173  }
    187  
    188   this.adjustTabHeights = function()
    189   {
    190     for (var i = 0; i < TabControl.autoAdjust.length; i++)
    191     {
    192       var tabControlId = TabControl.autoAdjust[i];
    193       var tabContent = document.getElementById(tabControlId + '.content');
    194       if (tabContent)
    195       {
    196         var heightDiff = tabContent.initialHeightDifference;
    197         if (heightDiff != undefined)
    198         {
    199           var winHeight = Main.getWindowHeight();
    200           var newHeight = winHeight-heightDiff;
    201           if (newHeight >= 0) tabContent.style.height = newHeight+'px';
    202         }
    203       }
    204     }
    205   }
     174
    206175}
    207176
    208 window.oldOnresize = window.onresize;
    209 window.onresize = function()
    210 {
    211   if (window.oldOnresize) window.oldOnresize();
    212   TabControl.adjustTabHeights();
    213 }
    214177
     178
  • trunk/www/include/styles/main.css

    r5903 r5904  
    149149}
    150150
    151 
    152151/*
    153152  Generic commonly used styles
     
    160159  border-bottom: 1px solid #A0A0A0;
    161160}
     161
     162.filled
     163{
     164  background: #E8E8E8;
     165}
     166
    162167/*
    163168  STYLES BELOW ARE OLD AND SHOULD BE VERIFIED
  • trunk/www/include/styles/popup.css

    r5903 r5904  
    7171  right: 0px;
    7272  /* top and bottom are specified in one of size_*.css */
     73  overflow: auto;
     74}
     75
     76/* Fill the content area with a background color and a bottom border */
     77.popup .content.filled
     78{
    7379  background: #E8E8E8;
    7480  border-bottom: 1px solid #A0A0A0;
    75   overflow: auto;
    7681}
    7782
     
    8590  /* needed for scrollbars to appear if content is overflowing */
    8691  min-height: 100px;
     92  background: #E8E8E8;
     93  border-bottom: 1px solid #A0A0A0;
    8794}
    8895
     
    120127    or <table class="fullform larger">
    121128*/
    122 .popup .content table.fullform
     129.popup table.fullform
    123130{
    124131  width: 100%;
    125132  height: 100%;
    126   background: #FFFFFF;
     133  background: #E8E8E8;
     134  xborder-bottom: 1px solid #A0A0A0;
     135 
    127136}
    128137
     
    141150  width: 150px;
    142151  font-weight: bold;
    143   background-color: #E8E8E8;
    144152  white-space: nowrap;
    145153  text-align: left;
     
    157165table.fullform td
    158166{
     167  background: #FFFFFF;
    159168  padding: 1px 2px 1px 2px;
    160169}
  • trunk/www/include/styles/size_m.css

    r5903 r5904  
    6363}
    6464
    65 .popup .content
     65.popup .content, .popup .dialogtabcontrol
    6666{
    6767  /* should fit between title and buttons */
  • trunk/www/include/styles/tabcontrol.css

    r5809 r5904  
    2828*/
    2929
    30 .tabcontrol, .tabcontrol_bottom {
    31   border-left: 1px solid #999999;
    32   margin-bottom: 0px;
     30/* Main tab control */
     31.tabcontrol
     32{
     33  border-color: #A0A0A0;
     34  border-style: solid;
     35  border-width: 0px;
    3336}
    3437
    35 .tabcontrol .tabs {
    36   border-top: 1px solid #999999;
    37   border-bottom: 0px;
    38   border-left: 0px;
    39   border-right: 0px;
     38/* Main content area */
     39.tabcontrol .tabcontents
     40{
     41  background: #E8E8E8;
    4042}
    4143
    42 .tabcontrol_bottom .tabs {
    43   border-bottom: 1px solid #999999;
    44   border-top: 0px;
    45   border-left: 0px;
    46   border-right: 0px;
     44/* Add border on top or bottom depending on where tabs are */
     45.tabsatbottom .tabcontents
     46{
     47  border: inherit;
     48  border-width: 1px 1px 0px 1px;
    4749}
    4850
    49 .tabcontrol .tab {
    50   background: #CCCCCC;
    51   border-top: 1px solid #FFFFFF;
    52   border-left: 1px solid #FFFFFF;
    53   border-bottom: 1px solid #999999;
    54   border-right: 1px solid #999999;
    55   white-space: nowrap;
    56   padding: 2px 6px 2px 4px;
    57 }
    58 .tabcontrol .tab:hover {
    59   background: #F0F0F0;
    60   cursor: pointer;
     51.tabsontop .tabcontents
     52{
     53  border: inherit;
     54  border-width: 0px 1px 1px 1px;
    6155}
    6256
    63 .tabcontrol_bottom .tab {
    64   background: #CCCCCC;
    65   border-top: 1px solid #999999;
    66   border-left: 1px solid #FFFFFF;
    67   border-bottom: 0px;
    68   border-right: 1px solid #999999;
     57
     58/* Tabs */
     59.tabcontrol .tab
     60{
     61  background: #E8E8E8;
    6962  white-space: nowrap;
     63  cursor: pointer;
     64  border: 1px solid #A0A0A0;
    7065  padding: 2px 6px 2px 4px;
    7166}
    7267
    73 .tabcontrol_bottom .tab:hover {
    74   background: #F0F0F0;
    75   cursor: pointer;
     68/* Put blue-ish border around tab when hovering */
     69.tabcontrol .tab:hover
     70{
     71  /* Decrese padding to avoid movement */
     72  padding: 1px 5px 1px 3px;
     73  border: 2px solid #2288AA;
    7674}
    7775
    78 .tabcontrol .activetab {
     76.tabcontrol .tab.active
     77{
    7978  font-weight: bold;
    80   background: #E0E0E0;
    81   border-top: 1px solid #FFFFFF;
    82   border-left: 1px solid #FFFFFF;
    83   border-bottom: 0px;
    84   border-right: 1px solid #999999;
    85   white-space: nowrap;
     79}
     80
     81/* Revert to default for the active tab */
     82.tabcontrol .tab.active:hover
     83{
     84  cursor: auto;
     85  border: 1px solid #A0A0A0;
    8686  padding: 2px 6px 2px 4px;
    8787}
    88 .tabcontrol_bottom .activetab {
    89   font-weight: bold;
    90   background: #E0E0E0;
    91   border-top: 0px;
    92   border-left: 1px solid #FFFFFF;
    93   border-bottom: 0px;
    94   border-right: 1px solid #999999;
    95   white-space: nowrap;
    96   padding: 3px 6px 2px 4px;
     88
     89/* Creates a small space between the tabs */
     90.tabcontrol .tabspace
     91{
     92  width: 2px;
     93  max-width: 2px;
     94  min-width: 2px;
    9795}
    9896
    99 
    100 .tabcontrol .activetab a, .tabcontrol_bottom .activetab a {
    101   text-decoration: none;
    102   color: #000000;
    103   cursor: default;
    104 }
    105 .tabcontrol .pretabs, .tabcontrol_bottom .pretabs {
    106   width: 1%;
     97/* Specific for tabcontrol with tabs at bottom */
     98.tabsatbottom .tabs
     99{
     100  vertical-align: top;
    107101}
    108102
    109 .tabcontrol .tabfill {
    110   border-bottom: 1px solid #999999;
    111   border-top: 0px;
    112   border-left: 0px;
    113   border-right: 0px;
    114   width: 99%;
    115 }
    116 .tabcontrol_bottom .tabfill {
    117   border-top: 1px solid #999999;
    118   border-bottom: 0px;
    119   border-left: 0px;
    120   border-right: 0px;
    121   width: 99%;
    122 }
    123 .tabcontrol .tabcontents {
    124   border-top: 0px;
    125   border-left: 1px solid #FFFFFF;
    126   border-bottom: 1px solid #999999;
    127   border-right: 1px solid #999999;
    128   padding: 4px;
    129   margin-top: 0px;
    130   background: #E0E0E0;
    131   overflow: auto;
    132 }
    133 .tabcontrol_bottom .tabcontents {
    134   border-top: 1px solid #999999;
    135   border-left: 1px solid #FFFFFF;
    136   border-bottom: 0px;
    137   border-right: 1px solid #999999;
    138   padding: 4px;
    139   background: #E0E0E0;
    140   overflow: auto;
     103.tabsatbottom .tab
     104{
     105  /* Rounded corners at bottom */
     106  border-radius: 0px 0px 5px 5px;
    141107}
    142108
     109/* Hide top border from active tab */
     110.tabsatbottom .tab.active
     111{
     112  border-top: 1px solid #E8E8E8 !important;
     113}
    143114
     115/* Add top border on tabspace */
     116.tabsatbottom .tabspace
     117{
     118  border-top: 1px solid #A0A0A0;
     119}
     120
     121.tabsatbottom .tabfillbefore
     122{
     123  width: 5px;
     124  min-width: 5px;
     125  max-width: 5px;
     126  border-top: 1px solid #A0A0A0;
     127}
     128
     129.tabsatbottom .tabfillafter
     130{
     131  width: 99%;
     132  border-top: 1px solid #A0A0A0;
     133}
     134
     135/* Used in popup windows to fill out the area between title and buttons */
     136.tabcontrol.dialogtabcontrol
     137{
     138  position: absolute;
     139  left: 0px;
     140  right: 0px;
     141}
     142
     143.dialogtabcontrol .tabcontents > div
     144{
     145  position: absolute;
     146  top: 0px;
     147  left: 0px;
     148  right: 0px;
     149  bottom: 2em;
     150  border-width: 0px !important;
     151}
     152
     153.dialogtabcontrol .tabscontainer
     154{
     155  position: absolute;
     156  bottom: 0px;
     157  height: 2em;
     158}
     159
  • trunk/www/my_base/user/preferences.jsp

    r5901 r5904  
    227227  </base:head>
    228228  <base:body onload="initItemTypes()">
    229  
    230229    <h1>Preferences for <%=HTML.encodeTags(user.getName())%> <base:help tabcontrol="settings" /></h1>
    231   <br><br>
    232   <form action="submit_user.jsp?ID=<%=ID%>" method="post" name="preferences"
    233     onsubmit="return false;">
    234   <input type=hidden name="cmd" value="SavePreferences">
    235   <input type="hidden" name="mincolor" value="0000FF">
    236   <input type="hidden" name="midcolor" value="000000">
    237   <input type="hidden" name="maxcolor" value="FFFF00">
    238 
    239   <t:tabcontrol active="<%=activePage%>" remember="<%=activePage == null%>" id="settings"
    240     contentstyle="<%="height: "+(int)(scale*260)+"px;"%>"
    241     position="bottom">
    242   <t:tab
    243     id="appearance"
    244     title="Appearance"
    245     validate="validateAppearance()"
    246     helpid="userpreferences.appearance"
    247     >
    248     <table class="form" cellspacing=0>
    249     <tr>
    250       <td class="prompt">Font size</td>
    251       <td>
     230    <form action="submit_user.jsp?ID=<%=ID%>" method="post" name="preferences"
     231      onsubmit="return false;">
     232    <input type=hidden name="cmd" value="SavePreferences">
     233    <input type="hidden" name="mincolor" value="0000FF">
     234    <input type="hidden" name="midcolor" value="000000">
     235    <input type="hidden" name="maxcolor" value="FFFF00">
     236
     237    <t:tabcontrol
     238      subclass="dialogtabcontrol"
     239      active="<%=activePage%>" remember="<%=activePage == null%>" id="settings"   
     240      position="bottom">
     241      <t:tab
     242        id="appearance"
     243        title="Appearance"
     244        validate="validateAppearance()"
     245        helpid="userpreferences.appearance"
     246        >
     247        <table class="fullform">
     248        <tr>
     249          <th>Font size</th>
     250          <td>
     251            <%
     252            String fontsize = Values.getString(sc.getUserClientSetting("appearance.fontsize"), "size_m.css");
     253            %>
     254            <input type="radio" name="fontsize" id="fontsizeXS" value="size_xs.css"
     255              <%="size_xs.css".equals(fontsize) ? "checked" : ""%> onclick="setScale(80)"
     256              ><label for="fontsizeXS">XS</label>
     257            <input type="radio" name="fontsize" id="fontsizeS" value="size_s.css"
     258              <%="size_s.css".equals(fontsize) ? "checked" : ""%> onclick="setScale(90)"
     259              ><label for="fontsizeS">S</label>
     260            <input type="radio" name="fontsize" id="fontsizeM" value="size_m.css"
     261              <%="size_m.css".equals(fontsize) ? "checked" : ""%> onclick="setScale(100)"
     262              ><label for="fontsizeM">M</label>
     263            <input type="radio" name="fontsize" id="fontsizeL" value="size_l.css"
     264              <%="size_l.css".equals(fontsize) ? "checked" : ""%> onclick="setScale(120)"
     265              ><label for="fontsizeL">L</label>
     266            <input type="radio" name="fontsize" id="fontsizeXL" value="size_xl.css"
     267              <%="size_xl.css".equals(fontsize) ? "checked" : ""%> onclick="setScale(140)"
     268              ><label for="fontsizeXL">XL</label>
     269          </td>
     270        </tr>
     271        <tr>
     272          <th>Scale factor</th>
     273          <td>
     274            <input class="text required" type="text" name="scale"
     275            value="<%=Values.getInt(sc.getUserClientSetting("appearance.scale"), 100)%>"
     276            size="4" maxlength="3"  onkeypress="return Numbers.integerOnly(event);">%
     277            (50 - 200)
     278          </td>
     279        </tr>
     280        <tr>
     281          <th>Display long texts</th>
     282          <td>
     283            <input type="radio" name="longTexts" id="longTextsAlways" value="display"
     284              <%="display".equals(longTexts) ? "checked" : "" %>
     285              ><label for="longTextsAlways">Always</label>
     286            <input type="radio" name="longTexts" id="longTextsHover" value="hover"
     287              <%="hover".equals(longTexts) ? "checked" : "" %>
     288              ><label for="longTextsHover">On hover</label>
     289            <input type="radio" name="longTexts" id="longTextsClick" value="click"
     290              <%="click".equals(longTexts) ? "checked" : "" %>
     291              ><label for="longTextsClick">On click</label>
     292          </td>
     293        </tr>   
     294        <tr>
     295          <th>Toolbar</th>
     296          <td>
     297            <input type="radio" name="toolbar" id="toolbarBoth" value="both"
     298              <%=hasImages && hasText ? "checked" : "" %>
     299              ><label for="toolbarBoth">Images and text</label>
     300            <input type="radio" name="toolbar" id="toolbarImages" value="images"
     301              <%=hasImages && !hasText ? "checked" : "" %>
     302              ><label for="toolbarImages">Images only</label>
     303            <input type="radio" name="toolbar" id="toolbarText" value="text"
     304              <%=!hasImages && hasText ? "checked" : "" %>
     305              ><label for="toolbarText">Text only</label>
     306          </td>
     307        </tr>   
     308        <tr>
     309          <th>Ratio color range</th>
     310          <td>
     311            <table>
     312            <tr>
     313            <td><a href="javascript:selectColor('Color for min value', 'mincolor')"><div
     314              id="mincolor" style="background: #<%=minColor%>;" class="colorbox"></div>Min</a></td>
     315            <td><a href="javascript:selectColor('Color for midpoint value', 'midcolor')"><div
     316              id="midcolor" style="background: #<%=midColor%>;" class="colorbox"></div>Mid</a></td>
     317            <td><a href="javascript:selectColor('Color for max value', 'maxcolor')"><div
     318              id="maxcolor" style="background: #<%=maxColor%>;" class="colorbox"></div>Max</td>
     319           
     320            <td>
     321              <select name="presets" onchange="presetColorOnChange()" class="selectionlist">
     322              <option value="">- presets -
     323              <option value="FF0000,FFFF00,00FF00">Red - Yellow - Green
     324              <option value="0000FF,FFFFFF,FFFF00">Blue - White - Yellow
     325              <option value="000000,999999,FFFFFF">Black - Grey - White
     326              <%
     327              if (recentColors != null && recentColors.size() > 0)
     328              {
     329                %>
     330                <option value="" class="recentheader">- recently used -
     331                <%
     332                for (int i = 0; i < recentColors.size(); ++i)
     333                {
     334                  String color = recentColors.get(i);
     335                  %>
     336                  <option value="<%=color%>" class="recent"><%=color%>
     337                  <%
     338                }
     339              }
     340              %>
     341              </select>
     342            </td>
     343            </tr>
     344            </table>
     345          </td>
     346        </tr>
     347        <tr>
     348          <th>Date format</th>
     349          <td>
     350            <input class="text" type="text" name="date_format"
     351            value="<%=HTML.encodeTags(FormatterSettings.getDateFormat(sc))%>"
     352            size="20">
     353            <select name="datePresets" onchange="datePresetOnChange()" class="selectionlist">
     354              <option value="">- presets -
     355              <option value="yyyy-MM-dd">yyyy-MM-dd
     356              <option value="d/M/yyyy">d/M/yyyy
     357              <option value="M/d/yyyy">M/d/yyyy
     358              <%
     359              if (recentDateFormats != null && recentDateFormats.size() > 0)
     360              {
     361                %>
     362                <option value="" class="recentheader">- recently used -
     363                <%
     364                for (int i = 0; i < recentDateFormats.size(); ++i)
     365                {
     366                  String format = HTML.encodeTags(recentDateFormats.get(i));
     367                  %>
     368                  <option value="<%=format%>" class="recent"><%=format%>
     369                  <%
     370                }
     371              }
     372              %>
     373            </select>
     374          </td>
     375        </tr>
     376       
     377        <tr>
     378          <th>Date-time format</th>
     379          <td>
     380            <input class="text" type="text" name="datetime_format"
     381            value="<%=HTML.encodeTags(FormatterSettings.getDateTimeFormat(sc))%>"
     382            size="20">
     383            <select name="dateTimePresets" onchange="dateTimePresetOnChange()" class="selectionlist">
     384              <option value="">- presets -
     385              <option value="yyyy-MM-dd HH:mm:ss">yyyy-MM-dd HH:mm:ss
     386              <option value="d/M/yyyy HH:mm:ss">d/M/yyyy HH:mm:ss
     387              <option value="M/d/yyyy HH:mm:ss">M/d/yyyy HH:mm:ss
     388              <%
     389              if (recentDateTimeFormats != null && recentDateTimeFormats.size() > 0)
     390              {
     391                %>
     392                <option value="" class="recentheader">- recently used -
     393                <%
     394                for (int i = 0; i < recentDateTimeFormats.size(); ++i)
     395                {
     396                  String format = HTML.encodeTags(recentDateTimeFormats.get(i));
     397                  %>
     398                  <option value="<%=format%>" class="recent"><%=format%>
     399                  <%
     400                }
     401              }
     402              %>
     403            </select>
     404          </td>
     405        </tr>
    252406        <%
    253         String fontsize = Values.getString(sc.getUserClientSetting("appearance.fontsize"), "size_m.css");
     407        int numDecimals = FormatterSettings.getNumDecimals(sc);
    254408        %>
    255         <input type="radio" name="fontsize" id="fontsizeXS" value="size_xs.css"
    256           <%="size_xs.css".equals(fontsize) ? "checked" : ""%> onclick="setScale(80)"
    257           ><label for="fontsizeXS">XS</label>
    258         <input type="radio" name="fontsize" id="fontsizeS" value="size_s.css"
    259           <%="size_s.css".equals(fontsize) ? "checked" : ""%> onclick="setScale(90)"
    260           ><label for="fontsizeS">S</label>
    261         <input type="radio" name="fontsize" id="fontsizeM" value="size_m.css"
    262           <%="size_m.css".equals(fontsize) ? "checked" : ""%> onclick="setScale(100)"
    263           ><label for="fontsizeM">M</label>
    264         <input type="radio" name="fontsize" id="fontsizeL" value="size_l.css"
    265           <%="size_l.css".equals(fontsize) ? "checked" : ""%> onclick="setScale(120)"
    266           ><label for="fontsizeL">L</label>
    267         <input type="radio" name="fontsize" id="fontsizeXL" value="size_xl.css"
    268           <%="size_xl.css".equals(fontsize) ? "checked" : ""%> onclick="setScale(140)"
    269           ><label for="fontsizeXL">XL</label>
    270       </td>
    271     </tr>
    272     <tr>
    273       <td class="prompt">Scale factor</td>
    274       <td>
    275         <input class="text required" type="text" name="scale"
    276         value="<%=Values.getInt(sc.getUserClientSetting("appearance.scale"), 100)%>"
    277         size="4" maxlength="3"  onkeypress="return Numbers.integerOnly(event);">%
    278         (50 - 200)
    279       </td>
    280     </tr>
    281     <tr>
    282       <td class="prompt">Display long texts</td>
    283       <td>
    284         <input type="radio" name="longTexts" id="longTextsAlways" value="display"
    285           <%="display".equals(longTexts) ? "checked" : "" %>
    286           ><label for="longTextsAlways">Always</label>
    287         <input type="radio" name="longTexts" id="longTextsHover" value="hover"
    288           <%="hover".equals(longTexts) ? "checked" : "" %>
    289           ><label for="longTextsHover">On hover</label>
    290         <input type="radio" name="longTexts" id="longTextsClick" value="click"
    291           <%="click".equals(longTexts) ? "checked" : "" %>
    292           ><label for="longTextsClick">On click</label>
    293       </td>
    294     </tr>   
    295     <tr>
    296       <td class="prompt">Toolbar</td>
    297       <td>
    298         <input type="radio" name="toolbar" id="toolbarBoth" value="both"
    299           <%=hasImages && hasText ? "checked" : "" %>
    300           ><label for="toolbarBoth">Images and text</label>
    301         <input type="radio" name="toolbar" id="toolbarImages" value="images"
    302           <%=hasImages && !hasText ? "checked" : "" %>
    303           ><label for="toolbarImages">Images only</label>
    304         <input type="radio" name="toolbar" id="toolbarText" value="text"
    305           <%=!hasImages && hasText ? "checked" : "" %>
    306           ><label for="toolbarText">Text only</label>
    307       </td>
    308     </tr>   
    309     <tr>
    310       <td class="prompt">Ratio color range</td>
    311       <td>
    312         <table>
    313         <tr>
    314         <td><a href="javascript:selectColor('Color for min value', 'mincolor')"><div
    315           id="mincolor" style="background: #<%=minColor%>;" class="colorbox"></div>Min</a></td>
    316         <td><a href="javascript:selectColor('Color for midpoint value', 'midcolor')"><div
    317           id="midcolor" style="background: #<%=midColor%>;" class="colorbox"></div>Mid</a></td>
    318         <td><a href="javascript:selectColor('Color for max value', 'maxcolor')"><div
    319           id="maxcolor" style="background: #<%=maxColor%>;" class="colorbox"></div>Max</td>
    320        
    321         <td>
    322           <select name="presets" onchange="presetColorOnChange()" class="selectionlist">
    323           <option value="">- presets -
    324           <option value="FF0000,FFFF00,00FF00">Red - Yellow - Green
    325           <option value="0000FF,FFFFFF,FFFF00">Blue - White - Yellow
    326           <option value="000000,999999,FFFFFF">Black - Grey - White
    327           <%
    328           if (recentColors != null && recentColors.size() > 0)
    329           {
    330             %>
    331             <option value="" class="recentheader">- recently used -
     409        <tr>
     410          <th>Decimals</th>
     411          <td>
     412            <select name="decimals">
    332413            <%
    333             for (int i = 0; i < recentColors.size(); ++i)
     414            for (int i = 0; i < 8; i++)
    334415            {
    335               String color = recentColors.get(i);
    336416              %>
    337               <option value="<%=color%>" class="recent"><%=color%>
     417              <option value="<%=i%>" <%=numDecimals == i ? "selected" : ""%>><%=i%>
    338418              <%
    339419            }
    340           }
    341           %>
    342           </select>
    343         </td>
     420            %>
     421            <option value="-1" <%=numDecimals < 0 ? "selected" : ""%>>all
     422            </select>
     423          </td>
     424        </tr>
     425        <tr class="dynamic">
     426          <th></th>
     427          <td style="vertical-align: bottom;"><base:icon image="required.gif" /> = required information</i></td>
    344428        </tr>
    345429        </table>
    346       </td>
    347     </tr>
    348     <tr>
    349       <td class="prompt">Date format</td>
    350       <td>
    351         <input class="text" type="text" name="date_format"
    352         value="<%=HTML.encodeTags(FormatterSettings.getDateFormat(sc))%>"
    353         size="20">
    354         <select name="datePresets" onchange="datePresetOnChange()" class="selectionlist">
    355           <option value="">- presets -
    356           <option value="yyyy-MM-dd">yyyy-MM-dd
    357           <option value="d/M/yyyy">d/M/yyyy
    358           <option value="M/d/yyyy">M/d/yyyy
    359           <%
    360           if (recentDateFormats != null && recentDateFormats.size() > 0)
    361           {
     430      </t:tab>
     431     
     432      <t:tab
     433        id="plugins"
     434        title="Plugins"
     435        validate="validatePlugins()"
     436        helpid="userpreferences.plugins"
     437        >
     438        <table class="fullform">
     439        <tr>
     440          <th>Messages</th>
     441          <td>
     442            <%
     443            boolean sendMessage = Values.getBoolean(sc.getUserClientSetting("plugins.sendmessage"), true);
    362444            %>
    363             <option value="" class="recentheader">- recently used -
     445            <input type="checkbox" name="sendmessage" id="sendMessage" value="1" <%=sendMessage ? "checked" : ""%>
     446              ><label for="sendMessage">Send message when plugin completes</label>
     447          </td>
     448        </tr>
     449        <tr>
     450          <th>Remove jobs</th>     
     451          <td>
    364452            <%
    365             for (int i = 0; i < recentDateFormats.size(); ++i)
    366             {
    367               String format = HTML.encodeTags(recentDateFormats.get(i));
    368               %>
    369               <option value="<%=format%>" class="recent"><%=format%>
    370               <%
    371             }
    372           }
    373           %>
    374         </select>
    375       </td>
    376     </tr>
    377    
    378     <tr>
    379       <td class="prompt">Date-time format</td>
    380       <td>
    381         <input class="text" type="text" name="datetime_format"
    382         value="<%=HTML.encodeTags(FormatterSettings.getDateTimeFormat(sc))%>"
    383         size="20">
    384         <select name="dateTimePresets" onchange="dateTimePresetOnChange()" class="selectionlist">
    385           <option value="">- presets -
    386           <option value="yyyy-MM-dd HH:mm:ss">yyyy-MM-dd HH:mm:ss
    387           <option value="d/M/yyyy HH:mm:ss">d/M/yyyy HH:mm:ss
    388           <option value="M/d/yyyy HH:mm:ss">M/d/yyyy HH:mm:ss
    389           <%
    390           if (recentDateTimeFormats != null && recentDateTimeFormats.size() > 0)
    391           {
     453            boolean removeJobWhenFinished = Values.getBoolean(sc.getUserClientSetting("plugins.removejob"), false);
    392454            %>
    393             <option value="" class="recentheader">- recently used -
     455            <input type="checkbox" name="removejob" id="removeJob" value="1" <%=removeJobWhenFinished ? "checked" : "" %>
     456              ><label for="removeJob">Remove import and export jobs when they are finished.</label>
     457          </td>
     458        </tr>
     459        <tr>
     460          <th>Show warnings</th>     
     461          <td>
    394462            <%
    395             for (int i = 0; i < recentDateTimeFormats.size(); ++i)
    396             {
    397               String format = HTML.encodeTags(recentDateTimeFormats.get(i));
    398               %>
    399               <option value="<%=format%>" class="recent"><%=format%>
    400               <%
    401             }
    402           }
    403           %>
    404         </select>
    405       </td>
    406     </tr>
    407     <%
    408     int numDecimals = FormatterSettings.getNumDecimals(sc);
    409     %>
    410     <tr>
    411       <td class="prompt">Decimals</td>
    412       <td>
    413         <select name="decimals">
     463            boolean showWarnings = Values.getBoolean(sc.getUserClientSetting("plugins.showWarnings"), false);
     464            %>
     465            <input type="checkbox" name="show_warnings" id="showWarnings" value="1" <%=showWarnings ? "checked" : "" %>
     466              ><label for="showWarnings">Show plug-in warning messages when starting a new job.</label>
     467          </td>
     468        </tr>
     469        <tr class="dynamic">
     470          <th></th>
     471          <td></td>
     472        </tr>
     473        </table>
     474      </t:tab>
     475     
     476      <t:tab
     477        id="mostRecent"
     478        title="Recent items"
     479        validate="validateMostRecent()"
     480        helpid="userpreferences.mostrecent"
     481        tooltip="Specify how many items to remember in lists of 'most recent items'"
     482        >
    414483        <%
    415         for (int i = 0; i < 8; i++)
    416         {
    417           %>
    418           <option value="<%=i%>" <%=numDecimals == i ? "selected" : ""%>><%=i%>
    419           <%
    420         }
     484        boolean loadNames = Values.getBoolean(sc.getUserClientSetting("menu.mostRecent.loadNames"), true);
    421485        %>
    422         <option value="-1" <%=numDecimals < 0 ? "selected" : ""%>>all
    423         </select>
    424       </td>
    425     </tr>
    426    
    427     </table>
    428     <div align="right">&nbsp;<i><base:icon image="required.gif" /> = required information</i></div>
    429   </t:tab>
    430  
    431   <t:tab
    432     id="plugins"
    433     title="Plugins"
    434     validate="validatePlugins()"
    435     helpid="userpreferences.plugins"
    436     >
    437     <table class="form" cellspacing=0>
    438     <tr>
    439       <td class="prompt">Messages</td>
    440       <td>
    441         <%
    442         boolean sendMessage = Values.getBoolean(sc.getUserClientSetting("plugins.sendmessage"), true);
    443         %>
    444         <input type="checkbox" name="sendmessage" id="sendMessage" value="1" <%=sendMessage ? "checked" : ""%>
    445           ><label for="sendMessage">Send message when plugin completes</label>
    446       </td>
    447     </tr>
    448     <tr>
    449       <td class="prompt">Remove jobs</td>     
    450       <td>
    451         <%
    452         boolean removeJobWhenFinished = Values.getBoolean(sc.getUserClientSetting("plugins.removejob"), false);
    453         %>
    454         <input type="checkbox" name="removejob" id="removeJob" value="1" <%=removeJobWhenFinished ? "checked" : "" %>
    455           ><label for="removeJob">Remove import and export jobs when they are finished.</label>
    456       </td>
    457     </tr>
    458     <tr>
    459       <td class="prompt">Show warnings</td>     
    460       <td>
    461         <%
    462         boolean showWarnings = Values.getBoolean(sc.getUserClientSetting("plugins.showWarnings"), false);
    463         %>
    464         <input type="checkbox" name="show_warnings" id="showWarnings" value="1" <%=showWarnings ? "checked" : "" %>
    465           ><label for="showWarnings">Show plug-in warning messages when starting a new job.</label>
    466       </td>
    467     </tr>
    468     </table>
    469   </t:tab>
    470  
    471   <t:tab
    472     id="mostRecent"
    473     title="Recent items"
    474     validate="validateMostRecent()"
    475     helpid="userpreferences.mostrecent"
    476     tooltip="Specify how many items to remember in lists of 'most recent items'"
    477     >
    478     <%
    479     boolean loadNames = Values.getBoolean(sc.getUserClientSetting("menu.mostRecent.loadNames"), true);
    480     %>
    481     <table border=0 cellspacing=0 cellpadding=2 class="form">
    482     <tr valign="baseline">
    483       <td class="prompt">Recently viewed items</td>
    484       <td>
    485         <input class="text required" type="text" name="maxViewed"
    486           value="<%=Values.getInt(sc.getUserClientSetting("menu.mostRecent.maxViewed"), 6)%>"
    487           size="4" maxlength="2"  onkeypress="return Numbers.integerOnly(event);">
    488         (0 - 10)
    489       </td>
    490     </tr>
    491     <tr>
    492       <td class="prompt">Recently used items</td>
    493       <td>
    494         <input class="text required" type="text" name="maxUsed"
    495           value="<%=Values.getInt(sc.getUserClientSetting("appearance.recent"), 4)%>"
    496           size="4" maxlength="2"  onkeypress="return Numbers.integerOnly(event);">
    497         (0 - 10)
    498       </td>
    499     </tr>
    500     <tr>
    501       <td class="prompt"><label for="loadNames">Load the names of all items</label></td>
    502       <td>
    503         <input type="checkbox" name="loadNames" id="loadNames" value="1" <%=loadNames ? "checked" : ""%>>
    504       </td>
    505     </tr>
    506     </table>
    507     <table border=0 cellspacing=0 cellpadding=2>
    508    
    509     <tr>
    510       <td style="vertical-align: middle">
    511         <br>
    512         <base:button
    513           onclick="moveSelected(document.forms['preferences'].sticky_items, false)"
    514           title="<img src='../../images/move_up.gif' alt='' style='vertical-align: middle;'>"
    515           tooltip="Move up"
    516         /><p>
    517         <base:button
    518           onclick="moveSelected(document.forms['preferences'].sticky_items, true)"
    519           title="<img src='../../images/move_down.gif' alt='' style='vertical-align: middle;'>"
    520           tooltip="Move down"
    521         />
    522         <br>
    523       </td>
    524       <td>
    525         <b>Sticky items</b><br>
    526         <select name="sticky_items" multiple size="10" style="width: 12em;"
    527           ondblclick="moveBetween(document.forms['preferences'].sticky_items, document.forms['preferences'].all_items)">
    528         </select>
    529       </td>
    530  
    531       <td>
    532          <br>
    533         <base:button
    534           onclick="moveBetween(document.forms['preferences'].all_items, document.forms['preferences'].sticky_items)"
    535           title="<img src='../../images/move_left.gif' alt='' style='vertical-align: middle;'>"
    536           tooltip="Show this item in the 'Most recent' menu"
    537         /><p>
    538         <base:button
    539           onclick="moveBetween(document.forms['preferences'].sticky_items, document.forms['preferences'].all_items)"
    540           title="<img src='../../images/move_right.gif' alt='' style='vertical-align: middle;'>"
    541           tooltip="Don't show this item in the 'Most recent' menu"
    542         />
    543         <br>
    544       </td>
    545  
    546       <td>
    547         <b>All items</b><br>
    548         <select name="all_items" multiple size="10" style="width: 12em;"
    549           ondblclick="moveBetween(document.forms['preferences'].all_items, document.forms['preferences'].sticky_items)">
    550         </select>
    551       </td>
    552     </tr>
    553     </table>
    554   </t:tab>
    555   </t:tabcontrol>
    556   </form>
     486        <table class="fullform">
     487        <tr valign="baseline">
     488          <th>Recently viewed items</th>
     489          <td>
     490            <input class="text required" type="text" name="maxViewed"
     491              value="<%=Values.getInt(sc.getUserClientSetting("menu.mostRecent.maxViewed"), 6)%>"
     492              size="4" maxlength="2"  onkeypress="return Numbers.integerOnly(event);">
     493            (0 - 10)
     494          </td>
     495        </tr>
     496        <tr>
     497          <th>Recently used items</th>
     498          <td>
     499            <input class="text required" type="text" name="maxUsed"
     500              value="<%=Values.getInt(sc.getUserClientSetting("appearance.recent"), 4)%>"
     501              size="4" maxlength="2"  onkeypress="return Numbers.integerOnly(event);">
     502            (0 - 10)
     503          </td>
     504        </tr>
     505        <tr>
     506          <th>Load item names</th>
     507          <td>
     508            <input type="checkbox" name="loadNames" id="loadNames" value="1" <%=loadNames ? "checked" : ""%>>
     509            <label for="loadNames">Load the names of all items</label>
     510          </td>
     511        </tr>
     512        <tr class="dynamic">
     513          <th></th>
     514          <td>
     515        <table>
     516        <tr>
     517          <td style="vertical-align: middle">
     518            <br>
     519            <base:button
     520              onclick="moveSelected(document.forms['preferences'].sticky_items, false)"
     521              title="<img src='../../images/move_up.gif' alt='' style='vertical-align: middle;'>"
     522              tooltip="Move up"
     523            /><p>
     524            <base:button
     525              onclick="moveSelected(document.forms['preferences'].sticky_items, true)"
     526              title="<img src='../../images/move_down.gif' alt='' style='vertical-align: middle;'>"
     527              tooltip="Move down"
     528            />
     529            <br>
     530          </td>
     531          <td>
     532            <b>Sticky items</b><br>
     533            <select name="sticky_items" "multiple size="12" style="width: 12em;"
     534              ondblclick="moveBetween(document.forms['preferences'].sticky_items, document.forms['preferences'].all_items)">
     535            </select>
     536          </td>
     537     
     538          <td>
     539             <br>
     540            <base:button
     541              onclick="moveBetween(document.forms['preferences'].all_items, document.forms['preferences'].sticky_items)"
     542              title="<img src='../../images/move_left.gif' alt='' style='vertical-align: middle;'>"
     543              tooltip="Show this item in the 'Most recent' menu"
     544            /><p>
     545            <base:button
     546              onclick="moveBetween(document.forms['preferences'].sticky_items, document.forms['preferences'].all_items)"
     547              title="<img src='../../images/move_right.gif' alt='' style='vertical-align: middle;'>"
     548              tooltip="Don't show this item in the 'Most recent' menu"
     549            />
     550            <br>
     551          </td>
     552     
     553          <td>
     554            <b>All items</b><br>
     555            <select name="all_items" multiple size="12" style="width: 12em;"
     556              ondblclick="moveBetween(document.forms['preferences'].all_items, document.forms['preferences'].sticky_items)">
     557            </select>
     558          </td>
     559        </tr>
     560        </table>
     561         
     562          </td>
     563        </tr>
     564        </table>
     565      </t:tab>
     566    </t:tabcontrol>
     567    </form>
    557568 
    558569    <base:buttongroup subclass="dialogbuttons">
  • trunk/www/my_base/user/reset_filters.jsp

    r5903 r5904  
    9494    <input type=hidden name="cmd" value="ResetFilters">
    9595
    96     <div class="content">
    97       <div class="bottomborder">
    98       <table class="fullform smaller">
     96    <div class="content filled">
     97      <div>
     98      <table class="fullform smaller bottomborder">
    9999      <tr>
    100100        <th>Which list?</th>
    101101        <td>
    102           <select name="item_type" onchange="itemTypeOnChange()" style="width: 100%;">
     102          <select name="item_type" onchange="itemTypeOnChange()" class="selectionlist">
    103103            <option value="">- all -
    104104            <%
     
    120120        </td>
    121121      </tr>
    122      
    123122      </table>
    124 </div>     
     123      </div>
     124       
    125125      <div class="padded">
    126126      * = This setting is only in the database
  • trunk/www/my_base/user/settings.jsp

    r5901 r5904  
    5959{
    6060  final User user = User.getById(dc, sc.getLoggedInUserId());
     61  final String title = "Information for " + HTML.encodeTags(user.getName());
    6162  final boolean writePermission = user.hasPermission(Permission.RESTRICTED_WRITE);
    6263  final String clazz = writePermission ? "class=\"text\"" : "class=\"text disabled\" disabled readonly";
     
    7879  String htmlDateTimeFormat = HTML.encodeTags(dateTimeFormat);
    7980  %>
    80   <base:page type="popup" title="<%="Information for "+HTML.encodeTags(user.getName())%>">
     81  <base:page type="popup" title="<%=title%>">
    8182  <base:head scripts="tabcontrol.js" styles="tabcontrol.css">
    8283    <script language="JavaScript">
     
    179180  </base:head>
    180181  <base:body>
    181   <h1>Information for <%=HTML.encodeTags(user.getName())%> <base:help tabcontrol="settings" /></h1>
    182  
    183   <br><br>
    184 
     182  <h1><%=title%><base:help tabcontrol="settings" /></h1>
     183 
    185184  <form action="submit_user.jsp?ID=<%=ID%>" method="post" name="user" onsubmit="return false;">
    186185  <input type=hidden name="cmd" value="SaveSettings">
    187186 
    188   <t:tabcontrol active="<%=activePage%>" id="settings"
    189     contentstyle="<%="height: "+(int)(scale*240)+"px;"%>" position="bottom" remember="false">
     187  <t:tabcontrol
     188    subclass="dialogtabcontrol"
     189    active="<%=activePage%>" id="settings"
     190    position="bottom" remember="false">
    190191 
    191192  <t:tab id="contact" title="Contact information" validate="validateContact()" helpid="userpreferences.contact">
    192     <table class="form" cellspacing=0>
    193     <tr>
    194       <td class="prompt">Full name</td>
     193    <table class="fullform">
     194    <tr>
     195      <th>Full name</th>
    195196      <td><%=HTML.encodeTags(user.getName())%></td>
    196     </tr>
    197     <tr>
    198       <td class="prompt">Email</td>
    199       <td><input <%=clazz%> type="text" name="email" value="<%=HTML.encodeTags(user.getEmail())%>" size="40" maxlength="<%=User.MAX_EMAIL_LENGTH%>"></td>
     197      <td></td>
     198    </tr>
     199    <tr>
     200      <th>Email</th>
     201      <td><input <%=clazz%> type="text" name="email" value="<%=HTML.encodeTags(user.getEmail())%>" style="width: 98%;" maxlength="<%=User.MAX_EMAIL_LENGTH%>"></td>
     202      <td></td>
    200203    </tr>
    201204    <%
     
    204207      %>
    205208      <tr>
    206         <td class="prompt"></td>
     209        <th></th>
    207210        <td>
    208211          <%
     
    212215            ><label for="sendMessagesAsEmail">Send system messages as email</label>
    213216        </td>
     217        <td></td>
    214218      </tr>
    215219      <%
     
    217221    %>
    218222    <tr>
    219       <td class="prompt">Organisation</td>
    220       <td><input <%=clazz%> type="text" name="organisation" value="<%=HTML.encodeTags(user.getOrganisation())%>" size="40" maxlength="<%=User.MAX_ORGANISATION_LENGTH%>"></td>
     223      <th>Organisation</th>
     224      <td><input <%=clazz%> type="text" name="organisation" value="<%=HTML.encodeTags(user.getOrganisation())%>" style="width: 98%;" maxlength="<%=User.MAX_ORGANISATION_LENGTH%>"></td>
     225      <td></td>
    221226    </tr>
    222227    <tr valign=top>
    223       <td class="prompt">Address</td>
     228      <th>Address</th>
    224229      <td>
    225         <textarea <%=clazz%> rows="4" cols="40" name="address" wrap="virtual"><%=HTML.encodeTags(user.getAddress())%></textarea>
     230        <textarea <%=clazz%> rows="4" style="width: 98%;" name="address" wrap="virtual"><%=HTML.encodeTags(user.getAddress())%></textarea>
     231      </td>
     232      <td style="width: 20px;">
    226233        <a href="javascript:Main.zoom('Address', 'user', 'address', <%=!writePermission%>)" title="Edit in larger window"><base:icon image="zoom.gif" /></a>
    227234      </td>
    228235    </tr>
    229236    <tr>
    230       <td class="prompt">Phone</td>
    231       <td><input <%=clazz%> type="text" name="phone" value="<%=HTML.encodeTags(user.getPhone())%>" size="40" maxlength="<%=User.MAX_PHONE_LENGTH%>"></td>
    232     </tr>
    233     <tr>
    234       <td class="prompt">Fax</td>
    235       <td><input <%=clazz%> type="text" name="fax" value="<%=HTML.encodeTags(user.getFax())%>" size="40" maxlength="<%=User.MAX_FAX_LENGTH%>"></td>
    236     </tr>
    237     <tr>
    238       <td class="prompt">Url</td>
    239       <td><input <%=clazz%> type="text" name="url" value="<%=HTML.encodeTags(user.getUrl())%>" size="40" maxlength="<%=User.MAX_URL_LENGTH%>"></td>
     237      <th>Phone</th>
     238      <td><input <%=clazz%> type="text" name="phone" value="<%=HTML.encodeTags(user.getPhone())%>" style="width: 98%;" maxlength="<%=User.MAX_PHONE_LENGTH%>"></td>
     239      <td></td>
     240    </tr>
     241    <tr>
     242      <th>Fax</th>
     243      <td><input <%=clazz%> type="text" name="fax" value="<%=HTML.encodeTags(user.getFax())%>" style="width: 98%;" maxlength="<%=User.MAX_FAX_LENGTH%>"></td>
     244      <td></td>
     245    </tr>
     246    <tr>
     247      <th>Url</th>
     248      <td><input <%=clazz%> type="text" name="url" value="<%=HTML.encodeTags(user.getUrl())%>" style="width: 98%;" maxlength="<%=User.MAX_URL_LENGTH%>"></td>
     249      <td></td>
     250    </tr>
     251    <tr class="dynamic">
     252      <th></th>
     253      <td></td>
     254      <td></td>
    240255    </tr>
    241256    </table>
     
    250265    }
    251266    %>
    252     <table class="form" cellspacing=0>
    253     <tr>
    254       <td class="prompt">Login</td>
     267    <table class="fullform">
     268    <tr>
     269      <th>Login</th>
    255270      <td><%=HTML.encodeTags(user.getLogin())%></td>
    256271    </tr>
    257272    <tr>
    258       <td class="prompt">New password</td>
    259       <td><input <%=passwordClass%> type="password" name="password" value="" size="30" maxlength="30"></td>
    260     </tr>
    261     <tr>
    262       <td class="prompt">Retype password</td>
    263       <td><input <%=passwordClass%> type="password" name="retype_password" value="" size="30" maxlength="30"></td>
     273      <th>New password</th>
     274      <td><input <%=passwordClass%> type="password" name="password" value="" style="width: 98%;" maxlength="30"></td>
     275    </tr>
     276    <tr>
     277      <th>Retype password</th>
     278      <td><input <%=passwordClass%> type="password" name="retype_password" value="" style="width: 98%;" maxlength="30"></td>
     279    </tr>
     280    <tr class="dynamic">
     281      <th></th>
     282      <td><i>- leave empty to not change the password</i></td>
    264283    </tr>
    265284    </table>
    266     <div align=right>&nbsp;<i>- leave empty to not change the password</i></div>
    267285  </t:tab>
    268286
    269287  <t:tab id="other" title="Other information"
    270288    validate="validateExtendedProperties()" helpid="userpreferences.other">
    271     <table class="form" cellspacing="0">
     289    <table class="fullform">
    272290    <%
    273291    if (extendedProperties != null)
     
    281299        String theClazz = required ? requiredClazz : clazz;
    282300        %>
    283         <tr valign="top">
    284           <td class="prompt"><%=HTML.encodeTags(ep.getTitle())%></td>
     301        <tr>
     302          <th><%=HTML.encodeTags(ep.getTitle())%></th>
    285303          <td>
    286304          <%
     
    308326            <input <%=theClazz%> type="text" name="<%=name%>"
    309327              value="<%=HTML.encodeTags((String)value)%>"
    310               size="40" maxlength="<%=ep.getLength()%>"
     328              style="width: 98%;" maxlength="<%=ep.getLength()%>"
    311329              >
    312330            <%
     
    315333          {
    316334            %>
    317             <textarea <%=theClazz%> name="<%=name%>" rows="6" cols="40"
     335            <textarea <%=theClazz%> name="<%=name%>" rows="6" style="width: 98%;"
    318336              ><%=HTML.encodeTags((String)value)%></textarea>
    319337            <a href="javascript:Main.zoom(
     
    346364          {
    347365            %>
    348             <table border="0" cellspacing="0" cellpadding="0">
     366            <table>
    349367            <tr>
    350368            <td>
     
    371389          {
    372390            %>
    373             <table border="0" cellspacing="0" cellpadding="0">
     391            <table>
    374392            <tr>
    375393            <td>
     
    395413          %>
    396414          </td>
     415          <td></td>
    397416        </tr>
    398417        <%
     
    400419    }
    401420    %>
    402     <tr valign="top">
    403       <td class="prompt">Description</td>
     421    <tr class="dynamic">
     422      <th>Description</th>
    404423      <td>
    405         <textarea <%=clazz%> rows="5" cols="40" name="description" wrap="virtual"><%=HTML.encodeTags(user.getDescription())%></textarea>
     424        <textarea <%=clazz%> style="width: 98%; height: 98%;" rows="5" name="description" wrap="virtual"><%=HTML.encodeTags(user.getDescription())%></textarea>
     425      </td>
     426      <td style="width: 20px;">
    406427        <a href="javascript:Main.zoom('Description', 'user', 'description', <%=!writePermission%>)" title="Edit in larger window"><base:icon image="zoom.gif" /></a>
    407428      </td>
    408429    </tr>
     430   
     431   
    409432    </table>
    410433  </t:tab>
Note: See TracChangeset for help on using the changeset viewer.