[Moo] MooTools for Bootstrap 3.0

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

[Moo] MooTools for Bootstrap 3.0

nutron
My latest release of MooTools Bootstrap is up.

Demos / docs: http://bit.ly/QL4fbQ

Blog post about this release:

Bootstrap 3.0, Clientcide 3.1.0, Behavior 1.3.0, and More Behaviors 1.0.8

Tweet for your retweeting pleasure: https://twitter.com/anutron/status/373979900329205760

Share and enjoy.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] MooTools for Bootstrap 3.0

Sitthykun
Like!!


On Sun, Sep 1, 2013 at 8:27 AM, Aaron Newton <[hidden email]> wrote:
My latest release of MooTools Bootstrap is up.

Demos / docs: http://bit.ly/QL4fbQ

Blog post about this release:

Bootstrap 3.0, Clientcide 3.1.0, Behavior 1.3.0, and More Behaviors 1.0.8

Tweet for your retweeting pleasure: https://twitter.com/anutron/status/373979900329205760

Share and enjoy.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
Sitthykun LY
a little developer in the big world \o/
mobile: +85595 7788 39
skype: cityx9
twitter: sitthykun <http://twitter.com/sitthykun>
site: niyum.com

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] MooTools for Bootstrap 3.0

fractorr
First this is awesome but I just had a couple questions.  Is this meant as a replacement for Bootstrap or to work with Bootstrap?  There are hundred's of templates that can be bought for Bootstrap, so if the data attributes do not match Bootstrap then that would mean that all those existing Bootstrap templates would not work with yours?

I am just curious as I have a few sites I wrote in MooTools and JxLib that I am wanting to update and was thinking about updating to Bootstrap but was dreading it because I do not like jQuery.



On Sun, Sep 1, 2013 at 9:40 PM, Sitthykun LY <[hidden email]> wrote:
Like!!


On Sun, Sep 1, 2013 at 8:27 AM, Aaron Newton <[hidden email]> wrote:
My latest release of MooTools Bootstrap is up.

Demos / docs: http://bit.ly/QL4fbQ

Blog post about this release:

Bootstrap 3.0, Clientcide 3.1.0, Behavior 1.3.0, and More Behaviors 1.0.8

Tweet for your retweeting pleasure: https://twitter.com/anutron/status/373979900329205760

Share and enjoy.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
Sitthykun LY
a little developer in the big world \o/
mobile: <a href="tel:%2B85595%207788%2039" value="+85595778839" target="_blank">+85595 7788 39
skype: cityx9
twitter: sitthykun <http://twitter.com/sitthykun>
site: niyum.com

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
Trevor Orr
FractOrr Computer Services
fractorr.com
541-490-5697

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

[Moo] Re: MooTools for Bootstrap 3.0

underscore_05
In reply to this post by nutron
Hello, I am experimenting with you Behavior and Delegator. 
Your mootools-bootstrap has only one example on how to use Delegator and Behavior in combination (showPop + BS.Popup).
Now, since i am still studying. I want to create a delegator for the BS.Popover behavior by creating new based from the showPop delegator.

The "Show Popover" button only works when I hover/unhover first on the Element with Popover behavior.
here's the fiddle http://jsfiddle.net/URKSB/

BTW. Another problem I encounter is that link.getElement() dont get any element by passing #{target element} or .{target element} instead it returns element by !+#{target element} since the target element is a previous sibling of the triggered element.






Noong Linggo, Setyembre 01 2013 09:27:45 UTC+8, si Nutron ay sumulat:
My latest release of MooTools Bootstrap is up.

Demos / docs: http://bit.ly/QL4fbQ

Blog post about this release:

Bootstrap 3.0, Clientcide 3.1.0, Behavior 1.3.0, and More Behaviors 1.0.8

Tweet for your retweeting pleasure: https://twitter.com/anutron/status/373979900329205760

Share and enjoy.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

[Moo] Re: MooTools for Bootstrap 3.0

underscore_05
In reply to this post by nutron
Thanks a lot !!! 

