initial commit
[CPE_learningsite] / CPE / CPE.App / CPE.App.Web / Views / Index / meeting.cshtml
1 @model CPE.App.Web.Models.AdobeMeetingView
2 @{
3         Layout = null;
4 }
5
6 <!DOCTYPE html>
7
8 <html>
9 <head>
10         <title>@Model.Name</title>
11         <script type="text/javascript">
12             var leaving = false;
13             window.onbeforeunload = function() {
14
15                 if (!leaving) {
16                     leaving = true;
17                     setTimeout(function() {
18                         loadSurvey();
19                     }, 100);
20                     var browser = navigator.userAgent.toLowerCase();
21                     var response = "";
22                     if (browser.indexOf("firefox") > -1)
23                         response = "Please click \"Stay on Page\" at the next prompt to take a brief moment to complete our Survey.";
24                     else if (browser.indexOf("msie") > -1)
25                         response = "Please click \"Cancel\" to stay on the current page to take a brief moment to complete our Survey.";
26                     else if (browser.indexOf("webkit") > -1)
27                         response = "Please click \"Stay on this Page\" to take a brief moment to complete our Survey.";
28                     else if (browser.indexOf("opera") > -1)
29                         response = "Please click \"Cancel\" to stay on the current page to take a brief moment to complete our Survey.";
30                     else
31                         response = "Please click \"Cancel\" to stay on the current page to take a brief moment to complete our Survey.";
32                     if (/Firefox[\/\s](\d+)/.test(navigator.userAgent) && new Number(RegExp.$1) >= 4)
33                         alert(response);
34                     return response;
35                 }
36             };
37
38             function loadSurvey() {
39                 window.location = "/index/wufoo/@Model.PrincipalId";
40             }
41
42         </script>
43         <style>
44                 html, body, iframe {
45                         width: 100%;
46                         height: 100%;
47                         border: 0px;
48                         margin: 0px;
49                 }
50         </style>
51 </head>
52 <body>
53     <div id="container" class="hidden">
54         <input id="meeting_sco" type="hidden" value="@Model.ScoId" />
55         <input id="principal_id" type="hidden" value="@Model.PrincipalId" />
56         <input id="certificate_id" type="hidden" value="@Model.CertificateId"/>
57     </div>
58         <iframe src="@Model.Url" />
59 </body>
60 </html>