From 785078284aeffdaf5b21dde2d46e3ff02bf3eadf Mon Sep 17 00:00:00 2001 From: Bruno Perles Date: Wed, 4 Nov 2015 17:57:02 +0100 Subject: Expend map --- app/assets/javascripts/tools.js.coffee | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'app/assets/javascripts') diff --git a/app/assets/javascripts/tools.js.coffee b/app/assets/javascripts/tools.js.coffee index b30eb6f15..e88c81efa 100644 --- a/app/assets/javascripts/tools.js.coffee +++ b/app/assets/javascripts/tools.js.coffee @@ -1,6 +1,19 @@ (($) -> $ -> $('.ce-hide').removeClass 'ce-hide' + $('[data-ce-action]').click -> + action = $(this).data('ce-action') + id = $(this).data('ce-id') + $map = $('#'+id) + height = $(window).height() + if (action == 'map-fullscreen') + if parseInt($map.css('height')) == height + $map.css('width', '') + $map.css('height', '') + else + $map.css('height', height).css('width', '100%') + $map.find('i').toggleClass('fa-expand fa-compress') + map.updateSize() return return ) jQuery -- cgit v1.2.3