Commit graph

404 commits

Author SHA1 Message Date
Leo Horie
2b24c7a64d changing links to point to absolute path 2015-07-23 23:25:28 -04:00
Leo Horie
a57b1986ac update change log 2015-07-23 23:13:03 -04:00
Leo Horie
34a96d9428 added links to relevant sections 2015-07-23 23:05:09 -04:00
Leo Horie
5baab5f034 update change log 2015-07-23 22:04:43 -04:00
Leo Horie
372cf30e8e docs for catch 2015-07-23 21:52:32 -04:00
Leo Horie
ec1da49fa7 Merge pull request #711 from impinball/ts
Strengthen TS types, add documentation comments, remove diff noise.
2015-07-13 21:20:23 -04:00
Pedro Salgado
3c478fa225 rephrase sentence. 2015-07-13 10:47:22 -06:00
impinball
d4848c0379 Remove trailing whitespace 2015-07-09 03:38:42 -04:00
Leo Horie
1aa3057fed Merge pull request #707 from pelonpelon/patch-17
components.md - eliminate global variable introduced in previous commit
2015-07-07 15:56:34 -04:00
Leo Horie
9da3adaf3d Merge remote-tracking branch 'origin/next' into next 2015-07-07 13:19:00 -04:00
Leo Horie
55aedaabbc fix gzip size in docs 2015-07-07 11:41:47 -04:00
pelonpelon
dc36588160 components.md - eliminate global variable introduced in previous commit
Oops!
2015-07-07 09:04:08 -05:00
Leo Horie
4b2ec49ca9 Merge pull request #636 from pelonpelon/patch-9
Update components.md -- "Classic MVC" example broken
2015-07-06 21:28:44 -04:00
pelonpelon
648343c01c Help users find documentation on unmounting components
It's a common question on Gitter: How do I unmount a component?
Presently this Google Search: `unmount site:http://lhorie.github.io/`
returns one result: `mithril.route.html` -- I have no idea why, there's no "unmount" on the page.

Adding the words unmounting and unmount to this doc page will make them discoverable directly and through Google.
2015-07-02 18:54:59 -05:00
Leo Horie
fe7d0b6c9f fix select2 example 2015-06-29 18:59:41 -04:00
Christopher Venning
00db0b1ec0 Fixed typos in doc links 2015-06-16 16:15:42 -04:00
Jona H.
58d5b306fd fixed bower description
Technically, Bower isn't really a package manager for Node.js, but rather, it's made in Node and built for usage in the frontend, hence why many popular frontend libraries, such as JQuery or Bootstrap have their distributions on there. Bower also has its own package repositories.
2015-06-13 09:47:20 +02:00
Leo Horie
143b7ae3a6 Merge pull request #658 from venning/next
Change JSFiddle example to use Mithril 0.2.0
2015-06-11 15:30:55 -05:00
Christopher Venning
34fe969b61 Change JSFiddle example to use Mithril 0.2.0 2015-06-11 16:12:10 -04:00
Leo Horie
b766b255a8 Merge pull request #657 from shibukawa/patch-5
Update web-services.md
2015-06-11 12:17:48 -05:00
Yoshiki Shibukawa
47e35e32f3 Update web-services.md 2015-06-12 00:57:41 +09:00
Yoshiki Shibukawa
b911d17150 Update mithril.deferred.md 2015-06-12 00:56:03 +09:00
Leo Horie
4f7df003d1 Merge pull request #653 from venning/next
DOCS: missing comma in example
2015-06-11 09:59:58 -05:00
Joe Turner
79b127d094 Clarify order of m.route.mode and m.route
It's not completely obvious that `m.route.mode` needs setting before `m.route` is called (or at least it wasn't to me!), otherwise the initial routing from a URL typed in the location bar fails.  This PR adds a note in the documentation to make this more clear.
2015-06-11 15:28:57 +01:00
Christopher Venning
6ec6ede38a DOCS: missing comma in example 2015-06-09 19:10:51 -04:00
Leo Horie
a5acb12d0c Merge pull request #644 from pelonpelon/patch-10
Minor corrections to getting-started.md
2015-06-03 20:18:09 -05:00
pelonpelon
25cbdbbad5 community.md -- link to github wiki 2015-06-03 13:11:47 -05:00
pelonpelon
3883d029f2 Minor corrections to getting-started.md 2015-06-01 20:27:04 -05:00
pelonpelon
7ce8429bf4 Update components.md -- "Classic MVC" example
@ArthurClemens pointed out in this gitter comment:
https://gitter.im/lhorie/mithril.js?at=55664ba1d21e5ed02ff06e54
that the Classic MVC example is broken:
https://lhorie.github.io/mithril/components.html#classic-mvc

I wanted to show a working jsfiddle with these changes applied, but I couldn't figure out how to get a POST request working. I do, however, have a jsbin that is working, although there are significant changes in the code to allow for GET and POST.
http://jsbin.com/cokesu/2/edit?js,output

