Commit 43de3dcb by Kálmán Viktor

dashboard: js i18n for fav titles

parent 66100895
...@@ -137,10 +137,10 @@ $(function () { ...@@ -137,10 +137,10 @@ $(function () {
var pk = $(this).data("vm"); var pk = $(this).data("vm");
if(star.hasClass("fa-star-o")) { if(star.hasClass("fa-star-o")) {
star.removeClass("fa-star-o").addClass("fa-star"); star.removeClass("fa-star-o").addClass("fa-star");
star.prop("title", "Unfavourite"); star.prop("title", gettext("Unfavourite"));
} else { } else {
star.removeClass("fa-star").addClass("fa-star-o"); star.removeClass("fa-star").addClass("fa-star-o");
star.prop("title", "Mark as favourite"); star.prop("title", gettext("Mark as favourite"));
} }
$.ajax({ $.ajax({
url: "/dashboard/favourite/", url: "/dashboard/favourite/",
...@@ -447,8 +447,8 @@ function generateVmHTML(pk, name, host, icon, _status, fav, is_last) { ...@@ -447,8 +447,8 @@ function generateVmHTML(pk, name, host, icon, _status, fav, is_last) {
'</span>' + '</span>' +
'<small class="text-muted"> ' + host + '</small>' + '<small class="text-muted"> ' + host + '</small>' +
'<div class="pull-right dashboard-vm-favourite" data-vm="' + pk + '">' + '<div class="pull-right dashboard-vm-favourite" data-vm="' + pk + '">' +
(fav ? '<i class="fa fa-star text-primary title-favourite" title="Unfavourite"></i>' : (fav ? '<i class="fa fa-star text-primary title-favourite" title="' + gettext("Unfavourite") + '"></i>' :
'<i class="fa fa-star-o text-primary title-favourite" title="Mark as favorite"></i>' ) + '<i class="fa fa-star-o text-primary title-favourite" title="' + gettext("Mark as favorite") + '"></i>' ) +
'</div>' + '</div>' +
'<div style="clear: both;"></div>' + '<div style="clear: both;"></div>' +
'</a>'; '</a>';
......
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 sign in to comment