Fixed popup message styles (#278)

This commit is contained in:
RainLoop Team 2014-09-04 20:00:11 +04:00
parent 9bde3fe5dd
commit 542c46b654
6 changed files with 99 additions and 36 deletions

View file

@ -15,7 +15,7 @@
Consts = require('Consts'),
Globals = require('Globals')
;
Utils.trim = $.trim;
Utils.inArray = $.inArray;
Utils.isArray = _.isArray;
@ -1301,13 +1301,13 @@
oWin.document.open();
oWin.document.write('<html><head>' +
'<meta charset="utf-8" />' +
'<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />' +
'<meta name="viewport" content="user-scalable=no" />' +
'<meta name="apple-mobile-web-app-capable" content="yes" />' +
'<meta name="robots" content="noindex, nofollow, noodp" />' +
'<title>' + Utils.encodeHtml(sTitle) + '</title>' +
'</head><body><div id="rl-content"></div></body></html>');
'<meta charset="utf-8" />' +
'<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />' +
'<meta name="viewport" content="user-scalable=no" />' +
'<meta name="apple-mobile-web-app-capable" content="yes" />' +
'<meta name="robots" content="noindex, nofollow, noodp" />' +
'<title>' + Utils.encodeHtml(sTitle) + '</title>' +
'</head><body><div id="rl-content"></div></body></html>');
oWin.document.close();
oScript = oWin.document.createElement('script');

View file

