use modal for wall message

This commit is contained in:
rabuzarus 2016-04-17 01:13:56 +02:00
parent d9e2562f4b
commit 9dafe525c8
2 changed files with 18 additions and 17 deletions

View file

@ -56,22 +56,23 @@ $(document).ready(function(){
// Loading remote bootstrap remote modals
// This is uses to load tradional friendica pages into bootstrap modals
//
$('a[rel=modal]').on('click', function(evt) {
evt.preventDefault();
var modal = $('#modal').modal();
modal
.find('#modal-body')
.load($(this).attr("href"), function (responseText, textStatus) {
if ( textStatus === 'success' ||
textStatus === 'notmodified')
{
modal.show();
//Get first h3 element and use it as title
loadModalTitle();
}
});
});
// commentent out because we actually don't use it anymore
// $('a[rel=modal]').on('click', function(evt) {
// evt.preventDefault();
// var modal = $('#modal').modal();
// modal
// .find('#modal-body')
// .load($(this).attr("href"), function (responseText, textStatus) {
// if ( textStatus === 'success' ||
// textStatus === 'notmodified')
// {
// modal.show();
//
// //Get first h3 element and use it as title
// loadModalTitle();
// }
// });
// });
// Add Colorbox for viewing Network page images
//var cBoxClasses = new Array();

View file

@ -49,7 +49,7 @@
{{/if}}
{{if $wallmessage}}
<div id="wallmessage-link-botton">
<a id="wallmessage-link" class="btn btn-labeled btn-primary btn-sm" href="wallmessage/{{$profile.nickname}}">
<a id="wallmessage-link" class="btn btn-labeled btn-primary btn-sm" onclick="addToModal('wallmessage/{{$profile.nickname}}')">
<span class=""><i class="fa fa-envelope"></i></span>
<span class="">{{$wallmessage}}</span>
</a>