2016-03-30 23:33:37 -07:00
|
|
|
|
define(['components/favoriteitems'], function (favoriteItems) {
|
2016-10-22 22:11:46 -07:00
|
|
|
|
'use strict';
|
2016-03-16 14:30:49 -07:00
|
|
|
|
|
2016-03-30 23:33:37 -07:00
|
|
|
|
return function (view, params) {
|
2016-03-16 14:30:49 -07:00
|
|
|
|
|
2016-03-30 23:33:37 -07:00
|
|
|
|
var self = this;
|
2016-03-16 14:30:49 -07:00
|
|
|
|
|
2016-03-30 23:33:37 -07:00
|
|
|
|
view.addEventListener('viewshow', function (e) {
|
|
|
|
|
|
|
|
|
|
var isRestored = e.detail.isRestored;
|
2016-03-16 14:30:49 -07:00
|
|
|
|
|
2016-03-30 23:33:37 -07:00
|
|
|
|
if (!isRestored) {
|
2016-03-16 14:30:49 -07:00
|
|
|
|
|
2016-03-30 23:33:37 -07:00
|
|
|
|
var parentId = null;
|
|
|
|
|
favoriteItems.render(view, Dashboard.getCurrentUserId(), parentId);
|
2016-03-16 14:30:49 -07:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
});
|