-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'webchat-chat' of github.com:eciis/web into webchat-chat
- Loading branch information
Showing
22 changed files
with
133 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
controllerAs: "contactsSidenavCtrl", | ||
bindings: { | ||
contacts: "<", | ||
openChat: "<", | ||
}, | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
<md-list | ||
class="contacts-list__container"> | ||
<md-list-item | ||
ng-repeat="user in contactsListCtrl.contacts | filter : contactsListCtrl.searchQuery | orderBy : ['name', 'description']" | ||
ng-repeat="user in contactsListCtrl.contacts | filter : contactsListCtrl.searchQuery | orderBy : ['name', 'email[0]']" | ||
ng-click="contactsListCtrl.openChat(user)" | ||
aria-label="contacts-list__contact"> | ||
<user-description | ||
class="contacts-list__contact" | ||
avatar="{{user.photo_url}}" | ||
name="{{user.name}}" | ||
text="{{user.current_institution.name}}"> | ||
text="{{user.email[0]}}"> | ||
</user-description> | ||
<md-divider></md-divider> | ||
</md-list-item> | ||
<h2 class="contacts-list__no-contacts-msg" ng-show="contactsListCtrl.isMessageShown">Não há contatos online no momento.</h2> | ||
<h2 class="contacts-list__no-contacts-msg" ng-show="!contactsListCtrl.contacts">Não há contatos online no momento.</h2> | ||
</md-list> |
2 changes: 1 addition & 1 deletion
2
webchat/components/expansive-search-bar/expansive-search-bar.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<md-button class="md-icon-button" ng-click="iconButtonCtrl.action()"> | ||
<md-icon style="color: {{iconButtonCtrl.iconColor}}"> | ||
<md-button class="md-icon-button" ng-click="iconButtonCtrl.action()" ng-disabled="iconButtonCtrl.disabled"> | ||
<md-icon style="color: {{iconButtonCtrl.iconColor}} "> | ||
{{iconButtonCtrl.icon}} | ||
</md-icon> | ||
</md-button> |
67 changes: 67 additions & 0 deletions
67
webchat/components/toggle-button/toggle-button.component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
/** | ||
* Button that calls an action and changes its icon on click. | ||
* It receives as a binding an icon to shown when on and an | ||
* icon to show when off. Also it receives an action to be | ||
* called on click and the icons color when on and off. If | ||
* the icon color is not passed, its color will be a default | ||
* one (#EEE). | ||
* @class toggleButton | ||
* @example | ||
* <toggle-button | ||
* icon-on="anIcon" | ||
* icon-off="anotherIcon" | ||
* icon-color-on="aColor" | ||
* icon-color-off="anotherColor" | ||
* action="anAction"> | ||
*</toggle-button> | ||
* | ||
*/ | ||
angular.module("webchat").component("toggleButton", { | ||
templateUrl: "app/components/toggle-button/toggle-button.html", | ||
controller: toggleButtonController, | ||
controllerAs: "toggleButtonCtrl", | ||
bindings: { | ||
iconOn: '@', | ||
iconOff: '@', | ||
iconColorOn: '@', | ||
iconColorOff: '@', | ||
action: '<', | ||
}, | ||
}); | ||
|
||
function toggleButtonController() { | ||
const toggleButtonCtrl = this; | ||
|
||
toggleButtonCtrl.$onInit = () => { | ||
console.log(toggleButtonCtrl); | ||
_.defaults(toggleButtonCtrl, { | ||
active: true, | ||
iconColorOn: "#EEE", | ||
iconColorOff: "#EEE", | ||
action: () => {} | ||
}); | ||
console.log(toggleButtonCtrl); | ||
}; | ||
|
||
toggleButtonCtrl.toggle = () => { | ||
toggleButtonCtrl.active = !toggleButtonCtrl.active; | ||
toggleButtonCtrl.action(); | ||
}; | ||
|
||
Object.defineProperty(toggleButtonCtrl, 'activeIcon', { | ||
get: () => { | ||
return toggleButtonCtrl.active ? toggleButtonCtrl.iconOn : toggleButtonCtrl.iconOff; | ||
}, | ||
}); | ||
|
||
Object.defineProperty(toggleButtonCtrl, 'activeIconColor', { | ||
get: () => { | ||
return toggleButtonCtrl.active ? toggleButtonCtrl.iconColorOn : toggleButtonCtrl.iconColorOff; | ||
}, | ||
}); | ||
} | ||
|
||
})(); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<icon-button | ||
icon="{{ toggleButtonCtrl.activeIcon }}" | ||
icon-color="{{ toggleButtonCtrl.activeIconColor }}" | ||
action="toggleButtonCtrl.toggle"> | ||
</icon-button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
html, body { | ||
height: 100%; | ||
max-height: 100%; | ||
} | ||
|
||
#webchat { | ||
html, body, #main { | ||
height: 100%; | ||
max-height: 100%; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<div class="main__container"> | ||
<ecis-header class="main__header" md-colors="{background: 'teal-900'}" user="mainCtrl.user"></ecis-header> | ||
<div class="main__content" ui-view="content"></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
const webchat = angular.module('webchat'); | ||
|
||
webchat.controller('mainController', ['AuthService', function mainController (AuthService) { | ||
const mainCtrl = this; | ||
|
||
mainCtrl.user = AuthService.getCurrentUser(); | ||
}]); | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.custom-input { | ||
width: 100%; | ||
border-radius: 50px; | ||
padding: 0 20px; | ||
background-color: #EEEEEE; | ||
border: none; | ||
outline: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.