We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23018
    • 353 Posts
    Quote from: himmdesign at Mar 06, 2015, 10:01 AM
    Looks like I have a bug here.

    Uncaught TypeError: Cannot read property 'setStyle' of null


    https://www.dropbox.com/s/lcczi7aacjz9vdr/Screenshot%202015-03-06%2009.59.28.png?dl=0

    What did I mess up? smiley

    Most probably, I overlooked something embarrassing. Open your dev console and click on the error. Post a screenshot here. In the meantime I'll compare my (working) example with the github version.
      Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
      • 36722
      • 101 Posts
      Console


      Header TV - These value appear to be related.
        Shawn Himmelberger
        Himmelberger Design
        https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Design | https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Development
        • 23018
        • 353 Posts
        Quote from: himmdesign at Mar 06, 2015, 10:06 AM
        Console


        Header TV - These value appear to be related.

        Get rid of that empty space in your Jumbotron list and double check if the TV ids really exist (forgot to make a sanity check for the listed ids).
          Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
          • 23018
          • 353 Posts
          I'm sure it is the empty space after id5. Got to add some trimming...
            Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
            • 36722
            • 101 Posts
            Yup, that was it.

            Now will this work if I move this group to the modx-resource-main-left tab or make my own Header tab?
              Shawn Himmelberger
              Himmelberger Design
              https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Design | https://himmdesign.com/services/website-development/modx"" target="_blank" rel="nofollow"> MODx Web Development
              • 23018
              • 353 Posts
              Download the latest version of toggleTVSet.plugin.php. It should be more stable.

              Nevertheless, you have to do something against the empty space inside your select TV. I've noticed that empty spaces after the == cause confusion even if my plugin is disabled. Seems to be a modx bug.
                Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
                • 23018
                • 353 Posts
                Quote from: himmdesign at Mar 06, 2015, 10:24 AM
                Yup, that was it.

                Now will this work if I move this group to the modx-resource-main-left tab or make my own Header tab?

                Nope, but it should work if you change line 61:

                            if(e.getActiveTab().id == 'modx-panel-resource-tv'){


                Switch
                modx-panel-resource-tv
                to the name of the tab you have moved your TVs to. Does it work?

                Edit: Don't know of if think getActiveTab will work if you move your content to the first tab. Let me have a look...
                  Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
                  • 23018
                  • 353 Posts
                  Hm... "show" might be useful on top of "tabchange". http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.TabPanel-event-show

                  Line 59:

                          Ext.getCmp('modx-resource-tabs').on('tabchange show',function(e){


                  I have to build a test case, but I have to leave in a couple of minutes. I'll post a solution tonight or tomorrow.

                  CU.
                    Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
                    • 14911
                    • 7 Posts
                    @pepebe, your work and time are much appreciated. Would you mind very much converting that gist into a git repository? This way we can make pull requests, track issues, etc. If you don't want to, no problem.
                      • 23018
                      • 353 Posts
                      Quote from: jsewill at Mar 06, 2015, 11:34 AM
                      @pepebe, your work and time are much appreciated. Would you mind very much converting that gist into a git repository? This way we can make pull requests, track issues, etc. If you don't want to, no problem.

                      Oh, I'm happy if somebody wants to contribute to this. The more the merrier. I'll create a git repo during the weekend.
                        Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe