fnp
/
fnpeditor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ef0f264
)
editor: comments wip - inserting information about author
author
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 27 May 2014 08:09:14 +0000
(10:09 +0200)
committer
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 28 May 2014 12:45:58 +0000
(14:45 +0200)
src/editor/modules/documentCanvas/canvas/canvas.js
patch
|
blob
|
history
src/editor/modules/documentCanvas/canvas/genericElement.js
patch
|
blob
|
history
src/editor/modules/documentCanvas/documentCanvas.js
patch
|
blob
|
history
diff --git
a/src/editor/modules/documentCanvas/canvas/canvas.js
b/src/editor/modules/documentCanvas/canvas/canvas.js
index
ab31ee1
..
8ca71ac
100644
(file)
--- a/
src/editor/modules/documentCanvas/canvas/canvas.js
+++ b/
src/editor/modules/documentCanvas/canvas/canvas.js
@@
-60,7
+60,8
@@
$.extend(TextHandler.prototype, {
});
});
-var Canvas = function(wlxmlDocument, elements) {
+var Canvas = function(wlxmlDocument, elements, metadata) {
+ this.metadata = metadata || {};
this.elementsRegister = new ElementsRegister(documentElement.DocumentNodeElement, nullElement);
elements = [
this.elementsRegister = new ElementsRegister(documentElement.DocumentNodeElement, nullElement);
elements = [
@@
-614,8
+615,8
@@
$.extend(Cursor.prototype, {
});
return {
});
return {
- fromXMLDocument: function(wlxmlDocument, elements) {
- return new Canvas(wlxmlDocument, elements);
+ fromXMLDocument: function(wlxmlDocument, elements
, metadata
) {
+ return new Canvas(wlxmlDocument, elements
, metadata
);
}
};
}
};
diff --git
a/src/editor/modules/documentCanvas/canvas/genericElement.js
b/src/editor/modules/documentCanvas/canvas/genericElement.js
index
d3debb2
..
878e140
100644
(file)
--- a/
src/editor/modules/documentCanvas/canvas/genericElement.js
+++ b/
src/editor/modules/documentCanvas/canvas/genericElement.js
@@
-33,7
+33,7
@@
$.extend(generic, {
}
}.bind(this));
}
}.bind(this));
- this.commentsView = new CommentsView(this.wlxmlNode,
{}
);
+ this.commentsView = new CommentsView(this.wlxmlNode,
this.canvas.metadata.user
);
this.addToGutter(this.commentsView);
this.commentTip = $('<div class="comment-tip"><i class="icon-comment"></i></div>');
this.addWidget(this.commentTip);
this.addToGutter(this.commentsView);
this.commentTip = $('<div class="comment-tip"><i class="icon-comment"></i></div>');
this.addWidget(this.commentTip);
diff --git
a/src/editor/modules/documentCanvas/documentCanvas.js
b/src/editor/modules/documentCanvas/documentCanvas.js
index
651788e
..
7e70f7f
100644
(file)
--- a/
src/editor/modules/documentCanvas/documentCanvas.js
+++ b/
src/editor/modules/documentCanvas/documentCanvas.js
@@
-20,7
+20,9
@@
return function(sandbox) {
canvasElements = canvasElements.concat(plugin.canvasElements || []);
});
canvasElements = canvasElements.concat(plugin.canvasElements || []);
});
- var canvas = canvas3.fromXMLDocument(null, canvasElements);
+ var canvas = canvas3.fromXMLDocument(null, canvasElements, {
+ user: sandbox.getConfig().user
+ });
var canvasWrapper = $(template);
var shownAlready = false;
var scrollbarPosition = 0,
var canvasWrapper = $(template);
var shownAlready = false;
var scrollbarPosition = 0,