← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9540: Minor fix.

 

------------------------------------------------------------
revno: 9540
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-01-17 19:54:38 +0700
message:
  Minor fix.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewDataEntryForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.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 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-01-17 08:50:43 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-01-17 12:54:38 +0000
@@ -541,3 +541,4 @@
 select_to_date = Select to date
 user_orgunit = User organisation unit
 user_orgunit_children = Organisation unit chilren
+

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2013-01-17 08:50:43 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2013-01-17 12:54:38 +0000
@@ -2470,23 +2470,23 @@
 				{
 					xtype: 'toolbar',
 					style: 'padding-top:1px; border-style:none',
+					width: TR.conf.layout.west_fieldset_width + 50,
 					bodyStyle: 'border-style:none; background-color:transparent; padding:4px 0 0 8px',
                     items: [
 						{
 							xtype: 'panel',
-							bodyStyle: 'border-style:none; background-color:transparent; padding:4px 0 0 8px',
+							bodyStyle: 'border-style:none; background-color:transparent; padding:10px 0 0 8px',
 							items: [
 								Ext.create('Ext.form.Panel', {
-								bodyStyle: 'border-style:none; background-color:transparent; padding:3px 0 0 0',
-                                items: [
-								{
-									xtype: 'label',
-									text: TR.i18n.report_type,
-									style: 'font-size:11px; font-weight:bold; padding:0 0 0 3px'
-								},
+								bodyStyle: 'border-style:none; background-color:transparent; padding:3px 30px 0 8px',
+                                width: TR.conf.layout.west_fieldset_width + 50,
+								items: [
 								{
 									xtype: 'radiogroup',
 									id: 'reportTypeGroup',
+									fieldLabel: TR.i18n.report_type,
+									labelStyle: 'font-weight:bold',
+									labelAlign: 'top',
 									columns: 2,
 									vertical: true,
 									items: [
@@ -2549,76 +2549,87 @@
 							}),
 							{ bodyStyle: 'padding:1px 0; border-style:none;	background-color:transparent' },
 							{
-								xtype: 'combobox',
-								cls: 'tr-combo',
-								name: TR.init.system.programs,
-								id: 'programCombobox',
-								fieldLabel: TR.i18n.program,
-								labelStyle: 'font-weight:bold',
-								labelAlign: 'top',
-								emptyText: TR.i18n.please_select,
-								queryMode: 'local',
-								editable: false,
-								valueField: 'id',
-								displayField: 'name',
-								width: TR.conf.layout.west_fieldset_width,
-								store: TR.store.program,
-								listeners: {
-									added: function() {
-										TR.cmp.settings.program = this;
-									},
-									select: function(cb) {
-										TR.state.isFilter = false;
-										var pId = cb.getValue();
-										
-										// PROGRAM-STAGE										
-										var storeProgramStage = TR.store.programStage;
-										TR.store.dataelement.available.removeAll();
-										TR.store.dataelement.selected.removeAll();
-										storeProgramStage.parent = pId;
-										TR.store.dataelement.isLoadFromFavorite = false;
-										storeProgramStage.load({params: {programId: pId}});
-										
-										// FILTER-VALUES FIELDS
-										Ext.getCmp('filterPanel').removeAll();
-									}
-								}
-							},
-							{
-								xtype: 'combobox',
-								cls: 'tr-combo',
-								id:'programStageCombobox',
-								fieldLabel: TR.i18n.program_stage,
-								labelStyle: 'font-weight:bold',
-								labelAlign: 'top',
-								emptyText: TR.i18n.please_select,
-								queryMode: 'local',
-								editable: false,
-								valueField: 'id',
-								displayField: 'name',
-								width: TR.conf.layout.west_fieldset_width,
-								store: TR.store.programStage,
-								listeners: {
-									added: function() {
-										TR.cmp.params.programStage = this;
-									},  
-									select: function(cb) {
-										TR.state.isFilter = false;
-										var store = TR.store.dataelement.available;
-										TR.store.dataelement.selected.loadData([],false);
-										store.parent = cb.getValue();
-										
-										if (TR.util.store.containsParent(store)) {
-											TR.util.store.loadFromStorage(store);
-											TR.util.multiselect.filterAvailable(TR.cmp.params.dataelement.available, TR.cmp.params.dataelement.selected);
-										}
-										else {
-											store.load({params: {programStageId: cb.getValue()}});
-										}
-									} 
-								}
-							},
-							]
+								xtype: 'panel',
+								layout: 'column',
+								bodyStyle: 'border-style:none; background-color:transparent; padding:4px 0 0 8px',
+								width: TR.conf.layout.west_fieldset_width + 50,
+								items:[
+								{
+									xtype: 'combobox',
+									cls: 'tr-combo',
+									name: TR.init.system.programs,
+									id: 'programCombobox',
+									fieldLabel: TR.i18n.program,
+									labelStyle: 'font-weight:bold',
+									labelAlign: 'top',
+									emptyText: TR.i18n.please_select,
+									queryMode: 'local',
+									editable: false,
+									valueField: 'id',
+									displayField: 'name',
+									width: TR.conf.layout.west_fieldset_width / 2 - 10,
+									store: TR.store.program,
+									listeners: {
+										added: function() {
+											TR.cmp.settings.program = this;
+										},
+										select: function(cb) {
+											TR.state.isFilter = false;
+											var pId = cb.getValue();
+											
+											// PROGRAM-STAGE										
+											var storeProgramStage = TR.store.programStage;
+											TR.store.dataelement.available.removeAll();
+											TR.store.dataelement.selected.removeAll();
+											storeProgramStage.parent = pId;
+											TR.store.dataelement.isLoadFromFavorite = false;
+											storeProgramStage.load({params: {programId: pId}});
+											
+											// FILTER-VALUES FIELDS
+											Ext.getCmp('filterPanel').removeAll();
+										}
+									}
+								},
+								{
+									xtyle:'label',
+									text: ''
+								},
+								{
+									xtype: 'combobox',
+									cls: 'tr-combo',
+									id:'programStageCombobox',
+									fieldLabel: TR.i18n.program_stage,
+									labelStyle: 'font-weight:bold',
+									labelAlign: 'top',
+									emptyText: TR.i18n.please_select,
+									queryMode: 'local',
+									editable: false,
+									valueField: 'id',
+									displayField: 'name',
+									width:  TR.conf.layout.west_fieldset_width / 2 - 10,
+									store: TR.store.programStage,
+									listeners: {
+										added: function() {
+											TR.cmp.params.programStage = this;
+										},  
+										select: function(cb) {
+											TR.state.isFilter = false;
+											var store = TR.store.dataelement.available;
+											TR.store.dataelement.selected.loadData([],false);
+											store.parent = cb.getValue();
+											
+											if (TR.util.store.containsParent(store)) {
+												TR.util.store.loadFromStorage(store);
+												TR.util.multiselect.filterAvailable(TR.cmp.params.dataelement.available, TR.cmp.params.dataelement.selected);
+											}
+											else {
+												store.load({params: {programStageId: cb.getValue()}});
+											}
+										} 
+									}
+								}
+								]
+							}]
 						}]
 					},                            
 					{
@@ -3170,29 +3181,6 @@
 											{
 												xtype: 'combobox',
 												cls: 'tr-combo',
-												id: 'facilityLBCombobox',
-												fieldLabel: TR.i18n.use_data_from_level,
-												labelWidth: 135,
-												emptyText: TR.i18n.please_select,
-												queryMode: 'local',
-												editable: false,
-												valueField: 'value',
-												displayField: 'name',
-												width: TR.conf.layout.west_fieldset_width - TR.conf.layout.west_width_subtractor,
-												store:  new Ext.data.ArrayStore({
-													fields: ['value', 'name'],
-													data: [['all', TR.i18n.all], ['childrenOnly', TR.i18n.children_only], ['selected', TR.i18n.selected]],
-												}),
-												value: 'all',
-												listeners: {
-													added: function() {
-														TR.cmp.settings.facilityLB = this;
-													}
-												}
-											},
-											{
-												xtype: 'combobox',
-												cls: 'tr-combo',
 												name: TR.init.system.orgunitGroup,
 												id: 'orgGroupCombobox',
 												emptyText: TR.i18n.please_select,
@@ -3213,6 +3201,42 @@
 												}
 											},
 											{
+												layout: 'column',
+												bodyStyle: 'border:0 none; padding-bottom:4px',
+												items: [
+													{
+														xtype: 'checkbox',
+														columnWidth: 0.5,
+														boxLabel: TR.i18n.user_orgunit,
+														labelWidth: TR.conf.layout.form_label_width,
+														handler: function(chb, checked) {
+															TR.cmp.params.organisationunit.toolbar.xable(checked, TR.cmp.aggregateFavorite.userorganisationunitchildren.getValue());
+															TR.cmp.params.organisationunit.treepanel.xable(checked, TR.cmp.aggregateFavorite.userorganisationunitchildren.getValue());
+														},
+														listeners: {
+															added: function() {
+																TR.cmp.aggregateFavorite.userorganisationunit = this;
+															}
+														}
+													},
+													{
+														xtype: 'checkbox',
+														columnWidth: 0.5,
+														boxLabel: TR.i18n.user_orgunit_children,
+														labelWidth: TR.conf.layout.form_label_width,
+														handler: function(chb, checked) {
+															TR.cmp.params.organisationunit.toolbar.xable(checked, TR.cmp.favorite.userorganisationunit.getValue());
+															TR.cmp.params.organisationunit.treepanel.treepanel.xable(checked, TR.cmp.favorite.userorganisationunit.getValue());
+														},
+														listeners: {
+															added: function() {
+																TR.cmp.aggregateFavorite.userorganisationunitchildren = this;
+															}
+														}
+													}
+												]
+											},
+											{
 												xtype: 'treepanel',
 												cls: 'tr-tree',
 												id: 'treeOrg',
@@ -3568,6 +3592,29 @@
 										cls: 'tr-accordion-options',
 										items: [
 											{
+												xtype: 'combobox',
+												cls: 'tr-combo',
+												id: 'facilityLBCombobox',
+												fieldLabel: TR.i18n.use_data_from_level,
+												labelWidth: 135,
+												emptyText: TR.i18n.please_select,
+												queryMode: 'local',
+												editable: false,
+												valueField: 'value',
+												displayField: 'name',
+												width: TR.conf.layout.west_fieldset_width - TR.conf.layout.west_width_subtractor,
+												store:  new Ext.data.ArrayStore({
+													fields: ['value', 'name'],
+													data: [['all', TR.i18n.all], ['childrenOnly', TR.i18n.children_only], ['selected', TR.i18n.selected]],
+												}),
+												value: 'all',
+												listeners: {
+													added: function() {
+														TR.cmp.settings.facilityLB = this;
+													}
+												}
+											},
+											{
 												xtype: 'checkbox',
 												id: 'completedEventsOpt',
 												style:'padding: 5px 0px 5px 15px;',

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewDataEntryForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewDataEntryForm.js	2013-01-17 10:48:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewDataEntryForm.js	2013-01-17 12:54:38 +0000
@@ -125,7 +125,7 @@
 		item = jQuery( item );		
 		var toMatch = item.text().toString().toLowerCase();		
         if( toMatch.indexOf(filterLower) != -1 ){
-			dataElementList.append( "<option value='" + item.attr('value') + "'>" + item.text() + "</option>" );
+			dataElementList.append( "<option value='" + item.attr('value') + "' dename='"+item.attr('dename')+"' decode='"+item.attr('decode')+"'>" + item.text() + "</option>" );
 		};
 	});	
 }
@@ -187,6 +187,10 @@
 			var item = jQuery(this);
 			item[0].text = item.attr('dename');
 		});
