X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ui-react%2Fsrc%2Fcomponents%2Fdialogs%2FPolicy%2FPolicyModal.js;h=0f41beb099d7a5b5555f0f6ee6c929ba9f97d692;hb=82775724cf35060294388f84d2e7d2b0671ee838;hp=7151725c3a0bed63d06992bb9d9b1909a9d17a55;hpb=49ab84a916e96fde4fc39258fa10f8b5ce775f48;p=clamp.git diff --git a/ui-react/src/components/dialogs/Policy/PolicyModal.js b/ui-react/src/components/dialogs/Policy/PolicyModal.js index 7151725c..0f41beb0 100644 --- a/ui-react/src/components/dialogs/Policy/PolicyModal.js +++ b/ui-react/src/components/dialogs/Policy/PolicyModal.js @@ -102,10 +102,25 @@ export default class PolicyModal extends React.Component { } createJsonEditor(toscaModel, editorData) { + 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; + } + }); return new JSONEditor(document.getElementById("editor"), { schema: toscaModel, startval: editorData, - theme: 'bootstrap4', + theme: 'myBootstrap4', object_layout: 'grid', disable_properties: true, disable_edit_json: false, @@ -117,10 +132,9 @@ export default class PolicyModal extends React.Component { collapsed:true, show_errors: 'always', display_required_only: false, - show_opt_in: true, + show_opt_in: false, prompt_before_delete: true, - required_by_default: false, - array_controls_top: true + required_by_default: false }) }