diff options
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/acl.js | 76 | ||||
-rw-r--r-- | view/js/ajaxupload.js | 4 | ||||
-rw-r--r-- | view/js/main.js | 26 | ||||
-rw-r--r-- | view/js/mod_chat.js | 4 | ||||
-rw-r--r-- | view/js/mod_filestorage.js (renamed from view/js/mod_filestorage.php) | 4 | ||||
-rw-r--r-- | view/js/mod_mitem.js | 4 | ||||
-rw-r--r-- | view/js/mod_network.js | 2 | ||||
-rw-r--r-- | view/js/mod_photos.js | 17 | ||||
-rw-r--r-- | view/js/mod_settings.js | 4 |
9 files changed, 65 insertions, 76 deletions
diff --git a/view/js/acl.js b/view/js/acl.js index 84b080de2..28e47011f 100644 --- a/view/js/acl.js +++ b/view/js/acl.js @@ -17,19 +17,26 @@ 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*/ - 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); + + $(document).ready(function() { + 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); + that.on_submit(); + }); + } +// no longer called on submit - call to update whenever a change occurs to the acl list. + ACL.prototype.on_submit = function(){ aclfileds = $("#acl-fields").html(""); $(that.allow_gid).each(function(i,v){ @@ -44,6 +51,8 @@ ACL.prototype.on_submit = function(){ $(that.deny_cid).each(function(i,v){ aclfileds.append("<input type='hidden' name='contact_deny[]' value='"+v+"'>"); }); +// alert(aclfileds); + } ACL.prototype.search = function(){ @@ -61,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 = []; @@ -72,6 +81,7 @@ ACL.prototype.on_showall = function(event){ that.deny_gid = []; that.update_view(); + that.on_submit(); return false; } @@ -86,7 +96,7 @@ ACL.prototype.on_button_show = function(event){ $(this).toggleClass("selected");*/ that.set_allow($(this).parent().attr('id')); - + that.on_submit(); return false; } ACL.prototype.on_button_hide = function(event){ @@ -99,7 +109,7 @@ ACL.prototype.on_button_hide = function(event){ $(this).toggleClass("selected");*/ that.set_deny($(this).parent().attr('id')); - + that.on_submit(); return false; } @@ -152,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) { @@ -176,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(' '); @@ -192,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"; } @@ -225,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"); } } 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/main.js b/view/js/main.js index 5f88ea9ca..38cde749c 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -728,27 +728,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 +1005,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 +1015,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_filestorage.php b/view/js/mod_filestorage.js index 82957ae44..88c1cf7d8 100644 --- a/view/js/mod_filestorage.php +++ 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 c9d13f742..aaa86df40 100644 --- a/view/js/mod_photos.js +++ b/view/js/mod_photos.js @@ -3,20 +3,25 @@ var ispublic = aStr['everybody']; $(document).ready(function() { - $("a#settings-default-perms-menu").colorbox({ - 'inline' : true, - 'transition' : 'elastic' - }); + $("a#photos-upload-perms-menu").colorbox({ + 'inline' : true, + 'transition' : 'elastic' + }); + + $("a#settings-default-perms-menu").colorbox({ + 'inline' : true, + 'transition' : 'elastic' + }); $('#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-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(); } |