3 Replies Latest reply: Oct 3, 2013 5:52 PM by Stefan Stoichev RSS

    Extension save style changes

      Hi all,

       

      i have a little extension in which im trying to add some custom style to qlikview object. The way im doing it now  (with JQuery) is:

       

      $(".QvFrame.Document_TX01").css("display", "none");
      

       

      Which actually works until i move some other object. After move some other object my style is just remove and the object styles are returned to default ones. Is it possible to save this changes and how?

       

      Thanks!

      Stefan

        • Re: Extension save style changes
          Alexander Karlsson

          Hi Stefan,

           

          It's hard to tell without seeing the entire block of code. What happends when you move an object is that Qv fires an update event which will, in theory, re-draw the necessary components.

           

          It could be that you have a check in place somewhere that prevents your object from updating? Perhaps a false parameter to the AddExtension() method?

          • Re: Extension save style changes
            Clever Anjos

            use the final trigger to do that

             

            $(function(){

            $(".QvFrame.Document_TX01").css("display", "none");

            })

            • Re: Extension save style changes

              Thanks for the answers guys.

               

              The code is pretty simple: (sorry for not formatting it but for some reason can't)

               

              Qva.LoadScript('/QvAjaxZfc/QvsViewClient.aspx?public=only&name=Extensions/SparkLines/jquery.js', function () {

              Qva.AddDocumentExtension('SparkLines', function () {

              $('.QvFrame.Document_TX02').on('click', function(e) { 

              $(".QvFrame.Document_TX01").css("display", "none");

              });

              });

              });

               

              And in the qvw itself i have only 2 text boxes - on for the click event and the other on which should be changed the css, also have one empty label box, which was there by accident, and when move it then the "hidden" textbox appear.

               

              Stefan