Updated variables declarations
authorThierry Florac <thierry.florac@onf.fr>
Thu, 20 Dec 2018 14:13:03 +0100
changeset 497 46ebb8b63379
parent 496 814c9e8b5b54
child 498 7d479c20ee49
Updated variables declarations
src/pyams_skin/resources/js/myams-dialog.js
--- a/src/pyams_skin/resources/js/myams-dialog.js	Thu Dec 20 08:40:32 2018 +0100
+++ b/src/pyams_skin/resources/js/myams-dialog.js	Thu Dec 20 14:13:03 2018 +0100
@@ -178,8 +178,8 @@
 		shown: function(e) {
 
 			function resetViewport(ev) {
-				var top = $('.scrollmarker.top', viewport);
-				var topPosition = viewport.scrollTop();
+				var top = $('.scrollmarker.top', viewport),
+					topPosition = viewport.scrollTop();
 				if (topPosition > 0) {
 					top.show();
 				} else {
@@ -193,11 +193,11 @@
 				}
 			}
 
-			var modal = e.target;
-			var viewport = $('.modal-viewport', modal);
+			var modal = e.target,
+				viewport = $('.modal-viewport', modal);
 			if (viewport.exists()) {
-				var maxHeight = parseInt(viewport.css('max-height'));
-				var barWidth = $.scrollbarWidth();
+				var maxHeight = parseInt(viewport.css('max-height')),
+					barWidth = $.scrollbarWidth();
 				if ((viewport.css('overflow') !== 'hidden') &&
 					(viewport.height() === maxHeight)) {
 					$('<div></div>').addClass('scrollmarker')
@@ -227,8 +227,8 @@
 				}
 			});
 			// Call shown callbacks registered for this dialog
-			var index;
-			var callbacks = $('.modal-dialog', modal).data('shown-callbacks');
+			var index,
+				callbacks = $('.modal-dialog', modal).data('shown-callbacks');
 			if (callbacks) {
 				for (index=0; index < callbacks.length; index++) {
 					callbacks[index].call(modal);