Expand Collapse

Home Forums General discussion Expand Collapse

Viewing 3 reply threads
  • Author
    Posts
    • #30811
      Tricia S.
      Participant

        I have some input buttons in my heading that has Expand/Collapse. And I’ve noticed some odd behavior.

        When any of the buttons are clicked it triggers the Expand/Collapse before doing its onclick function.

        Here is the save button in code:

        <div class='tooltip buttonRight'><span class= 'tooltiptext '>Click to save and close the form. </span><input type='button'  value='Save' id='SaveBtn1' onclick='spjs.dffs.triggerSave();return false;'></input></div>

        Is there is anything I can do? It just looks odd.

        While on this subject, It would also be interesting if in addition to remembering what tab the user was on if it could remember what headers were the
        opposite of the the default as set by the user. or if you could set the default and then choose if it could remember the users settings or choose to ignore the users settings.

      • #30816
        Alexander Bautz
        Keymaster

          To stop the click from “bubbling” up to the parent item you must change your onclick function from “spjs.dffs.triggerSave()” to “customSaveBtn(event)” and add this to your custom js:

          function customSaveBtn(e) {
              if (typeof e.stopPropagation != "undefined") {
                  e.stopPropagation();
              } else if (typeof e.cancelBubble != "undefined") {
                  e.cancelBubble = true;
              }
              spjs.dffs.triggerSave();
          }

          Not sure I understand you next question – did you want to remember which headings were open when you revisit the same form at a later time? – if so, I’m sorry, but I don’t think I can do that.

          Alexander

        • #30821
          Tricia S.
          Participant

            Thanks!

            No I think every time would be a bit much. I was more thinking just when you save but stay in edit form. since your are basically just saving any updates but keeping the form open.

            Thanks again!
            Tricia

          • #30845
            Alexander Bautz
            Keymaster

              I’m not able to do this now, but I’ll see what I can do in a future version.

              Alexander

          Viewing 3 reply threads
          • You must be logged in to reply to this topic.