Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge #8

Merged
merged 37 commits into from
Jun 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
33a17f3
App improved
GiorgiB97 May 12, 2017
b9c80e6
App improved
GiorgiB97 May 12, 2017
076ab36
Merge branch 'master' of https://github.com/arboshiki/Angular-Lobiadmin
GiorgiB97 May 16, 2017
6ca36f8
Generated empty module - chat
GiorgiB97 May 16, 2017
11602ea
om-aside improved
GiorgiB97 May 16, 2017
cfaf407
default.less : added styling for chatAside
GiorgiB97 May 16, 2017
c531ae1
file-manager.less : changed styling for Aside menus
GiorgiB97 May 16, 2017
06ae4e8
chatAside improved
GiorgiB97 May 16, 2017
e2fa86e
Chat module basic interface created
GiorgiB97 May 16, 2017
ee94086
Chatting interface created, Contacts added, Dummy data added
GiorgiB97 May 16, 2017
8a4295a
Chat JSON files recreated.
GiorgiB97 May 17, 2017
010dfca
Bug Fix: Chats are now changing on click
GiorgiB97 May 17, 2017
b71384f
Chatting views, accordions added
GiorgiB97 May 18, 2017
03a2270
Added Message sending function
GiorgiB97 May 19, 2017
ecfbd9c
Side menu added in chat
GiorgiB97 May 22, 2017
1af6a92
Chat greatly improved
GiorgiB97 May 22, 2017
2d768f4
Merge branch 'master' of https://github.com/arboshiki/Angular-Lobiadmin
GiorgiB97 May 22, 2017
75d122e
Merge remote-tracking branch 'origin/master' into chat
GiorgiB97 May 22, 2017
aa40c49
Chat deletion promt with lobibox
GiorgiB97 May 22, 2017
94bc404
Chat name editing added
GiorgiB97 May 23, 2017
ec4867d
Small bug fix
GiorgiB97 May 23, 2017
b655d63
Fixed user search
GiorgiB97 May 23, 2017
7a3d15b
Merge pull request #6 from GiorgiB97/chat
GiorgiB97 May 24, 2017
d524682
Generated empty module contacts
GiorgiB97 May 24, 2017
e6e3f3e
Added contact view, dummy contacts and styled cards
GiorgiB97 May 24, 2017
4a54dbd
Added contact filtering
GiorgiB97 May 25, 2017
106187f
Filter background color fixed and border-bottom added
GiorgiB97 May 25, 2017
2702b18
Merge pull request #9 from GiorgiB97/chat
thecodeholic May 29, 2017
9dddfcf
Improving chat layout
thecodeholic May 29, 2017
402af08
Merge pull request #7 from arboshiki/chat
GiorgiB97 May 29, 2017
872a0ce
Chat redesigned, layout and code improved
GiorgiB97 May 29, 2017
c05a098
Chat message box (textarea) auto increase in gulp watch
GiorgiB97 Jun 5, 2017
8e4a506
Merge pull request #8 from GiorgiB97/chat
GiorgiB97 Jun 5, 2017
ed382f0
Merge pull request #9 from GiorgiB97/contacts
GiorgiB97 Jun 5, 2017
7851495
Chat i18n added
GiorgiB97 Jun 5, 2017
a547682
Calendar i18n added
GiorgiB97 Jun 5, 2017
3b3d934
Contacts i18n added
GiorgiB97 Jun 5, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions src/app/core/directives/om-aside/om-aside.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
@aside-default-width: 250px;
@aside-default-height: 100%;

@aside-default-transition: margin-left 0.5s ease;
@aside-default-transition-left: margin-left 0.5s ease;
@aside-default-transition-top: margin-top 0.5s ease;
@aside-default-transition-right: margin-right 0.5s ease;
@aside-default-transition-bottom: margin-bottom 0.5s ease;

@aside-default-shadow-size: 5px;
@aside-default-shadow-blur: 8px;
@aside-default-shadow-color: rgba(0,0,0,0.2);
@aside-default-shadow: 0px 0px @aside-default-shadow-blur @aside-default-shadow-size @aside-default-shadow-color;
@aside-default-shadow-right: 0px 0px @aside-default-shadow-blur @aside-default-shadow-size @aside-default-shadow-color;
@aside-default-shadow-left: -@aside-default-shadow-size 0px @aside-default-shadow-blur 0px @aside-default-shadow-color;
@aside-default-shadow-top: "";
@aside-default-shadow-bottom: "";

.off-canvas__container {
height: 100%;
position: relative;
overflow: hidden;
}

.off-canvas__nav {
//border: 2px solid rgba(0,0,0,0.2);
background-color: white;
margin:0;
width: @aside-default-width;
height: @aside-default-height;
position: absolute;
z-index: 100;
opacity: 1;
transition: @aside-default-transition;
.box-shadow(@aside-default-shadow);
&.nav-left{
left:0;
transition: @aside-default-transition-left;
}
&.nav-top{
top:0;
transition: @aside-default-transition-top;
}
&.nav-right{
right:0;
transition: @aside-default-transition-right;
}
&.nav-bottom{
bottom:0;
transition: @aside-default-transition-bottom;
}

}

