mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
rename renderlist 'query' option to 'selector'
for consistency with other APIs
This commit is contained in:
@@ -117,7 +117,7 @@ $(function () {
|
||||
// render individual todo list, stash kill function
|
||||
current_list_stop =
|
||||
Sky.ui.renderList(Todos, $('#item-list'), {
|
||||
query: query,
|
||||
selector: query,
|
||||
sort: {timestamp: 1},
|
||||
render: renderItem,
|
||||
events: {}
|
||||
@@ -126,7 +126,6 @@ $(function () {
|
||||
|
||||
// render list of lists in the left sidebar.
|
||||
Sky.ui.renderList(Lists, $('#lists'), {
|
||||
query: {}, // everything
|
||||
sort: {name: 1},
|
||||
template: $('#list-template'),
|
||||
events: {
|
||||
@@ -207,7 +206,6 @@ $(function () {
|
||||
Session.set('tag_filter', null);
|
||||
|
||||
Sky.ui.renderList(LocalTags, $('#tag-filter'), {
|
||||
query: {},
|
||||
sort: {tag: 1},
|
||||
template: $('#tag-filter-template'),
|
||||
events: {
|
||||
|
||||
@@ -115,7 +115,7 @@ Sky.ui.render = function (render_func, events, event_data) {
|
||||
/// in which case the first element is used.
|
||||
///
|
||||
/// options to include:
|
||||
/// query: minimongo selector (default: {})
|
||||
/// selector: minimongo selector (default: {})
|
||||
/// sort: minimongo sort specification (default: natural order)
|
||||
/// render: render function (from object to element)
|
||||
/// .. plus optionally
|
||||
@@ -159,7 +159,7 @@ Sky.ui.renderList = function (collection, element, options) {
|
||||
element.removeChild(element.childNodes[0]);
|
||||
|
||||
// XXX duplicated in sky_client.js (hook_handlebars_each)
|
||||
var query = collection.findLive(options.query, {
|
||||
var query = collection.findLive(options.selector, {
|
||||
added: function (obj, before_idx) {
|
||||
if (before_idx === element.childNodes.length)
|
||||
element.appendChild(render(obj));
|
||||
|
||||
Reference in New Issue
Block a user