Lines 914-922
Using this account is not recommended because some parts of Koha will not functi
Link Here
|
914 |
|
914 |
|
915 |
if(origvalue != value) { |
915 |
if(origvalue != value) { |
916 |
if(origvalue != "") |
916 |
if(origvalue != "") |
917 |
$btn_save.text('Submit changes'); |
917 |
$btn_save.text(_("Submit changes")); |
918 |
else |
918 |
else |
919 |
$btn_save.text('Submit note'); |
919 |
$btn_save.text(_("Submit note")); |
920 |
$btn_save.show(); |
920 |
$btn_save.show(); |
921 |
} else { |
921 |
} else { |
922 |
$btn_save.hide(); |
922 |
$btn_save.hide(); |
Lines 947-976
Using this account is not recommended because some parts of Koha will not functi
Link Here
|
947 |
$("#notesaved").addClass("alert-info"); |
947 |
$("#notesaved").addClass("alert-info"); |
948 |
$noteinput.data('origvalue', data.note); |
948 |
$noteinput.data('origvalue', data.note); |
949 |
$noteinput.val(data.note); |
949 |
$noteinput.val(data.note); |
950 |
message = "<p>Your note about " + title + " has been saved and sent to the library.</p>"; |
950 |
message = "<p>" + _("Your note about %s has been saved and sent to the library.").format(title) + "</p>"; |
|
|
951 |
message += "<p style=\"font-style:italic;\">" + data.note + "</p>"; |
951 |
$self.hide(); |
952 |
$self.hide(); |
952 |
} else if(data.status == 'removed') { |
953 |
} else if(data.status == 'removed') { |
953 |
$("#notesaved").removeClass("alert-error"); |
954 |
$("#notesaved").removeClass("alert-error"); |
954 |
$("#notesaved").addClass("alert-info"); |
955 |
$("#notesaved").addClass("alert-info"); |
955 |
$noteinput.data('origvalue', ""); |
956 |
$noteinput.data('origvalue', ""); |
956 |
$noteinput.val(""); |
957 |
$noteinput.val(""); |
957 |
message = "<p>Your note about " + title + " was removed.</p>"; |
958 |
message = "<p>" + _("Your note about %s was removed.").format(title) + "</p>"; |
958 |
$self.hide(); |
959 |
$self.hide(); |
959 |
} else { |
960 |
} else { |
960 |
$("#notesaved").removeClass("alert-info"); |
961 |
$("#notesaved").removeClass("alert-info"); |
961 |
$("#notesaved").addClass("alert-error"); |
962 |
$("#notesaved").addClass("alert-error"); |
962 |
message = "<p>Your note about " + title + " could not be saved.</p>" + |
963 |
message = "<p>" + _("Your note about %s could not be saved.").format(title) + "</p>"; |
963 |
"<p style=\"font-weight:bold;\">" + data.error + "</p>"; |
964 |
message += "<p style=\"font-weight:bold;\">" + _("Something went wrong. The note has not been saved") + "</p>"; |
964 |
} |
965 |
} |
965 |
|
|
|
966 |
message += "<p style=\"font-style:italic;\">" + data.note + "</p>"; |
967 |
$("#notesaved").html(message); |
966 |
$("#notesaved").html(message); |
968 |
}) |
967 |
}) |
969 |
.fail(function(data) { |
968 |
.fail(function(data) { |
970 |
$("#notesaved").removeClass("alert-info"); |
969 |
$("#notesaved").removeClass("alert-info"); |
971 |
$("#notesaved").addClass("alert-error"); |
970 |
$("#notesaved").addClass("alert-error"); |
972 |
var message = "<p>Your note about " + title + " could not be saved.</p>" + |
971 |
var message = "<p style=\"font-weight:bold;\">" + _("Something went wrong. The note has not been saved") + "</p>"; |
973 |
"<p style=\"font-weight:bold;\">Ajax request has failed.</p>"; |
|
|
974 |
$("#notesaved").html(message); |
972 |
$("#notesaved").html(message); |
975 |
}) |
973 |
}) |
976 |
.always(function() { |
974 |
.always(function() { |