.nav-closed {
left:0;
margin-left: -@aside-default-width;
.box-shadow(@aside-default-shadow);
}

.nav-closed-top {
top:0;
margin-top: -@aside-default-height;
.box-shadow(@aside-default-shadow-bottom);
}

.nav-closed-right {
right:0;
margin-right: -@aside-default-width;
.box-shadow(@aside-default-shadow-left);
}

.nav-closed-bottom {
bottom:0;
margin-bottom: -@aside-default-height;
.box-shadow(@aside-default-shadow-top);
}

.nav-closed-left {
bottom:0;
margin-left: -@aside-default-width;
.box-shadow(@aside-default-shadow-right);
}
4 changes: 3 additions & 1 deletion src/app/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ body {
}

#main-view {
padding-bottom: @navbar-height;
//padding-bottom: @navbar-height;
}

#content-view {
Expand Down Expand Up @@ -72,6 +72,8 @@ body {
}
}

*{outline: 0;}

/**
* Do not remove the comments below. It's the markers used by gulp-inject to inject
* all your less files automatically
Expand Down
4 changes: 3 additions & 1 deletion src/app/index.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

'app.dashboard',
'app.calendar',
'app.fileManager'
'app.fileManager',
'app.chat',
'app.contacts'
]);

})();
19 changes: 17 additions & 2 deletions src/app/layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
<div id="layout-default">
<div id="layout-default" class="off-canvas__container off-canvas__content">
<nav class="navbar navbar-default navbar-header header" ui-view="toolbar"></nav>

<div om-aside om-slide-direction="right" om-is-off-canvas="true" id="chatAside"
class="selected off-canvas__nav nav-right pull-right">
<ul class="list-group chat-contacts">
<li class="list-group-item contact" ng-repeat="contact in vm.contacts" ng-click="vm.AAA()">
<span class="contact-unread badge" ng-hide="contact.unread == 0">{{contact.unread}}</span>
<span class="contact-image">
<span class="contact-status"
ng-class="{'status-online':contact.status == 'online',
'status-offline':contact.status == 'offline',
'status-busy':contact.status == 'busy'}"></span>
<img ng-src="{{contact.thumb}}">
</span>
<span class="contact-name">{{contact.name}}</span>
</li>
</ul>
</div>
<div ui-view="navigation"></div>
<!--<div id="navigation-view" ui-view="navigation"></div>-->
<div id="main">
Expand Down
61 changes: 53 additions & 8 deletions src/app/layouts/default.less
Original file line number Diff line number Diff line change
@@ -1,18 +1,63 @@
#layout-default{
height: 100%;

#content-view{
#layout-default {
height: 100%;
#chatAside {
&.off-canvas__nav {
//override
padding: 5px;
z-index: 101;
background-color: white;
.box-shadow(@aside-default-shadow-left);
.chat-contacts {
.contact {
border:0;
outline: 0;
&:hover{
background-color: @gray-lighter;
}
.contact-image {
position: relative;
.contact-status{
position: absolute;
height:10px;
width:10px;
right:7px;
top:-7px;
border:1px solid white;
border-radius:50%;
&.status-online{
background-color: #00AA00; //or @brand-success;
}
&.status-offline{
background-color: grey;
}
&.status-busy{
background-color: @brand-danger;
}
}
img {
width: 34px;
height: 34px;
border-radius: 50%;
margin: -7px 5px -7px -7px;
}
}
}
}
}
}
#content-view {
//background-color: #f2f2f2;
}
#main{
#main {
padding-bottom: 48px;
@media (max-width: @screen-xs-max){
@media (max-width: @screen-xs-max) {
padding-bottom: 80px;
}
.spinner-backdrop{
.spinner-backdrop {
z-index: 4;
}
footer{
footer {
position: absolute;
bottom: 0;
left: 0;
Expand All @@ -23,7 +68,7 @@
background-color: lighten(@gray-lighter, 3%);
border-top: 1px solid #e7e7e7;

p{
p {
margin-bottom: 0;
}
}
Expand Down
42 changes: 24 additions & 18 deletions src/app/main/apps/calendar/calendar.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.controller('CalendarController', CalendarControllerFn);

/** @ngInject */
function CalendarControllerFn($uibModal, Events) {
function CalendarControllerFn($uibModal, $translate, Events) {
var vm = this;

// Data
Expand Down Expand Up @@ -114,27 +114,33 @@
}

function catchDragStart(event, delta) {
vm.dragMessage += "Change " + event.title + "'s position from " + event.start.format();
$translate(['CALENDAR.EVENT_MOVE_MSG_1', 'CALENDAR.EVENT_MOVE_MSG_2']).then(function (translations) {
vm.dragMessage += translations['CALENDAR.EVENT_MOVE_MSG_1'] + event.title + translations['CALENDAR.EVENT_MOVE_MSG_2'] + event.start.format();
});
}

function showDragDialog(event, delta, revertFunc) {
console.log(revertFunc);
vm.dragMessage += " to " + event.start.format() + " ?";
$uibModal.open({
templateUrl: 'app/main/apps/calendar/dialogs/drag-dialog/drag-dialog.html',
controller: 'DragDialogController',
controllerAs: 'vm',
size: 'md',
resolve: {
entry: {text: vm.dragMessage}
}
}).result.then(function () {
vm.dragMessage = "";
}, function () {
vm.dragMessage = "";
revertFunc();
$translate(['CALENDAR.EVENT_MOVE_MSG_3']).then(function (translations) {

console.log(revertFunc);

vm.dragMessage += translations['CALENDAR.EVENT_MOVE_MSG_3'] + event.start.format() + " ?";

$uibModal.open({
templateUrl: 'app/main/apps/calendar/dialogs/drag-dialog/drag-dialog.html',
controller: 'DragDialogController',
controllerAs: 'vm',
size: 'md',
resolve: {
entry: {text: vm.dragMessage}
}
}).result.then(function () {
vm.dragMessage = "";
}, function () {
vm.dragMessage = "";
revertFunc();
});
});
}

}
})();
20 changes: 10 additions & 10 deletions src/app/main/apps/calendar/calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<div class="page-content-header">
<div class="header-top clearfix">
<div class="menu-left">
<i class="fa fa-calendar" aria-hidden="true"></i>&nbsp;&nbsp;Calendar
<i class="fa fa-calendar" aria-hidden="true"></i>&nbsp;&nbsp;{{'CALENDAR.CALENDAR_TITLE' | translate}}
</div>
<div class="menu-right">
<div ng-click="vm.calendar.changeView('agendaDay')">
<i class="fa fa-square" aria-hidden="true" uib-tooltip="Day View"></i>
</div>
<div ng-click="vm.calendar.changeView('agendaWeek')">
<i class="fa fa-th-large" aria-hidden="true" uib-tooltip="Week View"></i>
</div>
<div ng-click="vm.calendar.changeView('month')">
<i class="fa fa-th" aria-hidden="true" uib-tooltip="Month View"></i>
</div>
<button class="btn btn-default btn-icon btn-lg" ng-click="vm.calendar.changeView('agendaDay')">
<i class="fa fa-square" aria-hidden="true" uib-tooltip="{{'CALENDAR.DAY_VIEW' | translate}}"></i>
</button>
<button class="btn btn-default btn-icon btn-lg" ng-click="vm.calendar.changeView('agendaWeek')">
<i class="fa fa-th-large" aria-hidden="true" uib-tooltip="{{'CALENDAR.WEEK_VIEW' | translate}}"></i>
</button>
<button class="btn btn-default btn-icon btn-lg" ng-click="vm.calendar.changeView('month')">
<i class="fa fa-th" aria-hidden="true" uib-tooltip="{{'CALENDAR.MONTH_VIEW' | translate}}"></i>
</button>
</div>
</div>

