fix real time aspect name changing
This commit is contained in:
parent
3f7b89ac86
commit
4ccf51b3d3
1 changed files with 7 additions and 4 deletions
|
|
@ -113,9 +113,10 @@ var AspectEdit = {
|
||||||
},
|
},
|
||||||
|
|
||||||
changeName: function() {
|
changeName: function() {
|
||||||
var $this = $(this);
|
var $this = $(this),
|
||||||
var id = $this.closest(".aspect").attr("data-guid");
|
id = $this.closest(".aspect").attr("data-guid"),
|
||||||
var link = "/aspects/" + id;
|
link = "/aspects/" + id;
|
||||||
|
|
||||||
|
|
||||||
$this.keypress(function(e) {
|
$this.keypress(function(e) {
|
||||||
if (e.which == 13) {
|
if (e.which == 13) {
|
||||||
|
|
@ -133,9 +134,11 @@ var AspectEdit = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//update all other aspect links
|
//update all other aspect links
|
||||||
$this.keyup(function(e) {
|
$this.keyup(function(e) {
|
||||||
$("#aspect_nav a[href='" + link + "']").text($this.text());
|
$("#aspect_nav li[data-guid='" + id + "'] a").text($this.text());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue