diff options
author | Habeas Codice <habeascodice@federated.social> | 2014-11-17 15:15:02 -0800 |
---|---|---|
committer | Habeas Codice <habeascodice@federated.social> | 2014-11-17 15:15:02 -0800 |
commit | 96427a23a3523daf2c1966fe1b8a6e119e797e50 (patch) | |
tree | a7aaea69271817bbc8f78396f0d98052ca52d3f3 /view/js | |
parent | bcaa32a83a965f111bfc2ba085a59857a4fa0c2d (diff) | |
parent | e59f7cc198fb038cd8344c2d403b423d57300a96 (diff) | |
download | volse-hubzilla-96427a23a3523daf2c1966fe1b8a6e119e797e50.tar.gz volse-hubzilla-96427a23a3523daf2c1966fe1b8a6e119e797e50.tar.bz2 volse-hubzilla-96427a23a3523daf2c1966fe1b8a6e119e797e50.zip |
Merge branch 'master' of https://github.com/habeascodice/red
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/acl.js | 16 | ||||
-rw-r--r-- | view/js/main.js | 33 |
2 files changed, 25 insertions, 24 deletions
diff --git a/view/js/acl.js b/view/js/acl.js index eb702d2b0..f9fd66bab 100644 --- a/view/js/acl.js +++ b/view/js/acl.js @@ -25,14 +25,16 @@ function ACL(backend_url, preset){ /*events*/ $(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); +// setTimeout( 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); - /* startup! */ - that.get(0,100); - that.on_submit(); + /* startup! */ + that.get(0,100); + that.on_submit(); +// }, 5000 ); }); } diff --git a/view/js/main.js b/view/js/main.js index a55b8fbb1..bec35ba72 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -458,25 +458,17 @@ function updateConvItems(mode,data) { if(isVisible) showHideComments(itmId); $(".autotime").timeago(); - // divgrow doesn't prevent itself from attaching a second (or 500th) - // "show more" div to a content region - it also has a few other - // issues related to how we're trying to use it. - // disable for now. - // $("div.wall-item-body").divgrow({ initialHeight: 400 }); } else { $('img',this).each(function() { $(this).attr('src',$(this).attr('dst')); }); - // more FIXME related to expanded comments if($('#collapsed-comments-'+itmId).is(':visible')) isVisible = true; $('#' + ident).replaceWith($(this)); if(isVisible) showHideComments(itmId); $(".autotime").timeago(); - // $("div.wall-item-body").divgrow({ initialHeight: 400 }); - } prev = ident; }); @@ -508,8 +500,6 @@ function updateConvItems(mode,data) { if(isVisible) showHideComments(itmId); $(".autotime").timeago(); - // $("div.wall-item-body").divgrow({ initialHeight: 400 }); - } else { $('img',this).each(function() { @@ -521,7 +511,6 @@ function updateConvItems(mode,data) { if(isVisible) showHideComments(itmId); $(".autotime").timeago(); - // $("div.wall-item-body").divgrow({ initialHeight: 400 }); } }); @@ -557,7 +546,6 @@ function updateConvItems(mode,data) { showHideComments(itmId); $(".autotime").timeago(); - // $("div.wall-item-body").divgrow({ initialHeight: 400 }); } prev = ident; }); @@ -596,17 +584,28 @@ function updateConvItems(mode,data) { function collapseHeight() { - $(".wall-item-body").each(function() { - if($(this).height() > 410) { + var isListMode = false; + $(".wall-item-listbody").each(function() { + isListMode = true; + if($(this).height() > 210) { if(! $(this).hasClass('divmore')) { - $(this).divgrow({ initialHeight: 400, moreText: aStr['divgrowmore'], lessText: aStr['divgrowless'], showBrackets: false }); + $(this).divgrow({ initialHeight: 200, moreText: aStr['divgrowmore'], lessText: aStr['divgrowless'], showBrackets: false }); $(this).addClass('divmore'); } } }); - } - + $(".wall-item-body").each(function() { + if(! isListMode) { + if($(this).height() > 410) { + if(! $(this).hasClass('divmore')) { + $(this).divgrow({ initialHeight: 400, moreText: aStr['divgrowmore'], lessText: aStr['divgrowless'], showBrackets: false }); + $(this).addClass('divmore'); + } + } + } + }); + } function liveUpdate() { if((src == null) || (stopped) || (! profile_uid)) { $('.like-rotator').spin(false); return; } |