summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorAlexander Weidinger <irgendwie@users.noreply.github.com>2017-04-19 19:01:22 +0200
committerGitHub <noreply@github.com>2017-04-19 19:01:22 +0200
commitcffc4cec5600ca3540bdaab0e73adb8444b08ccf (patch)
treea249ba66163e4266d4a7d62a6cd1b064a7bd5280 /templates
parentdaece9d8a3f3f6c66dd4e7a7a6d0213434546ed8 (diff)
parentb6d62f3b758c9ee14f6db425870ef39da0b04530 (diff)
Merge pull request #193 from nextcloud/tel-link
Added tel/mail link to tel/mail field
Diffstat (limited to 'templates')
-rw-r--r--templates/detailItems/email.html13
-rw-r--r--templates/detailItems/tel.html3
-rw-r--r--templates/detailItems/url.html4
3 files changed, 19 insertions, 1 deletions
diff --git a/templates/detailItems/email.html b/templates/detailItems/email.html
new file mode 100644
index 00000000..d297bf9d
--- /dev/null
+++ b/templates/detailItems/email.html
@@ -0,0 +1,13 @@
+<select ng-model="ctrl.type" ng-model-options="{ debounce: 500 }" ng-change="ctrl.changeType(ctrl.type)">
+ <option ng-repeat="option in ctrl.availableOptions" value="{{option.id}}">{{option.name}}</option>
+</select>
+<a ng-if="ctrl.data.value.length" class="item-action" href="mailto:{{ctrl.data.value}}">
+ <i class="icon-mail"></i>
+</a>
+<input type="email" id="details-{{ctrl.name}}-{{ctrl.index}}" name="email"
+ ng-model="ctrl.data.value" email-model ng-model-options="{ debounce: 500 }"
+ ng-change="ctrl.model.updateContact()" value=""
+ placeholder="{{ctrl.meta.readableName}}"
+ focus-expression="$parent.ctrl.focus === ctrl.name"
+/>
+<button ng-click="ctrl.deleteField()" class="icon-delete" title="{{ctrl.t.delete}}"></button>
diff --git a/templates/detailItems/tel.html b/templates/detailItems/tel.html
index fa886f38..340d90cc 100644
--- a/templates/detailItems/tel.html
+++ b/templates/detailItems/tel.html
@@ -1,6 +1,9 @@
<select ng-model="ctrl.type" ng-model-options="{ debounce: 500 }" ng-change="ctrl.changeType(ctrl.type)">
<option ng-repeat="option in ctrl.availableOptions" value="{{option.id}}">{{option.name}}</option>
</select>
+<a ng-if="ctrl.data.value.length" class="item-action" href="tel:{{ctrl.data.value}}">
+ <i class="icon-comment"></i>
+</a>
<input type="tel" id="details-{{ctrl.name}}-{{ctrl.index}}" name="phone"
ng-model="ctrl.data.value" tel-model ng-model-options="{ debounce: 500 }"
ng-change="ctrl.model.updateContact()" value=""
diff --git a/templates/detailItems/url.html b/templates/detailItems/url.html
index 4d8e783a..e3bf47f0 100644
--- a/templates/detailItems/url.html
+++ b/templates/detailItems/url.html
@@ -1,4 +1,7 @@
<label for="details-{{ctrl.name}}-{{ctrl.index}}">{{ctrl.meta.readableName}}</label>
+<a ng-if="ctrl.data.value.length" class="item-action" target="_blank" href="{{ctrl.data.value}}">
+ <i class="icon-external"></i>
+</a>
<input type="url" id="details-{{ctrl.name}}-{{ctrl.index}}" name="{{ctrl.name}}"
ng-model="ctrl.data.value" ng-model-options="{ debounce: 500, allowInvalid: true }"
ng-change="ctrl.model.updateContact()" value=""
@@ -6,4 +9,3 @@
focus-expression="$parent.ctrl.focus === ctrl.name"
/>
<button ng-click="ctrl.deleteField()" class="icon-delete" title="{{ctrl.t.delete}}"></button>
-<a ng-if="ctrl.data.value.length" class="url-link" target="_blank" href="{{ctrl.data.value}}">↗</a>