Scarab commit: svn commit: r10720 - trunk/src: conf/classes conf/conf java/org/tigris/scarab/om schema sql/upgrade webapp/WEB-INF/templates/screens/admin webapp/WEB-INF/templates/screens/admin/globalAttributeEdit webapp/WEB-INF/templates/viewIssue webapp/skins webapp/skins/images
Hussayn Dabbous <[email protected]>
| Newsgroups | gmane.comp.java.scarab.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: dabbous
Date: 2009-05-12 15:45:14-0700
New Revision: 10720
Added:
trunk/src/webapp/skins/images/
trunk/src/webapp/skins/images/closed.png (contents, props changed)
trunk/src/webapp/skins/images/inprogress.png (contents, props changed)
trunk/src/webapp/skins/images/inreview.png (contents, props changed)
trunk/src/webapp/skins/images/reopened.png (contents, props changed)
trunk/src/webapp/skins/images/unassigned.png (contents, props changed)
Modified:
trunk/src/conf/classes/ScarabBundle_de.properties
trunk/src/conf/classes/ScarabBundle_en.properties
trunk/src/conf/conf/intake.xml
trunk/src/java/org/tigris/scarab/om/Attribute.java
trunk/src/java/org/tigris/scarab/om/ParentChildAttributeOption.java
trunk/src/schema/scarab-schema.xml
trunk/src/sql/upgrade/upgrade-0.23-attribute.sql
trunk/src/webapp/WEB-INF/templates/screens/admin/ModifyModule.vm
trunk/src/webapp/WEB-INF/templates/screens/admin/globalAttributeEdit/GlobalAttributeOptions.vm
trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm
trunk/src/webapp/skins/custom.css
Log:
SCB2834:
- added support for attribute_option styles.
Now it is possible to iconise or style attribute-option fields otherwise
if needed.
- Added new Style field to SCARAB_ATTRIBUTE_OPTION
- Added new structural information to intake and scarab schema
- Updated generic database upgrade script
- Added more entries into the language bundle
- updated the velocity templates
- added demo to the skins folder (needs rework and documentation)
Modified: trunk/src/conf/classes/ScarabBundle_de.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_de.properties?view=diff&pathrev=10720&r1=10719&r2=10720
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_de.properties (original)
+++ trunk/src/conf/classes/ScarabBundle_de.properties 2009-05-12 15:45:14-0700
@@ -950,6 +950,7 @@
GlobalAttributeInfo=Information zum globalen Attribut
ParentAttributeOption=Eigenschaften des Eltern-Attribut
AttributeOption=Attribut-Eigenschaft
+Order=Reihenfolge
PreferredOrder=Bevorzugte Reihenfolge
OrderBy=sortiert nach
Weight=Gewicht
Modified: trunk/src/conf/classes/ScarabBundle_en.properties
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/classes/ScarabBundle_en.properties?view=diff&pathrev=10720&r1=10719&r2=10720
==============================================================================
--- trunk/src/conf/classes/ScarabBundle_en.properties (original)
+++ trunk/src/conf/classes/ScarabBundle_en.properties 2009-05-12 15:45:14-0700
@@ -210,7 +210,6 @@
October=October
November=November
December=December
-
FormatString=Format String
FormatStringExplained=regular expression used to check user input
FormatHint=Format Hint
@@ -1016,6 +1015,7 @@
GlobalAttributeInfo=Global attribute information
ParentAttributeOption=Parent attribute option
AttributeOption=Attribute option
+Order=Order
PreferredOrder=Preferred order
OrderBy=Order by
Weight=Weight
Modified: trunk/src/conf/conf/intake.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/conf/conf/intake.xml?view=diff&pathrev=10720&r1=10719&r2=10720
==============================================================================
--- trunk/src/conf/conf/intake.xml (original)
+++ trunk/src/conf/conf/intake.xml 2009-05-12 15:45:14-0700
@@ -73,11 +73,16 @@
<rule name="minLength" value="1">intake_OptionNameNotAllowedEmpty</rule>
<rule name="maxLength" value="255">intake_OptionNameMustBeLessThan255Characters</rule>
</field>
+ <field name="Style" key="style" type="String">
+ <rule name="minLength" value="1">intake_OptionNameNotAllowedEmpty</rule>
+ <rule name="maxLength" value="255">intake_OptionNameMustBeLessThan255Characters</rule>
+ </field>
<field name="NewName" key="newname" type="String"
mapToProperty="Name">
<rule name="maxLength" value="255">intake_OptionNameMustBeLessThan255Characters</rule>
</field>
<field name="Deleted" key="del" type="boolean"/>
+
</group>
<!-- Combination of AttributeOption and ROptionOption primarily for the GlobalAttributeEdit.vm page -->
@@ -99,6 +104,10 @@
<field name="PreferredOrder" key="order" type="int">
<rule name="mask" value="[0-9]+">intake_PleaseSelectValidChoice</rule>
</field>
+ <field name="Style" key="style" type="String">
+ <rule name="minLength" value="1">intake_OptionNameNotAllowedEmpty</rule>
+ <rule name="maxLength" value="255">intake_OptionNameMustBeLessThan255Characters</rule>
+ </field>
<field name="Weight" key="weight" type="int">
<rule name="mask" value="[0-9]+">intake_PleaseSelectValidChoice</rule>
</field>
Modified: trunk/src/java/org/tigris/scarab/om/Attribute.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/om/Attribute.java?view=diff&pathrev=10720&r1=10719&r2=10720
==============================================================================
--- trunk/src/java/org/tigris/scarab/om/Attribute.java (original)
+++ trunk/src/java/org/tigris/scarab/om/Attribute.java 2009-05-12 15:45:14-0700
@@ -556,6 +556,7 @@
pcao.setName(ao.getName());
pcao.setDeleted(ao.getDeleted());
pcao.setAttributeId(this.getAttributeId());
+ pcao.setStyle(ao.getStyle());
parentChildAttributeOptions.add(pcao);
}
}
Modified: trunk/src/java/org/tigris/scarab/om/ParentChildAttributeOption.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/om/ParentChildAttributeOption.java?view=diff&pathrev=10720&r1=10719&r2=10720
==============================================================================
--- trunk/src/java/org/tigris/scarab/om/ParentChildAttributeOption.java (original)
+++ trunk/src/java/org/tigris/scarab/om/ParentChildAttributeOption.java 2009-05-12 15:45:14-0700
@@ -72,6 +72,7 @@
private String name = null;
private int preferredOrder = 0;
private int weight = 0;
+ private String style = null;
private List ancestors = null;
private static final Integer ROOT_ID = new Integer(0);
@@ -261,6 +262,16 @@
this.weight = weight;
}
+ public String getStyle()
+ {
+ return this.style;
+ }
+
+ public void setStyle(String style)
+ {
+ this.style = style;
+ }
+
public String toString()
{
return getParentId() + ":" + getOptionId() + " -> " + getName();
@@ -312,6 +323,7 @@
ao.setName(getName());
ao.setDeleted(getDeleted());
ao.setAttribute(tmpAttr);
+ ao.setStyle(getStyle());
ao.save();
// clean out the caches for the AO
Modified: trunk/src/schema/scarab-schema.xml
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/schema/scarab-schema.xml?view=diff&pathrev=10720&r1=10719&r2=10720
==============================================================================
--- trunk/src/schema/scarab-schema.xml (original)
+++ trunk/src/schema/scarab-schema.xml 2009-05-12 15:45:14-0700
@@ -221,6 +221,7 @@
<column name="OPTION_ID" primaryKey="true" required="true" type="INTEGER" description="Unique identifier."/>
<column name="ATTRIBUTE_ID" required="true" type="INTEGER" description="Attribute that can take the options as its value."/>
<column name="OPTION_NAME" javaName="Name" required="true" type="VARCHAR" size="255" description="Name."/>
+ <column name="STYLE" javaName="Style" required="false" type="VARCHAR" size="255" description="Display Style."/>
<column name="DELETED" required="false" type="BOOLEANINT" default="0" javaType="primitive" description="Flag, which marks that option has been deleted."/>
<foreign-key foreignTable="SCARAB_ATTRIBUTE">
<reference local="ATTRIBUTE_ID" foreign="ATTRIBUTE_ID"/>
Modified: trunk/src/sql/upgrade/upgrade-0.23-attribute.sql
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/sql/upgrade/upgrade-0.23-attribute.sql?view=diff&pathrev=10720&r1=10719&r2=10720
==============================================================================
--- trunk/src/sql/upgrade/upgrade-0.23-attribute.sql (original)
+++ trunk/src/sql/upgrade/upgrade-0.23-attribute.sql 2009-05-12 15:45:14-0700
@@ -9,7 +9,11 @@
* of user defined Attributes
*
*/
+
+ALTER TABLE SCARAB_ATTRIBUTE_OPTION ADD ( STYLE VARCHAR(255) );
+
ALTER TABLE SCARAB_ATTRIBUTE ADD ( STYLE VARCHAR(255) );
ALTER TABLE SCARAB_ATTRIBUTE ADD ( FORMAT VARCHAR(255) );
ALTER TABLE SCARAB_ATTRIBUTE ADD ( HINT VARCHAR(255) );
ALTER TABLE SCARAB_ATTRIBUTE ADD ( FIELDSIZE INTEGER );
+
Modified: trunk/src/webapp/WEB-INF/templates/screens/admin/ModifyModule.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/screens/admin/ModifyModule.vm?view=diff&pathrev=10720&r1=10719&r2=10720
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/screens/admin/ModifyModule.vm (original)
+++ trunk/src/webapp/WEB-INF/templates/screens/admin/ModifyModule.vm 2009-05-12 15:45:14-0700
@@ -244,8 +244,8 @@
}
if(cb.checked)
{
- cb.disabled=true;
cb.checked=false;
+ cb.disabled=true;
}
}
// -->
Modified: trunk/src/webapp/WEB-INF/templates/screens/admin/globalAttributeEdit/GlobalAttributeOptions.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/screens/admin/globalAttributeEdit/GlobalAttributeOptions.vm?view=diff&pathrev=10720&r1=10719&r2=10720
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/screens/admin/globalAttributeEdit/GlobalAttributeOptions.vm (original)
+++ trunk/src/webapp/WEB-INF/templates/screens/admin/globalAttributeEdit/GlobalAttributeOptions.vm 2009-05-12 15:45:14-0700
@@ -7,7 +7,8 @@
#end
<th>$l10n.ParentAttributeOption</th>
<th>$l10n.AttributeOption</th>
- <th>$l10n.PreferredOrder</th>
+ <th>$l10n.Order</th>
+ <th>class</th>
## hiding until implemented<th>$l10n.Weight</th>
</tr>
@@ -16,12 +17,19 @@
#set ($immutableOption = $pcao.getChildOption().SystemDefined)
#set ($pcaoGroup = $intake.ParentChildAttributeOption.mapTo($pcao))
#indexedRows($velocityCount)
+
+ ## =================================================
+ ## The initial checkbox for marking "deleted" option
+ ## =================================================
#if(!$immutableOption)
<td>#booleanCheckbox ($pcaoGroup.Deleted)</td>
#else
<td>#booleanCheckboxLock ($pcaoGroup.Deleted $immutable)</td>
#end
+ ## =================================================
+ ## Parent-child association (popup-box)
+ ## =================================================
<td>
#if($immutableOption)
$pcao.ParentOption.Name
@@ -45,6 +53,9 @@
#end
</td>
+ ## =================================================
+ ## Attribute-option value (plain text)
+ ## =================================================
<td>
#if(!$immutableOption)
<input type="text" size="25" name="$pcaoGroup.Name.Key" value="$pcaoGroup.Name" />
@@ -54,6 +65,10 @@
#end
</td>
+
+ ## =====================================================
+ ## preferred order (may differ from order of definition)
+ ## =====================================================
<td>
#if($immutableOption)
$pcaoGroup.PreferredOrder.Value
@@ -62,6 +77,20 @@
#numericOrderSelect($attribute.Name $pcaoGroup.PreferredOrder.Key 1 $maxNum $pcaoGroup.PreferredOrder.Value 1)
#end
</td>
+
+ ## =====================================================
+ ## display style (plain text may contain class or
+ ## style definitions: e.g.: "class='myclass'"
+ ## =====================================================
+ <td>
+ #if(!$immutableOption)
+ <input type="text" size="25" name="$pcaoGroup.Style.Key" value="$pcaoGroup.Style" />
+ #else
+ $pcaoGroup.Name
+ <input type="hidden" size="25" name="$pcaoGroup.Style.Key" value="$pcaoGroup.Style" />
+ #end
+ </td>
+
#* Hiding until implemented
<td>
#numericSelect($pcaoGroup.Weight.Key 1 $maxNum $pcaoGroup.Weight.Value 1)
@@ -97,6 +126,8 @@
#numericOrderSelect($attribute.Name $newPCAOGroup.PreferredOrder.Key 1 $maxNum $selected 1)
</td>
+ <td></td>
+
#* Hide until implemented
<td>
#if ($newPCAOGroup.Weight.Value != 0)
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=10720&r1=10719&r2=10720
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm (original)
+++ trunk/src/webapp/WEB-INF/templates/viewIssue/ViewIssueTab1.vm 2009-05-12 15:45:14-0700
@@ -70,6 +70,7 @@
#set ($fieldStyle = "")
#set ($fieldStyle = $!attVal.Attribute.Style)
#if ($isOptionAttr)
+ #set ($fieldStyle = $!attVal.AttributeOption.Style)
#if ($attVal.AttributeOption.Deleted.toString().equals("true"))
#set ($display = false)
#end
Modified: trunk/src/webapp/skins/custom.css
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/skins/custom.css?view=diff&pathrev=10720&r1=10719&r2=10720
==============================================================================
--- trunk/src/webapp/skins/custom.css (original)
+++ trunk/src/webapp/skins/custom.css 2009-05-12 15:45:14-0700
@@ -10,7 +10,46 @@
/* attribute specific classes */
.status {
- color:#d61a1e;
- font-weight:bold;
+ background-repeat: no-repeat;
+ position:relative;
+ background-position: 0px 0px;
+ padding-left:20px;
+ font-weight:bold;
}
-
\ No newline at end of file
+
+.status.new {
+ color:#888;
+ padding-left:20px;
+}
+
+.status.assigned {
+ color:red;
+ background-image: url(images/unassigned.png);
+ padding-left:20px;
+}
+
+.status.reopened {
+ color:magenta;
+ background-image: url(images/reopened.png);
+ padding-left:20px;
+}
+
+.status.inreview {
+ color:blue;
+ background-image: url(images/inreview.png);
+ padding-left:20px;
+}
+
+.status.processing {
+ color:orange;
+ background-image: url(images/inprogress.png);
+ padding-left:20px;
+}
+
+.status.closed {
+ color:green;
+ background-image: url(images/closed.png);
+ padding-left:20px;
+}
+
+
\ No newline at end of file
Added: trunk/src/webapp/skins/images/closed.png
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/skins/images/closed.png?view=markup&pathrev=10720
==============================================================================
Binary file. No diff available.
Added: trunk/src/webapp/skins/images/inprogress.png
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/skins/images/inprogress.png?view=markup&pathrev=10720
==============================================================================
Binary file. No diff available.
Added: trunk/src/webapp/skins/images/inreview.png
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/skins/images/inreview.png?view=markup&pathrev=10720
==============================================================================
Binary file. No diff available.
Added: trunk/src/webapp/skins/images/reopened.png
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/skins/images/reopened.png?view=markup&pathrev=10720
==============================================================================
Binary file. No diff available.
Added: trunk/src/webapp/skins/images/unassigned.png
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/skins/images/unassigned.png?view=markup&pathrev=10720
==============================================================================
Binary file. No diff available.
------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3577&dsMessageId=2222737