Browse Source

Portal: Fixed page scrolling when clicking on FilterBrick's tile on home page.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4764 a333f486-631f-4898-b8df-5754b55c2be0
glajarige 8 years ago
parent
commit
e6b03ad8b0

+ 12 - 1
datamodels/2.x/itop-portal-base/portal/src/views/bricks/filter/tile.html.twig

@@ -34,4 +34,15 @@
 			</div>
 		</a>
 	{% endblock %}
-</div>
+</div>
+
+<script type="text/javascript">
+	$(document).ready(function(){
+	    // Preventing click on tile to scroll up
+	    $('#brick-{{ brick.GetId }}').on('click', function(oEvent){
+	        if(oEvent.target.type !== 'submit'){
+                oEvent.preventDefault();
+			}
+		});
+	});
+</script>