Created
September 17, 2013 06:06
-
-
Save tatey/6590608 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
(function() { | |
'use strict'; | |
var openModal = function() { | |
var times = [ | |
theBestDay.widget.createTimeChoice({start: 1410401585, timezone: 'Australia/Sydney'}), | |
theBestDay.widget.createTimeChoice({start: 1410574428, timezone: 'Australia/Sydney'}) | |
]; | |
var places = [ | |
theBestDay.widget.createPlaceChoice({name: "The Clock Hotel", address: "Corner of Foveaux and Riley Street, Surry Hills, NSW, 2010"}), | |
theBestDay.widget.createPlaceChoice({name: "Forresters", address: "470 Crown Street, Surry Hills, NSW, 2010"}) | |
]; | |
var plan = theBestDay.widget.createPlan({ | |
title: 'Brunswick Street Pub Crawl', | |
description: 'TheBestDay team toured Melbourne recently and found ourselves schooner deep in pub crawl heaven.', | |
places: places, | |
times: times | |
}); | |
theBestDay.widget.openModal({ | |
iframeUrl: '/iframe', | |
plan: plan, | |
onCancel: function() { | |
alert('Cancel'); | |
}, | |
onComplete: function() { | |
alert('Complete'); | |
}, | |
}); | |
} | |
var btn = document.getElementById('tbd-btn-1'); | |
if (btn.addEventListener) { | |
btn.addEventListener('click', openModal); | |
} else { | |
btn.attachEvent('onclick', openModal); | |
} | |
})(); | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
(function() { | |
'use strict'; | |
var openModal = function() { | |
var times = [ | |
new theBestDay.widget.TimeChoice({start: 1410401585, timezone: 'Australia/Sydney'}), | |
new theBestDay.widget.TimeChoice({start: 1410574428, timezone: 'Australia/Sydney'}) | |
]; | |
var places = [ | |
new theBestDay.widget.PlaceChoice({name: "The Clock Hotel", address: "Corner of Foveaux and Riley Street, Surry Hills, NSW, 2010"}), | |
new theBestDay.widget.PlaceChoice({name: "Forresters", address: "470 Crown Street, Surry Hills, NSW, 2010"}) | |
]; | |
var plan = new theBestDay.widget.Plan({ | |
title: 'Brunswick Street Pub Crawl', | |
description: 'TheBestDay team toured Melbourne recently and found ourselves schooner deep in pub crawl heaven.', | |
places: places, | |
times: times | |
}); | |
var modal = new theBestDay.widget.Modal(); | |
modal.open({ | |
iframeUrl: '/iframe', | |
plan: plan, | |
onCancel: function() { | |
alert('Cancel'); | |
}, | |
onComplete: function() { | |
alert('Complete'); | |
}, | |
}); | |
} | |
var btn = document.getElementById('tbd-btn-1'); | |
if (btn.addEventListener) { | |
btn.addEventListener('click', openModal); | |
} else { | |
btn.attachEvent('onclick', openModal); | |
} | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment