Changeset 416627dc1e5d2db16ec5482c8af88377163298c8
- Timestamp:
- 12/12/08 20:14:01
(4 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
| r1de7d92 |
r416627d |
|
| 26 | 26 | stop: |
|---|
| 27 | 27 | function (e,ui) { |
|---|
| | 28 | wsinfo.reorder = true; |
|---|
| 28 | 29 | wsinfo.graphs = new Array(); |
|---|
| 29 | 30 | ui.item.parent().find("> li > div").each( |
|---|
| … | … | |
| 31 | 32 | ); |
|---|
| 32 | 33 | update_current_worksheet(); |
|---|
| | 34 | wsinfo.reorder = false; |
|---|
| 33 | 35 | } |
|---|
| 34 | 36 | }); |
|---|
| … | … | |
| 88 | 90 | o.ReconGraphRefresh(); |
|---|
| 89 | 91 | 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(); |
|---|
| 94 | 93 | alert('pushing ' + graphid); |
|---|
| 95 | 94 | wsinfo.graphs.push(graphid); |
|---|
| … | … | |
| 105 | 104 | } |
|---|
| 106 | 105 | function load_worksheet(id) { |
|---|
| | 106 | wsinfo.graphs = new Array(); |
|---|
| 107 | 107 | if(id==null) { |
|---|
| 108 | 108 | wsinfo.saved = false; |
|---|
| r86bd53e |
r416627d |
|
| 359 | 359 | } |
|---|
| 360 | 360 | function saveWorksheet($ws) { |
|---|
| | 361 | |
|---|
| 361 | 362 | $id = ''; |
|---|
| 362 | 363 | if($ws['id']) { |
|---|
| … | … | |
| 373 | 374 | $sth->execute(array($ws['title'],$ws['saved'],$id)); |
|---|
| 374 | 375 | 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 |
|---|
| 376 | 379 | where sheetid=?"); |
|---|
| 377 | | $sth->execute(array($id)); |
|---|
| | 380 | $sth->execute(array($id)); |
|---|
| | 381 | } |
|---|
| | 382 | |
|---|
| 378 | 383 | } |
|---|
| 379 | 384 | else { |
|---|
| … | … | |
| 385 | 390 | $sth->execute(array($id, $ws['title'])); |
|---|
| 386 | 391 | } |
|---|
| | 392 | |
|---|
| 387 | 393 | $sth = $this->db->prepare("insert into prism.saved_worksheets_dep |
|---|
| 388 | 394 | (sheetid, ordering, graphid) |
|---|