1
0
Fork 0

Merge pull request #5130 from tobiasd/20180526-frost

removed deprecated themes frost(-mobile)
This commit is contained in:
Hypolite Petovan 2018-05-26 08:35:46 -04:00 committed by GitHub
commit b3579ef910
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
349 changed files with 0 additions and 17264 deletions

View file

@ -1,31 +0,0 @@
Photo album display?
- The "lock" icon for private items
- change it to black?
- when clicked, the popup window displays poorly
- Edit photo page: bottom buttons are off-center in Dolphin Mini
- BB code buttons for status updates
- Get "add contact" back on contacts page
- Allow creating a new private message
- Admin: access to more pages than summary?
- Find a way to show embedded videos at the normal size for tablets that can handle it
- Need to find a way to deal with freakin annoying elements that don't respect screen width limits.
Specifically, need to find a way to keep them from forcing a horizontal scroll bar to show up and
making the rest of the body text overflow the item's borders that is screen-width sensitive (it's
annoying to have a 300px truncated code block on a 1024px wide screen). At least the following cause problems:
- code blocks
- blockquote blocks
- #reallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongtags
- Needs to be faster!
- Reduce DOM elements (~2400 for 10 items, ~8400 for 40 items)
- Sometimes, when "Permission denied", wrong login page is shown

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,019 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 923 B

View file

@ -1,165 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,014 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

View file

@ -1,262 +0,0 @@
function ACL(backend_url, preset){
that = this;
that.url = backend_url;
that.kp_timer = null;
if (preset==undefined) preset = [];
that.allow_cid = (preset[0] || []);
that.allow_gid = (preset[1] || []);
that.deny_cid = (preset[2] || []);
that.deny_gid = (preset[3] || []);
that.group_uids = [];
that.nw = 2; //items per row. should be calulated from #acl-list.width
that.list_content = $("#acl-list-content");
that.item_tpl = unescape($(".acl-list-item[rel=acl-template]").html());
that.showall = $("#acl-showall");
if (preset.length==0) that.showall.addClass("selected");
/*events*/
that.showall.click(that.on_showall);
$(document).on("click", ".acl-button-show", that.on_button_show);
$(document).on("click", ".acl-button-hide", that.on_button_hide);
$("#acl-search").keypress(that.on_search);
$("#acl-wrapper").parents("form").submit(that.on_submit);
/* startup! */
that.get(0,100);
}
ACL.prototype.on_submit = function(){
aclfileds = $("#acl-fields").html("");
$(that.allow_gid).each(function(i,v){
aclfileds.append("<input type='hidden' name='group_allow[]' value='"+v+"'>");
});
$(that.allow_cid).each(function(i,v){
aclfileds.append("<input type='hidden' name='contact_allow[]' value='"+v+"'>");
});
$(that.deny_gid).each(function(i,v){
aclfileds.append("<input type='hidden' name='group_deny[]' value='"+v+"'>");
});
$(that.deny_cid).each(function(i,v){
aclfileds.append("<input type='hidden' name='contact_deny[]' value='"+v+"'>");
});
}
ACL.prototype.search = function(){
var srcstr = $("#acl-search").val();
that.list_content.html("");
that.get(0,100, srcstr);
}
ACL.prototype.on_search = function(event){
if (that.kp_timer) clearTimeout(that.kp_timer);
that.kp_timer = setTimeout( that.search, 1000);
}
ACL.prototype.on_showall = function(event){
event.preventDefault()
event.stopPropagation();
if (that.showall.hasClass("selected")){
return false;
}
that.showall.addClass("selected");
that.allow_cid = [];
that.allow_gid = [];
that.deny_cid = [];
that.deny_gid = [];
that.update_view();
return false;
}
ACL.prototype.on_button_show = function(event){
event.preventDefault()
event.stopImmediatePropagation()
event.stopPropagation();
/*that.showall.removeClass("selected");
$(this).siblings(".acl-button-hide").removeClass("selected");
$(this).toggleClass("selected");*/
that.set_allow($(this).parent().attr('id'));
return false;
}
ACL.prototype.on_button_hide = function(event){
event.preventDefault()
event.stopImmediatePropagation()
event.stopPropagation();
/*that.showall.removeClass("selected");
$(this).siblings(".acl-button-show").removeClass("selected");
$(this).toggleClass("selected");*/
that.set_deny($(this).parent().attr('id'));
return false;
}
ACL.prototype.set_allow = function(itemid){
type = itemid[0];
id = parseInt(itemid.substr(1));
switch(type){
case "g":
if (that.allow_gid.indexOf(id)<0){
that.allow_gid.push(id)
}else {
that.allow_gid.remove(id);
}
if (that.deny_gid.indexOf(id)>=0) that.deny_gid.remove(id);
break;
case "c":
if (that.allow_cid.indexOf(id)<0){
that.allow_cid.push(id)
} else {
that.allow_cid.remove(id);
}
if (that.deny_cid.indexOf(id)>=0) that.deny_cid.remove(id);
break;
}
that.update_view();
}
ACL.prototype.set_deny = function(itemid){
type = itemid[0];
id = parseInt(itemid.substr(1));
switch(type){
case "g":
if (that.deny_gid.indexOf(id)<0){
that.deny_gid.push(id)
} else {
that.deny_gid.remove(id);
}
if (that.allow_gid.indexOf(id)>=0) that.allow_gid.remove(id);
break;
case "c":
if (that.deny_cid.indexOf(id)<0){
that.deny_cid.push(id)
} else {
that.deny_cid.remove(id);
}
if (that.allow_cid.indexOf(id)>=0) that.allow_cid.remove(id);
break;
}
that.update_view();
}
ACL.prototype.update_view = function(){
if (that.allow_gid.length==0 && that.allow_cid.length==0 &&
that.deny_gid.length==0 && that.deny_cid.length==0){
that.showall.addClass("selected");
/* jot acl */
$('#jot-perms-icon').removeClass('lock').addClass('unlock');
$('#jot-public').show();
$('.profile-jot-net input').attr('disabled', false);
if(typeof editor != 'undefined' && editor != false) {
$('#profile-jot-desc').html(window.isPublic);
}
} else {
that.showall.removeClass("selected");
/* jot acl */
$('#jot-perms-icon').removeClass('unlock').addClass('lock');
$('#jot-public').hide();
$('.profile-jot-net input').attr('disabled', 'disabled');
$('#profile-jot-desc').html('&nbsp;');
}
$("#acl-list-content .acl-list-item").each(function(){
$(this).removeClass("groupshow grouphide");
});
$("#acl-list-content .acl-list-item").each(function(){
itemid = $(this).attr('id');
type = itemid[0];
id = parseInt(itemid.substr(1));
btshow = $(this).children(".acl-button-show").removeClass("selected");
bthide = $(this).children(".acl-button-hide").removeClass("selected");
switch(type){
case "g":
var uclass = "";
if (that.allow_gid.indexOf(id)>=0){
btshow.addClass("selected");
bthide.removeClass("selected");
uclass="groupshow";
}
if (that.deny_gid.indexOf(id)>=0){
btshow.removeClass("selected");
bthide.addClass("selected");
uclass="grouphide";
}
$(that.group_uids[id]).each(function(i,v) {
if(uclass == "grouphide")
$("#c"+v).removeClass("groupshow");
if(uclass != "") {
var cls = $("#c"+v).attr('class');
if( cls == undefined)
return true;
var hiding = cls.indexOf('grouphide');
if(hiding == -1)
$("#c"+v).addClass(uclass);
}
});
break;
case "c":
if (that.allow_cid.indexOf(id)>=0){
btshow.addClass("selected");
bthide.removeClass("selected");
}
if (that.deny_cid.indexOf(id)>=0){
btshow.removeClass("selected");
bthide.addClass("selected");
}
}
});
}
ACL.prototype.get = function(start,count, search){
var postdata = {
start:start,
count:count,
search:search,
}
$.ajax({
type:'POST',
url: that.url,
data: postdata,
dataType: 'json',
success:that.populate
});
}
ACL.prototype.populate = function(data){
/* var height = Math.ceil(data.tot / that.nw) * 42;
that.list_content.height(height);*/
$(data.items).each(function(){
html = "<div class='acl-list-item {4} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>";
html = html.format( this.photo, this.name, this.type, this.id, '', this.network, this.link );
if (this.uids!=undefined) that.group_uids[this.id] = this.uids;
//console.log(html);
that.list_content.append(html);
});
$(".acl-list-item img[data-src]", that.list_content).each(function(i, el){
// Add src attribute for images with a data-src attribute
$(el).attr('src', $(el).data("src"));
});
that.update_view();
}

