Changeset 416627dc1e5d2db16ec5482c8af88377163298c8

Show
Ignore:
Timestamp:
12/12/08 20:14:01 (6 years ago)
Author:
Umar Farooq <umar@omniti.com>
git-committer:
Umar Farooq <umar@omniti.com> 1229112841 +0000
git-parent:

[1de7d92259350b19b3c8e7e4a7edc523b0531ec3]

git-author:
Umar Farooq <umar@omniti.com> 1229112841 +0000
Message:

fixed bug with adding/reordering the graphs in a worksheet

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ui/web/htdocs/worksheet_panel.inc

    r1de7d92 r416627d  
    2626                stop: 
    2727                  function (e,ui) { 
     28                    wsinfo.reorder = true; 
    2829                    wsinfo.graphs = new Array(); 
    2930                    ui.item.parent().find("> li > div").each( 
     
    3132                    ); 
    3233                    update_current_worksheet(); 
     34                    wsinfo.reorder = false; 
    3335                  } 
    3436              }); 
     
    8890    o.ReconGraphRefresh(); 
    8991    ul.sortable("refresh"); 
    90     if(!wsinfo.graphs) { 
    91       wsinfo.graphs = new Array(); 
    92       alert('no graphs in add queue'); 
    93     } 
     92    wsinfo.graphs = new Array(); 
    9493    alert('pushing ' + graphid); 
    9594    wsinfo.graphs.push(graphid); 
     
    105104} 
    106105function load_worksheet(id) { 
     106    wsinfo.graphs = new Array(); 
    107107  if(id==null) { 
    108108    wsinfo.saved = false; 
  • ui/web/lib/Reconnoiter_DB.php

    r86bd53e r416627d  
    359359  } 
    360360  function saveWorksheet($ws) { 
     361 
    361362    $id = ''; 
    362363    if($ws['id']) { 
     
    373374        $sth->execute(array($ws['title'],$ws['saved'],$id)); 
    374375        if($sth->rowCount() != 1) throw(new Exception('No such worksheet: '.$id)); 
    375         $sth = $this->db->prepare("delete from prism.saved_worksheets_dep 
     376 
     377        if($ws['reorder']) { 
     378          $sth = $this->db->prepare("delete from prism.saved_worksheets_dep 
    376379                                    where sheetid=?"); 
    377         $sth->execute(array($id)); 
     380          $sth->execute(array($id)); 
     381        } 
     382 
    378383      } 
    379384      else { 
     
    385390        $sth->execute(array($id, $ws['title'])); 
    386391      } 
     392 
    387393      $sth = $this->db->prepare("insert into prism.saved_worksheets_dep 
    388394                                             (sheetid, ordering, graphid)