summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2017-08-15 12:04:05 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2017-08-15 12:04:05 +0200
commit87b24fac9c02862a1259592cd74113d4cd86d0cc (patch)
treeb5a1f4d33616366f8e716132771fc8cde537f547
parent1374491541a2f858e7baa04a36a8971b062e66d5 (diff)
Block sidebar on import
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r--css/public/style.scss12
-rw-r--r--js/components/contactImport/contactImport_directive.js2
-rw-r--r--templates/main.php1
3 files changed, 15 insertions, 0 deletions
diff --git a/css/public/style.scss b/css/public/style.scss
index f215af61..68abf406 100644
--- a/css/public/style.scss
+++ b/css/public/style.scss
@@ -1,3 +1,7 @@
+#app-navigation {
+ position: relative;
+}
+
.contactdetails__header {
height: 100px;
padding-left: 20px;
@@ -816,3 +820,11 @@ detailsitem .select2-container {
background: $color-primary;
transition: 500ms all ease-in-out;
}
+#importscreen-sidebar-block {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ background: #fff;
+ z-index: 500;
+ opacity: 0.5;
+}
diff --git a/js/components/contactImport/contactImport_directive.js b/js/components/contactImport/contactImport_directive.js
index 29cd8c41..d8ea85e5 100644
--- a/js/components/contactImport/contactImport_directive.js
+++ b/js/components/contactImport/contactImport_directive.js
@@ -13,12 +13,14 @@ angular.module('contactsApp')
ctrl.importText = ctrl.t.importingText;
ctrl.loadingClass = 'icon-loading-small';
ctrl.importing = true;
+ $rootScope.importing = true;
ContactService.import.call(ContactService, reader.result, file.type, ctrl.selectedAddressBook, function (progress, user) {
if (progress === 1) {
ctrl.importText = ctrl.t.importText;
ctrl.loadingClass = 'icon-upload';
ctrl.importing = false;
+ $rootScope.importing = false;
ImportService.importPercent = 0;
ImportService.importing = false;
ImportService.importedUser = '';
diff --git a/templates/main.php b/templates/main.php
index d1a156b8..fdd6b581 100644
--- a/templates/main.php
+++ b/templates/main.php
@@ -28,6 +28,7 @@ vendor_style('select2/select2');
<div id="app" ng-app="contactsApp">
<div id="app-navigation">
+ <div id="importscreen-sidebar-block" class="icon-loading" ng-show="$root.importing"></div>
<newContactButton></newContactButton>
<ul groupList></ul>