How can I click TOC menu to open list directly

Hi  Community,

I want to directly open the data list after clicking on the menu. So I change TOC access to TOC View, but it will disable something function, just like refresh date list after add or update or delete.

Is there other way to achieve, except using TOC view.

By the way, how can I increase TOC content width,because I can`t see the full menu name which text too long.

Parents
  • Hi Joker,

    I am not sure if you (or me) mix things up a little. A TOC view is intended to display single (!) forms or applications. It cannot be used to replace the standard grid.

    You can directly open the data grid by clicking on the small magnifying glass. I might be possible to overwrite the default behavior when you click on some of the TOC entries to by-pass the secondary window, but I would not recommend this change.

    But at least you should be able to change the default size of the aras-naviagon-panel in the codetree. Just take a look at main.css/main.css.min. 

    As you use Innovator 12, this stylesheet should do the job:

    .aras-navigation-panel {
    ....
       width: 22rem;   <-- increase this value
    }

    Maybe adjust the stylesheet in the browser debugger first to find the best width. And document this change, cause it´s a codetree modification that will be overwritten on update.

    Angela

  • Well, you could increase the size of the magnifying glass, but I understand your situation! According to what I have seen, there is a 50/50 split of what users prefer. Some mainly works with Favorites, other mainly with grid.

    What TOC modifications are possible in your Innovator depends on your Innovator version. You seem to have Innovator 12. But which version? An early one, or a late one?

    I don´t know the exact version, but in the early I12 version, TOC was mostly rendered by codetree. In later version, it´s more CUI based, which probably makes it easier to modify. From my POV I would prefer to open the grid directly if users "doubleclick" on the main TOC entry. This would provide the best of both worlds. But I never tested this variant.

    I made a quick look at the codetree. Depending on your version, you may find a cuiToc.js. I am not sure if this is the correct code part, but it looks promising.

    According to what I see in the code, it´s maybe possible to interchange the functionality. So you could try to interchange the code in the two "else ifs". 

    I have not tested this and it can have negative side effects. So definitely make a backup of the original code and test in a test instance first!

    As mentioned before, this one is really not my favorite solution. I would more recommend a CUI based solution that doesn´t require a codetree modification.

    But I am happy to get the feedback if somebody wants to give it a try! 

  • Hi Angela.

    Thanks for answer it make me understand codetree. I try to interchange the code in the two "else ifs", but it didn't have the expected effect. And I like your solution better! So how can I "doubleclick" to open grid ?

    Thanks very much.

  • Hi Joker, 

    did anything happen at all after the change? You said that it didn´t have the expected effect. But did it have any effect? 

    I have seen that my described code appears in a similar way in a couple of other codetree files. So the above was probably the wrong one.  But I am not sure which one is the correct one yet.

    I have seen references that Innovator catches the click events, so adding a doubleclick could be possible. It´s just about the correct file.

    In best case, doubleclick is supported by the TOC and the favorites pane:

    I guess even Aras would like this extension. Especially people coming from I11 often miss the direct TOC access. Doubleclick represents natural behavior of impatient humans. If you want something fast, you click more aggressively. It´s really the perfect solution!

    Angela

  • Out of interest I made a quick test to add a doubleclick event to the pinned sidebar tabs and it turned out far too well!

    The modification still needs a few minor improvements and the allowed time delay is a bit too high, but in general it´s just awesome. How could be ever live without that?

    Add something like this in NavigationPanel.js:

    The solution doesn´t replace the default behavior. The secondary menu is still opened, but you instantly get the grid on the second click. 

  • Oh!Angela. Thanks for your help. You are so awesome.

    I got it and made a test. The following is my test code. But when I double click, the click event is triggered at the same time. So it still needs a few minor improvements  as you said. It `s okay, I`ll fix it.

  • Offline in reply to Joker

    The effect achieved by the above code is:

    click favorite tab: open secondary window and datagrid at the same time.

    click menu text: open datagrid only

    double click menu: open secondary window and datagrid(Not expected) at the same time.(This way will cause two problem to be solved: open two datagrid tabs; open secondary window and datagrid at the same time.)

  • Thanks for sharing your code! I like your variant, I haven´t thought about directly calling the search grid from the select event.

    Are there any conflicts when user´s have pinned/unpinned the sidebar? Anyway, I will test your solution! It´s really a useful enhancement, thanks for bringing up the topic!

  • No conflicts found so far when user´s have pinned/unpinned the sidebar.

    And I optimized the effect like:

    click favorite tab: open secondary window (i remove my changes to the select event to keep original effect)

    click menu text: open datagrid only

    And then, I want to change the event of the small magnifying glass to open secondary window. But I've been testing for a while and I can't call the function(_showSecondaryMenu)of NavigationPanel.js in cuiToc.js. Maybe NavigationPanel.js has not been compiled yet ?Do you have ideas?

    Thanks.

  • Do you try to achieve your original idea by inverting the behavior of the magnifying glass and the regular TOC entries?

    It´s seems a bit more complicated to overwrite the behavior of the magnifying glass. You cannot reuse the _showSecondary function cause it is not available in this context.

    You could try to rebuild the function or try if you can import the necessary components. There are multiple imports at the top of NavigationPanel.js. But I don´t know yet, how the exactly stick together and if things can really work that way.

    A solution that solely modifies NavigationPanel.js would be easier. Maybe there is a way to detect, when a event is fired from the magnifying class on an early stage to bypass the events that cuiToc.js would execute. 

    But I am not sure right now, it´s a bit tricky. 

Reply
  • Do you try to achieve your original idea by inverting the behavior of the magnifying glass and the regular TOC entries?

    It´s seems a bit more complicated to overwrite the behavior of the magnifying glass. You cannot reuse the _showSecondary function cause it is not available in this context.

    You could try to rebuild the function or try if you can import the necessary components. There are multiple imports at the top of NavigationPanel.js. But I don´t know yet, how the exactly stick together and if things can really work that way.

    A solution that solely modifies NavigationPanel.js would be easier. Maybe there is a way to detect, when a event is fired from the magnifying class on an early stage to bypass the events that cuiToc.js would execute. 

    But I am not sure right now, it´s a bit tricky. 

Children
No Data