Permalink
Browse files

Improved Console.

  • Loading branch information...
1 parent fac760f commit 4762d9e25442d2a9a650e01fd48b0fcab8acd854 @michael michael committed Oct 23, 2012
Showing with 6 additions and 5 deletions.
  1. +2 −5 console.js
  2. +4 −0 index.html
View
7 console.js
@@ -17,11 +17,11 @@ $(function() {
"document": [
{
"name": "Insert Section",
- "op": ["insert", {"id": "UNIQUE_ID", "type": "section", "target": "NODE_ID|front|back", "data": {"content": "SECTION_NAME"}}]
+ "op": ["insert", {"id": "UNIQUE_ID", "type": "section", "target": "back", "data": {"content": "SECTION_NAME"}}]
},
{
"name": "Insert Text",
- "op": ["insert", {"id": "UNIQUE_ID", "type": "text", "target": "NODE_ID|front|back", "data": {"content": "CONTENT"}}]
+ "op": ["insert", {"id": "UNIQUE_ID", "type": "text", "target": "back", "data": {"content": "CONTENT"}}]
},
{
"name": "Update Text (Delta)",
@@ -249,11 +249,8 @@ $(function() {
renderAnnotations: function() {
var that = this;
_.each(this.model.nodes(), function(node) {
- // console.log('rendering annotations for'+ node.id);
var annotations = that.model.annotations(node.id);
- // console.log('annotations', annotations);
_.each(annotations, function(a) {
- // console.log('ann', a.pos);
var elems = $('div[data-id="'+a.node+'"]').children().slice(a.pos[0], a.pos[0] + a.pos[1]);
elems.addClass(a.type);
});
View
4 index.html
@@ -4,7 +4,11 @@
<meta charset='UTF-8'/>
<title>Substance Document</title>
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,300' rel='stylesheet' type='text/css'>
+ <link href='http://fonts.googleapis.com/css?family=Source+Code+Pro' rel='stylesheet' type='text/css'/>
+
<link rel='stylesheet' href='console.css'/>
+
<script src="lib/underscore.js"></script>
<script src="lib/jquery.min.js"></script>
<script src="lib/backbone.js"></script>

0 comments on commit 4762d9e

Please sign in to comment.