javascript - Action isn't call functions on view, from template - Ember -


so create view (i create need act pop up)

    application.container = ember.containerview.create();     application.container.append();      application.loginoverlay = application.loginoverlayview.create({     });     application.childviews = application.container.get('childviews');     application.childviews.pushobject(application.loginoverlay); 

i have view looks

application.loginoverlayview = ember.view.extend({ templatename: 'view/loginoverlay', password: null, logbackin: function (password) {     console.log('logbackin'); }, closeoverlay: function () {     console.log('closeoverlay'); }, username: function () {     return application.user.get('username'); }.property().volatile() }); 

here's template

<div id="login-overlay" class="overlay">     <section>       <form id="login_form">             <div class="control-group">                 <label class="control-label" for="username">{{localise _username}}: {{username}}</label>             </div>             <div class="control-group">                 <label class="control-label" for="reenter-password">{{localise _password}}</label>                 <div class="controls">                     {{view ember.textfield name="reenter-password" elementid="reenter-password" valuebinding="password" placeholder="password" type="password"}}                 </div>             </div>             <div class="control-group">                 <input type="button" value="{{localise _login}}" class="btn btn-success" {{action 'logbackin' password target="view"}} {{bindattr disabled=busy}} />                 <input type="button" value="{{localise _cancel}}" class="btn btn-danger" {{action 'closeoverlay' target="view"}} {{bindattr disabled=busy}} />             </div>         </form>     </section> </div> 

the actions on view doing when clicked.

i'm using old verion of ember - v1.0.0-rc.7-9-g7398406

any ideas?

*edit*

i did try actions hash

application.loginoverlayview = ember.view.extend({     // layoutname: 'view/loginoverlay',     templatename: 'view/loginoverlay',     password: null,     init: function () {         console.log('loginoverlayview');         this._super();     },     actions: {         logbackin: function (password) {             console.log('logbackin');         },         closeoverlay: function () {             console.log('closeoverlay');             application.removepasswordoverlay();         },         username: function () {             console.log('username');             return application.user.get('username');         }.property().volatile()     } }); 

but no joy. added init make sure being created , was, log being called

another thing add i'm not getting feedback when click buttons. i'm not getting kind of error or anything.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -