← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7841: Don't search patients which full-name has two words.

 

------------------------------------------------------------
revno: 7841
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-08-02 19:29:14 +0700
message:
  Don't search patients which full-name has two words.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js


--
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/webapp/dhis-web-caseentry/app/app.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2012-08-02 07:54:24 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2012-08-02 12:29:14 +0000
@@ -115,8 +115,8 @@
         center_tbar_height: 31,
         east_gridcolumn_height: 30,
         form_label_width: 90,
-		grid_favorite_width: 420,
-		grid_favorite_height: 250,
+		grid_favorite_width: 450,
+		grid_favorite_height: 305,
         window_favorite_ypos: 100,
         window_confirm_width: 250,
 		window_record_width: 450,
@@ -2456,7 +2456,6 @@
 						listeners: {
 							afterrender: function(b) {
 								this.menu = Ext.create('Ext.menu.Menu', {
-									margin: '2 0 0 0',
 									shadow: false,
 									showSeparator: false,
 									items: [
@@ -2489,7 +2488,7 @@
 																	{
 																		xtype: 'textfield',
 																		cls: 'tr-textfield',
-																		fieldLabel: 'Name',
+																		fieldLabel: TR.i18n.name,
 																		maxLength: 160,
 																		enforceMaxLength: true,
 																		labelWidth: TR.conf.layout.form_label_width,
@@ -2532,30 +2531,30 @@
 																store: TR.store.favorite,
 																tbar: {
 																	id: 'favorite_t',
-																	cls: 'dv-toolbar',
-																	height: 30,
+																	cls: 'tr-toolbar-tbar',
 																	defaults: {
-																		height: 24
+																		height: 28
 																	},
 																	items: [
 																		{
 																			text: TR.i18n.sort_by + '..',
-																			cls: 'dv-toolbar-btn-2',
+																			cls: 'tr-toolbar-btn-2',
 																			listeners: {
 																				added: function() {
 																					TR.cmp.favorite.sortby = this;
 																				},
 																				afterrender: function(b) {
-																					this.addCls('dv-menu-togglegroup');
+																					this.addCls('tr-menu-togglegroup');
 																					this.menu = Ext.create('Ext.menu.Menu', {
-																						shadowOffset: 1,
-																						showSeparator: false,
+																						margin: '-1 0 0 -1',
+																						shadow: false,
+                                                                                        showSeparator: false,
 																						width: 109,
-																						height: 70,
+																						height: 67,
 																						items: [
 																							{
 																								xtype: 'radiogroup',
-																								cls: 'dv-radiogroup',
+																								cls: 'tr-radiogroup',
 																								columns: 1,
 																								vertical: true,
 																								items: [
@@ -2596,7 +2595,7 @@
 																		'->',
 																		{
 																			text: TR.i18n.rename,
-																			cls: 'dv-toolbar-btn-2',
+																			cls: 'tr-toolbar-btn-2',
 																			disabled: true,
 																			xable: function() {
 																				if (TR.cmp.favorite.grid.getSelectionModel().getSelection().length == 1) {
@@ -2618,7 +2617,7 @@
 																					items: [
 																						{
 																							xtype: 'textfield',
-																							cls: 'dv-textfield',
+																							cls: 'tr-textfield',
 																							maxLength: 160,
 																							enforceMaxLength: true,
 																							value: selected.data.name,
@@ -2696,7 +2695,7 @@
 																		},
 																		{
 																			text: TR.i18n.delete_object,
-																			cls: 'dv-toolbar-btn-2',
+																			cls: 'tr-toolbar-btn-2',
 																			disabled: true,
 																			xable: function() {
 																				if (TR.cmp.favorite.grid.getSelectionModel().getSelection().length) {
@@ -2726,7 +2725,7 @@
 																							},
 																							{
 																								html: str,
-																								cls: 'dv-window-confirm-list'
+																								cls: 'tr-window-confirm-list'
 																							}                                                                                                    
 																						],
 																						bbar: [
@@ -2778,99 +2777,106 @@
 																}
 															}
 														],
-														bbar: [
-															{
-																xtype: 'label',
-																style: 'padding-left:2px; line-height:22px; font-size:10px; color:#666; width:70%',
-																listeners: {
-																	added: function() {
-																		TR.cmp.favorite.label = this;
-																	}
-																}
-															},																
-															'->',
-															{
-																text: TR.i18n.save,
-																disabled: true,
-																xable: function() {
-																	if (TR.cmp.favorite.name.getValue()) {
-																		var index = TR.store.favorite.findExact('name', TR.cmp.favorite.name.getValue());
-																		if (index != -1) {
-																			this.enable();
-																			TR.cmp.favorite.label.setText('');
-																			return true;
-																		}
-																		else {
-																			this.enable();
-																			TR.cmp.favorite.label.setText('');
-																			return true;
-																		}
-																	}
-																	else {
-																		TR.cmp.favorite.label.setText('');
-																	}
-																	
-																	this.disable();
-																	return false;
-																},
-																handler: function() {
-																	if (this.xable()) {
-																		var value = TR.cmp.favorite.name.getValue();
-																		if (TR.store.favorite.findExact('name', value) != -1) {
-																			var item = value.length > 40 ? (value.substr(0,40) + '...') : value;
-																			var w = Ext.create('Ext.window.Window', {
-																				title: TR.i18n.save_favorite,
-																				width: TR.conf.layout.window_confirm_width,
-																				bodyStyle: 'padding:10px 5px; background-color:#fff; text-align:center',
-																				modal: true,
-																				items: [
-																					{
-																						html: TR.i18n.are_you_sure,
-																						bodyStyle: 'border-style:none'
-																					},
-																					{
-																						html: '<br/>' + item,
-																						cls: 'dv-window-confirm-list'
-																					}
-																				],
-																				bbar: [
-																					{
-																						text: TR.i18n.cancel,
-																						handler: function() {
-																							this.up('window').close();
-																						}
-																					},
-																					'->',
-																					{
-																						text: TR.i18n.overwrite,
-																						handler: function() {
-																							this.up('window').close();
-																							TR.util.crud.favorite.update(function() {
-																								TR.cmp.favorite.window.resetForm();
-																							});
-																							
-																						}
-																					}
-																				]
-																			});
-																			w.setPosition((screen.width/2)-(TR.conf.layout.window_confirm_width/2), TR.conf.layout.window_favorite_ypos + 100, true);
-																			w.show();
-																		}
-																		else {
-																			TR.util.crud.favorite.create(function() {
-																				TR.cmp.favorite.window.resetForm();
-																				TR.cmp.favorite.window.down('grid').setHeightInWindow(TR.store.favorite);
-																			});
-																		}                                                                                    
-																	}
-																},
-																listeners: {
-																	added: function() {
-																		TR.cmp.favorite.save = this;
-																	}
-																}
+														bbar: {
+																cls: 'dv-toolbar-bbar',
+																defaults: {
+																	height: 28
+																},
+																items: [
+																	{
+																		xtype: 'label',
+																		style: 'padding-left:2px; line-height:22px; font-size:10px; color:#666; width:70%',
+																		listeners: {
+																			added: function() {
+																				TR.cmp.favorite.label = this;
+																			}
+																		}
+																	},																
+																	'->',
+																	{
+																		text: TR.i18n.save,
+																		disabled: true,
+																		xable: function() {
+																			if (TR.cmp.favorite.name.getValue()) {
+																				var index = TR.store.favorite.findExact('name', TR.cmp.favorite.name.getValue());
+																				if (index != -1) {
+																					this.enable();
+																					TR.cmp.favorite.label.setText('');
+																					return true;
+																				}
+																				else {
+																					this.enable();
+																					TR.cmp.favorite.label.setText('');
+																					return true;
+																				}
+																			}
+																			else {
+																				TR.cmp.favorite.label.setText('');
+																			}
+																			
+																			this.disable();
+																			return false;
+																		},
+																		handler: function() {
+																			if (this.xable()) {
+																				var value = TR.cmp.favorite.name.getValue();
+																				if (TR.store.favorite.findExact('name', value) != -1) {
+																					var item = value.length > 40 ? (value.substr(0,40) + '...') : value;
+																					var w = Ext.create('Ext.window.Window', {
+																						title: TR.i18n.save_favorite,
+																						width: TR.conf.layout.window_confirm_width,
+																						bodyStyle: 'padding:10px 5px; background-color:#fff; text-align:center',
+																						modal: true,
+																						items: [
+																							{
+																								html: TR.i18n.are_you_sure,
+																								bodyStyle: 'border-style:none'
+																							},
+																							{
+																								html: '<br/>' + item,
+																								cls: 'dv-window-confirm-list'
+																							}
+																						],
+																						bbar: [
+																							{
+																								text: TR.i18n.cancel,
+																								handler: function() {
+																									this.up('window').close();
+																								}
+																							},
+																							'->',
+																							{
+																								text: TR.i18n.overwrite,
+																								handler: function() {
+																									this.up('window').close();
+																									TR.util.crud.favorite.update(function() {
+																										TR.cmp.favorite.window.resetForm();
+																									});
+																									
+																								}
+																							}
+																						]
+																					});
+																					w.setPosition((screen.width/2)-(TR.conf.layout.window_confirm_width/2), TR.conf.layout.window_favorite_ypos + 100, true);
+																					w.show();
+																				}
+																				else {
+																					TR.util.crud.favorite.create(function() {
+																						TR.cmp.favorite.window.resetForm();
+																						TR.cmp.favorite.window.down('grid').setHeightInWindow(TR.store.favorite);
+																					});
+																				}                                                                                    
+																			}
+																		},
+																		listeners: {
+																			added: function() {
+																				TR.cmp.favorite.save = this;
+																			}
+																		}
+																	}
+																]
 															}
-														],
+														,
 														listeners: {
 															show: function() {                                               
 																TR.cmp.favorite.save.xable();
@@ -2892,7 +2898,7 @@
 										'-',
 										{
 											xtype: 'grid',
-											cls: 'dv-menugrid',
+											cls: 'tr-menugrid',
 											width: 420,
 											scroll: 'vertical',
 											columns: [