Commit ad8d2e16 authored by techird's avatar techird

fix long title issue

parent 504db664
This diff is collapsed.
{"version":3,"file":"social.css","sources":["social.less"],"names":[],"mappings":"AAAA;EACI,YAAA;EACA,YAAY,+DAAZ;;EACA,YAAY,gDAAgD,yBAAwB,yBAAwB,0BAA5G;;EACA,YAAY,kEAAZ;;EACA,YAAY,6DAAZ;;EACA,YAAY,8DAAZ;;EACA,YAAY,gEAAZ;;;AAGJ;EACI,mBAAA;EACA,kBAAA;;AACA,SAAC;EACG,SAAS,GAAT;EACA,cAAA;EACA,kBAAA;EACA,WAAA;EACA,SAAA;EACA,QAAA;EACA,SAAA;EACA,aAAA;EACA,qBAAA;EACA,sDAAA;;AAGA,SADH,OACI;AAAD,SADO,OACN;EACG,sDAAA;;AAKZ;EACI,oBAAoB,YAAY,iBAAhC;EACA,aAAA;EACA,qBAAA;EACA,sBAAA;EACA,eAAA;EACA,YAAA;EACA,eAAA;EACA,iBAAA;EACA,kBAAA;EACA,WAAA;EACA,qBAAA;EACA,YAAA;EACA,gBAAA;EACA,gBAAA;EA7CA,YAAA;EACA,YAAY,+DAAZ;;EACA,YAAY,gDAAgD,yBAAwB,yBAAwB,0BAA5G;;EACA,YAAY,kEAAZ;;EACA,YAAY,6DAAZ;;EACA,YAAY,8DAAZ;;EACA,YAAY,gEAAZ;;;AA2CA,MAAC;AAAQ,MAAC;EACN,mBAAA;;AAGJ,MAAC;AAAS,MAAC;EACP,mBAAA;EACA,8CAAA;;AAGJ,MAAC;EACG,eAAA;EACA,gBAAA;;AAIR,WAAW;EACP,gBAAA;EACA,gBAAA;;AAFJ,WAAW,mBAGP,KAAI;EACA,YAAA;EACA,WAAA;EACA,iBAAA;EACA,mBAAA;;AAPR,WAAW,mBASP,GAAE,WAAY;EACV,kBAAA;;AACA,WAXG,mBASP,GAAE,WAAY,EAET;EACG,SAAS,GAAT;EACA,cAAA;EACA,WAAA;EACA,YAAA;EACA,qEAAA;EACA,kBAAA;EACA,SAAA;EACA,QAAA;;AAn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AAA;EACA,YAAA;EACA,iBAAA;EACA,kBAAA;EACA,sBAAA;EACA,sBAAA;EACA,iBAAA;EACA,gBAAA;;AACA,aATJ,MASK;EACG,sBAAA;EACA,aAAA;;AA7BZ,aAiCI;AAjCJ,aAiCO;EACC,mBAAA;;AAlCR,aAqCI;EACI,qBAAA;EACA,SAAA;EACA,WAAA;EACA,YAAA;EACA,iBAAA;EACA,sBAAA;EAhNJ,YAAA;EACA,YAAY,+DAAZ;;EACA,YAAY,gDAAgD,yBAAwB,yBAAwB,0BAA5G;;EACA,YAAY,kEAAZ;;EACA,YAAY,6DAAZ;;EACA,YAAY,8DAAZ;;EACA,YAAY,gEAAZ;;;AAgNI,aAZJ,gBAYK;AAAQ,aAZb,gBAYc;EACN,mBAAA;;AAGJ,aAhBJ,gBAgBK;AAAS,aAhBd,gBAgBe;EACP,mBAAA;EACA,8CAAA;;AAvDZ,aA4DI;EACI,gBAAA"}
\ No newline at end of file
...@@ -86,7 +86,12 @@ $(function() { ...@@ -86,7 +86,12 @@ $(function() {
notice = (function() { notice = (function() {
return window.alert; return window.alert;
})(); })(),
wordLimit = function (word, limit) {
limit = limit || 15;
return word.length > limit ? (word.substr(0, limit - 3) + '...') : word;
};
start(); start();
...@@ -338,11 +343,11 @@ $(function() { ...@@ -338,11 +343,11 @@ $(function() {
if (!saved) { if (!saved) {
filename = '* ' + filename; filename = '* ' + filename;
} }
$title.text(filename); $title.text((filename));
} else if (currentAccount) { } else if (currentAccount) {
$title.text('* ' + minder.getMinderTitle()); $title.text(('* ' + minder.getMinderTitle()));
} else { } else {
$title.text(filename || minder.getMinderTitle()); $title.text((filename || minder.getMinderTitle()));
} }
document.title = [filename || minder.getMinderTitle(), titleSuffix].join(' - '); document.title = [filename || minder.getMinderTitle(), titleSuffix].join(' - ');
...@@ -895,7 +900,7 @@ $(function() { ...@@ -895,7 +900,7 @@ $(function() {
$draft_menu.append('<li disabled="disabled" class="current-draft kmui-combobox-item kmui-combobox-item-disabled kmui-combobox-checked">' + $draft_menu.append('<li disabled="disabled" class="current-draft kmui-combobox-item kmui-combobox-item-disabled kmui-combobox-checked">' +
'<span class="kmui-combobox-icon"></span>' + '<span class="kmui-combobox-icon"></span>' +
'<label class="kmui-combobox-item-label">' + '<label class="kmui-combobox-item-label">' +
'<span class="update-time">' + getFriendlyTimeSpan(+new Date(draft.update), +new Date()) + '</span>' + draft.name + '<span class="update-time">' + getFriendlyTimeSpan(+new Date(draft.update), +new Date()) + '</span>' + wordLimit(draft.name) +
'</label>' + '</label>' +
'</li>'); '</li>');
$draft_menu.append('<li class="kmui-divider"></li>'); $draft_menu.append('<li class="kmui-divider"></li>');
...@@ -907,7 +912,7 @@ $(function() { ...@@ -907,7 +912,7 @@ $(function() {
while (list.length) { while (list.length) {
draft = list.shift(); draft = list.shift();
$draft = $('<li class="draft-item">' + $draft = $('<li class="draft-item">' +
'<a href="#">' + '<span class="update-time">' + getFriendlyTimeSpan(+new Date(draft.update), +new Date()) + '</span>' + draft.name + '</a><a class="delete" title="删除该草稿"></a></li>'); '<a href="#">' + '<span class="update-time">' + getFriendlyTimeSpan(+new Date(draft.update), +new Date()) + '</span>' + wordLimit(draft.name) + '</a><a class="delete" title="删除该草稿"></a></li>');
$draft.data('draft-index', index++); $draft.data('draft-index', index++);
$draft.appendTo($draft_menu); $draft.appendTo($draft_menu);
} }
......
...@@ -69,7 +69,7 @@ button { ...@@ -69,7 +69,7 @@ button {
span.update-time { span.update-time {
float: right; float: right;
color: #CCC; color: #CCC;
margin-left: 20px; margin-left: 40px;
padding-right: 16px; padding-right: 16px;
} }
li.draft-item a { li.draft-item a {
......
...@@ -26,6 +26,10 @@ html, body, #kityminder, div.kmui-editor-body { ...@@ -26,6 +26,10 @@ html, body, #kityminder, div.kmui-editor-body {
text-align: center; text-align: center;
font-weight: 300; font-weight: 300;
font-size: 14px; font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-word;
white-space: nowrap;
} }
#panel { #panel {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment