Skip to content

Commit

Permalink
Couple UX Fixes for Firefox (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Aug 9, 2017
1 parent 34945ed commit cf94f2c
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/mailer/mailCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ mailCheck.fetchMail = function(DEFAULT_TICKET_TYPE) {
openInbox(function(err, box) {
if (err) {
mailCheck.Imap.end();
winston.warn(err);
winston.debug(err);
//throw err;
}

Expand Down Expand Up @@ -173,7 +173,7 @@ mailCheck.fetchMail = function(DEFAULT_TICKET_TYPE) {
});
}
], function(err, type) {
if (err || type == null) return cb(err);
if (err || type === null) return cb(err);

var HistoryItem = {
action: 'ticket:created',
Expand Down
14 changes: 12 additions & 2 deletions src/public/js/angularjs/controllers/accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,19 @@ define(['angular', 'underscore', 'jquery', 'modules/helpers', 'uikit', 'history'
};

$scope.accountEditPic = function() {
throttledAccountPicClick();
};

function throttledAccountPicClick() {
$timeout(function() {
$('#profileImageInput').trigger('click');
var $profileImageInput = $('#profileImageInput');
$profileImageInput.on('click', function(event) {
//This function is a firefox hack to stop it from spawning 100000 file dialogs
event.stopPropagation();
});

$profileImageInput.trigger('click');
}, 0);
};
}
});
});
3 changes: 3 additions & 0 deletions src/sass/partials/common.sass
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
max-width: 100%
float: left

.clear
clear: both

.hide
display: none

Expand Down
8 changes: 8 additions & 0 deletions src/sass/partials/tLoader.sass
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,24 @@
@keyframes bounceC
0%
-webkit-transform: translateY(0%)
-moz-transform: translateY(0%)
50%
-webkit-transform: translateY(-700%)
-moz-transform: translateY(-80%)
100%
-webkit-transform: translateY(0%)
-moz-transform: translateY(0%)

@keyframes bounce
0%
-webkit-transform: scaleY(0.6) translateY(50%)
-moz-transform: scaleY(0.6) translateY(50%)
50%
-webkit-transform: scaleY(1.02) translateY(-10%)
-moz-transform: scaleY(1.02) translateY(-10%)
100%
-webkit-transform: scaleY(0.7) translateY(40%)
-moz-transform: scaleY(0.7) translateY(40%)

.t path
animation: bounce .7s infinite alternate ease-in-out
Expand Down Expand Up @@ -55,6 +61,7 @@
left: 30%
transform-origin: 0 100%
-ms-transform-origin: 0 100%
-moz-transform-origin: 13px 100%
-webkit-transform-origin: 13px 100%
transform: scale(1.5)
// transform: translate(2200px, 6400px) scale(256)
Expand All @@ -63,6 +70,7 @@
path
transform-origin: 50% 100%
-ms-transform-origin: 50% 100%
-moz-transform-origin: 50% 100%
-webkit-transform-origin: 50% 100%
svg
path
Expand Down
10 changes: 5 additions & 5 deletions src/views/layout/main.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@
<svg class="shadow">
<defs>
<radialGradient r="0.5" cy="0.5" cx="0.5" id="shadow">
<stop stop-color="#323232" offset="0"/>
<stop stop-opacity="0" stop-color="#323232" offset="1"/>
<stop stop-color="#323232" offset="0"></stop>
<stop stop-opacity="0" stop-color="#323232" offset="1"></stop>
</radialGradient>
</defs>
<ellipse class="shadow" opacity="0.2" ry="6" rx="35" id="svg_1" cy="65" cx="90" stroke-linecap="null" stroke-linejoin="null" stroke-width="0" stroke="#323232" fill="url(#shadow)"/>
<ellipse class="shadow" opacity="0.2" ry="6" rx="35" id="svg_1" cy="65" cx="90" stroke-linecap="null" stroke-linejoin="null" stroke-width="0" stroke="#323232" fill="url(#shadow)"></ellipse>
</svg>
</div>
<div class="test-wrapper">
<svg id="t" class="t" style="width: 140px; height: 75px;" viewBox="0 0 288.9 70.1" preserveAspectRatio="xMidYMid meet">
<g id="g" style="width: 100%; height: 100%;">
<path class="s1" d="M28.5,28.4c-0.1,1.6-0.7,3.4-1.6,5.4c-2.4-0.3-4.6-0.4-6.8-0.4h-1.7c-2.9,13.9-4.3,22.6-4.3,26.1 c0,1.8,0.4,2.7,1.2,2.7c0.8,0,2.9-0.8,6.2-2.3l1.7,3.1C17.7,67.7,12.5,70,7.8,70c-2.2,0-4-0.7-5.4-2.1c-1.4-1.4-2.1-3.2-2.1-5.5 c0-2.3,0.3-4.9,0.8-7.7c0.5-2.9,1.3-6.4,2.2-10.6c0.9-4.2,1.6-7.5,2.1-10.1c-2.3,0.2-4,0.4-5.2,0.6c-0.1-0.8-0.2-1.8-0.2-3 c0-1.3,0.1-2.3,0.3-3.1h5.9c0.5-3.4,0.8-6.6,0.8-9.6L6.8,16v-0.3c4.9-1.7,9.5-2.5,13.8-2.5c0.2,1.3,0.4,2.8,0.4,4.7 c0,1.9-0.5,5.4-1.6,10.6H28.5z" />
<circle class="s1" cx="35.9" cy="82" r="4" />
<path class="s1" d="M28.5,28.4c-0.1,1.6-0.7,3.4-1.6,5.4c-2.4-0.3-4.6-0.4-6.8-0.4h-1.7c-2.9,13.9-4.3,22.6-4.3,26.1 c0,1.8,0.4,2.7,1.2,2.7c0.8,0,2.9-0.8,6.2-2.3l1.7,3.1C17.7,67.7,12.5,70,7.8,70c-2.2,0-4-0.7-5.4-2.1c-1.4-1.4-2.1-3.2-2.1-5.5 c0-2.3,0.3-4.9,0.8-7.7c0.5-2.9,1.3-6.4,2.2-10.6c0.9-4.2,1.6-7.5,2.1-10.1c-2.3,0.2-4,0.4-5.2,0.6c-0.1-0.8-0.2-1.8-0.2-3 c0-1.3,0.1-2.3,0.3-3.1h5.9c0.5-3.4,0.8-6.6,0.8-9.6L6.8,16v-0.3c4.9-1.7,9.5-2.5,13.8-2.5c0.2,1.3,0.4,2.8,0.4,4.7 c0,1.9-0.5,5.4-1.6,10.6H28.5z"></path>
<circle class="s1" cx="35.9" cy="82" r="4" ></circle>
</g>
</svg>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/views/partials/nav.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</a>

