/[jquery]/no_pager/no_pager.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /no_pager/no_pager.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2 by dpavlin, Tue Aug 15 15:43:31 2006 UTC revision 9 by dpavlin, Wed Aug 16 00:29:08 2006 UTC
# Line 19  function favorite( image, feedID ){ Line 19  function favorite( image, feedID ){
19    
20  function getMoreHistory(){  function getMoreHistory(){
21          var indexVal = getElement("history_index").value;          var indexVal = getElement("history_index").value;
22          var xmlDoc = doSimpleXMLHttpRequest("index.cgi/snippet", {index: indexVal, q: document.getElementById('q').value });          var q = getElement('q').value;
23            getElement('status').innerHTML = 'Loading page '+ ( parseInt(indexVal) + 1 ) + '...';
24            var xmlDoc = doSimpleXMLHttpRequest("index.cgi/snippet", {index: indexVal, q: q});
25          xmlDoc.addCallbacks(addMoreHistory, failure);          xmlDoc.addCallbacks(addMoreHistory, failure);
26  }  }
27    
# Line 67  function addMoreHistory( xmlDoc ){ Line 69  function addMoreHistory( xmlDoc ){
69          swapDOM( "more_history", new_history );          swapDOM( "more_history", new_history );
70                    
71          isUpdating = false;          isUpdating = false;
72    
73            var status_update = getElement("status_update");
74            var status = getElement("status");
75            if (status_update && status) {
76                    status.innerHTML = status_update.innerHTML;
77                    log("status updated");
78            }
79    
80  }  }
81    
82  function updatePage(){  function updatePage(){
83          if ( isUpdating == false          if ( isUpdating == false
84                     && mouseState == "up"                          && mouseState == "up"
85                     && getPageHeight() - getScrollHeight() < preloadDistance){                          && getPageHeight() - getScrollHeight() < preloadDistance){
86          log("Getting segment: ", $("history_index").value);                  log("Getting segment: ", $("history_index").value);
87          setCookie(id, $("history_index").value );                  setCookie(id, $("history_index").value );
88          isUpdating = true;                  isUpdating = true;
89                  getMoreHistory();                  getMoreHistory();
90          }          }
91          checker.cancel();          checker.cancel();

Legend:
Removed from v.2  
changed lines
  Added in v.9

  ViewVC Help
Powered by ViewVC 1.1.26