X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ui-react%2Fsrc%2Fcomponents%2Fdialogs%2FPolicy%2FPolicyModal.js;h=428e443cfb40699e136f432d9591f788119f6a35;hb=1b4f20dfda1c5dad80640571e13de53772f2cce1;hp=08bc8e0de2b5f9e710a6a6f10ad0a3afbc3b79cc;hpb=774b4ba65f0d23ae34d3bddb63058796121c1ae3;p=clamp.git diff --git a/ui-react/src/components/dialogs/Policy/PolicyModal.js b/ui-react/src/components/dialogs/Policy/PolicyModal.js index 08bc8e0d..428e443c 100644 --- a/ui-react/src/components/dialogs/Policy/PolicyModal.js +++ b/ui-react/src/components/dialogs/Policy/PolicyModal.js @@ -102,20 +102,37 @@ 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_properties: false, disable_edit_json: false, disable_array_reorder: true, disable_array_delete_last_row: true, disable_array_delete_all_rows: false, - no_additional_properties: true, + array_controls_top: true, + keep_oneof_values: false, + 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 })