Added app.newTopic

Make a new topic from anywhere. #4223
This commit is contained in:
Timothy Fike
2016-02-19 19:23:18 -05:00
parent e3371eb7ab
commit c80bd0c413

View File

@@ -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') {