Noong Linggo, Setyembre 01 2013 09:27:45 UTC+8, si Nutron ay sumulat:
My latest release of MooTools Bootstrap is up.

Demos / docs: http://bit.ly/QL4fbQ

Blog post about this release:

Bootstrap 3.0, Clientcide 3.1.0, Behavior 1.3.0, and More Behaviors 1.0.8

Tweet for your retweeting pleasure: https://twitter.com/anutron/status/373979900329205760

Share and enjoy.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] MooTools for Bootstrap 3.0

nutron
In reply to this post by fractorr
This is just an implementation of the JavaScript - all of the CSS is vanilla Bootstrap. If you have a theme that invokes these components with data- tags per the default (jQuery) implementation, they won't work automatically; you'll either have to change the syntax or write code to invoke my JS classes based on their syntax. For example, you could write (using MooTools):

$$('[data-toggle=tootlip]').each(function(element){
  new Bootstrap.Tooltip(element);
});

And it would work. If you wanted to support all the options, you'd have to parse those out of the HTML and pass them through to the class (see: http://dev.clientcide.com/MooTools%20Bootstrap/viewdoc/lib/bootstrap/Docs/UI/Bootstrap.Tooltip.md). The Behavior stuff just does that for you, albeit with its own syntax.


On Mon, Sep 2, 2013 at 8:03 AM, Trevor Orr <[hidden email]> wrote:
First this is awesome but I just had a couple questions.  Is this meant as a replacement for Bootstrap or to work with Bootstrap?  There are hundred's of templates that can be bought for Bootstrap, so if the data attributes do not match Bootstrap then that would mean that all those existing Bootstrap templates would not work with yours?

I am just curious as I have a few sites I wrote in MooTools and JxLib that I am wanting to update and was thinking about updating to Bootstrap but was dreading it because I do not like jQuery.



On Sun, Sep 1, 2013 at 9:40 PM, Sitthykun LY <[hidden email]> wrote:
Like!!


On Sun, Sep 1, 2013 at 8:27 AM, Aaron Newton <[hidden email]> wrote:
My latest release of MooTools Bootstrap is up.

Demos / docs: http://bit.ly/QL4fbQ

Blog post about this release:

Bootstrap 3.0, Clientcide 3.1.0, Behavior 1.3.0, and More Behaviors 1.0.8

Tweet for your retweeting pleasure: https://twitter.com/anutron/status/373979900329205760

Share and enjoy.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
Sitthykun LY
a little developer in the big world \o/
mobile: <a href="tel:%2B85595%207788%2039" value="+85595778839" target="_blank">+85595 7788 39
skype: cityx9
twitter: sitthykun <http://twitter.com/sitthykun>
site: niyum.com

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
Trevor Orr
FractOrr Computer Services
fractorr.com
<a href="tel:541-490-5697" value="+15414905697" target="_blank">541-490-5697

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Re: MooTools for Bootstrap 3.0

nutron
In reply to this post by underscore_05
First, I *strongly* recommend that you read the docs for Behavior carefully. It's a very elegant system that I've used for a while now and it's very robust, but it does have a learning curve.

I'm having some trouble parsing your questions, but I'll do my best to answer them.

On Mon, Sep 2, 2013 at 11:31 AM, underscore_05 <[hidden email]> wrote:
Hello, I am experimenting with you Behavior and Delegator. 
Your mootools-bootstrap has only one example on how to use Delegator and Behavior in combination (showPop + BS.Popup).
Now, since i am still studying. I want to create a delegator for the BS.Popover behavior by creating new based from the showPop delegator.

