Пример #1
0
      color : 'blue'
    }
  ]
};

var message2 = {
  author : {
    name : 'Matt',
    icon : 'https://secure.gravatar.com/avatar/824b41e6108a22c4c96f50ee23419369?s=140&d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png'
  },
  message : 'Howdy!',
  groups : [
    {
      name : 'football',
      color : 'brown'
    },
    {
      name : 'Soccer',
      color : 'blue'
    }
  ]
};

inbox.el.addClass('inbox');

inbox.engine = require('matthewmueller-hogan');
inbox.template(document.getElementById('message-template').text);
inbox.add(message1);
inbox.add(message2);
inbox.el.appendTo('body');
Пример #2
0
	it('should add Arrays', function () {
		var list = new List();
		list.add([1], [2]);
		assert(list.join() === '1,2');
	});
Пример #3
0
	it('should add Lists', function () {
		var list = new List();
		list.add(List([1]), List([2]));
		assert(list.join() === '1,2');
	});
Пример #4
0
	it('should add items', function () {
		var list = new List();
		list.add(1, 2);
		assert(list.join() === '1,2');
	});