use modal for wall message
This commit is contained in:
parent
d9e2562f4b
commit
9dafe525c8
33
js/theme.js
33
js/theme.js
|
@ -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();
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue