Commit graph

1544 commits

Author SHA1 Message Date
Christopher Venning
00db0b1ec0 Fixed typos in doc links 2015-06-16 16:15:42 -04:00
Christopher Venning
2dbf7b9f0c Stop subsequent redraws appending arguments to parameterized components 2015-06-15 17:19:35 -04:00
Leo Horie
9a315fb116 Merge pull request #666 from schisma/patch-1
(docs) fixed bower description
2015-06-15 11:47:45 -05: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
Richard Eames
fe75b4c6f0 Update mithril-tests.js
Added tests for parsing empty string, and building from empty object.
This is the test case for #660
2015-06-11 16:15:44 -06: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
Leo Horie
c32b723490 Merge pull request #656 from shibukawa/patch-2
Update mithril.deferred.md
2015-06-11 12:17:36 -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
Leo Horie
846128a2f9 Merge pull request #654 from oampo/patch-1
Clarify order of m.route.mode and m.route
2015-06-11 09:59:46 -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
c57b0b4047 prevent nonsensical IE error 2015-06-09 16:27:57 -05:00
Leo Horie
e6d6db6123 Merge remote-tracking branch 'origin/next' into next 2015-06-09 16:22:20 -05:00
Leo Horie
f6d436da68 prevent nonsensical IE error 2015-06-09 16:21:55 -05:00
Leo Horie
4a946b2216 Merge pull request #649 from nasitra/remove-unused-variables
Remove unused variables
2015-06-08 12:15:53 -05:00
nasitra
756cbb1924 Remove unused variables 2015-06-07 20:38:08 +09:00
Leo Horie
ff5b04c823 Merge pull request #643 from statianzo/component-first-arg
accept component as first argument to m()
2015-06-03 20:18:36 -05: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
Leo Horie
d3343f8c30 Merge pull request #645 from pelonpelon/patch-13
community.md -- link to github wiki
2015-06-03 20:17:53 -05:00
pelonpelon
25cbdbbad5 community.md -- link to github wiki 2015-06-03 13:11:47 -05:00
Jason Staten
a406de408a Triple equals 2015-06-02 06:44:42 -06:00
pelonpelon
3883d029f2 Minor corrections to getting-started.md 2015-06-01 20:27:04 -05:00
Jason Staten
d89810234a accept component as first argument to m() 2015-06-01 15:11:44 -06:00
Redstone Zhao
4c1d7892aa function() {} -> noop 2015-05-31 09:26:25 +08: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
Leo Horie
26a6664cd0 Merge pull request #613 from bemurphy/bem-fix_component_example
Fix conversion in component stateless example
2015-05-11 10:23:35 -04:00
Brendon Murphy
7288afc18e Fix conversion in component stateless example 2015-05-08 20:16:12 -07:00
Leo Horie
0ec4ed451f Merge remote-tracking branch 'origin/next' into next 2015-05-07 20:46:37 -04:00
Leo Horie
390bf49e8c Merge pull request #610 from fuzetsu/next
components.md 'trigger', not 'broadcast'
2015-05-07 16:40:34 -04:00
Daniel Loomer
c622283877 components.md 'trigger', not 'broadcast' 2015-05-07 15:54:51 -04:00
Leo Horie
d4ccb09041 Merge pull request #609 from pelonpelon/patch-3
Clarification on m.mount() signature
2015-05-07 10:25:37 -04:00
pelonpelon
592f31ee3d Clarification on m.mount() signature 2015-05-07 08:51:36 -05:00
Leo Horie
6e139e42b7 Merge pull request #608 from glebcha/next
corrected typo
2015-05-07 08:50:25 -04:00
glebcha
809447ed19 corrected typo 2015-05-07 10:37:34 +05:00
Leo Horie
3b8d743c1b Merge pull request #606 from glebcha/next
added jsfiddle with extended todo app example
2015-05-06 08:57:03 -04:00
glebcha
7c55516d5d added jsfiddle with extended todo app example 2015-05-06 14:00:14 +05:00
Leo Horie
2d5d042131 allow m.redraw(true) to force-render component 2015-05-05 21:16:29 -04:00
Leo Horie
cd403225a2 try clean up archive folder 2015-05-05 14:31:47 -04:00
Leo Horie
cb5f7b0e12 as yaml 2015-05-05 10:40:06 -04:00
Leo Horie
8eb68edae6 Merge remote-tracking branch 'origin/next' into next 2015-05-05 10:37:20 -04:00
Leo Horie
509c4dab95 fix language reporting https://github.com/github/linguist#troubleshooting 2015-05-05 10:36:52 -04:00
Leo Horie
93105745d8 Merge pull request #599 from mindeavor/propify-catch
Add `catch` to promise-like objects
2015-05-04 11:21:14 -04: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