Jason Coyne
Jason Coyne

Reputation: 6636

Why isn't fuel ux working in my MVC5 app (wizard, and general render issue)

I'm trying to get fuelUX working in my MVC5 app. I've created a simple view to sandbox in, but it isn't behaving as I expect.

There are two (so far) issues I'm getting.

1) Everything is rendering to the full width of the page. 2) The wizard renders appropriately (other than issue 1) but the tabs are all disabled, and the next button doesn't do anything.

enter image description here

Here is the page source that gets rendered out of asp.net

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Home Page - My ASP.NET Application</title>

    <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
    <link href="//www.fuelcdn.com/fuelux/3.6.3/css/fuelux.min.css" rel="stylesheet">

    <script src="//cdn.jsdelivr.net/requirejs/2.1.11/require.js"></script>
    <script>
        requirejs.config({
            paths: {
                'bootstrap': '//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min',
                'fuelux': '//www.fuelcdn.com/fuelux/3.6.3/js/fuelux.min',
                'jquery': '//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery',
                // Moment.js is optional
                'moment': '//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js'

            },
            // Bootstrap is a "browser globals" script :-(
            shim: { 'bootstrap': { deps: ['jquery'] } }
        });
        // Require all.js or include individual files as needed
        require(['jquery', 'bootstrap', 'fuelux'], function ($) { });
    </script>

</head>
<body>



<div class="fuelux">

    <div class="checkbox">
        <label class="checkbox-custom" data-initialize="checkbox">
            <input class="sr-only" data-toggle="#hereKittyKitty" type="checkbox" value="option1">
            <span class="checkbox-label">I love kittens!</span>
        </label>
    </div>
    <div id="hereKittyKitty" class="alert bg-info">Great. Meow, too!</div>

    <div class="input-group input-append dropdown combobox" data-initialize="combobox" id="myCombobox">
        <input type="text" class="form-control">
        <div class="input-group-btn">
            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
            <ul class="dropdown-menu dropdown-menu-right">
                <li data-value="1"><a href="#">One</a></li>
                <li data-value="2"><a href="#">Two</a></li>
                <li data-value="3"><a href="#">Three</a></li>
                <li data-value="4"><a href="#">Four</a></li>

            </ul>
        </div>
    </div>

    <div class="wizard">
        <ul class="steps">
            <li data-step="1" data-name="campaign" class="active"><span class="badge">1</span>Campaign<span class="chevron"></span></li>
            <li data-step="2"><span class="badge">2</span>Recipients<span class="chevron"></span></li>
            <li data-step="3" data-name="template"><span class="badge">3</span>Template<span class="chevron"></span></li>
        </ul>
        <div class="actions">
            <button type="button" class="btn btn-default btn-prev"><span class="glyphicon glyphicon-arrow-left"></span>Prev</button>
            <button type="button" class="btn btn-default btn-next" data-last="Complete">Next<span class="glyphicon glyphicon-arrow-right"></span></button>
        </div>
        <div class="step-content">
            <div class="step-pane active sample-pane alert" data-step="1">
                <h4>Setup Campaign</h4>
                <p>Veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic. Beetroot water spinach okra water chestnut ricebean pea catsear courgette.</p>
            </div>
            <div class="step-pane sample-pane bg-info alert" data-step="2">
                <h4>Choose Recipients</h4>
                <p>Celery quandong swiss chard chicory earthnut pea potato. Salsify taro catsear garlic gram celery bitterleaf wattle seed collard greens nori. Grape wattle seed kombu beetroot horseradish carrot squash brussels sprout chard. </p>
            </div>
            <div class="step-pane sample-pane bg-danger alert" data-step="3">
                <h4>Design Template</h4>
                <p>Nori grape silver beet broccoli kombu beet greens fava bean potato quandong celery. Bunya nuts black-eyed pea prairie turnip leek lentil turnip greens parsnip. Sea lettuce lettuce water chestnut eggplant winter purslane fennel azuki bean earthnut pea sierra leone bologi leek soko chicory celtuce parsley jícama salsify. </p>
            </div>
        </div>
    </div>
</div>
</body>
</html>

Upvotes: 0

Views: 597

Answers (1)

Interactive Llama
Interactive Llama

Reputation: 780

You'll need to initialize the wizard.

Either add data-initialize="wizard" or use JavaScript via $('.wizard').wizard();

See Wizard Usage.

Upvotes: 1

Related Questions