dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #12074
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3606: fixes to handle different treatment of box-model on webkit and firefox
------------------------------------------------------------
revno: 3606
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-05-13 00:47:05 +0200
message:
fixes to handle different treatment of box-model on webkit and firefox
modified:
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-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-12 20:57:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js 2011-05-12 22:47:05 +0000
@@ -9,9 +9,9 @@
leftBar.hideAnimated();
$("#selectionDialog").dialog({
- minWidth: 560,
- minHeight: 300,
- position: [($("body").width() - 560) - 50, 50]
+ minWidth: 500,
+ minHeight: 263,
+ position: [($("body").width() - 500) - 50, 50]
});
$("#selectionDialog").parent().bind("resize", function(e) {
@@ -19,8 +19,14 @@
var indicatorSelector = $("#indicatorSelector");
var dataElementSelector = $("#dataElementSelector");
- dataElementSelector.height( dialog.height() - 71 );
- indicatorSelector.height( dialog.height() - 71 );
+ // 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 = 63;
+ if($.browser.webkit) adjustment = 67;
+ else if($.browser.mozilla) adjustment = 63;
+
+ dataElementSelector.height( dialog.height() - adjustment );
+ indicatorSelector.height( dialog.height() - adjustment );
});
$(":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-12 21:04:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm 2011-05-12 22:47:05 +0000
@@ -47,12 +47,11 @@
}
.ui-dialog .ui-dialog-content {
- padding: 1px;
+ padding: 2px;
}
#indicatorSelector, #dataElementSelector {
- margin: 1px !important;
- padding: 2px !important;
+ padding: 2px;
}
</style>
@@ -116,7 +115,7 @@
<div id="selectionDialog" title="Selection Box">
<div id="tabs">
<table style="width: 100%;">
- <tr id="dataElementsFilter">
+ <tr id="dataElementsFilter" style="padding: 0; margin: 0; width: 100%;">
<td>
<input id="dataElementsFilterInput" type="text" style="width: 100%; border: 1px inset #888; padding: 1px 0 1px 0;" />
</td>
@@ -127,7 +126,7 @@
<tr id="dataElementsTab">
<td colspan="2">
- <select id="dataElementSelector" multiple="multiple" style="height: 200px; width: 100%; margin: 1px;">
+ <select id="dataElementSelector" multiple="multiple" style="height: 200px; width: 100%;">
#foreach( $operand in $operands )
<option class="dataElementSelectorOption"
data-idx="${velocityCount}"
@@ -151,7 +150,7 @@
<tr id="indicatorsTab">
<td colspan="2">
- <select id="indicatorSelector" multiple="multiple" style="height: 200px; width: 100%; margin: 1px;">
+ <select id="indicatorSelector" multiple="multiple" style="height: 200px; width: 100%;">
#foreach( $indicator in $indicators )
<option class="indicatorSelectorOption"
data-idx="${velocityCount}" data-id="${indicator.id}" ondblclick="insertIndicator()">$encoder.htmlEncode( $indicator.name )</option>
@@ -166,7 +165,9 @@
<button type="button" id="indicatorsButton">Indicators</button> <span style="color:#606060">|</span>
<button type="button" id="insertButton">Insert</button>
</td>
- <td><span id="message_"></span></td>
+ <td>
+ <span id="message_"></span>
+ </td>
</tr>
</table>
</div>