312 lines
14 KiB
XML
312 lines
14 KiB
XML
<?xml version='1.0' standalone='yes'?>
|
|
<!DOCTYPE var:component>
|
|
<var:component
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:var="http://www.skyrix.com/od/binding"
|
|
xmlns:const="http://www.skyrix.com/od/constant"
|
|
xmlns:label="OGo:label"
|
|
const:userDefaultsKeys="SOGoContactsCategories"
|
|
const:jsFiles="Common/user-model.js, Common/acl-model.js, Common/resource.js, Contacts/card-model.js, Contacts/addressbook-model.js"
|
|
className="UIxPageFrame"
|
|
title="name"
|
|
var:popup="isPopup">
|
|
<script type="text/javascript">
|
|
var contactFolders =<var:string value="contactFolders" const:escapeHTML="NO" />;
|
|
</script>
|
|
|
|
<!--
|
|
<div id="uploadDialog" style="display: none" class="dialog left">
|
|
<div>
|
|
<h3><var:string label:value="Import Cards"/></h3>
|
|
<p class="prompt"><var:string label:value="Select a vCard or LDIF file."/></p>
|
|
<form const:href="" name="uploadForm" id="uploadForm" method="post"
|
|
enctype="multipart/form-data"
|
|
onsubmit="return AIM.submit(this, {'onStart' : validateUploadForm,
|
|
'onComplete' : uploadCompleted})">
|
|
<p class="prompt"><input type="file" name="contactsFile" id="contactsFile" class="textField" required="required" />
|
|
<a href="#" class="button actionButton" id="uploadSubmit"
|
|
onclick="if($('uploadForm').onsubmit()) $('uploadForm').submit()">
|
|
<span><var:string label:value="Upload" /></span></a>
|
|
<a href="#" class="button" const:id="uploadCancel">
|
|
<span><var:string label:value="Cancel" /></span></a></p>
|
|
</form>
|
|
<hr/>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="uploadResults" dropdown-content="dropdown-content" class="f-dropdown">
|
|
<div>
|
|
<h3><var:string label:value="Import Cards"/></h3>
|
|
<p id="uploadResultsContent">!- empty -</p>
|
|
<p><a href="#" class="button" const:id="uploadOK">
|
|
<span><var:string label:value="Done" /></span></a></p>
|
|
<hr/>
|
|
</div>
|
|
</div>
|
|
|
|
<ul class="f-dropdown" dropdown-content="dropdown-content" id="contactMenu">
|
|
<li><var:string label:value="Properties" /></li>
|
|
<li><var:string label:value="Categories" /></li>
|
|
<li>!- separator -</li>
|
|
<li><var:string label:value="Write" /></li>
|
|
<li><var:string label:value="Instant Message" /></li>
|
|
<li>!- separator -</li>
|
|
<li><var:string label:value="Delete" /></li>
|
|
<li>!- separator -</li>
|
|
<li><var:string label:value="Move To" /></li>
|
|
<li><var:string label:value="Copy To" /></li>
|
|
<li><var:string label:value="Export" /></li>
|
|
<li><var:string label:value="View Raw Source" /></li>
|
|
</ul>
|
|
-->
|
|
<!--
|
|
MAIN CONTENT ROW
|
|
Content of the application view injected injected in the element bellow
|
|
MUST be the first html element after body
|
|
SHOULD be a main tag (with role="main")
|
|
|
|
Templates script tag wrappers goes next
|
|
-->
|
|
<main class="view md-layout-fill" ui-view="addressbooks" layout="row" ng-controller="navController"><!-- addressbooks list --></main>
|
|
|
|
<!-- TEMPLATE SCRIPT WRAPPER -->
|
|
<script type="text/ng-template" id="UIxContactFoldersView">
|
|
|
|
<!-- dropdown menu for addressbook options button -->
|
|
<div id="addressbookProperties" class="f-dropdown icons-dropdown">
|
|
<ul class="button-group">
|
|
<li label:tooltip="Links to this Address Book"
|
|
tooltip-popup-delay="500">
|
|
<span class="button"
|
|
sg-dropdown-content-toggle="#addressbookLinks">
|
|
<i class="icon-hyperlink"><!-- links --></i>
|
|
</span>
|
|
</li>
|
|
<li label:tooltip="Rename"
|
|
tooltip-popup-delay="500">
|
|
<span class="button" ng-click="edit()">
|
|
<i class="icon-pencil"><!-- rename --></i>
|
|
</span>
|
|
</li>
|
|
<li ng-show="addressbook.isOwned"
|
|
label:tooltip="Sharing..."
|
|
tooltip-popup-delay="500">
|
|
<span class="button" ng-click="share()">
|
|
<i class="icon-share"><!-- share --></i>
|
|
</span>
|
|
</li>
|
|
<li label:tooltip="Import Cards"
|
|
tooltip-popup-delay="500">
|
|
<span class="button" ng-click="importCards()">
|
|
<i class="icon-file"><!-- import --></i>
|
|
</span>
|
|
</li>
|
|
<li label:tooltip="Export"
|
|
tooltip-popup-delay="500">
|
|
<span class="button" ng-click="exportCards()">
|
|
<i class="icon-ion-ios7-upload-outline"><!-- export --></i>
|
|
</span>
|
|
</li>
|
|
<li label:tooltip="Delete"
|
|
tooltip-popup-delay="500">
|
|
<span class="button" ng-click="confirmDelete(addressbook)">
|
|
<i class="icon-trash"><!-- delete --></i>
|
|
</span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<!-- dropdown menu for new card split button
|
|
<ul id="newListDrop" class="f-dropdown">
|
|
<li><a class="tiny" ui-sref="addressbook.new({addressbookId: addressbook.id, contactType: 'list'})"><var:string label:value="New List"/></a></li>
|
|
</ul>
|
|
-->
|
|
|
|
<!-- dropdown menu for addressbook links
|
|
<div id="addressbookLinks" class="sg-dropdown-content joyride-tip-guide">
|
|
<span class="joyride-nub left">!- dropdown nub -</span>
|
|
<div class="joyride-content-wrapper">
|
|
<ul>
|
|
<li class="title"><var:string label:value="Links to this Address Book"/></li>
|
|
<li class="subtitle"><var:string label:value="CardDAV URL for Authenticated User Access"/></li>
|
|
<li class="value">{{addressbook.cardDavURL}}</li>
|
|
<var:if condition="isPublicAccessEnabled">
|
|
<li class="subtitle"><var:string label:value="CardDAV URL for Public Access"/></li>
|
|
<li class="value">{{addressbook.publicCardDavURL}}</li>
|
|
</var:if>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
-->
|
|
|
|
<!-- dropdown menu for subscriptions
|
|
<div id="folderSubscribe" class="sg-dropdown-content"
|
|
sg-subscribe="contact"
|
|
sg-subscribe-on-select="subscribeToFolder">!- subscription dropdown -</div>
|
|
-->
|
|
<!-- Sidenav -->
|
|
<md-sidenav id="left-sidenav" class="md-sidenav-left" md-component-id="left" md-is-locked-open="isGtMedium" layout="column">
|
|
<md-toolbar class="md-tall" layout-align="start start">
|
|
<div class="md-toolbar-tools" layout="row">
|
|
<md-button class="iconButton sg-button-navicon" ng-click="openBottomSheet()">
|
|
<i class="md-icon-apps"><!--icon--></i>
|
|
</md-button>
|
|
<span class="sg-logo"><!--logo.svg--></span>
|
|
</div>
|
|
|
|
<div class="md-toolbar-tools" layout="row">
|
|
<div layout="column">
|
|
<p class="sg-md-title">{{activeUser.identification}}</p>
|
|
<!--fixme: implement this with the proper model and actions -->
|
|
<md-select class="sg-logout" ng-model="accounts.options" label:placeholder="sogo1@inverse.ca">
|
|
<md-option >sogo1@inverse.ca</md-option>
|
|
<md-option >connect an other account</md-option>
|
|
<md-option >logout</md-option>
|
|
</md-select>
|
|
</div>
|
|
</div>
|
|
</md-toolbar>
|
|
<md-content md-scroll-y="md-scroll-y" class="md-flex">
|
|
<md-list>
|
|
<md-item ng-repeat="folder in addressbooks track by folder.id"
|
|
ng-class="{_selected: addressbook.id==folder.id}"
|
|
ng-dblclick="edit($index)">
|
|
<md-item-content>
|
|
<i class="sg-child-level-0" ng-class="{'md-icon-public': folder.isRemote, 'md-icon-contacts': folder.isEditable}"><!-- icon --></i>
|
|
<md-button class="sg-folder">
|
|
<form ng-submit="save($index)">
|
|
<a ui-sref="addressbook({addressbookId: folder.id})"
|
|
ng-click="select($index)"
|
|
ng-show="editMode!=folder.id"
|
|
ng-cloak="ng-cloak">{{folder.name}}
|
|
</a>
|
|
<input class="folder-name" type="text"
|
|
ng-model="folder.name"
|
|
ng-show="editMode==folder.id"
|
|
ng-cloak="ng-cloak"
|
|
ng-blur="save($index)"
|
|
sg-focus-on="addressBookName_{{$index}}"
|
|
sg-escape="revertEditing($index)"/>
|
|
</form>
|
|
</md-button>
|
|
<span class="icon" ng-cloak="ng-cloak">
|
|
<a class="icon" href="#"
|
|
dropdown-toggle="#addressbookProperties"
|
|
options="align:right"
|
|
ng-show="currentFolderIsConfigurable(folder)">
|
|
<i class="md-icon-more-vert"><!-- options --></i>
|
|
</a>
|
|
</span>
|
|
</md-item-content>
|
|
</md-item>
|
|
</md-list>
|
|
</md-content>
|
|
</md-sidenav>
|
|
|
|
<section layout="column" class="sg-app-content md-layout-fill">
|
|
<md-toolbar layout="column" layout-align="space-between start" class="md-tall toolbar-main">
|
|
<div class="md-toolbar-tools md-toolbar-tools-top" layout="row" layout-align="space-between start">
|
|
<div class="sg-toolbar-group-1" layout="row">
|
|
<md-button ng-click="toggleLeft()" class="md-hide-gt-md sg-button-navicon iconButton" label:aria-label="Toggle Menu">
|
|
<span class="md-icon-menu"></span>
|
|
</md-button>
|
|
<div class="sg-date-group" layout="column" layout-align="space-between end">
|
|
<p class="sg-day">monday</p>
|
|
<p class="sg-month">january</p>
|
|
<p class="sg-year">2015</p>
|
|
</div>
|
|
|
|
<p class="sg-md-display-3 sg-date-today">15</p>
|
|
</div>
|
|
<div class="sg-toolbar-group-2">
|
|
<md-button class="iconButton" label:aria-label="Search">
|
|
<i class="md-icon-search"><!--icon--></i>
|
|
</md-button>
|
|
</div>
|
|
</div>
|
|
<div class="md-toolbar-tools md-toolbar-tools-bottom" layout="row" layout-align="space-between center">
|
|
<div class="cols-6" layout="row" layout-align="space-between center" style="padding-right: 16px"
|
|
sg-search="addressbook.$filter(searchText, { search: searchField })">
|
|
<md-input-container class="sg-search-field-container">
|
|
<label style="color: white"><i class="md-icon-search"><!--icon--></i><var:string label:value="Search"/></label>
|
|
<input name="folderSearch" type="search" style="color: white"/>
|
|
</md-input-container>
|
|
|
|
<div class="sg-toolbar-group">
|
|
<md-select class="sg-toolbar-sort md-contrast-light">
|
|
<md-option value="name_or_address"><var:string label:value="Name or Email"/></md-option>
|
|
<md-option value="category"><var:string label:value="Category"/></md-option>
|
|
<md-option value="organization"><var:string label:value="Organization"/></md-option>
|
|
</md-select>
|
|
<md-button class="iconButton" label:aria-label="New Contact" ui-sref="addressbook.new({addressbookId: addressbook.id, contactType: 'card'})"><i class="md-icon-create"><!--icon--></i></md-button>
|
|
</div>
|
|
</div>
|
|
<div class="spacer cols-8"><!-- spacer --></div>
|
|
</div>
|
|
</md-toolbar>
|
|
|
|
<div layout="row" class="md-flex" layout-align="space-between">
|
|
|
|
<md-content style="position: relative;" id="contactsList">
|
|
<style>
|
|
.vs-repeat-repeated-element {
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
<header class="sg-md-subheader">
|
|
<h2 class="sg-md-subhead-solo fg-sogoBlue-700">Contacts</h2>
|
|
</header>
|
|
<!-- Search field & special results
|
|
<input type="text" placeholder="Search" ng-model="search.filter" ng-keyup="doSearch($event)" />
|
|
<div ng-switch="search.status">
|
|
<div ng-switch-when="min-char" class="alert-bg">
|
|
<i class="icon-warning"></i><var:string label:value="Please enter at least three characters"/>
|
|
</div>
|
|
<div ng-switch-when="no-result" class="alert-bg">
|
|
<i class="icon-ion-search"></i><var:string label:value="No matching card"/>
|
|
</div>
|
|
<div ng-switch-when="remote-addressbook" ng-show="addressbook.cards.length == 0" class="alert-bg">
|
|
<i class="icon-ion-search"></i><var:string label:value="Initiate a search"/>
|
|
</div>
|
|
</div>
|
|
-->
|
|
<md-list vs-repeat="72" vs-scroll-parent="#contactsList">
|
|
<md-item ng-repeat="currentCard in addressbook.cards track by currentCard.id">
|
|
<md-item-content
|
|
ng-class="{_selected: card.id == currentCard.id}"
|
|
ng-click="select($index)">
|
|
<div class="md-tile-left">
|
|
<!--avatar--><!-- currentCard.tag = vcard || vlist -->
|
|
</div>
|
|
<div class="sg-tile-content">
|
|
<a ui-sref="addressbook.card.view({addressbookId: addressbook.id, cardId: currentCard.id})">
|
|
<div class="sg-md-body-multi contact-name" ng-bind-html="currentCard.$fullname()"><!-- cn --></div>
|
|
<div class="sg-md-subhead-multi contact-email">{{currentCard.$preferredEmail()}}</div>
|
|
</a>
|
|
</div>
|
|
</md-item-content>
|
|
</md-item>
|
|
</md-list>
|
|
</md-content>
|
|
<!-- This extra container is used to animate views transitions
|
|
double quotes in ng-animate is not a typo -->
|
|
<div class="view-detail" ui-view="card" layout="column" ng-animate="'view'"><!-- card view --></div>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</script>
|
|
<!-- modal for addressbook sharing options -->
|
|
<script type="text/ng-template" id="UIxUserRightsEditor">
|
|
<var:component className="UIxContactsUserRightsEditor" />
|
|
</script>
|
|
<script type="text/ng-template" id="UIxContactViewTemplate">
|
|
<var:component className="UIxContactViewTemplate" />
|
|
</script>
|
|
|
|
|
|
|
|
<var:string value="errorAlertJavaScript" const:escapeHTML="NO" />
|
|
|
|
</var:component>
|