forked from cloudify-cosmo/getcloudify.org
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathxap_cloud_management.html
146 lines (125 loc) · 5.08 KB
/
xap_cloud_management.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
---
layout: bt_about
title: Try XAP on the Cloud in a Click
category: cloudify player
---
<div id="resultsDiv" class="DocumentsWrap"></div>
<section id="content">
<div class="container">
<div class="row">
<img src="/images/down.jpg" width="594" height="264" alt="Down for maintenance"/>
</div>
</div></section>
<script src="http://ricostacruz.com/nprogress/nprogress.js"></script>
<div id="hidden-iframe" style="display:none"><iframe id="iframe" src="http://launch.cloudifysource.org/widget/widget?apiKey=5bb7150f-5636-4087-b78e-4132b686c227&title=Launch&origin_page_url=http://getcloudify.org/xap_cloud_management.html" width="600" height="463"></iframe></div><script type="text/javascript">var WIDGET_ID = '5bb7150f-5636-4087-b78e-4132b686c227';</script>
<script type="text/javascript" src="/js/widget/script.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.postmessage/0.5/jquery.ba-postmessage.min.js"></script>
<script>
$(function() {
//Manage Downloads Gating;
//========================================//
var gotName = false;
var gotValidCaptcha = false;
var downloadHref="";
var strVar="";
var formEmail="";
var formName="";
strVar += "<div class=\"modal fade\" id=\"myModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\">";
strVar += " <a style=\"float:right \" class=\"gattingWrapperClose\" href=\"#\"><i class=\"fa fa-times\"> <\/i> <\/a>";
strVar += "<div class=\"gattingWrapper\">";
strVar += " <form class=\"regiterToMixpanel\" name=\"mc-embedded-subscribe-form\" id=\"mc-embedded-subscribe-form\" action=\"https:\/\/cloudifysource.us4.list-manage.com\/subscribe\/post?u=5e963581396e0c0e43ed217f8&id=b43defea9b\" method=\"POST\">";
strVar += " <div class=\"regTitle\">Subscribe here<\/div>";
strVar += " <div style=\"position:relative\">";
strVar += " <input id=\"last_name\" name=\"last_name\" type=\"text\" class=\"cuInput\" placeholder=\"Your Name\" \/>";
strVar += " <div class=\"cuValid\"><\/div>";
strVar += " <\/div>";
strVar += " <div style=\"position:relative\">";
strVar += " <input id=\"company\" name=\"company\" type=\"text\" class=\"cuInput\" placeholder=\"Your Company Name\" \/>";
strVar += " <div class=\"cuValid\"><\/div>";
strVar += " <\/div>";
strVar += " <div style=\"position:relative\">";
strVar += " <input id=\"mce-EMAIL\" name=\"email\" type=\"text\" placeholder=\"Your Email\"\/>";
strVar += " <div class=\"cuValid\"><\/div>";
strVar += " <\/div>";
strVar +=" <input id=\"website\" name=\"website\" type=\"text\" value=\"\" \/>";
strVar += " <input type=\"submit\" class=\"cuSendGatting btn btn-info\" id=\"mc-embedded-subscribe\" =\"submit\" value=\"Subscribe\" \/>";
strVar += " <\/form>";
strVar += " <\/div>";
strVar += " <\/div>";
$("#mixpanelSubscribe").click(function(e) {
$(this).before(strVar);
downloadValid();
formEmail = mixpanel.cookie.props.__alias;
if(formEmail==undefined){
$('#myModal').modal('toggle');
}else{
alert("You have already registered.")
}
});
$('#pageContent').on("click", "a.gattingWrapperClose", function() {
$('#myModal').modal('hide');
});
function downloadValid(){
//Validation
$('.regiterToMixpanel').validate({ // initialize the plugin
errorLabelContainer: "#error-note",
rules: {
last_name: {
required: true
},
company: {
required: true
},
email: {
required: true,
email: true
}
},
messages: {
last_name: {
required: "Please enter your first name",
},
company: {
required: "Please enter your company name",
},
email: {
required: "Please specify your email",
email: "Correct format is [email protected]"
}
},
submitHandler: function (form,e) { // for demo
if ($('input#website').val().length != 0) {
return false;
} else{
var chefemail = $("#mce-EMAIL").val();
var chef_first_name = $("#last_name").val();
var company = $("#company").val();
mixpanel.identify() ;
mixpanel.people.set_once({
$email: chefemail,
$first_name: chef_first_name,
$company: company,
$created: new Date(),
$last_seen:new Date(),
});
mixpanel.track('HP Chef Widget Campaign', {'page name' : document.title, 'url' : window.location.pathname});
$('#myModal .gattingWrapper form input').hide();
$('#myModal .regTitle').text("Thank you for registering! We will be in touch with further details.");
setTimeout(function() {
$('#myModal').modal('hide');
}, 4000);
}
//return false; // for demo
}
});
//End Validation
}
//Blocking Spam http://blog.supermedia.com/honeypot-technique/
$('#regiterToDownload').submit(function(){
if ($('input#website').val().length != 0) {
return false;
}
});
//End Blocking Spam
});
</script>