From f0c17976f0e2e43b8bd365b9c4fa1cfbf0c9eebd Mon Sep 17 00:00:00 2001 From: Mark Friedrich Date: Fri, 8 Dec 2017 23:29:08 +0100 Subject: [PATCH] - fixed a bug with no default system alias name with new created systems, fixed #508 --- js/app/map/map.js | 3 ++- public/js/v1.3.1/app/map/map.js | 3 ++- public/js/v1.3.1/app/map/util.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/js/app/map/map.js b/js/app/map/map.js index 1dba299a..d8e96451 100644 --- a/js/app/map/map.js +++ b/js/app/map/map.js @@ -581,7 +581,8 @@ define([ if(alias !== data.alias){ // alias changed - system.find('.' + config.systemHeadNameClass).editable('setValue', data.alias); + alias = data.alias ? data.alias : data.name; + system.find('.' + config.systemHeadNameClass).editable('setValue', alias); } } diff --git a/public/js/v1.3.1/app/map/map.js b/public/js/v1.3.1/app/map/map.js index 1dba299a..d8e96451 100644 --- a/public/js/v1.3.1/app/map/map.js +++ b/public/js/v1.3.1/app/map/map.js @@ -581,7 +581,8 @@ define([ if(alias !== data.alias){ // alias changed - system.find('.' + config.systemHeadNameClass).editable('setValue', data.alias); + alias = data.alias ? data.alias : data.name; + system.find('.' + config.systemHeadNameClass).editable('setValue', alias); } } diff --git a/public/js/v1.3.1/app/map/util.js b/public/js/v1.3.1/app/map/util.js index ce2ecef7..0b927aa3 100644 --- a/public/js/v1.3.1/app/map/util.js +++ b/public/js/v1.3.1/app/map/util.js @@ -254,7 +254,7 @@ define([ // normalize connection array connectionTypes = $.grep(connectionTypes, function(n){ // 'default' is added by jsPlumb by default -_- - return ( n.length > 0 && n !== 'default'); + return ( n.length > 0 && n !== 'default' && n !== 'active'); }); let data = {