More customisations - palette and popups


#1

Hi,
can someone point me in the right direction of how I can customise the palette and change type popup ?

In our particular example - we dont want to allow all types of process events ( so - hide the “intermidateThrowEvent” from the palellte for example).
Also - when you get the “spanner” tool for “Change Type” - I need to be able to customise the list of types that appear there too.

Thanks in advance.


#2

Hello @zz9pa,

First off the palette, to customize it to your needs you should look at the paletteProvider inside the palette module. There you can add and remove the palette entries that you wish for.

With spanner tool, I guess you’re referring to the replace menu. You can check it’s module and inside you’ll find a BpmnReplace.js file that takes care of the logic behind the actual replacement of bpmn elements and you’ll find a ReplaceOptions.js, which carries with it which options should be shown when it is opened for the selected shape.

Cheers,
Ricardo


#3

Cheers,
Should I edit the original files - or is there someway to override these things in the “app.js” ?


#4

Hi,
you can override it in the app.js.
You have to make a copy of the module you want to override and change your code.
Afterwards you register the new module during the initilisation.
Watch the Example in the Comment.
Greetings


#5

@zzpa, You got to hide some “types” in the palette element? I need hide some elements type of the list “change type” option.


#6

Could show how to do this? What modules do I need to override to disable the option ‘Change type’ in contextPad for Pool element or remove the “Expanded Subprocess” element in toolbar?


#7

Did anyone found the solution how to add/remove menu with out edit core file “ReplaceOptions.js”