Move Browser & Upload to own namespace
This commit is contained in:
parent
051253a745
commit
50316bbb80
20 changed files with 77 additions and 121 deletions
|
@ -1563,10 +1563,10 @@ textarea.comment-edit-text:focus + .comment-edit-form .preview {
|
|||
max-height: calc(100vh - 220px);
|
||||
}
|
||||
}
|
||||
.fbrowser.photos .photo-album-image-wrapper {
|
||||
.fbrowser.photo .photo-album-image-wrapper {
|
||||
box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.fbrowser.photos .photo-album-image-wrapper .caption {
|
||||
.fbrowser.photo .photo-album-image-wrapper .caption {
|
||||
pointer-events: none;
|
||||
}
|
||||
.fbrowser .profile-rotator-wrapper {
|
||||
|
|
|
@ -82,7 +82,7 @@ $(document).ready(function () {
|
|||
});
|
||||
|
||||
// Insert filebrowser images into the input field (field_fileinput.tpl).
|
||||
$("body").on("fbrowser.photos.input", function (e, filename, embedcode, id, img) {
|
||||
$("body").on("fbrowser.photo.input", function (e, filename, embedcode, id, img) {
|
||||
// Select the clicked button by it's attribute.
|
||||
var elm = $("[image-input='select']");
|
||||
// Select the input field which belongs to this button.
|
||||
|
@ -137,7 +137,7 @@ Dialog._get_url = function (type, name, id) {
|
|||
|
||||
// Does load the filebrowser into the jot modal.
|
||||
Dialog.showJot = function () {
|
||||
var type = "photos";
|
||||
var type = "photo";
|
||||
var name = "main";
|
||||
|
||||
var url = Dialog._get_url(type, name);
|
||||
|
|
|
@ -109,7 +109,7 @@ var FileBrowser = {
|
|||
e.preventDefault();
|
||||
|
||||
let embed = '';
|
||||
if (FileBrowser.type === 'photos') {
|
||||
if (FileBrowser.type === 'photo') {
|
||||
embed = '[url=' + this.dataset.link + '][img=' + this.dataset.img + ']' + this.dataset.alt + '[/img][/url]';
|
||||
}
|
||||
if (FileBrowser.type === 'attachment') {
|
||||
|
@ -155,12 +155,12 @@ var FileBrowser = {
|
|||
|
||||
// Initialize the AjaxUpload for the upload buttons
|
||||
uploadButtons: function () {
|
||||
if ($('#upload-photos').length) {
|
||||
if ($('#upload-photo').length) {
|
||||
//AjaxUpload for photos
|
||||
new window.AjaxUpload(
|
||||
'upload-photos',
|
||||
'upload-photo',
|
||||
{
|
||||
action: 'profile/' + FileBrowser.nickname + '/photos/upload?response=json&album=' + encodeURIComponent(FileBrowser.folder),
|
||||
action: 'media/photo/upload?response=json&album=' + encodeURIComponent(FileBrowser.folder),
|
||||
name: 'userfile',
|
||||
responseType: 'json',
|
||||
onSubmit: function (file, ext) {
|
||||
|
@ -187,7 +187,7 @@ var FileBrowser = {
|
|||
new window.AjaxUpload(
|
||||
'upload-attachment',
|
||||
{
|
||||
action: 'profile/' + FileBrowser.nickname + '/attachment/upload?response=json',
|
||||
action: 'media/attachment/upload?response=json',
|
||||
name: 'userfile',
|
||||
responseType: 'json',
|
||||
onSubmit: function (file, ext) {
|
||||
|
@ -236,7 +236,7 @@ var FileBrowser = {
|
|||
|
||||
// Initialize justified Gallery
|
||||
initGallery: function () {
|
||||
$('.fbrowser.photos .fbrowser-content-container').justifiedGallery({
|
||||
$('.fbrowser.photo .fbrowser-content-container').justifiedGallery({
|
||||
rowHeight: 80,
|
||||
margins: 4,
|
||||
border: 0,
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
**/
|
||||
|
||||
/* callback */
|
||||
$('body').on('fbrowser.photos.main', function(e, filename, embedcode, id) {
|
||||
$('body').on('fbrowser.photo.main', function(e, filename, embedcode, id) {
|
||||
///@todo this part isn't ideal and need to be done in a better way
|
||||
jotTextOpenUI(document.getElementById("profile-jot-text"));
|
||||
jotActive();
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
{{* Switch between image and file mode *}}
|
||||
<div class="fbswitcher btn-group btn-group-xs pull-right" aria-label="Switch between photo and attachment mode">
|
||||
<button type="button" class="btn btn-default" data-mode="photos" aria-label="Photo Mode"><i class="fa fa-picture-o" aria-hidden="true"></i></button>
|
||||
<button type="button" class="btn btn-default" data-mode="photo" aria-label="Photo Mode"><i class="fa fa-picture-o" aria-hidden="true"></i></button>
|
||||
<button type="button" class="btn btn-default" data-mode="attachment" aria-label="Attachment Mode"><i class="fa fa-file-o" aria-hidden="true"></i></button>
|
||||
</div>
|
||||
</ol>
|
||||
|
|
|
@ -2517,15 +2517,15 @@ footer {
|
|||
.fbrowser .list {
|
||||
padding: 10px;
|
||||
}
|
||||
.fbrowser.photos .photo-album-image-wrapper {
|
||||
.fbrowser.photo .photo-album-image-wrapper {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
.fbrowser.photos a img {
|
||||
.fbrowser.photo a img {
|
||||
width: auto;
|
||||
height: 48px;
|
||||
}
|
||||
.fbrowser.photos a p {
|
||||
.fbrowser.photo a p {
|
||||
display: none;
|
||||
}
|
||||
.fbrowser.attachment .photo-album-image-wrapper {
|
||||
|
|
|
@ -2516,15 +2516,15 @@ footer {
|
|||
.fbrowser .list {
|
||||
padding: 10px;
|
||||
}
|
||||
.fbrowser.photos .photo-album-image-wrapper {
|
||||
.fbrowser.photo .photo-album-image-wrapper {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
.fbrowser.photos a img {
|
||||
.fbrowser.photo a img {
|
||||
width: auto;
|
||||
height: 48px;
|
||||
}
|
||||
.fbrowser.photos a p {
|
||||
.fbrowser.photo a p {
|
||||
display: none;
|
||||
}
|
||||
.fbrowser.attachment .photo-album-image-wrapper {
|
||||
|
|
|
@ -2516,15 +2516,15 @@ footer {
|
|||
.fbrowser .list {
|
||||
padding: 10px;
|
||||
}
|
||||
.fbrowser.photos .photo-album-image-wrapper {
|
||||
.fbrowser.photo .photo-album-image-wrapper {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
.fbrowser.photos a img {
|
||||
.fbrowser.photo a img {
|
||||
width: auto;
|
||||
height: 48px;
|
||||
}
|
||||
.fbrowser.photos a p {
|
||||
.fbrowser.photo a p {
|
||||
display: none;
|
||||
}
|
||||
.fbrowser.attachment .photo-album-image-wrapper {
|
||||
|
|
|
@ -1673,9 +1673,9 @@ footer { height: 100px; display: table-row; }
|
|||
}
|
||||
.fbrowser .folders ul { list-style: url("icons/folder.png"); padding-left: 22px;}
|
||||
.fbrowser .list { padding: 10px; }
|
||||
.fbrowser.photos .photo-album-image-wrapper { width: 48px; height: 48px; }
|
||||
.fbrowser.photos a img { width: auto; height: 48px; }
|
||||
.fbrowser.photos a p { display: none;}
|
||||
.fbrowser.photo .photo-album-image-wrapper { width: 48px; height: 48px; }
|
||||
.fbrowser.photo a img { width: auto; height: 48px; }
|
||||
.fbrowser.photo a p { display: none;}
|
||||
.fbrowser.attachment .photo-album-image-wrapper { float:none; white-space: nowrap; width: 100%; height: auto; }
|
||||
.fbrowser.attachment img { display: inline; width: 16px; height: 16px}
|
||||
.fbrowser.attachment p { display: inline; white-space: nowrap; }
|
||||
|
|
|
@ -3261,7 +3261,7 @@ img.photo-album-photo {
|
|||
}
|
||||
|
||||
/* upload/select popup */
|
||||
fbrowser.photos .photo-album-image-wrapper { margin-left: 10px; }
|
||||
fbrowser.photo .photo-album-image-wrapper { margin-left: 10px; }
|
||||
#message-preview { margin-top: 15px; }
|
||||
#message-preview span { width: 100%; }
|
||||
#message-preview .mail-count, #message-preview .mail-delete { display:none; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue