|
@@ -2,37 +2,27 @@ App.Services = (function(lng, App, undefined) {
|
|
|
|
|
|
|
|
var mockProfiles = function() {
|
|
var mockProfiles = function() {
|
|
|
var profiles = [];
|
|
var profiles = [];
|
|
|
- for (var i=1, len=12; i <= len; i++ ) {
|
|
|
|
|
- profiles.push({
|
|
|
|
|
- id:i,
|
|
|
|
|
- name: 'Profile nº' + i,
|
|
|
|
|
- description: 'Description nº' + i,
|
|
|
|
|
- avatar: 'assets/images/avatars/' + i + '.jpg'
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ var id = 0;
|
|
|
|
|
+
|
|
|
|
|
+ for (var j=0; j < 3; j++) {
|
|
|
|
|
+ for (var i=1, len=12; i <= len; i++ ) {
|
|
|
|
|
+ id++;
|
|
|
|
|
+ profiles.push({
|
|
|
|
|
+ id: id,
|
|
|
|
|
+ name: 'Profile nº' + i,
|
|
|
|
|
+ description: 'Description nº' + i,
|
|
|
|
|
+ avatar: 'assets/images/avatars/' + i + '.jpg'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- console.error('profiles', profiles);
|
|
|
|
|
|
|
|
|
|
lng.View.Template.List.create({
|
|
lng.View.Template.List.create({
|
|
|
container_id: 'profiles-list',
|
|
container_id: 'profiles-list',
|
|
|
template_id: 'profile-tmp',
|
|
template_id: 'profile-tmp',
|
|
|
- data: profiles
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- /*
|
|
|
|
|
- lng.View.Template.List.create({
|
|
|
|
|
- container_id: 'list_sample',
|
|
|
|
|
- template_id: 'list-tmp',
|
|
|
|
|
- data: mock
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- lng.View.Template.List.create({
|
|
|
|
|
- container_id: 'list_grouped_sample',
|
|
|
|
|
- template_id: 'list-tmp',
|
|
|
|
|
- data: mock,
|
|
|
|
|
- order_field: 'name',
|
|
|
|
|
- order_type: 'desc'
|
|
|
|
|
|
|
+ data: profiles,
|
|
|
|
|
+ order_field: 'id',
|
|
|
|
|
+ order_type: 'asc'
|
|
|
});
|
|
});
|
|
|
- */
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
mockProfiles();
|
|
mockProfiles();
|