You should look at the other delegators (there's lots more in the more-behaviors repo: https://github.com/anutron/more-behaviors)  to get a feel for how they work, but the key thing to remember is that Behaviors instantiate things while Delegators react to use behavior. So if you want to watch for clicks or submissions or whatever, that's going to be Delegator, but if you have a widget that needs to be instantiated, that's Behavior. There's also a primary rule that the different filters (Behavior) and triggers (Delegator) don't know about each other and they aren't order dependent.

Anyway, looking at your code, the conflict is arising because I've delayed instantiating the popup until the popop element is moused over (https://github.com/anutron/mootools-bootstrap/blob/master/Source/Behaviors/Behavior.BS.Popover.js#L36). So your trigger is attempting to invoke a method on a class that hasn't been instantiated yet (the console echos: Could not apply the trigger BS.showPopover Cannot call method 'show' of null).

Here's a version that does work: http://jsfiddle.net/URKSB/1/

But it's not ideal. This particular filter with it's built in delay (which is done for optimization purposes, tooltips and popovers are generally never displayed if they aren't moused-over, and a page with hundreds of them might load sluggishly. further, delegating on mouseover has big performance issues, so you have to add the event to each element itself...) is problematic. Most of them don't do this.
 
The "Show Popover" button only works when I hover/unhover first on the Element with Popover behavior.
here's the fiddle http://jsfiddle.net/URKSB/

BTW. Another problem I encounter is that link.getElement() dont get any element by passing #{target element} or .{target element} instead it returns element by !+#{target element} since the target element is a previous sibling of the triggered element.

As pointed out in the docs, all selectors (by convention) are relative to the element with the filter on them, so myElement.getElements(api.get('someTarget')) means that it looks for children of myElement unless you do some sort of !selector (e.g. !body #foo). This is for consistency's sake.

Also note that the api object has two helpers for this - api.getElement('optionName') and api.getElements('optionName'). This allows you to just do:

var target = api.getElement('target');

If the element is not found, the filter stops executing and an error is thrown in the console. You can optionally pass in 'warn' in as a second argument in which case the error is posted to console as a warning and execution is NOT stopped.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Re: MooTools for Bootstrap 3.0

underscore_05
Yes I've already seen the delayUntil property of the BS.Popover behavior.
Upon removing it I can now get the behaviorResult of the target
element. Having the option when to instantiate object in behavior is a
really tricky part for me at first :) About the selector, i just miss
something so I got confused.

All in all. Thank you for your great work! Long live mootools!

--

---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Re: MooTools for Bootstrap 3.0

nutron
It's possible to override that delay without editing the file. I'm on my phone right now so I can't look it up, but basically you call something like:

var filter = Behavior.getFilter(name);
delete filter.delayUntil;
Behavior.addGlobalFilter(name, filter, true);

The last line re-adds the filter with your change and forces it to overwrite the old one. It's something like that...


On Mon, Sep 2, 2013 at 10:50 PM, Richard Neil Roque <[hidden email]> wrote:

Yes I've already seen the delayUntil property of the BS.Popover behavior.
Upon removing it I can now get the behaviorResult of the target
element. Having the option when to instantiate object in behavior is a
really tricky part for me at first :) About the selector, i just miss
something so I got confused.

All in all. Thank you for your great work! Long live mootools!

--

---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

[Moo] Re: MooTools for Bootstrap 3.0

underscore_05
In reply to this post by nutron
Thank you Aaron, I've been very amazed that I am learning a lot by just participating in this group
and reading code comments. Yes, I accept that the learning curve with your Behavior is a bit steep
but hope I can cope up with it. 

I am always looking forward for your future awesome work specially with MooTools! Kudos!



Noong Linggo, Setyembre 01 2013 09:27:45 UTC+8, si Nutron ay sumulat:
My latest release of MooTools Bootstrap is up.

Demos / docs: http://bit.ly/QL4fbQ

Blog post about this release:

Bootstrap 3.0, Clientcide 3.1.0, Behavior 1.3.0, and More Behaviors 1.0.8

Tweet for your retweeting pleasure: https://twitter.com/anutron/status/373979900329205760

Share and enjoy.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

[Moo] Re: MooTools for Bootstrap 3.0

underscore_05
In reply to this post by nutron
Hello again! Can you please post an example on how to use 

Behavior.Startup? 

Will this Behavior tends to avoid  this line of codes?

window.addEvent('domready', function(){
var behavior = new Behavior({}).apply(document.body);
var delegator = new Delegator({
getBehavior: function(){ return behavior; }
}).attach(document.body);
});

or just the line for new Delagator that attaches to the body? 

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Re: MooTools for Bootstrap 3.0

nutron
So, you'll always need the declarations to instantiate Behavior and Delegator, but that is, in theory, the only in-line JavaScript you have (if you want; it's how I tend to develop now with no big DomReady statements).

