370 lines
14 KiB
XML
370 lines
14 KiB
XML
<?xml version='1.0' standalone='yes'?>
|
|
<container 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">
|
|
|
|
<md-content md-scroll-y="true" class="md-padding bg-sogoPaper-50">
|
|
<div class="editor md-padding" style="padding-bottom: 72px">
|
|
<hgroup class="header">
|
|
<h1 class="sg-md-display-2--light" ng-bind-html="card.$fullname()"><!-- fullname --></h1>
|
|
<h6 class="sg-md-display-2-subheader">{{card.$description()}}
|
|
<span ng-repeat="category in card.categories">{{category.value}}</span>
|
|
</h6>
|
|
</hgroup>
|
|
<form name="cardForm" ng-show="card.$isCard()" ng-submit="save(cardForm)">
|
|
<md-input-container>
|
|
<var:entity const:name="nbsp"/>
|
|
<label class="pseudo-input-label">
|
|
<var:string label:value="Display"/>
|
|
</label>
|
|
<input type="text" ng-maxlength="30" ng-model="card.fn"/>
|
|
</md-input-container>
|
|
<!-- todo: look for better reset/normalization. Semanticaly this should be a fieldset, but content doesn't flex properly du to browser styles-->
|
|
<div id="contact-identification" class="sg-fieldset" layout="row" layout-sm="column">
|
|
<md-input-container flex="40">
|
|
<label class="pseudo-input-label">
|
|
<var:string label:value="Firstname"/>
|
|
</label>
|
|
<input type="text" ng-model="card.givenname"/>
|
|
</md-input-container>
|
|
<md-input-container flex="40">
|
|
<label class="pseudo-input-label">
|
|
<var:string label:value="Lastname"/>
|
|
</label>
|
|
<input type="text" ng-model="card.sn"/>
|
|
</md-input-container>
|
|
<md-input-container flex="20">
|
|
<label class="pseudo-input-label">
|
|
<var:string label:value="Nickname"/>
|
|
</label>
|
|
<input type="text" ng-model="card.nickname"/>
|
|
</md-input-container>
|
|
</div>
|
|
|
|
<div class="sg-fieldset" layout="row" layout-sm="column">
|
|
<md-input-container>
|
|
<label class="pseudo-input-label">
|
|
<var:string label:value="Organization"/>
|
|
</label>
|
|
<input type="text" ng-model="card.org"/>
|
|
</md-input-container>
|
|
<md-input-container>
|
|
<label class="pseudo-input-label">
|
|
<var:string label:value="Title"/>
|
|
</label>
|
|
<input type="text" ng-model="card.title"/>
|
|
</md-input-container>
|
|
</div>
|
|
|
|
<!-- org units -->
|
|
<div class="attr" ng-repeat="unit in card.orgUnits">
|
|
<div layout="row" layout-align="center end">
|
|
<md-input-container>
|
|
<label class="pseudo-input-label">
|
|
<var:string label:value="Organization Unit"/>
|
|
</label>
|
|
<input type="text" ng-model="unit.value"
|
|
sg-focus-on="orgUnit_{{$index}}"/>
|
|
</md-input-container>
|
|
<md-button class="iconButton" ng-click="card.$delete('orgUnits', $index)">
|
|
<i class="md-icon-remove-circle"><!-- remove --></i>
|
|
</md-button>
|
|
</div>
|
|
</div>
|
|
<div class="md-layout-margin" layout="row" layout-align="start center">
|
|
<md-button class="iconButton" type="button" ng-click="addOrgUnit($event)">
|
|
<i class="md-icon-add"><!-- plus icon button--></i>
|
|
</md-button>
|
|
<label class="button-label">
|
|
<var:string label:value="Add Organizational Unit"/>
|
|
</label>
|
|
</div>
|
|
|
|
<!-- emails -->
|
|
<div class="section">
|
|
<div class="attr" ng-repeat="email in card.emails">
|
|
<div class="md-layout-margin" layout="row" layout-align="space-between end">
|
|
<md-select ng-model="email.type" label:placeholder="Type">
|
|
<md-option ng-repeat="type in allEmailTypes" ng-value="type">{{ type }}</md-option>
|
|
</md-select>
|
|
<md-input-container>
|
|
<label class="pseudo-input-label"><var:string label:value="Email Address"/></label>
|
|
<input type="email" ng-model="email.value"
|
|
sg-focus-on="email_{{$index}}"/>
|
|
</md-input-container>
|
|
<md-button class="iconButton" ng-click="card.$delete('emails', $index)">
|
|
<i class="md-icon-remove-circle"><!-- remove --></i>
|
|
</md-button>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="md-layout-margin" layout="row" layout-align="start center">
|
|
<md-button class="iconButton" type="button" ng-click="addEmail()">
|
|
<i class="md-icon-add"><!-- new --></i>
|
|
</md-button>
|
|
<label class="button-label">
|
|
<var:string label:value="New Email Address"/>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- birthday -->
|
|
<md-input-container>
|
|
<label class="pseudo-input-label--no-margin">
|
|
<var:string label:value="Birthday"/>
|
|
</label>
|
|
<input type="date" ng-model="card.birthday"/>
|
|
</md-input-container>
|
|
|
|
<!-- categories -->
|
|
<div class="attr" ng-repeat="category in card.categories">
|
|
<div layout="row" layout-align="center end">
|
|
<md-input-container>
|
|
<label class="pseudo-input-label">
|
|
<var:string label:value="Category"/>
|
|
</label>
|
|
<input type="text" ng-model="category.value"
|
|
sg-focus-on="category_{{$index}}"/>
|
|
<!--typeahead="cat for cat in card.allCategories | filter:$viewValue"/>-->
|
|
</md-input-container>
|
|
<md-button class="iconButton" ng-click="card.$delete('categories', $index)">
|
|
<i class="md-icon-remove-circle"><!-- remove --></i>
|
|
</md-button>
|
|
</div>
|
|
</div>
|
|
<!-- New category button-group -->
|
|
<div class="md-layout-margin" layout="row" layout-align="start center">
|
|
<md-button class="iconButton" type="button" ng-click="addCategory()">
|
|
<i class="md-icon-add"><!-- new --></i>
|
|
</md-button>
|
|
<label class="button-label">
|
|
<var:string label:value="New Category"/>
|
|
</label>
|
|
</div>
|
|
|
|
<!-- phones -->
|
|
<div class="section">
|
|
<div class="attr" ng-repeat="phone in card.phones">
|
|
<div layout="row" layout-align="center end">
|
|
<md-select ng-model="phone.type" label:placeholder="Type">
|
|
<md-option ng-repeat="type in allTelTypes" ng-value="type">{{ type }}</md-option>
|
|
</md-select>
|
|
<md-input-container>
|
|
<label class="pseudo-input-label">
|
|
<var:string label:value="Phone Number"/>
|
|
</label>
|
|
<input type="text" ng-model="phone.value"
|
|
sg-focus-on="phone_{{$index}}"/>
|
|
</md-input-container>
|
|
<md-button class="iconButton" ng-click="card.$delete('phones', $index)">
|
|
<i class="md-icon-remove-circle"><!-- remove --></i>
|
|
</md-button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="md-layout-margin" layout="row" layout-align="start center">
|
|
<md-button class="iconButton" type="button" ng-click="addPhone()">
|
|
<i class="md-icon-add"><!-- new --></i>
|
|
</md-button>
|
|
<label class="button-label">
|
|
<var:string label:value="New Phone Number"/>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- urls -->
|
|
<div class="section">
|
|
<div class="attr" ng-repeat="url in card.urls">
|
|
<div layout="row" layout-align="center end">
|
|
<md-select ng-model="url.type" label:placeholder="Type">
|
|
<md-option ng-repeat="type in allUrlTypes" value="type">{{ type }}</md-option>
|
|
</md-select>
|
|
<md-input-container>
|
|
<label class="pseudo-input-label">
|
|
<var:string label:value="URL"/>
|
|
</label>
|
|
<input type="url" ng-model="url.value" sg-focus-on="url_{{$index}}"/>
|
|
</md-input-container>
|
|
<md-button class="iconButton" ng-click="card.$delete('urls', $index)">
|
|
<i class="md-icon-remove-circle"><!-- remove --></i>
|
|
</md-button>
|
|
</div>
|
|
</div>
|
|
<div class="md-layout-margin" layout="row" layout-align="start center">
|
|
<md-button class="iconButton" type="button" ng-click="addUrl()">
|
|
<i class="md-icon-add"><!-- new --></i>
|
|
</md-button>
|
|
<label class="button-label">
|
|
<var:string label:value="New URL"/>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- addresses -->
|
|
<div class="section">
|
|
<div class="attr" ng-repeat="address in card.addresses">
|
|
<div layout="row" layout-align="center end">
|
|
<md-select ng-model="address.type" label:placeholder="Type">
|
|
<md-option ng-repeat="type in allAddressTypes" ng-value="type">{{ type }}</md-option>
|
|
</md-select>
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="street"/>
|
|
</label>
|
|
<input type="text" ng-model="address.street"
|
|
sg-focus-on="address_{{$index}}"/>
|
|
</md-input-container>
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value=""/>
|
|
</label>
|
|
<input type="text" ng-model="address.street2"/>
|
|
</md-input-container>
|
|
</div>
|
|
<div layout="row" layout-align="center end">
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Postoffice"/>
|
|
</label>
|
|
<input type="text" ng-model="address.postoffice"/>
|
|
</md-input-container>
|
|
</div>
|
|
<div layout="row" layout-align="center end">
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="City"/>
|
|
</label>
|
|
<input type="text" ng-model="address.locality"/>
|
|
</md-input-container>
|
|
</div>
|
|
<div layout="row" layout-align="center end">
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Region"/>
|
|
</label>
|
|
<input type="text" ng-model="address.region"/>
|
|
</md-input-container>
|
|
</div>
|
|
<div layout="row" layout-align="center end">
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Country"/>
|
|
</label>
|
|
<input type="text" ng-model="address.country"/>
|
|
</md-input-container>
|
|
</div>
|
|
<div layout="row" layout-align="center end">
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Postal Code"/>
|
|
</label>
|
|
<input type="text" ng-model="address.postalcode"/>
|
|
</md-input-container>
|
|
<md-button class="iconButton" ng-click="card.$delete('addresses', $index)">
|
|
<i class="md-icon-remove-circle"><!-- remove --></i>
|
|
</md-button>
|
|
</div>
|
|
</div>
|
|
<div class="md-layout-margin" layout="row" layout-align="start center">
|
|
<md-button class="iconButton" type="button" ng-click="addAddress()">
|
|
<i class="md-icon-add"><!-- new --></i>
|
|
</md-button>
|
|
<label class="button-label">
|
|
<var:string label:value="New Address"/>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- note -->
|
|
<md-input-container>
|
|
<label class=" right inline">
|
|
<var:string label:value="Note"/>
|
|
</label>
|
|
<textarea ng-model="card.note"><!-- note --></textarea>
|
|
</md-input-container>
|
|
|
|
|
|
|
|
<div class="fieldset md-layout-margin" layout="row" layout-align="end center">
|
|
<md-button class="" ng-click="cancel()">
|
|
<var:string label:value="Cancel"/>
|
|
</md-button>
|
|
<md-button class="" ng-click="reset()">
|
|
<var:string label:value="Reset"/>
|
|
</md-button>
|
|
<md-button class="md-primary md-hue-3" type="submit">
|
|
<var:string label:value="Save"/>
|
|
</md-button>
|
|
</div>
|
|
</form>
|
|
<form name="listForm" ng-show="card.$isList()" ng-submit="save(listForm)">
|
|
<div class="buttonsToolbar">
|
|
<span class="button tiny radius secondary" ng-click="cancel()">
|
|
<i class="icon-arrow-left"><!-- cancel --></i>
|
|
<var:string label:value="Cancel"/>
|
|
</span>
|
|
<span class="button tiny radius secondary" ng-click="reset()">
|
|
<i class="icon-undo"><!-- reset --></i>
|
|
<var:string label:value="Reset"/>
|
|
</span>
|
|
<button class="button tiny radius" type="submit">
|
|
<i class="icon-checkmark"><!-- save --></i>
|
|
<var:string label:value="Save"/>
|
|
</button>
|
|
</div>
|
|
<div class="section">
|
|
<div class="attr">
|
|
<div class="key">
|
|
<label class=" right inline">
|
|
<var:string label:value="Display"/>
|
|
</label>
|
|
</div>
|
|
<div class="value">
|
|
<input type="text" ng-model="card.fn"/>
|
|
</div>
|
|
</div>
|
|
<div class="attr">
|
|
<div class="key">
|
|
<label class=" right inline">
|
|
<var:string label:value="Nickname"/>
|
|
</label>
|
|
</div>
|
|
<div class="value">
|
|
<input type="text" ng-model="card.nickname"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- list members -->
|
|
<div class="section">
|
|
<div class="attr" ng-repeat="ref in card.refs">
|
|
<div class="action">
|
|
<span class="button alert icon" ng-click="card.$delete('refs', $index)">
|
|
<i class="md-icon-remove-circle-outline"><!-- remove --></i>
|
|
</span>
|
|
</div>
|
|
<div class="key">
|
|
<label class=" right inline">
|
|
<var:string label:value="Member"/>
|
|
</label>
|
|
</div>
|
|
<div class="value">
|
|
<input type="text" label:placeholder="email address" ng-model="ref.email"
|
|
sg-focus-on="ref_{{$index}}"
|
|
typeahead="card.$preferredEmail($viewValue) as card.$shortFormat($viewValue) for card in addressbook.$filter($viewValue, {dry: true, excludeLists: true})"
|
|
typeahead-on-select="card.$updateMember($index, $model, $item)"/>
|
|
</div>
|
|
</div>
|
|
<div class="attr">
|
|
<div class="value single">
|
|
<span class="button outline secondary tiny" type="button" ng-click="addMember()">
|
|
<i class="md-icon-add"><!-- new --></i>
|
|
<var:string label:value="Add Member"/>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</md-content>
|
|
|
|
</container>
|