+		jQuery('#dataElementIdsStore option').each(function(){
+			var item = jQuery(this);
+			item[0].text = item.attr('dename');
+		});
 	}
 	// display - code
 	else if(displayName=='2'){
@@ -194,6 +198,10 @@
 			var item = jQuery(this);
 			item[0].text = item.attr('decode');
 		});
+		jQuery('#dataElementIdsStore option').each(function(){
+			var item = jQuery(this);
+			item[0].text = item.attr('decode');
+		});
 	}
 	// display - code and name
 	else{
@@ -201,6 +209,10 @@
 			var item = jQuery(this);
 			item[0].text = "(" + item.attr('decode') + ") " + item.attr('dename');
 		});
+		jQuery('#dataElementIdsStore option').each(function(){
+			var item = jQuery(this);
+			item[0].text = "(" + item.attr('decode') + ") " + item.attr('dename');
+		});
 	}	
 }
 
@@ -229,13 +241,3 @@
 		}));
 	}
 }
-
-function NASort(a, b) {    
-    if (a == 'NA') {
-        return 1;   
-    }
-    else if (b.innerHTML == 'NA') {
-        return -1;   
-    }       
-    return (a.innerHTML > b.innerHTML) ? 1 : -1;
-};
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.vm	2013-01-17 10:48:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.vm	2013-01-17 12:54:38 +0000
@@ -124,7 +124,7 @@
 <div id="dataElementSelection">
 	<table>
 		<tr>