File diff suppressed because one or more lines are too long

View file

@ -1,659 +0,0 @@
function openClose(listID) {
/* if(document.getElementById(theID).style.display == "block") {
document.getElementById(theID).style.display = "none"
}
else {
document.getElementById(theID).style.display = "block"
}*/
listID = "#" + listID.replace(/:/g, "\\:");
listID = listID.replace(/\./g, "\\.");
listID = listID.replace(/@/g, "\\@");
if($(listID).is(":visible")) {
$(listID).hide();
$(listID+"-wrapper").show();
}
else {
$(listID).show();
$(listID+"-wrapper").hide();
}
}
function openMenu(theID) {
document.getElementById(theID).style.display = "block"
}
function closeMenu(theID) {
document.getElementById(theID).style.display = "none"
}
var src = null;
var prev = null;
var livetime = null;
var stopped = false;
var totStopped = false;
var timer = null;
var pr = 0;
var liking = 0;
var in_progress = false;
var langSelect = false;
var commentBusy = false;
var last_popup_menu = null;
var last_popup_button = null;
$(function() {
$.ajaxSetup({cache: false});
/* setup onoff widgets */
$(".onoff input").each(function(){
val = $(this).val();
id = $(this).attr("id");
$("#"+id+"_onoff ."+ (val==0?"on":"off")).addClass("hidden");
});
$(".onoff > a").click(function(event){
event.preventDefault();
var input = $(this).siblings("input");
var val = 1-input.val();
var id = input.attr("id");
$("#"+id+"_onoff ."+ (val==0?"on":"off")).addClass("hidden");
$("#"+id+"_onoff ."+ (val==1?"on":"off")).removeClass("hidden");
input.val(val);
});
/* popup menus */
function close_last_popup_menu(e) {
if( last_popup_menu ) {
if( '#' + last_popup_menu.attr('id') !== $(e.target).attr('rel')) {
last_popup_menu.hide();
if (last_popup_menu.attr('id') == "nav-notifications-menu" ) $('.main-container').show();
last_popup_button.removeClass("selected");
last_popup_menu = null;
last_popup_button = null;
}
}
}
$('img[rel^=#]').click(function(e){
close_last_popup_menu(e);
menu = $( $(this).attr('rel') );
e.preventDefault();
e.stopPropagation();
if (menu.attr('popup')=="false") return false;
// $(this).parent().toggleClass("selected");
// menu.toggle();
if (menu.css("display") == "none") {
$(this).parent().addClass("selected");
menu.show();
if (menu.attr('id') == "nav-notifications-menu" ) $('.main-container').hide();
last_popup_menu = menu;
last_popup_button = $(this).parent();
} else {
$(this).parent().removeClass("selected");
menu.hide();
if (menu.attr('id') == "nav-notifications-menu" ) $('.main-container').show();
last_popup_menu = null;
last_popup_button = null;
}
return false;
});
$('html').click(function(e) {
close_last_popup_menu(e);
});
// fancyboxes
/*$("a.popupbox").colorbox({
'inline' : true,
'transition' : 'none'
});*/
/* notifications template */
var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html());
var notifications_all = unescape($('<div>').append( $("#nav-notifications-see-all").clone() ).html()); //outerHtml hack
var notifications_mark = unescape($('<div>').append( $("#nav-notifications-mark-all").clone() ).html()); //outerHtml hack
var notifications_empty = unescape($("#nav-notifications-menu").html());
/* nav update event */
$('nav').bind('nav-update', function(e,data){;
var invalid = $(data).find('invalid').text();
if(invalid == 1) { window.location.href=window.location.href }
var net = $(data).find('net').text();
if(net == 0) { net = ''; $('#net-update').removeClass('show') } else { $('#net-update').addClass('show') }
$('#net-update').html(net);
var home = $(data).find('home').text();
if(home == 0) { home = ''; $('#home-update').removeClass('show') } else { $('#home-update').addClass('show') }
$('#home-update').html(home);
var intro = $(data).find('intro').text();
if(intro == 0) { intro = ''; $('#intro-update').removeClass('show') } else { $('#intro-update').addClass('show') }
$('#intro-update').html(intro);
var mail = $(data).find('mail').text();
if(mail == 0) { mail = ''; $('#mail-update').removeClass('show') } else { $('#mail-update').addClass('show') }
$('#mail-update').html(mail);
var intro = $(data).find('intro').text();
if(intro == 0) { intro = ''; $('#intro-update-li').removeClass('show') } else { $('#intro-update-li').addClass('show') }
$('#intro-update-li').html(intro);
var mail = $(data).find('mail').text();
if(mail == 0) { mail = ''; $('#mail-update-li').removeClass('show') } else { $('#mail-update-li').addClass('show') }
$('#mail-update-li').html(mail);
var eNotif = $(data).find('notif')
if (eNotif.children("note").length==0){
$("#nav-notifications-menu").html(notifications_empty);
} else {
nnm = $("#nav-notifications-menu");
nnm.html(notifications_all + notifications_mark);
//nnm.attr('popup','true');
eNotif.children("note").each(function(){
e = $(this);
text = e.text().format("<span class='contactname'>"+e.attr('name')+"</span>");
html = notifications_tpl.format(e.attr('href'),e.attr('photo'), text, e.attr('date'), e.attr('seen'));
nnm.append(html);
});
$("img[data-src]", nnm).each(function(i, el){
// Add src attribute for images with a data-src attribute
// However, don't bother if the data-src attribute is empty, because
// an empty "src" tag for an image will cause some browsers
// to prefetch the root page of the Friendica hub, which will
// unnecessarily load an entire profile/ or network/ page
if($(el).data("src") != '') $(el).attr('src', $(el).data("src"));
});
}
notif = eNotif.attr('count');
if (notif>0){
$("#nav-notifications-linkmenu").addClass("on");
} else {
$("#nav-notifications-linkmenu").removeClass("on");
}
if(notif == 0) { notif = ''; $('#notify-update').removeClass('show') } else { $('#notify-update').addClass('show') }
$('#notify-update').html(notif);
var eSysmsg = $(data).find('sysmsgs');
eSysmsg.children("notice").each(function(){
text = $(this).text();
$.jGrowl(text, { sticky: false, theme: 'notice', life: 1000 });
});
eSysmsg.children("info").each(function(){
text = $(this).text();
$.jGrowl(text, { sticky: false, theme: 'info', life: 1000 });
});
});
NavUpdate();
// Allow folks to stop the ajax page updates with the pause/break key
/* $(document).keydown(function(event) {
if(event.keyCode == '8') {
var target = event.target || event.srcElement;
if (!/input|textarea/i.test(target.nodeName)) {
return false;
}
}
if(event.keyCode == '19' || (event.ctrlKey && event.which == '32')) {
event.preventDefault();
if(stopped == false) {
stopped = true;
if (event.ctrlKey) {
totStopped = true;
}
$('#pause').html('<img src="images/pause.gif" alt="pause" style="border: 1px solid black;" />');
} else {
unpause();
}
} else {
if (!totStopped) {
unpause();
}
}
});*/
});
function NavUpdate() {
if(! stopped) {
var pingCmd = 'ping' + ((localUser != 0) ? '?f=&uid=' + localUser : '');
$.get(pingCmd,function(data) {
$(data).find('result').each(function() {
// send nav-update event
$('nav').trigger('nav-update', this);
// start live update
if($('#live-network').length) { src = 'network'; liveUpdate(); }
if($('#live-profile').length) { src = 'profile'; liveUpdate(); }
if($('#live-community').length) { src = 'community'; liveUpdate(); }
if($('#live-notes').length) { src = 'notes'; liveUpdate(); }
if($('#live-display').length) { src = 'display'; liveUpdate(); }
/*if($('#live-display').length) {
if(liking) {
liking = 0;
window.location.href=window.location.href
}
}*/
if($('#live-photos').length) {
if(liking) {
liking = 0;
window.location.href=window.location.href
}
}
});
}) ;
}
timer = setTimeout(NavUpdate,updateInterval);
}
function liveUpdate() {
if((src == null) || (stopped) || (typeof profile_uid == 'undefined') || (! profile_uid)) { $('.like-rotator').hide(); return; }
if(($('.comment-edit-text-full').length) || (in_progress)) {
if(livetime) {
clearTimeout(livetime);
}
livetime = setTimeout(liveUpdate, 5000);
return;
}
if(livetime != null)
livetime = null;
prev = 'live-' + src;
in_progress = true;
var udargs = ((netargs.length) ? '/' + netargs : '');
var update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&page=' + profile_page;
$.get(update_url,function(data) {
in_progress = false;
// $('.collapsed-comments',data).each(function() {
// var ident = $(this).attr('id');
// var is_hidden = $('#' + ident).is(':hidden');
// if($('#' + ident).length) {
// $('#' + ident).replaceWith($(this));
// if(is_hidden)
// $('#' + ident).hide();
// }
//});
// add a new thread
$('.toplevel_item',data).each(function() {
var ident = $(this).attr('id');
if($('#' + ident).length == 0 && profile_page == 1) {
$('img',this).each(function() {
$(this).attr('src',$(this).attr('dst'));
});
$('#' + prev).after($(this));
}
else {
// Find out if the hidden comments are open, so we can keep it that way
// if a new comment has been posted
var id = $('.hide-comments-total', this).attr('id');
if(typeof id != 'undefined') {
id = id.split('-')[3];
var commentsOpen = $("#collapsed-comments-" + id).is(":visible");
}
$('img',this).each(function() {
$(this).attr('src',$(this).attr('dst'));
});
//vScroll = $(document).scrollTop();
$('html').height($('html').height());
$('#' + ident).replaceWith($(this));
if(typeof id != 'undefined') {
if(commentsOpen) showHideComments(id);
}
$('html').height('auto');
//$(document).scrollTop(vScroll);
}
prev = ident;
});
collapseHeight();
// reset vars for inserting individual items
/*prev = 'live-' + src;
$('.wall-item-outside-wrapper',data).each(function() {
var ident = $(this).attr('id');
if($('#' + ident).length == 0 && prev != 'live-' + src) {
$('img',this).each(function() {
$(this).attr('src',$(this).attr('dst'));
});
$('#' + prev).after($(this));
}
else {
$('#' + ident + ' ' + '.wall-item-ago').replaceWith($(this).find('.wall-item-ago'));
if($('#' + ident + ' ' + '.comment-edit-text-empty').length)
$('#' + ident + ' ' + '.wall-item-comment-wrapper').replaceWith($(this).find('.wall-item-comment-wrapper'));
$('#' + ident + ' ' + '.hide-comments-total').replaceWith($(this).find('.hide-comments-total'));
$('#' + ident + ' ' + '.wall-item-like').replaceWith($(this).find('.wall-item-like'));
$('#' + ident + ' ' + '.wall-item-dislike').replaceWith($(this).find('.wall-item-dislike'));
$('#' + ident + ' ' + '.my-comment-photo').each(function() {
$(this).attr('src',$(this).attr('dst'));
});
}
prev = ident;
});*/
$('.like-rotator').hide();
if(commentBusy) {
commentBusy = false;
$('body').css('cursor', 'auto');
}
/* autocomplete @nicknames */
$(".comment-edit-form textarea").editor_autocomplete(baseurl+"/acl");
// setup videos, since VideoJS won't take care of any loaded via AJAX
if(typeof videojs != 'undefined') videojs.autoSetup();
});
}
function collapseHeight(elems) {
var elemName = '.wall-item-body:not(.divmore)';
if(typeof elems != 'undefined') {
elemName = elems + ' ' + elemName;
}
$(elemName).each(function() {
$('html').height($('html').height());
$(this).readmore({maxheight:350 , moreLink:'<a href="#" class="showmore">+ Show more</a>', lessLink:'<a href="#" class="showmore">+ Show less</a>'});
$(this).addClass('divmore');
$('html').height('auto');
});
}
/* function imgbright(node) {
$(node).removeClass("drophide").addClass("drop");
}
function imgdull(node) {
$(node).removeClass("drop").addClass("drophide");
}*/
// Since our ajax calls are asynchronous, we will give a few
// seconds for the first ajax call (setting like/dislike), then
// run the updater to pick up any changes and display on the page.
// The updater will turn any rotators off when it's done.
// This function will have returned long before any of these
// events have completed and therefore there won't be any
// visible feedback that anything changed without all this
// trickery. This still could cause confusion if the "like" ajax call
// is delayed and NavUpdate runs before it completes.
function dolike(ident,verb) {
unpause();
$('#like-rotator-' + ident.toString()).show();
$.get('like/' + ident.toString() + '?verb=' + verb, NavUpdate );
// if(timer) clearTimeout(timer);
// timer = setTimeout(NavUpdate,3000);
liking = 1;
}
function dostar(ident) {
ident = ident.toString();
//$('#like-rotator-' + ident).show();
$.get('starred/' + ident, function(data) {
if(data.match(/1/)) {
$('#starred-' + ident).addClass('starred');
$('#starred-' + ident).removeClass('unstarred');
$('#star-' + ident).addClass('hidden');
$('#unstar-' + ident).removeClass('hidden');
}
else {
$('#starred-' + ident).addClass('unstarred');
$('#starred-' + ident).removeClass('starred');
$('#star-' + ident).removeClass('hidden');
$('#unstar-' + ident).addClass('hidden');
}
//$('#like-rotator-' + ident).hide();
});
}
function getPosition(e) {
var cursor = {x:0, y:0};
if ( e.pageX || e.pageY ) {
cursor.x = e.pageX;
cursor.y = e.pageY;
}
else {
if( e.clientX || e.clientY ) {
cursor.x = e.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft) - document.documentElement.clientLeft;
cursor.y = e.clientY + (document.documentElement.scrollTop || document.body.scrollTop) - document.documentElement.clientTop;
}
else {
if( e.x || e.y ) {
cursor.x = e.x;
cursor.y = e.y;
}
}
}
return cursor;
}
var lockvisible = false;
function lockview(event,id) {
event = event || window.event;
cursor = getPosition(event);
if(lockvisible) {
lockviewhide();
}
else {
lockvisible = true;
$.get('lockview/' + id, function(data) {
$('#panel').html(data);
$('#panel').css({ 'left': 10 , 'top': cursor.y + 20});
$('#panel').show();
});
}
}
function lockviewhide() {
lockvisible = false;
$('#panel').hide();
}
function post_comment(id) {
unpause();
commentBusy = true;
$('body').css('cursor', 'wait');
$("#comment-preview-inp-" + id).val("0");
$.post(
"item",
$("#comment-edit-form-" + id).serialize(),
function(data) {
if(data.success) {
$("#comment-edit-wrapper-" + id).hide();
$("#comment-edit-text-" + id).val('');
var tarea = document.getElementById("comment-edit-text-" + id);
if(tarea)
commentClose(tarea,id);
if(timer) clearTimeout(timer);
timer = setTimeout(NavUpdate,10);
}
if(data.reload) {
window.location.href=data.reload;
}
},
"json"
);
return false;
}
function preview_comment(id) {
$("#comment-preview-inp-" + id).val("1");
$("#comment-edit-preview-" + id).show();
$.post(
"item",
$("#comment-edit-form-" + id).serialize(),
function(data) {
if(data.preview) {
$("#comment-edit-preview-" + id).html(data.preview);
$("#comment-edit-preview-" + id + " a").click(function() { return false; });
}
},
"json"
);
return true;
}
function showHideComments(id) {
if( $("#collapsed-comments-" + id).is(":visible")) {
$("#collapsed-comments-" + id).hide();
$("#hide-comments-" + id).html(window.showMore);
}
else {
$("#collapsed-comments-" + id).show();
$("#hide-comments-" + id).html(window.showFewer);
collapseHeight("#collapsed-comments-" + id);
}
}
function preview_post() {
$("#jot-preview").val("1");
$("#jot-preview-content").show();
$.post(
"item",
$("#profile-jot-form").serialize(),
function(data) {
if(data.preview) {
$("#jot-preview-content").html(data.preview);
$("#jot-preview-content" + " a").click(function() { return false; });
}
},
"json"
);
$("#jot-preview").val("0");
return true;
}
function unpause() {
// unpause auto reloads if they are currently stopped
totStopped = false;
stopped = false;
$('#pause').html('');
}
function bin2hex(s){
// Converts the binary representation of data to hex
//
// version: 812.316
// discuss at: http://phpjs.org/functions/bin2hex
// + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + bugfixed by: Onno Marsman
// + bugfixed by: Linuxworld
// * example 1: bin2hex('Kev');
// * returns 1: '4b6576'
// * example 2: bin2hex(String.fromCharCode(0x00));
// * returns 2: '00'
var v,i, f = 0, a = [];
s += '';
f = s.length;
for (i = 0; i<f; i++) {
a[i] = s.charCodeAt(i).toString(16).replace(/^([\da-f])$/,"0$1");
}
return a.join('');
}
function groupChangeMember(gid, cid, sec_token) {
$('body .fakelink').css('cursor', 'wait');
$.get('group/' + gid + '/' + cid + "?t=" + sec_token, function(data) {
$('#group-update-wrapper').html(data);
$('body .fakelink').css('cursor', 'auto');
});
}
function profChangeMember(gid,cid) {
$('body .fakelink').css('cursor', 'wait');
$.get('profperm/' + gid + '/' + cid, function(data) {
$('#prof-update-wrapper').html(data);
$('body .fakelink').css('cursor', 'auto');
});
}
function contactgroupChangeMember(gid,cid) {
$('body').css('cursor', 'wait');
$.get('contactgroup/' + gid + '/' + cid, function(data) {
$('body').css('cursor', 'auto');
});
}
function checkboxhighlight(box) {
if($(box).is(':checked')) {
$(box).addClass('checkeditem');
}
else {
$(box).removeClass('checkeditem');
}
}
function notifyMarkAll() {
$.get('notify/mark/all', function(data) {
if(timer) clearTimeout(timer);
timer = setTimeout(NavUpdate,1000);
});
}
/**
* sprintf in javascript
* "{0} and {1}".format('zero','uno');
**/
String.prototype.format = function() {
var formatted = this;
for (var i = 0; i < arguments.length; i++) {
var regexp = new RegExp('\\{'+i+'\\}', 'gi');
formatted = formatted.replace(regexp, arguments[i]);
}
return formatted;
};
// Array Remove
Array.prototype.remove = function(item) {
to=undefined; from=this.indexOf(item);
var rest = this.slice((to || from) + 1 || this.length);
this.length = from < 0 ? this.length + from : from;
return this.push.apply(this, rest);
};
function previewTheme(elm) {
theme = $(elm).val();
$.getJSON('pretheme?f=&theme=' + theme,function(data) {
$('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><div id="theme-version">' + data.version + '</div><div id="theme-credits">' + data.credits + '</div>');
});
}

