From da88e48185ed8fbf8958b61efd61934f693d828f Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Thu, 30 Jan 2014 15:59:54 +0400 Subject: [PATCH] Improved fonts on windows, fixed small issues --- app/css/app.css | 45 +++++++++++---------------------------- app/index.html | 6 +++--- app/js/app.js | 7 +++++- app/js/controllers.js | 4 +++- app/partials/dialog.html | 2 +- app/partials/welcome.html | 21 +++++++++++------- 6 files changed, 39 insertions(+), 46 deletions(-) diff --git a/app/css/app.css b/app/css/app.css index bf89d2e5..7c39e8aa 100644 --- a/app/css/app.css +++ b/app/css/app.css @@ -11,12 +11,19 @@ html { } body { background: none; - - /*font: 12px/18px "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;*/ - /*font: 12px/18px Arial, "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, Verdana, sans-serif;*/ font: 12px/18px "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, Verdana, sans-serif; /*-webkit-font-smoothing: antialiased;*/ } +.font-light { + font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Light", Helvetica, Arial , Verdana, sans-serif; + font-weight: 300; +} +body.non_osx, +.non_osx .font-light { + font: 12px/18px Verdana, Tahoma, sans-serif, Arial, Helvetica; + font-weight: normal; +} + a { color: #3a6d99; } @@ -99,11 +106,6 @@ fieldset[disabled] .btn-tg.active { border-color: #999; } -.font-light { - font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Light", Helvetica, Arial , Verdana, sans-serif; - font-weight: 300; -} - .tg_page_head .container { display: block; width: auto; @@ -406,45 +408,24 @@ fieldset[disabled] .btn-tg.active { padding: 0 19px 0 12px; outline: none ! important; } -.im_dialogs_scrollable_wrap .nav-stacked > li + li { - margin-top: 0; - margin-left: 0; -} - .im_dialogs_scrollable_wrap a.im_dialog { + clear: both; + overflow: hidden; color: #000; padding: 8px 9px; border-radius: 0; - border-bottom: 1px solid #FFF; -} -.im_dialogs_scrollable_wrap li:last-child a.im_dialog { - border-bottom: 1px solid #FFF; -} - -.im_dialogs_scrollable_wrap a.im_dialog:hover, -.im_dialogs_scrollable_wrap .active a.im_dialog { - margin-top: -1px; - overflow: hidden; } .im_dialogs_scrollable_wrap a.im_dialog:hover { + border-radius: 2px; background: #f2f6fa; - border-top: 1px solid #f2f6fa; - border-bottom-color: #f2f6fa; } .im_dialogs_scrollable_wrap .active a.im_dialog { border-radius: 2px; background-color: #5785A5; - border-top: 1px solid #5785A5; - border-bottom-color: #5785A5; } .im_dialogs_scrollable_wrap .active a.im_dialog:hover { background-color: #5785A5; } -.im_dialogs_scrollable_wrap li:first-child a.im_dialog, -.im_dialogs_scrollable_wrap .active + li > a.im_dialog { - margin-top: 0; - border-top: 0; -} .im_dialogs_scrollable_wrap a.im_dialog .icon, .im_dialogs_scrollable_wrap a.im_dialog .glyphicon { diff --git a/app/index.html b/app/index.html index 6c789c74..83b32f6e 100644 --- a/app/index.html +++ b/app/index.html @@ -7,7 +7,7 @@ - + @@ -51,9 +51,9 @@ - + - + diff --git a/app/js/app.js b/app/js/app.js index e0835e8d..d734b1bd 100644 --- a/app/js/app.js +++ b/app/js/app.js @@ -9,7 +9,12 @@ window._testMode = location.search.indexOf('test=1') > 0; window._debugMode = location.search.indexOf('debug=1') > 0; +window._osX = (navigator.platform || '').toLowerCase().indexOf('mac') != -1 || + (navigator.userAgent || '').toLowerCase().indexOf('mac') != -1; +if (!window._osX) { + $('body').addClass('non_osx'); +} // Declare app level module which depends on filters, and services angular.module('myApp', [ @@ -48,7 +53,7 @@ config(['$locationProvider', '$routeProvider', '$compileProvider', function($loc // $locationProvider.html5Mode(true); - $routeProvider.when('/', {templateUrl: 'partials/welcome.html?1', controller: 'AppWelcomeController'}); + $routeProvider.when('/', {templateUrl: 'partials/welcome.html?2', controller: 'AppWelcomeController'}); $routeProvider.when('/login', {templateUrl: 'partials/login.html?2', controller: 'AppLoginController'}); $routeProvider.when('/im', {templateUrl: 'partials/im.html?5', controller: 'AppIMController', reloadOnSearch: false}); $routeProvider.otherwise({redirectTo: '/'}); diff --git a/app/js/controllers.js b/app/js/controllers.js index 212c2461..6a93ba06 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -15,6 +15,8 @@ angular.module('myApp.controllers', []) MtpApiManager.getUserID().then(function (id) { if (id) { $location.url('/im'); + } else { + $scope.showWelcome = true; } }); }) @@ -467,7 +469,7 @@ angular.module('myApp.controllers', []) return false; } - text = text.replace(/:([a-z0-9\-_]+?):/gi, function (all, name) { + text = text.replace(/:([a-z0-9\-\+\*_]+?):/gi, function (all, name) { var utfChar = $.emojiarea.reverseIcons[name]; if (utfChar !== undefined) { return utfChar; diff --git a/app/partials/dialog.html b/app/partials/dialog.html index fb7006ba..1a3c4dd2 100644 --- a/app/partials/dialog.html +++ b/app/partials/dialog.html @@ -1,4 +1,4 @@ - +