We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26903
    • 1,336 Posts
    I think I’ll stick with the latter, which is what I’ve got now, this allows me to stay solely inside assets/components/docmanger. I’ll track changes to the real connector index and update as needed, OK no probs.
      Use MODx, or the cat gets it!
      • 26903
      • 1,336 Posts
      OK guys, finally back to the doc manager conversion($DAYJOB got in the way of late). For the template variable function I’m trying to include the same TV panel as you do when you edit a resource, this I believe is called ’modx-panel-tv’. At the mo I’m just including it as a component on my existing DM form panel and rendering it into a div in my template. Ok, this fails for a few reasons :-

      1. It needs an OnTVFormRender variable assigned. I cant seem to set this using smarty-assign in my controller code. OK I’ve removed this for now.

      2. The render still fails, from cursory inspection it would appear that generated paths are wrong, I’m in my docmanger namespace here, lexicon entries are also not found probably for the same reason.

      Before I delve further into this am I going about this the right way? I’d rather re-use what I can than write it all again.
        Use MODx, or the cat gets it!
        • 28215
        • 4,149 Posts
        Quote from: shamblett at Feb 26, 2009, 05:44 AM

        1. It needs an OnTVFormRender variable assigned. I cant seem to set this using smarty-assign in my controller code. OK I’ve removed this for now.

        In your PHP:

        /* invoke OnTVFormRender event */
        $onTVFormRender = $modx->invokeEvent('OnTVFormRender',array('id' => $_REQUEST['id']));
        if (is_array($onTVFormRender)) $onTVFormRender = implode('',$onTVFormRender);
        $modx->smarty->assign('onTVFormRender',$onTVFormRender);
        


        In your Smarty TPL:
        <script type="text/javascript">
        var onTVFormRender = '{$onTVFormRender}';
        </script>
        


        El finito.


        2. The render still fails, from cursory inspection it would appear that generated paths are wrong, I’m in my docmanger namespace here, lexicon entries are also not found probably for the same reason.
        You’ll need to add the lexicon topic to your modAction, so that it can load it. In your modAction’s lang_topics field, you should already have:

        docmanager:default


        Simply add "tv" (and whatever other lexicon topics you need, I think for TVs it’s: tv,tv_widget,propertyset,element) to that, to make it:

        docmanager:default,tv,tv_widget,propertyset,element


        And you’re done.
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 26903
          • 1,336 Posts
          Ok guys, on the document permissions pane I have two buttons, apply and remove, these work OK and the doc perms are applied and removed as expected. If however I say apply a change, then select a different resource group/doc id range and press remove, the post data sent to the backend processors sends ’apply’ again, not remove, this persists until I F5 the page, then it will send the correct post data. In other words the first request made ’sticks’ until the page is refreshed. Do I have to do this manually at the end of each request, if so whats the best way to do this?
            Use MODx, or the cat gets it!
            • 26903
            • 1,336 Posts
            The existing Sort Menu Doc Manager option in evo allows you to select docs in the doc tree and move them around as you wish, ie you can order them under their parents as you want them. In revo we can do this already in the resource tree view simply by selecting the resource and dragging it to its new position. So, this function is no longer needed in revo as far as I can see, is this correct?

              Use MODx, or the cat gets it!
              • 25663 MODX Staff
              • 12,272 Posts
              Correct.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 26903
                • 1,336 Posts
                I have two modx-combo-user boxes on the same page, javascript definition is :-
                name: 'createdby'
                            	,fieldLabel: _('createdby')
                            	,xtype: 'modx-combo-user'
                            	,id: 'dm-createdby'
                			},{
                		name: 'editedby'
                            	,fieldLabel: _('editedby')
                            	,xtype: 'modx-combo-user'
                            	,id: 'dm-editedby'
                


                When I submit the form, the post data is sent thus :-


                action otherprops
                creatededon
                editedon
                miscsettings
                modx-ab-stay stay
                publishedon
                resource_ids
                unpublishedon
                user 3
                user 2

                Note the two ’user’ entries at the bottom, these should be ’createdby’ and ’editedby’. The modx-combo-user uses ’user’ here as a name, it doesn’t seem to be being overrdidden for some reason, my other overridden combo boxes work O. Is it me?
                  Use MODx, or the cat gets it!
                  • 28215
                  • 4,149 Posts
                  Quote from: shamblett at Mar 05, 2009, 08:27 AM

                  Note the two ’user’ entries at the bottom, these should be ’createdby’ and ’editedby’. The modx-combo-user uses ’user’ here as a name, it doesn’t seem to be being overrdidden for some reason, my other overridden combo boxes work O. Is it me?

                  Correct. Due to the goofy way Ext handles comboboxes (my only complaint about Ext - horrid handling of those things), you’ll need to also specify a ’hiddenName’ attribute for all comboboxes and their derivatives:

                  {
                     xtype: 'modx-combo-user'
                     ,fieldLabel: _('createdby')
                     ,name: 'createdby'
                     ,hiddenName: 'createdby'
                     ,id: 'dm-createdby'
                  }
                  
                    shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                    • 26903
                    • 1,336 Posts
                    OK thanks splittingred , I’d never have sussed that. BTW can you shed any light on this post
                    Ok guys, on the document permissions pane I have two buttons, apply and remove, these work OK and the doc perms are applied and removed as expected. If however I say apply a change, then select a different resource group/doc id range and press remove, the post data sent to the backend processors sends ’apply’ again, not remove, this persists until I F5 the page, then it will send the correct post data. In other words the first request made ’sticks’ until the page is refreshed. Do I have to do this manually at the end of each request, if so whats the best way to do this?

                    Its not a show stopper but I’d like to find out what its is.

                    Also BTW I’m hoping to raise the docmanger ticket for inclusion into components early next week, stay tuned.
                      Use MODx, or the cat gets it!
                      • 28215
                      • 4,149 Posts
                      Quote from: shamblett at Mar 05, 2009, 12:10 PM

                      OK thanks splittingred , I’d never have sussed that. BTW can you shed any light on this post
                      Ok guys, on the document permissions pane I have two buttons, apply and remove, these work OK and the doc perms are applied and removed as expected. If however I say apply a change, then select a different resource group/doc id range and press remove, the post data sent to the backend processors sends ’apply’ again, not remove, this persists until I F5 the page, then it will send the correct post data. In other words the first request made ’sticks’ until the page is refreshed. Do I have to do this manually at the end of each request, if so whats the best way to do this?

                      Its not a show stopper but I’d like to find out what its is.
                      I couldn’t comment on that without seeing the code. You could commit it to SVN and I can take a look next week.
                        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com