added twitter intent, regarding issue #35

This commit is contained in:
Julian Lam
2013-06-24 17:05:23 -04:00
parent d0e5c0dcf1
commit bc2d7b7d0f
3 changed files with 15 additions and 8 deletions

View File

@@ -1,9 +1,15 @@
(function() {
var cid = templates.get('category_id'),
room = 'category_' + cid;
room = 'category_' + cid,
twitterEl = document.getElementById('twitter-intent'),
twitter_url = templates.get('twitter-intent-url');
app.enter_room(room);
twitterEl.addEventListener('click', function() {
window.open(twitter_url, '_blank', 'width=550,height=420,scrollbars=no,status=no');
}, false);
var new_post = document.getElementById('new_post');
new_post.onclick = function() {
require(['composer'], function(cmp) {