frio: formating, otherwise untouched

This commit is contained in:
Extarys 2021-01-22 08:38:44 -05:00
parent cb24e8987c
commit 91d3e72be7
25 changed files with 3300 additions and 2937 deletions

View file

@ -13,9 +13,21 @@ This file applies Font Awesome icons to some friendica standard classes
font-size: 1.4em; font-size: 1.4em;
} }
/* media icons */ /* media icons */
.icon.type-image:before { content: "\f1c5"; } .icon.type-image:before {
.icon.type-video:before { content: "\f1c8"; } content: "\f1c5";
.icon.type-audio:before { content: "\f1c7"; } }
.icon.type-text:before { content: "\f0f6"; } .icon.type-video:before {
.icon.type-application:before { content: "\f016"; } content: "\f1c8";
.icon.type-unkn:before { content: "\f016"; } }
.icon.type-audio:before {
content: "\f1c7";
}
.icon.type-text:before {
content: "\f0f6";
}
.icon.type-application:before {
content: "\f016";
}
.icon.type-unkn:before {
content: "\f016";
}

View file

@ -1,4 +1,3 @@
.hovercard { .hovercard {
position: absolute; position: absolute;
top: 0; top: 0;
@ -202,7 +201,6 @@
text-decoration: none !important; text-decoration: none !important;
} }
/* Basic hovercard */ /* Basic hovercard */
.basic-content { .basic-content {
padding: 9px; padding: 9px;
@ -285,7 +283,6 @@
.hover-card-header h4 { .hover-card-header h4 {
display: block; display: block;
} }
.hover-card-header h4 a { .hover-card-header h4 a {

View file

@ -1,17 +1,33 @@
#adminpage.adminpage > h1 { padding: 0 15px; } #adminpage.adminpage > h1 {
padding: 0 15px;
}
#users th:first-of-type { width: 1em; } #users th:first-of-type {
#users th:nth-of-type(2) { width: 40px; } width: 1em;
#users th:last-of-type { width: 1em; } }
.admin-settings-footer-elements { padding-left: 8px; padding-right: 8px; } #users th:nth-of-type(2) {
width: 40px;
}
#users th:last-of-type {
width: 1em;
}
.admin-settings-footer-elements {
padding-left: 8px;
padding-right: 8px;
}
#deleted th:first-of-type { width: 40px; } #deleted th:first-of-type {
width: 40px;
}
#users img.avatar-nano, #users img.avatar-nano,
#deleted img.avatar-nano { #deleted img.avatar-nano {
height: 24px; width: 24px; height: 24px;
width: 24px;
}
.opened .caret {
transform: rotate(180deg);
} }
.opened .caret { transform: rotate(180deg); }
tr.details td, tr.details td,
tr.details th { tr.details th {
border-top: 0 !important; border-top: 0 !important;
@ -21,4 +37,6 @@ tr.details th {
.adminpage th > .checkbox { .adminpage th > .checkbox {
margin: 0; margin: 0;
} }
.adminpage td { word-break: break-all; } .adminpage td {
word-break: break-all;
}

File diff suppressed because it is too large Load diff

View file

@ -1,51 +1,53 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later
$(function () { $(function () {
// Jot attachment live preview. // Jot attachment live preview.
let $textarea = $('textarea[name=body]'); let $textarea = $("textarea[name=body]");
$textarea.linkPreview(); $textarea.linkPreview();
$textarea.keyup(function () { $textarea.keyup(function () {
var textlen = $(this).val().length; var textlen = $(this).val().length;
$('#character-counter').text(textlen); $("#character-counter").text(textlen);
}); });
$textarea.editor_autocomplete(baseurl + '/search/acl'); $textarea.editor_autocomplete(baseurl + "/search/acl");
$textarea.bbco_autocomplete('bbcode'); $textarea.bbco_autocomplete("bbcode");
let location_button = document.getElementById('profile-location'); let location_button = document.getElementById("profile-location");
let location_input = document.getElementById('jot-location'); let location_input = document.getElementById("jot-location");
if (location_button && location_input) { if (location_button && location_input) {
updateLocationButtonDisplay(location_button, location_input); updateLocationButtonDisplay(location_button, location_input);
location_input.addEventListener('change', function () { location_input.addEventListener("change", function () {
updateLocationButtonDisplay(location_button, location_input); updateLocationButtonDisplay(location_button, location_input);
}); });
location_input.addEventListener('keyup', function () { location_input.addEventListener("keyup", function () {
updateLocationButtonDisplay(location_button, location_input); updateLocationButtonDisplay(location_button, location_input);
}); });
location_button.addEventListener('click', function() { location_button.addEventListener("click", function () {
if (location_input.value) { if (location_input.value) {
location_input.value = ''; location_input.value = "";
updateLocationButtonDisplay(location_button, location_input); updateLocationButtonDisplay(location_button, location_input);
} else if ("geolocation" in navigator) { } else if ("geolocation" in navigator) {
navigator.geolocation.getCurrentPosition(function(position) { navigator.geolocation.getCurrentPosition(
location_input.value = position.coords.latitude + ', ' + position.coords.longitude; function (position) {
location_input.value = position.coords.latitude + ", " + position.coords.longitude;
updateLocationButtonDisplay(location_button, location_input); updateLocationButtonDisplay(location_button, location_input);
}, function (error) { },
function (error) {
location_button.disabled = true; location_button.disabled = true;
updateLocationButtonDisplay(location_button, location_input); updateLocationButtonDisplay(location_button, location_input);
}); },
);
} }
}); });
} }
}); });
function updateLocationButtonDisplay(location_button, location_input) function updateLocationButtonDisplay(location_button, location_input) {
{ location_button.classList.remove("btn-primary");
location_button.classList.remove('btn-primary');
if (location_input.value) { if (location_input.value) {
location_button.disabled = false; location_button.disabled = false;
location_button.classList.add('btn-primary'); location_button.classList.add("btn-primary");
location_button.title = location_button.dataset.titleClear; location_button.title = location_button.dataset.titleClear;
} else if (!"geolocation" in navigator) { } else if (!"geolocation" in navigator) {
location_button.disabled = true; location_button.disabled = true;

View file

@ -1,36 +1,42 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later
$(document).ready(function () { $(document).ready(function () {
// Go to the permissions tab if the checkbox is checked. // Go to the permissions tab if the checkbox is checked.
$('body').on("click", "#id_share", function() { $("body")
if ($('#id_share').is(':checked') && !( $('#id_share').attr("disabled"))) { .on("click", "#id_share", function () {
$('#acl-wrapper').show(); if ($("#id_share").is(":checked") && !$("#id_share").attr("disabled")) {
$("#acl-wrapper").show();
$("a#event-perms-lnk").parent("li").show(); $("a#event-perms-lnk").parent("li").show();
toggleEventNav("a#event-perms-lnk"); toggleEventNav("a#event-perms-lnk");
eventAclActive(); eventAclActive();
} } else {
else { $("#acl-wrapper").hide();
$('#acl-wrapper').hide();
$("a#event-perms-lnk").parent("li").hide(); $("a#event-perms-lnk").parent("li").hide();
} }
}).trigger('change'); })
.trigger("change");
// Disable the finish time input if the user disable it. // Disable the finish time input if the user disable it.
$('body').on("change", "#id_nofinish", function() { $("body")
enableDisableFinishDate() .on("change", "#id_nofinish", function () {
}).trigger('change'); enableDisableFinishDate();
})
.trigger("change");
// JS for the permission section. // JS for the permission section.
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { $("#contact_allow, #contact_deny, #group_allow, #group_deny")
.change(function () {
var selstr; var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { $(
"#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected",
).each(function () {
selstr = $(this).html(); selstr = $(this).html();
$('#jot-public').hide(); $("#jot-public").hide();
}); });
if (selstr == null) { if (selstr == null) {
$('#jot-public').show(); $("#jot-public").show();
} }
})
}).trigger('change'); .trigger("change");
// Change the event nav menu.tabs on click. // Change the event nav menu.tabs on click.
$("body").on("click", "#event-nav > li > a", function (e) { $("body").on("click", "#event-nav > li > a", function (e) {
@ -46,7 +52,7 @@ $(document).ready(function() {
// Clear some elements (e.g. the event-preview container) when // Clear some elements (e.g. the event-preview container) when
// selecting a event nav link so it don't appear more than once. // selecting a event nav link so it don't appear more than once.
$('body').on("click", "#event-nav a", function(e) { $("body").on("click", "#event-nav a", function (e) {
$("#event-preview").empty(); $("#event-preview").empty();
e.preventDefault(); e.preventDefault();
}); });
@ -55,14 +61,13 @@ $(document).ready(function() {
// Load the html of the actual event and incect the output to the // Load the html of the actual event and incect the output to the
// event-edit section. // event-edit section.
function doEventPreview() { function doEventPreview() {
$('#event-edit-preview').val(1); $("#event-edit-preview").val(1);
$.post('events',$('#event-edit-form').serialize(), function(data) { $.post("events", $("#event-edit-form").serialize(), function (data) {
$("#event-preview").append(data); $("#event-preview").append(data);
}); });
$('#event-edit-preview').val(0); $("#event-edit-preview").val(0);
} }
// The following functions show/hide the specific event-edit content // The following functions show/hide the specific event-edit content
// in dependence of the selected nav. // in dependence of the selected nav.
function eventAclActive() { function eventAclActive() {
@ -70,7 +75,6 @@ function eventAclActive() {
$("#event-acl-wrapper").show(); $("#event-acl-wrapper").show();
} }
function eventPreviewActive() { function eventPreviewActive() {
$("#event-acl-wrapper, #event-edit-wrapper, #event-desc-wrapper").hide(); $("#event-acl-wrapper, #event-edit-wrapper, #event-desc-wrapper").hide();
$("#event-preview").show(); $("#event-preview").show();
@ -99,13 +103,9 @@ function toggleEventNav (elm) {
$(elm).parent("li").addClass("active"); $(elm).parent("li").addClass("active");
} }
// Disable the input for the finish date if it is not available. // Disable the input for the finish date if it is not available.
function enableDisableFinishDate() { function enableDisableFinishDate() {
if( $('#id_nofinish').is(':checked')) if ($("#id_nofinish").is(":checked")) $("#id_finish_text").prop("disabled", true);
$('#id_finish_text').prop("disabled", true); else $("#id_finish_text").prop("disabled", false);
else
$('#id_finish_text').prop("disabled", false);
} }
// @license-end // @license-end

View file

@ -52,7 +52,6 @@
* }); * });
**/ **/
/* /*
* IMPORTANT * IMPORTANT
* *
@ -64,7 +63,6 @@
* *
*/ */
var FileBrowser = { var FileBrowser = {
nickname: "", nickname: "",
type: "", type: "",
@ -86,7 +84,7 @@ var FileBrowser = {
// Get the comment textimput field // Get the comment textimput field
var commentElm = document.getElementById("comment-edit-text-" + FileBrowser.id); var commentElm = document.getElementById("comment-edit-text-" + FileBrowser.id);
} }
}; }
console.log("FileBrowser: " + nickname, type, FileBrowser.event, FileBrowser.id); console.log("FileBrowser: " + nickname, type, FileBrowser.event, FileBrowser.id);
@ -100,14 +98,20 @@ var FileBrowser = {
// Click on album link // Click on album link
$(".fbrowser").on("click", ".folders a, .path a", function (e) { $(".fbrowser").on("click", ".folders a, .path a", function (e) {
e.preventDefault(); e.preventDefault();
var url = baseurl + "/fbrowser/" + FileBrowser.type + "/" + encodeURIComponent(this.dataset.folder) + "?mode=none&theme=frio"; var url =
baseurl +
"/fbrowser/" +
FileBrowser.type +
"/" +
encodeURIComponent(this.dataset.folder) +
"?mode=none&theme=frio";
FileBrowser.folder = this.dataset.folder; FileBrowser.folder = this.dataset.folder;
FileBrowser.loadContent(url); FileBrowser.loadContent(url);
}); });
//Embed on click //Embed on click
$(".fbrowser").on('click', ".photo-album-photo-link", function(e) { $(".fbrowser").on("click", ".photo-album-photo-link", function (e) {
e.preventDefault(); e.preventDefault();
var embed = ""; var embed = "";
@ -123,36 +127,34 @@ var FileBrowser = {
// Note: not the best solution but function commentOpenUI don't // Note: not the best solution but function commentOpenUI don't
// work as expected (we need a way to wait until commentOpenUI would be finished). // work as expected (we need a way to wait until commentOpenUI would be finished).
// As for now we insert pieces of this function here // As for now we insert pieces of this function here
if ((commentElm !== null) && (typeof commentElm !== "undefined")) { if (commentElm !== null && typeof commentElm !== "undefined") {
if (commentElm.value === "") { if (commentElm.value === "") {
$("#comment-edit-text-" + FileBrowser.id).addClass("comment-edit-text-full").removeClass("comment-edit-text-empty"); $("#comment-edit-text-" + FileBrowser.id)
.addClass("comment-edit-text-full")
.removeClass("comment-edit-text-empty");
$("#comment-edit-submit-wrapper-" + FileBrowser.id).show(); $("#comment-edit-submit-wrapper-" + FileBrowser.id).show();
$("#comment-edit-text-" + FileBrowser.id).attr('tabindex','9'); $("#comment-edit-text-" + FileBrowser.id).attr("tabindex", "9");
$("#comment-edit-submit-" + FileBrowser.id).attr('tabindex','10'); $("#comment-edit-submit-" + FileBrowser.id).attr("tabindex", "10");
} }
} }
console.log(FileBrowser.event, this.dataset.filename, embed, FileBrowser.id); console.log(FileBrowser.event, this.dataset.filename, embed, FileBrowser.id);
$("body").trigger(FileBrowser.event, [ $("body").trigger(FileBrowser.event, [this.dataset.filename, embed, FileBrowser.id, this.dataset.img]);
this.dataset.filename,
embed,
FileBrowser.id,
this.dataset.img
]);
// Close model // Close model
$('#modal').modal('hide'); $("#modal").modal("hide");
// Update autosize for this textarea // Update autosize for this textarea
autosize.update($(".text-autosize")); autosize.update($(".text-autosize"));
}); });
// EventListener for switching between image and file mode // EventListener for switching between image and file mode
$(".fbrowser").on('click', ".fbswitcher .btn", function(e) { $(".fbrowser").on("click", ".fbswitcher .btn", function (e) {
e.preventDefault(); e.preventDefault();
FileBrowser.type = this.getAttribute("data-mode"); FileBrowser.type = this.getAttribute("data-mode");
$(".fbrowser").removeClass().addClass("fbrowser " + FileBrowser.type); $(".fbrowser")
.removeClass()
.addClass("fbrowser " + FileBrowser.type);
url = baseurl + "/fbrowser/" + FileBrowser.type + "?mode=none&theme=frio"; url = baseurl + "/fbrowser/" + FileBrowser.type + "?mode=none&theme=frio";
FileBrowser.loadContent(url); FileBrowser.loadContent(url);
@ -163,49 +165,56 @@ var FileBrowser = {
uploadButtons: function () { uploadButtons: function () {
if ($("#upload-image").length) { if ($("#upload-image").length) {
//AjaxUpload for images //AjaxUpload for images
var image_uploader = new window.AjaxUpload( var image_uploader = new window.AjaxUpload("upload-image", {
'upload-image', action:
{ "wall_upload/" +
action: 'wall_upload/' + FileBrowser.nickname + '?response=json&album=' + encodeURIComponent(FileBrowser.folder), FileBrowser.nickname +
name: 'userfile', "?response=json&album=" +
responseType: 'json', encodeURIComponent(FileBrowser.folder),
name: "userfile",
responseType: "json",
onSubmit: function (file, ext) { onSubmit: function (file, ext) {
$(".fbrowser-content").hide(); $(".fbrowser-content").hide();
$(".fbrowser .profile-rotator-wrapper").show(); $(".fbrowser .profile-rotator-wrapper").show();
$(".error").addClass('hidden'); $(".error").addClass("hidden");
}, },
onComplete: function (file, response) { onComplete: function (file, response) {
if (response['error'] != undefined) { if (response["error"] != undefined) {
$(".error span").html(response['error']); $(".error span").html(response["error"]);
$(".error").removeClass('hidden'); $(".error").removeClass("hidden");
$(".fbrowser .profile-rotator-wrapper").hide(); $(".fbrowser .profile-rotator-wrapper").hide();
$(".fbrowser-content").show(); $(".fbrowser-content").show();
return; return;
} }
// load new content to fbrowser window // load new content to fbrowser window
FileBrowser.loadContent(baseurl + '/fbrowser/' + FileBrowser.type + '/' + encodeURIComponent(FileBrowser.folder) + '?mode=none&theme=frio'); FileBrowser.loadContent(
} baseurl +
} "/fbrowser/" +
FileBrowser.type +
"/" +
encodeURIComponent(FileBrowser.folder) +
"?mode=none&theme=frio",
); );
},
});
} }
if ($("#upload-file").length) { if ($("#upload-file").length) {
//AjaxUpload for files //AjaxUpload for files
var file_uploader = new window.AjaxUpload( var file_uploader = new window.AjaxUpload("upload-file", {
'upload-file', action: "wall_attach/" + FileBrowser.nickname + "?response=json",
{ action: 'wall_attach/' + FileBrowser.nickname + '?response=json', name: "userfile",
name: 'userfile',
onSubmit: function (file, ext) { onSubmit: function (file, ext) {
$(".fbrowser-content").hide(); $(".fbrowser-content").hide();
$(".fbrowser .profile-rotator-wrapper").show(); $(".fbrowser .profile-rotator-wrapper").show();
$(".error").addClass('hidden'); $(".error").addClass("hidden");
}, },
onComplete: function (file, response) { onComplete: function (file, response) {
if (response['error']!= undefined) { if (response["error"] != undefined) {
$(".error span").html(response['error']); $(".error span").html(response["error"]);
$(".error").removeClass('hidden'); $(".error").removeClass("hidden");
$('#profile-rotator').hide(); $("#profile-rotator").hide();
$(".fbrowser-content").show(); $(".fbrowser-content").show();
return; return;
} }
@ -213,9 +222,8 @@ var FileBrowser = {
var url = baseurl + "/fbrowser/" + FileBrowser.type + "?mode=none&theme=frio"; var url = baseurl + "/fbrowser/" + FileBrowser.type + "?mode=none&theme=frio";
// Load new content to fbrowser window // Load new content to fbrowser window
FileBrowser.loadContent(url); FileBrowser.loadContent(url);
} },
} });
);
} }
}, },
@ -236,7 +244,7 @@ var FileBrowser = {
// load new content to fbrowser window // load new content to fbrowser window
$(".fbrowser").load(url, function (responseText, textStatus) { $(".fbrowser").load(url, function (responseText, textStatus) {
$(".profile-rotator-wrapper").hide(); $(".profile-rotator-wrapper").hide();
if (textStatus === 'success') { if (textStatus === "success") {
$(".fbrowser_content").show(); $(".fbrowser_content").show();
FileBrowser.postLoad(); FileBrowser.postLoad();
} }
@ -246,10 +254,10 @@ var FileBrowser = {
// Initialize justified Gallery // Initialize justified Gallery
initGallery: function () { initGallery: function () {
$(".fbrowser.image .fbrowser-content-container").justifiedGallery({ $(".fbrowser.image .fbrowser-content-container").justifiedGallery({
'rowHeight': 80, rowHeight: 80,
'margins': 4, margins: 4,
'border': 0 border: 0,
}); });
} },
}; };
// @license-end // @license-end

View file

@ -9,16 +9,16 @@
* *
*/ */
$(document).ready(function () { $(document).ready(function () {
let $body = $('body'); let $body = $("body");
// Prevents normal click action on click hovercard elements // Prevents normal click action on click hovercard elements
$body.on('click', '.userinfo.click-card', function (e) { $body.on("click", ".userinfo.click-card", function (e) {
e.preventDefault(); e.preventDefault();
}); });
// This event listener needs to be declared before the one that removes // This event listener needs to be declared before the one that removes
// all cards so that we can stop the immediate propagation of the event // all cards so that we can stop the immediate propagation of the event
// Since the manual popover appears instantly and the hovercard removal is // Since the manual popover appears instantly and the hovercard removal is
// on a 100ms delay, leaving event propagation immediately hides any click hovercard // on a 100ms delay, leaving event propagation immediately hides any click hovercard
$body.on('mousedown', '.userinfo.click-card', function (e) { $body.on("mousedown", ".userinfo.click-card", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
let timeNow = new Date().getTime(); let timeNow = new Date().getTime();
@ -26,14 +26,14 @@ $(document).ready(function () {
let targetElement = $(this); let targetElement = $(this);
// get href-attribute // get href-attribute
if (targetElement.is('[href]')) { if (targetElement.is("[href]")) {
contactUrl = targetElement.attr('href'); contactUrl = targetElement.attr("href");
} else { } else {
return true; return true;
} }
// no hovercard for anchor links // no hovercard for anchor links
if (contactUrl.substring(0, 1) === '#') { if (contactUrl.substring(0, 1) === "#") {
return true; return true;
} }
@ -41,59 +41,62 @@ $(document).ready(function () {
}); });
// hover cards should be removed very easily, e.g. when any of these events happens // hover cards should be removed very easily, e.g. when any of these events happens
$body.on('mouseleave touchstart scroll mousedown submit keydown', function (e) { $body.on("mouseleave touchstart scroll mousedown submit keydown", function (e) {
// remove hover card only for desktiop user, since on mobile we open the hovercards // remove hover card only for desktiop user, since on mobile we open the hovercards
// by click event insteadof hover // by click event insteadof hover
removeAllHovercards(e, new Date().getTime()); removeAllHovercards(e, new Date().getTime());
}); });
$body.on('mouseover', '.userinfo.hover-card, .wall-item-responses a, .wall-item-bottom .mention a', function (e) { $body
.on("mouseover", ".userinfo.hover-card, .wall-item-responses a, .wall-item-bottom .mention a", function (e) {
let timeNow = new Date().getTime(); let timeNow = new Date().getTime();
removeAllHovercards(e, timeNow); removeAllHovercards(e, timeNow);
let contactUrl = false; let contactUrl = false;
let targetElement = $(this); let targetElement = $(this);
// get href-attribute // get href-attribute
if (targetElement.is('[href]')) { if (targetElement.is("[href]")) {
contactUrl = targetElement.attr('href'); contactUrl = targetElement.attr("href");
} else { } else {
return true; return true;
} }
// no hover card if the element has the no-hover-card class // no hover card if the element has the no-hover-card class
if (targetElement.hasClass('no-hover-card')) { if (targetElement.hasClass("no-hover-card")) {
return true; return true;
} }
// no hovercard for anchor links // no hovercard for anchor links
if (contactUrl.substring(0, 1) === '#') { if (contactUrl.substring(0, 1) === "#") {
return true; return true;
} }
targetElement.attr('data-awaiting-hover-card', timeNow); targetElement.attr("data-awaiting-hover-card", timeNow);
// Delay until the hover-card does appear // Delay until the hover-card does appear
setTimeout(function () { setTimeout(function () {
if ( if (
targetElement.is(':hover') targetElement.is(":hover") &&
&& parseInt(targetElement.attr('data-awaiting-hover-card'), 10) === timeNow parseInt(targetElement.attr("data-awaiting-hover-card"), 10) === timeNow &&
&& $('.hovercard').length === 0 $(".hovercard").length === 0
) { ) {
openHovercard(targetElement, contactUrl, timeNow); openHovercard(targetElement, contactUrl, timeNow);
} }
}, 500); }, 500);
}).on('mouseleave', '.userinfo.hover-card, .wall-item-responses a, .wall-item-bottom .mention a', function (e) { // action when mouse leaves the hover-card })
.on("mouseleave", ".userinfo.hover-card, .wall-item-responses a, .wall-item-bottom .mention a", function (e) {
// action when mouse leaves the hover-card
removeAllHovercards(e, new Date().getTime()); removeAllHovercards(e, new Date().getTime());
}); });
// if we're hovering a hover card, give it a class, so we don't remove it // if we're hovering a hover card, give it a class, so we don't remove it
$body.on('mouseover', '.hovercard', function (e) { $body.on("mouseover", ".hovercard", function (e) {
$(this).addClass('dont-remove-card'); $(this).addClass("dont-remove-card");
}); });
$body.on('mouseleave', '.hovercard', function (e) { $body.on("mouseleave", ".hovercard", function (e) {
$(this).removeClass('dont-remove-card'); $(this).removeClass("dont-remove-card");
$(this).popover('hide'); $(this).popover("hide");
}); });
}); // End of $(document).ready }); // End of $(document).ready
@ -101,20 +104,20 @@ $(document).ready(function () {
function removeAllHovercards(event, priorTo) { function removeAllHovercards(event, priorTo) {
// don't remove hovercards until after 100ms, so user have time to move the cursor to it (which gives it the dont-remove-card class) // don't remove hovercards until after 100ms, so user have time to move the cursor to it (which gives it the dont-remove-card class)
setTimeout(function () { setTimeout(function () {
$.each($('.hovercard'), function () { $.each($(".hovercard"), function () {
let title = $(this).attr('data-orig-title'); let title = $(this).attr("data-orig-title");
// don't remove card if it was created after removeAllhoverCards() was called // don't remove card if it was created after removeAllhoverCards() was called
if ($(this).data('card-created') < priorTo) { if ($(this).data("card-created") < priorTo) {
// don't remove it if we're hovering it right now! // don't remove it if we're hovering it right now!
if (!$(this).hasClass('dont-remove-card')) { if (!$(this).hasClass("dont-remove-card")) {
let $handle = $('[data-hover-card-active="' + $(this).data('card-created') + '"]'); let $handle = $('[data-hover-card-active="' + $(this).data("card-created") + '"]');
$handle.removeAttr('data-hover-card-active'); $handle.removeAttr("data-hover-card-active");
// Restoring the popover handle title // Restoring the popover handle title
let title = $handle.attr('data-orig-title'); let title = $handle.attr("data-orig-title");
$handle.attr({'data-orig-title': '', title: title}); $handle.attr({ "data-orig-title": "", title: title });
$(this).popover('hide'); $(this).popover("hide");
} }
} }
}); });
@ -124,16 +127,17 @@ function removeAllHovercards(event, priorTo) {
function openHovercard(targetElement, contactUrl, timeNow) { function openHovercard(targetElement, contactUrl, timeNow) {
// store the title in a data attribute because Bootstrap // store the title in a data attribute because Bootstrap
// popover destroys the title attribute. // popover destroys the title attribute.
let title = targetElement.attr('title'); let title = targetElement.attr("title");
targetElement.attr({'data-orig-title': title, title: ''}); targetElement.attr({ "data-orig-title": title, title: "" });
// get an additional data atribute if the card is active // get an additional data atribute if the card is active
targetElement.attr('data-hover-card-active', timeNow); targetElement.attr("data-hover-card-active", timeNow);
// get the whole html content of the hover card and // get the whole html content of the hover card and
// push it to the bootstrap popover // push it to the bootstrap popover
getHoverCardContent(contactUrl, function (data) { getHoverCardContent(contactUrl, function (data) {
if (data) { if (data) {
targetElement.popover({ targetElement
.popover({
html: true, html: true,
placement: function () { placement: function () {
// Calculate the placement of the the hovercard (if top or bottom) // Calculate the placement of the the hovercard (if top or bottom)
@ -141,18 +145,22 @@ function openHovercard(targetElement, contactUrl, timeNow) {
// which triggers the hover-card // which triggers the hover-card
let get_position = $(targetElement).offset().top - $(window).scrollTop(); let get_position = $(targetElement).offset().top - $(window).scrollTop();
if (get_position < 270) { if (get_position < 270) {
return 'bottom'; return "bottom";
} }
return 'top'; return "top";
}, },
trigger: 'manual', trigger: "manual",
template: '<div class="popover hovercard" data-card-created="' + timeNow + '"><div class="arrow"></div><div class="popover-content hovercard-content"></div></div>', template:
'<div class="popover hovercard" data-card-created="' +
timeNow +
'"><div class="arrow"></div><div class="popover-content hovercard-content"></div></div>',
content: data, content: data,
container: 'body', container: "body",
sanitizeFn: function (content) { sanitizeFn: function (content) {
return DOMPurify.sanitize(content) return DOMPurify.sanitize(content);
}, },
}).popover('show'); })
.popover("show");
} }
}); });
} }
@ -176,7 +184,7 @@ function getHoverCardContent(contact_url, callback) {
} }
$.ajax({ $.ajax({
url: baseurl + '/contact/hovercard', url: baseurl + "/contact/hovercard",
data: postdata, data: postdata,
success: function (data, textStatus, request) { success: function (data, textStatus, request) {
getHoverCardContent.cache[nurl] = data; getHoverCardContent.cache[nurl] = data;

View file

@ -11,28 +11,28 @@ var linkPreview;
*/ */
function jotGetLink() { function jotGetLink() {
var currentText = $("#profile-jot-text").val(); var currentText = $("#profile-jot-text").val();
var noAttachment = ''; var noAttachment = "";
reply = prompt(aStr.linkurl); reply = prompt(aStr.linkurl);
if (reply && reply.length) { if (reply && reply.length) {
// There should be only one attachment per post. // There should be only one attachment per post.
// So we need to remove the old one. // So we need to remove the old one.
$('#jot-attachment-preview').empty(); $("#jot-attachment-preview").empty();
$('#profile-rotator').show(); $("#profile-rotator").show();
if (currentText.includes("[attachment") && currentText.includes("[/attachment]")) { if (currentText.includes("[attachment") && currentText.includes("[/attachment]")) {
noAttachment = '&noAttachment=1'; noAttachment = "&noAttachment=1";
} }
// We use the linkPreview library to have a preview // We use the linkPreview library to have a preview
// of the attachments. // of the attachments.
if (typeof linkPreview === 'object') { if (typeof linkPreview === "object") {
linkPreview.crawlText(reply + noAttachment); linkPreview.crawlText(reply + noAttachment);
// Fallback: insert the attachment bbcode directly into the textarea // Fallback: insert the attachment bbcode directly into the textarea
// if the attachment live preview isn't available // if the attachment live preview isn't available
} else { } else {
$.get('parse_url?binurl=' + bin2hex(reply) + noAttachment, function(data) { $.get("parse_url?binurl=" + bin2hex(reply) + noAttachment, function (data) {
addeditortext(data); addeditortext(data);
$('#profile-rotator').hide(); $("#profile-rotator").hide();
}); });
} }
autosize.update($("#profile-jot-text")); autosize.update($("#profile-jot-text"));

View file

@ -3,37 +3,35 @@
* Javascript for the admin module * Javascript for the admin module
*/ */
$(function () { $(function () {
let $body = $('body'); let $body = $("body");
$body.on('click', '.selectall', function() { $body.on("click", ".selectall", function () {
selectall($(this).data('selectAll')); selectall($(this).data("selectAll"));
}); });
$body.on('click', '.selectnone', function() { $body.on("click", ".selectnone", function () {
selectnone($(this).data('selectNone')); selectnone($(this).data("selectNone"));
}); });
// Toggle checkbox status to all or none for all checkboxes of a specific // Toggle checkbox status to all or none for all checkboxes of a specific
// css class. // css class.
$body.on('change', 'input[type=checkbox].selecttoggle', function() { $body.on("change", "input[type=checkbox].selecttoggle", function () {
$this = $(this); $this = $(this);
if ($this.prop('checked')) { if ($this.prop("checked")) {
selectall($this.data('selectClass')); selectall($this.data("selectClass"));
$this.attr('title', $this.data('selectNone')); $this.attr("title", $this.data("selectNone"));
} else { } else {
selectnone($this.data('selectClass')); selectnone($this.data("selectClass"));
$this.attr('title', $this.data('selectAll')); $this.attr("title", $this.data("selectAll"));
} }
}); });
function selectall(cls) { function selectall(cls) {
$('.' + cls).prop('checked', true); $("." + cls).prop("checked", true);
return false; return false;
} }
function selectnone(cls) { function selectnone(cls) {
$('.' + cls).prop('checked', false); $("." + cls).prop("checked", false);
return false; return false;
} }
}); });
// Users // Users

View file

@ -6,18 +6,16 @@ $(document).ready(function() {
// Initiale autosize for the textareas. // Initiale autosize for the textareas.
autosize($("textarea.text-autosize")); autosize($("textarea.text-autosize"));
// Replace the drop contact link of the photo menu // Replace the drop contact link of the photo menu
// with a confirmation modal. // with a confirmation modal.
$("body").on("click", ".contact-photo-menu a", function (e) { $("body").on("click", ".contact-photo-menu a", function (e) {
var photoMenuLink = $(this).attr('href'); var photoMenuLink = $(this).attr("href");
if (typeof photoMenuLink !== "undefined" && photoMenuLink.indexOf("/drop?confirm=1") !== -1) { if (typeof photoMenuLink !== "undefined" && photoMenuLink.indexOf("/drop?confirm=1") !== -1) {
e.preventDefault(); e.preventDefault();
addToModal(photoMenuLink); addToModal(photoMenuLink);
return false; return false;
} }
}); });
}); });
/** /**

View file

@ -8,6 +8,6 @@ var itemGuid = window.location.pathname.split("/").pop();
$(window).load(function () { $(window).load(function () {
// Scroll to the Item by its GUID // Scroll to the Item by its GUID
scrollToItem('item-' + itemGuid); scrollToItem("item-" + itemGuid);
}); });
// @license-end // @license-end

View file

@ -6,69 +6,80 @@
$(document).ready(function () { $(document).ready(function () {
// start the fullCalendar // start the fullCalendar
$('#events-calendar').fullCalendar({ $("#events-calendar").fullCalendar({
firstDay: aStr.firstDay, firstDay: aStr.firstDay,
monthNames: aStr['monthNames'], monthNames: aStr["monthNames"],
monthNamesShort: aStr['monthNamesShort'], monthNamesShort: aStr["monthNamesShort"],
dayNames: aStr['dayNames'], dayNames: aStr["dayNames"],
dayNamesShort: aStr['dayNamesShort'], dayNamesShort: aStr["dayNamesShort"],
allDayText: aStr.allday, allDayText: aStr.allday,
noEventsMessage: aStr.noevent, noEventsMessage: aStr.noevent,
buttonText: { buttonText: {
today: aStr.today, today: aStr.today,
month: aStr.month, month: aStr.month,
week: aStr.week, week: aStr.week,
day: aStr.day day: aStr.day,
}, },
events: baseurl + moduleUrl + '/json/', events: baseurl + moduleUrl + "/json/",
header: { header: {
left: '', left: "",
// center: 'title', // center: 'title',
right: '' right: "",
}, },
timeFormat: 'H:mm', timeFormat: "H:mm",
eventClick: function (calEvent, jsEvent, view) { eventClick: function (calEvent, jsEvent, view) {
showEvent(calEvent.id); showEvent(calEvent.id);
}, },
loading: function (isLoading, view) { loading: function (isLoading, view) {
if (!isLoading) { if (!isLoading) {
$('td.fc-day').dblclick(function() { addToModal('/events/new?start='+$(this).data('date')); }); $("td.fc-day").dblclick(function () {
addToModal("/events/new?start=" + $(this).data("date"));
});
} }
}, },
defaultView: 'month', defaultView: "month",
aspectRatio: 1, aspectRatio: 1,
eventRender: function (event, element, view) { eventRender: function (event, element, view) {
//console.log(view.name); //console.log(view.name);
switch (view.name) { switch (view.name) {
case "month": case "month":
element.find(".fc-title").html( element
.find(".fc-title")
.html(
"<span class='item-desc'>{2}</span>".format( "<span class='item-desc'>{2}</span>".format(
event.item['author-avatar'], event.item["author-avatar"],
event.item['author-name'], event.item["author-name"],
event.title, event.title,
event.item.desc, event.item.desc,
event.item.location event.item.location,
)); ),
);
break; break;
case "agendaWeek": case "agendaWeek":
if (event.item['author-name'] == null) return; if (event.item["author-name"] == null) return;
element.find(".fc-title").html( element
.find(".fc-title")
.html(
"<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format( "<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format(
event.item['author-avatar'], event.item["author-avatar"],
event.item['author-name'], event.item["author-name"],
event.item.desc, event.item.desc,
htmlToText(event.item.location) htmlToText(event.item.location),
)); ),
);
break; break;
case "agendaDay": case "agendaDay":
if (event.item['author-name'] == null) return; if (event.item["author-name"] == null) return;
element.find(".fc-title").html( element
.find(".fc-title")
.html(
"<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format( "<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format(
event.item['author-avatar'], event.item["author-avatar"],
event.item['author-name'], event.item["author-name"],
event.item.desc, event.item.desc,
htmlToText(event.item.location) htmlToText(event.item.location),
)); ),
);
break; break;
case "listMonth": case "listMonth":
element.find(".fc-list-item-title").html(formatListViewEvent(event)); element.find(".fc-list-item-title").html(formatListViewEvent(event));
@ -82,54 +93,53 @@ $(document).ready(function() {
html: true, html: true,
trigger: "hover", trigger: "hover",
placement: "auto", placement: "auto",
template: '<div class="popover hovercard event-card"><div class="arrow"></div><div class="popover-content hovercard-content"></div></div>', template:
'<div class="popover hovercard event-card"><div class="arrow"></div><div class="popover-content hovercard-content"></div></div>',
sanitizeFn: function (content) { sanitizeFn: function (content) {
return DOMPurify.sanitize(content) return DOMPurify.sanitize(content);
},
});
}, },
}); });
}
})
// center on date // center on date
var args = location.href.replace(baseurl, "").split("/"); var args = location.href.replace(baseurl, "").split("/");
if (modparams == 2) { if (modparams == 2) {
if (args.length >= 5) { if (args.length >= 5) {
$("#events-calendar").fullCalendar('gotoDate',args[3] , args[4]-1); $("#events-calendar").fullCalendar("gotoDate", args[3], args[4] - 1);
} }
} else { } else {
if (args.length >= 4) { if (args.length >= 4) {
$("#events-calendar").fullCalendar('gotoDate',args[2] , args[3]-1); $("#events-calendar").fullCalendar("gotoDate", args[2], args[3] - 1);
} }
} }
// echo the title // echo the title
var view = $('#events-calendar').fullCalendar('getView'); var view = $("#events-calendar").fullCalendar("getView");
$('#fc-title').text(view.title); $("#fc-title").text(view.title);
// show event popup // show event popup
var hash = location.hash.split("-") var hash = location.hash.split("-");
if (hash.length == 2 && hash[0] == "#link") showEvent(hash[1]); if (hash.length == 2 && hash[0] == "#link") showEvent(hash[1]);
}); });
// loads the event into a modal // loads the event into a modal
function showEvent(eventid) { function showEvent(eventid) {
addToModal(baseurl + moduleUrl + '/?id=' + eventid); addToModal(baseurl + moduleUrl + "/?id=" + eventid);
} }
function changeView(action, viewName) { function changeView(action, viewName) {
$('#events-calendar').fullCalendar(action, viewName); $("#events-calendar").fullCalendar(action, viewName);
var view = $('#events-calendar').fullCalendar('getView'); var view = $("#events-calendar").fullCalendar("getView");
$('#fc-title').text(view.title); $("#fc-title").text(view.title);
} }
// The template for the bootstrap popover for displaying the event title and // The template for the bootstrap popover for displaying the event title and
// author (it's the nearly the same template we use in frio for the contact // author (it's the nearly the same template we use in frio for the contact
// hover cards. So be careful when changing the css) // hover cards. So be careful when changing the css)
function eventHoverBodyTemplate() { function eventHoverBodyTemplate() {
var template = '\ var template =
'\
<div class="event-card-basic-content media">\ <div class="event-card-basic-content media">\
<div class="event-card-details">\ <div class="event-card-details">\
<div class="event-card-header">\ <div class="event-card-header">\
@ -154,13 +164,15 @@ function eventHoverBodyTemplate() {
// The template for presenting the event location in the event hover-card // The template for presenting the event location in the event hover-card
function eventHoverLocationTemplate() { function eventHoverLocationTemplate() {
var template = '<span role="presentation" aria-hidden="true"> · </span>\ var template =
'<span role="presentation" aria-hidden="true"> · </span>\
<span class="event-card-location"> {0}</span></div>'; <span class="event-card-location"> {0}</span></div>';
return template; return template;
} }
function eventHoverProfileNameTemplate() { function eventHoverProfileNameTemplate() {
var template = '\ var template =
'\
<div class="event-card-profile-name profile-entry-name">\ <div class="event-card-profile-name profile-entry-name">\
<a href="{0}" class="userinfo">{1}</a>\ <a href="{0}" class="userinfo">{1}</a>\
</div>'; </div>';
@ -168,23 +180,23 @@ function eventHoverProfileNameTemplate() {
} }
// transform the event data to html so we can use it in the event hover-card // transform the event data to html so we can use it in the event hover-card
function eventHoverHtmlContent(event) { function eventHoverHtmlContent(event) {
var eventLocation = ''; var eventLocation = "";
var eventProfileName = ''; var eventProfileName = "";
// Get the Browser language // Get the Browser language
var locale = window.navigator.userLanguage || window.navigator.language; var locale = window.navigator.userLanguage || window.navigator.language;
var data = ''; var data = "";
// Use the browser language for date formatting // Use the browser language for date formatting
moment.locale(locale); moment.locale(locale);
// format dates to different styles // format dates to different styles
var startDate = moment(event.item.start).format('dd HH:mm'); var startDate = moment(event.item.start).format("dd HH:mm");
var endDate = moment(event.item.finsih).format('dd HH:mm'); var endDate = moment(event.item.finsih).format("dd HH:mm");
var monthShort = moment(event.item.start).format('MMM'); var monthShort = moment(event.item.start).format("MMM");
var dayNumberStart = moment(event.item.start).format('DD'); var dayNumberStart = moment(event.item.start).format("DD");
var dayNumberEnd = moment(event.item.finish).format('DD'); var dayNumberEnd = moment(event.item.finish).format("DD");
var startTime = moment(event.item.start).format('HH:mm'); var startTime = moment(event.item.start).format("HH:mm");
var endTime = moment(event.item.finish).format('HH:mm'); var endTime = moment(event.item.finish).format("HH:mm");
var monthNumber; var monthNumber;
var formattedDate = startDate; var formattedDate = startDate;
@ -192,14 +204,13 @@ function eventHoverHtmlContent(event) {
// We only need the to format the end date if the event does have // We only need the to format the end date if the event does have
// a finish date. // a finish date.
if (event.item.nofinish == 0) { if (event.item.nofinish == 0) {
formattedDate = startDate + ' - ' + endTime; formattedDate = startDate + " - " + endTime;
// use a different Format (15. Feb - 18. Feb) if the events end date // use a different Format (15. Feb - 18. Feb) if the events end date
// is not the start date // is not the start date
if (dayNumberStart != dayNumberEnd) { if (dayNumberStart != dayNumberEnd) {
formattedDate = moment(event.item.start).format('Do MMM') + formattedDate =
' - ' + moment(event.item.start).format("Do MMM") + " - " + moment(event.item.finish).format("Do MMM");
moment(event.item.finish).format('Do MMM');
} }
} }
@ -213,31 +224,26 @@ function eventHoverHtmlContent(event) {
var eventLocationTemplate = eventHoverLocationTemplate(); var eventLocationTemplate = eventHoverLocationTemplate();
// Format the event location data according to the the event location // Format the event location data according to the the event location
// template // template
eventLocation = eventLocationTemplate.format( eventLocation = eventLocationTemplate.format(eventLocationText);
eventLocationText
);
} }
// Get only template data if there exists a profile name // Get only template data if there exists a profile name
if (event.item['author-name']) { if (event.item["author-name"]) {
// Get the template // Get the template
var eventProfileNameTemplate = eventHoverProfileNameTemplate(); var eventProfileNameTemplate = eventHoverProfileNameTemplate();
// Insert the data into the template // Insert the data into the template
eventProfileName = eventProfileNameTemplate.format( eventProfileName = eventProfileNameTemplate.format(event.item["author-link"], event.item["author-name"]);
event.item['author-link'],
event.item['author-name']
);
} }
// Format the event data according to the event hover template // Format the event data according to the event hover template
var formatted = data.format( var formatted = data.format(
event.item['author-avatar'], // this isn't used at the present time event.item["author-avatar"], // this isn't used at the present time
eventProfileName, eventProfileName,
event.title, event.title,
eventLocation, eventLocation,
formattedDate, formattedDate,
monthShort.replace('.', ''), // Get rid of possible dots in the string monthShort.replace(".", ""), // Get rid of possible dots in the string
dayNumberStart dayNumberStart,
); );
return formatted; return formatted;
@ -246,7 +252,8 @@ function eventHoverHtmlContent(event) {
// transform the the list view event element into formatted html // transform the the list view event element into formatted html
function formatListViewEvent(event) { function formatListViewEvent(event) {
// The basic template for list view // The basic template for list view
var template = '<td class="fc-list-item-title fc-widget-content">\ var template =
'<td class="fc-list-item-title fc-widget-content">\
<hr class="seperator"></hr>\ <hr class="seperator"></hr>\
<div class="event-card">\ <div class="event-card">\
<div class="popover-content hovercard-content">{0}</div>\ <div class="popover-content hovercard-content">{0}</div>\

View file

@ -5,7 +5,6 @@
* The javascript for the group module * The javascript for the group module
*/ */
$(document).ready(function () { $(document).ready(function () {
// Add an event listeners on buttons for switching the contact list view // Add an event listeners on buttons for switching the contact list view
$("body").on("click", ".group-list-switcher", function () { $("body").on("click", ".group-list-switcher", function () {
@ -28,7 +27,7 @@ function groupChangeMember(gid, cid, sec_token) {
$(".tooltip").tooltip("hide"); $(".tooltip").tooltip("hide");
$("body").css("cursor", "wait"); $("body").css("cursor", "wait");
$.get('group/' + gid + '/' + cid + "?t=" + sec_token, function(data) { $.get("group/" + gid + "/" + cid + "?t=" + sec_token, function (data) {
// Insert the new group member list // Insert the new group member list
$("#group-update-wrapper").html(data); $("#group-update-wrapper").html(data);

View file

@ -19,7 +19,7 @@ $(document).ready(function(){
$(window).load(function () { $(window).load(function () {
// Scroll to the intro by its intro ID. // Scroll to the intro by its intro ID.
if (isIntroID()) { if (isIntroID()) {
scrollToItem('intro-' + introID); scrollToItem("intro-" + introID);
} }
}); });

View file

@ -1,32 +1,34 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later
$(document).ready(function () { $(document).ready(function () {
$("#contact_allow, #contact_deny, #group_allow, #group_deny")
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { .change(function () {
var selstr; var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { $(
"#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected",
).each(function () {
selstr = $(this).html(); selstr = $(this).html();
$('#jot-perms-icon').removeClass('unlock').addClass('lock'); $("#jot-perms-icon").removeClass("unlock").addClass("lock");
$('#jot-public').hide(); $("#jot-public").hide();
}); });
if (selstr == null) { if (selstr == null) {
$('#jot-perms-icon').removeClass('lock').addClass('unlock'); $("#jot-perms-icon").removeClass("lock").addClass("unlock");
$('#jot-public').show(); $("#jot-public").show();
} }
})
}).trigger('change'); .trigger("change");
// Click event listener for the album edit link/button. // Click event listener for the album edit link/button.
$("body").on('click', '#album-edit-link', function() { $("body").on("click", "#album-edit-link", function () {
var modalUrl = $(this).attr("data-modal-url"); var modalUrl = $(this).attr("data-modal-url");
if (typeof modalUrl !== "undefined") { if (typeof modalUrl !== "undefined") {
addToModal(modalUrl, 'photo-album-edit-wrapper'); addToModal(modalUrl, "photo-album-edit-wrapper");
} }
}); });
// Click event listener for the album drop link/button. // Click event listener for the album drop link/button.
$("body").on('click', '#album-drop-link', function() { $("body").on("click", "#album-drop-link", function () {
var modalUrl = $(this).attr("data-modal-url"); var modalUrl = $(this).attr("data-modal-url");
if (typeof modalUrl !== "undefined") { if (typeof modalUrl !== "undefined") {
@ -43,8 +45,8 @@ $(window).load(function() {
// Append the diminsons of the picture to the css of the photo-photo div // Append the diminsons of the picture to the css of the photo-photo div
// we do this to make it possible to have overlay navigation buttons for the photo // we do this to make it possible to have overlay navigation buttons for the photo
$("#photo-photo").css({ $("#photo-photo").css({
"width": pwidth, width: pwidth,
"height": pheight height: pheight,
}); });
}); });
// @license-end // @license-end

View file

@ -5,10 +5,10 @@
$(document).ready(function () { $(document).ready(function () {
// Clear bs modal on close. // Clear bs modal on close.
// We need this to prevent that the modal displays old content. // We need this to prevent that the modal displays old content.
$('body, footer').on('hidden.bs.modal', '.modal', function () { $("body, footer").on("hidden.bs.modal", ".modal", function () {
$(this).removeData('bs.modal'); $(this).removeData("bs.modal");
$("#modal-title").empty(); $("#modal-title").empty();
$('#modal-body').empty(); $("#modal-body").empty();
// Remove the file browser from jot (else we would have problems // Remove the file browser from jot (else we would have problems
// with AjaxUpload. // with AjaxUpload.
$(".fbrowser").remove(); $(".fbrowser").remove();
@ -18,13 +18,13 @@ $(document).ready(function(){
// Clear bs modal on close. // Clear bs modal on close.
// We need this to prevent that the modal displays old content. // We need this to prevent that the modal displays old content.
$('body').on('hidden.bs.modal', '#jot-modal', function () { $("body").on("hidden.bs.modal", "#jot-modal", function () {
// Restore cached jot at its hidden position ("#jot-content"). // Restore cached jot at its hidden position ("#jot-content").
$("#jot-content").append(jotcache); $("#jot-content").append(jotcache);
// Clear the jotcache. // Clear the jotcache.
jotcache = ''; jotcache = "";
// Destroy the attachment linkPreviw for Jot. // Destroy the attachment linkPreviw for Jot.
if (typeof linkPreview === 'object') { if (typeof linkPreview === "object") {
linkPreview.destroy(); linkPreview.destroy();
} }
}); });
@ -40,7 +40,6 @@ $(document).ready(function(){
// .../photo/ab803d8eg08daf85023adfec08 (with nothing more following), in hopes // .../photo/ab803d8eg08daf85023adfec08 (with nothing more following), in hopes
// that that will be unique enough. // that that will be unique enough.
if (imgHref.match(/\/photo\/[a-fA-F0-9]+(-[0-9]\.[\w]+?)?$/)) { if (imgHref.match(/\/photo\/[a-fA-F0-9]+(-[0-9]\.[\w]+?)?$/)) {
// Add a unique class to all the images of a certain post, to allow scrolling through // Add a unique class to all the images of a certain post, to allow scrolling through
var cBoxClass = $(this).closest(".wall-item-body").attr("id") + "-lightbox"; var cBoxClass = $(this).closest(".wall-item-body").attr("id") + "-lightbox";
$(this).addClass(cBoxClass); $(this).addClass(cBoxClass);
@ -50,9 +49,9 @@ $(document).ready(function(){
// } // }
aElem.colorbox({ aElem.colorbox({
maxHeight: '90%', maxHeight: "90%",
photo: true, // Colorbox doesn't recognize a URL that don't end in .jpg, etc. as a photo. photo: true, // Colorbox doesn't recognize a URL that don't end in .jpg, etc. as a photo.
rel: cBoxClass //$(this).attr("class").match(/wall-item-body-[\d]+-lightbox/)[0]. rel: cBoxClass, //$(this).attr("class").match(/wall-item-body-[\d]+-lightbox/)[0].
}); });
} }
}); });
@ -92,15 +91,14 @@ $(document).ready(function(){
elm.removeAttr("image-input"); elm.removeAttr("image-input");
// Insert the link from the image into the input field. // Insert the link from the image into the input field.
input.val(img); input.val(img);
}); });
// Generic delegated event to open an anchor URL in a modal. // Generic delegated event to open an anchor URL in a modal.
// Used in the hovercard. // Used in the hovercard.
document.getElementsByTagName('body')[0].addEventListener('click', function(e) { document.getElementsByTagName("body")[0].addEventListener("click", function (e) {
var target = e.target; var target = e.target;
while (target) { while (target) {
if (target.matches && target.matches('a.add-to-modal')) { if (target.matches && target.matches("a.add-to-modal")) {
addToModal(target.href); addToModal(target.href);
e.preventDefault(); e.preventDefault();
return false; return false;
@ -113,21 +111,19 @@ $(document).ready(function(){
// Overwrite Dialog.show from main js to load the filebrowser into a bs modal. // Overwrite Dialog.show from main js to load the filebrowser into a bs modal.
Dialog.show = function (url, title) { Dialog.show = function (url, title) {
if (typeof(title) === 'undefined') { if (typeof title === "undefined") {
title = ""; title = "";
} }
var modal = $('#modal').modal(); var modal = $("#modal").modal();
modal.find("#modal-header h4").html(title); modal.find("#modal-header h4").html(title);
modal modal.find("#modal-body").load(url, function (responseText, textStatus) {
.find('#modal-body') if (textStatus === "success" || textStatus === "notmodified") {
.load(url, function (responseText, textStatus) {
if ( textStatus === 'success' ||
textStatus === 'notmodified')
{
modal.show(); modal.show();
$(function() {Dialog._load(url);}); $(function () {
Dialog._load(url);
});
} }
}); });
}; };
@ -145,13 +141,13 @@ Dialog.showJot = function() {
var name = "main"; var name = "main";
var url = Dialog._get_url(type, name); var url = Dialog._get_url(type, name);
if(($(".modal-body #jot-fbrowser-wrapper .fbrowser").length) < 1 ) { if ($(".modal-body #jot-fbrowser-wrapper .fbrowser").length < 1) {
// Load new content to fbrowser window. // Load new content to fbrowser window.
$("#jot-fbrowser-wrapper").load(url, function (responseText, textStatus) { $("#jot-fbrowser-wrapper").load(url, function (responseText, textStatus) {
if ( textStatus === 'success' || if (textStatus === "success" || textStatus === "notmodified") {
textStatus === 'notmodified') $(function () {
{ Dialog._load(url);
$(function() {Dialog._load(url);}); });
} }
}); });
} }
@ -160,7 +156,7 @@ Dialog.showJot = function() {
// Init the filebrowser after page load. // Init the filebrowser after page load.
Dialog._load = function (url) { Dialog._load = function (url) {
// Get nickname & filebrowser type from the modal content. // Get nickname & filebrowser type from the modal content.
let filebrowser = document.getElementById('filebrowser'); let filebrowser = document.getElementById("filebrowser");
// Try to fetch the hash form the url. // Try to fetch the hash form the url.
let match = url.match(/fbrowser\/[a-z]+\/.*(#.*)/); let match = url.match(/fbrowser\/[a-z]+\/.*(#.*)/);
@ -207,7 +203,6 @@ function loadModalTitle() {
} }
} }
/** /**
* This function loads html content from a friendica page into a modal. * This function loads html content from a friendica page into a modal.
* *
@ -218,20 +213,16 @@ function loadModalTitle() {
function addToModal(url, id) { function addToModal(url, id) {
var char = qOrAmp(url); var char = qOrAmp(url);
url = url + char + 'mode=none'; url = url + char + "mode=none";
var modal = $('#modal').modal(); var modal = $("#modal").modal();
// Only search for an element if we have an ID. // Only search for an element if we have an ID.
if (typeof id !== "undefined") { if (typeof id !== "undefined") {
url = url + " div#" + id; url = url + " div#" + id;
} }
modal modal.find("#modal-body").load(url, function (responseText, textStatus) {
.find('#modal-body') if (textStatus === "success" || textStatus === "notmodified") {
.load(url, function (responseText, textStatus) {
if ( textStatus === 'success' ||
textStatus === 'notmodified')
{
modal.show(); modal.show();
//Get first element with the class "heading" //Get first element with the class "heading"
@ -240,7 +231,7 @@ function addToModal(url, id) {
// We need to initialize autosize again for new // We need to initialize autosize again for new
// modal conent. // modal conent.
autosize($('.modal .text-autosize')); autosize($(".modal .text-autosize"));
} }
}); });
} }
@ -248,12 +239,9 @@ function addToModal(url, id) {
// Add an element (by its id) to a bootstrap modal. // Add an element (by its id) to a bootstrap modal.
function addElmToModal(id) { function addElmToModal(id) {
var elm = $(id).html(); var elm = $(id).html();
var modal = $('#modal').modal(); var modal = $("#modal").modal();
modal modal.find("#modal-body").append(elm).modal.show;
.find('#modal-body')
.append(elm)
.modal.show;
loadModalTitle(); loadModalTitle();
} }
@ -269,12 +257,12 @@ function editpost(url) {
// Test if in the url path containing "events/event". If the path containing this // Test if in the url path containing "events/event". If the path containing this
// expression then we will call the addToModal function and exit this function at // expression then we will call the addToModal function and exit this function at
// this point. // this point.
if (splitURL.path.indexOf('events/event') > -1) { if (splitURL.path.indexOf("events/event") > -1) {
addToModal(splitURL.path); addToModal(splitURL.path);
return; return;
} }
var modal = $('#jot-modal').modal(); var modal = $("#jot-modal").modal();
url = url + " #jot-sections"; url = url + " #jot-sections";
$(".jot-nav .jot-perms-lnk").parent("li").addClass("hidden"); $(".jot-nav .jot-perms-lnk").parent("li").addClass("hidden");
@ -293,16 +281,11 @@ function editpost(url) {
jotreset(); jotreset();
modal modal.find("#jot-modal-content").load(url, function (responseText, textStatus) {
.find('#jot-modal-content') if (textStatus === "success" || textStatus === "notmodified") {
.load(url, function (responseText, textStatus) {
if ( textStatus === 'success' ||
textStatus === 'notmodified')
{
// get the item type and hide the input for title and category if it isn't needed. // get the item type and hide the input for title and category if it isn't needed.
var type = $(responseText).find("#profile-jot-form input[name='type']").val(); var type = $(responseText).find("#profile-jot-form input[name='type']").val();
if(type === "wall-comment" || type === "remote-comment") if (type === "wall-comment" || type === "remote-comment") {
{
// Hide title and category input fields because we don't. // Hide title and category input fields because we don't.
$("#profile-jot-form #jot-title-wrap").hide(); $("#profile-jot-form #jot-title-wrap").hide();
$("#profile-jot-form #jot-category-wrap").hide(); $("#profile-jot-form #jot-category-wrap").hide();
@ -310,7 +293,7 @@ function editpost(url) {
modal.show(); modal.show();
$("#jot-popup").show(); $("#jot-popup").show();
linkPreview = $('#profile-jot-text').linkPreview(); linkPreview = $("#profile-jot-text").linkPreview();
} }
}); });
} }
@ -319,8 +302,8 @@ function editpost(url) {
function jotreset() { function jotreset() {
// Clear bs modal on close. // Clear bs modal on close.
// We need this to prevent that the modal displays old content. // We need this to prevent that the modal displays old content.
$('body').on('hidden.bs.modal', '#jot-modal.edit-jot', function () { $("body").on("hidden.bs.modal", "#jot-modal.edit-jot", function () {
$(this).removeData('bs.modal'); $(this).removeData("bs.modal");
$(".jot-nav .jot-perms-lnk").parent("li").removeClass("hidden"); $(".jot-nav .jot-perms-lnk").parent("li").removeClass("hidden");
$("#profile-jot-form #jot-title-wrap").show(); $("#profile-jot-form #jot-title-wrap").show();
$("#profile-jot-form #jot-category-wrap").show(); $("#profile-jot-form #jot-category-wrap").show();
@ -344,8 +327,10 @@ function toggleJotNav (elm) {
// Minimize all tab content wrapper and activate only the selected // Minimize all tab content wrapper and activate only the selected
// tab panel. // tab panel.
$('#profile-jot-form > [role=tabpanel]').addClass("minimize").attr("aria-hidden" ,"true"); $("#profile-jot-form > [role=tabpanel]").addClass("minimize").attr("aria-hidden", "true");
$('#' + tabpanel).removeClass("minimize").attr("aria-hidden" ,"false"); $("#" + tabpanel)
.removeClass("minimize")
.attr("aria-hidden", "false");
// Set the aria-selected states // Set the aria-selected states
$("#jot-modal .modal-header .nav-tabs .jot-nav-lnk").attr("aria-selected", "false"); $("#jot-modal .modal-header .nav-tabs .jot-nav-lnk").attr("aria-selected", "false");
@ -355,7 +340,7 @@ function toggleJotNav (elm) {
if (tabpanel === "jot-preview-content") { if (tabpanel === "jot-preview-content") {
preview_post(); preview_post();
// Make Share button visivle in preview // Make Share button visivle in preview
$('#jot-preview-share').removeClass("minimize").attr("aria-hidden" ,"false"); $("#jot-preview-share").removeClass("minimize").attr("aria-hidden", "false");
} else if (tabpanel === "jot-fbrowser-wrapper") { } else if (tabpanel === "jot-fbrowser-wrapper") {
$(function () { $(function () {
Dialog.showJot(); Dialog.showJot();
@ -377,7 +362,7 @@ function openWallMessage(url) {
// If the host isn't the same we can't load it in a modal. // If the host isn't the same we can't load it in a modal.
// So we will go to to the url directly. // So we will go to to the url directly.
if( ("host" in parts) && (parts.host !== window.location.host)) { if ("host" in parts && parts.host !== window.location.host) {
window.location.href = url; window.location.href = url;
} else { } else {
// Otherwise load the wall message into a modal. // Otherwise load the wall message into a modal.
@ -389,7 +374,7 @@ function openWallMessage(url) {
/// @todo Rename this function because it can be used for more than events. /// @todo Rename this function because it can be used for more than events.
function eventEdit(url) { function eventEdit(url) {
var char = qOrAmp(url); var char = qOrAmp(url);
url = url + char + 'mode=none'; url = url + char + "mode=none";
$.get(url, function (data) { $.get(url, function (data) {
$("#modal-body").empty(); $("#modal-body").empty();

View file

@ -40,7 +40,7 @@ function commentGetLink(id, prompttext) {
reply = prompt(prompttext); reply = prompt(prompttext);
if (reply && reply.length) { if (reply && reply.length) {
reply = bin2hex(reply); reply = bin2hex(reply);
$.get('parse_url?noAttachment=1&binurl=' + reply, function(data) { $.get("parse_url?noAttachment=1&binurl=" + reply, function (data) {
addCommentText(data, id); addCommentText(data, id);
}); });
} }
@ -64,7 +64,7 @@ function commentLinkDrop(event, id) {
event.preventDefault(); event.preventDefault();
if (reply && reply.length) { if (reply && reply.length) {
reply = bin2hex(reply); reply = bin2hex(reply);
$.get('parse_url?noAttachment=1&binurl=' + reply, function(data) { $.get("parse_url?noAttachment=1&binurl=" + reply, function (data) {
addCommentText(data, id); addCommentText(data, id);
}); });
} }
@ -86,12 +86,12 @@ function insertFormattingToPost(BBCode) {
} }
function showThread(id) { function showThread(id) {
$("#collapsed-comments-" + id).show() $("#collapsed-comments-" + id).show();
$("#collapsed-comments-" + id + " .collapsed-comments").show() $("#collapsed-comments-" + id + " .collapsed-comments").show();
} }
function hideThread(id) { function hideThread(id) {
$("#collapsed-comments-" + id).hide() $("#collapsed-comments-" + id).hide();
$("#collapsed-comments-" + id + " .collapsed-comments").hide() $("#collapsed-comments-" + id + " .collapsed-comments").hide();
} }
function cmtBbOpen(id) { function cmtBbOpen(id) {
@ -101,8 +101,7 @@ function cmtBbClose(id) {
$("#comment-edit-bb-" + id).hide(); $("#comment-edit-bb-" + id).hide();
} }
function commentExpand(id) function commentExpand(id) {
{
$("#mod-cmnt-wrap-" + id).show(); $("#mod-cmnt-wrap-" + id).show();
closeMenu("comment-fake-form-" + id); closeMenu("comment-fake-form-" + id);
openMenu("item-comments-" + id); openMenu("item-comments-" + id);
@ -114,9 +113,8 @@ function commentExpand(id)
return true; return true;
} }
function commentClose(obj, id) function commentClose(obj, id) {
{ if (obj.value === "" || obj.value === obj.dataset.default) {
if (obj.value === '' || obj.value === obj.dataset.default) {
$("#comment-edit-text-" + id) $("#comment-edit-text-" + id)
.removeClass("comment-edit-text-full") .removeClass("comment-edit-text-full")
.addClass("comment-edit-text-empty"); .addClass("comment-edit-text-empty");
@ -129,8 +127,8 @@ function commentClose(obj, id)
} }
function showHideCommentBox(id) { function showHideCommentBox(id) {
var $el = $('#comment-edit-form-' + id); var $el = $("#comment-edit-form-" + id);
if ($el.is(':visible')) { if ($el.is(":visible")) {
$el.hide(); $el.hide();
} else { } else {
$el.show(); $el.show();
@ -142,19 +140,21 @@ function commentOpenUI(obj, id) {
openMenu("item-comments-" + id); openMenu("item-comments-" + id);
$("#comment-edit-text-" + id) $("#comment-edit-text-" + id)
.putCursorAtEnd() .putCursorAtEnd()
.addClass("comment-edit-text-full").removeClass("comment-edit-text-empty") .addClass("comment-edit-text-full")
.attr('tabindex', '9'); // Choose an arbitrary tab index that's greater than what we're using in jot (3 of them) .removeClass("comment-edit-text-empty")
$("#comment-edit-submit-" + id).attr('tabindex', '10'); // The submit button gets tabindex + 1 .attr("tabindex", "9"); // Choose an arbitrary tab index that's greater than what we're using in jot (3 of them)
$("#comment-edit-submit-" + id).attr("tabindex", "10"); // The submit button gets tabindex + 1
// initialize autosize for this comment // initialize autosize for this comment
autosize($("#comment-edit-text-" + id + ".text-autosize")); autosize($("#comment-edit-text-" + id + ".text-autosize"));
} }
function commentCloseUI(obj, id) { function commentCloseUI(obj, id) {
if (obj.value === '' || obj.value === obj.dataset.default) { if (obj.value === "" || obj.value === obj.dataset.default) {
$("#comment-edit-text-" + id) $("#comment-edit-text-" + id)
.removeClass("comment-edit-text-full").addClass("comment-edit-text-empty") .removeClass("comment-edit-text-full")
.removeAttr('tabindex'); .addClass("comment-edit-text-empty")
$("#comment-edit-submit-" + id).removeAttr('tabindex'); .removeAttr("tabindex");
$("#comment-edit-submit-" + id).removeAttr("tabindex");
openMenu("comment-fake-form-" + id); openMenu("comment-fake-form-" + id);
closeMenu("item-comments-" + id); closeMenu("item-comments-" + id);
// destroy the automatic textarea resizing // destroy the automatic textarea resizing
@ -163,7 +163,7 @@ function commentCloseUI(obj, id) {
} }
function jotTextOpenUI(obj) { function jotTextOpenUI(obj) {
if (obj.value === '' || obj.value === obj.dataset.default) { if (obj.value === "" || obj.value === obj.dataset.default) {
var $el = $(".modal-body #profile-jot-text"); var $el = $(".modal-body #profile-jot-text");
$el.addClass("profile-jot-text-full").removeClass("profile-jot-text-empty"); $el.addClass("profile-jot-text-full").removeClass("profile-jot-text-empty");
// initiale autosize for the jot // initiale autosize for the jot
@ -172,7 +172,7 @@ function jotTextOpenUI(obj) {
} }
function jotTextCloseUI(obj) { function jotTextCloseUI(obj) {
if (obj.value === '' || obj.value === obj.dataset.default) { if (obj.value === "" || obj.value === obj.dataset.default) {
var $el = $(".modal-body #profile-jot-text"); var $el = $(".modal-body #profile-jot-text");
$el.removeClass("profile-jot-text-full").addClass("profile-jot-text-empty"); $el.removeClass("profile-jot-text-full").addClass("profile-jot-text-empty");
// destroy the automatic textarea resizing // destroy the automatic textarea resizing
@ -181,7 +181,7 @@ function jotTextCloseUI(obj) {
} }
function commentOpen(obj, id) { function commentOpen(obj, id) {
if (obj.value === '' || obj.value === obj.dataset.default) { if (obj.value === "" || obj.value === obj.dataset.default) {
$("#comment-edit-text-" + id) $("#comment-edit-text-" + id)
.putCursorAtEnd() .putCursorAtEnd()
.addClass("comment-edit-text-full") .addClass("comment-edit-text-full")
@ -210,18 +210,21 @@ function dropItem(url, elementId) {
var confirm = confirmDelete(); var confirm = confirmDelete();
if (confirm) { if (confirm) {
$('body').css('cursor', 'wait'); $("body").css("cursor", "wait");
var $el = $(document.getElementById(elementId)); var $el = $(document.getElementById(elementId));
$el.fadeTo('fast', 0.33, function () { $el.fadeTo("fast", 0.33, function () {
$.get(url).then(function() { $.get(url)
.then(function () {
$el.remove(); $el.remove();
}).fail(function() { })
.fail(function () {
// @todo Show related error message // @todo Show related error message
$el.show(); $el.show();
}).always(function() { })
$('body').css('cursor', 'auto'); .always(function () {
$("body").css("cursor", "auto");
}); });
}); });
} }

View file

@ -1,10 +1,10 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later
var jotcache = ''; //The jot cache. We use it as cache to restore old/original jot content var jotcache = ""; //The jot cache. We use it as cache to restore old/original jot content
$(document).ready(function () { $(document).ready(function () {
// Destroy unused perfect scrollbar in aside element // Destroy unused perfect scrollbar in aside element
$('aside').perfectScrollbar('destroy'); $("aside").perfectScrollbar("destroy");
//fade in/out based on scrollTop value //fade in/out based on scrollTop value
var scrollStart; var scrollStart;
@ -27,9 +27,12 @@ $(document).ready(function(){
// scroll body to 0px on click // scroll body to 0px on click
$("#back-to-top").click(function () { $("#back-to-top").click(function () {
$("body,html").animate({ $("body,html").animate(
scrollTop: 0 {
}, 400); scrollTop: 0,
},
400,
);
return false; return false;
}); });
@ -64,17 +67,17 @@ $(document).ready(function(){
// So we apply the correct url (with the link to the id of the mask) after the page is loaded. // So we apply the correct url (with the link to the id of the mask) after the page is loaded.
if ($("#logo-img").length) { if ($("#logo-img").length) {
var pageurl = "url('" + window.location.href + "#logo-mask')"; var pageurl = "url('" + window.location.href + "#logo-mask')";
$("#logo-img").css({"mask": pageurl}); $("#logo-img").css({ mask: pageurl });
} }
// make responsive tabmenu with flexmenu.js // make responsive tabmenu with flexmenu.js
// the menupoints which doesn't fit in the second nav bar will moved to a // the menupoints which doesn't fit in the second nav bar will moved to a
// dropdown menu. Look at common_tabs.tpl // dropdown menu. Look at common_tabs.tpl
$("ul.tabs.flex-nav").flexMenu({ $("ul.tabs.flex-nav").flexMenu({
'cutoff': 2, cutoff: 2,
'popupClass': "dropdown-menu pull-right", popupClass: "dropdown-menu pull-right",
'popupAbsolute': false, popupAbsolute: false,
'target': ".flex-target" target: ".flex-target",
}); });
// add Jot button to the second navbar // add Jot button to the second navbar
@ -84,13 +87,13 @@ $(document).ready(function(){
if ($("#jot-popup").is(":hidden")) { if ($("#jot-popup").is(":hidden")) {
$jotButton.hide(); $jotButton.hide();
} }
$jotButton.on('click', function (e) { $jotButton.on("click", function (e) {
e.preventDefault(); e.preventDefault();
jotShow(); jotShow();
}); });
} }
let $body = $('body'); let $body = $("body");
// show bulk deletion button at network page if checkbox is checked // show bulk deletion button at network page if checkbox is checked
$body.change("input.item-select", function () { $body.change("input.item-select", function () {
@ -99,8 +102,8 @@ $(document).ready(function(){
// We need to get all checked items, so it would close the delete button // We need to get all checked items, so it would close the delete button
// if we uncheck one item and others are still checked. // if we uncheck one item and others are still checked.
// So return checked = true if there is any checked item // So return checked = true if there is any checked item
$('input.item-select').each( function() { $("input.item-select").each(function () {
if($(this).is(':checked')) { if ($(this).is(":checked")) {
checked = true; checked = true;
return false; return false;
} }
@ -119,22 +122,22 @@ $(document).ready(function(){
// initialize the bootstrap tooltips // initialize the bootstrap tooltips
$body.tooltip({ $body.tooltip({
selector: '[data-toggle="tooltip"]', selector: '[data-toggle="tooltip"]',
container: 'body', container: "body",
animation: true, animation: true,
html: true, html: true,
placement: 'auto', placement: "auto",
trigger: 'hover', trigger: "hover",
delay: { delay: {
show: 500, show: 500,
hide: 100 hide: 100,
}, },
sanitizeFn: function (content) { sanitizeFn: function (content) {
return DOMPurify.sanitize(content) return DOMPurify.sanitize(content);
}, },
}); });
// initialize the bootstrap-select // initialize the bootstrap-select
$('.selectpicker').selectpicker(); $(".selectpicker").selectpicker();
// add search-heading to the second navbar // add search-heading to the second navbar
if ($(".search-heading").length) { if ($(".search-heading").length) {
@ -155,7 +158,7 @@ $(document).ready(function(){
searchText = "No results"; searchText = "No results";
} }
// insert the plain text in a <h4> heading and give it a class // insert the plain text in a <h4> heading and give it a class
var newText = '<h4 class="search-heading">'+searchText+'</h4>'; var newText = '<h4 class="search-heading">' + searchText + "</h4>";
// append the new heading to the navbar // append the new heading to the navbar
$("#topbar-second > .container > #tabmenu").append(newText); $("#topbar-second > .container > #tabmenu").append(newText);
@ -166,11 +169,11 @@ $(document).ready(function(){
// if the orignal search value isn't available use the location path as value // if the orignal search value isn't available use the location path as value
if (typeof searchValue === "undefined") { if (typeof searchValue === "undefined") {
// get the location path // get the location path
var urlPath = window.location.search var urlPath = window.location.search;
// and split it up in its parts // and split it up in its parts
var splitPath = urlPath.split(/(\?search?=)(.*$)/); var splitPath = urlPath.split(/(\?search?=)(.*$)/);
if(typeof splitPath[2] !== 'undefined') { if (typeof splitPath[2] !== "undefined") {
// decode the path (e.g to decode %40 to the character @) // decode the path (e.g to decode %40 to the character @)
var searchValue = decodeURIComponent(splitPath[2]); var searchValue = decodeURIComponent(splitPath[2]);
} }
@ -207,7 +210,9 @@ $(document).ready(function(){
// Note: We need the first() element with this class since at the present time we // Note: We need the first() element with this class since at the present time we
// store also the js template information in the html code and thats why // store also the js template information in the html code and thats why
// there are two elements with this class but we don't want the js template // there are two elements with this class but we don't want the js template
$(".network-content-wrapper > #viewcontact_wrapper-network .contact-wrapper").first().appendTo("#nav-short-info"); $(".network-content-wrapper > #viewcontact_wrapper-network .contact-wrapper")
.first()
.appendTo("#nav-short-info");
} }
// move heading from network stream to the second navbar nav-short-info section // move heading from network stream to the second navbar nav-short-info section
@ -217,7 +222,8 @@ $(document).ready(function(){
// get the text of the heading // get the text of the heading
var headingContent = heading.html(); var headingContent = heading.html();
// create a new element with the content of the heading // create a new element with the content of the heading
var newText = '<h4 class="heading" data-toggle="tooltip" title="'+headingContent+'">'+headingContent+'</h4>'; var newText =
'<h4 class="heading" data-toggle="tooltip" title="' + headingContent + '">' + headingContent + "</h4>";
// remove the old heading element // remove the old heading element
heading.remove(), heading.remove(),
// put the new element to the second nav bar // put the new element to the second nav bar
@ -230,7 +236,7 @@ $(document).ready(function(){
// get the text of the heading // get the text of the heading
var headingContent = heading.html(); var headingContent = heading.html();
// create a new element with the content of the heading // create a new element with the content of the heading
var newText = '<h4 class="heading">'+headingContent+'</h4>'; var newText = '<h4 class="heading">' + headingContent + "</h4>";
// remove the old heading element // remove the old heading element
heading.remove(), heading.remove(),
// put the new element to the second nav bar // put the new element to the second nav bar
@ -239,7 +245,7 @@ $(document).ready(function(){
// Dropdown menus with the class "dropdown-head" will display the active tab // Dropdown menus with the class "dropdown-head" will display the active tab
// as button text // as button text
$body.on('click', '.dropdown-head .dropdown-menu li a, .dropdown-head .dropdown-menu li button', function(){ $body.on("click", ".dropdown-head .dropdown-menu li a, .dropdown-head .dropdown-menu li button", function () {
toggleDropdownText(this); toggleDropdownText(this);
}); });
@ -257,9 +263,11 @@ $(document).ready(function(){
// According to the value of the input element we need to decide // According to the value of the input element we need to decide
// which class need to be added and removed when changing the switch // which class need to be added and removed when changing the switch
var removedclass = (val == 0 ? onstyle : offstyle); var removedclass = val == 0 ? onstyle : offstyle;
var addedclass = (val == 0 ? offstyle : onstyle) var addedclass = val == 0 ? offstyle : onstyle;
$("#"+id+"_onoff").addClass(addedclass).removeClass(removedclass); $("#" + id + "_onoff")
.addClass(addedclass)
.removeClass(removedclass);
// After changing the switch the input element is getting // After changing the switch the input element is getting
// the newvalue // the newvalue
@ -273,19 +281,18 @@ $(document).ready(function(){
// to the input element where the padding value would be at least the width // to the input element where the padding value would be at least the width
// of the button. Otherwise long user input would be invisible because it is // of the button. Otherwise long user input would be invisible because it is
// behind the button. // behind the button.
$body.on('click', '.form-group-search > input', function() { $body.on("click", ".form-group-search > input", function () {
// Get the width of the button (if the button isn't available // Get the width of the button (if the button isn't available
// buttonWidth will be null // buttonWidth will be null
var buttonWidth = $(this).next('.form-button-search').outerWidth(); var buttonWidth = $(this).next(".form-button-search").outerWidth();
if (buttonWidth) { if (buttonWidth) {
// Take the width of the button and ad 5px // Take the width of the button and ad 5px
var newWidth = buttonWidth + 5; var newWidth = buttonWidth + 5;
// Set the padding of the input element according // Set the padding of the input element according
// to the width of the button // to the width of the button
$(this).css('padding-right', newWidth); $(this).css("padding-right", newWidth);
} }
}); });
/* /*
@ -295,18 +302,18 @@ $(document).ready(function(){
* We are making an exception for buttons because of a race condition with the * We are making an exception for buttons because of a race condition with the
* comment opening button that results in an already closed comment UI. * comment opening button that results in an already closed comment UI.
*/ */
$(document).on('mousedown', function(event) { $(document).on("mousedown", function (event) {
if (event.target.type === 'button') { if (event.target.type === "button") {
return true; return true;
} }
var $dontclosethis = $(event.target).closest('.wall-item-comment-wrapper').find('.comment-edit-form'); var $dontclosethis = $(event.target).closest(".wall-item-comment-wrapper").find(".comment-edit-form");
$('.wall-item-comment-wrapper .comment-edit-submit-wrapper:visible').each(function() { $(".wall-item-comment-wrapper .comment-edit-submit-wrapper:visible").each(function () {
var $parent = $(this).parent('.comment-edit-form'); var $parent = $(this).parent(".comment-edit-form");
var itemId = $parent.data('itemId'); var itemId = $parent.data("itemId");
if ($dontclosethis[0] != $parent[0]) { if ($dontclosethis[0] != $parent[0]) {
var textarea = $parent.find('textarea').get(0) var textarea = $parent.find("textarea").get(0);
commentCloseUI(textarea, itemId); commentCloseUI(textarea, itemId);
} }
@ -314,10 +321,10 @@ $(document).ready(function(){
}); });
// Customize some elements when the app is used in standalone mode on Android // Customize some elements when the app is used in standalone mode on Android
if (window.matchMedia('(display-mode: standalone)').matches) { if (window.matchMedia("(display-mode: standalone)").matches) {
// Open links to source outside of the webview // Open links to source outside of the webview
$('body').on('click', '.plink', function (e) { $("body").on("click", ".plink", function (e) {
$(e.target).attr('target', '_blank'); $(e.target).attr("target", "_blank");
}); });
} }
@ -325,7 +332,7 @@ $(document).ready(function(){
* This event listeners ensures that the textarea size is updated event if the * This event listeners ensures that the textarea size is updated event if the
* value is changed externally (textcomplete, insertFormatting, fbrowser...) * value is changed externally (textcomplete, insertFormatting, fbrowser...)
*/ */
$(document).on('change', 'textarea', function(event) { $(document).on("change", "textarea", function (event) {
autosize.update(event.target); autosize.update(event.target);
}); });
@ -343,7 +350,7 @@ $(document).ready(function(){
if ($(window).width() > 976) { if ($(window).width() > 976) {
$("aside").stick_in_parent({ $("aside").stick_in_parent({
offset_top: 100, // px, header + tab bar + spacing offset_top: 100, // px, header + tab bar + spacing
recalc_every: 10 recalc_every: 10,
}); });
// recalculate sticky aside on clicks on <a> elements // recalculate sticky aside on clicks on <a> elements
// this handle height changes on expanding submenus // this handle height changes on expanding submenus
@ -372,9 +379,9 @@ $(document).ready(function(){
}); });
// Comment form submit // Comment form submit
$body.on('submit', '.comment-edit-form', function(e) { $body.on("submit", ".comment-edit-form", function (e) {
let $form = $(this); let $form = $(this);
let id = $form.data('item-id'); let id = $form.data("item-id");
// Compose page form exception: id is always 0 and form must not be submitted asynchronously // Compose page form exception: id is always 0 and form must not be submitted asynchronously
if (id === 0) { if (id === 0) {
@ -383,21 +390,17 @@ $(document).ready(function(){
e.preventDefault(); e.preventDefault();
let $commentSubmit = $form.find('.comment-edit-submit').button('loading'); let $commentSubmit = $form.find(".comment-edit-submit").button("loading");
unpause(); unpause();
commentBusy = true; commentBusy = true;
$.post( $.post("item", $form.serialize(), "json")
'item',
$form.serialize(),
'json'
)
.then(function (data) { .then(function (data) {
if (data.success) { if (data.success) {
$('#comment-edit-wrapper-' + id).hide(); $("#comment-edit-wrapper-" + id).hide();
let $textarea = $('#comment-edit-text-' + id); let $textarea = $("#comment-edit-text-" + id);
$textarea.val(''); $textarea.val("");
if ($textarea.get(0)) { if ($textarea.get(0)) {
commentClose($textarea.get(0), id); commentClose($textarea.get(0), id);
} }
@ -413,56 +416,49 @@ $(document).ready(function(){
} }
}) })
.always(function () { .always(function () {
$commentSubmit.button('reset'); $commentSubmit.button("reset");
}); });
}); });
$body.on('submit', '.modal-body #poke-wrapper', function(e) { $body.on("submit", ".modal-body #poke-wrapper", function (e) {
e.preventDefault(); e.preventDefault();
let $form = $(this); let $form = $(this);
let $pokeSubmit = $form.find('button[type=submit]').button('loading'); let $pokeSubmit = $form.find("button[type=submit]").button("loading");
$.post( $.post($form.attr("action"), $form.serialize(), "json")
$form.attr('action'),
$form.serialize(),
'json'
)
.then(function (data) { .then(function (data) {
if (data.success) { if (data.success) {
$('#modal').modal('hide'); $("#modal").modal("hide");
} }
}) })
.always(function () { .always(function () {
$pokeSubmit.button('reset'); $pokeSubmit.button("reset");
});
}); });
})
}); });
function openClose(theID) { function openClose(theID) {
var elem = document.getElementById(theID); var elem = document.getElementById(theID);
if( $(elem).is(':visible')) { if ($(elem).is(":visible")) {
$(elem).slideUp(200); $(elem).slideUp(200);
} } else {
else {
$(elem).slideDown(200); $(elem).slideDown(200);
} }
} }
function showHide(theID) { function showHide(theID) {
var elem = document.getElementById(theID); var elem = document.getElementById(theID);
var edit = document.getElementById("comment-edit-submit-wrapper-" + theID.match('[0-9$]+')); var edit = document.getElementById("comment-edit-submit-wrapper-" + theID.match("[0-9$]+"));
if ($(elem).is(':visible')) { if ($(elem).is(":visible")) {
if (!$(edit).is(':visible')) { if (!$(edit).is(":visible")) {
edit.style.display = "block"; edit.style.display = "block";
} } else {
else {
elem.style.display = "none"; elem.style.display = "none";
} }
} } else {
else {
elem.style.display = "block"; elem.style.display = "block";
} }
} }
@ -471,27 +467,27 @@ function showHide(theID) {
function showHideEventMap(elm) { function showHideEventMap(elm) {
// Get the id of the map element - it should be provided through // Get the id of the map element - it should be provided through
// the atribute "data-map-id". // the atribute "data-map-id".
var mapID = elm.getAttribute('data-map-id'); var mapID = elm.getAttribute("data-map-id");
// Get translation labels. // Get translation labels.
var mapshow = elm.getAttribute('data-show-label'); var mapshow = elm.getAttribute("data-show-label");
var maphide = elm.getAttribute('data-hide-label'); var maphide = elm.getAttribute("data-hide-label");
// Change the button labels. // Change the button labels.
if (elm.innerText == mapshow) { if (elm.innerText == mapshow) {
$('#' + elm.id).text(maphide); $("#" + elm.id).text(maphide);
} else { } else {
$('#' + elm.id).text(mapshow); $("#" + elm.id).text(mapshow);
} }
// Because maps are iframe elements, we cant hide it through css (display: none). // Because maps are iframe elements, we cant hide it through css (display: none).
// We solve this issue by putting the map outside the screen with css. // We solve this issue by putting the map outside the screen with css.
// So the first time the 'Show map' button is pressed we move the map // So the first time the 'Show map' button is pressed we move the map
// element into the screen area. // element into the screen area.
var mappos = $('#' + mapID).css('position'); var mappos = $("#" + mapID).css("position");
if (mappos === 'absolute') { if (mappos === "absolute") {
$('#' + mapID).hide(); $("#" + mapID).hide();
$('#' + mapID).css({position: 'relative', left: 'auto', top: 'auto'}); $("#" + mapID).css({ position: "relative", left: "auto", top: "auto" });
openClose(mapID); openClose(mapID);
} else { } else {
openClose(mapID); openClose(mapID);
@ -501,18 +497,22 @@ function showHideEventMap(elm) {
function justifyPhotos() { function justifyPhotos() {
justifiedGalleryActive = true; justifiedGalleryActive = true;
$('#photo-album-contents').justifiedGallery({ $("#photo-album-contents")
.justifiedGallery({
margins: 3, margins: 3,
border: 0, border: 0,
sizeRangeSuffixes: { sizeRangeSuffixes: {
'lt48': '-6', lt48: "-6",
'lt80': '-5', lt80: "-5",
'lt300': '-4', lt300: "-4",
'lt320': '-2', lt320: "-2",
'lt640': '-1', lt640: "-1",
'lt1024': '-0' lt1024: "-0",
} },
}).on('jg.complete', function(e){ justifiedGalleryActive = false; }); })
.on("jg.complete", function (e) {
justifiedGalleryActive = false;
});
} }
// Load a js script to the html head. // Load a js script to the html head.
@ -525,9 +525,9 @@ function loadScript(url, callback) {
oscript.remove(); oscript.remove();
} }
// Adding the script tag to the head as suggested before. // 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";
script.src = url; script.src = url;
// Then bind the event to the callback function. // Then bind the event to the callback function.
@ -541,16 +541,16 @@ function loadScript(url, callback) {
// Does we need a ? or a & to append values to a url // Does we need a ? or a & to append values to a url
function qOrAmp(url) { function qOrAmp(url) {
if(url.search('\\?') < 0) { if (url.search("\\?") < 0) {
return '?'; return "?";
} else { } else {
return '&'; return "&";
} }
} }
String.prototype.normalizeLink = function () { String.prototype.normalizeLink = function () {
var ret = this.replace('https:', 'http:'); var ret = this.replace("https:", "http:");
var ret = ret.replace('//www', '//'); var ret = ret.replace("//www", "//");
return ret.rtrim(); return ret.rtrim();
}; };
@ -578,7 +578,8 @@ function cleanContactUrl(url) {
return newUrl; return newUrl;
} }
function parseUrl (str, component) { // eslint-disable-line camelcase function parseUrl(str, component) {
// eslint-disable-line camelcase
// discuss at: http://locutusjs.io/php/parse_url/ // discuss at: http://locutusjs.io/php/parse_url/
// original by: Steven Levithan (http://blog.stevenlevithan.com) // original by: Steven Levithan (http://blog.stevenlevithan.com)
// reimplemented by: Brett Zamir (http://brett-zamir.me) // reimplemented by: Brett Zamir (http://brett-zamir.me)
@ -603,82 +604,91 @@ function parseUrl (str, component) { // eslint-disable-line camelcase
// example 4: parse_url('https://gooduser:secretpassword@www.example.com/a@b.c/folder?foo=bar') // example 4: parse_url('https://gooduser:secretpassword@www.example.com/a@b.c/folder?foo=bar')
// returns 4: { scheme: 'https', host: 'www.example.com', path: '/a@b.c/folder', query: 'foo=bar', user: 'gooduser', pass: 'secretpassword' } // returns 4: { scheme: 'https', host: 'www.example.com', path: '/a@b.c/folder', query: 'foo=bar', user: 'gooduser', pass: 'secretpassword' }
var query var query;
var mode = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.parse_url.mode') : undefined) || 'php' var mode =
(typeof require !== "undefined" ? require("../info/ini_get")("locutus.parse_url.mode") : undefined) || "php";
var key = [ var key = [
'source', "source",
'scheme', "scheme",
'authority', "authority",
'userInfo', "userInfo",
'user', "user",
'pass', "pass",
'host', "host",
'port', "port",
'relative', "relative",
'path', "path",
'directory', "directory",
'file', "file",
'query', "query",
'fragment' "fragment",
] ];
// For loose we added one optional slash to post-scheme to catch file:/// (should restrict this) // For loose we added one optional slash to post-scheme to catch file:/// (should restrict this)
var parser = { var parser = {
php: new RegExp([ php: new RegExp(
'(?:([^:\\/?#]+):)?', [
'(?:\\/\\/()(?:(?:()(?:([^:@\\/]*):?([^:@\\/]*))?@)?([^:\\/?#]*)(?::(\\d*))?))?', "(?:([^:\\/?#]+):)?",
'()', "(?:\\/\\/()(?:(?:()(?:([^:@\\/]*):?([^:@\\/]*))?@)?([^:\\/?#]*)(?::(\\d*))?))?",
'(?:(()(?:(?:[^?#\\/]*\\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)' "()",
].join('')), "(?:(()(?:(?:[^?#\\/]*\\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)",
strict: new RegExp([ ].join(""),
'(?:([^:\\/?#]+):)?', ),
'(?:\\/\\/((?:(([^:@\\/]*):?([^:@\\/]*))?@)?([^:\\/?#]*)(?::(\\d*))?))?', strict: new RegExp(
'((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)' [
].join('')), "(?:([^:\\/?#]+):)?",
loose: new RegExp([ "(?:\\/\\/((?:(([^:@\\/]*):?([^:@\\/]*))?@)?([^:\\/?#]*)(?::(\\d*))?))?",
'(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?', "((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)",
'(?:\\/\\/\\/?)?', ].join(""),
'((?:(([^:@\\/]*):?([^:@\\/]*))?@)?([^:\\/?#]*)(?::(\\d*))?)', ),
'(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))', loose: new RegExp(
'(?:\\?([^#]*))?(?:#(.*))?)' [
].join('')) "(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?",
} "(?:\\/\\/\\/?)?",
"((?:(([^:@\\/]*):?([^:@\\/]*))?@)?([^:\\/?#]*)(?::(\\d*))?)",
"(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))",
"(?:\\?([^#]*))?(?:#(.*))?)",
].join(""),
),
};
var m = parser[mode].exec(str) var m = parser[mode].exec(str);
var uri = {} var uri = {};
var i = 14 var i = 14;
while (i--) { while (i--) {
if (m[i]) { if (m[i]) {
uri[key[i]] = m[i] uri[key[i]] = m[i];
} }
} }
if (component) { if (component) {
return uri[component.replace('PHP_URL_', '').toLowerCase()] return uri[component.replace("PHP_URL_", "").toLowerCase()];
} }
if (mode !== 'php') { if (mode !== "php") {
var name = (typeof require !== 'undefined' ? require('../info/ini_get')('locutus.parse_url.queryKey') : undefined) || 'queryKey' var name =
parser = /(?:^|&)([^&=]*)=?([^&]*)/g (typeof require !== "undefined" ? require("../info/ini_get")("locutus.parse_url.queryKey") : undefined) ||
uri[name] = {} "queryKey";
query = uri[key[12]] || '' parser = /(?:^|&)([^&=]*)=?([^&]*)/g;
uri[name] = {};
query = uri[key[12]] || "";
query.replace(parser, function ($0, $1, $2) { query.replace(parser, function ($0, $1, $2) {
if ($1) { if ($1) {
uri[name][$1] = $2 uri[name][$1] = $2;
} }
}) });
} }
delete uri.source delete uri.source;
return uri return uri;
} }
// trim function to replace whithespace after the string // trim function to replace whithespace after the string
String.prototype.rtrim = function () { String.prototype.rtrim = function () {
var trimmed = this.replace(/\s+$/g, ''); var trimmed = this.replace(/\s+$/g, "");
return trimmed; return trimmed;
}; };
@ -695,34 +705,40 @@ function scrollToItem(elementId) {
return; return;
} }
var $el = $('#' + elementId + ' > .media'); var $el = $("#" + elementId + " > .media");
// Test if the Item exists // Test if the Item exists
if (!$el.length) { if (!$el.length) {
return; return;
} }
// Define the colors which are used for highlighting // Define the colors which are used for highlighting
var colWhite = {backgroundColor:'#F5F5F5'}; var colWhite = { backgroundColor: "#F5F5F5" };
var colShiny = {backgroundColor:'#FFF176'}; var colShiny = { backgroundColor: "#FFF176" };
// Get the Item Position (we need to substract 100 to match correct position // Get the Item Position (we need to substract 100 to match correct position
var itemPos = $el.offset().top - 100; var itemPos = $el.offset().top - 100;
// Scroll to the DIV with the ID (GUID) // Scroll to the DIV with the ID (GUID)
$('html, body').animate({ $("html, body")
scrollTop: itemPos .animate(
}, 400).promise().done( function() { {
scrollTop: itemPos,
},
400,
)
.promise()
.done(function () {
// Highlight post/commenent with ID (GUID) // Highlight post/commenent with ID (GUID)
$el.animate(colWhite, 1000).animate(colShiny).animate({backgroundColor: 'transparent'}, 600); $el.animate(colWhite, 1000).animate(colShiny).animate({ backgroundColor: "transparent" }, 600);
}); });
} }
// format a html string to pure text // format a html string to pure text
function htmlToText(htmlString) { function htmlToText(htmlString) {
// Replace line breaks with spaces // Replace line breaks with spaces
var text = htmlString.replace(/<br>/g, ' '); var text = htmlString.replace(/<br>/g, " ");
// Strip the text out of the html string // Strip the text out of the html string
text = text.replace(/<[^>]*>/g, ''); text = text.replace(/<[^>]*>/g, "");
return text; return text;
} }
@ -736,10 +752,10 @@ function htmlToText(htmlString) {
* @param {boolean} un Whether to perform an activity removal instead of creation * @param {boolean} un Whether to perform an activity removal instead of creation
*/ */
function doLikeAction(ident, verb, un) { function doLikeAction(ident, verb, un) {
if (verb.indexOf('attend') === 0) { if (verb.indexOf("attend") === 0) {
$('.item-' + ident + ' .button-event:not(#' + verb + '-' + ident + ')').removeClass('active'); $(".item-" + ident + " .button-event:not(#" + verb + "-" + ident + ")").removeClass("active");
} }
$('#' + verb + '-' + ident).toggleClass('active'); $("#" + verb + "-" + ident).toggleClass("active");
dolike(ident, verb, un); dolike(ident, verb, un);
} }
@ -757,7 +773,7 @@ function hex2bin (s) {
var ret = []; var ret = [];
var i = 0; var i = 0;
var l; var l;
s += ''; s += "";
for (l = s.length; i < l; i += 2) { for (l = s.length; i < l; i += 2) {
var c = parseInt(s.substr(i, 1), 16); var c = parseInt(s.substr(i, 1), 16);
@ -782,7 +798,10 @@ function bin2hex (s) {
// * example 2: bin2hex(String.fromCharCode(0x00)); // * example 2: bin2hex(String.fromCharCode(0x00));
// * returns 2: '00' // * returns 2: '00'
var i, l, o = "", n; var i,
l,
o = "",
n;
s += ""; s += "";
@ -797,8 +816,11 @@ function bin2hex (s) {
// Dropdown menus with the class "dropdown-head" will display the active tab // Dropdown menus with the class "dropdown-head" will display the active tab
// as button text // as button text
function toggleDropdownText(elm) { function toggleDropdownText(elm) {
$(elm).closest(".dropdown").find('.btn').html($(elm).html() + ' <span class="caret"></span>'); $(elm)
$(elm).closest(".dropdown").find('.btn').val($(elm).data('value')); .closest(".dropdown")
.find(".btn")
.html($(elm).html() + ' <span class="caret"></span>');
$(elm).closest(".dropdown").find(".btn").val($(elm).data("value"));
$(elm).closest("ul").children("li").show(); $(elm).closest("ul").children("li").show();
$(elm).parent("li").hide(); $(elm).parent("li").hide();
} }

View file

@ -29,17 +29,20 @@
border_color: $link_color; border_color: $link_color;
} }
.dropdown-menu, .account .dropdown-menu { .dropdown-menu,
.account .dropdown-menu {
background-color: $background_color; background-color: $background_color;
} }
.dropdown-menu>li>a:focus, .dropdown-menu>li>a:hover { .dropdown-menu > li > a:focus,
.dropdown-menu > li > a:hover {
color: $link_color; color: $link_color;
} }
.account .dropdown-menu li { .account .dropdown-menu li {
border-color: $background_color; border-color: $background_color;
} }
.dropdown-menu > li > a:focus, .dropdown-menu > li > a:hover { .dropdown-menu > li > a:focus,
.dropdown-menu > li > a:hover {
background-image: none; background-image: none;
background-color: rgba(232, 232, 232, $contentbg_transp); background-color: rgba(232, 232, 232, $contentbg_transp);
} }
@ -61,9 +64,9 @@
border-color: #a0a0a0; border-color: #a0a0a0;
} }
input[type=text], input[type="text"],
input[type=submit], input[type="submit"],
button[type=submit]:not(.btn), button[type="submit"]:not(.btn),
select, select,
textarea, textarea,
.form-control { .form-control {
@ -73,11 +76,13 @@ textarea,
box-shadow: 0 0 3px #dadada; box-shadow: 0 0 3px #dadada;
-webkit-box-shadow: 0 0 3px #dadada; -webkit-box-shadow: 0 0 3px #dadada;
} }
input[type=range] { input[type="range"] {
box-shadow: none; box-shadow: none;
} }
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { .form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
background-color: $background_color; background-color: $background_color;
color: $font_color_darker; color: $font_color_darker;
} }
@ -97,7 +102,8 @@ main .nav-tabs>li.active>a:hover {
color: $font_color_darker; color: $font_color_darker;
} }
.nav > li > a:focus, .nav > li > a:hover { .nav > li > a:focus,
.nav > li > a:hover {
background-color: rgba(238, 238, 238, $contentbg_transp); background-color: rgba(238, 238, 238, $contentbg_transp);
} }
@ -126,7 +132,8 @@ main .nav-tabs>li.active>a:hover {
color: $font_color; color: $font_color;
} }
.pagination>li>a:hover, .pagination>li>span:hover { .pagination > li > a:hover,
.pagination > li > span:hover {
background-color: $nav_bg; background-color: $nav_bg;
} }
@ -139,7 +146,8 @@ main .nav-tabs>li.active>a:hover {
color: $font_color; color: $font_color;
text-shadow: 0 1px 0 $nav_bg; text-shadow: 0 1px 0 $nav_bg;
} }
.close:focus, .close:hover { .close:focus,
.close:hover {
color: $link_color; color: $link_color;
} }
@ -174,19 +182,23 @@ main .nav-tabs>li.active>a:hover {
background: none; background: none;
color: $font_color_darker; color: $font_color_darker;
} }
.btn.focus, .btn:focus, .btn:hover { .btn.focus,
.btn:focus,
.btn:hover {
color: $font_color; color: $font_color;
} }
.btn-default:focus, .btn-default:hover { .btn-default:focus,
.btn-default:hover {
background: $nav_bg; background: $nav_bg;
} }
.btn-default.active, .btn-default:active { .btn-default.active,
.btn-default:active {
background-color: $nav_bg; background-color: $nav_bg;
color: $font_color; color: $font_color;
} }
button[type=submit]:not(.btn), button[type="submit"]:not(.btn),
input[type=submit], input[type="submit"],
.btn.btn-primary { .btn.btn-primary {
border: 1px solid $link_color; border: 1px solid $link_color;
} }
@ -285,7 +297,8 @@ input[type=submit],
box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5); box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
-webkit-box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5); -webkit-box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
} }
.hovercard, .hover-card-footer { .hovercard,
.hover-card-footer {
background-color: $nav_bg; background-color: $nav_bg;
} }
.hovercard.top > .arrow:after { .hovercard.top > .arrow:after {
@ -305,14 +318,13 @@ input[type=submit],
color: inherit; color: inherit;
} }
code { code {
color: $font_color; color: $font_color;
background-color: rgba(255, 255, 255, .2); background-color: rgba(255, 255, 255, 0.2);
} }
pre { pre {
color: $font_color_darker; color: $font_color_darker;
background-color: rgba(255, 255, 255, .05); background-color: rgba(255, 255, 255, 0.05);
} }
legend { legend {
@ -334,7 +346,8 @@ section > .generic-page-wrapper,
.delegation-content-wrapper, .delegation-content-wrapper,
.notes-content-wrapper, .notes-content-wrapper,
.message-content-wrapper, .message-content-wrapper,
.apps-content-wrapper, #adminpage, .apps-content-wrapper,
#adminpage,
.delegate-content-wrapper, .delegate-content-wrapper,
.uexport-content-wrapper, .uexport-content-wrapper,
.dfrn_request-content-wrapper, .dfrn_request-content-wrapper,
@ -348,13 +361,12 @@ section > .generic-page-wrapper,
.panel, .panel,
aside .widget, aside .widget,
.nav-container .widget, .nav-container .widget,
#back-to-top #back-to-top {
{
box-shadow: 0 0 3px $link_color; box-shadow: 0 0 3px $link_color;
-webkit-box-shadow: 0 0 3px $link_color; -webkit-box-shadow: 0 0 3px $link_color;
} }
input[type=text].tt-input { input[type="text"].tt-input {
box-shadow: none; box-shadow: none;
} }

View file

@ -29,17 +29,20 @@
border_color: $link_color; border_color: $link_color;
} }
.dropdown-menu, .account .dropdown-menu { .dropdown-menu,
.account .dropdown-menu {
background-color: $background_color; background-color: $background_color;
} }
.dropdown-menu>li>a:focus, .dropdown-menu>li>a:hover { .dropdown-menu > li > a:focus,
.dropdown-menu > li > a:hover {
color: $link_color; color: $link_color;
} }
.account .dropdown-menu li { .account .dropdown-menu li {
border-color: $background_color; border-color: $background_color;
} }
.dropdown-menu > li > a:focus, .dropdown-menu > li > a:hover { .dropdown-menu > li > a:focus,
.dropdown-menu > li > a:hover {
background-image: none; background-image: none;
background-color: rgba(232, 232, 232, $contentbg_transp); background-color: rgba(232, 232, 232, $contentbg_transp);
} }
@ -60,9 +63,9 @@
-webkit-box-shadow: 0 0 3px #dadada; -webkit-box-shadow: 0 0 3px #dadada;
} }
input[type=text], input[type="text"],
input[type=submit], input[type="submit"],
button[type=submit]:not(.btn), button[type="submit"]:not(.btn),
select, select,
textarea, textarea,
.form-control { .form-control {
@ -72,7 +75,7 @@ textarea,
box-shadow: 0 0 3px #dadada; box-shadow: 0 0 3px #dadada;
-webkit-box-shadow: 0 0 3px #dadada; -webkit-box-shadow: 0 0 3px #dadada;
} }
input[type=range] { input[type="range"] {
box-shadow: none; box-shadow: none;
} }
@ -183,8 +186,8 @@ main .nav-tabs>li.active>a:hover {
color: $font_color; color: $font_color;
} }
button[type=submit]:not(.btn), button[type="submit"]:not(.btn),
input[type=submit], input[type="submit"],
.btn.btn-primary { .btn.btn-primary {
border: 1px solid $link_color; border: 1px solid $link_color;
} }
@ -304,14 +307,13 @@ input[type=submit],
color: inherit; color: inherit;
} }
code { code {
color: $font_color; color: $font_color;
background-color: rgba(255, 255, 255, .2); background-color: rgba(255, 255, 255, 0.2);
} }
pre { pre {
color: $font_color_darker; color: $font_color_darker;
background-color: rgba(255, 255, 255, .05); background-color: rgba(255, 255, 255, 0.05);
} }
legend { legend {
@ -324,7 +326,7 @@ legend {
background-color: $nav_bg; background-color: $nav_bg;
} }
input[type=text].tt-input { input[type="text"].tt-input {
box-shadow: none; box-shadow: none;
} }

View file

@ -5,17 +5,27 @@
Author : koyu Author : koyu
*/ */
#topbar-first, #topbar-second, body { #topbar-first,
#topbar-second,
body {
background: #111; background: #111;
border: 0; border: 0;
} }
#topbar-first .dropdown.account > a, #topbar-first .dropdown.account.open > a, #topbar-first .dropdown.account > button, #topbar-first .dropdown.account.open > button, #topbar-first .dropdown.account > :hover, #topbar-first .dropdown.account.open > :hover { #topbar-first .dropdown.account > a,
#topbar-first .dropdown.account.open > a,
#topbar-first .dropdown.account > button,
#topbar-first .dropdown.account.open > button,
#topbar-first .dropdown.account > :hover,
#topbar-first .dropdown.account.open > :hover {
background: #111; background: #111;
border: 0; border: 0;
} }
.nav-pills .dropdown-menu, .nav-tabs .dropdown-menu, .account .dropdown-menu, .contact-photo-wrapper .dropdown-menu { .nav-pills .dropdown-menu,
.nav-tabs .dropdown-menu,
.account .dropdown-menu,
.contact-photo-wrapper .dropdown-menu {
background: #111; background: #111;
-webkit-box-shadow: 0px 0px 69px 4px rgba(0, 0, 0, 0.25); -webkit-box-shadow: 0px 0px 69px 4px rgba(0, 0, 0, 0.25);
-moz-box-shadow: 0px 0px 69px 4px rgba(0, 0, 0, 0.25); -moz-box-shadow: 0px 0px 69px 4px rgba(0, 0, 0, 0.25);
@ -23,7 +33,8 @@
border: 0; border: 0;
} }
.account .dropdown-menu li, .account .dropdown-menu li:hover { .account .dropdown-menu li,
.account .dropdown-menu li:hover {
border: 0; border: 0;
background: #111; background: #111;
} }

View file

@ -50,17 +50,19 @@ aside .widget li.selected,
.panel, .panel,
aside .widget, aside .widget,
.nav-container .widget, .nav-container .widget,
#profile-page, .photos-content-wrapper, #profile-page,
.photos-content-wrapper,
.settings-content-wrapper { .settings-content-wrapper {
border-style: solid solid solid solid; border-style: solid solid solid solid;
border-width: 1px; border-width: 1px;
border-color: #DDDDDD; border-color: #dddddd;
box-shadow: none; box-shadow: none;
border-radius: 15px; border-radius: 15px;
color: #000; color: #000;
} }
aside .widget li a, aside .widget li a:hover, aside .widget li a,
aside .widget li a:hover,
.panel .panel-body .wall-item-content, .panel .panel-body .wall-item-content,
.toplevel_item .wall-item-container .btn-link { .toplevel_item .wall-item-container .btn-link {
color: #000; color: #000;

View file

@ -16,13 +16,25 @@ body {
height: auto; height: auto;
} }
aside .widget, .form-control, .panel, .nav-container, .wall-item-content, .e-content, .p-name, .topbar, post, shiny, tread-wrapper, #topbar-second { aside .widget,
.form-control,
.panel,
.nav-container,
.wall-item-content,
.e-content,
.p-name,
.topbar,
post,
shiny,
tread-wrapper,
#topbar-second {
color: #000; color: #000;
background-color: #f5f5f5; background-color: #f5f5f5;
} }
.form-control { .form-control {
font-family: ".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Helvetica,Arial,sans-serif; font-family: ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande",
Helvetica, Arial, sans-serif;
} }
#topbar-first #nav-notifications-menu li.notification-unseen { #topbar-first #nav-notifications-menu li.notification-unseen {
@ -93,7 +105,23 @@ aside .widget, .form-control, .panel, .nav-container, .wall-item-content, .e-con
font-size: 12px; font-size: 12px;
} }
.wall-item-content .clearfix .post .comment-container .well .well-sm .wall-item-body .e-content .p-name .media .comment .wall-item-bottom .wall-item-links .wall-item-tags .wall-item-actions .wall-item-responses #hr { .wall-item-content
.clearfix
.post
.comment-container
.well
.well-sm
.wall-item-body
.e-content
.p-name
.media
.comment
.wall-item-bottom
.wall-item-links
.wall-item-tags
.wall-item-actions
.wall-item-responses
#hr {
box-sizing: border-box; box-sizing: border-box;
margin-top: 0px; margin-top: 0px;
margin-bottom: 0px; margin-bottom: 0px;

View file

@ -7,31 +7,39 @@
<div id="banner" class="hidden-sm hidden-xs"> <div id="banner" class="hidden-sm hidden-xs">
{{* show on remote/visitor connections an other logo which symols that fact*}} {{* show on remote/visitor connections an other logo which symols that fact*}}
{{if $nav.remote}} {{if $nav.remote}}
<a href="{{$baseurl}}"><div id="remote-logo-img" aria-label="{{$home}}"></div></a> <a href="{{$baseurl}}">
<div id="remote-logo-img" aria-label="{{$home}}"></div>
</a>
{{else}} {{else}}
{{* #logo-img is the the placeholder to insert a mask (friendica logo) into this div {{* #logo-img is the the placeholder to insert a mask (friendica logo) into this div
For Firefox we have to call the paths of the mask (look at the bottom of this file). For Firefox we have to call the paths of the mask (look at the bottom of this file).
Because for FF we need relative paths we apply them with js after the page is loaded (look at theme.js *}} Because for FF we need relative paths we apply them with js after the page is loaded (look at theme.js *}}
<a href="{{$baseurl}}"><div id="logo-img" aria-label="{{$home}}"></div></a> <a href="{{$baseurl}}">
<div id="logo-img" aria-label="{{$home}}"></div>
</a>
{{/if}} {{/if}}
</div> </div>
</header> </header>
<nav id="topbar-first" class="topbar"> <nav id="topbar-first" class="topbar">
<div class="container"> <div class="container">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding"><!-- div for navbar width--> <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding">
<!-- div for navbar width-->
<!-- Brand and toggle get grouped for better mobile display --> <!-- Brand and toggle get grouped for better mobile display -->
<div class="topbar-nav" role="navigation"> <div class="topbar-nav" role="navigation">
{{* Buttons for the mobile view *}} {{* Buttons for the mobile view *}}
<button type="button" class="navbar-toggle collapsed pull-right" data-toggle="offcanvas" data-target="#myNavmenu" aria-controls="myNavmenu" aria-haspopup="true"> <button type="button" class="navbar-toggle collapsed pull-right" data-toggle="offcanvas"
data-target="#myNavmenu" aria-controls="myNavmenu" aria-haspopup="true">
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>
<i class="fa fa-ellipsis-v fa-fw fa-lg" aria-hidden="true"></i> <i class="fa fa-ellipsis-v fa-fw fa-lg" aria-hidden="true"></i>
</button> </button>
<button type="button" class="navbar-toggle collapsed pull-right" data-toggle="collapse" data-target="#search-mobile" aria-expanded="false" aria-controls="search-mobile"> <button type="button" class="navbar-toggle collapsed pull-right" data-toggle="collapse"
data-target="#search-mobile" aria-expanded="false" aria-controls="search-mobile">
<span class="sr-only">Toggle Search</span> <span class="sr-only">Toggle Search</span>
<i class="fa fa-search fa-fw fa-lg" aria-hidden="true" style="color:#FFF;"></i> <i class="fa fa-search fa-fw fa-lg" aria-hidden="true" style="color:#FFF;"></i>
</button> </button>
<button type="button" class="navbar-toggle collapsed pull-left visible-sm visible-xs" data-toggle="offcanvas" data-target="aside" aria-haspopup="true"> <button type="button" class="navbar-toggle collapsed pull-left visible-sm visible-xs"
data-toggle="offcanvas" data-target="aside" aria-haspopup="true">
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>
<i class="fa fa-ellipsis-v fa-fw fa-lg" aria-hidden="true"></i> <i class="fa fa-ellipsis-v fa-fw fa-lg" aria-hidden="true"></i>
</button> </button>
@ -40,54 +48,77 @@
<ul class="nav navbar-left" role="menubar"> <ul class="nav navbar-left" role="menubar">
{{if $nav.network}} {{if $nav.network}}
<li class="nav-segment"> <li class="nav-segment">
<a accesskey="n" class="nav-menu {{$sel.network}}" href="{{$nav.network.0}}" data-toggle="tooltip" aria-label="{{$nav.network.3}}" title="{{$nav.network.3}}"><i class="fa fa-lg fa-th fa-fw" aria-hidden="true"></i><span id="net-update" class="nav-network-badge badge nav-notification"></span></a> <a accesskey="n" class="nav-menu {{$sel.network}}" href="{{$nav.network.0}}"
data-toggle="tooltip" aria-label="{{$nav.network.3}}" title="{{$nav.network.3}}"><i
class="fa fa-lg fa-th fa-fw" aria-hidden="true"></i><span id="net-update"
class="nav-network-badge badge nav-notification"></span></a>
</li> </li>
{{/if}} {{/if}}
{{if $nav.home}} {{if $nav.home}}
<li class="nav-segment"> <li class="nav-segment">
<a accesskey="p" class="nav-menu {{$sel.home}}" href="{{$nav.home.0}}" data-toggle="tooltip" aria-label="{{$nav.home.3}}" title="{{$nav.home.3}}"><i class="fa fa-lg fa-home fa-fw" aria-hidden="true"></i><span id="home-update" class="nav-home-badge badge nav-notification"></span></a> <a accesskey="p" class="nav-menu {{$sel.home}}" href="{{$nav.home.0}}" data-toggle="tooltip"
aria-label="{{$nav.home.3}}" title="{{$nav.home.3}}"><i class="fa fa-lg fa-home fa-fw"
aria-hidden="true"></i><span id="home-update"
class="nav-home-badge badge nav-notification"></span></a>
</li> </li>
{{/if}} {{/if}}
{{if $nav.community}} {{if $nav.community}}
<li class="nav-segment"> <li class="nav-segment">
<a accesskey="c" class="nav-menu {{$sel.community}}" href="{{$nav.community.0}}" data-toggle="tooltip" aria-label="{{$nav.community.3}}" title="{{$nav.community.3}}"><i class="fa fa-lg fa-bullseye fa-fw" aria-hidden="true"></i></a> <a accesskey="c" class="nav-menu {{$sel.community}}" href="{{$nav.community.0}}"
data-toggle="tooltip" aria-label="{{$nav.community.3}}" title="{{$nav.community.3}}"><i
class="fa fa-lg fa-bullseye fa-fw" aria-hidden="true"></i></a>
</li> </li>
{{/if}} {{/if}}
{{if $nav.messages}} {{if $nav.messages}}
<li class="nav-segment hidden-xs"> <li class="nav-segment hidden-xs">
<a accesskey="m" id="nav-messages-link" href="{{$nav.messages.0}}" data-toggle="tooltip" aria-label="{{$nav.messages.1}}" title="{{$nav.messages.1}}" class="nav-menu {{$sel.messages}}"><i class="fa fa-envelope fa-lg fa-fw" aria-hidden="true"></i><span id="mail-update" class="nav-mail-badge badge nav-notification"></span></a> <a accesskey="m" id="nav-messages-link" href="{{$nav.messages.0}}" data-toggle="tooltip"
aria-label="{{$nav.messages.1}}" title="{{$nav.messages.1}}"
class="nav-menu {{$sel.messages}}"><i class="fa fa-envelope fa-lg fa-fw"
aria-hidden="true"></i><span id="mail-update"
class="nav-mail-badge badge nav-notification"></span></a>
</li> </li>
{{/if}} {{/if}}
{{if $nav.events}} {{if $nav.events}}
<li class="nav-segment hidden-xs"> <li class="nav-segment hidden-xs">
<a accesskey="e" id="nav-events-link" href="{{$nav.events.0}}" data-toggle="tooltip" aria-label="{{$nav.events.1}}" title="{{$nav.events.1}}" class="nav-menu"><i class="fa fa-lg fa-calendar fa-fw"></i></a> <a accesskey="e" id="nav-events-link" href="{{$nav.events.0}}" data-toggle="tooltip"
aria-label="{{$nav.events.1}}" title="{{$nav.events.1}}" class="nav-menu"><i
class="fa fa-lg fa-calendar fa-fw"></i></a>
</li> </li>
{{/if}} {{/if}}
{{if $nav.contacts}} {{if $nav.contacts}}
<li class="nav-segment hidden-xs"> <li class="nav-segment hidden-xs">
<a accesskey="k" id="nav-contacts-link" href="{{$nav.contacts.0}}" data-toggle="tooltip" aria-label="{{$nav.contacts.1}}" title="{{$nav.contacts.1}}"class="nav-menu {{$sel.contacts}} {{$nav.contacts.2}}"><i class="fa fa-users fa-lg fa-fw"></i></a> <a accesskey="k" id="nav-contacts-link" href="{{$nav.contacts.0}}" data-toggle="tooltip"
aria-label="{{$nav.contacts.1}}" title="{{$nav.contacts.1}}"
class="nav-menu {{$sel.contacts}} {{$nav.contacts.2}}"><i
class="fa fa-users fa-lg fa-fw"></i></a>
</li> </li>
{{/if}} {{/if}}
{{* The notifications dropdown *}} {{* The notifications dropdown *}}
{{if $nav.notifications}} {{if $nav.notifications}}
<li id="nav-notification" class="nav-segment dropdown" role="presentation"> <li id="nav-notification" class="nav-segment dropdown" role="presentation">
<button id="nav-notifications-menu-btn" class="btn-link dropdown-toggle" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false" aria-controls="nav-notifications-menu"> <button id="nav-notifications-menu-btn" class="btn-link dropdown-toggle" data-toggle="dropdown"
type="button" aria-haspopup="true" aria-expanded="false"
aria-controls="nav-notifications-menu">
<span id="notification-update" class="nav-notification-badge badge nav-notification"></span> <span id="notification-update" class="nav-notification-badge badge nav-notification"></span>
<i class="fa fa-bell fa-lg" aria-label="{{$nav.notifications.1}}"></i> <i class="fa fa-bell fa-lg" aria-label="{{$nav.notifications.1}}"></i>
</button> </button>
{{* The notifications dropdown menu. There are two parts of menu. The second is at the bottom of this file. It is loaded via js. Look at nav-notifications-template *}} {{* The notifications dropdown menu. There are two parts of menu. The second is at the bottom of this file. It is loaded via js. Look at nav-notifications-template *}}
<ul id="nav-notifications-menu" class="dropdown-menu menu-popup" role="menu" aria-labelledby="nav-notifications-menu-btn"> <ul id="nav-notifications-menu" class="dropdown-menu menu-popup" role="menu"
aria-labelledby="nav-notifications-menu-btn">
{{* the following list entry must have the id "nav-notificaionts-mark-all". Without it this isn't visable. ....strange behavior :-/ *}} {{* the following list entry must have the id "nav-notificaionts-mark-all". Without it this isn't visable. ....strange behavior :-/ *}}
<li role="presentation" id="nav-notifications-mark-all" class="dropdown-header"> <li role="presentation" id="nav-notifications-mark-all" class="dropdown-header">
<div class="arrow"></div> <div class="arrow"></div>
{{$nav.notifications.1}} {{$nav.notifications.1}}
<div class="dropdown-header-link"> <div class="dropdown-header-link">
<button role="menuitem" type="button" class="btn-link" onclick="notificationMarkAll();" data-toggle="tooltip" aria-label="{{$nav.notifications.mark.3}}" title="{{$nav.notifications.mark.3}}">{{$nav.notifications.mark.1}}</button> <button role="menuitem" type="button" class="btn-link"
onclick="notificationMarkAll();" data-toggle="tooltip"
aria-label="{{$nav.notifications.mark.3}}"
title="{{$nav.notifications.mark.3}}">{{$nav.notifications.mark.1}}</button>
</div> </div>
</li> </li>
@ -112,8 +143,11 @@
<form class="navbar-form" role="search" method="get" action="{{$nav.search.0}}"> <form class="navbar-form" role="search" method="get" action="{{$nav.search.0}}">
<!-- <img class="hidden-xs" src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}" style="max-width:33px; max-height:33px; min-width:33px; min-height:33px; width:33px; height:33px;"> --> <!-- <img class="hidden-xs" src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}" style="max-width:33px; max-height:33px; min-width:33px; min-height:33px; width:33px; height:33px;"> -->
<div class="form-group form-group-search"> <div class="form-group form-group-search">
<input accesskey="s" id="nav-search-input-field" class="form-control form-search" type="text" name="q" data-toggle="tooltip" title="{{$search_hint}}" placeholder="{{$nav.search.1}}"> <input accesskey="s" id="nav-search-input-field" class="form-control form-search"
<button class="btn btn-default btn-sm form-button-search" type="submit">{{$nav.search.1}}</button> type="text" name="q" data-toggle="tooltip" title="{{$search_hint}}"
placeholder="{{$nav.search.1}}">
<button class="btn btn-default btn-sm form-button-search"
type="submit">{{$nav.search.1}}</button>
</div> </div>
</form> </form>
</li> </li>
@ -122,7 +156,9 @@
{{* The user dropdown menu *}} {{* The user dropdown menu *}}
{{if $nav.userinfo}} {{if $nav.userinfo}}
<li id="nav-user-linkmenu" class="dropdown account nav-menu hidden-xs"> <li id="nav-user-linkmenu" class="dropdown account nav-menu hidden-xs">
<button accesskey="u" id="main-menu" class="btn-link dropdown-toggle nav-avatar" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false" aria-controls="nav-user-menu"> <button accesskey="u" id="main-menu" class="btn-link dropdown-toggle nav-avatar"
data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false"
aria-controls="nav-user-menu">
<div aria-hidden="true" class="user-title pull-left hidden-xs hidden-sm hidden-md"> <div aria-hidden="true" class="user-title pull-left hidden-xs hidden-sm hidden-md">
<strong>{{$nav.userinfo.name}}</strong><br> <strong>{{$nav.userinfo.name}}</strong><br>
{{if $nav.remote}}<span class="trunctate">{{$nav.remote}}</span>{{/if}} {{if $nav.remote}}<span class="trunctate">{{$nav.remote}}</span>{{/if}}
@ -133,52 +169,91 @@
</button> </button>
{{* The list of available usermenu links *}} {{* The list of available usermenu links *}}
<ul id="nav-user-menu" class="dropdown-menu pull-right menu-popup" role="menu" aria-labelledby="main-menu"> <ul id="nav-user-menu" class="dropdown-menu pull-right menu-popup" role="menu"
{{if $nav.remote}}{{if $nav.sitename}} aria-labelledby="main-menu">
{{if $nav.remote}}
{{if $nav.sitename}}
<li id="nav-sitename" role="menuitem">{{$nav.sitename}}</li> <li id="nav-sitename" role="menuitem">{{$nav.sitename}}</li>
<li role="presentation" class="divider"></li> <li role="presentation" class="divider"></li>
{{/if}}{{/if}} {{/if}}
{{/if}}
{{foreach $nav.usermenu as $usermenu}} {{foreach $nav.usermenu as $usermenu}}
<li role="presentation"><a role="menuitem" class="{{$usermenu.2}}" href="{{$usermenu.0}}" title="{{$usermenu.3}}">{{$usermenu.1}}</a></li> <li role="presentation"><a role="menuitem" class="{{$usermenu.2}}" href="{{$usermenu.0}}"
title="{{$usermenu.3}}">{{$usermenu.1}}</a></li>
{{/foreach}} {{/foreach}}
<li role="presentation" class="divider"></li> <li role="presentation" class="divider"></li>
{{if $nav.notifications}} {{if $nav.notifications}}
<li role="presentation"><a role="menuitem" href="{{$nav.notifications.all.0}}" title="{{$nav.notifications.1}}"><i class="fa fa-bell fa-fw" aria-hidden="true"></i> {{$nav.notifications.1}}</a></li> <li role="presentation"><a role="menuitem" href="{{$nav.notifications.all.0}}"
title="{{$nav.notifications.1}}"><i class="fa fa-bell fa-fw" aria-hidden="true"></i>
{{$nav.notifications.1}}</a></li>
{{/if}} {{/if}}
{{if $nav.messages}} {{if $nav.messages}}
<li role="presentation"><a role="menuitem" class="nav-commlink {{$nav.messages.2}} {{$sel.messages}}" href="{{$nav.messages.0}}" title="{{$nav.messages.3}}" ><i class="fa fa-envelope fa-fw" aria-hidden="true"></i> {{$nav.messages.1}} <span id="mail-update-li" class="nav-mail-badge badge nav-notification"></span></a></li> <li role="presentation"><a role="menuitem"
class="nav-commlink {{$nav.messages.2}} {{$sel.messages}}"
href="{{$nav.messages.0}}" title="{{$nav.messages.3}}"><i
class="fa fa-envelope fa-fw" aria-hidden="true"></i> {{$nav.messages.1}} <span
id="mail-update-li" class="nav-mail-badge badge nav-notification"></span></a>
</li>
{{/if}} {{/if}}
<li role="presentation" class="divider"></li> <li role="presentation" class="divider"></li>
{{if $nav.contacts}} {{if $nav.contacts}}
<li role="presentation"><a role="menuitem" id="nav-menu-contacts-link" class="nav-link {{$nav.contacts.2}}" href="{{$nav.contacts.0}}" title="{{$nav.contacts.3}}"><i class="fa fa-users fa-fw" aria-hidden="true"></i> {{$nav.contacts.1}}</a></li> <li role="presentation"><a role="menuitem" id="nav-menu-contacts-link"
class="nav-link {{$nav.contacts.2}}" href="{{$nav.contacts.0}}"
title="{{$nav.contacts.3}}"><i class="fa fa-users fa-fw" aria-hidden="true"></i>
{{$nav.contacts.1}}</a></li>
{{/if}} {{/if}}
{{if $nav.delegation}} {{if $nav.delegation}}
<li role="presentation"><a role="menuitem" id="nav-delegation-link" class="nav-commlink {{$nav.delegation.2}} {{$sel.delegation}}" href="{{$nav.delegation.0}}" title="{{$nav.delegation.3}}"><i class="fa fa-flag fa-fw" aria-hidden="true"></i> {{$nav.delegation.1}}</a></li> <li role="presentation"><a role="menuitem" id="nav-delegation-link"
class="nav-commlink {{$nav.delegation.2}} {{$sel.delegation}}"
href="{{$nav.delegation.0}}" title="{{$nav.delegation.3}}"><i
class="fa fa-flag fa-fw" aria-hidden="true"></i> {{$nav.delegation.1}}</a></li>
{{/if}} {{/if}}
<li role="presentation"><a role="menuitem" id="nav-directory-link" class="nav-link {{$nav.directory.2}}" href="{{$nav.directory.0}}" title="{{$nav.directory.3}}"><i class="fa fa-sitemap fa-fw" aria-hidden="true"></i>{{$nav.directory.1}}</a></li> <li role="presentation"><a role="menuitem" id="nav-directory-link"
class="nav-link {{$nav.directory.2}}" href="{{$nav.directory.0}}"
title="{{$nav.directory.3}}"><i class="fa fa-sitemap fa-fw"
aria-hidden="true"></i>{{$nav.directory.1}}</a></li>
<li role="presentation" class="divider"></li> <li role="presentation" class="divider"></li>
{{if $nav.apps}} {{if $nav.apps}}
<li role="presentation"><a role="menuitem" id="nav-apps-link" class="nav-link {{$nav.apps.2}}" href="{{$nav.apps.0}}" title="{{$nav.apps.3}}" ><i class="fa fa-puzzle-piece fa-fw" aria-hidden="true"></i> {{$nav.apps.1}}</a> <li role="presentation"><a role="menuitem" id="nav-apps-link"
class="nav-link {{$nav.apps.2}}" href="{{$nav.apps.0}}" title="{{$nav.apps.3}}"><i
class="fa fa-puzzle-piece fa-fw" aria-hidden="true"></i> {{$nav.apps.1}}</a>
<li role="presentation" class="divider"></li> <li role="presentation" class="divider"></li>
{{/if}} {{/if}}
{{if $nav.help}} {{if $nav.help}}
<li role="presentation"><a role="menuitem" id="nav-help-link" class="nav-link {{$nav.help.2}}" href="{{$nav.help.0}}" title="{{$nav.help.3}}" ><i class="fa fa-question-circle fa-fw" aria-hidden="true"></i> {{$nav.help.1}}</a></li> <li role="presentation"><a role="menuitem" id="nav-help-link"
class="nav-link {{$nav.help.2}}" href="{{$nav.help.0}}" title="{{$nav.help.3}}"><i
class="fa fa-question-circle fa-fw" aria-hidden="true"></i> {{$nav.help.1}}</a>
</li>
{{/if}} {{/if}}
{{if $nav.settings}} {{if $nav.settings}}
<li role="presentation"><a role="menuitem" id="nav-settings-link" class="nav-link {{$nav.settings.2}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}"><i class="fa fa-cog fa-fw" aria-hidden="true"></i> {{$nav.settings.1}}</a></li> <li role="presentation"><a role="menuitem" id="nav-settings-link"
class="nav-link {{$nav.settings.2}}" href="{{$nav.settings.0}}"
title="{{$nav.settings.3}}"><i class="fa fa-cog fa-fw" aria-hidden="true"></i>
{{$nav.settings.1}}</a></li>
{{/if}} {{/if}}
{{if $nav.admin}} {{if $nav.admin}}
<li role="presentation"><a accesskey="a" role="menuitem" id="nav-admin-link" class="nav-link {{$nav.admin.2}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" ><i class="fa fa-user-secret fa-fw" aria-hidden="true"></i> {{$nav.admin.1}}</a></li> <li role="presentation"><a accesskey="a" role="menuitem" id="nav-admin-link"
class="nav-link {{$nav.admin.2}}" href="{{$nav.admin.0}}"
title="{{$nav.admin.3}}"><i class="fa fa-user-secret fa-fw" aria-hidden="true"></i>
{{$nav.admin.1}}</a></li>
{{/if}} {{/if}}
{{if $nav.tos}} {{if $nav.tos}}
<li role="presentation" class="divider"></li> <li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" id="nav-tos-link" class="nav-link {{$nav.tos.2}}" href="{{$nav.tos.0}}" title="{{$nav.tos.3}}" ><i class="fa fa-file-text" aria-hidden="true"></i> {{$nav.tos.1}}</a></li> <li role="presentation"><a role="menuitem" id="nav-tos-link" class="nav-link {{$nav.tos.2}}"
href="{{$nav.tos.0}}" title="{{$nav.tos.3}}"><i class="fa fa-file-text"
aria-hidden="true"></i> {{$nav.tos.1}}</a></li>
{{/if}} {{/if}}
<li role="presentation" class="divider"></li> <li role="presentation" class="divider"></li>
{{if $nav.logout}} {{if $nav.logout}}
<li role="presentation"><a role="menuitem" id="nav-logout-link" class="nav-link {{$nav.logout.2}}" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" ><i class="fa fa fa-sign-out fa-fw" aria-hidden="true"></i> {{$nav.logout.1}}</a></li> <li role="presentation"><a role="menuitem" id="nav-logout-link"
class="nav-link {{$nav.logout.2}}" href="{{$nav.logout.0}}"
title="{{$nav.logout.3}}"><i class="fa fa fa-sign-out fa-fw" aria-hidden="true"></i>
{{$nav.logout.1}}</a></li>
{{else}} {{else}}
<li role="presentation"><a role="menuitem" id="nav-login-link" class="nav-login-link {{$nav.login.2}}" href="{{$nav.login.0}}" title="{{$nav.login.3}}" ><i class="fa fa-power-off fa-fw" aria-hidden="true"></i> {{$nav.login.1}}</a></li> <li role="presentation"><a role="menuitem" id="nav-login-link"
class="nav-login-link {{$nav.login.2}}" href="{{$nav.login.0}}"
title="{{$nav.login.3}}"><i class="fa fa-power-off fa-fw" aria-hidden="true"></i>
{{$nav.login.1}}</a></li>
{{/if}} {{/if}}
</ul> </ul>
</li>{{* End of userinfo dropdown menu *}} </li>{{* End of userinfo dropdown menu *}}
@ -194,39 +269,67 @@
<div id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-right offcanvas"> <div id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-right offcanvas">
<div class="nav-container"> <div class="nav-container">
<ul role="menu" class="list-group"> <ul role="menu" class="list-group">
{{if $nav.remote}}{{if $nav.sitename}} {{if $nav.remote}}
{{if $nav.sitename}}
<li role="menuitem" class="nav-sitename list-group-item">{{$nav.sitename}}</li> <li role="menuitem" class="nav-sitename list-group-item">{{$nav.sitename}}</li>
{{/if}}{{/if}} {{/if}}
<li role="presentation" class="list-group-item"><img src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}" style="max-width:15px; max-height:15px; min-width:15px; min-height:15px; width:15px; height:15px;"> {{$nav.userinfo.name}}{{if $nav.remote}} ({{$nav.remote}}){{/if}}</li> {{/if}}
<li role="presentation" class="list-group-item"><img src="{{$nav.userinfo.icon}}"
alt="{{$nav.userinfo.name}}"
style="max-width:15px; max-height:15px; min-width:15px; min-height:15px; width:15px; height:15px;">
{{$nav.userinfo.name}}{{if $nav.remote}} ({{$nav.remote}}){{/if}}</li>
{{foreach $nav.usermenu as $usermenu}} {{foreach $nav.usermenu as $usermenu}}
<li role="menuitem" class="list-group-item"><a role="menuitem" class="{{$usermenu.2}}" href="{{$usermenu.0}}" title="{{$usermenu.3}}">{{$usermenu.1}}</a></li> <li role="menuitem" class="list-group-item"><a role="menuitem" class="{{$usermenu.2}}"
href="{{$usermenu.0}}" title="{{$usermenu.3}}">{{$usermenu.1}}</a></li>
{{/foreach}} {{/foreach}}
{{if $nav.notifications}} {{if $nav.notifications}}
<li role="presentation" class="list-group-item"><a role="menuitem" href="{{$nav.notifications.all.0}}" title="{{$nav.notifications.1}}"><i class="fa fa-bell fa-fw" aria-hidden="true"></i> {{$nav.notifications.1}}</a></li> <li role="presentation" class="list-group-item"><a role="menuitem"
href="{{$nav.notifications.all.0}}" title="{{$nav.notifications.1}}"><i
class="fa fa-bell fa-fw" aria-hidden="true"></i> {{$nav.notifications.1}}</a></li>
{{/if}} {{/if}}
{{if $nav.contacts}} {{if $nav.contacts}}
<li role="presentation" class="list-group-item"><a role="menuitem" class="nav-link {{$nav.contacts.2}}" href="{{$nav.contacts.0}}" title="{{$nav.contacts.3}}"><i class="fa fa-users fa-fw" aria-hidden="true"></i> {{$nav.contacts.1}}</a></li> <li role="presentation" class="list-group-item"><a role="menuitem"
class="nav-link {{$nav.contacts.2}}" href="{{$nav.contacts.0}}"
title="{{$nav.contacts.3}}"><i class="fa fa-users fa-fw" aria-hidden="true"></i>
{{$nav.contacts.1}}</a></li>
{{/if}} {{/if}}
{{if $nav.messages}} {{if $nav.messages}}
<li role="presentation" class="list-group-item"><a role="menuitem" class="nav-link {{$nav.messages.2}} {{$sel.messages}}" href="{{$nav.messages.0}}" title="{{$nav.messages.3}}" ><i class="fa fa-envelope fa-fw" aria-hidden="true"></i> {{$nav.messages.1}}</a></li> <li role="presentation" class="list-group-item"><a role="menuitem"
class="nav-link {{$nav.messages.2}} {{$sel.messages}}" href="{{$nav.messages.0}}"
title="{{$nav.messages.3}}"><i class="fa fa-envelope fa-fw" aria-hidden="true"></i>
{{$nav.messages.1}}</a></li>
{{/if}} {{/if}}
{{if $nav.delegation}} {{if $nav.delegation}}
<li role="presentation" class="list-group-item"><a role="menuitem" class="nav-commlink {{$nav.delegation.2}} {{$sel.delegation}}" href="{{$nav.delegation.0}}" title="{{$nav.delegation.3}}"><i class="fa fa-flag fa-fw" aria-hidden="true"></i> {{$nav.delegation.1}}</a></li> <li role="presentation" class="list-group-item"><a role="menuitem"
class="nav-commlink {{$nav.delegation.2}} {{$sel.delegation}}"
href="{{$nav.delegation.0}}" title="{{$nav.delegation.3}}"><i class="fa fa-flag fa-fw"
aria-hidden="true"></i> {{$nav.delegation.1}}</a></li>
{{/if}} {{/if}}
{{if $nav.settings}} {{if $nav.settings}}
<li role="presentation" class="list-group-item"><a role="menuitem" class="nav-link {{$nav.settings.2}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}"><i class="fa fa-cog fa-fw" aria-hidden="true"></i> {{$nav.settings.1}}</a></li> <li role="presentation" class="list-group-item"><a role="menuitem"
class="nav-link {{$nav.settings.2}}" href="{{$nav.settings.0}}"
title="{{$nav.settings.3}}"><i class="fa fa-cog fa-fw" aria-hidden="true"></i>
{{$nav.settings.1}}</a></li>
{{/if}} {{/if}}
{{if $nav.admin}} {{if $nav.admin}}
<li role="presentation" class="list-group-item"><a role="menuitem" class="nav-link {{$nav.admin.2}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" ><i class="fa fa-user-secret fa-fw" aria-hidden="true"></i> {{$nav.admin.1}}</a></li> <li role="presentation" class="list-group-item"><a role="menuitem"
class="nav-link {{$nav.admin.2}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}"><i
class="fa fa-user-secret fa-fw" aria-hidden="true"></i> {{$nav.admin.1}}</a></li>
{{/if}} {{/if}}
{{if $nav.logout}} {{if $nav.logout}}
<li role="presentation" class="list-group-item"><a role="menuitem" class="nav-link {{$nav.logout.2}}" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" ><i class="fa fa fa-sign-out fa-fw" aria-hidden="true"></i> {{$nav.logout.1}}</a></li> <li role="presentation" class="list-group-item"><a role="menuitem"
class="nav-link {{$nav.logout.2}}" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}"><i
class="fa fa fa-sign-out fa-fw" aria-hidden="true"></i> {{$nav.logout.1}}</a></li>
{{else}} {{else}}
<li role="presentation" class="list-group-item"><a role="menuitem" class="nav-login-link {{$nav.login.2}}" href="{{$nav.login.0}}" title="{{$nav.login.3}}" ><i class="fa fa-power-off fa-fw" aria-hidden="true"></i> {{$nav.login.1}}</a></li> <li role="presentation" class="list-group-item"><a role="menuitem"
class="nav-login-link {{$nav.login.2}}" href="{{$nav.login.0}}"
title="{{$nav.login.3}}"><i class="fa fa-power-off fa-fw" aria-hidden="true"></i>
{{$nav.login.1}}</a></li>
{{/if}} {{/if}}
</ul> </ul>
</div> </div>
</div><!--/.sidebar-offcanvas--> </div>
<!--/.sidebar-offcanvas-->
</div><!-- end of div for navbar width--> </div><!-- end of div for navbar width-->
</div><!-- /.container --> </div><!-- /.container -->
</nav><!-- /.navbar --> </nav><!-- /.navbar -->
@ -238,21 +341,24 @@
<nav class="navbar navbar-fixed-top"> <nav class="navbar navbar-fixed-top">
<div class="container"> <div class="container">
<div class="navbar-header pull-left"> <div class="navbar-header pull-left">
<a class="navbar-brand" href="#"><div id="navbrand-container"> <a class="navbar-brand" href="#">
<div id="navbrand-container">
<div id="logo-img"></div> <div id="logo-img"></div>
<div id="navbar-brand-text"> Friendica</div></div> <div id="navbar-brand-text"> Friendica</div>
</div>
</a> </a>
</div> </div>
<div class="pull-right"> <div class="pull-right">
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li role="presentation"> <li role="presentation">
<a href="login?mode=none" id="nav-login" <a href="login?mode=none" id="nav-login" data-toggle="tooltip" aria-label="{{$nav.login.3}}"
data-toggle="tooltip" aria-label="{{$nav.login.3}}" title="{{$nav.login.3}}"> title="{{$nav.login.3}}">
<i class="fa fa-sign-in fa-fw" aria-hidden="true"></i> <i class="fa fa-sign-in fa-fw" aria-hidden="true"></i>
</a> </a>
</li> </li>
<li role="presentation"> <li role="presentation">
<a href="{{$nav.about.0}}" id="nav-about" data-toggle="tooltip" aria-label="{{$nav.about.3}}" title="{{$nav.about.3}}"> <a href="{{$nav.about.0}}" id="nav-about" data-toggle="tooltip" aria-label="{{$nav.about.3}}"
title="{{$nav.about.3}}">
<i class="fa fa-info fa-fw" aria-hidden="true"></i> <i class="fa fa-info fa-fw" aria-hidden="true"></i>
</a> </a>
</li> </li>
@ -269,7 +375,8 @@
<form class="navbar-form" role="search" method="get" action="{{$nav.search.0}}"> <form class="navbar-form" role="search" method="get" action="{{$nav.search.0}}">
<!-- <img class="hidden-xs" src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}" style="max-width:33px; max-height:33px; min-width:33px; min-height:33px; width:33px; height:33px;"> --> <!-- <img class="hidden-xs" src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}" style="max-width:33px; max-height:33px; min-width:33px; min-height:33px; width:33px; height:33px;"> -->
<div class="form-group form-group-search"> <div class="form-group form-group-search">
<input id="nav-search-input-field-mobile" class="form-control form-search" type="text" name="q" data-toggle="tooltip" title="{{$search_hint}}" placeholder="{{$nav.search.1}}"> <input id="nav-search-input-field-mobile" class="form-control form-search" type="text" name="q"
data-toggle="tooltip" title="{{$search_hint}}" placeholder="{{$nav.search.1}}">
<button class="btn btn-default btn-sm form-button-search" type="submit">{{$nav.search.1}}</button> <button class="btn btn-default btn-sm form-button-search" type="submit">{{$nav.search.1}}</button>
</div> </div>
</form> </form>
@ -290,7 +397,8 @@
<ul id="nav-notifications-template" class="media-list" style="display:none;" rel="template"> <ul id="nav-notifications-template" class="media-list" style="display:none;" rel="template">
<li class="{4} notif-entry"> <li class="{4} notif-entry">
<div class="notif-entry-wrapper media"> <div class="notif-entry-wrapper media">
<div class="notif-photo-wrapper media-object pull-left" aria-hidden="true"><a href="{6}" class="userinfo click-card" tabIndex="-1"><img data-src="{1}"></a></div> <div class="notif-photo-wrapper media-object pull-left" aria-hidden="true"><a href="{6}"
class="userinfo click-card" tabIndex="-1"><img data-src="{1}"></a></div>
<a href="{0}" class="notif-desc-wrapper media-body"> <a href="{0}" class="notif-desc-wrapper media-body">
{2} {2}
<div><time class="notif-when time" data-toggle="tooltip" title="{5}">{3}</time></div> <div><time class="notif-when time" data-toggle="tooltip" title="{5}">{3}</time></div>
@ -305,7 +413,9 @@ The result is a friendica logo in the user icon color.*}}
<svg id="friendica-logo-mask" x="0px" y="0px" width="0px" height="0px" viewBox="0 0 250 250"> <svg id="friendica-logo-mask" x="0px" y="0px" width="0px" height="0px" viewBox="0 0 250 250">
<defs> <defs>
<mask id="logo-mask" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox"> <mask id="logo-mask" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">
<path style="fill-rule:evenodd;clip-rule:evenodd;fill:#ffffff;" d="M0.796,0L0.172,0.004C0.068,0.008,0.008,0.068,0,0.172V0.824c0,0.076,0.06,0.16,0.168,0.172h0.652c0.072,0,0.148-0.06,0.172-0.144V0.14C1,0.06,0.908,0,0.796,0zM0.812,0.968H0.36v-0.224h0.312v-0.24H0.36V0.3h0.316l0-0.264l0.116-0c0.088,0,0.164,0.044,0.164,0.096l0,0.696C0.96,0.912,0.876,0.968,0.812,0.968z"></path> <path style="fill-rule:evenodd;clip-rule:evenodd;fill:#ffffff;"
d="M0.796,0L0.172,0.004C0.068,0.008,0.008,0.068,0,0.172V0.824c0,0.076,0.06,0.16,0.168,0.172h0.652c0.072,0,0.148-0.06,0.172-0.144V0.14C1,0.06,0.908,0,0.796,0zM0.812,0.968H0.36v-0.224h0.312v-0.24H0.36V0.3h0.316l0-0.264l0.116-0c0.088,0,0.164,0.044,0.164,0.096l0,0.696C0.96,0.912,0.876,0.968,0.812,0.968z">
</path>
</mask> </mask>
</defs> </defs>
</svg> </svg>