Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 42E69102F6 for ; Wed, 22 Jan 2014 17:11:03 +0000 (UTC) Received: (qmail 13913 invoked by uid 500); 22 Jan 2014 17:11:02 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 13869 invoked by uid 500); 22 Jan 2014 17:11:02 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 13852 invoked by uid 99); 22 Jan 2014 17:11:02 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jan 2014 17:11:02 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id DCD72818F90; Wed, 22 Jan 2014 17:11:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: johnsca@apache.org To: allura-commits@incubator.apache.org Date: Wed, 22 Jan 2014 17:11:02 -0000 Message-Id: <073ac2af35544b00a3222596fb30c8cc@git.apache.org> In-Reply-To: <9d27e2d2e3c24d64adf6805480093afa@git.apache.org> References: <9d27e2d2e3c24d64adf6805480093afa@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/2] git commit: [#4257] Ugly hack to fix Access Denied error in IE [#4257] Ugly hack to fix Access Denied error in IE It seems that some combination of IE11, jQuery 1.8.0, and possibly something else on our page, doing $('
  • elem
  • ') causes IE to raise an "Access denied" error claiming that we're attempting cross-site javascript iframe access. However, doing $('#elem').append('
  • elem
  • ') works fine. I'd prefer to upgrade jQuery but this is a quicker work-around. Signed-off-by: Cory Johns Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/37cfa403 Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/37cfa403 Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/37cfa403 Branch: refs/heads/cj/4257 Commit: 37cfa4039e00bb028b580940c318fafc89f9bf8d Parents: c816fe8 Author: Cory Johns Authored: Wed Jan 22 17:05:58 2014 +0000 Committer: Cory Johns Committed: Wed Jan 22 17:06:10 2014 +0000 ---------------------------------------------------------------------- .../forgeactivity/nf/activity/js/activity.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/37cfa403/ForgeActivity/forgeactivity/nf/activity/js/activity.js ---------------------------------------------------------------------- diff --git a/ForgeActivity/forgeactivity/nf/activity/js/activity.js b/ForgeActivity/forgeactivity/nf/activity/js/activity.js index f6807d7..80b79d8 100644 --- a/ForgeActivity/forgeactivity/nf/activity/js/activity.js +++ b/ForgeActivity/forgeactivity/nf/activity/js/activity.js @@ -164,16 +164,21 @@ $(function() { } var newerText = newer ? 'newer' : 'older'; $.get(url, function(html) { - var $html = $(html); var $timeline = $('.timeline'); - var newPage = $html.data('page'); + var empty = html.match(/^\s*$/); + var newestPage = newer && $('.timeline li:first').data('page') <= 1; var limit = $('.timeline').data('limit'); + var fullPage = true; saveScrollPosition(); - if ($html.length < limit || newPage == 0) { + if (!empty) { + $timeline[newer ? 'prepend' : 'append'](html); + var newPage = $timeline.find('li:' + (newer ? 'first' : 'last')).data('page'); + fullPage = $timeline.find('li:timeline-page('+newPage+')').length == limit; + pageOut(!newer); + } + if (empty || !fullPage || newestPage) { makeNoMore(newer); } - $timeline[newer ? 'prepend' : 'append']($html); - pageOut(!newer); if (ASOptions.useShowMore) { // this has to be here instead of showMoreLink handler to // ensure that scroll changes between added / removed content