diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2012-03-31 13:08:59 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2012-03-31 13:08:59 -0400 |
| commit | a5edfb4b0a960307cdabcfab87d8bdae94f06b74 (patch) | |
| tree | 1c116af4eca87472cc0eb53595ca892a8566b5ea | |
| parent | 6ccfa0c2ad6c4cfc4a9be8fb25a69100f8fe3f14 (diff) | |
| download | alias-a5edfb4b0a960307cdabcfab87d8bdae94f06b74.tar.gz | |
fixed the template loading issuewebclient-rewrite
| -rw-r--r-- | webclient/alias/alias.html | 6 | ||||
| -rw-r--r-- | webclient/alias/alias.js | 6 | ||||
| -rw-r--r-- | webclient/alias/models/contact.js | 15 |
3 files changed, 10 insertions, 17 deletions
diff --git a/webclient/alias/alias.html b/webclient/alias/alias.html index 9e338a9..1d98242 100644 --- a/webclient/alias/alias.html +++ b/webclient/alias/alias.html @@ -13,9 +13,9 @@ <div id="roster"> </div> - <script type='text/ejs' id='contactEJS'> -<li <%= this %> ><%= name %></li> -</script> + <!-- <script type='text/ejs' id='contactEJS'> --> + <!-- <li <%= this %> ><%= name %></li> --> + <!-- </script> --> <script type='text/javascript' src='../steal/steal.js?alias'></script> </body> </html> diff --git a/webclient/alias/alias.js b/webclient/alias/alias.js index d07ece5..df5e4fe 100644 --- a/webclient/alias/alias.js +++ b/webclient/alias/alias.js @@ -21,9 +21,7 @@ steal('./alias.css', $("#roster").roster({connection: connection}); } }; - // configure your application + // configure your application var connection = new Strophe.Connection(BOSH_SERVICE); connection.connect(NAME, PASSWORD, connect_callback); - - - })
\ No newline at end of file + });
\ No newline at end of file diff --git a/webclient/alias/models/contact.js b/webclient/alias/models/contact.js index 924ccf0..d5673bb 100644 --- a/webclient/alias/models/contact.js +++ b/webclient/alias/models/contact.js @@ -1,7 +1,6 @@ +steal('jquery/view/ejs').then('alias/views/contact.ejs'); steal('jquery/model/list', 'jquery/controller', - 'jquery/view/ejs', - function(){ $.Model('Contact', { @@ -21,17 +20,13 @@ function(){ var jid = item.getAttribute('jid'); var name = item.getAttribute('name') || jid; var contact = new Contact({jid: jid, name: name}); - $("#roster").append('contactEJS',contact); + $("#roster").append('contact.ejs',contact); }); return true; }, - init: function() { - Contact.findAll({connection: this.options.connection},this.onRoster) - }, + Contact.findAll({connection: this.options.connection}, this.onRoster); + } }); - - - -})
\ No newline at end of file +});
\ No newline at end of file |
