Scarab commit: svn commit: r10847 - trunk/src: java/org/tigris/scarab/util webapp/WEB-INF/templates/macros webapp/WEB-INF/templates/screens webapp/WEB-INF/templates/screens/entry
Hussayn Dabbous <[email protected]>
| Newsgroups | gmane.comp.java.scarab.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: dabbous
Date: 2009-09-02 09:16:09-0700
New Revision: 10847
Modified:
trunk/src/java/org/tigris/scarab/util/ScarabConstants.java
trunk/src/webapp/WEB-INF/templates/macros/AdvancedQueryMacro.vm
trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm
trunk/src/webapp/WEB-INF/templates/screens/SaveTemplate.vm
trunk/src/webapp/WEB-INF/templates/screens/Search.vm
trunk/src/webapp/WEB-INF/templates/screens/entry/Wizard2.vm
Log:
SCB2996: The new TreeViewComboBox was not recognized as OptionValue Attribute at some places in the velocity macros.
Modified: trunk/src/java/org/tigris/scarab/util/ScarabConstants.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/util/ScarabConstants.java?view=diff&pathrev=10847&r1=10846&r2=10847
==============================================================================
--- trunk/src/java/org/tigris/scarab/util/ScarabConstants.java (original)
+++ trunk/src/java/org/tigris/scarab/util/ScarabConstants.java 2009-09-02 09:16:09-0700
@@ -211,6 +211,7 @@
* An attribute type
*/
final String DROPDOWN_LIST = "Dropdown list";
+ final String DROPDOWN_TREE = "Dropdown tree";
/**
* Scarab.properties key for roles to be automatically approved.
Modified: trunk/src/webapp/WEB-INF/templates/macros/AdvancedQueryMacro.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/macros/AdvancedQueryMacro.vm?view=diff&pathrev=10847&r1=10846&r2=10847
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/macros/AdvancedQueryMacro.vm (original)
+++ trunk/src/webapp/WEB-INF/templates/macros/AdvancedQueryMacro.vm 2009-09-02 09:16:09-0700
@@ -380,7 +380,7 @@
#set ( $attrInput = $intake.AttributeValue.mapTo($attVal) )
#if ( $attVal.Attribute.AttributeType.ValidationKey )
#set ( $field = $attVal.Attribute.AttributeType.ValidationKey )
- #elseif ($attVal.Attribute.AttributeType.Name == $scarabG.Constant.DROPDOWN_LIST)
+ #elseif ( $attVal.Attribute.AttributeType.Name == $scarabG.Constant.DROPDOWN_LIST || $attVal.Attribute.AttributeType.Name == $scarabG.Constant.DROPDOWN_TREE )
#set ( $field = "OptionIds" )
#else
#set ( $field = "Value" )
Modified: trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm?view=diff&pathrev=10847&r1=10846&r2=10847
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm (original)
+++ trunk/src/webapp/WEB-INF/templates/macros/GlobalMacros.vm 2009-09-02 09:16:09-0700
@@ -83,6 +83,7 @@
#if ($count.trim() == "0" )
<input id="$cssId" type="hidden" name="$attrInput.get($optionFieldName).Key" value="$newValues"/>
<span id="$cssId:Display">$newValues</span>
+
#elseif ($count.trim() == "1" )
#foreach ($option in $module.getOptionTree($attr, $issueType, false))
@@ -90,45 +91,45 @@
#if ($canMakeTransition.trim()=="true")
#if ($templateInfo || (!$required && $newValues && $newValues.toString() == ''))
- <input id="$cssId" type="hidden" name="$attrInput.get($optionFieldName).Key" value="$newValues"/>
+ <input id="$cssId" type="hidden" name="$attrInput.get($optionFieldName).Key" value="$newValues"/>
#if ($newValues > 0)
#set ($checked = "checked")
#end
#set ($oc = "javascript:this.form.${attrInput.get($optionFieldName).Key}.value=(this.checked)?$option.OptionId:''")
<input type="checkbox"
- name="${attrInput.get($optionFieldName).Key}_tmp"
- onclick="$oc" ${checked} />
+ name="${attrInput.get($optionFieldName).Key}_tmp"
+ onclick="$oc" ${checked} />
#else
- <input id="$cssId" type="hidden" name="$attrInput.get($optionFieldName).Key" value="$option.optionId"/>
+ <input id="$cssId" type="hidden" name="$attrInput.get($optionFieldName).Key" value="$option.optionId"/>
#end
- #if (!$option.Active)[I]#end <span id="$cssId:Display">$option.DisplayValue</span>
- #end
+ #if (!$option.Active)[I]#end <span id="$cssId:Display">$option.DisplayValue</span>
#end
-
+ #end
#else
#if ($attributeClassName == "ComboTreeBoxAttribute")
- <input id="$attrInput.get($optionFieldName).Key" value="$newValues" name="$attrInput.get($optionFieldName).Key" type="hidden"/>
+ <input id="$attrInput.get($optionFieldName).Key" value="$newValues" name="$attrInput.get($optionFieldName).Key" type="hidden"/>
<span style="display:inline;">
<input id="$attrInput.get($optionFieldName).Key:Display"
type="text" size="$attr.FieldSize"
readonly=""
name="$attrInput.get($optionFieldName).Key:Display"/>
- <a class="treeview_button"
- id="$attrInput.get($optionFieldName).Key:Anchor"
- href="javascript:toggleTreePopup('$attrInput.get($optionFieldName).Key')"
- > </a>
+ <a class="treeview_button"
+ id="$attrInput.get($optionFieldName).Key:Anchor"
+ href="javascript:toggleTreePopup('$attrInput.get($optionFieldName).Key')"
+ > </a>
</span>
- #set ($attributeTreePopup = [])
- #set ($dummy = $attributeTreePopup.add($attrInput.get($optionFieldName).Key) )
- #set ($dummy = $attributeTreePopup.add($newValues) )
- #set ($dummy = $attributeTreePopup.add($module.getOptionsTreeAsJSON($data, $newValues.toString(), $attr, $attrValue.Issue, false)) )
+ #set ($attributeTreePopup = [])
+ #set ($dummy = $attributeTreePopup.add($attrInput.get($optionFieldName).Key) )
+ #set ($dummy = $attributeTreePopup.add($newValues) )
+ #set ($dummy = $attributeTreePopup.add($module.getOptionsTreeAsJSON($data, $newValues.toString(), $attr, $attrValue.Issue, false)) )
- #set ($dummy = $attributeTreePopupHelper.add($attributeTreePopup) )
+ #set ($dummy = $attributeTreePopupHelper.add($attributeTreePopup) )
- #elseif ($attributeClassName == "ComboBoxAttribute")
+ #elseif ($attributeClassName == "ComboBoxAttribute")
+
<select name="$attrInput.get($optionFieldName).Key"
#if($size.length())size="$size"#end #if($multiple.equals("true"))multiple="multiple"#end>
#if ($size.length() == 0 && (!$required || $newValues == '' ))
@@ -156,7 +157,7 @@
#if($selected)
<option value="$option.OptionId"#selected($selected)>
- #foreach ($i in [0..$option.Level])#if($i != 0) #end#end
+ #foreach ($i in [0..$option.Level])#if($i != 0) #end#end
#if ($option.Active)
$option.DisplayValue
#else
@@ -172,6 +173,7 @@
#end
#end
</select>
+
#end
#end
Modified: trunk/src/webapp/WEB-INF/templates/screens/SaveTemplate.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/screens/SaveTemplate.vm?view=diff&pathrev=10847&r1=10846&r2=10847
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/screens/SaveTemplate.vm (original)
+++ trunk/src/webapp/WEB-INF/templates/screens/SaveTemplate.vm 2009-09-02 09:16:09-0700
@@ -109,7 +109,7 @@
<th>
#if ($attVal.Attribute.AttributeType.ValidationKey)
#set ($field = $attVal.Attribute.AttributeType.ValidationKey)
- #elseif ($attVal.Attribute.AttributeType.Name == $scarabG.Constant.DROPDOWN_LIST)
+ #elseif ($attVal.Attribute.AttributeType.Name == $scarabG.Constant.DROPDOWN_LIST || $attVal.Attribute.AttributeType.Name == $scarabG.Constant.DROPDOWN_LIST )
#set ($field = "OptionId")
#elseif ($attVal.Attribute.AttributeType.Name == "string")
#set ($field = "Value")
Modified: trunk/src/webapp/WEB-INF/templates/screens/Search.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/screens/Search.vm?view=diff&pathrev=10847&r1=10846&r2=10847
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/screens/Search.vm (original)
+++ trunk/src/webapp/WEB-INF/templates/screens/Search.vm 2009-09-02 09:16:09-0700
@@ -86,7 +86,7 @@
#foreach ($attVal in $searchValues)
#if ($attVal.Attribute.AttributeType.ValidationKey)
#set ($field = $attVal.Attribute.AttributeType.ValidationKey)
- #elseif ($attVal.Attribute.AttributeType.Name == $scarabG.Constant.DROPDOWN_LIST)
+ #elseif ($attVal.Attribute.AttributeType.Name == $scarabG.Constant.DROPDOWN_LIST || $attVal.Attribute.AttributeType.Name == $scarabG.Constant.DROPDOWN_LIST )
#set ($field = "OptionIds")
#end
<tr>
Modified: trunk/src/webapp/WEB-INF/templates/screens/entry/Wizard2.vm
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/WEB-INF/templates/screens/entry/Wizard2.vm?view=diff&pathrev=10847&r1=10846&r2=10847
==============================================================================
--- trunk/src/webapp/WEB-INF/templates/screens/entry/Wizard2.vm (original)
+++ trunk/src/webapp/WEB-INF/templates/screens/entry/Wizard2.vm 2009-09-02 09:16:09-0700
@@ -99,7 +99,7 @@
<td>
#if ($attVal.Attribute.AttributeType.ValidationKey)
#set ($field = $attVal.Attribute.AttributeType.ValidationKey)
- #elseif ($attVal.Attribute.AttributeType.Name == $scarabG.Constant.DROPDOWN_LIST)
+ #elseif ($attVal.Attribute.AttributeType.Name == $scarabG.Constant.DROPDOWN_LIST || $attVal.Attribute.AttributeType.Name == $scarabG.Constant.DROPDOWN_TREE)
#set ($field = "OptionId")
#else
#set ($field = "Value")
------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3577&dsMessageId=2390327