Updated icons for conflicts

This commit is contained in:
benweet 2014-04-03 00:35:07 +01:00
parent b543e85779
commit e9fe7014b8
22 changed files with 123 additions and 64 deletions

View File

@ -85,15 +85,29 @@ define([
var removeDiff = [-1, '']; var removeDiff = [-1, ''];
var addDiff = [1, '']; var addDiff = [1, ''];
var distance = 20; var distance = 20;
function pushDiff() {
var separator = '///';
if(removeDiff[1]) {
removeDiff[1] = '///' + removeDiff[1] + separator;
separator = '';
result.push(removeDiff);
}
if(addDiff[1]) {
addDiff[1] = separator + addDiff[1] + '///';
result.push(addDiff);
}
removeDiff = [-1, ''];
addDiff = [1, ''];
}
diffs.forEach(function(diff) { diffs.forEach(function(diff) {
var diffType = diff[0]; var diffType = diff[0];
var diffText = diff[1]; var diffText = diff[1];
if(diffType === 0) { if(diffType === 0) {
if(diffText.length > distance) { if(diffText.length > distance) {
if(removeDiff[1] || addDiff[1]) { if(removeDiff[1] || addDiff[1]) {
var match = /\S+/.exec(diffText); var match = /\s/.exec(diffText);
if(match) { if(match) {
var prefixOffset = match.index + match[0].length; var prefixOffset = match.index;
var prefix = diffText.substring(0, prefixOffset); var prefix = diffText.substring(0, prefixOffset);
diffText = diffText.substring(prefixOffset); diffText = diffText.substring(prefixOffset);
removeDiff[1] += prefix; removeDiff[1] += prefix;
@ -108,10 +122,7 @@ define([
var suffix = diffText.substring(suffixOffset); var suffix = diffText.substring(suffixOffset);
diffText = diffText.substring(0, suffixOffset); diffText = diffText.substring(0, suffixOffset);
if(diffText.length > distance) { if(diffText.length > distance) {
removeDiff[1] && result.push(removeDiff); pushDiff();
removeDiff = [-1, ''];
addDiff[1] && result.push(addDiff);
addDiff = [1, ''];
result.push([0, diffText]); result.push([0, diffText]);
} }
else { else {
@ -138,8 +149,7 @@ define([
result.push([0, addDiff[1]]); result.push([0, addDiff[1]]);
} }
else { else {
removeDiff[1] && result.push(removeDiff); pushDiff();
addDiff[1] && result.push(addDiff);
} }
return result; return result;
} }
@ -379,15 +389,15 @@ define([
eventMgr.onContentChanged(fileDesc, newContent); eventMgr.onContentChanged(fileDesc, newContent);
} }
if(discussionListChanged) { if(discussionListChanged) {
fileDesc.discussionList = remoteDiscussionList; fileDesc.discussionList = newDiscussionList;
var diff = jsonDiffPatch.diff(localDiscussionList, remoteDiscussionList); var diff = jsonDiffPatch.diff(localDiscussionList, newDiscussionList);
var commentsChanged = false; var commentsChanged = false;
_.each(diff, function(discussionDiff, discussionIndex) { _.each(diff, function(discussionDiff, discussionIndex) {
if(!_.isArray(discussionDiff)) { if(!_.isArray(discussionDiff)) {
commentsChanged = true; commentsChanged = true;
} }
else if(discussionDiff.length === 1) { else if(discussionDiff.length === 1) {
eventMgr.onDiscussionCreated(fileDesc, remoteDiscussionList[discussionIndex]); eventMgr.onDiscussionCreated(fileDesc, newDiscussionList[discussionIndex]);
} }
else { else {
eventMgr.onDiscussionRemoved(fileDesc, localDiscussionList[discussionIndex]); eventMgr.onDiscussionRemoved(fileDesc, localDiscussionList[discussionIndex]);

View File

@ -835,13 +835,25 @@ define([
}); });
} }
var entityMap = {
"&": "&",
"<": "&lt;",
"\u00a0": ' ',
};
function escape(str) {
return str.replace(/[&<\u00a0]/g, function(s) {
return entityMap[s];
});
}
function highlight(section) { function highlight(section) {
var text = section.text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\u00a0/g, ' '); var text = escape(section.text);
text = Prism.highlight(text, Prism.languages.md); text = Prism.highlight(text, Prism.languages.md);
var frontMatter = section.textWithFrontMatter.substring(0, section.textWithFrontMatter.length - section.text.length); var frontMatter = section.textWithFrontMatter.substring(0, section.textWithFrontMatter.length - section.text.length);
if(frontMatter.length) { if(frontMatter.length) {
// Front matter highlighting // Front matter highlighting
frontMatter = frontMatter.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\u00a0/g, ' '); frontMatter = escape(frontMatter);
frontMatter = frontMatter.replace(/\n/g, '<span class="token lf">\n</span>'); frontMatter = frontMatter.replace(/\n/g, '<span class="token lf">\n</span>');
text = '<span class="token md">' + frontMatter + '</span>' + text; text = '<span class="token md">' + frontMatter + '</span>' + text;
} }

View File

@ -20,7 +20,7 @@ define([
].join(''); ].join('');
var popoverTitleTmpl = [ var popoverTitleTmpl = [
'<span class="clearfix">', '<span class="clearfix">',
' <a href="#" class="action-remove-discussion pull-right<%= !type ? \'\': \' hide\' %>">', ' <a href="#" class="action-remove-discussion pull-right">',
' <i class="icon-trash"></i>', ' <i class="icon-trash"></i>',
' </a>', ' </a>',
' “<%- title %>”', ' “<%- title %>”',
@ -36,7 +36,7 @@ define([
function setCommentEltCoordinates(commentElt, y) { function setCommentEltCoordinates(commentElt, y) {
var lineIndex = Math.round(y / 10); var lineIndex = Math.round(y / 10);
var yOffset = -10; var yOffset = -10;
if(commentElt.className.indexOf(' icon-fork') !== -1) { if(commentElt.className.indexOf(' icon-split') !== -1) {
yOffset = -12; yOffset = -12;
} }
var top = (y + yOffset) + 'px'; var top = (y + yOffset) + 'px';
@ -103,6 +103,7 @@ define([
return !_.has(currentFileDesc.discussionList, discussionIndex); return !_.has(currentFileDesc.discussionList, discussionIndex);
}).forEach(function(commentElt) { }).forEach(function(commentElt) {
marginElt.removeChild(commentElt); marginElt.removeChild(commentElt);
delete commentEltMap[commentElt.discussionIndex];
}); });
// Move newCommentElt // Move newCommentElt
setCommentEltCoordinates(newCommentElt, cursorY); setCommentEltCoordinates(newCommentElt, cursorY);
@ -116,12 +117,10 @@ define([
var commentElt = crel('a', { var commentElt = crel('a', {
class: 'discussion' class: 'discussion'
}); });
var isReplied = !discussion.commentList || _.last(discussion.commentList).author != author;
commentElt.className += ' icon-quote-left' + (isReplied ? ' replied' : ' added');
if(discussion.type == 'conflict') { if(discussion.type == 'conflict') {
commentElt.className += ' icon-fork'; commentElt.className += ' icon-split';
}
else {
var isReplied = _.last(discussion.commentList).author != author;
commentElt.className += ' icon-quote-left' + (isReplied ? ' replied' : ' added');
} }
commentElt.discussionIndex = discussion.discussionIndex; commentElt.discussionIndex = discussion.discussionIndex;
var coordinates = inputElt.getOffsetCoordinates(discussion.selectionEnd); var coordinates = inputElt.getOffsetCoordinates(discussion.selectionEnd);
@ -207,17 +206,25 @@ define([
function getDiscussionComments() { function getDiscussionComments() {
var discussion = currentContext.getDiscussion(); var discussion = currentContext.getDiscussion();
var author = storage['author.name']; var author = storage['author.name'];
if(discussion.type == 'conflict') { var result = [];
return ''; if(discussion.commentList) {
} result = discussion.commentList.map(function(comment) {
return discussion.commentList.map(function(comment) { var commentAuthor = comment.author || 'Anonymous';
var commentAuthor = comment.author || 'Anonymous'; return _.template(commentTmpl, {
return _.template(commentTmpl, { author: commentAuthor,
author: commentAuthor, content: comment.content,
content: comment.content, reply: comment.author != author
reply: comment.author != author });
}); });
}).join(''); }
if(discussion.type == 'conflict') {
result.unshift(_.template(commentTmpl, {
author: 'StackEdit',
content: 'Multiple users have made conflicting modifications that you have to review.',
reply: true
}));
}
return result.join('');
} }
comments.onReady = function() { comments.onReady = function() {
@ -252,13 +259,11 @@ define([
} }
return _.template(popoverTitleTmpl, { return _.template(popoverTitleTmpl, {
title: title, title: title,
type: discussion.type
}); });
}, },
content: function() { content: function() {
var content = _.template(commentsPopoverContentHTML, { var content = _.template(commentsPopoverContentHTML, {
commentList: getDiscussionComments(), commentList: getDiscussionComments(),
type: currentContext.getDiscussion().type
}); });
return content; return content;
}, },
@ -335,6 +340,7 @@ define([
context.$contentInputElt.val(''); context.$contentInputElt.val('');
closeCurrentPopover(); closeCurrentPopover();
discussion.commentList = discussion.commentList || [];
discussion.commentList.push({ discussion.commentList.push({
author: author, author: author,
content: content content: content

Binary file not shown.

View File

@ -306,6 +306,7 @@
<glyph glyph-name="extinguisher" unicode="&#xe90b;" d="m286 743q0 14-11 25t-25 11t-25-11t-11-25t11-25t25-11t25 11t11 25z m500 18v-179q0-9-7-14q-4-4-11-4q-2 0-4 1l-250 53q-6 1-10 6t-4 12h-143v-57q62-13 103-62t40-114v-446q0-14-11-25t-25-11h-285q-15 0-26 11t-10 25v446q0 60 35 107t90 64v62h-18q-33 0-64-13t-51-30t-37-37t-23-30t-7-14q-10-19-32-19q-9 0-16 4q-13 6-18 20t2 28q3 5 8 14t21 30t34 39t47 37t61 30q-14 23-14 48q0 37 26 63t63 26t63-26t26-63q0-19-7-36h168q0 6 4 11t10 6l250 54q2 0 4 0q7 0 11-3q7-5 7-14z" horiz-adv-x="785.7" /> <glyph glyph-name="extinguisher" unicode="&#xe90b;" d="m286 743q0 14-11 25t-25 11t-25-11t-11-25t11-25t25-11t25 11t11 25z m500 18v-179q0-9-7-14q-4-4-11-4q-2 0-4 1l-250 53q-6 1-10 6t-4 12h-143v-57q62-13 103-62t40-114v-446q0-14-11-25t-25-11h-285q-15 0-26 11t-10 25v446q0 60 35 107t90 64v62h-18q-33 0-64-13t-51-30t-37-37t-23-30t-7-14q-10-19-32-19q-9 0-16 4q-13 6-18 20t2 28q3 5 8 14t21 30t34 39t47 37t61 30q-14 23-14 48q0 37 26 63t63 26t63-26t26-63q0-19-7-36h168q0 6 4 11t10 6l250 54q2 0 4 0q7 0 11-3q7-5 7-14z" horiz-adv-x="785.7" />
<glyph glyph-name="bullseye" unicode="&#xe90c;" d="m571 350q0-59-41-101t-101-42t-101 42t-42 101t42 101t101 42t101-42t41-101z m72 0q0 89-63 152t-151 62t-152-62t-63-152t63-151t152-63t151 63t63 151z m71 0q0-118-83-202t-202-84t-202 84t-84 202t84 202t202 84t202-84t83-202z m72 0q0 73-29 139t-76 114t-114 76t-138 28t-139-28t-114-76t-76-114t-29-139t29-139t76-113t114-77t139-28t138 28t114 77t76 113t29 139z m71 0q0-117-57-215t-156-156t-215-58t-216 58t-155 156t-58 215t58 215t155 156t216 58t215-58t156-156t57-215z" horiz-adv-x="857.1" /> <glyph glyph-name="bullseye" unicode="&#xe90c;" d="m571 350q0-59-41-101t-101-42t-101 42t-42 101t42 101t101 42t101-42t41-101z m72 0q0 89-63 152t-151 62t-152-62t-63-152t63-151t152-63t151 63t63 151z m71 0q0-118-83-202t-202-84t-202 84t-84 202t84 202t202 84t202-84t83-202z m72 0q0 73-29 139t-76 114t-114 76t-138 28t-139-28t-114-76t-76-114t-29-139t29-139t76-113t114-77t139-28t138 28t114 77t76 113t29 139z m71 0q0-117-57-215t-156-156t-215-58t-216 58t-155 156t-58 215t58 215t155 156t216 58t215-58t156-156t57-215z" horiz-adv-x="857.1" />
<glyph glyph-name="resize-full" unicode="&#xe90d;" d="m784 111l127 128l0-336l-335 0l128 130l-128 127l79 79z m-431 686l-129-127l128-127l-80-80l-126 128l-128-129l0 335l335 0z m0-637l-129-127l129-130l-335 0l0 336l128-128l128 128z m558 637l0-335l-127 129l-128-128l-79 80l127 127l-128 127l335 0z" horiz-adv-x="928" /> <glyph glyph-name="resize-full" unicode="&#xe90d;" d="m784 111l127 128l0-336l-335 0l128 130l-128 127l79 79z m-431 686l-129-127l128-127l-80-80l-126 128l-128-129l0 335l335 0z m0-637l-129-127l129-130l-335 0l0 336l128-128l128 128z m558 637l0-335l-127 129l-128-128l-79 80l127 127l-128 127l335 0z" horiz-adv-x="928" />
<glyph glyph-name="split" unicode="&#xe83d;" d="m576 797l112 0l0-108q0-115-82-197l-316-314q-44-45-48-106l111 0l-167-169l-168 169l113 0q6 111 80 185l316 314q49 50 49 118l0 108z m110-725l113 0l-167-169l-168 169l111 0q-4 61-48 106l-63 62l80 79l62-62q74-74 80-185z" horiz-adv-x="817" />
<glyph glyph-name="target" unicode="&#xe8a7;" d="m521 407l0 162q60-16 103-60t59-102l-162 0z m0-113l162 0q-16-59-59-103t-103-59l0 162z m-113 113l-162 0q16 59 59 102t103 60l0-162z m0-113l0-162q-60 16-103 59t-59 103l162 0z m113 390l0 113q152-19 261-128t129-262l-113 0q-18 107-95 183t-182 94z m-390-277l-113 0q19 152 128 261t262 129l0-113q-106-18-182-94t-95-183z m277-390l0-114q-154 19-262 129t-128 262l113 0q18-107 95-183t182-94z m390 277l113 0q-21-153-129-262t-261-129l0 114q105 18 182 94t95 183z" horiz-adv-x="928" /> <glyph glyph-name="target" unicode="&#xe8a7;" d="m521 407l0 162q60-16 103-60t59-102l-162 0z m0-113l162 0q-16-59-59-103t-103-59l0 162z m-113 113l-162 0q16 59 59 102t103 60l0-162z m0-113l0-162q-60 16-103 59t-59 103l162 0z m113 390l0 113q152-19 261-128t129-262l-113 0q-18 107-95 183t-182 94z m-390-277l-113 0q19 152 128 261t262 129l0-113q-106-18-182-94t-95-183z m277-390l0-114q-154 19-262 129t-128 262l113 0q18-107 95-183t182-94z m390 277l113 0q-21-153-129-262t-261-129l0 114q105 18 182 94t95 183z" horiz-adv-x="928" />
<glyph glyph-name="layers" unicode="&#xe829;" d="m18 183l446-112l447 112l0-112l-447-112l-446 112l0 112z m0 223l446-112l447 112l0-112l-447-111l-446 111l0 112z m0 223l446 112l447-112l0-111l-447-112l-446 112l0 111z" horiz-adv-x="928" /> <glyph glyph-name="layers" unicode="&#xe829;" d="m18 183l446-112l447 112l0-112l-447-112l-446 112l0 112z m0 223l446-112l447 112l0-112l-447-111l-446 111l0 112z m0 223l446 112l447-112l0-111l-447-112l-446 112l0 111z" horiz-adv-x="928" />
<glyph glyph-name="chart-bar" unicode="&#xe90f;" d="m688-97l0 894l223 0l0-894l-223 0z m-335 0l0 671l223 0l0-671l-223 0z m-335 0l0 448l223 0l0-448l-223 0z" horiz-adv-x="928" /> <glyph glyph-name="chart-bar" unicode="&#xe90f;" d="m688-97l0 894l223 0l0-894l-223 0z m-335 0l0 671l223 0l0-671l-223 0z m-335 0l0 448l223 0l0-448l-223 0z" horiz-adv-x="928" />

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,5 @@
<div class="discussion-comment-list"><%= commentList %></div> <div class="discussion-comment-list"><%= commentList %></div>
<div class="new-comment-block<%= !type ? '': ' hide' %>"> <div class="new-comment-block">
<div class="form-group"> <div class="form-group">
<i class="icon-comment"></i> <input class="form-control input-comment-author" placeholder="Your name"></input> <i class="icon-comment"></i> <input class="form-control input-comment-author" placeholder="Your name"></input>
<textarea class="form-control input-comment-content"></textarea> <textarea class="form-control input-comment-content"></textarea>
@ -8,12 +8,6 @@
<button class="btn btn-primary action-add-comment">Add</button> <button class="btn btn-primary action-add-comment">Add</button>
</div> </div>
</div> </div>
<div class="conflict-review<%= type == 'conflict' ? '': ' hide' %>">
<p>Multiple users have made conflicting modifications that you have to review.</p>
<div class="form-group text-right">
<button class="btn btn-primary action-remove-discussion-confirm">Mark as resolved</button>
</div>
</div>
<div class="remove-discussion-confirm hide"> <div class="remove-discussion-confirm hide">
<br/> <br/>
<blockquote>Remove this discussion, really?</blockquote> <blockquote>Remove this discussion, really?</blockquote>

View File

@ -1806,6 +1806,12 @@
"code": 59661, "code": 59661,
"src": "iconic" "src": "iconic"
}, },
{
"uid": "09b87624e9d9a79109429ea81ed0d02d",
"css": "split",
"code": 59453,
"src": "iconic"
},
{ {
"uid": "74ae46b1527f71bad40a91762f4190ef", "uid": "74ae46b1527f71bad40a91762f4190ef",
"css": "target", "css": "target",

View File

@ -299,6 +299,7 @@
.icon-extinguisher:before { content: '\e90b'; } /* '' */ .icon-extinguisher:before { content: '\e90b'; } /* '' */
.icon-bullseye:before { content: '\e90c'; } /* '' */ .icon-bullseye:before { content: '\e90c'; } /* '' */
.icon-resize-full:before { content: '\e90d'; } /* '' */ .icon-resize-full:before { content: '\e90d'; } /* '' */
.icon-split:before { content: '\e83d'; } /* '' */
.icon-target:before { content: '\e8a7'; } /* '' */ .icon-target:before { content: '\e8a7'; } /* '' */
.icon-layers:before { content: '\e829'; } /* '' */ .icon-layers:before { content: '\e829'; } /* '' */
.icon-chart-bar:before { content: '\e90f'; } /* '' */ .icon-chart-bar:before { content: '\e90f'; } /* '' */

File diff suppressed because one or more lines are too long

View File

@ -299,6 +299,7 @@
.icon-extinguisher { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90b;&nbsp;'); } .icon-extinguisher { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90b;&nbsp;'); }
.icon-bullseye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90c;&nbsp;'); } .icon-bullseye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90c;&nbsp;'); }
.icon-resize-full { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90d;&nbsp;'); } .icon-resize-full { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90d;&nbsp;'); }
.icon-split { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe83d;&nbsp;'); }
.icon-target { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe8a7;&nbsp;'); } .icon-target { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe8a7;&nbsp;'); }
.icon-layers { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe829;&nbsp;'); } .icon-layers { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe829;&nbsp;'); }
.icon-chart-bar { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90f;&nbsp;'); } .icon-chart-bar { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90f;&nbsp;'); }

View File

@ -310,6 +310,7 @@
.icon-extinguisher { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90b;&nbsp;'); } .icon-extinguisher { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90b;&nbsp;'); }
.icon-bullseye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90c;&nbsp;'); } .icon-bullseye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90c;&nbsp;'); }
.icon-resize-full { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90d;&nbsp;'); } .icon-resize-full { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90d;&nbsp;'); }
.icon-split { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe83d;&nbsp;'); }
.icon-target { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe8a7;&nbsp;'); } .icon-target { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe8a7;&nbsp;'); }
.icon-layers { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe829;&nbsp;'); } .icon-layers { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe829;&nbsp;'); }
.icon-chart-bar { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90f;&nbsp;'); } .icon-chart-bar { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe90f;&nbsp;'); }

View File

@ -1,10 +1,10 @@
@font-face { @font-face {
font-family: 'fontello'; font-family: 'fontello';
src: url('../font/fontello.eot?85308033'); src: url('../font/fontello.eot?41376356');
src: url('../font/fontello.eot?85308033#iefix') format('embedded-opentype'), src: url('../font/fontello.eot?41376356#iefix') format('embedded-opentype'),
url('../font/fontello.woff?85308033') format('woff'), url('../font/fontello.woff?41376356') format('woff'),
url('../font/fontello.ttf?85308033') format('truetype'), url('../font/fontello.ttf?41376356') format('truetype'),
url('../font/fontello.svg?85308033#fontello') format('svg'); url('../font/fontello.svg?41376356#fontello') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@ -14,7 +14,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) { @media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face { @font-face {
font-family: 'fontello'; font-family: 'fontello';
src: url('../font/fontello.svg?85308033#fontello') format('svg'); src: url('../font/fontello.svg?41376356#fontello') format('svg');
} }
} }
*/ */
@ -350,6 +350,7 @@
.icon-extinguisher:before { content: '\e90b'; } /* '' */ .icon-extinguisher:before { content: '\e90b'; } /* '' */
.icon-bullseye:before { content: '\e90c'; } /* '' */ .icon-bullseye:before { content: '\e90c'; } /* '' */
.icon-resize-full:before { content: '\e90d'; } /* '' */ .icon-resize-full:before { content: '\e90d'; } /* '' */
.icon-split:before { content: '\e83d'; } /* '' */
.icon-target:before { content: '\e8a7'; } /* '' */ .icon-target:before { content: '\e8a7'; } /* '' */
.icon-layers:before { content: '\e829'; } /* '' */ .icon-layers:before { content: '\e829'; } /* '' */
.icon-chart-bar:before { content: '\e90f'; } /* '' */ .icon-chart-bar:before { content: '\e90f'; } /* '' */

View File

@ -711,27 +711,30 @@ body {
<div title="Code: 0xe90d" class="the-icons span3"><i class="icon-resize-full"></i> <span class="i-name">icon-resize-full</span><span class="i-code">0xe90d</span></div> <div title="Code: 0xe90d" class="the-icons span3"><i class="icon-resize-full"></i> <span class="i-name">icon-resize-full</span><span class="i-code">0xe90d</span></div>
</div> </div>
<div class="row"> <div class="row">
<div title="Code: 0xe83d" class="the-icons span3"><i class="icon-split"></i> <span class="i-name">icon-split</span><span class="i-code">0xe83d</span></div>
<div title="Code: 0xe8a7" class="the-icons span3"><i class="icon-target"></i> <span class="i-name">icon-target</span><span class="i-code">0xe8a7</span></div> <div title="Code: 0xe8a7" class="the-icons span3"><i class="icon-target"></i> <span class="i-name">icon-target</span><span class="i-code">0xe8a7</span></div>
<div title="Code: 0xe829" class="the-icons span3"><i class="icon-layers"></i> <span class="i-name">icon-layers</span><span class="i-code">0xe829</span></div> <div title="Code: 0xe829" class="the-icons span3"><i class="icon-layers"></i> <span class="i-name">icon-layers</span><span class="i-code">0xe829</span></div>
<div title="Code: 0xe90f" class="the-icons span3"><i class="icon-chart-bar"></i> <span class="i-name">icon-chart-bar</span><span class="i-code">0xe90f</span></div> <div title="Code: 0xe90f" class="the-icons span3"><i class="icon-chart-bar"></i> <span class="i-name">icon-chart-bar</span><span class="i-code">0xe90f</span></div>
<div title="Code: 0xe913" class="the-icons span3"><i class="icon-link"></i> <span class="i-name">icon-link</span><span class="i-code">0xe913</span></div>
</div> </div>
<div class="row"> <div class="row">
<div title="Code: 0xe913" class="the-icons span3"><i class="icon-link"></i> <span class="i-name">icon-link</span><span class="i-code">0xe913</span></div>
<div title="Code: 0xe822" class="the-icons span3"><i class="icon-download"></i> <span class="i-name">icon-download</span><span class="i-code">0xe822</span></div> <div title="Code: 0xe822" class="the-icons span3"><i class="icon-download"></i> <span class="i-name">icon-download</span><span class="i-code">0xe822</span></div>
<div title="Code: 0xe827" class="the-icons span3"><i class="icon-upload"></i> <span class="i-name">icon-upload</span><span class="i-code">0xe827</span></div> <div title="Code: 0xe827" class="the-icons span3"><i class="icon-upload"></i> <span class="i-name">icon-upload</span><span class="i-code">0xe827</span></div>
<div title="Code: 0xe910" class="the-icons span3"><i class="icon-download-cloud"></i> <span class="i-name">icon-download-cloud</span><span class="i-code">0xe910</span></div> <div title="Code: 0xe910" class="the-icons span3"><i class="icon-download-cloud"></i> <span class="i-name">icon-download-cloud</span><span class="i-code">0xe910</span></div>
<div title="Code: 0xe911" class="the-icons span3"><i class="icon-upload-cloud"></i> <span class="i-name">icon-upload-cloud</span><span class="i-code">0xe911</span></div>
</div> </div>
<div class="row"> <div class="row">
<div title="Code: 0xe911" class="the-icons span3"><i class="icon-upload-cloud"></i> <span class="i-name">icon-upload-cloud</span><span class="i-code">0xe911</span></div>
<div title="Code: 0xe912" class="the-icons span3"><i class="icon-share"></i> <span class="i-name">icon-share</span><span class="i-code">0xe912</span></div> <div title="Code: 0xe912" class="the-icons span3"><i class="icon-share"></i> <span class="i-name">icon-share</span><span class="i-code">0xe912</span></div>
<div title="Code: 0xe841" class="the-icons span3"><i class="icon-hdd"></i> <span class="i-name">icon-hdd</span><span class="i-code">0xe841</span></div> <div title="Code: 0xe841" class="the-icons span3"><i class="icon-hdd"></i> <span class="i-name">icon-hdd</span><span class="i-code">0xe841</span></div>
<div title="Code: 0xe89f" class="the-icons span3"><i class="icon-trash"></i> <span class="i-name">icon-trash</span><span class="i-code">0xe89f</span></div> <div title="Code: 0xe89f" class="the-icons span3"><i class="icon-trash"></i> <span class="i-name">icon-trash</span><span class="i-code">0xe89f</span></div>
<div title="Code: 0xe8d7" class="the-icons span3"><i class="icon-folder"></i> <span class="i-name">icon-folder</span><span class="i-code">0xe8d7</span></div>
</div> </div>
<div class="row"> <div class="row">
<div title="Code: 0xe8d7" class="the-icons span3"><i class="icon-folder"></i> <span class="i-name">icon-folder</span><span class="i-code">0xe8d7</span></div>
<div title="Code: 0xe844" class="the-icons span3"><i class="icon-code"></i> <span class="i-name">icon-code</span><span class="i-code">0xe844</span></div> <div title="Code: 0xe844" class="the-icons span3"><i class="icon-code"></i> <span class="i-name">icon-code</span><span class="i-code">0xe844</span></div>
<div title="Code: 0xe83b" class="the-icons span3"><i class="icon-comment"></i> <span class="i-name">icon-comment</span><span class="i-code">0xe83b</span></div> <div title="Code: 0xe83b" class="the-icons span3"><i class="icon-comment"></i> <span class="i-name">icon-comment</span><span class="i-code">0xe83b</span></div>
<div title="Code: 0xe81e" class="the-icons span3"><i class="icon-folder-open"></i> <span class="i-name">icon-folder-open</span><span class="i-code">0xe81e</span></div> <div title="Code: 0xe81e" class="the-icons span3"><i class="icon-folder-open"></i> <span class="i-name">icon-folder-open</span><span class="i-code">0xe81e</span></div>
</div>
<div class="row">
<div title="Code: 0xe891" class="the-icons span3"><i class="icon-left-circled"></i> <span class="i-name">icon-left-circled</span><span class="i-code">0xe891</span></div> <div title="Code: 0xe891" class="the-icons span3"><i class="icon-left-circled"></i> <span class="i-name">icon-left-circled</span><span class="i-code">0xe891</span></div>
</div> </div>
</div> </div>

View File

@ -306,6 +306,7 @@
<glyph glyph-name="extinguisher" unicode="&#xe90b;" d="m286 743q0 14-11 25t-25 11t-25-11t-11-25t11-25t25-11t25 11t11 25z m500 18v-179q0-9-7-14q-4-4-11-4q-2 0-4 1l-250 53q-6 1-10 6t-4 12h-143v-57q62-13 103-62t40-114v-446q0-14-11-25t-25-11h-285q-15 0-26 11t-10 25v446q0 60 35 107t90 64v62h-18q-33 0-64-13t-51-30t-37-37t-23-30t-7-14q-10-19-32-19q-9 0-16 4q-13 6-18 20t2 28q3 5 8 14t21 30t34 39t47 37t61 30q-14 23-14 48q0 37 26 63t63 26t63-26t26-63q0-19-7-36h168q0 6 4 11t10 6l250 54q2 0 4 0q7 0 11-3q7-5 7-14z" horiz-adv-x="785.7" /> <glyph glyph-name="extinguisher" unicode="&#xe90b;" d="m286 743q0 14-11 25t-25 11t-25-11t-11-25t11-25t25-11t25 11t11 25z m500 18v-179q0-9-7-14q-4-4-11-4q-2 0-4 1l-250 53q-6 1-10 6t-4 12h-143v-57q62-13 103-62t40-114v-446q0-14-11-25t-25-11h-285q-15 0-26 11t-10 25v446q0 60 35 107t90 64v62h-18q-33 0-64-13t-51-30t-37-37t-23-30t-7-14q-10-19-32-19q-9 0-16 4q-13 6-18 20t2 28q3 5 8 14t21 30t34 39t47 37t61 30q-14 23-14 48q0 37 26 63t63 26t63-26t26-63q0-19-7-36h168q0 6 4 11t10 6l250 54q2 0 4 0q7 0 11-3q7-5 7-14z" horiz-adv-x="785.7" />
<glyph glyph-name="bullseye" unicode="&#xe90c;" d="m571 350q0-59-41-101t-101-42t-101 42t-42 101t42 101t101 42t101-42t41-101z m72 0q0 89-63 152t-151 62t-152-62t-63-152t63-151t152-63t151 63t63 151z m71 0q0-118-83-202t-202-84t-202 84t-84 202t84 202t202 84t202-84t83-202z m72 0q0 73-29 139t-76 114t-114 76t-138 28t-139-28t-114-76t-76-114t-29-139t29-139t76-113t114-77t139-28t138 28t114 77t76 113t29 139z m71 0q0-117-57-215t-156-156t-215-58t-216 58t-155 156t-58 215t58 215t155 156t216 58t215-58t156-156t57-215z" horiz-adv-x="857.1" /> <glyph glyph-name="bullseye" unicode="&#xe90c;" d="m571 350q0-59-41-101t-101-42t-101 42t-42 101t42 101t101 42t101-42t41-101z m72 0q0 89-63 152t-151 62t-152-62t-63-152t63-151t152-63t151 63t63 151z m71 0q0-118-83-202t-202-84t-202 84t-84 202t84 202t202 84t202-84t83-202z m72 0q0 73-29 139t-76 114t-114 76t-138 28t-139-28t-114-76t-76-114t-29-139t29-139t76-113t114-77t139-28t138 28t114 77t76 113t29 139z m71 0q0-117-57-215t-156-156t-215-58t-216 58t-155 156t-58 215t58 215t155 156t216 58t215-58t156-156t57-215z" horiz-adv-x="857.1" />
<glyph glyph-name="resize-full" unicode="&#xe90d;" d="m784 111l127 128l0-336l-335 0l128 130l-128 127l79 79z m-431 686l-129-127l128-127l-80-80l-126 128l-128-129l0 335l335 0z m0-637l-129-127l129-130l-335 0l0 336l128-128l128 128z m558 637l0-335l-127 129l-128-128l-79 80l127 127l-128 127l335 0z" horiz-adv-x="928" /> <glyph glyph-name="resize-full" unicode="&#xe90d;" d="m784 111l127 128l0-336l-335 0l128 130l-128 127l79 79z m-431 686l-129-127l128-127l-80-80l-126 128l-128-129l0 335l335 0z m0-637l-129-127l129-130l-335 0l0 336l128-128l128 128z m558 637l0-335l-127 129l-128-128l-79 80l127 127l-128 127l335 0z" horiz-adv-x="928" />
<glyph glyph-name="split" unicode="&#xe83d;" d="m576 797l112 0l0-108q0-115-82-197l-316-314q-44-45-48-106l111 0l-167-169l-168 169l113 0q6 111 80 185l316 314q49 50 49 118l0 108z m110-725l113 0l-167-169l-168 169l111 0q-4 61-48 106l-63 62l80 79l62-62q74-74 80-185z" horiz-adv-x="817" />
<glyph glyph-name="target" unicode="&#xe8a7;" d="m521 407l0 162q60-16 103-60t59-102l-162 0z m0-113l162 0q-16-59-59-103t-103-59l0 162z m-113 113l-162 0q16 59 59 102t103 60l0-162z m0-113l0-162q-60 16-103 59t-59 103l162 0z m113 390l0 113q152-19 261-128t129-262l-113 0q-18 107-95 183t-182 94z m-390-277l-113 0q19 152 128 261t262 129l0-113q-106-18-182-94t-95-183z m277-390l0-114q-154 19-262 129t-128 262l113 0q18-107 95-183t182-94z m390 277l113 0q-21-153-129-262t-261-129l0 114q105 18 182 94t95 183z" horiz-adv-x="928" /> <glyph glyph-name="target" unicode="&#xe8a7;" d="m521 407l0 162q60-16 103-60t59-102l-162 0z m0-113l162 0q-16-59-59-103t-103-59l0 162z m-113 113l-162 0q16 59 59 102t103 60l0-162z m0-113l0-162q-60 16-103 59t-59 103l162 0z m113 390l0 113q152-19 261-128t129-262l-113 0q-18 107-95 183t-182 94z m-390-277l-113 0q19 152 128 261t262 129l0-113q-106-18-182-94t-95-183z m277-390l0-114q-154 19-262 129t-128 262l113 0q18-107 95-183t182-94z m390 277l113 0q-21-153-129-262t-261-129l0 114q105 18 182 94t95 183z" horiz-adv-x="928" />
<glyph glyph-name="layers" unicode="&#xe829;" d="m18 183l446-112l447 112l0-112l-447-112l-446 112l0 112z m0 223l446-112l447 112l0-112l-447-111l-446 111l0 112z m0 223l446 112l447-112l0-111l-447-112l-446 112l0 111z" horiz-adv-x="928" /> <glyph glyph-name="layers" unicode="&#xe829;" d="m18 183l446-112l447 112l0-112l-447-112l-446 112l0 112z m0 223l446-112l447 112l0-112l-447-111l-446 111l0 112z m0 223l446 112l447-112l0-111l-447-112l-446 112l0 111z" horiz-adv-x="928" />
<glyph glyph-name="chart-bar" unicode="&#xe90f;" d="m688-97l0 894l223 0l0-894l-223 0z m-335 0l0 671l223 0l0-671l-223 0z m-335 0l0 448l223 0l0-448l-223 0z" horiz-adv-x="928" /> <glyph glyph-name="chart-bar" unicode="&#xe90f;" d="m688-97l0 894l223 0l0-894l-223 0z m-335 0l0 671l223 0l0-671l-223 0z m-335 0l0 448l223 0l0-448l-223 0z" horiz-adv-x="928" />

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 140 KiB

View File

@ -250,6 +250,7 @@ Prism.languages.md = (function() {
strong: md.strong, strong: md.strong,
em: md.em, em: md.em,
strike: md.strike, strike: md.strike,
conflict: /\/\/\//g,
comment: Prism.languages.markup.comment, comment: Prism.languages.markup.comment,
tag: Prism.languages.markup.tag, tag: Prism.languages.markup.tag,
entity: Prism.languages.markup.entity entity: Prism.languages.markup.entity
@ -269,6 +270,7 @@ Prism.languages.md = (function() {
fn: md.fn, fn: md.fn,
link: md.link, link: md.link,
linkref: md.linkref, linkref: md.linkref,
conflict: /\/\/\//g,
}; };
md.strong.inside.rest = rest; md.strong.inside.rest = rest;
md.em.inside.rest = rest; md.em.inside.rest = rest;
@ -279,6 +281,7 @@ Prism.languages.md = (function() {
strong: md.strong, strong: md.strong,
em: md.em, em: md.em,
strike: md.strike, strike: md.strike,
conflict: /\/\/\//g,
comment: Prism.languages.markup.comment, comment: Prism.languages.markup.comment,
tag: Prism.languages.markup.tag, tag: Prism.languages.markup.tag,
entity: Prism.languages.markup.entity entity: Prism.languages.markup.entity

View File

@ -1069,24 +1069,20 @@ a {
} }
} }
&.added { &.added {
color: fade(@label-warning-bg, 45%); color: fade(@label-warning-bg, 50%);
&:hover, &.active, &.active:hover { &:hover, &.active, &.active:hover {
color: fade(@label-warning-bg, 80%) !important; color: fade(@label-warning-bg, 80%) !important;
} }
} }
&.replied { &.replied {
color: fade(@label-danger-bg, 55%);
&:hover, &.active, &.active:hover {
color: fade(@label-danger-bg, 80%) !important;
}
}
&.icon-fork {
font-size: 22px;
color: fade(@label-danger-bg, 70%); color: fade(@label-danger-bg, 70%);
&:hover, &.active, &.active:hover { &:hover, &.active, &.active:hover {
color: @label-danger-bg !important; color: fade(@label-danger-bg, 100%) !important;
} }
} }
&.icon-split {
font-size: 22px;
}
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
&:hover, &.active { &:hover, &.active {
@ -1103,6 +1099,11 @@ a {
//border-radius: @border-radius-base; //border-radius: @border-radius-base;
} }
.conflict {
font-weight: bold;
color: @label-danger-bg;
}
.code, .code,
.pre { .pre {
color: @tertiary-color-darker; color: @tertiary-color-darker;

View File

@ -245,6 +245,23 @@ define([
}); });
}; };
var entityMap = {
"&": "&amp;",
"<": "&lt;",
//">": "&gt;",
'"': '&quot;',
"'": '&#39;',
"/": '&#x2F;',
"\u00a0": ' ',
};
// Escape HTML entities
utils.escape = function(str) {
return String(str).replace(/[&<"'\/\u00a0]/g, function(s) {
return entityMap[s];
});
};
// Export data on disk // Export data on disk
utils.saveAs = function(content, filename) { utils.saveAs = function(content, filename) {
if(saveAs !== undefined && !/constructor/i.test(window.HTMLElement) /* safari does not support saveAs */) { if(saveAs !== undefined && !/constructor/i.test(window.HTMLElement) /* safari does not support saveAs */) {