← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3635: made filter-input/button resize correctly

 

------------------------------------------------------------
revno: 3635
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-05-16 18:52:34 +0200
message:
  made filter-input/button resize correctly
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisPaging.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/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-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisPaging.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisPaging.js	2011-05-16 16:08:06 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisPaging.js	2011-05-16 16:52:34 +0000
@@ -36,7 +36,7 @@
     option: "<option>${text}</option>",
     option_selected: "<option selected='selected'>${text}</option>",
     pagesize_input: "Page size <input id='${id}' type='text' style='width: 50px;'/>",
-    filter_input: "<input id='${id}' placeholder='Filter' type='text' style='width: 80%; height: 18px; border: 1px inset #888;' />",
+    filter_input: "<input id='${id}' placeholder='Filter' type='text' style='width: 100%; height: 18px; border: 1px inset #888;' />",
     select_page: "Page <select id='${id}' style='width: 50px;'></select>"
   }
 
@@ -118,16 +118,27 @@
       $select.wrap( $.tmpl(templates.wrapper, { "id": wrapper_id }) );
       var $wrapper = $("#" + wrapper_id);
 
-      var $filter_div = $("<div/>");
-      $filter_div.css({
-          "padding": "2px",
+      var $filter_table = $("<table/>");
+      $filter_table.css({
+          "padding": "1px",
           "width": "100%"
       });
 
-      $filter_div.append( $.tmpl(templates.filter_input, { "id": filter_input_id }) )
-      $filter_div.append( $.tmpl(templates.button, {"id": filter_button_id, "text": "filter" }) );
-
-      $wrapper.prepend( $filter_div );
+      var $filter_tr = $("<tr/>");
+      
+      var $filter_td1 = $("<td/>")
+      var $filter_td2 = $("<td/>")
+      $filter_td2.css("width", "70px");
+
+      $filter_td1.append( $.tmpl(templates.filter_input, { "id": filter_input_id }) )
+      $filter_td2.append( $.tmpl(templates.button, {"id": filter_button_id, "text": "filter" }) );
+
+      $filter_tr.append($filter_td1);
+      $filter_tr.append($filter_td2);
+
+      $filter_table.append($filter_tr);
+
+      $wrapper.prepend( $filter_table );
 
       $wrapper.append( $.tmpl(templates.select_page, { "id": select_page_id }) )
       $wrapper.append( $.tmpl(templates.button, { "id": previous_button_id, "text":"previous" }) );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js	2011-05-16 16:08:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js	2011-05-16 16:52:34 +0000
@@ -19,18 +19,8 @@
 		var indicatorSelector = $("#indicatorSelector");
 		var dataElementSelector = $("#dataElementSelector");
 
-		/* Great for debugging when size of dialog is changed */
-//		console.log("D: " + dialog.height() + ", DE: " + dataElementSelector.height() + ", I: " + indicatorSelector.height());
-
-		// TODO look into this.. firefox does not treat the box-model the same as webkit... 
-		// 		should be fixable by setting fixed paddings/margin somewhere!
-
-		var adjustment = 102;
-		if($.browser.webkit) adjustment = 102;
-		else if($.browser.mozilla) adjustment = 102;
-
-		dataElementSelector.height( dialog.height() - adjustment );
-		indicatorSelector.height( dialog.height() - adjustment );
+		dataElementSelector.height( dialog.height() - 106 );
+		indicatorSelector.height( dialog.height() - 106 );
 	});
 
 	$(":button").button();

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm	2011-05-16 16:08:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm	2011-05-16 16:52:34 +0000
@@ -49,8 +49,7 @@
             	});
 			},
 			params: {
-				dataSetId: $dataSet.id,
-				pageSize: 10
+				dataSetId: $dataSet.id
 			}
 		});
 	});