mirror of
https://github.com/friendica/friendica
synced 2025-01-11 06:44:44 +00:00
Merge pull request #4884 from rabuzarus/20180421_-_fix_image_upload_for_msg
frio - fix image upload for prv messages
This commit is contained in:
commit
d08ddaa116
7 changed files with 19 additions and 8 deletions
|
@ -2409,10 +2409,13 @@ ul li:hover .contact-wrapper .contact-action-link:hover {
|
||||||
height: 48px;
|
height: 48px;
|
||||||
width: 48px;
|
width: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#prvmail-end {
|
#prvmail-end {
|
||||||
clear:both;
|
clear:both;
|
||||||
}
|
}
|
||||||
|
#modal #prvmail-text-edit-bb .bb-img {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* photos */
|
/* photos */
|
||||||
.photo-album-actions {
|
.photo-album-actions {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
|
@ -231,7 +231,6 @@ var FileBrowser = {
|
||||||
$(".fbrowser .fbswitcher [data-mode=" + FileBrowser.type + "]").addClass("active");
|
$(".fbrowser .fbswitcher [data-mode=" + FileBrowser.type + "]").addClass("active");
|
||||||
// We need to add the AjaxUpload to the button
|
// We need to add the AjaxUpload to the button
|
||||||
FileBrowser.uploadButtons();
|
FileBrowser.uploadButtons();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Load new content (e.g. change photo album)
|
// Load new content (e.g. change photo album)
|
||||||
|
|
|
@ -152,6 +152,7 @@ Dialog._load = function(url) {
|
||||||
var jsbrowser = function() {
|
var jsbrowser = function() {
|
||||||
FileBrowser.init(nickname, type, hash);
|
FileBrowser.init(nickname, type, hash);
|
||||||
};
|
};
|
||||||
|
loadScript("view/js/ajaxupload.js");
|
||||||
loadScript("view/theme/frio/js/filebrowser.js", jsbrowser);
|
loadScript("view/theme/frio/js/filebrowser.js", jsbrowser);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -446,8 +446,16 @@ function justifyPhotosAjax() {
|
||||||
$('#photo-album-contents').justifiedGallery('norewind').on('jg.complete', function(e){ justifiedGalleryActive = false; });
|
$('#photo-album-contents').justifiedGallery('norewind').on('jg.complete', function(e){ justifiedGalleryActive = false; });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load a js script to the html head.
|
||||||
function loadScript(url, callback) {
|
function loadScript(url, callback) {
|
||||||
// Adding the script tag to the head as suggested before
|
// Check if the script is already in the html head.
|
||||||
|
var oscript = $('head script[src="' + url + '"]');
|
||||||
|
|
||||||
|
// Delete the old script from head.
|
||||||
|
if (oscript.length > 0) {
|
||||||
|
oscript.remove();
|
||||||
|
}
|
||||||
|
// Adding the script tag to the head as suggested before.
|
||||||
var head = document.getElementsByTagName('head')[0];
|
var head = document.getElementsByTagName('head')[0];
|
||||||
var script = document.createElement('script');
|
var script = document.createElement('script');
|
||||||
script.type = 'text/javascript';
|
script.type = 'text/javascript';
|
||||||
|
@ -458,7 +466,7 @@ function loadScript(url, callback) {
|
||||||
script.onreadystatechange = callback;
|
script.onreadystatechange = callback;
|
||||||
script.onload = callback;
|
script.onload = callback;
|
||||||
|
|
||||||
// Fire the loading
|
// Fire the loading.
|
||||||
head.appendChild(script);
|
head.appendChild(script);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<ul class="comment-edit-bb-{{$id}} comment-icon-list nav nav-pills pull-right">
|
<ul class="comment-edit-bb-{{$id}} comment-icon-list nav nav-pills pull-right">
|
||||||
<li>
|
<li>
|
||||||
<button type="button" class="btn-link icon" style="cursor: pointer;" aria-label="{{$edimg}}" title="{{$edimg}}" data-role="insert-formatting" data-bbcode="img" data-id="{{$id}}">
|
<button type="button" class="btn-link icon bb-img" style="cursor: pointer;" aria-label="{{$edimg}}" title="{{$edimg}}" data-role="insert-formatting" data-bbcode="img" data-id="{{$id}}">
|
||||||
<i class="fa fa-picture-o"></i>
|
<i class="fa fa-picture-o"></i>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
<ul id="event-desc-text-edit-bb" class="comment-edit-bb comment-icon-list nav nav-pills hidden-xs pull-left">
|
<ul id="event-desc-text-edit-bb" class="comment-edit-bb comment-icon-list nav nav-pills hidden-xs pull-left">
|
||||||
{{* commented out because it isn't implemented yet
|
{{* commented out because it isn't implemented yet
|
||||||
<li>
|
<li>
|
||||||
<button type="button" class="btn-link icon" style="cursor: pointer;" title="{{$edimg|escape:'html'}}" data-role="insert-formatting" data-comment=" " data-bbcode="img" data-id="desc">
|
<button type="button" class="btn-link icon bb-img" style="cursor: pointer;" title="{{$edimg|escape:'html'}}" data-role="insert-formatting" data-comment=" " data-bbcode="img" data-id="desc">
|
||||||
<i class="fa fa-picture-o"></i>
|
<i class="fa fa-picture-o"></i>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
<ul id="comment-tools-loc" class="comment-edit-bb comment-icon-list nav nav-pills hidden-xs pull-left">
|
<ul id="comment-tools-loc" class="comment-edit-bb comment-icon-list nav nav-pills hidden-xs pull-left">
|
||||||
{{* commented out because it isn't implemented yet
|
{{* commented out because it isn't implemented yet
|
||||||
<li>
|
<li>
|
||||||
<button type="button" class="btn-link icon" style="cursor: pointer;" title="{{$edimg|escape:'html'}}" data-role="insert-formatting" data-comment=" " data-bbcode="img" data-id="loc">
|
<button type="button" class="btn-link icon bb-img" style="cursor: pointer;" title="{{$edimg|escape:'html'}}" data-role="insert-formatting" data-comment=" " data-bbcode="img" data-id="loc">
|
||||||
<i class="fa fa-picture-o"></i>
|
<i class="fa fa-picture-o"></i>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
<ul id="prvmail-text-edit-bb" class="comment-edit-bb comment-icon-list nav nav-pills hidden-xs pull-left">
|
<ul id="prvmail-text-edit-bb" class="comment-edit-bb comment-icon-list nav nav-pills hidden-xs pull-left">
|
||||||
<li>
|
<li>
|
||||||
<button type="button" class="btn-link icon" style="cursor: pointer;" title="{{$edimg|escape:'html'}}" data-role="insert-formatting" data-comment=" " data-bbcode="img" data-id="input">
|
<button type="button" class="btn-link icon bb-img" style="cursor: pointer;" title="{{$edimg|escape:'html'}}" data-role="insert-formatting" data-comment=" " data-bbcode="img" data-id="input">
|
||||||
<i class="fa fa-picture-o" aria-hidden="true"></i>
|
<i class="fa fa-picture-o" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in a new issue