/**
 * Collection that contains all selected (ticked) documents from the current documents list
 */
var SelectedDocsCollection = Backbone.Collection.extend({
	model: DocElementModel,

	// expects DocElementModel
	isSelected: function (doc)
	{
		for (var i = 0; i < this.length; i++)
		{
			var d = this.at(i);
			if (d.get('type') == doc.get('type') && d.getObjId() == doc.getObjId())
				return true;
		}
		return false;
	}
});


