Browse Source

Mobile bugfixes

master
Igor Zhukov 11 years ago
parent
commit
280703c50c
  1. 8
      app/css/app_mobile.css
  2. 2
      app/js/directives.js
  3. 7
      app/js/lib/ng_utils.js
  4. 10
      app/js/services.js
  5. 3
      app/partials/head.html
  6. 2
      app/partials/phonebook_modal.html

8
app/css/app_mobile.css

@ -354,6 +354,14 @@ html {
margin-top: -257px; margin-top: -257px;
} }
.im_edit_panel_wrap {
padding-top: 2px;
padding-bottom: 4px;
}
.im_edit_panel_border {
margin-bottom: 3px;
}
.im_head_attach { .im_head_attach {
display: block; display: block;
float: right; float: right;

2
app/js/directives.js

@ -294,7 +294,7 @@ angular.module('myApp.directives', ['myApp.filters'])
height: $($window).height() - height: $($window).height() -
(panelWrap && panelWrap.offsetHeight || 0) - (panelWrap && panelWrap.offsetHeight || 0) -
(searchWrap && searchWrap.offsetHeight || 0) - (searchWrap && searchWrap.offsetHeight || 0) -
(Config.Navigator.mobile ? 60 : 200) (Config.Navigator.mobile ? 100 : 200)
}); });
$(contactsWrap).nanoScroller(); $(contactsWrap).nanoScroller();
} }

7
app/js/lib/ng_utils.js

@ -160,12 +160,7 @@ angular.module('izhukov.utils', [])
deferred.reject(); deferred.reject();
}; };
if (bytes instanceof FileEntry) { if (bytes instanceof Blob) { // is file bytes
bytes.file(function (file) {
fileWriter.write(file);
}, fileWriter.onerror);
}
else if (bytes instanceof Blob) { // is file bytes
fileWriter.write(bytes); fileWriter.write(bytes);
} }
else { else {

10
app/js/services.js

@ -258,7 +258,7 @@ angular.module('myApp.services', [])
return $modal.open({ return $modal.open({
templateUrl: 'partials/import_contact_modal.html', templateUrl: 'partials/import_contact_modal.html',
controller: 'ImportContactModalController', controller: 'ImportContactModalController',
windowClass: 'import_contact_modal_window page_modal' windowClass: 'import_contact_modal_window'
}).result.then(function (foundUserID) { }).result.then(function (foundUserID) {
if (!foundUserID) { if (!foundUserID) {
return $q.reject(); return $q.reject();
@ -338,7 +338,7 @@ angular.module('myApp.services', [])
return $modal.open({ return $modal.open({
templateUrl: 'partials/phonebook_modal.html', templateUrl: 'partials/phonebook_modal.html',
controller: 'PhonebookModalController', controller: 'PhonebookModalController',
windowClass: 'phonebook_modal_window page_modal' windowClass: 'phonebook_modal_window'
}); });
} }
@ -361,8 +361,10 @@ angular.module('myApp.services', [])
phones: [] phones: []
}; };
for (var i = 0; i < this.result.tel.length; i++) { if (this.result.tel !== undefined) {
contact.phones.push(this.result.tel[i].value); for (var i = 0; i < this.result.tel.length; i++) {
contact.phones.push(this.result.tel[i].value);
}
} }
if (this.result.photo) { if (this.result.photo) {
contact.photo = URL.createObjectURL(this.result.photo[0]); contact.photo = URL.createObjectURL(this.result.photo[0]);

3
app/partials/head.html

@ -41,8 +41,7 @@
<div class="navbar-header"> <div class="navbar-header">
<a class="navbar-brand" href="{{isLoggedIn ? '#/im' : '#/'}}"><span class="tg_head_logo"></span><span class="tg_head_logo_text"></span></a> <a class="navbar-brand" href="{{isLoggedIn ? '#/im' : '#/'}}"><span class="tg_head_logo"></span><span class="tg_head_logo_text"></span></a>
<div ng-show="curDialog.peer" ng-switch="curDialog.peer &amp;&amp; historyFilter.mediaType.length > 0">
<div ng-show="curDialog.peer" ng-switch="curDialog.peer &amp;&amp; historyFilter.mediaType.length">
<ul ng-switch-when="true" class="nav navbar-nav navbar-quick-nav"> <ul ng-switch-when="true" class="nav navbar-nav navbar-quick-nav">
<li> <li>
<a ng-click="toggleMedia()" class="navbar-quick-media-back" ng-switch="historyFilter.mediaType"> <a ng-click="toggleMedia()" class="navbar-quick-media-back" ng-switch="historyFilter.mediaType">

2
app/partials/phonebook_modal.html

@ -51,7 +51,7 @@
</div> </div>
<div class="modal-footer" ng-if="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"> <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-when="true">Deselect all</span>
<span ng-switch-default>Select all</span> <span ng-switch-default>Select all</span>

Loading…
Cancel
Save