aboutsummaryrefslogtreecommitdiffstats
path: root/app/assets/javascripts
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/tools.js.coffee13
1 files changed, 13 insertions, 0 deletions
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