Sanjay214598 / OpenLM

Open LMIS
GNU Affero General Public License v3.0
0 stars 0 forks source link

new Issue with text grid #4

Open Sanjay214598 opened 4 years ago

Sanjay214598 commented 4 years ago

/ Common /

.wizard, .tabcontrol { display: block; width: 100%; overflow: hidden; }

.wizard a, .tabcontrol a { outline: 0; }

.wizard ul, .tabcontrol ul { list-style: none !important; padding: 0; margin: 0; }

.wizard ul > li, .tabcontrol ul > li { display: block; padding: 0; }

/ Accessibility / .wizard > .steps .current-info, .tabcontrol > .steps .current-info { position: absolute; left: -999em; }

.wizard > .content > .title, .tabcontrol > .content > .title { position: absolute; left: -999em; }

/ Wizard /

.wizard > .steps { position: relative; display: block; width: 100%; }

.wizard.vertical > .steps { display: inline; float: left; width: 30%; }

.wizard > .steps .number { font-size: 1.429em; }

.wizard > .steps > ul > li { width: 33.33%; }

.wizard > .steps > ul > li, .wizard > .actions > ul > li { float: left; }

.wizard.vertical > .steps > ul > li { float: none; width: 100%; }

.wizard > .steps a, .wizard > .steps a:hover, .wizard > .steps a:active { display: block; width: auto; margin: 0 0.5em 0.5em; padding: 1em 1em; text-decoration: none;

-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;

}

