← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7736: Remove jquery.mousewheel.js and add scroll bar for program-stage-instance in dataentry form.

 

------------------------------------------------------------
revno: 7736
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-07-27 10:53:01 +0700
message:
  Remove jquery.mousewheel.js and add scroll bar for program-stage-instance in dataentry form.
removed:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/jquery.mousewheel.js
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/resources/help_content.xml
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.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-services/dhis-service-core/src/main/resources/help_content.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/help_content.xml	2012-07-26 05:47:18 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/help_content.xml	2012-07-27 03:53:01 +0000
@@ -5795,13 +5795,13 @@
 </section>
 <section id='multiple_individual_records'>
 <title>Multiple individual records</title>
-<para>The multiple individual records function is where individual data is manually registered in the DHIS database. A list events for each person who enrolled into the seleted program after clicking a multi events with registration.</para>
+<para>The multiple individual records function is where individual data is manually registered in the DHIS database. A list events for each person who enrolled into the selected program after clicking a multi events with registration.</para>
 <para>To access the multiple individual records function, from the <emphasis role="italic">Services</emphasis> menu, go to the <emphasis role="italic">Individual Records</emphasis> option and click on it. Select <emphasis role="italic">Multiple individual records</emphasis> option on left menu to proceed.</para>
-<para>To start enter data, the first step is to open a list events of person who enrolled a certain progam by clicking a program in the list on the main page. Follow these steps:</para>
+<para>To start enter data, the first step is to open a list events of person who enrolled a certain program by clicking a program in the list on the main page. Follow these steps:</para>
 <orderedlist>
 <listitem>
-<para>Locate the orgunit you want to register data for in the tree menu to the left. Expand and close branches by clicking on the +/- symbols. A quick way to find an orgunit is to use the search box just above the tree (the green symbol), but you need to write in the full name to get a match.</para>
-<para>The system loads multi events with registration which belong to the selected orgunit.</para>
+<para>Locate the organisation unit you want to register data for in the tree menu to the left. Expand and close branches by clicking on the +/- symbols. A quick way to find an orgunit is to use the search box just above the tree (the green symbol), but you need to write in the full name to get a match.</para>
+<para>The system loads multi events with registration which belong to the selected organisation unit.</para>
 </listitem>
 <listitem>
 <para>Select a program in the list. A list events of persons who enrolled into the selected program is shown.</para>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm	2012-07-18 03:46:42 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataRecordingSelect.vm	2012-07-27 03:53:01 +0000
@@ -1,29 +1,5 @@
 <script type="text/javascript" src="javascript/jquery.mousewheel.js"></script>
 
-<script>
-	$(document).ready(function () {        
-        $('#programInstanceFlowDiv').mousedown(function (event) {
-            $(this)
-                .data('down', true)
-                .data('x', event.clientX)
-                .data('scrollLeft', this.scrollLeft);
-                
-            return false;
-        }).mouseup(function (event) {
-            $(this).data('down', false);
-        }).mousemove(function (event) {
-            if ($(this).data('down') == true) {
-                this.scrollLeft = $(this).data('scrollLeft') + $(this).data('x') - event.clientX;
-            }
-        }).mousewheel(function (event, delta) {
-            this.scrollLeft -= (delta * 30);
-        }).css({
-            'overflow' : 'hidden',
-            'cursor' : '-moz-grab'
-        });
-	});
-</script>
-
 <form id='dataRecordingSelectForm' name='dataRecordingSelectForm' method='post'>
 
 <table class="mainPageTable" id='patientInfoDiv'> 
@@ -105,7 +81,7 @@
 </div>
 
 <div id='programInstanceDiv' class='hidden '>
-	<div id='programInstanceFlowDiv' style="width:500px;height:70px;overflow-x:auto;">
+	<div id='programInstanceFlowDiv' style="width:500px;height:90px;overflow-x:auto;">
 		<table>
 			<tr id='programStageIdTR'></tr>
 		</table>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2012-07-26 03:58:09 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2012-07-27 03:53:01 +0000
@@ -629,11 +629,10 @@
 					jQuery(".stage-object-selected").css('background-color', COLOR_LIGHT_GREEN);
 
 					disableCompletedButton(true);
