Altering the check-in dialogue in ICN (IBM Content

2019-08-25 01:17发布

In IBM Content Navigator, The "Check In" dialogue contains a Properties Pane, that in turn contains a Class Selector drop down box.

ClassSelector image

I want to keep the check-in functionality, but would like to have that Class Selector box not appear (There is no use case where a user would need to change the document class).

What would be the proper way to achieve this?

  1. Is there a way to extend the ecm/widget/CheckInDialogue.js file AND make the default checkIn action use my new js?
  2. Do I need to create a brand new checkIn action that references a new js?
  3. Do I just change the ICN shipped js/html?

Just to clarify, I do know how to create a plugin, and how to create a js extension to the checkinDialogue.js, and how to remove the classSelector; however I don't know how to make the checkin action use my new script, or the best way to accomplish this.

Thanks!

1条回答
▲ chillily
2楼-- · 2019-08-25 01:45

Before answering your question, I would like to say that I think there is other options to do this without customizing ICN. The two easiest I can see would be:

  • Use entry templates, that way class selector will be disable on check in by default
  • Remove the privChangeClass privilege, that should hide the Class Selector (might be difficult if you want to leave full priv.)

Now if you want to hide it without using entry templates or privileges.

  1. Yes, extend the ecm.widget.layout.CommonActionHandler and overwrite the actionCheckIn function and use your CheckInDialog instead of the default one. Then use your CommonActionHandler instead of the default one in your desktop. I don't think there is a way to change the ActionHandler from the admin desktop UI yet (if I missed it please let me know), although it's loaded by the client on the _loadDesktop function and set by the appearance tab but the value is hard-coded, so you might have to inject it after the load of better, call ecm.model.desktop.setActionHander(actionhandler) where actionhandler is the instance, not the class name (string) in a plugin.

  2. You can, this will make things easier to manage if you have several desktops and you want some to use your new Check In dialog and some not.

  3. No, that's a terrible idea :) Future upgrade of ICN and your code will be a nightmare and the delivery process a lot more complex than a simple configuration trick or ICN plug-in, that's what plug-ins are for.

Also a not so clean but really simple solution would be to aspect after the CheckInDialog.prototype on the postCreate function and do a domStyle.set(this.addContentItemPropertiesPane._contentClassSelectorDiv, "display", "none"); to just hide it on all CheckInDialogs.

查看更多
登录 后发表回答