forked from appcelerator-developer-relations/appc-sample-rss
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdetail.js
More file actions
28 lines (22 loc) · 709 Bytes
/
detail.js
File metadata and controls
28 lines (22 loc) · 709 Bytes
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
/**
* self-executing function to organize otherwise inline constructor code
* @param {Object} args arguments passed to the controller
*/
(function constructor(args) {
// use strict mode for this function scope
'use strict';
// model passed to the controller
var model = args.model;
// set the Window title and WebView URL
$.win.title = model.get('title');
$.webView.url = model.get('link');
// execute constructor with optional arguments passed to controller
})(arguments[0] || {});
/**
* Event listener set via view to be called on when the user taps the home-icon (Android)
*/
function close() {
'use strict';
// close the window, showing the master window behind it
$.win.close();
}