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

2
app/js/directives.js

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

7
app/js/lib/ng_utils.js

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

10
app/js/services.js

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

3
app/partials/head.html

@ -41,8 +41,7 @@ @@ -41,8 +41,7 @@
<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>
<div ng-show="curDialog.peer" ng-switch="curDialog.peer &amp;&amp; historyFilter.mediaType.length">
<div ng-show="curDialog.peer" ng-switch="curDialog.peer &amp;&amp; historyFilter.mediaType.length > 0">
<ul ng-switch-when="true" class="nav navbar-nav navbar-quick-nav">
<li>
<a ng-click="toggleMedia()" class="navbar-quick-media-back" ng-switch="historyFilter.mediaType">

2
app/partials/phonebook_modal.html

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

Loading…
Cancel
Save