/[sql-web-session]/sql-editor.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 /sql-editor.js

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

revision 20 by dpavlin, Sat Apr 18 14:05:13 2009 UTC revision 28 by dpavlin, Sun Apr 19 00:02:11 2009 UTC
# Line 63  $(document).ready( function() { Line 63  $(document).ready( function() {
63                          console.error('unknown click on ', tag, e);                          console.error('unknown click on ', tag, e);
64                  }                  }
65                    
66                  $('form#sql').addClass('visible');                  $('form#sql').addClass('visible').addClass('fixed');
67          };          };
68    
69          $('table#results').bind('mouseup', click_on_cell);          $('table#results').bind('mouseup', click_on_cell);
70    
71          $('#status').bind('click', function() {          $('#status').bind('click', function() {
72                  $('form#sql').toggleClass('visible');                  $('form#sql').toggleClass('visible').addClass('fixed');
73          });          });
74    
75          $('input[name=lookup_col]').bind('click', function(e) {          $('input[name=lookup_col]').bind('click', function(e) {
# Line 78  $(document).ready( function() { Line 78  $(document).ready( function() {
78                  var col_nr = $('form#sql select[name=where_column]').attr('options').selectedIndex;                  var col_nr = $('form#sql select[name=where_column]').attr('options').selectedIndex;
79                  var operator = $('select[name=where_operator]').attr('options').selectedIndex;                  var operator = $('select[name=where_operator]').attr('options').selectedIndex;
80    
81                  l.html('...loading lookup for '+column+'...').css('display','block');                  l.html('...loading lookup for '+column+'...').css('display','block').scrollTop(0);
82    
83                  console.debug( this, e, column, col_nr, l );                  console.debug( this, e, column, col_nr, l );
84    
# Line 86  $(document).ready( function() { Line 86  $(document).ready( function() {
86                          .removeClass('changed')                          .removeClass('changed')
87                          .attr('disabled', 1);                          .attr('disabled', 1);
88    
89                  $.get('', { lookup_col: column }, function(data,textStatus) {                  var where_parts = [];
90                    $('input[name=where_parts]').each(function(){ if (this.checked) where_parts.push(this.value) });
91                    var args = {
92                            table: $('input[name=from]').val(),
93                            lookup_col: column,
94                            where_parts: where_parts,
95                    };
96                    console.debug( 'get', args );
97                    $.get('', args, function(data,textStatus) {
98                          console.debug( data, textStatus );                          console.debug( data, textStatus );
99                          l.addClass('changed');                          l.addClass('changed');
100                          l.html( data );                          l.html( data );

Legend:
Removed from v.20  
changed lines
  Added in v.28

  ViewVC Help
Powered by ViewVC 1.1.26