Navigation Menu

Skip to content

Commit

Permalink
Use dollars.js
Browse files Browse the repository at this point in the history
  • Loading branch information
dv committed Jan 19, 2012
1 parent 8ff8ebc commit da7679d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 0 additions & 13 deletions static/hookscope.js
Expand Up @@ -11,19 +11,6 @@ function createRequestView(request) {
return $($("#request-template").data("compiled")(request)); return $($("#request-template").data("compiled")(request));
} }


_.filterKeys = function(collection, keys) {
var results = {};

_.each(collection, function(value, key) {
if (_.include(keys, key)) {
results[key] = value;
}
});

return results;
}


// Compile all the templates // Compile all the templates
$(function() { $(function() {
$("[type='text/template']").each(function(index, element) { $("[type='text/template']").each(function(index, element) {
Expand Down
2 changes: 2 additions & 0 deletions static/index.html
Expand Up @@ -7,6 +7,7 @@
<script src="jquery.customslide.js"></script> <script src="jquery.customslide.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.2.2/underscore-min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.2.2/underscore-min.js"></script>
<script src="jquery.easydate-0.2.4.min.js"></script> <script src="jquery.easydate-0.2.4.min.js"></script>
<script src="dollars.js"></script>
<script src="hookscope.js"></script> <script src="hookscope.js"></script>
<style type="text/css"> <style type="text/css">
body { body {
Expand All @@ -33,6 +34,7 @@ <h3><%- url.href %></h3>
</thead> </thead>
<tbody> <tbody>
<% _.each(_.filterKeys(headers, ["user-agent", "content-length"]), function(value, key) { %> <% _.each(_.filterKeys(headers, ["user-agent", "content-length"]), function(value, key) { %>
<% _.each($$.filterKeys(headers, ["user-agent"]), function(value, key) { %>
<tr> <tr>
<th><%- key %></th> <th><%- key %></th>
<td><%- value %></td> <td><%- value %></td>
Expand Down

0 comments on commit da7679d

Please sign in to comment.