aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js')
-rw-r--r--view/js/acl.js53
-rw-r--r--view/js/ajaxupload.js4
-rw-r--r--view/js/autocomplete.js2
-rw-r--r--view/js/main.js33
-rw-r--r--view/js/mod_chat.js4
-rw-r--r--view/js/mod_connedit.js9
-rw-r--r--view/js/mod_filestorage.js4
-rw-r--r--view/js/mod_mitem.js4
-rw-r--r--view/js/mod_network.js2
-rw-r--r--view/js/mod_photos.js4
-rw-r--r--view/js/mod_settings.js4
11 files changed, 57 insertions, 66 deletions
diff --git a/view/js/acl.js b/view/js/acl.js
index 6c3d9b462..c129634a0 100644
--- a/view/js/acl.js
+++ b/view/js/acl.js
@@ -17,7 +17,7 @@ function ACL(backend_url, preset){
that.item_tpl = unescape($(".acl-list-item[rel=acl-template]").html());
that.showall = $("#acl-showall");
- if (preset.length==0) that.showall.addClass("selected");
+ if (preset.length==0) that.showall.removeClass("btn-default").addClass("btn-warning");
/*events*/
@@ -70,10 +70,10 @@ ACL.prototype.on_showall = function(event){
event.preventDefault()
event.stopPropagation();
- if (that.showall.hasClass("selected")){
+ if (that.showall.hasClass("btn-warning")){
return false;
}
- that.showall.addClass("selected");
+ that.showall.removeClass("btn-default").addClass("btn-warning");
that.allow_cid = [];
that.allow_gid = [];
@@ -162,23 +162,11 @@ ACL.prototype.set_deny = function(itemid){
}
ACL.prototype.update_view = function(){
- var jotpermslock;
- var jotpermsunlock;
- if (document.jotpermslock == null) {
- jotpermslock = 'lock';
- } else {
- jotpermslock = document.jotpermslock;
- }
- if (document.jotpermsunlock == null) {
- jotpermsunlock = 'unlock';
- } else {
- jotpermsunlock = document.jotpermsunlock;
- }
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");
+ that.showall.removeClass("btn-default").addClass("btn-warning");
/* jot acl */
- $('#jot-perms-icon').removeClass(jotpermslock).addClass(jotpermsunlock);
+ $('#jot-perms-icon').removeClass('icon-lock').addClass('icon-unlock');
$('#jot-public').show();
$('.profile-jot-net input').attr('disabled', false);
if(typeof editor != 'undefined' && editor != false) {
@@ -186,9 +174,9 @@ ACL.prototype.update_view = function(){
}
} else {
- that.showall.removeClass("selected");
+ that.showall.removeClass("btn-warning").addClass("btn-default");
/* jot acl */
- $('#jot-perms-icon').removeClass(jotpermsunlock).addClass(jotpermslock);
+ $('#jot-perms-icon').removeClass('icon-unlock').addClass('icon-lock');
$('#jot-public').hide();
$('.profile-jot-net input').attr('disabled', 'disabled');
$('#profile-jot-desc').html(' ');
@@ -202,20 +190,20 @@ ACL.prototype.update_view = function(){
type = itemid[0];
id = itemid.substr(1);
- btshow = $(this).children(".acl-button-show").removeClass("selected");
- bthide = $(this).children(".acl-button-hide").removeClass("selected");
+ btshow = $(this).children(".acl-button-show").removeClass("btn-success").addClass("btn-default");
+ bthide = $(this).children(".acl-button-hide").removeClass("btn-danger").addClass("btn-default");
switch(type){
case "g":
var uclass = "";
if (that.allow_gid.indexOf(id)>=0){
- btshow.addClass("selected");
- bthide.removeClass("selected");
+ btshow.removeClass("btn-default").addClass("btn-success");
+ bthide.removeClass("btn-danger").addClass("btn-default");
uclass="groupshow";
}
if (that.deny_gid.indexOf(id)>=0){
- btshow.removeClass("selected");
- bthide.addClass("selected");
+ btshow.removeClass("btn-success").addClass("btn-default");
+ bthide.removeClass("btn-default").addClass("btn-danger");
uclass="grouphide";
}
@@ -235,12 +223,12 @@ ACL.prototype.update_view = function(){
break;
case "c":
if (that.allow_cid.indexOf(id)>=0){
- btshow.addClass("selected");
- bthide.removeClass("selected");
+ btshow.removeClass("btn-default").addClass("btn-success");
+ bthide.removeClass("btn-danger").addClass("btn-default");
}
if (that.deny_cid.indexOf(id)>=0){
- btshow.removeClass("selected");
- bthide.addClass("selected");
+ btshow.removeClass("btn-success").addClass("btn-default");
+ bthide.removeClass("btn-default").addClass("btn-danger");
}
}
@@ -270,11 +258,16 @@ ACL.prototype.populate = function(data){
that.list_content.height(height);
$(data.items).each(function(){
html = "<div class='acl-list-item {4} {7} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>";
- html = html.format( this.photo, this.name, this.type, this.xid, '', this.self, this.link, this.taggable );
+ html = html.format(this.photo, this.name, this.type, this.xid, '', this.self, this.link, this.taggable);
if (this.uids!=undefined) that.group_uids[this.id] = this.uids;
//console.log(html);
that.list_content.append(html);
});
+ $("#acl-list-content .acl-list-item img[data-src]").each(function(i, el){
+ // Replace data-src attribute with src attribute for every image
+ $(el).attr('src', $(el).data("src"));
+ $(el).removeAttr("data-src");
+ });
that.update_view();
}
diff --git a/view/js/ajaxupload.js b/view/js/ajaxupload.js
index 5719f30e0..c7d587dd1 100644
--- a/view/js/ajaxupload.js
+++ b/view/js/ajaxupload.js
@@ -264,6 +264,9 @@
action: 'upload.php',
// File upload name
name: 'userfile',
+
+ title: 'Upload',
+
// Additional data to send
data: {},
// Submit file as soon as it's selected
@@ -380,6 +383,7 @@
var input = document.createElement("input");
input.setAttribute('type', 'file');
+ input.setAttribute('title',this._settings.title);
input.setAttribute('name', this._settings.name);
addStyles(input, {
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 763ca354d..c01ba6990 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -85,7 +85,7 @@ ACPopup.prototype._search = function(){
if (data.tot>0){
that.cont.show();
$(data.items).each(function(){
- html = "<img src='{0}' height='16px' width='16px'>{1} ({2})".format(this.photo, this.name, this.nick)
+ html = "<img src='{0}' height='16px' width='16px'>{1} ({2})".format(this.photo, this.name, ((this.label) ? this.nick + ' ' + this.label : this.nick) )
that.add(this.taggable, html, this.nick.replace(' ','') + '+' + this.id + ' - ' + this.link);
});
} else {
diff --git a/view/js/main.js b/view/js/main.js
index 5f88ea9ca..17ef578be 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -645,12 +645,15 @@ function updateConvItems(mode,data) {
} else {
$("#nav-" + notifyType + "-menu").html(notifications_all + notifications_mark);
-
$(data.notify).each(function() {
html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.class);
$("#nav-" + notifyType + "-menu").append(html);
});
-
+ $(".dropdown-menu img[data-src]").each(function(i, el){
+ // Replace data-src attribute with src attribute for every image
+ $(el).attr('src', $(el).data("src"));
+ $(el).removeAttr("data-src");
+ });
}
});
@@ -728,27 +731,10 @@ function updateConvItems(mode,data) {
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': cursor.x + 5 , 'top': cursor.y + 5});
- $('#panel').show();
- });
- }
- }
-
- function lockviewhide() {
- lockvisible = false;
- $('#panel').hide();
+ $.get('lockview/' + id, function(data) {
+ $('#panel-' + id).html(data);
+ });
}
function post_comment(id) {
@@ -1022,7 +1008,7 @@ $(window).scroll(function () {
$('#more').show();
}
- if($(window).scrollTop() + $(window).height() == $(document).height()) {
+ if($(window).scrollTop() + $(window).height() > $(document).height() - 100) {
if((pageHasMoreContent) && (! loadingPage)) {
$('#more').hide();
$('#no-more').hide();
@@ -1032,7 +1018,6 @@ $(window).scroll(function () {
loadingPage = true;
liveUpdate();
}
-
}
}
});
diff --git a/view/js/mod_chat.js b/view/js/mod_chat.js
index 82957ae44..88c1cf7d8 100644
--- a/view/js/mod_chat.js
+++ b/view/js/mod_chat.js
@@ -4,11 +4,11 @@ $(document).ready(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-perms-icon').removeClass('icon-unlock').addClass('icon-lock');
$('#jot-public').hide();
});
if(selstr == null) {
- $('#jot-perms-icon').removeClass('lock').addClass('unlock');
+ $('#jot-perms-icon').removeClass('icon-lock').addClass('icon-unlock');
$('#jot-public').show();
}
diff --git a/view/js/mod_connedit.js b/view/js/mod_connedit.js
index 64240abb8..e66c26cda 100644
--- a/view/js/mod_connedit.js
+++ b/view/js/mod_connedit.js
@@ -80,6 +80,15 @@ function connectForum() {
}
+function connectClear() {
+ $('.abook-edit-me').each(function() {
+ if(! $(this).is(':disabled'))
+ $(this).removeAttr('checked');
+ });
+ $('.abook-permschange').show();
+ $('.abook-permschange').html(aStr['permschange']);
+}
+
function connectSoapBox() {
$('.abook-edit-me').each(function() {
if(! $(this).is(':disabled'))
diff --git a/view/js/mod_filestorage.js b/view/js/mod_filestorage.js
index 82957ae44..88c1cf7d8 100644
--- a/view/js/mod_filestorage.js
+++ b/view/js/mod_filestorage.js
@@ -4,11 +4,11 @@ $(document).ready(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-perms-icon').removeClass('icon-unlock').addClass('icon-lock');
$('#jot-public').hide();
});
if(selstr == null) {
- $('#jot-perms-icon').removeClass('lock').addClass('unlock');
+ $('#jot-perms-icon').removeClass('icon-lock').addClass('icon-unlock');
$('#jot-public').show();
}
diff --git a/view/js/mod_mitem.js b/view/js/mod_mitem.js
index d33713ee3..979a15297 100644
--- a/view/js/mod_mitem.js
+++ b/view/js/mod_mitem.js
@@ -10,11 +10,11 @@ $(document).ready(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-perms-icon').removeClass('icon-unlock').addClass('icon-lock');
$('#jot-public').hide();
});
if(selstr == null) {
- $('#jot-perms-icon').removeClass('lock').addClass('unlock');
+ $('#jot-perms-icon').removeClass('icon-lock').addClass('icon-unlock');
$('#jot-public').show();
}
diff --git a/view/js/mod_network.js b/view/js/mod_network.js
index f63a57653..8f1e5132d 100644
--- a/view/js/mod_network.js
+++ b/view/js/mod_network.js
@@ -3,8 +3,8 @@ $(document).ready(function() {
a = $("#search-text").autocomplete({
serviceUrl: baseurl + '/search_ac',
minChars: 2,
- width: 250,
id: 'search-text-ac',
});
+ $('.jslider-scale ins').addClass('hidden-xs');
});
diff --git a/view/js/mod_photos.js b/view/js/mod_photos.js
index d9497af1e..aaa86df40 100644
--- a/view/js/mod_photos.js
+++ b/view/js/mod_photos.js
@@ -17,11 +17,11 @@ $(document).ready(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-perms-icon').removeClass('icon-unlock').addClass('icon-lock');
$('#jot-public').hide();
});
if(selstr == null) {
- $('#jot-perms-icon').removeClass('lock').addClass('unlock');
+ $('#jot-perms-icon').removeClass('icon-lock').addClass('icon-unlock');
$('#jot-public').show();
}
diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js
index 8cd062f43..fa788280d 100644
--- a/view/js/mod_settings.js
+++ b/view/js/mod_settings.js
@@ -12,11 +12,11 @@ $(document).ready(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-perms-icon').removeClass('icon-unlock').addClass('icon-lock');
$('#jot-public').hide();
});
if(selstr == null) {
- $('#jot-perms-icon').removeClass('lock').addClass('unlock');
+ $('#jot-perms-icon').removeClass('icon-lock').addClass('icon-unlock');
$('#jot-public').show();
}