Browse Source

Improved styles

master
Igor Zhukov 10 years ago
parent
commit
018b6f9d36
  1. 15
      app/css/app.css
  2. 10
      app/js/controllers.js
  3. 10
      app/js/directives.js
  4. 2
      app/js/lib/config.js
  5. 2
      app/partials/edit_contact_modal.html
  6. 2
      app/partials/im.html
  7. 2
      app/partials/peer_select.html

15
app/css/app.css

@ -914,6 +914,10 @@ a.tg_radio_on:hover i.icon-radio {
padding: 6px 20px 6px 30px; padding: 6px 20px 6px 30px;
margin: 0 0 6px; margin: 0 0 6px;
} }
.im_dialogs_modal_col_wrap .im_dialogs_search_field {
background-color: #FFF;
border-color: #d9dbde;
}
.is_1x .im_dialogs_search_field { .is_1x .im_dialogs_search_field {
background-image: url(../img/icons/IconsetW_1x.png); background-image: url(../img/icons/IconsetW_1x.png);
} }
@ -922,6 +926,7 @@ a.tg_radio_on:hover i.icon-radio {
background-color: #FFF; background-color: #FFF;
} }
.im_dialogs_search_clear { .im_dialogs_search_clear {
position: absolute; position: absolute;
right: 9px; right: 9px;
@ -2862,9 +2867,9 @@ a:hover .icon-twitter {
.contacts_modal_search_field { .contacts_modal_search_field {
font-size: 12px; font-size: 12px;
line-height: normal; line-height: normal;
background: #F2F2F2 url(../img/icons/IconsetW.png) -6px -205px no-repeat; background: url(../img/icons/IconsetW.png) -6px -205px no-repeat;
background-size: 42px 891px; background-size: 42px 891px;
border: 1px solid #F2F2F2; border: 1px solid #d9dbde;
border-radius: 3px; border-radius: 3px;
padding: 6px 15px 6px 30px; padding: 6px 15px 6px 30px;
margin: 0; margin: 0;
@ -2872,10 +2877,6 @@ a:hover .icon-twitter {
.is_1x .contacts_modal_search_field { .is_1x .contacts_modal_search_field {
background-image: url(../img/icons/IconsetW_1x.png); background-image: url(../img/icons/IconsetW_1x.png);
} }
.contacts_modal_search_field:focus,
.contacts_modal_search_field:active {
background-color: #FFF;
}
.contacts_modal_search_clear { .contacts_modal_search_clear {
position: absolute; position: absolute;
@ -2918,7 +2919,7 @@ a:hover .icon-twitter {
.contacts_modal_members_list .contacts_modal_contact_wrap { .contacts_modal_members_list .contacts_modal_contact_wrap {
/*margin-top: 0;*/ margin-top: 0;
} }
.contacts_modal_members_list a.contacts_modal_contact { .contacts_modal_members_list a.contacts_modal_contact {
clear: both; clear: both;

10
app/js/controllers.js

@ -970,10 +970,10 @@ angular.module('myApp.controllers', [])
if (historyResult.history.length) { if (historyResult.history.length) {
delete $scope.state.empty; delete $scope.state.empty;
maxID = historyResult.history[historyResult.history.length - 1]; maxID = historyResult.history[historyResult.history.length - 1];
$scope.$broadcast('ui_history_prepend');
if (AppMessagesManager.regroupWrappedHistory(peerHistory.messages, historyResult.history.length + 1)) { if (AppMessagesManager.regroupWrappedHistory(peerHistory.messages, historyResult.history.length + 1)) {
$scope.$broadcast('messages_regroup'); $scope.$broadcast('messages_regroup');
} }
$scope.$broadcast('ui_history_prepend');
} }
if (lessPending) { if (lessPending) {
@ -1011,11 +1011,17 @@ angular.module('myApp.controllers', [])
lessActive = false; lessActive = false;
lessPending = false; lessPending = false;
var prerenderedLen = peerHistory.messages.length;
if (prerenderedLen && (maxID || backLimit)) {
prerenderedLen = 0;
peerHistory.messages = [];
}
var curJump = ++jump, var curJump = ++jump,
inputMediaFilter = $scope.historyFilter.mediaType && {_: inputMediaFilters[$scope.historyFilter.mediaType]}, inputMediaFilter = $scope.historyFilter.mediaType && {_: inputMediaFilters[$scope.historyFilter.mediaType]},
getMessagesPromise = inputMediaFilter getMessagesPromise = inputMediaFilter
? AppMessagesManager.getSearch($scope.curDialog.inputPeer, '', inputMediaFilter, maxID) ? AppMessagesManager.getSearch($scope.curDialog.inputPeer, '', inputMediaFilter, maxID)
: AppMessagesManager.getHistory($scope.curDialog.inputPeer, maxID, limit, backLimit, peerHistory.messages.length); : AppMessagesManager.getHistory($scope.curDialog.inputPeer, maxID, limit, backLimit, prerenderedLen);
$scope.state.mayBeHasMore = true; $scope.state.mayBeHasMore = true;

10
app/js/directives.js

@ -779,14 +779,14 @@ angular.module('myApp.directives', ['myApp.filters'])
scrollTopInitial = -1; scrollTopInitial = -1;
} }
if (!lessNotified && st >= scrollableWrap.scrollHeight - scrollableWrap.clientHeight - 300) { if (!moreNotified && st <= 300) {
lessNotified = true;
$scope.$emit('history_need_less');
}
else if (!moreNotified && st <= 300) {
moreNotified = true; moreNotified = true;
$scope.$emit('history_need_more'); $scope.$emit('history_need_more');
} }
else if (!lessNotified && st >= scrollableWrap.scrollHeight - scrollableWrap.clientHeight - 300) {
lessNotified = true;
$scope.$emit('history_need_less');
}
}); });
function updateSizes (heightOnly) { function updateSizes (heightOnly) {

2
app/js/lib/config.js

File diff suppressed because one or more lines are too long

2
app/partials/edit_contact_modal.html

@ -9,7 +9,7 @@
<h4>Edit contact</h4> <h4>Edit contact</h4>
<div class="form-group"> <div class="form-group">
<span class="form-control uneditable-input disabled" disabled ng-bind="importContact.phone | phoneNumber"></span> <span class="form-control uneditable-input input-sm disabled" disabled ng-bind="importContact.phone | phoneNumber"></span>
</div> </div>
<div class="form-group"> <div class="form-group">
<input class="form-control input-sm" my-focused type="text" placeholder="First name" ng-model="importContact.first_name"/> <input class="form-control input-sm" my-focused type="text" placeholder="First name" ng-model="importContact.first_name"/>

2
app/partials/im.html

@ -163,7 +163,7 @@
</div> </div>
<div class="im_history_messages" ng-class="{im_history_messages_group: historyPeer.id < 0}"> <div class="im_history_messages" ng-class="{im_history_messages_group: historyPeer.id < 0}">
<div ng-show="peerHistory.peerID == historyPeer.id" ng-repeat="peerHistory in peerHistories"> <div class="im_history_messages_peer" ng-show="peerHistory.peerID == historyPeer.id" ng-repeat="peerHistory in peerHistories">
<div class="im_history_message_wrap" my-message ng-repeat="historyMessage in peerHistory.messages"></div> <div class="im_history_message_wrap" my-message ng-repeat="historyMessage in peerHistory.messages"></div>
</div> </div>
</div> </div>

2
app/partials/peer_select.html

@ -9,7 +9,7 @@
<div class="im_dialogs_modal_col_wrap" ng-controller="AppImDialogsController" my-dialogs> <div class="im_dialogs_modal_col_wrap" ng-controller="AppImDialogsController" my-dialogs>
<div class="im_dialogs_panel"> <div class="im_dialogs_panel">
<div class="im_dialogs_search"> <div class="im_dialogs_search">
<input my-focused class="form-control im_dialogs_search_field" type="search" placeholder="Search" ng-model="search.query"/> <input my-focused class="form-control im_dialogs_search_field no_outline" type="search" placeholder="Search" ng-model="search.query"/>
<a class="im_dialogs_search_clear" ng-click="search.query = ''" ng-show="search.query.length"></a> <a class="im_dialogs_search_clear" ng-click="search.query = ''" ng-show="search.query.length"></a>
</div> </div>
</div> </div>

Loading…
Cancel
Save