To answer your question, let me first reiterate what Behavior and Delegator do:
  • Behavior: Instantiates classes. It reads your markup and creates a new instance of your class. It should always return that instance.
  • Delegator: Invokes code based on an interaction (such as a click). This replaces any code you would attach to a DOM element with addEvent.
So, for example, let's say that we have a tab UI. We have a Tabs class and we need to instantiate it. Our behavior would look something like:

Behavior.addGlobalFilter('Tabs', function(element, api){
  return new Tabs(api.getElements('.tab'), api.getElements('.section'));
});

(this is a super simplistic example)

But let's say you want to load your HTML and conditionally specify which tab should be selected on startup based on which tab the user had previously selected. Let's say, for the sake of keeping my example short, that you're going to store the selected index in a cookie.

Behavior.addGlobalFilter('Tabs', function(element, api){
  return new Tabs(api.getElements('.tab'), api.getElements('.section'), {
    selected: Cookie.read('selectedIndex') || 0,
    onSelect: function(index){
      Cookie.write('selectedIndex');
    }
  });
});

And in your HTML you do something like:

<div data-behavior="Tabs">
  <ul>
    <li class="tab">one</li>
    <li class="tab">two</li>
  <ul>
  <div class="sections">
    <div class="section"></div>
    <div class="section"></div>
  </div>
</div>

This is all well and good. This is what Behavior is for. If the user selects a tab the tab is selected and the state is stored. If they reload the page the tab selection is preserved. Good stuff.

Now, let's say you have a Delegator in the mix. Let's say your tabs are using the Ajax delegator to load in their content when you click them:

<div data-behavior="Tabs">
  <ul>
    <li class="tab"><a data-trigger="Ajax" data-ajax-options="
      'target': '!div #one'
    " href="one.html">one</a></li>
    <li class="tab"><a data-trigger="Ajax" data-ajax-options="
      'target': '!div #two'
    " href="two.html">two</a></li>
  <ul>
  <div class="sections">
    <div class="section" id="one"></div>
    <div class="section" id="two"></div>
  </div>
</div>

The problem is you need to load the content for the tab that got selected. Now, you could go write more code to bind these two things together - the Tabs behavior and the Ajax trigger, but that's a little messy. We already have code that manages these two things, we just need a way to have the Ajax trigger fired if the tab itself is selected. 

So here you'd use the Startup delegator which allows you to conditionally evaluate the state of the DOM and invoke a trigger.

<div data-behavior="Tabs">
  <ul>
    <li class="tab"><a data-trigger="Ajax"
    data-ajax-options="
      'target': '!div #one'
    " data-behavior="Startup" 
    data-startup-options="
      'delegators': {
        'Ajax': {
          'target': '!li',
          'method': 'hasClass',
          'arguments': ['selected'],
          'value': true
        }
      }
    " href="one.html">one</a></li>
    <li class="tab selected"><a data-trigger="Ajax" data-ajax-options="
      'target': '!div #two'
    " data-behavior="Startup" 
    data-startup-options="
      'delegators': {
        'Ajax': {
          'target': '!li',
          'method': 'hasClass',
          'arguments': ['selected'],
          'value': true
        }
      }
    " href="two.html">two</a></li>
  <ul>
  <div class="sections">
    <div class="section" id="one"></div>
    <div class="section" id="two"></div>
  </div>
</div>

Now, this is a somewhat verbose syntax but typically you're going to be typing it only once in some sort of loop. Anyway, the Startup behavior evaluates your configuration and then invokes the related trigger.



On Tue, Sep 3, 2013 at 10:28 AM, underscore_05 <[hidden email]> wrote:
Hello again! Can you please post an example on how to use 

Behavior.Startup? 

