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

add new contact display ui #179

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
04de0fa
#110: Added edit contact dialog route state
Mar 22, 2021
b80361a
#102: Added the address book configuration dialog route state
Mar 22, 2021
d99f752
#105 contact display dialog route state
rezk2ll Mar 22, 2021
a849840
#108 adapt existing state of new contact to add modal
asmaNode Mar 22, 2021
75dfbb4
#104: Changed the address book settings page to a dialog
Mar 23, 2021
1ef8716
#104: Fixed an issue with the backdrop of md-menu
Mar 23, 2021
280708a
issue #106 create contact display dialog template
rezk2ll Mar 22, 2021
dc5da93
#106: Fixed some failed tests
Mar 25, 2021
121b132
#106: First Name is now First name
Mar 25, 2021
37e781f
#106: Corrected some colors to follow the original design
Mar 25, 2021
4f4acc0
#106: Corrected the styles of more actions menu in the contact displa…
Mar 25, 2021
a84161e
#106: Realigned the avatar in the contact display dialog
Mar 25, 2021
6c62cf5
#107 update template create new contact
asmaNode Mar 25, 2021
c4092ad
#103: Moved the name edit function to the configuration dialog
Mar 26, 2021
a4af71b
#103: Moved the address book delete function to the configuration dialog
Mar 26, 2021
b860ea3
#103: Correct some styles of the buttons inside dialogs
Mar 26, 2021
330e69d
#125: Improved the contact card display
Mar 26, 2021
e47d67b
#103: Fixed a bug where a false error notification is displayed when …
Mar 26, 2021
389698d
#129 fixed redirections failing after move to/delete actions
rezk2ll Mar 29, 2021
f315fec
#109 refactor edit contact
asmaNode Mar 31, 2021
7a54544
#490 update modal of profile picture
asmaNode Mar 31, 2021
d207209
#130: Fixed a bug where the close button does not work in the create …
Mar 31, 2021
3607d76
#130: Corrected the style of the close icon
Mar 31, 2021
d31cb89
#130: Fixed a bug where the create new contact dialog does not have a…
Mar 31, 2021
0a56180
#130: Correct the tabs & spaces of the contactEditionForm
Apr 1, 2021
0849ef7
Refined the contact edition form
Apr 1, 2021
bfafc93
#130: Fixed a minor issue when refreshing the page with the contact e…
Apr 2, 2021
0ed2c28
#130: Responsive contact edition dialog for mobile devices
Apr 2, 2021
39b1548
#128: Added a missing translation
Apr 2, 2021
f366c08
#128: Removed unused files
Apr 2, 2021
b871876
#128: Fixed a minor display issue with the address section
Apr 2, 2021
bd061e3
#128: Fixed a bug with the birthday field when searching for a contact
Apr 2, 2021
44c884e
#130: Fixed a minor issue with the avatar preview in the contact edit…
Apr 2, 2021
339814b
#141: The contact edition dialog is now scrollable when the content i…
Apr 2, 2021
c3dddd5
#101 display the shared addressbook owner in the selection when creat…
rezk2ll Apr 5, 2021
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
26 changes: 19 additions & 7 deletions src/esn.contact.libs/app/shell/shell.service.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const moment = require('moment');

require('../vcard/helper.service.js');
require('../app.constant.js');

Expand All @@ -8,6 +10,7 @@ require('../app.constant.js');
.factory('ContactShell', ContactShellFactory);

