Improved phonebook import
This commit is contained in:
parent
8b71b361c4
commit
a7dd922498
@ -339,7 +339,7 @@ angular.module('myApp.services', [])
|
|||||||
};
|
};
|
||||||
|
|
||||||
function isAvailable () {
|
function isAvailable () {
|
||||||
if (Config.Navigator.ffos && Config.Modes.packed) {
|
if (Config.Navigator.mobile && Config.Navigator.ffos && Config.Modes.packed) {
|
||||||
try {
|
try {
|
||||||
return navigator.mozContacts && navigator.mozContacts.getAll;
|
return navigator.mozContacts && navigator.mozContacts.getAll;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -352,9 +352,9 @@ angular.module('myApp.services', [])
|
|||||||
|
|
||||||
function openPhonebookImport () {
|
function openPhonebookImport () {
|
||||||
return $modal.open({
|
return $modal.open({
|
||||||
templateUrl: 'partials/phonebook_modal.html',
|
templateUrl: 'partials/mobile/phonebook_modal.html',
|
||||||
controller: 'PhonebookModalController',
|
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="contacts_modal_wrap">
|
||||||
|
|
||||||
<div class="tg_page_head tg_modal_head">
|
<div class="tg_page_head tg_modal_head">
|
||||||
<div class="navbar navbar-static-top navbar-inverse">
|
<div class="navbar navbar-static-top navbar-inverse">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-quick-nav">
|
<ul class="nav navbar-nav navbar-quick-nav">
|
||||||
<li class="navbar-quick-right" ng-if="!action || action == 'edit'" ng-switch="action">
|
<li class="navbar-quick-right" ng-if="!action || action == 'edit'" ng-switch="action">
|
||||||
<a ng-switch-when="edit" ng-click="toggleEdit(false)">
|
<a ng-switch-when="edit" ng-click="toggleEdit(false)">
|
||||||
Cancel
|
Cancel
|
||||||
</a>
|
</a>
|
||||||
<a ng-switch-default ng-click="toggleEdit(true)">
|
<a ng-switch-default ng-click="toggleEdit(true)">
|
||||||
Edit
|
Edit
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a ng-click="$dismiss()" class="navbar-quick-media-back">
|
<a ng-click="$dismiss()" class="navbar-quick-media-back">
|
||||||
<i class="icon icon-back"></i>
|
<i class="icon icon-back"></i>
|
||||||
<div class="navbar-quick-back-title">
|
<div class="navbar-quick-back-title">
|
||||||
<h4 ng-switch="action">
|
<h4 ng-switch="action">
|
||||||
<div ng-switch-when="new_group" ng-switch="selectedCount > 0">
|
<div ng-switch-when="new_group" ng-switch="selectedCount > 0">
|
||||||
<span ng-switch-when="true">
|
<span ng-switch-when="true">
|
||||||
<ng-pluralize count="selectedCount" when="{'one': '1 participant', 'other': '{} participants'}">
|
<ng-pluralize count="selectedCount" when="{'one': '1 participant', 'other': '{} participants'}">
|
||||||
</ng-pluralize>
|
</ng-pluralize>
|
||||||
</span>
|
</span>
|
||||||
<span ng-switch-default>New Group</span>
|
<span ng-switch-default>New Group</span>
|
||||||
</div>
|
</div>
|
||||||
<span ng-switch-default>Contacts</span>
|
<span ng-switch-default>Contacts</span>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="modal-body mobile_modal_body">
|
<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">
|
<ul class="nav navbar-nav navbar-quick-nav">
|
||||||
<h4 class="contacts_modal_title">Phonebook</h4>
|
<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>
|
||||||
|
|
||||||
|
<div class="modal-body mobile_modal_body">
|
||||||
|
|
||||||
<div class="contacts_modal_search">
|
<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"/>
|
<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>
|
||||||
|
|
||||||
<div class="modal-footer contacts_modal_panel" ng-show="multiSelect">
|
<div class="modal-footer contacts_modal_panel" ng-show="multiSelect">
|
||||||
<a class="btn btn-link pull-left" ng-click="toggleSelection()" ng-switch="selectedCount > 0">
|
<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">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">
|
|
||||||
<span ng-switch-when="true">Importing<span my-loading-dots></span></span>
|
<span ng-switch-when="true">Importing<span my-loading-dots></span></span>
|
||||||
<span ng-switch-default>Import contacts</span>
|
<span ng-switch-default>Import contacts</span>
|
||||||
</button>
|
</button>
|
Loading…
Reference in New Issue
Block a user