You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
732 B

$(function () {
$('[data-toggle="tooltip"]').tooltip();
$(".name-edit input").click(function() {
$form = $(this.parentNode);
if (!$form.hasClass("inactive"))
return;
// Click on all X buttons
$(".name-edit:not(.inactive) .name-edit-cancel").click();
// Make this form editable and store its initial value
$form
.removeClass("inactive")
.data("originalValue", this.value);
});
$(".name-edit-cancel").click(function(){
var $form = $(this.parentNode);
var v = $form.data("originalValue");
$form
.addClass("inactive")
.find(".input-name").val(v);
return false;
});
});