MooTools Bootstrap 2.0

604 views
Skip to first unread message

Aaron Newton

unread,
Feb 20, 2012, 5:29:28 PM2/20/12
to mootools-users

Philip Thompson

unread,
Feb 20, 2012, 5:44:59 PM2/20/12
to mootool...@googlegroups.com
Very cool. Haven't used bootstrap before and not totally sure what I would use it for, but I might be able to think of something...

~Philip


On Mon, Feb 20, 2012 at 4:29 PM, Aaron Newton <anu...@gmail.com> wrote:
For those of you interested in it:


Aaron Newton

unread,
Feb 20, 2012, 6:16:05 PM2/20/12
to mootool...@googlegroups.com
I'm on my 4th project with it. Here's one:

http://www.wibidata.com

You don't have to use all of it, but the parts you do use will make your life easier...

Philip Thompson

unread,
Feb 20, 2012, 6:30:43 PM2/20/12
to mootool...@googlegroups.com
Thanks for the info. Always up for diving into something new.

Dimitar Christoff

unread,
Feb 21, 2012, 4:06:42 AM2/21/12
to mootool...@googlegroups.com
On 20/02/2012 22:29, Aaron Newton wrote:
> For those of you interested in it:
>
> http://www.clientcide.com/uncategorized/mootools-bootstrap-2-0/

very cool. good timing, saves me from having to convert anything else...

just a heads up - I have converted 2 of the twitter js files that are
missing from Arron's release:

Button.js - https://github.com/DimitarChristoff/mootstrap-button - click
behavior for buttons (change text, lock them etc - with events and a
element setter/getter for more moo power)

Scrollspy.js - https://github.com/DimitarChristoff/mootstrap-scrollspy -
nothing to do with David Walsh' ScrollSpy - a port of the twitter
scrollspy by Arian and myself.

Also to consider:
http://mootools.net/forge/p/twipsy - Twispy (now renamed to
bootstrap-tooltip.js)

Best regards
--
Dimitar Christoff

"JavaScript is to JAVA what hamster is to ham"
Personal blog: http://fragged.org/ - Twitter: @D_mitar

Aaron Newton

unread,
Feb 21, 2012, 4:10:24 AM2/21/12
to mootool...@googlegroups.com
These are on my list. Part of the holdup is that to incorporate them I
need tests and docs which I don't have time to write at the moment...

Dimitar Christoff

unread,
Feb 21, 2012, 5:07:03 AM2/21/12
to mootool...@googlegroups.com
On Tue Feb 21 09:10:24 2012, Aaron Newton wrote:
> These are on my list. Part of the holdup is that to incorporate them I
> need tests and docs which I don't have time to write at the moment...

Oh, sure, I can fork your repo, add them, mod them to fit the style if
needed and add some test specs, if you'll have them.

Best regards,

Aaron Newton

unread,
Feb 22, 2012, 11:14:55 AM2/22/12
to mootool...@googlegroups.com
It would speed things up. You'll want to install my dev environment to
run all the tests and stuff. Grab the clientcide branch of
mootools-development off github.

Rolf Langenhuijzen

unread,
Mar 26, 2012, 6:44:13 AM3/26/12
to mootool...@googlegroups.com
Neat stuff, I avoided Bootstrap original just because of jQuery, but the moo version especially with Behavior/Delegator the code is (to me anyway) much cleaner.

I needed a delegator to hide a popup and that took about -1 minute to make as it's basically copying Delegator.BS.ShowPopup.js to Delegator.BS.HidePopup.js :)
But would you add that to the project?

I also added two lines to the Bootstrap.Popup that adds the css class modal-open to the body onShow and removes it onHide, this is for popover and tooltip z-index classes as specified in the css so you can use popovers in popups. Should I fork and send a pull request?

@Dimitar, are you planning adding yours to Aaron's? Would be neat to complete it.

Cheers,
Rolf

Dimitar Christoff

unread,
Mar 26, 2012, 9:13:35 AM3/26/12
to mootool...@googlegroups.com
> @Dimitar, are you planning adding yours to Aaron's? Would be neat to
> complete it.
>

I am currently working with Simon Smith on mootstrap-tabs as well - then
will see if I can actually sort it with a pull request as Aaron
suggested. The idea was is to unify my individual plugins under one repo
but that's kind of what the Aaron port already does.

The problem is, I tend to use Buster.js for testing and the other specs
etc Aaron uses are not familiar to me so I'd have to do some rewrites /
fixes but it's not too-far fetched.

Best regards
--
Dimitar Christoff

"JavaScript is to JAVA what hamster is to ham"

http://fragged.org/ | @D_mitar | https://github.com/DimitarChristoff

Aaron Newton

unread,
Mar 26, 2012, 10:47:06 AM3/26/12
to mootool...@googlegroups.com
The specs for Behavior stuff are really easy to author. The test is basically an HTML example that should instantiate your class and the unit tester verifies that it does. You can then make additional assertions.

I'll grant that my testing environment has grown a bit esoteric, but it is at least easy to install.

$ cd mootools-development
$ git checkout behavior
$ ./install
$ ./go run

Regarding your proposed additions to the project, they are most welcome. In particular, there are features in Bootstrap 2.0 that I have no code for (scrollspy, the carousel, typeahead, collapse). I have a behavior for Harald's autocompleter, so that just needs to be update to use Bootstrap's DOM. Carousel's take about 10 minutes to author, and collapse == accordion. It's just that I haven't needed these components and haven't had the time to author them, their tests, the docs, and the demos.

But any and all changes are welcome. I'm more likely to include them if they update the docs and demos. If unit tests are the only thing that you guys can't get to and the rest is there I'm still more likely to pull it as those don't take me much work. Example unit test:

Dimitar Christoff

unread,
Mar 26, 2012, 11:33:08 AM3/26/12
to mootool...@googlegroups.com
On 26/03/2012 15:47, Aaron Newton wrote:
> The specs for Behavior stuff are really easy to author. The test is
> basically an HTML example that should instantiate your class and the
> unit tester verifies that it does. You can then make additional assertions.
>
> I'll grant that my testing environment has grown a bit esoteric, but it
> is at least easy to install.
>
> $ git clone git://github.com/anutron/mootools-development.git
> <http://github.com/anutron/mootools-development.git>

> $ cd mootools-development
> $ git checkout behavior
> $ ./install
> $ ./go run
> //then open http://localhost:9876

I got that working fine already but what I don't get is how the test
environment on that port relates to the mootools-boostrap repo, which
lies elsewhere.

do i mod the settings.py file to point to ../mootools-bootstrap/ ?

sorry for being thick here. :)

best regards,

Dimitar Christoff

unread,
Mar 26, 2012, 12:18:56 PM3/26/12
to mootool...@googlegroups.com
Added some stuff already and started to write docs in your format.

https://github.com/DimitarChristoff/mootools-bootstrap/blob/master/Docs/UI/Bootstrap.Scrollspy.md

If this is to standard, I will finish it up and read up on behaviors and
what it does over the next day or so

Best regards

Aaron Newton

unread,
Mar 26, 2012, 12:35:33 PM3/26/12
to mootool...@googlegroups.com
If you did that then you'll have a lib/bootstrap directory that has all my js in it. If you want to add another repo, yes, you'll need to edit the settings, but the easier thing to do is to fork my bootstrap repo and check out your fork in lib/bootstrap.

(after installing)
$ cd mootools-development/lib/bootstrap
$ git remote add me [your github repo url]
$ git checkout -b myNewFeature
$ # make some changes
$ git add .
$ git commit -m "some new feature"
$ git push me myNewFeature
$ # send me a pull request

By working there you can author new specs and whatnot. Just add a new specs file in lib/bootsrap/tests/specs and update the package.yml there, then open the dev server in your browser and run the tests.

I can, if it helps, make a quick screen cast of this.

new_guy

unread,
Mar 28, 2012, 1:11:36 PM3/28/12
to mootool...@googlegroups.com
that would rock my world Dimitar 
Reply all
Reply to author
Forward
0 new messages