Improved phonebook import
This commit is contained in:
parent
8b71b361c4
commit
a7dd922498
@ -339,7 +339,7 @@ angular.module('myApp.services', [])
|
||||
};
|
||||
|
||||
function isAvailable () {
|
||||
if (Config.Navigator.ffos && Config.Modes.packed) {
|
||||
if (Config.Navigator.mobile && Config.Navigator.ffos && Config.Modes.packed) {
|
||||
try {
|
||||
return navigator.mozContacts && navigator.mozContacts.getAll;
|
||||
} catch (e) {
|
||||
@ -352,9 +352,9 @@ angular.module('myApp.services', [])
|
||||
|
||||
function openPhonebookImport () {
|
||||
return $modal.open({
|
||||
templateUrl: 'partials/phonebook_modal.html',
|
||||
templateUrl: 'partials/mobile/phonebook_modal.html',
|
||||
controller: 'PhonebookModalController',
|
||||
windowClass: 'phonebook_modal_window'
|
||||
windowClass: 'phonebook_modal_window page_modal mobile_modal'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,44 +1,44 @@
|
||||
<div class="contacts_modal_wrap">
|
||||
|
||||
<div class="tg_page_head tg_modal_head">
|
||||
<div class="navbar navbar-static-top navbar-inverse">
|
||||
<div class="container">
|
||||
<div class="navbar navbar-static-top navbar-inverse">
|
||||
<div class="container">
|
||||
|
||||
<div class="navbar-header">
|
||||
<div class="navbar-header">
|
||||
|
||||
<ul class="nav navbar-nav navbar-quick-nav">
|
||||
<li class="navbar-quick-right" ng-if="!action || action == 'edit'" ng-switch="action">
|
||||
<a ng-switch-when="edit" ng-click="toggleEdit(false)">
|
||||
Cancel
|
||||
</a>
|
||||
<a ng-switch-default ng-click="toggleEdit(true)">
|
||||
Edit
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a ng-click="$dismiss()" class="navbar-quick-media-back">
|
||||
<i class="icon icon-back"></i>
|
||||
<div class="navbar-quick-back-title">
|
||||
<h4 ng-switch="action">
|
||||
<div ng-switch-when="new_group" ng-switch="selectedCount > 0">
|
||||
<span ng-switch-when="true">
|
||||
<ng-pluralize count="selectedCount" when="{'one': '1 participant', 'other': '{} participants'}">
|
||||
</ng-pluralize>
|
||||
</span>
|
||||
<span ng-switch-default>New Group</span>
|
||||
</div>
|
||||
<span ng-switch-default>Contacts</span>
|
||||
</h4>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<ul class="nav navbar-nav navbar-quick-nav">
|
||||
<li class="navbar-quick-right" ng-if="!action || action == 'edit'" ng-switch="action">
|
||||
<a ng-switch-when="edit" ng-click="toggleEdit(false)">
|
||||
Cancel
|
||||
</a>
|
||||
<a ng-switch-default ng-click="toggleEdit(true)">
|
||||
Edit
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a ng-click="$dismiss()" class="navbar-quick-media-back">
|
||||
<i class="icon icon-back"></i>
|
||||
<div class="navbar-quick-back-title">
|
||||
<h4 ng-switch="action">
|
||||
<div ng-switch-when="new_group" ng-switch="selectedCount > 0">
|
||||
<span ng-switch-when="true">
|
||||
<ng-pluralize count="selectedCount" when="{'one': '1 participant', 'other': '{} participants'}">
|
||||
</ng-pluralize>
|
||||
</span>
|
||||
<span ng-switch-default>New Group</span>
|
||||
</div>
|
||||
<span ng-switch-default>Contacts</span>
|
||||
</h4>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-body mobile_modal_body">
|
||||
|
||||
|
@ -1,12 +1,35 @@
|
||||
<div class="contacts_modal_wrap" my-modal-position>
|
||||
<div class="contacts_modal_wrap">
|
||||
|
||||
<a class="modal-close-button" ng-click="$dismiss()"><i></i></a>
|
||||
<div class="tg_page_head tg_modal_head">
|
||||
<div class="navbar navbar-static-top navbar-inverse">
|
||||
<div class="container">
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="navbar-header">
|
||||
|
||||
<div class="contacts_modal_header">
|
||||
<h4 class="contacts_modal_title">Phonebook</h4>
|
||||
<ul class="nav navbar-nav navbar-quick-nav">
|
||||
<li class="navbar-quick-right">
|
||||
<a ng-click="toggleSelection()" ng-switch="selectedCount > 0">
|
||||
<span ng-switch-when="true">Deselect all</span>
|
||||
<span ng-switch-default>Select all</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a ng-click="$dismiss()" class="navbar-quick-media-back">
|
||||
<i class="icon icon-back"></i>
|
||||
<div class="navbar-quick-back-title">
|
||||
<h4>Phonebook</h4>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-body mobile_modal_body">
|
||||
|
||||
<div class="contacts_modal_search">
|
||||
<input class="form-control contacts_modal_search_field no_outline" my-focused type="search" placeholder="Search" ng-model="search.query"/>
|
||||
@ -54,11 +77,7 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-footer contacts_modal_panel" ng-show="multiSelect">
|
||||
<a class="btn btn-link pull-left" ng-click="toggleSelection()" ng-switch="selectedCount > 0">
|
||||
<span ng-switch-when="true">Deselect all</span>
|
||||
<span ng-switch-default>Select all</span>
|
||||
</a>
|
||||
<button class="btn btn-primary pull-right" ng-class="{disabled: !selectedCount || progress.enabled}" ng-disabled="!selectedCount || progress.enabled" ng-click="submitSelected()" type="submit" ng-switch="progress.enabled">
|
||||
<button class="btn btn-primary" ng-class="{disabled: !selectedCount || progress.enabled}" ng-disabled="!selectedCount || progress.enabled" ng-click="submitSelected()" type="submit" ng-switch="progress.enabled">
|
||||
<span ng-switch-when="true">Importing<span my-loading-dots></span></span>
|
||||
<span ng-switch-default>Import contacts</span>
|
||||
</button>
|
Loading…
Reference in New Issue
Block a user