Changeset 619 for trunk/uploadr/flash
- Timestamp:
- 04/14/09 21:24:46 (7 months ago)
- Files:
-
- trunk/uploadr/flash/src/Model.as (modified) (10 diffs)
- trunk/uploadr/flash/src/widget/Grid.as (modified) (1 diff)
- trunk/uploadr/flash/src/widget/PhotoGrid.as (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/uploadr/flash/src/Model.as
r602 r619 14 14 public class Model{ 15 15 16 16 17 public var current_tags:Object; 17 18 public var user:Object; … … 36 37 37 38 public var current_id:String; 38 public var current:Array ;39 public var current:Array = new Array(); 39 40 public var current_by_id:Object; 40 41 … … 59 60 public var initialized:Boolean; 60 61 61 62 63 62 public var selected:Array; 64 63 public var selection_by_id:Object = {}; 65 64 66 private var views:Array ;65 private var views:Array = new Array(); 67 66 private var timer:Timer; 68 67 //private var api:FlickrAPI; … … 70 69 private var look_larger; 71 70 72 public var tag_sections:Array ;71 public var tag_sections:Array = new Array(); 73 72 74 73 … … 79 78 80 79 public function Model(){ 81 82 this.initVars();83 84 85 86 80 87 81 this.mode = "date"; … … 100 94 } 101 95 102 private function initVars(){103 this.views = new Array();104 this.tag_sections = new Array();105 }106 107 96 public function reset(){ 108 this.initVars();109 97 this.sets_by_id = new Object(); 110 98 this.tags_by_id = new Object(); … … 113 101 this.current_by_id = new Object(); 114 102 this.current_id = null; 115 this.current = null; 103 this.current = new Array(); 104 this.tag_sections = new Array(); 116 105 this.set_data = new Array(); 117 106 this.tag_data = new Array(); … … 124 113 this.updateSets(); 125 114 this.updateList(); 115 this.dispatch("ListChanged"); 126 116 this.refreshMode(); 127 this.dispatch("ListChanged");128 117 this.dispatch("CurrentChanged"); 118 this.dispatch("Reset"); 129 119 } 130 120 … … 462 452 this.current_tags = new Object(); 463 453 464 //this.updateDatesTags();454 this.updateDatesTags(); 465 455 466 456 //this.updateCurrentById(); … … 476 466 for(var i=0; i < this.current.length; i++){ 477 467 if(this.current[i].tags){ 478 var ts:Array = this.current[i].tags.split(" ");468 var ts:Array = this.current[i].tags.split(" "); 479 469 for(var k=0; k<ts.length;k++){ 480 470 if(!this.current_tags[ts[k]]) trunk/uploadr/flash/src/widget/Grid.as
r602 r619 212 212 } 213 213 214 public function clear(){ 215 this.removed_items = {}; 216 } 217 214 218 public function addItem(p:Object, no_refresh=false){ 215 219 if(!this.removed_items[p.id]){ trunk/uploadr/flash/src/widget/PhotoGrid.as
r602 r619 27 27 private function refresh_progress(){ 28 28 for(var j in this.grid.items){ 29 if(this.m.all[j] .progress >=0)29 if(this.m.all[j] && this.m.all[j].progress >=0) 30 30 this.grid.items[j].progress = this.m.all[j].progress; 31 31 } … … 40 40 this.grid.refresh(); 41 41 this.grid.scroll_bar.refresh(); 42 } 43 44 public function m_Reset(){ 45 this.grid.clear(); 42 46 } 43 47