/[webpac2]/Webpacus/root/js/webpac.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 /Webpacus/root/js/webpac.js

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

revision 274 by dpavlin, Sat Dec 17 03:20:04 2005 UTC revision 275 by dpavlin, Sat Dec 17 03:20:19 2005 UTC
# Line 82  function prev_page() { Line 82  function prev_page() {
82  /* toggle visibility and replace text with something else */  /* toggle visibility and replace text with something else */
83  function toggleLinkAndElement ( link, elementID, text ) {  function toggleLinkAndElement ( link, elementID, text ) {
84    
         Element.toggle( elementID ); // toggle the element  
   
85          if ( link.innerHTML != text ) {          if ( link.innerHTML != text ) {
86                  // change link text                  // change link text
87                  link.oldInnerHTML = link.innerHTML;                  link.oldInnerHTML = link.innerHTML;
# Line 93  function toggleLinkAndElement ( link, el Line 91  function toggleLinkAndElement ( link, el
91                  link.innerHTML = link.oldInnerHTML;                  link.innerHTML = link.oldInnerHTML;
92          }          }
93    
94            Logger.debug('toggleLinkAndElement '+elementID+': '+Element.visible( elementID )+' text: '+text);
95    
96            Element.toggle( elementID );
97    
98            // why is this needed, Firefox 1.5?
99            if (Element.visible( elementID )) $( elementID ).style.display = 'block';
100    
101          return false;          return false;
102  }  }
103    
# Line 106  function submit_results_form() { Line 111  function submit_results_form() {
111          if (results_form) {          if (results_form) {
112                  var form_params = Form.serialize( results_form );                  var form_params = Form.serialize( results_form );
113    
114                  Logger.debug('Ajax.Updater(results,/results) '+form_params);                  Logger.debug('Ajax.Updater(results,/results/ajax) '+form_params);
115    
116                  new Ajax.Updater( 'results', '/search/results', {                  new Ajax.Updater( 'results', '/search/results/ajax', {
117                          parameters: form_params,                          parameters: form_params,
118                          asynchronous: 1,                          asynchronous: 1,
119                          onLoading: function(request) {                          onLoading: function(request) {

Legend:
Removed from v.274  
changed lines
  Added in v.275

  ViewVC Help
Powered by ViewVC 1.1.26