@ -68,9 +68,9 @@
this.checked = ko.observable(false);
this.hasAttachments = ko.observable(false);
this.attachmentsMainType = ko.observable('');
this.moment = ko.observable(moment(moment.unix(0)));
this.attachmentIconClass = ko.computed(function () {
var sClass = '';
if (this.hasAttachments())
@ -825,6 +825,7 @@
'popupCc': this.ccToLine(false),
'popupBcc': this.bccToLine(false),
'popupSubject': this.subject(),
'popupIsHtml': this.isHtml(),
'popupDate': this.fullFormatDateValue(),
'popupAttachments': this.attachmentsToStringLine(),
'popupBody': this.textBodyToString()

View file

@ -1,20 +1,81 @@
<style>
html, body {
margin: 0;
padding: 0;
background-color: #fff;
font-size: 13px;
font-family: arial, sans-serif;
}
.tbl {width:100%;font-family:normal 11px Tahoma, Arial, Helvetica, "sans-serif"}
.tt {padding:5px;border:solid #ddd;border-width:0px 0px 1px 0px}
.tv {padding:5px;border:solid #ddd;border-width:0px 0px 1px 1px}
.tb {padding:15px}
.tbl {width: 100%; font-size: 12px; font-family: arial, sans-serif;}
.tt {padding: 5px; border:solid #ddd; border-width:0px 0px 1px 0px}
.tv {padding: 5px; border:solid #ddd; border-width:0px 0px 1px 1px}
.tb {padding: 15px}
a {color: blue; text-decoration: underline}
a:visited {color: #609}
a:active {color: red}
blockquote {border-left: 2px solid black; margin: 0; padding: 0px 10px}
pre {margin: 0px; padding: 0px; font-family: arial, sans-serif; background: #fff; border: none; white-space: normal}
pre {
margin: 0px;
padding: 0px;
font-family: Monaco, Menlo, Consolas, 'Courier New', monospace;
background: #fff;
border: none;
white-space: pre-wrap;
word-wrap: break-word;
word-break: break-all;
}
.text-body {
font-size: 13px;
}
.text-body.html div[data-x-div-type=body] {
margin: 15px;
}
.text-body.html pre {
font-family: Monaco, Menlo, Consolas, 'Courier New', monospace;
white-space: pre-wrap;
word-wrap: break-word;
word-break: break-all;
}
.text-body.plain {
padding: 15px;
white-space: pre-wrap;
font-family: Monaco, Menlo, Consolas, 'Courier New', monospace;
}
.text-body.plain pre {
margin: 0px;
padding: 0px;
background: #fff;
border: none;
font-family: Monaco, Menlo, Consolas, 'Courier New', monospace;
white-space: pre-wrap;
word-wrap: break-word;
word-break: break-all;
}
.text-body.plain blockquote {
border-left: 2px solid blue;
color: blue;
}
.text-body.plain blockquote blockquote {
border-left: 2px solid green;
color: green;
}
.text-body.plain blockquote blockquote blockquote {
border-left: 2px solid red;
color: red;
}
</style>
<table cellpadding="0" cellspacing="0" class="tbl">
@ -49,7 +110,7 @@ pre {margin: 0px; padding: 0px; font-family: arial, sans-serif; background: #fff
</tr>
<tr>
<td colspan="2" class="tb">
<div data-bind="html: popupBody"></div>
<div class="text-body" data-bind="html: popupBody, css: {'plain': !popupIsHtml, 'html': popupIsHtml}"></div>
</td>
</tr>
</tbody>

View file

@ -2056,7 +2056,7 @@
Consts = require('Consts'),
Globals = require('Globals')
;
Utils.trim = $.trim;
Utils.inArray = $.inArray;
Utils.isArray = _.isArray;
@ -3342,13 +3342,13 @@
oWin.document.open();
oWin.document.write('<html><head>' +
'<meta charset="utf-8" />' +
'<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />' +
'<meta name="viewport" content="user-scalable=no" />' +
'<meta name="apple-mobile-web-app-capable" content="yes" />' +
'<meta name="robots" content="noindex, nofollow, noodp" />' +
'<title>' + Utils.encodeHtml(sTitle) + '</title>' +
'</head><body><div id="rl-content"></div></body></html>');
'<meta charset="utf-8" />' +
'<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />' +
'<meta name="viewport" content="user-scalable=no" />' +
'<meta name="apple-mobile-web-app-capable" content="yes" />' +
'<meta name="robots" content="noindex, nofollow, noodp" />' +
'<title>' + Utils.encodeHtml(sTitle) + '</title>' +
'</head><body><div id="rl-content"></div></body></html>');
oWin.document.close();
oScript = oWin.document.createElement('script');

View file

@ -4450,7 +4450,7 @@
Consts = require('Consts'),
Globals = require('Globals')
;
Utils.trim = $.trim;
Utils.inArray = $.inArray;
Utils.isArray = _.isArray;
@ -5736,13 +5736,13 @@
oWin.document.open();
oWin.document.write('<html><head>' +
'<meta charset="utf-8" />' +
'<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />' +
'<meta name="viewport" content="user-scalable=no" />' +
'<meta name="apple-mobile-web-app-capable" content="yes" />' +
'<meta name="robots" content="noindex, nofollow, noodp" />' +
'<title>' + Utils.encodeHtml(sTitle) + '</title>' +
'</head><body><div id="rl-content"></div></body></html>');
'<meta charset="utf-8" />' +
'<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />' +
'<meta name="viewport" content="user-scalable=no" />' +
'<meta name="apple-mobile-web-app-capable" content="yes" />' +
'<meta name="robots" content="noindex, nofollow, noodp" />' +
'<title>' + Utils.encodeHtml(sTitle) + '</title>' +
'</head><body><div id="rl-content"></div></body></html>');
oWin.document.close();
oScript = oWin.document.createElement('script');
@ -9600,9 +9600,9 @@ module.exports = window;
this.checked = ko.observable(false);
this.hasAttachments = ko.observable(false);
this.attachmentsMainType = ko.observable('');
this.moment = ko.observable(moment(moment.unix(0)));
this.attachmentIconClass = ko.computed(function () {
var sClass = '';
if (this.hasAttachments())
@ -10357,6 +10357,7 @@ module.exports = window;
'popupCc': this.ccToLine(false),
'popupBcc': this.bccToLine(false),
'popupSubject': this.subject(),
'popupIsHtml': this.isHtml(),
'popupDate': this.fullFormatDateValue(),
'popupAttachments': this.attachmentsToStringLine(),
'popupBody': this.textBodyToString()

File diff suppressed because one or more lines are too long