View file

@ -1,192 +0,0 @@
/*!
* Readmore.js jQuery plugin
* Author: @jed_foster
* Project home: jedfoster.github.io/Readmore.js
* Licensed under the MIT license
*/
;(function($) {
var readmore = 'readmore',
defaults = {
speed: 100,
maxHeight: 200,
heightMargin: 16,
moreLink: '<a href="#">Read More</a>',
lessLink: '<a href="#">Close</a>',
embedCSS: true,
sectionCSS: 'display: block; width: 100%;',
startOpen: false,
expandedClass: 'readmore-js-expanded',
collapsedClass: 'readmore-js-collapsed',
// callbacks
beforeToggle: function(){},
afterToggle: function(){}
},
cssEmbedded = false;
function Readmore( element, options ) {
this.element = element;
this.options = $.extend( {}, defaults, options);
$(this.element).data('max-height', this.options.maxHeight);
$(this.element).data('height-margin', this.options.heightMargin);
delete(this.options.maxHeight);
if(this.options.embedCSS && ! cssEmbedded) {
var styles = '.readmore-js-toggle, .readmore-js-section { ' + this.options.sectionCSS + ' } .readmore-js-section { overflow: hidden; }';
(function(d,u) {
var css=d.createElement('style');
css.type = 'text/css';
if(css.styleSheet) {
css.styleSheet.cssText = u;
}
else {
css.appendChild(d.createTextNode(u));
}
d.getElementsByTagName('head')[0].appendChild(css);
}(document, styles));
cssEmbedded = true;
}
this._defaults = defaults;
this._name = readmore;
this.init();
}
Readmore.prototype = {
init: function() {
var $this = this;
$(this.element).each(function() {
var current = $(this),
maxHeight = (current.css('max-height').replace(/[^-\d\.]/g, '') > current.data('max-height')) ? current.css('max-height').replace(/[^-\d\.]/g, '') : current.data('max-height'),
heightMargin = current.data('height-margin');
if(current.css('max-height') != 'none') {
current.css('max-height', 'none');
}
$this.setBoxHeight(current);
if(current.outerHeight(true) <= maxHeight + heightMargin) {
// The block is shorter than the limit, so there's no need to truncate it.
return true;
}
else {
current.addClass('readmore-js-section ' + $this.options.collapsedClass).data('collapsedHeight', maxHeight);
var useLink = $this.options.startOpen ? $this.options.lessLink : $this.options.moreLink;
current.after($(useLink).on('click', function(event) { $this.toggleSlider(this, current, event) }).addClass('readmore-js-toggle'));
if(!$this.options.startOpen) {
current.css({height: maxHeight});
}
}
});
$(window).on('resize', function(event) {
$this.resizeBoxes();
});
},
toggleSlider: function(trigger, element, event)
{
event.preventDefault();
var $this = this,
newHeight = newLink = sectionClass = '',
expanded = false,
collapsedHeight = $(element).data('collapsedHeight');
if ($(element).height() <= collapsedHeight) {
newHeight = $(element).data('expandedHeight') + 'px';
newLink = 'lessLink';
expanded = true;
sectionClass = $this.options.expandedClass;
}
else {
newHeight = collapsedHeight;
newLink = 'moreLink';
sectionClass = $this.options.collapsedClass;
}
// Fire beforeToggle callback
$this.options.beforeToggle(trigger, element, expanded);
$(element).animate({'height': newHeight}, {duration: $this.options.speed, complete: function() {
// Fire afterToggle callback
$this.options.afterToggle(trigger, element, expanded);
$(trigger).replaceWith($($this.options[newLink]).on('click', function(event) { $this.toggleSlider(this, element, event) }).addClass('readmore-js-toggle'));
$(this).removeClass($this.options.collapsedClass + ' ' + $this.options.expandedClass).addClass(sectionClass);
}
});
},
setBoxHeight: function(element) {
var el = element.clone().css({'height': 'auto', 'width': element.width(), 'overflow': 'hidden'}).insertAfter(element),
height = el.outerHeight(true);
el.remove();
element.data('expandedHeight', height);
},
resizeBoxes: function() {
var $this = this;
$('.readmore-js-section').each(function() {
var current = $(this);
$this.setBoxHeight(current);
if(current.height() > current.data('expandedHeight') || (current.hasClass($this.options.expandedClass) && current.height() < current.data('expandedHeight')) ) {
current.css('height', current.data('expandedHeight'));
}
});
},
destroy: function() {
var $this = this;
$(this.element).each(function() {
var current = $(this);
current.removeClass('readmore-js-section ' + $this.options.collapsedClass + ' ' + $this.options.expandedClass).css({'max-height': '', 'height': 'auto'}).next('.readmore-js-toggle').remove();
current.removeData();
});
}
};
$.fn[readmore] = function( options ) {
var args = arguments;
if (options === undefined || typeof options === 'object') {
return this.each(function () {
if ($.data(this, 'plugin_' + readmore)) {
var instance = $.data(this, 'plugin_' + readmore);
instance['destroy'].apply(instance);
}
$.data(this, 'plugin_' + readmore, new Readmore( this, options ));
});
} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
return this.each(function () {
var instance = $.data(this, 'plugin_' + readmore);
if (instance instanceof Readmore && typeof instance[options] === 'function') {
instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
}
});
}
}
})(jQuery);

