/[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 203 by dpavlin, Fri Dec 2 23:01:25 2005 UTC revision 242 by dpavlin, Wed Dec 14 18:56:17 2005 UTC
# Line 130  function hide_searching() { Line 130  function hide_searching() {
130          load record nr in some template          load record nr in some template
131  */  */
132    
133  function load_rec(nr, tmp_template_filename) {  function load_rec(record_uri, tmp_template_filename) {
134          if (! tmp_template_filename) tmp_template_filename = template_filename;          if (! tmp_template_filename) tmp_template_filename = template_filename;
135          Logger.info('load_rec '+nr+' in '+tmp_template_filename);          Logger.info('load_rec '+record_uri+' in '+tmp_template_filename);
136    
137          var results_form = $('results_form');          var results_form = $('results_form');
138    
139          if (results_form) {          if (results_form) {
140                  var args = '?mfn='+nr+'&template_filename='+tmp_template_filename;                  var args = '?record_uri='+record_uri+'&template_filename='+tmp_template_filename;
141                  Logger.debug('Ajax.Updater(results,/search/record) '+args);                  Logger.debug('Ajax.Updater(results,/search/record) '+args);
142    
143                  new Ajax.Updater( 'results', '/search/record'+args, {                  new Ajax.Updater( 'results', '/search/record'+args, {
# Line 167  function load_rec(nr, tmp_template_filen Line 167  function load_rec(nr, tmp_template_filen
167          hopefully, this implementation won't break when I update prototype next time :-)          hopefully, this implementation won't break when I update prototype next time :-)
168  */  */
169    
170  Object.extend(Object.extend(Ajax.Autocompleter.prototype, Autocompleter.Base.prototype), {  
171    Ajax.Suggest = Class.create();
172    Logger.debug('Created Ajax.Suggest Class');
173    Object.extend(Object.extend(Ajax.Suggest.prototype, Ajax.Autocompleter.prototype), {
174    initialize: function(element, update, url, options) {    initialize: function(element, update, url, options) {
175            this.baseInitialize(element, update, options);            this.baseInitialize(element, update, options);
176      this.options.asynchronous  = true;      this.options.asynchronous  = true;
# Line 176  Object.extend(Object.extend(Ajax.Autocom Line 179  Object.extend(Object.extend(Ajax.Autocom
179      this.url                   = url;      this.url                   = url;
180      this.ignoreReturn = true;      this.ignoreReturn = true;
181    
182        Logger.debug('Ajax.Sugget initialize '+element+','+update+','+url);
183    
184      this.options.onShow = function(element, update) {      this.options.onShow = function(element, update) {
185        if(!update.style.position || update.style.position=='absolute') {        if(!update.style.position || update.style.position=='absolute') {
186          update.style.position = 'absolute';          update.style.position = 'absolute';
# Line 218  Object.extend(Object.extend(Ajax.Autocom Line 223  Object.extend(Object.extend(Ajax.Autocom
223    markNext: function() {    markNext: function() {
224      if(this.index < this.entryCount-1) this.index++      if(this.index < this.entryCount-1) this.index++
225      //  else this.index = 0;      //  else this.index = 0;
226    },    }
227    
228  });  });
229    
230    

Legend:
Removed from v.203  
changed lines
  Added in v.242

  ViewVC Help
Powered by ViewVC 1.1.26