refactor setData

This commit is contained in:
Nils Schneider 2015-03-29 17:48:25 +02:00
commit a031ac336d
7 changed files with 47 additions and 35 deletions

View file

@ -1,5 +1,5 @@
define(["moment"], function (moment) {
return function(config, field, router, title) {
return function(config, nodes, field, router, title) {
var self = this
var el
@ -8,7 +8,9 @@ define(["moment"], function (moment) {
d.appendChild(el)
}
self.setData = function (list) {
self.setData = function (data) {
var list = data.nodes[nodes]
if (list.length === 0)
return