function ContactShellFactory(
$log,
contactVcardHelper,
CONTACT_ATTRIBUTES_ORDER
) {
Expand Down Expand Up @@ -53,13 +56,22 @@ require('../app.constant.js');
var bday = vcard.getFirstProperty('bday');

if (bday) {
var type = bday.type,
value = bday.getFirstValue();

if (type === 'text') {
this.birthday = value;
} else if (typeof value.toJSDate === 'function') {
this.birthday = value.toJSDate();
const bdayRawString = bday.toJSON()[3];
const bdayMoment = moment(new Date(bdayRawString));

if (bdayMoment.isValid()) {
bday.setValue(bdayMoment.format('YYYY-MM-DD'));

var type = bday.type,
value = bday.getFirstValue();

if (type === 'text') {
this.birthday = value;
} else if (typeof value.toJSDate === 'function') {
this.birthday = value.toJSDate();
}
} else {
this.birthday = bdayRawString;
}
}

Expand Down
6 changes: 1 addition & 5 deletions src/linagora.esn.contact.collect/app/app.run.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ function registerAddressbookDisplayShell(
contactAddressbookDisplayShellRegistry,
contactCollectAddressbookService,
ContactCollectAddressbookDisplayShell,
contactAddressbookActionEdit,
contactAddressbookActionDelete,
contactAddressbookActionExport,
contactAddressbookActionSettings
) {
Expand All @@ -20,9 +18,7 @@ function registerAddressbookDisplayShell(
priority: 10,
actions: [
contactAddressbookActionExport,
contactAddressbookActionSettings,
contactAddressbookActionEdit,
contactAddressbookActionDelete
contactAddressbookActionSettings
],
displayShell: ContactCollectAddressbookDisplayShell,
matchingFunction: contactCollectAddressbookService.isCollectedAddressbook
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
h4.modal-title {{ 'Shared address book' | translate }}
.modal-body
.contact-addressbook-shared-configuration-content
users-autocomplete-input(
users-autocomplete-input.fg-line(
auto-focus-ngtagsinput,
mutable-users='$ctrl.selectedUsers',
on-adding-user="$ctrl.onAddingUser",
Expand All @@ -27,5 +27,5 @@
span {{ 'Add' | translate }}
contact-addressbook-shared-configuration-item(ng-repeat="addressbook in $ctrl.addressbooksPerUser", addressbook='addressbook')
.modal-footer
button.btn.btn-default(type="button", ng-click="$hide()") {{ 'Cancel' | translate }}
button.btn.btn-link(type="button", ng-click="$hide()") {{ 'Cancel' | translate }}
button.btn.btn-primary(type='button', ng-disabled='!$ctrl.getSelectedAddressbooks().length', ng-click='$ctrl.subscribe(); $hide()') {{ 'Save' | translate }}
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,24 @@ contact-addressbook-shared-configuration {
}

.contact-addressbook-shared-configuration-content {
padding: 14px;
.flex-column;

min-height: 30vh;
min-height: 320px;

users-autocomplete-input {
margin-bottom: 30px;
margin-bottom: 32px;

.col-xs-12 {
padding: 0;
}
}

.subscribable-addressbook-list {
.flex-column;
.all-centered;

margin-left: 10px;
margin-top: 15px;
margin-top: 16px;
}

.empty {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
contact-addressbook-shared-configuration-item {
width: 100%;
margin-top: 20px;
margin-top: 12px;

esn-avatar {
margin-right: 8px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
esn-form-group(label="{{ 'Name' | translate }}")
input.form-control(type="text", ng-model="$ctrl.addressbook.name", name="addressbookName", autofocus, required)
.modal-footer
button.btn.btn-default(type="button", ng-click="$hide()") {{ 'Cancel' | translate }}
button.btn.btn-link(type="button", ng-click="$hide()") {{ 'Cancel' | translate }}
button.btn.btn-primary(type="submit", ng-disabled="form.$invalid") {{ 'Create' | translate }}
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
require('./default-addressbook-display-shell.service.js');
require('./default-addressbook-helper.service.js');
require('../action/addressbook-action-edit.service.js');
require('../action/addressbook-action-delete.service.js');
require('../action/addressbook-action-settings.service.js');
require('../action/addressbook-action-export.service.js');
require('../../services/contact-configuration.service.js');
Expand All @@ -15,8 +13,6 @@ function registerDefaultAddressbookDisplayShell(
contactAddressbookDisplayShellRegistry,
ContactDefaultAddressbookDisplayShell,
contactDefaultAddressbookHelper,
contactAddressbookActionEdit,
contactAddressbookActionDelete,
contactAddressbookActionSettings,
contactAddressbookActionExport,
contactConfiguration
Expand All @@ -30,9 +26,7 @@ function registerDefaultAddressbookDisplayShell(
priority: 1,
actions: [
contactAddressbookActionExport,
contactAddressbookActionSettings,
contactAddressbookActionEdit,
contactAddressbookActionDelete
contactAddressbookActionSettings
],
displayShell: ContactDefaultAddressbookDisplayShell,
matchingFunction: contactDefaultAddressbookHelper.isDefaultAddressbook
Expand Down

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions src/linagora.esn.contact/app/addressbook/edit/addressbook-edit.pug

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require('../action/addressbook-action-edit.service.js');
require('../action/addressbook-action-export.service.js');
require('../action/addressbook-action-settings.service.js');
require('../../services/contact-configuration.service.js');
Expand All @@ -7,7 +6,6 @@ require('../../services/contact-configuration.service.js');

angular.module('linagora.esn.contact')
.run(function(
contactAddressbookActionEdit,
contactAddressbookActionExport,
contactAddressbookActionSettings,
contactAddressbookDisplayShellRegistry,
Expand All @@ -24,8 +22,7 @@ angular.module('linagora.esn.contact')
priority: 100,
actions: [
contactAddressbookActionExport,
contactAddressbookActionSettings,
contactAddressbookActionEdit
contactAddressbookActionSettings
],
displayShell: ContactGroupAddressbookDisplayShell,
matchingFunction: contactGroupAddressbookService.isGroupAddressbook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
span.message
| {{ 'Something went wrong, please try again later' | translate }}
.modal-footer
button.btn.btn-default(type="button", ng-click="$hide()") {{ 'Cancel' | translate }}
button.btn.btn-link(type="button", ng-click="$hide()") {{ 'Cancel' | translate }}
button.btn.btn-primary(type='button', ng-disabled='!$ctrl.isValid', ng-click='$ctrl.doImport(); $hide()') {{ 'Import' | translate }}
Loading