/[Frey]/trunk/static/Frey/View/NoPager.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 /trunk/static/Frey/View/NoPager.js

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

revision 965 by dpavlin, Wed Jan 7 20:31:51 2009 UTC revision 966 by dpavlin, Wed Jan 7 23:00:40 2009 UTC
# Line 6  Line 6 
6          2006-08-16 Dobrica Pavlinusic <dpavlin@rot13.org>          2006-08-16 Dobrica Pavlinusic <dpavlin@rot13.org>
7  */  */
8    
9  var preloadDistance = 1000;  var preloadDistance = _getWindowHeight() * 2;
10  var isUpdating = false;  var isUpdating = false;
11  var isMouseDown = false;  var isMouseDown = false;
12  var checker;  var checker;
# Line 42  function load_next_page() { Line 42  function load_next_page() {
42                  'Loading page '+ v.page + '...'                  'Loading page '+ v.page + '...'
43          );          );
44    
45          console.log( 'v = ', v );          //console.log( 'v = ', v );
46    
47          $.get(          $.get(
48                  "/Frey::View::NoPager/results_as_markup",                  "/Frey::View::NoPager/results_as_markup",
# Line 51  function load_next_page() { Line 51  function load_next_page() {
51                          search: v.search                          search: v.search
52                  },                  },
53                  function ( response ) {                  function ( response ) {
54                          $('#next_page').html( response );                          var next_page = $( '#next_page_' + v.page );
55                            next_page.hide();
56                            $( '#results' ).append( '<!-- appended page ' + v.page + ' -->' + response );
57    
58                          var resp_v;                          var resp_v;
59                          eval( 'resp_v=' + $('#json').val() );                          eval( 'resp_v=' + $('#json').val() );
60                          console.log( 'resp_v = ', resp_v );                          //console.log( 'resp_v = ', resp_v );
61    
62                            // record ID so we can detect back-button
63                            v.id = resp_v.id;
64    
65                          // restore status line                          // restore status line
66                          $('#status').html( resp_v.status || old_status );                          $('#status').html( resp_v.status || old_status );
# Line 79  $(document).ready( function() { Line 84  $(document).ready( function() {
84    
85          var cookie_id = getCookie(cookie+'_id') || 0;          var cookie_id = getCookie(cookie+'_id') || 0;
86    
87          console.debug( v );          //console.debug( 'ready', v );
88          $.log.debug("Page Cookie:" + cookie_id);          $.log.debug("Page Cookie:" + cookie_id);
89    
90    /* FIXME
91          var fromBackButton = false;          var fromBackButton = false;
92          if ( cookie_id == v.id ) {          if ( cookie_id == v.id ) {
93                  fromBackButton = true;                  fromBackButton = true;
# Line 96  $(document).ready( function() { Line 102  $(document).ready( function() {
102                  $('#spacer').height( getCookie(cookie+'_height')+"px" );                  $('#spacer').height( getCookie(cookie+'_height')+"px" );
103                  scroll( 0, getCookie(cookie+'_scroll') );                  scroll( 0, getCookie(cookie+'_scroll') );
104          }          }
105    */
106    
107          $(window).mousedown( function () {          $(window).mousedown( function () {
108                  isMouseDown = true;                  isMouseDown = true;

Legend:
Removed from v.965  
changed lines
  Added in v.966

  ViewVC Help
Powered by ViewVC 1.1.26