diff options
Diffstat (limited to 'gui-editors/gui-editor-apex/src/main/resources/webapp/js/showhideTextarea.js')
-rw-r--r-- | gui-editors/gui-editor-apex/src/main/resources/webapp/js/showhideTextarea.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/showhideTextarea.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/showhideTextarea.js index 353b4e9..0a3058e 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/showhideTextarea.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/showhideTextarea.js @@ -1,7 +1,7 @@ /* * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. - * Modifications Copyright (C) 2020 Nordix Foundation. + * Modifications Copyright (C) 2020-2021 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -75,9 +75,8 @@ function _showHideTextarea_display_show(txtarea, showhide) { */ function showHideTextarea(id_prefix, content, _initialshow, _editable, _disabled, _showText, _hideText) { - var initialshow = (_initialshow != null ? _initialshow : false); + var editable = (_editable != null ? _editable : true); - var callback; var retdiv = document.createElement("div"); var divname = id_prefix; @@ -101,7 +100,7 @@ function showHideTextarea(id_prefix, content, _initialshow, _editable, _disabled } if (!editable) { - textArea.readOnly = (!editable); + textArea.readOnly = true; textArea.style.cursor = "text"; textArea.style["border-color"] = "#E3E3E3"; textArea.style["background-color"] = "#F0F0F0"; @@ -122,7 +121,7 @@ function showHideTextarea(id_prefix, content, _initialshow, _editable, _disabled }); return retdiv; -}; +} export { showHideTextarea, |