public/sistema/src/plugins/jquery-steps/jquery.steps.js
/**
     * Transforms the title to a step item button.
     *
     * @static
     * @private
     * @method renderTitle
     * @param wizard {Object} A jQuery wizard object
     * @param options {Object} Settings of the current wizard
     * @param state {Object} The state container of the current wizard
     * @param header {Object} A jQuery header object
     * @param index {Integer} The position of the header
     */
Transforms the title to a step item button.
Transforms the title to a step item button .
function renderTitle(wizard, options, state, header, index) {
        var uniqueId = getUniqueId(wizard),
            uniqueStepId = uniqueId + _tabSuffix + index,
            uniqueBodyId = uniqueId + _tabpanelSuffix + index,
            uniqueHeaderId = uniqueId + _titleSuffix + index,
            stepCollection = wizard.find(".steps > ul"),
            title = renderTemplate(options.titleTemplate, {
                index: index + 1,
                title: header.html()
            }),
            stepItem = $("<li role=\"tab\"><a id=\"" + uniqueStepId + "\" href=\"#" + uniqueHeaderId +
                "\" aria-controls=\"" + uniqueBodyId + "\">" + title + "</a></li>");
        stepItem._enableAria(options.enableAllSteps || state.currentIndex > index);
        if (state.currentIndex > index) {
            stepItem.addClass("done");
        }
        header._id(uniqueHeaderId).attr("tabindex", "-1").addClass("title");
        if (index === 0) {
            stepCollection.prepend(stepItem);
        } else {
            stepCollection.find("li").eq(index - 1).after(stepItem);
        }
        if (index === 0) {
            stepCollection.find("li").removeClass("first").eq(index).addClass("first");
        }
        if (index === (state.stepCount - 1)) {
            stepCollection.find("li").removeClass("last").eq(index).addClass("last");
        }
        stepItem.children("a").bind("click" + getEventNamespace(wizard), stepClickHandler);
    }
function renderTitle ( wizard , options , state , header , index ) { var uniqueId = getUniqueId ( wizard ) , uniqueStepId = uniqueId + _tabSuffix + index , uniqueBodyId = uniqueId + _tabpanelSuffix + index , uniqueHeaderId = uniqueId + _titleSuffix + index , stepCollection = wizard . find ( ".steps > ul" ) , title = renderTemplate ( options . titleTemplate , { index : index + 1 , title : header . html ( ) } ) , stepItem = $ ( "<li role=\"tab\"><a id=\"" + uniqueStepId + "\" href=\"#" + uniqueHeaderId + "\" aria-controls=\"" + uniqueBodyId + "\">" + title + "</a></li>" ) ; stepItem . _enableAria ( options . enableAllSteps || state . currentIndex > index ) ; if ( state . currentIndex > index ) { stepItem . addClass ( "done" ) ; } header . _id ( uniqueHeaderId ) . attr ( "tabindex" , "-1" ) . addClass ( "title" ) ; if ( index === 0 ) { stepCollection . prepend ( stepItem ) ; } else { stepCollection . find ( "li" ) . eq ( index - 1 ) . after ( stepItem ) ; } if ( index === 0 ) { stepCollection . find ( "li" ) . removeClass ( "first" ) . eq ( index ) . addClass ( "first" ) ; } if ( index === ( state . stepCount - 1 ) ) { stepCollection . find ( "li" ) . removeClass ( "last" ) . eq ( index ) . addClass ( "last" ) ; } stepItem . children ( "a" ) . bind ( "click" + getEventNamespace ( wizard ) , stepClickHandler ) ; }
Transforms the title to a step item button.
Transforms the title to a step item button .
// Set the "first" class to the new first step button // Set the "last" class to the new last step button // Register click event