-
Notifications
You must be signed in to change notification settings - Fork 0
/
flickr_web_client_js_as_app_view_AppView.js
103 lines (82 loc) · 2.98 KB
/
flickr_web_client_js_as_app_view_AppView.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
Ext.ns('as.app.view');
(function(){
as.app.view.AppView = Ext.extend(Ext.Viewport,{
constructor :function(cfg){
cfg = cfg || {};
this.addEvents({
/**
* @event
* @param {Type} param1 Parameter
*/
action : true,
/**
* @event
* @param {AppView} view
* @param {string} action Type of search
* @param {string} tags Tag list string.
*/
loadflickr : true
});
this.model = cfg.model;
as.app.view.AppView.superclass.constructor.call(this,cfg);
},
initEvents :function(){
var model_lst = (function(model){
return {
scope : model,
loadflickr : function(view,action,tags){
var params = Ext.apply({},{
tags : tags
})
model.models.flickr.load(params,action);
}
}
})(this.model);
this.on(model_lst);
},
initComponent :function(){
var defaults = {};
defaults = Ext.apply(defaults, {
//renderTo: Ext.getBody(),
layout : 'border',
minWidth : 1136,
defaults : {
model : this.model,
border : false,
bodyBorder : false
},
items:[{
region : 'north',
xtype : 'app-topbarview'
},{
model : this.model,
width : 220,
region :'west',
xtype :'app-listgrid'
},{
minSize :938,
activeItem : 0,
xtype : 'app-cardpanel',
region : 'center'
},{
xtype : 'app-infofooter',
region : 'south',
height : 80
}
]
});
Ext.apply(this,Ext.apply(this.initialConfig,defaults));
as.app.view.AppView.superclass.initComponent.apply(this,arguments);
this.initEvents();
},
onRender :function(){
Ext.get('loading').remove();
as.app.view.AppView.superclass.onRender.apply(this,arguments);
this.fireEvent('loadflickr',this,'recent','');
}
});
})();