Ability to rename extensions

This commit is contained in:
Mo Bitar
2017-10-28 20:58:09 -05:00
parent 4fee411796
commit a55951a196
3 changed files with 53 additions and 12 deletions

View File

@@ -57,6 +57,36 @@ class GlobalExtensionsMenu {
}
}
$scope.renameExtension = function(extension) {
extension.tempName = extension.name;
extension.rename = true;
}
$scope.submitExtensionRename = function(extension) {
extension.name = extension.tempName;
extension.tempName = null;
extension.setDirty(true);
extension.rename = false;
syncManager.sync();
}
$scope.clickedExtension = function(extension) {
if(extension.rename) {
return;
}
if($scope.currentlyExpandedExtension && $scope.currentlyExpandedExtension !== extension) {
$scope.currentlyExpandedExtension.showDetails = false;
$scope.currentlyExpandedExtension.rename = false;
}
extension.showDetails = !extension.showDetails;
if(extension.showDetails) {
$scope.currentlyExpandedExtension = extension;
}
}
// Server extensions
$scope.deleteServerExt = function(ext) {

View File

@@ -31,7 +31,6 @@ class ModelManager {
}
alternateUUIDForItem(item, callback) {
console.log("Alternating uuid for item", item);
// we need to clone this item and give it a new uuid, then delete item with old uuid from db (you can't mofidy uuid's in our indexeddb setup)
var newItem = this.createItem(item);