"plugins/github/utils",\r
"plugins/github/commentbox",\r
"plugins/github/modalbox",\r
+ "plugins/github/commitbox",\r
"base64"\r
-], function($, UI, User, GithubAPI, Utils, CommentBox, ModalBox, Base64) {\r
+], function($, UI, User, GithubAPI, Utils, CommentBox, ModalBox, CommitBox, Base64) {\r
var UI = {\r
openedComments: 0, // currently edited comments count\r
user: false, // logged user\r
\r
// Attach edit button on each comment\r
attachCommentEvents: function() {\r
+ $("body").commitbox();\r
// Blocks without comment\r
$("span.noComment").each(function() {\r
//FIXME this should be done by nitdoc\r
}\r
\r
baseTextarea.commentbox();\r
+ baseTextarea.bind("commentbox_commit", function(event, data) {\r
+ $("body").commitbox("open", infos.namespace, infos.user, infos.isNew ? true : false)\r
+ //infos.message = $("#nitdoc-github-commit-message").val() + "\n\n" + infos.user.signedOff;\r
+ //UI.saveChanges(infos);\r
+ });\r
baseTextarea.bind("commentbox_preview", function(event, data) {\r
var converter = new Markdown.Converter()\r
var html = converter.makeHtml(data.value);\r