Skip to content

Commit

Permalink
Remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
suminb committed Mar 15, 2016
1 parent 87d2c8e commit 54f0949
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions app/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,52 +565,6 @@ function hashChanged(hash) {
}
}

function fetchTranslation(serial) {
$("#progress-message").show();

$.get("/v0.9/fetch/"+serial, function(response) {
// TODO: Refactor this part
$("#text").val(response.original_text);
$("#result").html(response.translated_text_dictlink);

$("select[name=sl]").val(response.source);
$("select[name=il]").val(response.intermediate); // FIXME: Not implemented on server side
$("select[name=tl]").val(response.target);

window.history.replaceState(state.serialize(), "", window.location.href);

//askForRating(response.request_id);

}).fail(function(response) {
displayError(response.responseText, null);
}).always(function() {
$("#progress-message").hide();
});
}

function deleteTranslation(id) {
$("div.alert").hide();

$.delete_(sprintf("/v1.0/trs/%s", id), function(response) {
location.href = sprintf("/trequest/%s/response", response.request_id);
}).fail(function(response) {
$("div.alert-error").text(response.responseText).show();
}).always(function() {

});
}

function displayPermalink(id) {
var origin = window.location.origin ? window.location.origin
: window.location.protocol+"//"+window.location.host;
var path = sprintf("?tr=%s", id);
var url = origin + path;

$("#request-permalink").hide();

window.history.pushState(state.serialize(), "", path);
}

/**
* @param state True or false
*/
Expand Down

0 comments on commit 54f0949

Please sign in to comment.