-			<td>$i18n.getString("display_name")</td>
+			<td class="bold">$i18n.getString("display_name")</td>
 			<td>
 				<select id='displayNameOption' onchange='displayNameOnChange( this.value )'>
 					<option selected value='1'>$i18n.getString("name")</option>
@@ -134,7 +134,7 @@
 			</td>
 		</tr>
 		<tr>
-			<td>$i18n.getString("sort_by")</td>
+			<td class="bold">$i18n.getString("sort_by")</td>
 			<td>
 				<select id='sortBy' onchange="sortByOnChange(this.value)">
 					<option value='1' selected>$i18n.getString("name")</option>
@@ -163,7 +163,7 @@
 				<select id="dataElementIdsStore" multiple="multiple" style="display:none">
 					#foreach( $de in $dataElements)
 					#set($deJSON = '{' + '"id"' + ":" + $de.id + "," + '"name"' + ':"' + "$de.name" + '",' + '"shortName"' + ':"' + "$de.shortName" + '",' + '"type"' + ':"' + "$de.getDetailedTextType()"  + '"}' );
-					<option value='$deJSON'>$encoder.htmlEncode( $de.name )</option>
+					<option value='$deJSON' decode="$!de.code" dename="$de.name">$encoder.htmlEncode( $de.name )</option>
 					#end
 				</select>
 			</td>