Expand Down
10 changes: 6 additions & 4 deletions src/app/main/apps/calendar/calendar.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@header-height: 140px;


#calendar {
height: 100%;
position: relative;
Expand All @@ -23,16 +22,19 @@
&-right {
float: right;
user-select: none;
margin-top: -15px;
input {
color: black;
}
> div {
display: inline-block;
}
i {
font-size: 20px;
.btn-icon {
margin: 5px;
color: white;
i {
font-size: 20px;
color: white;
}
}
}
}
Expand Down
9 changes: 8 additions & 1 deletion src/app/main/apps/calendar/calendar.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
.config(Config);

/** @ngInject */
function Config($stateProvider, lobiNavigationServiceProvider, apiServiceProvider) {
function Config($stateProvider, $translateProvider, $translatePartialLoaderProvider, lobiNavigationServiceProvider, apiServiceProvider) {
$translateProvider.useLoader('$translatePartialLoader',{
urlTemplate: '{part}/i18n/{lang}.json'
});
$translateProvider.preferredLanguage('en');
// $translateProvider.useSanitizeValueStrategy('sanitize');
// Translation
$translatePartialLoaderProvider.addPart('app/main/apps/calendar');

$stateProvider
.state('app.calendar', {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<div id="drag-dialog">
<div class="modal-header">
<h3 class="modal-title" id="modal-title">
<span>Move Event</span>
<span>{{'CALENDAR.EVENT_MOVE' | translate}}</span>
</h3>
</div>
<div class="modal-body" id="modal-body">
<span ng-bind="vm.text"></span>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="button" ng-click="vm.ok()">Yes</button>
<button class="btn btn-default" type="button" ng-click="vm.cancel()">No</button>
<button class="btn btn-primary" type="button" ng-click="vm.ok()">{{'CALENDAR.EVENT_OK' | translate}}</button>
<button class="btn btn-default" type="button" ng-click="vm.cancel()">{{'CALENDAR.EVENT_CANCEL' | translate}}</button>
</div>
</div>
Loading