Changed name changing to not repeatedly ask for a name
This commit is contained in:
parent
03f7a99d1d
commit
3c2c02b984
@ -22,10 +22,10 @@ $("#importUpload").change(function(){ //when a file is selected
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("#header a#projectName").click(function(){
|
$("#header a#projectName").click(function(){
|
||||||
do{
|
var newName = prompt("Please enter a name for the diagram", diagram.name);
|
||||||
diagram.name = prompt("Please enter a name for the diagram", diagram.name);
|
if(newName){
|
||||||
|
diagram.name = newName;
|
||||||
}
|
}
|
||||||
while(!diagram.name); //keep asking for a new name until a valid one is entered
|
|
||||||
$("#header a#projectName").html(diagram.name);
|
$("#header a#projectName").html(diagram.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user