Scarab commit: svn commit: r10774 - trunk/src: java/org/tigris/scarab/actions java/org/tigris/scarab/om java/org/tigris/scarab/tools webapp/WEB-INF/templates/macros webapp/WEB-INF/templates/viewIssue webapp/scripts webapp/skins webapp/skins/images

Hussayn Dabbous <[email protected]>
Newsgroups gmane.comp.java.scarab.cvs
Message-ID <[email protected]>
Author: dabbous
Date: 2009-07-07 07:00:18-0700
New Revision: 10774

Added:
   trunk/src/webapp/skins/images/button_active_begin.png   (contents, props changed)
   trunk/src/webapp/skins/images/button_active_end.png   (contents, props changed)
   trunk/src/webapp/skins/images/button_passive_begin.png   (contents, props changed)
   trunk/src/webapp/skins/images/button_passive_end.png   (contents, props changed)
Modified:
   trunk/src/java/org/tigris/scarab/actions/ModifyIssue.java
   trunk/src/java/org/tigris/scarab/om/MITList.java
   trunk/src/java/org/tigris/scarab/om/Module.java
   trunk/src/java/org/tigris/scarab/om/ScarabModule.java
   trunk/src/java/org/tigris/scarab/tools/ScarabRequestTool.java
   trunk/src/webapp/WEB-INF/templates/macros/ViewIssueMacro.vm
   trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueBody.vm
   trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm
   trunk/src/webapp/scripts/guiUtils.js
   trunk/src/webapp/scripts/scarabutil.js
   trunk/src/webapp/skins/classic.css

Log:
SCB2977: enhanced the method how to assign users to Issues. (work in progress)

Modified: trunk/src/java/org/tigris/scarab/actions/ModifyIssue.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/actions/ModifyIssue.java?view=diff&pathrev=10774&r1=10773&r2=10774
==============================================================================
--- trunk/src/java/org/tigris/scarab/actions/ModifyIssue.java	(original)
+++ trunk/src/java/org/tigris/scarab/actions/ModifyIssue.java	2009-07-07 07:00:18-0700
@@ -420,6 +420,20 @@
         // Set the attribute values entered 
         final Iterator iter2 = modMap.mapIterator();
         boolean modifiedAttribute = false;
+        
+        String assignActiveUser = runData.getParameters().get("add_user");
+        if(assignActiveUser != null && assignActiveUser.length() > 0)
+        {
+            scarabR.resetAssociatedUsers();
+            
+            // Lets cross-call the AssignIssue Turbine action!
+            AssignIssue assignAction = new AssignIssue();
+            assignAction.doAdd(runData, context);
+            assignAction.doSave(runData, context);
+            modifiedAttribute = true;
+        }
+        
+        
         while (iter2.hasNext())
         {
             final AttributeValue aval = (AttributeValue)modMap.get(iter2.next());

Modified: trunk/src/java/org/tigris/scarab/om/MITList.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/om/MITList.java?view=diff&pathrev=10774&r1=10773&r2=10774
==============================================================================
--- trunk/src/java/org/tigris/scarab/om/MITList.java	(original)
+++ trunk/src/java/org/tigris/scarab/om/MITList.java	2009-07-07 07:00:18-0700
@@ -545,10 +545,10 @@
      * gets a list of all of the User Attributes common to all modules in 
      * the list.
      */
-    public List getCommonUserAttributes(final boolean activeOnly) 
+    public List<Attribute> getCommonUserAttributes(final boolean activeOnly) 
         throws TorqueException, DataSetException
     {
-        List attributes = null;
+        List<Attribute> attributes = null;
         if (isSingleModuleIssueType())
         {
             attributes =
@@ -556,17 +556,17 @@
         }
         else
         {
-            final List matchingAttributes = new ArrayList();
+            final List<Attribute> matchingAttributes = new ArrayList<Attribute>();
             final MITListItem item = getFirstItem();
-            final List rmas =
+            final List<RModuleAttribute> rmas =
                 getModule(item).getRModuleAttributes(
                     item.getIssueType(),
                     activeOnly,
                     Module.USER);
-            final Iterator i = rmas.iterator();
+            final Iterator<RModuleAttribute> i = rmas.iterator();
             while (i.hasNext())
             {
-                final RModuleAttribute rma = (RModuleAttribute) i.next();
+                final RModuleAttribute rma = i.next();
                 final Attribute att = rma.getAttribute();
                 if ((!activeOnly || rma.getActive())
                     && isCommon(att, activeOnly))
@@ -579,7 +579,7 @@
         return attributes;
     }
 
-    public List getCommonUserAttributes() throws TorqueException, DataSetException
+    public List<Attribute> getCommonUserAttributes() throws TorqueException, DataSetException
     {
         return getCommonUserAttributes(false);
     }
@@ -588,11 +588,11 @@
      * potential assignee must have at least one of the permissions
      * for the user attributes in all the modules.
      */
-    public List getPotentialAssignees(boolean includeCommitters)
+    public List<ScarabUser> getPotentialAssignees(boolean includeCommitters)
         throws TorqueException, DataSetException
     {
-        List users = new ArrayList();
-        List perms = getUserAttributePermissions();
+        List<ScarabUser> users = new ArrayList<ScarabUser>();
+        List<String> perms = getUserAttributePermissions();
         if (includeCommitters && !perms.contains(ScarabSecurity.ISSUE__ENTER))
         {
             perms.add(ScarabSecurity.ISSUE__ENTER);
@@ -609,14 +609,14 @@
         {
             MITListItem item = getFirstItem();
             ScarabUser[] userArray = getModule(item).getUsers(perms);
-            List modules = getModules();
+            List<Module> modules = getModules();
             for (int i = 0; i < userArray.length; i++)
             {
                 boolean validUser = false;
                 ScarabUser user = userArray[i];
-                for (Iterator j = perms.iterator(); j.hasNext() && !validUser;)
+                for (Iterator<String> j = perms.iterator(); j.hasNext() && !validUser;)
                 {
-                    validUser = user.hasPermission((String) j.next(), modules);
+                    validUser = user.hasPermission(j.next(), modules);
                 }
                 if (validUser)
                 {
@@ -631,10 +631,10 @@
      * gets a list of permissions associated with the User Attributes
      * that are active for this Module.
      */
-    public List getUserAttributePermissions() throws TorqueException, DataSetException
+    public List<String> getUserAttributePermissions() throws TorqueException, DataSetException
     {
         final List userAttrs = getCommonUserAttributes();
-        final List permissions = new ArrayList();
+        final List<String> permissions = new ArrayList<String>();
         for (int i = 0; i < userAttrs.size(); i++)
         {
             final String permission = ((Attribute) userAttrs.get(i)).getPermission();
@@ -1014,16 +1014,21 @@
         return ids;
     }
 
-    public List getModules() throws TorqueException
+    /**
+     * Get list of modules associated with this MITList.
+     * @return
+     * @throws TorqueException
+     */
+    public List<Module> getModules() throws TorqueException
     {
         assertNotEmpty();
 
         List items = getExpandedMITListItems();
         ArrayList modules = new ArrayList(items.size());
-        Iterator i = items.iterator();
+        Iterator<MITListItem> i = items.iterator();
         while (i.hasNext())
         {
-            Module m = ((MITListItem) i.next()).getModule();
+            Module m = i.next().getModule();
             if (!modules.contains(m))
             {
                 modules.add(m);

Modified: trunk/src/java/org/tigris/scarab/om/Module.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/om/Module.java?view=diff&pathrev=10774&r1=10773&r2=10774
==============================================================================
--- trunk/src/java/org/tigris/scarab/om/Module.java	(original)
+++ trunk/src/java/org/tigris/scarab/om/Module.java	2009-07-07 07:00:18-0700
@@ -262,23 +262,23 @@
     int getDedupeSequence(IssueType issueType)
         throws TorqueException;
 
-    List getRModuleAttributes(IssueType issueType, boolean activeOnly,
+    List<RModuleAttribute> getRModuleAttributes(IssueType issueType, boolean activeOnly,
                                      String attributeType)
         throws TorqueException;
 
-    List getRModuleAttributes(IssueType issueType, boolean activeOnly)
+    List<RModuleAttribute> getRModuleAttributes(IssueType issueType, boolean activeOnly)
         throws TorqueException;
 
-    List getRModuleAttributes(IssueType issueType)
+    List<RModuleAttribute> getRModuleAttributes(IssueType issueType)
         throws TorqueException;
 
-    List getRModuleAttributes(Criteria criteria)
+    List<RModuleAttribute> getRModuleAttributes(Criteria criteria)
         throws TorqueException;
 
     /**
      * Returns default issue list attributes for this module.
      */
-    List getDefaultRModuleUserAttributes(IssueType issueType)
+    List<RModuleAttribute> getDefaultRModuleUserAttributes(IssueType issueType)
         throws TorqueException;
 
     RModuleAttribute getRModuleAttribute(Attribute attribute,
@@ -361,13 +361,13 @@
     List getSavedReports(ScarabUser user)
         throws TorqueException,ScarabException;
 
-    List getUserAttributes(IssueType issueType, boolean activeOnly)
+    List<Attribute> getUserAttributes(IssueType issueType, boolean activeOnly)
         throws TorqueException;
 
-    List getUserAttributes(IssueType issueType)
+    List<Attribute> getUserAttributes(IssueType issueType)
         throws TorqueException;
 
-    List getUserPermissions(IssueType issueType)
+    List<String> getUserPermissions(IssueType issueType)
         throws TorqueException;
 
     RModuleIssueType getRModuleIssueType(IssueType issueType)

Modified: trunk/src/java/org/tigris/scarab/om/ScarabModule.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/om/ScarabModule.java?view=diff&pathrev=10774&r1=10773&r2=10774
==============================================================================
--- trunk/src/java/org/tigris/scarab/om/ScarabModule.java	(original)
+++ trunk/src/java/org/tigris/scarab/om/ScarabModule.java	2009-07-07 07:00:18-0700
@@ -505,7 +505,6 @@
         return paginated;
     }
 
-
     /**
      * @see org.tigris.scarab.om.Module#getUsers(String, String, String, String, IssueType)
      * This implementation adds wildcard prefix and suffix and performs an SQL 

Modified: trunk/src/java/org/tigris/scarab/tools/ScarabRequestTool.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/tools/ScarabRequestTool.java?view=diff&pathrev=10774&r1=10773&r2=10774
==============================================================================
--- trunk/src/java/org/tigris/scarab/tools/ScarabRequestTool.java	(original)
+++ trunk/src/java/org/tigris/scarab/tools/ScarabRequestTool.java	2009-07-07 07:00:18-0700
@@ -47,6 +47,7 @@
  */
 
 import java.text.DateFormat;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Calendar;
@@ -277,6 +278,9 @@
         this.data = (RunData)data;
 
     }
+    
+    public static final int FULL_DATE_FORMAT = 1;
+    public static final int SHORT_DATE_FORMAT = 2;
 
     /**
      * nulls out the issue and user objects
@@ -2483,24 +2487,54 @@
      */
     public DateFormat getDateFormat()
     {
+        return getDateFormat(DateFormat.MEDIUM);
+    }
+    
+    /**
+     * This is used to get the format for a date in the
+     * Locale sent by the browser. The additional parameter
+     * controls the date format length:
+     * 
+     * int 0 DateFormat.FULL;
+     * int 1 DateFormat.LONG;
+     * int 2 DateFormat.MEDIUM;
+     * int 3 DateFormat.SHORT;
+     * 
+     * @param format_type
+     * @return
+     */
+    public DateFormat getDateFormat(int format_type)
+    {
         Locale locale = Localization.getLocale(data.getRequest());
         DateFormat df = DateFormat
-            .getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG, locale);
-        if (timezone != null)
+            .getDateTimeInstance(format_type, DateFormat.LONG, locale);
+        
+        if (format_type != DateFormat.SHORT && timezone != null)
         {
             df.setTimeZone(timezone);
-        }
+        }        
         return df;
 
-        // We may want to eventually format the date other than default,
-        // this is how you would do it.
-        //SimpleDateFormat sdf = new SimpleDateFormat(
-        //    "yyyy/MM/dd hh:mm:ss a z", locale);
-        //return (DateFormat) sdf;
     }
 
     /**
      * This is used to get the format for a date in the
+     * Locale sent by the browser. The additional parameter
+     * defines the format to be used. (not sure, if the locale
+     * transformns the format to a locale equivalent...) This
+     * is a possible date format string:
+     * "yyyy/MM/dd hh:mm:ss a z"
+     * 
+     */
+    public DateFormat getDateFormat(String template)
+    {
+        Locale locale = Localization.getLocale(data.getRequest());
+        DateFormat df = new SimpleDateFormat(template, locale);
+        return df;
+    }
+    
+    /**
+     * This is used to get the format for a date in the
      * Locale sent by the browser.
      */
     public Calendar getCalendar()

Modified: trunk/src/webapp/WEB-INF/templates/macros/ViewIssueMacro.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/macros/ViewIssueMacro.vm?view=diff&pathrev=10774&r1=10773&r2=10774
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/macros/ViewIssueMacro.vm	(original)
+++ trunk/src/webapp/WEB-INF/templates/macros/ViewIssueMacro.vm	2009-07-07 07:00:18-0700
@@ -33,6 +33,6 @@
 
 #macro (userTimeStamp $user $date)
     <a href="mailto:$user.Email">$!user.Name</a>
-    - <small>$format.getDate($scarabR.DateFormat, $date)</small>
+    - <small>$format.getDate($scarabR.getDateFormat($l10n.ShortDateTimePattern), $date)</small>
 #end
 

Modified: trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueBody.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueBody.vm?view=diff&pathrev=10774&r1=10773&r2=10774
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueBody.vm	(original)
+++ trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueBody.vm	2009-07-07 07:00:18-0700
@@ -7,6 +7,79 @@
 #set ($attrValues = $currentIssue.ModuleAttributeValuesMap)
 #set ($currentIssueId = $currentIssue.UniqueId)
 
+#set ($myself = $data.User.userId)
+
+## --------------------------------------------------------------------------
+## Search for an active assigned user
+## This is a user, who is associated to
+## an attribute, which is SingleValued (Attribute.getMultiValue == 0)
+## Attention: It may be possible, that no activeUser exists.
+## --------------------------------------------------------------------------
+
+#set ($assignedUserId = -1)  ## contains the user id who has been associated as "active user" (if any)
+
+## ----------------------------------------------------------------------------------
+## The following attributes will be determined from the currently existing userlist.
+## It may be possible, that they can NOT be resolved. IN that case see below 
+## ----------------------------------------------------------------------------------
+#set ($assignedAttrib = -1) ## The user attribute, which is interpreted as "active userAttribute"
+#set ($assignedRMA    = "") ## to get the correct display value
+#set ($watchedAttrib  = -1) ## The attribute, which is ionterpreted as "watching userAttribute"
+#set ($watchedRMA     = "") ## to get the correct display value
+
+#set ($userAttVals = $currentIssue.UserAttributeValues)
+#foreach ($attVal in $userAttVals)
+  #set ($isSingleValue = ( !$attVal.Attribute.MultiValue  ) )
+  #if ($isSingleValue)
+    #set ($assignedUserId = $attVal.UserId)
+    #set ($assignedAttrib = $attVal.Attribute)
+    #set ($assignedRMA = $module.getRModuleAttribute($assignedAttrib, $issueType))
+  #else
+    #if ($watchedAttrib == -1)
+       #set ($watchedAttrib = $attVal.Attribute)
+       #set ($watchedRMA = $module.getRModuleAttribute($watchedAttrib, $issueType))
+    #end
+  #end
+#end
+
+## -------------------------------------------------------------------------
+## Take care for the situaion where no active assignee and or no watcher
+## has been found in the userlist. In this case search for an Attribute, 
+## which will have to be assigned to a potential new active assignee
+## And determine the "watcher" attribute
+## -------------------------------------------------------------------------
+
+#if ($assignedAttrib == -1)
+  #foreach ($selectUserAttr in $module.getUserAttributes($currentIssue.issueType))
+    #if ($!data.User.hasPermission($selectUserAttr.Permission, $module))
+      #if ($selectUserAttr.getMultiValue() == false)
+        #set ($assignedAttrib = $selectUserAttr)
+        #set ($assignedRMA = $module.getRModuleAttribute($assignedAttrib, $issueType))
+      #elseif ($watchedAttrib == -1)
+        #set ($watchedAttrib = $selectUserAttr)
+        #set ($watchedRMA = $module.getRModuleAttribute($watchedAttrib, $issueType))
+      #end
+    #end
+  #end
+#end
+
+
+## -----------------
+## Issue self assign
+## -----------------
+#set ($userAttVals = $currentIssue.UserAttributeValues)
+#set ($myselfInList = false)
+#foreach ($attVal in $userAttVals)
+    #set ($userId = $attVal.UserId)
+    #set ($assignedUser = $scarabR.getUser($userId))
+    #if  ($data.User.userId.equals($userId))
+        #set ($myselfInList = true)
+        #set ($myAttrib = $attVal.AttributeId)
+        #set ($myRMA    = $module.getRModuleAttribute($attVal.Attribute, $issueType))
+    #end
+#end
+
+
 ## TODO: The getCopyToModules() can be expensive (PCN20967).  Add APIs
 ## which perform the "should show" check without retrieving all the
 ## associated data.
@@ -103,21 +176,8 @@
       <tr>
       
 
-        ## -----------------
-        ## Issue self assign
-        ## -----------------
-        #set ($userAttVals = $currentIssue.UserAttributeValues)
-        #set ($myselfInList = false)
-        #foreach ($attVal in $userAttVals)
-          #set ($userId = $attVal.UserId)
-          #set ($assignedUser = $scarabR.getUser($userId))
-          #if  ($data.User.userId.equals($userId))
-            #set ($myselfInList = true)
-            #set ($myattid = $attVal.AttributeId)
-          #end
-        #end
       
-        #if ($canEdit)
+        #if ($canEdit && ($myself != $assignedUserId))
           #if ($scarabR.hasPermission($scarabG.Permission.ISSUE__ASSIGN, $module))
 
             <td style="white-space:nowrap;">    
@@ -128,11 +188,13 @@
               ## ============================================================================
               #set ($options = [] )
               #foreach ($selectUserAttr in $module.getUserAttributes($currentIssue.issueType))
-               #if ($!data.User.hasPermission($selectUserAttr.Permission, $module))
-                 #set ($attid = $selectUserAttr.AttributeId)
-                 #if ($myattid != $attid) ## if this attribute/user is already in list, discard it
-                   #set ($selectUserAttrName = $module.getRModuleAttribute($selectUserAttr,$currentIssue.issueType).displayValue)
-                   #set ($dummy = $options.add($selectUserAttr))
+               #if ($selectUserAttr.MultiValue == true) ## Only allow setting of non active attributes
+                 #if ($!data.User.hasPermission($selectUserAttr.Permission, $module))
+                   #set ($attid = $selectUserAttr.AttributeId)
+                   #if ($myAttrib != $attid) ## if this attribute/user is already in list, discard it
+                     #set ($selectUserAttrName = $module.getRModuleAttribute($selectUserAttr,$currentIssue.issueType).displayValue)
+                     #set ($dummy = $options.add($selectUserAttr))
+                   #end
                  #end
                #end
               #end
@@ -143,12 +205,12 @@
                   #set ($attid = $selectUserAttr.AttributeId)
                   #set ($selectUserAttrName = $module.getRModuleAttribute($selectUserAttr,$currentIssue.issueType).displayValue)
                   <input type="hidden" name="myself_attribute" value="$selectUserAttr.AttributeId"/>
-                  <input type="submit" class="button" name="eventSubmit_doAddmyself" value="$l10n.AssignMyself $selectUserAttrName" />
+                  <input type="submit" class="buttonPassive" name="eventSubmit_doAddmyself" value="$selectUserAttrName" />
                 #end
          
               #elseif ( $options.size() > 1 )
                 ## Create a selection box
-                <input type="submit" name="eventSubmit_doAddmyself" value="$l10n.AssignMyself"  class="button" />
+                <input type="submit" name="eventSubmit_doAddmyself" value="$l10n.AssignMyself"  class="buttonPassive" />
                 <select name="myself_attribute">
                   #foreach ($selectUserAttr in $options)
                     #set ($attid = $selectUserAttr.AttributeId)
@@ -164,7 +226,7 @@
               ## ------------------------------------    
               #if ($myselfInList)
                 <td>
-                  <input type="submit" name="eventSubmit_doRemovemyself" value="$l10n.RemoveMe" class="button" />
+                  <input type="submit" name="eventSubmit_doRemovemyself" value="$myRMA.DisplayValue" class="buttonActive" />
                 </td>
               #end
              #end
@@ -179,17 +241,17 @@
         #if ($showCopyButton || $showMoveButton)
           #if ($showMoveButton)
             <td style="align:right;color:white">
-              <input style="align:right;" type="submit" value="$l10n.MoveIssue" name="eventSubmit_doMove" class="button" />
+              <input style="align:right;" type="submit" value="$l10n.MoveIssue" name="eventSubmit_doMove" class="buttonActive" />
             </td>
           #end
           #if ($showCopyButton)
             <td style="align:right;color:white">
-              <input style="align:right;" type="submit" value="$l10n.CopyIssue" name="eventSubmit_doCopy" class="button" />
+              <input style="align:right;" type="submit" value="$l10n.CopyIssue" name="eventSubmit_doCopy" class="buttonActive" />
             </td>
           #end
           #if ($hasDeletePermission)
             <td style="align:right;color:white">
-              <input style="align:right;" type="submit" value="$l10n.DeleteIssue" name="eventSubmit_doDeleteissue" class="button" />
+              <input style="align:right;" type="submit" value="$l10n.DeleteIssue" name="eventSubmit_doDeleteissue" class="buttonActive" />
             </td>
           #end
         #end

Modified: trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm?view=diff&pathrev=10774&r1=10773&r2=10774
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm	(original)
+++ trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm	2009-07-07 07:00:18-0700
@@ -2,15 +2,64 @@
 #set ($wantEdit         = $scarabU.wantEdit($user,$currentIssue,$data))
 #set ($isEditAttributes = $canEdit && $wantEdit)
 
+## --------------------------------------------------------------
+## Create the selection box for all assignable users
+## This macro is called from the initialisation code below.
+## --------------------------------------------------------------
+
+#macro (assignedUsers $myself $isEditAttributes)
+    #set ($users = $module.getUsers("Issue | Edit"))
+    #if ($isEditAttributes)
+
+      <input type="hidden" name="id" value="$currentIssueId" />
+      <input type="hidden" name="issue_ids" value="$currentIssueId" />
+
+      ## Create a selection box
+      #foreach ($user in $users)
+          #set ($optionName  = "user_attr_" + $user.UserId)
+          #set ($attributeId = $assignedAttrib.AttributeId)
+          <input type="hidden" name="$optionName" value="$attributeId"/>
+      #end
+      <select name="add_user">
+      #if ( $assignedUserId == -1 )
+         <option value="" #selected(true) >$l10n.Assign ...</option>
+      #end
+
+      #foreach ($user in $users)
+          #set ($selected = ($user.UserId == $assignedUserId))
+          <option value="$user.UserId" #selected($selected) >$user.Name</option> 
+      #end
+      </select>
+    #else
+      #if ( $assignedUserId != -1 )
+        $scarabU.getUser($assignedUserId).Name
+      #end
+    #end
+
+#end
+
+
+
 <h3 onClick=smartToggleVisibility('properties')><img name="properties.state" src="$staticLink.setPath($iconCollapse)"/>$l10n.IssueAttributesNavi</h3>
 <div id='properties'>
 
+  ## ------------------------------------------------------------------
+  ## Setup the top row of the Issue attributes tab.
+  ## The row contains:
+  ## 
+  ## IssueType
+  ## IssueId
+  ## Associated active user (if exists)
+  ## Date of creation
+  ## Date of last change
+  ## -------------------------------------------------------------------
+  
   <div class="axial2">
 
     <table cellpadding="3" cellspacing="2" border="0" width="100%">
       <tr>
-        <th>$l10n.IssueId</th>
-        <td><b>$currentIssue.UniqueId ($currentIssue.RModuleIssueType.DisplayName)</b><br/>
+        <th>$currentIssue.RModuleIssueType.DisplayName</th>
+        <td>$currentIssue.UniqueId<br/>
           #if ($currentIssue.isBlocked())
             &nbsp;&nbsp;<a class="blockedmark" STYLE="text-decoration: none" title="$l10n.IssueCurrentlyBlocked" href='$tabLink.addPathInfo("tab", "6")'>$l10n.BlockedWarning</a>  
           #end
@@ -18,6 +67,8 @@
             &nbsp;&nbsp;<a class="blockingmark" STYLE="text-decoration: none" title="$l10n.IssueDoesBlockOtherIssues" href='$tabLink.addPathInfo("tab", "6")'>$l10n.BlockingWarning</a>
           #end
         </td>
+        <th>$assignedRMA.DisplayValue</th>
+        <td>#assignedUsers( $myself $isEditAttributes )</td>
         <th>$l10n.DateCommitted</th>
         <td>#userTimeStamp( $currentIssue.CreatedBy $currentIssue.CreatedDate)</td>
         <th>$l10n.LastModified</th>
@@ -27,6 +78,9 @@
     
   </div>
 
+
+
+
   <div class="axial">
     #foreach ($group in $issueType.getAttributeGroups($module, true))
       #set ($attributes = $group.Attributes)

Modified: trunk/src/webapp/scripts/guiUtils.js
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/scripts/guiUtils.js?view=diff&pathrev=10774&r1=10773&r2=10774
==============================================================================
--- trunk/src/webapp/scripts/guiUtils.js	(original)
+++ trunk/src/webapp/scripts/guiUtils.js	2009-07-07 07:00:18-0700
@@ -47,18 +47,17 @@
   	}
   }
 
-  function buttonEndings() {
+  function buttonEndings(clazz) {
 	//alert("lookup buttons");
   	if (!document.getElementsByTagName) {
   		return false
   	}
-  	var buttons = getElementsByClass("button");
+  	var buttons = getElementsByClass(clazz);
   	/* loop through all buttons and attach a child div */
   	for (i=0; i < buttons.length; i++) {
   		var div = document.createElement("div");
-  		div.className = "buttonEnding";
+  		div.className = clazz+"Ending";
   		insertAfter(div, buttons[i]);
   	}
   }
- 
-addLoadEvent(buttonEndings);
+ 
\ No newline at end of file

Modified: trunk/src/webapp/scripts/scarabutil.js
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/scripts/scarabutil.js?view=diff&pathrev=10774&r1=10773&r2=10774
==============================================================================
--- trunk/src/webapp/scripts/scarabutil.js	(original)
+++ trunk/src/webapp/scripts/scarabutil.js	2009-07-07 07:00:18-0700
@@ -121,7 +121,8 @@
 function initializeTreeview() {
   collapseAll(["ol"]);
   //openBookMark();
-  buttonEndings();
+  buttonEndings("buttonActive");
+  buttonEndings("buttonPassive");
 }
 
 

Modified: trunk/src/webapp/skins/classic.css
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/skins/classic.css?view=diff&pathrev=10774&r1=10773&r2=10774
==============================================================================
--- trunk/src/webapp/skins/classic.css	(original)
+++ trunk/src/webapp/skins/classic.css	2009-07-07 07:00:18-0700
@@ -153,25 +153,46 @@
 /* Button section                                         */
 /* ====================================================== */
 
-input.button {
+input.buttonActive {
     padding-left: 5px;
     margin-right: 5px;
     border: 0;
-    background: url(images/button_begin.png) no-repeat;
     color: #333;
     height: 22px;
     /* used to catch the buttonEnding */
     position: relative;
     cursor: pointer;
+    background: url(images/button_passive_begin.png) no-repeat;
 }
 
-.buttonEnding {
+.buttonActiveEnding {
     position: absolute;
     display: inline;
     margin-left: -10px;
     width: 10px;
     height: 22px;
-    background: url(images/button_end.png) no-repeat;
+    background: url(images/button_passive_end.png) no-repeat;
+}
+
+input.buttonPassive {
+    padding-left: 5px;
+    margin-right: 5px;
+    border: 0;
+    color: #333;
+    height: 22px;
+    /* used to catch the buttonEnding */
+    position: relative;
+    cursor: pointer;
+    background: url(images/button_active_begin.png) no-repeat;
+}
+
+.buttonPassiveEnding {
+    position: absolute;
+    display: inline;
+    margin-left: -10px;
+    width: 10px;
+    height: 22px;
+	    background: url(images/button_active_end.png) no-repeat;
 }
 
 

Added: trunk/src/webapp/skins/images/button_active_begin.png
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/skins/images/button_active_begin.png?view=markup&pathrev=10774
==============================================================================
Binary file. No diff available.

Added: trunk/src/webapp/skins/images/button_active_end.png
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/skins/images/button_active_end.png?view=markup&pathrev=10774
==============================================================================
Binary file. No diff available.

Added: trunk/src/webapp/skins/images/button_passive_begin.png
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/skins/images/button_passive_begin.png?view=markup&pathrev=10774
==============================================================================
Binary file. No diff available.

Added: trunk/src/webapp/skins/images/button_passive_end.png
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/skins/images/button_passive_end.png?view=markup&pathrev=10774
==============================================================================
Binary file. No diff available.

------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3577&dsMessageId=2368857
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.