From: senator Date: Thu, 3 Feb 2011 20:34:19 +0000 (-0500) Subject: JS stubbed out, mostly. See longer commit msg. X-Git-Tag: opac-tt-poc-demo2~46^2~2 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=57681c53f503616a9f24343fb26de681daa86d25;p=evergreen%2Fequinox.git JS stubbed out, mostly. See longer commit msg. Here's the deal with JS so far. A few instances of onfocus, onblur, onmouseout, and onmouseover have been left alone, as they're doing simple cosmetic things. A lot of instances of onclick remain, and a couple onchange, but these now either a) just do cosmetic things (hide/unhide) or b) call stubbed out functions prepared in misc.js That doesn't mean we won't still totally rip out lots of this JS, but it leaves us a hint as to what is supposed to happen where. I can easily see us losing track of that later. So anyway, many of the stubbed functions will probably be replaced with purely server side functionality later, but until then, they can serve as a kind of documentation. --- diff --git a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js index 2d809bfd20..31165eda49 100644 --- a/Open-ILS/web/opac/skin/kcls-wire/js/misc.js +++ b/Open-ILS/web/opac/skin/kcls-wire/js/misc.js @@ -1,5 +1,7 @@ /* Some really basic utils copied mostly from old opac js: * opac_utils.js, utils.js, misc.js (kcls). */ +function _stub() { alert("XXX disconnected"); } /* for in progress work */ + function $(id) { return document.getElementById(id); } function $n(root, nodeName, attr) { return findNodeByName(root, nodeName, attr); @@ -95,24 +97,6 @@ function swapTabs(el) { } } -function sortHolds() { - alert("FIXME disconnected"); - /* XXX TODO There was a method for sorting loaded holds in the DOM - * without reloading the page, but it was reliant on fieldmapper - * and some stock dojo libraries. Could be reimplemented without - * deps if deemed worth it. - */ -} - -function showDetailedResults(/* Boolean */ detailed) { - alert("FIXME disconnected"); - /* XXX TODO this stands in for an old onchange handler that toggled - * between simple and detailed results in the rresults page. - * Don't know if we want to keep this around or not (I'm guessing not, - * and that we'll do this with two different server-side pages now, - * but leaving this stub here for now). - */ -} /* Returns the character code pressed that caused the event. */ function grabCharCode(evt) { @@ -145,9 +129,41 @@ function advAddGblRow() { tbody.insertBefore(newrow, $("adv_global_addrow")); var input = $n(newrow, "term"); input.value = ""; - setEnterFunc(input, function() { - alert("XXX enter"); - /* XXX TODO make a real form and get rid of this? */ - }); + setEnterFunc(input, _stub); /* XXX TODO make a real form and get rid of this? */ $n(newrow, 'type').focus(); } + +var rdetailNewBookbag = _stub; /* XXX TODO reimplement without JS? */ +var addMyList = _stub; /* XXX TODO we probably still need this one */ +var listSaveAction = _stub; /* XXX TODO we probably still need this one */ +var expandBoxes = _stub; /* XXX TODO possibly reimplement or replace */ +var iForgotMyPassword = _stub; /* XXX TODO possibly reimplement or replace */ +var switchSubPage = _stub; +var myOPACRenewSelected = _stub; +var myOPACCreateBookbag = _stub; +var myOPACSavePrefs = _stub; +var myOPACUpdatePhone = _stub; /* XXX TODOD myOPACUpdate*() and the buttons where + the handlers are used should probably go + away completely */ +var myOPACUpdateUsername = _stub; +var myOPACUpdatePassword = _stub; +var myOPACUpdateEmail = _stub; +var myOPACUpdateHomeOU = _stub; +var myopacDoHoldAction = _stub; +var myopacApplyThawDate = _stub; +var showCachedList = _stub; +var searchBarSubmit = _stub; +var sortHolds = _stub; /* XXX TODO There was a method for sorting loaded holds + in the DOM without reloading the page, but it was + reliant on fieldmapper and some stock dojo + libraries. Could be reimplemented without deps + if deemed worthwhile. */ +var showDetailedResults = _stub; /* XXX TODO for an old onchange handler that + toggled between simple and detailed results + in the rresults page. */ +var checkAll = _stub; +var sortChecked = _stub; +var sortCheckedHist = _stub; +var showPaymentForm = _stub; +var showFinesDiv = _stub; +var fadeOut = _stub; /* XXX TODO what the heck? not seen anywhere */ diff --git a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2 b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2 index 5c9eca77a9..46d3a98284 100644 --- a/Open-ILS/web/templates/default/kcls-wire/advanced.tt2 +++ b/Open-ILS/web/templates/default/kcls-wire/advanced.tt2 @@ -2,7 +2,6 @@ INCLUDE "default/kcls-wire/parts/topnav.tt2"; ctx.page_title = "Advanced Search" %] [% BLOCK html_head -%] - -[%- END %] +[% END %]
[% INCLUDE "default/kcls-wire/parts/utils.tt2" %] [% INCLUDE "default/kcls-wire/parts/searchbar.tt2" %]