← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7852: Tabular report gui fixes.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 7852 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-08-02 20:52:53 +0200
message:
  Tabular report gui fixes.
modified:
  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/css/style.css
  dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/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 12:29:14 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js	2012-08-02 18:51:22 +0000
@@ -116,7 +116,7 @@
         east_gridcolumn_height: 30,
         form_label_width: 90,
 		grid_favorite_width: 450,
-		grid_favorite_height: 305,
+		grid_favorite_height: 500,
         window_favorite_ypos: 100,
         window_confirm_width: 250,
 		window_record_width: 450,
@@ -2522,9 +2522,8 @@
 																	}
 																],
 																setHeightInWindow: function(store) {
-																	var h = (store.getCount() * 23) + 30,
-																		sh = TR.util.viewport.getSize().y * 0.6;
-																	this.setHeight(h > sh ? sh : h);
+																	var window = this.up('window');																	
+																	this.setHeight(window.getHeight() - 105);																	
 																	this.doLayout();
 																	this.up('window').doLayout();
 																},
@@ -2533,7 +2532,7 @@
 																	id: 'favorite_t',
 																	cls: 'tr-toolbar-tbar',
 																	defaults: {
-																		height: 28
+																		height: 24
 																	},
 																	items: [
 																		{
@@ -2778,105 +2777,104 @@
 															}
 														],
 														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;
-																			}
-																		}
-																	}
-																]
-															}
-														,
+															cls: 'tr-toolbar-bbar',
+															defaults: {
+																height: 24
+															},
+															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();
@@ -3042,4 +3040,4 @@
     });
     
     }});
-}); 
\ No newline at end of file
+}); 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/css/style.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/css/style.css	2012-07-10 06:49:04 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/css/style.css	2012-08-02 18:51:22 +0000
@@ -515,7 +515,7 @@
 }
 .tr-textfield .x-form-item-label {
     padding-left: 5px;
-    line-height: 20px;
+    line-height: 17px;
 }
 .tr-textfield-alt1 .x-form-item-label {
     padding-left: 5px;
@@ -765,3 +765,15 @@
     background-image: url(../images/equals.png) !important;
 }
 
+/* TR toolbar */
+
+.tr-toolbar-tbar {
+	height: 30px;
+	padding: 0 0 0 2px;
+	border-bottom-width: 1px !important;
+	border-radius: 2px;
+}
+.tr-toolbar-bbar {
+	height: 29px;
+	padding: 0;
+}

=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js	2012-07-31 19:48:14 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js	2012-08-02 18:51:22 +0000
@@ -4204,7 +4204,7 @@
                                                                         {
                                                                             xtype: 'textfield',
                                                                             cls: 'dv-textfield',
-                                                                            fieldLabel: 'Name',
+                                                                            fieldLabel: DV.i18n.name,
                                                                             maxLength: 160,
                                                                             enforceMaxLength: true,
                                                                             labelWidth: DV.conf.layout.form_label_width,