Added app.newTopic

Make a new topic from anywhere. #4223
v1.18.x
Timothy Fike 9 years ago
parent e3371eb7ab
commit c80bd0c413

@ -34,7 +34,9 @@ app.cacheBuster = null;
app.handleSearch();
}
handleNewTopic();
$('#content').on('click', '#new_topic', function(){
app.newTopic();
});
require(['components'], function(components) {
components.get('user/logout').on('click', app.logout);
@ -455,9 +457,8 @@ app.cacheBuster = null;
});
};
function handleNewTopic() {
$('#content').on('click', '#new_topic', function() {
var cid = ajaxify.data.cid;
app.newTopic = function (cid) {
cid = cid || ajaxify.data.cid;
if (cid) {
$(window).trigger('action:composer.topic.new', {
cid: cid
@ -477,8 +478,7 @@ app.cacheBuster = null;
}
});
}
});
}
};
app.loadJQueryUI = function(callback) {
if (typeof $().autocomplete === 'function') {

Loading…
Cancel
Save