2017 © Pedro PelĂĄez
 

library listitems

Allow to use jquery render easily. With a bit php you can use search, filter and pagination. Js is provided in the library

image

healkiss/listitems

Allow to use jquery render easily. With a bit php you can use search, filter and pagination. Js is provided in the library

  • Tuesday, October 28, 2014
  • by healkiss
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

ListItems

WHAT:, (*1)

Allow to use jquery render easily., (*2)

(With a bit php you can add search, filter and pagination. Js and html are provided in the library for these purposes.), (*3)

USE:, (*4)

If you want the pagination, install http://botmonster.com/jquery-bootpag/#.VBGuVmB_tcY (fixes are included in the files template.js), (*5)

SETUP:, (*6)

Add an id, a data-itemtype and a data-url in the main DIV, (*7)

<div  id="articles-list"
      data-itemtype="article" 
      data-url= "{{ path('get_articles') }}">

Set a data-bind in each block you want dynamic, (*8)

<div>
    <a data-bind='publisher'>/a>
    <em data-bind='postDate'></em>
</div>

Set a case in Singleton.listItems, (*9)

case "article":
  this.displayList = this.displayArticles;
  break;

In proto.displayArticles add a directive for each data-bind, (*10)

postDate: {
    text: function(params) { return this.postDate; },
},
publisher: {
    text: function(params) { return this.publisherName; },
    href: function(params) { return this.publisherPath; },
},

The url need to return a Json(phpArray)., (*11)

USE :, (*12)

entity.setTabsClicks(); //if you need tabs
entity.setSelectFilter(); //if you need filters
entity.setCheckboxClicks(); //if you need checkbox
entity.setSearch(); //if you need search bar
entity.list();

The Versions

28/10 2014

dev-master

9999999-dev

Allow to use jquery render easily. With a bit php you can use search, filter and pagination. Js is provided in the library

  Sources   Download

MIT

The Requires

  • php >=5.3.3