mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 17:47:03 +00:00
Handle empty subject lines in bootstrap
This commit is contained in:
@@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
### Fixed
|
||||
- Shutdown hang in retention scanner
|
||||
- Display empty subject as `(No Subject)`
|
||||
|
||||
## [1.1.0-rc1] - 2016-03-04
|
||||
### Added
|
||||
|
||||
@@ -107,10 +107,17 @@ function onDocumentReady() {
|
||||
// Prevent search and resize handlers being called too often
|
||||
var searchDelay = makeDelay(200);
|
||||
var resizeDelay = makeDelay(100);
|
||||
$.addTemplateFormatter("DateFormatter",
|
||||
function(value, template) {
|
||||
return moment(value).calendar();
|
||||
});
|
||||
$.addTemplateFormatter({
|
||||
"date": function(value, template) {
|
||||
return moment(value).calendar();
|
||||
},
|
||||
"subject": function(value, template) {
|
||||
if (value == null || value.length == 0) {
|
||||
return "(No Subject)";
|
||||
}
|
||||
return value;
|
||||
}
|
||||
});
|
||||
$("#message-list").hide();
|
||||
onWindowResize();
|
||||
$(window).resize(function() {
|
||||
|
||||
@@ -15,9 +15,10 @@ $(document).ready(function() {
|
||||
<script type="text/html" id="list-entry-template">
|
||||
<button data-id="id" type="button" class="message-list-entry list-group-item">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 col-md-12 text-primary" data-content="subject"/>
|
||||
<div class="col-sm-4 col-md-12 text-primary" data-content="subject"
|
||||
data-format="subject"/>
|
||||
<div class="col-sm-4 col-md-12 small" data-content="from"/>
|
||||
<div class="col-sm-4 col-md-12 small" data-content="date" data-format="DateFormatter"/>
|
||||
<div class="col-sm-4 col-md-12 small" data-content="date" data-format="date"/>
|
||||
</div>
|
||||
</button>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user