From ab0ff6ed280f3d88a506bd78e904a79ad36fb2c4 Mon Sep 17 00:00:00 2001 From: Eduardo Rey Jara Date: Thu, 3 May 2018 08:59:54 +0200 Subject: [PATCH] SAK-38096 - Cancel and Delete comment are hardcoded (#5560) * SAK-38096 - Cancel and Delete comment are hardcoded * Update messages.properties --- .../tool/src/resources/messages.properties | 1 + lessonbuilder/tool/src/webapp/js/comments.js | 16 +++++++++------- .../tool/src/webapp/templates/ShowPage.html | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lessonbuilder/tool/src/resources/messages.properties b/lessonbuilder/tool/src/resources/messages.properties index ccdcb1367723..a9b12734d6c8 100644 --- a/lessonbuilder/tool/src/resources/messages.properties +++ b/lessonbuilder/tool/src/resources/messages.properties @@ -138,6 +138,7 @@ simplepage.cancel_message=Cancel simplepage.continue_message=Continue simplepage.has_prerequistes=Before viewing page, you must complete the following pages: simplepage.has_prerequistes_2=You need to complete a previous item before doing this one. Return to this page to do it. Look for an item with an asterisk to the left of it. +simplepage.delete_comment=Delete Comment simplepage.resource=Add Content Links simplepage.resource.tooltip=Add links: Upload files, link to existing files in Resources or address of a page on the web. diff --git a/lessonbuilder/tool/src/webapp/js/comments.js b/lessonbuilder/tool/src/webapp/js/comments.js index b77b9dac58e8..c00583abb5ca 100644 --- a/lessonbuilder/tool/src/webapp/js/comments.js +++ b/lessonbuilder/tool/src/webapp/js/comments.js @@ -66,19 +66,21 @@ $(function() { width: 400, modal: false, resizable: false, - buttons: { - "Cancel": function() { + buttons:[{ + text: msg("simplepage.cancel_message"), + click: function() { if(originalDeleteDialogText !== null) { $("#delete-comment-confirm").text(originalDeleteDialogText); } - - $(this).dialog("close"); - }, - "Delete Comment": function() { + $(this).dialog("close"); + } + },{ + text: msg("simplepage.delete_comment"), + click: function() { deleteButton(); } - } + }] }); }); diff --git a/lessonbuilder/tool/src/webapp/templates/ShowPage.html b/lessonbuilder/tool/src/webapp/templates/ShowPage.html index dbbcd75ff822..2c7f437d2258 100644 --- a/lessonbuilder/tool/src/webapp/templates/ShowPage.html +++ b/lessonbuilder/tool/src/webapp/templates/ShowPage.html @@ -1063,6 +1063,7 @@

+