d3vgru / ember-moving

JavaScript library to mix EmberJs and jquery mobile. Work in progress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

JavaScript library to mix EmberJs and jquery mobile. Work in progress