From: xuegao Date: Wed, 25 Sep 2019 09:23:18 +0000 (+0200) Subject: Fix the ooperational policy ui issue X-Git-Tag: 4.1.3~19^2~1 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F18%2F96218%2F1;p=clamp.git Fix the ooperational policy ui issue Update the css of the Jsoneditor tab component so that the operational policy UI will not have names overlapped. Issue-ID: CLAMP-511 Change-Id: I05806a398cd7f642290d7dbef1e58533a8bdac1c Signed-off-by: xuegao --- diff --git a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js index 1ebe5f0e..4dc1f90a 100644 --- a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js +++ b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js @@ -77,8 +77,22 @@ export default class OperationalPolicyModal extends React.Component { } setDefaultJsonEditorOptions() { - JSONEditor.defaults.options.theme = 'bootstrap4'; - + JSONEditor.defaults.themes.myBootstrap4 = JSONEditor.defaults.themes.bootstrap4.extend({ + getTab: function(text,tabId) { + var liel = document.createElement('li'); + liel.classList.add('nav-item'); + var ael = document.createElement("a"); + ael.classList.add("nav-link"); + ael.setAttribute("style",'padding:10px;max-width:160px;'); + ael.setAttribute("href", "#" + tabId); + ael.setAttribute('data-toggle', 'tab'); + text.setAttribute("style",'word-wrap:break-word;'); + ael.appendChild(text); + liel.appendChild(ael); + return liel; + } + }); + JSONEditor.defaults.options.theme = 'myBootstrap4'; JSONEditor.defaults.options.object_layout = 'grid'; JSONEditor.defaults.options.disable_properties = true; JSONEditor.defaults.options.disable_edit_json = false;