No changes, but Graphite wants to commit

This commit is contained in:
Richard Flamsholt 2013-11-08 06:13:38 -06:00
Родитель 41006f8818
Коммит a65c57bab0
3 изменённых файлов: 42 добавлений и 258 удалений

Просмотреть файл

@ -207,97 +207,6 @@ var app = (function () {
};
}());
var activitiesModel = (function () {
var activityModel = {
id: 'Id',
fields: {
Text: {
field: 'Text',
defaultValue: ''
},
CreatedAt: {
field: 'CreatedAt',
defaultValue: new Date()
},
Picture: {
fields: 'Picture',
defaultValue: ''
},
UserId: {
field: 'UserId',
defaultValue: ''
},
Likes: {
field: 'Likes',
defaultValue: []
}
},
CreatedAtFormatted: function () {
return AppHelper.formatDate(this.get('CreatedAt'));
},
PictureUrl: function () {
return AppHelper.resolvePictureUrl(this.get('Picture'));
},
User: function () {
var userId = this.get('UserId');
var user = $.grep(usersModel.users(), function (e) {
return e.Id === userId;
})[0];
return user ? {
DisplayName: user.DisplayName,
PictureUrl: AppHelper.resolveProfilePictureUrl(user.Picture)
} : {
DisplayName: 'Anonymous',
PictureUrl: AppHelper.resolveProfilePictureUrl()
};
}
};
var activitiesDataSource = new kendo.data.DataSource({
type: 'everlive',
schema: {
model: activityModel
},
transport: {
// required by Everlive
typeName: 'Activities'
},
change: function (e) {
if (e.items && e.items.length > 0) {
$('#no-activities-span').hide();
}
else {
$('#no-activities-span').show();
}
},
sort: { field: 'CreatedAt', dir: 'desc' }
});
return {
activities: activitiesDataSource
};
}());
// activities view model
var activitiesViewModel = (function () {
var activitySelected = function (e) {
mobileApp.navigate('views/activityView.html?uid=' + e.data.uid);
};
var navigateHome = function () {
mobileApp.navigate('#welcome');
};
var logout = function () {
AppHelper.logout()
.then(navigateHome, function (err) {
showError(err.message);
navigateHome();
});
};
return {
activities: activitiesModel.activities,
activitySelected: activitySelected,
logout: logout
};
}());
var EventsModel = (function () {
var EventModel = {
id: 'Id',
@ -358,17 +267,23 @@ var app = (function () {
return AppHelper.resolvePictureUrl(this.get('CoverImage'));
},
ParticipantsCount: function () {
var userId = this.get('UserId');
var user = $.grep(usersModel.users(), function (e) {
return e.Id === userId;
})[0];
return user ? {
DisplayName: user.DisplayName,
PictureUrl: AppHelper.resolveProfilePictureUrl(user.Picture)
} : {
DisplayName: 'Anonymous',
PictureUrl: AppHelper.resolveProfilePictureUrl()
};
var participants = this.get('Participants');
//return participants.length;
return 2;
},
ParticipantsAvatars: function () {
var participants = this.get('Participants'),
users = usersModel.users(),
avatars = [];
users.forEach(function (item) {
if(participants.indexOf(item.Id) != -1) {
avatars.push(AppHelper.resolvePictureUrl(item.get('Avatar')));
}
});
console.log(avatars);
return avatars;
}
};
var eventsDataSource = new kendo.data.DataSource({
@ -400,7 +315,6 @@ var app = (function () {
var eventSelected = function (e) {
mobileApp.navigate('views/eventView.html?uid=' + e.data.uid);
};
/*
var navigateHome = function () {
mobileApp.navigate('#welcome');
};
@ -411,11 +325,10 @@ var app = (function () {
navigateHome();
});
};
*/
return {
feed: EventsModel.events,
eventSelected: eventSelected
//logout: logout
eventSelected: eventSelected,
logout: logout
};
}());
@ -448,16 +361,6 @@ var app = (function () {
}
};
}());
// activity details view model
var activityViewModel = (function () {
return {
show: function (e) {
var activity = activitiesModel.activities.getByUid(e.view.params.uid);
kendo.bind(e.view.element, activity, kendo.mobile.ui);
}
};
}());
// add activity view model
var addActivityViewModel = (function () {
@ -495,8 +398,6 @@ var app = (function () {
viewModels: {
login: loginViewModel,
signup: singupViewModel,
activities: activitiesViewModel,
activity: activityViewModel,
addActivity: addActivityViewModel,
feed: feedViewModel,
event: eventViewModel

Просмотреть файл

@ -388,7 +388,7 @@ textarea
margin-top: 0;
padding-top: 0;
}
/* Activities */
/* Events */
.activities-view .km-list
{
margin: 1rem;
@ -495,139 +495,6 @@ textarea
display: none;
}
/* Tablets*/
.km-tablet .km-header
{
font-size: 1.2em;
}
.km-tablet .km-button.btn-big
{
min-width: 10em;
font-size: 2.5em;
}
.km-tablet .welcome-scrn .group-wrp
{
padding-top: 2.5em;
padding-bottom: 2.5em;
}
.km-tablet .form-view .km-listview label
{
padding: 1rem 1.5rem;
font-size: 1.5rem;
}
.km-tablet .km-ios .km-list input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="checkbox"]):not([type="radio"]):not(.k-input):not(.k-button), .km-tablet .km-ios .km-list select:not([multiple]), .km-tablet .km-ios .km-list .k-dropdown-wrap,
.km-tablet.km-root input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="checkbox"]):not([type="radio"]):not(.k-input):not(.k-button), .km-tablet.km-root select:not([multiple]), .km-tablet.km-root .k-dropdown,
.km-tablet textarea
{
font-size: 1.5rem;
}
.km-tablet .km-listinset
{
margin: 2em;
}
.km-tablet .main-menu-view .km-list > li
{
font-size: 1.5rem;
}
.km-tablet .profile-view h2, .km-tablet .activities-view h3
{
margin-left: 2rem;
margin-right: 2rem;
margin-bottom: -1rem;
font-size: 1.5rem;
}
.km-tablet .km-ios .km-list.profile-about-txt > li, .km-tablet .km-android .km-list.profile-about-txt > li
{
padding: .5rem 1rem;
font-size: 1.4rem;
}
.km-tablet .no-items-msg
{
margin: 2.5rem !important;
font-size: 1.5rem;
}
.km-tablet .no-items-msg b
{
font-size: 2rem;
}
.km-tablet .user-info h2
{
font-size: 1.7rem;
}
.km-tablet .user-info time
{
font-size: .95rem;
}
.km-tablet .user-share
{
padding: 2rem;
font-size: 1.4rem;
}
.km-tablet .share-view textarea
{
padding: 0;
}
.km-tablet .social-info a
{
font-size: 1.1rem;
}
.km-tablet .activities-view .km-list, .km-tablet .share-form-wrp, .km-tablet .user-status-wrp
{
margin: 2rem;
}
/* Android*/
.km-tablet .km-android .activities-view .user-share-txt
{
font-size: 1.4rem;
}
.km-tablet .km-android .welcome-scrn h1
{
font-size: 3em;
}
.km-tablet #friendsApp.km-android .km-navbar .km-button
{
height: 1.4em;
}
/* iPad */
.km-tablet #friendsApp.km-ios .km-view-title
{
box-shadow: none;
-webkit-box-shadow: none;
text-shadow: none;
color: #fff;
}
.km-tablet .km-ios .km-content
{
background-color: transparent;
}
.km-tablet .km-ios :not(.km-tabstrip):not(.km-buttongroup) > .km-button
{
background-color: #ff6c00;
}
.km-tablet .km-ios :not(.km-tabstrip):not(.km-buttongroup) > .km-button.btn-signup
{
background-color: #272727;
}
.km-tablet .km-ios :not(.km-tabstrip):not(.km-buttongroup) > .km-button.km-back
{
background-color: #A36A57;
}
.km-tablet .km-ios .welcome-scrn h1
{
font-size: 3.5em;
}
.km-tablet .km-ios .profile-avatar-name h1
{
margin-top: 2rem;
font-size: 1.7em;
width: auto;
}
.km-tablet .km-ios .profile-view .km-list.def-list .lbl, .km-tablet .km-ios .profile-view .km-list.def-list .val
{
font-size: 1.4em;
}
/* Team15 code starts here */
.event-white-box {
@ -639,10 +506,15 @@ background-color: #A36A57;
line-height: 1.4;
-webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5);
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5);
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5);
text-align: center;
}
.event-white-box.part{
text-align: left;
float: left;
}
.event-title {
font-size: 1.5rem;
}
@ -660,7 +532,18 @@ background-color: #A36A57;
font-weight: normal;
}
.event-add-btn
{
.part-count {
font-size: 1.3rem;
}
.max-part-count {
font-size: .9rem;
}
.part-pic {
width: 45px;
height: 45px;
border-radius: 10px;
float: left;
margin: 5px;
}

Просмотреть файл

@ -2,7 +2,7 @@
<header data-role="header">
<div data-role="navbar">
Feed
<a class="nav-button" data-align="left" data-role="backbutton" data-click="app.viewModels.activities.logout">Log out</a>
<a class="nav-button" data-align="left" data-role="backbutton" data-click="app.viewModels.feed.logout">Log out</a>
<a class="nav-button" data-align="right" data-role="button" data-icon="add" href="views/addActivityView.html"></a>
</div>
</header>
@ -15,7 +15,7 @@
</p>
</div>
<!-- Activities ListView Template -->
<!-- Events ListView Template -->
<script type="text/x-kendo-template" id="activityTemplate">
<div data-role="touch" data-bind="events: { tap: eventSelected }">
<div class="user-info">