Will this Behavior tends to avoid  this line of codes?

window.addEvent('domready', function(){
var behavior = new Behavior({}).apply(document.body);
var delegator = new Delegator({
getBehavior: function(){ return behavior; }
}).attach(document.body);
});

or just the line for new Delagator that attaches to the body? 

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

[Moo] Re: MooTools for Bootstrap 3.0

underscore_05
In reply to this post by nutron
Thank you. I think I need a considerable amount of time to put it all in my head. 
And I somewhat understand some of it by guessing (not proven yet) 

BTW. Thank you for your time In my beginners questions. See you next time :)

Noong Linggo, Setyembre 01 2013 09:27:45 UTC+8, si Nutron ay sumulat:
My latest release of MooTools Bootstrap is up.

Demos / docs: http://bit.ly/QL4fbQ

Blog post about this release:

Bootstrap 3.0, Clientcide 3.1.0, Behavior 1.3.0, and More Behaviors 1.0.8

Tweet for your retweeting pleasure: https://twitter.com/anutron/status/373979900329205760

Share and enjoy.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Re: MooTools for Bootstrap 3.0

nutron
You're most welcome.


On Tue, Sep 3, 2013 at 11:32 AM, underscore_05 <[hidden email]> wrote:
Thank you. I think I need a considerable amount of time to put it all in my head. 
And I somewhat understand some of it by guessing (not proven yet) 

BTW. Thank you for your time In my beginners questions. See you next time :)

Noong Linggo, Setyembre 01 2013 09:27:45 UTC+8, si Nutron ay sumulat:
My latest release of MooTools Bootstrap is up.

Demos / docs: http://bit.ly/QL4fbQ

Blog post about this release:

Bootstrap 3.0, Clientcide 3.1.0, Behavior 1.3.0, and More Behaviors 1.0.8

Tweet for your retweeting pleasure: https://twitter.com/anutron/status/373979900329205760

Share and enjoy.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

[Moo] Re: MooTools for Bootstrap 3.0

underscore_05
In reply to this post by nutron
Hello again!,

I studied the Startup Behavior but It seems that its not working (for me).
Here's the fiddle for it. http://jsfiddle.net/LQvHV/

I am pretty sure that what I am doing is correct but I dont know its not working.
I think the error comes with this lines of codes inside Behavior.Startup.js
api.getDelegator().trigger(delegator, el);

Respectfully yours,
Richard


Noong Linggo, Setyembre 01 2013 09:27:45 UTC+8, si Nutron ay sumulat:
My latest release of MooTools Bootstrap is up.

Demos / docs: http://bit.ly/QL4fbQ

Blog post about this release:

Bootstrap 3.0, Clientcide 3.1.0, Behavior 1.3.0, and More Behaviors 1.0.8

Tweet for your retweeting pleasure: https://twitter.com/anutron/status/373979900329205760

Share and enjoy.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

[Moo] Re: MooTools for Bootstrap 3.0

Rolf Langenhuijzen
Hi Richard,

Wanted to take a look but jsfiddle is down at the moment. I'll try again in a few hours.
Maybe you should start a separate thread regarding Behavior and Delegator and we stop "polluting" this Bootstrap 3 release thread (even though they work together).
There's also the clientcide group at Google that you can join for this btw.

I've worked quite some time with Behavior and still have much to learn (or think about how to tackle specific problems in a the most clean way), so don't feel too stupid if you're just getting into it.

Rolf

On Wednesday, September 4, 2013 10:59:28 AM UTC+2, underscore_05 wrote:
Hello again!,

I studied the Startup Behavior but It seems that its not working (for me).
Here's the fiddle for it. http://jsfiddle.net/LQvHV/

I am pretty sure that what I am doing is correct but I dont know its not working.
I think the error comes with this lines of codes inside Behavior.Startup.js
api.getDelegator().trigger(delegator, el);

Respectfully yours,
Richard


Noong Linggo, Setyembre 01 2013 09:27:45 UTC+8, si Nutron ay sumulat:
My latest release of MooTools Bootstrap is up.

