/[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 28 by dpavlin, Sun Apr 19 00:02:11 2009 UTC revision 34 by dpavlin, Wed Dec 9 13:10:54 2009 UTC
# Line 12  $(document).ready( function() { Line 12  $(document).ready( function() {
12    
13          function click_on_cell(e) {          function click_on_cell(e) {
14    
15    console.debug( e, this );
16    
17                  var tag = e.originalTarget.tagName;                  var tag = e.originalTarget.tagName;
18    
19                  var col_nr = e.originalTarget.cellIndex;                  var col_nr = e.originalTarget.cellIndex;
# Line 66  $(document).ready( function() { Line 68  $(document).ready( function() {
68                  $('form#sql').addClass('visible').addClass('fixed');                  $('form#sql').addClass('visible').addClass('fixed');
69          };          };
70    
71          $('table#results').bind('mouseup', click_on_cell);          $('table#results th').bind('click', function(e) {
72                    var column = $(this).text();
73                    console.info('header', column);
74    
75                    $('form#sql .changed').removeClass('changed');
76    
77                    $('form#sql input[name=order_by]')
78                            .addClass('changed')
79                            .attr('value', column + ' desc')
80                            ;
81    
82                    $('form#sql').addClass('visible').addClass('fixed');
83            });
84    
85    //      $('table#results td').bind('click', click_on_cell);
86    
87          $('#status').bind('click', function() {          $('#status').bind('click', function() {
88                  $('form#sql').toggleClass('visible').addClass('fixed');                  $('form#sql').toggleClass('visible').addClass('fixed');

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

  ViewVC Help
Powered by ViewVC 1.1.26