Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

increase the length of the options' text input

#556
  • Issue Type: Improvement
  • Rundeck version: 1.4.2

Issue:

We have a need to input text into options that is greater in length than the maxlength="256".
Perhaps an option to make the text box a textarea input with a configurable maxlength would be better?
If this isn't possible or the preferred method, ticket 214 would also provide a workaround for what we need:
http://rundeck.lighthouseapp.com/projects/59277-development/tickets...


Reproduce: (Enter steps to reproduce bug here.)

Reported by Michael Gibson · April 13th, 2012 @ 04:26 PM

State: new
Milestone: none
Assigned to: Greg Schueler Greg Schueler

Activity

  1. Michael Gibson
    Michael Gibson
    • No changes were found…

    April 13th, 2012 @ 04:26 PM

  2. Michael Gibson
    Michael Gibson

    One workaround is to put javascript in the option's description that replaces the option's input element with a textarea element.

    < elem.attributes.length; i++) { var attrib = elem.attributes[i]; if (attrib.specified == true) { newNode.setAttribute(attrib.name,attrib.value); } } parent.replaceChild(newNode,elem); } tagId=document.getElementsByName("extra.option.opt1")[0].id; transformTag(tagId); document.getElementsByName("extra.option.opt1")[0].setAttribute('rows','25'); document.getElementsByName("extra.option.opt1")[0].setAttribute('cols','50'); document.getElementsByName("extra.option.opt1")[0].setAttribute('maxlength','10000');

    April 23rd, 2012 @ 03:26 PM

  3. Michael Gibson
    Michael Gibson

    re-formatting :(

    
    function transformTag(tagId){
        var elem = document.getElementById(tagId);
        var children = elem.childNodes;
        var parent = elem.parentNode;
        var newNode = document.createElement("textarea");
        for(var i=0;i<children.length;i++){
            newNode.appendChild(children[i]);
        }
        for (var i = 0; i < elem.attributes.length; i++) {
            var attrib = elem.attributes[i];
            if (attrib.specified == true) {
               newNode.setAttribute(attrib.name,attrib.value);
            }
        }
        parent.replaceChild(newNode,elem);
    }
    
    
    tagId=document.getElementsByName("extra.option.opt1")[0].id;
    transformTag(tagId);
    
    document.getElementsByName("extra.option.opt1")[0].setAttribute('rows','25');
    document.getElementsByName("extra.option.opt1")[0].setAttribute('cols','50');
    document.getElementsByName("extra.option.opt1")[0].setAttribute('maxlength','10000');
    

    April 23rd, 2012 @ 03:29 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.