Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 360 lines (295 sloc) 11.561 kB
<!--base href="http://dev.mashup.getclevermedia.net:9775/services/admin/HyundaiEPA/" target="_blank"/-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,height=device-height, initial-scale=1.0, maximum-scale=1.0;" />
<meta name="HandheldFriendly" content="true" />
<title>HyundaiEPA</title>
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://reports.getclevermedia.net/" : "http://reports.getclevermedia.net/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 5);
piwikTracker.trackPageView();
} catch( err ) {}
</script>
<script type="text/javascript" src="http://dev.mashup.getclevermedia.net:9775/services/admin/HyundaiEPA?wsdl2form&contentType=text/javascript&resource=js/WSRequest.js"></script>
<script type="text/javascript" src="http://dev.mashup.getclevermedia.net:9775/services/admin/HyundaiEPA?stub"></script>
<script>services["admin/HyundaiEPA"].$.proxyAddress = "http://dev.mashup.getclevermedia.net:9775/carbon/admin/jsp/WSRequestXSSproxy_ajaxprocessor.jsp";</script>
<!------------------------->
<link rel="stylesheet" type="text/css" href="./bootstrap/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="./B-pngs/b-pngs.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="./bootstrap/js/bootstrap.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></script>
<script src="./common.js" type="text/javascript"></script>
<div class="span9 columns" style="width:300px; z-index:10">
<div id="myCarousel" class="carousel slide">
<div class="carousel-inner">
<div class="active item"> <img src="./B-pngs/ba.png" border="0" title="Expand to Sign The Petition"/> <a href="javascript:void(0);" id="img_a"> <img src="./icons/right.png" class="imgp1" border="0" /></a> <a href="javascript:void(0);" id="img_b"> <img src="./icons/bar1.png" class="imgp2" border="0" /></a>
<!--img src="./icons/no.png" class="imgp10" border="0" /> <span class="digital"></span-->
</div>
<div class="item"> <img src="./B-pngs/bb.png" border="0" title="second png"/> <a href="javascript:void(0);" id="img_r"><img src="./icons/right1.png" class="imgp1" border="0" style="z-index:10" /></a> <a href="javascript:void(0);" id="img_f"><img src="./icons/bar1.png" border="0" class="imgp2" /></a>
<!--img src="./icons/no.png" class="imgp10" border="0" /> <span class="digital"></span-->
</div>
</div>
</div>
</div>
<script type="text/javascript">
var count_no = 0;
var current_no = 0;
var signup_ary = new Array();
function getData() {
var data = services["admin/HyundaiEPA"].operations["retrieveTopFuelRegistrationsJSON"];
var payload = null;
data.callback = function(payload) {
var responseXML = WSRequest.util._serializeToString(payload);
var responseJSON = WebService.utils.xml2bf(payload);
var htmlContent = responseJSON["ws:retrieveTopFuelRegistrationsJSONResponse"]["return"].$;
var jdata = eval("(" + htmlContent + ')');;
dt = jdata.FuelRegistrations;
// \/Date(1341880220000)\/
// 'email': dt[n].EmailAddress,
for (n in dt) {
// console.log(n + ' => ' + dt[n].EmailAddress);
signup_ary.push({
'name': dt[n].FirstName + ' ' + dt[n].LastName.substr(0,1).toUpperCase(),
'zip': dt[n].PostalCode,
'date': get_date(dt[n].InsertedDate.replace(/^.*\(/, '').replace(/\).*$/, ''))
});
}
console.log(signup_ary);
len = signup_ary.length;
top_display_1(signup_ary[len-2], count_no-1, 'top1');
top_display_1(signup_ary[len-1], count_no, 'top2');
current_no = len-2;
};
data(payload);
}
function getCount() {
var count = services["admin/HyundaiEPA"].operations["retrieveFuelRegistrationCount"];
var payload = null;
count.callback = function(payload) {
var responseXML = WSRequest.util._serializeToString(payload);
var responseJSON = WebService.utils.xml2bf(payload);
var htmlContent = responseJSON["ws:retrieveFuelRegistrationCountResponse"]["return"].$;
count_no = htmlContent; //66
//$('span.digital').html(count_no);
};
count(payload);
}
function postData(firstName,lastName,emailAddress,confirmEmail,postalCode,consent) {
if ((firstName != "") && (lastName != "") && (emailAddress != "") && (emailAddress == confirmEmail) && (postalCode != "") && (consent != "")) {
var data = services["admin/HyundaiEPA"].operations["saveFuelRegistrationJSON"];
var payload = "<saveFuelRegistrationJSON><firstName>"+firstName+"</firstName><lastName>"+lastName+"</lastName><emailAddress>"+emailAddress+"</emailAddress><confirmEmail>"+confirmEmail+"</confirmEmail><zipCode>"+postalCode+"</zipCode><optIn>"+consent+"</optIn></saveFuelRegistrationJSON>";
data.callback = function(payload) {
var responseXML = WSRequest.util._serializeToString(payload);
var responseJSON = WebService.utils.xml2bf(payload);
var htmlContent = responseJSON["ws:saveFuelRegistrationJSONResponse"]["return"].$;
var jsonContent = eval("("+htmlContent+")");
var success = jsonContent.Result.Success;
if (success) {
var trackName = "http://reports.getclevermedia.net/Sign";
piwikTracker.trackLink(trackName,'link');
getCount();
}
};
data(payload);
}
}
/////////////////////////////////////////
$(document).ready(function() {
getCount();
getData();
$('.carousel').carousel();
$('#img_a').mouseover(function(e) {
e.preventDefault();
$(this).trigger('click');
});
$('#img_a').click(function(e) {
e.preventDefault();
// stop the slider.
$('#myCarousel').removeClass('carousel');
$('div.item').each(function() {
if ($(this).is('.active')) {
$(this).removeClass('active').hide();
}
});
var this_item = $('#img_r').parent('div.item');
$('div.item:not(this_item)').hide();
this_item
.addClass('active')
.show();
$('span.digital', this_item).html(count_no);
return false;
});
$('#img_b').mouseover(function(e) {
$(this).trigger('click');
});
$('#img_b').click(function(e) {
e.preventDefault();
var this_item = $(this).parent('div.item');
$('div.item').each(function() {
if ($(this).is('.active')) {
$(this).removeClass('active');
}
});
$('div.item:not(this_item)').hide();
this_item
.empty()
.css({
'width': '300px',
'height': '600px',
'background-image':'url(./B-pngs/bc.png)',
'background-repeat' : 'no-repeat'
})
.addClass('active')
.show();
$('<a></a>')
.addClass('switch1')
.html('<img src="./icons/close.png" border="0" width="30" height="30" />')
.attr({'href': 'javascript:void(0);',
'title': 'Return to home page'})
.appendTo(this_item);
$('<img/>').attr({
'src':"./icons/no.png",
'class': "imgp10",
'border': "0"
})
.append(count_no)
.appendTo(this_item);
$('<span></span>').addClass('digital').appendTo(this_item);
// add right arrow.
if(! this_item.find('div#img_r2').length) {
$('<a></a>').attr({
'id': 'img_r2',
'href': 'javascript:void(0);'
})
.append('<img src="./icons/right1.png" class="imgp3" border="0" />')
.appendTo(this_item);
}
{
len = signup_ary.length;
top_display_2(signup_ary[len-1], count_no, 'top3', 'div.active:first');
top_display_2(signup_ary[len-2], count_no-1, 'top4', 'div.active:first');
current_no = 2;
}
// add form.
if(! this_item.find('div#container').length) {
$('<div></div>').attr('id', 'container').appendTo(this_item);
}
$('div#container')
.load('./B-pngs/b-signup-form.html')
.animate({opacity: 1}, 1000);
// stop the slider.
$('#myCarousel').removeClass('carousel');
$('span.digital', this_item).html(count_no).show();
return false;
});
// $('#img_b, img_f').click()
$('#img_f').click(function(e) {
e.preventDefault();
var this_item = $(this).parent('div.item');
$('div.item:not(this_item)').hide();
this_item
.empty()
.css({
'width': '300px',
'height': '600px',
'background-image':'url(./B-pngs/bc.png)',
'background-repeat' : 'no-repeat'
})
.addClass('active')
.show();
$('<a></a>')
.addClass('switch1')
.html('<img src="./icons/close.png" border="0" width="30" height="30" />')
.attr({'href': 'javascript:void(0);',
'title': 'Return to home page'})
.appendTo(this_item);
$('<img/>').attr({
'src':"./icons/no.png",
'class': "imgp10",
'border': "0"
})
.appendTo(this_item);
// add right arrow.
if(! this_item.find('div#img_r2').length) {
$('<a></a>').attr({
'id': 'img_r2',
'href': 'javascript:void(0);'
})
.append('<img src="./icons/right1.png" class="imgp3" border="0" />')
.appendTo(this_item);
}
{
len = signup_ary.length;
top_display_2(signup_ary[len-1], count_no, 'top3', 'div.active:first');
top_display_2(signup_ary[len-2], count_no-1, 'top4', 'div.active:first');
current_no = 2;
}
// add form.
if(! this_item.find('div#container').length) {
$('<div></div>').attr('id', 'container').appendTo(this_item);
}
$('div#container')
.load('./B-pngs/b-signup-form.html')
.animate({opacity: 1}, 1000);
// stop the slider.
$('#myCarousel').removeClass('carousel');
$('<span></span>').addClass('digital').appendTo(this_item);
$('span.digital', this_item).html(count_no).show();
return false;
});
$('#img_r').live('click', function(e) {
e.preventDefault();
console.log('===========' + current_no + ', ' + parseInt(count_no-current_no));
var len = signup_ary.length;
if(current_no<0) {
current_no = len-1;
}
$('div.top2', 'div.item').empty().remove();
$('div.top1', 'div.item').removeClass('top1').addClass('top2');
top_display_1(signup_ary[current_no], parseInt(count_no-len+current_no), 'top1');
current_no --;
return false;
});
$('#img_r2').live('click', function(e) {
e.preventDefault();
var len = signup_ary.length;
if(current_no>=len) {
current_no = 0;
}
$('div.top3', 'div.item').empty().remove();
$('div.top4', 'div.item').empty().remove();
top_display_2(signup_ary[current_no], count_no-current_no, 'top3', 'div.active.item');
current_no ++;
top_display_2(signup_ary[current_no], count_no-current_no, 'top4', 'div.active.item');
current_no++;
return false;
});
$('#img_l').live('click', function(e) {
e.preventDefault();
var len = signup_ary.length;
if(current_no>=len) {
current_no = 0;
}
$('div.top1', 'div.item').empty().remove();
$('div.top2', 'div.item').empty().remove();
top_display_1(signup_ary[current_no], count_no-current_no, 'top1');
current_no ++;
top_display_1(signup_ary[current_no], count_no-current_no, 'top2');
current_no++;
return false;
});
$('a.switch1').live('click', function(e) {
window.location.reload();
});
});
</script>
<div style="clear:both;"></div>
<div style="position:absolute; top:260px; overflow:hidden">
<p>dskjfdkjkgf</p>
<p>dfjdfkkgf</p>
<p>dsfjgf</p>
</div>
Jump to Line
Something went wrong with that request. Please try again.