Mustache: get index of the list element
{{#items}}// is it possible to get index of rendered element right out of the box? {{/items}}Here is the code of helper I use:var index = function(expr, options) { var result = []...
View Articlejs steal\getjs behind Proxy
Hi,I came across the problem that when i want to install a plugin with stealjs i an Exception thats shows a connection timeout.I reckon this is caused by the fact that i'm behind a proxy. The...
View ArticleDefining a can.Observe to achive automatic event handling in can.Control?
Hello.I have a can.Observe and want to listen to it's changes in a can.Control using the "property-event-binding".According to this thread it should be...
View ArticleRe : Defining a can.Observe to achive automatic event handling in can.Control?
Nevermind.I've just browsed the source of can.Control and saw that it will only work on "window" and options properties passed to the control on construction.
View ArticleRe : Defining a can.Observe to achive automatic event handling in can.Control?
You can add your Observe to the options of your Control and rebind all events using this.on(). So something like this:this.options.myObs = new Cat({...})this.on();Then if you have a '{myObs} name'...
View ArticleIs it possible to resolve a $.Deferred when a JMVC app has finished loading?
JMVC 3.2.4Hello all,I'm trying to test drive my apps with QUnit and keep tripping up with deferreds in my application code, in particular when I'm using components (mycomponent) in the render method of...
View ArticleRe : Events in controller
Would this be a case of using $.detach() ? I'm not sure if $.detach() destroys event listeners though.
View ArticleShould fixtures only ever be used for development and unit tests?
JMVC 3.2.4Hello there,Would I be right in saying that JMVC model fixtures should only ever be used for development and unit tests and not in production? I've come across some production code that uses...
View ArticleAsynchronous Constructor Instantiation and DOM Insertion Within Loop
Hey All, How can I best instantiate a constuctor function and insert the associated HTML code into the DOM in a loop? At this point I'm using a callback from a setTimeout zero. Meh. In this simplified...
View ArticleRe : Should fixtures only ever be used for development and unit tests?
they should only be used for dev and test
View ArticleRe : Asynchronous Constructor Instantiation and DOM Insertion Within Loop
if you are inserting 1000 elements one after another, that is what is taking so long. You probably should probably be using event delegation around your list.
View ArticleUnbinding models combined with the attributes plugin doesn't work
Hi all,I have a problem by using attributes plugin and live binding.Define models:var Page = can.Model('Models.Page', { attributes: { Texts: 'Models.Text.models' }, findOne :...
View ArticleRe : Unbinding models combined with the attributes plugin doesn't work
I made two examples in fiddle:The first example woring perfect: http://jsfiddle.net/G2SrY/In the second example I removed the wrapping element from binded attribute: http://jsfiddle.net/G2SrY/1/So it...
View ArticleRe : Should fixtures only ever be used for development and unit tests?
Thank you for clarifying Justin!I shall proceed to replace with resolved deferreds.
View Article$.Model.static.convert() used with $.Model.prototype.restore() re-converts...
JMVC 3.2.4Hello there,When I model.restore() on a model that makes use of $.Model.static.convert() the model attrs are converted again which is producing unexpected results.Has anyone come across this...
View ArticleInit Method on each Element
Hi guys...here is my jsFiddle problem: http://jsfiddle.net/QphDv/2/After creating a new Control, i store the "p" tag into a local variable. But the problem is, if i move the mouse over one box, the...
View ArticleRe : Init Method on each Element
sorry.. something went wrong with fiddlehere i thr right onehttp://jsfiddle.net/QphDv/6/
View ArticleRe : Init Method on each Element
You should init controllers separately for the elements one by onehttp://jsfiddle.net/QphDv/8/
View ArticleRe : Init Method on each Element
So it is not possible to create a root Controller to manage the Elements inside with a eventhandler for each of them?
View Article