diff --git a/js/theme.js b/js/theme.js index 9a4d2987ba..57b67d2c7b 100644 --- a/js/theme.js +++ b/js/theme.js @@ -269,6 +269,25 @@ function loadModalTitle() { } } + +function addToModal(url) { + var url = url + '?mode=modal'; + var modal = $('#modal').modal(); + + modal + .find('#modal-body') + .load(url, function (responseText, textStatus) { + if ( textStatus === 'success' || + textStatus === 'notmodified') + { + modal.show(); + + //Get first h3 element and use it as title + loadModalTitle(); + } + }); +}; + function editpost(url) { var modal = $('#jot-modal').modal(); var url = url + " #profile-jot-form"; diff --git a/templates/search_item.tpl b/templates/search_item.tpl index 937dbc5ccf..c504a126a5 100644 --- a/templates/search_item.tpl +++ b/templates/search_item.tpl @@ -240,10 +240,6 @@