-					enable('newEncounterBtn');
 					var irregular = jQuery('#entryFormContainer [name=irregular]').val();
 					if( irregular == 'true' )
 					{
-						enable('createEventBtn');
+						enable('newEncounterBtn');
 						jQuery('#createNewEncounterDiv').dialog({
 								title: i18n_create_new_event,
 								maximize: true, 
@@ -653,6 +652,10 @@
 												
 						jQuery('#dueDateNewEncounter').datepicker( "setDate" , edate );
 					}
+					else
+					{
+						disable('newEncounterBtn');
+					}
 					
 					var selectedProgram = jQuery('#dataRecordingSelectForm [name=programId] option:selected');
 					if( selectedProgram.attr('type')=='2' && irregular == 'false' )

=== removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/jquery.mousewheel.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/jquery.mousewheel.js	2012-06-13 09:50:22 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/jquery.mousewheel.js	1970-01-01 00:00:00 +0000
@@ -1,85 +0,0 @@
-/* Copyright (c) 2006 Brandon Aaron (brandon.aaron@xxxxxxxxx || http://brandonaaron.net)
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
- * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
- * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
- *
- * $LastChangedDate: 2007-12-14 23:57:10 -0600 (Fri, 14 Dec 2007) $
- * $Rev: 4163 $
- *
- * Version: @VERSION
- * 
- * Requires: $ 1.2.2+
- */
-
-(function($) {
-
-$.event.special.mousewheel = {
-	setup: function() {
-		var handler = $.event.special.mousewheel.handler;
-		
-		// Fix pageX, pageY, clientX and clientY for mozilla
-		if ( $.browser.mozilla )
-			$(this).bind('mousemove.mousewheel', function(event) {
-				$.data(this, 'mwcursorposdata', {
-					pageX: event.pageX,
-					pageY: event.pageY,
-					clientX: event.clientX,
-					clientY: event.clientY
-				});
-			});
-	
-		if ( this.addEventListener )
-			this.addEventListener( ($.browser.mozilla ? 'DOMMouseScroll' : 'mousewheel'), handler, false);
-		else
-			this.onmousewheel = handler;
-	},
-	
-	teardown: function() {
-		var handler = $.event.special.mousewheel.handler;
-		
-		$(this).unbind('mousemove.mousewheel');
-		
-		if ( this.removeEventListener )
-			this.removeEventListener( ($.browser.mozilla ? 'DOMMouseScroll' : 'mousewheel'), handler, false);
-		else
-			this.onmousewheel = function(){};
-		
-		$.removeData(this, 'mwcursorposdata');
-	},
-	
-	handler: function(event) {
-		var args = Array.prototype.slice.call( arguments, 1 );
-		
-		event = $.event.fix(event || window.event);
-		// Get correct pageX, pageY, clientX and clientY for mozilla
-		$.extend( event, $.data(this, 'mwcursorposdata') || {} );
-		var delta = 0, returnValue = true;
-		
-		if ( event.wheelDelta ) delta = event.wheelDelta/120;
-		if ( event.detail     ) delta = -event.detail/3;
-		if ( $.browser.opera  ) delta = -event.wheelDelta;
-		
-		event.data  = event.data || {};
-		event.type  = "mousewheel";
-		
-		// Add delta to the front of the arguments
-		args.unshift(delta);
-		// Add event to the front of the arguments
-		args.unshift(event);
-
-		return $.event.handle.apply(this, args);
-	}
-};
-
-$.fn.extend({
-	mousewheel: function(fn) {
-		return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
-	},
-	
-	unmousewheel: function(fn) {
-		return this.unbind("mousewheel", fn);
-	}
-});
-
-})(jQuery);
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2012-07-11 04:18:49 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2012-07-27 03:53:01 +0000
@@ -10,6 +10,8 @@
 	hideById('addRelationshipDiv');
 	hideById('migrationPatientDiv');
 	enable('listPatientBtn');
+	enable('addPatientBtn');
+	enable('advancedSearchBtn');
 	setFieldValue("orgunitName", orgUnitNames[0]);
 }