dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #12052
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3589: minor fix
------------------------------------------------------------
revno: 3589
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-05-12 12:22:55 +0200
message:
minor fix
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-11 12:54:08 +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 10:22:55 +0000
@@ -7,15 +7,88 @@
});
leftBar.hideAnimated();
+
+ jQuery("#selectionDialog").dialog({
+ minWidth: 560,
+ minHeight: 320,
+ position: [900, 60]
+ });
+
+ jQuery("#selectionDialog").parent().bind("resize", function(e) {
+ var dialog = jQuery("#selectionDialog");
+ var indicatorSelector = jQuery("#indicatorSelector");
+ var dataElementSelector = jQuery("#dataElementSelector");
+
+ dataElementSelector.height( dialog.height() - 80 );
+ indicatorSelector.height( dialog.height() - 80 );
+ });
+
+ jQuery(":button").button();
+ jQuery(":submit").button();
+
+ jQuery("#dataElementInsertButton").click(insertDataElement);
+ jQuery("#indicatorInsertButton").click(insertIndicator);
+
+ jQuery("#selectionDialog").bind("dialogopen", function(event, ui) {
+ jQuery("#showSelectionBoxButton").button("disable");
+ });
+
+ jQuery("#selectionDialog").bind("dialogclose", function(event, ui) {
+ jQuery("#showSelectionBoxButton").button("enable");
+ });
+
+ jQuery("#showSelectionBoxButton").button("disable");
+
+ jQuery("#showSelectionBoxButton").click(function() {
+ jQuery("#selectionDialog").dialog("open");
+ });
+
+ showDataElements();
+
+ jQuery("#dataElementsButton").click(function() {
+ jQuery("#dataElementsButton").addClass("ui-state-active2");
+ jQuery("#indicatorsButton").removeClass("ui-state-active2");
+
+ showDataElements();
+ });
+
+ jQuery("#dataElementsButton").addClass("ui-state-active2");
+
+ jQuery("#indicatorsButton").click(function() {
+ jQuery("#indicatorsButton").addClass("ui-state-active2");
+ jQuery("#dataElementsButton").removeClass("ui-state-active2");
+
+ showIndicators();
+ });
+
+ jQuery("#insertButton").click(function() {
+ if( jQuery("#dataElementsTab").is(":visible") ) {
+ insertDataElement();
+ } else {
+ insertIndicator();
+ }
+ })
+
+ jQuery("#insertButton").button("option", "icons", { primary: "ui-icon-plusthick" });
+ jQuery("#saveButton").button("option", "icons", { primary: "ui-icon-disk" });
+ jQuery("#saveCloseButton").button("option", "icons", { primary: "ui-icon-disk" });
+ jQuery("#showSelectionBoxButton").button("option", "icons", { primary: "ui-icon-newwin" });
+ jQuery("#cancelButton").button("option", "icons", { primary: "ui-icon-cancel" });
+ jQuery("#delete").button("option", "icons", { primary: "ui-icon-trash" });
});
-function localFilterSelectList( filter )
-{
- if( jQuery("#dataElementsTab").is(":visible") ) {
- filterSelectList( "dataElementSelector", filter )
- } else {
- filterSelectList( "indicatorSelector", filter )
- }
+function showDataElements() {
+ jQuery("#dataElementsTab").show();
+ jQuery("#dataElementsFilter").show();
+ jQuery("#indicatorsTab").hide();
+ jQuery("#indicatorsFilter").hide();
+}
+
+function showIndicators() {
+ jQuery("#indicatorsTab").show();
+ jQuery("#indicatorsFilter").show();
+ jQuery("#dataElementsTab").hide();
+ jQuery("#dataElementsFilter").hide();
}
function filterSelectList( select_id, filter )
=== 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 09:14:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm 2011-05-12 10:22:55 +0000
@@ -11,90 +11,8 @@
jQuery('#designTextarea').ckeditor();
jQuery("#designTextarea").ckeditorGet().setData('$encoder.jsEscape( $dataEntryValue, "'" )');
-
- jQuery("#selectionDialog").dialog({
- minWidth: 560,
- minHeight: 320,
- position: [900, 60]
- });
-
- jQuery("#selectionDialog").parent().bind("resize", function(e) {
- var dialog = jQuery("#selectionDialog");
- var indicatorSelector = jQuery("#indicatorSelector");
- var dataElementSelector = jQuery("#dataElementSelector");
-
- dataElementSelector.height( dialog.height() - 80 );
- indicatorSelector.height( dialog.height() - 80 );
- });
-
- jQuery(":button").button();
- jQuery(":submit").button();
-
- jQuery("#dataElementInsertButton").click(insertDataElement);
- jQuery("#indicatorInsertButton").click(insertIndicator);
-
- jQuery("#selectionDialog").bind("dialogopen", function(event, ui) {
- jQuery("#showSelectionBoxButton").button("disable");
- });
-
- jQuery("#selectionDialog").bind("dialogclose", function(event, ui) {
- jQuery("#showSelectionBoxButton").button("enable");
- });
-
- jQuery("#showSelectionBoxButton").button("disable");
-
- jQuery("#showSelectionBoxButton").click(function() {
- jQuery("#selectionDialog").dialog("open");
- });
-
- showDataElements();
-
- jQuery("#dataElementsButton").click(function() {
- jQuery("#dataElementsButton").addClass("ui-state-active2");
- jQuery("#indicatorsButton").removeClass("ui-state-active2");
-
- showDataElements();
- });
-
- jQuery("#dataElementsButton").addClass("ui-state-active2");
-
- jQuery("#indicatorsButton").click(function() {
- jQuery("#indicatorsButton").addClass("ui-state-active2");
- jQuery("#dataElementsButton").removeClass("ui-state-active2");
-
- showIndicators();
- });
-
- jQuery("#insertButton").click(function() {
- if( jQuery("#dataElementsTab").is(":visible") ) {
- insertDataElement();
- } else {
- insertIndicator();
- }
- })
-
- jQuery("#insertButton").button("option", "icons", { primary: "ui-icon-plusthick" });
- jQuery("#saveButton").button("option", "icons", { primary: "ui-icon-disk" });
- jQuery("#saveCloseButton").button("option", "icons", { primary: "ui-icon-disk" });
- jQuery("#showSelectionBoxButton").button("option", "icons", { primary: "ui-icon-newwin" });
- jQuery("#cancelButton").button("option", "icons", { primary: "ui-icon-cancel" });
- jQuery("#delete").button("option", "icons", { primary: "ui-icon-trash" });
});
- function showDataElements() {
- jQuery("#dataElementsTab").show();
- jQuery("#dataElementsFilter").show();
- jQuery("#indicatorsTab").hide();
- jQuery("#indicatorsFilter").hide();
- }
-
- function showIndicators() {
- jQuery("#indicatorsTab").show();
- jQuery("#indicatorsFilter").show();
- jQuery("#dataElementsTab").hide();
- jQuery("#dataElementsFilter").hide();
- }
-
var stat = "ADD";
var dataEntryFormId = -1;
var selected = null;
@@ -133,7 +51,7 @@
}
#indicatorSelector, #dataElementSelector {
- margin: 2px !important;
+ margin: 1px !important;
padding: 2px !important;
}
</style>