View file

@ -1,7 +0,0 @@
(function(c){function g(b,a){this.element=b;this.options=c.extend({},h,a);c(this.element).data("max-height",this.options.maxHeight);c(this.element).data("height-margin",this.options.heightMargin);delete this.options.maxHeight;if(this.options.embedCSS&&!k){var d=".readmore-js-toggle, .readmore-js-section { "+this.options.sectionCSS+" } .readmore-js-section { overflow: hidden; }",e=document.createElement("style");e.type="text/css";e.styleSheet?e.styleSheet.cssText=d:e.appendChild(document.createTextNode(d));
document.getElementsByTagName("head")[0].appendChild(e);k=!0}this._defaults=h;this._name=f;this.init()}var f="readmore",h={speed:100,maxHeight:200,heightMargin:16,moreLink:'<a href="#">Read More</a>',lessLink:'<a href="#">Close</a>',embedCSS:!0,sectionCSS:"display: block; width: 100%;",startOpen:!1,expandedClass:"readmore-js-expanded",collapsedClass:"readmore-js-collapsed",beforeToggle:function(){},afterToggle:function(){}},k=!1;g.prototype={init:function(){var b=this;c(this.element).each(function(){var a=
c(this),d=a.css("max-height").replace(/[^-\d\.]/g,"")>a.data("max-height")?a.css("max-height").replace(/[^-\d\.]/g,""):a.data("max-height"),e=a.data("height-margin");"none"!=a.css("max-height")&&a.css("max-height","none");b.setBoxHeight(a);if(a.outerHeight(!0)<=d+e)return!0;a.addClass("readmore-js-section "+b.options.collapsedClass).data("collapsedHeight",d);a.after(c(b.options.startOpen?b.options.lessLink:b.options.moreLink).on("click",function(c){b.toggleSlider(this,a,c)}).addClass("readmore-js-toggle"));
b.options.startOpen||a.css({height:d})});c(window).on("resize",function(a){b.resizeBoxes()})},toggleSlider:function(b,a,d){d.preventDefault();var e=this;d=newLink=sectionClass="";var f=!1;d=c(a).data("collapsedHeight");c(a).height()<=d?(d=c(a).data("expandedHeight")+"px",newLink="lessLink",f=!0,sectionClass=e.options.expandedClass):(newLink="moreLink",sectionClass=e.options.collapsedClass);e.options.beforeToggle(b,a,f);c(a).animate({height:d},{duration:e.options.speed,complete:function(){e.options.afterToggle(b,
a,f);c(b).replaceWith(c(e.options[newLink]).on("click",function(b){e.toggleSlider(this,a,b)}).addClass("readmore-js-toggle"));c(this).removeClass(e.options.collapsedClass+" "+e.options.expandedClass).addClass(sectionClass)}})},setBoxHeight:function(b){var a=b.clone().css({height:"auto",width:b.width(),overflow:"hidden"}).insertAfter(b),c=a.outerHeight(!0);a.remove();b.data("expandedHeight",c)},resizeBoxes:function(){var b=this;c(".readmore-js-section").each(function(){var a=c(this);b.setBoxHeight(a);
(a.height()>a.data("expandedHeight")||a.hasClass(b.options.expandedClass)&&a.height()<a.data("expandedHeight"))&&a.css("height",a.data("expandedHeight"))})},destroy:function(){var b=this;c(this.element).each(function(){var a=c(this);a.removeClass("readmore-js-section "+b.options.collapsedClass+" "+b.options.expandedClass).css({"max-height":"",height:"auto"}).next(".readmore-js-toggle").remove();a.removeData()})}};c.fn[f]=function(b){var a=arguments;if(void 0===b||"object"===typeof b)return this.each(function(){if(c.data(this,
"plugin_"+f)){var a=c.data(this,"plugin_"+f);a.destroy.apply(a)}c.data(this,"plugin_"+f,new g(this,b))});if("string"===typeof b&&"_"!==b[0]&&"init"!==b)return this.each(function(){var d=c.data(this,"plugin_"+f);d instanceof g&&"function"===typeof d[b]&&d[b].apply(d,Array.prototype.slice.call(a,1))})}})(jQuery);

