}\r
var itemViews = [];\r
\r
- var addHistoryItem = function(item) {\r
+ var addHistoryItem = function(item, options) {\r
historyItems.add(item);\r
var view = new itemView(item);\r
itemViews.push(view);\r
domNodes.itemList.prepend(view.dom);\r
+ if(options.animate) {\r
+ view.dom.hide().slideDown();\r
+ }\r
}\r
\r
var toggleItemViews = function(toggle) {\r
\r
\r
return {\r
- start: function() { sandbox.publish('ready'); },\r
- addHistory: function(history) {\r
+ start: function() { sandbox.publish('ready'); },
+ addHistory: function(history, options) {\r
history.forEach(function(historyItem) {\r
- addHistoryItem(historyItem);\r
+ addHistoryItem(historyItem, options || {});\r
});\r
},\r
getView: function() {\r
sandbox.getModule('indicator').clearMessage();\r
},\r
historyItemAdded: function(item) {\r
- sandbox.getModule('documentHistory').addHistory([item]);\r
+ sandbox.getModule('documentHistory').addHistory([item], {animate: true});\r
}\r
}\r
\r