]> git.mxchange.org Git - friendica.git/commitdiff
frio:fix jot - posts with images were not available on wall
authorrabuzarus <>
Thu, 4 Aug 2016 12:33:08 +0000 (14:33 +0200)
committerrabuzarus <>
Thu, 4 Aug 2016 12:33:08 +0000 (14:33 +0200)
view/theme/frio/js/modal.js
view/theme/frio/templates/jot-header.tpl
view/theme/frio/templates/jot.tpl

index b29b8d4caa6638a383511a5c639bc7fb4ee75e1e..82b1ebdb919db133baade1a63cf15efc32f9e09e 100644 (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();
index 7c8d502de6c82b29ed189751183fc54cb7c337bd..792c1d1a3b57274113c266adf59655caab015094 100644 (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')
index 0d88472863714bf7b6be82e36ad6d670c5e17029..737ba3679d19f073f13e1759197853944fafefe8 100644 (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
                </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>
+                                               <!--<div id="profile-jot-desc" class="jothidden pull-right">&nbsp;</div>-->
+                                       </div>
 
-                       <div id="profile-jot-wrapper">
-                               <div>
-                                       <div id="character-counter" class="grey jothidden text-info pull-left"></div>
-                                       <!--<div id="profile-jot-desc" class="jothidden pull-right">&nbsp;</div>-->
-                               </div>
+                                       <div id="profile-jot-banner-end"></div>
+
+                                       {{* The hidden input fields which submit important values with the post *}}
+                                       <input type="hidden" name="type" value="{{$ptyp}}" />
+                                       <input type="hidden" name="profile_uid" value="{{$profile_uid}}" />
+                                       <input type="hidden" name="return" value="{{$return_path}}" />
+                                       <input type="hidden" name="location" id="jot-location" value="{{$defloc}}" />
+                                       <input type="hidden" name="coord" id="jot-coord" value="" />
+                                       <input type="hidden" name="post_id" value="{{$post_id}}" />
+                                       <input type="hidden" name="preview" id="jot-preview" value="0" />
+                                       <input type="hidden" name="post_id_random" value="{{$rand_num}}" />
+                                       {{if $notes_cid}}
+                                       <input type="hidden" name="contact_allow[]" value="<{{$notes_cid}}>" />
+                                       {{/if}}
+                                       <div id="jot-title-wrap"><input name="title" id="jot-title" class="jothidden jotforms form-control" type="text" placeholder="{{$placeholdertitle}}" title="{{$placeholdertitle}}" value="{{$title}}" style="display:block;" /></div>
+                                       {{if $placeholdercategory}}
+                                       <div id="jot-category-wrap"><input name="category" id="jot-category" class="jothidden jotforms form-control" type="text" placeholder="{{$placeholdercategory}}" title="{{$placeholdercategory}}" value="{{$category}}" /></div>
+                                       {{/if}}
+
+                                       {{* The jot text field in which the post text is inserted *}}
+                                       <div id="jot-text-wrap">
+                                       <textarea rows="2" cols="64" class="profile-jot-text form-control" id="profile-jot-text" name="body" onFocus="jotTextOpenUI(this);" onBlur="jotTextCloseUI(this);" style="min-width:100%; max-width:100%;">{{if $content}}{{$content}}{{else}}{{$share}}{{/if}}</textarea>
+                                       </div>
 
-                               <div id="profile-jot-banner-end"></div>
-
-                               {{* The hidden input fields which submit important values with the post *}}
-                               <input type="hidden" name="type" value="{{$ptyp}}" />
-                               <input type="hidden" name="profile_uid" value="{{$profile_uid}}" />
-                               <input type="hidden" name="return" value="{{$return_path}}" />
-                               <input type="hidden" name="location" id="jot-location" value="{{$defloc}}" />
-                               <input type="hidden" name="coord" id="jot-coord" value="" />
-                               <input type="hidden" name="post_id" value="{{$post_id}}" />
-                               <input type="hidden" name="preview" id="jot-preview" value="0" />
-                               <input type="hidden" name="post_id_random" value="{{$rand_num}}" />
-                               {{if $notes_cid}}
-                               <input type="hidden" name="contact_allow[]" value="<{{$notes_cid}}>" />
-                               {{/if}}
-                               <div id="jot-title-wrap"><input name="title" id="jot-title" class="jothidden jotforms form-control" type="text" placeholder="{{$placeholdertitle}}" title="{{$placeholdertitle}}" value="{{$title}}" style="display:block;" /></div>
-                               {{if $placeholdercategory}}
-                               <div id="jot-category-wrap"><input name="category" id="jot-category" class="jothidden jotforms form-control" type="text" placeholder="{{$placeholdercategory}}" title="{{$placeholdercategory}}" value="{{$category}}" /></div>
-                               {{/if}}
-
-                               {{* The jot text field in which the post text is inserted *}}
-                               <div id="jot-text-wrap">
-                               <textarea rows="2" cols="64" class="profile-jot-text form-control" id="profile-jot-text" name="body" onFocus="jotTextOpenUI(this);" onBlur="jotTextCloseUI(this);" style="min-width:100%; max-width:100%;">{{if $content}}{{$content}}{{else}}{{$share}}{{/if}}</textarea>
-                               </div>
+                                       <ul id="profile-jot-submit-wrapper" class="jothidden nav nav-pills">
+                                               {{* uncomment the button for "wall-immage-upload" because we have integrated it directly in the jot modal
+                                               <li><a href="#" id="wall-image-upload" title="{{$upload}}"><i class="fa fa-picture-o"></i></a></li>
+                                               *}}
+                                               <li><a href="#" onclick="return false;" id="wall-file-upload"  title="{{$attach}}"><i class="fa fa-paperclip"></i></a></li>
+                                               <li><a id="profile-link"  ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;" title="{{$weblink}}"><i class="fa fa-link"></i></a></li>
+                                               <li><a id="profile-video" onclick="jotVideoURL();return false;" title="{{$video}}"><i class="fa fa-film"></i></a></li>
+                                               <li><a id="profile-audio" onclick="jotAudioURL();return false;" title="{{$audio}}"><i class="fa fa-music"></i></a></li>
+                                               <li><a id="profile-location" onclick="jotGetLocation();return false;" title="{{$setloc}}"><i class="fa fa-map-marker"></i></a></li>
+                                               <!-- TODO: waiting for a better placement 
+                                               <li><a id="profile-nolocation" onclick="jotClearLocation();return false;" title="{{$noloc}}">{{$shortnoloc}}</a></li>
+                                               -->
+
+                                               <li class="pull-right"><button class="btn btn-primary" id="jot-submit" type="submit" id="profile-jot-submit" name="submit" ><i class="fa fa-slideshare fa-fw"></i> {{$share}}</button></li>
+                                               <div id="profile-rotator-wrapper" style="display: {{$visitor}};" >
+                                                       <img id="profile-rotator" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait}}" style="display: none;" />
+                                               </div> 
+                                               <div id="profile-jot-plugin-wrapper">
+                                                       {{$jotplugins}}
+                                               </div>
+                                       </ul>
 
-                               <ul id="profile-jot-submit-wrapper" class="jothidden nav nav-pills">
-                                       {{* uncomment the button for "wall-immage-upload" because we have integrated it directly in the jot modal
-                                       <li><a href="#" id="wall-image-upload" title="{{$upload}}"><i class="fa fa-picture-o"></i></a></li>
-                                       *}}
-                                       <li><a href="#" onclick="return false;" id="wall-file-upload"  title="{{$attach}}"><i class="fa fa-paperclip"></i></a></li>
-                                       <li><a id="profile-link"  ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;" title="{{$weblink}}"><i class="fa fa-link"></i></a></li>
-                                       <li><a id="profile-video" onclick="jotVideoURL();return false;" title="{{$video}}"><i class="fa fa-film"></i></a></li>
-                                       <li><a id="profile-audio" onclick="jotAudioURL();return false;" title="{{$audio}}"><i class="fa fa-music"></i></a></li>
-                                       <li><a id="profile-location" onclick="jotGetLocation();return false;" title="{{$setloc}}"><i class="fa fa-map-marker"></i></a></li>
-                                       <!-- TODO: waiting for a better placement 
-                                       <li><a id="profile-nolocation" onclick="jotClearLocation();return false;" title="{{$noloc}}">{{$shortnoloc}}</a></li>
-                                       -->
-
-                                       <li class="pull-right"><button class="btn btn-primary" id="jot-submit" type="submit" id="profile-jot-submit" name="submit" ><i class="fa fa-slideshare fa-fw"></i> {{$share}}</button></li>
-                                       <div id="profile-rotator-wrapper" style="display: {{$visitor}};" >
-                                               <img id="profile-rotator" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait}}" style="display: none;" />
-                                       </div> 
-                                       <div id="profile-jot-plugin-wrapper">
-                                               {{$jotplugins}}
-                                       </div>
-                               </ul>
-                       </div>
+                               </div>
 
-                       <div id="profile-jot-acl-wrapper" style="display: none;">
-                               {{$acl}}
-                       </div>
+                               <div id="profile-jot-acl-wrapper" style="display: none;">
+                                       {{$acl}}
+                               </div>
 
-                       <div id="jot-preview-content" style="display:none;"></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>