1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed XenForo.FieldAdder/XenForo.PollAddResponseButton

Discussion in 'Resolved Bug Reports' started by jmurrayhead, Feb 8, 2011.

  1. jmurrayhead

    jmurrayhead Well-Known Member

    So I've been snooping around XenForo's JavaScript files and noticed that xenforo.js has 'XenForo.FieldAdder', which is supposed to clone form fields, and then in poll.js I see 'XenForo.PollAddResponseButton', which is supposed to perform the same functionality as XenForo.FieldAdder, only for the poll response fields.

    I don't see anywhere in the code where FieldAdder would be used. Is there any reason to have two different functions that seem to do the same thing? I would think you would want to keep it more generic (e.g., FieldAdder) rather than area-specific (e.g., PollAddResponseButton).
  2. Kier

    Kier XenForo Developer Staff Member

    I remember doing this... I'll look back at the code and let you know why.
  3. ragtek

    ragtek Guest

    The fieldadder is used in the acp to add the captcha answers;)
  4. jmurrayhead

    jmurrayhead Well-Known Member

    Well I'll be damned, it is :) Still, would be interesting to know why there's two different cloning methods.
  5. Kier

    Kier XenForo Developer Staff Member

    It's quite simple really...

    Kier had a brain fart.
    Walter and Vincent like this.
  6. jmurrayhead

    jmurrayhead Well-Known Member

    lol happens to the best of us...and considering you're one of the best, I suppose that holds to be true :D

Share This Page