This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| renderHeaders : Tabs -> Html Msg | |
| renderHeaders currentTab = | |
| ul [ class "nav nav-tabs" ] | |
| [ li [ class "nav-item" ] | |
| [ a | |
| [ class "nav-link" | |
| , onClick (ChangeTab Step1) | |
| , classList [ ( "active", currentTab == Step1 ) ] | |
| ] | |
| [ text "Step 1" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enderHeaders : Tabs -> Html Msg | |
| renderHeaders currentTab = | |
| ul [ class "nav nav-tabs" ] | |
| [ li [ class "nav-item" ] | |
| [ a | |
| [ class "nav-link" | |
| , onClick (ChangeTab Step1) | |
| ] | |
| [ text "Step 1" ] | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| update : Msg -> Model -> Model | |
| update msg model = | |
| case msg of | |
| ChangeTab tab -> | |
| { model | currentTab = tab } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Msg | |
| = ChangeTab Tabs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| renderTabContent : Tabs -> Html Msg | |
| renderTabContent currentTab = | |
| case currentTab of | |
| Step1 -> | |
| div [] [ text "Content for tab1" ] | |
| Step2 -> | |
| div [] [ text "Content for tab2" ] | |
| Step3 -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| renderHeaders : Tabs -> Html Msg | |
| renderHeaders currentTab = | |
| ul [ class "nav nav-tabs" ] | |
| [ li [ class "nav-item" ] | |
| [ a | |
| [ class "nav-link" | |
| ] | |
| [ text "Step 1" ] | |
| ] | |
| , li [ class "nav-item" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| view : Model -> Html Msg | |
| view model = | |
| div [] | |
| [ renderHeaders model.currentTab | |
| , renderTabContent model.currentTab | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type alias Model = | |
| { currentTab : Tabs } | |
| -- Don't forget to setup the initial values for the model. In our case we wan't the app load the first step. | |
| initialModel : Model | |
| initialModel = | |
| { currentTab = Step1 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Tabs | |
| = Step1 | |
| | Step2 | |
| | Step3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let Elm = require('../../elm/cvs/cvs.elm'); | |
| $(document).ready(function(){ | |
| $("#cvs-search-form").submit(function(event){ | |
| let params = $(this).serializeArray(); | |
| let querystring = $.param(params); | |
| let composed_url = `${this.baseURI}?${querystring}`; | |
| cvs.ports.getURL.send(composed_url); | |
| event.preventDefault(); |
NewerOlder