Limited the support for the full screen mode to Chrome and Firefox.

This commit is contained in:
Maxim Khlobystov 2015-03-31 16:44:16 -07:00
parent dfa30d2193
commit c08b23fec2
2 changed files with 9 additions and 2 deletions

View File

@ -150,6 +150,9 @@ Handlebars.registerHelper 'isPortraitMobile', () ->
Handlebars.registerHelper 'isMobile', () ->
isMobile()
Handlebars.registerHelper 'isMobileChromeOrFirefox', () ->
isMobile() and ((getBrowserName() is 'Chrome') or (getBrowserName() is 'Firefox'))
Handlebars.registerHelper "meetingIsRecording", ->
Meteor.Meetings.findOne()?.recorded # Should only ever have one meeting, so we dont need any filter and can trust result #1
@ -489,7 +492,11 @@ Handlebars.registerHelper "visibility", (section) ->
# determines which browser is being used
@getBrowserName = () ->
if navigator.userAgent.match(/Safari/i)
if navigator.userAgent.match(/Chrome/i)
return 'Chrome'
else if navigator.userAgent.match(/Firefox/i)
return 'Firefox'
else if navigator.userAgent.match(/Safari/i)
return 'Safari'
else if navigator.userAgent.match(/Trident/i)
return 'IE'

View File

@ -1,7 +1,7 @@
<template name="whiteboard">
<div id="{{id}}" {{visibility name}} class="component gradientBar">
<h3 id="whiteboard-navbar" class="title">
{{#if isMobile}}
{{#if isMobileChromeOrFirefox}}
{{> makeButton btn_class="fullscreenWhiteboardButton" i_class="glyphicon glyphicon-fullscreen"}}
{{/if}}
<span class="glyphicon glyphicon-pencil"></span>