Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ui overhaul #2

Merged
merged 6 commits into from
Feb 12, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,989 changes: 246 additions & 1,743 deletions assets/assets.go

Large diffs are not rendered by default.

154 changes: 154 additions & 0 deletions assets/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
/*********/
/* Modal */
.modal-dialog {
margin-top: 65px;
}

/*******/
/* Nav */
.navbar .col-md-10 {
padding-left: 0;
}

.navbar-brand > img {
display: inline-block;
}

.navbar-form {
padding-left: 0;
}

/**************/
/* Search bar */
#search {
width: 500px;
}

/* http://stackoverflow.com/questions/18838964/add-bootstrap-glyphicon-to-input-box */
.left-inner-addon {
position: relative;
}

.left-inner-addon input {
padding-left: 30px;
}

.left-inner-addon .glyphicon {
color: #aaa;
position: absolute;
padding: 9px 10px;
pointer-events: none;
}

/***************/
/* Sidebar nav */
.nav-stacked {
margin-top: 10px;
}

.has-event-source {
color: green;
}

.no-event-source {
color: red;
}

/*******/
/* Jim */
.jim-well {
margin-top: 20px;
}

.jim-well h3 {
margin-top: 0;
}

.jim-config {
margin-top: 3px;
padding: 5px;
font-size: 0.9em;
}

.jim-config .jim-config-item {
margin-bottom: 2px;
}

/***********/
/* Toolbar */
.toolbar {
padding: 5px;
border-bottom: 1px solid #ccc;
}

.toolbar .btn {
padding-left: 20px;
padding-right: 20px;
}

.toolbar .spacer {
display: inline-block;
width: 20px;
}

.message-count {
padding-right: 10px;
}

/***********/
/* Content */
.content {
position: fixed;
right: 0;
height: 100%;
}

.mail-content {
margin-top: 20px;
}

.msglist-message {
border-bottom: 1px solid #ccc;
padding: 5px 0;
cursor: pointer;
}

.msglist-message .subject.unread {
color: #666;
font-weight: bold;
}

/***********/
/* Preview */
#preview-plain, #preview-source {
white-space: pre;
font-family: Courier New, Courier, System, fixed-width;
padding: 10px;
}

.preview .tab-content {
overflow-y: scroll;
}

.headers {
margin-top: 10px;
}

.headers tbody td {
width: 100%;
}

.headers tbody th {
white-space: nowrap;
text-align: right;
color: #666;
font-weight: normal;
}

.haeders table td, .headers table th {
padding: 2px 10px
}

.mime-part {
padding: 10px;
}
Binary file removed assets/images/ajax-loader.gif
Binary file not shown.
3 changes: 3 additions & 0 deletions assets/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ mailhogApp.controller('MailCtrl', function ($scope, $http, $sce, $timeout) {
}

$scope.getDisplayName = function(value) {
if(!value) { return ""; }

res = value.match(/(.*)\<(.*)\>/);

if(res) {
if(res[1].trim().length > 0) {
return res[1].trim();
Expand Down
2 changes: 2 additions & 0 deletions assets/js/strutil.js
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,8 @@ function isEmptyOrSequenceOfWhiteSpaces(str) {
// "=?UTF-8?B?*?= =?UTF-8?B?*?=" => ["=?UTF-8?B?*?=", "=?UTF-8?B?*?="]
// "=?UTF-8?B?*?=FOO" => ["=?UTF-8?B?*?=", "FOO"]
function splitMimeString(str) {
if(!str) { return []; }

var parts = [];
var current = "";
while (str != "") {
Expand Down
Loading