A redraw is called for every character entered in the jsbin but AFAICT, not in this PR. I don't know why. It's as though `oninput` is really `onchange`. It's possible to limit the redraw to once when the "save" button is clicked, but this requires a change in logic:

var ContactForm = {
    controller: function(args) {
        this.contact = m.prop(new Contact())
        this.save = function(contact) {
           Observable.trigger("saveContact", {contact: contact})
        }
    },
    view: function(ctrl, args) {
        var contact = ctrl.contact()

        return m("form", [
            m("label", "Name"),
            m("input[name=name]"),

            m("label", "Email"),
            m("input[name=email]"),

            m("button[type=button]", {onclick: function(){
              contact = {
                name: m.prop(this.parentNode.elements.name.value),
                email: m.prop(this.parentNode.elements.email.value)
              }
              ctrl.save(contact)
            
            }}, "Save")
        ])
    }
}
2015-05-28 03:47:40 -05:00
Brendon Murphy
7288afc18e Fix conversion in component stateless example 2015-05-08 20:16:12 -07:00
Daniel Loomer
c622283877 components.md 'trigger', not 'broadcast' 2015-05-07 15:54:51 -04:00
pelonpelon
592f31ee3d Clarification on m.mount() signature 2015-05-07 08:51:36 -05:00
glebcha
809447ed19 corrected typo 2015-05-07 10:37:34 +05:00
glebcha
7c55516d5d added jsfiddle with extended todo app example 2015-05-06 14:00:14 +05:00
Leo Horie
aa9a87ac48 Merge pull request #600 from shibukawa/patch-3
Update components.md
2015-05-04 11:20:36 -04:00
Leo Horie
2f61c535fe Merge pull request #601 from shibukawa/patch-4
Update mithril.route.md
2015-05-04 11:20:06 -04:00
Leo Horie
9d4ba26f50 Merge pull request #602 from shibukawa/patch-5
Update mithril.component.md
2015-05-04 11:19:46 -04:00
Leo Horie
931dbabbcd fix typo 2015-05-03 19:31:05 -04:00
Yoshiki Shibukawa
b70b4191b7 Update mithril.component.md 2015-05-03 18:29:57 +09:00
Yoshiki Shibukawa
b58d772cb9 Update mithril.route.md
Fix sample code minor comment bug.
2015-05-02 22:55:10 +09:00
Yoshiki Shibukawa
39c3118070 Update components.md
Fix sample code. Contact.list() should return a list of Contact instances.
2015-05-02 07:49:02 +09:00
Leo Horie
a3cc70863c fix link 2015-05-01 09:30:18 -04:00
Leo Horie
c45ba9600a add migration note 2015-04-30 21:52:38 -04:00
Leo Horie
cafedae62f Merge remote-tracking branch 'origin/next' into next 2015-04-29 21:44:00 -04:00
Leo Horie
6f1bdc916c fixed typo 2015-04-29 21:43:38 -04:00
pelonpelon
b48f8bf79c Docs: mithril.component.md - Recommended changes
These changes make the the text clearer to me. I did not want to change the voice of the text, but I tried to clear out some verbosity and improve consistency. I did my best not to interfere with the logic of the prose.

This document seems written to stand on its own, so I recommend the following changes:

- a general explanation of the args param as in `controller: function(args) {` and `view: function(ctrl, args) { ...` (when first used, well before the signature)
- a specific explanation of {data: args} in m.request() (mithril.request.md could use the same treatment)
- an explanation of the extras param as in `controller: function(args, extras) {` and `view: function(ctrl, args, extras) { ...`
- the term *rollback* should be explained or replaced
- caveat #3/#4: Should *root element* be changed to *top-most element* so as not to be confused with the element the component is mounted on ?
- in testing, explain why the first param to view is `null`

I hope you can find some of this useful.
2015-04-29 12:39:10 -05:00
pelonpelon
9d20a7cd8a Update mithril.component.md 2015-04-29 11:57:51 -05:00
pelonpelon
9c6cbab43e Update mithril.component.md
- The term *rollback* should be explained or replaced
- caveat #3/#4: Should *root element* be changed to *top-most element* so as not to be confused with the element the component is mounted on ?
2015-04-29 11:50:07 -05:00
pelonpelon
62e38287f7 Docs: mithril.component.m - Recommended changes
These changes make the the text clearer to me. I did not want to change the voice of the text, but I tried to clear out some verbosity and improve consistency. I did my best not to interfere with the logic of the prose.

This document seems written to stand on its own, so I recommend the following additions:

- a general explanation of the args param as in `controller: function(args) {` and `view: function(ctrl, args) { ...`
- a specific explanation of how {data: args} in m.request() becomes url parameters (mithril.request.md could use the same treatment)
- an explanation of the extras param as in `controller: function(args, extras) {` and `view: function(ctrl, args, extras) { ...`
2015-04-28 23:26:18 -05:00
Leo Horie
5ec440da21 add more caveats to docs 2015-04-28 16:23:38 -04:00