Skip to content
This repository has been archived by the owner on Apr 16, 2019. It is now read-only.

Commit

Permalink
Fix #662
Browse files Browse the repository at this point in the history
removeEventListener was missing the event name in a few cases.
  • Loading branch information
Ian Maffett committed Apr 23, 2014
1 parent 503b36a commit a222b14
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 85 deletions.
24 changes: 13 additions & 11 deletions build/ui/af.ui.jquery.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! intel-appframework - v2.1.0 - 2014-04-18 */
/*! intel-appframework - v2.1.0 - 2014-04-23 */

/**
* jq.appframework.js
Expand Down Expand Up @@ -4287,7 +4287,7 @@ if (!Date.now)
if(this.isIntel){
var xdkLaunch=function(){
that.launch();
document.removeEventListener(xdkLaunch);
document.removeEventListener("intel.xdk.device.ready",xdkLaunch);
};
document.addEventListener("intel.xdk.device.ready",xdkLaunch);
}
Expand Down Expand Up @@ -5031,7 +5031,7 @@ if (!Date.now)
$.query("#header").append(elems);
//Do not animate - sometimes they act funky
if (!$.ui.animateHeaders) {
if (that.prevHeader.data("parent")){
if (that.prevHeader.data("parent")){
if($.feat.nativeTouchScroll||$.os.desktop || !useScroller ){
this.prevHeader.appendTo("#" + this.prevHeader.data("parent"));
}
Expand Down Expand Up @@ -5059,7 +5059,7 @@ if (!Date.now)
time: that.transitionTime,
delay: numOnly(that.transitionTime) / 5 + "ms",
complete: function() {
if (that.prevHeader.data("parent")){
if (that.prevHeader.data("parent")){
if($.feat.nativeTouchScroll||$.os.desktop || !useScroller ){
that.prevHeader.appendTo("#" + that.prevHeader.data("parent"));
}
Expand Down Expand Up @@ -5585,15 +5585,15 @@ if (!Date.now)
//check for custom footer
var that = this;
var hasFooter = what.getAttribute("data-footer");
var hasHeader = what.getAttribute("data-header");
var hasHeader = what.getAttribute("data-header");
//$asap removed since animations are fixed in css3animate
if (hasFooter && hasFooter.toLowerCase() === "none") {
that.toggleNavMenu(false);
hasFooter = false;
} else {
that.toggleNavMenu(true);
}
if (hasFooter && that.customFooter !== hasFooter) {
if (hasFooter && that.customFooter !== hasFooter) {
that.customFooter = hasFooter;
that.updateNavbarElements(hasFooter);
} else if (hasFooter !== that.customFooter) {
Expand All @@ -5620,7 +5620,7 @@ if (!Date.now)

//Load inline footers
var inlineFooters = $(what).find("footer");
if (inlineFooters.length > 0) {
if (inlineFooters.length > 0) {
that.customFooter = what.id;
inlineFooters.data("parent", what.id);
that.updateNavbarElements(inlineFooters);
Expand Down Expand Up @@ -5868,7 +5868,9 @@ if (!Date.now)
this.setBackButtonVisibility(false);
this.history = [];
$("#header #menubadge").css("float", "left");
} else if (this.showBackButton && this.showBackbutton) this.setBackButtonVisibility(true);
} else {
this.setBackButtonVisibility( this.showBackButton && this.showBackbutton );
}
this.activeDiv = what;
if (this.scrollingDivs[this.activeDiv.id]) {
this.scrollingDivs[this.activeDiv.id].enable(this.resetScrollers);
Expand Down Expand Up @@ -5938,10 +5940,10 @@ if (!Date.now)
urlHash = that.addContentDiv(urlHash, xmlhttp.responseText, anchor.title ? anchor.title : target, refresh, refreshFunction);
} else {

that.updatePanel("afui_ajax", xmlhttp.responseText);
that.updatePanel("afui_ajax", xmlhttp.responseText);
$.query("#afui_ajax").attr("data-title",anchor.title ? anchor.title : target);
that.loadContent("#afui_ajax", newTab, back, transition);

doReturn = true;
}
//Let's load the content now.
Expand Down Expand Up @@ -6498,7 +6500,7 @@ if (!Date.now)
document.body.style.height = "100%";
document.documentElement.style.minHeight = window.innerHeight;
}, 30);
document.removeEventListener(xdkDeviceReady);
document.removeEventListener("intel.xdk.device.ready",xdkDeviceReady);
};
document.addEventListener("intel.xdk.device.ready",xdkDeviceReady);
//Fix an ios bug where scrolling will not work with rotation
Expand Down
Loading

0 comments on commit a222b14

Please sign in to comment.