View file

@ -1,441 +0,0 @@
$(document).ready(function() {
/* enable editor on focus and click */
$("#profile-jot-text").focus(enableOnUser);
$("#profile-jot-text").click(enableOnUser);
$('#event-share-checkbox').change(function() {
if ($('#event-share-checkbox').is(':checked')) {
$('#acl-wrapper').show();
}
else {
$('#acl-wrapper').hide();
}
}).trigger('change');
$(".popupbox").click(function () {
var parent = $( $(this).attr('href') ).parent();
if (parent.css('display') == 'none') {
parent.show();
} else {
parent.hide();
}
return false;
});
if (typeof window.AjaxUpload != "undefined") {
var uploader = new window.AjaxUpload(
window.imageUploadButton,
{ action: 'wall_upload/' + window.nickname,
name: 'userfile',
onSubmit: function(file,ext) { $('#profile-rotator').show(); },
onComplete: function(file,response) {
addeditortext(window.jotId, response);
$('#profile-rotator').hide();
}
}
);
if ($('#wall-file-upload').length) {
var file_uploader = new window.AjaxUpload(
'wall-file-upload',
{ action: 'wall_attach/' + window.nickname,
name: 'userfile',
onSubmit: function(file,ext) { $('#profile-rotator').show(); },
onComplete: function(file,response) {
addeditortext(window.jotId, response);
$('#profile-rotator').hide();
}
}
);
}
}
if (typeof window.aclInit !="undefined" && typeof acl=="undefined") {
acl = new ACL(
baseurl+"/acl",
[ window.allowCID,window.allowGID,window.denyCID,window.denyGID ]
);
}
switch(window.autocompleteType) {
case 'msg-header':
$("#recip").name_autocomplete(baseurl + '/acl', '', false, function(data) {
$("#recip-complete").val(data.id);
});
break;
case 'contacts-head':
$("#contacts-search").contact_autocomplete(baseurl + '/acl', 'a', true);
$("#contacts-search").keyup(function(event) {
if (event.keyCode == 13) {
$("#contacts-search").click();
}
});
$(".autocomplete-w1 .selected").keyup(function(event) {
if (event.keyCode == 13) {
$("#contacts-search").click();
}
});
break;
case 'display-head':
$(".comment-wwedit-wrapper textarea").editor_autocomplete(baseurl+"/acl");
break;
default:
break;
}
if (window.aclType == "settings-head" || window.aclType == "photos_head" || window.aclType == "event_head") {
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
selstr = $(this).text();
$('#jot-perms-icon').removeClass('unlock').addClass('lock');
$('#jot-public').hide();
});
if (selstr == null) {
$('#jot-perms-icon').removeClass('lock').addClass('unlock');
$('#jot-public').show();
}
}).trigger('change');
}
if (window.aclType == "event_head") {
$('#events-calendar').fullCalendar({
events: baseurl + window.eventModuleUrl +'/json/',
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
timeFormat: 'H(:mm)',
eventClick: function(calEvent, jsEvent, view) {
showEvent(calEvent.id);
},
eventRender: function(event, element, view) {
//console.log(view.name);
if (event.item['author-name']==null) return;
switch(view.name) {
case "month":
element.find(".fc-title").html(
"<img src='{0}' style='height:10px;width:10px'>{1} : {2}".format(
event.item['author-avatar'],
event.item['author-name'],
event.title
));
break;
case "agendaWeek":
element.find(".fc-title").html(
"<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format(
event.item['author-avatar'],
event.item['author-name'],
event.item.desc,
event.item.location
));
break;
case "agendaDay":
element.find(".fc-title").html(
"<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format(
event.item['author-avatar'],
event.item['author-name'],
event.item.desc,
event.item.location
));
break;
}
}
});
// center on date
var args=location.href.replace(baseurl,"").split("/");
if (args.length>=5 && window.eventModeParams == 2) {
$("#events-calendar").fullCalendar('gotoDate',args[3] , args[4]-1);
} else if (args.length>=4 && window.eventModeParams == 1) {
$("#events-calendar").fullCalendar('gotoDate',args[2] , args[3]-1);
}
// show event popup
var hash = location.hash.split("-")
if (hash.length==2 && hash[0]=="#link") showEvent(hash[1]);
}
});
// update pending count //
$(function() {
$("nav").bind('nav-update', function(e,data) {
var elm = $('#pending-update');
var register = $(data).find('register').text();
if (register=="0") { register=""; elm.hide();} else { elm.show(); }
elm.html(register);
});
});
function homeRedirect() {
$('html').fadeOut('slow', function() {
window.location = baseurl + "/login";
});
}
function initCrop() {
function onEndCrop( coords, dimensions ) {
$PR( 'x1' ).value = coords.x1;
$PR( 'y1' ).value = coords.y1;
$PR( 'x2' ).value = coords.x2;
$PR( 'y2' ).value = coords.y2;
$PR( 'width' ).value = dimensions.width;
$PR( 'height' ).value = dimensions.height;
}
Event.observe( window, 'load', function() {
new Cropper.ImgWithPreview(
'croppa',
{
previewWrap: 'previewWrap',
minWidth: 175,
minHeight: 175,
maxWidth: 640,
maxHeight: 640,
ratioDim: { x: 100, y:100 },
displayOnInit: true,
onEndCrop: onEndCrop
});
});
}
function showEvent(eventid) {
}
/*
* Editor
*/
var editor = false;
var textlen = 0;
function initEditor(callback){
if (editor == false) {
$("#profile-jot-text").css({ 'height': 200, 'color': '#000' });
$("#profile-jot-text").editor_autocomplete(baseurl+"/acl");
$("a#jot-perms-icon, a#settings-default-perms-menu").click(function () {
var parent = $("#profile-jot-acl-wrapper").parent();
if (parent.css('display') == 'none') {
parent.show();
} else {
parent.hide();
}
return false;
});
$(".jothidden").show();
editor = true;
}
if (typeof callback != "undefined") {
callback();
}
}
function enableOnUser(){
if (editor) {
return;
}
$(this).val("");
initEditor();
}
/*
* Jot
*/
function addeditortext(textElem, data) {
var currentText = $(textElem).val();
$(textElem).val(currentText + data);
}
function jotVideoURL() {
reply = prompt(window.vidURL);
if (reply && reply.length) {
addeditortext("#profile-jot-text", '[video]' + reply + '[/video]');
}
}
function jotAudioURL() {
reply = prompt(window.audURL);
if (reply && reply.length) {
addeditortext("#profile-jot-text", '[audio]' + reply + '[/audio]');
}
}
function jotGetLocation() {
reply = prompt(window.whereAreU, $('#jot-location').val());
if (reply && reply.length) {
$('#jot-location').val(reply);
}
}
function jotShare(id) {
if ($('#jot-popup').length != 0) $('#jot-popup').show();
$('#like-rotator-' + id).show();
$.get('share/' + id, function(data) {
if (!editor) $("#profile-jot-text").val("");
initEditor(function() {
addeditortext("#profile-jot-text", data);
$('#like-rotator-' + id).hide();
$(window).scrollTop(0);
});
});
}
function jotGetLink() {
reply = prompt(window.linkURL);
if (reply && reply.length) {
reply = bin2hex(reply);
$('#profile-rotator').show();
$.get('parse_url?binurl=' + reply, function(data) {
addeditortext(window.jotId, data);
$('#profile-rotator').hide();
});
}
}
function jotClearLocation() {
$('#jot-coord').val('');
$('#profile-nolocation-wrapper').hide();
}
if (typeof window.geoTag === 'function') window.geoTag();
/*
* Items
*/
function confirmDelete() { return confirm(window.delItem); }
function itemTag(id) {
reply = prompt(window.term);
if (reply && reply.length) {
reply = reply.replace('#','');
if (reply.length) {
commentBusy = true;
$('body').css('cursor', 'wait');
$.get('tagger/' + id + '?term=' + reply, NavUpdate);
/*if (timer) clearTimeout(timer);
timer = setTimeout(NavUpdate,3000);*/
liking = 1;
}
}
}
function itemFiler(id) {
$.get('filer/', function(data) {
var promptText = $('#id_term_label', data).text();
reply = prompt(promptText);
if (reply && reply.length) {
commentBusy = true;
$('body').css('cursor', 'wait');
$.get('filer/' + id + '?term=' + reply, NavUpdate);
liking = 1;
}
});
}
/*
* Comments
*/
function commentOpen(obj,id) {
if (obj.value == "") {
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
$("#mod-cmnt-wrap-" + id).show();
openMenu("comment-edit-submit-wrapper-" + id);
}
}
function commentClose(obj,id) {
if (obj.value == "") {
$("#comment-edit-text-" + id).removeClass("comment-edit-text-full");
$("#comment-edit-text-" + id).addClass("comment-edit-text-empty");
$("#mod-cmnt-wrap-" + id).hide();
closeMenu("comment-edit-submit-wrapper-" + id);
}
}
function commentInsert(obj,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if (tmpStr == "") {
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
openMenu("comment-edit-submit-wrapper-" + id);
}
var ins = $(obj).html();
ins = ins.replace("&lt;","<");
ins = ins.replace("&gt;",">");
ins = ins.replace("&amp;","&");
ins = ins.replace("&quot;",'"');
$("#comment-edit-text-" + id).val(tmpStr + ins);
}
function qCommentInsert(obj,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if (tmpStr == "") {
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
openMenu("comment-edit-submit-wrapper-" + id);
}
var ins = $(obj).val();
ins = ins.replace("&lt;","<");
ins = ins.replace("&gt;",">");
ins = ins.replace("&amp;","&");
ins = ins.replace("&quot;",'"');
$("#comment-edit-text-" + id).val(tmpStr + ins);
$(obj).val("");
}
function insertFormatting(BBcode, id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if (tmpStr == "") {
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
openMenu("comment-edit-submit-wrapper-" + id);
}
textarea = document.getElementById("comment-edit-text-" +id);
if (document.selection) {
textarea.focus();
selected = document.selection.createRange();
selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
} else if (textarea.selectionStart || textarea.selectionStart == "0") {
var start = textarea.selectionStart;
var end = textarea.selectionEnd;
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
}
return true;
}
function cmtBbOpen(id) {
$(".comment-edit-bb-" + id).show();
}
function cmtBbClose(id) {
$(".comment-edit-bb-" + id).hide();
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 B

View file

@ -1,180 +0,0 @@
html {
width: 100%;
}
body {
font-family: helvetica,arial,freesans,clean,sans-serif;
font-size: 16px;
background-color: #ffffff;
color: #505050;/* ZP Change*/
margin: 0px;
}
a, a:visited, a:link { color: #3465a4; text-decoration: none; }
a:hover {text-decoration: underline; }
img { border :0px; }
nav {
display: none;
}
/* popup notifications */
div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff;
padding-left: 58px;
margin: 0px;
}
div.jGrowl div.info {
background: #364e59 url("../../../images/icons/48/info.png") no-repeat 5px center;
color: #ffffff;
padding-left: 58px;
margin: 0px;
}
#jGrowl.top-right {
top: 15px;
right: 10px;
}
div.jGrowl-notification {
border-radius: 7px;
}
.login-button {
margin-top: 90px;
margin-left: auto;
margin-right: auto;
}
img.login-button-image {
max-width: 300px;
}
div.section-wrapper {
position: relative;
width: 300px;
margin-left: auto;
margin-right: auto;
}
.login-form {
margin-top: 40px;
}
.field {
position: relative;
margin-bottom: 15px;
}
.field label {
margin-left: 25px;
font-weight: 700;
float: none;
width: auto;
}
.field input {
font-size: 18px;
width: 200px;
margin-left: 50px;
}
.field.checkbox label {
margin-left: auto;
float: auto;
/*margin-left: 100px;*/
}
.field.checkbox input {
width: auto;
margin-left: 30px;
}
#div_id_remember {
margin-top: 10px;
margin-bottom: 10px;
}
#login_openid {
margin-top: 50px;
}
#login_openid input, input.openid {
background: url(login-bg.gif) no-repeat;
background-position: 0 50%;
width: 182px;
padding-left: 18px;
margin-left: 50px;
}
#login-footer {
margin-top: 10px;
text-align: center;
}
.login-extra-links, .agreement {
font-size: 14px;
}
#login-submit-button, #register-submit-button, #lostpass-submit-button {
font-size: 20px;
padding: 0.5em 1em;
}
#register-link {
margin-right: 100px;
}
.register-form {
margin-top: 15px;
}
.register-form h2, .lostpass-form h2 {
text-align: center;
}
.error-message {
width: 270px;
color: #FF0000;
font-size: 1.1em;
text-align: justify;
border: 1px solid #FF8888;
background-color: #FFEEEE;
padding: 10px;
margin-left: auto;
margin-right: auto;
}
.register-explain-wrapper {
width: 290px;
text-align: justify;
font-size: 14px;
margin-left: 5px;
}
#register-footer {
margin-top: 60px;
text-align: center;
}
.lostpass-form {
margin-top: 100px;
}
#lostpass-desc {
width: 290px;
margin-left: 5px;
margin-bottom: 30px;
text-align: justify;
font-size: 14px;
}
#login-submit-wrapper {
text-align: center;
}
footer {
text-align: center;
padding-top: 3em;
padding-bottom: 1em;
}

