Merge pull request #2708 from rabuzarus/0407-frio-picture-wall-fix

frio:fix jot - posts with images were not available on wall
This commit is contained in:
Tobias Diekershoff 2016-08-04 14:57:15 +02:00 committed by GitHub
commit 3432268e80
3 changed files with 64 additions and 62 deletions

View file

@ -234,15 +234,15 @@ function editpost(url) {
}
var modal = $('#jot-modal').modal();
url = url + " #profile-jot-form";
url = url + " #jot-sections";
//var rand_num = random_digits(12);
$(".jot-nav .jot-perms-lnk").parent("li").addClass("hidden");
// For editpost we load the modal html form the edit page. So we would have two jot forms in
// For editpost we load the modal html of "jot-sections" of the edit page. So we would have two jot forms in
// the page html. To avoid js conflicts we store the original jot in the variable jotcache.
// After closing the modal original jot should be restored at its orginal position in the html structure.
jotcache = $("#jot-content > #profile-jot-form");
jotcache = $("#jot-content > #jot-sections");
// remove the original Jot as long as the edit Jot is open
jotcache.remove();

View file

@ -397,7 +397,7 @@ function enableOnUser(){
function jotShow() {
var modal = $('#jot-modal').modal();
jotcache = $("#profile-jot-form");
jotcache = $("#jot-sections");
modal
.find('#jot-modal-content')

View file

@ -4,7 +4,7 @@
<div id="jot-content">
<form id="profile-jot-form" action="{{$action}}" method="post">
<div id="jot-sections">
<div class="modal-header">
{{* Note: We need 2 modal close buttons here to bypass a bug in bootstrap.
The second is for mobile view. The first one doesnt work with dropdowns. To get a working close button
@ -35,7 +35,7 @@
</div>
<div id="jot-modal-body" class="modal-body">
<form id="profile-jot-form" action="{{$action}}" method="post">
<div id="profile-jot-wrapper">
<div>
<div id="character-counter" class="grey jothidden text-info pull-left"></div>
@ -87,6 +87,7 @@
{{$jotplugins}}
</div>
</ul>
</div>
<div id="profile-jot-acl-wrapper" style="display: none;">
@ -94,12 +95,13 @@
</div>
<div id="jot-preview-content" style="display:none;"></div>
</form>
<div id="jot-fbrowser-wrapper" style="display: none"></div>
{{if $content}}<script>initEditor();</script>{{/if}}
</div>
</form>
</div>
</div>