Demos / docs: http://bit.ly/QL4fbQ

Blog post about this release:

Bootstrap 3.0, Clientcide 3.1.0, Behavior 1.3.0, and More Behaviors 1.0.8

Tweet for your retweeting pleasure: https://twitter.com/anutron/status/373979900329205760

Share and enjoy.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Re: MooTools for Bootstrap 3.0

underscore_05
I understand. thank you

--

---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Re: MooTools for Bootstrap 3.0

nutron
This is a simple fix.


Instances of Behavior and Delegator don't know about each other magically. Delegator has to be given a method to fetch its paired Behavior, and, if you're using any filter that calls `api.getDelegator()` then Behavior has to know about its bound Delegator, too. So you just need to do this:

var behavior = new Behavior({});
var delegator = new Delegator({
    getBehavior: function () {
        return behavior;
    }
}).attach(document.body);
behavior.setDelegator(delegator).apply(document.body);

I.e. move the `.apply(document.body);` until after you've created an instance of Delegator and pass that Delegator instance into behavior. My docs example didn't do this because I wasn't using Startup, but it should.

Maybe I'll add a Behavior.init() method that just does these few lines for you for when your use case is the typical one...


On Wed, Sep 4, 2013 at 2:56 AM, Richard Neil Roque <[hidden email]> wrote:
I understand. thank you

--

---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Re: MooTools for Bootstrap 3.0

underscore_05
Yes, I already had a fixed awhile ago and you're right. 
Anyway, thank you again and I hope you dont get tired of giving us a support
~ more powers

Noong Miyerkules, Setyembre 04 2013 23:20:47 UTC+8, si Nutron ay sumulat:
This is a simple fix.


Instances of Behavior and Delegator don't know about each other magically. Delegator has to be given a method to fetch its paired Behavior, and, if you're using any filter that calls `api.getDelegator()` then Behavior has to know about its bound Delegator, too. So you just need to do this:

var behavior = new Behavior({});
var delegator = new Delegator({
    getBehavior: function () {
        return behavior;
    }
}).attach(document.body);
behavior.setDelegator(delegator).apply(document.body);

I.e. move the `.apply(document.body);` until after you've created an instance of Delegator and pass that Delegator instance into behavior. My docs example didn't do this because I wasn't using Startup, but it should.

Maybe I'll add a Behavior.init() method that just does these few lines for you for when your use case is the typical one...


On Wed, Sep 4, 2013 at 2:56 AM, Richard Neil Roque <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="_pIrMqU9XW8J">roqueric...@...> wrote:
I understand. thank you

--

---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="_pIrMqU9XW8J">mootools-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Re: MooTools for Bootstrap 3.0

nutron
Helping others use my stuff just means more people helping me find the bugs in it. 


On Wed, Sep 4, 2013 at 8:35 AM, underscore_05 <[hidden email]> wrote:

Yes, I already had a fixed awhile ago and you're right. 
Anyway, thank you again and I hope you dont get tired of giving us a support
~ more powers

Noong Miyerkules, Setyembre 04 2013 23:20:47 UTC+8, si Nutron ay sumulat:
This is a simple fix.


Instances of Behavior and Delegator don't know about each other magically. Delegator has to be given a method to fetch its paired Behavior, and, if you're using any filter that calls `api.getDelegator()` then Behavior has to know about its bound Delegator, too. So you just need to do this:

var behavior = new Behavior({});
var delegator = new Delegator({
    getBehavior: function () {
        return behavior;
    }
}).attach(document.body);
behavior.setDelegator(delegator).apply(document.body);

I.e. move the `.apply(document.body);` until after you've created an instance of Delegator and pass that Delegator instance into behavior. My docs example didn't do this because I wasn't using Startup, but it should.

Maybe I'll add a Behavior.init() method that just does these few lines for you for when your use case is the typical one...


On Wed, Sep 4, 2013 at 2:56 AM, Richard Neil Roque <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="_pIrMqU9XW8J">roqueric...@...> wrote:
I understand. thank you

--

---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="_pIrMqU9XW8J">mootools-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.