View file

@ -1,45 +0,0 @@
<!DOCTYPE html >
<html lang="<?php echo $lang; ?>">
<head>
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
<script>var baseurl="<?php echo Friendica\Core\System::baseUrl() ?>";</script>
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
</head>
<body <?php if($a->module === 'home') echo 'onLoad="setTimeout(\'homeRedirect()\', 1500)"'?>>
<?php if(x($page,'nav')) echo $page['nav']; ?>
<?php if( $a->module === 'home' ) { ?>
<center>
<div class="login-button">
<a href="login" class="login-button-link"><img class="login-button-image" src="images/friendica-1600.png" title="Click to log in"></a>
</div>
</center>
<?php } elseif ( $a->module === 'login' || $a->module === 'register' || $a->module === 'lostpass' ) {
?>
<div class='section-wrapper'>
<section><?php if(x($page,'content')) echo $page['content']; ?>
</section>
</div>
<footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
<?php } else { ?>
<div class='main-container'>
<!-- <div class='main-content-container'>-->
<div class='section-wrapper'>
<?php if( ($a->module === 'settings' || $a->module === 'message' || $a->module === 'profile') && x($page,'aside')) echo $page['aside']; ?>
<section>
<?php if(x($page,'content')) echo $page['content']; ?>
<div id="pause"></div> <!-- The pause/resume Ajax indicator -->
<div id="page-footer"></div>
</section>
</div>
<right_aside><?php if(x($page,'right_aside')) echo $page['right_aside']; ?></right_aside>
<?php if( ($a->module === 'contacts') && x($page,'aside')) echo $page['aside']; ?>
<footer><?php if(x($page,'footer')) echo $page['footer']; ?></footer>
<!-- </div>-->
</div>
<?php } ?>
<?php if(x($page,'end')) echo $page['end']; ?>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show more