iobroker.alias-manager
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -822,8 +822,8 @@ //Adapter-Manager - Copyright (c) by Sebatian Bormann | ||
$('#aliasesDeleteAlias').on('click', function(){ | ||
if(confirm(_("Really delete all datapoints of this Alias?"))){ | ||
if(confirm(_("Really delete this Alias with all its datapoints? This cant't be undone!"))){ | ||
var ids = []; | ||
ids.push(aliasesSelectedAlias); | ||
$('#aliasesDatapointList li').each(function(){ | ||
$('#aliasesDatapointList > li').each(function(){ | ||
ids.push($(this).data('id')); | ||
}); | ||
ids.push(aliasesSelectedAlias); | ||
deleteDatapoints(ids, function(){ | ||
@@ -835,3 +835,3 @@ loadTabAliases(); | ||
//Add function to Sava all Buttons | ||
//Add function to Save all Buttons | ||
$('.aliasesDatapointSaveAll').on('click', function(){ | ||
@@ -875,6 +875,7 @@ var ids = []; | ||
listContent += "<div class='row aliasesDatapointRow' style='background-color: rgba(0,0,0,0.2);'>"; | ||
listContent += "<div class='col s12 m6 l6'>"; | ||
if(!isMain) listContent += "<i class='aliasesDatapoint delete material-icons' data-id='" + alias + "' data-setting='delete' data-main='" + (isMain ? "true" : "false") + "' style='position:absolute; right:6px; cursor:pointer; color:#e60000;'>delete</i>"; | ||
listContent += "<div class='col s11 m6 l6'>"; | ||
listContent += "<h6>" + alias + ":<h6>"; | ||
listContent += "</div>"; | ||
listContent += "<div class='col s12 m6 l6'>"; | ||
listContent += "<div class='col s12 m5 l5'>"; | ||
listContent += "<input class='val aliasesDatapoint' name='aliasesDatapoint_" + alias + "_NAME' id='aliasesDatapoint_" + alias + "_NAME' data-id='" + alias + "' data-setting='name' value='" + name + "' data-main='" + (isMain ? "true" : "false") + "'></input>"; | ||
@@ -927,3 +928,3 @@ listContent += "<label for='aliasesDatapoint_" + alias + "_NAME' class='translate'></label>"; | ||
listContent += "</div>"; | ||
listContent += "<div class='row aliasesDatapointRow' style='background-color: rgba(255,0,0,0.1); padding-right: 40px;'>"; | ||
listContent += "<div class='row aliasesDatapointRow' style='background-color: rgba(255,0,0,0.1);'>"; | ||
listContent += "<div class='col s12 m6 l4' style='background-color: rgba(255,0,0,0.1);'>"; | ||
@@ -975,2 +976,8 @@ listContent += "<input class='val aliasesDatapoint' name='aliasesDatapoint_" + alias + "_ALIAS_ID' id='aliasesDatapoint_" + alias + "_ALIAS_ID' data-id='" + alias + "' data-setting='aliasId' value='" + aliasId + "'></input>"; | ||
}); | ||
//Delete datapoint | ||
$('.aliasesDatapoint.delete[data-id="' + alias + '"]').on('click', function(){ | ||
if(confirm(_("Delete datapoint? This can't be undone!"))) deleteDatapoints([alias], function(){ | ||
$('#aliasesDatapointList li[data-id="' + alias + '"]').remove(); | ||
}); | ||
}); | ||
//Enhance SelectId-Buttons with function | ||
@@ -1016,7 +1023,7 @@ $('.aliasesDatapoint.selectId[data-id="' + alias + '"]').on('click', function(){ | ||
if(saveNew) idsToSave.push(newAlias); | ||
aliases[newAlias] = Object.assign({}, aliases[oldAlias]); //Copy old alias into new | ||
aliases[newAlias] = JSON.parse(JSON.stringify(aliases[oldAlias])); //Copy old alias into new | ||
if(oldAlias.length == oldId.length){ // Main | ||
aliases[newAlias].UNSAVED_NEW = true; | ||
aliases[newAlias].type = oldObj.type || "channel"; | ||
if(! typeof aliases[newAlias].common == "object") aliases[newAlias].common = {}; | ||
if(typeof aliases[newAlias].common != "object") aliases[newAlias].common = {}; | ||
aliases[newAlias].common.name = newName; | ||
@@ -1027,5 +1034,5 @@ aliases[newAlias]._id = newAlias; | ||
aliases[newAlias].type = oldObj.type || "state"; | ||
if(! typeof aliases[newAlias].common == "object") aliases[newAlias].common = {}; | ||
if(typeof aliases[newAlias].common != "object") aliases[newAlias].common = {}; | ||
aliases[newAlias].common.name = (oldObj.common && oldObj.common.name || newName).replace(oldName, newName); | ||
if(! typeof aliases[newAlias].common.alias == "object") aliases[newAlias].common.alias = {}; | ||
if(typeof aliases[newAlias].common.alias != "object") aliases[newAlias].common.alias = {}; | ||
aliases[newAlias].common.alias.id = multiReplace(oldObj.common && oldObj.common.alias && oldObj.common.alias.id || "", replacements); | ||
@@ -1032,0 +1039,0 @@ aliases[newAlias]._id = newAlias; |
{ | ||
"common": { | ||
"name": "alias-manager", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"news": { | ||
"0.0.6": { | ||
"en": "some fixes", | ||
"de": "einige Korrekturen", | ||
"ru": "некоторые исправления", | ||
"pt": "algumas correções", | ||
"nl": "enkele fixes", | ||
"fr": "quelques correctifs", | ||
"it": "alcune correzioni", | ||
"es": "algunas correcciones", | ||
"pl": "kilka poprawek", | ||
"zh-cn": "一些修复" | ||
}, | ||
"0.0.5": { | ||
@@ -7,0 +19,0 @@ "en": "some fixes", |
{ | ||
"name": "iobroker.alias-manager", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Manages and creates aliases", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -21,10 +21,8 @@ ![Logo](admin/alias-manager.png) | ||
### 0.0.5 | ||
* (sbormann) some fixes | ||
### 0.0.6 (2021-01-18) | ||
* (sbormann) Added delete datapoint | ||
* (sbormann) Some fixes | ||
### 0.0.2 | ||
* (sbormann) added conversion for min and max to type number | ||
### 0.0.1 | ||
* (sbormann) initial release | ||
* (sbormann) Initial release | ||
@@ -31,0 +29,0 @@ ## License |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
452476
1465
49