Commit 2f06f5f3 by Awais Committed by Awais Qureshi

Making some modifications in tinymce buttons.

Changes labes and alignments.

ECOM-7854
parent 577881f8
...@@ -3,11 +3,13 @@ $(document).ready(function () { ...@@ -3,11 +3,13 @@ $(document).ready(function () {
var dmp = new diff_match_patch(); var dmp = new diff_match_patch();
dmp.Diff_EditCost = 8; dmp.Diff_EditCost = 8;
var tool_bar = 'undo redo | bold italic underline | bullist numlist | link anchor';
var tinymceConfig = { var tinymceConfig = {
plugins: [ plugins: [
'link lists charactercount paste' 'link lists charactercount paste'
], ],
toolbar: 'showdiff Accept Reject | undo redo | styleselect | bold italic | bullist numlist outdent indent | link anchor', toolbar: tool_bar,
menubar: false, menubar: false,
statusbar: true, statusbar: true,
paste_remove_spans: true, paste_remove_spans: true,
...@@ -18,8 +20,9 @@ $(document).ready(function () { ...@@ -18,8 +20,9 @@ $(document).ready(function () {
forced_root_block: false, forced_root_block: false,
setup: function (editor) { setup: function (editor) {
editor.addButton('showdiff', { editor.addButton('showdiff', {
text: 'ShowDiff', text: 'View Changes',
icon: false, icon: false,
classes: 'history-changes',
onclick: function () { onclick: function () {
...@@ -44,6 +47,7 @@ $(document).ready(function () { ...@@ -44,6 +47,7 @@ $(document).ready(function () {
editor.addButton('Accept', { editor.addButton('Accept', {
text: 'Accept All', text: 'Accept All',
icon: false, icon: false,
classes: 'history-changes',
onclick: function () { onclick: function () {
editor.focus(); editor.focus();
if ($('#id_history_revision').val()) { if ($('#id_history_revision').val()) {
...@@ -57,6 +61,7 @@ $(document).ready(function () { ...@@ -57,6 +61,7 @@ $(document).ready(function () {
editor.addButton('Reject', { editor.addButton('Reject', {
text: 'Reject All', text: 'Reject All',
icon: false, icon: false,
classes: 'history-changes',
onclick: function () { onclick: function () {
editor.focus(); editor.focus();
if ($('#id_history_revision').val()) { if ($('#id_history_revision').val()) {
...@@ -75,11 +80,17 @@ $(document).ready(function () { ...@@ -75,11 +80,17 @@ $(document).ready(function () {
} }
}; };
// if has a history object then load the accept all button. with 2 different rows.
if ($('#id_history_revision').val()) {
tinymceConfig["toolbar1"] = "showdiff Accept Reject | ";
tinymceConfig["toolbar2"] = tool_bar;
}
tinymceConfig["selector"] = "textarea"; tinymceConfig["selector"] = "textarea";
tinymce.init(tinymceConfig); tinymce.init(tinymceConfig);
tinymceConfig["selector"] = "#id_title"; tinymceConfig["selector"] = "#id_title";
tinymceConfig["toolbar"] = "showdiff Accept Reject";
tinymce.init(tinymceConfig); tinymce.init(tinymceConfig);
}); });
......
...@@ -129,3 +129,9 @@ $btn-filter-color: rgba(228, 228, 228, 1); ...@@ -129,3 +129,9 @@ $btn-filter-color: rgba(228, 228, 228, 1);
color: #F5F9FD; color: #F5F9FD;
font-size: 16px; font-size: 16px;
} }
.mce-history-changes button {
color: white !important;
border: solid 1px #454545;
background-color: #757575;
}
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