Skip to content

Commit

Permalink
Merge pull request #277 from lewisl9029/feature-user-profile-edit
Browse files Browse the repository at this point in the history
Feature user profile edit. Closes #225. Closes #231. Closes #272. Closes #273. Closes #274.
  • Loading branch information
lewisl9029 committed Aug 31, 2015
2 parents 6536da1 + d60a673 commit 3f17c7c
Show file tree
Hide file tree
Showing 38 changed files with 536 additions and 275 deletions.
2 changes: 2 additions & 0 deletions app/app-config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import template from 'app.html!text';
import menuTemplate from 'app-menu.html!text';
import controller, { controllerName } from 'app-controller';

export default /*@ngInject*/ function configApp(
$ionicConfigProvider,
Expand Down Expand Up @@ -28,6 +29,7 @@ export default /*@ngInject*/ function configApp(
$stateProvider.state('app.private', {
url: '/private',
abstract: true,
controller: controllerName + ' as appView',
template: menuTemplate
});
}
16 changes: 16 additions & 0 deletions app/app-controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export let controllerName = 'AppController';
export default /*@ngInject*/ function AppController(
$ionicPopover
) {
this.optionsMenuPopover = $ionicPopover.fromTemplate(
`
<ion-popover-view>
<toc-options-menu></toc-options-menu>
</ion-popover-view>
`
);

this.openOptionsMenuPopover = function openOptionsMenuPopover($event) {
this.optionsMenuPopover.show($event);
};
}
11 changes: 8 additions & 3 deletions app/app-menu.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<ion-side-menus enable-menu-with-back-views="false">
<ion-side-menu side="left" expose-aside-when="large">
<toc-conversations-menu></toc-conversations-menu>
</ion-side-menu>
<ion-side-menu-content>
<ion-nav-bar class="bar-positive">
<ion-nav-back-button class="button-clear">
Expand All @@ -10,14 +13,16 @@
</button>
</ion-nav-buttons>
<ion-nav-buttons side="right">
<button class="button button-icon button-clear ion-navicon">
<button
ng-click="appView.openOptionsMenuPopover($event)"
class="button button-icon button-clear ion-navicon">
</button>
</ion-nav-buttons>
</ion-nav-bar>
<toc-notification-overlay></toc-notification-overlay>
<ion-nav-view></ion-nav-view>
</ion-side-menu-content>
<ion-side-menu side="left" expose-aside-when="large">
<toc-conversations-menu></toc-conversations-menu>
<ion-side-menu side="right">
<toc-options-menu></toc-options-menu>
</ion-side-menu>
</ion-side-menus>
4 changes: 3 additions & 1 deletion app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import views from './views/views';

import run from './app-run';
import config from './app-config';
import controller, { controllerName } from './app-controller';

let appName = 'toc';

Expand All @@ -17,7 +18,8 @@ export default angular.module(appName, [
views.name,
])
.config(config)
.run(run);
.run(run)
.controller(controllerName, controller);

export function initialize() {
angular.element(document)
Expand Down
5 changes: 5 additions & 0 deletions app/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ $button-border-radius: 0 !default;
$button-bar-button-font-size: 15px !default;

$card-border-radius: 0 !default;
$popover-border-radius: 0 !default;

$popup-button-border-radius: 0 !default;
$popup-background-color: #fff !default;
Expand Down Expand Up @@ -44,6 +45,10 @@ form.ng-pristine button[type='submit'] {
opacity: 1;
}

.popup-body {
text-align: center;
}

.item-input-wrapper {
border-radius: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default /*@ngInject*/ function tocBeginConversationModal() {
restrict: 'E',
template: template,
scope: {
hideModal: '&'
removeModal: '&'
},
controllerAs: 'beginConversationModal',
controller: /*@ngInject*/ function BeginConversationModalController(
Expand All @@ -21,7 +21,7 @@ export default /*@ngInject*/ function tocBeginConversationModal() {
identity,
state
) {
this.hideModal = $scope.hideModal;
this.removeModal = $scope.removeModal;
this.userInfo = state.cloud.identity.get().userInfo;
this.userId = this.userInfo.id;
this.isCordovaApp = devices.isCordovaApp();
Expand All @@ -40,7 +40,7 @@ export default /*@ngInject*/ function tocBeginConversationModal() {
0
))
.then(() => {
this.hideModal();
this.removeModal();
return $q.when();
});
};
Expand Down Expand Up @@ -133,7 +133,7 @@ export default /*@ngInject*/ function tocBeginConversationModal() {
'_system'
);

this.hideModal();
this.removeModal();
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1 class="title">Start a Conversation</h1>
<ion-footer-bar>
<div class="col">
<button class="button button-block button-outline button-calm"
ng-click="::beginConversationModal.hideModal()">
ng-click="::beginConversationModal.removeModal()">
Cancel
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/components/channel-card/channel-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="toc-channel-card-status-indicator"
ng-class="'toc-contact-status-' + channelCard.contact.statusId">
</div>
<h2>{{channelCard.contact.userInfo.displayName}}</h2>
<h2>{{channelCard.contact.userInfo.displayName || 'Anonymous'}}</h2>
<p class="toc-channel-card-quote" ng-class="{
'toc-channel-card-quote-unread': channelCard.channel.unreadMessageId
}">
Expand Down
2 changes: 1 addition & 1 deletion app/components/channel-list/channel-list-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default /*@ngInject*/ function tocChannelList() {
let contact =
state.cloud.contacts.get([channel.channelInfo.contactIds[0]]);
return $ionicPopup.show({
template: `Accept invite from ${contact.userInfo.displayName}?`,
template: `Accept invite from ${contact.userInfo.displayName || 'Anonymous'}?`,
title: 'Accept Invite',
buttons: [
{
Expand Down
95 changes: 0 additions & 95 deletions app/components/cloud-connect-form/cloud-connect-form-directive.js

This file was deleted.

42 changes: 0 additions & 42 deletions app/components/cloud-connect-form/cloud-connect-form.html

This file was deleted.

6 changes: 0 additions & 6 deletions app/components/cloud-connect-form/cloud-connect-form.js

This file was deleted.

Loading

0 comments on commit 3f17c7c

Please sign in to comment.