Skip to content
Snippets Groups Projects
Commit 07f5e61f authored by juanf's avatar juanf
Browse files

Disable deletes and fix date format from comments widget (From Review Meeting)

SVN: 33748
parent bd8318af
No related branches found
No related tags found
No related merge requests found
...@@ -299,11 +299,22 @@ var Util = new function() { ...@@ -299,11 +299,22 @@ var Util = new function() {
// //
this.getFormatedDate = function(date) { this.getFormatedDate = function(date) {
var day = date.getDate(); var day = date.getDate();
if(day < 10) {
day = "0" + day;
}
var month = date.getMonth(); var month = date.getMonth();
if(month < 10) {
month = "0" + month;
}
var year = date.getFullYear(); var year = date.getFullYear();
var hour = date.getHours(); var hour = date.getHours();
if(hour < 10) {
hour = "0" + hour;
}
var minute = date.getMinutes(); var minute = date.getMinutes();
if(minute < 10) {
minute = "0" + minute;
}
return day + "/" + month + "/" + year + " " + hour + ":" + minute; return day + "/" + month + "/" + year + " " + hour + ":" + minute;
} }
......
...@@ -53,7 +53,13 @@ function CommentsView(commentsController, commentsModel) { ...@@ -53,7 +53,13 @@ function CommentsView(commentsController, commentsModel) {
$buttonDelete.append($("<span>", { "class" : "glyphicon glyphicon-minus-sign"})); $buttonDelete.append($("<span>", { "class" : "glyphicon glyphicon-minus-sign"}));
} }
var date = Util.getFormatedDate(new Date(parseInt(dateValue) * 1000)); var date = Util.getFormatedDate(new Date(parseInt(dateValue) * 1000));
var commentWidget = FormUtil.getFieldForLabelWithText(date + " (" + userId + ")", value, null, $buttonDelete,
var deleteEnabled = false;
var $sufixComponent = null;
if(deleteEnabled) {
$sufixComponent = $buttonDelete;
}
var commentWidget = FormUtil.getFieldForLabelWithText(date + " (" + userId + ")", value, null, $sufixComponent,
{ {
"background-color" : "lightblue", "background-color" : "lightblue",
"padding-left" : "18px", "padding-left" : "18px",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment