dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17936
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7346: Minor fixes related catalog image
------------------------------------------------------------
revno: 7346
committer: Bharath <chbharathk@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-06-21 13:52:08 +0100
message:
Minor fixes related catalog image
modified:
local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/action/GetCatalogDetailsAction.java
local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/action/ShowUploadCatalogImageFormAction.java
local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/catalogDetails.vm
local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/catalog.js
local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/uploadCatalogImageForm.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/action/GetCatalogDetailsAction.java'
--- local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/action/GetCatalogDetailsAction.java 2012-06-18 09:15:09 +0000
+++ local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/action/GetCatalogDetailsAction.java 2012-06-21 12:52:08 +0000
@@ -106,14 +106,11 @@
//catalogTypeAttributes = catalogType.getCatalogTypeAttributes();
-
catalogTypeAttributes = new ArrayList<CatalogTypeAttribute> ( catalogType.getCatalogTypeAttributes());
Collections.sort( catalogTypeAttributes, new CatalogTypeAttributeComparator() );
-
List<CatalogDataValue> catalogDataValues = new ArrayList<CatalogDataValue>( catalogDataValueService.getAllCatalogDataValuesByCatalog( catalogService.getCatalog( id )) );
-
for( CatalogDataValue catalogDataValue : catalogDataValues )
{
if ( CatalogTypeAttribute.TYPE_COMBO.equalsIgnoreCase( catalogDataValue.getCatalogTypeAttribute().getValueType() ) )
=== modified file 'local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/action/ShowUploadCatalogImageFormAction.java'
--- local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/action/ShowUploadCatalogImageFormAction.java 2012-05-30 10:46:26 +0000
+++ local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/catalog/action/ShowUploadCatalogImageFormAction.java 2012-06-21 12:52:08 +0000
@@ -17,7 +17,6 @@
{
this.catalogService = catalogService;
}
-
// -------------------------------------------------------------------------
// Input/Output and Getter / Setter
@@ -37,19 +36,15 @@
return catalog;
}
-
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
public String execute() throws Exception
{
-
catalog = catalogService.getCatalog( id );
-
return SUCCESS;
-
}
}
=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/catalogDetails.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/catalogDetails.vm 2012-06-18 09:15:09 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/catalogDetails.vm 2012-06-21 12:52:08 +0000
@@ -1,59 +1,55 @@
<table>
-<tr>
-<td>
-<table>
- <tr>
- <td>
- <label class="bold">$i18n.getString('name') : </label>
- </td>
- <td>
- $catalog.name
- </td>
- </tr>
- <tr>
- <td>
- <label class="bold">$i18n.getString('description') : </label>
- </td>
- <td>
- $catalog.description
- </td>
- </tr>
- <tr>
- <td><label class="bold">$i18n.getString('catalogType') : </label>
- </td>
- <td>
- $catalogType.name
- </td>
- </tr>
-
- <tr><td colspan='2'> </td></tr>
- <tr>
- <td colspan='2'><label class="bold">$i18n.getString( "attributes" )</label></td>
- </tr>
- #foreach( $catalogTypeAttribute in $catalogTypeAttributes )
- #if( $catalogTypeAttributeValueMap.get( $catalogTypeAttribute.id ) != " " )
- <tr>
- <td><label class="bold">$catalogTypeAttribute.name : </label>
- </td>
- <td>
- #if($catalogTypeAttribute.valueType=="YES/NO")
- ##$i18n.getString( $!catalogTypeAttributeValueMap.get( $catalogTypeAttribute.id ) )
- $!catalogTypeAttributeValueMap.get( $catalogTypeAttribute.id )
- #else
- $!catalogTypeAttributeValueMap.get( $catalogTypeAttribute.id )
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <td><label class="bold">$i18n.getString('name') : </label></td>
+ <td>$catalog.name</td>
+ </tr>
+ <tr>
+ <td><label class="bold">$i18n.getString('description') : </label></td>
+ <td>$catalog.description</td>
+ </tr>
+ <tr>
+ <td><label class="bold">$i18n.getString('catalogType') : </label></td>
+ <td>$catalogType.name</td>
+ </tr>
+ <tr>
+ <td><label class="bold">$i18n.getString('image') : </label></td>
+ <td>$!catalog.catalogImage</td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td> </td>
+ </tr>
+
+ <tr>
+ <td colspan='2'><label class="bold">$i18n.getString( "attributes" )</label></td>
+ </tr>
+
+ #foreach( $catalogTypeAttribute in $catalogTypeAttributes )
+ #if( $catalogTypeAttributeValueMap.get( $catalogTypeAttribute.id ) != " " )
+ <tr>
+ <td><label class="bold">$catalogTypeAttribute.name : </label></td>
+ <td>
+ #if($catalogTypeAttribute.valueType=="YES/NO")
+ $!catalogTypeAttributeValueMap.get( $catalogTypeAttribute.id )
+ #else
+ $!catalogTypeAttributeValueMap.get( $catalogTypeAttribute.id )
+ #end
+ </td>
+ </tr>
+ #end
#end
- </td>
- </tr>
- #end
- #end
- <tr><td> </td></tr>
+ <tr>
+ <td> </td>
+ <td> </td>
+ </tr>
+ </table>
+ </td>
+ <td> </td>
+ <td valign="top"><img src="showImage.action?id=$catalog.id" style="width:200px;height:200px;" /></td>
+ </tr>
</table>
-</td>
-<td> </td>
-<td>
- <img src="showImage.action?id=$catalog.id" style="width:200px;height:200px;">
-</td>
-</tr>
-</table>
\ No newline at end of file
=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/catalog.js'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/catalog.js 2012-06-14 05:58:42 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/javascript/catalog.js 2012-06-21 12:52:08 +0000
@@ -92,7 +92,7 @@
closable: true,
modal:true,
overlay:{background:'#000000', opacity:0.1},
- width: 500,
+ width: 650,
height: 500
});;
}
=== modified file 'local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/uploadCatalogImageForm.vm'
--- local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/uploadCatalogImageForm.vm 2012-05-30 10:46:26 +0000
+++ local/in/dhis-web-coldchain/src/main/webapp/dhis-web-coldchain/uploadCatalogImageForm.vm 2012-06-21 12:52:08 +0000
@@ -2,42 +2,56 @@
<script type="text/javascript" src="javascript/uploadCatalogImageForm.js"></script>
<h3>$i18n.getString( "upload_catalog_image" )</h3>
-<p>
+
<form id="uploadCatalogImageForm" name="uploadCatalogImageForm" action="uploadCatalogImage.action" method="post" enctype="multipart/form-data">
-<div>
- <input type="hidden" id="id" name="id" value="$catalog.id">
- <input type="hidden" id="catalogID" name="catalogID" value="$catalog.id">
- <input type="hidden" id="catalogTypeID" name="id" value="$catalog.catalogType.id">
- <input type="hidden" id="tempFileName" name="tempFileName">
-</div>
-<table>
- <tr>
- <td class='text-column'><label for="name">$i18n.getString( "name" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
- <td class="input-column" ><input type="text" id="name" name="name" value="$!catalog.name" class="{validate:{required:true, rangelength:[4,50]}}"></td>
- </tr>
- <tr>
- <td class='text-column'><label for="description">$i18n.getString( "description" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
- <td class="input-column" ><input type="text" id="description" name="description" value="$!catalog.description" class="{validate:{required:true, minlength:4}}"></td>
- </tr>
- <tr>
- <td class='text-column'><label for="catalogType">$i18n.getString( "catalogType" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
- <td class="input-column" ><input type="text" id="catalogType" name="catalogType" value="$!catalog.catalogType.name" class="{validate:{required:true}}"></td>
- </tr>
-
- <tr>
- <td class='text-column'><label for="uploadImage">$i18n.getString( "upload_image" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
- <td class="input-column" ><input type="file" id="upload" name="upload" size="50" class="{validate:{required:true}}"></td>
- </tr>
- <tr><td> </td><td> </td></tr>
-
- <tr>
- <td> </td>
- <td><input type="submit" class='button' value="$i18n.getString( 'upload_image' )" >
- <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='catalog.action'" /></td>
-
- </tr>
-</table>
-
-
+
+ <div>
+ <input type="hidden" id="id" name="id" value="$catalog.id" />
+ <input type="hidden" id="catalogID" name="catalogID" value="$catalog.id" />
+ <input type="hidden" id="catalogTypeID" name="id" value="$catalog.catalogType.id" />
+ <input type="hidden" id="tempFileName" name="tempFileName" />
+ </div>
+
+ <table>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <td class='text-column'><label for="name">$i18n.getString( "name" )</label></td>
+ <td class="input-column" ><input type="text" id="name" name="name" value="$!catalog.name" readonly /></td>
+ </tr>
+ <tr>
+ <td class='text-column'><label for="description">$i18n.getString( "description" )</label></td>
+ <td class="input-column" ><input type="text" id="description" name="description" value="$!catalog.description" readonly /></td>
+ </tr>
+ <tr>
+ <td class='text-column'><label for="catalogType">$i18n.getString( "catalogType" )</td>
+ <td class="input-column" ><input type="text" id="catalogType" name="catalogType" value="$!catalog.catalogType.name" readonly /></td>
+ </tr>
+ <tr>
+ <td class='text-column'><label for="image">$i18n.getString( "image" )</td>
+ <td class="input-column" ><input type="text" value="$!catalog.catalogImage" readonly /></td>
+ </tr>
+
+ <tr>
+ <td class='text-column'><label for="uploadImage">$i18n.getString( "upload_image" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+ <td class="input-column" ><input type="file" id="upload" name="upload" size="50" class="{validate:{required:true}}"></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>
+ <input type="submit" class='button' value="$i18n.getString( 'upload_image' )" >
+ <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='catalog.action'" />
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td valign="top"><img src="showImage.action?id=$catalog.id" style="width:200px;height:200px;" /></td>
+ </tr>
+ </table>
</form>