var DashboardActionBase = new Class({
	isSingleDocument: function (collection)
	{
		if (collection.length != 1)
			return false;
		if (collection.at(0).get('type') != 'document')
			return false;
		return true;
	},

	isSingleFolder: function(collection)
	{
		if (collection.length != 1)
			return false;
		if (collection.at(0).get('type') != 'folder')
			return false;
		return true;
	},

	isDocumentsOnly: function(collection)
	{
		if (collection.length == 0)
			return false;
		var non_doc = collection.find(function (doc) { return doc.get('type') != 'document'; });
		if (non_doc)
			return false;
		return true;
	},

	isFoldersOnly: function(collection)
	{
		if (collection.length == 0)
			return false;
		var non_doc = collection.find(function (doc) { return doc.get('type') != 'folder'; });
		if (non_doc)
			return false;
		return true;
	}
});