<ul id="side-nav-accordion-reports" class="side-nav-sub side-nav-accordion">
<li {{#is subnav 'reports-overview'}} class='active' {{/is}}><a href="/reports/overview"><i class="fa fa-th fa-sub-icon"></i><span>Overview</span></a></li>
<!--<li {{#is subnav 'reports-overview'}} class='active' {{/is}}><a href="/reports/overview"><i class="fa fa-th fa-sub-icon"></i><span>Overview</span></a></li>-->
<li {{#is subnav 'reports-generate'}} class='active' {{/is}}><a href="/reports/generate"><i class="fa fa-cogs fa-sub-icon"></i><span>Generate</span></a></li>
<hr/>
<!--<li {{#is subnav 'reports-breakdown'}} class="active" {{/is}}><a href="/reports/breakdown">< i class="material-icons fa-sub-icon fa-sub-icon">note_add</i>Create</a></li>-->
Expand Down
2 changes: 1 addition & 1 deletion src/views/plugins.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<i class="material-icons search-icon" style="color: #ccc !important; top: 13px;">search</i>
</div>
</div>
<hr class="nomargin-top">
<hr class="nomargin-top clear">
<div class="panel-body2">
<div id="plugin_list" class="">
<table id="plugin_list_table" class="uk-table uk-table-hover uk-table-striped cursor-pointer">
Expand Down
6 changes: 3 additions & 3 deletions src/views/settings.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
</label>
</div>
</div>
<hr class="nomargin-top">
<hr class="nomargin-top clear">
<div class="panel-body2" style="padding: 20px 15px 15px 15px;">
<div class="uk-position-relative">
<div class="uk-margin-medium-bottom">
Expand Down Expand Up @@ -192,7 +192,7 @@
</label>
</div>
</div>
<hr class="nomargin-top">
<hr class="nomargin-top clear">
<div class="panel-body2" style="padding: 20px 15px 15px 15px;">
<div class="">
<div class="uk-margin-medium-bottom">
Expand Down Expand Up @@ -245,7 +245,7 @@
</label>
</div>
</div>
<hr class="nomargin-top">
<hr class="nomargin-top clear">
<div class="panel-body2" style="padding: 20px 15px 15px 15px;">
<div class="">
<div class="uk-margin-medium-bottom">
Expand Down
8 changes: 4 additions & 4 deletions src/views/subviews/profile.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<input type="hidden" name="_id" value="{{data.account._id}}" />
<input type="hidden" name="username" value="{{data.account.username}}" />
<div class="largeProfilePic cursor-pointer hoverEffect" style="position: absolute; left: 35px; top: 0;" ng-click="accountEditPic()">
<input id="profileImageInput" name="aProfile_{{data.account.username}}" type="file" value="{{data.account.image}}" class="hide" />
<input id="profileImageInput" name="aProfile_{{data.account.username}}" type="file" value="{{data.account.image}}" style="height: 0; width: 0; overflow: hidden; filter: 'alpha(opacity=0);'" />
{{#if data.account.image}}
<img id="profileImage" data-userid="{{data.account._id}}" src="/uploads/users/{{data.account.image}}" alt="{{data.account.username}}"/>
{{else}}
Expand Down Expand Up @@ -54,7 +54,7 @@
</label>
</div>
</div>
<hr class="nomargin-top">
<hr class="nomargin-top clear">
<div class="panel-body2" style="margin: 10px 7px 7px 7px;">
<div class="uk-margin-small-bottom">
<label for="tOTPKey" style="color:#727272;">Shared Key</label>
Expand All @@ -73,7 +73,7 @@
<div style="margin-left: 285px;">
<div class="profile-item-wrap uk-margin-medium-bottom">
<div class="panel trupanel nopadding no-hover-shadow uk-overflow-hidden" style="min-height: 60px; height: auto;">
<div class="left">
<div>
<h6 style="padding: 0 0 0 15px; margin: 15px 0 0 0; font-size: 16px; line-height: 14px;">User Information</h6>
<h5 style="padding: 0 0 10px 15px; margin: 2px 0 0 0; font-size: 12px;" class="uk-text-muted">
Your profile information.
Expand Down Expand Up @@ -129,7 +129,7 @@
ng-click="generateApiKey($event)">Generate Token
</button>
</div>
<hr class="nomargin-top">
<hr class="nomargin-top clear">
<div class="panel-body2" style="padding: 20px 15px 15px 15px">
<div class="uk-margin-medium-bottom">
<label for="aApiKey" style="color: #727272;">API Token</label>
Expand Down

0 comments on commit cf94f2c

Please sign in to comment.