Display question SystemIDs at all times in the Admin > Questions area

Featured

Comments

5 comments

  • Avatar
    Mark Williams

    Hi Adam, I added this code and it all works but it unfortunately shows the ID's on the client facing get quote screens too. Any suggestions?

    0
    Comment actions Permalink
  • Avatar
    Adam MacDonald

    Hi Mark, 

    Try:

    // Show question SystemIDs on the questions editor page
    document.observe('dom:loaded', function() {
    if(window.location.pathname == "/schemeserve/admin/questions/edit.aspx") {
    $$('.question').each(function(el) {
    el.insert({'top' : "<span style=\"border:1px dotted #FFE24F;margin-left:-10px;padding:5px;background-color:#FFFACD\">"+el.id.replace('question_','')+"</span>"});
    });
    }
    });

    0
    Comment actions Permalink
  • Avatar
    Mark Williams

    Different Adam. Are you interchangeable :)

    That works perfectly thanks and makes scheme design that bit easier.

    0
    Comment actions Permalink
  • Avatar
    Adam Bishop

    Mac may be pretty smart but for the record we are NOT interchangeable... :)

    0
    Comment actions Permalink
  • Avatar
    Sherry-Anne Haliiday

    This will work for normal questions, and post quote, including testing environments

     

    Ok, this one will work for normal questions and post-quote ones :)
    // Show question SystemIDs on the questions editor page
    document.observe('dom:loaded', function() {
      if(window.location.toString().toLowerCase().indexOf("/admin/questions/edit") > -1) {
        $$('.question').each(function(el) {
          el.insert({'top' : "<span style=\"border:1px dotted #FFE24F;margin-left:-10px;padding:5px;background-color:#FFFACD\">"+el.id.replace('question_','')+"</span>"});
        });
      }
    });
    0
    Comment actions Permalink

Please sign in to leave a comment.