gecko-dev/profile/resources/renameProfile.html

88 строки
1.4 KiB
HTML

<html>
<script>
var profileCore = parent.GetProfileCore();
var curProfileName = parent.GetProfileName();
function RenameProfile()
{
//dump("************Inside RenameProfile\n");
// Open a dialog and get new name
var element = document.getElementById("NewProfileName");
var newProfileName = element.value;
if (newProfileName != "") {
profileCore.RenameProfile(curProfileName, newProfileName);
// Load this xul to see the updated profile list
//this.location.replace("resource:/res/profile/profileManager.html");
this.location.href = "resource:/res/profile/profileManager.html";
}
else {
dump("************Please enter a new profile name first\n");
//this.location.replace("resource:/res/profile/renameProfile.html");
this.location.href = "resource:/res/profile/renameProfile.html";
}
}
</script>
<body>
<table>
<tr>
<td>
Rename Profile:
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>
<script> document.writeln(curProfileName); </script>
</td>
</tr>
<tr>
<td>
New Name :
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>
<input type="text" id="NewProfileName" size="15"/>
</td>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>
<input name=renButton type="button" value="Rename " onclick="RenameProfile();">
</td>
</tr>
</table>
</body>
</html>