indexiatech / ember-forms

Smart, Intuitive forms for Ember.js styled with Bootstrap, Multi layouts and Validation support.
http://indexiatech.github.io/ember-forms
Apache License 2.0
218 stars 45 forks source link

Where is the built js file? #38

Closed BenjaminHorn closed 10 years ago

BenjaminHorn commented 10 years ago

It used to be a built plain js file in the dist folder. This is gone now. I installed bower and then ember forms. I have now an ember-forms folder in the bower-components folder but it contains only .caffe files. It would be nice to have hosted js file. (for example link it to JsBin examples, and for those the old school people -like me- who dont use ember-cli)

Emerson commented 10 years ago

@asaf still needs to decide if we are going to include the built library in the repo, or if it would be worth maintaining a separate bower specific repo that contains the prebuilt files.

I have the same issue that you do.

asaf commented 10 years ago

done.

BenjaminHorn commented 10 years ago

@asaf thanks for the quick build. I made some modification on the mixins, and for this i used .reopen:

        Ember.Forms.InFormMixin.reopen({
            model: (function() {
                return this.get('form.model');
            }).property('form', 'form.model')  
        });

Now im getting: Uncaught TypeError: Cannot read property 'reopen' of undefined BUT! this works:

        Ember.Forms.ControlMixin.reopen({
            init: function() {
            this._super();
            if (typeof this.get("selection") !== "undefined") {
              return Ember.Binding.from("model." + (this.get("propertyName"))).to("selection").connect(this);
            }
            return Ember.Binding.from("model." + (this.get('propertyName'))).to('value').connect(this);
          }  
        });

It looks like after the refactoring Ember.Forms.InFormMixin cant be found but Ember.Forms.ControlMixin can. I looked in the source and i cant see any difference of the declaration of the two mixins.

JsBin: http://jsbin.com/finahuna/31/edit try to uncomment the Ember.Forms.InFormMixin.reopen section.

EDIT Inspecting the source a little bit further i found: After

exports.ControlMixin = ControlMixin;

is

exports.InFormMixin = InFormMixin;

missing. This could be a problem.