Skip to content

Commit

Permalink
Refactored some code.
Browse files Browse the repository at this point in the history
Navigation buttons still not being consistently hidden?!?

git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@477 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
JohnSmith-LT committed Nov 12, 2012
1 parent e5977c9 commit 160ffe8
Showing 1 changed file with 13 additions and 13 deletions.
Expand Up @@ -5,9 +5,16 @@
var connectorPlainText = new function() {
// function called every time the page is viewed after it has initially loaded
this.pageChanged = function() {
// turn off the buttons after we've called x_pageLoaded()
this.setPageNav();
}

// function called every time the size of the LO is changed
this.sizeChanged = function() {

}

this.setPageNav = function() {
if (x_currentPageXML.getAttribute("pageNav") == "none") {
console.log("turn off buttons");
$x_menuBtn.hide();
$x_nextBtn
.button("disable")
Expand All @@ -18,15 +25,9 @@
.removeClass("ui-state-focus")
.removeClass("ui-state-hover");
}
}

// function called every time the size of the LO is changed
this.sizeChanged = function() {

}
}

this.afterNavigation = function(strPage) {
console.log("we were returned to the model");
$x_menuBtn.show();
}

Expand All @@ -47,14 +48,13 @@
// call this function in every model once everything's loaded
x_pageLoaded();

this.pageChanged();
// *** Not sure why but the prevBtn isn't disabled when model loads but is when we return to this page !?!
this.setPageNav();
}
}

connectorPlainText.init(); // Temporary solution until XMP ready

connectorPlainText.init(); // Temporarily call init() until XMP ready
</script>

<div id="pageContents">

</div>

0 comments on commit 160ffe8

Please sign in to comment.