.wizard > .steps .disabled a, .wizard > .steps .disabled a:hover, .wizard > .steps .disabled a:active { background: #eee; color: #aaa; cursor: default; }

.wizard > .steps .current a, .wizard > .steps .current a:hover, .wizard > .steps .current a:active { background: #2184be; color: #fff; cursor: default; }

.wizard > .steps .done a, .wizard > .steps .done a:hover, .wizard > .steps .done a:active { background: #9dc8e2; color: #fff; }

.wizard > .steps .error a, .wizard > .steps .error a:hover, .wizard > .steps .error a:active { background: #ff3111; color: #fff; }

.wizard > .content { background: #eee; display: block; margin: 0.5em; min-height: 8em; overflow: hidden; position: relative; width: auto;

-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;

}

.wizard.vertical > .content { display: inline; float: left; margin: 0 2.5% 0.5em 2.5%; width: 65%; }

.wizard > .content > .body { float: left; position: absolute; width: 95%; height: 95%; padding: 2.5%; }

.wizard > .content > .body ul { list-style: disc !important; }

.wizard > .content > .body ul > li { display: list-item; }

.wizard > .content > .body > iframe { border: 0 none; width: 100%; height: 100%; }

.wizard > .content > .body input { display: block; border: 1px solid #ccc; }

.wizard > .content > .body input[type="checkbox"] { display: inline-block; }

.wizard > .content > .body input.error { background: rgb(251, 227, 228); border: 1px solid #fbc2c4; color: #8a1f11; }

.wizard > .content > .body label { display: inline-block; margin-bottom: 0.5em; }

.wizard > .content > .body label.error { color: #8a1f11; display: inline-block; margin-left: 1.5em; }

.wizard > .actions { position: relative; display: block; text-align: right; width: 100%; }

.wizard.vertical > .actions { display: inline; float: right; margin: 0 2.5%; width: 95%; }

.wizard > .actions > ul { display: inline-block; text-align: right; }

.wizard > .actions > ul > li { margin: 0 0.5em; }

.wizard.vertical > .actions > ul > li { margin: 0 0 0 1em; }

.wizard > .actions a, .wizard > .actions a:hover, .wizard > .actions a:active { background: #2184be; color: #fff; display: block; padding: 0.5em 1em; text-decoration: none;

-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;

}

.wizard > .actions .disabled a, .wizard > .actions .disabled a:hover, .wizard > .actions .disabled a:active { background: #eee; color: #aaa; }

.wizard > .loading { }

.wizard > .loading .spinner { }

/ Tabcontrol /

.tabcontrol > .steps { position: relative; display: block; width: 100%; }

.tabcontrol > .steps > ul { position: relative; margin: 6px 0 0 0; top: 1px; z-index: 1; }

.tabcontrol > .steps > ul > li { float: left; margin: 5px 2px 0 0; padding: 1px;

-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;

}

.tabcontrol > .steps > ul > li:hover { background: #edecec; border: 1px solid #bbb; padding: 0; }

.tabcontrol > .steps > ul > li.current { background: #fff; border: 1px solid #bbb; border-bottom: 0 none; padding: 0 0 1px 0; margin-top: 0; }

.tabcontrol > .steps > ul > li > a { color: #5f5f5f; display: inline-block; border: 0 none; margin: 0; padding: 10px 30px; text-decoration: none; }

.tabcontrol > .steps > ul > li > a:hover { text-decoration: none; }

.tabcontrol > .steps > ul > li.current > a { padding: 15px 30px 10px 30px; }

.tabcontrol > .content { position: relative; display: inline-block; width: 100%; height: 35em; overflow: hidden; border-top: 1px solid #bbb; padding-top: 20px; }

.tabcontrol > .content > .body { float: left; position: absolute; width: 95%; height: 95%; padding: 2.5%; }

.tabcontrol > .content > .body ul { list-style: disc !important; }

.tabcontrol > .content > .body ul > li { display: list-item; } .progress{ height: 20px; margin: 0.5em 0.5em; overflow: hidden; background-color: #f5f5f5; border-radius: 4px; -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1); box-shadow: inset 0 1px 2px rgba(0,0,0,.1); } .progress-bar-success { background-color: #5cb85c; } .progress-bar { float: left; width: 0%; height: 100%; font-size: 12px; line-height: 20px; color: #fff; text-align: center; background-color: #337ab7; -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); -webkit-transition: width .6s ease; -o-transition: width .6s ease; transition: width .6s ease; }

Sanjay214598 commented 4 years ago

<!DOCTYPE html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>jQeury.steps Demos</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">

    <link rel="stylesheet" href="css/jquery.steps.css">

    <script src="js/jquery-1.9.1.min.js"></script>
    <script src="js/jquery.steps.js"></script>
</head>
<body>
    <!--[if lt IE 7]>
        <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
    <![endif]-->

    <div class="content">
    <div id="wizard123123"> <a href="#" id="create">Create</a></div>
    <div id="wizard123123"> <a href="#" id="destroy">Destroy</a></div>
        <h1>Basic Demo</h1>

        <script>
            $(function ()
            {
                $("#destroy").on("click", function(e){
                    console.log(e);
                    $("#wizard").steps('destroy');
                });
                $("#create").on("click", function(e){
                    $("#wizard").steps({
                        headerTag: "h2",
                        bodyTag: "section",
                        transitionEffect: "slideLeft",
                        titleTemplate: '#title#',
                        onStepChanging: function (event, currentIndex, newIndex) { 
                            console.log("onStepChanging ",event);
                            return true; 
                        },
                        onStepChanged: function (event, currentIndex, priorIndex) {
                            console.log("onStepChanged ",event);
                        }, 
                        onCanceled: function (event) {
                            console.log("onCanceled ",event);
                        },
                        onFinishing: function (event, currentIndex) { 
                            console.log("onFinishing ",event);
                            return true; 
                        }, 
                        onFinished: function (event, currentIndex) {
                            console.log("onFinished ",event);
                        },
                    });
                });
                $("#wizard").steps({
                    headerTag: "h2",
                    bodyTag: "section",
                    transitionEffect: "slideLeft",
                    titleTemplate: '#title#',
                    onStepChanging: function (event, currentIndex, newIndex) { 
                        console.log("onStepChanging ",event);
                        return true; 
                    },
                    onStepChanged: function (event, currentIndex, priorIndex) {
                        console.log("onStepChanged ",event);
                    }, 
                    onCanceled: function (event) {
                        console.log("onCanceled ",event);
                    },
                    onFinishing: function (event, currentIndex) { 
                        console.log("onFinishing ",event);
                        return true; 
                    }, 
                    onFinished: function (event, currentIndex) {
                        console.log("onFinished ",event);
                    },
                    onNext: function (wizard, state, oldIndex, currentIndex) {
                        console.log("OnNext ",oldIndex);
                        var step = state.currentIndex;
                        var total = state.stepCount;
                        var percent = (parseInt(step) / parseInt(total)) * 100;

                        $('.progress-bar').css({width: percent + '%'});
                        $('.progress-bar').text("Step " + step + " of "+state.stepCount);
                    },
                });
            });
        </script>
        <div id="wizard">

            <h2>First Step</h2>
            <section>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ut nulla nunc. Maecenas arcu sem, hendrerit a tempor quis, 
                    sagittis accumsan tellus. In hac habitasse platea dictumst. Donec a semper dui. Nunc eget quam libero. Nam at felis metus. 
                    Nam tellus dolor, tristique ac tempus nec, iaculis quis nisi.</p>
            </section>

            <h2>Second Step</h2>
            <section>
                <p>Donec mi sapien, hendrerit nec egestas a, rutrum vitae dolor. Nullam venenatis diam ac ligula elementum pellentesque. 
                    In lobortis sollicitudin felis non eleifend. Morbi tristique tellus est, sed tempor elit. Morbi varius, nulla quis condimentum 
                    dictum, nisi elit condimentum magna, nec venenatis urna quam in nisi. Integer hendrerit sapien a diam adipiscing consectetur. 
                    In euismod augue ullamcorper leo dignissim quis elementum arcu porta. Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
                    Vestibulum leo velit, blandit ac tempor nec, ultrices id diam. Donec metus lacus, rhoncus sagittis iaculis nec, malesuada a diam. 
                    Donec non pulvinar urna. Aliquam id velit lacus.</p>
            </section>

            <h2>Third Step</h2>
            <section>
                <p>Morbi ornare tellus at elit ultrices id dignissim lorem elementum. Sed eget nisl at justo condimentum dapibus. Fusce eros justo, 
                    pellentesque non euismod ac, rutrum sed quam. Ut non mi tortor. Vestibulum eleifend varius ullamcorper. Aliquam erat volutpat. 
                    Donec diam massa, porta vel dictum sit amet, iaculis ac massa. Sed elementum dui commodo lectus sollicitudin in auctor mauris 
                    venenatis.</p>
            </section>

            <h2>Third Step</h2>
            <section>
                <p>Morbi ornare tellus at elit ultrices id dignissim lorem elementum. Sed eget nisl at justo condimentum dapibus. Fusce eros justo, 
                    pellentesque non euismod ac, rutrum sed quam. Ut non mi tortor. Vestibulum eleifend varius ullamcorper. Aliquam erat volutpat. 
                    Donec diam massa, porta vel dictum sit amet, iaculis ac massa. Sed elementum dui commodo lectus sollicitudin in auctor mauris 
                    venenatis.</p>
            </section>
        </div>
    </div>
</body>

Sanjay214598 commented 4 years ago

/*!

if (!String.prototype.format) { String.prototype.format = function() { var args = (arguments.length === 1 && $.isArray(arguments[0])) ? arguments[0] : arguments; var formattedString = this; for (var i = 0; i < args.length; i++) { var pattern = new RegExp("\{" + i + "\}", "gm"); formattedString = formattedString.replace(pattern, args[i]); } return formattedString; }; }

/**

/**

/**

/**

/**

/**

/**

/**

function analyzeData(wizard, options, state) { var stepTitles = wizard.children(options.headerTag), stepContents = wizard.children(options.bodyTag);

// Validate content
if (stepTitles.length > stepContents.length)
{
    throwError(_missingCorrespondingElementErrorMessage, "contents");
}
else if (stepTitles.length < stepContents.length)
{
    throwError(_missingCorrespondingElementErrorMessage, "titles");
}

var startIndex = options.startIndex;

state.stepCount = stepTitles.length;

// Tries to load the saved state (step position)
if (options.saveState && $.cookie)
{
    var savedState = $.cookie(_cookiePrefix + getUniqueId(wizard));
    // Sets the saved position to the start index if not undefined or out of range 
    var savedIndex = parseInt(savedState, 0);
    if (!isNaN(savedIndex) && savedIndex < state.stepCount)
    {
        startIndex = savedIndex;
    }
}

state.currentIndex = startIndex;

stepTitles.each(function (index)
{
    var item = $(this), // item == header
        content = stepContents.eq(index),
        modeData = content.data("mode"),
        mode = (modeData == null) ? contentMode.html : getValidEnumValue(contentMode,
            (/^\s*$/.test(modeData) || isNaN(modeData)) ? modeData : parseInt(modeData, 0)),
        contentUrl = (mode === contentMode.html || content.data("url") === undefined) ?
            "" : content.data("url"),
        contentLoaded = (mode !== contentMode.html && content.data("loaded") === "1"),
        step = $.extend({}, stepModel, {
            title: item.html(),
            content: (mode === contentMode.html) ? content.html() : "",
            contentUrl: contentUrl,
            contentMode: mode,
            contentLoaded: contentLoaded
        });

    addStepToCache(wizard, step);
});

}

/**

function decreaseCurrentIndexBy(state, decreaseBy) { return state.currentIndex - decreaseBy; }

/**

/**

/**

function getStepAnchor(wizard, index) { var uniqueId = getUniqueId(wizard);

return wizard.find("#" + uniqueId + _tabSuffix + index);

}

function getStepPanel(wizard, index) { var uniqueId = getUniqueId(wizard);

return wizard.find("#" + uniqueId + _tabpanelSuffix + index);

}

function getStepTitle(wizard, index) { var uniqueId = getUniqueId(wizard);

return wizard.find("#" + uniqueId + _titleSuffix + index);

}

function getOptions(wizard) { return wizard.data("options"); }

function getState(wizard) { return wizard.data("state"); }

function getSteps(wizard) { return wizard.data("steps"); }

/**

/**

/**

/**

/**

/**

function increaseCurrentIndexBy(state, increaseBy) { return state.currentIndex + increaseBy; }

/**

/**

/**

/**

/**

/**

/**

/**

/**

/**

function registerEvents(wizard, options) { var eventNamespace = getEventNamespace(wizard);

wizard.bind("canceled" + eventNamespace, options.onCanceled);
wizard.bind("contentLoaded" + eventNamespace, options.onContentLoaded);
wizard.bind("finishing" + eventNamespace, options.onFinishing);
wizard.bind("finished" + eventNamespace, options.onFinished);
wizard.bind("init" + eventNamespace, options.onInit);
wizard.bind("stepChanging" + eventNamespace, options.onStepChanging);
wizard.bind("stepChanged" + eventNamespace, options.onStepChanged);

if (options.enableKeyNavigation)
{
    wizard.bind("keyup" + eventNamespace, keyUpHandler);
}

wizard.find(".actions a").bind("click" + eventNamespace, paginationClickHandler);

}

/**

function removeStepFromCache(wizard, index) { getSteps(wizard).splice(index, 1); }

/**

")), stepTitles = contentWrapper.children(options.headerTag), stepContents = contentWrapper.children(options.bodyTag);

// Transform the wizard wrapper and remove the inner HTML var progressWrapper = $("<div class=\"progress\"><div class=\"progress-bar progress-bar-success\" role=\"progressbar\" aria-valuenow=\"1\" aria-valuemin=\"1\" aria-valuemax=\"5\" style=\"width: 20%;\">Step 1 of 5

"); wizard.attr("role", "application").empty().append(progressWrapper).append(stepsWrapper).append(contentWrapper) .addClass(options.cssClass + " " + options.clearFixCssClass + verticalCssClass);

// Add WIA-ARIA support stepContents.each(function (index) { renderBody(wizard, state, $(this), index); });

stepTitles.each(function (index) { renderTitle(wizard, options, state, $(this), index); });

refreshStepNavigation(wizard, options, state); renderPagination(wizard, options, state); }

/**

/**

</{0}>", buttonTemplate = "
  • <a href=\"#{0}\" role=\"menuitem\">{1}
  • ", buttons = "";

    if (!options.forceMoveForward)
    {
        buttons += buttonTemplate.format("previous", options.labels.previous);
    }
    
    buttons += buttonTemplate.format("next", options.labels.next);
    
    if (options.enableFinishButton)
    {
        buttons += buttonTemplate.format("finish", options.labels.finish);
    }
    
    if (options.enableCancelButton)
    {
        buttons += buttonTemplate.format("cancel", options.labels.cancel);
    }
    
    wizard.append(pagination.format(options.actionContainerTag, options.clearFixCssClass,
        options.labels.pagination, buttons));
    
    refreshPagination(wizard, options, state);
    loadAsyncContent(wizard, options, state);

    } }

    /**

    /**

    /**

    function startTransitionEffect(wizard, options, state, index, oldIndex, doneCallback) { var stepContents = wizard.find(".content > .body"), effect = getValidEnumValue(transitionEffect, options.transitionEffect), effectSpeed = options.transitionEffectSpeed, newStep = stepContents.eq(index), currentStep = stepContents.eq(oldIndex);

    switch (effect)
    {
        case transitionEffect.fade:
        case transitionEffect.slide:
            var hide = (effect === transitionEffect.fade) ? "fadeOut" : "slideUp",
                show = (effect === transitionEffect.fade) ? "fadeIn" : "slideDown";
    
            state.transitionElement = newStep;
            currentStep[hide](effectSpeed, function ()
            {
                var wizard = $(this)._showAria(false).parent().parent(),
                    state = getState(wizard);
    
                if (state.transitionElement)
                {
                    state.transitionElement[show](effectSpeed, function ()
                    {
                        $(this)._showAria();
                    }).promise().done(doneCallback);
                    state.transitionElement = null;
                }
            });
            break;
    
        case transitionEffect.slideLeft:
            var outerWidth = currentStep.outerWidth(true),
                posFadeOut = (index > oldIndex) ? -(outerWidth) : outerWidth,
                posFadeIn = (index > oldIndex) ? outerWidth : -(outerWidth);
    
            $.when(currentStep.animate({ left: posFadeOut }, effectSpeed, 
                    function () { $(this)._showAria(false); }),
                newStep.css("left", posFadeIn + "px")._showAria()
                    .animate({ left: 0 }, effectSpeed)).done(doneCallback);
            break;
    
        default:
            $.when(currentStep._showAria(false), newStep._showAria())
                .done(doneCallback);
            break;
    }

    }

    /**

    function throwError(message) { if (arguments.length > 1) { message = message.format(Array.prototype.slice.call(arguments, 1)); }

    throw new Error(message);

    }

    /**

    /**

    /**

    /**

    /**

    /**

    /**

    /**

    /**

    /**

    /**

    /**

    /**

    /**

    /**

    /**

    /**

    var stepModel = $.fn.steps.stepModel = { title: "", content: "", contentUrl: "", contentMode: contentMode.html, contentLoaded: false };

    /**