Added support for nested snapshot elements

This commit is contained in:
Marcin Kurczewski 2014-10-26 01:15:43 +02:00
parent 189aaeadb7
commit e4424d5191

View file

@ -1,3 +1,12 @@
<%
var reprValue = function(value) {
if (typeof(value) === 'string' || value instanceof String) {
return value;
}
return JSON.stringify(value);
};
%>
<h1>History</h1> <h1>History</h1>
<table class="history"> <table class="history">
<tbody> <tbody>
@ -45,13 +54,13 @@
<ul><!-- <ul><!--
--><% _.each(historyEntry.dataDifference['+'], function (difference) { %><!-- --><% _.each(historyEntry.dataDifference['+'], function (difference) { %><!--
--><li class="addition difference-<%= difference[0] %>"><!-- --><li class="addition difference-<%= difference[0] %>"><!--
--><%= difference[0] + ':' + difference[1] %><!-- --><%= difference[0] + ':' + reprValue(difference[1]) %><!--
--></li><!-- --></li><!--
--><% }) %><!-- --><% }) %><!--
--><% _.each(historyEntry.dataDifference['-'], function (difference) { %><!-- --><% _.each(historyEntry.dataDifference['-'], function (difference) { %><!--
--><li class="removal difference-<%= difference[0] %>"><!-- --><li class="removal difference-<%= difference[0] %>"><!--
--><%= difference[0] + ':' + difference[1] %><!-- --><%= difference[0] + ':' + reprValue(difference[1]) %><!--
--></li><!-- --></li><!--
--><% }) %><!-- --><% }) %><!--
--></ul> --></ul>