From 160ffe845ecfd9acfa1e42d46e98c95d0c8c35de Mon Sep 17 00:00:00 2001 From: John Smith Date: Mon, 12 Nov 2012 10:37:53 +0000 Subject: [PATCH] Refactored some code. Navigation buttons still not being consistently hidden?!? git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@477 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641 --- .../models_html5/connectorPlainText.html | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/xerte/parent_templates/Nottingham/models_html5/connectorPlainText.html b/modules/xerte/parent_templates/Nottingham/models_html5/connectorPlainText.html index 2979391223..819267bf3a 100644 --- a/modules/xerte/parent_templates/Nottingham/models_html5/connectorPlainText.html +++ b/modules/xerte/parent_templates/Nottingham/models_html5/connectorPlainText.html @@ -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") @@ -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(); } @@ -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
-
\ No newline at end of file