lint compliance

pull/1/head
yflory 5 years ago
parent c2f26775d8
commit 448edbf972

@ -16,7 +16,7 @@
.cp-comment-form {
&:not(:last-child) {
&:not(:last-child) {
margin-bottom: 10px;
}
}

@ -22,10 +22,6 @@
},
init: function (editor) {
var pluginName = 'comment';
var Messages = CKEDITOR._commentsTranslations; // XXX
var targetWidget;
var styles = {};
var styleDef = {
element: 'comment',
@ -42,7 +38,7 @@
// Register the command.
var removeStyle = new CKEDITOR.style(styleDef, { 'uid': '' });
editor.addCommand('comment', {
exec: function (editor, data) {
exec: function (editor) {
if (editor.readOnly) { return; }
editor.focus();
@ -120,20 +116,21 @@
// Register the toolbar button.
// XXX Uncomment selection, remove on prod, only used for dev
editor.ui.addButton && editor.ui.addButton('UnComment', {
label: 'UNCOMMENT',
command: 'uncomment',
toolbar: 'insert,10'
});
editor.ui.addButton && editor.ui.addButton('Comment', {
label: 'COMMENT',
command: pluginName,
icon : '/pad/icons/comment.png',
toolbar: 'insert,10'
});
},
afterInit: function (editor) {
editor.plugins.comments.removeComment = function () {};
if (editor.ui.addButton) {
editor.ui.addButton('UnComment', {
label: 'UNCOMMENT',
command: 'uncomment',
toolbar: 'insert,10'
});
}
if (editor.ui.addButton) {
editor.ui.addButton('Comment', {
label: 'COMMENT',
command: pluginName,
icon : '/pad/icons/comment.png',
toolbar: 'insert,10'
});
}
}
});

@ -104,8 +104,6 @@ define([
Messages.comments_submit
]);
var done = false;
$(submit).click(function (e) {
e.stopPropagation();
cb(textarea.value);
@ -414,7 +412,7 @@ sel.forEach(function (el) {
Env.$inner.focus();
if (!val) { return; }
if (!editor.getSelection().getSelectedText()) {
if (!Env.editor.getSelection().getSelectedText()) {
// text has been deleted by another user while we were typing our comment?
return void UI.warn(Messages.error);
}
@ -427,7 +425,7 @@ sel.forEach(function (el) {
u: myId,
t: +new Date(),
m: val,
v: canonicalize(editor.getSelection().getSelectedText())
v: canonicalize(Env.editor.getSelection().getSelectedText())
}]
};
updateMetadata(Env);
@ -436,7 +434,7 @@ sel.forEach(function (el) {
Env.framework.localChange();
});
Env.$container.prepend(form).show();;
Env.$container.prepend(form).show();
};
};

@ -486,7 +486,6 @@ define([
var metadataMgr = framework._.sfCommon.getMetadataMgr();
var privateData = metadataMgr.getPrivateData();
var userData = metadataMgr.getUserData();
var common = framework._.sfCommon;
var comments = Comments.create({

Loading…
Cancel
Save