-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
72 lines (42 loc) · 2.04 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Base classes for jQueryMobile Support
This Librairy actually add some specifics View and one Controller to emberjs
Require: emberjs, jquery, jquery mobile and the css file for all the previous librairy
This code is base of the work of LuisSala to see his code go to https://github.com/LuisSala/emberjs-jqm
Any help will be welcome...
List of the added class (abstract are omitted):
- Mov.PageView is the conterpart of the page element in JQMobile.
- Mov.HeaderView is the conterpart of the toolbar header element in JQMobile.
- Mov.ContentView is the conterpart of the content element in JQMobile.
- Mov.FooterView is the conterpart of the toolbar Footer element in JQMobile.
- Mov.ListItemView is the conterpart of the element of a List View in JQMobile.
- Mov.ListView is the conterpart of a List View in JQMobile.
First be sure to look at the proof of concept from LuisSala at https://github.com/LuisSala/emberjs-jqm
How to use it :
In you html file define your view as follow :
<script type="text/x-handlebars" data-template-name="main">
{{#view App.HeaderView}}
<h1>EIReader (Easy Internet Reader)</h1>
{{/view}}
{{#view App.MyView}}
{{#view App.Button target="App.seriesControler" action="addMore"}}Add More Items{{/view}}
<br/>
{{#collection App.ListView contentBinding="App.seriesControler"}}
<a href="#">
<b>{{content.title}}</b> <small>{{content.description}} ({{content.nbChapter}} chapters)</small>
</a>
{{/collection}}
{{/view}}
{{#view App.FooterView}}
Footer
{{/view}}
</script>
In your App.js you should use the new View and Controller
App = Em.Application.create();
App.MyView = Mov.ContentView.extend({
});
App.HeaderView = Mov.HeaderView.extend({
});
App.FooterView = Mov.FooterView.extend({
});
App.ListView = Mov.ListView.extend({});
I am currently working of a app using this library and I will create a new repo for it as soon as possible.